Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,182 changes: 764 additions & 418 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@nextcloud/browserslist-config": "^3.0.1",
"@nextcloud/cypress": "^1.0.0-beta.14",
"@nextcloud/eslint-config": "^8.4.1",
"@nextcloud/prettier-config": "^1.1.0",
"@nextcloud/prettier-config": "^1.2.0",
"@nextcloud/stylelint-config": "^3.0.1",
"@nextcloud/vite-config": "^1.5.3",
"@playwright/test": "^1.51.1",
Expand Down
4 changes: 2 additions & 2 deletions playwright/support/sections/FormSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export class FormSection {
private getFormUpdatedPromise(): Promise<Response> {
return this.page.waitForResponse(
(response) =>
response.request().method() === 'PATCH' &&
response
response.request().method() === 'PATCH'
&& response
.request()
.url()
.includes('/ocs/v2.php/apps/forms/api/v3/forms/'),
Expand Down
8 changes: 4 additions & 4 deletions src/components/Questions/QuestionFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ export default {
})

this.maxFileSizeValue =
this.extraSettings.maxFileSize /
FILE_SIZE_UNITS[this.maxFileSizeUnit]
this.extraSettings.maxFileSize
/ FILE_SIZE_UNITS[this.maxFileSizeUnit]
}
},

Expand All @@ -276,8 +276,8 @@ export default {
formData.append('files[]', file)

if (
this.extraSettings.maxFileSize > 0 &&
file.size > this.extraSettings.maxFileSize
this.extraSettings.maxFileSize > 0
&& file.size > this.extraSettings.maxFileSize
) {
showError(
t(
Expand Down
4 changes: 2 additions & 2 deletions src/components/Questions/QuestionMultiple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@ export default {
this.onExtraSettingsChange({ optionsLimitMin: undefined })
} else if (min) {
if (
this.extraSettings.optionsLimitMax &&
min > this.extraSettings.optionsLimitMax
this.extraSettings.optionsLimitMax
&& min > this.extraSettings.optionsLimitMax
) {
showError(
t(
Expand Down
12 changes: 6 additions & 6 deletions src/components/Questions/QuestionShort.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ export default {
submissionInputPlaceholder() {
if (!this.readOnly) {
return (
this.validationObject.createPlaceholder ||
this.answerType.createPlaceholder
this.validationObject.createPlaceholder
|| this.answerType.createPlaceholder
)
}
return (
this.validationObject.submitPlaceholder ||
this.answerType.submitPlaceholder
this.validationObject.submitPlaceholder
|| this.answerType.submitPlaceholder
)
},
/**
Expand Down Expand Up @@ -172,8 +172,8 @@ export default {
// If the browsers validation succeeds either the browser does not implement a validation
// or it is valid, so we double check by running our custom validation.
if (
!input.checkValidity() ||
!this.validationObject.validate(
!input.checkValidity()
|| !this.validationObject.validate(
value,
splitRegex(this.validationRegex),
)
Expand Down
10 changes: 5 additions & 5 deletions src/components/Results/ResultsSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ export default {
answersModels.unshift({
id: 0,
text:
noResponseCount +
' (' +
noResponsePercentage +
'%): ' +
t('forms', 'No response'),
noResponseCount
+ ' ('
+ noResponsePercentage
+ '%): '
+ t('forms', 'No response'),
})

return answersModels
Expand Down
10 changes: 5 additions & 5 deletions src/components/SidebarTabs/SettingsSidebarTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ export default {
*/
hasCustomSubmissionMessage() {
return (
this.form?.submissionMessage !== undefined &&
this.form?.submissionMessage !== null
this.form?.submissionMessage !== undefined
&& this.form?.submissionMessage !== null
)
},

Expand All @@ -209,9 +209,9 @@ export default {
*/
disableSubmitMultiple() {
return (
this.hasPublicLink ||
this.form.access.legacyLink ||
this.form.isAnonymous
this.hasPublicLink
|| this.form.access.legacyLink
|| this.form.isAnonymous
)
},
disableSubmitMultipleExplanation() {
Expand Down
8 changes: 4 additions & 4 deletions src/components/SidebarTabs/SharingSearchDiv.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export default {
(item) =>
!this.currentShares.find(
(share) =>
share.shareWith === item.shareWith &&
share.shareType === item.shareType,
share.shareWith === item.shareWith
&& share.shareType === item.shareType,
),
)
}
Expand All @@ -89,8 +89,8 @@ export default {
(item) =>
!this.currentShares.find(
(share) =>
share.shareWith === item.shareWith &&
share.shareType === item.shareType,
share.shareWith === item.shareWith
&& share.shareType === item.shareType,
),
)
},
Expand Down
8 changes: 4 additions & 4 deletions src/components/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ export default {
},
canEdit() {
return (
this.permissions.includes(this.PERMISSION_TYPES.PERMISSION_EDIT) &&
!this.archived
this.permissions.includes(this.PERMISSION_TYPES.PERMISSION_EDIT)
&& !this.archived
)
},
canSeeResults() {
Expand All @@ -151,8 +151,8 @@ export default {
},
canOnlySubmit() {
return (
this.permissions.length === 1 &&
this.permissions.includes(this.PERMISSION_TYPES.PERMISSION_SUBMIT)
this.permissions.length === 1
&& this.permissions.includes(this.PERMISSION_TYPES.PERMISSION_SUBMIT)
)
},
},
Expand Down
14 changes: 8 additions & 6 deletions src/mixins/ShareLinkMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ export default {
*/
getInternalShareLink(formHash) {
return (
window.location.protocol +
'//' +
window.location.host +
generateUrl(`/apps/forms/${this.form.hash}`)
window.location.protocol
+ '//'
+ window.location.host
+ generateUrl(`/apps/forms/${this.form.hash}`)
)
},

Expand All @@ -62,8 +62,10 @@ export default {
*/
isEmbeddingAllowed(share) {
return (
share.shareType === this.SHARE_TYPES.SHARE_TYPE_LINK &&
share.permissions?.includes(this.PERMISSION_TYPES.PERMISSION_EMBED)
share.shareType === this.SHARE_TYPES.SHARE_TYPE_LINK
&& share.permissions?.includes(
this.PERMISSION_TYPES.PERMISSION_EMBED,
)
)
},

Expand Down
10 changes: 5 additions & 5 deletions src/mixins/UserSearchMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ export default {
*/
isValidQuery() {
return (
this.query &&
this.query.trim() !== '' &&
this.query.length > this.minSearchStringLength
this.query
&& this.query.trim() !== ''
&& this.query.length > this.minSearchStringLength
)
},
/**
Expand Down Expand Up @@ -204,8 +204,8 @@ export default {
try {
// filter out current user
if (
share.value.shareType === this.SHARE_TYPES.SHARE_TYPE_USER &&
share.value.shareWith === getCurrentUser().uid
share.value.shareType === this.SHARE_TYPES.SHARE_TYPE_USER
&& share.value.shareWith === getCurrentUser().uid
) {
return false
}
Expand Down
8 changes: 4 additions & 4 deletions src/mixins/ViewsMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
formDescription() {
// Remember the old renderer if overridden, or proxy to the default renderer.
const defaultRender =
this.markdownit.renderer.rules.link_open ||
function (tokens, idx, options, env, self) {
this.markdownit.renderer.rules.link_open
|| function (tokens, idx, options, env, self) {
return self.renderToken(tokens, idx, options)
}

Expand All @@ -105,8 +105,8 @@
}

return (
this.markdownit.render(this.form.description) ||
this.form.description
this.markdownit.render(this.form.description)
|| this.form.description
)
},
},
Expand Down Expand Up @@ -155,7 +155,7 @@
this.$emit('update:form', OcsResponse2Data(response))
this.isLoadingForm = false
} catch (error) {
if (axios.isCancel(error)) {

Check warning on line 158 in src/mixins/ViewsMixin.js

View workflow job for this annotation

GitHub Actions / NPM lint

Caution: `axios` also has a named export `isCancel`. Check if you meant to write `import {isCancel} from '@nextcloud/axios'` instead
logger.debug(`The request for form ${id} has been canceled`, {
error,
})
Expand Down
4 changes: 2 additions & 2 deletions src/views/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ export default {

if (this.isRequiredUsed) {
message +=
' ' +
t('forms', 'An asterisk (*) indicates mandatory questions.')
' '
+ t('forms', 'An asterisk (*) indicates mandatory questions.')
}

return message
Expand Down
16 changes: 8 additions & 8 deletions src/views/Results.vue
Original file line number Diff line number Diff line change
Expand Up @@ -522,11 +522,11 @@ export default {
const exportUrl =
generateOcsUrl('apps/forms/api/v3/forms/{id}/submissions', {
id: this.form.id,
}) +
'?requesttoken=' +
encodeURIComponent(getRequestToken()) +
'&fileFormat=' +
fileFormat
})
+ '?requesttoken='
+ encodeURIComponent(getRequestToken())
+ '&fileFormat='
+ fileFormat
window.open(exportUrl, '_self')
},

Expand Down Expand Up @@ -703,9 +703,9 @@ export default {
questions
.filter(
(question) =>
(question.type === 'date') |
(question.type === 'datetime') |
(question.type === 'time'),
(question.type === 'date')
| (question.type === 'datetime')
| (question.type === 'time'),
)
.map((question) => [question.id, question.type]),
)
Expand Down
12 changes: 6 additions & 6 deletions src/views/Submit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ export default {
}
if (this.isRequiredUsed) {
message +=
' ' +
t('forms', 'An asterisk (*) indicates mandatory questions.')
' '
+ t('forms', 'An asterisk (*) indicates mandatory questions.')
}

return message
Expand All @@ -361,8 +361,8 @@ export default {
*/
submissionMessageHTML() {
if (
this.form.submissionMessage &&
(this.success || !this.form.canSubmit)
this.form.submissionMessage
&& (this.success || !this.form.canSubmit)
) {
return this.markdownit.render(this.form.submissionMessage)
}
Expand Down Expand Up @@ -606,8 +606,8 @@ export default {

// in case no answer is set or all are empty show the confirmation dialog
if (
Object.keys(this.answers).length === 0 ||
Object.values(this.answers).every(
Object.keys(this.answers).length === 0
|| Object.values(this.answers).every(
(answers) => answers.length === 0,
)
) {
Expand Down
Loading
Loading