@verbb/plugin-kit-web 2.0.0
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/CHANGELOG.md +16 -0
- package/LICENSE.md +21 -0
- package/README.md +149 -0
- package/dist/a11y/active-elements.d.ts +6 -0
- package/dist/a11y/active-elements.d.ts.map +1 -0
- package/dist/a11y/dismissible-stack.d.ts +6 -0
- package/dist/a11y/dismissible-stack.d.ts.map +1 -0
- package/dist/a11y/focus.d.ts +20 -0
- package/dist/a11y/focus.d.ts.map +1 -0
- package/dist/a11y/index.d.ts +7 -0
- package/dist/a11y/index.d.ts.map +1 -0
- package/dist/a11y/offset.d.ts +9 -0
- package/dist/a11y/offset.d.ts.map +1 -0
- package/dist/a11y/scroll-lock.d.ts +23 -0
- package/dist/a11y/scroll-lock.d.ts.map +1 -0
- package/dist/base/checkbox-control.styles.d.ts +3 -0
- package/dist/base/checkbox-control.styles.d.ts.map +1 -0
- package/dist/base/component-id.d.ts +2 -0
- package/dist/base/component-id.d.ts.map +1 -0
- package/dist/base/form-control.styles.d.ts +3 -0
- package/dist/base/form-control.styles.d.ts.map +1 -0
- package/dist/base/icon.styles.d.ts +3 -0
- package/dist/base/icon.styles.d.ts.map +1 -0
- package/dist/base/markdown.styles.d.ts +3 -0
- package/dist/base/markdown.styles.d.ts.map +1 -0
- package/dist/base/pk-element.d.ts +28 -0
- package/dist/base/pk-element.d.ts.map +1 -0
- package/dist/base/pk-form-associated-element.d.ts +63 -0
- package/dist/base/pk-form-associated-element.d.ts.map +1 -0
- package/dist/base/shadow-reset.styles.d.ts +6 -0
- package/dist/base/shadow-reset.styles.d.ts.map +1 -0
- package/dist/base/styles.d.ts +9 -0
- package/dist/base/styles.d.ts.map +1 -0
- package/dist/chunks/active-elements-BwpXu8Lb.js +16 -0
- package/dist/chunks/active-elements-BwpXu8Lb.js.map +1 -0
- package/dist/chunks/animate-with-class-CsDwYnXL.js +42 -0
- package/dist/chunks/animate-with-class-CsDwYnXL.js.map +1 -0
- package/dist/chunks/autoloader-DzOTQqe6.js +177 -0
- package/dist/chunks/autoloader-DzOTQqe6.js.map +1 -0
- package/dist/chunks/button-group-item.styles-DYmBR28a.js +147 -0
- package/dist/chunks/button-group-item.styles-DYmBR28a.js.map +1 -0
- package/dist/chunks/component-registry-CpZiIDh4.js +130 -0
- package/dist/chunks/component-registry-CpZiIDh4.js.map +1 -0
- package/dist/chunks/control-aria-B2QMq4ji.js +69 -0
- package/dist/chunks/control-aria-B2QMq4ji.js.map +1 -0
- package/dist/chunks/decorate-W02hmVTt.js +149 -0
- package/dist/chunks/decorate-W02hmVTt.js.map +1 -0
- package/dist/chunks/dismissible-stack-XQUMfKO3.js +32 -0
- package/dist/chunks/dismissible-stack-XQUMfKO3.js.map +1 -0
- package/dist/chunks/field-labels-CoU9dnNq.js +14 -0
- package/dist/chunks/field-labels-CoU9dnNq.js.map +1 -0
- package/dist/chunks/focus-aa5dlv8k.js +122 -0
- package/dist/chunks/focus-aa5dlv8k.js.map +1 -0
- package/dist/chunks/form-control.styles-BQdimE5o.js +108 -0
- package/dist/chunks/form-control.styles-BQdimE5o.js.map +1 -0
- package/dist/chunks/has-slot-8BvCt_qo.js +74 -0
- package/dist/chunks/has-slot-8BvCt_qo.js.map +1 -0
- package/dist/chunks/icon.styles-BLTWLqYp.js +21 -0
- package/dist/chunks/icon.styles-BLTWLqYp.js.map +1 -0
- package/dist/chunks/icons-BR8JcQj2.js +52 -0
- package/dist/chunks/icons-BR8JcQj2.js.map +1 -0
- package/dist/chunks/mirror-validator-DCjNYrrx.js +32 -0
- package/dist/chunks/mirror-validator-DCjNYrrx.js.map +1 -0
- package/dist/chunks/overlay-lifecycle-D0pkTQyI.js +44 -0
- package/dist/chunks/overlay-lifecycle-D0pkTQyI.js.map +1 -0
- package/dist/chunks/pk-button-Cilu5WAT.js +840 -0
- package/dist/chunks/pk-button-Cilu5WAT.js.map +1 -0
- package/dist/chunks/pk-button-group-D9hqSfb_.js +422 -0
- package/dist/chunks/pk-button-group-D9hqSfb_.js.map +1 -0
- package/dist/chunks/pk-button-group-separator-DG0CYaqc.js +61 -0
- package/dist/chunks/pk-button-group-separator-DG0CYaqc.js.map +1 -0
- package/dist/chunks/pk-button-group-text-C5z4P7ur.js +49 -0
- package/dist/chunks/pk-button-group-text-C5z4P7ur.js.map +1 -0
- package/dist/chunks/pk-calendar-CcV-La-9.js +1410 -0
- package/dist/chunks/pk-calendar-CcV-La-9.js.map +1 -0
- package/dist/chunks/pk-checkbox-Bavq3-9C.js +360 -0
- package/dist/chunks/pk-checkbox-Bavq3-9C.js.map +1 -0
- package/dist/chunks/pk-checkbox-select-ZEJ6WIQn.js +221 -0
- package/dist/chunks/pk-checkbox-select-ZEJ6WIQn.js.map +1 -0
- package/dist/chunks/pk-clear--mPWZP7H.js +15 -0
- package/dist/chunks/pk-clear--mPWZP7H.js.map +1 -0
- package/dist/chunks/pk-code-editor-DSG6AwLV.js +213 -0
- package/dist/chunks/pk-code-editor-DSG6AwLV.js.map +1 -0
- package/dist/chunks/pk-color-input-D4L0DE5S.js +398 -0
- package/dist/chunks/pk-color-input-D4L0DE5S.js.map +1 -0
- package/dist/chunks/pk-combobox-Dd1ik0Ko.js +2015 -0
- package/dist/chunks/pk-combobox-Dd1ik0Ko.js.map +1 -0
- package/dist/chunks/pk-copy-button-DPh5TOF9.js +139 -0
- package/dist/chunks/pk-copy-button-DPh5TOF9.js.map +1 -0
- package/dist/chunks/pk-date-picker-CkwU4DzD.js +717 -0
- package/dist/chunks/pk-date-picker-CkwU4DzD.js.map +1 -0
- package/dist/chunks/pk-dialog-DZZd1Tzb.js +636 -0
- package/dist/chunks/pk-dialog-DZZd1Tzb.js.map +1 -0
- package/dist/chunks/pk-dropdown-item-BFyjtsL5.js +547 -0
- package/dist/chunks/pk-dropdown-item-BFyjtsL5.js.map +1 -0
- package/dist/chunks/pk-dropdown-label-DfACId-K.js +48 -0
- package/dist/chunks/pk-dropdown-label-DfACId-K.js.map +1 -0
- package/dist/chunks/pk-dropdown-menu-DWlxkDIs.js +735 -0
- package/dist/chunks/pk-dropdown-menu-DWlxkDIs.js.map +1 -0
- package/dist/chunks/pk-editable-table-pBkD6izs.js +1528 -0
- package/dist/chunks/pk-editable-table-pBkD6izs.js.map +1 -0
- package/dist/chunks/pk-field-Buy_AtYF.js +485 -0
- package/dist/chunks/pk-field-Buy_AtYF.js.map +1 -0
- package/dist/chunks/pk-form-associated-element-DmZKgNPL.js +260 -0
- package/dist/chunks/pk-form-associated-element-DmZKgNPL.js.map +1 -0
- package/dist/chunks/pk-input-group-CGHQKrt8.js +238 -0
- package/dist/chunks/pk-input-group-CGHQKrt8.js.map +1 -0
- package/dist/chunks/pk-input-group-addon-DXbNbsfY.js +101 -0
- package/dist/chunks/pk-input-group-addon-DXbNbsfY.js.map +1 -0
- package/dist/chunks/pk-input-group-button-XOfVLqGO.js +55 -0
- package/dist/chunks/pk-input-group-button-XOfVLqGO.js.map +1 -0
- package/dist/chunks/pk-input-group-input-CSmR5vdY.js +136 -0
- package/dist/chunks/pk-input-group-input-CSmR5vdY.js.map +1 -0
- package/dist/chunks/pk-input-group-text-C6ekhtff.js +40 -0
- package/dist/chunks/pk-input-group-text-C6ekhtff.js.map +1 -0
- package/dist/chunks/pk-input-group-textarea-DALr3pdU.js +113 -0
- package/dist/chunks/pk-input-group-textarea-DALr3pdU.js.map +1 -0
- package/dist/chunks/pk-input-naIRPWGC.js +723 -0
- package/dist/chunks/pk-input-naIRPWGC.js.map +1 -0
- package/dist/chunks/pk-lightswitch-B-rLflNq.js +432 -0
- package/dist/chunks/pk-lightswitch-B-rLflNq.js.map +1 -0
- package/dist/chunks/pk-option-C3Zqmu3z.js +312 -0
- package/dist/chunks/pk-option-C3Zqmu3z.js.map +1 -0
- package/dist/chunks/pk-option-group-CbI56A3T.js +72 -0
- package/dist/chunks/pk-option-group-CbI56A3T.js.map +1 -0
- package/dist/chunks/pk-popover-XZZdJ4WI.js +377 -0
- package/dist/chunks/pk-popover-XZZdJ4WI.js.map +1 -0
- package/dist/chunks/pk-popup-CgiXok-U.js +538 -0
- package/dist/chunks/pk-popup-CgiXok-U.js.map +1 -0
- package/dist/chunks/pk-radio-Bg02ckzC.js +233 -0
- package/dist/chunks/pk-radio-Bg02ckzC.js.map +1 -0
- package/dist/chunks/pk-radio-group-B5rps9G4.js +253 -0
- package/dist/chunks/pk-radio-group-B5rps9G4.js.map +1 -0
- package/dist/chunks/pk-scroll-area-B0V4Dr2j.js +402 -0
- package/dist/chunks/pk-scroll-area-B0V4Dr2j.js.map +1 -0
- package/dist/chunks/pk-select-B17rV6BR.js +1129 -0
- package/dist/chunks/pk-select-B17rV6BR.js.map +1 -0
- package/dist/chunks/pk-separator-CLb9n0FK.js +89 -0
- package/dist/chunks/pk-separator-CLb9n0FK.js.map +1 -0
- package/dist/chunks/pk-spinner-Blxd3SIH.js +148 -0
- package/dist/chunks/pk-spinner-Blxd3SIH.js.map +1 -0
- package/dist/chunks/pk-status-7_5dEuw-.js +92 -0
- package/dist/chunks/pk-status-7_5dEuw-.js.map +1 -0
- package/dist/chunks/pk-tab-CzV7pOdp.js +259 -0
- package/dist/chunks/pk-tab-CzV7pOdp.js.map +1 -0
- package/dist/chunks/pk-tab-heading-BWAB85ua.js +50 -0
- package/dist/chunks/pk-tab-heading-BWAB85ua.js.map +1 -0
- package/dist/chunks/pk-tab-panel-Q3Pqyq-f.js +86 -0
- package/dist/chunks/pk-tab-panel-Q3Pqyq-f.js.map +1 -0
- package/dist/chunks/pk-tabs-Cip4nbb7.js +622 -0
- package/dist/chunks/pk-tabs-Cip4nbb7.js.map +1 -0
- package/dist/chunks/pk-textarea-BEapC8Rk.js +342 -0
- package/dist/chunks/pk-textarea-BEapC8Rk.js.map +1 -0
- package/dist/chunks/pk-time-picker-DbW_hMs2.js +228 -0
- package/dist/chunks/pk-time-picker-DbW_hMs2.js.map +1 -0
- package/dist/chunks/pk-tiptap-content-DAtNbJYC.js +76 -0
- package/dist/chunks/pk-tiptap-content-DAtNbJYC.js.map +1 -0
- package/dist/chunks/pk-tiptap-editor-umIuEaXh.js +1084 -0
- package/dist/chunks/pk-tiptap-editor-umIuEaXh.js.map +1 -0
- package/dist/chunks/pk-tiptap-input-CXcYXbRa.js +250 -0
- package/dist/chunks/pk-tiptap-input-CXcYXbRa.js.map +1 -0
- package/dist/chunks/pk-toggle-5-GKVLye.js +256 -0
- package/dist/chunks/pk-toggle-5-GKVLye.js.map +1 -0
- package/dist/chunks/pk-toggle-group-CWDwYlgR.js +175 -0
- package/dist/chunks/pk-toggle-group-CWDwYlgR.js.map +1 -0
- package/dist/chunks/pk-tooltip-fcUbVGli.js +469 -0
- package/dist/chunks/pk-tooltip-fcUbVGli.js.map +1 -0
- package/dist/chunks/popup-content-animation.styles-Dc6d9quJ.js +117 -0
- package/dist/chunks/popup-content-animation.styles-Dc6d9quJ.js.map +1 -0
- package/dist/chunks/popup-placement-animation-WlEXnS85.js +60 -0
- package/dist/chunks/popup-placement-animation-WlEXnS85.js.map +1 -0
- package/dist/chunks/popup-pointer-C8lypj8V.js +21 -0
- package/dist/chunks/popup-pointer-C8lypj8V.js.map +1 -0
- package/dist/chunks/register-components-DNw6EYNo.js +15 -0
- package/dist/chunks/register-components-DNw6EYNo.js.map +1 -0
- package/dist/chunks/render-Dvc3MHQR.js +16 -0
- package/dist/chunks/render-Dvc3MHQR.js.map +1 -0
- package/dist/chunks/required-validator-CEg8dvjS.js +29 -0
- package/dist/chunks/required-validator-CEg8dvjS.js.map +1 -0
- package/dist/chunks/scroll-lock-B4o9vdzJ.js +193 -0
- package/dist/chunks/scroll-lock-B4o9vdzJ.js.map +1 -0
- package/dist/chunks/spinner-utils-CDfHypTv.js +15 -0
- package/dist/chunks/spinner-utils-CDfHypTv.js.map +1 -0
- package/dist/chunks/supports-popover-CUBsbHpS.js +7 -0
- package/dist/chunks/supports-popover-CUBsbHpS.js.map +1 -0
- package/dist/chunks/sync-listbox-separators-B1-V0oJi.js +149 -0
- package/dist/chunks/sync-listbox-separators-B1-V0oJi.js.map +1 -0
- package/dist/chunks/tiptap.styles-BytOpP0H.js +463 -0
- package/dist/chunks/tiptap.styles-BytOpP0H.js.map +1 -0
- package/dist/component-registry.d.ts +28 -0
- package/dist/component-registry.d.ts.map +1 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/pk-button.d.ts +91 -0
- package/dist/components/button/pk-button.d.ts.map +1 -0
- package/dist/components/button/pk-button.js +2 -0
- package/dist/components/button/pk-button.styles.d.ts +2 -0
- package/dist/components/button/pk-button.styles.d.ts.map +1 -0
- package/dist/components/button-group/button-group-item.styles.d.ts +13 -0
- package/dist/components/button-group/button-group-item.styles.d.ts.map +1 -0
- package/dist/components/button-group/index.d.ts +4 -0
- package/dist/components/button-group/index.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group-separator.d.ts +18 -0
- package/dist/components/button-group/pk-button-group-separator.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group-separator.js +2 -0
- package/dist/components/button-group/pk-button-group-separator.styles.d.ts +2 -0
- package/dist/components/button-group/pk-button-group-separator.styles.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group-text.d.ts +18 -0
- package/dist/components/button-group/pk-button-group-text.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group-text.js +2 -0
- package/dist/components/button-group/pk-button-group-text.styles.d.ts +2 -0
- package/dist/components/button-group/pk-button-group-text.styles.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group.d.ts +40 -0
- package/dist/components/button-group/pk-button-group.d.ts.map +1 -0
- package/dist/components/button-group/pk-button-group.js +2 -0
- package/dist/components/button-group/pk-button-group.styles.d.ts +2 -0
- package/dist/components/button-group/pk-button-group.styles.d.ts.map +1 -0
- package/dist/components/button-group.d.ts +2 -0
- package/dist/components/button-group.js +4 -0
- package/dist/components/button.d.ts +2 -0
- package/dist/components/button.js +2 -0
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/calendar/pk-calendar.d.ts +117 -0
- package/dist/components/calendar/pk-calendar.d.ts.map +1 -0
- package/dist/components/calendar/pk-calendar.js +2 -0
- package/dist/components/calendar/pk-calendar.styles.d.ts +2 -0
- package/dist/components/calendar/pk-calendar.styles.d.ts.map +1 -0
- package/dist/components/calendar.d.ts +2 -0
- package/dist/components/calendar.js +2 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/pk-checkbox.d.ts +50 -0
- package/dist/components/checkbox/pk-checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/pk-checkbox.js +2 -0
- package/dist/components/checkbox/pk-checkbox.styles.d.ts +2 -0
- package/dist/components/checkbox/pk-checkbox.styles.d.ts.map +1 -0
- package/dist/components/checkbox-select/index.d.ts +2 -0
- package/dist/components/checkbox-select/index.d.ts.map +1 -0
- package/dist/components/checkbox-select/pk-checkbox-select.d.ts +48 -0
- package/dist/components/checkbox-select/pk-checkbox-select.d.ts.map +1 -0
- package/dist/components/checkbox-select/pk-checkbox-select.js +2 -0
- package/dist/components/checkbox-select/pk-checkbox-select.styles.d.ts +2 -0
- package/dist/components/checkbox-select/pk-checkbox-select.styles.d.ts.map +1 -0
- package/dist/components/checkbox-select.d.ts +2 -0
- package/dist/components/checkbox-select.js +2 -0
- package/dist/components/checkbox.d.ts +2 -0
- package/dist/components/checkbox.js +2 -0
- package/dist/components/code-editor/index.d.ts +2 -0
- package/dist/components/code-editor/index.d.ts.map +1 -0
- package/dist/components/code-editor/pk-code-editor.d.ts +40 -0
- package/dist/components/code-editor/pk-code-editor.d.ts.map +1 -0
- package/dist/components/code-editor/pk-code-editor.js +2 -0
- package/dist/components/code-editor/pk-code-editor.styles.d.ts +2 -0
- package/dist/components/code-editor/pk-code-editor.styles.d.ts.map +1 -0
- package/dist/components/code-editor.d.ts +2 -0
- package/dist/components/code-editor.js +2 -0
- package/dist/components/color-input/index.d.ts +2 -0
- package/dist/components/color-input/index.d.ts.map +1 -0
- package/dist/components/color-input/pk-color-input.d.ts +41 -0
- package/dist/components/color-input/pk-color-input.d.ts.map +1 -0
- package/dist/components/color-input/pk-color-input.js +2 -0
- package/dist/components/color-input/pk-color-input.styles.d.ts +7 -0
- package/dist/components/color-input/pk-color-input.styles.d.ts.map +1 -0
- package/dist/components/color-input.d.ts +2 -0
- package/dist/components/color-input.js +2 -0
- package/dist/components/combobox/index.d.ts +2 -0
- package/dist/components/combobox/index.d.ts.map +1 -0
- package/dist/components/combobox/pk-combobox.d.ts +219 -0
- package/dist/components/combobox/pk-combobox.d.ts.map +1 -0
- package/dist/components/combobox/pk-combobox.js +2 -0
- package/dist/components/combobox/pk-combobox.styles.d.ts +2 -0
- package/dist/components/combobox/pk-combobox.styles.d.ts.map +1 -0
- package/dist/components/combobox.d.ts +2 -0
- package/dist/components/combobox.js +2 -0
- package/dist/components/copy-button/index.d.ts +2 -0
- package/dist/components/copy-button/index.d.ts.map +1 -0
- package/dist/components/copy-button/pk-copy-button.d.ts +37 -0
- package/dist/components/copy-button/pk-copy-button.d.ts.map +1 -0
- package/dist/components/copy-button/pk-copy-button.js +2 -0
- package/dist/components/copy-button/pk-copy-button.styles.d.ts +2 -0
- package/dist/components/copy-button/pk-copy-button.styles.d.ts.map +1 -0
- package/dist/components/copy-button.d.ts +2 -0
- package/dist/components/copy-button.js +2 -0
- package/dist/components/date-picker/index.d.ts +3 -0
- package/dist/components/date-picker/index.d.ts.map +1 -0
- package/dist/components/date-picker/pk-date-picker.d.ts +107 -0
- package/dist/components/date-picker/pk-date-picker.d.ts.map +1 -0
- package/dist/components/date-picker/pk-date-picker.js +2 -0
- package/dist/components/date-picker/pk-date-picker.styles.d.ts +2 -0
- package/dist/components/date-picker/pk-date-picker.styles.d.ts.map +1 -0
- package/dist/components/date-picker.d.ts +2 -0
- package/dist/components/date-picker.js +2 -0
- package/dist/components/dialog/index.d.ts +2 -0
- package/dist/components/dialog/index.d.ts.map +1 -0
- package/dist/components/dialog/pk-dialog.d.ts +87 -0
- package/dist/components/dialog/pk-dialog.d.ts.map +1 -0
- package/dist/components/dialog/pk-dialog.js +2 -0
- package/dist/components/dialog/pk-dialog.styles.d.ts +2 -0
- package/dist/components/dialog/pk-dialog.styles.d.ts.map +1 -0
- package/dist/components/dialog.d.ts +2 -0
- package/dist/components/dialog.js +2 -0
- package/dist/components/dropdown-menu/dropdown-menu-size.styles.d.ts +11 -0
- package/dist/components/dropdown-menu/dropdown-menu-size.styles.d.ts.map +1 -0
- package/dist/components/dropdown-menu/index.d.ts +5 -0
- package/dist/components/dropdown-menu/index.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.d.ts +67 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.js +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.styles.d.ts +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-item.styles.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.d.ts +13 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.js +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.styles.d.ts +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-label.styles.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.d.ts +130 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.js +2 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.styles.d.ts +6 -0
- package/dist/components/dropdown-menu/pk-dropdown-menu.styles.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-separator.d.ts +13 -0
- package/dist/components/dropdown-menu/pk-dropdown-separator.d.ts.map +1 -0
- package/dist/components/dropdown-menu/pk-dropdown-separator.js +36 -0
- package/dist/components/dropdown-menu/pk-dropdown-separator.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +2 -0
- package/dist/components/dropdown-menu.js +5 -0
- package/dist/components/editable-table/editable-table-dnd.d.ts +64 -0
- package/dist/components/editable-table/editable-table-dnd.d.ts.map +1 -0
- package/dist/components/editable-table/editable-table-model.d.ts +93 -0
- package/dist/components/editable-table/editable-table-model.d.ts.map +1 -0
- package/dist/components/editable-table/index.d.ts +3 -0
- package/dist/components/editable-table/index.d.ts.map +1 -0
- package/dist/components/editable-table/pk-editable-table.d.ts +122 -0
- package/dist/components/editable-table/pk-editable-table.d.ts.map +1 -0
- package/dist/components/editable-table/pk-editable-table.js +2 -0
- package/dist/components/editable-table/pk-editable-table.styles.d.ts +2 -0
- package/dist/components/editable-table/pk-editable-table.styles.d.ts.map +1 -0
- package/dist/components/editable-table.d.ts +2 -0
- package/dist/components/editable-table.js +2 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/field/index.d.ts.map +1 -0
- package/dist/components/field/pk-field.d.ts +69 -0
- package/dist/components/field/pk-field.d.ts.map +1 -0
- package/dist/components/field/pk-field.js +2 -0
- package/dist/components/field/pk-field.styles.d.ts +2 -0
- package/dist/components/field/pk-field.styles.d.ts.map +1 -0
- package/dist/components/field.d.ts +2 -0
- package/dist/components/field.js +2 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/index.d.ts.map +1 -0
- package/dist/components/icon/pk-icon-loader.d.ts +1 -0
- package/dist/components/icon/pk-icon-loader.d.ts.map +1 -0
- package/dist/components/icon/pk-icon.d.ts +46 -0
- package/dist/components/icon/pk-icon.d.ts.map +1 -0
- package/dist/components/icon/pk-icon.js +47 -0
- package/dist/components/icon/pk-icon.js.map +1 -0
- package/dist/components/icon.d.ts +2 -0
- package/dist/components/icon.js +2 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/pk-input.d.ts +83 -0
- package/dist/components/input/pk-input.d.ts.map +1 -0
- package/dist/components/input/pk-input.js +2 -0
- package/dist/components/input/pk-input.styles.d.ts +2 -0
- package/dist/components/input/pk-input.styles.d.ts.map +1 -0
- package/dist/components/input-group/index.d.ts +10 -0
- package/dist/components/input-group/index.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-addon.d.ts +23 -0
- package/dist/components/input-group/pk-input-group-addon.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-addon.js +2 -0
- package/dist/components/input-group/pk-input-group-addon.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-addon.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-button.d.ts +22 -0
- package/dist/components/input-group/pk-input-group-button.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-button.js +2 -0
- package/dist/components/input-group/pk-input-group-button.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-button.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-input.d.ts +28 -0
- package/dist/components/input-group/pk-input-group-input.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-input.js +2 -0
- package/dist/components/input-group/pk-input-group-input.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-input.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-text.d.ts +18 -0
- package/dist/components/input-group/pk-input-group-text.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-text.js +2 -0
- package/dist/components/input-group/pk-input-group-text.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-text.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-textarea.d.ts +25 -0
- package/dist/components/input-group/pk-input-group-textarea.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group-textarea.js +2 -0
- package/dist/components/input-group/pk-input-group-textarea.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group-textarea.styles.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group.d.ts +39 -0
- package/dist/components/input-group/pk-input-group.d.ts.map +1 -0
- package/dist/components/input-group/pk-input-group.js +2 -0
- package/dist/components/input-group/pk-input-group.styles.d.ts +2 -0
- package/dist/components/input-group/pk-input-group.styles.d.ts.map +1 -0
- package/dist/components/input-group.d.ts +2 -0
- package/dist/components/input-group.js +7 -0
- package/dist/components/input.d.ts +2 -0
- package/dist/components/input.js +2 -0
- package/dist/components/lightswitch/index.d.ts +2 -0
- package/dist/components/lightswitch/index.d.ts.map +1 -0
- package/dist/components/lightswitch/pk-lightswitch.d.ts +54 -0
- package/dist/components/lightswitch/pk-lightswitch.d.ts.map +1 -0
- package/dist/components/lightswitch/pk-lightswitch.js +2 -0
- package/dist/components/lightswitch/pk-lightswitch.styles.d.ts +2 -0
- package/dist/components/lightswitch/pk-lightswitch.styles.d.ts.map +1 -0
- package/dist/components/lightswitch.d.ts +2 -0
- package/dist/components/lightswitch.js +2 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.d.ts.map +1 -0
- package/dist/components/popover/pk-popover.d.ts +90 -0
- package/dist/components/popover/pk-popover.d.ts.map +1 -0
- package/dist/components/popover/pk-popover.js +2 -0
- package/dist/components/popover/pk-popover.styles.d.ts +2 -0
- package/dist/components/popover/pk-popover.styles.d.ts.map +1 -0
- package/dist/components/popover.d.ts +2 -0
- package/dist/components/popover.js +2 -0
- package/dist/components/popup/index.d.ts +2 -0
- package/dist/components/popup/index.d.ts.map +1 -0
- package/dist/components/popup/pk-popup.d.ts +96 -0
- package/dist/components/popup/pk-popup.d.ts.map +1 -0
- package/dist/components/popup/pk-popup.js +2 -0
- package/dist/components/popup/pk-popup.styles.d.ts +2 -0
- package/dist/components/popup/pk-popup.styles.d.ts.map +1 -0
- package/dist/components/popup.d.ts +2 -0
- package/dist/components/popup.js +2 -0
- package/dist/components/radio-group/index.d.ts +3 -0
- package/dist/components/radio-group/index.d.ts.map +1 -0
- package/dist/components/radio-group/pk-radio-group.d.ts +58 -0
- package/dist/components/radio-group/pk-radio-group.d.ts.map +1 -0
- package/dist/components/radio-group/pk-radio-group.js +2 -0
- package/dist/components/radio-group/pk-radio-group.styles.d.ts +2 -0
- package/dist/components/radio-group/pk-radio-group.styles.d.ts.map +1 -0
- package/dist/components/radio-group/pk-radio.d.ts +37 -0
- package/dist/components/radio-group/pk-radio.d.ts.map +1 -0
- package/dist/components/radio-group/pk-radio.js +2 -0
- package/dist/components/radio-group/pk-radio.styles.d.ts +2 -0
- package/dist/components/radio-group/pk-radio.styles.d.ts.map +1 -0
- package/dist/components/radio-group.d.ts +2 -0
- package/dist/components/radio-group.js +3 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.d.ts.map +1 -0
- package/dist/components/scroll-area/pk-scroll-area.d.ts +53 -0
- package/dist/components/scroll-area/pk-scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area/pk-scroll-area.js +2 -0
- package/dist/components/scroll-area/pk-scroll-area.styles.d.ts +2 -0
- package/dist/components/scroll-area/pk-scroll-area.styles.d.ts.map +1 -0
- package/dist/components/scroll-area.d.ts +2 -0
- package/dist/components/scroll-area.js +2 -0
- package/dist/components/select/index.d.ts +4 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/select/pk-option-group.d.ts +22 -0
- package/dist/components/select/pk-option-group.d.ts.map +1 -0
- package/dist/components/select/pk-option-group.js +2 -0
- package/dist/components/select/pk-option-group.styles.d.ts +2 -0
- package/dist/components/select/pk-option-group.styles.d.ts.map +1 -0
- package/dist/components/select/pk-option.d.ts +55 -0
- package/dist/components/select/pk-option.d.ts.map +1 -0
- package/dist/components/select/pk-option.js +2 -0
- package/dist/components/select/pk-option.styles.d.ts +2 -0
- package/dist/components/select/pk-option.styles.d.ts.map +1 -0
- package/dist/components/select/pk-select.d.ts +132 -0
- package/dist/components/select/pk-select.d.ts.map +1 -0
- package/dist/components/select/pk-select.js +2 -0
- package/dist/components/select/pk-select.styles.d.ts +2 -0
- package/dist/components/select/pk-select.styles.d.ts.map +1 -0
- package/dist/components/select.d.ts +2 -0
- package/dist/components/select.js +4 -0
- package/dist/components/separator/index.d.ts +2 -0
- package/dist/components/separator/index.d.ts.map +1 -0
- package/dist/components/separator/pk-separator.d.ts +25 -0
- package/dist/components/separator/pk-separator.d.ts.map +1 -0
- package/dist/components/separator/pk-separator.js +2 -0
- package/dist/components/separator/pk-separator.styles.d.ts +9 -0
- package/dist/components/separator/pk-separator.styles.d.ts.map +1 -0
- package/dist/components/separator.d.ts +2 -0
- package/dist/components/separator.js +2 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/components/spinner/pk-spinner.d.ts +23 -0
- package/dist/components/spinner/pk-spinner.d.ts.map +1 -0
- package/dist/components/spinner/pk-spinner.js +2 -0
- package/dist/components/spinner/pk-spinner.styles.d.ts +2 -0
- package/dist/components/spinner/pk-spinner.styles.d.ts.map +1 -0
- package/dist/components/spinner/spinner-utils.d.ts +7 -0
- package/dist/components/spinner/spinner-utils.d.ts.map +1 -0
- package/dist/components/spinner.d.ts +2 -0
- package/dist/components/spinner.js +3 -0
- package/dist/components/status/index.d.ts +2 -0
- package/dist/components/status/index.d.ts.map +1 -0
- package/dist/components/status/pk-status.d.ts +19 -0
- package/dist/components/status/pk-status.d.ts.map +1 -0
- package/dist/components/status/pk-status.js +2 -0
- package/dist/components/status/pk-status.styles.d.ts +2 -0
- package/dist/components/status/pk-status.styles.d.ts.map +1 -0
- package/dist/components/status.d.ts +2 -0
- package/dist/components/status.js +2 -0
- package/dist/components/tabs/index.d.ts +5 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-base.d.ts +14 -0
- package/dist/components/tabs/pk-tab-base.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-heading.d.ts +20 -0
- package/dist/components/tabs/pk-tab-heading.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-heading.js +2 -0
- package/dist/components/tabs/pk-tab-heading.styles.d.ts +2 -0
- package/dist/components/tabs/pk-tab-heading.styles.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-panel-base.d.ts +9 -0
- package/dist/components/tabs/pk-tab-panel-base.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-panel.d.ts +18 -0
- package/dist/components/tabs/pk-tab-panel.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab-panel.js +2 -0
- package/dist/components/tabs/pk-tab-panel.styles.d.ts +2 -0
- package/dist/components/tabs/pk-tab-panel.styles.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab.d.ts +23 -0
- package/dist/components/tabs/pk-tab.d.ts.map +1 -0
- package/dist/components/tabs/pk-tab.js +2 -0
- package/dist/components/tabs/pk-tab.styles.d.ts +2 -0
- package/dist/components/tabs/pk-tab.styles.d.ts.map +1 -0
- package/dist/components/tabs/pk-tabs.d.ts +67 -0
- package/dist/components/tabs/pk-tabs.d.ts.map +1 -0
- package/dist/components/tabs/pk-tabs.js +2 -0
- package/dist/components/tabs/pk-tabs.styles.d.ts +6 -0
- package/dist/components/tabs/pk-tabs.styles.d.ts.map +1 -0
- package/dist/components/tabs.d.ts +2 -0
- package/dist/components/tabs.js +5 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/index.d.ts.map +1 -0
- package/dist/components/textarea/pk-textarea.d.ts +60 -0
- package/dist/components/textarea/pk-textarea.d.ts.map +1 -0
- package/dist/components/textarea/pk-textarea.js +2 -0
- package/dist/components/textarea/pk-textarea.styles.d.ts +2 -0
- package/dist/components/textarea/pk-textarea.styles.d.ts.map +1 -0
- package/dist/components/textarea.d.ts +2 -0
- package/dist/components/textarea.js +2 -0
- package/dist/components/time-picker/index.d.ts +2 -0
- package/dist/components/time-picker/index.d.ts.map +1 -0
- package/dist/components/time-picker/pk-time-picker.d.ts +25 -0
- package/dist/components/time-picker/pk-time-picker.d.ts.map +1 -0
- package/dist/components/time-picker/pk-time-picker.js +2 -0
- package/dist/components/time-picker/pk-time-picker.styles.d.ts +2 -0
- package/dist/components/time-picker/pk-time-picker.styles.d.ts.map +1 -0
- package/dist/components/time-picker.d.ts +2 -0
- package/dist/components/time-picker.js +2 -0
- package/dist/components/tiptap/index.d.ts +4 -0
- package/dist/components/tiptap/index.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-content.d.ts +25 -0
- package/dist/components/tiptap/pk-tiptap-content.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-content.js +2 -0
- package/dist/components/tiptap/pk-tiptap-content.styles.d.ts +2 -0
- package/dist/components/tiptap/pk-tiptap-content.styles.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-editor.d.ts +123 -0
- package/dist/components/tiptap/pk-tiptap-editor.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-editor.js +2 -0
- package/dist/components/tiptap/pk-tiptap-editor.styles.d.ts +2 -0
- package/dist/components/tiptap/pk-tiptap-editor.styles.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-input.d.ts +54 -0
- package/dist/components/tiptap/pk-tiptap-input.d.ts.map +1 -0
- package/dist/components/tiptap/pk-tiptap-input.js +2 -0
- package/dist/components/tiptap/pk-tiptap-input.styles.d.ts +2 -0
- package/dist/components/tiptap/pk-tiptap-input.styles.d.ts.map +1 -0
- package/dist/components/tiptap/tiptap-editor-host.d.ts +28 -0
- package/dist/components/tiptap/tiptap-editor-host.d.ts.map +1 -0
- package/dist/components/tiptap/tiptap-toolbar.d.ts +7 -0
- package/dist/components/tiptap/tiptap-toolbar.d.ts.map +1 -0
- package/dist/components/tiptap/tiptap-utils.d.ts +13 -0
- package/dist/components/tiptap/tiptap-utils.d.ts.map +1 -0
- package/dist/components/tiptap/tiptap.styles.d.ts +12 -0
- package/dist/components/tiptap/tiptap.styles.d.ts.map +1 -0
- package/dist/components/tiptap/variable-tag-node-view.d.ts +17 -0
- package/dist/components/tiptap/variable-tag-node-view.d.ts.map +1 -0
- package/dist/components/tiptap-content.d.ts +2 -0
- package/dist/components/tiptap-content.js +2 -0
- package/dist/components/tiptap-editor.d.ts +2 -0
- package/dist/components/tiptap-editor.js +2 -0
- package/dist/components/tiptap-input.d.ts +2 -0
- package/dist/components/tiptap-input.js +2 -0
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle/index.d.ts.map +1 -0
- package/dist/components/toggle/pk-toggle.d.ts +28 -0
- package/dist/components/toggle/pk-toggle.d.ts.map +1 -0
- package/dist/components/toggle/pk-toggle.js +2 -0
- package/dist/components/toggle/pk-toggle.styles.d.ts +2 -0
- package/dist/components/toggle/pk-toggle.styles.d.ts.map +1 -0
- package/dist/components/toggle-group/index.d.ts +2 -0
- package/dist/components/toggle-group/index.d.ts.map +1 -0
- package/dist/components/toggle-group/pk-toggle-group.d.ts +43 -0
- package/dist/components/toggle-group/pk-toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group/pk-toggle-group.js +2 -0
- package/dist/components/toggle-group/pk-toggle-group.styles.d.ts +2 -0
- package/dist/components/toggle-group/pk-toggle-group.styles.d.ts.map +1 -0
- package/dist/components/toggle-group.d.ts +2 -0
- package/dist/components/toggle-group.js +2 -0
- package/dist/components/toggle.d.ts +2 -0
- package/dist/components/toggle.js +2 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/pk-tooltip.d.ts +73 -0
- package/dist/components/tooltip/pk-tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/pk-tooltip.js +2 -0
- package/dist/components/tooltip/pk-tooltip.styles.d.ts +2 -0
- package/dist/components/tooltip/pk-tooltip.styles.d.ts.map +1 -0
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.js +2 -0
- package/dist/create-register-components.d.ts +7 -0
- package/dist/create-register-components.d.ts.map +1 -0
- package/dist/events/overlay-lifecycle.d.ts +27 -0
- package/dist/events/overlay-lifecycle.d.ts.map +1 -0
- package/dist/events/pk-clear.d.ts +10 -0
- package/dist/events/pk-clear.d.ts.map +1 -0
- package/dist/events/pk-copy.d.ts +18 -0
- package/dist/events/pk-copy.d.ts.map +1 -0
- package/dist/events/pk-create.d.ts +11 -0
- package/dist/events/pk-create.d.ts.map +1 -0
- package/dist/events/pk-invalid.d.ts +10 -0
- package/dist/events/pk-invalid.d.ts.map +1 -0
- package/dist/events/pk-reposition.d.ts +10 -0
- package/dist/events/pk-reposition.d.ts.map +1 -0
- package/dist/icons/checkbox-indicators.d.ts +6 -0
- package/dist/icons/checkbox-indicators.d.ts.map +1 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +4 -0
- package/dist/icons/render.d.ts +7 -0
- package/dist/icons/render.d.ts.map +1 -0
- package/dist/icons/translation-icon.d.ts +2 -0
- package/dist/icons/translation-icon.d.ts.map +1 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +218 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/control-aria.d.ts +31 -0
- package/dist/internal/control-aria.d.ts.map +1 -0
- package/dist/internal/field-aria.d.ts +19 -0
- package/dist/internal/field-aria.d.ts.map +1 -0
- package/dist/internal/field-labels.d.ts +5 -0
- package/dist/internal/field-labels.d.ts.map +1 -0
- package/dist/internal/has-slot.d.ts +30 -0
- package/dist/internal/has-slot.d.ts.map +1 -0
- package/dist/internal/implicit-form-submit.d.ts +15 -0
- package/dist/internal/implicit-form-submit.d.ts.map +1 -0
- package/dist/internal/resolve-element-by-id.d.ts +3 -0
- package/dist/internal/resolve-element-by-id.d.ts.map +1 -0
- package/dist/internal/sync-listbox-separators.d.ts +3 -0
- package/dist/internal/sync-listbox-separators.d.ts.map +1 -0
- package/dist/plugin-kit.css +583 -0
- package/dist/plugin-kit.d.ts +9 -0
- package/dist/plugin-kit.d.ts.map +1 -0
- package/dist/plugin-kit.js +267 -0
- package/dist/plugin-kit.js.map +1 -0
- package/dist/plugin-kit.loader.d.ts +2 -0
- package/dist/plugin-kit.loader.d.ts.map +1 -0
- package/dist/register-components.d.ts +3 -0
- package/dist/register-components.d.ts.map +1 -0
- package/dist/register-components.js +2 -0
- package/dist/register-pk.generated.d.ts +103 -0
- package/dist/register-pk.generated.d.ts.map +1 -0
- package/dist/register.d.ts +85 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +146 -0
- package/dist/register.js.map +1 -0
- package/dist/styles/overlay-content.css +64 -0
- package/dist/styles/popup-content-animation.styles.d.ts +9 -0
- package/dist/styles/popup-content-animation.styles.d.ts.map +1 -0
- package/dist/tokens.css +408 -0
- package/dist/utilities/autoloader.d.ts +8 -0
- package/dist/utilities/autoloader.d.ts.map +1 -0
- package/dist/utilities/base-path.d.ts +3 -0
- package/dist/utilities/base-path.d.ts.map +1 -0
- package/dist/utilities/defined.d.ts +17 -0
- package/dist/utilities/defined.d.ts.map +1 -0
- package/dist/utilities/fouce-strategy.d.ts +43 -0
- package/dist/utilities/fouce-strategy.d.ts.map +1 -0
- package/dist/utilities/fouce.css +108 -0
- package/dist/utils/animate-with-class.d.ts +7 -0
- package/dist/utils/animate-with-class.d.ts.map +1 -0
- package/dist/utils/config.d.ts +15 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/copy-to-clipboard.d.ts +5 -0
- package/dist/utils/copy-to-clipboard.d.ts.map +1 -0
- package/dist/utils/craft-host-modal.d.ts +19 -0
- package/dist/utils/craft-host-modal.d.ts.map +1 -0
- package/dist/utils/date-matchers.d.ts +29 -0
- package/dist/utils/date-matchers.d.ts.map +1 -0
- package/dist/utils/date.d.ts +23 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/documentScrollStability.d.ts +11 -0
- package/dist/utils/documentScrollStability.d.ts.map +1 -0
- package/dist/utils/floating-ui.d.ts +14 -0
- package/dist/utils/floating-ui.d.ts.map +1 -0
- package/dist/utils/highlight-text.d.ts +7 -0
- package/dist/utils/highlight-text.d.ts.map +1 -0
- package/dist/utils/host-date.d.ts +8 -0
- package/dist/utils/host-date.d.ts.map +1 -0
- package/dist/utils/inline-markdown.d.ts +6 -0
- package/dist/utils/inline-markdown.d.ts.map +1 -0
- package/dist/utils/listbox-keyboard.d.ts +25 -0
- package/dist/utils/listbox-keyboard.d.ts.map +1 -0
- package/dist/utils/menu-keyboard.d.ts +15 -0
- package/dist/utils/menu-keyboard.d.ts.map +1 -0
- package/dist/utils/mount-shadow-app.d.ts +31 -0
- package/dist/utils/mount-shadow-app.d.ts.map +1 -0
- package/dist/utils/overlay-recovery.d.ts +39 -0
- package/dist/utils/overlay-recovery.d.ts.map +1 -0
- package/dist/utils/popup-placement-animation.d.ts +26 -0
- package/dist/utils/popup-placement-animation.d.ts.map +1 -0
- package/dist/utils/popup-pointer.d.ts +15 -0
- package/dist/utils/popup-pointer.d.ts.map +1 -0
- package/dist/utils/portal.d.ts +16 -0
- package/dist/utils/portal.d.ts.map +1 -0
- package/dist/utils/supports-popover.d.ts +3 -0
- package/dist/utils/supports-popover.d.ts.map +1 -0
- package/dist/utils/time-options.d.ts +16 -0
- package/dist/utils/time-options.d.ts.map +1 -0
- package/dist/utils/top-layer.d.ts +34 -0
- package/dist/utils/top-layer.d.ts.map +1 -0
- package/dist/utils/week-info.d.ts +14 -0
- package/dist/utils/week-info.d.ts.map +1 -0
- package/dist/validators/custom-error-validator.d.ts +3 -0
- package/dist/validators/custom-error-validator.d.ts.map +1 -0
- package/dist/validators/index.d.ts +6 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/mirror-validator.d.ts +4 -0
- package/dist/validators/mirror-validator.d.ts.map +1 -0
- package/dist/validators/required-validator.d.ts +7 -0
- package/dist/validators/required-validator.d.ts.map +1 -0
- package/dist/validators/types.d.ts +12 -0
- package/dist/validators/types.d.ts.map +1 -0
- package/dist-loader/chunks/animate-with-class-DT0jwaR_.js +40 -0
- package/dist-loader/chunks/button-group-item.styles-Dwakbyx5.js +145 -0
- package/dist-loader/chunks/codemirror-CSgOT0QM.js +23675 -0
- package/dist-loader/chunks/field-labels-D3lKQ2nq.js +12 -0
- package/dist-loader/chunks/floating-ui-87vslRWW.js +1220 -0
- package/dist-loader/chunks/has-slot-BGJeJdHr.js +72 -0
- package/dist-loader/chunks/icons-B1i-oRoD.js +429 -0
- package/dist-loader/chunks/lit-Dnn7gEi2.js +891 -0
- package/dist-loader/chunks/mirror-validator-C5XrXPaq.js +30 -0
- package/dist-loader/chunks/overlay-lifecycle-C3tSQ3UR.js +42 -0
- package/dist-loader/chunks/pk-a11y-Cx5RZvhu.js +274 -0
- package/dist-loader/chunks/pk-base-BlxAYXJD.js +705 -0
- package/dist-loader/chunks/pk-button-BlSs4e6V.js +846 -0
- package/dist-loader/chunks/pk-calendar-RXCDDhLI.js +1403 -0
- package/dist-loader/chunks/pk-checkbox-hJCj8In8.js +273 -0
- package/dist-loader/chunks/pk-clear-BMZUzwDt.js +13 -0
- package/dist-loader/chunks/pk-color-input-BfNtLznP.js +393 -0
- package/dist-loader/chunks/pk-combobox-1PJBcIrV.js +2006 -0
- package/dist-loader/chunks/pk-date-picker-D4vCtbw-.js +708 -0
- package/dist-loader/chunks/pk-dialog-D1RZjwQN.js +630 -0
- package/dist-loader/chunks/pk-dropdown-item-BJIhQ0Mw.js +543 -0
- package/dist-loader/chunks/pk-dropdown-menu-I1s3TBiA.js +731 -0
- package/dist-loader/chunks/pk-field-BnKPT_Kk.js +5842 -0
- package/dist-loader/chunks/pk-input-Oarjv7Vc.js +715 -0
- package/dist-loader/chunks/pk-lightswitch-D-UrNM3y.js +427 -0
- package/dist-loader/chunks/pk-option-CCZebfif.js +308 -0
- package/dist-loader/chunks/pk-popup-BNRyCsVX.js +553 -0
- package/dist-loader/chunks/pk-select-BcbtjIoP.js +1120 -0
- package/dist-loader/chunks/pk-spinner-Di9O69-m.js +145 -0
- package/dist-loader/chunks/pk-textarea-CC6WXpIu.js +334 -0
- package/dist-loader/chunks/pk-time-picker-BtGXo-KJ.js +225 -0
- package/dist-loader/chunks/pk-tooltip-JJRxVXYD.js +465 -0
- package/dist-loader/chunks/popup-content-animation.styles-S6CK-zPp.js +115 -0
- package/dist-loader/chunks/popup-placement-animation-WlEXnS85.js +58 -0
- package/dist-loader/chunks/popup-pointer-BC4n_sNb.js +19 -0
- package/dist-loader/chunks/registry-CmL0rH9r.js +55 -0
- package/dist-loader/chunks/render-DApFfV9S.js +14 -0
- package/dist-loader/chunks/required-validator-0XwZtX9k.js +27 -0
- package/dist-loader/chunks/rolldown-runtime-CzwdidQP.js +13 -0
- package/dist-loader/chunks/supports-popover-COjbi2RP.js +5 -0
- package/dist-loader/chunks/svg-Boar0Kf1.js +34 -0
- package/dist-loader/chunks/sync-listbox-separators-Bcja51HC.js +147 -0
- package/dist-loader/chunks/tiptap-Db7MTUH1.js +22888 -0
- package/dist-loader/chunks/tiptap.styles-DAH_90Fi.js +1628 -0
- package/dist-loader/components/button/button.js +2 -0
- package/dist-loader/components/button-group/button-group-separator.js +58 -0
- package/dist-loader/components/button-group/button-group-text.js +46 -0
- package/dist-loader/components/button-group/button-group.js +419 -0
- package/dist-loader/components/calendar/calendar.js +2 -0
- package/dist-loader/components/checkbox/checkbox.js +2 -0
- package/dist-loader/components/checkbox-select/checkbox-select.js +217 -0
- package/dist-loader/components/code-editor/code-editor.js +376 -0
- package/dist-loader/components/color-input/color-input.js +2 -0
- package/dist-loader/components/combobox/combobox.js +2 -0
- package/dist-loader/components/copy-button/copy-button.js +135 -0
- package/dist-loader/components/date-picker/date-picker.js +2 -0
- package/dist-loader/components/dialog/dialog.js +2 -0
- package/dist-loader/components/dropdown-menu/dropdown-item.js +2 -0
- package/dist-loader/components/dropdown-menu/dropdown-label.js +45 -0
- package/dist-loader/components/dropdown-menu/dropdown-menu.js +2 -0
- package/dist-loader/components/dropdown-menu/dropdown-separator.js +33 -0
- package/dist-loader/components/editable-table/editable-table.js +1522 -0
- package/dist-loader/components/field/field.js +2 -0
- package/dist-loader/components/icon/icon.js +17 -0
- package/dist-loader/components/input/input.js +2 -0
- package/dist-loader/components/input-group/input-group-addon.js +98 -0
- package/dist-loader/components/input-group/input-group-button.js +52 -0
- package/dist-loader/components/input-group/input-group-input.js +132 -0
- package/dist-loader/components/input-group/input-group-text.js +37 -0
- package/dist-loader/components/input-group/input-group-textarea.js +110 -0
- package/dist-loader/components/input-group/input-group.js +234 -0
- package/dist-loader/components/lightswitch/lightswitch.js +2 -0
- package/dist-loader/components/popover/popover.js +372 -0
- package/dist-loader/components/popup/popup.js +2 -0
- package/dist-loader/components/radio-group/radio-group.js +247 -0
- package/dist-loader/components/radio-group/radio.js +229 -0
- package/dist-loader/components/scroll-area/scroll-area.js +398 -0
- package/dist-loader/components/select/option-group.js +69 -0
- package/dist-loader/components/select/option.js +2 -0
- package/dist-loader/components/select/select.js +2 -0
- package/dist-loader/components/separator/separator.js +86 -0
- package/dist-loader/components/spinner/spinner.js +2 -0
- package/dist-loader/components/status/status.js +89 -0
- package/dist-loader/components/tabs/tab-heading.js +47 -0
- package/dist-loader/components/tabs/tab-panel.js +83 -0
- package/dist-loader/components/tabs/tab.js +256 -0
- package/dist-loader/components/tabs/tabs.js +619 -0
- package/dist-loader/components/textarea/textarea.js +2 -0
- package/dist-loader/components/time-picker/time-picker.js +2 -0
- package/dist-loader/components/tiptap/tiptap-content.js +72 -0
- package/dist-loader/components/tiptap/tiptap-editor.js +1078 -0
- package/dist-loader/components/tiptap/tiptap-input.js +244 -0
- package/dist-loader/components/toggle/toggle.js +253 -0
- package/dist-loader/components/toggle-group/toggle-group.js +172 -0
- package/dist-loader/components/tooltip/tooltip.js +2 -0
- package/dist-loader/plugin-kit.css +583 -0
- package/dist-loader/plugin-kit.d.ts +9 -0
- package/dist-loader/plugin-kit.d.ts.map +1 -0
- package/dist-loader/plugin-kit.loader.d.ts +2 -0
- package/dist-loader/plugin-kit.loader.d.ts.map +1 -0
- package/dist-loader/plugin-kit.loader.js +527 -0
- package/dist-loader/styles/overlay-content.css +64 -0
- package/dist-loader/tokens.css +408 -0
- package/dist-loader/utilities/autoloader.d.ts +8 -0
- package/dist-loader/utilities/autoloader.d.ts.map +1 -0
- package/dist-loader/utilities/base-path.d.ts +3 -0
- package/dist-loader/utilities/base-path.d.ts.map +1 -0
- package/dist-loader/utilities/defined.d.ts +17 -0
- package/dist-loader/utilities/defined.d.ts.map +1 -0
- package/dist-loader/utilities/fouce-strategy.d.ts +43 -0
- package/dist-loader/utilities/fouce-strategy.d.ts.map +1 -0
- package/dist-loader/utilities/fouce.css +108 -0
- package/package.json +961 -0
|
@@ -0,0 +1,1528 @@
|
|
|
1
|
+
import { t as __decorate } from "./decorate-W02hmVTt.js";
|
|
2
|
+
import { t as PkFormAssociatedElement } from "./pk-form-associated-element-DmZKgNPL.js";
|
|
3
|
+
import { t as RequiredValidator } from "./required-validator-CEg8dvjS.js";
|
|
4
|
+
import { n as renderIconHtml } from "./render-Dvc3MHQR.js";
|
|
5
|
+
import { css, html, nothing } from "lit";
|
|
6
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
7
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
8
|
+
import { arrowDown, arrowUp, ellipsis, gear, getIcon, plus, xmark } from "@verbb/plugin-kit-icons";
|
|
9
|
+
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
10
|
+
import { repeat } from "lit/directives/repeat.js";
|
|
11
|
+
//#region src/components/editable-table/editable-table-dnd.ts
|
|
12
|
+
/**
|
|
13
|
+
* Table-native pointer drag for `<pk-editable-table>` rows.
|
|
14
|
+
*
|
|
15
|
+
* The live source `<tr>` becomes the floating overlay (same custom-element
|
|
16
|
+
* instances — no clone reflow / “shift”). A hidden placeholder clone stays in
|
|
17
|
+
* the tbody as the gap. Overlay motion is vertical-axis + tbody constrained.
|
|
18
|
+
* Gap steps when the probe enters ~30% of a neighbor (direction-aware).
|
|
19
|
+
* Drop commits by reading `data-row-id` order after seating — not index arithmetic.
|
|
20
|
+
*/
|
|
21
|
+
var EditableTableDndController = class EditableTableDndController {
|
|
22
|
+
static {
|
|
23
|
+
this.SWAP_INSET = .3;
|
|
24
|
+
}
|
|
25
|
+
constructor(callbacks) {
|
|
26
|
+
this.callbacks = callbacks;
|
|
27
|
+
this.rows = [];
|
|
28
|
+
this.disabled = false;
|
|
29
|
+
this.handleCleanups = [];
|
|
30
|
+
this.dragSession = null;
|
|
31
|
+
}
|
|
32
|
+
get isActive() {
|
|
33
|
+
return this.handleCleanups.length > 0;
|
|
34
|
+
}
|
|
35
|
+
/** Lit must not reconcile tbody while pointer drag owns row order. */
|
|
36
|
+
get isSessionActive() {
|
|
37
|
+
return this.dragSession !== null;
|
|
38
|
+
}
|
|
39
|
+
sync(rows, disabled) {
|
|
40
|
+
if (this.dragSession) return;
|
|
41
|
+
this.destroyHandles();
|
|
42
|
+
this.rows = rows;
|
|
43
|
+
this.disabled = disabled;
|
|
44
|
+
for (const row of rows) {
|
|
45
|
+
if (!row.handle) continue;
|
|
46
|
+
const onPointerDown = (event) => {
|
|
47
|
+
this.handlePointerDown(event, row);
|
|
48
|
+
};
|
|
49
|
+
row.handle.addEventListener("pointerdown", onPointerDown);
|
|
50
|
+
this.handleCleanups.push(() => {
|
|
51
|
+
row.handle?.removeEventListener("pointerdown", onPointerDown);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
destroy() {
|
|
56
|
+
this.cancelDrag();
|
|
57
|
+
this.destroyHandles();
|
|
58
|
+
this.rows = [];
|
|
59
|
+
}
|
|
60
|
+
handlePointerDown(event, row) {
|
|
61
|
+
if (this.disabled || this.dragSession || event.button !== 0 || !event.isPrimary) return;
|
|
62
|
+
const fromIndex = this.rows.findIndex((candidate) => candidate.id === row.id);
|
|
63
|
+
const tbody = row.element.parentElement;
|
|
64
|
+
const table = row.element.closest("table");
|
|
65
|
+
if (fromIndex < 0 || !(tbody instanceof HTMLTableSectionElement) || !(table instanceof HTMLTableElement)) return;
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
const cellWidths = [...row.element.cells].map((cell) => cell.getBoundingClientRect().width);
|
|
68
|
+
const unfreezeColumns = this.freezeTableColumns(table, cellWidths);
|
|
69
|
+
const sourceRect = row.element.getBoundingClientRect();
|
|
70
|
+
const tbodyRect = tbody.getBoundingClientRect();
|
|
71
|
+
const pointerOffset = {
|
|
72
|
+
x: event.clientX - sourceRect.left,
|
|
73
|
+
y: event.clientY - sourceRect.top
|
|
74
|
+
};
|
|
75
|
+
const placeholder = this.createPlaceholder(row.element, cellWidths, sourceRect.height);
|
|
76
|
+
row.element.insertAdjacentElement("afterend", placeholder);
|
|
77
|
+
const fixedOrigin = this.liftRow(row.element, sourceRect, cellWidths);
|
|
78
|
+
const session = {
|
|
79
|
+
row,
|
|
80
|
+
fromIndex,
|
|
81
|
+
table,
|
|
82
|
+
tbody,
|
|
83
|
+
placeholder,
|
|
84
|
+
pointerId: event.pointerId,
|
|
85
|
+
pointerOffset,
|
|
86
|
+
startLeft: sourceRect.left,
|
|
87
|
+
rowHeight: sourceRect.height,
|
|
88
|
+
tbodyTop: tbodyRect.top,
|
|
89
|
+
tbodyBottom: tbodyRect.bottom,
|
|
90
|
+
fixedOrigin,
|
|
91
|
+
unfreezeColumns,
|
|
92
|
+
cleanup: [],
|
|
93
|
+
committed: false
|
|
94
|
+
};
|
|
95
|
+
const doc = row.element.ownerDocument;
|
|
96
|
+
const onPointerMove = (moveEvent) => {
|
|
97
|
+
if (moveEvent.pointerId !== session.pointerId || session.committed) return;
|
|
98
|
+
moveEvent.preventDefault();
|
|
99
|
+
const liveTbody = session.tbody.getBoundingClientRect();
|
|
100
|
+
session.tbodyTop = liveTbody.top;
|
|
101
|
+
session.tbodyBottom = liveTbody.bottom;
|
|
102
|
+
this.updateOverlay(session, moveEvent.clientY);
|
|
103
|
+
this.updateGap(session, moveEvent.clientY - session.pointerOffset.y + session.rowHeight / 2);
|
|
104
|
+
};
|
|
105
|
+
const onPointerUp = (upEvent) => {
|
|
106
|
+
if (upEvent.pointerId !== session.pointerId || session.committed) return;
|
|
107
|
+
upEvent.preventDefault();
|
|
108
|
+
this.commitDrag(session);
|
|
109
|
+
};
|
|
110
|
+
const onPointerCancel = (cancelEvent) => {
|
|
111
|
+
if (cancelEvent.pointerId !== session.pointerId || session.committed) return;
|
|
112
|
+
this.cancelDrag();
|
|
113
|
+
};
|
|
114
|
+
doc.addEventListener("pointermove", onPointerMove, { passive: false });
|
|
115
|
+
doc.addEventListener("pointerup", onPointerUp, { passive: false });
|
|
116
|
+
doc.addEventListener("pointercancel", onPointerCancel);
|
|
117
|
+
session.cleanup.push(() => {
|
|
118
|
+
doc.removeEventListener("pointermove", onPointerMove);
|
|
119
|
+
}, () => {
|
|
120
|
+
doc.removeEventListener("pointerup", onPointerUp);
|
|
121
|
+
}, () => {
|
|
122
|
+
doc.removeEventListener("pointercancel", onPointerCancel);
|
|
123
|
+
});
|
|
124
|
+
this.dragSession = session;
|
|
125
|
+
this.updateOverlay(session, event.clientY);
|
|
126
|
+
}
|
|
127
|
+
/** Vertical-axis + tbody-container constraints on the live floated row. */
|
|
128
|
+
updateOverlay(session, clientY) {
|
|
129
|
+
const rawTop = clientY - session.pointerOffset.y;
|
|
130
|
+
const minTop = session.tbodyTop;
|
|
131
|
+
const maxTop = Math.max(minTop, session.tbodyBottom - session.rowHeight);
|
|
132
|
+
const top = Math.min(maxTop, Math.max(minTop, rawTop));
|
|
133
|
+
const row = session.row.element;
|
|
134
|
+
row.style.top = `${top - session.fixedOrigin.y}px`;
|
|
135
|
+
row.style.left = `${session.startLeft - session.fixedOrigin.x}px`;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Project the gap from the probe against the full row list.
|
|
139
|
+
* Threshold is direction-aware so drag-up and drag-down feel the same.
|
|
140
|
+
*/
|
|
141
|
+
updateGap(session, probeY) {
|
|
142
|
+
const placeholder = session.placeholder;
|
|
143
|
+
const source = session.row.element;
|
|
144
|
+
const rows = [...session.tbody.querySelectorAll("tr[data-row-id]")].filter((row) => row !== source && !row.hasAttribute("data-pk-dnd-placeholder"));
|
|
145
|
+
const placeholderRect = placeholder.getBoundingClientRect();
|
|
146
|
+
const movingUp = probeY < placeholderRect.top + placeholderRect.height / 2;
|
|
147
|
+
const inset = EditableTableDndController.SWAP_INSET;
|
|
148
|
+
let before = null;
|
|
149
|
+
for (const row of rows) {
|
|
150
|
+
const rect = row.getBoundingClientRect();
|
|
151
|
+
if (rect.height <= 0) continue;
|
|
152
|
+
if (probeY < (movingUp ? rect.top + rect.height * (1 - inset) : rect.top + rect.height * inset)) {
|
|
153
|
+
before = row;
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (before) {
|
|
158
|
+
if (placeholder.nextElementSibling !== before) session.tbody.insertBefore(placeholder, before);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (session.tbody.lastElementChild !== placeholder) session.tbody.append(placeholder);
|
|
162
|
+
}
|
|
163
|
+
commitDrag(session) {
|
|
164
|
+
if (session.committed || this.dragSession !== session) return;
|
|
165
|
+
session.committed = true;
|
|
166
|
+
this.cleanupDrag(session);
|
|
167
|
+
this.dragSession = null;
|
|
168
|
+
const orderedIds = [...session.tbody.querySelectorAll("tr[data-row-id]")].map((row) => row.dataset.rowId ?? "").filter((id) => id !== "");
|
|
169
|
+
this.callbacks.onReorderTo(orderedIds);
|
|
170
|
+
}
|
|
171
|
+
cancelDrag() {
|
|
172
|
+
const session = this.dragSession;
|
|
173
|
+
if (!session || session.committed) return;
|
|
174
|
+
session.committed = true;
|
|
175
|
+
this.restorePlaceholderToOrigin(session);
|
|
176
|
+
this.cleanupDrag(session);
|
|
177
|
+
this.dragSession = null;
|
|
178
|
+
}
|
|
179
|
+
restorePlaceholderToOrigin(session) {
|
|
180
|
+
const others = [...session.tbody.querySelectorAll("tr[data-row-id]")].filter((row) => row !== session.row.element && !row.hasAttribute("data-pk-dnd-placeholder"));
|
|
181
|
+
if (session.fromIndex >= others.length) {
|
|
182
|
+
if (session.tbody.lastElementChild !== session.placeholder) session.tbody.append(session.placeholder);
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const before = others[session.fromIndex];
|
|
186
|
+
if (before && session.placeholder.nextElementSibling !== before) session.tbody.insertBefore(session.placeholder, before);
|
|
187
|
+
}
|
|
188
|
+
cleanupDrag(session) {
|
|
189
|
+
for (const cleanup of session.cleanup) cleanup();
|
|
190
|
+
const row = session.row.element;
|
|
191
|
+
session.placeholder.replaceWith(row);
|
|
192
|
+
this.unliftRow(row);
|
|
193
|
+
session.unfreezeColumns();
|
|
194
|
+
}
|
|
195
|
+
freezeTableColumns(table, widths) {
|
|
196
|
+
table.querySelector(":scope > colgroup[data-pk-dnd-cols]")?.remove();
|
|
197
|
+
const colgroup = table.ownerDocument.createElement("colgroup");
|
|
198
|
+
colgroup.setAttribute("data-pk-dnd-cols", "true");
|
|
199
|
+
for (const width of widths) {
|
|
200
|
+
const col = table.ownerDocument.createElement("col");
|
|
201
|
+
col.style.width = `${width}px`;
|
|
202
|
+
colgroup.append(col);
|
|
203
|
+
}
|
|
204
|
+
const previousLayout = table.style.tableLayout;
|
|
205
|
+
table.prepend(colgroup);
|
|
206
|
+
table.style.tableLayout = "fixed";
|
|
207
|
+
return () => {
|
|
208
|
+
colgroup.remove();
|
|
209
|
+
table.style.tableLayout = previousLayout;
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
createPlaceholder(row, cellWidths, height) {
|
|
213
|
+
const placeholder = row.cloneNode(true);
|
|
214
|
+
placeholder.setAttribute("data-pk-dnd-placeholder", "true");
|
|
215
|
+
placeholder.setAttribute("aria-hidden", "true");
|
|
216
|
+
placeholder.removeAttribute("data-row-id");
|
|
217
|
+
placeholder.style.visibility = "hidden";
|
|
218
|
+
placeholder.style.pointerEvents = "none";
|
|
219
|
+
placeholder.style.height = `${height}px`;
|
|
220
|
+
[...placeholder.cells].forEach((cell, index) => {
|
|
221
|
+
const width = cellWidths[index];
|
|
222
|
+
if (typeof width === "number") {
|
|
223
|
+
cell.style.width = `${width}px`;
|
|
224
|
+
cell.style.minWidth = `${width}px`;
|
|
225
|
+
cell.style.maxWidth = `${width}px`;
|
|
226
|
+
cell.style.boxSizing = "border-box";
|
|
227
|
+
}
|
|
228
|
+
cell.replaceChildren();
|
|
229
|
+
});
|
|
230
|
+
return placeholder;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Promote the live row to a fixed overlay. Same pattern dnd-kit Feedback uses
|
|
234
|
+
* for `<tr>`: pin cell widths, then position:fixed (raw TR rects go 0×0 otherwise).
|
|
235
|
+
*
|
|
236
|
+
* Returns the fixed-positioning origin in viewport coords. `position: fixed`
|
|
237
|
+
* is viewport-based only when no ancestor is a containing block; a transformed
|
|
238
|
+
* ancestor (pk-dialog panel animation, filters, contain) re-bases it, which
|
|
239
|
+
* silently threw the overlay outside the dialog and made the row "disappear".
|
|
240
|
+
*/
|
|
241
|
+
liftRow(row, rect, cellWidths) {
|
|
242
|
+
row.classList.add("is-dragging");
|
|
243
|
+
[...row.cells].forEach((cell, index) => {
|
|
244
|
+
const width = cellWidths[index];
|
|
245
|
+
if (typeof width === "number") {
|
|
246
|
+
cell.style.width = `${width}px`;
|
|
247
|
+
cell.style.minWidth = `${width}px`;
|
|
248
|
+
cell.style.maxWidth = `${width}px`;
|
|
249
|
+
cell.style.boxSizing = "border-box";
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
row.style.position = "fixed";
|
|
253
|
+
row.style.top = "0px";
|
|
254
|
+
row.style.left = "0px";
|
|
255
|
+
row.style.width = `${rect.width}px`;
|
|
256
|
+
row.style.height = `${rect.height}px`;
|
|
257
|
+
row.style.margin = "0";
|
|
258
|
+
row.style.zIndex = "2147483647";
|
|
259
|
+
row.style.pointerEvents = "none";
|
|
260
|
+
row.style.boxShadow = "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
|
|
261
|
+
row.style.background = "var(--pk-color-white, #fff)";
|
|
262
|
+
row.style.opacity = "0.96";
|
|
263
|
+
const probe = row.getBoundingClientRect();
|
|
264
|
+
const fixedOrigin = {
|
|
265
|
+
x: probe.left,
|
|
266
|
+
y: probe.top
|
|
267
|
+
};
|
|
268
|
+
row.style.top = `${rect.top - fixedOrigin.y}px`;
|
|
269
|
+
row.style.left = `${rect.left - fixedOrigin.x}px`;
|
|
270
|
+
return fixedOrigin;
|
|
271
|
+
}
|
|
272
|
+
unliftRow(row) {
|
|
273
|
+
row.classList.remove("is-dragging");
|
|
274
|
+
row.style.position = "";
|
|
275
|
+
row.style.top = "";
|
|
276
|
+
row.style.left = "";
|
|
277
|
+
row.style.width = "";
|
|
278
|
+
row.style.height = "";
|
|
279
|
+
row.style.margin = "";
|
|
280
|
+
row.style.zIndex = "";
|
|
281
|
+
row.style.pointerEvents = "";
|
|
282
|
+
row.style.boxShadow = "";
|
|
283
|
+
row.style.background = "";
|
|
284
|
+
row.style.opacity = "";
|
|
285
|
+
for (const cell of row.cells) {
|
|
286
|
+
cell.style.width = "";
|
|
287
|
+
cell.style.minWidth = "";
|
|
288
|
+
cell.style.maxWidth = "";
|
|
289
|
+
cell.style.boxSizing = "";
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
destroyHandles() {
|
|
293
|
+
for (const cleanup of this.handleCleanups) cleanup();
|
|
294
|
+
this.handleCleanups = [];
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region src/components/editable-table/pk-editable-table.styles.ts
|
|
299
|
+
var pkEditableTableStyles = css`
|
|
300
|
+
@layer pk-component {
|
|
301
|
+
:host {
|
|
302
|
+
display: block;
|
|
303
|
+
font-family: var(--pk-font-family);
|
|
304
|
+
/* Craft CP body text (~gray-700), not gray-900. */
|
|
305
|
+
color: var(--pk-color-gray-700);
|
|
306
|
+
/* Shell matches v1 Table: border-gray-200 + rounded-md (token md = 4px). */
|
|
307
|
+
--pk-et-border: 1px solid var(--pk-color-gray-200, #e5e7eb);
|
|
308
|
+
--pk-et-radius: var(--pk-radius-md, 4px);
|
|
309
|
+
--pk-et-gridline: var(--pk-color-gray-100, #f3f4f6);
|
|
310
|
+
/* Static row height — matches v1 TableCell h-[34px] (border-box). */
|
|
311
|
+
--pk-et-cell-height: 34px;
|
|
312
|
+
--pk-et-action-size: 24px;
|
|
313
|
+
--pk-et-action-icon: 12px;
|
|
314
|
+
/* Grip reads smaller than ellipsis/x at the same token — nudge up slightly. */
|
|
315
|
+
--pk-et-action-grip-icon: 14px;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/* v1 Table: shell scrolls horizontally; Add row sits outside so it stays full-width. */
|
|
319
|
+
.et-scroll {
|
|
320
|
+
width: 100%;
|
|
321
|
+
max-width: 100%;
|
|
322
|
+
overflow-x: auto;
|
|
323
|
+
overflow-y: hidden;
|
|
324
|
+
border: var(--pk-et-border);
|
|
325
|
+
border-radius: var(--pk-et-radius) var(--pk-et-radius) 0 0;
|
|
326
|
+
background: var(--pk-color-white, #fff);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.et {
|
|
330
|
+
/* v1 Table uses w-full: fill the shell, squish toward column width hints /
|
|
331
|
+
* content minima, then overflow-x on .et-scroll takes over. */
|
|
332
|
+
width: 100%;
|
|
333
|
+
border-collapse: separate;
|
|
334
|
+
border-spacing: 0;
|
|
335
|
+
background: var(--pk-color-white, #fff);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
thead {
|
|
339
|
+
background: var(--pk-color-gray-50, #f8fafc);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
thead th {
|
|
343
|
+
padding: 0.375rem 0.5rem;
|
|
344
|
+
text-align: left;
|
|
345
|
+
font-size: 12px;
|
|
346
|
+
font-weight: 500;
|
|
347
|
+
color: var(--pk-color-gray-700, #374151);
|
|
348
|
+
background: var(--pk-color-gray-50, #f8fafc);
|
|
349
|
+
/* v1 TableHead has no cell borders — body cells own the gridlines. */
|
|
350
|
+
border: 0;
|
|
351
|
+
white-space: nowrap;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
tbody td + td {
|
|
355
|
+
border-inline-start: 1px solid var(--pk-et-gridline);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
thead th.thin,
|
|
359
|
+
tbody td.thin {
|
|
360
|
+
width: 0.01%;
|
|
361
|
+
white-space: nowrap;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
thead th.actions,
|
|
365
|
+
tbody td.actions {
|
|
366
|
+
width: 0.01%;
|
|
367
|
+
white-space: nowrap;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
tbody td.actions {
|
|
371
|
+
padding-inline: 0.25rem;
|
|
372
|
+
/* v1 TableRow actions cell — soft cool wash so controls read as chrome, not data. */
|
|
373
|
+
background: #fbfcfe;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.required {
|
|
377
|
+
margin-left: 0.125rem;
|
|
378
|
+
color: var(--pk-color-rose-600, #e11d48);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
tbody td {
|
|
382
|
+
box-sizing: border-box;
|
|
383
|
+
padding: 0;
|
|
384
|
+
height: var(--pk-et-cell-height);
|
|
385
|
+
background: var(--pk-color-white, #fff);
|
|
386
|
+
/* v1 TableCell: border-t gray-100 — also separates header once th borders are gone. */
|
|
387
|
+
border-top: 1px solid var(--pk-et-gridline);
|
|
388
|
+
vertical-align: middle;
|
|
389
|
+
/* Match v1 TableCell whitespace-nowrap — drives intrinsic mins before scroll. */
|
|
390
|
+
white-space: nowrap;
|
|
391
|
+
/* Let auto table layout compress past control preferred sizes. */
|
|
392
|
+
min-width: 0;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
tbody tr.is-dragging {
|
|
396
|
+
opacity: 0.4;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/* Semantic row tones from modifyRow — host Tailwind cannot style shadow <tr>. */
|
|
400
|
+
tbody tr[data-tone='warning'] > td {
|
|
401
|
+
background: color-mix(in srgb, var(--pk-color-amber-50, #fffbeb) 80%, transparent);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
tbody tr[data-tone='muted'] > td {
|
|
405
|
+
background: color-mix(in srgb, var(--pk-color-slate-100, #f1f5f9) 90%, transparent);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.cell-pk-control {
|
|
409
|
+
display: block;
|
|
410
|
+
width: 100%;
|
|
411
|
+
min-width: 0;
|
|
412
|
+
height: var(--pk-et-cell-height);
|
|
413
|
+
min-height: var(--pk-et-cell-height);
|
|
414
|
+
--pk-input-border-radius: 0;
|
|
415
|
+
--pk-select-border-radius: 0;
|
|
416
|
+
--pk-date-picker-border-radius: 0;
|
|
417
|
+
--pk-input-bg: var(--pk-color-white, #fff);
|
|
418
|
+
--pk-combobox-fill: var(--pk-color-white, #fff);
|
|
419
|
+
--pk-input-height: var(--pk-et-cell-height);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
pk-input.cell-pk-control::part(base) {
|
|
423
|
+
padding-inline: 0.5rem;
|
|
424
|
+
background: var(--pk-color-white, #fff);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/* v1 EditableTable Input is text-sm (14px); size=xs would be 11px. */
|
|
428
|
+
pk-input.cell-pk-control:not([mono])::part(input) {
|
|
429
|
+
font-size: var(--pk-font-size-base, 14px);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/* v1 handle/value: font-mono text-[0.9em] — do not let the 14px cell
|
|
433
|
+
* override wipe pk-input[mono]'s optical scale. */
|
|
434
|
+
pk-input.cell-pk-control[mono]::part(input) {
|
|
435
|
+
font-size: calc(var(--pk-font-size-base, 14px) * 0.9);
|
|
436
|
+
line-height: var(--pk-line-height-mono, 1.5);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/* Select/combobox sit inset horizontally only (v1 TableCell px-2).
|
|
440
|
+
* No block padding — vertical inset comes from the size=xs chip itself. */
|
|
441
|
+
tbody td:has(> pk-select.cell-pk-control),
|
|
442
|
+
tbody td:has(> pk-combobox.cell-pk-control) {
|
|
443
|
+
padding: 0 0.5rem;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
pk-select.cell-pk-control,
|
|
447
|
+
pk-combobox.cell-pk-control {
|
|
448
|
+
display: block;
|
|
449
|
+
width: 100%;
|
|
450
|
+
max-width: 100%;
|
|
451
|
+
min-width: 0;
|
|
452
|
+
/* Override shared .cell-pk-control height so the chip centers in the row. */
|
|
453
|
+
height: auto;
|
|
454
|
+
min-height: 0;
|
|
455
|
+
/* Don't inherit the 34px cell --pk-input-height into the trigger. */
|
|
456
|
+
--pk-input-height: auto;
|
|
457
|
+
--pk-select-item-min-height: 0;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
pk-input.cell-pk-control {
|
|
461
|
+
/* Text-like cells fill the td. Inner input text keeps padding via ::part(base);
|
|
462
|
+
* invalid chrome should hit the gridlines, not sit inside an inset chip. */
|
|
463
|
+
height: var(--pk-et-cell-height);
|
|
464
|
+
min-height: var(--pk-et-cell-height);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/* Date/time fill the cell flush — no trigger chrome (v1 border-none + h/w-full).
|
|
468
|
+
* display:block so the inline-block host doesn't baseline-shift off center. */
|
|
469
|
+
pk-date-picker.cell-pk-control,
|
|
470
|
+
pk-time-picker.cell-pk-control {
|
|
471
|
+
display: block;
|
|
472
|
+
width: 100%;
|
|
473
|
+
min-width: 0;
|
|
474
|
+
height: var(--pk-et-cell-height);
|
|
475
|
+
--pk-date-picker-height: var(--pk-et-cell-height);
|
|
476
|
+
--pk-date-picker-min-width: 0;
|
|
477
|
+
--pk-select-item-min-height: var(--pk-et-cell-height);
|
|
478
|
+
--pk-select-trigger-border-width: 0;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/* The base trigger sizes to 100% of the host, but the shared form-control
|
|
482
|
+
* wrappers default to auto height, collapsing that chain and top-aligning
|
|
483
|
+
* the date. Stretch the wrappers so 100% resolves and align-items centers. */
|
|
484
|
+
pk-date-picker.cell-pk-control::part(form-control),
|
|
485
|
+
pk-date-picker.cell-pk-control::part(form-control-input) {
|
|
486
|
+
height: 100%;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
pk-date-picker.cell-pk-control::part(base) {
|
|
490
|
+
width: 100%;
|
|
491
|
+
min-width: 0;
|
|
492
|
+
height: 100%;
|
|
493
|
+
min-height: 100%;
|
|
494
|
+
border: 0;
|
|
495
|
+
border-radius: 0;
|
|
496
|
+
background: transparent;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
pk-date-picker.cell-pk-control::part(base):focus-visible {
|
|
500
|
+
box-shadow: inset 0 0 0 1px var(--pk-color-gray-200, #e5e7eb);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
pk-time-picker.cell-pk-control::part(control) {
|
|
504
|
+
width: 100%;
|
|
505
|
+
min-width: 0;
|
|
506
|
+
height: 100% !important;
|
|
507
|
+
min-height: 100% !important;
|
|
508
|
+
border: 0 !important;
|
|
509
|
+
border-radius: 0 !important;
|
|
510
|
+
background: transparent !important;
|
|
511
|
+
background-color: transparent !important;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
pk-time-picker.cell-pk-control::part(control):focus-visible {
|
|
515
|
+
box-shadow: inset 0 0 0 1px var(--pk-color-gray-200, #e5e7eb);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
td.has-error .cell-pk-control {
|
|
519
|
+
--pk-input-border-color: var(--pk-color-rose-600, #e11d48);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/* Flush/borderless date/time only — select/combobox/color paint their own
|
|
523
|
+
* invalid chrome via ?invalid, so a host ring would double up. */
|
|
524
|
+
td.has-error pk-date-picker.cell-pk-control,
|
|
525
|
+
td.has-error pk-time-picker.cell-pk-control {
|
|
526
|
+
box-shadow: inset 0 0 0 1px var(--pk-color-rose-600, #e11d48);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.cell-static {
|
|
530
|
+
padding: 0.5rem;
|
|
531
|
+
font-size: var(--pk-font-size-base, 14px);
|
|
532
|
+
line-height: 1.4;
|
|
533
|
+
color: inherit;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/* Custom / slotted cells — fill the td; light-DOM content keeps host styles. */
|
|
537
|
+
.cell-slot {
|
|
538
|
+
display: block;
|
|
539
|
+
width: 100%;
|
|
540
|
+
min-width: 0;
|
|
541
|
+
min-height: var(--pk-et-cell-height);
|
|
542
|
+
height: 100%;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.cell-slot ::slotted(*) {
|
|
546
|
+
display: block;
|
|
547
|
+
width: 100%;
|
|
548
|
+
min-width: 0;
|
|
549
|
+
min-height: var(--pk-et-cell-height);
|
|
550
|
+
box-sizing: border-box;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.cell-heading {
|
|
554
|
+
font-weight: 600;
|
|
555
|
+
color: var(--pk-color-gray-800, #1f2937);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.cell-mono {
|
|
559
|
+
font-family: var(--pk-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
|
|
560
|
+
font-size: var(--pk-font-size-mono, 0.9em);
|
|
561
|
+
line-height: var(--pk-line-height-mono, 1.5);
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.cell-check {
|
|
565
|
+
display: flex;
|
|
566
|
+
align-items: center;
|
|
567
|
+
justify-content: center;
|
|
568
|
+
height: var(--pk-et-cell-height);
|
|
569
|
+
min-width: 2.125rem;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.cell-check--switch {
|
|
573
|
+
min-width: 3rem;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
pk-checkbox,
|
|
577
|
+
pk-radio,
|
|
578
|
+
pk-lightswitch {
|
|
579
|
+
display: inline-flex;
|
|
580
|
+
align-items: center;
|
|
581
|
+
justify-content: center;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
.row-actions {
|
|
585
|
+
display: flex;
|
|
586
|
+
align-items: center;
|
|
587
|
+
justify-content: flex-end;
|
|
588
|
+
/* v1 packs 24px action buttons flush — no gap between hitboxes. */
|
|
589
|
+
gap: 0;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.row-actions pk-dropdown-menu {
|
|
593
|
+
display: inline-flex;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
/* Action row buttons: fixed 24px hitbox (v1), variant=none, icon-only color hover. */
|
|
597
|
+
.row-actions pk-button.action-btn {
|
|
598
|
+
--pk-btn-height: var(--pk-et-action-size);
|
|
599
|
+
--pk-btn-icon-size: var(--pk-et-action-icon);
|
|
600
|
+
--pk-btn-padding-inline: 0;
|
|
601
|
+
color: var(--pk-color-gray-500, #6b7280);
|
|
602
|
+
width: var(--pk-et-action-size);
|
|
603
|
+
flex: 0 0 var(--pk-et-action-size);
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.row-actions pk-button.action-btn::part(base) {
|
|
607
|
+
width: var(--pk-et-action-size);
|
|
608
|
+
height: var(--pk-et-action-size);
|
|
609
|
+
min-height: var(--pk-et-action-size);
|
|
610
|
+
padding: 0;
|
|
611
|
+
background: transparent;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.row-actions pk-button.action-btn::part(base):hover:not(:disabled) {
|
|
615
|
+
/* No hover fill — only the glyph color shifts (v1 hover:bg-transparent). */
|
|
616
|
+
background: transparent;
|
|
617
|
+
color: var(--pk-color-sky-600, #0284c7);
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.row-actions pk-button.action-btn.action-delete::part(base):hover:not(:disabled) {
|
|
621
|
+
background: transparent;
|
|
622
|
+
color: var(--pk-color-rose-500, #f43f5e);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.row-actions pk-button.action-btn:disabled {
|
|
626
|
+
opacity: 0.4;
|
|
627
|
+
cursor: not-allowed;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/* Light-DOM handle wrapper (v1) — pointer drag binds here so shadow clicks don't interfere.
|
|
631
|
+
pk-button :host { cursor: pointer } wins over inherited span cursor — set it on the host. */
|
|
632
|
+
.row-actions .action-handle {
|
|
633
|
+
display: inline-flex;
|
|
634
|
+
cursor: move;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
.row-actions .action-handle pk-button.action-btn {
|
|
638
|
+
cursor: move;
|
|
639
|
+
--pk-btn-icon-size: var(--pk-et-action-grip-icon);
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.row-actions .action-handle:has(pk-button:disabled),
|
|
643
|
+
.row-actions .action-handle pk-button.action-btn[disabled] {
|
|
644
|
+
cursor: default;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/* Before deferred drag binding — grip visible but inactive (v1 faded controls). */
|
|
648
|
+
.row-actions .action-handle.is-pending {
|
|
649
|
+
opacity: 0.45;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
/* Live row is floated as the overlay; placeholder clone holds the gap. */
|
|
653
|
+
tr.is-dragging {
|
|
654
|
+
display: table-row;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
tr[data-pk-dnd-placeholder] {
|
|
658
|
+
visibility: hidden;
|
|
659
|
+
pointer-events: none;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/* Attach dashed add-row under the table shell (v1 Button variant=dashed). */
|
|
663
|
+
pk-button.add-row {
|
|
664
|
+
display: block;
|
|
665
|
+
width: 100%;
|
|
666
|
+
margin-top: -1px;
|
|
667
|
+
--pk-btn-radius: 0;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
pk-button.add-row::part(base) {
|
|
671
|
+
width: 100%;
|
|
672
|
+
border-top: 0;
|
|
673
|
+
border-radius: 0 0 var(--pk-et-radius) var(--pk-et-radius);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
:host([disabled]) pk-button.add-row {
|
|
677
|
+
opacity: 0.5;
|
|
678
|
+
pointer-events: none;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.empty {
|
|
682
|
+
padding: 0.75rem 0.625rem;
|
|
683
|
+
color: var(--pk-color-gray-500, #6b7280);
|
|
684
|
+
font-size: 13px;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
`;
|
|
688
|
+
//#endregion
|
|
689
|
+
//#region src/components/editable-table/editable-table-model.ts
|
|
690
|
+
var GENERATED_CELL_MODE = {
|
|
691
|
+
EMPTY: "empty",
|
|
692
|
+
AUTO: "auto",
|
|
693
|
+
MANUAL: "manual",
|
|
694
|
+
SEEDED: "seeded"
|
|
695
|
+
};
|
|
696
|
+
var isGeneratedColumn = (column) => {
|
|
697
|
+
return (column.type === "handle" || column.type === "value") && Boolean(column.name) && Boolean(column.source);
|
|
698
|
+
};
|
|
699
|
+
var isThinColumn = (column) => {
|
|
700
|
+
return Boolean(column.thin || column.type === "checkbox" || column.type === "lightswitch" || column.type === "radio");
|
|
701
|
+
};
|
|
702
|
+
var isEmptyCellValue = (value) => {
|
|
703
|
+
return value === void 0 || value === null || value === "";
|
|
704
|
+
};
|
|
705
|
+
var getGeneratedCellKey = (rowId, columnName) => {
|
|
706
|
+
return `${rowId}:${columnName}`;
|
|
707
|
+
};
|
|
708
|
+
var normalizeOptions = (options) => {
|
|
709
|
+
if (!Array.isArray(options)) return [];
|
|
710
|
+
return options.map((option) => {
|
|
711
|
+
if (typeof option === "string") return {
|
|
712
|
+
label: option,
|
|
713
|
+
value: option
|
|
714
|
+
};
|
|
715
|
+
return {
|
|
716
|
+
label: String(option.label ?? option.value ?? ""),
|
|
717
|
+
value: String(option.value ?? "")
|
|
718
|
+
};
|
|
719
|
+
});
|
|
720
|
+
};
|
|
721
|
+
var defaultValueForColumn = (column) => {
|
|
722
|
+
if (column.type === "checkbox" || column.type === "lightswitch" || column.type === "radio") return false;
|
|
723
|
+
return "";
|
|
724
|
+
};
|
|
725
|
+
/**
|
|
726
|
+
* Craft-free handle slug for derived `handle` columns.
|
|
727
|
+
* Mirrors the camelCase path of `@verbb/plugin-kit-core` `generateHandle` without `window.Craft`.
|
|
728
|
+
*/
|
|
729
|
+
var generateHandle = (sourceValue) => {
|
|
730
|
+
const words = sourceValue.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/['"'""[\](){}:]/g, "").split(/[^a-z0-9]+/).filter(Boolean);
|
|
731
|
+
if (words.length === 0) return "";
|
|
732
|
+
return words.map((word, index) => index === 0 ? word : word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
733
|
+
};
|
|
734
|
+
var rowIdCounter = 0;
|
|
735
|
+
var nextRowId = () => {
|
|
736
|
+
rowIdCounter += 1;
|
|
737
|
+
return `etr_${Date.now().toString(36)}_${rowIdCounter}`;
|
|
738
|
+
};
|
|
739
|
+
/** Named slot for a `type: 'custom'` cell — light-DOM projection into the `<td>`. */
|
|
740
|
+
var getCustomCellSlotName = (rowId, columnName) => {
|
|
741
|
+
return `cell:${rowId}:${columnName}`;
|
|
742
|
+
};
|
|
743
|
+
var BUILTIN_COLUMN_TYPES = new Set([
|
|
744
|
+
"text",
|
|
745
|
+
"textarea",
|
|
746
|
+
"number",
|
|
747
|
+
"email",
|
|
748
|
+
"url",
|
|
749
|
+
"select",
|
|
750
|
+
"combobox",
|
|
751
|
+
"checkbox",
|
|
752
|
+
"radio",
|
|
753
|
+
"lightswitch",
|
|
754
|
+
"color",
|
|
755
|
+
"date",
|
|
756
|
+
"time",
|
|
757
|
+
"heading",
|
|
758
|
+
"label",
|
|
759
|
+
"handle",
|
|
760
|
+
"value",
|
|
761
|
+
"custom"
|
|
762
|
+
]);
|
|
763
|
+
var isCustomColumn = (column) => {
|
|
764
|
+
const type = column.type;
|
|
765
|
+
if (type === "custom") return true;
|
|
766
|
+
return typeof type === "string" && !BUILTIN_COLUMN_TYPES.has(type);
|
|
767
|
+
};
|
|
768
|
+
//#endregion
|
|
769
|
+
//#region src/components/editable-table/pk-editable-table.ts
|
|
770
|
+
/** Slotted start-icon markup for pk-button (bundled — no registry lookup). */
|
|
771
|
+
var START_GRIP_ICON = `
|
|
772
|
+
<svg slot="start" viewBox="0 0 448 512" focusable="false" aria-hidden="true">
|
|
773
|
+
<path fill="currentColor" d="M71.3 295.6c-21.9-21.9-21.9-57.3 0-79.2s57.3-21.9 79.2 0 21.9 57.3 0 79.2s-57.4 21.9-79.2 0zM184.4 182.5c-21.9-21.9-21.9-57.3 0-79.2s57.3-21.9 79.2 0 21.9 57.3 0 79.2-57.3 21.8-79.2 0zm0 147c21.9-21.9 57.3-21.9 79.2 0s21.9 57.3 0 79.2s-57.3 21.9-79.2 0c-21.9-21.8-21.9-57.3 0-79.2zM297.5 216.4c21.9-21.9 57.3-21.9 79.2 0s21.9 57.3 0 79.2s-57.3 21.9-79.2 0c-21.8-21.9-21.8-57.3 0-79.2z"></path>
|
|
774
|
+
</svg>
|
|
775
|
+
`;
|
|
776
|
+
var START_ELLIPSIS_ICON = renderIconHtml(ellipsis).replace("<svg", "<svg slot=\"start\" aria-hidden=\"true\"");
|
|
777
|
+
var START_ARROW_UP_ICON = renderIconHtml(arrowUp).replace("<svg", "<svg slot=\"start\" aria-hidden=\"true\"");
|
|
778
|
+
var START_ARROW_DOWN_ICON = renderIconHtml(arrowDown).replace("<svg", "<svg slot=\"start\" aria-hidden=\"true\"");
|
|
779
|
+
var START_XMARK_ICON = renderIconHtml(xmark).replace("<svg", "<svg slot=\"start\" aria-hidden=\"true\"");
|
|
780
|
+
var START_PLUS_ICON = renderIconHtml(plus).replace("<svg", "<svg slot=\"start\" aria-hidden=\"true\"");
|
|
781
|
+
var START_GEAR_ICON = renderIconHtml(gear).replace("<svg", "<svg slot=\"start\" aria-hidden=\"true\"");
|
|
782
|
+
var startIconHtml = (iconName) => {
|
|
783
|
+
if (!iconName) return "";
|
|
784
|
+
if (iconName === "gear") return START_GEAR_ICON;
|
|
785
|
+
const icon = getIcon(iconName);
|
|
786
|
+
if (!icon) return "";
|
|
787
|
+
return renderIconHtml(icon).replace("<svg", "<svg slot=\"start\" aria-hidden=\"true\"");
|
|
788
|
+
};
|
|
789
|
+
var PkEditableTable = class PkEditableTable extends PkFormAssociatedElement {
|
|
790
|
+
constructor(..._args) {
|
|
791
|
+
super(..._args);
|
|
792
|
+
this.columns = [];
|
|
793
|
+
this.rows = [];
|
|
794
|
+
this.allowAdd = true;
|
|
795
|
+
this.allowDelete = true;
|
|
796
|
+
this.allowReorder = true;
|
|
797
|
+
this.addRowLabel = "";
|
|
798
|
+
this.fieldName = "";
|
|
799
|
+
this.cellErrors = {};
|
|
800
|
+
this.newRowDefaults = {};
|
|
801
|
+
this.modifyColumn = null;
|
|
802
|
+
this.modifyRow = null;
|
|
803
|
+
this.getRowMenuItems = null;
|
|
804
|
+
this.internalRows = [];
|
|
805
|
+
this.dndReady = false;
|
|
806
|
+
this.generatedCellModes = /* @__PURE__ */ new Map();
|
|
807
|
+
this.dndController = new EditableTableDndController({ onReorderTo: (orderedIds) => {
|
|
808
|
+
this.commitReorderByIds(orderedIds);
|
|
809
|
+
} });
|
|
810
|
+
this.dndIdleId = null;
|
|
811
|
+
this.dndTimeoutId = null;
|
|
812
|
+
this.dndRowSignature = "";
|
|
813
|
+
}
|
|
814
|
+
static {
|
|
815
|
+
this.styles = pkEditableTableStyles;
|
|
816
|
+
}
|
|
817
|
+
static get validators() {
|
|
818
|
+
return [...super.validators, RequiredValidator()];
|
|
819
|
+
}
|
|
820
|
+
willUpdate(changed) {
|
|
821
|
+
if (changed.has("rows")) {
|
|
822
|
+
const incoming = Array.isArray(this.rows) ? this.rows : [];
|
|
823
|
+
const previous = this.internalRows;
|
|
824
|
+
this.internalRows = incoming.map((row, index) => {
|
|
825
|
+
const existingId = typeof row._id === "string" ? row._id : typeof previous[index]?._id === "string" ? String(previous[index]._id) : nextRowId();
|
|
826
|
+
return {
|
|
827
|
+
...row,
|
|
828
|
+
_id: existingId
|
|
829
|
+
};
|
|
830
|
+
});
|
|
831
|
+
this.syncGeneratedModesFromRows();
|
|
832
|
+
this.syncFormValue();
|
|
833
|
+
}
|
|
834
|
+
if (changed.has("allowReorder") || changed.has("disabled")) this.scheduleDndHydration();
|
|
835
|
+
super.willUpdate(changed);
|
|
836
|
+
}
|
|
837
|
+
firstUpdated(changed) {
|
|
838
|
+
super.firstUpdated(changed);
|
|
839
|
+
this.scheduleDndHydration();
|
|
840
|
+
}
|
|
841
|
+
shouldUpdate(changed) {
|
|
842
|
+
if (this.dndController.isSessionActive) return false;
|
|
843
|
+
return super.shouldUpdate(changed);
|
|
844
|
+
}
|
|
845
|
+
updated(changed) {
|
|
846
|
+
super.updated(changed);
|
|
847
|
+
if (this.dndReady && this.allowReorder && !this.disabled) {
|
|
848
|
+
if (!this.dndController.isSessionActive) this.syncDndSortables();
|
|
849
|
+
} else if (this.dndController.isActive && (!this.allowReorder || this.disabled || !this.dndReady)) {
|
|
850
|
+
this.dndController.destroy();
|
|
851
|
+
this.dndRowSignature = "";
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
disconnectedCallback() {
|
|
855
|
+
this.cancelDndHydration();
|
|
856
|
+
this.dndController.destroy();
|
|
857
|
+
this.dndReady = false;
|
|
858
|
+
super.disconnectedCallback();
|
|
859
|
+
}
|
|
860
|
+
/** Serialized rows, used for form submission and required validation (empty when no rows). */
|
|
861
|
+
get value() {
|
|
862
|
+
return this.internalRows.length ? JSON.stringify(this.cleanRows()) : "";
|
|
863
|
+
}
|
|
864
|
+
get validColumns() {
|
|
865
|
+
return (Array.isArray(this.columns) ? this.columns : []).filter((column) => {
|
|
866
|
+
return typeof column?.name === "string" && column.name.trim() !== "";
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
get generatedColumns() {
|
|
870
|
+
return this.validColumns.filter(isGeneratedColumn);
|
|
871
|
+
}
|
|
872
|
+
get showActionsColumn() {
|
|
873
|
+
return this.allowReorder || this.allowDelete || Boolean(this.getRowMenuItems);
|
|
874
|
+
}
|
|
875
|
+
cleanRows() {
|
|
876
|
+
return this.internalRows.map((row) => {
|
|
877
|
+
const { _id, ...rest } = row;
|
|
878
|
+
return rest;
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* Public cell write path for slotted / framework-projected custom cells.
|
|
883
|
+
* Prefer this over mutating `rows` locally so generated columns + events stay in sync.
|
|
884
|
+
*/
|
|
885
|
+
setCellValue(rowIndex, columnName, value) {
|
|
886
|
+
const row = this.internalRows[rowIndex];
|
|
887
|
+
if (!row) return;
|
|
888
|
+
const base = this.validColumns.find((column) => column.name === columnName);
|
|
889
|
+
if (!base) return;
|
|
890
|
+
this.updateCell(rowIndex, this.resolveColumn(row, base, rowIndex), value);
|
|
891
|
+
}
|
|
892
|
+
resolveColumn(row, column, rowIndex) {
|
|
893
|
+
const patch = this.modifyColumn?.(row, column.name, column, rowIndex);
|
|
894
|
+
if (!patch || typeof patch !== "object") return column;
|
|
895
|
+
return {
|
|
896
|
+
...column,
|
|
897
|
+
...patch,
|
|
898
|
+
name: column.name
|
|
899
|
+
};
|
|
900
|
+
}
|
|
901
|
+
resolveRowModifier(row, rowIndex) {
|
|
902
|
+
const patch = this.modifyRow?.(row, rowIndex);
|
|
903
|
+
if (!patch || typeof patch !== "object") return {};
|
|
904
|
+
return patch;
|
|
905
|
+
}
|
|
906
|
+
resolveRowMenuItems(row, rowIndex) {
|
|
907
|
+
const items = this.getRowMenuItems?.(row, rowIndex);
|
|
908
|
+
return Array.isArray(items) ? items.filter((item) => item && typeof item.label === "string") : [];
|
|
909
|
+
}
|
|
910
|
+
syncGeneratedModesFromRows() {
|
|
911
|
+
const generated = this.generatedColumns;
|
|
912
|
+
if (this.internalRows.length === 0 || generated.length === 0) {
|
|
913
|
+
this.generatedCellModes.clear();
|
|
914
|
+
return;
|
|
915
|
+
}
|
|
916
|
+
const validKeys = /* @__PURE__ */ new Set();
|
|
917
|
+
for (const row of this.internalRows) {
|
|
918
|
+
const rowId = String(row._id);
|
|
919
|
+
for (const column of generated) {
|
|
920
|
+
const key = getGeneratedCellKey(rowId, column.name);
|
|
921
|
+
validKeys.add(key);
|
|
922
|
+
if (this.generatedCellModes.has(key)) continue;
|
|
923
|
+
this.generatedCellModes.set(key, isEmptyCellValue(row[column.name]) ? GENERATED_CELL_MODE.EMPTY : GENERATED_CELL_MODE.SEEDED);
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
for (const key of [...this.generatedCellModes.keys()]) if (!validKeys.has(key)) this.generatedCellModes.delete(key);
|
|
927
|
+
}
|
|
928
|
+
syncFormValue() {
|
|
929
|
+
const serialized = JSON.stringify(this.cleanRows());
|
|
930
|
+
this.setFormValue(serialized, serialized);
|
|
931
|
+
}
|
|
932
|
+
restoreFormState(state) {
|
|
933
|
+
if (typeof state !== "string") return;
|
|
934
|
+
try {
|
|
935
|
+
const parsed = JSON.parse(state);
|
|
936
|
+
if (Array.isArray(parsed)) this.rows = parsed;
|
|
937
|
+
} catch {}
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* Inner cell controls (lightswitch, checkbox, select, pickers, inputs) all
|
|
941
|
+
* dispatch `pk-change`/`input`/`change` with `bubbles` + `composed`, so those
|
|
942
|
+
* events would otherwise escape this component's shadow root and masquerade as
|
|
943
|
+
* the table's own events. Consumers bind `pk-change` and read `detail.rows`; a
|
|
944
|
+
* leaked lightswitch `pk-change` carries `{ checked }` (no `rows`), which would
|
|
945
|
+
* reset `rows` to `undefined` and wipe every row. We stop them at the table
|
|
946
|
+
* wrapper — cell `@pk-change`/`@input` handlers already ran at their target, and
|
|
947
|
+
* the table re-dispatches its own `{ rows }` payload from the host in emitChange.
|
|
948
|
+
*/
|
|
949
|
+
stopInnerControlEvent(event) {
|
|
950
|
+
if (event.target !== this) event.stopPropagation();
|
|
951
|
+
}
|
|
952
|
+
emitChange() {
|
|
953
|
+
const rows = this.internalRows.map((row) => ({ ...row }));
|
|
954
|
+
this.rows = rows;
|
|
955
|
+
this.syncFormValue();
|
|
956
|
+
this.dispatchEvent(new CustomEvent("pk-change", {
|
|
957
|
+
detail: { rows },
|
|
958
|
+
bubbles: true,
|
|
959
|
+
composed: true
|
|
960
|
+
}));
|
|
961
|
+
this.dispatchEvent(new Event("input", {
|
|
962
|
+
bubbles: true,
|
|
963
|
+
composed: true
|
|
964
|
+
}));
|
|
965
|
+
this.dispatchEvent(new Event("change", {
|
|
966
|
+
bubbles: true,
|
|
967
|
+
composed: true
|
|
968
|
+
}));
|
|
969
|
+
}
|
|
970
|
+
emitCellChange(rowIndex, columnName, value, row) {
|
|
971
|
+
this.dispatchEvent(new CustomEvent("pk-cell-change", {
|
|
972
|
+
detail: {
|
|
973
|
+
rowIndex,
|
|
974
|
+
columnName,
|
|
975
|
+
value,
|
|
976
|
+
row
|
|
977
|
+
},
|
|
978
|
+
bubbles: true,
|
|
979
|
+
composed: true
|
|
980
|
+
}));
|
|
981
|
+
}
|
|
982
|
+
commitRows(next, cellChanges = []) {
|
|
983
|
+
this.internalRows = next;
|
|
984
|
+
this.emitChange();
|
|
985
|
+
for (const change of cellChanges) this.emitCellChange(change.rowIndex, change.columnName, change.value, change.row);
|
|
986
|
+
}
|
|
987
|
+
updateCell(rowIndex, column, value) {
|
|
988
|
+
const row = this.internalRows[rowIndex];
|
|
989
|
+
if (!row) return;
|
|
990
|
+
if (column.type === "radio") {
|
|
991
|
+
const nextChecked = Boolean(value);
|
|
992
|
+
const allowUnselect = Boolean(column.allowUnselect);
|
|
993
|
+
const next = this.internalRows.map((item) => ({ ...item }));
|
|
994
|
+
const cellChanges = [];
|
|
995
|
+
if (nextChecked) next.forEach((item, index) => {
|
|
996
|
+
const target = index === rowIndex;
|
|
997
|
+
if (Boolean(item[column.name]) !== target) {
|
|
998
|
+
next[index] = {
|
|
999
|
+
...item,
|
|
1000
|
+
[column.name]: target
|
|
1001
|
+
};
|
|
1002
|
+
cellChanges.push({
|
|
1003
|
+
rowIndex: index,
|
|
1004
|
+
columnName: column.name,
|
|
1005
|
+
value: target,
|
|
1006
|
+
row: this.internalRows[index]
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
});
|
|
1010
|
+
else if (allowUnselect && Boolean(row[column.name])) {
|
|
1011
|
+
next[rowIndex] = {
|
|
1012
|
+
...row,
|
|
1013
|
+
[column.name]: false
|
|
1014
|
+
};
|
|
1015
|
+
cellChanges.push({
|
|
1016
|
+
rowIndex,
|
|
1017
|
+
columnName: column.name,
|
|
1018
|
+
value: false,
|
|
1019
|
+
row
|
|
1020
|
+
});
|
|
1021
|
+
} else return;
|
|
1022
|
+
if (cellChanges.length === 0) return;
|
|
1023
|
+
this.commitRows(next, cellChanges);
|
|
1024
|
+
return;
|
|
1025
|
+
}
|
|
1026
|
+
if (isGeneratedColumn(column)) this.generatedCellModes.set(getGeneratedCellKey(String(row._id), column.name), isEmptyCellValue(value) ? GENERATED_CELL_MODE.EMPTY : GENERATED_CELL_MODE.MANUAL);
|
|
1027
|
+
const sourceUpdate = { [column.name]: value };
|
|
1028
|
+
const derivedUpdates = {};
|
|
1029
|
+
for (const targetColumn of this.generatedColumns) {
|
|
1030
|
+
if (targetColumn.source !== column.name) continue;
|
|
1031
|
+
const targetKey = getGeneratedCellKey(String(row._id), targetColumn.name);
|
|
1032
|
+
const currentTargetValue = row[targetColumn.name];
|
|
1033
|
+
const existingMode = this.generatedCellModes.get(targetKey) ?? (isEmptyCellValue(currentTargetValue) ? GENERATED_CELL_MODE.EMPTY : GENERATED_CELL_MODE.SEEDED);
|
|
1034
|
+
if (existingMode === GENERATED_CELL_MODE.MANUAL || existingMode === GENERATED_CELL_MODE.SEEDED) continue;
|
|
1035
|
+
if (targetColumn.type === "handle") {
|
|
1036
|
+
derivedUpdates[targetColumn.name] = generateHandle(String(value ?? ""));
|
|
1037
|
+
this.generatedCellModes.set(targetKey, GENERATED_CELL_MODE.AUTO);
|
|
1038
|
+
} else if (targetColumn.type === "value") {
|
|
1039
|
+
derivedUpdates[targetColumn.name] = value;
|
|
1040
|
+
this.generatedCellModes.set(targetKey, GENERATED_CELL_MODE.AUTO);
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
const allUpdates = {
|
|
1044
|
+
...sourceUpdate,
|
|
1045
|
+
...derivedUpdates
|
|
1046
|
+
};
|
|
1047
|
+
if (!Object.entries(allUpdates).some(([key, nextValue]) => row[key] !== nextValue)) return;
|
|
1048
|
+
const next = this.internalRows.slice();
|
|
1049
|
+
next[rowIndex] = {
|
|
1050
|
+
...row,
|
|
1051
|
+
...allUpdates
|
|
1052
|
+
};
|
|
1053
|
+
const cellChanges = Object.entries(allUpdates).map(([columnName, nextValue]) => ({
|
|
1054
|
+
rowIndex,
|
|
1055
|
+
columnName,
|
|
1056
|
+
value: nextValue,
|
|
1057
|
+
row
|
|
1058
|
+
}));
|
|
1059
|
+
this.commitRows(next, cellChanges);
|
|
1060
|
+
}
|
|
1061
|
+
addRow() {
|
|
1062
|
+
if (this.disabled || !this.allowAdd) return;
|
|
1063
|
+
const row = {
|
|
1064
|
+
_id: nextRowId(),
|
|
1065
|
+
...this.newRowDefaults && typeof this.newRowDefaults === "object" ? this.newRowDefaults : {}
|
|
1066
|
+
};
|
|
1067
|
+
for (const column of this.validColumns) if (!(column.name in row)) row[column.name] = defaultValueForColumn(column);
|
|
1068
|
+
this.internalRows = [...this.internalRows, row];
|
|
1069
|
+
this.syncGeneratedModesFromRows();
|
|
1070
|
+
this.emitChange();
|
|
1071
|
+
}
|
|
1072
|
+
removeRow(rowIndex) {
|
|
1073
|
+
if (this.disabled || !this.allowDelete) return;
|
|
1074
|
+
this.internalRows = this.internalRows.filter((_, index) => index !== rowIndex);
|
|
1075
|
+
this.syncGeneratedModesFromRows();
|
|
1076
|
+
this.emitChange();
|
|
1077
|
+
}
|
|
1078
|
+
moveRow(rowIndex, direction) {
|
|
1079
|
+
const target = rowIndex + direction;
|
|
1080
|
+
if (this.disabled || target < 0 || target >= this.internalRows.length) return;
|
|
1081
|
+
this.commitReorder(rowIndex, target);
|
|
1082
|
+
}
|
|
1083
|
+
commitReorder(fromIndex, toIndex) {
|
|
1084
|
+
if (this.disabled || fromIndex === toIndex || fromIndex < 0 || toIndex < 0 || fromIndex >= this.internalRows.length || toIndex >= this.internalRows.length) return;
|
|
1085
|
+
const next = this.internalRows.slice();
|
|
1086
|
+
const [moved] = next.splice(fromIndex, 1);
|
|
1087
|
+
next.splice(toIndex, 0, moved);
|
|
1088
|
+
this.internalRows = next;
|
|
1089
|
+
this.emitChange();
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Apply DOM-seated order after pointer drag. Uses stable `_id`s so a floated
|
|
1093
|
+
* source row left in the tbody can't skew from/to index arithmetic — and so a
|
|
1094
|
+
* cancelled drag that briefly moved the placeholder can't desync data vs DOM.
|
|
1095
|
+
*/
|
|
1096
|
+
commitReorderByIds(orderedIds) {
|
|
1097
|
+
if (this.disabled || orderedIds.length === 0) return;
|
|
1098
|
+
const byId = new Map(this.internalRows.map((row) => [String(row._id), row]));
|
|
1099
|
+
if (orderedIds.length !== byId.size) return;
|
|
1100
|
+
const next = [];
|
|
1101
|
+
for (const id of orderedIds) {
|
|
1102
|
+
const row = byId.get(id);
|
|
1103
|
+
if (!row) return;
|
|
1104
|
+
next.push(row);
|
|
1105
|
+
}
|
|
1106
|
+
if (next.every((row, index) => row === this.internalRows[index])) return;
|
|
1107
|
+
this.internalRows = next;
|
|
1108
|
+
this.emitChange();
|
|
1109
|
+
}
|
|
1110
|
+
scheduleDndHydration() {
|
|
1111
|
+
this.cancelDndHydration();
|
|
1112
|
+
if (!this.allowReorder || this.disabled) {
|
|
1113
|
+
this.dndReady = false;
|
|
1114
|
+
this.dndController.destroy();
|
|
1115
|
+
return;
|
|
1116
|
+
}
|
|
1117
|
+
if (this.dndReady) return;
|
|
1118
|
+
const enableDnd = () => {
|
|
1119
|
+
this.dndIdleId = null;
|
|
1120
|
+
this.dndTimeoutId = null;
|
|
1121
|
+
this.dndReady = true;
|
|
1122
|
+
};
|
|
1123
|
+
if (typeof window !== "undefined" && typeof window.requestIdleCallback === "function") this.dndIdleId = window.requestIdleCallback(enableDnd, { timeout: 1200 });
|
|
1124
|
+
else this.dndTimeoutId = setTimeout(enableDnd, 250);
|
|
1125
|
+
}
|
|
1126
|
+
cancelDndHydration() {
|
|
1127
|
+
if (this.dndIdleId !== null && typeof window !== "undefined" && typeof window.cancelIdleCallback === "function") {
|
|
1128
|
+
window.cancelIdleCallback(this.dndIdleId);
|
|
1129
|
+
this.dndIdleId = null;
|
|
1130
|
+
}
|
|
1131
|
+
if (this.dndTimeoutId !== null) {
|
|
1132
|
+
clearTimeout(this.dndTimeoutId);
|
|
1133
|
+
this.dndTimeoutId = null;
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
syncDndSortables() {
|
|
1137
|
+
if (this.dndController.isSessionActive) return;
|
|
1138
|
+
const signature = `${this.internalRows.map((row) => String(row._id)).join("\0")}|${this.disabled ? "1" : "0"}`;
|
|
1139
|
+
if (signature === this.dndRowSignature && this.dndController.isActive) return;
|
|
1140
|
+
const rows = [...this.renderRoot.querySelectorAll("tr[data-row-id]:not([data-pk-dnd-placeholder])")];
|
|
1141
|
+
this.dndController.sync(rows.map((row) => ({
|
|
1142
|
+
id: row.dataset.rowId ?? "",
|
|
1143
|
+
element: row,
|
|
1144
|
+
handle: row.querySelector(".action-handle") ?? void 0
|
|
1145
|
+
})).filter((row) => row.id !== ""), this.disabled);
|
|
1146
|
+
this.dndRowSignature = signature;
|
|
1147
|
+
}
|
|
1148
|
+
getCellErrors(rowIndex, columnName) {
|
|
1149
|
+
const errors = (this.fieldName ? this.cellErrors?.[`${this.fieldName}.${rowIndex}.${columnName}`] : void 0) ?? this.cellErrors?.[`${rowIndex}.${columnName}`];
|
|
1150
|
+
if (!errors) return [];
|
|
1151
|
+
return Array.isArray(errors) ? errors.map(String) : [String(errors)];
|
|
1152
|
+
}
|
|
1153
|
+
readValueFromEvent(event) {
|
|
1154
|
+
const detail = event.detail;
|
|
1155
|
+
if (detail && "value" in detail) return String(detail.value ?? "");
|
|
1156
|
+
return String(event.target.value ?? "");
|
|
1157
|
+
}
|
|
1158
|
+
readCheckedFromEvent(event) {
|
|
1159
|
+
const detail = event.detail;
|
|
1160
|
+
if (detail && "checked" in detail) return Boolean(detail.checked);
|
|
1161
|
+
return Boolean(event.target.checked);
|
|
1162
|
+
}
|
|
1163
|
+
renderOptionElements(column) {
|
|
1164
|
+
return normalizeOptions(column.options).map((option) => {
|
|
1165
|
+
return html`<pk-option value=${option.value}>${option.label}</pk-option>`;
|
|
1166
|
+
});
|
|
1167
|
+
}
|
|
1168
|
+
renderSelectLike(column, value, rowIndex, invalid, { combobox = false } = {}) {
|
|
1169
|
+
const current = String(value ?? "");
|
|
1170
|
+
if (combobox) return html`<pk-combobox
|
|
1171
|
+
class="cell-pk-control"
|
|
1172
|
+
size="sm"
|
|
1173
|
+
width="full"
|
|
1174
|
+
allow-custom-value
|
|
1175
|
+
.value=${current}
|
|
1176
|
+
placeholder=${column.placeholder ?? ""}
|
|
1177
|
+
?disabled=${this.disabled}
|
|
1178
|
+
?invalid=${invalid}
|
|
1179
|
+
aria-label=${column.label ?? column.name}
|
|
1180
|
+
@pk-change=${(event) => {
|
|
1181
|
+
this.updateCell(rowIndex, column, this.readValueFromEvent(event));
|
|
1182
|
+
}}
|
|
1183
|
+
>
|
|
1184
|
+
${this.renderOptionElements(column)}
|
|
1185
|
+
</pk-combobox>`;
|
|
1186
|
+
return html`<pk-select
|
|
1187
|
+
class="cell-pk-control"
|
|
1188
|
+
size="xs"
|
|
1189
|
+
width="full"
|
|
1190
|
+
.value=${current}
|
|
1191
|
+
placeholder=${column.placeholder ?? ""}
|
|
1192
|
+
?disabled=${this.disabled}
|
|
1193
|
+
?invalid=${invalid}
|
|
1194
|
+
aria-label=${column.label ?? column.name}
|
|
1195
|
+
@pk-change=${(event) => {
|
|
1196
|
+
this.updateCell(rowIndex, column, this.readValueFromEvent(event));
|
|
1197
|
+
}}
|
|
1198
|
+
>
|
|
1199
|
+
${this.renderOptionElements(column)}
|
|
1200
|
+
</pk-select>`;
|
|
1201
|
+
}
|
|
1202
|
+
renderCell(column, row, rowIndex, invalid) {
|
|
1203
|
+
const value = row[column.name];
|
|
1204
|
+
const type = column.type ?? "text";
|
|
1205
|
+
const onInput = (event) => {
|
|
1206
|
+
this.updateCell(rowIndex, column, this.readValueFromEvent(event));
|
|
1207
|
+
};
|
|
1208
|
+
if (isCustomColumn(column)) return html`<div class="cell-slot">
|
|
1209
|
+
<slot name=${getCustomCellSlotName(String(row._id), column.name)}></slot>
|
|
1210
|
+
</div>`;
|
|
1211
|
+
if (type === "heading") return html`<div class="cell-static cell-heading">${String(value ?? "")}</div>`;
|
|
1212
|
+
if (type === "label") return html`<div class="cell-static">${String(value ?? "")}</div>`;
|
|
1213
|
+
if (type === "textarea") return html`<pk-textarea
|
|
1214
|
+
class="cell-pk-control"
|
|
1215
|
+
fit-cell
|
|
1216
|
+
size="sm"
|
|
1217
|
+
rows="1"
|
|
1218
|
+
.value=${String(value ?? "")}
|
|
1219
|
+
placeholder=${column.placeholder ?? nothing}
|
|
1220
|
+
?disabled=${this.disabled}
|
|
1221
|
+
?invalid=${invalid}
|
|
1222
|
+
aria-label=${column.label ?? column.name}
|
|
1223
|
+
@input=${onInput}
|
|
1224
|
+
></pk-textarea>`;
|
|
1225
|
+
if (type === "date") return html`<pk-date-picker
|
|
1226
|
+
class="cell-pk-control"
|
|
1227
|
+
size="sm"
|
|
1228
|
+
width="full"
|
|
1229
|
+
.value=${String(value ?? "")}
|
|
1230
|
+
placeholder=${column.placeholder ?? ""}
|
|
1231
|
+
?disabled=${this.disabled}
|
|
1232
|
+
?invalid=${invalid}
|
|
1233
|
+
aria-label=${column.label ?? column.name}
|
|
1234
|
+
@pk-change=${(event) => {
|
|
1235
|
+
this.updateCell(rowIndex, column, this.readValueFromEvent(event));
|
|
1236
|
+
}}
|
|
1237
|
+
></pk-date-picker>`;
|
|
1238
|
+
if (type === "time") return html`<pk-time-picker
|
|
1239
|
+
class="cell-pk-control"
|
|
1240
|
+
size="sm"
|
|
1241
|
+
width="full"
|
|
1242
|
+
.value=${String(value ?? "")}
|
|
1243
|
+
placeholder=${column.placeholder ?? ""}
|
|
1244
|
+
?disabled=${this.disabled}
|
|
1245
|
+
?invalid=${invalid}
|
|
1246
|
+
aria-label=${column.label ?? column.name}
|
|
1247
|
+
@pk-change=${(event) => {
|
|
1248
|
+
this.updateCell(rowIndex, column, this.readValueFromEvent(event));
|
|
1249
|
+
}}
|
|
1250
|
+
></pk-time-picker>`;
|
|
1251
|
+
if (type === "number" || type === "email" || type === "url") return html`<pk-input
|
|
1252
|
+
class="cell-pk-control"
|
|
1253
|
+
fit-cell
|
|
1254
|
+
size="xs"
|
|
1255
|
+
type=${type}
|
|
1256
|
+
.value=${String(value ?? "")}
|
|
1257
|
+
placeholder=${column.placeholder ?? nothing}
|
|
1258
|
+
?disabled=${this.disabled}
|
|
1259
|
+
?invalid=${invalid}
|
|
1260
|
+
aria-label=${column.label ?? column.name}
|
|
1261
|
+
@input=${onInput}
|
|
1262
|
+
></pk-input>`;
|
|
1263
|
+
if (type === "select") return this.renderSelectLike(column, value, rowIndex, invalid);
|
|
1264
|
+
if (type === "combobox") return this.renderSelectLike(column, value, rowIndex, invalid, { combobox: true });
|
|
1265
|
+
if (type === "checkbox") return html`<div class="cell-check">
|
|
1266
|
+
<pk-checkbox
|
|
1267
|
+
aria-label=${column.label ?? column.name}
|
|
1268
|
+
.checked=${Boolean(value)}
|
|
1269
|
+
?disabled=${this.disabled}
|
|
1270
|
+
?invalid=${invalid}
|
|
1271
|
+
@pk-change=${(event) => {
|
|
1272
|
+
this.updateCell(rowIndex, column, this.readCheckedFromEvent(event));
|
|
1273
|
+
}}
|
|
1274
|
+
></pk-checkbox>
|
|
1275
|
+
</div>`;
|
|
1276
|
+
if (type === "radio") return html`<div class="cell-check">
|
|
1277
|
+
<pk-checkbox
|
|
1278
|
+
aria-label=${column.label ?? column.name}
|
|
1279
|
+
.checked=${Boolean(value)}
|
|
1280
|
+
?disabled=${this.disabled}
|
|
1281
|
+
?invalid=${invalid}
|
|
1282
|
+
@pk-change=${(event) => {
|
|
1283
|
+
this.updateCell(rowIndex, column, this.readCheckedFromEvent(event));
|
|
1284
|
+
}}
|
|
1285
|
+
></pk-checkbox>
|
|
1286
|
+
</div>`;
|
|
1287
|
+
if (type === "lightswitch") return html`<div class="cell-check cell-check--switch">
|
|
1288
|
+
<pk-lightswitch
|
|
1289
|
+
size="sm"
|
|
1290
|
+
aria-label=${column.label ?? column.name}
|
|
1291
|
+
.checked=${Boolean(value)}
|
|
1292
|
+
?disabled=${this.disabled}
|
|
1293
|
+
?invalid=${invalid}
|
|
1294
|
+
@pk-change=${(event) => {
|
|
1295
|
+
this.updateCell(rowIndex, column, this.readCheckedFromEvent(event));
|
|
1296
|
+
}}
|
|
1297
|
+
></pk-lightswitch>
|
|
1298
|
+
</div>`;
|
|
1299
|
+
if (type === "color") return html`<pk-color-input
|
|
1300
|
+
class="cell-pk-control"
|
|
1301
|
+
fit-cell
|
|
1302
|
+
size="xs"
|
|
1303
|
+
.value=${String(value ?? "")}
|
|
1304
|
+
?disabled=${this.disabled}
|
|
1305
|
+
?invalid=${invalid}
|
|
1306
|
+
aria-label=${column.label ?? column.name}
|
|
1307
|
+
@pk-change=${(event) => {
|
|
1308
|
+
this.updateCell(rowIndex, column, this.readValueFromEvent(event));
|
|
1309
|
+
}}
|
|
1310
|
+
></pk-color-input>`;
|
|
1311
|
+
return html`<pk-input
|
|
1312
|
+
class="cell-pk-control"
|
|
1313
|
+
fit-cell
|
|
1314
|
+
size="xs"
|
|
1315
|
+
type="text"
|
|
1316
|
+
?mono=${type === "handle" || type === "value"}
|
|
1317
|
+
.value=${String(value ?? "")}
|
|
1318
|
+
placeholder=${column.placeholder ?? nothing}
|
|
1319
|
+
?disabled=${this.disabled}
|
|
1320
|
+
?invalid=${invalid}
|
|
1321
|
+
aria-label=${column.label ?? column.name}
|
|
1322
|
+
@input=${onInput}
|
|
1323
|
+
></pk-input>`;
|
|
1324
|
+
}
|
|
1325
|
+
renderExtraMenuItems(row, rowIndex) {
|
|
1326
|
+
const items = this.resolveRowMenuItems(row, rowIndex);
|
|
1327
|
+
if (items.length === 0) return nothing;
|
|
1328
|
+
return html`${items.map((item) => {
|
|
1329
|
+
const iconHtml = startIconHtml(item.icon);
|
|
1330
|
+
return html`<pk-dropdown-item
|
|
1331
|
+
type=${item.type ?? "normal"}
|
|
1332
|
+
value=${item.value ?? item.action ?? ""}
|
|
1333
|
+
radio-group=${item.radioGroup ?? nothing}
|
|
1334
|
+
?checked=${Boolean(item.checked)}
|
|
1335
|
+
?disabled=${this.disabled || Boolean(item.disabled)}
|
|
1336
|
+
@click=${() => {
|
|
1337
|
+
if (this.disabled || item.disabled) return;
|
|
1338
|
+
this.dispatchEvent(new CustomEvent("pk-row-menu-select", {
|
|
1339
|
+
detail: {
|
|
1340
|
+
rowIndex,
|
|
1341
|
+
row,
|
|
1342
|
+
item,
|
|
1343
|
+
action: String(item.action ?? item.value ?? ""),
|
|
1344
|
+
value: String(item.value ?? "")
|
|
1345
|
+
},
|
|
1346
|
+
bubbles: true,
|
|
1347
|
+
composed: true
|
|
1348
|
+
}));
|
|
1349
|
+
}}
|
|
1350
|
+
>
|
|
1351
|
+
${iconHtml ? unsafeHTML(iconHtml) : nothing}
|
|
1352
|
+
${item.label}
|
|
1353
|
+
</pk-dropdown-item>`;
|
|
1354
|
+
})}`;
|
|
1355
|
+
}
|
|
1356
|
+
renderRow(row, rowIndex) {
|
|
1357
|
+
const columns = this.validColumns;
|
|
1358
|
+
const rowCount = this.internalRows.length;
|
|
1359
|
+
const rowId = String(row._id);
|
|
1360
|
+
const rowMod = this.resolveRowModifier(row, rowIndex);
|
|
1361
|
+
const extraMenuItems = this.resolveRowMenuItems(row, rowIndex);
|
|
1362
|
+
const showRowMenu = this.allowReorder || extraMenuItems.length > 0;
|
|
1363
|
+
return html`<tr
|
|
1364
|
+
data-row-id=${rowId}
|
|
1365
|
+
data-tone=${rowMod.tone || nothing}
|
|
1366
|
+
class=${rowMod.class ? classMap(Object.fromEntries(rowMod.class.split(/\s+/).filter(Boolean).map((token) => [token, true]))) : nothing}
|
|
1367
|
+
title=${rowMod.title || nothing}
|
|
1368
|
+
>
|
|
1369
|
+
${columns.map((column) => {
|
|
1370
|
+
const resolved = this.resolveColumn(row, column, rowIndex);
|
|
1371
|
+
const errors = this.getCellErrors(rowIndex, column.name);
|
|
1372
|
+
const columnClass = resolved.class || column.class || "";
|
|
1373
|
+
return html`<td
|
|
1374
|
+
class=${classMap({
|
|
1375
|
+
thin: isThinColumn(resolved),
|
|
1376
|
+
"has-error": errors.length > 0,
|
|
1377
|
+
...columnClass ? Object.fromEntries(columnClass.split(/\s+/).filter(Boolean).map((token) => [token, true])) : {}
|
|
1378
|
+
})}
|
|
1379
|
+
style=${resolved.width || column.width ? `width: ${resolved.width || column.width}` : nothing}
|
|
1380
|
+
title=${errors.length ? errors.join("\n") : nothing}
|
|
1381
|
+
>
|
|
1382
|
+
${this.renderCell(resolved, row, rowIndex, errors.length > 0)}
|
|
1383
|
+
</td>`;
|
|
1384
|
+
})}
|
|
1385
|
+
${this.showActionsColumn ? html`<td class="actions">
|
|
1386
|
+
<div class="row-actions">
|
|
1387
|
+
${this.allowReorder ? html`
|
|
1388
|
+
<span
|
|
1389
|
+
class=${classMap({
|
|
1390
|
+
"action-handle": true,
|
|
1391
|
+
"is-pending": !this.dndReady
|
|
1392
|
+
})}
|
|
1393
|
+
>
|
|
1394
|
+
<pk-button
|
|
1395
|
+
type="button"
|
|
1396
|
+
class="action-btn"
|
|
1397
|
+
variant="none"
|
|
1398
|
+
size="xs"
|
|
1399
|
+
aria-label="Reorder row"
|
|
1400
|
+
?disabled=${this.disabled || !this.dndReady}
|
|
1401
|
+
title=${!this.dndReady && !this.disabled ? "Preparing drag…" : nothing}
|
|
1402
|
+
>${unsafeHTML(START_GRIP_ICON)}</pk-button>
|
|
1403
|
+
</span>` : nothing}
|
|
1404
|
+
${showRowMenu ? html`<pk-dropdown-menu size="sm" placement="bottom-end" side-offset="2">
|
|
1405
|
+
<pk-button
|
|
1406
|
+
slot="trigger"
|
|
1407
|
+
type="button"
|
|
1408
|
+
class="action-btn"
|
|
1409
|
+
variant="none"
|
|
1410
|
+
size="xs"
|
|
1411
|
+
aria-label="Row actions"
|
|
1412
|
+
?disabled=${this.disabled}
|
|
1413
|
+
>${unsafeHTML(START_ELLIPSIS_ICON)}</pk-button>
|
|
1414
|
+
${this.renderExtraMenuItems(row, rowIndex)}
|
|
1415
|
+
${this.allowReorder ? html`
|
|
1416
|
+
<pk-dropdown-item
|
|
1417
|
+
?disabled=${this.disabled || rowIndex === 0}
|
|
1418
|
+
@click=${() => {
|
|
1419
|
+
this.moveRow(rowIndex, -1);
|
|
1420
|
+
}}
|
|
1421
|
+
>
|
|
1422
|
+
${unsafeHTML(START_ARROW_UP_ICON)}
|
|
1423
|
+
Move up
|
|
1424
|
+
</pk-dropdown-item>
|
|
1425
|
+
<pk-dropdown-item
|
|
1426
|
+
?disabled=${this.disabled || rowIndex === rowCount - 1}
|
|
1427
|
+
@click=${() => {
|
|
1428
|
+
this.moveRow(rowIndex, 1);
|
|
1429
|
+
}}
|
|
1430
|
+
>
|
|
1431
|
+
${unsafeHTML(START_ARROW_DOWN_ICON)}
|
|
1432
|
+
Move down
|
|
1433
|
+
</pk-dropdown-item>` : nothing}
|
|
1434
|
+
</pk-dropdown-menu>` : nothing}
|
|
1435
|
+
${this.allowDelete ? html`<pk-button
|
|
1436
|
+
type="button"
|
|
1437
|
+
class="action-btn action-delete"
|
|
1438
|
+
variant="none"
|
|
1439
|
+
size="xs"
|
|
1440
|
+
aria-label="Delete row"
|
|
1441
|
+
?disabled=${this.disabled}
|
|
1442
|
+
@click=${() => {
|
|
1443
|
+
this.removeRow(rowIndex);
|
|
1444
|
+
}}
|
|
1445
|
+
>${unsafeHTML(START_XMARK_ICON)}</pk-button>` : nothing}
|
|
1446
|
+
</div>
|
|
1447
|
+
</td>` : nothing}
|
|
1448
|
+
</tr>`;
|
|
1449
|
+
}
|
|
1450
|
+
render() {
|
|
1451
|
+
const columns = this.validColumns;
|
|
1452
|
+
return html`
|
|
1453
|
+
<div
|
|
1454
|
+
class="et-scroll"
|
|
1455
|
+
@pk-change=${this.stopInnerControlEvent}
|
|
1456
|
+
@input=${this.stopInnerControlEvent}
|
|
1457
|
+
@change=${this.stopInnerControlEvent}
|
|
1458
|
+
>
|
|
1459
|
+
<table class="et">
|
|
1460
|
+
<thead>
|
|
1461
|
+
<tr>
|
|
1462
|
+
${columns.map((column) => {
|
|
1463
|
+
const columnClass = column.class || "";
|
|
1464
|
+
return html`<th
|
|
1465
|
+
class=${classMap({
|
|
1466
|
+
thin: isThinColumn(column),
|
|
1467
|
+
...columnClass ? Object.fromEntries(columnClass.split(/\s+/).filter(Boolean).map((token) => [token, true])) : {}
|
|
1468
|
+
})}
|
|
1469
|
+
style=${column.width ? `width: ${column.width}` : nothing}
|
|
1470
|
+
>
|
|
1471
|
+
${column.label ?? column.name}
|
|
1472
|
+
${column.required ? html`<span class="required">*</span>` : nothing}
|
|
1473
|
+
</th>`;
|
|
1474
|
+
})}
|
|
1475
|
+
${this.showActionsColumn ? html`<th class="actions"></th>` : nothing}
|
|
1476
|
+
</tr>
|
|
1477
|
+
</thead>
|
|
1478
|
+
<tbody>
|
|
1479
|
+
${repeat(this.internalRows, (row) => String(row._id), (row, index) => this.renderRow(row, index))}
|
|
1480
|
+
</tbody>
|
|
1481
|
+
</table>
|
|
1482
|
+
</div>
|
|
1483
|
+
${this.allowAdd ? html`<pk-button
|
|
1484
|
+
type="button"
|
|
1485
|
+
class="add-row"
|
|
1486
|
+
variant="dashed"
|
|
1487
|
+
?disabled=${this.disabled}
|
|
1488
|
+
@click=${() => {
|
|
1489
|
+
this.addRow();
|
|
1490
|
+
}}
|
|
1491
|
+
>
|
|
1492
|
+
${unsafeHTML(START_PLUS_ICON)}
|
|
1493
|
+
${this.addRowLabel || "Add row"}
|
|
1494
|
+
</pk-button>` : nothing}
|
|
1495
|
+
`;
|
|
1496
|
+
}
|
|
1497
|
+
};
|
|
1498
|
+
__decorate([property({ attribute: false })], PkEditableTable.prototype, "columns", void 0);
|
|
1499
|
+
__decorate([property({ attribute: false })], PkEditableTable.prototype, "rows", void 0);
|
|
1500
|
+
__decorate([property({
|
|
1501
|
+
type: Boolean,
|
|
1502
|
+
reflect: true,
|
|
1503
|
+
attribute: "allow-add"
|
|
1504
|
+
})], PkEditableTable.prototype, "allowAdd", void 0);
|
|
1505
|
+
__decorate([property({
|
|
1506
|
+
type: Boolean,
|
|
1507
|
+
reflect: true,
|
|
1508
|
+
attribute: "allow-delete"
|
|
1509
|
+
})], PkEditableTable.prototype, "allowDelete", void 0);
|
|
1510
|
+
__decorate([property({
|
|
1511
|
+
type: Boolean,
|
|
1512
|
+
reflect: true,
|
|
1513
|
+
attribute: "allow-reorder"
|
|
1514
|
+
})], PkEditableTable.prototype, "allowReorder", void 0);
|
|
1515
|
+
__decorate([property({ attribute: "add-row-label" })], PkEditableTable.prototype, "addRowLabel", void 0);
|
|
1516
|
+
__decorate([property({ attribute: "field-name" })], PkEditableTable.prototype, "fieldName", void 0);
|
|
1517
|
+
__decorate([property({ attribute: false })], PkEditableTable.prototype, "cellErrors", void 0);
|
|
1518
|
+
__decorate([property({ attribute: false })], PkEditableTable.prototype, "newRowDefaults", void 0);
|
|
1519
|
+
__decorate([property({ attribute: false })], PkEditableTable.prototype, "modifyColumn", void 0);
|
|
1520
|
+
__decorate([property({ attribute: false })], PkEditableTable.prototype, "modifyRow", void 0);
|
|
1521
|
+
__decorate([property({ attribute: false })], PkEditableTable.prototype, "getRowMenuItems", void 0);
|
|
1522
|
+
__decorate([state()], PkEditableTable.prototype, "internalRows", void 0);
|
|
1523
|
+
__decorate([state()], PkEditableTable.prototype, "dndReady", void 0);
|
|
1524
|
+
PkEditableTable = __decorate([customElement("pk-editable-table")], PkEditableTable);
|
|
1525
|
+
//#endregion
|
|
1526
|
+
export { nextRowId as a, isCustomColumn as i, BUILTIN_COLUMN_TYPES as n, getCustomCellSlotName as r, PkEditableTable as t };
|
|
1527
|
+
|
|
1528
|
+
//# sourceMappingURL=pk-editable-table-pBkD6izs.js.map
|