udp-stencil-component-library 25.18.1 → 25.18.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/add-map-feature-popup_4.cjs.entry.js +12 -12
- package/dist/cjs/advanced-search_12.cjs.entry.js +5 -5
- package/dist/cjs/ag-grid-base_6.cjs.entry.js +2 -2
- package/dist/cjs/ambient-template-grid.cjs.entry.js +16 -16
- package/dist/cjs/api-method-instance-grid.cjs.entry.js +1 -1
- package/dist/cjs/app-bar.cjs.entry.js +1 -1
- package/dist/cjs/check-box.cjs.entry.js +2 -2
- package/dist/cjs/chip-section.cjs.entry.js +2 -2
- package/dist/cjs/client-side-grid_2.cjs.entry.js +3 -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 -0
- package/dist/cjs/{date-time-renderer_6.cjs.entry.js → date-time-renderer_7.cjs.entry.js} +43 -9
- package/dist/cjs/entity-maintenance-grid.cjs.entry.js +1 -1
- package/dist/cjs/{enums-ibNZ4cZ4.js → enums-DVbZnzL8.js} +3 -2
- package/dist/cjs/enums-DVbZnzL8.js.map +1 -0
- package/dist/cjs/feature-details-card_2.cjs.entry.js +5 -5
- package/dist/cjs/filter-conditions_7.cjs.entry.js +2 -2
- 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 -0
- package/dist/cjs/{image-upload_7.cjs.entry.js → form-metadata-display_8.cjs.entry.js} +70 -12
- package/dist/cjs/index-CGCOXUJE.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-component_2.cjs.entry.js +2 -2
- package/dist/cjs/numeric-field_5.cjs.entry.js +15 -15
- package/dist/cjs/primary-action-header_3.cjs.entry.js +2 -2
- package/dist/cjs/question-configs-renderer_4.cjs.entry.js +12 -12
- package/dist/cjs/resource-timeline-calendar.cjs.entry.js +1 -1
- package/dist/cjs/search-method-grid.cjs.entry.js +1 -1
- package/dist/cjs/server-side-grid.cjs.entry.js +1 -1
- package/dist/cjs/side-sheet-container.cjs.entry.js +1 -1
- package/dist/cjs/stencil-library.cjs.js +1 -1
- package/dist/cjs/stencil-toggle.cjs.entry.js +4 -4
- package/dist/cjs/text-field_2.cjs.entry.js +7 -7
- package/dist/cjs/udp-chip_3.cjs.entry.js +1 -1
- package/dist/cjs/udp-container-query-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/udp-container-query-grid.cjs.entry.js +1 -1
- package/dist/cjs/udp-container-query.cjs.entry.js +2 -2
- package/dist/cjs/udp-container_2.cjs.entry.js +3 -3
- package/dist/cjs/udp-date-range-selector.cjs.entry.js +1 -1
- package/dist/cjs/udp-dynamic-container-with-menu.cjs.entry.js +1 -1
- package/dist/cjs/{udp-forms-builder-question-template-BlgDh7P5.js → udp-forms-builder-question-template-CNONS2l5.js} +10 -3
- package/dist/cjs/{udp-forms-builder-question-template-BlgDh7P5.js.map → udp-forms-builder-question-template-CNONS2l5.js.map} +1 -1
- package/dist/cjs/udp-forms-builder-style-override.cjs.entry.js +1 -1
- package/dist/cjs/udp-forms-builder.cjs.entry.js +3 -3
- package/dist/cjs/udp-forms-builder.entry.cjs.js.map +1 -1
- package/dist/cjs/udp-forms-follow-up-list-card.cjs.entry.js +3 -3
- package/dist/cjs/udp-forms-list-card.cjs.entry.js +5 -5
- package/dist/cjs/udp-forms-list.cjs.entry.js +2 -2
- package/dist/cjs/udp-forms-renderer.cjs.entry.js +21 -18
- package/dist/cjs/udp-forms-renderer.entry.cjs.js.map +1 -1
- package/dist/cjs/udp-forms-ui.cjs.entry.js +7 -4
- package/dist/cjs/udp-forms-ui.entry.cjs.js.map +1 -1
- package/dist/cjs/udp-map.cjs.entry.js +3 -3
- package/dist/cjs/udp-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/udp-page.cjs.entry.js +1 -1
- package/dist/cjs/udp-skeleton-loading.cjs.entry.js +1 -1
- package/dist/cjs/udp-split-screen.cjs.entry.js +1 -1
- package/dist/cjs/udp-stepper-demo.cjs.entry.js +1 -1
- package/dist/cjs/udp-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/udp-tab.cjs.entry.js +1 -1
- package/dist/cjs/udp-timeline-connector.cjs.entry.js +1 -1
- package/dist/cjs/udp-timeline-dot.cjs.entry.js +1 -1
- package/dist/cjs/udp-timeline-item.cjs.entry.js +2 -2
- package/dist/cjs/udp-timeline-separator.cjs.entry.js +1 -1
- package/dist/cjs/udp-timeline.cjs.entry.js +1 -1
- package/dist/cjs/udp-vertical-spacer.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/form-metadata-display-renderer/form-metadata-display-renderer.css +8 -0
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/form-metadata-display-renderer/form-metadata-display-renderer.js +173 -0
- 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 -0
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/list-option-renderer/list-options-renderer.js +3 -3
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/question-configs-renderer/question-configs-renderer.js +5 -5
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/question-specific-configs-renderer/question-specific-configs-renderer.js +2 -0
- 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
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/section-configs-renderer/section-configs-renderer.js +3 -3
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/signature-renderer/signature-renderer.js +1 -1
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/text-input-renderer/text-input-renderer.js +2 -2
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-menu/udp-forms-builder-menu.js +2 -2
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-question-template.js +7 -0
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-question-template.js.map +1 -1
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-style-override/udp-forms-builder-style-override.js +1 -1
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder.js +2 -2
- package/dist/collection/components/forms/udp-forms/udp-forms-builder/udp-forms-builder.js.map +1 -1
- package/dist/collection/components/forms/udp-forms/udp-forms-list/udp-forms-list-card/udp-forms-list-card.js +4 -4
- package/dist/collection/components/forms/udp-forms/udp-forms-list/udp-forms-list.js +1 -1
- package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-follow-up-list-card/udp-forms-follow-up-list-card.js +2 -2
- package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-ui/udp-forms-ui.js +12 -37
- package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-ui/udp-forms-ui.js.map +1 -1
- package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer.js +19 -17
- package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer.js.map +1 -1
- package/dist/collection/components/forms/udp-forms/udp-question/udp-question.js +40 -26
- package/dist/collection/components/forms/udp-forms/udp-question/udp-question.js.map +1 -1
- package/dist/collection/components/forms/udp-forms/utils/classes/UdpFormSubmission.js +1 -0
- package/dist/collection/components/forms/udp-forms/utils/classes/UdpFormSubmission.js.map +1 -1
- package/dist/collection/components/forms/udp-forms/utils/enums.js +1 -0
- package/dist/collection/components/forms/udp-forms/utils/enums.js.map +1 -1
- package/dist/collection/components/grid/ag-table/ag-table.js +1 -1
- package/dist/collection/components/grid/ambient-template-grid/ambient-template-grid.js +16 -16
- package/dist/collection/components/grid/grid-primary-bar/grid-primary-bar.js +2 -2
- package/dist/collection/components/grid/hotlists/udp-hotlist-form/udp-hotlist-form.js +1 -1
- package/dist/collection/components/grid/new-grid/ag-grid-base.js +1 -1
- package/dist/collection/components/grid/new-grid/api-method-instance-grid.js +1 -1
- package/dist/collection/components/grid/new-grid/client-side-grid.js +1 -1
- package/dist/collection/components/grid/new-grid/entity-maintenance-grid.js +1 -1
- package/dist/collection/components/grid/new-grid/search-method-grid.js +1 -1
- package/dist/collection/components/grid/new-grid/server-side-grid.js +1 -1
- package/dist/collection/components/grid/resource-timeline-calendar/resource-timeline-calendar.js +1 -1
- package/dist/collection/components/grid/resource-timeline-calendar/resource-timeline-primary-bar.js +2 -2
- package/dist/collection/components/inputs/checkbox/check-box.js +2 -2
- package/dist/collection/components/inputs/date-range-selector/udp-date-range-selector.js +1 -1
- package/dist/collection/components/inputs/date-selector/udp-date-selector.js +3 -3
- package/dist/collection/components/inputs/date-time-selector/udp-datetime-selector.js +3 -3
- package/dist/collection/components/inputs/form metadata display/form-metadata-display.css +37 -0
- package/dist/collection/components/inputs/form metadata display/form-metadata-display.js +191 -0
- package/dist/collection/components/inputs/form metadata display/form-metadata-display.js.map +1 -0
- package/dist/collection/components/inputs/image-upload/image-upload.js +1 -1
- package/dist/collection/components/inputs/numeric-field/numeric-field.js +3 -3
- package/dist/collection/components/inputs/signature-input/signature-input.js +2 -2
- package/dist/collection/components/inputs/tally/tally.js +2 -2
- package/dist/collection/components/inputs/text-area/text-area.js +3 -3
- package/dist/collection/components/inputs/text-field/text-field.js +3 -3
- package/dist/collection/components/inputs/time-selector/udp-time-selector.js +3 -3
- package/dist/collection/components/inputs/toggle/stencil-toggle.js +4 -4
- package/dist/collection/components/inputs/udp-selector/udp-selector.js +4 -4
- package/dist/collection/components/layout/udp-container/udp-container.js +2 -2
- package/dist/collection/components/layout/udp-container-query/udp-container-query.js +2 -2
- package/dist/collection/components/layout/udp-container-query-grid/udp-container-query-grid.js +1 -1
- package/dist/collection/components/layout/udp-container-query-grid-item/udp-container-query-grid-item.js +1 -1
- package/dist/collection/components/layout/udp-page/udp-page.js +1 -1
- package/dist/collection/components/layout/udp-split-screen/udp-split-screen.js +1 -1
- package/dist/collection/components/layout/udp-vertical-spacer.js +1 -1
- package/dist/collection/components/loaders/udp-grid-loader/udp-grid-loader.js +2 -2
- package/dist/collection/components/loaders/udp-linear-loader/udp-linear-loader.js +1 -1
- package/dist/collection/components/loaders/udp-skeleton-loading.js +1 -1
- package/dist/collection/components/map/udp-map/map-component.js +1 -1
- package/dist/collection/components/map/udp-map/popups/add-map-feature-popup.js +3 -3
- package/dist/collection/components/map/udp-map/popups/feature-details-card/feature-details-card.js +4 -4
- package/dist/collection/components/map/udp-map/popups/feature-details-popup.js +1 -1
- package/dist/collection/components/map/udp-map/popups/select-layer-popup.js +2 -2
- package/dist/collection/components/map/udp-map/popups/split-line-popup.js +1 -1
- package/dist/collection/components/map/udp-map/toolbar/map-toolbar.js +6 -6
- package/dist/collection/components/map/udp-map/udp-map-toolbar.js +1 -1
- package/dist/collection/components/map/udp-map/udp-map.js +3 -3
- package/dist/collection/components/menu/menu-item/udp-menu-item.js +1 -1
- package/dist/collection/components/menu/udp-menu.js +1 -1
- package/dist/collection/components/stepper/udp-stepper-demo.js +1 -1
- package/dist/collection/components/tabs/tab/tabs/udp-tabs.js +2 -2
- package/dist/collection/components/tabs/tab/udp-tab.js +1 -1
- package/dist/collection/components/tabs/udp-tab-panel/udp-tab-panel.js +2 -2
- package/dist/collection/components/timeline/udp-timeline-connector.js +1 -1
- package/dist/collection/components/timeline/udp-timeline-dot.js +1 -1
- package/dist/collection/components/timeline/udp-timeline-item.js +2 -2
- package/dist/collection/components/timeline/udp-timeline-separator.js +1 -1
- package/dist/collection/components/timeline/udp-timeline.js +1 -1
- package/dist/collection/components/toolbars/app-bar/app-bar.js +1 -1
- package/dist/collection/components/util/ghost-render/ghost-render.js +1 -1
- package/dist/collection/deprecated/components/side-sheet/side-sheet-container.js +1 -1
- package/dist/collection/deprecated/components/side-sheet/side-sheet.js +1 -1
- package/dist/collection/udp-utilities/layout/udp-dynamic-container-with-menu/chip-section/chip-section.js +2 -2
- package/dist/collection/udp-utilities/layout/udp-dynamic-container-with-menu/udp-dynamic-container-with-menu.js +1 -1
- package/dist/components/add-map-feature-popup2.js +3 -3
- package/dist/components/ag-grid-base2.js +1 -1
- package/dist/components/ag-table2.js +1 -1
- package/dist/components/ambient-template-grid.js +16 -16
- package/dist/components/api-method-instance-grid.js +1 -1
- package/dist/components/app-bar.js +1 -1
- package/dist/components/check-box.js +2 -2
- package/dist/components/chip-section.js +2 -2
- package/dist/components/client-side-grid2.js +1 -1
- package/dist/components/entity-maintenance-grid.js +1 -1
- package/dist/components/enums.js +1 -0
- package/dist/components/enums.js.map +1 -1
- package/dist/components/feature-details-card2.js +4 -4
- package/dist/components/feature-details-popup2.js +1 -1
- package/dist/components/form-metadata-display-renderer.d.ts +11 -0
- package/dist/components/form-metadata-display-renderer.js +9 -0
- package/dist/components/form-metadata-display-renderer.js.map +1 -0
- package/dist/components/form-metadata-display-renderer2.js +74 -0
- package/dist/components/form-metadata-display-renderer2.js.map +1 -0
- package/dist/components/form-metadata-display.d.ts +11 -0
- package/dist/components/form-metadata-display.js +9 -0
- package/dist/components/form-metadata-display.js.map +1 -0
- package/dist/components/form-metadata-display2.js +77 -0
- package/dist/components/form-metadata-display2.js.map +1 -0
- package/dist/components/ghost-render2.js +1 -1
- package/dist/components/grid-primary-bar2.js +2 -2
- package/dist/components/image-upload2.js +1 -1
- package/dist/components/list-options-renderer2.js +3 -3
- package/dist/components/map-component2.js +1 -1
- package/dist/components/map-toolbar2.js +6 -6
- package/dist/components/numeric-field2.js +3 -3
- package/dist/components/question-configs-renderer2.js +15 -9
- package/dist/components/question-configs-renderer2.js.map +1 -1
- package/dist/components/question-specific-configs-renderer2.js +19 -4
- package/dist/components/question-specific-configs-renderer2.js.map +1 -1
- package/dist/components/resource-timeline-calendar.js +1 -1
- package/dist/components/resource-timeline-primary-bar2.js +2 -2
- package/dist/components/search-method-grid2.js +1 -1
- package/dist/components/section-configs-renderer2.js +3 -3
- package/dist/components/select-layer-popup2.js +2 -2
- package/dist/components/server-side-grid2.js +1 -1
- package/dist/components/side-sheet-container2.js +1 -1
- package/dist/components/side-sheet2.js +1 -1
- package/dist/components/signature-input2.js +2 -2
- package/dist/components/signature-renderer2.js +1 -1
- package/dist/components/split-line-popup2.js +1 -1
- package/dist/components/stencil-toggle2.js +4 -4
- package/dist/components/tally.js +2 -2
- package/dist/components/text-area2.js +3 -3
- package/dist/components/text-field2.js +3 -3
- package/dist/components/text-input-renderer2.js +2 -2
- package/dist/components/udp-container-query-grid-item.js +1 -1
- package/dist/components/udp-container-query-grid.js +1 -1
- package/dist/components/udp-container-query2.js +2 -2
- package/dist/components/udp-container2.js +2 -2
- package/dist/components/udp-date-range-selector.js +1 -1
- package/dist/components/udp-date-selector2.js +3 -3
- package/dist/components/udp-datetime-selector2.js +3 -3
- package/dist/components/udp-dynamic-container-with-menu2.js +1 -1
- package/dist/components/udp-forms-builder-menu2.js +2 -2
- package/dist/components/udp-forms-builder-style-override.js +1 -1
- package/dist/components/udp-forms-builder.js +15 -9
- package/dist/components/udp-forms-builder.js.map +1 -1
- package/dist/components/udp-forms-follow-up-list-card.js +2 -2
- package/dist/components/udp-forms-list-card2.js +4 -4
- package/dist/components/udp-forms-list.js +1 -1
- package/dist/components/udp-forms-renderer.js +32 -23
- package/dist/components/udp-forms-renderer.js.map +1 -1
- package/dist/components/udp-forms-ui2.js +19 -11
- package/dist/components/udp-forms-ui2.js.map +1 -1
- package/dist/components/udp-grid-loader2.js +2 -2
- package/dist/components/udp-hotlist-form2.js +1 -1
- package/dist/components/udp-linear-loader2.js +1 -1
- package/dist/components/udp-map-toolbar2.js +1 -1
- package/dist/components/udp-map.js +3 -3
- package/dist/components/udp-menu-item2.js +1 -1
- package/dist/components/udp-menu2.js +1 -1
- package/dist/components/udp-page.js +1 -1
- package/dist/components/udp-question2.js +33 -10
- package/dist/components/udp-question2.js.map +1 -1
- package/dist/components/udp-selector2.js +4 -4
- package/dist/components/udp-skeleton-loading2.js +1 -1
- package/dist/components/udp-split-screen.js +1 -1
- package/dist/components/udp-stepper-demo.js +1 -1
- package/dist/components/udp-tab-panel.js +2 -2
- package/dist/components/udp-tab.js +1 -1
- package/dist/components/udp-tabs2.js +2 -2
- package/dist/components/udp-time-selector2.js +3 -3
- package/dist/components/udp-timeline-connector.js +1 -1
- package/dist/components/udp-timeline-dot.js +1 -1
- package/dist/components/udp-timeline-item.js +2 -2
- package/dist/components/udp-timeline-separator.js +1 -1
- package/dist/components/udp-timeline.js +1 -1
- package/dist/components/udp-vertical-spacer.js +1 -1
- package/dist/docs.json +487 -103
- package/dist/esm/add-map-feature-popup_4.entry.js +12 -12
- package/dist/esm/advanced-search_12.entry.js +5 -5
- package/dist/esm/ag-grid-base_6.entry.js +2 -2
- package/dist/esm/ambient-template-grid.entry.js +16 -16
- package/dist/esm/api-method-instance-grid.entry.js +1 -1
- package/dist/esm/app-bar.entry.js +1 -1
- package/dist/esm/check-box.entry.js +2 -2
- package/dist/esm/chip-section.entry.js +2 -2
- package/dist/esm/client-side-grid_2.entry.js +3 -3
- 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 -0
- package/dist/esm/{date-time-renderer_6.entry.js → date-time-renderer_7.entry.js} +43 -10
- package/dist/esm/entity-maintenance-grid.entry.js +1 -1
- package/dist/esm/{enums-BnKmfKJT.js → enums-CHxgVY-B.js} +3 -2
- package/dist/esm/enums-CHxgVY-B.js.map +1 -0
- package/dist/esm/feature-details-card_2.entry.js +5 -5
- package/dist/esm/filter-conditions_7.entry.js +2 -2
- 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 -0
- package/dist/esm/{image-upload_7.entry.js → form-metadata-display_8.entry.js} +71 -14
- package/dist/esm/index-CaZq3YdB.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-component_2.entry.js +2 -2
- package/dist/esm/numeric-field_5.entry.js +15 -15
- package/dist/esm/primary-action-header_3.entry.js +2 -2
- package/dist/esm/question-configs-renderer_4.entry.js +12 -12
- package/dist/esm/resource-timeline-calendar.entry.js +1 -1
- package/dist/esm/search-method-grid.entry.js +1 -1
- package/dist/esm/server-side-grid.entry.js +1 -1
- package/dist/esm/side-sheet-container.entry.js +1 -1
- package/dist/esm/stencil-library.js +1 -1
- package/dist/esm/stencil-toggle.entry.js +4 -4
- package/dist/esm/text-field_2.entry.js +7 -7
- package/dist/esm/udp-chip_3.entry.js +1 -1
- package/dist/esm/udp-container-query-grid-item.entry.js +1 -1
- package/dist/esm/udp-container-query-grid.entry.js +1 -1
- package/dist/esm/udp-container-query.entry.js +2 -2
- package/dist/esm/udp-container_2.entry.js +3 -3
- package/dist/esm/udp-date-range-selector.entry.js +1 -1
- package/dist/esm/udp-dynamic-container-with-menu.entry.js +1 -1
- package/dist/esm/{udp-forms-builder-question-template-C60LMUS4.js → udp-forms-builder-question-template-DQJb7f4Y.js} +10 -3
- package/dist/{stencil-library/udp-forms-builder-question-template-C60LMUS4.js.map → esm/udp-forms-builder-question-template-DQJb7f4Y.js.map} +1 -1
- package/dist/esm/udp-forms-builder-style-override.entry.js +1 -1
- package/dist/esm/udp-forms-builder.entry.js +3 -3
- package/dist/esm/udp-forms-builder.entry.js.map +1 -1
- package/dist/esm/udp-forms-follow-up-list-card.entry.js +3 -3
- package/dist/esm/udp-forms-list-card.entry.js +5 -5
- package/dist/esm/udp-forms-list.entry.js +2 -2
- package/dist/esm/udp-forms-renderer.entry.js +21 -18
- package/dist/esm/udp-forms-renderer.entry.js.map +1 -1
- package/dist/esm/udp-forms-ui.entry.js +7 -4
- package/dist/esm/udp-forms-ui.entry.js.map +1 -1
- package/dist/esm/udp-map.entry.js +3 -3
- package/dist/esm/udp-menu-item.entry.js +1 -1
- package/dist/esm/udp-page.entry.js +1 -1
- package/dist/esm/udp-skeleton-loading.entry.js +1 -1
- package/dist/esm/udp-split-screen.entry.js +1 -1
- package/dist/esm/udp-stepper-demo.entry.js +1 -1
- package/dist/esm/udp-tab-panel.entry.js +2 -2
- package/dist/esm/udp-tab.entry.js +1 -1
- package/dist/esm/udp-timeline-connector.entry.js +1 -1
- package/dist/esm/udp-timeline-dot.entry.js +1 -1
- package/dist/esm/udp-timeline-item.entry.js +2 -2
- package/dist/esm/udp-timeline-separator.entry.js +1 -1
- package/dist/esm/udp-timeline.entry.js +1 -1
- package/dist/esm/udp-vertical-spacer.entry.js +1 -1
- package/dist/stencil-library/add-map-feature-popup_4.entry.js +1 -1
- package/dist/stencil-library/advanced-search_12.entry.js +1 -1
- package/dist/stencil-library/ag-grid-base_6.entry.js +1 -1
- package/dist/stencil-library/ambient-template-grid.entry.js +1 -1
- package/dist/stencil-library/api-method-instance-grid.entry.js +1 -1
- package/dist/stencil-library/app-bar.entry.js +1 -1
- package/dist/stencil-library/check-box.entry.js +1 -1
- package/dist/stencil-library/chip-section.entry.js +1 -1
- package/dist/stencil-library/client-side-grid_2.entry.js +1 -1
- 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 -0
- package/dist/stencil-library/date-time-renderer_7.entry.js +2 -0
- package/dist/stencil-library/date-time-renderer_7.entry.js.map +1 -0
- package/dist/stencil-library/entity-maintenance-grid.entry.js +1 -1
- package/dist/stencil-library/enums-CHxgVY-B.js +2 -0
- package/dist/stencil-library/enums-CHxgVY-B.js.map +1 -0
- package/dist/stencil-library/feature-details-card_2.entry.js +1 -1
- package/dist/stencil-library/filter-conditions_7.entry.js +1 -1
- 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 -0
- package/dist/stencil-library/form-metadata-display_8.entry.js +2 -0
- package/dist/stencil-library/form-metadata-display_8.entry.js.map +1 -0
- package/dist/stencil-library/map-component_2.entry.js +1 -1
- package/dist/stencil-library/numeric-field_5.entry.js +1 -1
- package/dist/stencil-library/primary-action-header_3.entry.js +1 -1
- package/dist/stencil-library/question-configs-renderer_4.entry.js +1 -1
- package/dist/stencil-library/resource-timeline-calendar.entry.js +1 -1
- package/dist/stencil-library/search-method-grid.entry.js +1 -1
- package/dist/stencil-library/server-side-grid.entry.js +1 -1
- package/dist/stencil-library/side-sheet-container.entry.js +1 -1
- package/dist/stencil-library/stencil-library.esm.js +1 -1
- package/dist/stencil-library/stencil-toggle.entry.js +1 -1
- package/dist/stencil-library/text-field_2.entry.js +1 -1
- package/dist/stencil-library/udp-chip_3.entry.js +1 -1
- package/dist/stencil-library/udp-container-query-grid-item.entry.js +1 -1
- package/dist/stencil-library/udp-container-query-grid.entry.js +1 -1
- package/dist/stencil-library/udp-container-query.entry.js +1 -1
- package/dist/stencil-library/udp-container_2.entry.js +1 -1
- package/dist/stencil-library/udp-date-range-selector.entry.js +1 -1
- package/dist/stencil-library/udp-dynamic-container-with-menu.entry.js +1 -1
- package/dist/stencil-library/{udp-forms-builder-question-template-C60LMUS4.js → udp-forms-builder-question-template-DQJb7f4Y.js} +2 -2
- package/dist/{esm/udp-forms-builder-question-template-C60LMUS4.js.map → stencil-library/udp-forms-builder-question-template-DQJb7f4Y.js.map} +1 -1
- package/dist/stencil-library/udp-forms-builder-style-override.entry.js +1 -1
- package/dist/stencil-library/udp-forms-builder.entry.esm.js.map +1 -1
- package/dist/stencil-library/udp-forms-builder.entry.js +1 -1
- package/dist/stencil-library/udp-forms-builder.entry.js.map +1 -1
- package/dist/stencil-library/udp-forms-follow-up-list-card.entry.js +1 -1
- package/dist/stencil-library/udp-forms-list-card.entry.js +1 -1
- package/dist/stencil-library/udp-forms-list-card.entry.js.map +1 -1
- package/dist/stencil-library/udp-forms-list.entry.js +1 -1
- package/dist/stencil-library/udp-forms-renderer.entry.esm.js.map +1 -1
- package/dist/stencil-library/udp-forms-renderer.entry.js +1 -1
- package/dist/stencil-library/udp-forms-renderer.entry.js.map +1 -1
- package/dist/stencil-library/udp-forms-ui.entry.esm.js.map +1 -1
- package/dist/stencil-library/udp-forms-ui.entry.js +1 -1
- package/dist/stencil-library/udp-forms-ui.entry.js.map +1 -1
- package/dist/stencil-library/udp-map.entry.js +1 -1
- package/dist/stencil-library/udp-menu-item.entry.js +1 -1
- package/dist/stencil-library/udp-page.entry.js +1 -1
- package/dist/stencil-library/udp-skeleton-loading.entry.js +1 -1
- package/dist/stencil-library/udp-split-screen.entry.js +1 -1
- package/dist/stencil-library/udp-stepper-demo.entry.js +1 -1
- package/dist/stencil-library/udp-tab-panel.entry.js +1 -1
- package/dist/stencil-library/udp-tab.entry.js +1 -1
- package/dist/stencil-library/udp-timeline-connector.entry.js +1 -1
- package/dist/stencil-library/udp-timeline-dot.entry.js +1 -1
- package/dist/stencil-library/udp-timeline-item.entry.js +1 -1
- package/dist/stencil-library/udp-timeline-item.entry.js.map +1 -1
- package/dist/stencil-library/udp-timeline-separator.entry.js +1 -1
- package/dist/stencil-library/udp-timeline.entry.js +1 -1
- package/dist/stencil-library/udp-vertical-spacer.entry.js +1 -1
- package/dist/types/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-item/form-metadata-display-renderer/form-metadata-display-renderer.d.ts +11 -0
- package/dist/types/components/forms/udp-forms/udp-forms-builder/udp-forms-builder-question-template.d.ts +70 -0
- package/dist/types/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-ui/udp-forms-ui.d.ts +5 -2
- package/dist/types/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer.d.ts +1 -3
- package/dist/types/components/forms/udp-forms/udp-question/udp-question.d.ts +8 -3
- package/dist/types/components/forms/udp-forms/utils/classes/UdpFormSubmission.d.ts +1 -0
- package/dist/types/components/forms/udp-forms/utils/enums.d.ts +2 -1
- package/dist/types/components/inputs/form metadata display/form-metadata-display.d.ts +62 -0
- package/dist/types/components.d.ts +178 -28
- package/package.json +2 -2
- package/dist/cjs/date-time-renderer.file-upload-renderer.list-options-renderer.question-specific-configs-renderer.signature-renderer.text-input-renderer.entry.cjs.js.map +0 -1
- package/dist/cjs/enums-ibNZ4cZ4.js.map +0 -1
- package/dist/cjs/image-upload.signature-input.stencil-form.tally-display.udp-question.udp-question-comments.udp-save-draft-button.entry.cjs.js.map +0 -1
- package/dist/esm/date-time-renderer.file-upload-renderer.list-options-renderer.question-specific-configs-renderer.signature-renderer.text-input-renderer.entry.js.map +0 -1
- package/dist/esm/enums-BnKmfKJT.js.map +0 -1
- package/dist/esm/image-upload.signature-input.stencil-form.tally-display.udp-question.udp-question-comments.udp-save-draft-button.entry.js.map +0 -1
- package/dist/stencil-library/date-time-renderer.file-upload-renderer.list-options-renderer.question-specific-configs-renderer.signature-renderer.text-input-renderer.entry.esm.js.map +0 -1
- package/dist/stencil-library/date-time-renderer_6.entry.js +0 -2
- package/dist/stencil-library/date-time-renderer_6.entry.js.map +0 -1
- package/dist/stencil-library/enums-BnKmfKJT.js +0 -2
- package/dist/stencil-library/enums-BnKmfKJT.js.map +0 -1
- package/dist/stencil-library/image-upload.signature-input.stencil-form.tally-display.udp-question.udp-question-comments.udp-save-draft-button.entry.esm.js.map +0 -1
- package/dist/stencil-library/image-upload_7.entry.js +0 -2
- package/dist/stencil-library/image-upload_7.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"udp-forms-ui.js","sourceRoot":"","sources":["../../../../../../src/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-ui/udp-forms-ui.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAE/F,OAAO,EAAE,qBA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, State, Element, Watch, Event, EventEmitter } from '@stencil/core';\nimport { Guid, UdpFormQuestion } from '../../utils/types';\nimport { UdpFormsFieldTypeEnum } from '../../utils/enums';\nimport { fontOverrideMapping, overrideFont } from '../../utils/utils';\nimport { getIconFromName } from '../../../../data-display/icons/iconUtils';\nimport { UdpFormSubmission } from '../../utils/classes/UdpFormSubmission';\nimport { UdpForm } from '../../utils/classes/UdpForm';\n\n\n@Component({\n tag: 'udp-forms-ui',\n styleUrl: 'udp-forms-ui.css',\n shadow: true,\n})\nexport class UdpFormsUi {\n @Prop() udpForm: UdpForm;\n @Prop() initialValues: { [name: string]: any } = {};\n @Prop() udpFormSubmission: UdpFormSubmission\n @Prop() submitSuccessful: boolean = false;\n @Prop() isLoading: boolean = false;\n @Prop() isSaving: boolean = false;\n @Prop() saveErrorMessage: string | null = null;\n @Prop() showAutoSaveStatus: boolean = false;\n @Prop() disabled: boolean = false;\n @Prop() readonly: boolean = false;\n @Prop() handleSubmit: (values: any) => Promise<void>;\n @Prop() handleChange: (values: { [name: string]: any }) => void;\n @Prop() handleSave: (values: { [name: string]: any }) => Promise<void>;\n @Prop() handleAction: (actionId: Guid, params: Object) => void;\n @Prop() handleFinish: () => void;\n @Prop() userId: Guid | null = null;\n @Prop() isSubmitted: boolean = false;\n @Prop() dynamicSections: any[];\n @Prop() duplicateRepeatableSection: any;\n @Prop() deleteRepeatableSection: any;\n @Prop() isShowManualSaveIcon: boolean = false;\n @Prop() performBackgroundSaveAndUpdateLocalSubmissionState: (values: { [name: string]: any }) => Promise<void>;\n @Prop() isCommentAllowed: boolean = false;\n\n @State() showSavedMessage: boolean = false;\n\n @Event() formDirtyChange: EventEmitter<boolean>;\n\n @Element() el: HTMLElement;\n\n\n @State() isDialogOpen: boolean = false;\n @State() dialogAction: () => void;\n @State() dialogMessage: string = 'Are you sure you want to delete this section? This section contains links to follow-up forms. Deleting it will remove those links.';\n \n\n private savedMessageTimeoutId: any;\n\n private titleId: string = 'udp-forms-title';\n private descriptionId: string = 'udp-forms-description';\n\n componentDidLoad() {\n this.overrideStyles();\n }\n\n componentDidUpdate() {\n this.overrideStyles();\n }\n\n disconnectedCallback() {\n // Clean up timeout when component is destroyed\n if (this.savedMessageTimeoutId) {\n clearTimeout(this.savedMessageTimeoutId);\n }\n }\n\n @Watch('isSaving')\n watchIsSaving(newValue: boolean, oldValue: boolean) {\n console.log('isSaving watcher triggered:', { oldValue, newValue, saveErrorMessage: this.saveErrorMessage });\n\n // When isSaving changes from true to false (save completed successfully)\n if (oldValue === true && newValue === false && !this.saveErrorMessage) {\n console.log('Setting showSavedMessage to true');\n this.showSavedMessage = true;\n\n // Clear any existing timeout\n if (this.savedMessageTimeoutId) {\n clearTimeout(this.savedMessageTimeoutId);\n }\n\n // Hide the \"Saved\" message after 5 seconds\n this.savedMessageTimeoutId = setTimeout(() => {\n console.log('Hiding saved message after 5 seconds');\n this.showSavedMessage = false;\n }, 5000);\n }\n }\n\n overrideStyles() {\n const shadowRoot = (this as any).el?.shadowRoot;\n shadowRoot?.querySelectorAll('unity-typography').forEach(element => {\n const styleOverride =\n element.id === this.titleId ? this.udpForm?.styleOverrides?.titleText : element.id === this.descriptionId ? this.udpForm?.styleOverrides?.paragraphText : ({} as any);\n\n if (styleOverride?.fontFamily && fontOverrideMapping[styleOverride.fontFamily]) {\n overrideFont(element, fontOverrideMapping[styleOverride.fontFamily]);\n }\n if (styleOverride?.variant) {\n element.setAttribute('variant', styleOverride.variant);\n }\n });\n }\n\n private isSectionContainsFollowUpFormLink(sectionKey: string): boolean {\n const sectionObject = this.udpFormSubmission.data.submissionResponseData[sectionKey]\n\n for (const [_key, questionObject] of Object.entries(sectionObject) as any) {\n if (questionObject?.metadata && questionObject.metadata?.followUpFormSubmissionId) {\n return true;\n }\n }\n\n return false;\n }\n\n render() {\n if (this.isLoading) {\n return (\n <udp-linear-loader />\n );\n }\n\n if (!this.udpForm) {\n return (\n <div class=\"error-banner\">\n <unity-typography variant=\"body2\">Error Loading Form</unity-typography>\n </div>\n );\n }\n\n let questionNumber = 1;\n\n const sectionSet = new Set();\n this.udpForm.formQuestions.forEach(fq => sectionSet.add(fq.section));\n // const orderedSectionNumbers = [...sectionSet].sort((a: number, b: number) => a - b);\n\n const hiddenQuestionTypes = [UdpFormsFieldTypeEnum.Hidden, UdpFormsFieldTypeEnum.Paragraph];\n\n const backgroundOverrides: { backgroundImage?: string | null; backgroundColor?: string | null } = {};\n if (this.udpForm?.styleOverrides?.background?.backgroundImage) {\n // uncomment when we want to allow background images\n //backgroundOverrides.backgroundImage = `url(${this.udpForm?.styleOverrides?.background?.backgroundImage})`;\n } else if (this.udpForm?.styleOverrides?.background?.backgroundColor) {\n backgroundOverrides.backgroundColor = this.udpForm?.styleOverrides?.background?.backgroundColor;\n }\n return (\n <div class={'background'} style={backgroundOverrides}>\n <udp-container maxWidth=\"md\">\n <div class=\"form-container\">\n {!this.submitSuccessful ? (\n \n <stencil-form\n handleSubmit={this.handleSubmit}\n initialValues={this.initialValues}\n handleChange={this.handleChange}\n onDirtyChange={event => this.formDirtyChange.emit(event.detail)}\n >\n {this.readonly && \n (<div class=\"error-banner\">\n <unity-typography variant=\"body2\">View Only Mode. The contents of this form cannot be changed.</unity-typography>\n </div>)}\n <fluent-dialog\n open={this.isDialogOpen}\n message={this.dialogMessage}\n labelOne={'Confirm'}\n labelTwo={'Cancel'}\n actionOne={() => this.dialogAction()}\n actionTwo={() => (this.isDialogOpen = false)}\n />\n {/********** QUESTIONS *********/}\n <div>\n {/* <div class=\"header\" style={this.udpForm?.styleOverrides?.headerBackgroundColor ? { backgroundColor: this.udpForm?.styleOverrides?.headerBackgroundColor } : ''}> */}\n <div class=\"form-section-block\">\n <div\n class=\"form-renderer-header\"\n style={{\n ...(this.udpForm?.styleOverrides?.headerBackgroundColor && {\n backgroundColor: this.udpForm.styleOverrides.headerBackgroundColor,\n }),\n }}\n >\n <unity-typography id={this.titleId} variant={'h6'} color=\"inherit\">\n {this.udpForm.name}\n </unity-typography>\n\n {/* Auto-save status indicator for authenticated users */}\n {this.showAutoSaveStatus && (\n <div class=\"auto-save-status\">\n {/* {this.isSaving && (\n <unity-typography variant=\"body\" color=\"primary\">\n Saving...\n </unity-typography>\n )} */}\n {this.saveErrorMessage && (\n <unity-typography variant=\"body\" color=\"secondary\">\n {this.saveErrorMessage}\n </unity-typography>\n )}\n </div>\n )}\n {this.isShowManualSaveIcon && (\n <udp-save-draft-button\n isVisible={this.isShowManualSaveIcon}\n isSaving={this.isSaving}\n // saveErrorMessage={this.saveErrorMessage}\n showSavedMessage={this.showSavedMessage}\n handleSave={this.handleSave}\n />\n )}\n </div>\n\n <div class=\"form-section-content\">\n <div class=\"items\">\n <div class=\"form-section-text\">\n <unity-typography id={this.descriptionId} variant={this.udpForm?.styleOverrides?.paragraphText?.variant ?? 'body'} color=\"inherit\">\n {this.udpForm.description}\n </unity-typography>\n </div>\n </div>\n </div>\n </div>\n {/* Save Button - moves between header and floating based on space */}\n {this.dynamicSections.map((section, sIndex) => {\n return (\n <div class=\"form-section-block\">\n <div class=\"form-section-header\">\n <div class=\"form-section-header-title\">\n <unity-typography variant=\"h6\" color=\"inherit\">\n {`${section.title}${section.sectionPositionSuffix > 1 ? ` (${section.sectionPositionSuffix})` : ''}`}\n </unity-typography>\n </div>\n <div class=\"form-section-header-actions\">\n {/* // Only show the add button if the section is repeatable and is the last in the repeat group */}\n {section.sectionProperties.isRepeatable && this.dynamicSections.filter(s => s.id === section.id).length === section.sectionPositionSuffix && !this.readonly && (\n <stencil-icon-button icon={getIconFromName('add')} tooltip=\"Repeat This Section\" onClick={() => this.duplicateRepeatableSection(sIndex)} />\n )}\n {/* // show the delete button if the section is repeatable and not the original section */}\n {!section.isOriginalSection && !this.readonly && (\n <stencil-icon-button \n icon={getIconFromName('subtract')} \n tooltip=\"Delete This Repeated Section\" \n onClick={\n () => {\n // e.stopPropagation();\n if (this.isSectionContainsFollowUpFormLink(`${section.name}_${section.sectionPositionSuffix}`)) {\n this.dialogAction = async () => {\n this.deleteRepeatableSection(sIndex)\n await this.performBackgroundSaveAndUpdateLocalSubmissionState(this.udpFormSubmission.data.submissionResponseData);\n this.isDialogOpen = false;\n }; \n } else {\n this.deleteRepeatableSection(sIndex)\n }\n \n this.isDialogOpen = true;\n }} />\n )}\n </div>\n </div>\n\n <div class=\"form-section-content\">\n <div class=\"items\">\n <div class=\"form-section-text\">\n <unity-typography variant=\"body\" color=\"inherit\">\n {section.sectionText}\n </unity-typography>\n </div>\n\n <div>\n {section.formQuestions.map((question: UdpFormQuestion) => {\n const isHidden = hiddenQuestionTypes.includes(question.fieldTypeId);\n const num: number = questionNumber;\n if (!isHidden) questionNumber++;\n\n const sectionKey = section.sectionPositionSuffix > 1 ? `${section.name}_${section.sectionPositionSuffix}` : `${section.name}`\n\n return (\n <div class=\"item\">\n <udp-question\n styleOverrides={{\n helperText: this.udpForm.styleOverrides?.helperText,\n paragraphText: this.udpForm.styleOverrides?.paragraphText,\n questionText: this.udpForm.styleOverrides?.questionText,\n }}\n question={question}\n questionNumber={num}\n value={this.initialValues?.[sectionKey]?.[question.name]?.value ?? ''}\n disabled={this.disabled}\n readonly={this.readonly}\n key={question.questionIdentifierKey}\n initialValues={this.initialValues}\n userId={this.userId}\n isCommentAllowed={this.isCommentAllowed}\n />\n </div>\n );\n })}\n </div>\n </div>\n </div>\n </div>\n );\n })}\n {this.udpFormSubmission?.status != 2 && ( \n <div class=\"footer\">\n <input\n disabled={this.isLoading || this.disabled || this.readonly}\n type=\"submit\"\n value=\"Submit\"\n class=\"submit\"\n id=\"udpRecord-udp-forms-renderer-Submit\"\n onClick={() => {\n console.log('Submit button clicked');\n // Let the form handle the submit naturally\n }}\n />\n </div>\n )}\n </div>\n </stencil-form>\n ) : (\n //if the form has been submit, display success message with a button to trigger the action associated to the form\n <div class=\"center-div\">\n <udp-ambient-card>\n <div class=\"submit-card\">\n <unity-typography>Thank you for your submission.</unity-typography>\n {/* // No action configured for now. */}\n {/* <div class=\"finish-button\">\n <custom-button onClick={this.handleFinish}>Back</custom-button>\n </div> */}\n </div>\n </udp-ambient-card>\n </div>\n )}\n </div>\n </udp-container>\n </div>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"udp-forms-ui.js","sourceRoot":"","sources":["../../../../../../src/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer-ui/udp-forms-ui.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAE/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAU3E,MAAM,OAAO,UAAU;IALvB;QAOU,kBAAa,GAA4B,EAAE,CAAC;QAE5C,qBAAgB,GAAY,KAAK,CAAC;QAClC,cAAS,GAAY,KAAK,CAAC;QAC3B,aAAQ,GAAY,KAAK,CAAC;QAC1B,qBAAgB,GAAkB,IAAI,CAAC;QACvC,uBAAkB,GAAY,KAAK,CAAC;QACpC,aAAQ,GAAY,KAAK,CAAC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;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, State, Element, Watch, Event, EventEmitter } from '@stencil/core';\nimport { Guid, UdpFormQuestion } from '../../utils/types';\nimport { UdpFormsFieldTypeEnum } from '../../utils/enums';\nimport { fontOverrideMapping, overrideFont } from '../../utils/utils';\nimport { getIconFromName } from '../../../../data-display/icons/iconUtils';\nimport { UdpFormSubmission } from '../../utils/classes/UdpFormSubmission';\nimport { UdpForm } from '../../utils/classes/UdpForm';\n\n\n@Component({\n tag: 'udp-forms-ui',\n styleUrl: 'udp-forms-ui.css',\n shadow: true,\n})\nexport class UdpFormsUi {\n @Prop() udpForm: UdpForm;\n @Prop() initialValues: { [name: string]: any } = {};\n @Prop() udpFormSubmission: UdpFormSubmission\n @Prop() submitSuccessful: boolean = false;\n @Prop() isLoading: boolean = false;\n @Prop() isSaving: boolean = false;\n @Prop() saveErrorMessage: string | null = null;\n @Prop() showAutoSaveStatus: boolean = false;\n @Prop() disabled: boolean = false;\n @Prop() readonly: boolean = false;\n @Prop() handleSubmit: (values: any) => Promise<void>;\n @Prop() handleChange: (values: { [name: string]: any }) => void;\n @Prop() handleSave: (values: { [name: string]: any }) => Promise<void>;\n @Prop() handleAction: (actionId: Guid, params: Object) => void;\n @Prop() handleFinish: () => void;\n @Prop() clientUserInfo: { id: string | null; displayName: string | null; email: string | null } = {\n id: null,\n displayName: null,\n email: null,\n }; \n @Prop() isSubmitted: boolean = false;\n @Prop() dynamicSections: any[];\n @Prop() duplicateRepeatableSection: any;\n @Prop() deleteRepeatableSection: any;\n @Prop() isShowManualSaveIcon: boolean = false;\n @Prop() performBackgroundSaveAndUpdateLocalSubmissionState: (values: { [name: string]: any }) => Promise<void>;\n\n @State() showSavedMessage: boolean = false;\n\n @Event() formDirtyChange: EventEmitter<boolean>;\n\n @Element() el: HTMLElement;\n\n\n @State() isDialogOpen: boolean = false;\n @State() dialogAction: () => void;\n @State() dialogMessage: string = 'Are you sure you want to delete this section? This section contains links to follow-up forms. Deleting it will remove those links.';\n \n\n private savedMessageTimeoutId: any;\n\n private titleId: string = 'udp-forms-title';\n private descriptionId: string = 'udp-forms-description';\n\n componentDidLoad() {\n this.overrideStyles();\n }\n\n componentDidUpdate() {\n this.overrideStyles();\n }\n\n disconnectedCallback() {\n // Clean up timeout when component is destroyed\n if (this.savedMessageTimeoutId) {\n clearTimeout(this.savedMessageTimeoutId);\n }\n }\n\n @Watch('isSaving')\n watchIsSaving(newValue: boolean, oldValue: boolean) {\n console.log('isSaving watcher triggered:', { oldValue, newValue, saveErrorMessage: this.saveErrorMessage });\n\n // When isSaving changes from true to false (save completed successfully)\n if (oldValue === true && newValue === false && !this.saveErrorMessage) {\n console.log('Setting showSavedMessage to true');\n this.showSavedMessage = true;\n\n // Clear any existing timeout\n if (this.savedMessageTimeoutId) {\n clearTimeout(this.savedMessageTimeoutId);\n }\n\n // Hide the \"Saved\" message after 5 seconds\n this.savedMessageTimeoutId = setTimeout(() => {\n console.log('Hiding saved message after 5 seconds');\n this.showSavedMessage = false;\n }, 5000);\n }\n }\n\n overrideStyles() {\n const shadowRoot = (this as any).el?.shadowRoot;\n shadowRoot?.querySelectorAll('unity-typography').forEach(element => {\n const styleOverride =\n element.id === this.titleId ? this.udpForm?.styleOverrides?.titleText : element.id === this.descriptionId ? this.udpForm?.styleOverrides?.paragraphText : ({} as any);\n\n if (styleOverride?.fontFamily && fontOverrideMapping[styleOverride.fontFamily]) {\n overrideFont(element, fontOverrideMapping[styleOverride.fontFamily]);\n }\n if (styleOverride?.variant) {\n element.setAttribute('variant', styleOverride.variant);\n }\n });\n }\n\n private isSectionContainsFollowUpFormLink(sectionKey: string): boolean {\n const sectionObject = this.udpFormSubmission.data.submissionResponseData[sectionKey]\n\n for (const [_key, questionObject] of Object.entries(sectionObject) as any) {\n if (questionObject?.metadata && questionObject.metadata?.followUpFormSubmissionId) {\n return true;\n }\n }\n\n return false;\n }\n\n render() {\n if (this.isLoading) {\n return (\n <udp-linear-loader />\n );\n }\n\n if (!this.udpForm) {\n return (\n <div class=\"error-banner\">\n <unity-typography variant=\"body2\">Error Loading Form</unity-typography>\n </div>\n );\n }\n\n let questionNumber = 1;\n\n const sectionSet = new Set();\n this.udpForm.formQuestions.forEach(fq => sectionSet.add(fq.section));\n // const orderedSectionNumbers = [...sectionSet].sort((a: number, b: number) => a - b);\n\n const hiddenQuestionTypes = [UdpFormsFieldTypeEnum.Hidden, UdpFormsFieldTypeEnum.Paragraph];\n\n const backgroundOverrides: { backgroundImage?: string | null; backgroundColor?: string | null } = {};\n if (this.udpForm?.styleOverrides?.background?.backgroundImage) {\n // uncomment when we want to allow background images\n //backgroundOverrides.backgroundImage = `url(${this.udpForm?.styleOverrides?.background?.backgroundImage})`;\n } else if (this.udpForm?.styleOverrides?.background?.backgroundColor) {\n backgroundOverrides.backgroundColor = this.udpForm?.styleOverrides?.background?.backgroundColor;\n }\n return (\n <div class={'background'} style={backgroundOverrides}>\n <udp-container maxWidth=\"md\">\n <div class=\"form-container\">\n {!this.submitSuccessful ? (\n \n <stencil-form\n handleSubmit={this.handleSubmit}\n initialValues={this.initialValues}\n handleChange={this.handleChange}\n onDirtyChange={event => this.formDirtyChange.emit(event.detail)}\n >\n {this.readonly && \n (<div class=\"error-banner\">\n <unity-typography variant=\"body2\">View Only Mode. The contents of this form cannot be changed.</unity-typography>\n </div>)}\n <fluent-dialog\n open={this.isDialogOpen}\n message={this.dialogMessage}\n labelOne={'Confirm'}\n labelTwo={'Cancel'}\n actionOne={() => this.dialogAction()}\n actionTwo={() => (this.isDialogOpen = false)}\n />\n {/********** QUESTIONS *********/}\n <div>\n {/* <div class=\"header\" style={this.udpForm?.styleOverrides?.headerBackgroundColor ? { backgroundColor: this.udpForm?.styleOverrides?.headerBackgroundColor } : ''}> */}\n <div class=\"form-section-block\">\n <div\n class=\"form-renderer-header\"\n style={{\n ...(this.udpForm?.styleOverrides?.headerBackgroundColor && {\n backgroundColor: this.udpForm.styleOverrides.headerBackgroundColor,\n }),\n }}\n >\n <unity-typography id={this.titleId} variant={'h6'} color=\"inherit\">\n {this.udpForm.name}\n </unity-typography>\n\n {/* Auto-save status indicator for authenticated users */}\n {this.showAutoSaveStatus && (\n <div class=\"auto-save-status\">\n {/* {this.isSaving && (\n <unity-typography variant=\"body\" color=\"primary\">\n Saving...\n </unity-typography>\n )} */}\n {this.saveErrorMessage && (\n <unity-typography variant=\"body\" color=\"secondary\">\n {this.saveErrorMessage}\n </unity-typography>\n )}\n </div>\n )}\n {this.isShowManualSaveIcon && (\n <udp-save-draft-button\n isVisible={this.isShowManualSaveIcon}\n isSaving={this.isSaving}\n // saveErrorMessage={this.saveErrorMessage}\n showSavedMessage={this.showSavedMessage}\n handleSave={this.handleSave}\n />\n )}\n </div>\n\n <div class=\"form-section-content\">\n <div class=\"items\">\n <div class=\"form-section-text\">\n <unity-typography id={this.descriptionId} variant={this.udpForm?.styleOverrides?.paragraphText?.variant ?? 'body'} color=\"inherit\">\n {this.udpForm.description}\n </unity-typography>\n </div>\n </div>\n </div>\n </div>\n {/* Save Button - moves between header and floating based on space */}\n {this.dynamicSections.map((section, sIndex) => {\n return (\n <div class=\"form-section-block\">\n <div class=\"form-section-header\">\n <div class=\"form-section-header-title\">\n <unity-typography variant=\"h6\" color=\"inherit\">\n {`${section.title}${section.sectionPositionSuffix > 1 ? ` (${section.sectionPositionSuffix})` : ''}`}\n </unity-typography>\n </div>\n <div class=\"form-section-header-actions\">\n {/* // Only show the add button if the section is repeatable and is the last in the repeat group */}\n {section.sectionProperties.isRepeatable && this.dynamicSections.filter(s => s.id === section.id).length === section.sectionPositionSuffix && !this.readonly && (\n <stencil-icon-button icon={getIconFromName('add')} tooltip=\"Repeat This Section\" onClick={() => this.duplicateRepeatableSection(sIndex)} />\n )}\n {/* // show the delete button if the section is repeatable and not the original section */}\n {!section.isOriginalSection && !this.readonly && (\n <stencil-icon-button \n icon={getIconFromName('subtract')} \n tooltip=\"Delete This Repeated Section\" \n onClick={\n () => {\n // e.stopPropagation();\n if (this.isSectionContainsFollowUpFormLink(`${section.name}_${section.sectionPositionSuffix}`)) {\n this.dialogAction = async () => {\n this.deleteRepeatableSection(sIndex)\n await this.performBackgroundSaveAndUpdateLocalSubmissionState(this.udpFormSubmission.data.submissionResponseData);\n this.isDialogOpen = false;\n }; \n } else {\n this.deleteRepeatableSection(sIndex)\n }\n \n this.isDialogOpen = true;\n }} />\n )}\n </div>\n </div>\n\n <div class=\"form-section-content\">\n <div class=\"items\">\n <div class=\"form-section-text\">\n <unity-typography variant=\"body\" color=\"inherit\">\n {section.sectionText}\n </unity-typography>\n </div>\n\n <div>\n {section.formQuestions.map((question: UdpFormQuestion) => {\n const isHidden = hiddenQuestionTypes.includes(question.fieldTypeId);\n const num: number = questionNumber;\n if (!isHidden) questionNumber++;\n\n const sectionKey = section.sectionPositionSuffix > 1 ? `${section.name}_${section.sectionPositionSuffix}` : `${section.name}`\n\n return (\n <div class=\"item\">\n <udp-question\n styleOverrides={{\n helperText: this.udpForm.styleOverrides?.helperText,\n paragraphText: this.udpForm.styleOverrides?.paragraphText,\n questionText: this.udpForm.styleOverrides?.questionText,\n }}\n question={question}\n questionNumber={num}\n value={this.initialValues?.[sectionKey]?.[question.name]?.value ?? ''}\n disabled={this.disabled}\n readonly={this.readonly}\n key={question.questionIdentifierKey}\n initialValues={this.initialValues}\n clientUserInfo={this.clientUserInfo}\n udpFormSubmission={this.udpFormSubmission}\n />\n </div>\n );\n })}\n </div>\n </div>\n </div>\n </div>\n );\n })}\n {this.udpFormSubmission?.status != 2 && ( \n <div class=\"footer\">\n <input\n disabled={this.isLoading || this.disabled || this.readonly}\n type=\"submit\"\n value=\"Submit\"\n class=\"submit\"\n id=\"udpRecord-udp-forms-renderer-Submit\"\n onClick={() => {\n console.log('Submit button clicked');\n // Let the form handle the submit naturally\n }}\n />\n </div>\n )}\n </div>\n </stencil-form>\n ) : (\n //if the form has been submit, display success message with a button to trigger the action associated to the form\n <div class=\"center-div\">\n <udp-ambient-card>\n <div class=\"submit-card\">\n <unity-typography>Thank you for your submission.</unity-typography>\n {/* // No action configured for now. */}\n {/* <div class=\"finish-button\">\n <custom-button onClick={this.handleFinish}>Back</custom-button>\n </div> */}\n </div>\n </udp-ambient-card>\n </div>\n )}\n </div>\n </udp-container>\n </div>\n );\n }\n}\n"]}
|
|
@@ -37,8 +37,12 @@ export class UdpFormsRenderer {
|
|
|
37
37
|
handleLaunchFollowUpForm: 'handleLaunchFollowUpForm'
|
|
38
38
|
};
|
|
39
39
|
this.tenantId = getCurrentTenantId();
|
|
40
|
-
|
|
41
|
-
this.
|
|
40
|
+
// info for the current logged in user on the client side
|
|
41
|
+
this.clientUserInfo = {
|
|
42
|
+
id: null,
|
|
43
|
+
displayName: null,
|
|
44
|
+
email: null,
|
|
45
|
+
};
|
|
42
46
|
this.followUpParentSectionKey = ''; // used for follow up forms.
|
|
43
47
|
this.followUpParentQuestionKey = ''; // used for follow up forms.
|
|
44
48
|
this.handleLaunchFollowUpFormSideSheet = async (e) => {
|
|
@@ -314,8 +318,8 @@ export class UdpFormsRenderer {
|
|
|
314
318
|
}
|
|
315
319
|
}
|
|
316
320
|
};
|
|
317
|
-
const followUpFormSubmission = new UdpFormSubmission({ formId: followUpFormId, formVersion: followUpFormVersion, unityUserId: this.
|
|
318
|
-
const followUpFormSubmissionHandler = FormSubmissionHandlerFactory.create(false, this.
|
|
321
|
+
const followUpFormSubmission = new UdpFormSubmission({ formId: followUpFormId, formVersion: followUpFormVersion, unityUserId: this.clientUserInfo.id, data: followUpSubmissionData });
|
|
322
|
+
const followUpFormSubmissionHandler = FormSubmissionHandlerFactory.create(false, this.clientUserInfo.id);
|
|
319
323
|
const response = await followUpFormSubmissionHandler.createNewLinkedFollowUpFormSubmission(followUpFormSubmission);
|
|
320
324
|
// update the current form submission state with the follow up form submission id in the metadata
|
|
321
325
|
const itemMetadata = this.udpFormSubmission.data.submissionResponseData[sectionKey][questionKey].metadata;
|
|
@@ -350,14 +354,15 @@ export class UdpFormsRenderer {
|
|
|
350
354
|
var _a;
|
|
351
355
|
this.isLoading = true;
|
|
352
356
|
try {
|
|
353
|
-
// Get user info if available
|
|
357
|
+
// Get client user info if available
|
|
354
358
|
const user = (_a = this.getUserCallback) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
355
359
|
if (user) {
|
|
356
|
-
this.
|
|
357
|
-
this.
|
|
360
|
+
this.clientUserInfo.id = user.id || null;
|
|
361
|
+
this.clientUserInfo.displayName = user.name || null;
|
|
362
|
+
this.clientUserInfo.email = user.email || null;
|
|
358
363
|
}
|
|
359
|
-
this.formSubmissionHandler = FormSubmissionHandlerFactory.create(this.isPublic, this.
|
|
360
|
-
this.udpFormSubmission = new UdpFormSubmission({ id: this.submissionId, formId: this.formId, formVersion: this.version, unityUserId: this.
|
|
364
|
+
this.formSubmissionHandler = FormSubmissionHandlerFactory.create(this.isPublic, this.clientUserInfo.id);
|
|
365
|
+
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 });
|
|
361
366
|
// fetch existing submission from Udp.FormSubmission if submissionId is provided
|
|
362
367
|
// take exisitng object, and populate with db values, and return new obj with updated values
|
|
363
368
|
if (this.submissionId) {
|
|
@@ -639,7 +644,7 @@ export class UdpFormsRenderer {
|
|
|
639
644
|
return;
|
|
640
645
|
const draft = draftsArr[draftIdx];
|
|
641
646
|
const saveTimestamp = draft.timestamp || new Date().toISOString();
|
|
642
|
-
const savedComment = Object.assign(Object.assign({}, draft), { timestamp: saveTimestamp, editedTimestamp: new Date().toISOString(), userId: this.
|
|
647
|
+
const savedComment = Object.assign(Object.assign({}, draft), { timestamp: saveTimestamp, editedTimestamp: new Date().toISOString(), userId: this.clientUserInfo.id, userDisplayName: this.clientUserInfo.displayName, isDraftComment: false });
|
|
643
648
|
// If a saved comment with same id exists, replace it. Otherwise append.
|
|
644
649
|
const existingIdx = commentsArr.findIndex(c => c.commentId === commentId);
|
|
645
650
|
if (existingIdx !== -1) {
|
|
@@ -735,20 +740,17 @@ export class UdpFormsRenderer {
|
|
|
735
740
|
}
|
|
736
741
|
isShowManualSaveIcon() {
|
|
737
742
|
// return (this.isFormDirty || this.isUserUpdatedSections) && !this.isSubmitted && !!this.userId;
|
|
738
|
-
const showSaveIcon = (this.isFormDirty || this.isUserUpdatedSections) && !!this.
|
|
743
|
+
const showSaveIcon = (this.isFormDirty || this.isUserUpdatedSections) && !!this.clientUserInfo.id;
|
|
739
744
|
return showSaveIcon;
|
|
740
745
|
}
|
|
741
746
|
;
|
|
742
747
|
get isReadOnlyMode() {
|
|
743
|
-
return this.isSubmitted || this.udpFormSubmission.unityUserId !== this.
|
|
744
|
-
}
|
|
745
|
-
get isShowCommentUI() {
|
|
746
|
-
return this.isSubmitted;
|
|
748
|
+
return this.isSubmitted || this.udpFormSubmission.unityUserId !== this.clientUserInfo.id;
|
|
747
749
|
}
|
|
748
750
|
render() {
|
|
749
|
-
return (h("div", { key: '
|
|
751
|
+
return (h("div", { key: 'c0adb1a4f78f6ff15ce946b44677820f716e8a86', class: "forms-renderer-container", style: this.isLoading ? { minHeight: '100vh' } : {} }, this.renderFollowUpSideSheet(), h("udp-forms-ui", { udpForm: this.udpForm, initialValues: this.initialValues, udpFormSubmission: this.udpFormSubmission, submitSuccessful: this.submitSuccessful, isSaving: this.isSaving, saveErrorMessage: this.saveErrorMessage,
|
|
750
752
|
// showAutoSaveStatus={this.formSubmissionHandler.supportsAutoSave() && !!this.userId}
|
|
751
|
-
readonly: this.isReadOnlyMode, handleSubmit: this.handleSubmit.bind(this), handleSave: values => Promise.resolve(this.debouncedManualSave(values)), handleChange: this.handleFormChange, handleAction: this.triggerAction, handleFinish: this.handleFinish,
|
|
753
|
+
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 })));
|
|
752
754
|
}
|
|
753
755
|
static get is() { return "udp-forms-renderer"; }
|
|
754
756
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"udp-forms-renderer.js","sourceRoot":"","sources":["../../../../../src/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAC;AAC7G,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;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SAAS,EACzB,gBAAgB,EAAE,IAAI,CAAC,eAAe,EACtC,kDAAkD,EAAE,IAAI,CAAC,kDAAkD,GAC3G,CACE,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, State, Element, h } from '@stencil/core';\nimport { throttle } from 'lodash';\nimport { Guid } from 'src/global/types';\nimport { UdpFormsFieldTypeEnum } from '../utils/enums';\nimport { getCurrentTenantId } from 'src/udp-utilities/tenant/tenantUtils';\nimport { fetchLatestForms } from '../udp-forms-list/udp-form-api-utils';\nimport { UdpFormsTypeEnum, UdpFormsPageIdEnum } from '../utils/enums';\nimport { buildEmptyInitialValues } from '../utils/utils';\nimport { IFormSubmissionHandler } from '../utils/form-submission-handler/IFormSubmissionHandler';\nimport { FormSubmissionHandlerFactory } from '../utils/form-submission-handler/FormSubmissionHandlerFactory';\nimport { UdpFormHandler } from '../utils/form-handler/UdpFormHandler';\nimport { UdpFormSubmission } from '../utils/classes/UdpFormSubmission';\nimport { UdpForm } from '../utils/classes/UdpForm';\nimport { v4 as uuidv4 } from 'uuid';\n\n@Component({\n tag: 'udp-forms-renderer',\n shadow: true,\n})\nexport class UdpFormsRenderer {\n @Element() el: HTMLElement;\n \n @Prop() formId?: Guid | null;\n @Prop() version?: number | null;\n @Prop() submissionId?: Guid | null;\n @Prop() triggerAction: (actionId: Guid, params: Object) => void;\n @Prop() isPublic: boolean = false;\n @Prop() callbackUrl: string;\n @Prop() getUserCallback?: Function;\n @Prop() enqueueSnackbar: Function;\n @Prop() closeSnackbar: Function;\n @Prop() autoSaveDelay: number = 2000; // Debounce delay for auto-save in milliseconds (currently disabled)\n @Prop() history: any;\n @Prop() generic1: any; // generic prop for application specific logic\n @Prop() generic2: any; // generic prop for application specific logic\n @Prop() generic3: any; // generic prop for application specific logic\n \n \n @State() initialValues: { [name: string]: any } = {};\n @State() submitSuccessful: boolean = false;\n @State() currentFormData: { [name: string]: any } = {};\n @State() isLoading: boolean = false;\n @State() isSaving: boolean = false;\n @State() isSubmitted: boolean = false;\n @State() saveErrorMessage: string | null = null;\n @State() dynamicSections: any[] = [];\n @State() isUpdatingSections: boolean = false;\n @State() reRenderKey: number = 0;\n @State() isFormDirty: boolean = false;\n @State() isUserUpdatedSections: boolean = false;\n\n @State() sideSheetFollowUpFormsList: any[] = []; // used for follow up forms. \n @State() followUpSideSheetTotalItems: number = 0; // used for follow up forms. \n @State() isFollowUpFormsSideSheetOpen: boolean = false; // used for follow up forms.\n @State() followUpSideSheetListPageNumber: number = 1; // used for follow up forms.\n\n private FOLLOW_UP_SIDE_SHEET_PAGE_SIZE = 5;\n private readonly componentMap = {\n history: 'history',\n listItemData: 'listItemData',\n handleLaunchFollowUpForm: 'handleLaunchFollowUpForm'\n };\n\n\n private tenantId: Guid = getCurrentTenantId();\n // private debouncedAutoSave: (values: { [name: string]: any }) => void; // Kept for future use (currently disabled)\n private debouncedManualSave: (values: { [name: string]: any }) => void; // Debounced manual save (5 seconds)\n private userId: Guid | null = null;\n private userDisplayName: string | null = null;\n \n private udpForm: UdpForm; // udpForm data object \n private udpFormSubmission: UdpFormSubmission; // udpFormSubmission data object \n\n private formHandler: UdpFormHandler // hanlder for API interactions with the UdpForm domain\n private formSubmissionHandler: IFormSubmissionHandler; // handler for API interactions with the UdpFormSubmission domain\n\n private followUpParentSectionKey: string = ''; // used for follow up forms.\n private followUpParentQuestionKey: string = ''; // used for follow up forms.\n\n componentDidLoad() {\n if (this.el)\n {\n this.el.addEventListener(\n 'questionCommentAction',\n async (e: CustomEvent<{ type: string; questionIdentifierKey: string, commentId: string }>) => this.handleQuestionCommentLiveCRUD(e)\n );\n // Listen for launchFollowUpFormSideSheet event from udp-question\n this.el.addEventListener(\n 'launchFollowUpFormSideSheet',\n (e: CustomEvent<any>) => this.handleLaunchFollowUpFormSideSheet(e),\n );\n\n this.el.addEventListener('formDirtyChange', (e: CustomEvent<boolean>) => {\n this.isFormDirty = e.detail;\n });\n }\n\n }\n\n\n private handleLaunchFollowUpFormSideSheet = async (e) => {\n try {\n await this.performBackgroundSaveAndUpdateLocalSubmissionState(this.udpFormSubmission.data.submissionResponseData);\n this.followUpParentSectionKey = e.detail.sectionKey;\n this.followUpParentQuestionKey = e.detail.questionKey;\n await this.loadFollowUpForms(this.followUpParentSectionKey, this.followUpParentQuestionKey);\n this.isFollowUpFormsSideSheetOpen = true;\n } catch (error) {\n console.error('Error loading follow-up forms:', error);\n }\n };\n\n async componentWillLoad() {\n this.isLoading = true;\n\n try {\n // Get user info if available\n const user = this.getUserCallback?.();\n if (user) {\n this.userId = user.id || null;\n this.userDisplayName = user.name || null;\n } \n \n this.formSubmissionHandler = FormSubmissionHandlerFactory.create(this.isPublic, this.userId)\n this.udpFormSubmission = new UdpFormSubmission({id: this.submissionId, formId: this.formId, formVersion: this.version, unityUserId: this.userId, generic1: this.generic1, generic2: this.generic2, generic3: this.generic3});\n\n // fetch existing submission from Udp.FormSubmission if submissionId is provided \n // take exisitng object, and populate with db values, and return new obj with updated values\n if (this.submissionId) {\n this.udpFormSubmission = await this.formSubmissionHandler.fetchAndPopulateUdpFormSubmissionObj(this.udpFormSubmission); \n } \n\n // get the master form from Udp.Form\n let formId;\n let formVersion;\n\n if (this.submissionId) {\n formId = this.udpFormSubmission.formId;\n formVersion = this.udpFormSubmission.formVersion;\n } else if (this.formId && this.version) {\n formId = this.formId;\n formVersion = this.version;\n }\n \n this.formHandler = new UdpFormHandler(this.tenantId);\n const formData = await this.formHandler.getFormByFormIdAndFormVersion(formId, formVersion);\n this.udpForm = new UdpForm(formData);\n this.initialValues = buildEmptyInitialValues(this.udpForm);\n\n // if there's existing data, update the form's state\n if (this.udpFormSubmission.data.submissionResponseData) {\n this.initialValues = { ...this.udpFormSubmission.data.submissionResponseData };\n\n if (this.udpFormSubmission.status === 2 || this.udpFormSubmission.status === 'submitted') {\n this.isSubmitted = true;\n }\n }\n\n this.initializeDynamicSections(); // process the master form into dynamic sections \n \n // After sections/questions are prepared, seed initial values from URL for ALL questions,\n // with saved values taking precedence, and paragraph defaults as a fallback.\n this.applyUrlInitialValuesForAll();\n\n // Set up throttled manual save function (5 seconds) - fires immediately, then throttles\n this.debouncedManualSave = throttle(\n async (values: { [name: string]: any }) => {\n await this.handleManualSave(values);\n },\n 2000,\n { leading: true, trailing: false },\n );\n\n // Set up debounced auto-save function (currently disabled)\n // this.debouncedAutoSave = debounce(async (values: { [name: string]: any }) => {\n // // await this.handleAutoSave(values); // Disabled for now\n // }, this.autoSaveDelay);\n } catch (error) {\n console.error('Error failed to load form in the form renderer:', error);\n } finally {\n this.isLoading = false;\n }\n }\n\n\n // build dynamic sections based on the\n private initializeDynamicSections() {\n const tempDynamicSection: any[] = [];\n const sortedSections = structuredClone(this.udpForm.udpFormUdpFormSection).sort((a, b) => a.order - b.order);\n\n for (const section of sortedSections) {\n section.sectionProperties = JSON.parse(section.sectionProperties || {});\n const repeatGroupKeys = this.findRepeatGroupKeys(section.name, this.initialValues);\n section.isOriginalSection = true;\n section.sectionPositionSuffix = 1; // default position\n\n // always add the original section into dynamic sections\n tempDynamicSection.push({\n ...structuredClone(section),\n // dynamicSectionName: section.name,\n formQuestions: structuredClone(this.udpForm.formQuestions)\n .filter(q => q.formSectionId === section.id)\n .sort((a, b) => a.questionOrder - b.questionOrder)\n .map(q => ({ ...q, questionIdentifierKey: `${section.name}.${q.name}` , isShowCommentInput: true})),\n });\n\n // create then add additional sections if there are repeated sections\n if (section.sectionProperties?.isRepeatable && repeatGroupKeys.length > 0) {\n const maxRepeatedSectionSuffix = Math.max(...repeatGroupKeys); // create a new section for the max value of repeat group keys, even if there are no saved answers\n\n // for (const repeatKey of repeatGroupKeys) { // create a section only for the suffix saved\n for (let repeatKey = 2; repeatKey <= maxRepeatedSectionSuffix; repeatKey++) {\n const clonedSection = {\n ...structuredClone(section),\n formQuestions: structuredClone(this.udpForm.formQuestions)\n .filter(q => q.formSectionId === section.id)\n .sort((a, b) => a.questionOrder - b.questionOrder)\n .map(q => ({ ...q, questionIdentifierKey: `${section.name}_${repeatKey}.${q.name}` , isShowCommentInput: true})),\n isOriginalSection: false,\n sectionPositionSuffix: repeatKey,\n };\n tempDynamicSection.push(clonedSection);\n }\n }\n }\n\n this.dynamicSections = tempDynamicSection;\n }\n\n private findRepeatGroupKeys(sectionName: string, values: Object): number[] {\n const keys = Object.keys(values);\n const repeatGroupSet = new Set<number>();\n\n // Match: sectionName_2\n const regex = new RegExp(`^${sectionName}_(\\\\d+)`);\n\n keys.forEach(key => {\n const match = key.match(regex);\n if (match && match[1]) {\n repeatGroupSet.add(Number(match[1]));\n }\n });\n\n return Array.from(repeatGroupSet).sort((a, b) => a - b);\n }\n\n /**\n * Duplicate a repeatable section\n */\n private duplicateRepeatableSection = (index: number) => {\n if (this.isSubmitted || this.isUpdatingSections) return;\n this.isUpdatingSections = true;\n this.isLoading = true;\n\n try {\n const sectionToClone = this.dynamicSections[index];\n if (!sectionToClone) return;\n\n const cloningSectionName = sectionToClone.name;\n\n // Find existing repeat group indices\n const repeatKeys = this.findRepeatGroupKeys(cloningSectionName, this.initialValues);\n const nextRepeatIndex = repeatKeys.length > 0 ? Math.max(...repeatKeys) + 1 : 2;\n\n const clonedSection = {\n ...structuredClone(sectionToClone),\n formQuestions: sectionToClone.formQuestions.map(q => {\n const newQuestionObj = structuredClone(q);\n newQuestionObj.questionIdentifierKey = `${cloningSectionName}_${nextRepeatIndex}.${q.name}`;\n return newQuestionObj;\n }),\n isOriginalSection: false,\n sectionPositionSuffix: nextRepeatIndex,\n };\n\n // Find the last index of this section group\n let insertAtIndex = index;\n for (let i = index + 1; i < this.dynamicSections.length; i++) {\n const s = this.dynamicSections[i];\n if (s.name === cloningSectionName) {\n insertAtIndex = i;\n } else {\n break;\n }\n }\n\n // Insert after the last repeat of the section group\n this.dynamicSections = [\n ...this.dynamicSections.slice(0, insertAtIndex + 1),\n clonedSection,\n ...this.dynamicSections.slice(insertAtIndex + 1),\n ];\n\n // Create new initial values structure\n const newInitialValues = structuredClone(this.udpFormSubmission.data.submissionResponseData);\n\n clonedSection.formQuestions.forEach(q => {\n const newSectionNameWithSuffix = `${cloningSectionName}_${nextRepeatIndex}`;\n const newQuestionName = q.name;\n\n if (!newInitialValues[newSectionNameWithSuffix]) {\n newInitialValues[newSectionNameWithSuffix] = {};\n }\n\n // Preserve only Paragraph values from the source section; clear others\n let value = '';\n if (q.fieldTypeId === UdpFormsFieldTypeEnum.Paragraph) {\n // Determine source section key (the section being duplicated)\n const sourceSectionKey = sectionToClone.isOriginalSection\n ? cloningSectionName\n : `${cloningSectionName}_${sectionToClone.sectionPositionSuffix}`;\n const sourceVal = this.udpFormSubmission.data.submissionResponseData?.[sourceSectionKey]?.[newQuestionName]?.value;\n let fieldProps: any = q?.fieldProperties;\n if (typeof fieldProps === 'string') {\n try {\n fieldProps = JSON.parse(fieldProps || '{}');\n } catch {\n fieldProps = {};\n }\n }\n const paragraphDefault = fieldProps?.paragraphText ?? '';\n value = sourceVal ?? paragraphDefault;\n }\n\n newInitialValues[newSectionNameWithSuffix][newQuestionName] = { value, comments: [], metadata : {}};\n });\n // This will trigger a complete form re-render\n this.initialValues = {...newInitialValues};\n this.udpFormSubmission.data.submissionResponseData = {...newInitialValues};\n this.triggerFormRerender();\n } finally {\n this.isUpdatingSections = false;\n this.isLoading = false;\n this.isUserUpdatedSections = true;\n }\n };\n\n /**\n * Delete a repeatable section\n */\n private deleteRepeatableSection = (index: number) => {\n if (this.isSubmitted) return;\n\n const sectionToDelete = this.dynamicSections[index];\n if (!sectionToDelete || sectionToDelete.isOriginalSection) return;\n\n this.isUpdatingSections = true;\n this.isLoading = true;\n try {\n const deleteSectionName = sectionToDelete.name;\n const deleteSuffix = sectionToDelete.sectionPositionSuffix;\n const sectionKeyToDelete = `${deleteSectionName}_${deleteSuffix}`;\n\n const newInitialValues = { ...this.udpFormSubmission.data.submissionResponseData };\n delete newInitialValues[sectionKeyToDelete];\n\n // Remove the section from dynamicSections\n const updatedSections = structuredClone(this.dynamicSections);\n updatedSections.splice(index, 1);\n\n // Shift all later repeatable sections backward by 1\n updatedSections.forEach(section => {\n if (\n section.name !== deleteSectionName ||\n section.isOriginalSection ||\n section.sectionPositionSuffix <= deleteSuffix\n ) {\n return;\n }\n\n const oldSuffix = section.sectionPositionSuffix;\n const oldSectionKey = `${deleteSectionName}_${oldSuffix}`;\n const newSuffix = oldSuffix - 1;\n const newSectionKey = `${deleteSectionName}_${newSuffix}`;\n\n // Update suffix\n section.sectionPositionSuffix = newSuffix;\n\n // Update questionIdentifierKeys\n section.formQuestions = section.formQuestions.map(q => {\n const newSectionQuestion = structuredClone(q);\n newSectionQuestion.questionIdentifierKey = `${newSectionKey}.${q.name}`;\n return newSectionQuestion;\n });\n\n // Move data in initial values\n if (newInitialValues[oldSectionKey]) {\n newInitialValues[newSectionKey] = structuredClone(newInitialValues[oldSectionKey]);\n delete newInitialValues[oldSectionKey];\n }\n });\n\n this.dynamicSections = updatedSections;\n this.initialValues = {...newInitialValues};\n this.udpFormSubmission.data.submissionResponseData = {...newInitialValues};\n this.triggerFormRerender();\n } finally {\n this.isUpdatingSections = false;\n this.isLoading = false;\n this.isUserUpdatedSections = true;\n }\n };\n\n // Build initial values from URL for ALL fields, but do NOT override saved values.\n // For Paragraph, also fall back to the builder's default text when nothing else provided.\n private applyUrlInitialValuesForAll() {\n if (!Array.isArray(this.dynamicSections)) return;\n\n const urlParams =\n typeof window !== 'undefined' ? new URLSearchParams(window.location.search) : null;\n\n // 1) Collect URL values into nested structure: { [sectionKey]: { [questionName]: { value, comments: [] } } }\n const urlValuesNested: {\n [sectionKey: string]: { [qName: string]: { value: any; comments: any[] } };\n } = {};\n if (urlParams) {\n this.dynamicSections.forEach(section => {\n const sectionKey = section.isOriginalSection\n ? section.name\n : `${section.name}_${section.sectionPositionSuffix}`;\n (section.formQuestions || []).forEach(q => {\n if (!q) return;\n const candidates = [q.processedSubmissionName, q.questionIdentifierKey, q.name].filter(\n Boolean,\n ) as string[];\n let urlVal: string | null = null;\n for (const c of candidates) {\n urlVal = urlParams.get(c);\n if (urlVal !== null) break;\n }\n if (urlVal !== null) {\n if (!urlValuesNested[sectionKey]) urlValuesNested[sectionKey] = {};\n urlValuesNested[sectionKey][q.name] = { value: urlVal, comments: [] };\n }\n });\n });\n }\n\n // 2) Merge with saved values (this.initialValues) taking precedence\n const merged: { [sectionKey: string]: { [qName: string]: { value: any; comments: any[] } } } =\n structuredClone(this.initialValues) || {};\n Object.entries(urlValuesNested).forEach(([sectionKey, qMap]) => {\n if (!merged[sectionKey]) merged[sectionKey] = {} as any;\n Object.entries(qMap).forEach(([qName, valObj]) => {\n const existing = merged[sectionKey][qName];\n // Only set from URL if no saved value exists (null/undefined/empty-string)\n const isMissing =\n existing == null ||\n existing.value == null ||\n (typeof existing.value === 'string' && existing.value.trim() === '');\n if (isMissing) {\n merged[sectionKey][qName] = valObj;\n }\n });\n });\n\n // 3) Paragraph defaults: if still undefined/null, use fieldProperties.paragraphText\n this.dynamicSections.forEach(section => {\n const sectionKey = section.isOriginalSection\n ? section.name\n : `${section.name}_${section.sectionPositionSuffix}`;\n if (!merged[sectionKey]) merged[sectionKey] = {} as any;\n (section.formQuestions || []).forEach(q => {\n if (!q) return;\n if (q.fieldTypeId === UdpFormsFieldTypeEnum.Paragraph) {\n const existing = merged[sectionKey][q.name];\n const isMissing =\n existing == null ||\n existing.value == null ||\n (typeof existing.value === 'string' && existing.value.trim() === '');\n if (isMissing) {\n let fieldProps: any = q?.fieldProperties;\n if (typeof fieldProps === 'string') {\n try {\n fieldProps = JSON.parse(fieldProps || '{}');\n } catch {\n fieldProps = {};\n }\n }\n merged[sectionKey][q.name] = {\n value: fieldProps?.paragraphText ?? '',\n comments: [],\n };\n }\n }\n });\n });\n\n this.initialValues = merged;\n this.udpFormSubmission.data.submissionResponseData = { ...merged } as any;\n }\n\n private async handleSubmit(values: { [name: string]: any }) {\n this.isLoading = true\n try {\n this.udpFormSubmission = await this.formSubmissionHandler.finalizeFormSubmissionState(values, this.udpFormSubmission);\n this.submitSuccessful = true;\n } catch (error) {\n this.enqueueSnackbar('There was an error submitting this form', {\n variant: 'error',\n anchorOrigin: { vertical: 'top', horizontal: 'center' },\n });\n throw error;\n } finally {\n this.isLoading = false \n }\n }\n\n\n /**\n * Auto save (background save)\n */\n private performBackgroundSaveAndUpdateLocalSubmissionState = async (values: { [name: string]: any }) => {\n this.saveErrorMessage = null;\n try {\n const updatedUdpFormSubmission = await this.formSubmissionHandler.saveCurrentFormSubmissionState(values, this.udpFormSubmission);\n this.udpFormSubmission = updatedUdpFormSubmission\n this.initialValues = { ...(updatedUdpFormSubmission.data?.submissionResponseData || {}) };\n if (!new URLSearchParams(window.location.search).has('udpf_submissionId')) {\n // replace the current entry's query string with udpf_submissionId without needing to know the path\n this.replaceUrlWithSubmissionId(updatedUdpFormSubmission.id);\n }\n } catch (error) {\n this.saveErrorMessage = 'Failed to save form data';\n } finally {\n this.isSaving = false;\n this.isUserUpdatedSections = false;\n this.isFormDirty = false;\n }\n };\n\n private replaceUrlWithSubmissionId(submissionId: Guid) {\n // build a URL that preserves the current pathname + hash but replaces the query string\n const pathname = typeof window !== 'undefined' ? window.location.pathname : `/page/${UdpFormsPageIdEnum.FormRendererPageId}`;\n const hash = typeof window !== 'undefined' ? window.location.hash : '';\n const newUrl = `${pathname}?udpf_submissionId=${submissionId}${hash}`;\n\n const h = this.history as any;\n\n // Prefer history.replace when available, handle react-router v6 navigate function, fallback to push or native replaceState\n if (h) {\n if (typeof h.replace === 'function') {\n h.replace(newUrl);\n return;\n }\n if (typeof h.push === 'function') {\n h.push(newUrl);\n return;\n }\n // react-router v6 exposes a navigate function\n if (typeof h === 'function') {\n try {\n h(newUrl, { replace: true });\n } catch {\n h(newUrl);\n }\n return;\n }\n }\n\n if (typeof window !== 'undefined' && window.history && typeof window.history.replaceState === 'function') {\n window.history.replaceState({}, '', newUrl);\n } else if (typeof window !== 'undefined') {\n window.location.href = newUrl;\n }\n }\n\n\n\n/**\n * Handle the user saving or deleting a comment\n */\n private handleCommmentUpdate = async (values: { [name: string]: any }) => {\n this.isSaving = true;\n this.saveErrorMessage = null;\n\n try {\n const updatedUdpFormSubmission = await this.formSubmissionHandler.saveFormSubmissionComments(values, this.udpFormSubmission);\n this.udpFormSubmission = updatedUdpFormSubmission\n this.initialValues = { ...(updatedUdpFormSubmission.data?.submissionResponseData || {}) };\n this.enqueueSnackbar('Saved sucessfully.', {\n variant: 'success',\n anchorOrigin: { vertical: 'top', horizontal: 'center' },\n });\n } catch (error) {\n this.enqueueSnackbar('There was an error saving.', {\n variant: 'error',\n anchorOrigin: { vertical: 'top', horizontal: 'center' },\n });\n } finally {\n this.isSaving = false;\n this.isUserUpdatedSections = false;\n this.isFormDirty = false;\n }\n };\n\n\n\n /**\n * Manual save function - debounced to 5 seconds\n */\n private handleManualSave = async (values: { [name: string]: any }) => {\n // Only save if handler supports it and user is authenticated\n // if (!this.formSubmissionHandler.supportsAutoSave() || !this.userId || !this.formSubmissionHandler.saveCurrentFormSubmissionState) {\n // return;\n // }\n\n this.isSaving = true;\n this.saveErrorMessage = null;\n\n try {\n const updatedUdpFormSubmission = await this.formSubmissionHandler.saveCurrentFormSubmissionState(values, this.udpFormSubmission);\n this.udpFormSubmission = updatedUdpFormSubmission\n this.initialValues = { ...(updatedUdpFormSubmission.data?.submissionResponseData || {}) };\n if (!new URLSearchParams(window.location.search).has('udpf_submissionId')) {\n // replace the current entry's query string with udpf_submissionId without needing to know the path\n this.replaceUrlWithSubmissionId(updatedUdpFormSubmission.id);\n }\n this.enqueueSnackbar('Form saved successfully.', {\n variant: 'success',\n anchorOrigin: { vertical: 'top', horizontal: 'center' },\n });\n } catch (error) {\n this.enqueueSnackbar('There was an error saving this form', {\n variant: 'error',\n anchorOrigin: { vertical: 'top', horizontal: 'center' },\n });\n this.saveErrorMessage = 'Failed to save form data';\n } finally {\n this.isSaving = false;\n this.isUserUpdatedSections = false;\n this.isFormDirty = false;\n }\n };\n\n private async handleQuestionCommentLiveCRUD(e: CustomEvent<{type: string, questionIdentifierKey: string, commentId: string}>) {\n try {\n const { type, questionIdentifierKey, commentId } = e.detail;\n const [sectionName, questionName] = questionIdentifierKey.split('.');\n let newInitialValues = structuredClone(this.udpFormSubmission.data.submissionResponseData || {});\n \n // ensure structure exists WITHOUT overwriting existing data\n if (!newInitialValues[sectionName]) newInitialValues[sectionName] = {};\n\n if (!newInitialValues[sectionName][questionName]) {\n // create defaults but do not clobber any existing saved shape from submissionResponseData\n newInitialValues[sectionName][questionName] = {\n value: '',\n comments: [],\n draftComments: [],\n metadata: {},\n };\n } else {\n // ensure arrays/objects exist so later code can safely push/filter\n newInitialValues[sectionName][questionName].comments = newInitialValues[sectionName][questionName].comments ?? [];\n newInitialValues[sectionName][questionName].draftComments = newInitialValues[sectionName][questionName].draftComments ?? [];\n newInitialValues[sectionName][questionName].metadata = newInitialValues[sectionName][questionName].metadata ?? {};\n }\n\n // normalize draftComments to array if needed (back-compat)\n const maybeDraft = newInitialValues[sectionName][questionName].draftComments;\n if (maybeDraft && !Array.isArray(maybeDraft)) {\n newInitialValues[sectionName][questionName].draftComments = [maybeDraft];\n } else if (!maybeDraft) {\n newInitialValues[sectionName][questionName].draftComments = [];\n }\n\n const commentsArr = newInitialValues[sectionName][questionName].comments || [];\n const draftsArr = newInitialValues[sectionName][questionName].draftComments || [];\n\n switch (type) {\n case 'add': {\n const newDraft = {\n value: '',\n commentId: uuidv4(),\n isTempComment: true,\n timestamp: null,\n };\n // put new draft first so activeDraft === draftComments[0] matches UX\n newInitialValues[sectionName][questionName].draftComments = [newDraft, ...draftsArr];\n break;\n }\n\n case 'save': {\n // find draft by id\n const draftIdx = draftsArr.findIndex(d => d.commentId === commentId);\n if (draftIdx === -1) return;\n const draft = draftsArr[draftIdx];\n const saveTimestamp = draft.timestamp || new Date().toISOString();\n const savedComment = {\n ...draft,\n timestamp: saveTimestamp,\n editedTimestamp: new Date().toISOString(),\n userId: this.userId,\n userDisplayName: this.userDisplayName,\n isDraftComment: false,\n };\n\n // If a saved comment with same id exists, replace it. Otherwise append.\n const existingIdx = commentsArr.findIndex(c => c.commentId === commentId);\n if (existingIdx !== -1) {\n const newComments = [...commentsArr];\n newComments[existingIdx] = { ...savedComment };\n newInitialValues[sectionName][questionName].comments = newComments;\n } else {\n newInitialValues[sectionName][questionName].comments = [...commentsArr, savedComment];\n }\n\n // remove that draft\n newInitialValues[sectionName][questionName].draftComments = draftsArr.filter(d => d.commentId !== commentId);\n break;\n }\n\n case 'edit': {\n // create a draft copy of the saved comment but DO NOT remove the saved comment from the list.\n const saved = commentsArr.find(c => c.commentId === commentId);\n if (!saved) return;\n const draftFromSaved = { ...saved, isDraftComment: true, timestamp: null };\n\n // Add this draft at the front; keep saved comment intact so content doesn't disappear.\n newInitialValues[sectionName][questionName].draftComments = [draftFromSaved, ...draftsArr];\n newInitialValues[sectionName][questionName].comments = commentsArr;\n break;\n }\n\n case 'delete': {\n // mark the comment as deleted and clear its value, then persist.\n newInitialValues[sectionName][questionName].comments = commentsArr.map(c => {\n if (c.commentId === commentId) {\n return {\n ...c,\n isDeleted: true,\n value: '',\n editedTimestamp: new Date().toISOString(),\n };\n }\n return c;\n });\n\n break;\n }\n\n case 'editClose': {\n // Cancel edit: remove the draft only, do NOT restore/alter saved comments.\n newInitialValues[sectionName][questionName].draftComments = draftsArr.filter(d => d.commentId !== commentId);\n break;\n }\n }\n\n // if it's a save or delete action, persist immediately\n if (type === 'save' || type === 'delete') {\n this.udpFormSubmission.data.submissionResponseData = { ...newInitialValues };\n await this.handleCommmentUpdate(newInitialValues);\n } else {\n this.initialValues = { ...newInitialValues };\n this.udpFormSubmission.data.submissionResponseData = { ...newInitialValues };\n }\n\n } catch (error) {\n console.error('Error handling live comment CRUD:', error);\n } finally {\n this.triggerFormRerender();\n }\n }\n\n private handleFormChange = (values: { [name: string]: any }) => {\n if (this.isUpdatingSections) return;\n this.udpFormSubmission.data.submissionResponseData = values;\n };\n\n private handleFinish = () => {\n // Trigger any finish actions\n if (this.triggerAction) {\n this.triggerAction(null as any, { action: 'finish' });\n } \n };\n\n private triggerFormRerender = () => {\n const scrollY = window.scrollY;\n this.reRenderKey += 1;\n\n // We use requestAnimationFrame to wait for the browser to \n // finish the paint cycle of the new key-rendered component\n requestAnimationFrame(() => {\n window.scrollTo({\n top: scrollY,\n behavior: 'auto' // 'auto' is faster and prevents jitter compared to 'smooth'\n });\n });\n};\n\n private async loadFollowUpForms(sectionKey, questionKey) {\n this.isLoading = true;\n this.saveErrorMessage = '';\n try {\n const response = await fetchLatestForms(this.followUpSideSheetListPageNumber, this.FOLLOW_UP_SIDE_SHEET_PAGE_SIZE, [{ searchField: 'type', searchOperator: '=', searchValue: UdpFormsTypeEnum.FollowUp }], { sortDirection: 'DESC', sortColumn: 'lastModifiedOn' });\n\n const data = response.data;\n\n if (!data || !Array.isArray(data.pageList)) {\n throw new Error('Malformed form versions data.');\n }\n\n this.sideSheetFollowUpFormsList = this.formatFollowUpFormsList(data.pageList, sectionKey, questionKey);\n this.followUpSideSheetTotalItems = data.total ?? 0;\n } catch (err) {\n console.error('Failed to follow up form.', err);\n this.saveErrorMessage = 'Failed to follow up forms.';\n } finally {\n this.isLoading = false;\n }\n }\n\n handleLaunchFollowUpForm = async (followUpFormId, followUpFormVersion, parentFormSubmissionId, parentFormId, parentFormVersion, sectionKey, questionKey) => {\n // create a new follow up form submission instance wiht a link to the parent form submission\n const followUpMasterForm = await this.formHandler.getFormByFormIdAndFormVersion(followUpFormId, followUpFormVersion);\n const followUpSubmissionData = {\n submissionResponseData: buildEmptyInitialValues(followUpMasterForm),\n submissionMetadata: {\n ParentSubmission: {\n submissionId: parentFormSubmissionId,\n formId: parentFormId,\n formVersion: parentFormVersion\n }\n }\n }\n \n const followUpFormSubmission = new UdpFormSubmission({formId: followUpFormId, formVersion: followUpFormVersion, unityUserId: this.userId, data: followUpSubmissionData})\n const followUpFormSubmissionHandler = FormSubmissionHandlerFactory.create(false, this.userId);\n const response = await followUpFormSubmissionHandler.createNewLinkedFollowUpFormSubmission(followUpFormSubmission);\n\n // update the current form submission state with the follow up form submission id in the metadata\n const itemMetadata = this.udpFormSubmission.data.submissionResponseData[sectionKey][questionKey].metadata\n this.udpFormSubmission.data.submissionResponseData[sectionKey][questionKey].metadata = {... itemMetadata, followUpFormSubmissionId: response.id}\n await this.performBackgroundSaveAndUpdateLocalSubmissionState(this.udpFormSubmission.data.submissionResponseData);\n\n const url = `/page/${UdpFormsPageIdEnum.FormRendererPageId}?udpf_submissionId=${response.id}`;\n window.open(url, '_blank'); \n this.handleSideSheetClose();\n this.triggerFormRerender();\n };\n\n private formatFollowUpFormsList(followUpFormsList, sectionKey, questionKey) {\n return followUpFormsList.map(item => ({\n listItemData: item,\n history: this.history,\n handleLaunchFollowUpForm: async () => await this.handleLaunchFollowUpForm(item.id, item.version, this.udpFormSubmission.id, this.udpFormSubmission.formId, this.udpFormSubmission.formVersion, sectionKey, questionKey),\n }));\n }\n\n private handleSideSheetClose = () => {\n // reset side sheet data\n this.sideSheetFollowUpFormsList = [];\n this.followUpSideSheetListPageNumber = 1;\n this.followUpSideSheetTotalItems = 0;\n this.isFollowUpFormsSideSheetOpen = false;\n this.followUpParentSectionKey = '';\n this.followUpParentQuestionKey = '';\n };\n\n private async handleSideSheetPageChange(page: number) {\n this.followUpSideSheetListPageNumber = page;\n await this.loadFollowUpForms(this.followUpParentSectionKey, this.followUpParentQuestionKey);\n }\n\n private renderFollowUpSideSheet() {\n return (\n <udp-side-sheet\n title=\"Link a Follow Up Form\"\n open={this.isFollowUpFormsSideSheetOpen}\n onUdpSideSheetClose={() => this.handleSideSheetClose()}\n position=\"right\"\n width=\"md\"\n >\n {this.isLoading && this.isFollowUpFormsSideSheetOpen && <udp-linear-loader />}\n <udp-list-renderer\n itemComponent=\"udp-forms-follow-up-list-card\"\n data={this.sideSheetFollowUpFormsList}\n pagination\n isServerSide\n isLoading={this.isLoading}\n itemsPerPage={this.FOLLOW_UP_SIDE_SHEET_PAGE_SIZE}\n currentPage={this.followUpSideSheetListPageNumber}\n totalItems={this.followUpSideSheetTotalItems}\n onPageChange={e => this.handleSideSheetPageChange(e.detail)}\n componentDataMap={this.componentMap}\n spacing='md'\n />\n </udp-side-sheet>\n );\n }\n\n private isShowManualSaveIcon(): boolean{\n // return (this.isFormDirty || this.isUserUpdatedSections) && !this.isSubmitted && !!this.userId;\n const showSaveIcon = (this.isFormDirty || this.isUserUpdatedSections) && !!this.userId;\n return showSaveIcon;\n };\n\n\n private get isReadOnlyMode() : boolean {\n return this.isSubmitted || this.udpFormSubmission.unityUserId !== this.userId;\n }\n\n private get isShowCommentUI() : boolean {\n return this.isSubmitted;\n }\n\n render() {\n return (\n <div \n class=\"forms-renderer-container\"\n style={this.isLoading ? { minHeight: '100vh' } : {}} // used for keeping the UI smoother during rerender. ensure the container has a minimum height during loading\n >\n {this.renderFollowUpSideSheet()}\n <udp-forms-ui\n udpForm={this.udpForm}\n initialValues={this.initialValues}\n udpFormSubmission={this.udpFormSubmission}\n submitSuccessful={this.submitSuccessful}\n isSaving={this.isSaving}\n saveErrorMessage={this.saveErrorMessage}\n // showAutoSaveStatus={this.formSubmissionHandler.supportsAutoSave() && !!this.userId}\n readonly={this.isReadOnlyMode}\n handleSubmit={this.handleSubmit.bind(this)}\n handleSave={values => Promise.resolve(this.debouncedManualSave(values))}\n handleChange={this.handleFormChange}\n handleAction={this.triggerAction}\n handleFinish={this.handleFinish}\n userId={this.userId}\n isSubmitted={this.isSubmitted}\n dynamicSections={this.dynamicSections}\n duplicateRepeatableSection={this.duplicateRepeatableSection}\n deleteRepeatableSection={this.deleteRepeatableSection}\n key={`form-rerender-key-${this.reRenderKey}`}\n isShowManualSaveIcon={this.isShowManualSaveIcon()}\n isLoading={this.isLoading}\n isCommentAllowed={this.isShowCommentUI}\n performBackgroundSaveAndUpdateLocalSubmissionState={this.performBackgroundSaveAndUpdateLocalSubmissionState}\n />\n </div>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"udp-forms-renderer.js","sourceRoot":"","sources":["../../../../../src/components/forms/udp-forms/udp-forms-renderer/udp-forms-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAE,4BAA4B,EAAE,MAAM,+DAA+D,CAAC;AAC7G,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAMpC,MAAM,OAAO,gBAAgB;IAJ7B;QAWU,aAAQ,GAAY,KAAK,CAAC;QAK1B,kBAAa,GAAW,IAAI,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W,EAAE,EAC5C,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,EACjD,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,kDAAkD,EAAE,IAAI,CAAC,kDAAkD,GAC3G,CACE,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, State, Element, h } from '@stencil/core';\nimport { throttle } from 'lodash';\nimport { Guid } from 'src/global/types';\nimport { UdpFormsFieldTypeEnum } from '../utils/enums';\nimport { getCurrentTenantId } from 'src/udp-utilities/tenant/tenantUtils';\nimport { fetchLatestForms } from '../udp-forms-list/udp-form-api-utils';\nimport { UdpFormsTypeEnum, UdpFormsPageIdEnum } from '../utils/enums';\nimport { buildEmptyInitialValues } from '../utils/utils';\nimport { IFormSubmissionHandler } from '../utils/form-submission-handler/IFormSubmissionHandler';\nimport { FormSubmissionHandlerFactory } from '../utils/form-submission-handler/FormSubmissionHandlerFactory';\nimport { UdpFormHandler } from '../utils/form-handler/UdpFormHandler';\nimport { UdpFormSubmission } from '../utils/classes/UdpFormSubmission';\nimport { UdpForm } from '../utils/classes/UdpForm';\nimport { v4 as uuidv4 } from 'uuid';\n\n@Component({\n tag: 'udp-forms-renderer',\n shadow: true,\n})\nexport class UdpFormsRenderer {\n @Element() el: HTMLElement;\n \n @Prop() formId?: Guid | null;\n @Prop() version?: number | null;\n @Prop() submissionId?: Guid | null;\n @Prop() triggerAction: (actionId: Guid, params: Object) => void;\n @Prop() isPublic: boolean = false;\n @Prop() callbackUrl: string;\n @Prop() getUserCallback?: Function;\n @Prop() enqueueSnackbar: Function;\n @Prop() closeSnackbar: Function;\n @Prop() autoSaveDelay: number = 2000; // Debounce delay for auto-save in milliseconds (currently disabled)\n @Prop() history: any;\n @Prop() generic1: any; // generic prop for application specific logic\n @Prop() generic2: any; // generic prop for application specific logic\n @Prop() generic3: any; // generic prop for application specific logic\n \n \n @State() initialValues: { [name: string]: any } = {};\n @State() submitSuccessful: boolean = false;\n @State() currentFormData: { [name: string]: any } = {};\n @State() isLoading: boolean = false;\n @State() isSaving: boolean = false;\n @State() isSubmitted: boolean = false;\n @State() saveErrorMessage: string | null = null;\n @State() dynamicSections: any[] = [];\n @State() isUpdatingSections: boolean = false;\n @State() reRenderKey: number = 0;\n @State() isFormDirty: boolean = false;\n @State() isUserUpdatedSections: boolean = false;\n\n @State() sideSheetFollowUpFormsList: any[] = []; // used for follow up forms. \n @State() followUpSideSheetTotalItems: number = 0; // used for follow up forms. \n @State() isFollowUpFormsSideSheetOpen: boolean = false; // used for follow up forms.\n @State() followUpSideSheetListPageNumber: number = 1; // used for follow up forms.\n\n private FOLLOW_UP_SIDE_SHEET_PAGE_SIZE = 5;\n private readonly componentMap = {\n history: 'history',\n listItemData: 'listItemData',\n handleLaunchFollowUpForm: 'handleLaunchFollowUpForm'\n };\n\n\n private tenantId: Guid = getCurrentTenantId();\n // private debouncedAutoSave: (values: { [name: string]: any }) => void; // Kept for future use (currently disabled)\n private debouncedManualSave: (values: { [name: string]: any }) => void; // Debounced manual save (5 seconds)\n\n // info for the current logged in user on the client side\n private clientUserInfo: { id: string | null; displayName: string | null; email: string | null } = {\n id: null,\n displayName: null,\n email: null,\n }; \n \n private udpForm: UdpForm; // udpForm data object \n private udpFormSubmission: UdpFormSubmission; // udpFormSubmission data object \n\n private formHandler: UdpFormHandler // hanlder for API interactions with the UdpForm domain\n private formSubmissionHandler: IFormSubmissionHandler; // handler for API interactions with the UdpFormSubmission domain\n\n private followUpParentSectionKey: string = ''; // used for follow up forms.\n private followUpParentQuestionKey: string = ''; // used for follow up forms.\n\n componentDidLoad() {\n if (this.el)\n {\n this.el.addEventListener(\n 'questionCommentAction',\n async (e: CustomEvent<{ type: string; questionIdentifierKey: string, commentId: string }>) => this.handleQuestionCommentLiveCRUD(e)\n );\n // Listen for launchFollowUpFormSideSheet event from udp-question\n this.el.addEventListener(\n 'launchFollowUpFormSideSheet',\n (e: CustomEvent<any>) => this.handleLaunchFollowUpFormSideSheet(e),\n );\n\n this.el.addEventListener('formDirtyChange', (e: CustomEvent<boolean>) => {\n this.isFormDirty = e.detail;\n });\n }\n\n }\n\n\n private handleLaunchFollowUpFormSideSheet = async (e) => {\n try {\n await this.performBackgroundSaveAndUpdateLocalSubmissionState(this.udpFormSubmission.data.submissionResponseData);\n this.followUpParentSectionKey = e.detail.sectionKey;\n this.followUpParentQuestionKey = e.detail.questionKey;\n await this.loadFollowUpForms(this.followUpParentSectionKey, this.followUpParentQuestionKey);\n this.isFollowUpFormsSideSheetOpen = true;\n } catch (error) {\n console.error('Error loading follow-up forms:', error);\n }\n };\n\n async componentWillLoad() {\n this.isLoading = true;\n\n try {\n // Get client user info if available\n const user = this.getUserCallback?.();\n if (user) {\n this.clientUserInfo.id = user.id || null;\n this.clientUserInfo.displayName = user.name || null;\n this.clientUserInfo.email = user.email || null;\n } \n\n this.formSubmissionHandler = FormSubmissionHandlerFactory.create(this.isPublic, this.clientUserInfo.id)\n 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});\n\n // fetch existing submission from Udp.FormSubmission if submissionId is provided \n // take exisitng object, and populate with db values, and return new obj with updated values\n if (this.submissionId) {\n this.udpFormSubmission = await this.formSubmissionHandler.fetchAndPopulateUdpFormSubmissionObj(this.udpFormSubmission); \n } \n\n // get the master form from Udp.Form\n let formId;\n let formVersion;\n\n if (this.submissionId) {\n formId = this.udpFormSubmission.formId;\n formVersion = this.udpFormSubmission.formVersion;\n } else if (this.formId && this.version) {\n formId = this.formId;\n formVersion = this.version;\n }\n \n this.formHandler = new UdpFormHandler(this.tenantId);\n const formData = await this.formHandler.getFormByFormIdAndFormVersion(formId, formVersion);\n this.udpForm = new UdpForm(formData);\n this.initialValues = buildEmptyInitialValues(this.udpForm);\n\n // if there's existing data, update the form's state\n if (this.udpFormSubmission.data.submissionResponseData) {\n this.initialValues = { ...this.udpFormSubmission.data.submissionResponseData };\n\n if (this.udpFormSubmission.status === 2 || this.udpFormSubmission.status === 'submitted') {\n this.isSubmitted = true;\n }\n }\n\n this.initializeDynamicSections(); // process the master form into dynamic sections \n \n // After sections/questions are prepared, seed initial values from URL for ALL questions,\n // with saved values taking precedence, and paragraph defaults as a fallback.\n this.applyUrlInitialValuesForAll();\n\n // Set up throttled manual save function (5 seconds) - fires immediately, then throttles\n this.debouncedManualSave = throttle(\n async (values: { [name: string]: any }) => {\n await this.handleManualSave(values);\n },\n 2000,\n { leading: true, trailing: false },\n );\n\n // Set up debounced auto-save function (currently disabled)\n // this.debouncedAutoSave = debounce(async (values: { [name: string]: any }) => {\n // // await this.handleAutoSave(values); // Disabled for now\n // }, this.autoSaveDelay);\n } catch (error) {\n console.error('Error failed to load form in the form renderer:', error);\n } finally {\n this.isLoading = false;\n }\n }\n\n\n // build dynamic sections based on the\n private initializeDynamicSections() {\n const tempDynamicSection: any[] = [];\n const sortedSections = structuredClone(this.udpForm.udpFormUdpFormSection).sort((a, b) => a.order - b.order);\n\n for (const section of sortedSections) {\n section.sectionProperties = JSON.parse(section.sectionProperties || {});\n const repeatGroupKeys = this.findRepeatGroupKeys(section.name, this.initialValues);\n section.isOriginalSection = true;\n section.sectionPositionSuffix = 1; // default position\n\n // always add the original section into dynamic sections\n tempDynamicSection.push({\n ...structuredClone(section),\n // dynamicSectionName: section.name,\n formQuestions: structuredClone(this.udpForm.formQuestions)\n .filter(q => q.formSectionId === section.id)\n .sort((a, b) => a.questionOrder - b.questionOrder)\n .map(q => ({ ...q, questionIdentifierKey: `${section.name}.${q.name}` , isShowCommentInput: true})),\n });\n\n // create then add additional sections if there are repeated sections\n if (section.sectionProperties?.isRepeatable && repeatGroupKeys.length > 0) {\n const maxRepeatedSectionSuffix = Math.max(...repeatGroupKeys); // create a new section for the max value of repeat group keys, even if there are no saved answers\n\n // for (const repeatKey of repeatGroupKeys) { // create a section only for the suffix saved\n for (let repeatKey = 2; repeatKey <= maxRepeatedSectionSuffix; repeatKey++) {\n const clonedSection = {\n ...structuredClone(section),\n formQuestions: structuredClone(this.udpForm.formQuestions)\n .filter(q => q.formSectionId === section.id)\n .sort((a, b) => a.questionOrder - b.questionOrder)\n .map(q => ({ ...q, questionIdentifierKey: `${section.name}_${repeatKey}.${q.name}` , isShowCommentInput: true})),\n isOriginalSection: false,\n sectionPositionSuffix: repeatKey,\n };\n tempDynamicSection.push(clonedSection);\n }\n }\n }\n\n this.dynamicSections = tempDynamicSection;\n }\n\n private findRepeatGroupKeys(sectionName: string, values: Object): number[] {\n const keys = Object.keys(values);\n const repeatGroupSet = new Set<number>();\n\n // Match: sectionName_2\n const regex = new RegExp(`^${sectionName}_(\\\\d+)`);\n\n keys.forEach(key => {\n const match = key.match(regex);\n if (match && match[1]) {\n repeatGroupSet.add(Number(match[1]));\n }\n });\n\n return Array.from(repeatGroupSet).sort((a, b) => a - b);\n }\n\n /**\n * Duplicate a repeatable section\n */\n private duplicateRepeatableSection = (index: number) => {\n if (this.isSubmitted || this.isUpdatingSections) return;\n this.isUpdatingSections = true;\n this.isLoading = true;\n\n try {\n const sectionToClone = this.dynamicSections[index];\n if (!sectionToClone) return;\n\n const cloningSectionName = sectionToClone.name;\n\n // Find existing repeat group indices\n const repeatKeys = this.findRepeatGroupKeys(cloningSectionName, this.initialValues);\n const nextRepeatIndex = repeatKeys.length > 0 ? Math.max(...repeatKeys) + 1 : 2;\n\n const clonedSection = {\n ...structuredClone(sectionToClone),\n formQuestions: sectionToClone.formQuestions.map(q => {\n const newQuestionObj = structuredClone(q);\n newQuestionObj.questionIdentifierKey = `${cloningSectionName}_${nextRepeatIndex}.${q.name}`;\n return newQuestionObj;\n }),\n isOriginalSection: false,\n sectionPositionSuffix: nextRepeatIndex,\n };\n\n // Find the last index of this section group\n let insertAtIndex = index;\n for (let i = index + 1; i < this.dynamicSections.length; i++) {\n const s = this.dynamicSections[i];\n if (s.name === cloningSectionName) {\n insertAtIndex = i;\n } else {\n break;\n }\n }\n\n // Insert after the last repeat of the section group\n this.dynamicSections = [\n ...this.dynamicSections.slice(0, insertAtIndex + 1),\n clonedSection,\n ...this.dynamicSections.slice(insertAtIndex + 1),\n ];\n\n // Create new initial values structure\n const newInitialValues = structuredClone(this.udpFormSubmission.data.submissionResponseData);\n\n clonedSection.formQuestions.forEach(q => {\n const newSectionNameWithSuffix = `${cloningSectionName}_${nextRepeatIndex}`;\n const newQuestionName = q.name;\n\n if (!newInitialValues[newSectionNameWithSuffix]) {\n newInitialValues[newSectionNameWithSuffix] = {};\n }\n\n // Preserve only Paragraph values from the source section; clear others\n let value = '';\n if (q.fieldTypeId === UdpFormsFieldTypeEnum.Paragraph) {\n // Determine source section key (the section being duplicated)\n const sourceSectionKey = sectionToClone.isOriginalSection\n ? cloningSectionName\n : `${cloningSectionName}_${sectionToClone.sectionPositionSuffix}`;\n const sourceVal = this.udpFormSubmission.data.submissionResponseData?.[sourceSectionKey]?.[newQuestionName]?.value;\n let fieldProps: any = q?.fieldProperties;\n if (typeof fieldProps === 'string') {\n try {\n fieldProps = JSON.parse(fieldProps || '{}');\n } catch {\n fieldProps = {};\n }\n }\n const paragraphDefault = fieldProps?.paragraphText ?? '';\n value = sourceVal ?? paragraphDefault;\n }\n\n newInitialValues[newSectionNameWithSuffix][newQuestionName] = { value, comments: [], metadata : {}};\n });\n // This will trigger a complete form re-render\n this.initialValues = {...newInitialValues};\n this.udpFormSubmission.data.submissionResponseData = {...newInitialValues};\n this.triggerFormRerender();\n } finally {\n this.isUpdatingSections = false;\n this.isLoading = false;\n this.isUserUpdatedSections = true;\n }\n };\n\n /**\n * Delete a repeatable section\n */\n private deleteRepeatableSection = (index: number) => {\n if (this.isSubmitted) return;\n\n const sectionToDelete = this.dynamicSections[index];\n if (!sectionToDelete || sectionToDelete.isOriginalSection) return;\n\n this.isUpdatingSections = true;\n this.isLoading = true;\n try {\n const deleteSectionName = sectionToDelete.name;\n const deleteSuffix = sectionToDelete.sectionPositionSuffix;\n const sectionKeyToDelete = `${deleteSectionName}_${deleteSuffix}`;\n\n const newInitialValues = { ...this.udpFormSubmission.data.submissionResponseData };\n delete newInitialValues[sectionKeyToDelete];\n\n // Remove the section from dynamicSections\n const updatedSections = structuredClone(this.dynamicSections);\n updatedSections.splice(index, 1);\n\n // Shift all later repeatable sections backward by 1\n updatedSections.forEach(section => {\n if (\n section.name !== deleteSectionName ||\n section.isOriginalSection ||\n section.sectionPositionSuffix <= deleteSuffix\n ) {\n return;\n }\n\n const oldSuffix = section.sectionPositionSuffix;\n const oldSectionKey = `${deleteSectionName}_${oldSuffix}`;\n const newSuffix = oldSuffix - 1;\n const newSectionKey = `${deleteSectionName}_${newSuffix}`;\n\n // Update suffix\n section.sectionPositionSuffix = newSuffix;\n\n // Update questionIdentifierKeys\n section.formQuestions = section.formQuestions.map(q => {\n const newSectionQuestion = structuredClone(q);\n newSectionQuestion.questionIdentifierKey = `${newSectionKey}.${q.name}`;\n return newSectionQuestion;\n });\n\n // Move data in initial values\n if (newInitialValues[oldSectionKey]) {\n newInitialValues[newSectionKey] = structuredClone(newInitialValues[oldSectionKey]);\n delete newInitialValues[oldSectionKey];\n }\n });\n\n this.dynamicSections = updatedSections;\n this.initialValues = {...newInitialValues};\n this.udpFormSubmission.data.submissionResponseData = {...newInitialValues};\n this.triggerFormRerender();\n } finally {\n this.isUpdatingSections = false;\n this.isLoading = false;\n this.isUserUpdatedSections = true;\n }\n };\n\n // Build initial values from URL for ALL fields, but do NOT override saved values.\n // For Paragraph, also fall back to the builder's default text when nothing else provided.\n private applyUrlInitialValuesForAll() {\n if (!Array.isArray(this.dynamicSections)) return;\n\n const urlParams =\n typeof window !== 'undefined' ? new URLSearchParams(window.location.search) : null;\n\n // 1) Collect URL values into nested structure: { [sectionKey]: { [questionName]: { value, comments: [] } } }\n const urlValuesNested: {\n [sectionKey: string]: { [qName: string]: { value: any; comments: any[] } };\n } = {};\n if (urlParams) {\n this.dynamicSections.forEach(section => {\n const sectionKey = section.isOriginalSection\n ? section.name\n : `${section.name}_${section.sectionPositionSuffix}`;\n (section.formQuestions || []).forEach(q => {\n if (!q) return;\n const candidates = [q.processedSubmissionName, q.questionIdentifierKey, q.name].filter(\n Boolean,\n ) as string[];\n let urlVal: string | null = null;\n for (const c of candidates) {\n urlVal = urlParams.get(c);\n if (urlVal !== null) break;\n }\n if (urlVal !== null) {\n if (!urlValuesNested[sectionKey]) urlValuesNested[sectionKey] = {};\n urlValuesNested[sectionKey][q.name] = { value: urlVal, comments: [] };\n }\n });\n });\n }\n\n // 2) Merge with saved values (this.initialValues) taking precedence\n const merged: { [sectionKey: string]: { [qName: string]: { value: any; comments: any[] } } } =\n structuredClone(this.initialValues) || {};\n Object.entries(urlValuesNested).forEach(([sectionKey, qMap]) => {\n if (!merged[sectionKey]) merged[sectionKey] = {} as any;\n Object.entries(qMap).forEach(([qName, valObj]) => {\n const existing = merged[sectionKey][qName];\n // Only set from URL if no saved value exists (null/undefined/empty-string)\n const isMissing =\n existing == null ||\n existing.value == null ||\n (typeof existing.value === 'string' && existing.value.trim() === '');\n if (isMissing) {\n merged[sectionKey][qName] = valObj;\n }\n });\n });\n\n // 3) Paragraph defaults: if still undefined/null, use fieldProperties.paragraphText\n this.dynamicSections.forEach(section => {\n const sectionKey = section.isOriginalSection\n ? section.name\n : `${section.name}_${section.sectionPositionSuffix}`;\n if (!merged[sectionKey]) merged[sectionKey] = {} as any;\n (section.formQuestions || []).forEach(q => {\n if (!q) return;\n if (q.fieldTypeId === UdpFormsFieldTypeEnum.Paragraph) {\n const existing = merged[sectionKey][q.name];\n const isMissing =\n existing == null ||\n existing.value == null ||\n (typeof existing.value === 'string' && existing.value.trim() === '');\n if (isMissing) {\n let fieldProps: any = q?.fieldProperties;\n if (typeof fieldProps === 'string') {\n try {\n fieldProps = JSON.parse(fieldProps || '{}');\n } catch {\n fieldProps = {};\n }\n }\n merged[sectionKey][q.name] = {\n value: fieldProps?.paragraphText ?? '',\n comments: [],\n };\n }\n }\n });\n });\n\n this.initialValues = merged;\n this.udpFormSubmission.data.submissionResponseData = { ...merged } as any;\n }\n\n private async handleSubmit(values: { [name: string]: any }) {\n this.isLoading = true\n try {\n this.udpFormSubmission = await this.formSubmissionHandler.finalizeFormSubmissionState(values, this.udpFormSubmission);\n this.submitSuccessful = true;\n } catch (error) {\n this.enqueueSnackbar('There was an error submitting this form', {\n variant: 'error',\n anchorOrigin: { vertical: 'top', horizontal: 'center' },\n });\n throw error;\n } finally {\n this.isLoading = false \n }\n }\n\n\n /**\n * Auto save (background save)\n */\n private performBackgroundSaveAndUpdateLocalSubmissionState = async (values: { [name: string]: any }) => {\n this.saveErrorMessage = null;\n try {\n const updatedUdpFormSubmission = await this.formSubmissionHandler.saveCurrentFormSubmissionState(values, this.udpFormSubmission);\n this.udpFormSubmission = updatedUdpFormSubmission\n this.initialValues = { ...(updatedUdpFormSubmission.data?.submissionResponseData || {}) };\n if (!new URLSearchParams(window.location.search).has('udpf_submissionId')) {\n // replace the current entry's query string with udpf_submissionId without needing to know the path\n this.replaceUrlWithSubmissionId(updatedUdpFormSubmission.id);\n }\n } catch (error) {\n this.saveErrorMessage = 'Failed to save form data';\n } finally {\n this.isSaving = false;\n this.isUserUpdatedSections = false;\n this.isFormDirty = false;\n }\n };\n\n private replaceUrlWithSubmissionId(submissionId: Guid) {\n // build a URL that preserves the current pathname + hash but replaces the query string\n const pathname = typeof window !== 'undefined' ? window.location.pathname : `/page/${UdpFormsPageIdEnum.FormRendererPageId}`;\n const hash = typeof window !== 'undefined' ? window.location.hash : '';\n const newUrl = `${pathname}?udpf_submissionId=${submissionId}${hash}`;\n\n const h = this.history as any;\n\n // Prefer history.replace when available, handle react-router v6 navigate function, fallback to push or native replaceState\n if (h) {\n if (typeof h.replace === 'function') {\n h.replace(newUrl);\n return;\n }\n if (typeof h.push === 'function') {\n h.push(newUrl);\n return;\n }\n // react-router v6 exposes a navigate function\n if (typeof h === 'function') {\n try {\n h(newUrl, { replace: true });\n } catch {\n h(newUrl);\n }\n return;\n }\n }\n\n if (typeof window !== 'undefined' && window.history && typeof window.history.replaceState === 'function') {\n window.history.replaceState({}, '', newUrl);\n } else if (typeof window !== 'undefined') {\n window.location.href = newUrl;\n }\n }\n\n\n\n/**\n * Handle the user saving or deleting a comment\n */\n private handleCommmentUpdate = async (values: { [name: string]: any }) => {\n this.isSaving = true;\n this.saveErrorMessage = null;\n\n try {\n const updatedUdpFormSubmission = await this.formSubmissionHandler.saveFormSubmissionComments(values, this.udpFormSubmission);\n this.udpFormSubmission = updatedUdpFormSubmission\n this.initialValues = { ...(updatedUdpFormSubmission.data?.submissionResponseData || {}) };\n this.enqueueSnackbar('Saved sucessfully.', {\n variant: 'success',\n anchorOrigin: { vertical: 'top', horizontal: 'center' },\n });\n } catch (error) {\n this.enqueueSnackbar('There was an error saving.', {\n variant: 'error',\n anchorOrigin: { vertical: 'top', horizontal: 'center' },\n });\n } finally {\n this.isSaving = false;\n this.isUserUpdatedSections = false;\n this.isFormDirty = false;\n }\n };\n\n\n\n /**\n * Manual save function - debounced to 5 seconds\n */\n private handleManualSave = async (values: { [name: string]: any }) => {\n // Only save if handler supports it and user is authenticated\n // if (!this.formSubmissionHandler.supportsAutoSave() || !this.userId || !this.formSubmissionHandler.saveCurrentFormSubmissionState) {\n // return;\n // }\n\n this.isSaving = true;\n this.saveErrorMessage = null;\n\n try {\n const updatedUdpFormSubmission = await this.formSubmissionHandler.saveCurrentFormSubmissionState(values, this.udpFormSubmission);\n this.udpFormSubmission = updatedUdpFormSubmission\n this.initialValues = { ...(updatedUdpFormSubmission.data?.submissionResponseData || {}) };\n if (!new URLSearchParams(window.location.search).has('udpf_submissionId')) {\n // replace the current entry's query string with udpf_submissionId without needing to know the path\n this.replaceUrlWithSubmissionId(updatedUdpFormSubmission.id);\n }\n this.enqueueSnackbar('Form saved successfully.', {\n variant: 'success',\n anchorOrigin: { vertical: 'top', horizontal: 'center' },\n });\n } catch (error) {\n this.enqueueSnackbar('There was an error saving this form', {\n variant: 'error',\n anchorOrigin: { vertical: 'top', horizontal: 'center' },\n });\n this.saveErrorMessage = 'Failed to save form data';\n } finally {\n this.isSaving = false;\n this.isUserUpdatedSections = false;\n this.isFormDirty = false;\n }\n };\n\n private async handleQuestionCommentLiveCRUD(e: CustomEvent<{type: string, questionIdentifierKey: string, commentId: string}>) {\n try {\n const { type, questionIdentifierKey, commentId } = e.detail;\n const [sectionName, questionName] = questionIdentifierKey.split('.');\n let newInitialValues = structuredClone(this.udpFormSubmission.data.submissionResponseData || {});\n \n // ensure structure exists WITHOUT overwriting existing data\n if (!newInitialValues[sectionName]) newInitialValues[sectionName] = {};\n\n if (!newInitialValues[sectionName][questionName]) {\n // create defaults but do not clobber any existing saved shape from submissionResponseData\n newInitialValues[sectionName][questionName] = {\n value: '',\n comments: [],\n draftComments: [],\n metadata: {},\n };\n } else {\n // ensure arrays/objects exist so later code can safely push/filter\n newInitialValues[sectionName][questionName].comments = newInitialValues[sectionName][questionName].comments ?? [];\n newInitialValues[sectionName][questionName].draftComments = newInitialValues[sectionName][questionName].draftComments ?? [];\n newInitialValues[sectionName][questionName].metadata = newInitialValues[sectionName][questionName].metadata ?? {};\n }\n\n // normalize draftComments to array if needed (back-compat)\n const maybeDraft = newInitialValues[sectionName][questionName].draftComments;\n if (maybeDraft && !Array.isArray(maybeDraft)) {\n newInitialValues[sectionName][questionName].draftComments = [maybeDraft];\n } else if (!maybeDraft) {\n newInitialValues[sectionName][questionName].draftComments = [];\n }\n\n const commentsArr = newInitialValues[sectionName][questionName].comments || [];\n const draftsArr = newInitialValues[sectionName][questionName].draftComments || [];\n\n switch (type) {\n case 'add': {\n const newDraft = {\n value: '',\n commentId: uuidv4(),\n isTempComment: true,\n timestamp: null,\n };\n // put new draft first so activeDraft === draftComments[0] matches UX\n newInitialValues[sectionName][questionName].draftComments = [newDraft, ...draftsArr];\n break;\n }\n\n case 'save': {\n // find draft by id\n const draftIdx = draftsArr.findIndex(d => d.commentId === commentId);\n if (draftIdx === -1) return;\n const draft = draftsArr[draftIdx];\n const saveTimestamp = draft.timestamp || new Date().toISOString();\n const savedComment = {\n ...draft,\n timestamp: saveTimestamp,\n editedTimestamp: new Date().toISOString(),\n userId: this.clientUserInfo.id,\n userDisplayName: this.clientUserInfo.displayName,\n isDraftComment: false,\n };\n\n // If a saved comment with same id exists, replace it. Otherwise append.\n const existingIdx = commentsArr.findIndex(c => c.commentId === commentId);\n if (existingIdx !== -1) {\n const newComments = [...commentsArr];\n newComments[existingIdx] = { ...savedComment };\n newInitialValues[sectionName][questionName].comments = newComments;\n } else {\n newInitialValues[sectionName][questionName].comments = [...commentsArr, savedComment];\n }\n\n // remove that draft\n newInitialValues[sectionName][questionName].draftComments = draftsArr.filter(d => d.commentId !== commentId);\n break;\n }\n\n case 'edit': {\n // create a draft copy of the saved comment but DO NOT remove the saved comment from the list.\n const saved = commentsArr.find(c => c.commentId === commentId);\n if (!saved) return;\n const draftFromSaved = { ...saved, isDraftComment: true, timestamp: null };\n\n // Add this draft at the front; keep saved comment intact so content doesn't disappear.\n newInitialValues[sectionName][questionName].draftComments = [draftFromSaved, ...draftsArr];\n newInitialValues[sectionName][questionName].comments = commentsArr;\n break;\n }\n\n case 'delete': {\n // mark the comment as deleted and clear its value, then persist.\n newInitialValues[sectionName][questionName].comments = commentsArr.map(c => {\n if (c.commentId === commentId) {\n return {\n ...c,\n isDeleted: true,\n value: '',\n editedTimestamp: new Date().toISOString(),\n };\n }\n return c;\n });\n\n break;\n }\n\n case 'editClose': {\n // Cancel edit: remove the draft only, do NOT restore/alter saved comments.\n newInitialValues[sectionName][questionName].draftComments = draftsArr.filter(d => d.commentId !== commentId);\n break;\n }\n }\n\n // if it's a save or delete action, persist immediately\n if (type === 'save' || type === 'delete') {\n this.udpFormSubmission.data.submissionResponseData = { ...newInitialValues };\n await this.handleCommmentUpdate(newInitialValues);\n } else {\n this.initialValues = { ...newInitialValues };\n this.udpFormSubmission.data.submissionResponseData = { ...newInitialValues };\n }\n\n } catch (error) {\n console.error('Error handling live comment CRUD:', error);\n } finally {\n this.triggerFormRerender();\n }\n }\n\n private handleFormChange = (values: { [name: string]: any }) => {\n if (this.isUpdatingSections) return;\n this.udpFormSubmission.data.submissionResponseData = values;\n };\n\n private handleFinish = () => {\n // Trigger any finish actions\n if (this.triggerAction) {\n this.triggerAction(null as any, { action: 'finish' });\n } \n };\n\n private triggerFormRerender = () => {\n const scrollY = window.scrollY;\n this.reRenderKey += 1;\n\n // We use requestAnimationFrame to wait for the browser to \n // finish the paint cycle of the new key-rendered component\n requestAnimationFrame(() => {\n window.scrollTo({\n top: scrollY,\n behavior: 'auto' // 'auto' is faster and prevents jitter compared to 'smooth'\n });\n });\n};\n\n private async loadFollowUpForms(sectionKey, questionKey) {\n this.isLoading = true;\n this.saveErrorMessage = '';\n try {\n const response = await fetchLatestForms(this.followUpSideSheetListPageNumber, this.FOLLOW_UP_SIDE_SHEET_PAGE_SIZE, [{ searchField: 'type', searchOperator: '=', searchValue: UdpFormsTypeEnum.FollowUp }], { sortDirection: 'DESC', sortColumn: 'lastModifiedOn' });\n\n const data = response.data;\n\n if (!data || !Array.isArray(data.pageList)) {\n throw new Error('Malformed form versions data.');\n }\n\n this.sideSheetFollowUpFormsList = this.formatFollowUpFormsList(data.pageList, sectionKey, questionKey);\n this.followUpSideSheetTotalItems = data.total ?? 0;\n } catch (err) {\n console.error('Failed to follow up form.', err);\n this.saveErrorMessage = 'Failed to follow up forms.';\n } finally {\n this.isLoading = false;\n }\n }\n\n handleLaunchFollowUpForm = async (followUpFormId, followUpFormVersion, parentFormSubmissionId, parentFormId, parentFormVersion, sectionKey, questionKey) => {\n // create a new follow up form submission instance wiht a link to the parent form submission\n const followUpMasterForm = await this.formHandler.getFormByFormIdAndFormVersion(followUpFormId, followUpFormVersion);\n const followUpSubmissionData = {\n submissionResponseData: buildEmptyInitialValues(followUpMasterForm),\n submissionMetadata: {\n ParentSubmission: {\n submissionId: parentFormSubmissionId,\n formId: parentFormId,\n formVersion: parentFormVersion\n }\n }\n }\n\n const followUpFormSubmission = new UdpFormSubmission({formId: followUpFormId, formVersion: followUpFormVersion, unityUserId: this.clientUserInfo.id, data: followUpSubmissionData})\n const followUpFormSubmissionHandler = FormSubmissionHandlerFactory.create(false, this.clientUserInfo.id);\n const response = await followUpFormSubmissionHandler.createNewLinkedFollowUpFormSubmission(followUpFormSubmission);\n\n // update the current form submission state with the follow up form submission id in the metadata\n const itemMetadata = this.udpFormSubmission.data.submissionResponseData[sectionKey][questionKey].metadata\n this.udpFormSubmission.data.submissionResponseData[sectionKey][questionKey].metadata = {... itemMetadata, followUpFormSubmissionId: response.id}\n await this.performBackgroundSaveAndUpdateLocalSubmissionState(this.udpFormSubmission.data.submissionResponseData);\n\n const url = `/page/${UdpFormsPageIdEnum.FormRendererPageId}?udpf_submissionId=${response.id}`;\n window.open(url, '_blank'); \n this.handleSideSheetClose();\n this.triggerFormRerender();\n };\n\n private formatFollowUpFormsList(followUpFormsList, sectionKey, questionKey) {\n return followUpFormsList.map(item => ({\n listItemData: item,\n history: this.history,\n handleLaunchFollowUpForm: async () => await this.handleLaunchFollowUpForm(item.id, item.version, this.udpFormSubmission.id, this.udpFormSubmission.formId, this.udpFormSubmission.formVersion, sectionKey, questionKey),\n }));\n }\n\n private handleSideSheetClose = () => {\n // reset side sheet data\n this.sideSheetFollowUpFormsList = [];\n this.followUpSideSheetListPageNumber = 1;\n this.followUpSideSheetTotalItems = 0;\n this.isFollowUpFormsSideSheetOpen = false;\n this.followUpParentSectionKey = '';\n this.followUpParentQuestionKey = '';\n };\n\n private async handleSideSheetPageChange(page: number) {\n this.followUpSideSheetListPageNumber = page;\n await this.loadFollowUpForms(this.followUpParentSectionKey, this.followUpParentQuestionKey);\n }\n\n private renderFollowUpSideSheet() {\n return (\n <udp-side-sheet\n title=\"Link a Follow Up Form\"\n open={this.isFollowUpFormsSideSheetOpen}\n onUdpSideSheetClose={() => this.handleSideSheetClose()}\n position=\"right\"\n width=\"md\"\n >\n {this.isLoading && this.isFollowUpFormsSideSheetOpen && <udp-linear-loader />}\n <udp-list-renderer\n itemComponent=\"udp-forms-follow-up-list-card\"\n data={this.sideSheetFollowUpFormsList}\n pagination\n isServerSide\n isLoading={this.isLoading}\n itemsPerPage={this.FOLLOW_UP_SIDE_SHEET_PAGE_SIZE}\n currentPage={this.followUpSideSheetListPageNumber}\n totalItems={this.followUpSideSheetTotalItems}\n onPageChange={e => this.handleSideSheetPageChange(e.detail)}\n componentDataMap={this.componentMap}\n spacing='md'\n />\n </udp-side-sheet>\n );\n }\n\n private isShowManualSaveIcon(): boolean{\n // return (this.isFormDirty || this.isUserUpdatedSections) && !this.isSubmitted && !!this.userId;\n const showSaveIcon = (this.isFormDirty || this.isUserUpdatedSections) && !!this.clientUserInfo.id;\n return showSaveIcon;\n };\n\n\n private get isReadOnlyMode() : boolean {\n return this.isSubmitted || this.udpFormSubmission.unityUserId !== this.clientUserInfo.id;\n }\n\n\n render() {\n return (\n <div \n class=\"forms-renderer-container\"\n style={this.isLoading ? { minHeight: '100vh' } : {}} // used for keeping the UI smoother during rerender. ensure the container has a minimum height during loading\n >\n {this.renderFollowUpSideSheet()}\n <udp-forms-ui\n udpForm={this.udpForm}\n initialValues={this.initialValues}\n udpFormSubmission={this.udpFormSubmission}\n submitSuccessful={this.submitSuccessful}\n isSaving={this.isSaving}\n saveErrorMessage={this.saveErrorMessage}\n // showAutoSaveStatus={this.formSubmissionHandler.supportsAutoSave() && !!this.userId}\n readonly={this.isReadOnlyMode}\n handleSubmit={this.handleSubmit.bind(this)}\n handleSave={values => Promise.resolve(this.debouncedManualSave(values))}\n handleChange={this.handleFormChange}\n handleAction={this.triggerAction}\n handleFinish={this.handleFinish}\n clientUserInfo={this.clientUserInfo}\n isSubmitted={this.isSubmitted}\n dynamicSections={this.dynamicSections}\n duplicateRepeatableSection={this.duplicateRepeatableSection}\n deleteRepeatableSection={this.deleteRepeatableSection}\n key={`form-rerender-key-${this.reRenderKey}`}\n isShowManualSaveIcon={this.isShowManualSaveIcon()}\n isLoading={this.isLoading}\n performBackgroundSaveAndUpdateLocalSubmissionState={this.performBackgroundSaveAndUpdateLocalSubmissionState}\n />\n </div>\n );\n }\n}\n"]}
|