udp-stencil-component-library 25.18.2-beta.3 → 25.18.2-beta.5

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 (251) hide show
  1. package/dist/cjs/ag-grid-base.ghost-render.grid-header.hint-panel.udp-dialog.udp-list-item.entry.cjs.js.map +1 -1
  2. package/dist/cjs/ag-grid-base_6.cjs.entry.js +1 -1
  3. package/dist/cjs/date-time-renderer.file-upload-renderer.form-metadata-display-renderer.list-options-renderer.question-specific-configs-renderer.signature-renderer.text-input-renderer.entry.cjs.js.map +1 -1
  4. package/dist/cjs/date-time-renderer_7.cjs.entry.js +13 -13
  5. package/dist/cjs/{enums-DVbZnzL8.js → enums-CgcTuQjC.js} +8 -2
  6. package/dist/cjs/enums-CgcTuQjC.js.map +1 -0
  7. package/dist/cjs/form-metadata-display.image-upload.signature-input.stencil-form.tally-display.udp-question.udp-question-comments.udp-save-draft-button.entry.cjs.js.map +1 -1
  8. package/dist/cjs/form-metadata-display_8.cjs.entry.js +10 -10
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/primary-action-header.udp-side-sheet.udp-tabs.entry.cjs.js.map +1 -1
  11. package/dist/cjs/primary-action-header_3.cjs.entry.js +1 -1
  12. package/dist/cjs/question-configs-renderer.section-configs-renderer.udp-forms-builder-menu.udp-forms-builder-question-item.entry.cjs.js.map +1 -1
  13. package/dist/cjs/question-configs-renderer_4.cjs.entry.js +7 -7
  14. package/dist/cjs/stencil-library.cjs.js +1 -1
  15. package/dist/cjs/{udp-forms-builder-question-template-CNONS2l5.js → udp-forms-builder-question-template-BMMpObLX.js} +3 -3
  16. package/dist/cjs/udp-forms-builder-question-template-BMMpObLX.js.map +1 -0
  17. package/dist/cjs/udp-forms-builder.cjs.entry.js +2 -2
  18. package/dist/cjs/udp-forms-builder.entry.cjs.js.map +1 -1
  19. package/dist/cjs/udp-forms-follow-up-list-card.cjs.entry.js +3 -3
  20. package/dist/cjs/udp-forms-follow-up-list-card.entry.cjs.js.map +1 -1
  21. package/dist/cjs/udp-forms-list-card.cjs.entry.js +6 -6
  22. package/dist/cjs/udp-forms-list-card.entry.cjs.js.map +1 -1
  23. package/dist/cjs/udp-forms-list.cjs.entry.js +2 -2
  24. package/dist/cjs/udp-forms-list.entry.cjs.js.map +1 -1
  25. package/dist/cjs/udp-forms-renderer.cjs.entry.js +270 -202
  26. package/dist/cjs/udp-forms-renderer.entry.cjs.js.map +1 -1
  27. package/dist/cjs/udp-forms-ui.cjs.entry.js +6 -6
  28. package/dist/cjs/udp-forms-ui.entry.cjs.js.map +1 -1
  29. package/dist/cjs/{utils-DZ_OMtAy.js → utils-Bp02BX38.js} +8 -8
  30. package/dist/cjs/utils-Bp02BX38.js.map +1 -0
  31. package/dist/collection/components/dialogs/udp-dialog.css +11 -3
  32. package/dist/collection/components/drawers/udp-side-sheet/udp-side-sheet.css +34 -14
  33. package/dist/collection/components/forms/udp-forms/udp-forms-builder/forms-builder-utils.js +1 -1
  34. package/dist/collection/components/forms/udp-forms/udp-forms-builder/forms-builder-utils.js.map +1 -1
  35. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/date-time-renderer/date-time-renderer.js +3 -3
  36. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/date-time-renderer/date-time-renderer.js.map +1 -1
  37. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/file-upload-renderer/file-upload-renderer.js +4 -4
  38. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/file-upload-renderer/file-upload-renderer.js.map +1 -1
  39. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/form-metadata-display-renderer/form-metadata-display-renderer.js +5 -5
  40. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/form-metadata-display-renderer/form-metadata-display-renderer.js.map +1 -1
  41. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/list-option-renderer/list-options-renderer.js +5 -5
  42. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/list-option-renderer/list-options-renderer.js.map +1 -1
  43. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/question-configs-renderer/question-configs-renderer.js +6 -6
  44. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/question-configs-renderer/question-configs-renderer.js.map +1 -1
  45. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/question-specific-configs-renderer/question-specific-configs-renderer.js +1 -1
  46. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/question-specific-configs-renderer/question-specific-configs-renderer.js.map +1 -1
  47. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/signature-renderer/signature-renderer.js +3 -3
  48. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/signature-renderer/signature-renderer.js.map +1 -1
  49. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/text-input-renderer/text-input-renderer.js +4 -4
  50. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/text-input-renderer/text-input-renderer.js.map +1 -1
  51. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-question-template.js +1 -1
  52. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-question-template.js.map +1 -1
  53. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder.js +3 -3
  54. package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder.js.map +1 -1
  55. package/dist/collection/components/forms/udp-forms/udp-forms-list/udp-forms-list-card/udp-forms-list-card.js +7 -7
  56. package/dist/collection/components/forms/udp-forms/udp-forms-list/udp-forms-list-card/udp-forms-list-card.js.map +1 -1
  57. package/dist/collection/components/forms/udp-forms/udp-forms-list/udp-forms-list.js +2 -2
  58. package/dist/collection/components/forms/udp-forms/udp-forms-list/udp-forms-list.js.map +1 -1
  59. package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-follow-up-list-card/udp-forms-follow-up-list-card.js +3 -3
  60. package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-follow-up-list-card/udp-forms-follow-up-list-card.js.map +1 -1
  61. package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-ui/udp-forms-ui.js +13 -13
  62. package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-ui/udp-forms-ui.js.map +1 -1
  63. package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-utils.js +195 -0
  64. package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-utils.js.map +1 -0
  65. package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer.js +86 -238
  66. package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer.js.map +1 -1
  67. package/dist/collection/components/forms/udp-forms/udp-forms-utils/classes/UdpForm.js.map +1 -0
  68. package/dist/collection/components/forms/udp-forms/{utils → udp-forms-utils}/classes/UdpFormSubmission.js +4 -12
  69. package/dist/collection/components/forms/udp-forms/udp-forms-utils/classes/UdpFormSubmission.js.map +1 -0
  70. package/dist/collection/components/forms/udp-forms/{utils → udp-forms-utils}/enums.js +6 -0
  71. package/dist/collection/components/forms/udp-forms/udp-forms-utils/enums.js.map +1 -0
  72. package/dist/collection/components/forms/udp-forms/udp-forms-utils/form-handler/IFormHandler.js.map +1 -0
  73. package/dist/collection/components/forms/udp-forms/udp-forms-utils/form-handler/UdpFormHandler.js.map +1 -0
  74. package/dist/collection/components/forms/udp-forms/udp-forms-utils/form-submission-handler/FormSubmissionHandlerFactory.js.map +1 -0
  75. package/dist/collection/components/forms/udp-forms/udp-forms-utils/form-submission-handler/IFormSubmissionHandler.js.map +1 -0
  76. package/dist/collection/components/forms/udp-forms/{utils → udp-forms-utils}/form-submission-handler/PrivateFormSubmissionHandler.js +6 -4
  77. package/dist/collection/components/forms/udp-forms/udp-forms-utils/form-submission-handler/PrivateFormSubmissionHandler.js.map +1 -0
  78. package/dist/collection/components/forms/udp-forms/udp-forms-utils/form-submission-handler/PublicFormSubmissionHandler.js.map +1 -0
  79. package/dist/collection/components/forms/udp-forms/udp-forms-utils/form-submission-handler/formUtils.js.map +1 -0
  80. package/dist/collection/components/forms/udp-forms/udp-forms-utils/types.js.map +1 -0
  81. package/dist/collection/components/forms/udp-forms/{utils → udp-forms-utils}/utils.js +5 -5
  82. package/dist/collection/components/forms/udp-forms/udp-forms-utils/utils.js.map +1 -0
  83. package/dist/collection/components/forms/udp-forms/udp-question/udp-question-comment/udp-question-comments.js +10 -10
  84. package/dist/collection/components/forms/udp-forms/udp-question/udp-question-comment/udp-question-comments.js.map +1 -1
  85. package/dist/collection/components/forms/udp-forms/udp-question/udp-question.js +13 -13
  86. package/dist/collection/components/forms/udp-forms/udp-question/udp-question.js.map +1 -1
  87. package/dist/collection/components/inputs/form metadata display/form-metadata-display.js +2 -2
  88. package/dist/collection/components/inputs/form metadata display/form-metadata-display.js.map +1 -1
  89. package/dist/components/date-time-renderer2.js.map +1 -1
  90. package/dist/components/enums.js +7 -1
  91. package/dist/components/enums.js.map +1 -1
  92. package/dist/components/file-upload-renderer2.js +2 -2
  93. package/dist/components/file-upload-renderer2.js.map +1 -1
  94. package/dist/components/form-metadata-display-renderer2.js +3 -3
  95. package/dist/components/form-metadata-display-renderer2.js.map +1 -1
  96. package/dist/components/form-metadata-display2.js +1 -1
  97. package/dist/components/form-metadata-display2.js.map +1 -1
  98. package/dist/components/forms-builder-utils.js.map +1 -1
  99. package/dist/components/list-options-renderer2.js +3 -3
  100. package/dist/components/list-options-renderer2.js.map +1 -1
  101. package/dist/components/question-configs-renderer2.js +5 -5
  102. package/dist/components/question-configs-renderer2.js.map +1 -1
  103. package/dist/components/question-specific-configs-renderer2.js.map +1 -1
  104. package/dist/components/signature-renderer2.js +1 -1
  105. package/dist/components/signature-renderer2.js.map +1 -1
  106. package/dist/components/text-input-renderer2.js +2 -2
  107. package/dist/components/text-input-renderer2.js.map +1 -1
  108. package/dist/components/udp-dialog2.js +1 -1
  109. package/dist/components/udp-dialog2.js.map +1 -1
  110. package/dist/components/udp-forms-builder.js.map +1 -1
  111. package/dist/components/udp-forms-follow-up-list-card.js +2 -2
  112. package/dist/components/udp-forms-follow-up-list-card.js.map +1 -1
  113. package/dist/components/udp-forms-list-card2.js +4 -4
  114. package/dist/components/udp-forms-list-card2.js.map +1 -1
  115. package/dist/components/udp-forms-list.js +1 -1
  116. package/dist/components/udp-forms-list.js.map +1 -1
  117. package/dist/components/udp-forms-renderer.js +273 -207
  118. package/dist/components/udp-forms-renderer.js.map +1 -1
  119. package/dist/components/udp-forms-ui2.js +6 -6
  120. package/dist/components/udp-forms-ui2.js.map +1 -1
  121. package/dist/components/udp-question-comments2.js +5 -5
  122. package/dist/components/udp-question-comments2.js.map +1 -1
  123. package/dist/components/udp-question2.js +4 -4
  124. package/dist/components/udp-question2.js.map +1 -1
  125. package/dist/components/udp-side-sheet2.js +1 -1
  126. package/dist/components/udp-side-sheet2.js.map +1 -1
  127. package/dist/components/utils.js +6 -6
  128. package/dist/components/utils.js.map +1 -1
  129. package/dist/docs.json +119 -154
  130. package/dist/esm/ag-grid-base.ghost-render.grid-header.hint-panel.udp-dialog.udp-list-item.entry.js.map +1 -1
  131. package/dist/esm/ag-grid-base_6.entry.js +1 -1
  132. package/dist/esm/date-time-renderer.file-upload-renderer.form-metadata-display-renderer.list-options-renderer.question-specific-configs-renderer.signature-renderer.text-input-renderer.entry.js.map +1 -1
  133. package/dist/esm/date-time-renderer_7.entry.js +13 -13
  134. package/dist/esm/{enums-CHxgVY-B.js → enums-DHT5wSnX.js} +9 -3
  135. package/dist/esm/enums-DHT5wSnX.js.map +1 -0
  136. package/dist/esm/form-metadata-display.image-upload.signature-input.stencil-form.tally-display.udp-question.udp-question-comments.udp-save-draft-button.entry.js.map +1 -1
  137. package/dist/esm/form-metadata-display_8.entry.js +10 -10
  138. package/dist/esm/loader.js +1 -1
  139. package/dist/esm/primary-action-header.udp-side-sheet.udp-tabs.entry.js.map +1 -1
  140. package/dist/esm/primary-action-header_3.entry.js +1 -1
  141. package/dist/esm/question-configs-renderer.section-configs-renderer.udp-forms-builder-menu.udp-forms-builder-question-item.entry.js.map +1 -1
  142. package/dist/esm/question-configs-renderer_4.entry.js +7 -7
  143. package/dist/esm/stencil-library.js +1 -1
  144. package/dist/esm/{udp-forms-builder-question-template-DQJb7f4Y.js → udp-forms-builder-question-template-D6ADNZEG.js} +3 -3
  145. package/dist/esm/udp-forms-builder-question-template-D6ADNZEG.js.map +1 -0
  146. package/dist/esm/udp-forms-builder.entry.js +2 -2
  147. package/dist/esm/udp-forms-builder.entry.js.map +1 -1
  148. package/dist/esm/udp-forms-follow-up-list-card.entry.js +3 -3
  149. package/dist/esm/udp-forms-follow-up-list-card.entry.js.map +1 -1
  150. package/dist/esm/udp-forms-list-card.entry.js +6 -6
  151. package/dist/esm/udp-forms-list-card.entry.js.map +1 -1
  152. package/dist/esm/udp-forms-list.entry.js +2 -2
  153. package/dist/esm/udp-forms-list.entry.js.map +1 -1
  154. package/dist/esm/udp-forms-renderer.entry.js +270 -202
  155. package/dist/esm/udp-forms-renderer.entry.js.map +1 -1
  156. package/dist/esm/udp-forms-ui.entry.js +6 -6
  157. package/dist/esm/udp-forms-ui.entry.js.map +1 -1
  158. package/dist/esm/{utils-CiUp9KGZ.js → utils-kwLwITIE.js} +8 -8
  159. package/dist/esm/utils-kwLwITIE.js.map +1 -0
  160. package/dist/stencil-library/ag-grid-base.ghost-render.grid-header.hint-panel.udp-dialog.udp-list-item.entry.esm.js.map +1 -1
  161. package/dist/stencil-library/ag-grid-base_6.entry.js +1 -1
  162. package/dist/stencil-library/ag-grid-base_6.entry.js.map +1 -1
  163. package/dist/stencil-library/date-time-renderer.file-upload-renderer.form-metadata-display-renderer.list-options-renderer.question-specific-configs-renderer.signature-renderer.text-input-renderer.entry.esm.js.map +1 -1
  164. package/dist/stencil-library/date-time-renderer_7.entry.js +1 -1
  165. package/dist/stencil-library/{enums-CHxgVY-B.js → enums-DHT5wSnX.js} +2 -2
  166. package/dist/stencil-library/enums-DHT5wSnX.js.map +1 -0
  167. package/dist/stencil-library/form-metadata-display.image-upload.signature-input.stencil-form.tally-display.udp-question.udp-question-comments.udp-save-draft-button.entry.esm.js.map +1 -1
  168. package/dist/stencil-library/form-metadata-display_8.entry.js +1 -1
  169. package/dist/stencil-library/form-metadata-display_8.entry.js.map +1 -1
  170. package/dist/stencil-library/primary-action-header.udp-side-sheet.udp-tabs.entry.esm.js.map +1 -1
  171. package/dist/stencil-library/primary-action-header_3.entry.js +1 -1
  172. package/dist/stencil-library/primary-action-header_3.entry.js.map +1 -1
  173. package/dist/stencil-library/question-configs-renderer.section-configs-renderer.udp-forms-builder-menu.udp-forms-builder-question-item.entry.esm.js.map +1 -1
  174. package/dist/stencil-library/question-configs-renderer_4.entry.js +1 -1
  175. package/dist/stencil-library/stencil-library.esm.js +1 -1
  176. package/dist/stencil-library/{udp-forms-builder-question-template-DQJb7f4Y.js → udp-forms-builder-question-template-D6ADNZEG.js} +2 -2
  177. package/dist/stencil-library/udp-forms-builder-question-template-D6ADNZEG.js.map +1 -0
  178. package/dist/stencil-library/udp-forms-builder.entry.esm.js.map +1 -1
  179. package/dist/stencil-library/udp-forms-builder.entry.js +1 -1
  180. package/dist/stencil-library/udp-forms-follow-up-list-card.entry.esm.js.map +1 -1
  181. package/dist/stencil-library/udp-forms-follow-up-list-card.entry.js +1 -1
  182. package/dist/stencil-library/udp-forms-list-card.entry.esm.js.map +1 -1
  183. package/dist/stencil-library/udp-forms-list-card.entry.js +1 -1
  184. package/dist/stencil-library/udp-forms-list-card.entry.js.map +1 -1
  185. package/dist/stencil-library/udp-forms-list.entry.esm.js.map +1 -1
  186. package/dist/stencil-library/udp-forms-list.entry.js +1 -1
  187. package/dist/stencil-library/udp-forms-renderer.entry.esm.js.map +1 -1
  188. package/dist/stencil-library/udp-forms-renderer.entry.js +1 -1
  189. package/dist/stencil-library/udp-forms-renderer.entry.js.map +1 -1
  190. package/dist/stencil-library/udp-forms-ui.entry.esm.js.map +1 -1
  191. package/dist/stencil-library/udp-forms-ui.entry.js +1 -1
  192. package/dist/stencil-library/udp-forms-ui.entry.js.map +1 -1
  193. package/dist/stencil-library/{utils-CiUp9KGZ.js → utils-kwLwITIE.js} +1 -1
  194. package/dist/stencil-library/utils-kwLwITIE.js.map +1 -0
  195. package/dist/types/components/forms/udp-forms/udp-forms-builder/forms-builder-utils.d.ts +2 -2
  196. package/dist/types/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/date-time-renderer/date-time-renderer.d.ts +1 -1
  197. package/dist/types/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/file-upload-renderer/file-upload-renderer.d.ts +1 -1
  198. package/dist/types/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/form-metadata-display-renderer/form-metadata-display-renderer.d.ts +1 -1
  199. package/dist/types/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/list-option-renderer/list-options-renderer.d.ts +1 -1
  200. package/dist/types/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/signature-renderer/signature-renderer.d.ts +1 -1
  201. package/dist/types/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/text-input-renderer/text-input-renderer.d.ts +1 -1
  202. package/dist/types/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-question-template.d.ts +1 -1
  203. package/dist/types/components/forms/udp-forms/udp-forms-builder/udp-forms-builder.d.ts +2 -2
  204. package/dist/types/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-ui/udp-forms-ui.d.ts +4 -4
  205. package/dist/types/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-utils.d.ts +12 -0
  206. package/dist/types/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer.d.ts +4 -9
  207. package/dist/types/components/forms/udp-forms/{utils → udp-forms-utils}/classes/UdpFormSubmission.d.ts +4 -5
  208. package/dist/types/components/forms/udp-forms/{utils → udp-forms-utils}/enums.d.ts +5 -0
  209. package/dist/types/components/forms/udp-forms/{utils → udp-forms-utils}/types.d.ts +0 -1
  210. package/dist/types/components/forms/udp-forms/{utils → udp-forms-utils}/utils.d.ts +1 -1
  211. package/dist/types/components/forms/udp-forms/udp-question/udp-question-comment/udp-question-comments.d.ts +2 -2
  212. package/dist/types/components/forms/udp-forms/udp-question/udp-question.d.ts +4 -4
  213. package/dist/types/components.d.ts +32 -30
  214. package/package.json +1 -1
  215. package/dist/cjs/enums-DVbZnzL8.js.map +0 -1
  216. package/dist/cjs/udp-forms-builder-question-template-CNONS2l5.js.map +0 -1
  217. package/dist/cjs/utils-DZ_OMtAy.js.map +0 -1
  218. package/dist/collection/components/forms/udp-forms/utils/classes/UdpForm.js.map +0 -1
  219. package/dist/collection/components/forms/udp-forms/utils/classes/UdpFormSubmission.js.map +0 -1
  220. package/dist/collection/components/forms/udp-forms/utils/enums.js.map +0 -1
  221. package/dist/collection/components/forms/udp-forms/utils/form-handler/IFormHandler.js.map +0 -1
  222. package/dist/collection/components/forms/udp-forms/utils/form-handler/UdpFormHandler.js.map +0 -1
  223. package/dist/collection/components/forms/udp-forms/utils/form-submission-handler/FormSubmissionHandlerFactory.js.map +0 -1
  224. package/dist/collection/components/forms/udp-forms/utils/form-submission-handler/IFormSubmissionHandler.js.map +0 -1
  225. package/dist/collection/components/forms/udp-forms/utils/form-submission-handler/PrivateFormSubmissionHandler.js.map +0 -1
  226. package/dist/collection/components/forms/udp-forms/utils/form-submission-handler/PublicFormSubmissionHandler.js.map +0 -1
  227. package/dist/collection/components/forms/udp-forms/utils/form-submission-handler/formUtils.js.map +0 -1
  228. package/dist/collection/components/forms/udp-forms/utils/types.js.map +0 -1
  229. package/dist/collection/components/forms/udp-forms/utils/utils.js.map +0 -1
  230. package/dist/esm/enums-CHxgVY-B.js.map +0 -1
  231. package/dist/esm/udp-forms-builder-question-template-DQJb7f4Y.js.map +0 -1
  232. package/dist/esm/utils-CiUp9KGZ.js.map +0 -1
  233. package/dist/stencil-library/enums-CHxgVY-B.js.map +0 -1
  234. package/dist/stencil-library/udp-forms-builder-question-template-DQJb7f4Y.js.map +0 -1
  235. package/dist/stencil-library/utils-CiUp9KGZ.js.map +0 -1
  236. /package/dist/collection/components/forms/udp-forms/{utils → udp-forms-utils}/classes/UdpForm.js +0 -0
  237. /package/dist/collection/components/forms/udp-forms/{utils → udp-forms-utils}/form-handler/IFormHandler.js +0 -0
  238. /package/dist/collection/components/forms/udp-forms/{utils → udp-forms-utils}/form-handler/UdpFormHandler.js +0 -0
  239. /package/dist/collection/components/forms/udp-forms/{utils → udp-forms-utils}/form-submission-handler/FormSubmissionHandlerFactory.js +0 -0
  240. /package/dist/collection/components/forms/udp-forms/{utils → udp-forms-utils}/form-submission-handler/IFormSubmissionHandler.js +0 -0
  241. /package/dist/collection/components/forms/udp-forms/{utils → udp-forms-utils}/form-submission-handler/PublicFormSubmissionHandler.js +0 -0
  242. /package/dist/collection/components/forms/udp-forms/{utils → udp-forms-utils}/form-submission-handler/formUtils.js +0 -0
  243. /package/dist/collection/components/forms/udp-forms/{utils → udp-forms-utils}/types.js +0 -0
  244. /package/dist/types/components/forms/udp-forms/{utils → udp-forms-utils}/classes/UdpForm.d.ts +0 -0
  245. /package/dist/types/components/forms/udp-forms/{utils → udp-forms-utils}/form-handler/IFormHandler.d.ts +0 -0
  246. /package/dist/types/components/forms/udp-forms/{utils → udp-forms-utils}/form-handler/UdpFormHandler.d.ts +0 -0
  247. /package/dist/types/components/forms/udp-forms/{utils → udp-forms-utils}/form-submission-handler/FormSubmissionHandlerFactory.d.ts +0 -0
  248. /package/dist/types/components/forms/udp-forms/{utils → udp-forms-utils}/form-submission-handler/IFormSubmissionHandler.d.ts +0 -0
  249. /package/dist/types/components/forms/udp-forms/{utils → udp-forms-utils}/form-submission-handler/PrivateFormSubmissionHandler.d.ts +0 -0
  250. /package/dist/types/components/forms/udp-forms/{utils → udp-forms-utils}/form-submission-handler/PublicFormSubmissionHandler.d.ts +0 -0
  251. /package/dist/types/components/forms/udp-forms/{utils → udp-forms-utils}/form-submission-handler/formUtils.d.ts +0 -0
@@ -2,10 +2,10 @@
2
2
 
3
3
  var index = require('./index-CGCOXUJE.js');
4
4
  var lodash = require('lodash');
5
- var enums = require('./enums-DVbZnzL8.js');
6
5
  var tenantUtils = require('./tenantUtils-BCKSE0vq.js');
7
6
  var udpFormApiUtils = require('./udp-form-api-utils-BwNeblH_.js');
8
- var utils = require('./utils-DZ_OMtAy.js');
7
+ var enums = require('./enums-CgcTuQjC.js');
8
+ var utils = require('./utils-Bp02BX38.js');
9
9
  var makeApiCall = require('./makeApiCall-CFfg9gI0.js');
10
10
  var SearchBuilder = require('./SearchBuilder-C1sUitjQ.js');
11
11
  var configService = require('./configService-BmGAegZf.js');
@@ -111,15 +111,13 @@ class UdpFormSubmission {
111
111
  // Form Data Processing
112
112
  // =============================
113
113
  processSubmissionIntoFormDataWithoutValues(status) {
114
- const statusValue = this.resolveSubmissionStatus(status);
115
- const baseData = this.buildBaseSubmissionData(statusValue);
114
+ const baseData = this.buildBaseSubmissionData(status);
116
115
  const formData = makeApiCall.createFormData(baseData);
117
116
  formData.append('Data', JSON.stringify(this.data));
118
117
  return formData;
119
118
  }
120
119
  processSubmissionIntoFormData(formInputValuesAndMetadata, status) {
121
- const statusValue = this.resolveSubmissionStatus(status);
122
- const baseData = this.buildBaseSubmissionData(statusValue);
120
+ const baseData = this.buildBaseSubmissionData(status);
123
121
  const { cleanedData, files } = this.extractCleanedDataAndFiles(formInputValuesAndMetadata);
124
122
  const formData = makeApiCall.createFormData(baseData);
125
123
  files.forEach(file => formData.append('FormFiles', file));
@@ -130,18 +128,11 @@ class UdpFormSubmission {
130
128
  formData.append('Data', JSON.stringify(submissionDataObject));
131
129
  return formData;
132
130
  }
133
- resolveSubmissionStatus(status) {
134
- if (status === 'submitted')
135
- return 2;
136
- if (status === 'in-progress')
137
- return 1;
138
- return typeof status === 'number' ? status : 1;
139
- }
140
131
  buildBaseSubmissionData(statusValue) {
141
132
  const baseData = {
142
133
  FormId: this.formId,
143
134
  FormVersion: this.formVersion.toString(),
144
- Status: statusValue.toString(),
135
+ Status: statusValue,
145
136
  };
146
137
  if (this.id) {
147
138
  baseData.Id = this.id;
@@ -338,7 +329,7 @@ class PrivateFormSubmissionHandler {
338
329
  * @returns newly created UdpFormSubmission
339
330
  */
340
331
  async createNewLinkedFollowUpFormSubmission(udpFormSubmission) {
341
- const formData = await this.saveFormDataWithoutValues(udpFormSubmission, 'in-progress');
332
+ const formData = await this.saveFormDataWithoutValues(udpFormSubmission, enums.UdpFormsSubmissionStatusEnum.InProgress);
342
333
  return formData;
343
334
  }
344
335
  /**
@@ -392,7 +383,7 @@ class PrivateFormSubmissionHandler {
392
383
  * @returns updated UdpFormSubmission
393
384
  */
394
385
  async saveCurrentFormSubmissionState(values, udpFormSubmission) {
395
- return this.saveSubmissionToDB(values, udpFormSubmission, 'in-progress');
386
+ return this.saveSubmissionToDB(values, udpFormSubmission, enums.UdpFormsSubmissionStatusEnum.InProgress);
396
387
  }
397
388
  /**
398
389
  * Finalize and submit the form (set state to 'submitted').
@@ -404,7 +395,7 @@ class PrivateFormSubmissionHandler {
404
395
  * @returns updated UdpFormSubmission
405
396
  */
406
397
  async finalizeFormSubmissionState(values, udpFormSubmission) {
407
- return this.saveSubmissionToDB(values, udpFormSubmission, 'submitted');
398
+ return this.saveSubmissionToDB(values, udpFormSubmission, enums.UdpFormsSubmissionStatusEnum.Submitted);
408
399
  }
409
400
  // =============================
410
401
  // Helpers
@@ -464,9 +455,10 @@ class PrivateFormSubmissionHandler {
464
455
  * @returns updated UdpFormSubmission
465
456
  */
466
457
  async saveCommentsToDB(values, udpFormSubmission) {
458
+ var _a;
467
459
  try {
468
460
  const method = 'PUT';
469
- const status = udpFormSubmission.status || 2; // default to 'submitted' if status is null
461
+ const status = (_a = udpFormSubmission.status) !== null && _a !== void 0 ? _a : enums.UdpFormsSubmissionStatusEnum.Submitted;
470
462
  const url = `${configService.ConfigService.productV1ApiUrl}/UdpFormSubmission/${udpFormSubmission.id}`;
471
463
  const formData = udpFormSubmission.processSubmissionIntoFormData(values, status);
472
464
  const response = await makeApiCall.makeApiCall(method, url, formData, true);
@@ -532,14 +524,209 @@ class UdpForm {
532
524
  }
533
525
  }
534
526
 
527
+ // utility to find repeat group keys from current values
528
+ const findRepeatGroupKeys = (sectionName, values) => {
529
+ const keys = Object.keys(values);
530
+ const repeatGroupSet = new Set();
531
+ // Match: sectionName_2
532
+ const regex = new RegExp(`^${sectionName}_(\\d+)`);
533
+ keys.forEach(key => {
534
+ const match = key.match(regex);
535
+ if (match && match[1]) {
536
+ repeatGroupSet.add(Number(match[1]));
537
+ }
538
+ });
539
+ return Array.from(repeatGroupSet).sort((a, b) => a - b);
540
+ };
541
+ // build dynamic sections based on the master form
542
+ const initializeDynamicSections = (udpForm, currentValues) => {
543
+ var _a;
544
+ const dynamicSections = [];
545
+ const sortedSections = structuredClone(udpForm.udpFormUdpFormSection).sort((a, b) => a.order - b.order);
546
+ for (const section of sortedSections) {
547
+ section.sectionProperties = JSON.parse(section.sectionProperties || {});
548
+ const repeatGroupKeys = findRepeatGroupKeys(section.name, currentValues);
549
+ section.isOriginalSection = true;
550
+ section.sectionPositionSuffix = 1; // default position
551
+ // always add the original section into dynamic sections
552
+ dynamicSections.push(Object.assign(Object.assign({}, structuredClone(section)), {
553
+ // dynamicSectionName: section.name,
554
+ formQuestions: structuredClone(udpForm.formQuestions)
555
+ .filter(q => q.formSectionId === section.id)
556
+ .sort((a, b) => a.questionOrder - b.questionOrder)
557
+ .map(q => (Object.assign(Object.assign({}, q), { questionIdentifierKey: `${section.name}.${q.name}`, isShowCommentInput: true })))
558
+ }));
559
+ // create then add additional sections if there are repeated sections
560
+ if (((_a = section.sectionProperties) === null || _a === void 0 ? void 0 : _a.isRepeatable) && repeatGroupKeys.length > 0) {
561
+ const maxRepeatedSectionSuffix = Math.max(...repeatGroupKeys); // create a new section for the max value of repeat group keys, even if there are no saved answers
562
+ // for (const repeatKey of repeatGroupKeys) { // create a section only for the suffix saved
563
+ for (let repeatKey = 2; repeatKey <= maxRepeatedSectionSuffix; repeatKey++) {
564
+ const clonedSection = Object.assign(Object.assign({}, structuredClone(section)), { formQuestions: structuredClone(udpForm.formQuestions)
565
+ .filter(q => q.formSectionId === section.id)
566
+ .sort((a, b) => a.questionOrder - b.questionOrder)
567
+ .map(q => (Object.assign(Object.assign({}, q), { questionIdentifierKey: `${section.name}_${repeatKey}.${q.name}`, isShowCommentInput: true }))), isOriginalSection: false, sectionPositionSuffix: repeatKey });
568
+ dynamicSections.push(clonedSection);
569
+ }
570
+ }
571
+ }
572
+ return dynamicSections;
573
+ };
574
+ // urlContext is derived from query params that start with `udpf_` (see useUdpFormParameters).
575
+ // Keys are stored without the prefix, e.g. `udpf_section1_3.question1=val` -> urlContext['section1_3.question1'] = 'val'
576
+ // This helper finds the maximum repeat suffix requested by urlContext for a given section base name.
577
+ // Example: { 'sectionA_3.q1': 'x', 'sectionA_2.q2': 'y' } -> { sectionA: 3 }
578
+ const getMaxRepeatSuffixBySectionFromUrlContext = (urlContext) => {
579
+ const context = (urlContext && typeof urlContext === 'object') ? urlContext : {};
580
+ const maxBySection = {};
581
+ Object.keys(context).forEach(key => {
582
+ var _a;
583
+ // Expect keys like: sectionName_3.questionName
584
+ // Only treat it as a repeat hint if it has a dot after the suffix.
585
+ const match = key.match(/^([^._?&#]+)_(\d+)\./);
586
+ if (!match)
587
+ return;
588
+ const baseSectionName = match[1];
589
+ const suffix = Number(match[2]);
590
+ if (!Number.isFinite(suffix) || suffix < 2)
591
+ return;
592
+ const existing = (_a = maxBySection[baseSectionName]) !== null && _a !== void 0 ? _a : 1;
593
+ if (suffix > existing)
594
+ maxBySection[baseSectionName] = suffix;
595
+ });
596
+ return maxBySection;
597
+ };
598
+ // build dynamic sections based on the master form plus optional repeat hints from URL context
599
+ const initializeDynamicSectionsWithUrlContext = (udpForm, currentValues, urlContext) => {
600
+ var _a, _b;
601
+ const maxRepeatFromUrl = getMaxRepeatSuffixBySectionFromUrlContext(urlContext);
602
+ const dynamicSections = [];
603
+ const sortedSections = structuredClone(udpForm.udpFormUdpFormSection).sort((a, b) => a.order - b.order);
604
+ for (const section of sortedSections) {
605
+ section.sectionProperties = JSON.parse(section.sectionProperties || {});
606
+ const repeatGroupKeys = findRepeatGroupKeys(section.name, currentValues);
607
+ const maxRepeatedFromValues = repeatGroupKeys.length > 0 ? Math.max(...repeatGroupKeys) : 1;
608
+ const maxRepeatedFromUrl = (_a = maxRepeatFromUrl === null || maxRepeatFromUrl === void 0 ? void 0 : maxRepeatFromUrl[section.name]) !== null && _a !== void 0 ? _a : 1;
609
+ const maxRepeatedSectionSuffix = Math.max(maxRepeatedFromValues, maxRepeatedFromUrl);
610
+ section.isOriginalSection = true;
611
+ section.sectionPositionSuffix = 1; // default position
612
+ // always add the original section into dynamic sections
613
+ dynamicSections.push(Object.assign(Object.assign({}, structuredClone(section)), { formQuestions: structuredClone(udpForm.formQuestions)
614
+ .filter(q => q.formSectionId === section.id)
615
+ .sort((a, b) => a.questionOrder - b.questionOrder)
616
+ .map(q => (Object.assign(Object.assign({}, q), { questionIdentifierKey: `${section.name}.${q.name}`, isShowCommentInput: true }))) }));
617
+ // create then add additional sections if repeatable and suffix requested by saved values or url
618
+ if (((_b = section.sectionProperties) === null || _b === void 0 ? void 0 : _b.isRepeatable) && maxRepeatedSectionSuffix >= 2) {
619
+ for (let repeatKey = 2; repeatKey <= maxRepeatedSectionSuffix; repeatKey++) {
620
+ const clonedSection = Object.assign(Object.assign({}, structuredClone(section)), { formQuestions: structuredClone(udpForm.formQuestions)
621
+ .filter(q => q.formSectionId === section.id)
622
+ .sort((a, b) => a.questionOrder - b.questionOrder)
623
+ .map(q => (Object.assign(Object.assign({}, q), { questionIdentifierKey: `${section.name}_${repeatKey}.${q.name}`, isShowCommentInput: true }))), isOriginalSection: false, sectionPositionSuffix: repeatKey });
624
+ dynamicSections.push(clonedSection);
625
+ }
626
+ }
627
+ }
628
+ return dynamicSections;
629
+ };
630
+ const applyUrlSeedValuesForAll = (dynamicSections, urlContext) => {
631
+ if (!Array.isArray(dynamicSections))
632
+ return;
633
+ // urlContext is derived from query params that start with `udpf_` (see useUdpFormParameters).
634
+ // Keys are stored without the prefix, e.g. `udpf_section1.question1=val` -> urlContext['section1.question1'] = 'val'
635
+ const context = (urlContext && typeof urlContext === 'object') ? urlContext : {};
636
+ // Build a case-insensitive view of urlContext so callers can use udpf_ keys without worrying about case.
637
+ // If duplicate keys exist with different casing, the last one encountered wins.
638
+ const contextCI = {};
639
+ Object.keys(context).forEach(k => {
640
+ contextCI[String(k).toLowerCase()] = context[k];
641
+ });
642
+ // 1) Collect URL values into nested structure: { [sectionKey]: { [questionName]: { value, comments: [] } } }
643
+ const urlValuesNested = {};
644
+ dynamicSections.forEach(section => {
645
+ const sectionKey = section.isOriginalSection
646
+ ? section.name
647
+ : `${section.name}_${section.sectionPositionSuffix}`;
648
+ (section.formQuestions || []).forEach(q => {
649
+ if (!q)
650
+ return;
651
+ const candidates = [q.processedSubmissionName, q.questionIdentifierKey, q.name].filter(Boolean);
652
+ let urlVal = undefined;
653
+ for (const c of candidates) {
654
+ const key = String(c).toLowerCase();
655
+ if (Object.prototype.hasOwnProperty.call(contextCI, key)) {
656
+ urlVal = contextCI[key];
657
+ break;
658
+ }
659
+ }
660
+ if (urlVal !== undefined && urlVal !== null) {
661
+ if (!urlValuesNested[sectionKey])
662
+ urlValuesNested[sectionKey] = {};
663
+ urlValuesNested[sectionKey][q.name] = { value: urlVal, comments: [] };
664
+ }
665
+ });
666
+ });
667
+ // Caller is responsible for merging with saved submissionResponseData.
668
+ // Here we only return the url-derived seed values + paragraph defaults.
669
+ const merged = {};
670
+ Object.entries(urlValuesNested).forEach(([sectionKey, qMap]) => {
671
+ if (!merged[sectionKey])
672
+ merged[sectionKey] = {};
673
+ Object.entries(qMap).forEach(([qName, valObj]) => {
674
+ const existing = merged[sectionKey][qName];
675
+ // Only set from URL if no saved value exists (null/undefined/empty-string)
676
+ const isMissing = existing == null ||
677
+ existing.value == null ||
678
+ (typeof existing.value === 'string' && existing.value.trim() === '');
679
+ if (isMissing) {
680
+ merged[sectionKey][qName] = valObj;
681
+ }
682
+ });
683
+ });
684
+ // 3) Paragraph defaults: if still undefined/null, use fieldProperties.paragraphText
685
+ dynamicSections.forEach(section => {
686
+ const sectionKey = section.isOriginalSection
687
+ ? section.name
688
+ : `${section.name}_${section.sectionPositionSuffix}`;
689
+ if (!merged[sectionKey])
690
+ merged[sectionKey] = {};
691
+ (section.formQuestions || []).forEach(q => {
692
+ var _a;
693
+ if (!q)
694
+ return;
695
+ if (q.fieldTypeId === enums.UdpFormsFieldTypeEnum.Paragraph) {
696
+ const existing = merged[sectionKey][q.name];
697
+ const isMissing = existing == null ||
698
+ existing.value == null ||
699
+ (typeof existing.value === 'string' && existing.value.trim() === '');
700
+ if (isMissing) {
701
+ let fieldProps = q === null || q === void 0 ? void 0 : q.fieldProperties;
702
+ if (typeof fieldProps === 'string') {
703
+ try {
704
+ fieldProps = JSON.parse(fieldProps || '{}');
705
+ }
706
+ catch (_b) {
707
+ fieldProps = {};
708
+ }
709
+ }
710
+ merged[sectionKey][q.name] = {
711
+ value: (_a = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.paragraphText) !== null && _a !== void 0 ? _a : '',
712
+ comments: [],
713
+ };
714
+ }
715
+ }
716
+ });
717
+ });
718
+ return merged;
719
+ };
720
+
535
721
  const UdpFormsRenderer = class {
536
722
  constructor(hostRef) {
537
723
  index.registerInstance(this, hostRef);
538
724
  this.isPublic = false;
539
725
  this.autoSaveDelay = 2000; // Debounce delay for auto-save in milliseconds (currently disabled)
540
- this.initialValues = {};
726
+ this.urlContext = {}; // additional context from URL if needed, eg. generic1, gernic2, generic3, or any initial prepopulated values for form inputs. eg section1.question1 = 'some value'
727
+ this.currentValues = {}; // values of the current form state
728
+ this.formInputSeedValues = {}; // support for a initial set of values to seed the form with
541
729
  this.submitSuccessful = false;
542
- this.currentFormData = {};
543
730
  this.isLoading = false;
544
731
  this.isSaving = false;
545
732
  this.isSubmitted = false;
@@ -594,7 +781,7 @@ const UdpFormsRenderer = class {
594
781
  return;
595
782
  const cloningSectionName = sectionToClone.name;
596
783
  // Find existing repeat group indices
597
- const repeatKeys = this.findRepeatGroupKeys(cloningSectionName, this.initialValues);
784
+ const repeatKeys = findRepeatGroupKeys(cloningSectionName, this.currentValues);
598
785
  const nextRepeatIndex = repeatKeys.length > 0 ? Math.max(...repeatKeys) + 1 : 2;
599
786
  const clonedSection = Object.assign(Object.assign({}, structuredClone(sectionToClone)), { formQuestions: sectionToClone.formQuestions.map(q => {
600
787
  const newQuestionObj = structuredClone(q);
@@ -619,13 +806,13 @@ const UdpFormsRenderer = class {
619
806
  ...this.dynamicSections.slice(insertAtIndex + 1),
620
807
  ];
621
808
  // Create new initial values structure
622
- const newInitialValues = structuredClone(this.udpFormSubmission.data.submissionResponseData);
809
+ const newCurrentValues = structuredClone(this.udpFormSubmission.data.submissionResponseData);
623
810
  clonedSection.formQuestions.forEach(q => {
624
811
  var _a, _b, _c, _d;
625
812
  const newSectionNameWithSuffix = `${cloningSectionName}_${nextRepeatIndex}`;
626
813
  const newQuestionName = q.name;
627
- if (!newInitialValues[newSectionNameWithSuffix]) {
628
- newInitialValues[newSectionNameWithSuffix] = {};
814
+ if (!newCurrentValues[newSectionNameWithSuffix]) {
815
+ newCurrentValues[newSectionNameWithSuffix] = {};
629
816
  }
630
817
  // Preserve only Paragraph values from the source section; clear others
631
818
  let value = '';
@@ -647,11 +834,11 @@ const UdpFormsRenderer = class {
647
834
  const paragraphDefault = (_d = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.paragraphText) !== null && _d !== void 0 ? _d : '';
648
835
  value = sourceVal !== null && sourceVal !== void 0 ? sourceVal : paragraphDefault;
649
836
  }
650
- newInitialValues[newSectionNameWithSuffix][newQuestionName] = { value, comments: [], metadata: {} };
837
+ newCurrentValues[newSectionNameWithSuffix][newQuestionName] = { value, comments: [], metadata: {} };
651
838
  });
652
839
  // This will trigger a complete form re-render
653
- this.initialValues = Object.assign({}, newInitialValues);
654
- this.udpFormSubmission.data.submissionResponseData = Object.assign({}, newInitialValues);
840
+ this.currentValues = Object.assign({}, newCurrentValues);
841
+ this.udpFormSubmission.data.submissionResponseData = Object.assign({}, newCurrentValues);
655
842
  this.triggerFormRerender();
656
843
  }
657
844
  finally {
@@ -675,8 +862,8 @@ const UdpFormsRenderer = class {
675
862
  const deleteSectionName = sectionToDelete.name;
676
863
  const deleteSuffix = sectionToDelete.sectionPositionSuffix;
677
864
  const sectionKeyToDelete = `${deleteSectionName}_${deleteSuffix}`;
678
- const newInitialValues = Object.assign({}, this.udpFormSubmission.data.submissionResponseData);
679
- delete newInitialValues[sectionKeyToDelete];
865
+ const newCurrentValues = Object.assign({}, this.udpFormSubmission.data.submissionResponseData);
866
+ delete newCurrentValues[sectionKeyToDelete];
680
867
  // Remove the section from dynamicSections
681
868
  const updatedSections = structuredClone(this.dynamicSections);
682
869
  updatedSections.splice(index, 1);
@@ -700,14 +887,14 @@ const UdpFormsRenderer = class {
700
887
  return newSectionQuestion;
701
888
  });
702
889
  // Move data in initial values
703
- if (newInitialValues[oldSectionKey]) {
704
- newInitialValues[newSectionKey] = structuredClone(newInitialValues[oldSectionKey]);
705
- delete newInitialValues[oldSectionKey];
890
+ if (newCurrentValues[oldSectionKey]) {
891
+ newCurrentValues[newSectionKey] = structuredClone(newCurrentValues[oldSectionKey]);
892
+ delete newCurrentValues[oldSectionKey];
706
893
  }
707
894
  });
708
895
  this.dynamicSections = updatedSections;
709
- this.initialValues = Object.assign({}, newInitialValues);
710
- this.udpFormSubmission.data.submissionResponseData = Object.assign({}, newInitialValues);
896
+ this.currentValues = Object.assign({}, newCurrentValues);
897
+ this.udpFormSubmission.data.submissionResponseData = Object.assign({}, newCurrentValues);
711
898
  this.triggerFormRerender();
712
899
  }
713
900
  finally {
@@ -725,7 +912,7 @@ const UdpFormsRenderer = class {
725
912
  try {
726
913
  const updatedUdpFormSubmission = await this.formSubmissionHandler.saveCurrentFormSubmissionState(values, this.udpFormSubmission);
727
914
  this.udpFormSubmission = updatedUdpFormSubmission;
728
- this.initialValues = Object.assign({}, (((_a = updatedUdpFormSubmission.data) === null || _a === void 0 ? void 0 : _a.submissionResponseData) || {}));
915
+ this.currentValues = Object.assign({}, (((_a = updatedUdpFormSubmission.data) === null || _a === void 0 ? void 0 : _a.submissionResponseData) || {}));
729
916
  if (!new URLSearchParams(window.location.search).has('udpf_submissionId')) {
730
917
  // replace the current entry's query string with udpf_submissionId without needing to know the path
731
918
  this.replaceUrlWithSubmissionId(updatedUdpFormSubmission.id);
@@ -750,7 +937,7 @@ const UdpFormsRenderer = class {
750
937
  try {
751
938
  const updatedUdpFormSubmission = await this.formSubmissionHandler.saveFormSubmissionComments(values, this.udpFormSubmission);
752
939
  this.udpFormSubmission = updatedUdpFormSubmission;
753
- this.initialValues = Object.assign({}, (((_a = updatedUdpFormSubmission.data) === null || _a === void 0 ? void 0 : _a.submissionResponseData) || {}));
940
+ this.currentValues = Object.assign({}, (((_a = updatedUdpFormSubmission.data) === null || _a === void 0 ? void 0 : _a.submissionResponseData) || {}));
754
941
  this.enqueueSnackbar('Saved sucessfully.', {
755
942
  variant: 'success',
756
943
  anchorOrigin: { vertical: 'top', horizontal: 'center' },
@@ -782,7 +969,7 @@ const UdpFormsRenderer = class {
782
969
  try {
783
970
  const updatedUdpFormSubmission = await this.formSubmissionHandler.saveCurrentFormSubmissionState(values, this.udpFormSubmission);
784
971
  this.udpFormSubmission = updatedUdpFormSubmission;
785
- this.initialValues = Object.assign({}, (((_a = updatedUdpFormSubmission.data) === null || _a === void 0 ? void 0 : _a.submissionResponseData) || {}));
972
+ this.currentValues = Object.assign({}, (((_a = updatedUdpFormSubmission.data) === null || _a === void 0 ? void 0 : _a.submissionResponseData) || {}));
786
973
  if (!new URLSearchParams(window.location.search).has('udpf_submissionId')) {
787
974
  // replace the current entry's query string with udpf_submissionId without needing to know the path
788
975
  this.replaceUrlWithSubmissionId(updatedUdpFormSubmission.id);
@@ -832,7 +1019,7 @@ const UdpFormsRenderer = class {
832
1019
  // create a new follow up form submission instance wiht a link to the parent form submission
833
1020
  const followUpMasterForm = await this.formHandler.getFormByFormIdAndFormVersion(followUpFormId, followUpFormVersion);
834
1021
  const followUpSubmissionData = {
835
- submissionResponseData: utils.buildEmptyInitialValues(followUpMasterForm),
1022
+ submissionResponseData: utils.buildEmptyCurrentValues(followUpMasterForm),
836
1023
  submissionMetadata: {
837
1024
  ParentSubmission: {
838
1025
  submissionId: parentFormSubmissionId,
@@ -885,7 +1072,7 @@ const UdpFormsRenderer = class {
885
1072
  this.clientUserInfo.email = user.email || null;
886
1073
  }
887
1074
  this.formSubmissionHandler = FormSubmissionHandlerFactory.create(this.isPublic, this.clientUserInfo.id);
888
- this.udpFormSubmission = new UdpFormSubmission({ id: this.submissionId, formId: this.formId, formVersion: this.version, unityUserId: this.clientUserInfo.id, generic1: this.generic1, generic2: this.generic2, generic3: this.generic3 });
1075
+ this.udpFormSubmission = new UdpFormSubmission({ id: this.submissionId, formId: this.formId, formVersion: this.version, unityUserId: this.clientUserInfo.id, generic1: this.urlContext.generic1, generic2: this.urlContext.generic2, generic3: this.urlContext.generic3 });
889
1076
  // fetch existing submission from Udp.FormSubmission if submissionId is provided
890
1077
  // take exisitng object, and populate with db values, and return new obj with updated values
891
1078
  if (this.submissionId) {
@@ -905,18 +1092,29 @@ const UdpFormsRenderer = class {
905
1092
  this.formHandler = new UdpFormHandler(this.tenantId);
906
1093
  const formData = await this.formHandler.getFormByFormIdAndFormVersion(formId, formVersion);
907
1094
  this.udpForm = new UdpForm(formData);
908
- this.initialValues = utils.buildEmptyInitialValues(this.udpForm);
1095
+ this.currentValues = utils.buildEmptyCurrentValues(this.udpForm);
909
1096
  // if there's existing data, update the form's state
910
1097
  if (this.udpFormSubmission.data.submissionResponseData) {
911
- this.initialValues = Object.assign({}, this.udpFormSubmission.data.submissionResponseData);
912
- if (this.udpFormSubmission.status === 2 || this.udpFormSubmission.status === 'submitted') {
1098
+ this.currentValues = Object.assign({}, this.udpFormSubmission.data.submissionResponseData);
1099
+ if (this.udpFormSubmission.status === enums.UdpFormsSubmissionStatusEnum.Submitted) {
913
1100
  this.isSubmitted = true;
914
1101
  }
915
1102
  }
916
- this.initializeDynamicSections(); // process the master form into dynamic sections
917
- // After sections/questions are prepared, seed initial values from URL for ALL questions,
918
- // with saved values taking precedence, and paragraph defaults as a fallback.
919
- this.applyUrlInitialValuesForAll();
1103
+ // For new submissions (un-instiantiated or in the 'created' status), we allow the seeding of initial values from URL params
1104
+ // So we build dynamicSections with urlContext first, then seed values.
1105
+ // URL params (udpf_*) may imply repeatable section instances (e.g. section1_3.question1).
1106
+ // For existing submissions that are in progress, skip URL-based seeding and do not create additional sections from URL.
1107
+ if ((!this.udpFormSubmission.id || this.udpFormSubmission.status === enums.UdpFormsSubmissionStatusEnum.Created) && this.urlContext && Object.keys(this.urlContext).length > 0) {
1108
+ this.dynamicSections = initializeDynamicSectionsWithUrlContext(this.udpForm, this.currentValues, this.urlContext);
1109
+ const seeded = applyUrlSeedValuesForAll(this.dynamicSections, this.urlContext);
1110
+ if (seeded) {
1111
+ this.currentValues = seeded;
1112
+ this.udpFormSubmission.data.submissionResponseData = Object.assign({}, seeded);
1113
+ }
1114
+ }
1115
+ else {
1116
+ this.dynamicSections = initializeDynamicSections(this.udpForm, this.currentValues);
1117
+ }
920
1118
  // Set up throttled manual save function (5 seconds) - fires immediately, then throttles
921
1119
  this.debouncedManualSave = lodash.throttle(async (values) => {
922
1120
  await this.handleManualSave(values);
@@ -933,136 +1131,6 @@ const UdpFormsRenderer = class {
933
1131
  this.isLoading = false;
934
1132
  }
935
1133
  }
936
- // build dynamic sections based on the
937
- initializeDynamicSections() {
938
- var _a;
939
- const tempDynamicSection = [];
940
- const sortedSections = structuredClone(this.udpForm.udpFormUdpFormSection).sort((a, b) => a.order - b.order);
941
- for (const section of sortedSections) {
942
- section.sectionProperties = JSON.parse(section.sectionProperties || {});
943
- const repeatGroupKeys = this.findRepeatGroupKeys(section.name, this.initialValues);
944
- section.isOriginalSection = true;
945
- section.sectionPositionSuffix = 1; // default position
946
- // always add the original section into dynamic sections
947
- tempDynamicSection.push(Object.assign(Object.assign({}, structuredClone(section)), {
948
- // dynamicSectionName: section.name,
949
- formQuestions: structuredClone(this.udpForm.formQuestions)
950
- .filter(q => q.formSectionId === section.id)
951
- .sort((a, b) => a.questionOrder - b.questionOrder)
952
- .map(q => (Object.assign(Object.assign({}, q), { questionIdentifierKey: `${section.name}.${q.name}`, isShowCommentInput: true })))
953
- }));
954
- // create then add additional sections if there are repeated sections
955
- if (((_a = section.sectionProperties) === null || _a === void 0 ? void 0 : _a.isRepeatable) && repeatGroupKeys.length > 0) {
956
- const maxRepeatedSectionSuffix = Math.max(...repeatGroupKeys); // create a new section for the max value of repeat group keys, even if there are no saved answers
957
- // for (const repeatKey of repeatGroupKeys) { // create a section only for the suffix saved
958
- for (let repeatKey = 2; repeatKey <= maxRepeatedSectionSuffix; repeatKey++) {
959
- const clonedSection = Object.assign(Object.assign({}, structuredClone(section)), { formQuestions: structuredClone(this.udpForm.formQuestions)
960
- .filter(q => q.formSectionId === section.id)
961
- .sort((a, b) => a.questionOrder - b.questionOrder)
962
- .map(q => (Object.assign(Object.assign({}, q), { questionIdentifierKey: `${section.name}_${repeatKey}.${q.name}`, isShowCommentInput: true }))), isOriginalSection: false, sectionPositionSuffix: repeatKey });
963
- tempDynamicSection.push(clonedSection);
964
- }
965
- }
966
- }
967
- this.dynamicSections = tempDynamicSection;
968
- }
969
- findRepeatGroupKeys(sectionName, values) {
970
- const keys = Object.keys(values);
971
- const repeatGroupSet = new Set();
972
- // Match: sectionName_2
973
- const regex = new RegExp(`^${sectionName}_(\\d+)`);
974
- keys.forEach(key => {
975
- const match = key.match(regex);
976
- if (match && match[1]) {
977
- repeatGroupSet.add(Number(match[1]));
978
- }
979
- });
980
- return Array.from(repeatGroupSet).sort((a, b) => a - b);
981
- }
982
- // Build initial values from URL for ALL fields, but do NOT override saved values.
983
- // For Paragraph, also fall back to the builder's default text when nothing else provided.
984
- applyUrlInitialValuesForAll() {
985
- if (!Array.isArray(this.dynamicSections))
986
- return;
987
- const urlParams = typeof window !== 'undefined' ? new URLSearchParams(window.location.search) : null;
988
- // 1) Collect URL values into nested structure: { [sectionKey]: { [questionName]: { value, comments: [] } } }
989
- const urlValuesNested = {};
990
- if (urlParams) {
991
- this.dynamicSections.forEach(section => {
992
- const sectionKey = section.isOriginalSection
993
- ? section.name
994
- : `${section.name}_${section.sectionPositionSuffix}`;
995
- (section.formQuestions || []).forEach(q => {
996
- if (!q)
997
- return;
998
- const candidates = [q.processedSubmissionName, q.questionIdentifierKey, q.name].filter(Boolean);
999
- let urlVal = null;
1000
- for (const c of candidates) {
1001
- urlVal = urlParams.get(c);
1002
- if (urlVal !== null)
1003
- break;
1004
- }
1005
- if (urlVal !== null) {
1006
- if (!urlValuesNested[sectionKey])
1007
- urlValuesNested[sectionKey] = {};
1008
- urlValuesNested[sectionKey][q.name] = { value: urlVal, comments: [] };
1009
- }
1010
- });
1011
- });
1012
- }
1013
- // 2) Merge with saved values (this.initialValues) taking precedence
1014
- const merged = structuredClone(this.initialValues) || {};
1015
- Object.entries(urlValuesNested).forEach(([sectionKey, qMap]) => {
1016
- if (!merged[sectionKey])
1017
- merged[sectionKey] = {};
1018
- Object.entries(qMap).forEach(([qName, valObj]) => {
1019
- const existing = merged[sectionKey][qName];
1020
- // Only set from URL if no saved value exists (null/undefined/empty-string)
1021
- const isMissing = existing == null ||
1022
- existing.value == null ||
1023
- (typeof existing.value === 'string' && existing.value.trim() === '');
1024
- if (isMissing) {
1025
- merged[sectionKey][qName] = valObj;
1026
- }
1027
- });
1028
- });
1029
- // 3) Paragraph defaults: if still undefined/null, use fieldProperties.paragraphText
1030
- this.dynamicSections.forEach(section => {
1031
- const sectionKey = section.isOriginalSection
1032
- ? section.name
1033
- : `${section.name}_${section.sectionPositionSuffix}`;
1034
- if (!merged[sectionKey])
1035
- merged[sectionKey] = {};
1036
- (section.formQuestions || []).forEach(q => {
1037
- var _a;
1038
- if (!q)
1039
- return;
1040
- if (q.fieldTypeId === enums.UdpFormsFieldTypeEnum.Paragraph) {
1041
- const existing = merged[sectionKey][q.name];
1042
- const isMissing = existing == null ||
1043
- existing.value == null ||
1044
- (typeof existing.value === 'string' && existing.value.trim() === '');
1045
- if (isMissing) {
1046
- let fieldProps = q === null || q === void 0 ? void 0 : q.fieldProperties;
1047
- if (typeof fieldProps === 'string') {
1048
- try {
1049
- fieldProps = JSON.parse(fieldProps || '{}');
1050
- }
1051
- catch (_b) {
1052
- fieldProps = {};
1053
- }
1054
- }
1055
- merged[sectionKey][q.name] = {
1056
- value: (_a = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.paragraphText) !== null && _a !== void 0 ? _a : '',
1057
- comments: [],
1058
- };
1059
- }
1060
- }
1061
- });
1062
- });
1063
- this.initialValues = merged;
1064
- this.udpFormSubmission.data.submissionResponseData = Object.assign({}, merged);
1065
- }
1066
1134
  async handleSubmit(values) {
1067
1135
  this.isLoading = true;
1068
1136
  try {
@@ -1119,13 +1187,13 @@ const UdpFormsRenderer = class {
1119
1187
  try {
1120
1188
  const { type, questionIdentifierKey, commentId } = e.detail;
1121
1189
  const [sectionName, questionName] = questionIdentifierKey.split('.');
1122
- let newInitialValues = structuredClone(this.udpFormSubmission.data.submissionResponseData || {});
1190
+ let newCurrentValues = structuredClone(this.udpFormSubmission.data.submissionResponseData || {});
1123
1191
  // ensure structure exists WITHOUT overwriting existing data
1124
- if (!newInitialValues[sectionName])
1125
- newInitialValues[sectionName] = {};
1126
- if (!newInitialValues[sectionName][questionName]) {
1192
+ if (!newCurrentValues[sectionName])
1193
+ newCurrentValues[sectionName] = {};
1194
+ if (!newCurrentValues[sectionName][questionName]) {
1127
1195
  // create defaults but do not clobber any existing saved shape from submissionResponseData
1128
- newInitialValues[sectionName][questionName] = {
1196
+ newCurrentValues[sectionName][questionName] = {
1129
1197
  value: '',
1130
1198
  comments: [],
1131
1199
  draftComments: [],
@@ -1134,20 +1202,20 @@ const UdpFormsRenderer = class {
1134
1202
  }
1135
1203
  else {
1136
1204
  // ensure arrays/objects exist so later code can safely push/filter
1137
- newInitialValues[sectionName][questionName].comments = (_a = newInitialValues[sectionName][questionName].comments) !== null && _a !== void 0 ? _a : [];
1138
- newInitialValues[sectionName][questionName].draftComments = (_b = newInitialValues[sectionName][questionName].draftComments) !== null && _b !== void 0 ? _b : [];
1139
- newInitialValues[sectionName][questionName].metadata = (_c = newInitialValues[sectionName][questionName].metadata) !== null && _c !== void 0 ? _c : {};
1205
+ newCurrentValues[sectionName][questionName].comments = (_a = newCurrentValues[sectionName][questionName].comments) !== null && _a !== void 0 ? _a : [];
1206
+ newCurrentValues[sectionName][questionName].draftComments = (_b = newCurrentValues[sectionName][questionName].draftComments) !== null && _b !== void 0 ? _b : [];
1207
+ newCurrentValues[sectionName][questionName].metadata = (_c = newCurrentValues[sectionName][questionName].metadata) !== null && _c !== void 0 ? _c : {};
1140
1208
  }
1141
1209
  // normalize draftComments to array if needed (back-compat)
1142
- const maybeDraft = newInitialValues[sectionName][questionName].draftComments;
1210
+ const maybeDraft = newCurrentValues[sectionName][questionName].draftComments;
1143
1211
  if (maybeDraft && !Array.isArray(maybeDraft)) {
1144
- newInitialValues[sectionName][questionName].draftComments = [maybeDraft];
1212
+ newCurrentValues[sectionName][questionName].draftComments = [maybeDraft];
1145
1213
  }
1146
1214
  else if (!maybeDraft) {
1147
- newInitialValues[sectionName][questionName].draftComments = [];
1215
+ newCurrentValues[sectionName][questionName].draftComments = [];
1148
1216
  }
1149
- const commentsArr = newInitialValues[sectionName][questionName].comments || [];
1150
- const draftsArr = newInitialValues[sectionName][questionName].draftComments || [];
1217
+ const commentsArr = newCurrentValues[sectionName][questionName].comments || [];
1218
+ const draftsArr = newCurrentValues[sectionName][questionName].draftComments || [];
1151
1219
  switch (type) {
1152
1220
  case 'add': {
1153
1221
  const newDraft = {
@@ -1157,7 +1225,7 @@ const UdpFormsRenderer = class {
1157
1225
  timestamp: null,
1158
1226
  };
1159
1227
  // put new draft first so activeDraft === draftComments[0] matches UX
1160
- newInitialValues[sectionName][questionName].draftComments = [newDraft, ...draftsArr];
1228
+ newCurrentValues[sectionName][questionName].draftComments = [newDraft, ...draftsArr];
1161
1229
  break;
1162
1230
  }
1163
1231
  case 'save': {
@@ -1173,13 +1241,13 @@ const UdpFormsRenderer = class {
1173
1241
  if (existingIdx !== -1) {
1174
1242
  const newComments = [...commentsArr];
1175
1243
  newComments[existingIdx] = Object.assign({}, savedComment);
1176
- newInitialValues[sectionName][questionName].comments = newComments;
1244
+ newCurrentValues[sectionName][questionName].comments = newComments;
1177
1245
  }
1178
1246
  else {
1179
- newInitialValues[sectionName][questionName].comments = [...commentsArr, savedComment];
1247
+ newCurrentValues[sectionName][questionName].comments = [...commentsArr, savedComment];
1180
1248
  }
1181
1249
  // remove that draft
1182
- newInitialValues[sectionName][questionName].draftComments = draftsArr.filter(d => d.commentId !== commentId);
1250
+ newCurrentValues[sectionName][questionName].draftComments = draftsArr.filter(d => d.commentId !== commentId);
1183
1251
  break;
1184
1252
  }
1185
1253
  case 'edit': {
@@ -1189,13 +1257,13 @@ const UdpFormsRenderer = class {
1189
1257
  return;
1190
1258
  const draftFromSaved = Object.assign(Object.assign({}, saved), { isDraftComment: true, timestamp: null });
1191
1259
  // Add this draft at the front; keep saved comment intact so content doesn't disappear.
1192
- newInitialValues[sectionName][questionName].draftComments = [draftFromSaved, ...draftsArr];
1193
- newInitialValues[sectionName][questionName].comments = commentsArr;
1260
+ newCurrentValues[sectionName][questionName].draftComments = [draftFromSaved, ...draftsArr];
1261
+ newCurrentValues[sectionName][questionName].comments = commentsArr;
1194
1262
  break;
1195
1263
  }
1196
1264
  case 'delete': {
1197
1265
  // mark the comment as deleted and clear its value, then persist.
1198
- newInitialValues[sectionName][questionName].comments = commentsArr.map(c => {
1266
+ newCurrentValues[sectionName][questionName].comments = commentsArr.map(c => {
1199
1267
  if (c.commentId === commentId) {
1200
1268
  return Object.assign(Object.assign({}, c), { isDeleted: true, value: '', editedTimestamp: new Date().toISOString() });
1201
1269
  }
@@ -1205,18 +1273,18 @@ const UdpFormsRenderer = class {
1205
1273
  }
1206
1274
  case 'editClose': {
1207
1275
  // Cancel edit: remove the draft only, do NOT restore/alter saved comments.
1208
- newInitialValues[sectionName][questionName].draftComments = draftsArr.filter(d => d.commentId !== commentId);
1276
+ newCurrentValues[sectionName][questionName].draftComments = draftsArr.filter(d => d.commentId !== commentId);
1209
1277
  break;
1210
1278
  }
1211
1279
  }
1212
1280
  // if it's a save or delete action, persist immediately
1213
1281
  if (type === 'save' || type === 'delete') {
1214
- this.udpFormSubmission.data.submissionResponseData = Object.assign({}, newInitialValues);
1215
- await this.handleCommmentUpdate(newInitialValues);
1282
+ this.udpFormSubmission.data.submissionResponseData = Object.assign({}, newCurrentValues);
1283
+ await this.handleCommmentUpdate(newCurrentValues);
1216
1284
  }
1217
1285
  else {
1218
- this.initialValues = Object.assign({}, newInitialValues);
1219
- this.udpFormSubmission.data.submissionResponseData = Object.assign({}, newInitialValues);
1286
+ this.currentValues = Object.assign({}, newCurrentValues);
1287
+ this.udpFormSubmission.data.submissionResponseData = Object.assign({}, newCurrentValues);
1220
1288
  }
1221
1289
  }
1222
1290
  catch (error) {
@@ -1271,7 +1339,7 @@ const UdpFormsRenderer = class {
1271
1339
  return this.isSubmitted || this.udpFormSubmission.unityUserId !== this.clientUserInfo.id;
1272
1340
  }
1273
1341
  render() {
1274
- return (index.h("div", { key: 'c0adb1a4f78f6ff15ce946b44677820f716e8a86', class: "forms-renderer-container", style: this.isLoading ? { minHeight: '100vh' } : {} }, this.renderFollowUpSideSheet(), index.h("udp-forms-ui", { udpForm: this.udpForm, initialValues: this.initialValues, udpFormSubmission: this.udpFormSubmission, submitSuccessful: this.submitSuccessful, isSaving: this.isSaving, saveErrorMessage: this.saveErrorMessage,
1342
+ return (index.h("div", { key: 'd073bfa6145e449c59dc722723ac82d09730d885', class: "forms-renderer-container", style: this.isLoading ? { minHeight: '100vh' } : {} }, this.renderFollowUpSideSheet(), index.h("udp-forms-ui", { udpForm: this.udpForm, currentValues: this.currentValues, udpFormSubmission: this.udpFormSubmission, submitSuccessful: this.submitSuccessful, isSaving: this.isSaving, saveErrorMessage: this.saveErrorMessage,
1275
1343
  // showAutoSaveStatus={this.formSubmissionHandler.supportsAutoSave() && !!this.userId}
1276
1344
  readonly: this.isReadOnlyMode, handleSubmit: this.handleSubmit.bind(this), handleSave: values => Promise.resolve(this.debouncedManualSave(values)), handleChange: this.handleFormChange, handleAction: this.triggerAction, handleFinish: this.handleFinish, clientUserInfo: this.clientUserInfo, isSubmitted: this.isSubmitted, dynamicSections: this.dynamicSections, duplicateRepeatableSection: this.duplicateRepeatableSection, deleteRepeatableSection: this.deleteRepeatableSection, key: `form-rerender-key-${this.reRenderKey}`, isShowManualSaveIcon: this.isShowManualSaveIcon(), isLoading: this.isLoading, performBackgroundSaveAndUpdateLocalSubmissionState: this.performBackgroundSaveAndUpdateLocalSubmissionState })));
1277
1345
  }