@piserve-tech/form-submission 1.3.317 → 1.3.319
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/environment/environment.d.ts +5 -0
- package/esm2022/environment/environment.mjs +6 -0
- package/esm2022/form-fields/aggregate-function/aggregate-function.component.mjs +146 -0
- package/esm2022/form-fields/check-box-fields/check-box-fields.component.mjs +473 -0
- package/esm2022/form-fields/currency-fields/currency-fields.component.mjs +502 -0
- package/esm2022/form-fields/date-time-fields/date-time-fields.component.mjs +608 -0
- package/esm2022/form-fields/drop-down-fields/drop-down-fields.component.mjs +585 -0
- package/esm2022/form-fields/file-picker-fields/file-picker-fields.component.mjs +224 -0
- package/esm2022/form-fields/form-fields.module.mjs +174 -0
- package/esm2022/form-fields/hidden-field/hidden-field.component.mjs +137 -0
- package/esm2022/form-fields/iframe-fields/iframe-fields.component.mjs +198 -0
- package/esm2022/form-fields/location-fields/location-fields.component.mjs +85 -0
- package/esm2022/form-fields/mail-fields/mail-fields.component.mjs +131 -0
- package/esm2022/form-fields/mobile-fields/mobile-fields.component.mjs +270 -0
- package/esm2022/form-fields/number-fields/number-fields.component.mjs +242 -0
- package/esm2022/form-fields/password-fields/password-fields.component.mjs +257 -0
- package/esm2022/form-fields/radio-button-fields/radio-button-fields.component.mjs +346 -0
- package/esm2022/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.mjs +148 -0
- package/esm2022/form-fields/section-fields/section-fields.component.mjs +29 -0
- package/esm2022/form-fields/selection-matrix-fields/selection-matrix-fields.component.mjs +158 -0
- package/esm2022/form-fields/signature-fields/signature-fields.component.mjs +32 -0
- package/esm2022/form-fields/slider-fields/slider-fields.component.mjs +73 -0
- package/esm2022/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.mjs +66 -0
- package/esm2022/form-fields/text-area-fields/text-area-fields.component.mjs +159 -0
- package/esm2022/form-fields/text-fields/text-fields.component.mjs +245 -0
- package/esm2022/form-fields/toggle-switch-fields/toggle-switch-fields.component.mjs +85 -0
- package/esm2022/form-fields/url-fields/url-fields.component.mjs +124 -0
- package/esm2022/form-submission/form-submission.module.mjs +64 -0
- package/esm2022/form-submission/header/header.component.mjs +20 -0
- package/esm2022/form-submission/navigation-tabs/navigation-tabs.component.mjs +171 -0
- package/esm2022/form-submission/next-prev-navigation/next-prev-navigation.component.mjs +124 -0
- package/esm2022/form-submission/save-as-draft/saveDraftModalComponent .mjs +50 -0
- package/esm2022/form-submission/submission-container/submission-container.component.mjs +17 -0
- package/esm2022/form-submission/submit-form/submit-form.component.mjs +1610 -0
- package/esm2022/lib/form-submission.component.mjs +113 -0
- package/esm2022/lib/form-submission.module.mjs +56 -0
- package/esm2022/lib/form-submission.service.mjs +14 -0
- package/esm2022/models/aggregate.model.mjs +2 -0
- package/esm2022/models/answer.model.mjs +2 -0
- package/esm2022/models/appearance.model.mjs +2 -0
- package/esm2022/models/attachment.model.mjs +2 -0
- package/esm2022/models/defaultAnswerEntry.model.mjs +2 -0
- package/esm2022/models/defaultAnswersModel.model.mjs +2 -0
- package/esm2022/models/defaultQuestionAnswer.model.mjs +2 -0
- package/esm2022/models/elementOptionAPI.model.mjs +2 -0
- package/esm2022/models/elementOptionAPIData.model.mjs +2 -0
- package/esm2022/models/elementOptionDB.model.mjs +2 -0
- package/esm2022/models/elementOptionDBCriteria.model.mjs +2 -0
- package/esm2022/models/emitters.model.mjs +2 -0
- package/esm2022/models/enum/condition.enum.mjs +18 -0
- package/esm2022/models/enum/elementType .enum.mjs +24 -0
- package/esm2022/models/enum/entityType.enum.mjs +12 -0
- package/esm2022/models/formConfiguration.model.mjs +2 -0
- package/esm2022/models/formElement.model.mjs +2 -0
- package/esm2022/models/formElementType.model.mjs +2 -0
- package/esm2022/models/grid.model.mjs +2 -0
- package/esm2022/models/hiddenField.model.mjs +2 -0
- package/esm2022/models/iFrameProperties.model.mjs +2 -0
- package/esm2022/models/logic.model.mjs +2 -0
- package/esm2022/models/multifields.model.mjs +2 -0
- package/esm2022/models/option.model.mjs +2 -0
- package/esm2022/models/page.model.mjs +2 -0
- package/esm2022/models/publicForm.model.mjs +2 -0
- package/esm2022/models/question.model.mjs +2 -0
- package/esm2022/models/questionAnswer.model.mjs +2 -0
- package/esm2022/models/questionGroup.model.mjs +2 -0
- package/esm2022/models/row.model.mjs +2 -0
- package/esm2022/models/scoring.model.mjs +2 -0
- package/esm2022/models/section.model.mjs +2 -0
- package/esm2022/models/subForm.model.mjs +2 -0
- package/esm2022/models/subformConfiguration.model.mjs +2 -0
- package/esm2022/models/subformPropery.model.mjs +2 -0
- package/esm2022/models/submission.model.mjs +2 -0
- package/esm2022/models/submissionCopyConfig.mopdel.mjs +2 -0
- package/esm2022/models/terms&condition.model.mjs +2 -0
- package/esm2022/models/validation.model.mjs +2 -0
- package/esm2022/models/whenClause.model.mjs +2 -0
- package/esm2022/models/whenClauseCondition.model.mjs +2 -0
- package/esm2022/models/whenClauseElements.model.mjs +2 -0
- package/esm2022/piserve-tech-form-submission.mjs +5 -0
- package/esm2022/public-api.mjs +7 -0
- package/esm2022/question/card-subform/card-subform.component.mjs +354 -0
- package/esm2022/question/confirm-dialog/confirm-dialog.component.mjs +27 -0
- package/esm2022/question/form-elements/form-elements.component.mjs +62 -0
- package/esm2022/question/inline-multiple-subform/inline-multiple-subform.component.mjs +384 -0
- package/esm2022/question/multifields/multifields.component.mjs +54 -0
- package/esm2022/question/multiple-subform/multiple-subform.component.mjs +413 -0
- package/esm2022/question/question/question.component.mjs +145 -0
- package/esm2022/question/question-group/question-group.component.mjs +102 -0
- package/esm2022/question/recursive-logic/recursive-logic.component.mjs +49 -0
- package/esm2022/question/sub-form/sub-form.component.mjs +355 -0
- package/esm2022/services/aggregate.service.mjs +139 -0
- package/esm2022/services/countryService.mjs +89 -0
- package/esm2022/services/data.service.mjs +36 -0
- package/esm2022/services/element-tracker.service.mjs +27 -0
- package/esm2022/services/form-validation.service.mjs +128 -0
- package/esm2022/services/form.service.mjs +332 -0
- package/esm2022/services/mapper.service.mjs +519 -0
- package/esm2022/services/recaptcha.service.mjs +136 -0
- package/esm2022/services/score.service.mjs +268 -0
- package/esm2022/services/subform-copy.service.mjs +122 -0
- package/esm2022/services/validation.service.mjs +35 -0
- package/esm2022/services/whenClause.service.mjs +423 -0
- package/esm2022/shared/shared.module.mjs +97 -0
- package/esm2022/sub-form/submission-modal/submission-modal.component.mjs +133 -0
- package/fesm2022/piserve-tech-form-submission.mjs +11661 -0
- package/fesm2022/piserve-tech-form-submission.mjs.map +1 -0
- package/form-fields/aggregate-function/aggregate-function.component.d.ts +43 -0
- package/form-fields/check-box-fields/check-box-fields.component.d.ts +73 -0
- package/form-fields/currency-fields/currency-fields.component.d.ts +62 -0
- package/form-fields/date-time-fields/date-time-fields.component.d.ts +96 -0
- package/form-fields/drop-down-fields/drop-down-fields.component.d.ts +88 -0
- package/form-fields/file-picker-fields/file-picker-fields.component.d.ts +72 -0
- package/form-fields/form-fields.module.d.ts +40 -0
- package/form-fields/hidden-field/hidden-field.component.d.ts +38 -0
- package/form-fields/iframe-fields/iframe-fields.component.d.ts +35 -0
- package/form-fields/location-fields/location-fields.component.d.ts +29 -0
- package/form-fields/mail-fields/mail-fields.component.d.ts +41 -0
- package/form-fields/mobile-fields/mobile-fields.component.d.ts +71 -0
- package/form-fields/number-fields/number-fields.component.d.ts +53 -0
- package/form-fields/password-fields/password-fields.component.d.ts +57 -0
- package/form-fields/radio-button-fields/radio-button-fields.component.d.ts +70 -0
- package/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.d.ts +46 -0
- package/form-fields/section-fields/section-fields.component.d.ts +10 -0
- package/form-fields/selection-matrix-fields/selection-matrix-fields.component.d.ts +45 -0
- package/form-fields/signature-fields/signature-fields.component.d.ts +13 -0
- package/form-fields/slider-fields/slider-fields.component.d.ts +32 -0
- package/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.d.ts +26 -0
- package/form-fields/text-area-fields/text-area-fields.component.d.ts +49 -0
- package/form-fields/text-fields/text-fields.component.d.ts +49 -0
- package/form-fields/toggle-switch-fields/toggle-switch-fields.component.d.ts +29 -0
- package/form-fields/url-fields/url-fields.component.d.ts +41 -0
- package/form-submission/form-submission.module.d.ts +20 -0
- package/form-submission/header/header.component.d.ts +7 -0
- package/form-submission/navigation-tabs/navigation-tabs.component.d.ts +57 -0
- package/form-submission/next-prev-navigation/next-prev-navigation.component.d.ts +46 -0
- package/form-submission/save-as-draft/saveDraftModalComponent .d.ts +17 -0
- package/form-submission/submission-container/submission-container.component.d.ts +7 -0
- package/form-submission/submit-form/submit-form.component.d.ts +237 -0
- package/index.d.ts +5 -0
- package/lib/form-submission.component.d.ts +30 -0
- package/lib/form-submission.module.d.ts +16 -0
- package/lib/form-submission.service.d.ts +6 -0
- package/models/aggregate.model.d.ts +4 -0
- package/{src/models/answer.model.ts → models/answer.model.d.ts} +23 -25
- package/models/appearance.model.d.ts +64 -0
- package/{src/models/attachment.model.ts → models/attachment.model.d.ts} +6 -6
- package/{src/models/defaultAnswerEntry.model.ts → models/defaultAnswerEntry.model.d.ts} +5 -7
- package/{src/models/defaultAnswersModel.model.ts → models/defaultAnswersModel.model.d.ts} +4 -5
- package/{src/models/defaultQuestionAnswer.model.ts → models/defaultQuestionAnswer.model.d.ts} +6 -6
- package/models/elementOptionAPI.model.d.ts +12 -0
- package/models/elementOptionAPIData.model.d.ts +5 -0
- package/models/elementOptionDB.model.d.ts +8 -0
- package/models/elementOptionDBCriteria.model.d.ts +7 -0
- package/{src/models/emitters.model.ts → models/emitters.model.d.ts} +8 -8
- package/{src/models/enum/condition.enum.ts → models/enum/condition.enum.d.ts} +2 -2
- package/models/enum/elementType .enum.d.ts +22 -0
- package/models/enum/entityType.enum.d.ts +10 -0
- package/{src/models/formConfiguration.model.ts → models/formConfiguration.model.d.ts} +2 -2
- package/{src/models/formElement.model.ts → models/formElement.model.d.ts} +22 -22
- package/{src/models/formElementType.model.ts → models/formElementType.model.d.ts} +2 -3
- package/{src/models/grid.model.ts → models/grid.model.d.ts} +13 -14
- package/{src/models/hiddenField.model.ts → models/hiddenField.model.d.ts} +5 -5
- package/{src/models/iFrameProperties.model.ts → models/iFrameProperties.model.d.ts} +13 -13
- package/models/logic.model.d.ts +9 -0
- package/models/multifields.model.d.ts +11 -0
- package/{src/models/option.model.ts → models/option.model.d.ts} +5 -5
- package/models/page.model.d.ts +6 -0
- package/models/publicForm.model.d.ts +18 -0
- package/models/question.model.d.ts +26 -0
- package/models/questionAnswer.model.d.ts +7 -0
- package/models/questionGroup.model.d.ts +11 -0
- package/{src/models/row.model.ts → models/row.model.d.ts} +1 -2
- package/models/scoring.model.d.ts +10 -0
- package/models/section.model.d.ts +6 -0
- package/models/subForm.model.d.ts +24 -0
- package/models/subformConfiguration.model.d.ts +4 -0
- package/models/subformPropery.model.d.ts +7 -0
- package/{src/models/submission.model.ts → models/submission.model.d.ts} +14 -16
- package/{src/models/submissionCopyConfig.mopdel.ts → models/submissionCopyConfig.mopdel.d.ts} +4 -4
- package/{src/models/terms&condition.model.ts → models/terms&condition.model.d.ts} +1 -1
- package/models/validation.model.d.ts +48 -0
- package/models/whenClause.model.d.ts +6 -0
- package/{src/models/whenClauseCondition.model.ts → models/whenClauseCondition.model.d.ts} +6 -6
- package/{src/models/whenClauseElements.model.ts → models/whenClauseElements.model.d.ts} +5 -6
- package/package.json +46 -33
- package/{src/public-api.ts → public-api.d.ts} +0 -4
- package/question/card-subform/card-subform.component.d.ts +44 -0
- package/question/confirm-dialog/confirm-dialog.component.d.ts +12 -0
- package/question/form-elements/form-elements.component.d.ts +20 -0
- package/question/inline-multiple-subform/inline-multiple-subform.component.d.ts +47 -0
- package/question/multifields/multifields.component.d.ts +11 -0
- package/question/multiple-subform/multiple-subform.component.d.ts +39 -0
- package/question/question/question.component.d.ts +30 -0
- package/question/question-group/question-group.component.d.ts +29 -0
- package/question/recursive-logic/recursive-logic.component.d.ts +19 -0
- package/question/sub-form/sub-form.component.d.ts +70 -0
- package/services/aggregate.service.d.ts +29 -0
- package/services/countryService.d.ts +21 -0
- package/services/data.service.d.ts +19 -0
- package/services/element-tracker.service.d.ts +10 -0
- package/services/form-validation.service.d.ts +16 -0
- package/services/form.service.d.ts +27 -0
- package/services/mapper.service.d.ts +31 -0
- package/services/recaptcha.service.d.ts +46 -0
- package/services/score.service.d.ts +27 -0
- package/services/subform-copy.service.d.ts +10 -0
- package/services/validation.service.d.ts +14 -0
- package/services/whenClause.service.d.ts +45 -0
- package/shared/shared.module.d.ts +25 -0
- package/sub-form/submission-modal/submission-modal.component.d.ts +31 -0
- package/ng-package.json +0 -30
- package/src/environment/environment.ts +0 -6
- package/src/form-fields/aggregate-function/aggregate-function.component.html +0 -63
- package/src/form-fields/aggregate-function/aggregate-function.component.scss +0 -1
- package/src/form-fields/aggregate-function/aggregate-function.component.spec.ts +0 -21
- package/src/form-fields/aggregate-function/aggregate-function.component.ts +0 -148
- package/src/form-fields/check-box-fields/check-box-fields.component.html +0 -81
- package/src/form-fields/check-box-fields/check-box-fields.component.scss +0 -28
- package/src/form-fields/check-box-fields/check-box-fields.component.spec.ts +0 -21
- package/src/form-fields/check-box-fields/check-box-fields.component.ts +0 -538
- package/src/form-fields/currency-fields/currency-fields.component.html +0 -85
- package/src/form-fields/currency-fields/currency-fields.component.scss +0 -48
- package/src/form-fields/currency-fields/currency-fields.component.spec.ts +0 -21
- package/src/form-fields/currency-fields/currency-fields.component.ts +0 -589
- package/src/form-fields/date-time-fields/date-time-fields.component.html +0 -268
- package/src/form-fields/date-time-fields/date-time-fields.component.scss +0 -88
- package/src/form-fields/date-time-fields/date-time-fields.component.spec.ts +0 -21
- package/src/form-fields/date-time-fields/date-time-fields.component.ts +0 -693
- package/src/form-fields/drop-down-fields/drop-down-fields.component.html +0 -77
- package/src/form-fields/drop-down-fields/drop-down-fields.component.scss +0 -12
- package/src/form-fields/drop-down-fields/drop-down-fields.component.spec.ts +0 -21
- package/src/form-fields/drop-down-fields/drop-down-fields.component.ts +0 -698
- package/src/form-fields/file-picker-fields/file-picker-fields.component.html +0 -72
- package/src/form-fields/file-picker-fields/file-picker-fields.component.scss +0 -33
- package/src/form-fields/file-picker-fields/file-picker-fields.component.spec.ts +0 -21
- package/src/form-fields/file-picker-fields/file-picker-fields.component.ts +0 -256
- package/src/form-fields/form-fields.module.ts +0 -110
- package/src/form-fields/hidden-field/hidden-field.component.scss +0 -0
- package/src/form-fields/hidden-field/hidden-field.component.spec.ts +0 -21
- package/src/form-fields/hidden-field/hidden-field.component.ts +0 -156
- package/src/form-fields/iframe-fields/iframe-fields.component.html +0 -31
- package/src/form-fields/iframe-fields/iframe-fields.component.scss +0 -0
- package/src/form-fields/iframe-fields/iframe-fields.component.spec.ts +0 -21
- package/src/form-fields/iframe-fields/iframe-fields.component.ts +0 -225
- package/src/form-fields/location-fields/location-fields.component.html +0 -54
- package/src/form-fields/location-fields/location-fields.component.scss +0 -22
- package/src/form-fields/location-fields/location-fields.component.spec.ts +0 -21
- package/src/form-fields/location-fields/location-fields.component.ts +0 -83
- package/src/form-fields/mail-fields/mail-fields.component.html +0 -66
- package/src/form-fields/mail-fields/mail-fields.component.scss +0 -10
- package/src/form-fields/mail-fields/mail-fields.component.spec.ts +0 -21
- package/src/form-fields/mail-fields/mail-fields.component.ts +0 -127
- package/src/form-fields/mobile-fields/mobile-fields.component.html +0 -97
- package/src/form-fields/mobile-fields/mobile-fields.component.scss +0 -52
- package/src/form-fields/mobile-fields/mobile-fields.component.spec.ts +0 -21
- package/src/form-fields/mobile-fields/mobile-fields.component.ts +0 -310
- package/src/form-fields/number-fields/number-fields.component.html +0 -70
- package/src/form-fields/number-fields/number-fields.component.scss +0 -17
- package/src/form-fields/number-fields/number-fields.component.spec.ts +0 -21
- package/src/form-fields/number-fields/number-fields.component.ts +0 -256
- package/src/form-fields/password-fields/password-fields.component.html +0 -113
- package/src/form-fields/password-fields/password-fields.component.scss +0 -61
- package/src/form-fields/password-fields/password-fields.component.spec.ts +0 -21
- package/src/form-fields/password-fields/password-fields.component.ts +0 -273
- package/src/form-fields/radio-button-fields/radio-button-fields.component.html +0 -82
- package/src/form-fields/radio-button-fields/radio-button-fields.component.scss +0 -28
- package/src/form-fields/radio-button-fields/radio-button-fields.component.spec.ts +0 -21
- package/src/form-fields/radio-button-fields/radio-button-fields.component.ts +0 -391
- package/src/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.html +0 -67
- package/src/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.scss +0 -23
- package/src/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.spec.ts +0 -21
- package/src/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.ts +0 -145
- package/src/form-fields/section-fields/section-fields.component.html +0 -4
- package/src/form-fields/section-fields/section-fields.component.scss +0 -37
- package/src/form-fields/section-fields/section-fields.component.spec.ts +0 -21
- package/src/form-fields/section-fields/section-fields.component.ts +0 -25
- package/src/form-fields/selection-matrix-fields/selection-matrix-fields.component.html +0 -93
- package/src/form-fields/selection-matrix-fields/selection-matrix-fields.component.scss +0 -52
- package/src/form-fields/selection-matrix-fields/selection-matrix-fields.component.spec.ts +0 -21
- package/src/form-fields/selection-matrix-fields/selection-matrix-fields.component.ts +0 -155
- package/src/form-fields/signature-fields/signature-fields.component.html +0 -43
- package/src/form-fields/signature-fields/signature-fields.component.scss +0 -10
- package/src/form-fields/signature-fields/signature-fields.component.spec.ts +0 -21
- package/src/form-fields/signature-fields/signature-fields.component.ts +0 -25
- package/src/form-fields/slider-fields/slider-fields.component.html +0 -67
- package/src/form-fields/slider-fields/slider-fields.component.scss +0 -55
- package/src/form-fields/slider-fields/slider-fields.component.spec.ts +0 -21
- package/src/form-fields/slider-fields/slider-fields.component.ts +0 -63
- package/src/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.html +0 -52
- package/src/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.scss +0 -85
- package/src/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.spec.ts +0 -21
- package/src/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.ts +0 -62
- package/src/form-fields/text-area-fields/text-area-fields.component.html +0 -68
- package/src/form-fields/text-area-fields/text-area-fields.component.scss +0 -19
- package/src/form-fields/text-area-fields/text-area-fields.component.spec.ts +0 -21
- package/src/form-fields/text-area-fields/text-area-fields.component.ts +0 -166
- package/src/form-fields/text-fields/text-fields.component.html +0 -67
- package/src/form-fields/text-fields/text-fields.component.scss +0 -26
- package/src/form-fields/text-fields/text-fields.component.spec.ts +0 -21
- package/src/form-fields/text-fields/text-fields.component.ts +0 -248
- package/src/form-fields/toggle-switch-fields/toggle-switch-fields.component.html +0 -70
- package/src/form-fields/toggle-switch-fields/toggle-switch-fields.component.scss +0 -112
- package/src/form-fields/toggle-switch-fields/toggle-switch-fields.component.spec.ts +0 -21
- package/src/form-fields/toggle-switch-fields/toggle-switch-fields.component.ts +0 -74
- package/src/form-fields/url-fields/url-fields.component.html +0 -109
- package/src/form-fields/url-fields/url-fields.component.scss +0 -22
- package/src/form-fields/url-fields/url-fields.component.spec.ts +0 -21
- package/src/form-fields/url-fields/url-fields.component.ts +0 -123
- package/src/form-submission/form-submission.module.ts +0 -40
- package/src/form-submission/header/header.component.html +0 -6
- package/src/form-submission/header/header.component.scss +0 -26
- package/src/form-submission/header/header.component.spec.ts +0 -21
- package/src/form-submission/header/header.component.ts +0 -12
- package/src/form-submission/navigation-tabs/navigation-tabs.component.html +0 -134
- package/src/form-submission/navigation-tabs/navigation-tabs.component.scss +0 -200
- package/src/form-submission/navigation-tabs/navigation-tabs.component.spec.ts +0 -21
- package/src/form-submission/navigation-tabs/navigation-tabs.component.ts +0 -134
- package/src/form-submission/next-prev-navigation/next-prev-navigation.component.html +0 -207
- package/src/form-submission/next-prev-navigation/next-prev-navigation.component.scss +0 -208
- package/src/form-submission/next-prev-navigation/next-prev-navigation.component.spec.ts +0 -21
- package/src/form-submission/next-prev-navigation/next-prev-navigation.component.ts +0 -74
- package/src/form-submission/save-as-draft/saveDraftModalComponent .ts +0 -60
- package/src/form-submission/save-as-draft/saveDraftModalComponent.html +0 -33
- package/src/form-submission/save-as-draft/saveDraftModalComponent.scss +0 -195
- package/src/form-submission/submission-container/submission-container.component.html +0 -30
- package/src/form-submission/submission-container/submission-container.component.scss +0 -67
- package/src/form-submission/submission-container/submission-container.component.spec.ts +0 -21
- package/src/form-submission/submission-container/submission-container.component.ts +0 -14
- package/src/form-submission/submit-form/submit-form.component.html +0 -76
- package/src/form-submission/submit-form/submit-form.component.scss +0 -88
- package/src/form-submission/submit-form/submit-form.component.spec.ts +0 -21
- package/src/form-submission/submit-form/submit-form.component.ts +0 -1953
- package/src/lib/form-submission.component.html +0 -15
- package/src/lib/form-submission.component.scss +0 -1
- package/src/lib/form-submission.component.ts +0 -120
- package/src/lib/form-submission.module.ts +0 -31
- package/src/lib/form-submission.service.spec.ts +0 -16
- package/src/lib/form-submission.service.ts +0 -9
- package/src/models/aggregate.model.ts +0 -4
- package/src/models/appearance.model.ts +0 -64
- package/src/models/elementOptionAPI.model.ts +0 -13
- package/src/models/elementOptionAPIData.model.ts +0 -5
- package/src/models/elementOptionDB.model.ts +0 -9
- package/src/models/elementOptionDBCriteria.model.ts +0 -7
- package/src/models/enum/elementType .enum.ts +0 -22
- package/src/models/enum/entityType.enum.ts +0 -10
- package/src/models/logic.model.ts +0 -11
- package/src/models/multifields.model.ts +0 -12
- package/src/models/page.model.ts +0 -7
- package/src/models/publicForm.model.ts +0 -19
- package/src/models/question.model.ts +0 -27
- package/src/models/questionAnswer.model.ts +0 -8
- package/src/models/questionGroup.model.ts +0 -12
- package/src/models/response.model.ts +0 -9
- package/src/models/result.model.ts +0 -5
- package/src/models/scoring.model.ts +0 -10
- package/src/models/section.model.ts +0 -6
- package/src/models/subForm.model.ts +0 -25
- package/src/models/subformConfiguration.model.ts +0 -4
- package/src/models/subformPropery.model.ts +0 -8
- package/src/models/validation.model.ts +0 -48
- package/src/models/whenClause.model.ts +0 -7
- package/src/question/card-subform/card-subform.component.html +0 -282
- package/src/question/card-subform/card-subform.component.scss +0 -49
- package/src/question/card-subform/card-subform.component.spec.ts +0 -21
- package/src/question/card-subform/card-subform.component.ts +0 -407
- package/src/question/confirm-dialog/confirm-dialog.component.html +0 -32
- package/src/question/confirm-dialog/confirm-dialog.component.scss +0 -109
- package/src/question/confirm-dialog/confirm-dialog.component.spec.ts +0 -21
- package/src/question/confirm-dialog/confirm-dialog.component.ts +0 -24
- package/src/question/form-elements/form-elements.component.html +0 -28
- package/src/question/form-elements/form-elements.component.scss +0 -0
- package/src/question/form-elements/form-elements.component.spec.ts +0 -21
- package/src/question/form-elements/form-elements.component.ts +0 -41
- package/src/question/inline-multiple-subform/inline-multiple-subform.component.html +0 -321
- package/src/question/inline-multiple-subform/inline-multiple-subform.component.scss +0 -78
- package/src/question/inline-multiple-subform/inline-multiple-subform.component.spec.ts +0 -21
- package/src/question/inline-multiple-subform/inline-multiple-subform.component.ts +0 -425
- package/src/question/multifields/multifields.component.html +0 -78
- package/src/question/multifields/multifields.component.scss +0 -6
- package/src/question/multifields/multifields.component.spec.ts +0 -21
- package/src/question/multifields/multifields.component.ts +0 -27
- package/src/question/multiple-subform/multiple-subform.component.html +0 -185
- package/src/question/multiple-subform/multiple-subform.component.scss +0 -52
- package/src/question/multiple-subform/multiple-subform.component.spec.ts +0 -21
- package/src/question/multiple-subform/multiple-subform.component.ts +0 -481
- package/src/question/question/question.component.html +0 -51
- package/src/question/question/question.component.scss +0 -0
- package/src/question/question/question.component.spec.ts +0 -21
- package/src/question/question/question.component.ts +0 -129
- package/src/question/question-group/question-group.component.html +0 -147
- package/src/question/question-group/question-group.component.scss +0 -36
- package/src/question/question-group/question-group.component.spec.ts +0 -21
- package/src/question/question-group/question-group.component.ts +0 -94
- package/src/question/question.module.ts +0 -22
- package/src/question/recursive-logic/recursive-logic.component.html +0 -33
- package/src/question/recursive-logic/recursive-logic.component.scss +0 -0
- package/src/question/recursive-logic/recursive-logic.component.spec.ts +0 -21
- package/src/question/recursive-logic/recursive-logic.component.ts +0 -29
- package/src/question/sub-form/sub-form.component.html +0 -254
- package/src/question/sub-form/sub-form.component.scss +0 -83
- package/src/question/sub-form/sub-form.component.spec.ts +0 -21
- package/src/question/sub-form/sub-form.component.ts +0 -421
- package/src/services/aggregate.service.ts +0 -148
- package/src/services/countryService.ts +0 -92
- package/src/services/data.service.ts +0 -36
- package/src/services/element-tracker.service.spec.ts +0 -16
- package/src/services/element-tracker.service.ts +0 -24
- package/src/services/form-validation.service.ts +0 -151
- package/src/services/form.service.spec.ts +0 -16
- package/src/services/form.service.ts +0 -407
- package/src/services/mapper.service.ts +0 -625
- package/src/services/recaptcha.service.spec.ts +0 -16
- package/src/services/recaptcha.service.ts +0 -179
- package/src/services/score.service.ts +0 -352
- package/src/services/subform-copy.service.ts +0 -148
- package/src/services/validation.service.spec.ts +0 -16
- package/src/services/validation.service.ts +0 -33
- package/src/services/whenClause.service.ts +0 -502
- package/src/shared/shared.module.ts +0 -58
- package/src/styles/shared-style.scss +0 -86
- package/src/sub-form/sub-form.module.ts +0 -24
- package/src/sub-form/submission-modal/submission-modal.component.html +0 -160
- package/src/sub-form/submission-modal/submission-modal.component.scss +0 -54
- package/src/sub-form/submission-modal/submission-modal.component.spec.ts +0 -21
- package/src/sub-form/submission-modal/submission-modal.component.ts +0 -127
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
- /package/{src/assets → assets}/fonts/Garamond.woff2 +0 -0
- /package/{src/assets → assets}/fonts/Georgia.woff2 +0 -0
- /package/{src/assets → assets}/fonts/Poppins.woff2 +0 -0
- /package/{src/assets → assets}/fonts/Tahoma.woff2 +0 -0
- /package/{src/assets → assets}/fonts/Tajawal.woff2 +0 -0
- /package/{src/assets → assets}/fonts/Verdana.woff2 +0 -0
- /package/{src/assets → assets}/icons/close-sidebar-mark-icon.svg +0 -0
- /package/{src/assets → assets}/icons/copy-icon.svg +0 -0
- /package/{src/assets → assets}/icons/delete-icon.svg +0 -0
- /package/{src/assets → assets}/icons/delete-no-outline-icon.svg +0 -0
- /package/{src/assets → assets}/icons/left_arrow.svg +0 -0
- /package/{src/assets → assets}/icons/right_arrow.svg +0 -0
|
@@ -1,625 +0,0 @@
|
|
|
1
|
-
import { Appearance } from '../models/appearance.model';
|
|
2
|
-
import { ElementOptionAPI } from '../models/elementOptionAPI.model';
|
|
3
|
-
import { elementOptionAPIData } from '../models/elementOptionAPIData.model';
|
|
4
|
-
import { ElementOptionDB } from '../models/elementOptionDB.model';
|
|
5
|
-
import { ElementOptionDBCriteria } from '../models/elementOptionDBCriteria.model';
|
|
6
|
-
import { FormElement } from '../models/formElement.model';
|
|
7
|
-
import { Grid } from '../models/grid.model';
|
|
8
|
-
import { Page } from '../models/page.model';
|
|
9
|
-
import { PublicForm } from '../models/publicForm.model';
|
|
10
|
-
import { Question } from '../models/question.model';
|
|
11
|
-
import { Row } from '../models/row.model';
|
|
12
|
-
import { Validation } from '../models/validation.model';
|
|
13
|
-
import { Option } from '../models/option.model';
|
|
14
|
-
import { Section } from '../models/section.model';
|
|
15
|
-
import { SubForm } from '../models/subForm.model';
|
|
16
|
-
import { FormElementType } from '../models/formElementType.model';
|
|
17
|
-
import { Logic } from '../models/logic.model';
|
|
18
|
-
import { Attachment } from '../models/attachment.model';
|
|
19
|
-
import { Submission } from '../models/submission.model';
|
|
20
|
-
import { Answer } from '../models/answer.model';
|
|
21
|
-
import { termsAndConditionType } from '../models/terms&condition.model';
|
|
22
|
-
import { FormConfiguration } from '../models/formConfiguration.model';
|
|
23
|
-
import { QuestionGroup } from '../models/questionGroup.model';
|
|
24
|
-
import { SubformProperty } from '../models/subformPropery.model';
|
|
25
|
-
import { Multifields } from '../models/multifields.model';
|
|
26
|
-
import { AggregateFunction } from '../models/aggregate.model';
|
|
27
|
-
import { DefaultAnswersModel } from '../models/defaultAnswersModel.model';
|
|
28
|
-
import { DefaultAnswerEntry } from '../models/defaultAnswerEntry.model';
|
|
29
|
-
import { DefaultQuestionAnswer } from '../models/defaultQuestionAnswer.model';
|
|
30
|
-
import { SubformConfiguration } from '../models/subformConfiguration.model';
|
|
31
|
-
import { EmitterDTO } from '../models/emitters.model';
|
|
32
|
-
import { add } from 'ngx-bootstrap/chronos';
|
|
33
|
-
import { Scoring } from '../models/scoring.model';
|
|
34
|
-
import { HiddenField } from '../models/hiddenField.model';
|
|
35
|
-
import { IFrameProperties } from '../models/iFrameProperties.model';
|
|
36
|
-
import { SubmissionCopyConfig } from '../models/submissionCopyConfig.mopdel';
|
|
37
|
-
|
|
38
|
-
export function mapPublicFormToModel(apiPublicForm: any): PublicForm {
|
|
39
|
-
return {
|
|
40
|
-
name: apiPublicForm.result.name,
|
|
41
|
-
formConfiguration: mapFormConfigurationToModel(
|
|
42
|
-
apiPublicForm.result.moduleConfiguration
|
|
43
|
-
),
|
|
44
|
-
currency:apiPublicForm?.result?.currency,
|
|
45
|
-
defautlCurrency:apiPublicForm?.result?.defaultCurrency,
|
|
46
|
-
pages: apiPublicForm.result.pages.map((apiPage: any) =>
|
|
47
|
-
mapPageToModel(apiPage,apiPublicForm?.result?.currency,apiPublicForm?.result?.defaultCurrency)
|
|
48
|
-
),
|
|
49
|
-
questionAnswers:apiPublicForm.result.questionAnswers,
|
|
50
|
-
parentId:apiPublicForm.result.parentId,
|
|
51
|
-
emitters: apiPublicForm.result.emittersDTOS
|
|
52
|
-
? apiPublicForm.result.emittersDTOS.map((emitter: any) => mapEmitterToModel(emitter))
|
|
53
|
-
: [],
|
|
54
|
-
score:apiPublicForm.score,
|
|
55
|
-
maximumPossibleScore:apiPublicForm.maximumPossibleScore,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
export function mapEmitterToModel(apiEmitter: any): EmitterDTO {
|
|
61
|
-
return {
|
|
62
|
-
id: apiEmitter.id,
|
|
63
|
-
keyName: apiEmitter.keyName,
|
|
64
|
-
valueSource: apiEmitter.valueSource,
|
|
65
|
-
questionId: apiEmitter.questionId,
|
|
66
|
-
inputValue: apiEmitter.inputValue,
|
|
67
|
-
isConflict: apiEmitter.isConflict ?? false
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
function mapFormConfigurationToModel(
|
|
73
|
-
apiFormConfiguration: any
|
|
74
|
-
): FormConfiguration {
|
|
75
|
-
return {
|
|
76
|
-
saveAutomatically: apiFormConfiguration?.saveAutomatically,
|
|
77
|
-
saveInterval: apiFormConfiguration?.saveInterval,
|
|
78
|
-
customizeFont: apiFormConfiguration?.customizeFont,
|
|
79
|
-
fontFamily: apiFormConfiguration?.fontFamily,
|
|
80
|
-
fontSize: apiFormConfiguration?.fontSize,
|
|
81
|
-
enableDataExport: apiFormConfiguration?.enableDataExport,
|
|
82
|
-
fileFormats: apiFormConfiguration?.fileFormats,
|
|
83
|
-
enableQuestionNumbering: apiFormConfiguration?.enableQuestionNumbering,
|
|
84
|
-
questionNumbering: apiFormConfiguration?.questionNumbering,
|
|
85
|
-
enableGoogleRecaptcha: apiFormConfiguration?.enableGoogleRecaptcha,
|
|
86
|
-
googleRecaptchaKey: apiFormConfiguration?.googleRecaptchaKey,
|
|
87
|
-
googleRecaptchaSecret: apiFormConfiguration?.googleRecaptchaSecret,
|
|
88
|
-
navigation: apiFormConfiguration?.navigation,
|
|
89
|
-
markAllQuestionsAsRequired: apiFormConfiguration?.markAllQuestionsAsRequired,
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
export function mapPageToModel(apiPage: any, currency:any, defaultCurrency:any): Page {
|
|
96
|
-
return {
|
|
97
|
-
title: apiPage.title,
|
|
98
|
-
testElementName: apiPage.testElementName,
|
|
99
|
-
rows: apiPage?.rows?.map((apiRow: any) => mapRowToModel(apiRow,currency,defaultCurrency)),
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function mapRowToModel(apiRow: any, currency:any,defaultCurrency:any): Row {
|
|
104
|
-
return {
|
|
105
|
-
grid: apiRow.grid.map((apiGrid: any) => mapGridToModel(apiGrid,currency,defaultCurrency)),
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function mapGridToModel(apiGrid: any, currency:any,defaultCurrency:any): Grid {
|
|
110
|
-
let entity: Section | Question | SubForm | QuestionGroup | Multifields | undefined;
|
|
111
|
-
|
|
112
|
-
switch (apiGrid.entityType) {
|
|
113
|
-
case 'QUESTION':
|
|
114
|
-
entity = mapQuestionToModel(apiGrid.element,currency,defaultCurrency);
|
|
115
|
-
break;
|
|
116
|
-
case 'SECTION':
|
|
117
|
-
entity = mapSectionToModel(apiGrid.element);
|
|
118
|
-
break;
|
|
119
|
-
case 'SUBFORM':
|
|
120
|
-
entity = mapSubFormToModel(apiGrid.element,currency,defaultCurrency);
|
|
121
|
-
break;
|
|
122
|
-
case 'QUESTION_GROUP':
|
|
123
|
-
entity = mapQuestionGroupToModel(apiGrid.element,currency,defaultCurrency);
|
|
124
|
-
break;
|
|
125
|
-
case 'MULTIFIELD':
|
|
126
|
-
entity = mapMultifieldsToModel(apiGrid.element,currency,defaultCurrency);
|
|
127
|
-
break;
|
|
128
|
-
default:
|
|
129
|
-
throw new Error(`Unknown entity type: ${apiGrid.entityType}`);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
const whenClause = mapWhenClauseModel(apiGrid.whenClauseDTO);
|
|
133
|
-
// read actions safely
|
|
134
|
-
const actions: string[] = Array.isArray(whenClause?.whenClauseActions)
|
|
135
|
-
? whenClause.whenClauseActions
|
|
136
|
-
: [];
|
|
137
|
-
|
|
138
|
-
// pick last action if multiple (your UI prevents that but safe handling)
|
|
139
|
-
const action = actions.length > 0 ? actions[actions.length - 1] : undefined;
|
|
140
|
-
|
|
141
|
-
let shouldShow = true; // default visible
|
|
142
|
-
|
|
143
|
-
if (action === 'SHOW') {
|
|
144
|
-
shouldShow = false; // default hidden when action = SHOW
|
|
145
|
-
}
|
|
146
|
-
if (action === 'HIDE') {
|
|
147
|
-
shouldShow = true; // default shown when action = HIDE
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
return {
|
|
151
|
-
entityType: apiGrid.entityType,
|
|
152
|
-
element: entity,
|
|
153
|
-
whenClause: whenClause,
|
|
154
|
-
show: shouldShow
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export function mapWhenClauseModel(whenClauseDTO: any) {
|
|
159
|
-
// 🧩 Guard: Handle undefined/null or malformed data
|
|
160
|
-
if (!whenClauseDTO || !Array.isArray(whenClauseDTO.whenClauseCondition)) {
|
|
161
|
-
|
|
162
|
-
return {
|
|
163
|
-
activate: false,
|
|
164
|
-
whenClauseCondition: [],
|
|
165
|
-
whenClauseActions: []
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return {
|
|
170
|
-
activate: !!whenClauseDTO.activate,
|
|
171
|
-
whenClauseActions: whenClauseDTO.whenClauseActions || [],
|
|
172
|
-
whenClauseCondition: whenClauseDTO.whenClauseCondition.map((condition: any) => ({
|
|
173
|
-
logic: condition.logic || '',
|
|
174
|
-
questionid: condition.questionid || '',
|
|
175
|
-
condition: condition.condition || '',
|
|
176
|
-
value: condition.value ?? '' // handle null/undefined gracefully
|
|
177
|
-
}))
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export function mapSectionToModel(apiSection: any): Section {
|
|
182
|
-
return {
|
|
183
|
-
id: apiSection.id,
|
|
184
|
-
title: apiSection.title,
|
|
185
|
-
description: apiSection.description,
|
|
186
|
-
testElementName: apiSection.testElementName
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
export function mapQuestionToModel(apiQuestion: any, currency:any, defaultCurrency:any): Question {
|
|
191
|
-
return {
|
|
192
|
-
count: apiQuestion.count,
|
|
193
|
-
id: apiQuestion.id,
|
|
194
|
-
questionNumber: apiQuestion.questionNumber,
|
|
195
|
-
required: apiQuestion.required,
|
|
196
|
-
hint: apiQuestion.hint,
|
|
197
|
-
question: apiQuestion.question,
|
|
198
|
-
testElementName: apiQuestion.testElementName,
|
|
199
|
-
answer: apiQuestion?.answer,
|
|
200
|
-
validation: true,
|
|
201
|
-
formElement: mapFormElementToModel(apiQuestion.formElement,currency,defaultCurrency),
|
|
202
|
-
childLogics: apiQuestion?.childLogics?.map((logic: any) =>
|
|
203
|
-
mapLogicToModel(logic, currency,defaultCurrency)
|
|
204
|
-
),
|
|
205
|
-
answerId: apiQuestion?.answerId,
|
|
206
|
-
attachments: apiQuestion?.attachments?.map((attachment: any) => mapAttachmentToModel(attachment)) || [],
|
|
207
|
-
deleteFiles: [],
|
|
208
|
-
defaultValue:apiQuestion?.defaultValue,
|
|
209
|
-
disableEdit:apiQuestion?.disableEdit,
|
|
210
|
-
score:apiQuestion.score,
|
|
211
|
-
maximumPossibleScore:apiQuestion.maximumPossibleScore,
|
|
212
|
-
amountInWords: apiQuestion?.amountInWords,
|
|
213
|
-
answerCurrency:apiQuestion?.currencySymbol
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
function mapAttachmentToModel(apiAttachment: any): Attachment {
|
|
218
|
-
return {
|
|
219
|
-
fileId: apiAttachment.fileId,
|
|
220
|
-
fileName: apiAttachment.fileName,
|
|
221
|
-
fileUrl: apiAttachment.fileUrl,
|
|
222
|
-
fileSize:apiAttachment?.fileSize
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
function mapFormElementToModel(apiFormElement: any, currency:any, defaultCurrency:any): FormElement {
|
|
227
|
-
return {
|
|
228
|
-
elementType: apiFormElement.elementType,
|
|
229
|
-
appearance: mapAppearanceToModel(apiFormElement.appearance,currency,defaultCurrency),
|
|
230
|
-
validation: mapValidationToModel(apiFormElement.validation),
|
|
231
|
-
option: mapOptionToModel(apiFormElement?.option),
|
|
232
|
-
aggregateFunction: mapAggregateFunction(apiFormElement?.aggregateFunction),
|
|
233
|
-
selectionMatrixLabel: apiFormElement.selectionMatrixLabel,
|
|
234
|
-
selectionMatrixColumn: apiFormElement.selectionMatrixColumn,
|
|
235
|
-
termsAndConditionType: maptermsAndCondition(apiFormElement),
|
|
236
|
-
scoring: mapScoringToModel(apiFormElement.scoring),
|
|
237
|
-
hiddenField: mapHiddenFieldToModel(apiFormElement?.hiddenField),
|
|
238
|
-
iFrameProperties: mapIframeProperties(apiFormElement?.iFrameProperties)
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
function mapIframeProperties(iFrameProperties: any): IFrameProperties {
|
|
243
|
-
return {
|
|
244
|
-
contentType: iFrameProperties?.contentType,
|
|
245
|
-
url: iFrameProperties?.url,
|
|
246
|
-
html: iFrameProperties?.html,
|
|
247
|
-
style: iFrameProperties?.style,
|
|
248
|
-
script: iFrameProperties?.script
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
function mapHiddenFieldToModel(hiddenField: any): HiddenField {
|
|
253
|
-
return {
|
|
254
|
-
value: hiddenField?.value,
|
|
255
|
-
valueSource: hiddenField?.valueSource,
|
|
256
|
-
key: hiddenField?.key
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
function mapAggregateFunction(aggregateFunction: any): AggregateFunction | undefined {
|
|
261
|
-
if (!aggregateFunction) {
|
|
262
|
-
return undefined;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
return {
|
|
266
|
-
aggregateOperation: aggregateFunction.aggregateOperation,
|
|
267
|
-
formula: aggregateFunction.formula
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
function maptermsAndCondition(Element: any): termsAndConditionType {
|
|
272
|
-
if(Element.termsAndCondition != undefined){
|
|
273
|
-
let data = Element.termsAndCondition
|
|
274
|
-
return {
|
|
275
|
-
termsAndConditionType: data.termsAndConditionType,
|
|
276
|
-
fileUrl: data.fileUrl,
|
|
277
|
-
fileName: data.fileName,
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
else{
|
|
281
|
-
return {
|
|
282
|
-
termsAndConditionType: '',
|
|
283
|
-
fileUrl: '',
|
|
284
|
-
fileName: '',
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
function mapLogicToModel(apiLogic: any, currency:any,defaultCurrency:any): Logic {
|
|
291
|
-
return {
|
|
292
|
-
id: apiLogic.id,
|
|
293
|
-
inputValue: apiLogic.inputValue,
|
|
294
|
-
condition: apiLogic.condition,
|
|
295
|
-
showLogic: false,
|
|
296
|
-
rows: apiLogic?.rows?.map((element: any) =>
|
|
297
|
-
mapRowToModel(element,currency,defaultCurrency)
|
|
298
|
-
),
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
export function mapSubFormToModel(apiSubForm: any, currency:any,defaultCurrency:any): SubForm {
|
|
303
|
-
return {
|
|
304
|
-
id: apiSubForm.id,
|
|
305
|
-
count: apiSubForm.count,
|
|
306
|
-
title: apiSubForm.title,
|
|
307
|
-
description: apiSubForm.description,
|
|
308
|
-
testElementName: apiSubForm.testElementName,
|
|
309
|
-
rows: apiSubForm.rows.map((element: any) => mapRowToModel(element,currency,defaultCurrency)),
|
|
310
|
-
submissions: apiSubForm?.submissions?.map((submission: any) => mapSubmissionToModel(submission)),
|
|
311
|
-
property: apiSubForm.property ? mapPropertyToModel(apiSubForm.property) : undefined,
|
|
312
|
-
defaultAnswers: apiSubForm.defaultAnswers ? mapDefaultAnswersToModel(apiSubForm.defaultAnswers) : undefined,
|
|
313
|
-
deleted: false,
|
|
314
|
-
scores:apiSubForm.scores,
|
|
315
|
-
maximumPossibleScore:apiSubForm.maximumPossibleScore,
|
|
316
|
-
submissionCopyConfig: mapSubmissionCopyConfig(apiSubForm.submissionCopyConfig),
|
|
317
|
-
required: apiSubForm.required
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
export function mapSubmissionCopyConfig(copyConfig:any): SubmissionCopyConfig | undefined {
|
|
322
|
-
if(!copyConfig) return undefined;
|
|
323
|
-
return {
|
|
324
|
-
allowCopyFromOtherSubmissions: copyConfig.allowCopyFromOtherSubmissions,
|
|
325
|
-
editableQuestions: copyConfig.editableQuestions,
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
export function mapDefaultAnswersToModel(apiDefaultAnswers: any): DefaultAnswersModel {
|
|
330
|
-
return {
|
|
331
|
-
answers: apiDefaultAnswers.answers.map((entry: any) => mapDefaultAnswerEntry(entry))
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export function mapDefaultAnswerEntry(apiEntry: any): DefaultAnswerEntry {
|
|
336
|
-
return {
|
|
337
|
-
isDeleteEnable: apiEntry.isDeleteEnable,
|
|
338
|
-
defaultQuestionsAnswers: apiEntry.defaultQuestionsAnswers.map((question: any) => mapDefaultQuestionAnswer(question))
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
export function mapDefaultQuestionAnswer(apiQuestion: any): DefaultQuestionAnswer {
|
|
343
|
-
return {
|
|
344
|
-
defaultAnswer: apiQuestion.defaultAnswer,
|
|
345
|
-
readOnly: apiQuestion.readOnly,
|
|
346
|
-
isDeleteEnable: apiQuestion.isDeleteEnable,
|
|
347
|
-
questionId: apiQuestion.questionId
|
|
348
|
-
};
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
function mapPropertyToModel(apiProperty: any): SubformProperty {
|
|
352
|
-
return {
|
|
353
|
-
subFormStructure: apiProperty.subFormStructure,
|
|
354
|
-
subFormType: apiProperty.subFormType,
|
|
355
|
-
allowDelete: apiProperty.allowDelete,
|
|
356
|
-
allowCopy: apiProperty.allowCopy,
|
|
357
|
-
addButtonLabel: apiProperty.addButtonLabel
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
export function mapQuestionGroupToModel(apiQuestionGroup: any,currency:any,defaultCurrency:any): QuestionGroup {
|
|
362
|
-
return {
|
|
363
|
-
id: apiQuestionGroup.id,
|
|
364
|
-
count: apiQuestionGroup.count,
|
|
365
|
-
title: apiQuestionGroup.title,
|
|
366
|
-
description: apiQuestionGroup.description,
|
|
367
|
-
testElementName: apiQuestionGroup.testElementName,
|
|
368
|
-
rows: apiQuestionGroup.rows.map((element: any) => mapRowToModel(element,currency,defaultCurrency)),
|
|
369
|
-
submissions: apiQuestionGroup?.submissions?.map((submission: any) => mapSubmissionToModel(submission)),
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
export function mapMultifieldsToModel(apiQuestionGroup: any,currency:any,defaultCurrency:any): Multifields {
|
|
374
|
-
return {
|
|
375
|
-
id: apiQuestionGroup.id,
|
|
376
|
-
question: apiQuestionGroup.question,
|
|
377
|
-
questionNumber: apiQuestionGroup.questionNumber,
|
|
378
|
-
count: apiQuestionGroup.count,
|
|
379
|
-
testElementName: apiQuestionGroup.testElementName,
|
|
380
|
-
rows: apiQuestionGroup.rows.map((element: any) => mapRowToModel(element,currency,defaultCurrency)),
|
|
381
|
-
submissions: apiQuestionGroup?.submissions?.map((submission: any) => mapSubmissionToModel(submission)),
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
function mapSubmissionToModel(apiSubmission: any): Submission {
|
|
386
|
-
return {
|
|
387
|
-
submissionId: apiSubmission?.submissionId,
|
|
388
|
-
answers: apiSubmission?.answers?.map((answer: any) => mapAnswerToModel(answer)),
|
|
389
|
-
configuration: mapSubformConfiguration(apiSubmission?.configuration),
|
|
390
|
-
scores:apiSubmission.scores,
|
|
391
|
-
sourceSubmissionId:apiSubmission.sourceSubmissionId,
|
|
392
|
-
isCopied:apiSubmission.isCopied
|
|
393
|
-
};
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
function mapAnswerToModel(apiAnswer: any): Answer {
|
|
397
|
-
return {
|
|
398
|
-
questionId: apiAnswer.questionId,
|
|
399
|
-
answer: apiAnswer?.answer,
|
|
400
|
-
answerId: apiAnswer?.answerId,
|
|
401
|
-
attachments: apiAnswer?.attachments?.map((attachment: any) => mapAttachmentToModel(attachment)),
|
|
402
|
-
scores:apiAnswer.scores,
|
|
403
|
-
maximumPossibleScore:apiAnswer.maximumPossibleScore,
|
|
404
|
-
show:apiAnswer?.show,
|
|
405
|
-
amountInWords: apiAnswer?.amountInWords,
|
|
406
|
-
answerCurrency:apiAnswer?.currencySymbol
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
function mapSubformConfiguration(config: any): SubformConfiguration | undefined {
|
|
411
|
-
if (!config) return undefined;
|
|
412
|
-
return {
|
|
413
|
-
allowDelete: !!config.allowDelete,
|
|
414
|
-
isDefault: !!config.isDefault,
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
export function mapFormElementTypeToModel(
|
|
419
|
-
apiFormElementType: any
|
|
420
|
-
): FormElementType<any> {
|
|
421
|
-
return {
|
|
422
|
-
entityType: apiFormElementType?.entityType,
|
|
423
|
-
element: apiFormElementType?.element,
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
function mapAppearanceToModel(apiAppearance: any, currency:any, defaultCurrency:any): Appearance {
|
|
428
|
-
return {
|
|
429
|
-
placeholder: apiAppearance?.placeholder,
|
|
430
|
-
fontSize: apiAppearance?.fontSize,
|
|
431
|
-
textAlign: apiAppearance?.textAlign,
|
|
432
|
-
font: apiAppearance?.font,
|
|
433
|
-
underline: apiAppearance?.underline,
|
|
434
|
-
bold: apiAppearance?.bold,
|
|
435
|
-
italics: apiAppearance?.italics,
|
|
436
|
-
defaultValue: apiAppearance?.defaultValue,
|
|
437
|
-
numberOfRows: apiAppearance?.numberOfRows,
|
|
438
|
-
singleSelection: apiAppearance?.singleSelection,
|
|
439
|
-
displayCountryCode: apiAppearance?.displayCountryCode,
|
|
440
|
-
displayFlag: apiAppearance?.displayFlag,
|
|
441
|
-
displayCode: apiAppearance?.displayCode,
|
|
442
|
-
showCountryName: apiAppearance?.showCountryName,
|
|
443
|
-
beautifyNumbers: apiAppearance?.beautifyNumbers,
|
|
444
|
-
upAndDownButton: apiAppearance?.upAndDownButton,
|
|
445
|
-
allowNegativeValues: apiAppearance?.allowNegativeValues,
|
|
446
|
-
showPreviewButton: apiAppearance?.showPreviewButton,
|
|
447
|
-
confirmPassword: apiAppearance?.confirmPassword,
|
|
448
|
-
viewButton: apiAppearance?.viewButton,
|
|
449
|
-
displayStrong: apiAppearance?.displayStrong,
|
|
450
|
-
dateType: apiAppearance?.dateType,
|
|
451
|
-
format: apiAppearance?.format,
|
|
452
|
-
setCurrentPosition: apiAppearance?.setCurrentPosition,
|
|
453
|
-
defaultZoomLevel: apiAppearance?.defaultZoomLevel,
|
|
454
|
-
allowFullScreen: apiAppearance?.allowFullScreen,
|
|
455
|
-
latitude: apiAppearance?.latitude,
|
|
456
|
-
longitude: apiAppearance?.longitude,
|
|
457
|
-
showAcceptButton: apiAppearance?.showAcceptButton,
|
|
458
|
-
labelOnValue: apiAppearance?.labelOnValue,
|
|
459
|
-
labelOffValue: apiAppearance?.labelOffValue,
|
|
460
|
-
labelOnColor: apiAppearance?.labelOnColor,
|
|
461
|
-
labelOffColor: apiAppearance?.labelOffColor,
|
|
462
|
-
minValue: apiAppearance?.minValue,
|
|
463
|
-
maxValue: apiAppearance?.maxValue,
|
|
464
|
-
stepValue: apiAppearance?.stepValue,
|
|
465
|
-
changeSliderColor: apiAppearance?.changeSliderColor,
|
|
466
|
-
sliderColor: apiAppearance?.sliderColor,
|
|
467
|
-
canvasOption: apiAppearance?.canvasOption,
|
|
468
|
-
selectionType: apiAppearance?.selectionType,
|
|
469
|
-
dragAndDrop: apiAppearance?.dragAndDrop,
|
|
470
|
-
previewUploadedFiles: apiAppearance?.previewUploadedFiles,
|
|
471
|
-
multiFileUploads: apiAppearance?.multiFileUploads,
|
|
472
|
-
selectionColorRequired: apiAppearance?.selectionColorRequired,
|
|
473
|
-
selectionColor: apiAppearance?.selectionColor,
|
|
474
|
-
color: apiAppearance?.color,
|
|
475
|
-
avatarPicker:apiAppearance?.avatarPicker,
|
|
476
|
-
timeFormat:apiAppearance?.timeFormat,
|
|
477
|
-
displayOptionsInColumn:apiAppearance?.displayOptionsInColumn,
|
|
478
|
-
currencySymbol:apiAppearance?.currencySymbol,
|
|
479
|
-
decimalPrecision:apiAppearance?.decimalPrecision,
|
|
480
|
-
symbolPosition:apiAppearance?.symbolPosition,
|
|
481
|
-
thousandSeparator:apiAppearance?.thousandSeparator,
|
|
482
|
-
currency:currency,
|
|
483
|
-
limitCurrencies:apiAppearance?.limitCurrencies,
|
|
484
|
-
currencyOption:apiAppearance?.currencyOption,
|
|
485
|
-
specificCurrencySymbol:apiAppearance?.specificCurrencySymbol,
|
|
486
|
-
limitCurrencySymbol:apiAppearance?.limitCurrencySymbol,
|
|
487
|
-
width: apiAppearance?.width,
|
|
488
|
-
height: apiAppearance?.height,
|
|
489
|
-
showAmountInWords: apiAppearance?.showAmountInWords,
|
|
490
|
-
defaultCurrency:defaultCurrency
|
|
491
|
-
};
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
function mapValidationToModel(apiValidation: any): Validation {
|
|
495
|
-
return {
|
|
496
|
-
regexValidation: apiValidation?.regexValidation,
|
|
497
|
-
regex: apiValidation?.regex,
|
|
498
|
-
validationMessage: apiValidation?.validationMessage,
|
|
499
|
-
limitedCharacters: apiValidation?.limitedCharacters,
|
|
500
|
-
count: apiValidation?.count,
|
|
501
|
-
minimumSelection: apiValidation?.minimumSelection,
|
|
502
|
-
maximumSelection: apiValidation?.maximumSelection,
|
|
503
|
-
countryWiseValidation: apiValidation?.countryWiseValidation,
|
|
504
|
-
restrictCountry: apiValidation?.restrictCountry,
|
|
505
|
-
allowedCountries: apiValidation?.allowedCountries,
|
|
506
|
-
blockedCountries: apiValidation?.blockedCountries,
|
|
507
|
-
regularExpression: apiValidation?.regularExpression,
|
|
508
|
-
expectedDomains: apiValidation?.expectedDomains,
|
|
509
|
-
min: apiValidation?.min,
|
|
510
|
-
max: apiValidation?.max,
|
|
511
|
-
minLength: apiValidation?.minLength,
|
|
512
|
-
maxLength: apiValidation?.maxLength,
|
|
513
|
-
requireLowercaseLetters: apiValidation?.requireLowercaseLetters,
|
|
514
|
-
requireUppercaseLetters: apiValidation?.requireUppercaseLetters,
|
|
515
|
-
requireNumbers: apiValidation?.requireNumbers,
|
|
516
|
-
requireSpecialCharacters: apiValidation?.requireSpecialCharacters,
|
|
517
|
-
allowedSpecialCharacters: apiValidation?.allowedSpecialCharacters,
|
|
518
|
-
minDateOption: apiValidation?.minDateOption,
|
|
519
|
-
minDate: apiValidation?.minDate,
|
|
520
|
-
maxDateOption: apiValidation?.maxDateOption,
|
|
521
|
-
maxDate: apiValidation?.maxDate,
|
|
522
|
-
regionBoundary: apiValidation?.regionBoundary,
|
|
523
|
-
region: apiValidation?.region,
|
|
524
|
-
preventFromProceedingWithoutAgree:
|
|
525
|
-
apiValidation?.preventFromProceedingWithoutAgree,
|
|
526
|
-
buttonColour: apiValidation?.buttonColour,
|
|
527
|
-
maxFileSize: apiValidation?.maxFileSize,
|
|
528
|
-
minFileSize: apiValidation?.minFileSize,
|
|
529
|
-
minSelection: apiValidation?.minSelection,
|
|
530
|
-
maxSelection: apiValidation?.maxSelection,
|
|
531
|
-
fileTypes: apiValidation?.fileTypes,
|
|
532
|
-
fileSize: apiValidation?.fileSize,
|
|
533
|
-
fileSizeUnit: apiValidation?.fileSizeUnit,
|
|
534
|
-
totalFileSize: apiValidation?.totalFileSize,
|
|
535
|
-
minSelectionRequired: apiValidation?.minSelectionRequired,
|
|
536
|
-
minSelectionValue: apiValidation?.minSelectionValue,
|
|
537
|
-
validationType: apiValidation?.validationType,
|
|
538
|
-
validation: apiValidation?.validation,
|
|
539
|
-
minTime: apiValidation?.minTime,
|
|
540
|
-
maxTime:apiValidation?.maxTime,
|
|
541
|
-
minTimeOption:apiValidation?.minTimeOption,
|
|
542
|
-
maxTimeOption: apiValidation?.maxTimeOption,
|
|
543
|
-
};
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
function mapElementOptionDBToModel(apiElementOptionDB: any): ElementOptionDB {
|
|
547
|
-
return {
|
|
548
|
-
tableName: apiElementOptionDB.tableName,
|
|
549
|
-
valueField: apiElementOptionDB.valueField,
|
|
550
|
-
labelField: apiElementOptionDB.labelField,
|
|
551
|
-
labelPattern: apiElementOptionDB.labelPattern,
|
|
552
|
-
criteria: apiElementOptionDB?.criteria.map((apiCriteria: any) =>
|
|
553
|
-
mapElementOptionDBCriteriaToModel(apiCriteria)
|
|
554
|
-
),
|
|
555
|
-
};
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
function mapElementOptionDBCriteriaToModel(
|
|
559
|
-
apiElementOptionDBCriteria: any
|
|
560
|
-
): ElementOptionDBCriteria {
|
|
561
|
-
return {
|
|
562
|
-
field: apiElementOptionDBCriteria?.field,
|
|
563
|
-
condition: apiElementOptionDBCriteria?.condition,
|
|
564
|
-
valueSource: apiElementOptionDBCriteria?.valueSource,
|
|
565
|
-
inputValue: apiElementOptionDBCriteria?.inputValue,
|
|
566
|
-
logicalOperator: apiElementOptionDBCriteria?.logicalOperator,
|
|
567
|
-
};
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
function mapElementOptionAPIToModel(
|
|
571
|
-
apiElementOptionAPI: any
|
|
572
|
-
): ElementOptionAPI {
|
|
573
|
-
return {
|
|
574
|
-
external: apiElementOptionAPI?.external,
|
|
575
|
-
url: apiElementOptionAPI?.url,
|
|
576
|
-
valueField: apiElementOptionAPI?.valueField,
|
|
577
|
-
labelField: apiElementOptionAPI?.labelField,
|
|
578
|
-
pathToValue: apiElementOptionAPI?.pathToValue,
|
|
579
|
-
headers: apiElementOptionAPI?.headers?.map(mapElementOptionAPIDataToModel),
|
|
580
|
-
params: apiElementOptionAPI?.params?.map(mapElementOptionAPIDataToModel),
|
|
581
|
-
pathVariables: apiElementOptionAPI?.pathVariables?.map(
|
|
582
|
-
mapElementOptionAPIDataToModel
|
|
583
|
-
),
|
|
584
|
-
labelPattern:apiElementOptionAPI?.labelPattern
|
|
585
|
-
};
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
function mapElementOptionAPIDataToModel(
|
|
589
|
-
apiElementOptionAPIData: any
|
|
590
|
-
): elementOptionAPIData {
|
|
591
|
-
return {
|
|
592
|
-
keyName: apiElementOptionAPIData?.keyName,
|
|
593
|
-
valueSource: apiElementOptionAPIData?.valueSource,
|
|
594
|
-
inputValue: apiElementOptionAPIData?.inputValue,
|
|
595
|
-
};
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
function mapOptionToModel(apiOption: any): Option {
|
|
599
|
-
return {
|
|
600
|
-
optionType: apiOption?.optionType,
|
|
601
|
-
lookupTable: apiOption?.lookupTable,
|
|
602
|
-
customOptions: apiOption?.customOptions?.map((option: { value: any }) => ({
|
|
603
|
-
value: option.value,
|
|
604
|
-
})),
|
|
605
|
-
database: apiOption?.database
|
|
606
|
-
? mapElementOptionDBToModel(apiOption?.database)
|
|
607
|
-
: undefined,
|
|
608
|
-
api: apiOption?.api ? mapElementOptionAPIToModel(apiOption.api) : undefined,
|
|
609
|
-
};
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
function mapScoringToModel(apiScoring: any): Scoring | undefined {
|
|
613
|
-
if (!apiScoring) return undefined;
|
|
614
|
-
|
|
615
|
-
return {
|
|
616
|
-
enableScoring: apiScoring.enableScoring,
|
|
617
|
-
defaultScore: apiScoring.defaultScore,
|
|
618
|
-
enableScoringType: apiScoring.enableScoringType,
|
|
619
|
-
score: apiScoring.score?.map((s: any) => ({
|
|
620
|
-
label: s.label || [],
|
|
621
|
-
score: s.score,
|
|
622
|
-
scoreType: s.scoreType
|
|
623
|
-
}))
|
|
624
|
-
};
|
|
625
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { RecaptchaService } from './recaptcha.service';
|
|
4
|
-
|
|
5
|
-
describe('RecaptchaService', () => {
|
|
6
|
-
let service: RecaptchaService;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
TestBed.configureTestingModule({});
|
|
10
|
-
service = TestBed.inject(RecaptchaService);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should be created', () => {
|
|
14
|
-
expect(service).toBeTruthy();
|
|
15
|
-
});
|
|
16
|
-
});
|