@piserve-tech/form-submission 1.3.315 → 1.3.317
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 -355
- 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 -332
- 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 -11661
- 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
package/README.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
# FormSubmission
|
|
2
|
-
|
|
3
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.1.0.
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Run `ng generate component component-name --project formSubmission` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project formSubmission`.
|
|
8
|
-
> Note: Don't forget to add `--project formSubmission` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
-
|
|
10
|
-
## Build
|
|
11
|
-
|
|
12
|
-
Run `ng build formSubmission` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
-
|
|
14
|
-
## Publishing
|
|
15
|
-
|
|
16
|
-
After building your library with `ng build formSubmission`, go to the dist folder `cd dist/form-submission` and run `npm publish`.
|
|
17
|
-
|
|
18
|
-
## Running unit tests
|
|
19
|
-
|
|
20
|
-
Run `ng test formSubmission` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
-
|
|
22
|
-
## Further help
|
|
23
|
-
|
|
24
|
-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
1
|
+
# FormSubmission
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.1.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project formSubmission` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project formSubmission`.
|
|
8
|
+
> Note: Don't forget to add `--project formSubmission` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
+
|
|
10
|
+
## Build
|
|
11
|
+
|
|
12
|
+
Run `ng build formSubmission` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
+
|
|
14
|
+
## Publishing
|
|
15
|
+
|
|
16
|
+
After building your library with `ng build formSubmission`, go to the dist folder `cd dist/form-submission` and run `npm publish`.
|
|
17
|
+
|
|
18
|
+
## Running unit tests
|
|
19
|
+
|
|
20
|
+
Run `ng test formSubmission` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
+
|
|
22
|
+
## Further help
|
|
23
|
+
|
|
24
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
package/ng-package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
|
3
|
+
"dest": "../../dist/form-submission",
|
|
4
|
+
"lib": {
|
|
5
|
+
"entryFile": "src/public-api.ts"
|
|
6
|
+
},
|
|
7
|
+
"assets": [
|
|
8
|
+
{
|
|
9
|
+
"glob": "**/*",
|
|
10
|
+
"input": "src/assets",
|
|
11
|
+
"output": "assets/"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"allowedNonPeerDependencies": [
|
|
15
|
+
"@angular/google-maps",
|
|
16
|
+
"@angular/material",
|
|
17
|
+
"@fortawesome/fontawesome-free",
|
|
18
|
+
"@piserve-tech/drop-down",
|
|
19
|
+
"@piserve-tech/file-preview",
|
|
20
|
+
"@piserve-tech/file-upload",
|
|
21
|
+
"@syncfusion/ej2-material-theme",
|
|
22
|
+
"@types/google.maps",
|
|
23
|
+
"@types/googlemaps",
|
|
24
|
+
"bootstrap",
|
|
25
|
+
"ng2-file-upload",
|
|
26
|
+
"ngx-infinite-scroll",
|
|
27
|
+
"ngx-material-timepicker",
|
|
28
|
+
"uuid"
|
|
29
|
+
]
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -1,46 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@piserve-tech/form-submission",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^16.1.0",
|
|
6
|
-
"@angular/core": "^16.1.0",
|
|
7
|
-
"ngx-infinite-scroll": "^16.0.0"
|
|
8
|
-
},
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"tslib": "^2.3.0",
|
|
11
|
-
"@angular/google-maps": "^16.2.14",
|
|
12
|
-
"@angular/material": "^16.2.14",
|
|
13
|
-
"@fortawesome/fontawesome-free": "^6.5.1",
|
|
14
|
-
"@piserve-tech/drop-down": "1.2.
|
|
15
|
-
"@piserve-tech/file-preview": "1.0.
|
|
16
|
-
"@piserve-tech/file-upload": "1.1.
|
|
17
|
-
"@syncfusion/ej2-material-theme": "~25.1.40",
|
|
18
|
-
"@types/google.maps": "^3.55.8",
|
|
19
|
-
"@types/googlemaps": "^3.43.3",
|
|
20
|
-
"bootstrap": "^5.3.2",
|
|
21
|
-
"bootstrap-icons": "^1.11.3",
|
|
22
|
-
"ng2-file-upload": "^5.0.0",
|
|
23
|
-
"ngx-bootstrap": "^11.0.2",
|
|
24
|
-
"ngx-infinite-scroll": "^16.0.0",
|
|
25
|
-
"ngx-material-timepicker": "^13.1.1",
|
|
26
|
-
"uuid": "^11.1.0"
|
|
27
|
-
},
|
|
28
|
-
"sideEffects": false,
|
|
29
|
-
"repository": {
|
|
30
|
-
"type": "git",
|
|
31
|
-
"url": "https://penta.internal.piserve.com/form-builder/form-submission-component"
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
"typings": "index.d.ts",
|
|
35
|
-
"exports": {
|
|
36
|
-
"./package.json": {
|
|
37
|
-
"default": "./package.json"
|
|
38
|
-
},
|
|
39
|
-
".": {
|
|
40
|
-
"types": "./index.d.ts",
|
|
41
|
-
"esm2022": "./esm2022/piserve-tech-form-submission.mjs",
|
|
42
|
-
"esm": "./esm2022/piserve-tech-form-submission.mjs",
|
|
43
|
-
"default": "./fesm2022/piserve-tech-form-submission.mjs"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@piserve-tech/form-submission",
|
|
3
|
+
"version": "1.3.317",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^16.1.0",
|
|
6
|
+
"@angular/core": "^16.1.0",
|
|
7
|
+
"ngx-infinite-scroll": "^16.0.0"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0",
|
|
11
|
+
"@angular/google-maps": "^16.2.14",
|
|
12
|
+
"@angular/material": "^16.2.14",
|
|
13
|
+
"@fortawesome/fontawesome-free": "^6.5.1",
|
|
14
|
+
"@piserve-tech/drop-down": "1.2.110",
|
|
15
|
+
"@piserve-tech/file-preview": "1.0.3",
|
|
16
|
+
"@piserve-tech/file-upload": "1.1.58",
|
|
17
|
+
"@syncfusion/ej2-material-theme": "~25.1.40",
|
|
18
|
+
"@types/google.maps": "^3.55.8",
|
|
19
|
+
"@types/googlemaps": "^3.43.3",
|
|
20
|
+
"bootstrap": "^5.3.2",
|
|
21
|
+
"bootstrap-icons": "^1.11.3",
|
|
22
|
+
"ng2-file-upload": "^5.0.0",
|
|
23
|
+
"ngx-bootstrap": "^11.0.2",
|
|
24
|
+
"ngx-infinite-scroll": "^16.0.0",
|
|
25
|
+
"ngx-material-timepicker": "^13.1.1",
|
|
26
|
+
"uuid": "^11.1.0"
|
|
27
|
+
},
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://penta.internal.piserve.com/form-builder/form-submission-component"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg width="42" height="42" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M14 14L28 28" stroke="#1D252D" stroke-linecap="round" stroke-linejoin="round" />
|
|
3
|
-
<path d="M28 14L14 28" stroke="#1D252D" stroke-linecap="round" stroke-linejoin="round" />
|
|
1
|
+
<svg width="42" height="42" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M14 14L28 28" stroke="#1D252D" stroke-linecap="round" stroke-linejoin="round" />
|
|
3
|
+
<path d="M28 14L14 28" stroke="#1D252D" stroke-linecap="round" stroke-linejoin="round" />
|
|
4
4
|
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<svg width="38" height="36" viewBox="0 0 38 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<rect x="0.5" y="0.5" width="37" height="35" rx="5.5" fill="white" stroke="#D8D8D8"/>
|
|
3
|
-
<rect x="13.998" y="13.9922" width="14.0058" height="14.0058" rx="2" stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
-
<path d="M13.9982 23.998H11.9974C10.8924 23.998 9.99658 23.1022 9.99658 21.9972V11.993C9.99658 10.888 10.8924 9.99219 11.9974 9.99219H22.0016C23.1066 9.99219 24.0024 10.888 24.0024 11.993V13.9939" stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
-
</svg>
|
|
1
|
+
<svg width="38" height="36" viewBox="0 0 38 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="0.5" y="0.5" width="37" height="35" rx="5.5" fill="white" stroke="#D8D8D8"/>
|
|
3
|
+
<rect x="13.998" y="13.9922" width="14.0058" height="14.0058" rx="2" stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M13.9982 23.998H11.9974C10.8924 23.998 9.99658 23.1022 9.99658 21.9972V11.993C9.99658 10.888 10.8924 9.99219 11.9974 9.99219H22.0016C23.1066 9.99219 24.0024 10.888 24.0024 11.993V13.9939" stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
</svg>
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<svg viewBox="0 0 38 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<rect width="35px" height="35px" stroke="#D8D8D8" fill="white" x="0.5" y="0.5" rx="5.5"/>
|
|
3
|
-
<path d="M11.4165 12.2142H26.5832" stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
-
<path stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round" d="M25.5 12.2139V23.597C25.5 24.7404 24.5304 25.6666 23.3333 25.6666H14.6667C13.4696 25.6666 12.5 24.7404 12.5 23.597V12.2139"/>
|
|
5
|
-
<path stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round" d="M22.25 8.85091H15.75"/>
|
|
6
|
-
<path stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round" d="M16.8332 16.3535V21.5276"/>
|
|
7
|
-
<path stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round" d="M21.1667 16.3535V21.5276"/>
|
|
1
|
+
<svg viewBox="0 0 38 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="35px" height="35px" stroke="#D8D8D8" fill="white" x="0.5" y="0.5" rx="5.5"/>
|
|
3
|
+
<path d="M11.4165 12.2142H26.5832" stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round" d="M25.5 12.2139V23.597C25.5 24.7404 24.5304 25.6666 23.3333 25.6666H14.6667C13.4696 25.6666 12.5 24.7404 12.5 23.597V12.2139"/>
|
|
5
|
+
<path stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round" d="M22.25 8.85091H15.75"/>
|
|
6
|
+
<path stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round" d="M16.8332 16.3535V21.5276"/>
|
|
7
|
+
<path stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round" d="M21.1667 16.3535V21.5276"/>
|
|
8
8
|
</svg>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
<svg width="43" height="43" viewBox="0 0 43 43" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<path d="M8.9585 13.5823H34.0418" stroke="#084FFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
-
<path d="M32.25 13.5781V32.404C32.25 34.2951 30.6465 35.8269 28.6667 35.8269H14.3333C12.3535 35.8269 10.75 34.2951 10.75 32.404V13.5781" stroke="#084FFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
-
<path d="M26.875 8.01978H16.125" stroke="#084FFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
-
<path d="M17.9168 20.4297V28.9869" stroke="#084FFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
-
<path d="M25.0833 20.4297V28.9869" stroke="#084FFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
1
|
+
|
|
2
|
+
<svg width="43" height="43" viewBox="0 0 43 43" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path d="M8.9585 13.5823H34.0418" stroke="#084FFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M32.25 13.5781V32.404C32.25 34.2951 30.6465 35.8269 28.6667 35.8269H14.3333C12.3535 35.8269 10.75 34.2951 10.75 32.404V13.5781" stroke="#084FFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
<path d="M26.875 8.01978H16.125" stroke="#084FFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
<path d="M17.9168 20.4297V28.9869" stroke="#084FFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
+
<path d="M25.0833 20.4297V28.9869" stroke="#084FFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8
8
|
</svg>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<div
|
|
2
|
+
[ngClass]="{ 'mb-4': !inLine }"
|
|
3
|
+
class="px-3"
|
|
4
|
+
[id]="(inLine || inCard) ? 'question-' + submissionIndex + '-' + question.id : 'question-' + question.id"
|
|
5
|
+
[attr.name]="question.testElementName"
|
|
6
|
+
>
|
|
7
|
+
<div class="input-wrapper mb-2" *ngIf="!inLine">
|
|
8
|
+
<div *ngIf="question.questionNumber" [innerHTML]="question.questionNumber"></div>
|
|
9
|
+
<span *ngIf="question.questionNumber" class="space"></span> <label>{{ question.question }}</label
|
|
10
|
+
>
|
|
11
|
+
<span class="text-danger" *ngIf="question?.required">*</span>
|
|
12
|
+
<div
|
|
13
|
+
class="svg-wrapper mb-2 hintIcon"
|
|
14
|
+
[attr.data-title]="hint"
|
|
15
|
+
*ngIf="hint"
|
|
16
|
+
>
|
|
17
|
+
<svg
|
|
18
|
+
class="hintSvg"
|
|
19
|
+
viewBox="0 0 30 30"
|
|
20
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
21
|
+
>
|
|
22
|
+
<path
|
|
23
|
+
fill-rule="evenodd"
|
|
24
|
+
clip-rule="evenodd"
|
|
25
|
+
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"
|
|
26
|
+
stroke="#323232"
|
|
27
|
+
stroke-width="1.5"
|
|
28
|
+
stroke-linecap="round"
|
|
29
|
+
stroke-linejoin="round"
|
|
30
|
+
/>
|
|
31
|
+
<path
|
|
32
|
+
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"
|
|
33
|
+
stroke="#323232"
|
|
34
|
+
stroke-width="1.5"
|
|
35
|
+
stroke-linecap="round"
|
|
36
|
+
stroke-linejoin="round"
|
|
37
|
+
/>
|
|
38
|
+
<path
|
|
39
|
+
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"
|
|
40
|
+
stroke="#323232"
|
|
41
|
+
stroke-width="1.5"
|
|
42
|
+
stroke-linecap="round"
|
|
43
|
+
stroke-linejoin="round"
|
|
44
|
+
/>
|
|
45
|
+
</svg>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<input
|
|
49
|
+
type="text"
|
|
50
|
+
class="form-control mb-2 height"
|
|
51
|
+
[placeholder]="placeholder"
|
|
52
|
+
[(ngModel)]="result"
|
|
53
|
+
readonly
|
|
54
|
+
[class.invalid-question]="isInvalid && (!inLine || !result)"
|
|
55
|
+
[id]="question.id"
|
|
56
|
+
/>
|
|
57
|
+
<div *ngIf="isInvalid && (!inLine || !result)" class="error-message">
|
|
58
|
+
{{ errorMessage }}
|
|
59
|
+
</div>
|
|
60
|
+
<div *ngIf="validationFailed && !isInvalid" class="text-danger error-message">
|
|
61
|
+
{{ validationMessage }}
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "../../styles/shared-style.scss";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { AggregateFunctionComponent } from './aggregate-function.component';
|
|
4
|
+
|
|
5
|
+
describe('AggregateFunctionComponent', () => {
|
|
6
|
+
let component: AggregateFunctionComponent;
|
|
7
|
+
let fixture: ComponentFixture<AggregateFunctionComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [AggregateFunctionComponent]
|
|
12
|
+
});
|
|
13
|
+
fixture = TestBed.createComponent(AggregateFunctionComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { ValidationService } from '../../services/validation.service';
|
|
3
|
+
import { ElementTrackerService } from '../../services/element-tracker.service';
|
|
4
|
+
import { AggregationFunctionService } from '../../services/aggregate.service';
|
|
5
|
+
import { Subscription } from 'rxjs';
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'lib-aggregate-function',
|
|
9
|
+
templateUrl: './aggregate-function.component.html',
|
|
10
|
+
styleUrls: ['./aggregate-function.component.scss']
|
|
11
|
+
})
|
|
12
|
+
export class AggregateFunctionComponent {
|
|
13
|
+
@Input() question: any = {};
|
|
14
|
+
@Input() inLine: boolean = false;
|
|
15
|
+
@Input() inCard: boolean = false;
|
|
16
|
+
@Input() submissionIndex!: number;
|
|
17
|
+
@Output() answerChange = new EventEmitter<{ answer: any; maxPossibleScore?: number }>();
|
|
18
|
+
@Input() rowId: any ;
|
|
19
|
+
answer: string = '';
|
|
20
|
+
count: number = 0;
|
|
21
|
+
required: boolean = false;
|
|
22
|
+
hint: string = '';
|
|
23
|
+
placeholder: string = '';
|
|
24
|
+
validationFailed: boolean = false;
|
|
25
|
+
validationMessage: string = '';
|
|
26
|
+
private elementId: string='';
|
|
27
|
+
private subscription!: Subscription;
|
|
28
|
+
result:number=0;
|
|
29
|
+
@Input() disableEdit: boolean = false;
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
private validationService: ValidationService,
|
|
33
|
+
private tracker: ElementTrackerService,
|
|
34
|
+
private aggregateService:AggregationFunctionService,
|
|
35
|
+
private cdr: ChangeDetectorRef
|
|
36
|
+
) { }
|
|
37
|
+
|
|
38
|
+
ngOnInit() {
|
|
39
|
+
this.valueAssigned();
|
|
40
|
+
this.aggregateService.setAggregateField(this.rowId,this.question.id,this.question.formElement.aggregateFunction.aggregateOperation,this.question.formElement.aggregateFunction.formula);
|
|
41
|
+
|
|
42
|
+
this.subscription = this.aggregateService.aggregateFieldResults$.subscribe(update => {
|
|
43
|
+
if (update && update.id === `${this.rowId}:${this.question.id}`) { // include rowId
|
|
44
|
+
if(update.evaluated){
|
|
45
|
+
this.result = update.result;
|
|
46
|
+
this.question.answer = String(this.result);
|
|
47
|
+
this.answerChange.emit({answer:this.question.answer,maxPossibleScore:0});
|
|
48
|
+
this.validationService.clearInvalid(this.buildElementId());
|
|
49
|
+
} else{
|
|
50
|
+
this.result = 0;
|
|
51
|
+
this.question.answer = '';
|
|
52
|
+
this.answerChange.emit({answer:this.question.answer,maxPossibleScore:0});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
valueAssigned() {
|
|
60
|
+
this.count = this.question?.count;
|
|
61
|
+
this.required = this.question?.required;
|
|
62
|
+
this.hint = this.question?.hint;
|
|
63
|
+
this.placeholder = this.question.formElement?.appearance?.placeholder || '';
|
|
64
|
+
if (
|
|
65
|
+
this.question.answer !== null &&
|
|
66
|
+
this.question.answer !== undefined &&
|
|
67
|
+
((typeof this.question.answer === 'string' &&
|
|
68
|
+
this.question.answer.trim() !== '') ||
|
|
69
|
+
(Array.isArray(this.question.answer) &&
|
|
70
|
+
this.question.answer.length > 0) ||
|
|
71
|
+
(typeof this.question.answer === 'object' &&
|
|
72
|
+
Object.keys(this.question.answer).length > 0))
|
|
73
|
+
) {
|
|
74
|
+
this.result = this.question.answer;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
clearAnswersRecursively(logic: any) {
|
|
80
|
+
if (!logic || !logic.rows) return;
|
|
81
|
+
|
|
82
|
+
logic.rows.forEach((row: any) => {
|
|
83
|
+
row.grid.forEach((item: any) => {
|
|
84
|
+
const element = item.element;
|
|
85
|
+
|
|
86
|
+
if (item.entityType === 'QUESTION' && element) {
|
|
87
|
+
// Clear answer if present
|
|
88
|
+
if ('answer' in element) {
|
|
89
|
+
element.answer = '';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Recursively clear childLogics if any
|
|
93
|
+
if (element.childLogics && element.childLogics.length > 0) {
|
|
94
|
+
element.childLogics.forEach((childLogic: any) => {
|
|
95
|
+
this.clearAnswersRecursively(childLogic);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (item.entityType === 'SUBFORM' && element && element.rows) {
|
|
101
|
+
// SUBFORM contains its own rows structure like a form
|
|
102
|
+
this.clearAnswersRecursively({ rows: element.rows });
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
handleValidation(isValid: boolean, message: string = 'This field is required') {
|
|
109
|
+
if (isValid) {
|
|
110
|
+
this.validationService.clearInvalid(this.buildElementId());
|
|
111
|
+
} else {
|
|
112
|
+
// this.validationService.setInvalid(this.question.id, message);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
private buildElementId(): string {
|
|
117
|
+
return (this.inLine || this.inCard)
|
|
118
|
+
? `${this.submissionIndex}-${this.question.id}`
|
|
119
|
+
: `${this.question.id}`;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
get isInvalid(): boolean {
|
|
123
|
+
return !!this.validationService.getErrorMessage(this.buildElementId());
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
get errorMessage(): string | null {
|
|
127
|
+
return this.validationService.getErrorMessage(this.buildElementId());
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
ngAfterViewInit() {
|
|
131
|
+
if (this.inLine || this.inCard) {
|
|
132
|
+
this.elementId = `question-${this.submissionIndex}-${this.question.id}`;
|
|
133
|
+
} else {
|
|
134
|
+
this.elementId = `question-${this.question.id}`;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
this.tracker.registerElement(this.elementId);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
ngOnDestroy() {
|
|
141
|
+
if (this.elementId) {
|
|
142
|
+
this.tracker.unregisterElement(this.elementId);
|
|
143
|
+
}
|
|
144
|
+
if (this.subscription) {
|
|
145
|
+
this.subscription.unsubscribe();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<div
|
|
2
|
+
[ngClass]="{ 'mb-4': !inLine }"
|
|
3
|
+
class="px-3"
|
|
4
|
+
[id]="(inLine || inCard) ? 'question-' + submissionIndex + '-' + question.id : 'question-' + question.id"
|
|
5
|
+
[attr.name]="question.testElementName"
|
|
6
|
+
>
|
|
7
|
+
<div class="input-wrapper mb-3" *ngIf="!inLine">
|
|
8
|
+
<div *ngIf="question.questionNumber" [innerHTML]="question.questionNumber"></div>
|
|
9
|
+
<span *ngIf="question.questionNumber" class="space"></span> <label>{{ question.question }}</label
|
|
10
|
+
>
|
|
11
|
+
<span class="text-danger" *ngIf="question?.required">*</span>
|
|
12
|
+
<div
|
|
13
|
+
class="svg-wrapper mb-2 hintIcon"
|
|
14
|
+
[attr.data-title]="hint"
|
|
15
|
+
*ngIf="hint"
|
|
16
|
+
>
|
|
17
|
+
<svg
|
|
18
|
+
class="hintSvg"
|
|
19
|
+
viewBox="0 0 30 30"
|
|
20
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
21
|
+
>
|
|
22
|
+
<path
|
|
23
|
+
fill-rule="evenodd"
|
|
24
|
+
clip-rule="evenodd"
|
|
25
|
+
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"
|
|
26
|
+
stroke="#323232"
|
|
27
|
+
stroke-width="1.5"
|
|
28
|
+
stroke-linecap="round"
|
|
29
|
+
stroke-linejoin="round"
|
|
30
|
+
/>
|
|
31
|
+
<path
|
|
32
|
+
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"
|
|
33
|
+
stroke="#323232"
|
|
34
|
+
stroke-width="1.5"
|
|
35
|
+
stroke-linecap="round"
|
|
36
|
+
stroke-linejoin="round"
|
|
37
|
+
/>
|
|
38
|
+
<path
|
|
39
|
+
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"
|
|
40
|
+
stroke="#323232"
|
|
41
|
+
stroke-width="1.5"
|
|
42
|
+
stroke-linecap="round"
|
|
43
|
+
stroke-linejoin="round"
|
|
44
|
+
/>
|
|
45
|
+
</svg>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div
|
|
49
|
+
class="checkboxField-container"
|
|
50
|
+
[class.two-column]="displayOptionsInColumn"
|
|
51
|
+
>
|
|
52
|
+
<div class="form-check" *ngFor="let option of customOptions">
|
|
53
|
+
<input
|
|
54
|
+
class="form-check-input"
|
|
55
|
+
type="checkbox"
|
|
56
|
+
[id]="question.id+'-'+rowId+'-'+option.value"
|
|
57
|
+
[name]="option.value + 'Checkbox'"
|
|
58
|
+
[value]="option.value"
|
|
59
|
+
(change)="onCheckboxChange(option, $event)"
|
|
60
|
+
[disabled]="isOptionDisabled(option)"
|
|
61
|
+
[checked]="selectedOptions.includes(option)"
|
|
62
|
+
[attr.data-value]="selectedOptions.includes(option)"
|
|
63
|
+
[disabled]="disableEdit"
|
|
64
|
+
/>
|
|
65
|
+
<label
|
|
66
|
+
class="formCheckLabel me-4 mb-2"
|
|
67
|
+
[for]="question.id+'-'+rowId+'-'+option.value"
|
|
68
|
+
>{{ option.label }}</label
|
|
69
|
+
>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div
|
|
73
|
+
*ngIf="isInvalid && (!inLine || selectedOptions.length === 0)"
|
|
74
|
+
class="error-message"
|
|
75
|
+
>
|
|
76
|
+
{{ errorMessage }}
|
|
77
|
+
</div>
|
|
78
|
+
<div *ngIf="validationFailed && !isInvalid" class="text-danger error-message">
|
|
79
|
+
{{ validationMessage }}
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@import "../../styles/shared-style.scss";
|
|
2
|
+
.form-check-input{
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
}
|
|
5
|
+
.invalid-question {
|
|
6
|
+
border: 2px solid #f44336; /* Material red */
|
|
7
|
+
border-radius: 4px;
|
|
8
|
+
padding: 8px;
|
|
9
|
+
margin-bottom: 4px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
.formCheckLabel{
|
|
15
|
+
margin-top: 5px;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* default: single‑column flow */
|
|
20
|
+
.checkboxField-container {
|
|
21
|
+
display: block;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* two‑column layout when flag is true */
|
|
25
|
+
.checkboxField-container.two-column {
|
|
26
|
+
display: grid;
|
|
27
|
+
grid-template-columns: repeat(2, 1fr);
|
|
28
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { CheckBoxFieldsComponent } from './check-box-fields.component';
|
|
4
|
+
|
|
5
|
+
describe('CheckBoxFieldsComponent', () => {
|
|
6
|
+
let component: CheckBoxFieldsComponent;
|
|
7
|
+
let fixture: ComponentFixture<CheckBoxFieldsComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [CheckBoxFieldsComponent]
|
|
12
|
+
});
|
|
13
|
+
fixture = TestBed.createComponent(CheckBoxFieldsComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|