@piserve-tech/form-submission 1.3.314 → 1.3.316
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -24
- package/ng-package.json +30 -0
- package/package.json +33 -46
- package/{assets → src/assets}/icons/close-sidebar-mark-icon.svg +3 -3
- package/{assets → src/assets}/icons/copy-icon.svg +5 -5
- package/{assets → src/assets}/icons/delete-icon.svg +7 -7
- package/{assets → src/assets}/icons/delete-no-outline-icon.svg +7 -7
- package/src/environment/environment.ts +6 -0
- package/src/form-fields/aggregate-function/aggregate-function.component.html +63 -0
- package/src/form-fields/aggregate-function/aggregate-function.component.scss +1 -0
- package/src/form-fields/aggregate-function/aggregate-function.component.spec.ts +21 -0
- package/src/form-fields/aggregate-function/aggregate-function.component.ts +148 -0
- package/src/form-fields/check-box-fields/check-box-fields.component.html +81 -0
- package/src/form-fields/check-box-fields/check-box-fields.component.scss +28 -0
- package/src/form-fields/check-box-fields/check-box-fields.component.spec.ts +21 -0
- package/src/form-fields/check-box-fields/check-box-fields.component.ts +538 -0
- package/src/form-fields/currency-fields/currency-fields.component.html +85 -0
- package/src/form-fields/currency-fields/currency-fields.component.scss +48 -0
- package/src/form-fields/currency-fields/currency-fields.component.spec.ts +21 -0
- package/src/form-fields/currency-fields/currency-fields.component.ts +589 -0
- package/src/form-fields/date-time-fields/date-time-fields.component.html +268 -0
- package/src/form-fields/date-time-fields/date-time-fields.component.scss +88 -0
- package/src/form-fields/date-time-fields/date-time-fields.component.spec.ts +21 -0
- package/src/form-fields/date-time-fields/date-time-fields.component.ts +693 -0
- package/src/form-fields/drop-down-fields/drop-down-fields.component.html +77 -0
- package/src/form-fields/drop-down-fields/drop-down-fields.component.scss +12 -0
- package/src/form-fields/drop-down-fields/drop-down-fields.component.spec.ts +21 -0
- package/src/form-fields/drop-down-fields/drop-down-fields.component.ts +698 -0
- package/src/form-fields/file-picker-fields/file-picker-fields.component.html +72 -0
- package/src/form-fields/file-picker-fields/file-picker-fields.component.scss +33 -0
- package/src/form-fields/file-picker-fields/file-picker-fields.component.spec.ts +21 -0
- package/src/form-fields/file-picker-fields/file-picker-fields.component.ts +256 -0
- package/src/form-fields/form-fields.module.ts +110 -0
- package/src/form-fields/hidden-field/hidden-field.component.scss +0 -0
- package/src/form-fields/hidden-field/hidden-field.component.spec.ts +21 -0
- package/src/form-fields/hidden-field/hidden-field.component.ts +156 -0
- package/src/form-fields/iframe-fields/iframe-fields.component.html +31 -0
- package/src/form-fields/iframe-fields/iframe-fields.component.scss +0 -0
- package/src/form-fields/iframe-fields/iframe-fields.component.spec.ts +21 -0
- package/src/form-fields/iframe-fields/iframe-fields.component.ts +225 -0
- package/src/form-fields/location-fields/location-fields.component.html +54 -0
- package/src/form-fields/location-fields/location-fields.component.scss +22 -0
- package/src/form-fields/location-fields/location-fields.component.spec.ts +21 -0
- package/src/form-fields/location-fields/location-fields.component.ts +83 -0
- package/src/form-fields/mail-fields/mail-fields.component.html +66 -0
- package/src/form-fields/mail-fields/mail-fields.component.scss +10 -0
- package/src/form-fields/mail-fields/mail-fields.component.spec.ts +21 -0
- package/src/form-fields/mail-fields/mail-fields.component.ts +127 -0
- package/src/form-fields/mobile-fields/mobile-fields.component.html +97 -0
- package/src/form-fields/mobile-fields/mobile-fields.component.scss +52 -0
- package/src/form-fields/mobile-fields/mobile-fields.component.spec.ts +21 -0
- package/src/form-fields/mobile-fields/mobile-fields.component.ts +310 -0
- package/src/form-fields/number-fields/number-fields.component.html +70 -0
- package/src/form-fields/number-fields/number-fields.component.scss +17 -0
- package/src/form-fields/number-fields/number-fields.component.spec.ts +21 -0
- package/src/form-fields/number-fields/number-fields.component.ts +256 -0
- package/src/form-fields/password-fields/password-fields.component.html +113 -0
- package/src/form-fields/password-fields/password-fields.component.scss +61 -0
- package/src/form-fields/password-fields/password-fields.component.spec.ts +21 -0
- package/src/form-fields/password-fields/password-fields.component.ts +273 -0
- package/src/form-fields/radio-button-fields/radio-button-fields.component.html +82 -0
- package/src/form-fields/radio-button-fields/radio-button-fields.component.scss +28 -0
- package/src/form-fields/radio-button-fields/radio-button-fields.component.spec.ts +21 -0
- package/src/form-fields/radio-button-fields/radio-button-fields.component.ts +391 -0
- package/src/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.html +67 -0
- package/src/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.scss +23 -0
- package/src/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.spec.ts +21 -0
- package/src/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.ts +145 -0
- package/src/form-fields/section-fields/section-fields.component.html +4 -0
- package/src/form-fields/section-fields/section-fields.component.scss +37 -0
- package/src/form-fields/section-fields/section-fields.component.spec.ts +21 -0
- package/src/form-fields/section-fields/section-fields.component.ts +25 -0
- package/src/form-fields/selection-matrix-fields/selection-matrix-fields.component.html +93 -0
- package/src/form-fields/selection-matrix-fields/selection-matrix-fields.component.scss +52 -0
- package/src/form-fields/selection-matrix-fields/selection-matrix-fields.component.spec.ts +21 -0
- package/src/form-fields/selection-matrix-fields/selection-matrix-fields.component.ts +155 -0
- package/src/form-fields/signature-fields/signature-fields.component.html +43 -0
- package/src/form-fields/signature-fields/signature-fields.component.scss +10 -0
- package/src/form-fields/signature-fields/signature-fields.component.spec.ts +21 -0
- package/src/form-fields/signature-fields/signature-fields.component.ts +25 -0
- package/src/form-fields/slider-fields/slider-fields.component.html +67 -0
- package/src/form-fields/slider-fields/slider-fields.component.scss +55 -0
- package/src/form-fields/slider-fields/slider-fields.component.spec.ts +21 -0
- package/src/form-fields/slider-fields/slider-fields.component.ts +63 -0
- package/src/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.html +52 -0
- package/src/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.scss +85 -0
- package/src/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.spec.ts +21 -0
- package/src/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.ts +62 -0
- package/src/form-fields/text-area-fields/text-area-fields.component.html +68 -0
- package/src/form-fields/text-area-fields/text-area-fields.component.scss +19 -0
- package/src/form-fields/text-area-fields/text-area-fields.component.spec.ts +21 -0
- package/src/form-fields/text-area-fields/text-area-fields.component.ts +166 -0
- package/src/form-fields/text-fields/text-fields.component.html +67 -0
- package/src/form-fields/text-fields/text-fields.component.scss +26 -0
- package/src/form-fields/text-fields/text-fields.component.spec.ts +21 -0
- package/src/form-fields/text-fields/text-fields.component.ts +248 -0
- package/src/form-fields/toggle-switch-fields/toggle-switch-fields.component.html +70 -0
- package/src/form-fields/toggle-switch-fields/toggle-switch-fields.component.scss +112 -0
- package/src/form-fields/toggle-switch-fields/toggle-switch-fields.component.spec.ts +21 -0
- package/src/form-fields/toggle-switch-fields/toggle-switch-fields.component.ts +74 -0
- package/src/form-fields/url-fields/url-fields.component.html +109 -0
- package/src/form-fields/url-fields/url-fields.component.scss +22 -0
- package/src/form-fields/url-fields/url-fields.component.spec.ts +21 -0
- package/src/form-fields/url-fields/url-fields.component.ts +123 -0
- package/src/form-submission/form-submission.module.ts +40 -0
- package/src/form-submission/header/header.component.html +6 -0
- package/src/form-submission/header/header.component.scss +26 -0
- package/src/form-submission/header/header.component.spec.ts +21 -0
- package/src/form-submission/header/header.component.ts +12 -0
- package/src/form-submission/navigation-tabs/navigation-tabs.component.html +134 -0
- package/src/form-submission/navigation-tabs/navigation-tabs.component.scss +200 -0
- package/src/form-submission/navigation-tabs/navigation-tabs.component.spec.ts +21 -0
- package/src/form-submission/navigation-tabs/navigation-tabs.component.ts +134 -0
- package/src/form-submission/next-prev-navigation/next-prev-navigation.component.html +207 -0
- package/src/form-submission/next-prev-navigation/next-prev-navigation.component.scss +208 -0
- package/src/form-submission/next-prev-navigation/next-prev-navigation.component.spec.ts +21 -0
- package/src/form-submission/next-prev-navigation/next-prev-navigation.component.ts +74 -0
- package/src/form-submission/save-as-draft/saveDraftModalComponent .ts +60 -0
- package/src/form-submission/save-as-draft/saveDraftModalComponent.html +33 -0
- package/src/form-submission/save-as-draft/saveDraftModalComponent.scss +195 -0
- package/src/form-submission/submission-container/submission-container.component.html +30 -0
- package/src/form-submission/submission-container/submission-container.component.scss +67 -0
- package/src/form-submission/submission-container/submission-container.component.spec.ts +21 -0
- package/src/form-submission/submission-container/submission-container.component.ts +14 -0
- package/src/form-submission/submit-form/submit-form.component.html +76 -0
- package/src/form-submission/submit-form/submit-form.component.scss +88 -0
- package/src/form-submission/submit-form/submit-form.component.spec.ts +21 -0
- package/src/form-submission/submit-form/submit-form.component.ts +1953 -0
- package/src/lib/form-submission.component.html +15 -0
- package/src/lib/form-submission.component.scss +1 -0
- package/src/lib/form-submission.component.ts +120 -0
- package/src/lib/form-submission.module.ts +31 -0
- package/src/lib/form-submission.service.spec.ts +16 -0
- package/src/lib/form-submission.service.ts +9 -0
- package/src/models/aggregate.model.ts +4 -0
- package/{models/answer.model.d.ts → src/models/answer.model.ts} +25 -23
- package/src/models/appearance.model.ts +64 -0
- package/{models/attachment.model.d.ts → src/models/attachment.model.ts} +6 -6
- package/{models/defaultAnswerEntry.model.d.ts → src/models/defaultAnswerEntry.model.ts} +7 -5
- package/{models/defaultAnswersModel.model.d.ts → src/models/defaultAnswersModel.model.ts} +5 -4
- package/{models/defaultQuestionAnswer.model.d.ts → src/models/defaultQuestionAnswer.model.ts} +6 -6
- package/src/models/elementOptionAPI.model.ts +13 -0
- package/src/models/elementOptionAPIData.model.ts +5 -0
- package/src/models/elementOptionDB.model.ts +9 -0
- package/src/models/elementOptionDBCriteria.model.ts +7 -0
- package/{models/emitters.model.d.ts → src/models/emitters.model.ts} +8 -8
- package/{models/enum/condition.enum.d.ts → src/models/enum/condition.enum.ts} +2 -2
- package/src/models/enum/elementType .enum.ts +22 -0
- package/src/models/enum/entityType.enum.ts +10 -0
- package/{models/formConfiguration.model.d.ts → src/models/formConfiguration.model.ts} +2 -2
- package/{models/formElement.model.d.ts → src/models/formElement.model.ts} +22 -22
- package/{models/formElementType.model.d.ts → src/models/formElementType.model.ts} +3 -2
- package/{models/grid.model.d.ts → src/models/grid.model.ts} +14 -13
- package/{models/hiddenField.model.d.ts → src/models/hiddenField.model.ts} +5 -5
- package/{models/iFrameProperties.model.d.ts → src/models/iFrameProperties.model.ts} +13 -13
- package/src/models/logic.model.ts +11 -0
- package/src/models/multifields.model.ts +12 -0
- package/{models/option.model.d.ts → src/models/option.model.ts} +5 -5
- package/src/models/page.model.ts +7 -0
- package/src/models/publicForm.model.ts +19 -0
- package/src/models/question.model.ts +27 -0
- package/src/models/questionAnswer.model.ts +8 -0
- package/src/models/questionGroup.model.ts +12 -0
- package/src/models/response.model.ts +9 -0
- package/src/models/result.model.ts +5 -0
- package/{models/row.model.d.ts → src/models/row.model.ts} +2 -1
- package/src/models/scoring.model.ts +10 -0
- package/src/models/section.model.ts +6 -0
- package/src/models/subForm.model.ts +25 -0
- package/src/models/subformConfiguration.model.ts +4 -0
- package/src/models/subformPropery.model.ts +8 -0
- package/{models/submission.model.d.ts → src/models/submission.model.ts} +16 -14
- package/{models/submissionCopyConfig.mopdel.d.ts → src/models/submissionCopyConfig.mopdel.ts} +4 -4
- package/{models/terms&condition.model.d.ts → src/models/terms&condition.model.ts} +1 -1
- package/src/models/validation.model.ts +48 -0
- package/src/models/whenClause.model.ts +7 -0
- package/{models/whenClauseCondition.model.d.ts → src/models/whenClauseCondition.model.ts} +6 -6
- package/{models/whenClauseElements.model.d.ts → src/models/whenClauseElements.model.ts} +6 -5
- package/{public-api.d.ts → src/public-api.ts} +4 -0
- package/src/question/card-subform/card-subform.component.html +282 -0
- package/src/question/card-subform/card-subform.component.scss +49 -0
- package/src/question/card-subform/card-subform.component.spec.ts +21 -0
- package/src/question/card-subform/card-subform.component.ts +407 -0
- package/src/question/confirm-dialog/confirm-dialog.component.html +32 -0
- package/src/question/confirm-dialog/confirm-dialog.component.scss +109 -0
- package/src/question/confirm-dialog/confirm-dialog.component.spec.ts +21 -0
- package/src/question/confirm-dialog/confirm-dialog.component.ts +24 -0
- package/src/question/form-elements/form-elements.component.html +28 -0
- package/src/question/form-elements/form-elements.component.scss +0 -0
- package/src/question/form-elements/form-elements.component.spec.ts +21 -0
- package/src/question/form-elements/form-elements.component.ts +41 -0
- package/src/question/inline-multiple-subform/inline-multiple-subform.component.html +321 -0
- package/src/question/inline-multiple-subform/inline-multiple-subform.component.scss +78 -0
- package/src/question/inline-multiple-subform/inline-multiple-subform.component.spec.ts +21 -0
- package/src/question/inline-multiple-subform/inline-multiple-subform.component.ts +425 -0
- package/src/question/multifields/multifields.component.html +78 -0
- package/src/question/multifields/multifields.component.scss +6 -0
- package/src/question/multifields/multifields.component.spec.ts +21 -0
- package/src/question/multifields/multifields.component.ts +27 -0
- package/src/question/multiple-subform/multiple-subform.component.html +185 -0
- package/src/question/multiple-subform/multiple-subform.component.scss +52 -0
- package/src/question/multiple-subform/multiple-subform.component.spec.ts +21 -0
- package/src/question/multiple-subform/multiple-subform.component.ts +481 -0
- package/src/question/question/question.component.html +51 -0
- package/src/question/question/question.component.scss +0 -0
- package/src/question/question/question.component.spec.ts +21 -0
- package/src/question/question/question.component.ts +129 -0
- package/src/question/question-group/question-group.component.html +147 -0
- package/src/question/question-group/question-group.component.scss +36 -0
- package/src/question/question-group/question-group.component.spec.ts +21 -0
- package/src/question/question-group/question-group.component.ts +94 -0
- package/src/question/question.module.ts +22 -0
- package/src/question/recursive-logic/recursive-logic.component.html +33 -0
- package/src/question/recursive-logic/recursive-logic.component.scss +0 -0
- package/src/question/recursive-logic/recursive-logic.component.spec.ts +21 -0
- package/src/question/recursive-logic/recursive-logic.component.ts +29 -0
- package/src/question/sub-form/sub-form.component.html +254 -0
- package/src/question/sub-form/sub-form.component.scss +83 -0
- package/src/question/sub-form/sub-form.component.spec.ts +21 -0
- package/src/question/sub-form/sub-form.component.ts +421 -0
- package/src/services/aggregate.service.ts +148 -0
- package/src/services/countryService.ts +92 -0
- package/src/services/data.service.ts +36 -0
- package/src/services/element-tracker.service.spec.ts +16 -0
- package/src/services/element-tracker.service.ts +24 -0
- package/src/services/form-validation.service.ts +151 -0
- package/src/services/form.service.spec.ts +16 -0
- package/src/services/form.service.ts +407 -0
- package/src/services/mapper.service.ts +625 -0
- package/src/services/recaptcha.service.spec.ts +16 -0
- package/src/services/recaptcha.service.ts +179 -0
- package/src/services/score.service.ts +352 -0
- package/src/services/subform-copy.service.ts +148 -0
- package/src/services/validation.service.spec.ts +16 -0
- package/src/services/validation.service.ts +33 -0
- package/src/services/whenClause.service.ts +502 -0
- package/src/shared/shared.module.ts +58 -0
- package/src/styles/shared-style.scss +86 -0
- package/src/sub-form/sub-form.module.ts +24 -0
- package/src/sub-form/submission-modal/submission-modal.component.html +160 -0
- package/src/sub-form/submission-modal/submission-modal.component.scss +54 -0
- package/src/sub-form/submission-modal/submission-modal.component.spec.ts +21 -0
- package/src/sub-form/submission-modal/submission-modal.component.ts +127 -0
- package/tsconfig.lib.json +14 -0
- package/tsconfig.lib.prod.json +10 -0
- package/tsconfig.spec.json +14 -0
- package/environment/environment.d.ts +0 -5
- package/esm2022/environment/environment.mjs +0 -6
- package/esm2022/form-fields/aggregate-function/aggregate-function.component.mjs +0 -146
- package/esm2022/form-fields/check-box-fields/check-box-fields.component.mjs +0 -473
- package/esm2022/form-fields/currency-fields/currency-fields.component.mjs +0 -502
- package/esm2022/form-fields/date-time-fields/date-time-fields.component.mjs +0 -608
- package/esm2022/form-fields/drop-down-fields/drop-down-fields.component.mjs +0 -585
- package/esm2022/form-fields/file-picker-fields/file-picker-fields.component.mjs +0 -224
- package/esm2022/form-fields/form-fields.module.mjs +0 -174
- package/esm2022/form-fields/hidden-field/hidden-field.component.mjs +0 -137
- package/esm2022/form-fields/iframe-fields/iframe-fields.component.mjs +0 -198
- package/esm2022/form-fields/location-fields/location-fields.component.mjs +0 -85
- package/esm2022/form-fields/mail-fields/mail-fields.component.mjs +0 -131
- package/esm2022/form-fields/mobile-fields/mobile-fields.component.mjs +0 -270
- package/esm2022/form-fields/number-fields/number-fields.component.mjs +0 -242
- package/esm2022/form-fields/password-fields/password-fields.component.mjs +0 -257
- package/esm2022/form-fields/radio-button-fields/radio-button-fields.component.mjs +0 -346
- package/esm2022/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.mjs +0 -148
- package/esm2022/form-fields/section-fields/section-fields.component.mjs +0 -29
- package/esm2022/form-fields/selection-matrix-fields/selection-matrix-fields.component.mjs +0 -158
- package/esm2022/form-fields/signature-fields/signature-fields.component.mjs +0 -32
- package/esm2022/form-fields/slider-fields/slider-fields.component.mjs +0 -73
- package/esm2022/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.mjs +0 -66
- package/esm2022/form-fields/text-area-fields/text-area-fields.component.mjs +0 -159
- package/esm2022/form-fields/text-fields/text-fields.component.mjs +0 -245
- package/esm2022/form-fields/toggle-switch-fields/toggle-switch-fields.component.mjs +0 -85
- package/esm2022/form-fields/url-fields/url-fields.component.mjs +0 -124
- package/esm2022/form-submission/form-submission.module.mjs +0 -64
- package/esm2022/form-submission/header/header.component.mjs +0 -20
- package/esm2022/form-submission/navigation-tabs/navigation-tabs.component.mjs +0 -171
- package/esm2022/form-submission/next-prev-navigation/next-prev-navigation.component.mjs +0 -124
- package/esm2022/form-submission/save-as-draft/saveDraftModalComponent .mjs +0 -50
- package/esm2022/form-submission/submission-container/submission-container.component.mjs +0 -17
- package/esm2022/form-submission/submit-form/submit-form.component.mjs +0 -1610
- package/esm2022/lib/form-submission.component.mjs +0 -113
- package/esm2022/lib/form-submission.module.mjs +0 -56
- package/esm2022/lib/form-submission.service.mjs +0 -14
- package/esm2022/models/aggregate.model.mjs +0 -2
- package/esm2022/models/answer.model.mjs +0 -2
- package/esm2022/models/appearance.model.mjs +0 -2
- package/esm2022/models/attachment.model.mjs +0 -2
- package/esm2022/models/defaultAnswerEntry.model.mjs +0 -2
- package/esm2022/models/defaultAnswersModel.model.mjs +0 -2
- package/esm2022/models/defaultQuestionAnswer.model.mjs +0 -2
- package/esm2022/models/elementOptionAPI.model.mjs +0 -2
- package/esm2022/models/elementOptionAPIData.model.mjs +0 -2
- package/esm2022/models/elementOptionDB.model.mjs +0 -2
- package/esm2022/models/elementOptionDBCriteria.model.mjs +0 -2
- package/esm2022/models/emitters.model.mjs +0 -2
- package/esm2022/models/enum/condition.enum.mjs +0 -18
- package/esm2022/models/enum/elementType .enum.mjs +0 -24
- package/esm2022/models/enum/entityType.enum.mjs +0 -12
- package/esm2022/models/formConfiguration.model.mjs +0 -2
- package/esm2022/models/formElement.model.mjs +0 -2
- package/esm2022/models/formElementType.model.mjs +0 -2
- package/esm2022/models/grid.model.mjs +0 -2
- package/esm2022/models/hiddenField.model.mjs +0 -2
- package/esm2022/models/iFrameProperties.model.mjs +0 -2
- package/esm2022/models/logic.model.mjs +0 -2
- package/esm2022/models/multifields.model.mjs +0 -2
- package/esm2022/models/option.model.mjs +0 -2
- package/esm2022/models/page.model.mjs +0 -2
- package/esm2022/models/publicForm.model.mjs +0 -2
- package/esm2022/models/question.model.mjs +0 -2
- package/esm2022/models/questionAnswer.model.mjs +0 -2
- package/esm2022/models/questionGroup.model.mjs +0 -2
- package/esm2022/models/row.model.mjs +0 -2
- package/esm2022/models/scoring.model.mjs +0 -2
- package/esm2022/models/section.model.mjs +0 -2
- package/esm2022/models/subForm.model.mjs +0 -2
- package/esm2022/models/subformConfiguration.model.mjs +0 -2
- package/esm2022/models/subformPropery.model.mjs +0 -2
- package/esm2022/models/submission.model.mjs +0 -2
- package/esm2022/models/submissionCopyConfig.mopdel.mjs +0 -2
- package/esm2022/models/terms&condition.model.mjs +0 -2
- package/esm2022/models/validation.model.mjs +0 -2
- package/esm2022/models/whenClause.model.mjs +0 -2
- package/esm2022/models/whenClauseCondition.model.mjs +0 -2
- package/esm2022/models/whenClauseElements.model.mjs +0 -2
- package/esm2022/piserve-tech-form-submission.mjs +0 -5
- package/esm2022/public-api.mjs +0 -7
- package/esm2022/question/card-subform/card-subform.component.mjs +0 -354
- package/esm2022/question/confirm-dialog/confirm-dialog.component.mjs +0 -27
- package/esm2022/question/form-elements/form-elements.component.mjs +0 -62
- package/esm2022/question/inline-multiple-subform/inline-multiple-subform.component.mjs +0 -384
- package/esm2022/question/multifields/multifields.component.mjs +0 -54
- package/esm2022/question/multiple-subform/multiple-subform.component.mjs +0 -413
- package/esm2022/question/question/question.component.mjs +0 -145
- package/esm2022/question/question-group/question-group.component.mjs +0 -102
- package/esm2022/question/recursive-logic/recursive-logic.component.mjs +0 -49
- package/esm2022/question/sub-form/sub-form.component.mjs +0 -351
- package/esm2022/services/aggregate.service.mjs +0 -139
- package/esm2022/services/countryService.mjs +0 -89
- package/esm2022/services/data.service.mjs +0 -36
- package/esm2022/services/element-tracker.service.mjs +0 -27
- package/esm2022/services/form-validation.service.mjs +0 -128
- package/esm2022/services/form.service.mjs +0 -333
- package/esm2022/services/mapper.service.mjs +0 -519
- package/esm2022/services/recaptcha.service.mjs +0 -136
- package/esm2022/services/score.service.mjs +0 -268
- package/esm2022/services/subform-copy.service.mjs +0 -122
- package/esm2022/services/validation.service.mjs +0 -35
- package/esm2022/services/whenClause.service.mjs +0 -423
- package/esm2022/shared/shared.module.mjs +0 -97
- package/esm2022/sub-form/submission-modal/submission-modal.component.mjs +0 -133
- package/fesm2022/piserve-tech-form-submission.mjs +0 -11658
- package/fesm2022/piserve-tech-form-submission.mjs.map +0 -1
- package/form-fields/aggregate-function/aggregate-function.component.d.ts +0 -43
- package/form-fields/check-box-fields/check-box-fields.component.d.ts +0 -73
- package/form-fields/currency-fields/currency-fields.component.d.ts +0 -62
- package/form-fields/date-time-fields/date-time-fields.component.d.ts +0 -96
- package/form-fields/drop-down-fields/drop-down-fields.component.d.ts +0 -88
- package/form-fields/file-picker-fields/file-picker-fields.component.d.ts +0 -72
- package/form-fields/form-fields.module.d.ts +0 -40
- package/form-fields/hidden-field/hidden-field.component.d.ts +0 -38
- package/form-fields/iframe-fields/iframe-fields.component.d.ts +0 -35
- package/form-fields/location-fields/location-fields.component.d.ts +0 -29
- package/form-fields/mail-fields/mail-fields.component.d.ts +0 -41
- package/form-fields/mobile-fields/mobile-fields.component.d.ts +0 -71
- package/form-fields/number-fields/number-fields.component.d.ts +0 -53
- package/form-fields/password-fields/password-fields.component.d.ts +0 -57
- package/form-fields/radio-button-fields/radio-button-fields.component.d.ts +0 -70
- package/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.d.ts +0 -46
- package/form-fields/section-fields/section-fields.component.d.ts +0 -10
- package/form-fields/selection-matrix-fields/selection-matrix-fields.component.d.ts +0 -45
- package/form-fields/signature-fields/signature-fields.component.d.ts +0 -13
- package/form-fields/slider-fields/slider-fields.component.d.ts +0 -32
- package/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.d.ts +0 -26
- package/form-fields/text-area-fields/text-area-fields.component.d.ts +0 -49
- package/form-fields/text-fields/text-fields.component.d.ts +0 -49
- package/form-fields/toggle-switch-fields/toggle-switch-fields.component.d.ts +0 -29
- package/form-fields/url-fields/url-fields.component.d.ts +0 -41
- package/form-submission/form-submission.module.d.ts +0 -20
- package/form-submission/header/header.component.d.ts +0 -7
- package/form-submission/navigation-tabs/navigation-tabs.component.d.ts +0 -57
- package/form-submission/next-prev-navigation/next-prev-navigation.component.d.ts +0 -46
- package/form-submission/save-as-draft/saveDraftModalComponent .d.ts +0 -17
- package/form-submission/submission-container/submission-container.component.d.ts +0 -7
- package/form-submission/submit-form/submit-form.component.d.ts +0 -237
- package/index.d.ts +0 -5
- package/lib/form-submission.component.d.ts +0 -30
- package/lib/form-submission.module.d.ts +0 -16
- package/lib/form-submission.service.d.ts +0 -6
- package/models/aggregate.model.d.ts +0 -4
- package/models/appearance.model.d.ts +0 -64
- package/models/elementOptionAPI.model.d.ts +0 -12
- package/models/elementOptionAPIData.model.d.ts +0 -5
- package/models/elementOptionDB.model.d.ts +0 -8
- package/models/elementOptionDBCriteria.model.d.ts +0 -7
- package/models/enum/elementType .enum.d.ts +0 -22
- package/models/enum/entityType.enum.d.ts +0 -10
- package/models/logic.model.d.ts +0 -9
- package/models/multifields.model.d.ts +0 -11
- package/models/page.model.d.ts +0 -6
- package/models/publicForm.model.d.ts +0 -18
- package/models/question.model.d.ts +0 -26
- package/models/questionAnswer.model.d.ts +0 -7
- package/models/questionGroup.model.d.ts +0 -11
- package/models/scoring.model.d.ts +0 -10
- package/models/section.model.d.ts +0 -6
- package/models/subForm.model.d.ts +0 -24
- package/models/subformConfiguration.model.d.ts +0 -4
- package/models/subformPropery.model.d.ts +0 -7
- package/models/validation.model.d.ts +0 -48
- package/models/whenClause.model.d.ts +0 -6
- package/question/card-subform/card-subform.component.d.ts +0 -44
- package/question/confirm-dialog/confirm-dialog.component.d.ts +0 -12
- package/question/form-elements/form-elements.component.d.ts +0 -20
- package/question/inline-multiple-subform/inline-multiple-subform.component.d.ts +0 -47
- package/question/multifields/multifields.component.d.ts +0 -11
- package/question/multiple-subform/multiple-subform.component.d.ts +0 -39
- package/question/question/question.component.d.ts +0 -30
- package/question/question-group/question-group.component.d.ts +0 -29
- package/question/recursive-logic/recursive-logic.component.d.ts +0 -19
- package/question/sub-form/sub-form.component.d.ts +0 -70
- package/services/aggregate.service.d.ts +0 -29
- package/services/countryService.d.ts +0 -21
- package/services/data.service.d.ts +0 -19
- package/services/element-tracker.service.d.ts +0 -10
- package/services/form-validation.service.d.ts +0 -16
- package/services/form.service.d.ts +0 -27
- package/services/mapper.service.d.ts +0 -31
- package/services/recaptcha.service.d.ts +0 -46
- package/services/score.service.d.ts +0 -27
- package/services/subform-copy.service.d.ts +0 -10
- package/services/validation.service.d.ts +0 -14
- package/services/whenClause.service.d.ts +0 -45
- package/shared/shared.module.d.ts +0 -25
- package/sub-form/submission-modal/submission-modal.component.d.ts +0 -31
- /package/{assets → src/assets}/fonts/Garamond.woff2 +0 -0
- /package/{assets → src/assets}/fonts/Georgia.woff2 +0 -0
- /package/{assets → src/assets}/fonts/Poppins.woff2 +0 -0
- /package/{assets → src/assets}/fonts/Tahoma.woff2 +0 -0
- /package/{assets → src/assets}/fonts/Tajawal.woff2 +0 -0
- /package/{assets → src/assets}/fonts/Verdana.woff2 +0 -0
- /package/{assets → src/assets}/icons/left_arrow.svg +0 -0
- /package/{assets → src/assets}/icons/right_arrow.svg +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
<div class="mb-5">
|
|
2
|
+
<div class="modalHeader mb-4">
|
|
3
|
+
<div class="title-div">
|
|
4
|
+
<p class="title">{{subForm.title}}</p>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="header-btn">
|
|
7
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" (click)="closeModal()">
|
|
8
|
+
<path d="M8 8L16 16" stroke="#1D252D" stroke-linecap="round" stroke-linejoin="round"/>
|
|
9
|
+
<path d="M16 8L8 16" stroke="#1D252D" stroke-linecap="round" stroke-linejoin="round"/>
|
|
10
|
+
</svg>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div class="px-3" *ngFor="let row of subForm.rows">
|
|
15
|
+
<ng-container *ngFor="let formElement of row.grid">
|
|
16
|
+
<div *ngIf="formElement.entityType === 'QUESTION'">
|
|
17
|
+
<lib-check-box-fields
|
|
18
|
+
*ngIf="formElement.element.formElement.elementType === 'CHECK_BOX'"
|
|
19
|
+
[question]="formElement.element"
|
|
20
|
+
></lib-check-box-fields>
|
|
21
|
+
<lib-date-time-fields
|
|
22
|
+
*ngIf="formElement.element.formElement.elementType === 'DATE_TIME'"
|
|
23
|
+
[question]="formElement.element"
|
|
24
|
+
></lib-date-time-fields>
|
|
25
|
+
<lib-drop-down-fields
|
|
26
|
+
*ngIf="formElement.element.formElement.elementType === 'DROP_DOWN'"
|
|
27
|
+
[question]="formElement.element"
|
|
28
|
+
></lib-drop-down-fields>
|
|
29
|
+
<lib-file-picker-fields
|
|
30
|
+
*ngIf="
|
|
31
|
+
formElement.element.formElement.elementType === 'FILE_PICKER'
|
|
32
|
+
"
|
|
33
|
+
[question]="formElement.element"
|
|
34
|
+
></lib-file-picker-fields>
|
|
35
|
+
<lib-location-fields
|
|
36
|
+
*ngIf="formElement.element.formElement.elementType === 'LOCATION'"
|
|
37
|
+
[question]="formElement.element"
|
|
38
|
+
></lib-location-fields>
|
|
39
|
+
|
|
40
|
+
<lib-mail-fields
|
|
41
|
+
*ngIf="formElement.element.formElement.elementType === 'EMAIL'"
|
|
42
|
+
[question]="formElement.element"
|
|
43
|
+
>
|
|
44
|
+
</lib-mail-fields>
|
|
45
|
+
<lib-mobile-fields
|
|
46
|
+
*ngIf="formElement.element.formElement.elementType === 'MOBILE'"
|
|
47
|
+
[question]="formElement.element"
|
|
48
|
+
>
|
|
49
|
+
</lib-mobile-fields>
|
|
50
|
+
<lib-number-fields
|
|
51
|
+
*ngIf="formElement.element.formElement.elementType === 'NUMBER'"
|
|
52
|
+
[question]="formElement.element"
|
|
53
|
+
[rowId]="'0'"
|
|
54
|
+
>
|
|
55
|
+
</lib-number-fields>
|
|
56
|
+
<lib-password-fields
|
|
57
|
+
*ngIf="formElement.element.formElement.elementType === 'PASSWORD'"
|
|
58
|
+
[question]="formElement.element"
|
|
59
|
+
>
|
|
60
|
+
</lib-password-fields>
|
|
61
|
+
<lib-radio-button-fields
|
|
62
|
+
*ngIf="
|
|
63
|
+
formElement.element.formElement.elementType === 'RADIO_BUTTON'
|
|
64
|
+
"
|
|
65
|
+
[question]="formElement.element"
|
|
66
|
+
></lib-radio-button-fields>
|
|
67
|
+
<lib-rich-text-editor-fields
|
|
68
|
+
*ngIf="
|
|
69
|
+
formElement.element.formElement.elementType === 'RICH_TEXT_EDITOR'
|
|
70
|
+
"
|
|
71
|
+
[question]="formElement.element"
|
|
72
|
+
></lib-rich-text-editor-fields>
|
|
73
|
+
<lib-selection-matrix-fields
|
|
74
|
+
*ngIf="
|
|
75
|
+
formElement.element.formElement.elementType === 'SELECTION_MATRIX'
|
|
76
|
+
"
|
|
77
|
+
[question]="formElement.element"
|
|
78
|
+
[acceptedLanguage] = "acceptedLanguage"
|
|
79
|
+
></lib-selection-matrix-fields>
|
|
80
|
+
<lib-signature-fields
|
|
81
|
+
*ngIf="formElement.element.formElement.elementType === 'SIGNATURE'"
|
|
82
|
+
[question]="formElement.element"
|
|
83
|
+
></lib-signature-fields>
|
|
84
|
+
<lib-slider-fields
|
|
85
|
+
*ngIf="formElement.element.formElement.elementType === 'SLIDER'"
|
|
86
|
+
[question]="formElement.element"
|
|
87
|
+
></lib-slider-fields>
|
|
88
|
+
<lib-terms-and-condition-fields
|
|
89
|
+
*ngIf="
|
|
90
|
+
formElement.element.formElement.elementType ===
|
|
91
|
+
'TERMS_AND_CONDITION'
|
|
92
|
+
"
|
|
93
|
+
[question]="formElement.element"
|
|
94
|
+
></lib-terms-and-condition-fields>
|
|
95
|
+
<lib-text-area-fields
|
|
96
|
+
*ngIf="formElement.element.formElement.elementType === 'TEXT_AREA'"
|
|
97
|
+
[question]="formElement.element"
|
|
98
|
+
></lib-text-area-fields>
|
|
99
|
+
<lib-text-fields
|
|
100
|
+
*ngIf="formElement.element.formElement.elementType === 'TEXT_BOX'"
|
|
101
|
+
[question]="formElement.element"
|
|
102
|
+
></lib-text-fields>
|
|
103
|
+
<lib-toggle-switch-fields
|
|
104
|
+
*ngIf="
|
|
105
|
+
formElement.element.formElement.elementType === 'TOGGLE_SWITCH'
|
|
106
|
+
"
|
|
107
|
+
[question]="formElement.element"
|
|
108
|
+
[acceptedLanguage] = "acceptedLanguage"
|
|
109
|
+
></lib-toggle-switch-fields>
|
|
110
|
+
<lib-url-fields
|
|
111
|
+
*ngIf="formElement.element.formElement.elementType === 'URL'"
|
|
112
|
+
[question]="formElement.element"
|
|
113
|
+
></lib-url-fields>
|
|
114
|
+
<lib-currency-fields
|
|
115
|
+
*ngIf="formElement.element.formElement.elementType === 'CURRENCY'"
|
|
116
|
+
[question]="formElement.element"
|
|
117
|
+
></lib-currency-fields>
|
|
118
|
+
<lib-hidden-field
|
|
119
|
+
*ngIf="formElement.element.formElement.elementType === 'HIDDEN_FIELD'"
|
|
120
|
+
[question]="formElement.element"
|
|
121
|
+
></lib-hidden-field>
|
|
122
|
+
<lib-iframe-fields
|
|
123
|
+
*ngIf="formElement.element.formElement.elementType === 'IFRAME_WIDGET'"
|
|
124
|
+
[question]="formElement.element"
|
|
125
|
+
></lib-iframe-fields>
|
|
126
|
+
<lib-aggregate-function
|
|
127
|
+
*ngIf="formElement.element.formElement.elementType === 'AGGREGATE_FUNCTION'"
|
|
128
|
+
[question]="formElement.element"
|
|
129
|
+
[rowId]="'0'"
|
|
130
|
+
></lib-aggregate-function>
|
|
131
|
+
<ng-container *ngIf="formElement?.element?.childLogics">
|
|
132
|
+
|
|
133
|
+
<ng-container *ngIf="componentToLoad">
|
|
134
|
+
|
|
135
|
+
<ng-container *ngComponentOutlet="componentToLoad;
|
|
136
|
+
inputs: { grid: formElement?.element?.childLogics,
|
|
137
|
+
answer: formElement?.element?.answer,
|
|
138
|
+
state: 'child' }"></ng-container>
|
|
139
|
+
</ng-container>
|
|
140
|
+
</ng-container>
|
|
141
|
+
|
|
142
|
+
</div>
|
|
143
|
+
<div *ngIf="formElement.entityType === 'SECTION'">
|
|
144
|
+
<lib-section-fields
|
|
145
|
+
[section]="formElement.element"
|
|
146
|
+
></lib-section-fields>
|
|
147
|
+
</div>
|
|
148
|
+
</ng-container>
|
|
149
|
+
|
|
150
|
+
</div>
|
|
151
|
+
|
|
152
|
+
<div class="okBtn me-4 ms-4">
|
|
153
|
+
<button
|
|
154
|
+
class="submitBtn ms-md-3 me-md-2 rounded-pill"
|
|
155
|
+
type="button"
|
|
156
|
+
(click)="saveSubmission()">
|
|
157
|
+
Ok
|
|
158
|
+
</button>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.modalHeader {
|
|
2
|
+
width: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: row;
|
|
5
|
+
|
|
6
|
+
.title-div {
|
|
7
|
+
width: 90%;
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
margin-top: 5%;
|
|
11
|
+
|
|
12
|
+
.title {
|
|
13
|
+
height: 24px;
|
|
14
|
+
font-style: normal;
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
font-size: 24px;
|
|
17
|
+
font-weight: 550;
|
|
18
|
+
line-height: 24px;
|
|
19
|
+
text-align: center;
|
|
20
|
+
color: #1d252d;
|
|
21
|
+
letter-spacing: 0.5px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.header-btn {
|
|
26
|
+
width: 10%;
|
|
27
|
+
margin-top: 4%;
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
|
|
31
|
+
svg {
|
|
32
|
+
font-size: 20px;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.submitBtn {
|
|
39
|
+
background: #084fff;
|
|
40
|
+
color: #fff;
|
|
41
|
+
border: none;
|
|
42
|
+
padding-top: 10px;
|
|
43
|
+
padding-bottom: 10px;
|
|
44
|
+
padding-left: 27px;
|
|
45
|
+
padding-right: 27px;
|
|
46
|
+
width: auto;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.okBtn{
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: flex-end;
|
|
52
|
+
margin-left: auto;
|
|
53
|
+
margin-bottom: 5px;
|
|
54
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { SubmissionModalComponent } from './submission-modal.component';
|
|
4
|
+
|
|
5
|
+
describe('SubmissionModalComponent', () => {
|
|
6
|
+
let component: SubmissionModalComponent;
|
|
7
|
+
let fixture: ComponentFixture<SubmissionModalComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [SubmissionModalComponent]
|
|
12
|
+
});
|
|
13
|
+
fixture = TestBed.createComponent(SubmissionModalComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { Component, Inject, Injector } from '@angular/core';
|
|
2
|
+
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import { ValidationService } from '../../services/validation.service';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'lib-submission-modal',
|
|
7
|
+
templateUrl: './submission-modal.component.html',
|
|
8
|
+
styleUrls: ['./submission-modal.component.scss'],
|
|
9
|
+
})
|
|
10
|
+
export class SubmissionModalComponent {
|
|
11
|
+
acceptedLanguage: string = '';
|
|
12
|
+
grid: any;
|
|
13
|
+
subForm: any;
|
|
14
|
+
childLogicCache: { [key: string]: { component: Promise<any>, injector: Injector } } = {};
|
|
15
|
+
componentToLoad: any;
|
|
16
|
+
injector!: Injector;
|
|
17
|
+
|
|
18
|
+
constructor(
|
|
19
|
+
@Inject(MAT_DIALOG_DATA) public data: any,
|
|
20
|
+
private validationService: ValidationService,
|
|
21
|
+
private dialogRef: MatDialogRef<SubmissionModalComponent>
|
|
22
|
+
) {}
|
|
23
|
+
|
|
24
|
+
ngOnInit() {
|
|
25
|
+
this.subForm = this.data.subForm;
|
|
26
|
+
this.acceptedLanguage = this.data.acceptedLanguage;
|
|
27
|
+
this.loadComponent();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
private async loadComponent(): Promise<void> {
|
|
31
|
+
this.componentToLoad = await this.loadFormElementsComponent();
|
|
32
|
+
this.injector = this.createInjector();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
private async loadFormElementsComponent() {
|
|
36
|
+
const { FormElementsComponent } = await import('../../question/form-elements/form-elements.component');
|
|
37
|
+
return FormElementsComponent;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
createInjector(): Injector {
|
|
41
|
+
return Injector.create({
|
|
42
|
+
providers: [
|
|
43
|
+
{ provide: 'grid', useValue: this.grid?.element.childLogics },
|
|
44
|
+
{ provide: 'state', useValue: 'child' },
|
|
45
|
+
],
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
closeModal() {
|
|
52
|
+
this.clearModal();
|
|
53
|
+
this.dialogRef.close();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
saveSubmission() {
|
|
57
|
+
let isFormValid = true;
|
|
58
|
+
const pageIndex = this.subForm.pageIndex ?? 0;
|
|
59
|
+
|
|
60
|
+
this.subForm.rows.forEach((row: any) => {
|
|
61
|
+
row.grid.forEach((item: any) => {
|
|
62
|
+
if (item.entityType === 'QUESTION') {
|
|
63
|
+
const q = item.element;
|
|
64
|
+
const hasAnswer =
|
|
65
|
+
q.answer !== null &&
|
|
66
|
+
q.answer !== undefined &&
|
|
67
|
+
((typeof q.answer === 'string' && q.answer.trim() !== '') ||
|
|
68
|
+
(Array.isArray(q.answer) && q.answer.length > 0) ||
|
|
69
|
+
(typeof q.answer === 'object' &&
|
|
70
|
+
Object.keys(q.answer).length > 0));
|
|
71
|
+
if (q.required && !hasAnswer) {
|
|
72
|
+
this.validationService.setInvalid(
|
|
73
|
+
q.id,
|
|
74
|
+
'This question is required',
|
|
75
|
+
pageIndex
|
|
76
|
+
);
|
|
77
|
+
isFormValid = false;
|
|
78
|
+
} else {
|
|
79
|
+
this.validationService.clearInvalid(q.id);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
// 2) If any required question is missing, abort close and let the child components render errors
|
|
86
|
+
if (!isFormValid) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// 3) All good → close the dialog
|
|
91
|
+
this.dialogRef.close(this.subForm);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
clearModal() {
|
|
95
|
+
if (this.subForm && this.subForm.rows) {
|
|
96
|
+
this.subForm.rows.flatMap((item: any) =>
|
|
97
|
+
item.grid.forEach((gridItem: any) => this.clearFormElement(gridItem))
|
|
98
|
+
);
|
|
99
|
+
// this.subForm.formElements.forEach((formElement: any) => {
|
|
100
|
+
// this.clearFormElement(formElement);
|
|
101
|
+
// });
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
clearFormElement(formElement: any) {
|
|
106
|
+
if (formElement.entityType === 'QUESTION') {
|
|
107
|
+
formElement.element.answer = '';
|
|
108
|
+
|
|
109
|
+
if (formElement.element.formElement) {
|
|
110
|
+
if (formElement.element.formElement.elementType === 'FILE_PICKER') {
|
|
111
|
+
formElement.element.answer = null;
|
|
112
|
+
} else {
|
|
113
|
+
formElement.element.answer = '';
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (formElement.element.childLogics) {
|
|
118
|
+
formElement.element.childLogics?.forEach((childLogic: any) => {
|
|
119
|
+
childLogic.showLogic = false;
|
|
120
|
+
childLogic?.formElements?.forEach((formElement: any) => {
|
|
121
|
+
this.clearFormElement(formElement);
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "../../tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "../../out-tsc/lib",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"inlineSources": true,
|
|
9
|
+
"types": []
|
|
10
|
+
},
|
|
11
|
+
"exclude": [
|
|
12
|
+
"**/*.spec.ts"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
|
2
|
+
{
|
|
3
|
+
"extends": "../../tsconfig.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"outDir": "../../out-tsc/spec",
|
|
6
|
+
"types": [
|
|
7
|
+
"jasmine"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"**/*.spec.ts",
|
|
12
|
+
"**/*.d.ts"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export let environment = {
|
|
2
|
-
production: false,
|
|
3
|
-
googleRecaptchaSiteKey: '',
|
|
4
|
-
htmlDirection: 'ltr'
|
|
5
|
-
};
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW52aXJvbm1lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9mb3JtLXN1Ym1pc3Npb24vc3JjL2Vudmlyb25tZW50L2Vudmlyb25tZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQyxJQUFJLFdBQVcsR0FBRztJQUNyQixVQUFVLEVBQUUsS0FBSztJQUNqQixzQkFBc0IsRUFBRSxFQUFFO0lBQ3pCLGFBQWEsRUFBRSxLQUFLO0NBQ3RCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgbGV0IGVudmlyb25tZW50ID0ge1xuICAgIHByb2R1Y3Rpb246IGZhbHNlLFxuICAgIGdvb2dsZVJlY2FwdGNoYVNpdGVLZXk6ICcnLFxuICAgICBodG1sRGlyZWN0aW9uOiAnbHRyJ1xuICB9O1xuICAiXX0=
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "../../services/validation.service";
|
|
4
|
-
import * as i2 from "../../services/element-tracker.service";
|
|
5
|
-
import * as i3 from "../../services/aggregate.service";
|
|
6
|
-
import * as i4 from "@angular/common";
|
|
7
|
-
import * as i5 from "@angular/forms";
|
|
8
|
-
export class AggregateFunctionComponent {
|
|
9
|
-
constructor(validationService, tracker, aggregateService, cdr) {
|
|
10
|
-
this.validationService = validationService;
|
|
11
|
-
this.tracker = tracker;
|
|
12
|
-
this.aggregateService = aggregateService;
|
|
13
|
-
this.cdr = cdr;
|
|
14
|
-
this.question = {};
|
|
15
|
-
this.inLine = false;
|
|
16
|
-
this.inCard = false;
|
|
17
|
-
this.answerChange = new EventEmitter();
|
|
18
|
-
this.answer = '';
|
|
19
|
-
this.count = 0;
|
|
20
|
-
this.required = false;
|
|
21
|
-
this.hint = '';
|
|
22
|
-
this.placeholder = '';
|
|
23
|
-
this.validationFailed = false;
|
|
24
|
-
this.validationMessage = '';
|
|
25
|
-
this.elementId = '';
|
|
26
|
-
this.result = 0;
|
|
27
|
-
this.disableEdit = false;
|
|
28
|
-
}
|
|
29
|
-
ngOnInit() {
|
|
30
|
-
this.valueAssigned();
|
|
31
|
-
this.aggregateService.setAggregateField(this.rowId, this.question.id, this.question.formElement.aggregateFunction.aggregateOperation, this.question.formElement.aggregateFunction.formula);
|
|
32
|
-
this.subscription = this.aggregateService.aggregateFieldResults$.subscribe(update => {
|
|
33
|
-
if (update && update.id === `${this.rowId}:${this.question.id}`) { // include rowId
|
|
34
|
-
if (update.evaluated) {
|
|
35
|
-
this.result = update.result;
|
|
36
|
-
this.question.answer = String(this.result);
|
|
37
|
-
this.answerChange.emit({ answer: this.question.answer, maxPossibleScore: 0 });
|
|
38
|
-
this.validationService.clearInvalid(this.buildElementId());
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
this.result = 0;
|
|
42
|
-
this.question.answer = '';
|
|
43
|
-
this.answerChange.emit({ answer: this.question.answer, maxPossibleScore: 0 });
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
valueAssigned() {
|
|
49
|
-
this.count = this.question?.count;
|
|
50
|
-
this.required = this.question?.required;
|
|
51
|
-
this.hint = this.question?.hint;
|
|
52
|
-
this.placeholder = this.question.formElement?.appearance?.placeholder || '';
|
|
53
|
-
if (this.question.answer !== null &&
|
|
54
|
-
this.question.answer !== undefined &&
|
|
55
|
-
((typeof this.question.answer === 'string' &&
|
|
56
|
-
this.question.answer.trim() !== '') ||
|
|
57
|
-
(Array.isArray(this.question.answer) &&
|
|
58
|
-
this.question.answer.length > 0) ||
|
|
59
|
-
(typeof this.question.answer === 'object' &&
|
|
60
|
-
Object.keys(this.question.answer).length > 0))) {
|
|
61
|
-
this.result = this.question.answer;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
clearAnswersRecursively(logic) {
|
|
65
|
-
if (!logic || !logic.rows)
|
|
66
|
-
return;
|
|
67
|
-
logic.rows.forEach((row) => {
|
|
68
|
-
row.grid.forEach((item) => {
|
|
69
|
-
const element = item.element;
|
|
70
|
-
if (item.entityType === 'QUESTION' && element) {
|
|
71
|
-
// Clear answer if present
|
|
72
|
-
if ('answer' in element) {
|
|
73
|
-
element.answer = '';
|
|
74
|
-
}
|
|
75
|
-
// Recursively clear childLogics if any
|
|
76
|
-
if (element.childLogics && element.childLogics.length > 0) {
|
|
77
|
-
element.childLogics.forEach((childLogic) => {
|
|
78
|
-
this.clearAnswersRecursively(childLogic);
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
if (item.entityType === 'SUBFORM' && element && element.rows) {
|
|
83
|
-
// SUBFORM contains its own rows structure like a form
|
|
84
|
-
this.clearAnswersRecursively({ rows: element.rows });
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
handleValidation(isValid, message = 'This field is required') {
|
|
90
|
-
if (isValid) {
|
|
91
|
-
this.validationService.clearInvalid(this.buildElementId());
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
// this.validationService.setInvalid(this.question.id, message);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
buildElementId() {
|
|
98
|
-
return (this.inLine || this.inCard)
|
|
99
|
-
? `${this.submissionIndex}-${this.question.id}`
|
|
100
|
-
: `${this.question.id}`;
|
|
101
|
-
}
|
|
102
|
-
get isInvalid() {
|
|
103
|
-
return !!this.validationService.getErrorMessage(this.buildElementId());
|
|
104
|
-
}
|
|
105
|
-
get errorMessage() {
|
|
106
|
-
return this.validationService.getErrorMessage(this.buildElementId());
|
|
107
|
-
}
|
|
108
|
-
ngAfterViewInit() {
|
|
109
|
-
if (this.inLine || this.inCard) {
|
|
110
|
-
this.elementId = `question-${this.submissionIndex}-${this.question.id}`;
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
this.elementId = `question-${this.question.id}`;
|
|
114
|
-
}
|
|
115
|
-
this.tracker.registerElement(this.elementId);
|
|
116
|
-
}
|
|
117
|
-
ngOnDestroy() {
|
|
118
|
-
if (this.elementId) {
|
|
119
|
-
this.tracker.unregisterElement(this.elementId);
|
|
120
|
-
}
|
|
121
|
-
if (this.subscription) {
|
|
122
|
-
this.subscription.unsubscribe();
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AggregateFunctionComponent, deps: [{ token: i1.ValidationService }, { token: i2.ElementTrackerService }, { token: i3.AggregationFunctionService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
126
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AggregateFunctionComponent, selector: "lib-aggregate-function", inputs: { question: "question", inLine: "inLine", inCard: "inCard", submissionIndex: "submissionIndex", rowId: "rowId", disableEdit: "disableEdit" }, outputs: { answerChange: "answerChange" }, ngImport: i0, template: "<div\n [ngClass]=\"{ 'mb-4': !inLine }\"\n class=\"px-3\"\n [id]=\"(inLine || inCard) ? 'question-' + submissionIndex + '-' + question.id : 'question-' + question.id\"\n [attr.name]=\"question.testElementName\"\n>\n <div class=\"input-wrapper mb-2\" *ngIf=\"!inLine\">\n <div *ngIf=\"question.questionNumber\" [innerHTML]=\"question.questionNumber\"></div>\n <span *ngIf=\"question.questionNumber\" class=\"space\"></span> <label>{{ question.question }}</label\n > \n <span class=\"text-danger\" *ngIf=\"question?.required\">*</span>\n <div\n class=\"svg-wrapper mb-2 hintIcon\"\n [attr.data-title]=\"hint\"\n *ngIf=\"hint\"\n >\n <svg\n class=\"hintSvg\"\n viewBox=\"0 0 30 30\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M15 26.25V26.25C8.78625 26.25 3.75 21.2138 3.75 15V15C3.75 8.78625 8.78625 3.75 15 3.75V3.75C21.2138 3.75 26.25 8.78625 26.25 15V15C26.25 21.2138 21.2138 26.25 15 26.25Z\"\n stroke=\"#323232\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M15 16.5623V16.2498C15 15.2285 15.6312 14.6748 16.2637 14.2498C16.8812 13.8335 17.5 13.291 17.5 12.291C17.5 10.9098 16.3813 9.79102 15 9.79102C13.6187 9.79102 12.5 10.9098 12.5 12.291\"\n stroke=\"#323232\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M14.9988 20C14.8263 20 14.6863 20.14 14.6875 20.3125C14.6875 20.485 14.8275 20.625 15 20.625C15.1725 20.625 15.3125 20.485 15.3125 20.3125C15.3125 20.14 15.1725 20 14.9988 20\"\n stroke=\"#323232\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </div>\n </div>\n <input\n type=\"text\"\n class=\"form-control mb-2 height\"\n [placeholder]=\"placeholder\"\n [(ngModel)]=\"result\"\n readonly\n [class.invalid-question]=\"isInvalid && (!inLine || !result)\"\n [id]=\"question.id\"\n />\n <div *ngIf=\"isInvalid && (!inLine || !result)\" class=\"error-message\">\n {{ errorMessage }}\n </div>\n <div *ngIf=\"validationFailed && !isInvalid\" class=\"text-danger error-message\">\n {{ validationMessage }}\n </div>\n</div>\n", styles: [".input-wrapper{display:flex;align-items:flex-start}.svg-wrapper{margin-inline-start:auto;z-index:999}.hintIcon{position:relative;cursor:pointer}.hintIcon:hover:before{content:attr(data-title);position:absolute;top:calc(100% + 2px);right:0;padding:4px 8px;border-radius:4px;background-color:#1d252d;color:#8e9aa0;font-size:14px;min-width:300px;word-wrap:break-word;word-break:break-word;text-align:center;white-space:normal}.hintIcon:hover:after{content:\"\";position:absolute;top:calc(100% - 26px);left:50%;border:solid transparent;border-width:18px;border-bottom-color:#1d252d;transform:translate(-50%)}.height{height:42px}.invalid{border-color:red}.hintSvg{width:30px;height:30px;fill:none}::ng-deep html lib-formSubmission{font-family:var(--library-font-family)!important;font-size:var(--library-font-size)!important}::ng-deep .timepicker-overlay{z-index:1000!important}::ng-deep .timepicker-backdrop-overlay{z-index:1000!important}.space{width:5px}.error-message{color:#f44336;font-size:.8em;margin-top:4px;padding:0 8px}@keyframes fadeIn{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
127
|
-
}
|
|
128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AggregateFunctionComponent, decorators: [{
|
|
129
|
-
type: Component,
|
|
130
|
-
args: [{ selector: 'lib-aggregate-function', template: "<div\n [ngClass]=\"{ 'mb-4': !inLine }\"\n class=\"px-3\"\n [id]=\"(inLine || inCard) ? 'question-' + submissionIndex + '-' + question.id : 'question-' + question.id\"\n [attr.name]=\"question.testElementName\"\n>\n <div class=\"input-wrapper mb-2\" *ngIf=\"!inLine\">\n <div *ngIf=\"question.questionNumber\" [innerHTML]=\"question.questionNumber\"></div>\n <span *ngIf=\"question.questionNumber\" class=\"space\"></span> <label>{{ question.question }}</label\n > \n <span class=\"text-danger\" *ngIf=\"question?.required\">*</span>\n <div\n class=\"svg-wrapper mb-2 hintIcon\"\n [attr.data-title]=\"hint\"\n *ngIf=\"hint\"\n >\n <svg\n class=\"hintSvg\"\n viewBox=\"0 0 30 30\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M15 26.25V26.25C8.78625 26.25 3.75 21.2138 3.75 15V15C3.75 8.78625 8.78625 3.75 15 3.75V3.75C21.2138 3.75 26.25 8.78625 26.25 15V15C26.25 21.2138 21.2138 26.25 15 26.25Z\"\n stroke=\"#323232\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M15 16.5623V16.2498C15 15.2285 15.6312 14.6748 16.2637 14.2498C16.8812 13.8335 17.5 13.291 17.5 12.291C17.5 10.9098 16.3813 9.79102 15 9.79102C13.6187 9.79102 12.5 10.9098 12.5 12.291\"\n stroke=\"#323232\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M14.9988 20C14.8263 20 14.6863 20.14 14.6875 20.3125C14.6875 20.485 14.8275 20.625 15 20.625C15.1725 20.625 15.3125 20.485 15.3125 20.3125C15.3125 20.14 15.1725 20 14.9988 20\"\n stroke=\"#323232\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </div>\n </div>\n <input\n type=\"text\"\n class=\"form-control mb-2 height\"\n [placeholder]=\"placeholder\"\n [(ngModel)]=\"result\"\n readonly\n [class.invalid-question]=\"isInvalid && (!inLine || !result)\"\n [id]=\"question.id\"\n />\n <div *ngIf=\"isInvalid && (!inLine || !result)\" class=\"error-message\">\n {{ errorMessage }}\n </div>\n <div *ngIf=\"validationFailed && !isInvalid\" class=\"text-danger error-message\">\n {{ validationMessage }}\n </div>\n</div>\n", styles: [".input-wrapper{display:flex;align-items:flex-start}.svg-wrapper{margin-inline-start:auto;z-index:999}.hintIcon{position:relative;cursor:pointer}.hintIcon:hover:before{content:attr(data-title);position:absolute;top:calc(100% + 2px);right:0;padding:4px 8px;border-radius:4px;background-color:#1d252d;color:#8e9aa0;font-size:14px;min-width:300px;word-wrap:break-word;word-break:break-word;text-align:center;white-space:normal}.hintIcon:hover:after{content:\"\";position:absolute;top:calc(100% - 26px);left:50%;border:solid transparent;border-width:18px;border-bottom-color:#1d252d;transform:translate(-50%)}.height{height:42px}.invalid{border-color:red}.hintSvg{width:30px;height:30px;fill:none}::ng-deep html lib-formSubmission{font-family:var(--library-font-family)!important;font-size:var(--library-font-size)!important}::ng-deep .timepicker-overlay{z-index:1000!important}::ng-deep .timepicker-backdrop-overlay{z-index:1000!important}.space{width:5px}.error-message{color:#f44336;font-size:.8em;margin-top:4px;padding:0 8px}@keyframes fadeIn{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
131
|
-
}], ctorParameters: function () { return [{ type: i1.ValidationService }, { type: i2.ElementTrackerService }, { type: i3.AggregationFunctionService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { question: [{
|
|
132
|
-
type: Input
|
|
133
|
-
}], inLine: [{
|
|
134
|
-
type: Input
|
|
135
|
-
}], inCard: [{
|
|
136
|
-
type: Input
|
|
137
|
-
}], submissionIndex: [{
|
|
138
|
-
type: Input
|
|
139
|
-
}], answerChange: [{
|
|
140
|
-
type: Output
|
|
141
|
-
}], rowId: [{
|
|
142
|
-
type: Input
|
|
143
|
-
}], disableEdit: [{
|
|
144
|
-
type: Input
|
|
145
|
-
}] } });
|
|
146
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWdncmVnYXRlLWZ1bmN0aW9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Zvcm0tc3VibWlzc2lvbi9zcmMvZm9ybS1maWVsZHMvYWdncmVnYXRlLWZ1bmN0aW9uL2FnZ3JlZ2F0ZS1mdW5jdGlvbi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9mb3JtLXN1Ym1pc3Npb24vc3JjL2Zvcm0tZmllbGRzL2FnZ3JlZ2F0ZS1mdW5jdGlvbi9hZ2dyZWdhdGUtZnVuY3Rpb24uY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFvQyxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7Ozs7Ozs7QUFXekcsTUFBTSxPQUFPLDBCQUEwQjtJQW1CcEMsWUFDYSxpQkFBb0MsRUFDcEMsT0FBOEIsRUFDOUIsZ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