@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,147 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class="outer-container mb-4 px-3"
|
|
3
|
+
[attr.name]="questionGroup.testElementName"
|
|
4
|
+
[id]="'question-' + questionGroup.id"
|
|
5
|
+
>
|
|
6
|
+
<div class="body container pt-3 pb-3 px-3">
|
|
7
|
+
<div class="tab-content pt-4 pb-3 px-3">
|
|
8
|
+
<p class="sectionTitle">{{ questionGroup.title }}</p>
|
|
9
|
+
<p [innerHTML]="decodedDescription" class="description"></p>
|
|
10
|
+
|
|
11
|
+
<div class="mt-5">
|
|
12
|
+
<div *ngFor="let row of questionGroup.rows">
|
|
13
|
+
<div class="d-flex">
|
|
14
|
+
<div
|
|
15
|
+
*ngFor="let grid of row.grid"
|
|
16
|
+
[ngStyle]="{ 'width.%': grid.element.count * (100 / 12) }"
|
|
17
|
+
>
|
|
18
|
+
<div *ngIf="grid.entityType === 'QUESTION' && grid.show">
|
|
19
|
+
<div [ngSwitch]="grid.element.formElement.elementType">
|
|
20
|
+
<lib-check-box-fields
|
|
21
|
+
*ngSwitchCase="'CHECK_BOX'"
|
|
22
|
+
[question]="grid.element"
|
|
23
|
+
></lib-check-box-fields>
|
|
24
|
+
<lib-date-time-fields
|
|
25
|
+
*ngSwitchCase="'DATE_TIME'"
|
|
26
|
+
[question]="grid.element"
|
|
27
|
+
></lib-date-time-fields>
|
|
28
|
+
<lib-drop-down-fields
|
|
29
|
+
*ngSwitchCase="'DROP_DOWN'"
|
|
30
|
+
[question]="grid.element"
|
|
31
|
+
></lib-drop-down-fields>
|
|
32
|
+
<lib-file-picker-fields
|
|
33
|
+
*ngSwitchCase="'FILE_PICKER'"
|
|
34
|
+
[question]="grid.element"
|
|
35
|
+
></lib-file-picker-fields>
|
|
36
|
+
<lib-location-fields
|
|
37
|
+
*ngSwitchCase="'LOCATION'"
|
|
38
|
+
[question]="grid.element"
|
|
39
|
+
></lib-location-fields>
|
|
40
|
+
<lib-mail-fields
|
|
41
|
+
*ngSwitchCase="'EMAIL'"
|
|
42
|
+
[question]="grid.element"
|
|
43
|
+
></lib-mail-fields>
|
|
44
|
+
<lib-mobile-fields
|
|
45
|
+
*ngSwitchCase="'MOBILE'"
|
|
46
|
+
[question]="grid.element"
|
|
47
|
+
></lib-mobile-fields>
|
|
48
|
+
<lib-number-fields
|
|
49
|
+
*ngSwitchCase="'NUMBER'"
|
|
50
|
+
[question]="grid.element"
|
|
51
|
+
[rowId]="'0'"
|
|
52
|
+
></lib-number-fields>
|
|
53
|
+
<lib-password-fields
|
|
54
|
+
*ngSwitchCase="'PASSWORD'"
|
|
55
|
+
[question]="grid.element"
|
|
56
|
+
></lib-password-fields>
|
|
57
|
+
<lib-radio-button-fields
|
|
58
|
+
*ngSwitchCase="'RADIO_BUTTON'"
|
|
59
|
+
[question]="grid.element"
|
|
60
|
+
></lib-radio-button-fields>
|
|
61
|
+
<lib-rich-text-editor-fields
|
|
62
|
+
*ngSwitchCase="'RICH_TEXT_EDITOR'"
|
|
63
|
+
[question]="grid.element"
|
|
64
|
+
></lib-rich-text-editor-fields>
|
|
65
|
+
<lib-selection-matrix-fields
|
|
66
|
+
*ngSwitchCase="'SELECTION_MATRIX'"
|
|
67
|
+
[question]="grid.element"
|
|
68
|
+
[acceptedLanguage]="acceptedLanguage"
|
|
69
|
+
></lib-selection-matrix-fields>
|
|
70
|
+
<lib-signature-fields
|
|
71
|
+
*ngSwitchCase="'SIGNATURE'"
|
|
72
|
+
[question]="grid.element"
|
|
73
|
+
></lib-signature-fields>
|
|
74
|
+
<lib-slider-fields
|
|
75
|
+
*ngSwitchCase="'SLIDER'"
|
|
76
|
+
[question]="grid.element"
|
|
77
|
+
></lib-slider-fields>
|
|
78
|
+
<lib-terms-and-condition-fields
|
|
79
|
+
*ngSwitchCase="'TERMS_AND_CONDITION'"
|
|
80
|
+
[question]="grid.element"
|
|
81
|
+
></lib-terms-and-condition-fields>
|
|
82
|
+
<lib-text-area-fields
|
|
83
|
+
*ngSwitchCase="'TEXT_AREA'"
|
|
84
|
+
[question]="grid.element"
|
|
85
|
+
></lib-text-area-fields>
|
|
86
|
+
<lib-text-fields
|
|
87
|
+
*ngSwitchCase="'TEXT_BOX'"
|
|
88
|
+
[question]="grid.element"
|
|
89
|
+
></lib-text-fields>
|
|
90
|
+
<lib-toggle-switch-fields
|
|
91
|
+
*ngSwitchCase="'TOGGLE_SWITCH'"
|
|
92
|
+
[question]="grid.element"
|
|
93
|
+
[acceptedLanguage]="acceptedLanguage"
|
|
94
|
+
></lib-toggle-switch-fields>
|
|
95
|
+
<lib-url-fields
|
|
96
|
+
*ngSwitchCase="'URL'"
|
|
97
|
+
[question]="grid.element"
|
|
98
|
+
></lib-url-fields>
|
|
99
|
+
<lib-currency-fields
|
|
100
|
+
*ngSwitchCase="'CURRENCY'"
|
|
101
|
+
[question]="grid.element"
|
|
102
|
+
></lib-currency-fields>
|
|
103
|
+
<lib-aggregate-function
|
|
104
|
+
*ngSwitchCase="'AGGREGATE_FUNCTION'"
|
|
105
|
+
[question]="grid.element"
|
|
106
|
+
[rowId]="'0'"
|
|
107
|
+
></lib-aggregate-function>
|
|
108
|
+
<lib-hidden-field
|
|
109
|
+
*ngSwitchCase="'HIDDEN_FIELD'"
|
|
110
|
+
[question]="grid.element"
|
|
111
|
+
></lib-hidden-field>
|
|
112
|
+
<lib-iframe-fields
|
|
113
|
+
*ngSwitchCase="'IFRAME_WIDGET'"
|
|
114
|
+
[question]="grid.element"
|
|
115
|
+
></lib-iframe-fields>
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
<!-- <ng-container *ngIf="grid.element.childLogics">
|
|
119
|
+
<ng-container *ngIf="getComponentForChildLogics(grid.element.childLogics, 'child', grid.element.answer) as cached">
|
|
120
|
+
<ng-container
|
|
121
|
+
*ngComponentOutlet="cached.component | async; injector: cached.injector">
|
|
122
|
+
</ng-container>
|
|
123
|
+
</ng-container>
|
|
124
|
+
</ng-container> -->
|
|
125
|
+
|
|
126
|
+
<ng-container *ngIf="grid?.element?.childLogics">
|
|
127
|
+
<ng-container *ngIf="componentToLoad">
|
|
128
|
+
<ng-container
|
|
129
|
+
*ngComponentOutlet="
|
|
130
|
+
componentToLoad;
|
|
131
|
+
inputs: {
|
|
132
|
+
grid: grid?.element?.childLogics,
|
|
133
|
+
answer: grid?.element?.answer,
|
|
134
|
+
state: 'child'
|
|
135
|
+
}
|
|
136
|
+
"
|
|
137
|
+
></ng-container>
|
|
138
|
+
</ng-container>
|
|
139
|
+
</ng-container>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.outer-container {
|
|
2
|
+
background-color: white;
|
|
3
|
+
position: relative;
|
|
4
|
+
@media (max-width: 576px) {
|
|
5
|
+
padding: 8px;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.body {
|
|
10
|
+
position: relative;
|
|
11
|
+
z-index: 1;
|
|
12
|
+
background: #efefef;
|
|
13
|
+
border-radius: 6px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.tab-content {
|
|
17
|
+
background-color: white;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.sectionTitle {
|
|
21
|
+
font-size: 19px;
|
|
22
|
+
font-weight: bold;
|
|
23
|
+
margin-bottom: 20px;
|
|
24
|
+
word-break: break-word;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.description {
|
|
28
|
+
font-size: 17px;
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
margin-bottom: 18px;
|
|
31
|
+
word-break: break-word;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
::ng-deep .description img{
|
|
35
|
+
max-width: 100%;
|
|
36
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { QuestionGroupComponent } from './question-group.component';
|
|
4
|
+
|
|
5
|
+
describe('QuestionGroupComponent', () => {
|
|
6
|
+
let component: QuestionGroupComponent;
|
|
7
|
+
let fixture: ComponentFixture<QuestionGroupComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [QuestionGroupComponent]
|
|
12
|
+
});
|
|
13
|
+
fixture = TestBed.createComponent(QuestionGroupComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Component, EventEmitter, Injector, Input, Output } from '@angular/core';
|
|
2
|
+
import { WhenClauseService } from '../../services/whenClause.service';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
interface Attachment {
|
|
6
|
+
fileId: string;
|
|
7
|
+
fileName: string;
|
|
8
|
+
fileUrl: string;
|
|
9
|
+
fileSize?: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: 'lib-question-group',
|
|
14
|
+
templateUrl: './question-group.component.html',
|
|
15
|
+
styleUrls: ['./question-group.component.scss']
|
|
16
|
+
})
|
|
17
|
+
export class QuestionGroupComponent {
|
|
18
|
+
@Input() questionGroup: any = {};
|
|
19
|
+
@Input() edit: boolean = false;
|
|
20
|
+
@Input() acceptedLanguage: string ='';
|
|
21
|
+
decodedDescription:string='';
|
|
22
|
+
grid: any;
|
|
23
|
+
childLogicCache: { [key: string]: { component: Promise<any>, injector: Injector } } = {};
|
|
24
|
+
componentToLoad: any;
|
|
25
|
+
injector!: Injector;
|
|
26
|
+
|
|
27
|
+
constructor(private whenClauseService:WhenClauseService){}
|
|
28
|
+
|
|
29
|
+
ngOnInit() {
|
|
30
|
+
this.loadComponent();
|
|
31
|
+
this.whenClauseService.addGridsFromSubform(this.questionGroup);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
decodeHtml(html: string): string {
|
|
35
|
+
const textArea = document.createElement('textarea');
|
|
36
|
+
textArea.innerHTML = html;
|
|
37
|
+
return textArea.value;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
ngOnChanges(): void {
|
|
41
|
+
if (this.questionGroup.description) {
|
|
42
|
+
this.decodedDescription = this.decodeHtml(this.questionGroup.description);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
removeCircularReferences(obj: any): any {
|
|
47
|
+
const seen = new WeakSet();
|
|
48
|
+
|
|
49
|
+
function recurse(value: any): any {
|
|
50
|
+
if (value === null || typeof value !== 'object') {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (seen.has(value)) {
|
|
55
|
+
return '[Circular]';
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
seen.add(value);
|
|
59
|
+
|
|
60
|
+
if (Array.isArray(value)) {
|
|
61
|
+
return value.map(item => recurse(item));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const output: any = {};
|
|
65
|
+
for (const key of Object.keys(value)) {
|
|
66
|
+
output[key] = recurse(value[key]);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
seen.delete(value);
|
|
70
|
+
return output;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return recurse(obj);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
private async loadComponent(): Promise<void> {
|
|
77
|
+
this.componentToLoad = await this.loadFormElementsComponent();
|
|
78
|
+
this.injector = this.createInjector();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
private async loadFormElementsComponent() {
|
|
82
|
+
const { FormElementsComponent } = await import('../form-elements/form-elements.component');
|
|
83
|
+
return FormElementsComponent;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
createInjector(): Injector {
|
|
87
|
+
return Injector.create({
|
|
88
|
+
providers: [
|
|
89
|
+
{ provide: 'grid', useValue: this.grid?.element.childLogics },
|
|
90
|
+
{ provide: 'state', useValue: 'child' },
|
|
91
|
+
],
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { SharedModule } from '../shared/shared.module';
|
|
4
|
+
import { InlineMultipleSubformComponent } from './inline-multiple-subform/inline-multiple-subform.component';
|
|
5
|
+
import { MultifieldsComponent } from './multifields/multifields.component';
|
|
6
|
+
import { CardSubformComponent } from './card-subform/card-subform.component';
|
|
7
|
+
import { ConfirmDialogComponent } from './confirm-dialog/confirm-dialog.component';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@NgModule({
|
|
12
|
+
declarations: [
|
|
13
|
+
MultifieldsComponent, ConfirmDialogComponent
|
|
14
|
+
],
|
|
15
|
+
imports: [
|
|
16
|
+
CommonModule,
|
|
17
|
+
SharedModule
|
|
18
|
+
],
|
|
19
|
+
exports:[
|
|
20
|
+
]
|
|
21
|
+
})
|
|
22
|
+
export class QuestionModule { }
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<div *ngIf="grid.show">
|
|
2
|
+
<div *ngIf="grid.entityType === 'QUESTION'">
|
|
3
|
+
<lib-question
|
|
4
|
+
[question]="grid?.element"
|
|
5
|
+
[edit]="edit"
|
|
6
|
+
[acceptedLanguage]="acceptedLanguage"
|
|
7
|
+
></lib-question>
|
|
8
|
+
</div>
|
|
9
|
+
<div *ngIf="grid.entityType === 'SECTION'">
|
|
10
|
+
<lib-section-fields [section]="grid.element"></lib-section-fields>
|
|
11
|
+
</div>
|
|
12
|
+
<ng-container *ngIf="grid.entityType === 'SUBFORM'">
|
|
13
|
+
<lib-sub-form
|
|
14
|
+
[subForm]="grid.element"
|
|
15
|
+
[acceptedLanguage]="acceptedLanguage"
|
|
16
|
+
(subFormChange)="updateSubFormWithSubmissions($event)"
|
|
17
|
+
[edit]="edit"
|
|
18
|
+
[pages]="pages"
|
|
19
|
+
></lib-sub-form>
|
|
20
|
+
</ng-container>
|
|
21
|
+
|
|
22
|
+
<ng-container *ngIf="grid.entityType === 'QUESTION_GROUP'">
|
|
23
|
+
<lib-question-group
|
|
24
|
+
[questionGroup]="grid.element"
|
|
25
|
+
[acceptedLanguage]="acceptedLanguage"
|
|
26
|
+
></lib-question-group>
|
|
27
|
+
</ng-container>
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
<ng-container *ngIf="grid.entityType === 'MULTIFIELD'">
|
|
31
|
+
<lib-multifields [multiFields]="grid.element" [acceptedLanguage]="acceptedLanguage"></lib-multifields>
|
|
32
|
+
</ng-container>
|
|
33
|
+
</div>
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { RecursiveLogicComponent } from './recursive-logic.component';
|
|
4
|
+
|
|
5
|
+
describe('RecursiveLogicComponent', () => {
|
|
6
|
+
let component: RecursiveLogicComponent;
|
|
7
|
+
let fixture: ComponentFixture<RecursiveLogicComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [RecursiveLogicComponent]
|
|
12
|
+
});
|
|
13
|
+
fixture = TestBed.createComponent(RecursiveLogicComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { WhenClauseService } from '../../services/whenClause.service';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'lib-recursive-logic',
|
|
6
|
+
templateUrl: './recursive-logic.component.html',
|
|
7
|
+
styleUrls: ['./recursive-logic.component.scss']
|
|
8
|
+
})
|
|
9
|
+
export class RecursiveLogicComponent {
|
|
10
|
+
@Input() grid: any = {};
|
|
11
|
+
@Input() currentPageIndex: number = 0;
|
|
12
|
+
@Input() edit : boolean = false;
|
|
13
|
+
@Input() acceptedLanguage: string ='';
|
|
14
|
+
@Output() subFormChange = new EventEmitter<any>();
|
|
15
|
+
@Input() state!: string;
|
|
16
|
+
@Input() answer!: string;
|
|
17
|
+
@Input() pages: any[] = [];
|
|
18
|
+
|
|
19
|
+
constructor(private whenClauseService:WhenClauseService){}
|
|
20
|
+
|
|
21
|
+
ngOnInit(){
|
|
22
|
+
this.whenClauseService.addGrid(this.grid);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
updateSubFormWithSubmissions(event:any){
|
|
26
|
+
this.subFormChange.emit(event);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class="outer-container mb-4 px-3"
|
|
3
|
+
[id]="'question-' + subForm.id"
|
|
4
|
+
[attr.name]="subForm.testElementName"
|
|
5
|
+
*ngIf="!subForm.deleted"
|
|
6
|
+
>
|
|
7
|
+
<div class="body py-1 px-1">
|
|
8
|
+
<div class="tab-content pt-4 pb-3 px-3">
|
|
9
|
+
<ng-container *ngIf="!subForm.copied; else copySubformContainer">
|
|
10
|
+
<div class="subform-header">
|
|
11
|
+
<div class="data-container">
|
|
12
|
+
<p class="sectionTitle">{{ subForm.title }}</p>
|
|
13
|
+
<p [innerHTML]="decodedDescription" class="description"></p>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="d-flex gap-3">
|
|
16
|
+
<div
|
|
17
|
+
class="finalScore"
|
|
18
|
+
*ngFor="let s of subForm?.scores"
|
|
19
|
+
[ngClass]="{
|
|
20
|
+
goodScore: s.scoreType === 'GOOD_SCORE',
|
|
21
|
+
badScore: s.scoreType === 'BAD_SCORE'
|
|
22
|
+
}"
|
|
23
|
+
>
|
|
24
|
+
<span class="scoreTitle">Score</span>
|
|
25
|
+
<p class="mb-0">{{ s.score }}</p>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="icon-container">
|
|
28
|
+
<img
|
|
29
|
+
src="assets/icons/copy-icon.svg"
|
|
30
|
+
alt="copy-icon"
|
|
31
|
+
(click)="copySubform()"
|
|
32
|
+
*ngIf="allowCopy"
|
|
33
|
+
/>
|
|
34
|
+
<img
|
|
35
|
+
src="assets/icons/delete-icon.svg"
|
|
36
|
+
class="delete-icon ms-3"
|
|
37
|
+
alt="delete icon"
|
|
38
|
+
(click)="deleteMainSubform(subForm.id)"
|
|
39
|
+
*ngIf="allowDelete"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</ng-container>
|
|
45
|
+
<ng-template #copySubformContainer>
|
|
46
|
+
<div class="d-flex justify-content-end gap-4">
|
|
47
|
+
<div
|
|
48
|
+
class="finalScore"
|
|
49
|
+
*ngFor="let s of subForm?.scores"
|
|
50
|
+
[ngClass]="{
|
|
51
|
+
goodScore: s.scoreType === 'GOOD_SCORE',
|
|
52
|
+
badScore: s.scoreType === 'BAD_SCORE'
|
|
53
|
+
}"
|
|
54
|
+
>
|
|
55
|
+
<span class="scoreTitle">Score</span>
|
|
56
|
+
<p class="mb-0">{{ s.score }}</p>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="icon-container" (click)="deleteCopySubform(subForm.id)">
|
|
59
|
+
<img
|
|
60
|
+
src="assets/icons/delete-icon.svg"
|
|
61
|
+
class="delete-icon"
|
|
62
|
+
alt="delete icon"
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
<div class="copy-subform-container mb-3">
|
|
67
|
+
<p>Title</p>
|
|
68
|
+
<input
|
|
69
|
+
type="text"
|
|
70
|
+
class="form-control"
|
|
71
|
+
[(ngModel)]="subformTitle"
|
|
72
|
+
(ngModelChange)="updateSubformData($event, subForm.id, 'title')"
|
|
73
|
+
/>
|
|
74
|
+
<p class="mt-3">Description</p>
|
|
75
|
+
<quill-editor
|
|
76
|
+
[(ngModel)]="subformDescription"
|
|
77
|
+
(ngModelChange)="
|
|
78
|
+
updateSubformData($event, subForm.id, 'description')
|
|
79
|
+
"
|
|
80
|
+
(onEditorCreated)="editorCreated($event)"
|
|
81
|
+
class="editor"
|
|
82
|
+
placeholder=""
|
|
83
|
+
></quill-editor>
|
|
84
|
+
</div>
|
|
85
|
+
</ng-template>
|
|
86
|
+
|
|
87
|
+
<div *ngIf="subForm.property.subFormStructure == 'multiple'">
|
|
88
|
+
<lib-multiple-subform
|
|
89
|
+
*ngIf="subForm.property.subFormType === 'table'"
|
|
90
|
+
[subForm]="subForm"
|
|
91
|
+
(subFormChange)="updateSubFormWithSubmissions($event)"
|
|
92
|
+
[acceptedLanguage]="acceptedLanguage"
|
|
93
|
+
></lib-multiple-subform>
|
|
94
|
+
|
|
95
|
+
<lib-inline-multiple-subform
|
|
96
|
+
*ngIf="subForm.property.subFormType === 'inline'"
|
|
97
|
+
[subForm]="subForm"
|
|
98
|
+
(subFormChange)="updateSubFormWithSubmissions($event)"
|
|
99
|
+
[acceptedLanguage]="acceptedLanguage"
|
|
100
|
+
></lib-inline-multiple-subform>
|
|
101
|
+
<lib-card-subform
|
|
102
|
+
*ngIf="subForm.property.subFormType === 'card'"
|
|
103
|
+
[subForm]="subForm"
|
|
104
|
+
[acceptedLanguage]="acceptedLanguage"
|
|
105
|
+
(subFormChange)="updateSubFormWithSubmissions($event)"
|
|
106
|
+
[edit]="edit"
|
|
107
|
+
></lib-card-subform>
|
|
108
|
+
</div>
|
|
109
|
+
<div *ngIf="subForm.property.subFormStructure == 'single'">
|
|
110
|
+
<div *ngFor="let row of subForm.rows">
|
|
111
|
+
<div class="d-flex">
|
|
112
|
+
<div
|
|
113
|
+
*ngFor="let grid of row.grid"
|
|
114
|
+
[ngStyle]="{ 'width.%': grid.element.count * (100 / 12) }"
|
|
115
|
+
>
|
|
116
|
+
<div *ngIf="grid.entityType === 'QUESTION' && grid.show">
|
|
117
|
+
<div [ngSwitch]="grid.element.formElement.elementType">
|
|
118
|
+
<lib-check-box-fields
|
|
119
|
+
*ngSwitchCase="'CHECK_BOX'"
|
|
120
|
+
[question]="grid.element"
|
|
121
|
+
></lib-check-box-fields>
|
|
122
|
+
<lib-date-time-fields
|
|
123
|
+
*ngSwitchCase="'DATE_TIME'"
|
|
124
|
+
[question]="grid.element"
|
|
125
|
+
></lib-date-time-fields>
|
|
126
|
+
<lib-drop-down-fields
|
|
127
|
+
*ngSwitchCase="'DROP_DOWN'"
|
|
128
|
+
[question]="grid.element"
|
|
129
|
+
></lib-drop-down-fields>
|
|
130
|
+
<lib-file-picker-fields
|
|
131
|
+
*ngSwitchCase="'FILE_PICKER'"
|
|
132
|
+
[question]="grid.element"
|
|
133
|
+
></lib-file-picker-fields>
|
|
134
|
+
<lib-location-fields
|
|
135
|
+
*ngSwitchCase="'LOCATION'"
|
|
136
|
+
[question]="grid.element"
|
|
137
|
+
></lib-location-fields>
|
|
138
|
+
<lib-mail-fields
|
|
139
|
+
*ngSwitchCase="'EMAIL'"
|
|
140
|
+
[question]="grid.element"
|
|
141
|
+
></lib-mail-fields>
|
|
142
|
+
<lib-mobile-fields
|
|
143
|
+
*ngSwitchCase="'MOBILE'"
|
|
144
|
+
[question]="grid.element"
|
|
145
|
+
></lib-mobile-fields>
|
|
146
|
+
<lib-number-fields
|
|
147
|
+
*ngSwitchCase="'NUMBER'"
|
|
148
|
+
[question]="grid.element"
|
|
149
|
+
[rowId]="'0'"
|
|
150
|
+
></lib-number-fields>
|
|
151
|
+
<lib-password-fields
|
|
152
|
+
*ngSwitchCase="'PASSWORD'"
|
|
153
|
+
[question]="grid.element"
|
|
154
|
+
></lib-password-fields>
|
|
155
|
+
<lib-radio-button-fields
|
|
156
|
+
*ngSwitchCase="'RADIO_BUTTON'"
|
|
157
|
+
[question]="grid.element"
|
|
158
|
+
></lib-radio-button-fields>
|
|
159
|
+
<lib-rich-text-editor-fields
|
|
160
|
+
*ngSwitchCase="'RICH_TEXT_EDITOR'"
|
|
161
|
+
[question]="grid.element"
|
|
162
|
+
></lib-rich-text-editor-fields>
|
|
163
|
+
<lib-selection-matrix-fields
|
|
164
|
+
*ngSwitchCase="'SELECTION_MATRIX'"
|
|
165
|
+
[question]="grid.element"
|
|
166
|
+
[acceptedLanguage]="acceptedLanguage"
|
|
167
|
+
></lib-selection-matrix-fields>
|
|
168
|
+
<lib-signature-fields
|
|
169
|
+
*ngSwitchCase="'SIGNATURE'"
|
|
170
|
+
[question]="grid.element"
|
|
171
|
+
></lib-signature-fields>
|
|
172
|
+
<lib-slider-fields
|
|
173
|
+
*ngSwitchCase="'SLIDER'"
|
|
174
|
+
[question]="grid.element"
|
|
175
|
+
></lib-slider-fields>
|
|
176
|
+
<lib-terms-and-condition-fields
|
|
177
|
+
*ngSwitchCase="'TERMS_AND_CONDITION'"
|
|
178
|
+
[question]="grid.element"
|
|
179
|
+
></lib-terms-and-condition-fields>
|
|
180
|
+
<lib-text-area-fields
|
|
181
|
+
*ngSwitchCase="'TEXT_AREA'"
|
|
182
|
+
[question]="grid.element"
|
|
183
|
+
></lib-text-area-fields>
|
|
184
|
+
<lib-text-fields
|
|
185
|
+
*ngSwitchCase="'TEXT_BOX'"
|
|
186
|
+
[question]="grid.element"
|
|
187
|
+
></lib-text-fields>
|
|
188
|
+
<lib-toggle-switch-fields
|
|
189
|
+
*ngSwitchCase="'TOGGLE_SWITCH'"
|
|
190
|
+
[question]="grid.element"
|
|
191
|
+
[acceptedLanguage]="acceptedLanguage"
|
|
192
|
+
></lib-toggle-switch-fields>
|
|
193
|
+
<lib-url-fields
|
|
194
|
+
*ngSwitchCase="'URL'"
|
|
195
|
+
[question]="grid.element"
|
|
196
|
+
></lib-url-fields>
|
|
197
|
+
<lib-currency-fields
|
|
198
|
+
*ngSwitchCase="'CURRENCY'"
|
|
199
|
+
[question]="grid.element"
|
|
200
|
+
></lib-currency-fields>
|
|
201
|
+
<lib-aggregate-function
|
|
202
|
+
*ngSwitchCase="'AGGREGATE_FUNCTION'"
|
|
203
|
+
[question]="grid.element"
|
|
204
|
+
[rowId]="'0'"
|
|
205
|
+
></lib-aggregate-function>
|
|
206
|
+
<lib-hidden-field
|
|
207
|
+
*ngSwitchCase="'HIDDEN_FIELD'"
|
|
208
|
+
[question]="grid.element"
|
|
209
|
+
></lib-hidden-field>
|
|
210
|
+
<lib-iframe-fields
|
|
211
|
+
*ngSwitchCase="'IFRAME_WIDGET'"
|
|
212
|
+
[question]="grid.element"
|
|
213
|
+
></lib-iframe-fields>
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
<!-- <ng-container *ngIf="grid.element.childLogics">
|
|
217
|
+
<ng-container
|
|
218
|
+
*ngIf="getComponentForChildLogics(grid.element.childLogics, 'child', grid.element.answer) as outlet">
|
|
219
|
+
<ng-container *ngComponentOutlet="outlet.component | async; injector: outlet.injector">
|
|
220
|
+
</ng-container>
|
|
221
|
+
</ng-container>
|
|
222
|
+
</ng-container> -->
|
|
223
|
+
<ng-container *ngIf="grid?.element?.childLogics">
|
|
224
|
+
<ng-container *ngIf="componentToLoad">
|
|
225
|
+
<ng-container
|
|
226
|
+
*ngComponentOutlet="
|
|
227
|
+
componentToLoad;
|
|
228
|
+
inputs: {
|
|
229
|
+
grid: grid?.element?.childLogics,
|
|
230
|
+
answer: grid?.element?.answer,
|
|
231
|
+
state: 'child'
|
|
232
|
+
}
|
|
233
|
+
"
|
|
234
|
+
></ng-container>
|
|
235
|
+
</ng-container>
|
|
236
|
+
</ng-container>
|
|
237
|
+
</div>
|
|
238
|
+
|
|
239
|
+
<div *ngIf="grid.entityType === 'SECTION' && grid.show">
|
|
240
|
+
<lib-section-fields
|
|
241
|
+
[section]="grid.element"
|
|
242
|
+
></lib-section-fields>
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
<div *ngIf="isInvalid" class="error-message mt-4">
|
|
250
|
+
{{ errorMessage }}
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
</div>
|