legalesign-document-viewer 0.10.2 → 0.10.4
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/defaultFieldIcons-ByvDN5ag.js +26 -0
- package/dist/cjs/defaultFieldIcons-ByvDN5ag.js.map +1 -0
- package/dist/cjs/defaultPalette-Dt4FmPno.js +222 -0
- package/dist/cjs/defaultPalette-Dt4FmPno.js.map +1 -0
- package/dist/cjs/editorUtils-f8cxkqvC.js +447 -0
- package/dist/cjs/editorUtils-f8cxkqvC.js.map +1 -0
- package/dist/cjs/fieldDefaults-BbJ3qf1E.js +27 -0
- package/dist/cjs/fieldDefaults-BbJ3qf1E.js.map +1 -0
- package/dist/cjs/{i18n-BElI-ESH.js → i18n-B8sub13B.js} +7 -5
- package/dist/cjs/{i18n-BElI-ESH.js.map → i18n-B8sub13B.js.map} +1 -1
- package/dist/cjs/{index-CmGbWor3.js → index-DFeU0FNc.js} +2 -5
- package/dist/cjs/index-DFeU0FNc.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/ls-add-new-button_20.cjs.entry.js +1035 -0
- package/dist/cjs/ls-badge.cjs.entry.js +1 -1
- package/dist/cjs/ls-banner.cjs.entry.js +1 -1
- package/dist/cjs/ls-button.cjs.entry.js +49 -0
- package/dist/cjs/ls-card.cjs.entry.js +1 -1
- package/dist/cjs/ls-checkbox-input_5.cjs.entry.js +1 -1
- package/dist/cjs/ls-compose-loader_6.cjs.entry.js +381 -0
- package/dist/cjs/ls-compose-manager.cjs.entry.js +4 -4
- package/dist/cjs/ls-details-section.cjs.entry.js +1 -1
- package/dist/cjs/ls-document-viewer.cjs.entry.js +31138 -0
- package/dist/cjs/ls-document-viewer.cjs.js +2 -2
- package/dist/cjs/ls-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/ls-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/ls-editor-field_11.cjs.entry.js +909 -0
- package/dist/cjs/ls-field-alignment_3.cjs.entry.js +315 -0
- package/dist/cjs/ls-field-format_2.cjs.entry.js +218 -0
- package/dist/cjs/ls-field-properties-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/ls-formfield.cjs.entry.js +1 -1
- package/dist/cjs/ls-header-bar.cjs.entry.js +1 -1
- package/dist/cjs/ls-helper-bar_2.cjs.entry.js +37 -0
- package/dist/cjs/ls-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/ls-icon-check-button.cjs.entry.js +1 -1
- package/dist/cjs/ls-icon.cjs.entry.js +11211 -0
- package/dist/cjs/ls-label.cjs.entry.js +1 -1
- package/dist/cjs/ls-list-card-button.cjs.entry.js +1 -1
- package/dist/cjs/ls-loading_2.cjs.entry.js +37 -0
- package/dist/cjs/ls-navbar.cjs.entry.js +1 -1
- package/dist/cjs/ls-notification.cjs.entry.js +1 -1
- package/dist/cjs/ls-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/ls-radio-input.cjs.entry.js +1 -1
- package/dist/cjs/ls-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ls-tag.cjs.entry.js +1 -1
- package/dist/cjs/ls-text.cjs.entry.js +1 -1
- package/dist/cjs/ls-timeline-step.cjs.entry.js +1 -1
- package/dist/cjs/ls-timeline.cjs.entry.js +1 -1
- package/dist/cjs/ls-title-input.cjs.entry.js +2 -2
- package/dist/cjs/ls-toolbox-field.cjs.entry.js +96 -0
- package/dist/cjs/ls-tooltip.cjs.entry.js +247 -0
- package/dist/cjs/mouseHandlers-D3r6xq7p.js +975 -0
- package/dist/cjs/mouseHandlers-D3r6xq7p.js.map +1 -0
- package/dist/cjs/test-item.cjs.entry.js +1 -1
- package/dist/collection/components/ls-compose-loader/ls-compose-loader.js +1 -1
- package/dist/collection/components/ls-compose-manager/ls-compose-manager.js +2 -2
- package/dist/collection/components/ls-document-viewer/adapter/elementActions.js +1 -1
- package/dist/collection/components/ls-document-viewer/adapter/elementActions.js.map +1 -1
- package/dist/collection/components/ls-document-viewer/editorCalculator.js +1 -1
- package/dist/collection/components/ls-document-viewer/editorCalculator.js.map +1 -1
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.css +6 -0
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.js +53 -23
- package/dist/collection/components/ls-document-viewer/ls-document-viewer.js.map +1 -1
- package/dist/collection/components/ls-document-viewer/mouseHandlers.js +218 -78
- package/dist/collection/components/ls-document-viewer/mouseHandlers.js.map +1 -1
- package/dist/collection/components/ls-document-viewer/snapHelper.js +57 -16
- package/dist/collection/components/ls-document-viewer/snapHelper.js.map +1 -1
- package/dist/collection/components/ls-document-viewer/validator.js +6 -2
- package/dist/collection/components/ls-document-viewer/validator.js.map +1 -1
- package/dist/collection/components/ls-editor-field/ls-editor-field.js +6 -6
- package/dist/collection/components/ls-editor-field/ls-editor-field.js.map +1 -1
- package/dist/collection/components/ls-editor-table/ls-editor-table.js +1 -1
- package/dist/collection/components/ls-feature-column/ls-feature-column.js +6 -6
- package/dist/collection/components/ls-field-alignment/ls-field-alignment.js +2 -2
- package/dist/collection/components/ls-field-content/ls-field-content.js +3 -3
- package/dist/collection/components/ls-field-content/ls-field-content.js.map +1 -1
- package/dist/collection/components/ls-field-dimensions/ls-field-dimensions.js +3 -3
- package/dist/collection/components/ls-field-distribute/ls-field-distribute.js +24 -28
- package/dist/collection/components/ls-field-distribute/ls-field-distribute.js.map +1 -1
- package/dist/collection/components/ls-field-footer/ls-field-footer.js +1 -1
- package/dist/collection/components/ls-field-format/ls-field-format.css +7 -0
- package/dist/collection/components/ls-field-format/ls-field-format.js +11 -11
- package/dist/collection/components/ls-field-format/ls-field-format.js.map +1 -1
- package/dist/collection/components/ls-field-placement/ls-field-placement.js +1 -1
- package/dist/collection/components/ls-field-properties/ls-field-properties.js +1 -1
- package/dist/collection/components/ls-field-properties-advanced/ls-field-properties-advanced.js +2 -2
- package/dist/collection/components/ls-field-properties-autosign/ls-field-properties-autosign.js +1 -1
- package/dist/collection/components/ls-field-properties-container/ls-field-properties-container.js +1 -1
- package/dist/collection/components/ls-field-properties-date/ls-field-properties-date.js +1 -1
- package/dist/collection/components/ls-field-properties-dropdown/ls-field-properties-dropdown.js +1 -1
- package/dist/collection/components/ls-field-properties-email/ls-field-properties-email.js +1 -1
- package/dist/collection/components/ls-field-properties-file/ls-field-properties-file.js +1 -1
- package/dist/collection/components/ls-field-properties-general/ls-field-properties-general.js +1 -1
- package/dist/collection/components/ls-field-properties-image/ls-field-properties-image.js +1 -1
- package/dist/collection/components/ls-field-properties-multiple/ls-field-properties-multiple.js +3 -3
- package/dist/collection/components/ls-field-properties-number/ls-field-properties-number.js +1 -1
- package/dist/collection/components/ls-field-properties-signature/ls-field-properties-signature.js +1 -1
- package/dist/collection/components/ls-field-properties-text/ls-field-properties-text.js +1 -1
- package/dist/collection/components/ls-field-size/ls-field-size.js +1 -1
- package/dist/collection/components/ls-field-type-display/ls-field-type-display.js +3 -3
- package/dist/collection/components/ls-helper-bar/ls-helper-bar.js +1 -1
- package/dist/collection/components/ls-input-wrapper/ls-input-wrapper.js +1 -1
- package/dist/collection/components/ls-keyboard-shortcuts/ls-keyboard-shortcuts.js +1 -1
- package/dist/collection/components/ls-left-bar/ls-left-bar.css +6 -0
- package/dist/collection/components/ls-participant-manager/ls-participant-manager.js +3 -3
- package/dist/collection/components/ls-participant-select/ls-participant-select.css +8 -0
- package/dist/collection/components/ls-participant-select/ls-participant-select.js +35 -47
- package/dist/collection/components/ls-participant-select/ls-participant-select.js.map +1 -1
- package/dist/collection/components/ls-props-section/ls-props-section.js +1 -1
- package/dist/collection/components/ls-recipient-card/ls-recipient-card.js +6 -5
- package/dist/collection/components/ls-recipient-card/ls-recipient-card.js.map +1 -1
- package/dist/collection/components/ls-recipient-manager/ls-recipient-manager.js +1 -1
- package/dist/collection/components/ls-statusbar/ls-statusbar.js +18 -8
- package/dist/collection/components/ls-statusbar/ls-statusbar.js.map +1 -1
- package/dist/collection/components/ls-title-input/ls-title-input.js +1 -1
- package/dist/collection/components/ls-toggle/ls-toggle.js +2 -2
- package/dist/collection/components/ls-toolbox-field/ls-toolbox-field.js +3 -3
- package/dist/collection/components/ls-validation-manager/ls-validation-manager.js +32 -2
- package/dist/collection/components/ls-validation-manager/ls-validation-manager.js.map +1 -1
- package/dist/collection/components/ls-validation-tag/ls-validation-tag.css +7 -0
- package/dist/collection/components/ls-validation-tag/ls-validation-tag.js +90 -34
- package/dist/collection/components/ls-validation-tag/ls-validation-tag.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/ls-add-new-button.js +1 -1
- package/dist/components/ls-badge.js +1 -1
- package/dist/components/ls-banner.js +6 -6
- package/dist/components/ls-button.js +1 -1
- package/dist/components/ls-card.js +1 -1
- package/dist/components/ls-checkbox-input.js +1 -1
- package/dist/components/ls-compose-loader.js +1 -1
- package/dist/components/ls-compose-manager.js +4 -4
- package/dist/components/ls-details-section.js +3 -3
- package/dist/components/ls-document-options.js +1 -1
- package/dist/components/ls-document-viewer.js +146 -110
- package/dist/components/ls-document-viewer.js.map +1 -1
- package/dist/components/ls-dropdown-item.js +1 -1
- package/dist/components/ls-dropdown.js +3 -3
- package/dist/components/ls-editor-field.js +1 -1
- package/dist/components/ls-editor-table.js +1 -1
- package/dist/components/ls-feature-column.js +1 -1
- package/dist/components/ls-field-alignment.js +1 -1
- package/dist/components/ls-field-content.js +1 -1
- package/dist/components/ls-field-dimensions.js +1 -1
- package/dist/components/ls-field-distribute.js +1 -1
- package/dist/components/ls-field-footer.js +1 -1
- package/dist/components/ls-field-format.js +1 -1
- package/dist/components/ls-field-placement.js +1 -1
- package/dist/components/ls-field-properties-advanced.js +1 -1
- package/dist/components/ls-field-properties-autosign.js +1 -1
- package/dist/components/ls-field-properties-container.js +1 -1
- package/dist/components/ls-field-properties-date.js +1 -1
- package/dist/components/ls-field-properties-dropdown.js +15 -15
- package/dist/components/ls-field-properties-email.js +1 -1
- package/dist/components/ls-field-properties-file.js +1 -1
- package/dist/components/ls-field-properties-general.js +1 -1
- package/dist/components/ls-field-properties-image.js +1 -1
- package/dist/components/ls-field-properties-multiple.js +1 -1
- package/dist/components/ls-field-properties-number.js +1 -1
- package/dist/components/ls-field-properties-signature.js +1 -1
- package/dist/components/ls-field-properties-text.js +1 -1
- package/dist/components/ls-field-properties.js +1 -1
- package/dist/components/ls-field-size.js +1 -1
- package/dist/components/ls-field-type-display.js +1 -1
- package/dist/components/ls-formfield.js +11 -11
- package/dist/components/ls-header-bar.js +4 -4
- package/dist/components/ls-helper-bar.js +1 -1
- package/dist/components/ls-icon-button.js +1 -1
- package/dist/components/ls-icon-check-button.js +2 -2
- package/dist/components/ls-icon.js +1 -1
- package/dist/components/ls-input-wrapper.js +1 -1
- package/dist/components/ls-keyboard-shortcuts.js +1 -1
- package/dist/components/ls-label.js +1 -1
- package/dist/components/ls-left-bar.js +1 -1
- package/dist/components/ls-list-card-button.js +4 -4
- package/dist/components/ls-loading-icon.js +1 -1
- package/dist/components/ls-loading-logo.js +1 -1
- package/dist/components/ls-loading.js +1 -1
- package/dist/components/ls-navbar.js +3 -3
- package/dist/components/ls-notification.js +2 -2
- package/dist/components/ls-number-input.js +1 -1
- package/dist/components/ls-participant-card.js +1 -1
- package/dist/components/ls-participant-manager.js +1 -1
- package/dist/components/ls-participant-select.js +1 -1
- package/dist/components/ls-props-section.js +1 -1
- package/dist/components/ls-radio-group.js +3 -3
- package/dist/components/ls-radio-input.js +1 -1
- package/dist/components/ls-recipient-card.js +1 -1
- package/dist/components/ls-recipient-manager.js +1 -1
- package/dist/components/ls-select-input.js +1 -1
- package/dist/components/ls-statusbar.js +1 -1
- package/dist/components/ls-tabs.js +2 -2
- package/dist/components/ls-tag.js +2 -2
- package/dist/components/ls-text-input.js +1 -1
- package/dist/components/ls-text.js +1 -1
- package/dist/components/ls-textarea-input.js +1 -1
- package/dist/components/ls-timeline-step.js +2 -2
- package/dist/components/ls-timeline.js +2 -2
- package/dist/components/ls-title-input.js +3 -3
- package/dist/components/ls-toggle.js +1 -1
- package/dist/components/ls-toolbar.js +1 -1
- package/dist/components/ls-toolbox-field.js +1 -1
- package/dist/components/ls-tooltip.js +1 -1
- package/dist/components/ls-validation-manager.js +1 -1
- package/dist/components/ls-validation-tag.js +1 -1
- package/dist/components/{p-C9O4GcTq.js → p-0KcafqsD.js} +4 -4
- package/dist/components/{p-C9O4GcTq.js.map → p-0KcafqsD.js.map} +1 -1
- package/dist/components/{p-C5Jz_eCB.js → p-4SVN50rZ.js} +17 -17
- package/dist/components/{p-C5Jz_eCB.js.map → p-4SVN50rZ.js.map} +1 -1
- package/dist/components/{p-CItLrDhm.js → p-7tNxs8No.js} +17 -17
- package/dist/components/{p-CItLrDhm.js.map → p-7tNxs8No.js.map} +1 -1
- package/dist/components/{p-DQ2OogsY.js → p-84KTjgkl.js} +4 -4
- package/dist/components/{p-DQ2OogsY.js.map → p-84KTjgkl.js.map} +1 -1
- package/dist/components/{p-Ci6AP0jT.js → p-B4nern9h.js} +8 -8
- package/dist/components/{p-Ci6AP0jT.js.map → p-B4nern9h.js.map} +1 -1
- package/dist/components/{p-DYJoT5OC.js → p-B6iYKtGO.js} +13 -12
- package/dist/components/p-B6iYKtGO.js.map +1 -0
- package/dist/components/{p-DlEh2FKG.js → p-B7x-6bu5.js} +4 -4
- package/dist/components/{p-DlEh2FKG.js.map → p-B7x-6bu5.js.map} +1 -1
- package/dist/components/{p-QXLGttP4.js → p-B9ooYFOA.js} +5 -5
- package/dist/components/{p-QXLGttP4.js.map → p-B9ooYFOA.js.map} +1 -1
- package/dist/components/{p-s20HlPHN.js → p-BBevdiks.js} +17 -17
- package/dist/components/{p-s20HlPHN.js.map → p-BBevdiks.js.map} +1 -1
- package/dist/components/{p-Ciap_aJy.js → p-BCNmvVjK.js} +17 -17
- package/dist/components/{p-Ciap_aJy.js.map → p-BCNmvVjK.js.map} +1 -1
- package/dist/components/{p-Bk-DeJ8r.js → p-BCzMSIcI.js} +4 -4
- package/dist/components/{p-Bk-DeJ8r.js.map → p-BCzMSIcI.js.map} +1 -1
- package/dist/components/{p-DbDvUcr5.js → p-BMhCD-zg.js} +4 -4
- package/dist/components/{p-DbDvUcr5.js.map → p-BMhCD-zg.js.map} +1 -1
- package/dist/components/{p-DvzrSyuS.js → p-BNihuKsl.js} +8 -8
- package/dist/components/{p-DvzrSyuS.js.map → p-BNihuKsl.js.map} +1 -1
- package/dist/components/{p-D_u1HxMf.js → p-BNtgCuBd.js} +8 -8
- package/dist/components/{p-D_u1HxMf.js.map → p-BNtgCuBd.js.map} +1 -1
- package/dist/components/{p-j1rAIT-X.js → p-BQ7lEZmO.js} +305 -129
- package/dist/components/p-BQ7lEZmO.js.map +1 -0
- package/dist/components/{p-CB9tEjJy.js → p-BT5rCW3w.js} +3 -3
- package/dist/components/{p-CB9tEjJy.js.map → p-BT5rCW3w.js.map} +1 -1
- package/dist/components/{p-C5iOpglg.js → p-BieB5Yv4.js} +12 -12
- package/dist/components/{p-C5iOpglg.js.map → p-BieB5Yv4.js.map} +1 -1
- package/dist/components/{p-DKhDOvYu.js → p-BnDS-Vxn.js} +10 -10
- package/dist/components/{p-DKhDOvYu.js.map → p-BnDS-Vxn.js.map} +1 -1
- package/dist/{esm/i18n-B8VmBxFg.js → components/p-Bp8hmhrC.js} +7 -5
- package/dist/components/{p-B8VmBxFg.js.map → p-Bp8hmhrC.js.map} +1 -1
- package/dist/components/{p-DVKeLLVk.js → p-BwJElhYd.js} +13 -13
- package/dist/components/p-BwJElhYd.js.map +1 -0
- package/dist/components/{p-MG59mYF3.js → p-C6Wto5hV.js} +18 -14
- package/dist/components/p-C6Wto5hV.js.map +1 -0
- package/dist/components/{p-1dutDvgl.js → p-C7ZEYzas.js} +5 -5
- package/dist/components/{p-1dutDvgl.js.map → p-C7ZEYzas.js.map} +1 -1
- package/dist/components/{p-CyKYlaAh.js → p-CKZG8VvW.js} +5 -5
- package/dist/components/{p-CyKYlaAh.js.map → p-CKZG8VvW.js.map} +1 -1
- package/dist/components/p-CMop5vLm.js +150 -0
- package/dist/components/p-CMop5vLm.js.map +1 -0
- package/dist/components/{p-Cm69fGZy.js → p-COX6-Qb4.js} +10 -10
- package/dist/components/{p-Cm69fGZy.js.map → p-COX6-Qb4.js.map} +1 -1
- package/dist/components/{p-lImp2h8Q.js → p-COkDTfhY.js} +17 -17
- package/dist/components/{p-lImp2h8Q.js.map → p-COkDTfhY.js.map} +1 -1
- package/dist/components/{p-CyQvboOz.js → p-CQx0j-F_.js} +6 -6
- package/dist/components/{p-CyQvboOz.js.map → p-CQx0j-F_.js.map} +1 -1
- package/dist/components/{p-CYBhiXXl.js → p-CXxS70Mm.js} +7 -7
- package/dist/components/{p-CYBhiXXl.js.map → p-CXxS70Mm.js.map} +1 -1
- package/dist/components/{p-CoUvqjky.js → p-CZF2_NGo.js} +4 -4
- package/dist/components/{p-CoUvqjky.js.map → p-CZF2_NGo.js.map} +1 -1
- package/dist/components/{p-Iy7DUSnq.js → p-C_A1TQER.js} +17 -17
- package/dist/components/{p-Iy7DUSnq.js.map → p-C_A1TQER.js.map} +1 -1
- package/dist/components/{p-B9uklVCX.js → p-CbaxmrLQ.js} +4 -4
- package/dist/components/{p-B9uklVCX.js.map → p-CbaxmrLQ.js.map} +1 -1
- package/dist/components/{p-DVM-djDm.js → p-Ck-idhcY.js} +7 -7
- package/dist/components/{p-DVM-djDm.js.map → p-Ck-idhcY.js.map} +1 -1
- package/dist/components/{p-CczRGS7Y.js → p-CuKQ9tEk.js} +3 -3
- package/dist/components/{p-CczRGS7Y.js.map → p-CuKQ9tEk.js.map} +1 -1
- package/dist/components/{p-DbBws6X7.js → p-CzuXVZQ1.js} +4 -4
- package/dist/components/{p-DbBws6X7.js.map → p-CzuXVZQ1.js.map} +1 -1
- package/dist/components/{p-DPZ4R8tR.js → p-D0k1Pz_A.js} +17 -17
- package/dist/components/{p-DPZ4R8tR.js.map → p-D0k1Pz_A.js.map} +1 -1
- package/dist/components/{p-C09xOzQ6.js → p-D1L3-Uvq.js} +7 -7
- package/dist/components/{p-C09xOzQ6.js.map → p-D1L3-Uvq.js.map} +1 -1
- package/dist/components/{p-DKbMooLM.js → p-DCexcYIP.js} +79 -73
- package/dist/components/p-DCexcYIP.js.map +1 -0
- package/dist/components/{p-CF3y5NYY.js → p-DG4uEGCg.js} +5 -5
- package/dist/components/{p-CF3y5NYY.js.map → p-DG4uEGCg.js.map} +1 -1
- package/dist/components/{p-i4y_Venf.js → p-DKo99Z43.js} +3 -3
- package/dist/components/{p-i4y_Venf.js.map → p-DKo99Z43.js.map} +1 -1
- package/dist/components/{p-1ddWJmvW.js → p-DVBhtEXS.js} +8 -8
- package/dist/components/{p-1ddWJmvW.js.map → p-DVBhtEXS.js.map} +1 -1
- package/dist/components/{p-B_88roRV.js → p-DYzmbr8y.js} +17 -17
- package/dist/components/{p-B_88roRV.js.map → p-DYzmbr8y.js.map} +1 -1
- package/dist/components/{p-BsreOXdY.js → p-DZP-fvPJ.js} +3 -3
- package/dist/components/{p-BsreOXdY.js.map → p-DZP-fvPJ.js.map} +1 -1
- package/dist/components/{p-CsfhfNKJ.js → p-DcR04vBT.js} +4 -4
- package/dist/components/{p-CsfhfNKJ.js.map → p-DcR04vBT.js.map} +1 -1
- package/dist/components/p-DdsRqtRd.js +176 -0
- package/dist/components/p-DdsRqtRd.js.map +1 -0
- package/dist/components/{p-CLbfAJ0X.js → p-DffaAVW4.js} +2 -5
- package/dist/components/p-DffaAVW4.js.map +1 -0
- package/dist/components/{p-Ak82LNyC.js → p-DqCMV_MY.js} +15 -15
- package/dist/components/{p-Ak82LNyC.js.map → p-DqCMV_MY.js.map} +1 -1
- package/dist/components/{p-DLpSXikD.js → p-DrEcfY_J.js} +4 -4
- package/dist/components/{p-DLpSXikD.js.map → p-DrEcfY_J.js.map} +1 -1
- package/dist/components/{p-DRcpbaNd.js → p-DwKK-L0J.js} +5 -5
- package/dist/components/{p-DRcpbaNd.js.map → p-DwKK-L0J.js.map} +1 -1
- package/dist/components/{p-BYHrh00m.js → p-Dw_QK-he.js} +6 -6
- package/dist/components/{p-BYHrh00m.js.map → p-Dw_QK-he.js.map} +1 -1
- package/dist/components/{p-CQVcPp7I.js → p-Ij6Uu9h8.js} +7 -7
- package/dist/components/{p-CQVcPp7I.js.map → p-Ij6Uu9h8.js.map} +1 -1
- package/dist/components/{p-DvVSXyfE.js → p-K7KaIE1v.js} +18 -18
- package/dist/components/p-K7KaIE1v.js.map +1 -0
- package/dist/components/{p-D-mPHPaO.js → p-OiC5NHtc.js} +4 -4
- package/dist/components/{p-D-mPHPaO.js.map → p-OiC5NHtc.js.map} +1 -1
- package/dist/components/{p-DzS_0OPs.js → p-QZa2_PWg.js} +4 -4
- package/dist/components/{p-DzS_0OPs.js.map → p-QZa2_PWg.js.map} +1 -1
- package/dist/components/{p-DdS3vht-.js → p-UwE-6cC0.js} +18 -18
- package/dist/components/{p-DdS3vht-.js.map → p-UwE-6cC0.js.map} +1 -1
- package/dist/components/{p-CDEEN7tu.js → p-ZtMRKgam.js} +16 -9
- package/dist/components/p-ZtMRKgam.js.map +1 -0
- package/dist/components/{p-5bn-NO5u.js → p-_YEZiLlm.js} +8 -8
- package/dist/components/{p-5bn-NO5u.js.map → p-_YEZiLlm.js.map} +1 -1
- package/dist/components/{p-DdCwAPae.js → p-lphkmIXU.js} +4 -4
- package/dist/components/{p-DdCwAPae.js.map → p-lphkmIXU.js.map} +1 -1
- package/dist/components/{p-C0RAZYKW.js → p-rE7Q2Ue3.js} +9 -9
- package/dist/components/{p-C0RAZYKW.js.map → p-rE7Q2Ue3.js.map} +1 -1
- package/dist/components/{p-BnrAwLD3.js → p-uXv5wPjh.js} +30 -30
- package/dist/components/{p-BnrAwLD3.js.map → p-uXv5wPjh.js.map} +1 -1
- package/dist/components/{p-DLtUiUbu.js → p-wijn7N4I.js} +6 -6
- package/dist/components/{p-DLtUiUbu.js.map → p-wijn7N4I.js.map} +1 -1
- package/dist/components/{p-BKHg_nvO.js → p-x_ncrpeq.js} +27 -17
- package/dist/components/p-x_ncrpeq.js.map +1 -0
- package/dist/components/{p-B2dT8iAi.js → p-ygIo6UQn.js} +3 -3
- package/dist/components/{p-B2dT8iAi.js.map → p-ygIo6UQn.js.map} +1 -1
- package/dist/components/test-item.js +1 -1
- package/dist/esm/defaultFieldIcons-CxK9aHT8.js +24 -0
- package/dist/esm/defaultFieldIcons-CxK9aHT8.js.map +1 -0
- package/dist/esm/defaultPalette-CwCWCxsI.js +220 -0
- package/dist/esm/defaultPalette-CwCWCxsI.js.map +1 -0
- package/dist/esm/editorUtils-BwTFZZiO.js +432 -0
- package/dist/esm/editorUtils-BwTFZZiO.js.map +1 -0
- package/dist/esm/fieldDefaults-B3gB_457.js +23 -0
- package/dist/esm/fieldDefaults-B3gB_457.js.map +1 -0
- package/dist/{components/p-B8VmBxFg.js → esm/i18n-Bp8hmhrC.js} +7 -5
- package/dist/esm/{i18n-B8VmBxFg.js.map → i18n-Bp8hmhrC.js.map} +1 -1
- package/dist/esm/{index-MftqtSf2.js → index-CItPoq74.js} +2 -5
- package/dist/esm/index-CItPoq74.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/ls-add-new-button_20.entry.js +1014 -0
- package/dist/esm/ls-badge.entry.js +1 -1
- package/dist/esm/ls-banner.entry.js +1 -1
- package/dist/esm/ls-button.entry.js +47 -0
- package/dist/esm/ls-button.entry.js.map +1 -0
- package/dist/esm/ls-card.entry.js +1 -1
- package/dist/esm/ls-checkbox-input_5.entry.js +1 -1
- package/dist/esm/ls-compose-loader_6.entry.js +374 -0
- package/dist/esm/ls-compose-manager.entry.js +4 -4
- package/dist/esm/ls-details-section.entry.js +1 -1
- package/dist/esm/ls-document-viewer.entry.js +31135 -0
- package/dist/esm/ls-document-viewer.entry.js.map +1 -0
- package/dist/esm/ls-document-viewer.js +3 -3
- package/dist/esm/ls-dropdown-item.entry.js +1 -1
- package/dist/esm/ls-dropdown.entry.js +1 -1
- package/dist/esm/ls-editor-field_11.entry.js +897 -0
- package/dist/esm/ls-field-alignment_3.entry.js +311 -0
- package/dist/esm/ls-field-format_2.entry.js +215 -0
- package/dist/esm/ls-field-properties-dropdown.entry.js +2 -2
- package/dist/esm/ls-formfield.entry.js +1 -1
- package/dist/esm/ls-header-bar.entry.js +1 -1
- package/dist/esm/ls-helper-bar_2.entry.js +34 -0
- package/dist/esm/ls-icon-button.entry.js +1 -1
- package/dist/esm/ls-icon-check-button.entry.js +1 -1
- package/dist/esm/ls-icon.entry.js +11209 -0
- package/dist/esm/ls-icon.entry.js.map +1 -0
- package/dist/esm/ls-label.entry.js +1 -1
- package/dist/esm/ls-list-card-button.entry.js +1 -1
- package/dist/esm/ls-loading_2.entry.js +34 -0
- package/dist/esm/ls-navbar.entry.js +1 -1
- package/dist/esm/ls-notification.entry.js +1 -1
- package/dist/esm/ls-radio-group.entry.js +1 -1
- package/dist/esm/ls-radio-input.entry.js +1 -1
- package/dist/esm/ls-tabs.entry.js +1 -1
- package/dist/esm/ls-tag.entry.js +1 -1
- package/dist/esm/ls-text.entry.js +1 -1
- package/dist/esm/ls-timeline-step.entry.js +1 -1
- package/dist/esm/ls-timeline.entry.js +1 -1
- package/dist/esm/ls-title-input.entry.js +2 -2
- package/dist/esm/ls-toolbox-field.entry.js +94 -0
- package/dist/esm/ls-toolbox-field.entry.js.map +1 -0
- package/dist/esm/ls-tooltip.entry.js +245 -0
- package/dist/esm/ls-tooltip.entry.js.map +1 -0
- package/dist/esm/mouseHandlers-BV17gkLo.js +966 -0
- package/dist/esm/mouseHandlers-BV17gkLo.js.map +1 -0
- package/dist/esm/test-item.entry.js +1 -1
- package/dist/ls-document-viewer/ls-document-viewer.esm.js +1 -1
- package/dist/ls-document-viewer/p-048d62f5.entry.js +2 -0
- package/dist/ls-document-viewer/p-048d62f5.entry.js.map +1 -0
- package/dist/ls-document-viewer/p-0cd12efb.entry.js +2 -0
- package/dist/ls-document-viewer/p-0cd12efb.entry.js.map +1 -0
- package/dist/ls-document-viewer/{p-98a57094.entry.js → p-17771224.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-6772200f.entry.js → p-34c89736.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-7cfcd1b7.entry.js → p-35181c98.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-f107d880.entry.js → p-355fa23b.entry.js} +2 -2
- package/dist/ls-document-viewer/p-36c7680a.entry.js +2 -0
- package/dist/ls-document-viewer/p-36c7680a.entry.js.map +1 -0
- package/dist/ls-document-viewer/{p-b884f55e.entry.js → p-3bce0fe7.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-77488866.entry.js → p-429be8d1.entry.js} +2 -2
- package/dist/ls-document-viewer/p-4f759b89.entry.js +2 -0
- package/dist/ls-document-viewer/p-4f759b89.entry.js.map +1 -0
- package/dist/ls-document-viewer/p-4f8330da.entry.js +2 -0
- package/dist/ls-document-viewer/p-4f8330da.entry.js.map +1 -0
- package/dist/ls-document-viewer/p-58506eb1.entry.js +2 -0
- package/dist/ls-document-viewer/p-58506eb1.entry.js.map +1 -0
- package/dist/ls-document-viewer/{p-a5615ff6.entry.js → p-5e4e4662.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-cf174e71.entry.js → p-61e1b37b.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-c0cd42f6.entry.js → p-6244f792.entry.js} +2 -2
- package/dist/ls-document-viewer/p-6d0a1ebd.entry.js +2 -0
- package/dist/ls-document-viewer/p-6d0a1ebd.entry.js.map +1 -0
- package/dist/ls-document-viewer/p-7145596d.entry.js +2 -0
- package/dist/ls-document-viewer/p-7145596d.entry.js.map +1 -0
- package/dist/ls-document-viewer/{p-f3798c61.entry.js → p-7c5b3574.entry.js} +2 -2
- package/dist/ls-document-viewer/p-7f51073d.entry.js +2 -0
- package/dist/ls-document-viewer/{p-e4b0754b.entry.js → p-85c87644.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-7c5c0140.entry.js → p-8e0ad6ec.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-6f20b92f.entry.js → p-94bbac6a.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-7d43969d.entry.js → p-9ebec463.entry.js} +2 -2
- package/dist/ls-document-viewer/p-B3gB_457.js +2 -0
- package/dist/ls-document-viewer/p-B3gB_457.js.map +1 -0
- package/dist/ls-document-viewer/p-Bp8hmhrC.js +2 -0
- package/dist/ls-document-viewer/{p-B8VmBxFg.js.map → p-Bp8hmhrC.js.map} +1 -1
- package/dist/ls-document-viewer/p-BwTFZZiO.js +2 -0
- package/dist/ls-document-viewer/p-BwTFZZiO.js.map +1 -0
- package/dist/ls-document-viewer/{p-MftqtSf2.js → p-CItPoq74.js} +2 -2
- package/dist/ls-document-viewer/p-CItPoq74.js.map +1 -0
- package/dist/ls-document-viewer/p-CwCWCxsI.js +2 -0
- package/dist/ls-document-viewer/p-CwCWCxsI.js.map +1 -0
- package/dist/ls-document-viewer/p-CxK9aHT8.js +2 -0
- package/dist/ls-document-viewer/p-CxK9aHT8.js.map +1 -0
- package/dist/ls-document-viewer/p-DhBCuHVJ.js +2 -0
- package/dist/ls-document-viewer/p-DhBCuHVJ.js.map +1 -0
- package/dist/ls-document-viewer/{p-9eac3794.entry.js → p-a4121600.entry.js} +2 -2
- package/dist/ls-document-viewer/p-a7dd3ba3.entry.js +2 -0
- package/dist/ls-document-viewer/p-a961097c.entry.js +2 -0
- package/dist/ls-document-viewer/p-a961097c.entry.js.map +1 -0
- package/dist/ls-document-viewer/{p-6be63692.entry.js → p-abb5c859.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-a0ed1643.entry.js → p-bbc53e46.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-fcf271bf.entry.js → p-c521696b.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-8239246f.entry.js → p-c78bd190.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-47e3e300.entry.js → p-ca1a0e03.entry.js} +2 -2
- package/dist/ls-document-viewer/p-cee82e97.entry.js +9009 -0
- package/dist/ls-document-viewer/p-cee82e97.entry.js.map +1 -0
- package/dist/ls-document-viewer/{p-0fba6f09.entry.js → p-d297ea14.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-a91b7258.entry.js → p-d2caf154.entry.js} +2 -2
- package/dist/ls-document-viewer/{p-05267892.entry.js → p-d76f5c10.entry.js} +2 -2
- package/dist/ls-document-viewer/p-edfdaad7.entry.js +2 -0
- package/dist/ls-document-viewer/p-edfdaad7.entry.js.map +1 -0
- package/dist/ls-document-viewer/{p-a74d04e0.entry.js → p-f318c711.entry.js} +2 -2
- package/dist/ls-document-viewer/p-f3585382.entry.js +24 -0
- package/dist/ls-document-viewer/p-f3585382.entry.js.map +1 -0
- package/dist/types/components/ls-document-viewer/snapHelper.d.ts +1 -2
- package/dist/types/components/ls-participant-select/ls-participant-select.d.ts +4 -2
- package/dist/types/components/ls-validation-manager/ls-validation-manager.d.ts +3 -0
- package/dist/types/components/ls-validation-tag/ls-validation-tag.d.ts +2 -0
- package/dist/types/components.d.ts +18 -0
- package/package.json +1 -1
- package/dist/cjs/index-CmGbWor3.js.map +0 -1
- package/dist/cjs/ls-add-new-button_51.cjs.entry.js +0 -46975
- package/dist/components/p-1e4klocT.js +0 -182
- package/dist/components/p-1e4klocT.js.map +0 -1
- package/dist/components/p-BKHg_nvO.js.map +0 -1
- package/dist/components/p-BsVEdJSl.js +0 -108
- package/dist/components/p-BsVEdJSl.js.map +0 -1
- package/dist/components/p-CDEEN7tu.js.map +0 -1
- package/dist/components/p-CLbfAJ0X.js.map +0 -1
- package/dist/components/p-DKbMooLM.js.map +0 -1
- package/dist/components/p-DVKeLLVk.js.map +0 -1
- package/dist/components/p-DYJoT5OC.js.map +0 -1
- package/dist/components/p-DvVSXyfE.js.map +0 -1
- package/dist/components/p-MG59mYF3.js.map +0 -1
- package/dist/components/p-j1rAIT-X.js.map +0 -1
- package/dist/esm/index-MftqtSf2.js.map +0 -1
- package/dist/esm/ls-add-new-button_51.entry.js +0 -46922
- package/dist/ls-document-viewer/p-B8VmBxFg.js +0 -2
- package/dist/ls-document-viewer/p-MftqtSf2.js.map +0 -1
- package/dist/ls-document-viewer/p-d865f5a4.entry.js +0 -9031
- package/dist/ls-document-viewer/p-d865f5a4.entry.js.map +0 -1
- package/dist/ls-document-viewer/p-db2560fe.entry.js +0 -2
- package/dist/ls-document-viewer/p-e3a04b71.entry.js +0 -2
- /package/dist/ls-document-viewer/{p-98a57094.entry.js.map → p-17771224.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-6772200f.entry.js.map → p-34c89736.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-7cfcd1b7.entry.js.map → p-35181c98.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-f107d880.entry.js.map → p-355fa23b.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-b884f55e.entry.js.map → p-3bce0fe7.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-77488866.entry.js.map → p-429be8d1.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-a5615ff6.entry.js.map → p-5e4e4662.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-cf174e71.entry.js.map → p-61e1b37b.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-c0cd42f6.entry.js.map → p-6244f792.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-f3798c61.entry.js.map → p-7c5b3574.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-db2560fe.entry.js.map → p-7f51073d.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-e4b0754b.entry.js.map → p-85c87644.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-7c5c0140.entry.js.map → p-8e0ad6ec.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-6f20b92f.entry.js.map → p-94bbac6a.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-7d43969d.entry.js.map → p-9ebec463.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-9eac3794.entry.js.map → p-a4121600.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-e3a04b71.entry.js.map → p-a7dd3ba3.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-6be63692.entry.js.map → p-abb5c859.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-a0ed1643.entry.js.map → p-bbc53e46.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-fcf271bf.entry.js.map → p-c521696b.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-8239246f.entry.js.map → p-c78bd190.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-47e3e300.entry.js.map → p-ca1a0e03.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-0fba6f09.entry.js.map → p-d297ea14.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-a91b7258.entry.js.map → p-d2caf154.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-05267892.entry.js.map → p-d76f5c10.entry.js.map} +0 -0
- /package/dist/ls-document-viewer/{p-a74d04e0.entry.js.map → p-f318c711.entry.js.map} +0 -0
|
@@ -0,0 +1,897 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-CItPoq74.js';
|
|
2
|
+
import { g as getInputType, h as validationTypes } from './editorUtils-BwTFZZiO.js';
|
|
3
|
+
import { d as defaultRolePalette } from './defaultPalette-CwCWCxsI.js';
|
|
4
|
+
import { d as dvI18n } from './i18n-Bp8hmhrC.js';
|
|
5
|
+
import { g as getFieldIcon } from './defaultFieldIcons-CxK9aHT8.js';
|
|
6
|
+
|
|
7
|
+
const lsEditorFieldCss = () => `:host{display:block;position:absolute;margin:0px;padding:0px 0px 0px 0px;isolation:isolate;min-height:16px}:host .ls-editor-field{display:flex;flex-direction:column;width:100%;height:100%;position:relative}.ls-dv-editor-field-editable{font-family:inherit;font-size:inherit;color:inherit;overflow:hidden;word-break:break-all;white-space:pre-wrap;margin:0;margin-top:auto;padding:0px 0px 0px 0px;min-width:2em;width:calc(100% - 13px);max-height:100%}.ls-dv-editor-field-editable:focus{outline:none}.ls-dv-editor-field-draggable{display:flex;align-items:flex-end;font-family:inherit;font-size:inherit;overflow:hidden;word-break:break-all;white-space:pre-wrap;min-width:2px;height:100%;width:calc(100% - 13px);margin-top:auto}.ls-dv-hidden-field{display:none}.ls-dv-date-field-input{position:absolute;opacity:0;pointer-events:none;width:100%;height:100%;top:0;left:0}input,textarea{all:unset;color:inherit}textarea{resize:none;overflow:hidden;word-break:break-all;white-space:pre-wrap}.ls-dv-draggable-input{font-family:inherit;font-size:inherit;position:relative;height:95%;width:95%}.ls-dv-editing-input{caret-color:rgb(15, 23, 42);caret-shape:auto;height:100%;width:100%}.ls-dv-required-icon{color:var(--red-60, #f64a44)}.ls-dv-x-button{all:unset;cursor:pointer;transform:translate(55%, -55%);position:absolute;color:white;background:var(--gray-80, #6f7176);border-radius:50%;top:0;right:0}.ls-dv-x-button:hover{background:var(--gray-90, #5e6066)}.resize-handles{pointer-events:none}.resize-handle{position:absolute;background:var(--field-border-color);border-radius:1px}.handle-e{width:4px;height:16px;right:0px;top:50%;transform:translateY(-50%)}.handle-s{width:16px;height:4px;bottom:0px;left:50%;transform:translateX(-50%)}.handle-se{width:6px;height:6px;right:0px;bottom:0px}`;
|
|
8
|
+
|
|
9
|
+
const fieldTypeKeyMap$1 = {
|
|
10
|
+
'signature': 'toolbox.signature',
|
|
11
|
+
'auto sign': 'toolbox.autosign',
|
|
12
|
+
'text': 'toolbox.text',
|
|
13
|
+
'signing date': 'toolbox.signingdate',
|
|
14
|
+
'date': 'toolbox.date',
|
|
15
|
+
'initials': 'toolbox.initials',
|
|
16
|
+
'checkbox': 'toolbox.checkbox',
|
|
17
|
+
'email': 'toolbox.email',
|
|
18
|
+
'number': 'toolbox.number',
|
|
19
|
+
'image': 'toolbox.image',
|
|
20
|
+
'dropdown': 'toolbox.dropdown',
|
|
21
|
+
'file': 'toolbox.file',
|
|
22
|
+
'drawn field': 'toolbox.drawn',
|
|
23
|
+
'drawn': 'toolbox.drawn',
|
|
24
|
+
'regular expression': 'toolbox.regex',
|
|
25
|
+
'regex': 'toolbox.regex',
|
|
26
|
+
};
|
|
27
|
+
const LsEditorField = class {
|
|
28
|
+
constructor(hostRef) {
|
|
29
|
+
registerInstance(this, hostRef);
|
|
30
|
+
this.mutate = createEvent(this, "mutate", 6);
|
|
31
|
+
this.update = createEvent(this, "update", 6);
|
|
32
|
+
}
|
|
33
|
+
get component() { return getElement(this); }
|
|
34
|
+
assignee;
|
|
35
|
+
dataItem;
|
|
36
|
+
selected = false;
|
|
37
|
+
multiSelected = false;
|
|
38
|
+
readonly;
|
|
39
|
+
type;
|
|
40
|
+
page;
|
|
41
|
+
getFieldTypeKey() {
|
|
42
|
+
return fieldTypeKeyMap$1[this.dataItem?.formElementType] || 'toolbox.text';
|
|
43
|
+
}
|
|
44
|
+
fixedAspect = null;
|
|
45
|
+
isEditing = false;
|
|
46
|
+
heldEdge = null;
|
|
47
|
+
isEdgeDragging = false;
|
|
48
|
+
innerValue;
|
|
49
|
+
zoom;
|
|
50
|
+
sizeObserver;
|
|
51
|
+
mutate;
|
|
52
|
+
update;
|
|
53
|
+
/**
|
|
54
|
+
* Controls whether floating elements are visible. Set by mouse enter/leave events.
|
|
55
|
+
*/
|
|
56
|
+
floatingActive = false;
|
|
57
|
+
// Set floatingActive true on mouse enter, false on mouse leave
|
|
58
|
+
handleMouseEnter = () => {
|
|
59
|
+
this.floatingActive = true;
|
|
60
|
+
};
|
|
61
|
+
handleMouseLeave = () => {
|
|
62
|
+
this.floatingActive = false;
|
|
63
|
+
};
|
|
64
|
+
handleInput(e) {
|
|
65
|
+
if (e.code === 'Enter' && !e.ctrlKey && !e.metaKey) {
|
|
66
|
+
this.isEditing = false;
|
|
67
|
+
this.sizeObserver.observe(this.component.shadowRoot.getElementById('field-info'));
|
|
68
|
+
e.preventDefault();
|
|
69
|
+
}
|
|
70
|
+
e.stopPropagation();
|
|
71
|
+
}
|
|
72
|
+
handleMouseMove(e) {
|
|
73
|
+
if (this.readonly)
|
|
74
|
+
return;
|
|
75
|
+
if (!e.clientX)
|
|
76
|
+
return;
|
|
77
|
+
// While dragging (button held), keep current cursor
|
|
78
|
+
if (e.buttons === 1)
|
|
79
|
+
return;
|
|
80
|
+
// Scale edge threshold so short/narrow fields still have a usable move zone
|
|
81
|
+
const edgeX = Math.min(8, this.component.clientWidth * 0.25);
|
|
82
|
+
const edgeY = Math.min(8, this.component.clientHeight * 0.25);
|
|
83
|
+
const nearLeft = e.offsetX < edgeX;
|
|
84
|
+
const nearRight = (this.component.clientWidth - e.offsetX) < edgeX;
|
|
85
|
+
const nearTop = e.offsetY < edgeY;
|
|
86
|
+
const nearBottom = (this.component.clientHeight - e.offsetY) < edgeY;
|
|
87
|
+
// Corners first
|
|
88
|
+
if ((nearRight && nearBottom) || (nearLeft && nearTop)) {
|
|
89
|
+
this.component.style.cursor = 'nwse-resize';
|
|
90
|
+
}
|
|
91
|
+
else if ((nearLeft && nearBottom) || (nearRight && nearTop)) {
|
|
92
|
+
this.component.style.cursor = 'nesw-resize';
|
|
93
|
+
}
|
|
94
|
+
else if (nearLeft || nearRight) {
|
|
95
|
+
this.component.style.cursor = 'ew-resize';
|
|
96
|
+
}
|
|
97
|
+
else if (nearTop || nearBottom) {
|
|
98
|
+
this.component.style.cursor = 'ns-resize';
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
this.component.style.cursor = 'move';
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
handleDoubleClick(e) {
|
|
105
|
+
if (this.readonly || this.dataItem.formElementType === 'signature' || this.dataItem.formElementType === 'initials' || this.dataItem.formElementType === 'signing date') {
|
|
106
|
+
e.preventDefault();
|
|
107
|
+
e.stopPropagation();
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
// Date fields use selection to open picker, skip dblclick
|
|
111
|
+
if (this.isDateField()) {
|
|
112
|
+
e.preventDefault();
|
|
113
|
+
e.stopPropagation();
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
this.isEditing = true;
|
|
117
|
+
this.heldEdge = null;
|
|
118
|
+
this.isEdgeDragging = false;
|
|
119
|
+
this.sizeObserver.disconnect();
|
|
120
|
+
this.innerValue = this.innerValue ? this.innerValue : this.dataItem?.value;
|
|
121
|
+
const editbox = this.component.shadowRoot.getElementById('editing-input');
|
|
122
|
+
console.log(this.dataItem);
|
|
123
|
+
if (editbox) {
|
|
124
|
+
editbox.className = 'ls-dv-editor-field-editable';
|
|
125
|
+
editbox.focus();
|
|
126
|
+
}
|
|
127
|
+
e.preventDefault();
|
|
128
|
+
e.stopPropagation();
|
|
129
|
+
}
|
|
130
|
+
handleMouseDown(e) {
|
|
131
|
+
if (this.readonly)
|
|
132
|
+
return;
|
|
133
|
+
const edgeX = Math.min(8, this.component.clientWidth * 0.25);
|
|
134
|
+
const edgeY = Math.min(8, this.component.clientHeight * 0.25);
|
|
135
|
+
const nearLeft = e.offsetX < edgeX;
|
|
136
|
+
const nearRight = (this.component.clientWidth - e.offsetX) < edgeX;
|
|
137
|
+
const nearTop = e.offsetY < edgeY;
|
|
138
|
+
const nearBottom = (this.component.clientHeight - e.offsetY) < edgeY;
|
|
139
|
+
if (nearLeft || nearRight || nearTop || nearBottom) {
|
|
140
|
+
// Prevent native drag so mousemove keeps firing during resize
|
|
141
|
+
e.preventDefault();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
handleDragStart(event) {
|
|
145
|
+
// Add the target element's id to the data transfer object
|
|
146
|
+
event.dataTransfer.setData('application/json', JSON.stringify({
|
|
147
|
+
type: this.type,
|
|
148
|
+
}));
|
|
149
|
+
event.dataTransfer.dropEffect = 'move';
|
|
150
|
+
}
|
|
151
|
+
watchSelectedHandler(_newValue, _oldValue) {
|
|
152
|
+
if (_newValue) {
|
|
153
|
+
this.component.style.background = this.hexToRgba(defaultRolePalette[this.dataItem?.signer % 100].s20, 0.5);
|
|
154
|
+
this.component.style.boxShadow = '0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)';
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
this.component.style.background = 'rgba(255,255,255,0.5)';
|
|
158
|
+
this.component.style.boxShadow = 'none';
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
deleteField = () => {
|
|
162
|
+
this.mutate.emit([{ action: 'delete', data: this.dataItem }]);
|
|
163
|
+
this.update.emit([{ action: 'delete', data: this.dataItem }]);
|
|
164
|
+
};
|
|
165
|
+
componentDidLoad() {
|
|
166
|
+
this.sizeObserver = new ResizeObserver(entries => {
|
|
167
|
+
for (const entry of entries) {
|
|
168
|
+
if (entry.contentRect) {
|
|
169
|
+
const movebox = this.component.shadowRoot.getElementById('field-info');
|
|
170
|
+
movebox.style.height = '100%';
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
this.sizeObserver.observe(this.component);
|
|
175
|
+
// New dropped components automatically need selecting.
|
|
176
|
+
if (this.selected) {
|
|
177
|
+
this.component.style.background = this.hexToRgba(defaultRolePalette[this.dataItem?.signer % 100].s20, 0.5);
|
|
178
|
+
this.component.style.boxShadow = '0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)';
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
this.component.style.background = this.hexToRgba('ffffff', 0.7);
|
|
182
|
+
this.component.style.boxShadow = 'none';
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
// Send one or more mutations up the chain
|
|
186
|
+
// The source of the chain fires the mutation
|
|
187
|
+
// NOTE this alter is debounced to account for typing
|
|
188
|
+
alter(diff) {
|
|
189
|
+
this.dataItem = { ...this.dataItem, ...diff };
|
|
190
|
+
this.debounce(this.dataItem, 900);
|
|
191
|
+
}
|
|
192
|
+
labeltimer;
|
|
193
|
+
debounce(data, delay) {
|
|
194
|
+
if (this.labeltimer)
|
|
195
|
+
clearTimeout(this.labeltimer);
|
|
196
|
+
this.labeltimer = setTimeout(() => {
|
|
197
|
+
const diffs = [{ action: 'update', data }];
|
|
198
|
+
this.mutate.emit(diffs);
|
|
199
|
+
}, delay);
|
|
200
|
+
}
|
|
201
|
+
hexToRgba(hex, alpha) {
|
|
202
|
+
hex = hex.replace('#', '');
|
|
203
|
+
const r = parseInt(hex.substring(0, 2), 16);
|
|
204
|
+
const g = parseInt(hex.substring(2, 4), 16);
|
|
205
|
+
const b = parseInt(hex.substring(4, 6), 16);
|
|
206
|
+
return `rgba(${r},${g},${b},${alpha})`;
|
|
207
|
+
}
|
|
208
|
+
isDateField() {
|
|
209
|
+
return getInputType(this.dataItem?.validation)?.inputType === 'date';
|
|
210
|
+
}
|
|
211
|
+
getDateFormat() {
|
|
212
|
+
const vType = validationTypes.find(v => v.id === this.dataItem?.validation);
|
|
213
|
+
if (!vType || vType.inputType !== 'date')
|
|
214
|
+
return null;
|
|
215
|
+
return vType.description;
|
|
216
|
+
}
|
|
217
|
+
toISODate(value) {
|
|
218
|
+
if (!value)
|
|
219
|
+
return '';
|
|
220
|
+
const format = this.getDateFormat();
|
|
221
|
+
if (!format)
|
|
222
|
+
return value;
|
|
223
|
+
const sep = format.match(/[/.-]/)?.[0] || '/';
|
|
224
|
+
const parts = format.split(/[/.-]/);
|
|
225
|
+
const valueParts = value.split(sep);
|
|
226
|
+
if (valueParts.length < 2)
|
|
227
|
+
return value;
|
|
228
|
+
let y = '', m = '', d = '';
|
|
229
|
+
parts.forEach((p, i) => {
|
|
230
|
+
const v = valueParts[i] || '';
|
|
231
|
+
if (p.startsWith('y'))
|
|
232
|
+
y = v;
|
|
233
|
+
else if (p.startsWith('m'))
|
|
234
|
+
m = v;
|
|
235
|
+
else if (p.startsWith('d'))
|
|
236
|
+
d = v;
|
|
237
|
+
});
|
|
238
|
+
if (y.length === 2)
|
|
239
|
+
y = '20' + y;
|
|
240
|
+
if (!d)
|
|
241
|
+
d = '01';
|
|
242
|
+
return `${y.padStart(4, '0')}-${m.padStart(2, '0')}-${d.padStart(2, '0')}`;
|
|
243
|
+
}
|
|
244
|
+
formatDateFromISO(isoValue) {
|
|
245
|
+
if (!isoValue)
|
|
246
|
+
return '';
|
|
247
|
+
const [y, m, d] = isoValue.split('-');
|
|
248
|
+
const format = this.getDateFormat();
|
|
249
|
+
if (!format)
|
|
250
|
+
return isoValue;
|
|
251
|
+
return format
|
|
252
|
+
.replace('yyyy', y)
|
|
253
|
+
.replace('yy', y.slice(-2))
|
|
254
|
+
.replace('mm', m)
|
|
255
|
+
.replace('dd', d)
|
|
256
|
+
.replace('d', String(parseInt(d)));
|
|
257
|
+
}
|
|
258
|
+
render() {
|
|
259
|
+
const hostStyle = this.floatingActive
|
|
260
|
+
? { border: `2px ${defaultRolePalette[this.dataItem?.signer % 100].s60} ${this.dataItem?.signer > 99 ? 'dashed' : 'solid'}`, boxShadow: '0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06)', '--field-border-color': defaultRolePalette[this.dataItem?.signer % 100].s60 }
|
|
261
|
+
: { border: `2px ${defaultRolePalette[this.dataItem?.signer % 100].s60} ${this.dataItem?.signer > 99 ? 'dashed' : 'solid'}`, '--field-border-color': defaultRolePalette[this.dataItem?.signer % 100].s60 };
|
|
262
|
+
const zoomValue = parseFloat(this.zoom) || 1;
|
|
263
|
+
// const topOffset = (this.dataItem.height ?? 1) + 4;
|
|
264
|
+
const topOffset = 24;
|
|
265
|
+
return (h(Host, { key: 'f46b383cd714e51df9cbccb82cac8f21f163bf20', id: this.dataItem ? 'ls-field-' + this.dataItem.id : undefined, style: hostStyle, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, h("div", { key: '6042087e1d6e82c78c2e59d825d2c695969d51f2', class: {
|
|
266
|
+
'ls-editor-field': true,
|
|
267
|
+
'is-selected': this.selected,
|
|
268
|
+
} }, !this.dataItem?.optional && (h("ls-icon", { key: '4be8fb41a23b1f8913ff5109d877b18ad155a399', name: "required-icon", size: Math.round(12 * zoomValue), class: "ls-dv-required-icon", customStyle: {
|
|
269
|
+
position: 'absolute',
|
|
270
|
+
top: '50%',
|
|
271
|
+
right: `${0.25 * zoomValue}rem`,
|
|
272
|
+
transform: 'translateY(-50%)',
|
|
273
|
+
lineHeight: '1',
|
|
274
|
+
fontSize: `${0.75 * zoomValue}rem`,
|
|
275
|
+
} })), this.isDateField() ? (h("input", { id: "editing-input", class: "ls-dv-date-field-input", type: "date", style: { color: `${defaultRolePalette[this.dataItem?.signer % 100].s100}`, textAlign: 'inherit' }, value: this.toISODate(this.dataItem?.value), checked: this.dataItem?.value ? true : false, onInput: e => {
|
|
276
|
+
const val = e.target.value;
|
|
277
|
+
this.alter({ value: this.formatDateFromISO(val) });
|
|
278
|
+
}, onChange: e => {
|
|
279
|
+
const val = e.target.value;
|
|
280
|
+
this.alter({ value: this.formatDateFromISO(val) });
|
|
281
|
+
} })) : (h("textarea", { id: "editing-input", class: this.isEditing ? 'ls-dv-editor-field-editable' : 'ls-dv-hidden-field', style: { color: `${defaultRolePalette[this.dataItem?.signer % 100].s100}`, textAlign: 'inherit' }, value: this.dataItem?.value, rows: 1, onInput: e => {
|
|
282
|
+
const el = e.target;
|
|
283
|
+
el.style.height = 'auto';
|
|
284
|
+
el.style.height = el.scrollHeight + 'px';
|
|
285
|
+
this.alter({ value: el.value });
|
|
286
|
+
}, ref: el => {
|
|
287
|
+
if (el && this.isEditing) {
|
|
288
|
+
requestAnimationFrame(() => {
|
|
289
|
+
el.style.height = 'auto';
|
|
290
|
+
el.style.height = el.scrollHeight + 'px';
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
} })), h("div", { key: '3674f26decf45d88822b5a5aa716ca275389e417', id: "field-info", class: this.isEditing ? 'ls-dv-hidden-field' : 'ls-dv-editor-field-draggable', style: { color: `${defaultRolePalette[this.dataItem?.signer % 100].s100}` } }, h("span", { key: '043b9992a9b061bcc4453b269983a1b764ee6c8e', style: { width: '100%', display: 'block', textAlign: 'inherit' } }, (this.dataItem.value.length && this.dataItem.value) || dvI18n.t(this.getFieldTypeKey()))), (this.floatingActive || this.selected) && this.dataItem?.label && (h("div", { key: '4b54596d4c87be261f4522573a9deb30fdc69565', style: {
|
|
294
|
+
position: 'absolute',
|
|
295
|
+
background: `${defaultRolePalette[this.dataItem?.signer % 100].s20}`,
|
|
296
|
+
color: `${defaultRolePalette[this.dataItem?.signer % 100].s80}`,
|
|
297
|
+
borderRadius: `${0.25 * zoomValue}rem`,
|
|
298
|
+
padding: `${0.125 * zoomValue}rem ${0.25 * zoomValue}rem`,
|
|
299
|
+
top: `-${topOffset * zoomValue}px`,
|
|
300
|
+
fontWeight: '500',
|
|
301
|
+
left: `-${2 * zoomValue}px`,
|
|
302
|
+
whiteSpace: 'nowrap',
|
|
303
|
+
width: 'fit-content',
|
|
304
|
+
} }, this.dataItem?.label)), (this.floatingActive || this.selected) && (h("p", { key: '091e37d8cd5ffccb804ebac8035143c154924e58', style: {
|
|
305
|
+
position: 'absolute',
|
|
306
|
+
color: 'var(--gray-80, #3a3a3a)',
|
|
307
|
+
bottom: `-${1.75 * zoomValue}rem`,
|
|
308
|
+
fontSize: `${0.625 * zoomValue}rem`,
|
|
309
|
+
left: '0',
|
|
310
|
+
whiteSpace: 'nowrap',
|
|
311
|
+
overflow: 'hidden',
|
|
312
|
+
textOverflow: 'ellipsis',
|
|
313
|
+
maxWidth: `${10 * zoomValue}rem`,
|
|
314
|
+
fontFamily: 'sans-serif',
|
|
315
|
+
} }, dvI18n.t('fieldproperties.assignedto'), " ", this.assignee)), this.selected && !this.multiSelected && (h("div", { key: '309a973906b50d00d8b867859e0fa0cff9fe6ac0', class: "resize-handles" }, h("div", { key: '9255aa25105203f41ae04b3f99bc5cb52b2e27f2', class: "resize-handle handle-e" }), h("div", { key: 'c4cea6db9d93c4c4bcee0985881434516490fff3', class: "resize-handle handle-s" }), h("div", { key: 'bcb7ca588ab4302bf09d41afbddb878cb57ce20e', class: "resize-handle handle-se" }))), this.floatingActive && !this.readonly && (h("button", { key: 'b544260efa160380f5090562195f6ff7793b8c5c', class: 'ls-dv-x-button', style: {
|
|
316
|
+
display: 'flex',
|
|
317
|
+
justifyContent: 'center',
|
|
318
|
+
alignItems: 'center',
|
|
319
|
+
width: `${0.875 * zoomValue}rem`,
|
|
320
|
+
height: `${0.875 * zoomValue}rem`,
|
|
321
|
+
lineHeight: `${0.75 * zoomValue}rem`,
|
|
322
|
+
fontSize: `${0.75 * zoomValue}rem`,
|
|
323
|
+
}, onClick: () => this.deleteField() }, h("ls-icon", { key: '92057e863a06f24617ecef01c46eb011b6f6d413', name: "x-icon", size: Math.round(12 * zoomValue) }))))));
|
|
324
|
+
}
|
|
325
|
+
static get watchers() { return {
|
|
326
|
+
"selected": ["watchSelectedHandler"]
|
|
327
|
+
}; }
|
|
328
|
+
};
|
|
329
|
+
LsEditorField.style = lsEditorFieldCss();
|
|
330
|
+
|
|
331
|
+
const defaultFieldTitles = {
|
|
332
|
+
'signature': 'eg. Sign Here',
|
|
333
|
+
'auto sign': 'eg. Date of Signing',
|
|
334
|
+
'text': 'eg. Full Name, Address, Company Name',
|
|
335
|
+
'signing date': 'eg. Date of Signing',
|
|
336
|
+
'date': 'eg. Date of Birth',
|
|
337
|
+
'initials': 'eg. Initial Here',
|
|
338
|
+
'checkbox': 'eg. Agree to Terms',
|
|
339
|
+
'email': 'eg. Personal Email, Emergency Contact Email',
|
|
340
|
+
'number': 'eg. Phone Number, Account Number',
|
|
341
|
+
'image': 'eg. ID Image, Headshot',
|
|
342
|
+
'dropdown': 'eg. Select an Option',
|
|
343
|
+
'file': 'eg. Upload Document',
|
|
344
|
+
'drawn field': 'eg. Draw Here',
|
|
345
|
+
'regular expression': 'eg. Sort Code',
|
|
346
|
+
};
|
|
347
|
+
function getFieldTitleSuggestion(key) {
|
|
348
|
+
return defaultFieldTitles[key] || 'eg. Sign Here';
|
|
349
|
+
}
|
|
350
|
+
const defaultFieldPlaceholders = {
|
|
351
|
+
'signature': 'Siganture',
|
|
352
|
+
'auto sign': 'Date of Signing',
|
|
353
|
+
'text': 'eg. John Doe, 123 Main St, Acme Corp',
|
|
354
|
+
'signing date': 'Date of Signing',
|
|
355
|
+
'date': 'eg. 19/12/2025',
|
|
356
|
+
'initials': 'Initials',
|
|
357
|
+
'checkbox': 'Checkbox',
|
|
358
|
+
'email': 'eg. john.doe@example.com',
|
|
359
|
+
'number': 'eg. 12345',
|
|
360
|
+
'image': 'Image',
|
|
361
|
+
'dropdown': 'Dropdown',
|
|
362
|
+
'file': 'File',
|
|
363
|
+
'drawn field': 'Draw',
|
|
364
|
+
'regular expression': 'RegEx',
|
|
365
|
+
};
|
|
366
|
+
function getFieldPlaceholder(key) {
|
|
367
|
+
return defaultFieldPlaceholders[key] || 'eg. Full Name, Address, Company Name';
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
const lsFieldContentCss = () => `:host{display:flex;flex-direction:column;gap:1rem;width:100%}p{color:var(--gray-80, #6f7176);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.ls-dv-button-link,.ls-dv-button-link:hover{all:unset}select{appearance:none;height:2.2rem;width:100%}.ls-dv-has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.625rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #ffffff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #ffffff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type=checkbox]{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type=checkbox]:checked,input[type=checkbox].ls-dv-indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type=checkbox]:checked::after{content:"";position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type=checkbox].ls-dv-indeterminate::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type=checkbox]:checked:hover,input[type=checkbox].ls-dv-indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type=checkbox]:hover{border:1px solid #9ca3af}input[type=checkbox]:focus,input[type=checkbox]:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type=checkbox]:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type=checkbox]:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.ls-dv-checkbox-container{display:flex;gap:0.5rem;width:100%}.ls-dv-checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.ls-dv-form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.ls-dv-form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.ls-dv-loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #4456f6)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.ls-dv-tertiary-grey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #6f7176)}button.ls-dv-tertiary-grey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.ls-dv-secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #ffffff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.ls-dv-secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.ls-dv-destructive{border:1px solid var(--red-60, #f64a44);background-color:white;color:var(--red-60, #f64a44)}button.ls-dv-destructive:hover{border:1px solid var(--red-70, #dc2721);background:var(--red-10, #fff0f0)}.ls-dv-button-group{display:flex;border-radius:0.625rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.ls-dv-button-group button{display:flex;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;min-height:unset;color:var(--gray-80, #6f7176)}.ls-dv-button-group button:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-button-group>:first-child{border-radius:0.625rem 0 0 0.625rem}.ls-dv-button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.ls-dv-button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}.ls-dv-date-input-wrapper{position:relative;width:100%}.ls-dv-date-display{cursor:pointer;width:100%;box-sizing:border-box}.ls-dv-date-clear{position:absolute;right:0.5rem;top:0;bottom:0;display:flex;align-items:center;cursor:pointer;color:var(--gray-80, #6f7176)}.ls-dv-date-picker-hidden{position:absolute;opacity:0;pointer-events:none;top:0;left:0;width:100%;height:100%}`;
|
|
371
|
+
|
|
372
|
+
const LsFieldContent = class {
|
|
373
|
+
constructor(hostRef) {
|
|
374
|
+
registerInstance(this, hostRef);
|
|
375
|
+
this.mutate = createEvent(this, "mutate", 7);
|
|
376
|
+
this.update = createEvent(this, "update", 7);
|
|
377
|
+
}
|
|
378
|
+
get component() { return getElement(this); }
|
|
379
|
+
dataItem;
|
|
380
|
+
showValidationTypes = true;
|
|
381
|
+
readonly = false;
|
|
382
|
+
mutate;
|
|
383
|
+
update;
|
|
384
|
+
// Send one or more mutations up the chain
|
|
385
|
+
// The source of the chain fires the mutation
|
|
386
|
+
// NOTE this alter is debounced to account for typing
|
|
387
|
+
alter(diff) {
|
|
388
|
+
this.dataItem = { ...this.dataItem, ...diff };
|
|
389
|
+
this.debounce(this.dataItem, 500);
|
|
390
|
+
}
|
|
391
|
+
labeltimer;
|
|
392
|
+
debounce(data, delay) {
|
|
393
|
+
if (this.labeltimer)
|
|
394
|
+
clearTimeout(this.labeltimer);
|
|
395
|
+
this.labeltimer = setTimeout(() => {
|
|
396
|
+
const diffs = [{ action: 'update', data }];
|
|
397
|
+
this.mutate.emit(diffs);
|
|
398
|
+
}, delay);
|
|
399
|
+
}
|
|
400
|
+
supportsValue() {
|
|
401
|
+
const typesWithValue = ['signature', 'initials', 'image', 'file', 'signing', 'autosign', 'regex', 'signing date', 'auto sign', 'dropdown', 'checkbox'];
|
|
402
|
+
return !typesWithValue.includes(this.dataItem?.formElementType);
|
|
403
|
+
}
|
|
404
|
+
isDateField() {
|
|
405
|
+
return getInputType(this.dataItem?.validation)?.inputType === 'date';
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Convert a formatted date value back to ISO (yyyy-mm-dd) for the native date input.
|
|
409
|
+
*/
|
|
410
|
+
toISODate(value) {
|
|
411
|
+
if (!value)
|
|
412
|
+
return '';
|
|
413
|
+
const format = this.getDateFormat();
|
|
414
|
+
if (!format)
|
|
415
|
+
return value;
|
|
416
|
+
const sep = format.match(/[/.-]/)?.[0] || '/';
|
|
417
|
+
const parts = format.split(/[/.-]/);
|
|
418
|
+
const valueParts = value.split(sep);
|
|
419
|
+
if (valueParts.length < 2)
|
|
420
|
+
return value;
|
|
421
|
+
let y = '', m = '', d = '';
|
|
422
|
+
parts.forEach((p, i) => {
|
|
423
|
+
const v = valueParts[i] || '';
|
|
424
|
+
if (p.startsWith('y'))
|
|
425
|
+
y = v;
|
|
426
|
+
else if (p.startsWith('m'))
|
|
427
|
+
m = v;
|
|
428
|
+
else if (p.startsWith('d'))
|
|
429
|
+
d = v;
|
|
430
|
+
});
|
|
431
|
+
if (y.length === 2)
|
|
432
|
+
y = '20' + y;
|
|
433
|
+
if (!d)
|
|
434
|
+
d = '01';
|
|
435
|
+
return `${y.padStart(4, '0')}-${m.padStart(2, '0')}-${d.padStart(2, '0')}`;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Convert an ISO date (yyyy-mm-dd) to the configured format.
|
|
439
|
+
*/
|
|
440
|
+
formatDateFromISO(isoValue) {
|
|
441
|
+
if (!isoValue)
|
|
442
|
+
return '';
|
|
443
|
+
const [y, m, d] = isoValue.split('-');
|
|
444
|
+
const format = this.getDateFormat();
|
|
445
|
+
if (!format)
|
|
446
|
+
return isoValue;
|
|
447
|
+
return format
|
|
448
|
+
.replace('yyyy', y)
|
|
449
|
+
.replace('yy', y.slice(-2))
|
|
450
|
+
.replace('mm', m)
|
|
451
|
+
.replace('dd', d)
|
|
452
|
+
.replace('d', String(parseInt(d)));
|
|
453
|
+
}
|
|
454
|
+
getDateFormat() {
|
|
455
|
+
const vType = validationTypes.find(v => v.id === this.dataItem?.validation);
|
|
456
|
+
if (!vType || vType.inputType !== 'date')
|
|
457
|
+
return null;
|
|
458
|
+
return vType.description;
|
|
459
|
+
}
|
|
460
|
+
getDateFormatById(validation) {
|
|
461
|
+
const vType = validationTypes.find(v => v.id === validation);
|
|
462
|
+
if (!vType || vType.inputType !== 'date')
|
|
463
|
+
return null;
|
|
464
|
+
return vType.description;
|
|
465
|
+
}
|
|
466
|
+
handleFormatChange(newValidation) {
|
|
467
|
+
const currentValue = this.dataItem?.value;
|
|
468
|
+
if (!currentValue || !this.isDateField()) {
|
|
469
|
+
this.alter({ validation: newValidation });
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
// Parse current value to ISO using the old format
|
|
473
|
+
const oldFormat = this.getDateFormat();
|
|
474
|
+
const newFormat = this.getDateFormatById(newValidation);
|
|
475
|
+
if (!oldFormat || !newFormat) {
|
|
476
|
+
this.alter({ validation: newValidation });
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
const parts = oldFormat.split(/[/.-]/);
|
|
480
|
+
const sep = oldFormat.match(/[/.-]/)?.[0] || '/';
|
|
481
|
+
const valueParts = currentValue.split(sep);
|
|
482
|
+
if (valueParts.length < 2) {
|
|
483
|
+
this.alter({ validation: newValidation });
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
let y = '', m = '', d = '';
|
|
487
|
+
parts.forEach((p, i) => {
|
|
488
|
+
const v = valueParts[i] || '';
|
|
489
|
+
if (p.startsWith('y'))
|
|
490
|
+
y = v;
|
|
491
|
+
else if (p.startsWith('m'))
|
|
492
|
+
m = v;
|
|
493
|
+
else if (p.startsWith('d'))
|
|
494
|
+
d = v;
|
|
495
|
+
});
|
|
496
|
+
if (y.length === 2)
|
|
497
|
+
y = '20' + y;
|
|
498
|
+
if (!d)
|
|
499
|
+
d = '01';
|
|
500
|
+
const newValue = newFormat
|
|
501
|
+
.replace('yyyy', y.padStart(4, '0'))
|
|
502
|
+
.replace('yy', y.slice(-2))
|
|
503
|
+
.replace('mm', m.padStart(2, '0'))
|
|
504
|
+
.replace('dd', d.padStart(2, '0'))
|
|
505
|
+
.replace('d', String(parseInt(d)));
|
|
506
|
+
this.alter({ validation: newValidation, value: newValue });
|
|
507
|
+
}
|
|
508
|
+
render() {
|
|
509
|
+
return (h(Host, { key: '0e4be12a5cfe7d86afe3800c6dada17ee92ba0c6' }, h("ls-props-section", { key: '81618ff56ea83795b99d5d2a7f6fa0a30df55eb4', sectionTitle: dvI18n.t('fieldproperties.fieldtype'), sectionDescription: dvI18n.t('fieldproperties.fieldtypedescription') }, h("ls-field-type-display", { key: 'bc0e38160eefc5a20d6d549b1c43099e4afca657', fieldType: this.dataItem?.formElementType, assignee: this.dataItem?.signer })), this.dataItem?.formElementType !== 'signature' && (h("ls-props-section", { key: 'cef7f6d80321ed89c619cb084f007997b7f01b59', sectionTitle: dvI18n.t('fieldproperties.requiredfield'), row: true }, h("ls-toggle", { key: '8d0b4c10978029e70b145178df44982ee84f4d2e', id: "toggle-required", checked: !this.dataItem?.optional, onValueChange: ev => !this.readonly && this.alter({ optional: !ev.detail }) }))), h("ls-props-section", { key: 'fecc2570a73bcbb477dfc50f946c5365dcde1e8e', sectionTitle: dvI18n.t('fieldproperties.fieldlabel'), sectionDescription: dvI18n.t('fieldproperties.fieldlabeldescription') }, h("input", { key: '9e8a9a7324d1faeeceb9f32a6097cb30094c9862', value: this.dataItem?.label, placeholder: getFieldTitleSuggestion(this.dataItem?.formElementType), onInput: e => this.alter({ label: e.target.value }), disabled: this.readonly })), this.supportsValue() && (h("ls-props-section", { key: '5f00d7ccc50ebc2e0efb4c34e89245dc2478371e', sectionTitle: dvI18n.t('fieldproperties.value'), sectionDescription: dvI18n.t('fieldproperties.valuedescription') }, this.isDateField() ? (h("div", { class: "ls-dv-date-input-wrapper" }, h("input", { class: "ls-dv-date-display", type: "text", value: this.dataItem?.value, placeholder: this.getDateFormat(), readOnly: true, onClick: () => {
|
|
510
|
+
if (this.readonly)
|
|
511
|
+
return;
|
|
512
|
+
const picker = this.component.shadowRoot.getElementById('ls-date-picker');
|
|
513
|
+
if (picker)
|
|
514
|
+
picker.showPicker();
|
|
515
|
+
} }), this.dataItem?.value && !this.readonly && (h("div", { class: "ls-dv-date-clear", onClick: () => this.alter({ value: '' }) }, h("ls-icon", { name: "x-icon", size: 20 }))), h("input", { id: "ls-date-picker", class: "ls-dv-date-picker-hidden", type: "date", value: this.toISODate(this.dataItem?.value), onInput: e => this.alter({ value: this.formatDateFromISO(e.target.value) }), disabled: this.readonly }))) : (h("input", { value: this.dataItem?.value, placeholder: getFieldPlaceholder(this.dataItem?.formElementType), onInput: e => this.alter({ value: e.target.value }), disabled: this.readonly })))), this.dataItem.validation === 20 && (h("ls-props-section", { key: '9e0b123a33d3470a281fc966523780819bced98d', sectionTitle: dvI18n.t('fieldproperties.options'), sectionDescription: dvI18n.t('fieldproperties.optionsdescription') }, h("textarea", { key: 'e5a9f7de939f85523ae418bcb6ba7a3b9af0e702', value: this.dataItem?.options, placeholder: "Option 1\nOption 2\nOption 3", onInput: e => this.alter({ options: e.target.value }), disabled: this.readonly }))), this.showValidationTypes && (h("ls-props-section", { key: '91d2c6a1c55f172fedabca33a17f3460bb7e3c21', sectionTitle: dvI18n.t('fieldproperties.contentformat'), sectionDescription: dvI18n.t('fieldproperties.contentformatdescription') }, h("ls-input-wrapper", { key: 'fd3a78cf1b00343935eed87cd19fc87b484b6ee3', select: true }, h("select", { key: 'f7378995e328e5d556f910f7dee50245239438c2', onChange: ev => !this.readonly && this.handleFormatChange(parseInt(ev.target.value)) }, validationTypes
|
|
516
|
+
.filter(type => type.formType === this.dataItem?.formElementType)
|
|
517
|
+
.map(type => (h("option", { selected: this.dataItem?.validation === type.id, value: type.id }, type.description))))))), h("slot", { key: '910ab65ef77ed05bbb03baf4d3eabaa31de90e6c' })));
|
|
518
|
+
}
|
|
519
|
+
};
|
|
520
|
+
LsFieldContent.style = lsFieldContentCss();
|
|
521
|
+
|
|
522
|
+
const lsFieldDimensionsCss = () => `:host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}*{margin:0;box-sizing:border-box}.ls-dv-field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-dv-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.ls-dv-row{flex-direction:row;align-items:center;justify-content:space-between}.ls-dv-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-dv-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-dv-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6f7176);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.ls-dv-input-row{display:flex;gap:0.5rem}.ls-dv-input-row .ls-dv-input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6f7176);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.ls-dv-button-link,.ls-dv-button-link:hover{all:unset}select{appearance:none;height:2.25rem}.ls-dv-input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}.ls-dv-has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.625rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover,select:hover,textarea:hover{border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #ffffff)}input:focus,select:focus,textarea:focus{outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #ffffff)}input:active,select:active,textarea:active{border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa)}input[type=checkbox]{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type=checkbox]:checked,input[type=checkbox].ls-dv-indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type=checkbox]:checked::after{content:"";position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type=checkbox].ls-dv-indeterminate::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type=checkbox]:checked:hover,input[type=checkbox].ls-dv-indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type=checkbox]:hover{border:1px solid #9ca3af}input[type=checkbox]:focus,input[type=checkbox]:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type=checkbox]:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type=checkbox]:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.ls-dv-checkbox-container{display:flex;gap:0.5rem;width:100%}.ls-dv-checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.ls-dv-form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.ls-dv-form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.ls-dv-loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #4456f6)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.ls-dv-tertiary-grey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #6f7176)}button.ls-dv-tertiary-grey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.ls-dv-button-group{display:flex;border-radius:0.625rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip}.ls-dv-button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6f7176)}.ls-dv-button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #c8c9cc)}.ls-dv-button-group button:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-button-group>:first-child{border-radius:0.625rem 0 0 0.625rem}.ls-dv-button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.ls-dv-button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}`;
|
|
523
|
+
|
|
524
|
+
const LsFieldDimensions = class {
|
|
525
|
+
constructor(hostRef) {
|
|
526
|
+
registerInstance(this, hostRef);
|
|
527
|
+
this.mutate = createEvent(this, "mutate", 7);
|
|
528
|
+
this.update = createEvent(this, "update", 7);
|
|
529
|
+
}
|
|
530
|
+
get component() { return getElement(this); }
|
|
531
|
+
dataItem;
|
|
532
|
+
template; // LSApiTemplate
|
|
533
|
+
readonly = false;
|
|
534
|
+
mutate;
|
|
535
|
+
update;
|
|
536
|
+
isSingle(dt) {
|
|
537
|
+
return dt.length === undefined;
|
|
538
|
+
}
|
|
539
|
+
isMultiple(dt) {
|
|
540
|
+
return typeof dt.length === 'number';
|
|
541
|
+
}
|
|
542
|
+
getDataItem() {
|
|
543
|
+
if (this.isSingle(this.dataItem)) {
|
|
544
|
+
return this.dataItem;
|
|
545
|
+
}
|
|
546
|
+
return this.dataItem[0];
|
|
547
|
+
}
|
|
548
|
+
// Send one or more mutations up the chain
|
|
549
|
+
// The source of the chain fires the mutation
|
|
550
|
+
alter(diff) {
|
|
551
|
+
console.log(diff);
|
|
552
|
+
if (this.isMultiple(this.dataItem)) {
|
|
553
|
+
const diffs = this.dataItem.map(c => {
|
|
554
|
+
return { action: 'update', data: { ...c, ...diff } };
|
|
555
|
+
});
|
|
556
|
+
this.dataItem = diffs.map(d => d.data);
|
|
557
|
+
this.mutate.emit(diffs);
|
|
558
|
+
}
|
|
559
|
+
else {
|
|
560
|
+
const singleDiff = { action: 'update', data: { ...this.dataItem, ...diff } };
|
|
561
|
+
this.dataItem = singleDiff.data;
|
|
562
|
+
this.mutate.emit([singleDiff]);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
componentDidLoad() {
|
|
566
|
+
}
|
|
567
|
+
render() {
|
|
568
|
+
return (h(Host, { key: '0e9b42741d60bbe49d52f45f645982bc642d5d34' }, this.isMultiple(this.dataItem) && (h("div", { key: '1f669907f2be753ce0ef7bb365960c8500717832', class: 'ls-dv-field-properties-section' }, h("div", { key: 'ced0be23e9fb47c070c71b49fd8a0d7c87ba50e7', class: 'ls-dv-field-properties-section-text' }, h("p", { key: '91a6ed2cb926f852413c8cc4136e73f8be96789f', class: 'ls-dv-field-properties-section-title' }, dvI18n.t('dimensions.heightandwidth')), h("p", { key: '056a1356f7cc617b8bbcd4b52fd76c6f4aa05de5', class: 'ls-dv-field-properties-section-description' }, dvI18n.t('dimensions.heightandwidthdescription'))), h("div", { key: 'ea3693b69f5885fdca520d364a18e02ed67031c0', class: 'ls-dv-input-row' }, h("div", { key: '24bff14acd575184308a773cb6810109981c46f2', class: 'ls-dv-input-wrapper', "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('dimensions.setwidthtooltip') }, h("ls-icon", { key: '245a595768df0e100bda26fefdf40c7a5feaa299', id: "selectLeadingIcon", name: "field-match-width-icon" }), h("input", { key: 'c0de745bfd8c1cda50775fe815ae8357a278df54', class: 'ls-dv-has-leading-icon', aria: "field-width", id: "field-width", onChange: e => this.alter({ width: e.target.value }), disabled: this.readonly })), h("div", { key: 'f67d9bb7be72bfa7d957a8067005258fdbb35a4f', class: 'ls-dv-input-wrapper', "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('dimensions.setheighttooltip') }, h("ls-icon", { key: '2b484223f82787a2d190f680eece4efac6b2a6da', id: "selectLeadingIcon", name: "field-match-height-icon" }), h("input", { key: 'd02950f66080b493db2557cec9e56682ee64c67e', class: 'ls-dv-has-leading-icon', aria: "field-height", id: "field-height", onChange: e => this.alter({ height: e.target.value }), disabled: this.readonly }))))), this.isSingle(this.dataItem) && (h("div", { key: 'abbafd7091a36a54f247eb21f297ed7710b2cb2e', class: 'ls-dv-field-set' }, h("div", { key: 'a16a567451d7c74afce044d90f2f31a157c6d4d2', class: 'ls-dv-field-properties-section' }, h("div", { key: '1b1747281bd1b0f0595c90bbd593986ba815997e', class: 'ls-dv-field-properties-section-text' }, h("p", { key: '0a13f12229679eba1a5c123344a7551166039f6c', class: 'ls-dv-field-properties-section-title' }, dvI18n.t('dimensions.heightandwidth')), h("p", { key: 'e93f6d24eef96819bb2ca42115deaa00a2940b7a', class: 'ls-dv-field-properties-section-description' }, dvI18n.t('dimensions.heightandwidthdescription'))), h("div", { key: 'fa47853df4bd46e61ad3c6499eb03b751d61ae62', class: 'ls-dv-input-row' }, h("div", { key: 'c1e8fda7ebf9f3e69ac5ac8a075d5acc96ed5d25', class: 'ls-dv-input-wrapper', "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('dimensions.setwidthtooltip') }, h("ls-icon", { key: 'e30403ad076cbe0917ec53d39d3d6d5b7fced56d', id: "selectLeadingIcon", name: "field-match-width-icon" }), h("input", { key: '30cf8e4f4161c1d790410b4adc38930c0d53f908', type: "number", class: 'ls-dv-has-leading-icon', aria: "field-width", id: "field-width", min: 5, max: this.dataItem.pageDimensions.width - this.dataItem.width, value: this.dataItem?.width, onChange: e => {
|
|
569
|
+
const di = this.getDataItem();
|
|
570
|
+
const newWidth = parseInt(e.target.value);
|
|
571
|
+
if (newWidth > di.pageDimensions.width - di.left) {
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
// If signature field with fixed scale, auto-adjust height
|
|
575
|
+
if (di.formElementType === 'signature' && this.template?.fixSignatureScale) {
|
|
576
|
+
const newHeight = Math.round(newWidth / 3.8);
|
|
577
|
+
this.alter({ width: newWidth, height: newHeight });
|
|
578
|
+
}
|
|
579
|
+
else {
|
|
580
|
+
this.alter({ width: newWidth });
|
|
581
|
+
}
|
|
582
|
+
}, disabled: this.readonly })), h("div", { key: '29e4955be80aca046dc022a44d9330807e8b23bc', class: 'ls-dv-input-wrapper', "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('dimensions.setheighttooltip') }, h("ls-icon", { key: '6cdc0ee8627b3c54a86b4044aa81fd23ede02e1f', id: "selectLeadingIcon", name: "field-match-height-icon" }), h("input", { key: 'c04fb2bd74fcfc27912af31e6d7bed279ad8a32a', type: "number", class: 'ls-dv-has-leading-icon', aria: "field-height", id: "field-height", value: this.dataItem?.height, onChange: e => {
|
|
583
|
+
const di = this.getDataItem();
|
|
584
|
+
const newHeight = parseInt(e.target.value);
|
|
585
|
+
if (newHeight > di.pageDimensions.height - di.top) {
|
|
586
|
+
return;
|
|
587
|
+
}
|
|
588
|
+
// If signature field with fixed scale, auto-adjust width
|
|
589
|
+
if (di.formElementType === 'signature' && this.template?.fixSignatureScale) {
|
|
590
|
+
const newWidth = Math.round(newHeight * 3.8);
|
|
591
|
+
this.alter({ height: newHeight, width: newWidth });
|
|
592
|
+
}
|
|
593
|
+
else {
|
|
594
|
+
this.alter({ height: newHeight });
|
|
595
|
+
}
|
|
596
|
+
}, disabled: this.readonly })))), h("div", { key: '878c30487b854b48fdf9057a5a524a535b227262', class: 'ls-dv-field-properties-section' }, h("div", { key: '4362ab681a2b0e9924f384bc25ba7c3040053bae', class: 'ls-dv-field-properties-section-text' }, h("p", { key: 'a9acb48901f676e66cab508809aba2306b3a8142', class: 'ls-dv-field-properties-section-title' }, dvI18n.t('dimensions.scaleandresize')), h("p", { key: 'b82f410992f55e21842def443bba3099e98d7af8', class: 'ls-dv-field-properties-section-description' }, dvI18n.t('dimensions.scaleandresizedescription'))), h("div", { key: 'a1b3a04c372dd165cf931da5d214f0de4c9dce5e', class: 'ls-dv-button-group' }, h("button", { key: '931f91906dcc46362eac9e02c7b34aa32e6c09fb', disabled: true, "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('alignment.selectmultiplescale') }, h("ls-icon", { key: '748be84fdc37fa583d2aaf34e9b6b76d020ece06', name: "field-scale-icon" })), h("button", { key: '2d5fd027599fa7c44dc041e3e35c83917debb4a2', disabled: true, "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('alignment.selectmultiplewidth') }, h("ls-icon", { key: '59f2c51db783030fedec6791a1837d153bd9f277', name: "field-match-width-icon" })), h("button", { key: 'a3c669555340a9389fcbc4b66fa8ba12cc7b2f4a', disabled: true, "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('alignment.selectmultipleheight') }, h("ls-icon", { key: '85b7c0bcfbda2a9c56d6f855c0dfae4cbc75f670', name: "field-match-height-icon" })))))), h("ls-tooltip", { key: 'deb0e4b518c49c32f43fc4c230b44f83c9a70f56', tooltipId: "ls-dv-tooltip" })));
|
|
597
|
+
}
|
|
598
|
+
};
|
|
599
|
+
LsFieldDimensions.style = lsFieldDimensionsCss();
|
|
600
|
+
|
|
601
|
+
const lsFieldFooterCss = () => `:host{display:block}.ls-dv-button-footer{display:flex;padding-top:1rem;border-top:1px solid var(--gray-20, #edeff2);flex-direction:column;justify-content:flex-end;gap:0.75rem;margin-top:auto}button.ls-dv-secondary{border:1px solid var(--gray-50, #c8c9cc);background:var(--white, #ffffff);color:var(--gray-90, #5e6066);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}button.ls-dv-secondary:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}button.ls-dv-destructive{border:1px solid var(--red-60, #f64a44);background-color:white;color:var(--red-60, #f64a44)}button.ls-dv-destructive:hover{border:1px solid var(--red-70, #dc2721);background:var(--red-10, #fff0f0)}button{display:flex;gap:0.5rem;border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;font-weight:500;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}.ls-dv-full-rounded{border-radius:calc(infinity * 1px)}`;
|
|
602
|
+
|
|
603
|
+
const LsFieldFooter = class {
|
|
604
|
+
constructor(hostRef) {
|
|
605
|
+
registerInstance(this, hostRef);
|
|
606
|
+
this.mutate = createEvent(this, "mutate", 7);
|
|
607
|
+
this.update = createEvent(this, "update", 7);
|
|
608
|
+
this.selectFields = createEvent(this, "selectFields", 7);
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* The selected items information (as JSON).
|
|
612
|
+
* {LSApiElement[]}
|
|
613
|
+
*/
|
|
614
|
+
dataItem;
|
|
615
|
+
readonly = false;
|
|
616
|
+
mutate;
|
|
617
|
+
update;
|
|
618
|
+
selectFields;
|
|
619
|
+
isSingle(dt) {
|
|
620
|
+
return dt.length === undefined;
|
|
621
|
+
}
|
|
622
|
+
isMultiple(dt) {
|
|
623
|
+
return typeof dt.length === 'number';
|
|
624
|
+
}
|
|
625
|
+
getItems() {
|
|
626
|
+
if (this.isSingle(this.dataItem)) {
|
|
627
|
+
return [this.dataItem];
|
|
628
|
+
}
|
|
629
|
+
return this.dataItem;
|
|
630
|
+
}
|
|
631
|
+
deleteField = () => {
|
|
632
|
+
this.mutate.emit(this.getItems().map(di => {
|
|
633
|
+
return { action: 'delete', data: di };
|
|
634
|
+
}));
|
|
635
|
+
};
|
|
636
|
+
duplicateField = () => {
|
|
637
|
+
this.getItems().forEach(current => {
|
|
638
|
+
const newItem = { ...current, id: btoa('ele' + crypto.randomUUID()) };
|
|
639
|
+
const newTop = current.top + current.height;
|
|
640
|
+
if (newTop + current.height < current.pageDimensions.height) {
|
|
641
|
+
newItem.top = newTop;
|
|
642
|
+
}
|
|
643
|
+
this.mutate.emit([{ action: 'create', data: newItem, select: 'clear' }]);
|
|
644
|
+
});
|
|
645
|
+
};
|
|
646
|
+
render() {
|
|
647
|
+
return (h(Host, { key: 'aa2114ec49122c9b4fc4dc52b872615e7aac9298' }, h("div", { key: 'fb73920bea0d61e8c480fa4c6fd01114f538f61d', class: 'ls-dv-button-footer' }, h("button", { key: '421ec450379a914374935eb3ae0c6754b56e4218', class: 'ls-dv-secondary ls-dv-full-rounded', onClick: () => this.duplicateField(), disabled: this.readonly }, h("ls-icon", { key: '00fb2e23a64f767198f87bd0a9bb50b55caa6a7f', name: "field-duplicate-icon", size: 20 }), dvI18n.t('common.duplicate')), h("button", { key: '714d2d886a01eabbfef26b52a501b9db3262fc4c', class: 'ls-dv-destructive ls-dv-full-rounded', onClick: () => this.deleteField(), disabled: this.readonly }, h("ls-icon", { key: '84995d30a3835bca5d227f948f6d771715504b09', name: "trash-icon", size: 20 }), dvI18n.t('common.delete'))), h("slot", { key: 'be10131be2d81b0f18d1114939edf4f4f3d32c60' })));
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
LsFieldFooter.style = lsFieldFooterCss();
|
|
651
|
+
|
|
652
|
+
const lsFieldPlacementCss = () => `:host{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}*{margin:0;box-sizing:border-box}.ls-dv-field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-dv-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.ls-dv-row{flex-direction:row;align-items:center;justify-content:space-between}.ls-dv-multi-button-group-row{display:flex;gap:0.5rem}.ls-dv-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-dv-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-dv-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6f7176);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.ls-dv-input-row{display:flex;gap:0.5rem}.ls-dv-input-row .ls-dv-input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6f7176);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.ls-dv-button-link,.ls-dv-button-link:hover{all:unset}select{appearance:none;height:2.25rem}.ls-dv-input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #c8c9cc)}.ls-dv-has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.625rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #ffffff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #ffffff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #c8c9cc);box-shadow:none}input[type=checkbox]{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type=checkbox]:checked,input[type=checkbox].ls-dv-indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type=checkbox]:checked::after{content:"";position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type=checkbox].ls-dv-indeterminate::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type=checkbox]:checked:hover,input[type=checkbox].ls-dv-indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type=checkbox]:hover{border:1px solid #9ca3af}input[type=checkbox]:focus,input[type=checkbox]:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type=checkbox]:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type=checkbox]:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.ls-dv-checkbox-container{display:flex;gap:0.5rem;width:100%}.ls-dv-checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.ls-dv-form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.ls-dv-form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.ls-dv-loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #4456f6)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.ls-dv-tertiary-grey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #6f7176)}button.ls-dv-tertiary-grey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.ls-dv-button-group{display:flex;border-radius:0.625rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.ls-dv-button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6f7176)}.ls-dv-button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #c8c9cc)}.ls-dv-button-group button:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-button-group>:first-child{border-radius:0.625rem 0 0 0.625rem}.ls-dv-button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.ls-dv-button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}`;
|
|
653
|
+
|
|
654
|
+
const LsFieldPlacement = class {
|
|
655
|
+
constructor(hostRef) {
|
|
656
|
+
registerInstance(this, hostRef);
|
|
657
|
+
this.mutate = createEvent(this, "mutate", 7);
|
|
658
|
+
}
|
|
659
|
+
get component() { return getElement(this); }
|
|
660
|
+
dataItem;
|
|
661
|
+
readonly = false;
|
|
662
|
+
mutate;
|
|
663
|
+
isSingle(dt) {
|
|
664
|
+
return dt.length === undefined;
|
|
665
|
+
}
|
|
666
|
+
isMultiple(dt) {
|
|
667
|
+
return typeof dt.length === 'number';
|
|
668
|
+
}
|
|
669
|
+
getValue(key) {
|
|
670
|
+
if (this.isMultiple(this.dataItem)) {
|
|
671
|
+
return "";
|
|
672
|
+
}
|
|
673
|
+
else if (this.isSingle(this.dataItem)) {
|
|
674
|
+
return this.dataItem[key];
|
|
675
|
+
}
|
|
676
|
+
return '';
|
|
677
|
+
}
|
|
678
|
+
// Send one or more mutations up the chain
|
|
679
|
+
// The source of the chain fires the mutation
|
|
680
|
+
alter(diff) {
|
|
681
|
+
if (this.isMultiple(this.dataItem)) {
|
|
682
|
+
const diffs = this.dataItem.map(c => {
|
|
683
|
+
return { action: 'update', data: { ...c, ...diff } };
|
|
684
|
+
});
|
|
685
|
+
this.dataItem = diffs.map(d => d.data);
|
|
686
|
+
this.mutate.emit(diffs);
|
|
687
|
+
}
|
|
688
|
+
else {
|
|
689
|
+
const singleDiff = { action: 'update', data: { ...this.dataItem, ...diff } };
|
|
690
|
+
this.dataItem = singleDiff.data;
|
|
691
|
+
this.mutate.emit([singleDiff]);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
center() {
|
|
695
|
+
const item = this.dataItem;
|
|
696
|
+
return item.pageDimensions.width / 2 - item.width / 2;
|
|
697
|
+
}
|
|
698
|
+
right() {
|
|
699
|
+
const item = this.dataItem;
|
|
700
|
+
return item.pageDimensions.width - item.width;
|
|
701
|
+
}
|
|
702
|
+
middle() {
|
|
703
|
+
const item = this.dataItem;
|
|
704
|
+
return item.pageDimensions.height / 2 - item.height / 2;
|
|
705
|
+
}
|
|
706
|
+
bottom() {
|
|
707
|
+
const item = this.dataItem;
|
|
708
|
+
return item.pageDimensions.height - item.height;
|
|
709
|
+
}
|
|
710
|
+
componentDidLoad() {
|
|
711
|
+
}
|
|
712
|
+
render() {
|
|
713
|
+
return (h(Host, { key: 'e4cecb1b45b1b52a73c6a297f11716e25193497a' }, this.isMultiple(this.dataItem) && (h("div", { key: '7b6ae2f7c44dc7386e961467b7388db7be8be4a6', class: 'ls-dv-field-properties-section' }, h("div", { key: '8d772addd2b139c86a715ca6ae85c63c42829c0b', class: 'ls-dv-field-properties-section-text' }, h("p", { key: '101cc43e81a55d022ce0a6d85764e029bd7f0690', class: 'ls-dv-field-properties-section-title' }, dvI18n.t('placement.location')), h("p", { key: '1060ade0f0d90005fae6a5470b46723016375ac2', class: 'ls-dv-field-properties-section-description' }, dvI18n.t('placement.locationdescription'))), h("div", { key: 'dc9b6b50d2b71e70d6271e91a24f96554f19b218', class: 'ls-dv-input-row' }, h("div", { key: '4cabff83ee795ba7f4bf30a368dd71bbeb2f6cbe', class: 'ls-dv-input-wrapper' }, h("ls-icon", { key: 'ba2eb3d5e3116aa267060128d620e5fbf0dcc733', id: "selectLeadingIcon", name: "x-letter-icon" }), h("input", { key: 'f3830cb770cd9673f87d5ad4bbcc46434bc01baf', type: "number", class: 'ls-dv-has-leading-icon', aria: "top-location", id: "top-location", onChange: e => this.alter({ left: e.target.value }), disabled: this.readonly })), h("div", { key: 'a0a8c51643c6e91c8fcab8c234df0dd6a250357e', class: 'ls-dv-input-wrapper' }, h("ls-icon", { key: 'af147ec36c9598baa4f2b181597ee799b7ea8d0b', id: "selectLeadingIcon", name: "y-icon" }), h("input", { key: '52ea8f6ad247828c19630e30f5c9a4951f991a6f', type: "number", class: 'ls-dv-has-leading-icon', aria: "left-location", id: "left-location", onChange: e => this.alter({ top: e.target.value }), disabled: this.readonly }))))), this.isSingle(this.dataItem) && (h("div", { key: '58090f76410f368348abdf86de34c3dd03390e98', class: 'ls-dv-field-set' }, h("div", { key: '048df96d3cf06b5be5b4c85bcf0d1eb9a32bd46c', class: 'ls-dv-field-properties-section' }, h("div", { key: '9caf97467fd013420f512020dfdbd37926d3cf67', class: 'ls-dv-field-properties-section-text' }, h("p", { key: 'aebe43b21d71d1c48f69063fdfc5dd63635be0e9', class: 'ls-dv-field-properties-section-title' }, dvI18n.t('placement.alignment')), h("p", { key: '39c53749c03caed38962b87544636252311fa524', class: 'ls-dv-field-properties-section-description' }, dvI18n.t('placement.alignmentdescription'))), h("div", { key: '1a94c1e6571b793cb620410a94ab109eb845c42e', class: 'ls-dv-multi-button-group-row' }, h("div", { key: '1a12afd1b24edb219dda9548c572cbe04dfa681f', class: 'ls-dv-button-group' }, h("button", { key: '923c539ee81769675f1e19b794bef5870f761444', onClick: () => { this.alter({ left: 0 }); }, "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('alignment.alignleft'), disabled: this.readonly }, h("ls-icon", { key: 'd3a6df642e37aa29d33c0b28daf5ba3288b0c81c', name: "field-alignment-left-icon" })), h("button", { key: '9ddb439ccec7afee3b31acbf2920b2027639ca7e', onClick: () => { this.alter({ left: this.center() }); }, "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('alignment.aligncenter'), disabled: this.readonly }, h("ls-icon", { key: 'a75aa9aa8ce7760dc6ef37d91c4ce68eb93a3a4b', name: "field-alignment-centre-icon" })), h("button", { key: '3009dd829abd962ef347b23410e9f09a6b53bb2e', onClick: () => { this.alter({ left: this.right() }); }, "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('alignment.alignright'), disabled: this.readonly }, h("ls-icon", { key: '74c4e39971b6c3e14280d77eb49f8e7582206009', name: "field-alignment-right-icon" }))), h("div", { key: '394b8e0e71c78483314eb7faebfd9a2a295e3f8e', class: 'ls-dv-button-group' }, h("button", { key: '2b46c6fd1492344936c4a2e8c43eba046edffe9e', onClick: () => this.alter({ top: 0 }), "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('alignment.aligntop'), disabled: this.readonly }, h("ls-icon", { key: '99b94fd721ef73e698c6ef519e223a0f1a43d8b9', name: "field-alignment-top-icon" })), h("button", { key: '67f890427ebc8d2b5a20fe0209c0c12f23456cba', onClick: () => { this.alter({ top: this.middle() }); }, "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('alignment.alignmiddle'), disabled: this.readonly }, h("ls-icon", { key: '4b385ed96004bb1a415a29a535c8570e1be03a30', name: "field-alignment-middle-icon" })), h("button", { key: '6e7a801acd6188a4e13dba53ec10f40323368795', onClick: () => { this.alter({ top: this.bottom() }); }, "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('alignment.alignbottom'), disabled: this.readonly }, h("ls-icon", { key: 'e3204faf98839060e3d42a497ed679421ef6c303', name: "field-alignment-bottom-icon" }))))), h("div", { key: '0c1d177d048554856696e1a98080207070c65b0d', class: 'ls-dv-field-properties-section' }, h("div", { key: 'e036fb70766fb6946ec2190395712c1e2cbf9427', class: 'ls-dv-field-properties-section-text' }, h("p", { key: 'b0e60929ae71cb630649407a4726cc7a3ece041e', class: 'ls-dv-field-properties-section-title' }, dvI18n.t('placement.location')), h("p", { key: '1ccc216cd8230df41531412ba0251343037d67e6', class: 'ls-dv-field-properties-section-description' }, dvI18n.t('placement.locationdescription'))), h("div", { key: 'ee3697e2bb5e060a14f17946f810d1b507e84f6d', class: 'ls-dv-input-row' }, h("div", { key: '69b0352255d6831e38d2d54a6f34cd77db3c6a82', class: 'ls-dv-input-wrapper' }, h("ls-icon", { key: '39605c04b62d34bf7a00da06efb9ba836a56556c', id: "selectLeadingIcon", name: "x-letter-icon" }), h("input", { key: '42005e3f8da2343bdaf665f85c92c7a3ef615d97', type: "number", class: 'ls-dv-has-leading-icon', aria: "top-location", id: "top-location", value: this.dataItem?.left, onChange: e => this.alter({ left: e.target.value }), disabled: this.readonly })), h("div", { key: 'ae398283e853efba30211acfa0834920e06d7423', class: 'ls-dv-input-wrapper' }, h("ls-icon", { key: '539f95481c2f67d1e53dc12c92cbe3f7ffd465ec', id: "selectLeadingIcon", name: "y-icon" }), h("input", { key: 'ac010c6c6bb953dc5cee2247560612745e281125', type: "number", class: 'ls-dv-has-leading-icon', aria: "left-location", id: "left-location", value: this.dataItem?.top, onChange: e => this.alter({ top: e.target.value }), width: "30", disabled: this.readonly })))), h("div", { key: '28a45ddb0b8d0c30a242239797d9a82b30a88eec', class: 'ls-dv-field-properties-section' }, h("div", { key: '1ed9d37343542c92f2fc461e57f0313b6d55c4dd', class: 'ls-dv-field-properties-section-text' }, h("p", { key: '4985c99bd11ff5d3fa42d680681cfe9a68e44a9f', class: 'ls-dv-field-properties-section-title' }, dvI18n.t('placement.distribution')), h("p", { key: '5b1bbf5eefd67bdb12dc20f677c34d8db1ee4594', class: 'ls-dv-field-properties-section-description' }, dvI18n.t('placement.distributiondescription'))), h("div", { key: 'b85f695ca323ce6185304a81c4f5eb901b89a1b3', class: 'ls-dv-button-group' }, h("button", { key: 'f9222c6b558bed7f58868ecfd75bf097b3429a14', disabled: true, "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('alignment.selectmultipledistribution') }, h("ls-icon", { key: 'dc0f9cb2a03c6f37749167c8f6be533dac28bc11', name: "field-distribute-vertically-icon" })), h("button", { key: '807f30c7dd1bbe4dd9ff1a2d3cf6cb3b8e0e1934', disabled: true, "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('alignment.selectmultipledistribution') }, h("ls-icon", { key: '434d37c2ceadff7c2df869419b8f57a2a0d3b7a7', name: "field-distribute-horizontally-icon" })))), h("div", { key: '10b6c49e0009e36f37527bbaa372da914f3cace1', class: 'ls-dv-field-properties-section' }, h("div", { key: '679330c9c77efbf47ce6da02bc3b5e7ebfeedcf0', class: 'ls-dv-field-properties-section-text' }, h("p", { key: '12571251a28eaa944c23903622c0612efbc406f8', class: 'ls-dv-field-properties-section-title' }, dvI18n.t('placement.gap')), h("p", { key: 'd8bf72df6d661a320567b9b612efa53d7d3f5294', class: 'ls-dv-field-properties-section-description' }, dvI18n.t('placement.gapdescription'))), h("div", { key: 'c0b363b34c5729c32ae9ddca3e4a33c67981430c', class: 'ls-dv-input-row' }, h("div", { key: '53bc64218e0ee697a3eefe2ee3bce29d6e443f5e', class: 'ls-dv-input-wrapper', "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('placement.selectmultiplegap') }, h("ls-icon", { key: '2fb36fec5da510cd4a9b2ce3ea5b611d4aafe482', id: "selectLeadingIconDisabled", name: "field-distribute-vertically-icon" }), h("input", { key: '747db95eb6c69b0611e7639b71c78572934d46fe', type: "number", value: "0", class: 'ls-dv-has-leading-icon', aria: "vertical-gap", id: "vertical-gap", disabled: true })), h("div", { key: '3377a2882a37017fe92d16bb432a79d26f773476', class: 'ls-dv-input-wrapper', "data-tooltip-id": "ls-dv-tooltip", "data-tooltip-content": dvI18n.t('placement.selectmultiplegap') }, h("ls-icon", { key: '02203bd470da7cae0f5a27401abf6fdfac2c7d03', id: "selectLeadingIconDisabled", name: "field-distribute-horizontally-icon" }), h("input", { key: '46a9651a3e3c86827527398c422cfe24424e5c16', type: "number", value: "0", class: 'ls-dv-has-leading-icon', aria: "horizontal-gap", id: "horizontal-gap", disabled: true })))))), h("ls-tooltip", { key: '1c02d8d26c18c7201edd77de73180069c19bf188', tooltipId: "ls-dv-tooltip" })));
|
|
714
|
+
}
|
|
715
|
+
};
|
|
716
|
+
LsFieldPlacement.style = lsFieldPlacementCss();
|
|
717
|
+
|
|
718
|
+
const lsFieldPropertiesAdvancedCss = () => `:host,.ls-dv-field-set{display:flex;flex-direction:column;gap:1rem;width:100%;position:relative}*{margin:0;box-sizing:border-box}.ls-dv-expand-fields-row{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 0.25rem;cursor:pointer;color:var(--gray-80, #6f7176);font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-dv-expand-fields-row p{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem;}.ls-dv-field-set{display:flex;flex-direction:column;gap:1rem;width:100%}.ls-dv-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.ls-dv-row{flex-direction:row;align-items:center;justify-content:space-between}.ls-dv-multi-button-group-row{display:flex;gap:0.5rem}.ls-dv-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-dv-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-dv-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6f7176);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}.ls-dv-input-row{display:flex;gap:0.5rem}.ls-dv-input-row .ls-dv-input-wrapper input{width:9.313rem;max-width:9.313rem}p{color:var(--gray-80, #6f7176);font-family:var(--font-family);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height)}a{color:var(--primary-60, #4456f6);font-size:var(--text-sm);font-style:normal;font-weight:400;line-height:var(--text-sm-line-height);cursor:pointer}a:hover{text-decoration:underline;color:var(--primary-70, #2134dc)}.ls-dv-button-link,.ls-dv-button-link:hover{all:unset}select{appearance:none;height:2.25rem}.ls-dv-input-wrapper{position:relative;width:100%}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIconDisabled{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-50, #c8c9cc)}.ls-dv-has-leading-icon{padding-left:2.5rem}input,select,textarea{border:1px solid var(--gray-40, #d8d9dc);box-shadow:0 1px 0.125rem rgba(0, 0, 0, 0.05);padding:0.5rem 0.75rem;font-family:var(--font-family);font-size:var(--text-sm);border-radius:0.625rem;color:var(--gray-100, #45484d);font-weight:400}input::placeholder,select::placeholder,textarea::placeholder{color:var(--gray-60, #afb0b2)}input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled){border-color:var(--gray-50, #c8c9cc);background-color:var(--white, #ffffff)}input:focus:not(:disabled),select:focus:not(:disabled),textarea:focus:not(:disabled){outline:none;box-shadow:0 0 0 0.25rem var(--primary-40, #79adfc);border-color:var(--primary-60, #4456f6);background-color:var(--white, #ffffff)}input:active:not(:disabled),select:active:not(:disabled),textarea:active:not(:disabled){border-color:var(--primary-50, #5185ff)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--gray-10, #f7f8fa);color:var(--gray-50, #c8c9cc);box-shadow:none}input[type=checkbox]{appearance:none;position:relative;height:1rem;width:1rem;padding:0.25rem;border-radius:var(--radius-sm);border:1px solid #d1d5db;background-color:#ffffff;cursor:pointer}input[type=checkbox]:checked,input[type=checkbox].ls-dv-indeterminate{background-color:var(--primary-60, #4456f6);border:none}input[type=checkbox]:checked::after{content:"";position:absolute;top:45%;left:50%;transform:translate(-50%, -50%) rotate(-45deg) scale(-1, 1);width:0.5rem;height:0.25rem;border-bottom:0.125rem solid white;border-right:0.125rem solid white}input[type=checkbox].ls-dv-indeterminate::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.5rem;height:0.125rem;background-color:white}input[type=checkbox]:checked:hover,input[type=checkbox].ls-dv-indeterminate:hover{background-color:var(--primary-70, #2134dc);border:none}input[type=checkbox]:hover{border:1px solid #9ca3af}input[type=checkbox]:focus,input[type=checkbox]:active{outline:none;box-shadow:0 0 0 0.25rem var(--primary-20, #c7ddff);background-color:#f0f4f8}input[type=checkbox]:disabled{background-color:#f3f4f6;outline:none;cursor:not-allowed}input[type=checkbox]:disabled:checked{background-color:#e5e7eb;border:none;outline:none;cursor:not-allowed}.ls-dv-checkbox-container{display:flex;gap:0.5rem;width:100%}.ls-dv-checkbox-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1rem}.ls-dv-form-label{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:500;line-height:1.5rem}.ls-dv-form-field{display:flex;flex-direction:column;gap:0.25rem;width:100%}.ls-dv-loading-box{display:flex;justify-content:center;align-items:center;width:100%;height:100vh;color:var(--primary-60, #4456f6)}button{border:0;appearance:button;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-lg);background-color:var(--primary-60, #4456f6);color:white;text-transform:capitalize;min-height:2.25rem;min-width:2.25rem}button.ls-dv-tertiary-grey{border:1px solid var(--gray-40, #d8d9dc);background-color:white;color:var(--gray-80, #6f7176)}button.ls-dv-tertiary-grey:hover{border:1px solid var(--gray-50, #c8c9cc);background:var(--gray-10, #f7f8fa)}.ls-dv-button-group{display:flex;border-radius:0.625rem;border:1px solid var(--gray-30, #e0e2e5);background:var(--white, #ffffff);overflow:clip;width:100%}.ls-dv-button-group button{display:flex;width:100%;background:transparent;border-radius:unset;padding:0.25rem 0.75rem;min-width:2.156rem;color:var(--gray-80, #6f7176)}.ls-dv-button-group button:disabled{background:var(--gray-10, #f7f8fa);cursor:not-allowed;color:var(--gray-50, #c8c9cc)}.ls-dv-button-group button:hover{background:var(--gray-10, #f7f8fa)}.ls-dv-button-group>:first-child{border-radius:0.625rem 0 0 0.625rem}.ls-dv-button-group>:last-child{border-radius:0 0.5rem 0.5rem 0}.ls-dv-button-group>:not(:first-child){border-left:1px solid var(--gray-30, #e0e2e5)}`;
|
|
719
|
+
|
|
720
|
+
const LsFieldPropertiesAdvanced = class {
|
|
721
|
+
constructor(hostRef) {
|
|
722
|
+
registerInstance(this, hostRef);
|
|
723
|
+
this.mutate = createEvent(this, "mutate", 7);
|
|
724
|
+
}
|
|
725
|
+
dataItem;
|
|
726
|
+
expanded = false;
|
|
727
|
+
readonly = false;
|
|
728
|
+
mutate;
|
|
729
|
+
isSingle(dt) {
|
|
730
|
+
return dt.length === undefined;
|
|
731
|
+
}
|
|
732
|
+
isMultiple(dt) {
|
|
733
|
+
return typeof dt.length === 'number';
|
|
734
|
+
}
|
|
735
|
+
// Send one or more mutations up the chain
|
|
736
|
+
// The source of the chain fires the mutation
|
|
737
|
+
// NOTE this alter is debounced to account for typing
|
|
738
|
+
alter(diff, bounceDelay = 0) {
|
|
739
|
+
console.log('Altering advanced props:', diff);
|
|
740
|
+
let diffs = [];
|
|
741
|
+
if (this.isMultiple(this.dataItem)) {
|
|
742
|
+
this.dataItem = this.dataItem.map(di => {
|
|
743
|
+
return { ...di, ...diff };
|
|
744
|
+
});
|
|
745
|
+
diffs = this.dataItem.map(di => {
|
|
746
|
+
return { action: 'update', data: { ...di, ...diff } };
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
else if (this.isSingle(this.dataItem)) {
|
|
750
|
+
this.dataItem = { ...this.dataItem, ...diff };
|
|
751
|
+
diffs = [{ action: 'update', data: { ...this.dataItem, ...diff } }];
|
|
752
|
+
}
|
|
753
|
+
if (bounceDelay === 0) {
|
|
754
|
+
this.mutate.emit(diffs);
|
|
755
|
+
}
|
|
756
|
+
else {
|
|
757
|
+
this.debounce(diffs, bounceDelay);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
titletimer;
|
|
761
|
+
debounce(diffs, delay) {
|
|
762
|
+
if (this.titletimer)
|
|
763
|
+
clearTimeout(this.titletimer);
|
|
764
|
+
this.titletimer = setTimeout(() => {
|
|
765
|
+
this.mutate.emit(diffs);
|
|
766
|
+
}, delay);
|
|
767
|
+
}
|
|
768
|
+
getValue(key) {
|
|
769
|
+
if (this.isMultiple(this.dataItem)) {
|
|
770
|
+
return '';
|
|
771
|
+
}
|
|
772
|
+
else if (this.isSingle(this.dataItem)) {
|
|
773
|
+
return this.dataItem[key];
|
|
774
|
+
}
|
|
775
|
+
return '';
|
|
776
|
+
}
|
|
777
|
+
render() {
|
|
778
|
+
return (h(Host, { key: 'eb656c09625879e4d3612c5b4acc1997fe1c8698' }, h("div", { key: 'a297ab7603a5623258a74fa383c93d222f0ca535', class: 'ls-dv-expand-fields-row', onClick: () => (this.expanded = !this.expanded) }, h("ls-icon", { key: 'db6bd74a2f6bb4124bd48d598454e54cc0cf246d', name: this.expanded ? 'expand-icon' : 'collapse-icon', size: 20, solid: true }), h("p", { key: '098a2920b709a1f0681d188fa8f8a865c6cb32d2' }, dvI18n.t('fieldproperties.advancedproperties'))), this.expanded && (h("div", { key: '863ba9fe5b803b3cbb14d181475d0bcddc1dfbdc', class: 'ls-dv-field-set' }, h("ls-props-section", { key: '6d4f705a6cb2aabc6233d214e7e77dc1c9df559f', sectionTitle: dvI18n.t('fieldproperties.fieldorder'), sectionDescription: dvI18n.t('fieldproperties.fieldorderdescription') }, h("input", { key: '15e33574cc10e6e17c63d32b37aeb170f7b3f38b', value: this.getValue('fieldOrder'), type: "number", placeholder: dvI18n.t('fieldproperties.placeholdereg1'), onInput: e => {
|
|
779
|
+
console.log(e);
|
|
780
|
+
this.alter({ fieldOrder: e.target.value }, 100);
|
|
781
|
+
}, onChange: () => { console.log('onchange'); }, disabled: this.readonly })), h("ls-props-section", { key: 'c6159d497f2caac1f154553dea7551648e678385', sectionTitle: dvI18n.t('fieldproperties.refname') }, h("input", { key: 'd6d62d47d7adcf3bc0e4fa23ecaafef6f1052f36', value: this.getValue('link'), placeholder: dvI18n.t('fieldproperties.placeholdercheckboxgroup'), onInput: e => this.alter({ link: e.target.value }, 300), disabled: this.readonly })), h("ls-props-section", { key: 'acb93cbe70ee5075cdae8fa4b804221f65093dd3', sectionTitle: dvI18n.t('fieldproperties.linktype'), sectionDescription: dvI18n.t('fieldproperties.linktypedescription') }, h("select", { key: 'e2cf557ed86879e8ee4bcccf147f3688f7aac7a2', onChange: e => this.alter({ linkType: e.target.value }), name: "Link Field", "aria-label": "Link Field", disabled: this.readonly }, h("option", { key: '61bdfe8fa2a3fb0bfaf9dd18c0a4c851ba39fc35', value: "0", selected: this.getValue('linkType') === '0' }, dvI18n.t('fieldproperties.linktypenoption')), h("option", { key: 'a4a972ada49832c83b713fafc75788b081984f7b', value: "1", selected: this.getValue('linkType') === '1' }, dvI18n.t('fieldproperties.linktypeoneofgroup')), h("option", { key: '72778b6f85eec93f15c301e820c04f384caead45', value: "2", selected: this.getValue('linkType') === '2' }, dvI18n.t('fieldproperties.linktypeaddtotal')), h("option", { key: '31fcf1a5098493acb682035e60bee2cc13f291a0', value: "3", selected: this.getValue('linkType') === '3' }, dvI18n.t('fieldproperties.linktypeconditional')))), h("ls-props-section", { key: '3644d32d8db6a2554b666fae6778ccb000e77372', sectionTitle: dvI18n.t('fieldproperties.linkvalue'), sectionDescription: dvI18n.t('fieldproperties.linkvaluedescription') }, h("input", { key: 'd1767d9c30f7143ab6e5c5cfeebc1c98ff1cfed4', value: this.getValue('logicAction'), width: "30", placeholder: dvI18n.t('fieldproperties.placeholdercheckboxgroup'), onChange: e => this.alter({ logicAction: e.target.value }), disabled: this.readonly }))))));
|
|
782
|
+
}
|
|
783
|
+
};
|
|
784
|
+
LsFieldPropertiesAdvanced.style = lsFieldPropertiesAdvancedCss();
|
|
785
|
+
|
|
786
|
+
const lsFieldPropertiesContainerCss = () => `*{margin:0;box-sizing:border-box}:host{display:flex;flex-direction:column;gap:1rem;width:100%;height:calc(100% - 7.25rem);position:relative}.ls-dv-tabs-container{display:grid;width:100%;gap:0.125rem;padding:0.125rem;border:1px solid var(--gray-30, #e0e2e5);border-radius:0.75rem;background:var(--white, #ffffff)}.ls-dv-tab{all:unset;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:0.5rem;border-radius:0.625rem;font-size:0.875rem;font-style:normal;font-weight:500;line-height:1.25rem;color:var(--gray-80, #6f7176);text-transform:capitalize}.ls-dv-tab.ls-dv-active{background:var(--primary-10, #eff4ff);color:var(--primary-60, #4456f6)}.ls-dv-tab:not(.ls-dv-active):hover{background:var(--gray-10, #f7f8fa)}.ls-dv-button-footer{display:flex;padding-top:1rem;border-top:1px solid var(--gray-20, #edeff2);flex-direction:column;justify-content:flex-end;gap:0.75rem;margin-top:auto}.ls-dv-scrolling-container{overflow-y:auto;padding:0 1rem;margin:0 -1rem;height:100%}`;
|
|
787
|
+
|
|
788
|
+
const LsFieldPropertiesContainer = class {
|
|
789
|
+
constructor(hostRef) {
|
|
790
|
+
registerInstance(this, hostRef);
|
|
791
|
+
}
|
|
792
|
+
dataItem;
|
|
793
|
+
tabs = [];
|
|
794
|
+
selectedTab;
|
|
795
|
+
componentWillLoad() {
|
|
796
|
+
if (!this.selectedTab) {
|
|
797
|
+
this.selectedTab = this.tabs[0] || '';
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
render() {
|
|
801
|
+
return (h(Host, { key: 'b1fd1ab25e56d0f6b009012bd03c8e16f0ca7e54' }, this.tabs.length > 1 && (h("div", { key: '6c2ae62c5b3ee2d46e25b37c5d6c945874737a66', class: 'ls-dv-tabs-container', style: { gridTemplateColumns: `repeat(${this.tabs.length}, 1fr)` } }, this.tabs.map(tab => (h("button", { class: tab === this.selectedTab ? 'ls-dv-tab ls-dv-active' : 'ls-dv-tab', onClick: () => (this.selectedTab = tab) }, dvI18n.t(`tabs.${tab}`, { defaultValue: tab })))))), h("div", { key: '60a78fab9be2656cbcd0a842c84a0471c9f68dbd', class: 'ls-dv-scrolling-container' }, h("slot", { key: '8f59435c282ddf990a499745aa013d68acb0f604', name: this.selectedTab }))));
|
|
802
|
+
}
|
|
803
|
+
};
|
|
804
|
+
LsFieldPropertiesContainer.style = lsFieldPropertiesContainerCss();
|
|
805
|
+
|
|
806
|
+
const lsFieldTypeDisplayCss = () => `:host{position:relative;border-radius:0.875rem;padding:0.25rem}*{margin:0}.ls-dv-field-type-inner{border-radius:0.625rem;background:var(--white, #ffffff);display:flex;padding:0.25rem 0.5rem 0.25rem 0.25rem;align-items:center;gap:0.875rem;align-self:stretch}.ls-dv-field-type-icon{display:flex;padding:0.5rem;align-items:center;border-radius:0.625rem;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.06), 0 1px 3px 0 rgba(0, 0, 0, 0.1)}.ls-dv-field-type-name{color:var(--gray-100, #45484d);font-size:1rem;font-style:normal;font-weight:400;line-height:1.5rem;}`;
|
|
807
|
+
|
|
808
|
+
const fieldTypeKeyMap = {
|
|
809
|
+
'signature': 'toolbox.signature',
|
|
810
|
+
'auto sign': 'toolbox.autosign',
|
|
811
|
+
'text': 'toolbox.text',
|
|
812
|
+
'signing date': 'toolbox.signingdate',
|
|
813
|
+
'date': 'toolbox.date',
|
|
814
|
+
'initials': 'toolbox.initials',
|
|
815
|
+
'checkbox': 'toolbox.checkbox',
|
|
816
|
+
'email': 'toolbox.email',
|
|
817
|
+
'number': 'toolbox.number',
|
|
818
|
+
'image': 'toolbox.image',
|
|
819
|
+
'dropdown': 'toolbox.dropdown',
|
|
820
|
+
'file': 'toolbox.file',
|
|
821
|
+
'drawn field': 'toolbox.drawn',
|
|
822
|
+
'drawn': 'toolbox.drawn',
|
|
823
|
+
'regular expression': 'toolbox.regex',
|
|
824
|
+
'regex': 'toolbox.regex',
|
|
825
|
+
};
|
|
826
|
+
const LsFieldTypeDisplay = class {
|
|
827
|
+
constructor(hostRef) {
|
|
828
|
+
registerInstance(this, hostRef);
|
|
829
|
+
}
|
|
830
|
+
assignee;
|
|
831
|
+
fieldType = 'signature';
|
|
832
|
+
render() {
|
|
833
|
+
const color = defaultRolePalette[this.assignee % 100];
|
|
834
|
+
return (h(Host, { key: '6a2cfab9cd4eb4d95801d71bcae604f2744bebc4', class: 'ls-dv-field-type-wrapper', style: {
|
|
835
|
+
border: `1px dashed ${color.s30}`,
|
|
836
|
+
background: color.s10,
|
|
837
|
+
} }, h("div", { key: '533a2bf184ae588df504b234301419f535e0677b', class: 'ls-dv-field-type-inner' }, h("div", { key: 'ff3fb83bf8d6af13c87057b51b41a6cd35b49074', class: 'ls-dv-field-type-icon', style: {
|
|
838
|
+
border: `1px solid ${color.s60}`,
|
|
839
|
+
color: color.s60,
|
|
840
|
+
background: color.s10,
|
|
841
|
+
} }, h("ls-icon", { key: 'ba985706d34c598b9f28f5a9509d47088400001b', name: getFieldIcon(this.fieldType), size: 20 })), h("p", { key: '9e0272aa299553551f329513f9b31dbef6fd992f', class: 'ls-dv-field-type-name' }, dvI18n.t(fieldTypeKeyMap[this.fieldType] || 'toolbox.text')))));
|
|
842
|
+
}
|
|
843
|
+
};
|
|
844
|
+
LsFieldTypeDisplay.style = lsFieldTypeDisplayCss();
|
|
845
|
+
|
|
846
|
+
const lsInputWrapperCss = () => `*{margin:0;padding:0;box-sizing:border-box}:host{position:relative}#selectorIcon{position:absolute;top:50%;right:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}#selectLeadingIcon{position:absolute;top:50%;left:0.675rem;transform:translateY(-50%);pointer-events:none;color:var(--gray-80, #6f7176)}`;
|
|
847
|
+
|
|
848
|
+
const LsInputWrapper = class {
|
|
849
|
+
constructor(hostRef) {
|
|
850
|
+
registerInstance(this, hostRef);
|
|
851
|
+
}
|
|
852
|
+
leadingIcon;
|
|
853
|
+
select = false;
|
|
854
|
+
render() {
|
|
855
|
+
return (h(Host, { key: 'd9aae457a6635653ae09a2a377a28c495a399e33' }, h("ls-icon", { key: 'ff2b76de99fb5744955ae33d0092f6c214d8b3ff', id: "selectLeadingIcon", name: this.leadingIcon }), this.select && h("ls-icon", { key: 'ecfbcaf860205ed494c69f8f94072e1ab7c158f7', id: "selectorIcon", name: "selector-icon" }), h("slot", { key: 'b0c7b2925c5faf47c5eb9894628faff6c61a5406' })));
|
|
856
|
+
}
|
|
857
|
+
};
|
|
858
|
+
LsInputWrapper.style = lsInputWrapperCss();
|
|
859
|
+
|
|
860
|
+
const lsPropsSectionCss = () => `*{margin:0;box-sizing:border-box}.ls-dv-field-properties-section{display:flex;position:relative;flex-direction:column;gap:0.5rem}.ls-dv-row{flex-direction:row;align-items:center;justify-content:space-between}.ls-dv-field-properties-section-text{display:flex;flex-direction:column;gap:0.25rem;padding:0.25rem}.ls-dv-field-properties-section-title{color:var(--gray-90, #5e6066);font-size:1rem;font-style:normal;font-weight:500;line-height:1.25rem;}.ls-dv-field-properties-section-description{overflow:hidden;color:var(--gray-80, #6f7176);text-overflow:ellipsis;font-size:0.75rem;font-style:normal;font-weight:400;line-height:0.75rem;}`;
|
|
861
|
+
|
|
862
|
+
const LsPropsSection = class {
|
|
863
|
+
constructor(hostRef) {
|
|
864
|
+
registerInstance(this, hostRef);
|
|
865
|
+
}
|
|
866
|
+
sectionTitle;
|
|
867
|
+
sectionDescription;
|
|
868
|
+
row = false;
|
|
869
|
+
render() {
|
|
870
|
+
return (h(Host, { key: '3f2224c67ebe53ec426e8f8a63f0a259ecdbad9e' }, h("div", { key: '2c181dca209fb4b6e5283112b85ac4efa291a1eb', class: this.row ? 'ls-dv-field-properties-section ls-dv-row' : 'ls-dv-field-properties-section' }, h("div", { key: '702b6b85e9e218ebf2766da0ac8a52346169bb92', class: 'ls-dv-field-properties-section-text' }, h("p", { key: 'ef78bc391a28a95230cd88f47c8d22af87e39c14', class: 'ls-dv-field-properties-section-title' }, this.sectionTitle), this.sectionDescription && h("p", { key: 'd3cffb66d8b11cab63cede087c8a3bf4c5686810', class: 'ls-dv-field-properties-section-description' }, this.sectionDescription)), h("slot", { key: '7850ce0fc5feffc06e6a19ed761a13323e80b867' }))));
|
|
871
|
+
}
|
|
872
|
+
};
|
|
873
|
+
LsPropsSection.style = lsPropsSectionCss();
|
|
874
|
+
|
|
875
|
+
const lsToggleCss = () => `:host{display:block}.ls-dv-switch{position:relative;display:inline-block;width:2.75rem;height:1.5rem}.ls-dv-switch input{opacity:0;width:0;height:0}.ls-dv-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:var(--gray-20, #edeff2);-webkit-transition:0.4s;transition:0.4s}.ls-dv-indeterminate{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:var(--primary-60, #4456f6);-webkit-transition:0.4s;transition:0.4s}.ls-dv-slider:before{position:absolute;content:"";height:1.25rem;width:1.25rem;left:0.125rem;bottom:0.125rem;background-color:white;-webkit-transition:0.4s;transition:0.4s}.ls-dv-indeterminate::after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:0.75rem;height:0.125rem;background-color:white}input:checked+.ls-dv-slider{background-color:var(--primary-60, #4456f6)}input:focus+.ls-dv-slider{box-shadow:0 0 1px var(--primary-60, #4456f6);outline:0.25rem solid var(--primary-20, #c7ddff)}input:checked+.ls-dv-slider:before{-webkit-transform:translateX(1.25rem);-ms-transform:translateX(1.25rem);transform:translateX(1.25rem)}.ls-dv-slider.ls-dv-round,.ls-dv-indeterminate.ls-dv-round{border-radius:2.125rem}.ls-dv-slider.ls-dv-round:before{border-radius:50%}`;
|
|
876
|
+
|
|
877
|
+
const LsToggle = class {
|
|
878
|
+
constructor(hostRef) {
|
|
879
|
+
registerInstance(this, hostRef);
|
|
880
|
+
this.valueChange = createEvent(this, "valueChange", 7);
|
|
881
|
+
}
|
|
882
|
+
checked;
|
|
883
|
+
indeterminate;
|
|
884
|
+
valueChange;
|
|
885
|
+
changeHandler(value) {
|
|
886
|
+
this.valueChange.emit(value);
|
|
887
|
+
}
|
|
888
|
+
render() {
|
|
889
|
+
return (h(Host, { key: 'a0e9363f664fbe63f0e21418358ee36d1bce7989' }, h("label", { key: '566d7acc3e867c28949435faa722383b26021587', class: "ls-dv-switch" }, h("input", { key: 'fb403ac16957603f87aa3cd9fd7a1067eb6c3d37', type: "checkbox", checked: this.checked, onChange: (e) => {
|
|
890
|
+
this.changeHandler(e.target.checked);
|
|
891
|
+
} }), h("span", { key: 'b376947015c1dd3430da844f31cc2e12921a29cc', class: `${this.indeterminate ? 'ls-dv-indeterminate' : 'ls-dv-slider'} ls-dv-round` })), h("slot", { key: '92d2c3e4e72c4f6de9666af121938c221ebc90f7' })));
|
|
892
|
+
}
|
|
893
|
+
};
|
|
894
|
+
LsToggle.style = lsToggleCss();
|
|
895
|
+
|
|
896
|
+
export { LsEditorField as ls_editor_field, LsFieldContent as ls_field_content, LsFieldDimensions as ls_field_dimensions, LsFieldFooter as ls_field_footer, LsFieldPlacement as ls_field_placement, LsFieldPropertiesAdvanced as ls_field_properties_advanced, LsFieldPropertiesContainer as ls_field_properties_container, LsFieldTypeDisplay as ls_field_type_display, LsInputWrapper as ls_input_wrapper, LsPropsSection as ls_props_section, LsToggle as ls_toggle };
|
|
897
|
+
//# sourceMappingURL=ls-editor-field.ls-field-content.ls-field-dimensions.ls-field-footer.ls-field-placement.ls-field-properties-advanced.ls-field-properties-container.ls-field-type-display.ls-input-wrapper.ls-props-section.ls-toggle.entry.js.map
|