@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.
Files changed (442) hide show
  1. package/environment/environment.d.ts +5 -0
  2. package/esm2022/environment/environment.mjs +6 -0
  3. package/esm2022/form-fields/aggregate-function/aggregate-function.component.mjs +146 -0
  4. package/esm2022/form-fields/check-box-fields/check-box-fields.component.mjs +473 -0
  5. package/esm2022/form-fields/currency-fields/currency-fields.component.mjs +502 -0
  6. package/esm2022/form-fields/date-time-fields/date-time-fields.component.mjs +608 -0
  7. package/esm2022/form-fields/drop-down-fields/drop-down-fields.component.mjs +585 -0
  8. package/esm2022/form-fields/file-picker-fields/file-picker-fields.component.mjs +224 -0
  9. package/esm2022/form-fields/form-fields.module.mjs +174 -0
  10. package/esm2022/form-fields/hidden-field/hidden-field.component.mjs +137 -0
  11. package/esm2022/form-fields/iframe-fields/iframe-fields.component.mjs +198 -0
  12. package/esm2022/form-fields/location-fields/location-fields.component.mjs +85 -0
  13. package/esm2022/form-fields/mail-fields/mail-fields.component.mjs +131 -0
  14. package/esm2022/form-fields/mobile-fields/mobile-fields.component.mjs +270 -0
  15. package/esm2022/form-fields/number-fields/number-fields.component.mjs +242 -0
  16. package/esm2022/form-fields/password-fields/password-fields.component.mjs +257 -0
  17. package/esm2022/form-fields/radio-button-fields/radio-button-fields.component.mjs +346 -0
  18. package/esm2022/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.mjs +148 -0
  19. package/esm2022/form-fields/section-fields/section-fields.component.mjs +29 -0
  20. package/esm2022/form-fields/selection-matrix-fields/selection-matrix-fields.component.mjs +158 -0
  21. package/esm2022/form-fields/signature-fields/signature-fields.component.mjs +32 -0
  22. package/esm2022/form-fields/slider-fields/slider-fields.component.mjs +73 -0
  23. package/esm2022/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.mjs +66 -0
  24. package/esm2022/form-fields/text-area-fields/text-area-fields.component.mjs +159 -0
  25. package/esm2022/form-fields/text-fields/text-fields.component.mjs +245 -0
  26. package/esm2022/form-fields/toggle-switch-fields/toggle-switch-fields.component.mjs +85 -0
  27. package/esm2022/form-fields/url-fields/url-fields.component.mjs +124 -0
  28. package/esm2022/form-submission/form-submission.module.mjs +64 -0
  29. package/esm2022/form-submission/header/header.component.mjs +20 -0
  30. package/esm2022/form-submission/navigation-tabs/navigation-tabs.component.mjs +171 -0
  31. package/esm2022/form-submission/next-prev-navigation/next-prev-navigation.component.mjs +124 -0
  32. package/esm2022/form-submission/save-as-draft/saveDraftModalComponent .mjs +50 -0
  33. package/esm2022/form-submission/submission-container/submission-container.component.mjs +17 -0
  34. package/esm2022/form-submission/submit-form/submit-form.component.mjs +1610 -0
  35. package/esm2022/lib/form-submission.component.mjs +113 -0
  36. package/esm2022/lib/form-submission.module.mjs +56 -0
  37. package/esm2022/lib/form-submission.service.mjs +14 -0
  38. package/esm2022/models/aggregate.model.mjs +2 -0
  39. package/esm2022/models/answer.model.mjs +2 -0
  40. package/esm2022/models/appearance.model.mjs +2 -0
  41. package/esm2022/models/attachment.model.mjs +2 -0
  42. package/esm2022/models/defaultAnswerEntry.model.mjs +2 -0
  43. package/esm2022/models/defaultAnswersModel.model.mjs +2 -0
  44. package/esm2022/models/defaultQuestionAnswer.model.mjs +2 -0
  45. package/esm2022/models/elementOptionAPI.model.mjs +2 -0
  46. package/esm2022/models/elementOptionAPIData.model.mjs +2 -0
  47. package/esm2022/models/elementOptionDB.model.mjs +2 -0
  48. package/esm2022/models/elementOptionDBCriteria.model.mjs +2 -0
  49. package/esm2022/models/emitters.model.mjs +2 -0
  50. package/esm2022/models/enum/condition.enum.mjs +18 -0
  51. package/esm2022/models/enum/elementType .enum.mjs +24 -0
  52. package/esm2022/models/enum/entityType.enum.mjs +12 -0
  53. package/esm2022/models/formConfiguration.model.mjs +2 -0
  54. package/esm2022/models/formElement.model.mjs +2 -0
  55. package/esm2022/models/formElementType.model.mjs +2 -0
  56. package/esm2022/models/grid.model.mjs +2 -0
  57. package/esm2022/models/hiddenField.model.mjs +2 -0
  58. package/esm2022/models/iFrameProperties.model.mjs +2 -0
  59. package/esm2022/models/logic.model.mjs +2 -0
  60. package/esm2022/models/multifields.model.mjs +2 -0
  61. package/esm2022/models/option.model.mjs +2 -0
  62. package/esm2022/models/page.model.mjs +2 -0
  63. package/esm2022/models/publicForm.model.mjs +2 -0
  64. package/esm2022/models/question.model.mjs +2 -0
  65. package/esm2022/models/questionAnswer.model.mjs +2 -0
  66. package/esm2022/models/questionGroup.model.mjs +2 -0
  67. package/esm2022/models/row.model.mjs +2 -0
  68. package/esm2022/models/scoring.model.mjs +2 -0
  69. package/esm2022/models/section.model.mjs +2 -0
  70. package/esm2022/models/subForm.model.mjs +2 -0
  71. package/esm2022/models/subformConfiguration.model.mjs +2 -0
  72. package/esm2022/models/subformPropery.model.mjs +2 -0
  73. package/esm2022/models/submission.model.mjs +2 -0
  74. package/esm2022/models/submissionCopyConfig.mopdel.mjs +2 -0
  75. package/esm2022/models/terms&condition.model.mjs +2 -0
  76. package/esm2022/models/validation.model.mjs +2 -0
  77. package/esm2022/models/whenClause.model.mjs +2 -0
  78. package/esm2022/models/whenClauseCondition.model.mjs +2 -0
  79. package/esm2022/models/whenClauseElements.model.mjs +2 -0
  80. package/esm2022/piserve-tech-form-submission.mjs +5 -0
  81. package/esm2022/public-api.mjs +7 -0
  82. package/esm2022/question/card-subform/card-subform.component.mjs +354 -0
  83. package/esm2022/question/confirm-dialog/confirm-dialog.component.mjs +27 -0
  84. package/esm2022/question/form-elements/form-elements.component.mjs +62 -0
  85. package/esm2022/question/inline-multiple-subform/inline-multiple-subform.component.mjs +384 -0
  86. package/esm2022/question/multifields/multifields.component.mjs +54 -0
  87. package/esm2022/question/multiple-subform/multiple-subform.component.mjs +413 -0
  88. package/esm2022/question/question/question.component.mjs +145 -0
  89. package/esm2022/question/question-group/question-group.component.mjs +102 -0
  90. package/esm2022/question/recursive-logic/recursive-logic.component.mjs +49 -0
  91. package/esm2022/question/sub-form/sub-form.component.mjs +355 -0
  92. package/esm2022/services/aggregate.service.mjs +139 -0
  93. package/esm2022/services/countryService.mjs +89 -0
  94. package/esm2022/services/data.service.mjs +36 -0
  95. package/esm2022/services/element-tracker.service.mjs +27 -0
  96. package/esm2022/services/form-validation.service.mjs +128 -0
  97. package/esm2022/services/form.service.mjs +332 -0
  98. package/esm2022/services/mapper.service.mjs +519 -0
  99. package/esm2022/services/recaptcha.service.mjs +136 -0
  100. package/esm2022/services/score.service.mjs +268 -0
  101. package/esm2022/services/subform-copy.service.mjs +122 -0
  102. package/esm2022/services/validation.service.mjs +35 -0
  103. package/esm2022/services/whenClause.service.mjs +423 -0
  104. package/esm2022/shared/shared.module.mjs +97 -0
  105. package/esm2022/sub-form/submission-modal/submission-modal.component.mjs +133 -0
  106. package/fesm2022/piserve-tech-form-submission.mjs +11661 -0
  107. package/fesm2022/piserve-tech-form-submission.mjs.map +1 -0
  108. package/form-fields/aggregate-function/aggregate-function.component.d.ts +43 -0
  109. package/form-fields/check-box-fields/check-box-fields.component.d.ts +73 -0
  110. package/form-fields/currency-fields/currency-fields.component.d.ts +62 -0
  111. package/form-fields/date-time-fields/date-time-fields.component.d.ts +96 -0
  112. package/form-fields/drop-down-fields/drop-down-fields.component.d.ts +88 -0
  113. package/form-fields/file-picker-fields/file-picker-fields.component.d.ts +72 -0
  114. package/form-fields/form-fields.module.d.ts +40 -0
  115. package/form-fields/hidden-field/hidden-field.component.d.ts +38 -0
  116. package/form-fields/iframe-fields/iframe-fields.component.d.ts +35 -0
  117. package/form-fields/location-fields/location-fields.component.d.ts +29 -0
  118. package/form-fields/mail-fields/mail-fields.component.d.ts +41 -0
  119. package/form-fields/mobile-fields/mobile-fields.component.d.ts +71 -0
  120. package/form-fields/number-fields/number-fields.component.d.ts +53 -0
  121. package/form-fields/password-fields/password-fields.component.d.ts +57 -0
  122. package/form-fields/radio-button-fields/radio-button-fields.component.d.ts +70 -0
  123. package/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.d.ts +46 -0
  124. package/form-fields/section-fields/section-fields.component.d.ts +10 -0
  125. package/form-fields/selection-matrix-fields/selection-matrix-fields.component.d.ts +45 -0
  126. package/form-fields/signature-fields/signature-fields.component.d.ts +13 -0
  127. package/form-fields/slider-fields/slider-fields.component.d.ts +32 -0
  128. package/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.d.ts +26 -0
  129. package/form-fields/text-area-fields/text-area-fields.component.d.ts +49 -0
  130. package/form-fields/text-fields/text-fields.component.d.ts +49 -0
  131. package/form-fields/toggle-switch-fields/toggle-switch-fields.component.d.ts +29 -0
  132. package/form-fields/url-fields/url-fields.component.d.ts +41 -0
  133. package/form-submission/form-submission.module.d.ts +20 -0
  134. package/form-submission/header/header.component.d.ts +7 -0
  135. package/form-submission/navigation-tabs/navigation-tabs.component.d.ts +57 -0
  136. package/form-submission/next-prev-navigation/next-prev-navigation.component.d.ts +46 -0
  137. package/form-submission/save-as-draft/saveDraftModalComponent .d.ts +17 -0
  138. package/form-submission/submission-container/submission-container.component.d.ts +7 -0
  139. package/form-submission/submit-form/submit-form.component.d.ts +237 -0
  140. package/index.d.ts +5 -0
  141. package/lib/form-submission.component.d.ts +30 -0
  142. package/lib/form-submission.module.d.ts +16 -0
  143. package/lib/form-submission.service.d.ts +6 -0
  144. package/models/aggregate.model.d.ts +4 -0
  145. package/{src/models/answer.model.ts → models/answer.model.d.ts} +23 -25
  146. package/models/appearance.model.d.ts +64 -0
  147. package/{src/models/attachment.model.ts → models/attachment.model.d.ts} +6 -6
  148. package/{src/models/defaultAnswerEntry.model.ts → models/defaultAnswerEntry.model.d.ts} +5 -7
  149. package/{src/models/defaultAnswersModel.model.ts → models/defaultAnswersModel.model.d.ts} +4 -5
  150. package/{src/models/defaultQuestionAnswer.model.ts → models/defaultQuestionAnswer.model.d.ts} +6 -6
  151. package/models/elementOptionAPI.model.d.ts +12 -0
  152. package/models/elementOptionAPIData.model.d.ts +5 -0
  153. package/models/elementOptionDB.model.d.ts +8 -0
  154. package/models/elementOptionDBCriteria.model.d.ts +7 -0
  155. package/{src/models/emitters.model.ts → models/emitters.model.d.ts} +8 -8
  156. package/{src/models/enum/condition.enum.ts → models/enum/condition.enum.d.ts} +2 -2
  157. package/models/enum/elementType .enum.d.ts +22 -0
  158. package/models/enum/entityType.enum.d.ts +10 -0
  159. package/{src/models/formConfiguration.model.ts → models/formConfiguration.model.d.ts} +2 -2
  160. package/{src/models/formElement.model.ts → models/formElement.model.d.ts} +22 -22
  161. package/{src/models/formElementType.model.ts → models/formElementType.model.d.ts} +2 -3
  162. package/{src/models/grid.model.ts → models/grid.model.d.ts} +13 -14
  163. package/{src/models/hiddenField.model.ts → models/hiddenField.model.d.ts} +5 -5
  164. package/{src/models/iFrameProperties.model.ts → models/iFrameProperties.model.d.ts} +13 -13
  165. package/models/logic.model.d.ts +9 -0
  166. package/models/multifields.model.d.ts +11 -0
  167. package/{src/models/option.model.ts → models/option.model.d.ts} +5 -5
  168. package/models/page.model.d.ts +6 -0
  169. package/models/publicForm.model.d.ts +18 -0
  170. package/models/question.model.d.ts +26 -0
  171. package/models/questionAnswer.model.d.ts +7 -0
  172. package/models/questionGroup.model.d.ts +11 -0
  173. package/{src/models/row.model.ts → models/row.model.d.ts} +1 -2
  174. package/models/scoring.model.d.ts +10 -0
  175. package/models/section.model.d.ts +6 -0
  176. package/models/subForm.model.d.ts +24 -0
  177. package/models/subformConfiguration.model.d.ts +4 -0
  178. package/models/subformPropery.model.d.ts +7 -0
  179. package/{src/models/submission.model.ts → models/submission.model.d.ts} +14 -16
  180. package/{src/models/submissionCopyConfig.mopdel.ts → models/submissionCopyConfig.mopdel.d.ts} +4 -4
  181. package/{src/models/terms&condition.model.ts → models/terms&condition.model.d.ts} +1 -1
  182. package/models/validation.model.d.ts +48 -0
  183. package/models/whenClause.model.d.ts +6 -0
  184. package/{src/models/whenClauseCondition.model.ts → models/whenClauseCondition.model.d.ts} +6 -6
  185. package/{src/models/whenClauseElements.model.ts → models/whenClauseElements.model.d.ts} +5 -6
  186. package/package.json +46 -33
  187. package/{src/public-api.ts → public-api.d.ts} +0 -4
  188. package/question/card-subform/card-subform.component.d.ts +44 -0
  189. package/question/confirm-dialog/confirm-dialog.component.d.ts +12 -0
  190. package/question/form-elements/form-elements.component.d.ts +20 -0
  191. package/question/inline-multiple-subform/inline-multiple-subform.component.d.ts +47 -0
  192. package/question/multifields/multifields.component.d.ts +11 -0
  193. package/question/multiple-subform/multiple-subform.component.d.ts +39 -0
  194. package/question/question/question.component.d.ts +30 -0
  195. package/question/question-group/question-group.component.d.ts +29 -0
  196. package/question/recursive-logic/recursive-logic.component.d.ts +19 -0
  197. package/question/sub-form/sub-form.component.d.ts +70 -0
  198. package/services/aggregate.service.d.ts +29 -0
  199. package/services/countryService.d.ts +21 -0
  200. package/services/data.service.d.ts +19 -0
  201. package/services/element-tracker.service.d.ts +10 -0
  202. package/services/form-validation.service.d.ts +16 -0
  203. package/services/form.service.d.ts +27 -0
  204. package/services/mapper.service.d.ts +31 -0
  205. package/services/recaptcha.service.d.ts +46 -0
  206. package/services/score.service.d.ts +27 -0
  207. package/services/subform-copy.service.d.ts +10 -0
  208. package/services/validation.service.d.ts +14 -0
  209. package/services/whenClause.service.d.ts +45 -0
  210. package/shared/shared.module.d.ts +25 -0
  211. package/sub-form/submission-modal/submission-modal.component.d.ts +31 -0
  212. package/ng-package.json +0 -30
  213. package/src/environment/environment.ts +0 -6
  214. package/src/form-fields/aggregate-function/aggregate-function.component.html +0 -63
  215. package/src/form-fields/aggregate-function/aggregate-function.component.scss +0 -1
  216. package/src/form-fields/aggregate-function/aggregate-function.component.spec.ts +0 -21
  217. package/src/form-fields/aggregate-function/aggregate-function.component.ts +0 -148
  218. package/src/form-fields/check-box-fields/check-box-fields.component.html +0 -81
  219. package/src/form-fields/check-box-fields/check-box-fields.component.scss +0 -28
  220. package/src/form-fields/check-box-fields/check-box-fields.component.spec.ts +0 -21
  221. package/src/form-fields/check-box-fields/check-box-fields.component.ts +0 -538
  222. package/src/form-fields/currency-fields/currency-fields.component.html +0 -85
  223. package/src/form-fields/currency-fields/currency-fields.component.scss +0 -48
  224. package/src/form-fields/currency-fields/currency-fields.component.spec.ts +0 -21
  225. package/src/form-fields/currency-fields/currency-fields.component.ts +0 -589
  226. package/src/form-fields/date-time-fields/date-time-fields.component.html +0 -268
  227. package/src/form-fields/date-time-fields/date-time-fields.component.scss +0 -88
  228. package/src/form-fields/date-time-fields/date-time-fields.component.spec.ts +0 -21
  229. package/src/form-fields/date-time-fields/date-time-fields.component.ts +0 -693
  230. package/src/form-fields/drop-down-fields/drop-down-fields.component.html +0 -77
  231. package/src/form-fields/drop-down-fields/drop-down-fields.component.scss +0 -12
  232. package/src/form-fields/drop-down-fields/drop-down-fields.component.spec.ts +0 -21
  233. package/src/form-fields/drop-down-fields/drop-down-fields.component.ts +0 -698
  234. package/src/form-fields/file-picker-fields/file-picker-fields.component.html +0 -72
  235. package/src/form-fields/file-picker-fields/file-picker-fields.component.scss +0 -33
  236. package/src/form-fields/file-picker-fields/file-picker-fields.component.spec.ts +0 -21
  237. package/src/form-fields/file-picker-fields/file-picker-fields.component.ts +0 -256
  238. package/src/form-fields/form-fields.module.ts +0 -110
  239. package/src/form-fields/hidden-field/hidden-field.component.scss +0 -0
  240. package/src/form-fields/hidden-field/hidden-field.component.spec.ts +0 -21
  241. package/src/form-fields/hidden-field/hidden-field.component.ts +0 -156
  242. package/src/form-fields/iframe-fields/iframe-fields.component.html +0 -31
  243. package/src/form-fields/iframe-fields/iframe-fields.component.scss +0 -0
  244. package/src/form-fields/iframe-fields/iframe-fields.component.spec.ts +0 -21
  245. package/src/form-fields/iframe-fields/iframe-fields.component.ts +0 -225
  246. package/src/form-fields/location-fields/location-fields.component.html +0 -54
  247. package/src/form-fields/location-fields/location-fields.component.scss +0 -22
  248. package/src/form-fields/location-fields/location-fields.component.spec.ts +0 -21
  249. package/src/form-fields/location-fields/location-fields.component.ts +0 -83
  250. package/src/form-fields/mail-fields/mail-fields.component.html +0 -66
  251. package/src/form-fields/mail-fields/mail-fields.component.scss +0 -10
  252. package/src/form-fields/mail-fields/mail-fields.component.spec.ts +0 -21
  253. package/src/form-fields/mail-fields/mail-fields.component.ts +0 -127
  254. package/src/form-fields/mobile-fields/mobile-fields.component.html +0 -97
  255. package/src/form-fields/mobile-fields/mobile-fields.component.scss +0 -52
  256. package/src/form-fields/mobile-fields/mobile-fields.component.spec.ts +0 -21
  257. package/src/form-fields/mobile-fields/mobile-fields.component.ts +0 -310
  258. package/src/form-fields/number-fields/number-fields.component.html +0 -70
  259. package/src/form-fields/number-fields/number-fields.component.scss +0 -17
  260. package/src/form-fields/number-fields/number-fields.component.spec.ts +0 -21
  261. package/src/form-fields/number-fields/number-fields.component.ts +0 -256
  262. package/src/form-fields/password-fields/password-fields.component.html +0 -113
  263. package/src/form-fields/password-fields/password-fields.component.scss +0 -61
  264. package/src/form-fields/password-fields/password-fields.component.spec.ts +0 -21
  265. package/src/form-fields/password-fields/password-fields.component.ts +0 -273
  266. package/src/form-fields/radio-button-fields/radio-button-fields.component.html +0 -82
  267. package/src/form-fields/radio-button-fields/radio-button-fields.component.scss +0 -28
  268. package/src/form-fields/radio-button-fields/radio-button-fields.component.spec.ts +0 -21
  269. package/src/form-fields/radio-button-fields/radio-button-fields.component.ts +0 -391
  270. package/src/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.html +0 -67
  271. package/src/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.scss +0 -23
  272. package/src/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.spec.ts +0 -21
  273. package/src/form-fields/rich-text-editor-fields/rich-text-editor-fields.component.ts +0 -145
  274. package/src/form-fields/section-fields/section-fields.component.html +0 -4
  275. package/src/form-fields/section-fields/section-fields.component.scss +0 -37
  276. package/src/form-fields/section-fields/section-fields.component.spec.ts +0 -21
  277. package/src/form-fields/section-fields/section-fields.component.ts +0 -25
  278. package/src/form-fields/selection-matrix-fields/selection-matrix-fields.component.html +0 -93
  279. package/src/form-fields/selection-matrix-fields/selection-matrix-fields.component.scss +0 -52
  280. package/src/form-fields/selection-matrix-fields/selection-matrix-fields.component.spec.ts +0 -21
  281. package/src/form-fields/selection-matrix-fields/selection-matrix-fields.component.ts +0 -155
  282. package/src/form-fields/signature-fields/signature-fields.component.html +0 -43
  283. package/src/form-fields/signature-fields/signature-fields.component.scss +0 -10
  284. package/src/form-fields/signature-fields/signature-fields.component.spec.ts +0 -21
  285. package/src/form-fields/signature-fields/signature-fields.component.ts +0 -25
  286. package/src/form-fields/slider-fields/slider-fields.component.html +0 -67
  287. package/src/form-fields/slider-fields/slider-fields.component.scss +0 -55
  288. package/src/form-fields/slider-fields/slider-fields.component.spec.ts +0 -21
  289. package/src/form-fields/slider-fields/slider-fields.component.ts +0 -63
  290. package/src/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.html +0 -52
  291. package/src/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.scss +0 -85
  292. package/src/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.spec.ts +0 -21
  293. package/src/form-fields/terms-and-condition-fields/terms-and-condition-fields.component.ts +0 -62
  294. package/src/form-fields/text-area-fields/text-area-fields.component.html +0 -68
  295. package/src/form-fields/text-area-fields/text-area-fields.component.scss +0 -19
  296. package/src/form-fields/text-area-fields/text-area-fields.component.spec.ts +0 -21
  297. package/src/form-fields/text-area-fields/text-area-fields.component.ts +0 -166
  298. package/src/form-fields/text-fields/text-fields.component.html +0 -67
  299. package/src/form-fields/text-fields/text-fields.component.scss +0 -26
  300. package/src/form-fields/text-fields/text-fields.component.spec.ts +0 -21
  301. package/src/form-fields/text-fields/text-fields.component.ts +0 -248
  302. package/src/form-fields/toggle-switch-fields/toggle-switch-fields.component.html +0 -70
  303. package/src/form-fields/toggle-switch-fields/toggle-switch-fields.component.scss +0 -112
  304. package/src/form-fields/toggle-switch-fields/toggle-switch-fields.component.spec.ts +0 -21
  305. package/src/form-fields/toggle-switch-fields/toggle-switch-fields.component.ts +0 -74
  306. package/src/form-fields/url-fields/url-fields.component.html +0 -109
  307. package/src/form-fields/url-fields/url-fields.component.scss +0 -22
  308. package/src/form-fields/url-fields/url-fields.component.spec.ts +0 -21
  309. package/src/form-fields/url-fields/url-fields.component.ts +0 -123
  310. package/src/form-submission/form-submission.module.ts +0 -40
  311. package/src/form-submission/header/header.component.html +0 -6
  312. package/src/form-submission/header/header.component.scss +0 -26
  313. package/src/form-submission/header/header.component.spec.ts +0 -21
  314. package/src/form-submission/header/header.component.ts +0 -12
  315. package/src/form-submission/navigation-tabs/navigation-tabs.component.html +0 -134
  316. package/src/form-submission/navigation-tabs/navigation-tabs.component.scss +0 -200
  317. package/src/form-submission/navigation-tabs/navigation-tabs.component.spec.ts +0 -21
  318. package/src/form-submission/navigation-tabs/navigation-tabs.component.ts +0 -134
  319. package/src/form-submission/next-prev-navigation/next-prev-navigation.component.html +0 -207
  320. package/src/form-submission/next-prev-navigation/next-prev-navigation.component.scss +0 -208
  321. package/src/form-submission/next-prev-navigation/next-prev-navigation.component.spec.ts +0 -21
  322. package/src/form-submission/next-prev-navigation/next-prev-navigation.component.ts +0 -74
  323. package/src/form-submission/save-as-draft/saveDraftModalComponent .ts +0 -60
  324. package/src/form-submission/save-as-draft/saveDraftModalComponent.html +0 -33
  325. package/src/form-submission/save-as-draft/saveDraftModalComponent.scss +0 -195
  326. package/src/form-submission/submission-container/submission-container.component.html +0 -30
  327. package/src/form-submission/submission-container/submission-container.component.scss +0 -67
  328. package/src/form-submission/submission-container/submission-container.component.spec.ts +0 -21
  329. package/src/form-submission/submission-container/submission-container.component.ts +0 -14
  330. package/src/form-submission/submit-form/submit-form.component.html +0 -76
  331. package/src/form-submission/submit-form/submit-form.component.scss +0 -88
  332. package/src/form-submission/submit-form/submit-form.component.spec.ts +0 -21
  333. package/src/form-submission/submit-form/submit-form.component.ts +0 -1953
  334. package/src/lib/form-submission.component.html +0 -15
  335. package/src/lib/form-submission.component.scss +0 -1
  336. package/src/lib/form-submission.component.ts +0 -120
  337. package/src/lib/form-submission.module.ts +0 -31
  338. package/src/lib/form-submission.service.spec.ts +0 -16
  339. package/src/lib/form-submission.service.ts +0 -9
  340. package/src/models/aggregate.model.ts +0 -4
  341. package/src/models/appearance.model.ts +0 -64
  342. package/src/models/elementOptionAPI.model.ts +0 -13
  343. package/src/models/elementOptionAPIData.model.ts +0 -5
  344. package/src/models/elementOptionDB.model.ts +0 -9
  345. package/src/models/elementOptionDBCriteria.model.ts +0 -7
  346. package/src/models/enum/elementType .enum.ts +0 -22
  347. package/src/models/enum/entityType.enum.ts +0 -10
  348. package/src/models/logic.model.ts +0 -11
  349. package/src/models/multifields.model.ts +0 -12
  350. package/src/models/page.model.ts +0 -7
  351. package/src/models/publicForm.model.ts +0 -19
  352. package/src/models/question.model.ts +0 -27
  353. package/src/models/questionAnswer.model.ts +0 -8
  354. package/src/models/questionGroup.model.ts +0 -12
  355. package/src/models/response.model.ts +0 -9
  356. package/src/models/result.model.ts +0 -5
  357. package/src/models/scoring.model.ts +0 -10
  358. package/src/models/section.model.ts +0 -6
  359. package/src/models/subForm.model.ts +0 -25
  360. package/src/models/subformConfiguration.model.ts +0 -4
  361. package/src/models/subformPropery.model.ts +0 -8
  362. package/src/models/validation.model.ts +0 -48
  363. package/src/models/whenClause.model.ts +0 -7
  364. package/src/question/card-subform/card-subform.component.html +0 -282
  365. package/src/question/card-subform/card-subform.component.scss +0 -49
  366. package/src/question/card-subform/card-subform.component.spec.ts +0 -21
  367. package/src/question/card-subform/card-subform.component.ts +0 -407
  368. package/src/question/confirm-dialog/confirm-dialog.component.html +0 -32
  369. package/src/question/confirm-dialog/confirm-dialog.component.scss +0 -109
  370. package/src/question/confirm-dialog/confirm-dialog.component.spec.ts +0 -21
  371. package/src/question/confirm-dialog/confirm-dialog.component.ts +0 -24
  372. package/src/question/form-elements/form-elements.component.html +0 -28
  373. package/src/question/form-elements/form-elements.component.scss +0 -0
  374. package/src/question/form-elements/form-elements.component.spec.ts +0 -21
  375. package/src/question/form-elements/form-elements.component.ts +0 -41
  376. package/src/question/inline-multiple-subform/inline-multiple-subform.component.html +0 -321
  377. package/src/question/inline-multiple-subform/inline-multiple-subform.component.scss +0 -78
  378. package/src/question/inline-multiple-subform/inline-multiple-subform.component.spec.ts +0 -21
  379. package/src/question/inline-multiple-subform/inline-multiple-subform.component.ts +0 -425
  380. package/src/question/multifields/multifields.component.html +0 -78
  381. package/src/question/multifields/multifields.component.scss +0 -6
  382. package/src/question/multifields/multifields.component.spec.ts +0 -21
  383. package/src/question/multifields/multifields.component.ts +0 -27
  384. package/src/question/multiple-subform/multiple-subform.component.html +0 -185
  385. package/src/question/multiple-subform/multiple-subform.component.scss +0 -52
  386. package/src/question/multiple-subform/multiple-subform.component.spec.ts +0 -21
  387. package/src/question/multiple-subform/multiple-subform.component.ts +0 -481
  388. package/src/question/question/question.component.html +0 -51
  389. package/src/question/question/question.component.scss +0 -0
  390. package/src/question/question/question.component.spec.ts +0 -21
  391. package/src/question/question/question.component.ts +0 -129
  392. package/src/question/question-group/question-group.component.html +0 -147
  393. package/src/question/question-group/question-group.component.scss +0 -36
  394. package/src/question/question-group/question-group.component.spec.ts +0 -21
  395. package/src/question/question-group/question-group.component.ts +0 -94
  396. package/src/question/question.module.ts +0 -22
  397. package/src/question/recursive-logic/recursive-logic.component.html +0 -33
  398. package/src/question/recursive-logic/recursive-logic.component.scss +0 -0
  399. package/src/question/recursive-logic/recursive-logic.component.spec.ts +0 -21
  400. package/src/question/recursive-logic/recursive-logic.component.ts +0 -29
  401. package/src/question/sub-form/sub-form.component.html +0 -254
  402. package/src/question/sub-form/sub-form.component.scss +0 -83
  403. package/src/question/sub-form/sub-form.component.spec.ts +0 -21
  404. package/src/question/sub-form/sub-form.component.ts +0 -421
  405. package/src/services/aggregate.service.ts +0 -148
  406. package/src/services/countryService.ts +0 -92
  407. package/src/services/data.service.ts +0 -36
  408. package/src/services/element-tracker.service.spec.ts +0 -16
  409. package/src/services/element-tracker.service.ts +0 -24
  410. package/src/services/form-validation.service.ts +0 -151
  411. package/src/services/form.service.spec.ts +0 -16
  412. package/src/services/form.service.ts +0 -407
  413. package/src/services/mapper.service.ts +0 -625
  414. package/src/services/recaptcha.service.spec.ts +0 -16
  415. package/src/services/recaptcha.service.ts +0 -179
  416. package/src/services/score.service.ts +0 -352
  417. package/src/services/subform-copy.service.ts +0 -148
  418. package/src/services/validation.service.spec.ts +0 -16
  419. package/src/services/validation.service.ts +0 -33
  420. package/src/services/whenClause.service.ts +0 -502
  421. package/src/shared/shared.module.ts +0 -58
  422. package/src/styles/shared-style.scss +0 -86
  423. package/src/sub-form/sub-form.module.ts +0 -24
  424. package/src/sub-form/submission-modal/submission-modal.component.html +0 -160
  425. package/src/sub-form/submission-modal/submission-modal.component.scss +0 -54
  426. package/src/sub-form/submission-modal/submission-modal.component.spec.ts +0 -21
  427. package/src/sub-form/submission-modal/submission-modal.component.ts +0 -127
  428. package/tsconfig.lib.json +0 -14
  429. package/tsconfig.lib.prod.json +0 -10
  430. package/tsconfig.spec.json +0 -14
  431. /package/{src/assets → assets}/fonts/Garamond.woff2 +0 -0
  432. /package/{src/assets → assets}/fonts/Georgia.woff2 +0 -0
  433. /package/{src/assets → assets}/fonts/Poppins.woff2 +0 -0
  434. /package/{src/assets → assets}/fonts/Tahoma.woff2 +0 -0
  435. /package/{src/assets → assets}/fonts/Tajawal.woff2 +0 -0
  436. /package/{src/assets → assets}/fonts/Verdana.woff2 +0 -0
  437. /package/{src/assets → assets}/icons/close-sidebar-mark-icon.svg +0 -0
  438. /package/{src/assets → assets}/icons/copy-icon.svg +0 -0
  439. /package/{src/assets → assets}/icons/delete-icon.svg +0 -0
  440. /package/{src/assets → assets}/icons/delete-no-outline-icon.svg +0 -0
  441. /package/{src/assets → assets}/icons/left_arrow.svg +0 -0
  442. /package/{src/assets → assets}/icons/right_arrow.svg +0 -0
@@ -1,52 +0,0 @@
1
- <div [ngClass]="{ 'mb-4': !inLine }" class="px-3" [attr.name]="question.testElementName">
2
- <div class="input-wrapper mb-2" *ngIf="!inLine">
3
- <div *ngIf="question.questionNumber" [innerHTML]="question.questionNumber" ></div>
4
- <span *ngIf="question.questionNumber" class="space"></span> <label (click)="preview()">{{ question.question }}</label
5
- >&nbsp;
6
- <span class="text-danger" *ngIf="question?.required">*</span>
7
- <div
8
- class="svg-wrapper mb-2 hintIcon"
9
- [attr.data-title]="hint"
10
- *ngIf="hint"
11
- >
12
- <svg
13
- class="hintSvg"
14
- viewBox="0 0 30 30"
15
- xmlns="http://www.w3.org/2000/svg"
16
- >
17
- <path
18
- fill-rule="evenodd"
19
- clip-rule="evenodd"
20
- d="M15 26.25V26.25C8.78625 26.25 3.75 21.2138 3.75 15V15C3.75 8.78625 8.78625 3.75 15 3.75V3.75C21.2138 3.75 26.25 8.78625 26.25 15V15C26.25 21.2138 21.2138 26.25 15 26.25Z"
21
- stroke="#323232"
22
- stroke-width="1.5"
23
- stroke-linecap="round"
24
- stroke-linejoin="round"
25
- />
26
- <path
27
- d="M15 16.5623V16.2498C15 15.2285 15.6312 14.6748 16.2637 14.2498C16.8812 13.8335 17.5 13.291 17.5 12.291C17.5 10.9098 16.3813 9.79102 15 9.79102C13.6187 9.79102 12.5 10.9098 12.5 12.291"
28
- stroke="#323232"
29
- stroke-width="1.5"
30
- stroke-linecap="round"
31
- stroke-linejoin="round"
32
- />
33
- <path
34
- d="M14.9988 20C14.8263 20 14.6863 20.14 14.6875 20.3125C14.6875 20.485 14.8275 20.625 15 20.625C15.1725 20.625 15.3125 20.485 15.3125 20.3125C15.3125 20.14 15.1725 20 14.9988 20"
35
- stroke="#323232"
36
- stroke-width="1.5"
37
- stroke-linecap="round"
38
- stroke-linejoin="round"
39
- />
40
- </svg>
41
- </div>
42
- </div>
43
- <div class="modal1" *ngIf="visible">
44
- <div class="modal-content1">
45
- <span class="close" (click)="closeModal()">&times;</span>
46
- <div class="imgContiner">
47
- <img [src]="imgUrl" alt="Image">
48
- </div>
49
- </div>
50
- </div>
51
- </div>
52
-
@@ -1,85 +0,0 @@
1
- @import '../../styles/shared-style.scss';
2
- label{
3
- color: #084FFF;
4
- }
5
- .modal1 {
6
- display: flex; /* Show the modal */
7
- position: fixed; /* Stay in place */
8
- z-index: 1000; /* Sit on top */
9
- left: 0;
10
- top: 0;
11
- width: 100%;
12
- height: 100%;
13
- background-color: rgb(0, 0, 0); /* Fallback color */
14
- background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
15
- align-items: center;
16
- }
17
-
18
- .modal-content1 {
19
- background-color: #fefefe;
20
- margin: 15% auto; /* 15% from the top and centered */
21
- padding: 20px;
22
- border: 1px solid #888;
23
- width: 80%; /* Could be more or less, depending on screen size */
24
- max-width: 877px;
25
- }
26
-
27
- .close {
28
- color: #aaa;
29
- float: right;
30
- font-size: 28px;
31
- font-weight: bold;
32
- justify-content: flex-end;
33
- display: flex;
34
- opacity: 1;
35
- }
36
-
37
- .close:hover,
38
- .close:focus {
39
- color: black;
40
- text-decoration: none;
41
- cursor: pointer;
42
- }
43
- .imgContiner{
44
- height: 500px;
45
- overflow-y: auto;
46
- img{
47
- max-width: 100%;
48
- width: 100%;
49
-
50
- }
51
- }
52
- div::-webkit-scrollbar,
53
- main::-webkit-scrollbar,
54
- ul::-webkit-scrollbar {
55
- width: 6px;
56
- height: 8px;
57
- visibility: hidden;
58
- }
59
- div::-webkit-scrollbar-thumb,
60
- main::-webkit-scrollbar-thumb,
61
- ul::-webkit-scrollbar-thumb {
62
- background-color: var(--scrollBarThumbColor);
63
- border-radius: 8px;
64
- visibility: hidden;
65
- }
66
-
67
- div:hover::-webkit-scrollbar,
68
- main:hover::-webkit-scrollbar,
69
- ul:hover::-webkit-scrollbar {
70
- visibility: unset;
71
- }
72
- div:hover::-webkit-scrollbar-thumb,
73
- main:hover::-webkit-scrollbar-thumb,
74
- ul:hover::-webkit-scrollbar-thumb {
75
- visibility: unset;
76
- }
77
-
78
- .invalid-question {
79
- border: 2px solid #f44336; /* Material red */
80
- border-radius: 4px;
81
- padding: 8px;
82
- margin-bottom: 4px;
83
- }
84
-
85
-
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { TermsAndConditionFieldsComponent } from './terms-and-condition-fields.component';
4
-
5
- describe('TermsAndConditionFieldsComponent', () => {
6
- let component: TermsAndConditionFieldsComponent;
7
- let fixture: ComponentFixture<TermsAndConditionFieldsComponent>;
8
-
9
- beforeEach(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [TermsAndConditionFieldsComponent]
12
- });
13
- fixture = TestBed.createComponent(TermsAndConditionFieldsComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,62 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
- import { FormService } from '../../services/form.service';
3
- import { DataService } from '../../services/data.service';
4
- import { HttpClient, HttpHeaders } from '@angular/common/http';
5
- import { Observable } from 'rxjs';
6
- @Component({
7
- selector: 'lib-terms-and-condition-fields',
8
- templateUrl: './terms-and-condition-fields.component.html',
9
- styleUrls: ['./terms-and-condition-fields.component.scss'],
10
- })
11
- export class TermsAndConditionFieldsComponent {
12
- @Input() question: any = {};
13
- @Input() inLine: boolean = false;
14
-
15
- count: number = 0;
16
- required: boolean = false;
17
- hint: string = '';
18
- fileDataUrl:any;
19
- private apiUrl: string = '';
20
- imgUrl:any
21
- header: any = {};
22
- visible:boolean=false;
23
- constructor(
24
- private formService: FormService,
25
- private http: HttpClient,
26
- private dataService: DataService
27
- ) {
28
- this.dataService.apiUrl$.subscribe((data) => {
29
- this.apiUrl = data;
30
- });
31
- }
32
- ngOnInit() {
33
- this.count = this.question.count;
34
- this.required = this.question.required;
35
- this.hint = this.question.hint;
36
- this.fileDataUrl=this.question.formElement.termsAndConditionType.fileUrl
37
- this.question;
38
- this.count;
39
- }
40
- preview(): Observable<any> {
41
- const headers = new HttpHeaders({
42
- 'Content-Type': this.header.contentType,
43
- 'auth-user': this.header.authUser,
44
- });
45
- const body = {
46
- // Your request body content here
47
- };
48
- const options = {
49
- headers: headers,
50
- body: body,
51
- };
52
- const fileUrl =this.fileDataUrl;
53
- const encodedFileUrl = encodeURIComponent(fileUrl);
54
- const fullUrl = `?url=${encodedFileUrl}`;
55
- this.imgUrl= (this.apiUrl + `/api/cdn/preview${fullUrl}`);
56
- this.visible= true;
57
- return this.http.get<any>(this.apiUrl + `/api/cdn/preview${fullUrl}`, options);
58
- }
59
- closeModal() {
60
- this.visible = false;
61
- }
62
- }
@@ -1,68 +0,0 @@
1
- <div
2
- [ngClass]="{ 'mb-4': !inLine }"
3
- class="px-3"
4
- [id]="(inLine || inCard) ? 'question-' + submissionIndex + '-' + question.id : 'question-' + question.id"
5
- [attr.name]="question.testElementName"
6
- >
7
- <div class="input-wrapper mb-2" *ngIf="!inLine">
8
- <div *ngIf="question.questionNumber" [innerHTML]="question.questionNumber"></div>
9
- <span *ngIf="question.questionNumber" class="space"></span> <label>{{ question.question }}</label
10
- >&nbsp;
11
- <span class="text-danger" *ngIf="question?.required">*</span>
12
- <div
13
- class="svg-wrapper mb-2 hintIcon"
14
- [attr.data-title]="hint"
15
- *ngIf="hint"
16
- >
17
- <svg
18
- class="hintSvg"
19
- viewBox="0 0 30 30"
20
- xmlns="http://www.w3.org/2000/svg"
21
- >
22
- <path
23
- fill-rule="evenodd"
24
- clip-rule="evenodd"
25
- d="M15 26.25V26.25C8.78625 26.25 3.75 21.2138 3.75 15V15C3.75 8.78625 8.78625 3.75 15 3.75V3.75C21.2138 3.75 26.25 8.78625 26.25 15V15C26.25 21.2138 21.2138 26.25 15 26.25Z"
26
- stroke="#323232"
27
- stroke-width="1.5"
28
- stroke-linecap="round"
29
- stroke-linejoin="round"
30
- />
31
- <path
32
- d="M15 16.5623V16.2498C15 15.2285 15.6312 14.6748 16.2637 14.2498C16.8812 13.8335 17.5 13.291 17.5 12.291C17.5 10.9098 16.3813 9.79102 15 9.79102C13.6187 9.79102 12.5 10.9098 12.5 12.291"
33
- stroke="#323232"
34
- stroke-width="1.5"
35
- stroke-linecap="round"
36
- stroke-linejoin="round"
37
- />
38
- <path
39
- d="M14.9988 20C14.8263 20 14.6863 20.14 14.6875 20.3125C14.6875 20.485 14.8275 20.625 15 20.625C15.1725 20.625 15.3125 20.485 15.3125 20.3125C15.3125 20.14 15.1725 20 14.9988 20"
40
- stroke="#323232"
41
- stroke-width="1.5"
42
- stroke-linecap="round"
43
- stroke-linejoin="round"
44
- />
45
- </svg>
46
- </div>
47
- </div>
48
- <textarea
49
- #textarea
50
- class="form-control mb-2"
51
- [ngClass]="{ 'no-scroll': numberOfRows }"
52
- [rows]="numberOfRows"
53
- wrap="hard"
54
- (input)="validateInput($event)"
55
- (blur)="validateTextarea()"
56
- [(ngModel)]="enteredText"
57
- [class.invalid]="validationFailed"
58
- [class.invalid-question]="isInvalid && (!inLine || !enteredText)"
59
- [maxlength]="characterCount"
60
- [disabled]="disableEdit"
61
- ></textarea>
62
- <div *ngIf="isInvalid && (!inLine || !enteredText)" class="error-message">
63
- {{ errorMessage }}
64
- </div>
65
- <div *ngIf="validationFailed && !isInvalid" class="text-danger error-message">
66
- {{ validationMessage }}
67
- </div>
68
- </div>
@@ -1,19 +0,0 @@
1
- @import '../../styles/shared-style.scss';
2
-
3
- .no-scroll {
4
- overflow: hidden !important;
5
- resize: none; /* Prevents manual resizing */
6
- line-height: 1.5; /* Ensuring consistent line spacing */
7
- padding: 5px 10px; /* Adjust as needed */
8
- }
9
-
10
- .invalid-question {
11
- border: 2px solid #f44336; /* Material red */
12
- border-radius: 4px;
13
- padding: 8px;
14
- margin-bottom: 4px;
15
- }
16
-
17
-
18
-
19
-
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { TextAreaFieldsComponent } from './text-area-fields.component';
4
-
5
- describe('TextAreaFieldsComponent', () => {
6
- let component: TextAreaFieldsComponent;
7
- let fixture: ComponentFixture<TextAreaFieldsComponent>;
8
-
9
- beforeEach(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [TextAreaFieldsComponent]
12
- });
13
- fixture = TestBed.createComponent(TextAreaFieldsComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,166 +0,0 @@
1
- import { Component, Input, ElementRef, ViewChild, AfterViewInit, Output, EventEmitter } from '@angular/core';
2
- import { ValidationService } from '../../services/validation.service';
3
- import { ElementTrackerService } from '../../services/element-tracker.service';
4
- import { WhenClauseService } from '../../services/whenClause.service';
5
-
6
- @Component({
7
- selector: 'lib-text-area-fields',
8
- templateUrl: './text-area-fields.component.html',
9
- styleUrls: ['./text-area-fields.component.scss'],
10
- })
11
- export class TextAreaFieldsComponent implements AfterViewInit {
12
- @Input() question: any = {};
13
- @Input() inLine: boolean = false;
14
- @Input() inCard: boolean = false;
15
- @Input() submissionIndex!: number;
16
- @ViewChild('textarea') textarea!: ElementRef<HTMLTextAreaElement>;
17
- @Output() answerChange = new EventEmitter<{ answer: any; maxPossibleScore?: number }>();
18
-
19
- answer: string = '';
20
- count: number = 0;
21
- required: boolean = false;
22
- hint: string = '';
23
- numberOfRows!: number;
24
- limitedCharacters!: boolean;
25
- characterCount!: number;
26
- validationFailed: boolean = false;
27
- validationMessage: string = '';
28
- enteredText: string = '';
29
- maxHeight!: number;
30
- lineHeight!: number;
31
- defaultValue: string = '';
32
- @Input() disableEdit: boolean = false;
33
- private subscribedToWhenClause = false;
34
-
35
- ngOnInit() {
36
- this.valueAssigned();
37
- }
38
- private elementId: string='';
39
-
40
- constructor(
41
- private validationService: ValidationService,
42
- private tracker: ElementTrackerService,
43
- private whenClauseService:WhenClauseService
44
- ) { }
45
-
46
- ngAfterViewInit() {
47
- if (this.textarea?.nativeElement) {
48
- this.calculateMaxHeight();
49
- }
50
-
51
- this.elementId = `question-${this.question.id}`;
52
- this.tracker.registerElement(this.elementId);
53
- }
54
-
55
- valueAssigned() {
56
- this.count = this.question.count;
57
- this.required = this.question.required;
58
- this.hint = this.question.hint;
59
- this.numberOfRows = this.question.formElement.appearance.numberOfRows;
60
- this.limitedCharacters = this.question.formElement.validation.limitedCharacters;
61
- this.defaultValue = this.question?.defaultValue;
62
- this.disableEdit = this.disableEdit ?? this.question?.disableEdit ?? false;
63
- this.enteredText = this.defaultValue;
64
- if (this.limitedCharacters) {
65
- this.characterCount = this.question.formElement.validation.count;
66
- }
67
- if(this.question.answer){
68
- this.enteredText = this.question?.answer;
69
- setTimeout(() => {
70
- this.whenClauseService.setQuestionAnswer(this.question.id,this.question.answer,true);
71
- });
72
- }else if(this.defaultValue && !this.question.answer){
73
- this.question.answer = this.defaultValue;
74
- } else{
75
- setTimeout(() => {
76
- this.whenClauseService.setQuestionAnswer(this.question.id,'',true);
77
- });
78
- }
79
- }
80
-
81
- calculateMaxHeight() {
82
- const textareaEl = this.textarea.nativeElement;
83
- const computedStyles = window.getComputedStyle(textareaEl);
84
-
85
- // Get accurate line height
86
- this.lineHeight = parseFloat(computedStyles.lineHeight); // Default fallback to 20px
87
-
88
- // Consider padding and borders
89
- const paddingTop = parseFloat(computedStyles.paddingTop) || 0;
90
- const paddingBottom = parseFloat(computedStyles.paddingBottom) || 0;
91
- const borderTop = parseFloat(computedStyles.borderTopWidth) || 0;
92
- const borderBottom = parseFloat(computedStyles.borderBottomWidth) || 0;
93
-
94
- // Correct height calculation
95
- this.maxHeight = (this.lineHeight * this.numberOfRows) + paddingTop + paddingBottom + borderTop + borderBottom;
96
-
97
- textareaEl.style.height = `${this.maxHeight}px`; // Set exact height
98
- }
99
-
100
- validateInput(event: Event) {
101
- const textarea = event.target as HTMLTextAreaElement;
102
-
103
- // Restrict overflow beyond max height
104
- while (textarea.scrollHeight > this.maxHeight) {
105
- textarea.value = textarea.value.slice(0, -1);
106
- }
107
-
108
- this.question.answer = textarea.value;
109
- this.answerChange.emit({answer:this.question.answer,maxPossibleScore:0});
110
- setTimeout(() => {
111
- this.whenClauseService.setQuestionAnswer(this.question.id,this.question.answer,true);
112
- });
113
- this.validateTextarea();
114
- }
115
-
116
- validateTextarea() {
117
- this.validationFailed = false;
118
- this.validationService.clearInvalid(this.buildElementId());
119
- this.validationMessage = '';
120
-
121
- if (!this.enteredText && this.required && this.question.required) {
122
- this.validationFailed = true;
123
- this.validationMessage = 'This is a required question';
124
- this.question.validation = false;
125
- this.question.validationMessage = 'This is a required question';
126
- if (!this.subscribedToWhenClause) {
127
- this.subscribedToWhenClause = true;
128
- this.whenClauseService.onQuestionChange().subscribe(change => {
129
- this.validateTextarea();
130
- });
131
- }
132
- } else {
133
- this.question.validation = true;
134
- }
135
- }
136
-
137
-
138
- handleValidation(isValid: boolean, message: string = 'This field is required') {
139
- if (isValid) {
140
- this.validationService.clearInvalid(this.buildElementId());
141
- } else {
142
- // this.validationService.setInvalid(this.question.id, message);
143
- }
144
- }
145
-
146
- private buildElementId(): string {
147
- return (this.inLine || this.inCard)
148
- ? `${this.submissionIndex}-${this.question.id}`
149
- : `${this.question.id}`;
150
- }
151
-
152
- get isInvalid(): boolean {
153
- return !!this.validationService.getErrorMessage(this.buildElementId());
154
- }
155
-
156
- get errorMessage(): string | null {
157
- return this.validationService.getErrorMessage(this.buildElementId());
158
- }
159
-
160
-
161
- ngOnDestroy() {
162
- if (this.elementId) {
163
- this.tracker.unregisterElement(this.elementId);
164
- }
165
- }
166
- }
@@ -1,67 +0,0 @@
1
- <div
2
- [ngClass]="{ 'mb-4': !inLine }"
3
- class="px-3"
4
- [id]="(inLine || inCard) ? 'question-' + submissionIndex + '-' + question.id : 'question-' + question.id"
5
- [attr.name]="question.testElementName"
6
- >
7
- <div class="input-wrapper mb-2" *ngIf="!inLine">
8
- <div *ngIf="question.questionNumber" [innerHTML]="question.questionNumber"></div>
9
- <span *ngIf="question.questionNumber" class="space"></span> <label>{{ question.question }}</label
10
- >&nbsp;
11
- <span class="text-danger" *ngIf="question.required">*</span>
12
- <div
13
- class="svg-wrapper mb-2 hintIcon"
14
- [attr.data-title]="hint"
15
- *ngIf="hint"
16
- >
17
- <svg
18
- class="hintSvg"
19
- viewBox="0 0 30 30"
20
- xmlns="http://www.w3.org/2000/svg"
21
- >
22
- <path
23
- fill-rule="evenodd"
24
- clip-rule="evenodd"
25
- d="M15 26.25V26.25C8.78625 26.25 3.75 21.2138 3.75 15V15C3.75 8.78625 8.78625 3.75 15 3.75V3.75C21.2138 3.75 26.25 8.78625 26.25 15V15C26.25 21.2138 21.2138 26.25 15 26.25Z"
26
- stroke="#323232"
27
- stroke-width="1.5"
28
- stroke-linecap="round"
29
- stroke-linejoin="round"
30
- />
31
- <path
32
- d="M15 16.5623V16.2498C15 15.2285 15.6312 14.6748 16.2637 14.2498C16.8812 13.8335 17.5 13.291 17.5 12.291C17.5 10.9098 16.3813 9.79102 15 9.79102C13.6187 9.79102 12.5 10.9098 12.5 12.291"
33
- stroke="#323232"
34
- stroke-width="1.5"
35
- stroke-linecap="round"
36
- stroke-linejoin="round"
37
- />
38
- <path
39
- d="M14.9988 20C14.8263 20 14.6863 20.14 14.6875 20.3125C14.6875 20.485 14.8275 20.625 15 20.625C15.1725 20.625 15.3125 20.485 15.3125 20.3125C15.3125 20.14 15.1725 20 14.9988 20"
40
- stroke="#323232"
41
- stroke-width="1.5"
42
- stroke-linecap="round"
43
- stroke-linejoin="round"
44
- />
45
- </svg>
46
- </div>
47
- </div>
48
-
49
- <input
50
- type="text"
51
- class="form-control mb-2 height"
52
- [placeholder]="placeholder"
53
- [(ngModel)]="enteredText"
54
- (blur)="validatetextField()"
55
- (input)="validateInput($event)"
56
- [class.invalid]="validationFailed"
57
- [class.invalid-question]="isInvalid && (!inLine || !enteredText)"
58
- [id]="question.id"
59
- [disabled]="disableEdit"
60
- />
61
- <div *ngIf="isInvalid && (!inLine || !enteredText)" class="error-message">
62
- {{ errorMessage }}
63
- </div>
64
- <div *ngIf="validationFailed && !isInvalid" class="text-danger error-message">
65
- {{ validationMessage }}
66
- </div>
67
- </div>
@@ -1,26 +0,0 @@
1
- @import '../../styles/shared-style.scss';
2
-
3
-
4
-
5
-
6
- .form-control:not(:placeholder-shown).bold {
7
- font-weight: bold;
8
- }
9
-
10
- .form-control:not(:placeholder-shown).underline {
11
- text-decoration: underline;
12
- }
13
-
14
- .form-control:not(:placeholder-shown).italics {
15
- font-style: italic;
16
- }
17
-
18
- .invalid-question {
19
- border: 2px solid #f44336; /* Material red */
20
- border-radius: 4px;
21
- padding: 8px;
22
- margin-bottom: 4px;
23
- }
24
-
25
-
26
-
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { TextFieldsComponent } from './text-fields.component';
4
-
5
- describe('TextFieldsComponent', () => {
6
- let component: TextFieldsComponent;
7
- let fixture: ComponentFixture<TextFieldsComponent>;
8
-
9
- beforeEach(() => {
10
- TestBed.configureTestingModule({
11
- declarations: [TextFieldsComponent]
12
- });
13
- fixture = TestBed.createComponent(TextFieldsComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });