@adapttable/element-plus 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ElementColumnMenuPanel-D7SdfclW.js → ElementColumnMenuPanel-D9oWJf02.js} +10 -5
- package/dist/ElementColumnMenuPanel-D9oWJf02.js.map +1 -0
- package/dist/{ElementColumnMenuPanel-DRQbZVow.cjs → ElementColumnMenuPanel-DavsUQAR.cjs} +10 -5
- package/dist/ElementColumnMenuPanel-DavsUQAR.cjs.map +1 -0
- package/dist/{ElementFilterSurface-DcPyYCK-.cjs → ElementFilterSurface-B8Fo3hPb.cjs} +7 -1
- package/dist/ElementFilterSurface-B8Fo3hPb.cjs.map +1 -0
- package/dist/{ElementFilterSurface-DdvPfm1N.js → ElementFilterSurface-BR_nBvZU.js} +8 -2
- package/dist/ElementFilterSurface-BR_nBvZU.js.map +1 -0
- package/dist/batch-editing.cjs +1 -1
- package/dist/batch-editing.js +1 -1
- package/dist/{column-menu-CfqfyZzs.js → column-menu-C6gwlyUQ.js} +2 -2
- package/dist/{column-menu-CfqfyZzs.js.map → column-menu-C6gwlyUQ.js.map} +1 -1
- package/dist/{column-menu-DfTLlqC-.cjs → column-menu-CtaKQS3b.cjs} +2 -2
- package/dist/{column-menu-DfTLlqC-.cjs.map → column-menu-CtaKQS3b.cjs.map} +1 -1
- package/dist/column-menu.cjs +1 -1
- package/dist/column-menu.js +1 -1
- package/dist/{editing-BX-jUtdO.cjs → editing-BMtWRqqJ.cjs} +8 -3
- package/dist/editing-BMtWRqqJ.cjs.map +1 -0
- package/dist/editing-BnLdNDlo.d.ts.map +1 -1
- package/dist/editing-Cg6ZNvSa.d.cts.map +1 -1
- package/dist/{editing-C1Hy-MCQ.js → editing-CohAxA65.js} +8 -3
- package/dist/editing-CohAxA65.js.map +1 -0
- package/dist/editing.cjs +1 -1
- package/dist/editing.js +1 -1
- package/dist/{filters-BA8vjGzr.cjs → filters-2G3MfNF7.cjs} +12 -4
- package/dist/filters-2G3MfNF7.cjs.map +1 -0
- package/dist/{filters-Dg22pfUy.js → filters-DD-qeRIb.js} +12 -4
- package/dist/filters-DD-qeRIb.js.map +1 -0
- package/dist/filters.cjs +2 -2
- package/dist/filters.js +2 -2
- package/dist/grouping-panel.cjs +9 -7
- package/dist/grouping-panel.cjs.map +1 -1
- package/dist/grouping-panel.js +9 -7
- package/dist/grouping-panel.js.map +1 -1
- package/dist/{header-filters-B_WFdnIO.js → header-filters-Chknfchw.js} +2 -2
- package/dist/{header-filters-B_WFdnIO.js.map → header-filters-Chknfchw.js.map} +1 -1
- package/dist/{header-filters-DnlmROS8.cjs → header-filters-D71v75Us.cjs} +2 -2
- package/dist/{header-filters-DnlmROS8.cjs.map → header-filters-D71v75Us.cjs.map} +1 -1
- package/dist/header-filters.cjs +1 -1
- package/dist/header-filters.js +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/preset.cjs +4 -4
- package/dist/preset.js +4 -4
- package/dist/{saved-views-DLiRBZ13.cjs → saved-views-BTJxWOyY.cjs} +2 -2
- package/dist/{saved-views-DLiRBZ13.cjs.map → saved-views-BTJxWOyY.cjs.map} +1 -1
- package/dist/{saved-views-BtC15-kG.js → saved-views-DW8WybwV.js} +2 -2
- package/dist/{saved-views-BtC15-kG.js.map → saved-views-DW8WybwV.js.map} +1 -1
- package/dist/saved-views.cjs +1 -1
- package/dist/saved-views.js +1 -1
- package/dist/styles.css +258 -1
- package/package.json +3 -3
- package/dist/ElementColumnMenuPanel-D7SdfclW.js.map +0 -1
- package/dist/ElementColumnMenuPanel-DRQbZVow.cjs.map +0 -1
- package/dist/ElementFilterSurface-DcPyYCK-.cjs.map +0 -1
- package/dist/ElementFilterSurface-DdvPfm1N.js.map +0 -1
- package/dist/editing-BX-jUtdO.cjs.map +0 -1
- package/dist/editing-C1Hy-MCQ.js.map +0 -1
- package/dist/filters-BA8vjGzr.cjs.map +0 -1
- package/dist/filters-Dg22pfUy.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as elementButton } from "./button-DwB4UxI2.js";
|
|
2
2
|
import { t as _sfc_main } from "./ElementInput-BsoAvPfO.js";
|
|
3
3
|
import { t as ElementCard } from "./ElementCard-DZdAU6x8.js";
|
|
4
|
-
import { t as ElementColumnMenuPanel } from "./ElementColumnMenuPanel-
|
|
4
|
+
import { t as ElementColumnMenuPanel } from "./ElementColumnMenuPanel-D9oWJf02.js";
|
|
5
5
|
import { defineComponent, h } from "vue";
|
|
6
6
|
import { SAVED_VIEWS_CONTROL, SavedViewsMenuChrome, SavedViewsPanelChrome, extendFeature, managedOverlayPanel, slotRender } from "@adapttable/vue/adapter";
|
|
7
7
|
import { ElTag } from "element-plus";
|
|
@@ -132,4 +132,4 @@ function savedViews$1(options) {
|
|
|
132
132
|
//#endregion
|
|
133
133
|
export { savedViews$1 as n, SavedViewsPanel as t };
|
|
134
134
|
|
|
135
|
-
//# sourceMappingURL=saved-views-
|
|
135
|
+
//# sourceMappingURL=saved-views-DW8WybwV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saved-views-BtC15-kG.js","names":["ElementInput","savedViews","bindingSavedViews"],"sources":["../src/views/elementSavedViewsControls.ts","../src/saved-views.ts"],"sourcesContent":["import {\n managedOverlayPanel,\n type SavedViewsMenuSlots,\n type SavedViewsPanelSlots,\n} from \"@adapttable/vue/adapter\";\nimport { ElTag } from \"element-plus\";\nimport { h } from \"vue\";\n\nimport { ElementColumnMenuPanel } from \"../columns/ElementColumnMenuPanel\";\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport { ElementCard } from \"../presentation/ElementCard\";\nimport type { DataTableClassNames } from \"../types\";\nexport const elementSavedViewsMenuSlots: SavedViewsMenuSlots = {\n Trigger: ({ attrs, label }) => elementButton(attrs, label),\n Button: ({ attrs, label }) => elementButton(attrs, label),\n Input: ({ attrs, value, onChange }) =>\n h(ElementInput, { ...attrs, value, onChange }),\n Panel: managedOverlayPanel((control) =>\n h(ElementColumnMenuPanel, {\n control,\n initialFocus: 'input[data-adapttable-part=\"views-input\"]',\n })\n ),\n};\nexport function elementSavedViewsPanelSlots(\n names: () => DataTableClassNames\n): SavedViewsPanelSlots {\n return {\n Surface: (props) =>\n h(\n ElementCard,\n {\n attrs: {\n \"data-adapttable-part\": props[\"data-adapttable-part\"],\n class: props.className,\n },\n },\n {\n default: () => [\n h(\n \"h2\",\n { \"data-adapttable-part\": \"saved-views-title\" },\n props.title\n ),\n props.children,\n props.footer\n ? h(\"span\", { \"data-adapttable-part\": \"saved-views-footer\" }, [\n props.footer,\n ])\n : null,\n ],\n }\n ),\n Row: (props) =>\n h(\n \"div\",\n {\n key: props.viewName,\n class: names().viewsRow,\n \"data-adapttable-part\": props[\"data-adapttable-part\"],\n style: props.layout.row,\n },\n [\n h(\n \"div\",\n {\n \"data-adapttable-part\": \"saved-view-caption\",\n style: props.layout.caption,\n },\n [\n props.isEditing\n ? props.name\n : elementButton(\n {\n type: \"button\",\n title: props.applyLabel,\n class: names().viewsItem,\n onClick: props.onApply,\n },\n [props.name]\n ),\n props.isDefault\n ? h(\n ElTag,\n { \"data-adapttable-part\": \"saved-view-default\" },\n { default: () => props.defaultLabel }\n )\n : null,\n props.readOnly\n ? h(\n ElTag,\n { \"data-adapttable-part\": \"saved-view-readonly\" },\n { default: () => props.readOnlyLabel }\n )\n : null,\n ]\n ),\n h(\n \"div\",\n {\n \"data-adapttable-part\": \"saved-view-controls\",\n style: props.layout.controls,\n },\n props.controls.map((control) =>\n elementButton(\n {\n key: control.key,\n type: \"button\",\n class: names().viewsDelete,\n title: control.label,\n \"aria-label\": control.label,\n \"aria-pressed\": control.pressed,\n disabled: !control.onPress,\n onClick: control.onPress,\n style: props.layout.control,\n },\n [control.icon]\n )\n )\n ),\n ]\n ),\n Input: (props) =>\n h(ElementInput, {\n inputRef: (element) => {\n if (element instanceof HTMLInputElement || element === null)\n props.ref(element);\n },\n class: names().viewsInput,\n \"aria-label\": props.label,\n value: props.value,\n onChange: props.onChange,\n onKeydown: (event: KeyboardEvent) => {\n if (event.isComposing) return;\n if (event.key === \"Enter\") {\n event.preventDefault();\n props.onCommit();\n }\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n props.onCancel();\n }\n },\n }),\n Empty: ({ message }) => h(\"p\", message),\n };\n}\n","import type { StaticTableFeature, UseSavedViewsOptions } from \"@adapttable/vue\";\nimport {\n extendFeature,\n SAVED_VIEWS_CONTROL,\n SavedViewsMenuChrome,\n SavedViewsPanelChrome,\n type SavedViewsPanelChromeProps,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { savedViews as bindingSavedViews } from \"@adapttable/vue/features\";\nimport { defineComponent, h, type MaybeRefOrGetter, type PropType } from \"vue\";\n\nimport type { DataTableClassNames } from \"./types\";\nimport {\n elementSavedViewsMenuSlots,\n elementSavedViewsPanelSlots,\n} from \"./views/elementSavedViewsControls\";\n\nexport type { DataTableClassNames } from \"./types\";\nexport type {\n SavedView,\n SavedViewsStore,\n UseSavedViewsOptions,\n} from \"@adapttable/vue\";\nexport interface SavedViewsPanelProps extends Omit<\n SavedViewsPanelChromeProps,\n \"slots\"\n> {\n readonly classNames?: DataTableClassNames;\n}\n\n/** Element Plus management surface over the binding's rename and ordering model. */\nexport const SavedViewsPanel = defineComponent(\n (props: SavedViewsPanelProps) => {\n const slots = elementSavedViewsPanelSlots(() => props.classNames ?? {});\n return () => {\n const { classNames, ...panelProps } = props;\n return h(SavedViewsPanelChrome, {\n ...panelProps,\n className: [props.className, classNames?.viewsPanel]\n .filter(Boolean)\n .join(\" \"),\n slots,\n });\n };\n },\n {\n name: \"SavedViewsPanel\",\n props: {\n views: { type: Array as PropType<SavedViewsPanelProps[\"views\"]> },\n onApply: { type: Function as PropType<SavedViewsPanelProps[\"onApply\"]> },\n onRename: {\n type: Function as PropType<SavedViewsPanelProps[\"onRename\"]>,\n },\n onMove: { type: Function as PropType<SavedViewsPanelProps[\"onMove\"]> },\n onSetDefault: {\n type: Function as PropType<SavedViewsPanelProps[\"onSetDefault\"]>,\n },\n onRemove: {\n type: Function as PropType<SavedViewsPanelProps[\"onRemove\"]>,\n },\n labels: { type: Object as PropType<SavedViewsPanelProps[\"labels\"]> },\n footer: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n SavedViewsPanelProps[\"footer\"]\n >,\n default: undefined,\n },\n className: {\n type: String as PropType<SavedViewsPanelProps[\"className\"]>,\n },\n classNames: {\n type: Object as PropType<SavedViewsPanelProps[\"classNames\"]>,\n },\n },\n }\n);\n\n/** The table creates the saved-view model once; this fill only renders it. */\nexport function savedViews(\n options: MaybeRefOrGetter<UseSavedViewsOptions>\n): StaticTableFeature {\n return extendFeature(bindingSavedViews(options), [\n slotRender(SAVED_VIEWS_CONTROL, (props) =>\n h(SavedViewsMenuChrome, { ...props, slots: elementSavedViewsMenuSlots })\n ),\n ]);\n}\n"],"mappings":";;;;;;;;;AAaA,MAAa,6BAAkD;CAC7D,UAAU,EAAE,OAAO,YAAY,cAAc,OAAO,KAAK;CACzD,SAAS,EAAE,OAAO,YAAY,cAAc,OAAO,KAAK;CACxD,QAAQ,EAAE,OAAO,OAAO,eACtB,EAAEA,WAAc;EAAE,GAAG;EAAO;EAAO;CAAS,CAAC;CAC/C,OAAO,qBAAqB,YAC1B,EAAE,wBAAwB;EACxB;EACA,cAAc;CAChB,CAAC,CACH;AACF;AACA,SAAgB,4BACd,OACsB;CACtB,OAAO;EACL,UAAU,UACR,EACE,aACA,EACE,OAAO;GACL,wBAAwB,MAAM;GAC9B,OAAO,MAAM;EACf,EACF,GACA,EACE,eAAe;GACb,EACE,MACA,EAAE,wBAAwB,oBAAoB,GAC9C,MAAM,KACR;GACA,MAAM;GACN,MAAM,SACF,EAAE,QAAQ,EAAE,wBAAwB,qBAAqB,GAAG,CAC1D,MAAM,M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AAe;KACrB,MAAM,gBAAgB;KACtB,MAAM,SAAS;IACjB;GACF;EACF,CAAC;EACH,QAAQ,EAAE,cAAc,EAAE,KAAK,OAAO;CACxC;AACF;;;;ACpHA,MAAa,kBAAkB,iBAC5B,UAAgC;CAC/B,MAAM,QAAQ,kCAAkC,MAAM,cAAc,CAAC,CAAC;CACtE,aAAa;EACX,MAAM,EAAE,YAAY,GAAG,eAAe;EACtC,OAAO,EAAE,uBAAuB;GAC9B,GAAG;GACH,WAAW,CAAC,MAAM,WAAW,YAAY,UAAU,CAAC,CACjD,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;GACX;EACF,CAAC;CACH;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EAAE,MAAM,MAAiD;EAChE,SAAS,EAAE,MAAM,SAAsD;EACvE,UAAU,EACR,MAAM,SACR;EACA,QAAQ,EAAE,MAAM,SAAqD;EACrE,cAAc,EACZ,MAAM,SACR;EACA,UAAU,EACR,MAAM,SACR;EACA,QAAQ,EAAE,MAAM,OAAmD;EACnE,QAAQ;GACN,MAAM;IAAC;IAAQ;IAAQ;IAAS;IAAO;GAAM;GAG7C,SAAS,KAAA;EACX;EACA,WAAW,EACT,MAAM,OACR;EACA,YAAY,EACV,MAAM,OACR;CACF;AACF,CACF;;AAGA,SAAgBC,aACd,SACoB;CACpB,OAAO,cAAcC,WAAkB,OAAO,GAAG,CAC/C,WAAW,sBAAsB,UAC/B,EAAE,sBAAsB;EAAE,GAAG;EAAO,OAAO;CAA2B,CAAC,CACzE,CACF,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"saved-views-DW8WybwV.js","names":["ElementInput","savedViews","bindingSavedViews"],"sources":["../src/views/elementSavedViewsControls.ts","../src/saved-views.ts"],"sourcesContent":["import {\n managedOverlayPanel,\n type SavedViewsMenuSlots,\n type SavedViewsPanelSlots,\n} from \"@adapttable/vue/adapter\";\nimport { ElTag } from \"element-plus\";\nimport { h } from \"vue\";\n\nimport { ElementColumnMenuPanel } from \"../columns/ElementColumnMenuPanel\";\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport { ElementCard } from \"../presentation/ElementCard\";\nimport type { DataTableClassNames } from \"../types\";\nexport const elementSavedViewsMenuSlots: SavedViewsMenuSlots = {\n Trigger: ({ attrs, label }) => elementButton(attrs, label),\n Button: ({ attrs, label }) => elementButton(attrs, label),\n Input: ({ attrs, value, onChange }) =>\n h(ElementInput, { ...attrs, value, onChange }),\n Panel: managedOverlayPanel((control) =>\n h(ElementColumnMenuPanel, {\n control,\n initialFocus: 'input[data-adapttable-part=\"views-input\"]',\n })\n ),\n};\nexport function elementSavedViewsPanelSlots(\n names: () => DataTableClassNames\n): SavedViewsPanelSlots {\n return {\n Surface: (props) =>\n h(\n ElementCard,\n {\n attrs: {\n \"data-adapttable-part\": props[\"data-adapttable-part\"],\n class: props.className,\n },\n },\n {\n default: () => [\n h(\n \"h2\",\n { \"data-adapttable-part\": \"saved-views-title\" },\n props.title\n ),\n props.children,\n props.footer\n ? h(\"span\", { \"data-adapttable-part\": \"saved-views-footer\" }, [\n props.footer,\n ])\n : null,\n ],\n }\n ),\n Row: (props) =>\n h(\n \"div\",\n {\n key: props.viewName,\n class: names().viewsRow,\n \"data-adapttable-part\": props[\"data-adapttable-part\"],\n style: props.layout.row,\n },\n [\n h(\n \"div\",\n {\n \"data-adapttable-part\": \"saved-view-caption\",\n style: props.layout.caption,\n },\n [\n props.isEditing\n ? props.name\n : elementButton(\n {\n type: \"button\",\n title: props.applyLabel,\n class: names().viewsItem,\n onClick: props.onApply,\n },\n [props.name]\n ),\n props.isDefault\n ? h(\n ElTag,\n { \"data-adapttable-part\": \"saved-view-default\" },\n { default: () => props.defaultLabel }\n )\n : null,\n props.readOnly\n ? h(\n ElTag,\n { \"data-adapttable-part\": \"saved-view-readonly\" },\n { default: () => props.readOnlyLabel }\n )\n : null,\n ]\n ),\n h(\n \"div\",\n {\n \"data-adapttable-part\": \"saved-view-controls\",\n style: props.layout.controls,\n },\n props.controls.map((control) =>\n elementButton(\n {\n key: control.key,\n type: \"button\",\n class: names().viewsDelete,\n title: control.label,\n \"aria-label\": control.label,\n \"aria-pressed\": control.pressed,\n disabled: !control.onPress,\n onClick: control.onPress,\n style: props.layout.control,\n },\n [control.icon]\n )\n )\n ),\n ]\n ),\n Input: (props) =>\n h(ElementInput, {\n inputRef: (element) => {\n if (element instanceof HTMLInputElement || element === null)\n props.ref(element);\n },\n class: names().viewsInput,\n \"aria-label\": props.label,\n value: props.value,\n onChange: props.onChange,\n onKeydown: (event: KeyboardEvent) => {\n if (event.isComposing) return;\n if (event.key === \"Enter\") {\n event.preventDefault();\n props.onCommit();\n }\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n props.onCancel();\n }\n },\n }),\n Empty: ({ message }) => h(\"p\", message),\n };\n}\n","import type { StaticTableFeature, UseSavedViewsOptions } from \"@adapttable/vue\";\nimport {\n extendFeature,\n SAVED_VIEWS_CONTROL,\n SavedViewsMenuChrome,\n SavedViewsPanelChrome,\n type SavedViewsPanelChromeProps,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { savedViews as bindingSavedViews } from \"@adapttable/vue/features\";\nimport { defineComponent, h, type MaybeRefOrGetter, type PropType } from \"vue\";\n\nimport type { DataTableClassNames } from \"./types\";\nimport {\n elementSavedViewsMenuSlots,\n elementSavedViewsPanelSlots,\n} from \"./views/elementSavedViewsControls\";\n\nexport type { DataTableClassNames } from \"./types\";\nexport type {\n SavedView,\n SavedViewsStore,\n UseSavedViewsOptions,\n} from \"@adapttable/vue\";\nexport interface SavedViewsPanelProps extends Omit<\n SavedViewsPanelChromeProps,\n \"slots\"\n> {\n readonly classNames?: DataTableClassNames;\n}\n\n/** Element Plus management surface over the binding's rename and ordering model. */\nexport const SavedViewsPanel = defineComponent(\n (props: SavedViewsPanelProps) => {\n const slots = elementSavedViewsPanelSlots(() => props.classNames ?? {});\n return () => {\n const { classNames, ...panelProps } = props;\n return h(SavedViewsPanelChrome, {\n ...panelProps,\n className: [props.className, classNames?.viewsPanel]\n .filter(Boolean)\n .join(\" \"),\n slots,\n });\n };\n },\n {\n name: \"SavedViewsPanel\",\n props: {\n views: { type: Array as PropType<SavedViewsPanelProps[\"views\"]> },\n onApply: { type: Function as PropType<SavedViewsPanelProps[\"onApply\"]> },\n onRename: {\n type: Function as PropType<SavedViewsPanelProps[\"onRename\"]>,\n },\n onMove: { type: Function as PropType<SavedViewsPanelProps[\"onMove\"]> },\n onSetDefault: {\n type: Function as PropType<SavedViewsPanelProps[\"onSetDefault\"]>,\n },\n onRemove: {\n type: Function as PropType<SavedViewsPanelProps[\"onRemove\"]>,\n },\n labels: { type: Object as PropType<SavedViewsPanelProps[\"labels\"]> },\n footer: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n SavedViewsPanelProps[\"footer\"]\n >,\n default: undefined,\n },\n className: {\n type: String as PropType<SavedViewsPanelProps[\"className\"]>,\n },\n classNames: {\n type: Object as PropType<SavedViewsPanelProps[\"classNames\"]>,\n },\n },\n }\n);\n\n/** The table creates the saved-view model once; this fill only renders it. */\nexport function savedViews(\n options: MaybeRefOrGetter<UseSavedViewsOptions>\n): StaticTableFeature {\n return extendFeature(bindingSavedViews(options), [\n slotRender(SAVED_VIEWS_CONTROL, (props) =>\n h(SavedViewsMenuChrome, { ...props, slots: elementSavedViewsMenuSlots })\n ),\n ]);\n}\n"],"mappings":";;;;;;;;;AAaA,MAAa,6BAAkD;CAC7D,UAAU,EAAE,OAAO,YAAY,cAAc,OAAO,KAAK;CACzD,SAAS,EAAE,OAAO,YAAY,cAAc,OAAO,KAAK;CACxD,QAAQ,EAAE,OAAO,OAAO,eACtB,EAAEA,WAAc;EAAE,GAAG;EAAO;EAAO;CAAS,CAAC;CAC/C,OAAO,qBAAqB,YAC1B,EAAE,wBAAwB;EACxB;EACA,cAAc;CAChB,CAAC,CACH;AACF;AACA,SAAgB,4BACd,OACsB;CACtB,OAAO;EACL,UAA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1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_saved_views = require("./saved-views-
|
|
2
|
+
const require_saved_views = require("./saved-views-BTJxWOyY.cjs");
|
|
3
3
|
exports.SavedViewsPanel = require_saved_views.SavedViewsPanel;
|
|
4
4
|
exports.savedViews = require_saved_views.savedViews;
|
package/dist/saved-views.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as savedViews, t as SavedViewsPanel } from "./saved-views-
|
|
1
|
+
import { n as savedViews, t as SavedViewsPanel } from "./saved-views-DW8WybwV.js";
|
|
2
2
|
export { SavedViewsPanel, savedViews };
|
package/dist/styles.css
CHANGED
|
@@ -330,7 +330,9 @@
|
|
|
330
330
|
) {
|
|
331
331
|
padding-inline: 0;
|
|
332
332
|
margin-inline-start: 0;
|
|
333
|
-
|
|
333
|
+
inline-size: 2rem;
|
|
334
|
+
min-inline-size: 2rem;
|
|
335
|
+
min-block-size: 2rem;
|
|
334
336
|
}
|
|
335
337
|
.adapttable-element-plus-column-panel
|
|
336
338
|
[data-adapttable-part="column-menu-submenu"] {
|
|
@@ -393,6 +395,243 @@
|
|
|
393
395
|
.adapttable-element-plus [data-adapttable-part="header-rename-error"] {
|
|
394
396
|
color: var(--el-color-danger);
|
|
395
397
|
}
|
|
398
|
+
|
|
399
|
+
/* An omitted mobile label leaves the value the full card width. */
|
|
400
|
+
.adapttable-element-plus
|
|
401
|
+
[data-adapttable-part="card-row"]:has(
|
|
402
|
+
> [data-adapttable-part="card-label"]:empty
|
|
403
|
+
) {
|
|
404
|
+
display: block;
|
|
405
|
+
}
|
|
406
|
+
.adapttable-element-plus [data-adapttable-part="card-label"]:empty {
|
|
407
|
+
display: none;
|
|
408
|
+
}
|
|
409
|
+
.adapttable-element-plus
|
|
410
|
+
[data-adapttable-part="card-row"]:has(
|
|
411
|
+
> [data-adapttable-part="card-label"]:empty
|
|
412
|
+
)
|
|
413
|
+
> [data-adapttable-part="card-value"] {
|
|
414
|
+
margin: 0;
|
|
415
|
+
text-align: start;
|
|
416
|
+
font-size: 1.05em;
|
|
417
|
+
font-weight: 600;
|
|
418
|
+
}
|
|
419
|
+
.adapttable-element-plus [data-adapttable-part="group-card"] > div:first-child {
|
|
420
|
+
display: flex;
|
|
421
|
+
align-items: center;
|
|
422
|
+
gap: 0.5rem;
|
|
423
|
+
}
|
|
424
|
+
.adapttable-element-plus
|
|
425
|
+
[data-adapttable-part="group-card"]
|
|
426
|
+
[data-adapttable-part="group-aggregate"] {
|
|
427
|
+
margin-inline-start: 0.375rem;
|
|
428
|
+
font-variant-numeric: tabular-nums;
|
|
429
|
+
}
|
|
430
|
+
.adapttable-element-plus
|
|
431
|
+
[data-adapttable-part="group-row"]
|
|
432
|
+
[data-adapttable-part="group-label"] {
|
|
433
|
+
margin-inline-start: 0.5rem;
|
|
434
|
+
font-weight: 600;
|
|
435
|
+
}
|
|
436
|
+
.adapttable-element-plus
|
|
437
|
+
[data-adapttable-part="group-row"]
|
|
438
|
+
[data-adapttable-part="group-count"] {
|
|
439
|
+
margin-inline-start: 0.375rem;
|
|
440
|
+
font-size: 0.875em;
|
|
441
|
+
}
|
|
442
|
+
.adapttable-element-plus [data-adapttable-part="chips"] {
|
|
443
|
+
display: flex;
|
|
444
|
+
flex-wrap: wrap;
|
|
445
|
+
align-items: center;
|
|
446
|
+
gap: 0.5rem;
|
|
447
|
+
margin: 0;
|
|
448
|
+
padding: 0.5rem 0;
|
|
449
|
+
list-style: none;
|
|
450
|
+
min-inline-size: 0;
|
|
451
|
+
}
|
|
452
|
+
.adapttable-element-plus [data-adapttable-part="chip"] {
|
|
453
|
+
display: inline-flex;
|
|
454
|
+
align-items: center;
|
|
455
|
+
gap: 0.375rem;
|
|
456
|
+
max-inline-size: 100%;
|
|
457
|
+
padding-inline-start: 0.625rem;
|
|
458
|
+
border: 1px solid var(--el-color-primary-light-7);
|
|
459
|
+
border-radius: 6px;
|
|
460
|
+
background: var(--el-color-primary-light-9);
|
|
461
|
+
color: var(--el-color-primary);
|
|
462
|
+
font-size: 0.8125rem;
|
|
463
|
+
overflow-wrap: anywhere;
|
|
464
|
+
}
|
|
465
|
+
.adapttable-element-plus [data-adapttable-part="chip"]:last-child {
|
|
466
|
+
padding-inline-start: 0;
|
|
467
|
+
border: 0;
|
|
468
|
+
background: transparent;
|
|
469
|
+
}
|
|
470
|
+
.adapttable-element-plus [data-adapttable-part="chip-remove"] {
|
|
471
|
+
flex: 0 0 auto;
|
|
472
|
+
margin: 0;
|
|
473
|
+
min-inline-size: 2rem;
|
|
474
|
+
min-block-size: 2rem;
|
|
475
|
+
}
|
|
476
|
+
@media (max-width: 767px) {
|
|
477
|
+
.adapttable-element-plus [data-adapttable-part="chip-remove"] {
|
|
478
|
+
min-inline-size: 44px;
|
|
479
|
+
min-block-size: 44px;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.adapttable-element-grouping > .el-card__body {
|
|
484
|
+
display: flex;
|
|
485
|
+
flex-wrap: wrap;
|
|
486
|
+
align-items: center;
|
|
487
|
+
gap: 0.5rem;
|
|
488
|
+
padding: 0.75rem 1rem;
|
|
489
|
+
}
|
|
490
|
+
.adapttable-element-grouping-label,
|
|
491
|
+
.adapttable-element-grouping
|
|
492
|
+
[data-adapttable-part="grouping-aggregations"]::before {
|
|
493
|
+
font-size: 0.8125rem;
|
|
494
|
+
font-weight: 600;
|
|
495
|
+
color: var(--el-text-color-secondary);
|
|
496
|
+
margin-inline-end: 0.5rem;
|
|
497
|
+
}
|
|
498
|
+
.adapttable-element-grouping [data-adapttable-part="grouping-add"] {
|
|
499
|
+
inline-size: 15rem;
|
|
500
|
+
max-inline-size: 100%;
|
|
501
|
+
}
|
|
502
|
+
.adapttable-element-grouping [data-adapttable-part="grouping-chip"] {
|
|
503
|
+
block-size: auto;
|
|
504
|
+
padding: 0.125rem 0.25rem;
|
|
505
|
+
}
|
|
506
|
+
.adapttable-element-grouping
|
|
507
|
+
[data-adapttable-part="grouping-chip"]
|
|
508
|
+
.el-tag__content {
|
|
509
|
+
display: inline-flex;
|
|
510
|
+
align-items: center;
|
|
511
|
+
}
|
|
512
|
+
.adapttable-element-grouping [data-adapttable-part="grouping-aggregations"] {
|
|
513
|
+
display: flex;
|
|
514
|
+
flex-wrap: wrap;
|
|
515
|
+
align-items: center;
|
|
516
|
+
gap: 0.75rem;
|
|
517
|
+
flex-basis: 100%;
|
|
518
|
+
min-inline-size: 0;
|
|
519
|
+
margin: 0.25rem 0 0;
|
|
520
|
+
padding: 0.75rem 0 0;
|
|
521
|
+
border: 0;
|
|
522
|
+
border-block-start: 1px solid var(--el-border-color-lighter);
|
|
523
|
+
}
|
|
524
|
+
.adapttable-element-grouping
|
|
525
|
+
[data-adapttable-part="grouping-aggregations"]::before {
|
|
526
|
+
content: attr(aria-label);
|
|
527
|
+
}
|
|
528
|
+
.adapttable-element-grouping [data-adapttable-aggregation],
|
|
529
|
+
.adapttable-element-grouping
|
|
530
|
+
[data-adapttable-part="grouping-aggregation-item"] {
|
|
531
|
+
display: inline-flex;
|
|
532
|
+
flex-wrap: wrap;
|
|
533
|
+
align-items: center;
|
|
534
|
+
gap: 0.5rem;
|
|
535
|
+
min-inline-size: 0;
|
|
536
|
+
max-inline-size: 100%;
|
|
537
|
+
}
|
|
538
|
+
.adapttable-element-grouping
|
|
539
|
+
[data-adapttable-part="grouping-aggregation-operation"] {
|
|
540
|
+
inline-size: 8rem;
|
|
541
|
+
max-inline-size: 100%;
|
|
542
|
+
}
|
|
543
|
+
.adapttable-element-grouping [data-adapttable-part="grouping-aggregation-add"] {
|
|
544
|
+
display: flex;
|
|
545
|
+
flex-wrap: wrap;
|
|
546
|
+
align-items: center;
|
|
547
|
+
gap: 0.5rem 0.75rem;
|
|
548
|
+
min-inline-size: 0;
|
|
549
|
+
margin: 0;
|
|
550
|
+
padding: 0;
|
|
551
|
+
border: 0;
|
|
552
|
+
}
|
|
553
|
+
.adapttable-element-grouping
|
|
554
|
+
[data-adapttable-part="grouping-aggregation-add"]
|
|
555
|
+
legend {
|
|
556
|
+
float: inline-start;
|
|
557
|
+
padding: 0;
|
|
558
|
+
font-size: 0.8125rem;
|
|
559
|
+
color: var(--el-text-color-secondary);
|
|
560
|
+
}
|
|
561
|
+
.adapttable-element-grouping
|
|
562
|
+
[data-adapttable-part="grouping-aggregation-add"]
|
|
563
|
+
.el-checkbox {
|
|
564
|
+
margin: 0;
|
|
565
|
+
}
|
|
566
|
+
.adapttable-element-grouping [data-adapttable-part="grouping-chip-remove"],
|
|
567
|
+
.adapttable-element-grouping
|
|
568
|
+
[data-adapttable-part="grouping-aggregation-remove"] {
|
|
569
|
+
margin: 0;
|
|
570
|
+
min-inline-size: 1.75rem;
|
|
571
|
+
padding-inline: 0.375rem;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/* Keep insertion boundaries stable so the target never moves under the pointer. */
|
|
575
|
+
.adapttable-element-grouping [data-adapttable-part="grouping-drop-zone"] {
|
|
576
|
+
display: inline-flex;
|
|
577
|
+
align-items: center;
|
|
578
|
+
justify-content: center;
|
|
579
|
+
box-sizing: border-box;
|
|
580
|
+
flex: 0 0 auto;
|
|
581
|
+
min-inline-size: 10px;
|
|
582
|
+
min-block-size: 32px;
|
|
583
|
+
block-size: auto;
|
|
584
|
+
margin-inline: 2px;
|
|
585
|
+
padding: 0;
|
|
586
|
+
border: 1px dashed color-mix(in srgb, currentColor 30%, transparent);
|
|
587
|
+
border-radius: 4px;
|
|
588
|
+
}
|
|
589
|
+
.adapttable-element-grouping
|
|
590
|
+
[data-adapttable-part="grouping-drop-zone"][data-empty] {
|
|
591
|
+
min-inline-size: 9rem;
|
|
592
|
+
min-block-size: 44px;
|
|
593
|
+
padding: 0.5rem;
|
|
594
|
+
}
|
|
595
|
+
.adapttable-element-grouping
|
|
596
|
+
[data-adapttable-part="grouping-drop-zone"][data-dragging] {
|
|
597
|
+
opacity: 1;
|
|
598
|
+
border-color: var(--el-color-primary);
|
|
599
|
+
background: color-mix(in srgb, var(--el-color-primary) 8%, transparent);
|
|
600
|
+
}
|
|
601
|
+
.adapttable-element-grouping
|
|
602
|
+
[data-adapttable-part="grouping-drop-zone"][data-active] {
|
|
603
|
+
border-style: solid;
|
|
604
|
+
border-color: var(--el-color-primary);
|
|
605
|
+
background: color-mix(in srgb, var(--el-color-primary) 22%, transparent);
|
|
606
|
+
outline: 2px solid var(--el-color-primary);
|
|
607
|
+
outline-offset: 1px;
|
|
608
|
+
}
|
|
609
|
+
.adapttable-element-grouping [data-adapttable-part="grouping-chip-handle"] {
|
|
610
|
+
cursor: grab;
|
|
611
|
+
}
|
|
612
|
+
.adapttable-element-grouping [data-grouping-dragging] {
|
|
613
|
+
opacity: 0.5;
|
|
614
|
+
cursor: grabbing;
|
|
615
|
+
}
|
|
616
|
+
.adapttable-element-grouping [data-adapttable-part="grouping-remove-zone"] {
|
|
617
|
+
display: flex;
|
|
618
|
+
flex: 1 1 100%;
|
|
619
|
+
align-items: center;
|
|
620
|
+
justify-content: center;
|
|
621
|
+
box-sizing: border-box;
|
|
622
|
+
min-block-size: 44px;
|
|
623
|
+
padding: 0.5rem 0.75rem;
|
|
624
|
+
border: 1px dashed var(--el-color-danger);
|
|
625
|
+
border-radius: 6px;
|
|
626
|
+
color: var(--el-color-danger);
|
|
627
|
+
font-size: 0.8125rem;
|
|
628
|
+
}
|
|
629
|
+
.adapttable-element-grouping
|
|
630
|
+
[data-adapttable-part="grouping-remove-zone"][data-active] {
|
|
631
|
+
background: color-mix(in srgb, var(--el-color-danger) 12%, transparent);
|
|
632
|
+
border-style: solid;
|
|
633
|
+
outline: 2px solid var(--el-color-danger);
|
|
634
|
+
}
|
|
396
635
|
.adapttable-element-plus-pivot {
|
|
397
636
|
flex-wrap: wrap;
|
|
398
637
|
gap: .75rem;
|
|
@@ -432,3 +671,21 @@
|
|
|
432
671
|
list-style: none;
|
|
433
672
|
display: grid;
|
|
434
673
|
}
|
|
674
|
+
|
|
675
|
+
.el-button.adapttable-element-edit-value {
|
|
676
|
+
justify-content: start;
|
|
677
|
+
inline-size: 100%;
|
|
678
|
+
min-inline-size: 0;
|
|
679
|
+
block-size: auto;
|
|
680
|
+
padding: 0;
|
|
681
|
+
border: 0;
|
|
682
|
+
color: inherit;
|
|
683
|
+
font: inherit;
|
|
684
|
+
text-align: inherit;
|
|
685
|
+
white-space: normal;
|
|
686
|
+
overflow-wrap: anywhere;
|
|
687
|
+
cursor: text;
|
|
688
|
+
}
|
|
689
|
+
.el-button.adapttable-element-edit-value > span {
|
|
690
|
+
min-inline-size: 0;
|
|
691
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adapttable/element-plus",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Element Plus data table controls for the AdaptTable Vue binding.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Orwa Mahmoud",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"module": "./dist/index.js",
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@adapttable/vue": "0.1.
|
|
20
|
+
"@adapttable/vue": "0.1.2"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"element-plus": "^2.14.7",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"element-plus": "2.14.7",
|
|
28
28
|
"vue": "^3.5.43",
|
|
29
|
-
"@adapttable/i18n": "3.3.
|
|
29
|
+
"@adapttable/i18n": "3.3.3"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
32
|
"node": ">=22.12.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ElementColumnMenuPanel-D7SdfclW.js","names":[],"sources":["../src/columns/panelContext.ts","../src/columns/ElementColumnMenuPanel.ts"],"sourcesContent":["import type { InjectionKey, ShallowRef } from \"vue\";\n\n/** A managed menu's actual native content host, outside its scrolling body. */\nexport const columnMenuContainer: InjectionKey<\n Readonly<ShallowRef<HTMLElement | null>>\n> = Symbol(\"element-column-menu-container\");\n","import {\n type ManagedOverlayPanelProps,\n useElementRef,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { ClickOutside, ElPopover } from \"element-plus\";\nimport {\n defineComponent,\n h,\n mergeProps,\n nextTick,\n onScopeDispose,\n type PropType,\n provide,\n shallowRef,\n watch,\n withDirectives,\n} from \"vue\";\n\nimport { isElementRef } from \"../controls/ref\";\nimport { ElementCard } from \"../presentation/ElementCard\";\nimport { rtlScrollbarGutter } from \"../scrollbarGutter\";\nimport { columnMenuContainer } from \"./panelContext\";\n\nexport const ElementColumnMenuPanel = defineComponent(\n (props: {\n readonly control: ManagedOverlayPanelProps;\n readonly initialFocus?: string;\n }) => {\n const active = useScopeActivity();\n const inheritedDirection = shallowRef<\"ltr\" | \"rtl\">();\n const readDirection = () => {\n if (props.control.attrs.dir !== undefined) return;\n const anchor = props.control.anchor;\n const view = anchor?.ownerDocument.defaultView;\n if (anchor && view)\n inheritedDirection.value =\n view.getComputedStyle(anchor).direction === \"rtl\" ? \"rtl\" : \"ltr\";\n };\n // A public virtual positioning reference leaves trigger ARIA/events with Chrome.\n const virtualAnchor = {\n getBoundingClientRect: () =>\n props.control.anchor?.getBoundingClientRect() ?? new DOMRect(),\n get contextElement() {\n return props.control.anchor ?? undefined;\n },\n };\n const panel = shallowRef<HTMLElement | null>(null);\n const setPanel = (target: unknown) => {\n if (target == null) {\n panel.value = null;\n return;\n }\n panel.value = target instanceof HTMLElement ? target : null;\n };\n provide(columnMenuContainer, panel);\n useElementRef(\n () => panel.value,\n () =>\n isElementRef(props.control.attrs.ref)\n ? props.control.attrs.ref\n : undefined\n );\n let live = true;\n onScopeDispose(() => {\n live = false;\n });\n const close = (reason: \"escape\" | \"outside\") => {\n const control = props.control;\n if (!active.value || !control.open || !control.isCurrent()) return;\n control.onClose(reason);\n if (reason === \"escape\")\n void nextTick(() => {\n if (\n (!live || !props.control.open) &&\n control.isCurrent() &&\n control.anchor?.isConnected\n )\n control.anchor.focus();\n });\n };\n const outside = (event: MouseEvent) => {\n if (\n event.target instanceof Node &&\n props.control.anchor?.contains(event.target)\n )\n return;\n close(\"outside\");\n };\n const keydown = (event: KeyboardEvent) => {\n if (\n !active.value ||\n !props.control.open ||\n !props.control.isCurrent() ||\n event.key !== \"Escape\"\n )\n return;\n // Element's focus trap releases on any Escape that reaches the document,\n // including one an inner control handled or an IME composition owns, so\n // the panel keeps those Escapes inside itself.\n if (event.defaultPrevented || event.isComposing) {\n event.stopPropagation();\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n close(\"escape\");\n };\n // The virtual reference leaves the trigger outside ElPopover's event tree.\n // It remains the keyboard owner until the native enter handoff finishes.\n watch(\n [active, () => props.control.anchor],\n ([enabled, anchor], _previous, cleanup) => {\n if (!enabled || !anchor) return;\n anchor.addEventListener(\"keydown\", keydown);\n cleanup(() => anchor.removeEventListener(\"keydown\", keydown));\n },\n { immediate: true }\n );\n const focus = () => {\n if (!active.value || !props.control.open || !props.control.isCurrent())\n return;\n const element = panel.value;\n if (!element) return;\n const focused = element.ownerDocument.activeElement;\n if (\n focused !== props.control.anchor &&\n focused !== element.ownerDocument.body &&\n focused !== element &&\n focused !== element.closest(\".el-popper\")\n )\n return;\n const search = panel.value?.querySelector<HTMLInputElement>(\n props.initialFocus ?? 'input[data-adapttable-part=\"column-menu-search\"]'\n );\n (search ?? element).focus({ preventScroll: true });\n };\n return () => {\n const control = props.control;\n if (\n !active.value ||\n !control.open ||\n !control.isCurrent() ||\n !control.anchor\n )\n return null;\n const direction = control.attrs.dir;\n const dir =\n direction === \"rtl\" || direction === \"ltr\"\n ? direction\n : inheritedDirection.value;\n return h(\n ElPopover,\n {\n visible: control.open,\n virtualTriggering: true,\n virtualRef: virtualAnchor,\n trigger: \"click\",\n // The actual content card carries Chrome's dialog id, name and ref.\n role: \"group\",\n placement: dir === \"rtl\" ? \"bottom-end\" : \"bottom-start\",\n appendTo: control.container ?? \"body\",\n teleported: true,\n persistent: false,\n showArrow: false,\n width: \"min(28rem, calc(100vw - 1rem))\",\n popperStyle: {\n padding: 0,\n direction: dir,\n translate: `${rtlScrollbarGutter(dir, props.control.anchor?.ownerDocument.defaultView)} 0`,\n },\n onBeforeEnter: readDirection,\n onAfterEnter: focus,\n },\n {\n default: () =>\n withDirectives(\n h(\n ElementCard,\n {\n attrs: mergeProps(control.attrs, {\n ref: setPanel,\n dir,\n tabindex: -1,\n class: \"adapttable-element-plus-column-panel\",\n style: { overflow: \"visible\" },\n onKeydown: keydown,\n }),\n bodyStyle: {\n padding: \"0.75rem\",\n maxHeight: \"min(70vh, 32rem)\",\n overflow: \"auto\",\n },\n },\n { default: () => control.content }\n ),\n [[ClickOutside, outside]]\n ),\n }\n );\n };\n },\n {\n name: \"ElementColumnMenuPanel\",\n props: {\n control: { type: Object as PropType<ManagedOverlayPanelProps> },\n initialFocus: { type: String as PropType<string | undefined> },\n },\n }\n);\n"],"mappings":";;;;;;;;AAGA,MAAa,sBAET,OAAO,+BAA+B;;;ACmB1C,MAAa,yBAAyB,iBACnC,UAGK;CACJ,MAAM,SAAS,iBAAiB;CAChC,MAAM,qBAAqB,WAA0B;CACrD,MAAM,sBAAsB;EAC1B,IAAI,MAAM,QAAQ,MAAM,QAAQ,KAAA,GAAW;EAC3C,MAAM,SAAS,MAAM,QAAQ;EAC7B,MAAM,OAAO,QAAQ,cAAc;EACnC,IAAI,UAAU,MACZ,mBAAmB,QACjB,KAAK,iBAAiB,MAAM,CAAC,CAAC,cAAc,QAAQ,QAAQ;CAClE;CAEA,MAAM,gBAAgB;EACpB,6BACE,MAAM,QAAQ,QAAQ,sBAAsB,KAAK,IAAI,QAAQ;EAC/D,IAAI,iBAAiB;GACnB,OAAO,MAAM,QAAQ,UAAU,KAAA;EACjC;CACF;CACA,MAAM,QA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B,EACJ,CACF;CACF;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,SAAS,EAAE,MAAM,OAA6C;EAC9D,cAAc,EAAE,MAAM,OAAuC;CAC/D;AACF,CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ElementColumnMenuPanel-DRQbZVow.cjs","names":["defineComponent","useScopeActivity","shallowRef","isElementRef","nextTick","h","ElPopover","rtlScrollbarGutter","withDirectives","ElementCard","mergeProps","ClickOutside"],"sources":["../src/columns/panelContext.ts","../src/columns/ElementColumnMenuPanel.ts"],"sourcesContent":["import type { InjectionKey, ShallowRef } from \"vue\";\n\n/** A managed menu's actual native content host, outside its scrolling body. */\nexport const columnMenuContainer: InjectionKey<\n Readonly<ShallowRef<HTMLElement | null>>\n> = Symbol(\"element-column-menu-container\");\n","import {\n type ManagedOverlayPanelProps,\n useElementRef,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { ClickOutside, ElPopover } from \"element-plus\";\nimport {\n defineComponent,\n h,\n mergeProps,\n nextTick,\n onScopeDispose,\n type PropType,\n provide,\n shallowRef,\n watch,\n withDirectives,\n} from \"vue\";\n\nimport { isElementRef } from \"../controls/ref\";\nimport { ElementCard } from \"../presentation/ElementCard\";\nimport { rtlScrollbarGutter } from \"../scrollbarGutter\";\nimport { columnMenuContainer } from \"./panelContext\";\n\nexport const ElementColumnMenuPanel = defineComponent(\n (props: {\n readonly control: ManagedOverlayPanelProps;\n readonly initialFocus?: string;\n }) => {\n const active = useScopeActivity();\n const inheritedDirection = shallowRef<\"ltr\" | \"rtl\">();\n const readDirection = () => {\n if (props.control.attrs.dir !== undefined) return;\n const anchor = props.control.anchor;\n const view = anchor?.ownerDocument.defaultView;\n if (anchor && view)\n inheritedDirection.value =\n view.getComputedStyle(anchor).direction === \"rtl\" ? \"rtl\" : \"ltr\";\n };\n // A public virtual positioning reference leaves trigger ARIA/events with Chrome.\n const virtualAnchor = {\n getBoundingClientRect: () =>\n props.control.anchor?.getBoundingClientRect() ?? new DOMRect(),\n get contextElement() {\n return props.control.anchor ?? undefined;\n },\n };\n const panel = shallowRef<HTMLElement | null>(null);\n const setPanel = (target: unknown) => {\n if (target == null) {\n panel.value = null;\n return;\n }\n panel.value = target instanceof HTMLElement ? target : null;\n };\n provide(columnMenuContainer, panel);\n useElementRef(\n () => panel.value,\n () =>\n isElementRef(props.control.attrs.ref)\n ? props.control.attrs.ref\n : undefined\n );\n let live = true;\n onScopeDispose(() => {\n live = false;\n });\n const close = (reason: \"escape\" | \"outside\") => {\n const control = props.control;\n if (!active.value || !control.open || !control.isCurrent()) return;\n control.onClose(reason);\n if (reason === \"escape\")\n void nextTick(() => {\n if (\n (!live || !props.control.open) &&\n control.isCurrent() &&\n control.anchor?.isConnected\n )\n control.anchor.focus();\n });\n };\n const outside = (event: MouseEvent) => {\n if (\n event.target instanceof Node &&\n props.control.anchor?.contains(event.target)\n )\n return;\n close(\"outside\");\n };\n const keydown = (event: KeyboardEvent) => {\n if (\n !active.value ||\n !props.control.open ||\n !props.control.isCurrent() ||\n event.key !== \"Escape\"\n )\n return;\n // Element's focus trap releases on any Escape that reaches the document,\n // including one an inner control handled or an IME composition owns, so\n // the panel keeps those Escapes inside itself.\n if (event.defaultPrevented || event.isComposing) {\n event.stopPropagation();\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n close(\"escape\");\n };\n // The virtual reference leaves the trigger outside ElPopover's event tree.\n // It remains the keyboard owner until the native enter handoff finishes.\n watch(\n [active, () => props.control.anchor],\n ([enabled, anchor], _previous, cleanup) => {\n if (!enabled || !anchor) return;\n anchor.addEventListener(\"keydown\", keydown);\n cleanup(() => anchor.removeEventListener(\"keydown\", keydown));\n },\n { immediate: true }\n );\n const focus = () => {\n if (!active.value || !props.control.open || !props.control.isCurrent())\n return;\n const element = panel.value;\n if (!element) return;\n const focused = element.ownerDocument.activeElement;\n if (\n focused !== props.control.anchor &&\n focused !== element.ownerDocument.body &&\n focused !== element &&\n focused !== element.closest(\".el-popper\")\n )\n return;\n const search = panel.value?.querySelector<HTMLInputElement>(\n props.initialFocus ?? 'input[data-adapttable-part=\"column-menu-search\"]'\n );\n (search ?? element).focus({ preventScroll: true });\n };\n return () => {\n const control = props.control;\n if (\n !active.value ||\n !control.open ||\n !control.isCurrent() ||\n !control.anchor\n )\n return null;\n const direction = control.attrs.dir;\n const dir =\n direction === \"rtl\" || direction === \"ltr\"\n ? direction\n : inheritedDirection.value;\n return h(\n ElPopover,\n {\n visible: control.open,\n virtualTriggering: true,\n virtualRef: virtualAnchor,\n trigger: \"click\",\n // The actual content card carries Chrome's dialog id, name and ref.\n role: \"group\",\n placement: dir === \"rtl\" ? \"bottom-end\" : \"bottom-start\",\n appendTo: control.container ?? \"body\",\n teleported: true,\n persistent: false,\n showArrow: false,\n width: \"min(28rem, calc(100vw - 1rem))\",\n popperStyle: {\n padding: 0,\n direction: dir,\n translate: `${rtlScrollbarGutter(dir, props.control.anchor?.ownerDocument.defaultView)} 0`,\n },\n onBeforeEnter: readDirection,\n onAfterEnter: focus,\n },\n {\n default: () =>\n withDirectives(\n h(\n ElementCard,\n {\n attrs: mergeProps(control.attrs, {\n ref: setPanel,\n dir,\n tabindex: -1,\n class: \"adapttable-element-plus-column-panel\",\n style: { overflow: \"visible\" },\n onKeydown: keydown,\n }),\n bodyStyle: {\n padding: \"0.75rem\",\n maxHeight: \"min(70vh, 32rem)\",\n overflow: \"auto\",\n },\n },\n { default: () => control.content }\n ),\n [[ClickOutside, outside]]\n ),\n }\n );\n };\n },\n {\n name: \"ElementColumnMenuPanel\",\n props: {\n control: { type: Object as PropType<ManagedOverlayPanelProps> },\n initialFocus: { type: String as PropType<string | undefined> },\n },\n }\n);\n"],"mappings":";;;;;;;;AAGA,MAAa,sBAET,OAAO,+BAA+B;;;ACmB1C,MAAa,0BAAA,GAAyBA,IAAAA,gBAAAA,EACnC,UAGK;CACJ,MAAM,UAAA,GAASC,wBAAAA,iBAAAA,CAAiB;CAChC,MAAM,sBAAA,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ACLC,aAAAA,WACA;GACE,SAAS,QAAQ;GACjB,mBAAmB;GACnB,YAAY;GACZ,SAAS;GAET,MAAM;GACN,WAAW,QAAQ,QAAQ,eAAe;GAC1C,UAAU,QAAQ,aAAa;GAC/B,YAAY;GACZ,YAAY;GACZ,WAAW;GACX,OAAO;GACP,aAAa;IACX,SAAS;IACT,WAAW;IACX,WAAW,GAAGC,wBAAAA,mBAAmB,KAAK,MAAM,QAAQ,QAAQ,cAAc,WAAW,EAAE;GACzF;GACA,eAAe;GACf,cAAc;EAChB,GACA,EACE,gBAAA,GACEC,IAAAA,eAAAA,EAAAA,GACEH,IAAAA,EAAAA,CACEI,oBAAAA,aACA;GACE,QAAA,GAAOC,IAAAA,WAAAA,CAAW,QAAQ,OAAO;IAC/B,KAAK;IACL;IACA,UAAU;IACV,OAAO;IACP,OAAO,EAAE,UAAU,UAAU;IAC7B,WAAW;GACb,CAAC;GACD,WAAW;IACT,SAAS;IACT,WAAW;IACX,UAAU;GACZ;EACF,GACA,EAAE,eAAe,QAAQ,QAAQ,CACnC,GACA,CAAC,CAACC,aAAAA,cAAc,OAAO,CAAC,CAC1B,EACJ,CACF;CACF;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,SAAS,EAAE,MAAM,OAA6C;EAC9D,cAAc,EAAE,MAAM,OAAuC;CAC/D;AACF,CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ElementFilterSurface-DcPyYCK-.cjs","names":["h","ElementInput","ElementSelect","ElementCheckbox","h","ElementInput","elementButton","ElementCheckbox","ElText","defineComponent","useChecklistModel","ChecklistChrome","createVNode","defineComponent","shallowRef","useScopeActivity","useFeatureState","FULLSCREEN_MODEL","nextTick","h","ElDrawer","ElPopover","rtlScrollbarGutter","withDirectives","ElCard","ClickOutside"],"sources":["../src/filters/fieldControls.ts","../src/filters/ElementBasicFilterField.vue","../src/filters/ElementChecklistFilter.ts","../src/filters/ElementFilterField.vue","../src/filters/ElementFilterSurface.ts"],"sourcesContent":["import type {\n DataTableClassNames,\n FilterFieldSlots,\n} from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport ElementCheckbox from \"../controls/ElementCheckbox.vue\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport ElementSelect from \"../controls/ElementSelect.vue\";\n\nexport function elementFilterControls(\n names: () => DataTableClassNames\n): FilterFieldSlots {\n return {\n Input: (control) =>\n h(ElementInput, {\n ...control.attrs,\n value: control.value,\n type: control.type,\n class: names().filterInput,\n onChange: control.onChange,\n }),\n Select: (control) =>\n h(ElementSelect, {\n ...control.attrs,\n value: control.value,\n options: control.options,\n class:\n control.attrs[\"data-adapttable-part\"] === \"filter-operator\"\n ? names().filterOperator\n : names().filterSelect,\n onChange: control.onChange,\n }),\n Checkbox: (control) =>\n h(ElementCheckbox, {\n ...control.attrs,\n checked: control.checked,\n label: control.label,\n labelVisible: true,\n class: names().filterCheckbox,\n onChange: control.onChange,\n }),\n };\n}\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n type DataTableClassNames,\n FilterFieldChrome,\n type FilterFieldOptions,\n useFilterField,\n} from \"@adapttable/vue/adapter\";\n\nimport { elementFilterControls } from \"./fieldControls\";\n\ndefineOptions({ name: \"ElementBasicFilterField\" });\nconst props = defineProps<\n FilterFieldOptions<TRow> & { classNames?: DataTableClassNames }\n>();\nconst model = useFilterField(() => props);\nconst controls = elementFilterControls(() => props.classNames ?? {});\nconst Render = () =>\n FilterFieldChrome({\n model: model.value,\n controls,\n classNames: props.classNames,\n });\nconst renderProps: string[] = [];\nRender.props = renderProps;\n</script>\n\n<template><Render /></template>\n","import {\n ChecklistChrome,\n type ChecklistFilterProps,\n type ChecklistSlots,\n useChecklistModel,\n} from \"@adapttable/vue/adapter\";\nimport { ElText } from \"element-plus\";\nimport {\n createVNode,\n defineComponent,\n h,\n type PropType,\n type SetupContext,\n type VNodeChild,\n} from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport ElementCheckbox from \"../controls/ElementCheckbox.vue\";\nimport ElementInput from \"../controls/ElementInput.vue\";\n\nconst controls: ChecklistSlots<VNodeChild> = {\n Search: (control) =>\n h(ElementInput, {\n type: \"search\",\n value: control.value,\n \"aria-label\": control.label,\n \"data-adapttable-part\": \"filter-checklist-search\",\n class: control.className,\n onChange: control.onChange,\n }),\n Button: (control) =>\n elementButton({ onClick: control.onClick }, control.label),\n Checkbox: (control) =>\n h(\"div\", { class: \"adapttable-element-plus-checklist-option\" }, [\n h(ElementCheckbox, {\n \"data-adapttable-part\": \"filter-checkbox\",\n class: control.className,\n label: control.label,\n labelVisible: true,\n checked: control.checked,\n onChange: control.onChange,\n }),\n h(\n ElText,\n {\n class: control.countClassName,\n \"data-adapttable-part\": \"filter-checklist-count\",\n type: \"info\",\n size: \"small\",\n },\n { default: () => control.count }\n ),\n ]),\n};\n\n// The presentation validates values; its key list preserves generic public\n// components and Vue fallthrough attribute inference.\nconst checklistRuntimeProps = {\n def: { type: Object as PropType<ChecklistFilterProps<unknown>[\"def\"]> },\n source: { type: Object as PropType<ChecklistFilterProps<unknown>[\"source\"]> },\n labels: { type: Object as PropType<ChecklistFilterProps<unknown>[\"labels\"]> },\n classNames: {\n type: Object as PropType<ChecklistFilterProps<unknown>[\"classNames\"]>,\n },\n};\n\nconst ElementChecklistFilterPresentation = defineComponent(\n (props: ChecklistFilterProps<unknown>) => {\n const model = useChecklistModel(() => props);\n return () => ChecklistChrome({ model: model.value, controls });\n },\n {\n name: \"ElementChecklistFilterPresentation\",\n props: checklistRuntimeProps,\n }\n);\n\n/** Preserve the canonical row contract without exposing versioned instance helpers. */\nexport function ElementChecklistFilter<TRow>(\n props: ChecklistFilterProps<TRow>,\n context: Pick<SetupContext, \"attrs\">\n) {\n return createVNode(ElementChecklistFilterPresentation, {\n ...context.attrs,\n ...props,\n });\n}\nElementChecklistFilter.props = Object.keys(checklistRuntimeProps);\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n type DataTableClassNames,\n defaultFilterRegistry,\n type FilterFieldOptions,\n filterLabel,\n filterWidgetKind,\n} from \"@adapttable/vue/adapter\";\nimport { ElFormItem } from \"element-plus\";\n\nimport ElementBasicFilterField from \"./ElementBasicFilterField.vue\";\nimport { ElementChecklistFilter } from \"./ElementChecklistFilter\";\n\ndefineOptions({ name: \"ElementFilterField\" });\nconst props = defineProps<\n FilterFieldOptions<TRow> & { classNames?: DataTableClassNames }\n>();\n</script>\n\n<template>\n <ElFormItem\n v-if=\"\n filterWidgetKind(props.def, props.registry ?? defaultFilterRegistry) ===\n 'checklist'\n \"\n :label=\"filterLabel(props.def)\"\n :class=\"props.classNames?.filterField\"\n data-adapttable-part=\"filter-field\"\n >\n <ElementChecklistFilter\n :def=\"props.def\"\n :source=\"props.source\"\n :labels=\"props.labels\"\n :class-names=\"props.classNames\"\n />\n </ElFormItem>\n <ElementBasicFilterField v-else v-bind=\"props\" />\n</template>\n","import {\n type FilterPanelSurfaceProps,\n FULLSCREEN_MODEL,\n useFeatureState,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport {\n type CardInstance,\n ClickOutside,\n ElCard,\n ElDrawer,\n ElPopover,\n} from \"element-plus\";\nimport {\n defineComponent,\n h,\n nextTick,\n onMounted,\n type PropType,\n shallowRef,\n withDirectives,\n} from \"vue\";\n\nimport { rtlScrollbarGutter } from \"../scrollbarGutter\";\n\n/** Kit overlays retain their own positioning, focus trap and modal backdrop. */\nexport const ElementFilterSurface = defineComponent(\n (\n props: FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n }\n ) => {\n const mounted = shallowRef(false);\n const active = useScopeActivity();\n const fullscreen = useFeatureState(FULLSCREEN_MODEL);\n const panel = shallowRef<CardInstance>();\n onMounted(() => {\n mounted.value = true;\n });\n const close: FilterPanelSurfaceProps[\"onClose\"] = (reason) => {\n if (!active.value || !props.open) return;\n props.onClose(reason);\n if (reason === \"escape\") {\n const anchor = props.anchor;\n void nextTick(() => {\n if (\n active.value &&\n !props.open &&\n props.anchor === anchor &&\n anchor?.isConnected\n )\n anchor.focus();\n });\n }\n };\n const outside = (event: MouseEvent) => {\n const target = event.target;\n if (target instanceof Node && props.anchor?.contains(target)) return;\n close(\"outside\");\n };\n const keydown = (event: KeyboardEvent) => {\n if (event.key !== \"Escape\") return;\n // Element's focus trap releases on any Escape that reaches the document,\n // including one an inner control handled or an IME composition owns, so\n // the panel keeps those Escapes inside itself.\n if (event.defaultPrevented || event.isComposing) {\n event.stopPropagation();\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n close(\"escape\");\n };\n // A closed native combobox must not swallow the containing overlay's Escape.\n // Open comboboxes keep the event so their own menu closes first.\n const captureKeydown = (event: KeyboardEvent) => {\n const target = event.target;\n if (\n target instanceof Element &&\n target.getAttribute(\"role\") === \"combobox\" &&\n target.getAttribute(\"aria-expanded\") === \"false\"\n )\n keydown(event);\n };\n const focusPanel = () => {\n const element: unknown = panel.value?.$el;\n if (!active.value || !props.open || !(element instanceof HTMLElement))\n return;\n const focused = element.ownerDocument.activeElement;\n if (focused === props.anchor || focused === element.ownerDocument.body)\n element.focus();\n };\n return () => {\n if (!mounted.value || !active.value) return null;\n if (props.modal)\n return h(\n ElDrawer,\n {\n modelValue: props.open,\n title: props.label,\n direction: props.dir === \"rtl\" ? \"ltr\" : \"rtl\",\n appendTo: props.container ?? fullscreen.value?.container ?? \"body\",\n appendToBody: true,\n modal: true,\n modalClass: props.backdropClassName,\n withHeader: false,\n showClose: false,\n destroyOnClose: true,\n // Relative to the drawer's overlay, which excludes a classic\n // scrollbar or a reserved gutter; 100vw does not.\n size: \"min(30rem, 100%)\",\n dir: props.dir,\n class: props.className,\n \"data-adapttable-part\": \"filters-panel\",\n beforeClose: () => close(\"outside\"),\n onKeydown: keydown,\n onKeydownCapture: captureKeydown,\n },\n { default: () => props.children }\n );\n if (!props.anchor) return null;\n return h(\n ElPopover,\n {\n visible: props.open,\n virtualTriggering: true,\n virtualRef: props.anchor,\n trigger: \"click\",\n role: \"dialog\",\n \"aria-label\": props.label,\n placement: props.dir === \"rtl\" ? \"bottom-end\" : \"bottom-start\",\n appendTo: props.container ?? fullscreen.value?.container ?? \"body\",\n teleported: true,\n persistent: false,\n showArrow: false,\n width: \"min(28rem, calc(100vw - 1rem))\",\n popperClass: \"adapttable-element-plus-filter-popover\",\n popperStyle: {\n padding: 0,\n translate: `${rtlScrollbarGutter(props.dir, props.anchor?.ownerDocument.defaultView)} 0`,\n },\n onAfterEnter: focusPanel,\n },\n {\n default: () =>\n withDirectives(\n h(\n ElCard,\n {\n ref: panel,\n shadow: \"never\",\n dir: props.dir,\n tabindex: -1,\n \"aria-label\": props.label,\n \"data-adapttable-part\": props.part ?? \"filters-popover\",\n class: props.className,\n onKeydown: keydown,\n onKeydownCapture: captureKeydown,\n },\n { default: () => props.children }\n ),\n [[ClickOutside, outside]]\n ),\n }\n );\n };\n },\n {\n name: \"ElementFilterSurface\",\n props: {\n className: {\n type: String as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"className\"]\n >,\n },\n open: {\n type: Boolean as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"open\"]\n >,\n default: undefined,\n },\n label: {\n type: String as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"label\"]\n >,\n },\n dir: {\n type: String as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"dir\"]\n >,\n },\n anchor: {\n type: Object as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"anchor\"]\n >,\n },\n container: {\n type: Object as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"container\"]\n >,\n },\n children: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"children\"]\n >,\n default: undefined,\n },\n onClose: {\n type: Function as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"onClose\"]\n >,\n },\n modal: {\n type: Boolean as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"modal\"]\n >,\n default: undefined,\n },\n part: {\n type: String as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"part\"]\n >,\n },\n backdropClassName: {\n type: String as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"backdropClassName\"]\n >,\n },\n },\n }\n);\n"],"mappings":";;;;;;;;;AAUA,SAAgB,sBACd,OACkB;CAClB,OAAO;EACL,QAAQ,aAAA,GACNA,IAAAA,EAAAA,CAAEC,qBAAAA,WAAc;GACd,GAAG,QAAQ;GACX,OAAO,QAAQ;GACf,MAAM,QAAQ;GACd,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O,aAAa;GAC5D,YAAY;GACZ,YAAY;GACZ,WAAW;GACX,OAAO;GACP,aAAa;GACb,aAAa;IACX,SAAS;IACT,WAAW,GAAGC,wBAAAA,mBAAmB,MAAM,KAAK,MAAM,QAAQ,cAAc,WAAW,EAAE;GACvF;GACA,cAAc;EAChB,GACA,EACE,gBAAA,GACEC,IAAAA,eAAAA,EAAAA,GACEJ,IAAAA,EAAAA,CACEK,aAAAA,QACA;GACE,KAAK;GACL,QAAQ;GACR,KAAK,MAAM;GACX,UAAU;GACV,cAAc,MAAM;GACpB,wBAAwB,MAAM,QAAQ;GACtC,OAAO,MAAM;GACb,WAAW;GACX,kBAAkB;EACpB,GACA,EAAE,eAAe,MAAM,SAAS,CAClC,GACA,CAAC,CAACC,aAAAA,cAAc,OAAO,CAAC,CAC1B,EACJ,CACF;CACF;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,WAAW,EACT,MAAM,OAQR;EACA,MAAM;GACJ,MAAM;GAQN,SAAS,KAAA;EACX;EACA,OAAO,EACL,MAAM,OAQR;EACA,KAAK,EACH,MAAM,OAQR;EACA,QAAQ,EACN,MAAM,OAQR;EACA,WAAW,EACT,MAAM,OAQR;EACA,UAAU;GACR,MAAM;IAAC;IAAQ;IAAQ;IAAS;IAAO;GAAM;GAQ7C,SAAS,KAAA;EACX;EACA,SAAS,EACP,MAAM,SAQR;EACA,OAAO;GACL,MAAM;GAQN,SAAS,KAAA;EACX;EACA,MAAM,EACJ,MAAM,OAQR;EACA,mBAAmB,EACjB,MAAM,OAQR;CACF;AACF,CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ElementFilterSurface-DdvPfm1N.js","names":["ElementInput","ElementSelect","ElementCheckbox","ElementInput","ElementCheckbox"],"sources":["../src/filters/fieldControls.ts","../src/filters/ElementBasicFilterField.vue","../src/filters/ElementChecklistFilter.ts","../src/filters/ElementFilterField.vue","../src/filters/ElementFilterSurface.ts"],"sourcesContent":["import type {\n DataTableClassNames,\n FilterFieldSlots,\n} from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport ElementCheckbox from \"../controls/ElementCheckbox.vue\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport ElementSelect from \"../controls/ElementSelect.vue\";\n\nexport function elementFilterControls(\n names: () => DataTableClassNames\n): FilterFieldSlots {\n return {\n Input: (control) =>\n h(ElementInput, {\n ...control.attrs,\n value: control.value,\n type: control.type,\n class: names().filterInput,\n onChange: control.onChange,\n }),\n Select: (control) =>\n h(ElementSelect, {\n ...control.attrs,\n value: control.value,\n options: control.options,\n class:\n control.attrs[\"data-adapttable-part\"] === \"filter-operator\"\n ? names().filterOperator\n : names().filterSelect,\n onChange: control.onChange,\n }),\n Checkbox: (control) =>\n h(ElementCheckbox, {\n ...control.attrs,\n checked: control.checked,\n label: control.label,\n labelVisible: true,\n class: names().filterCheckbox,\n onChange: control.onChange,\n }),\n };\n}\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n type DataTableClassNames,\n FilterFieldChrome,\n type FilterFieldOptions,\n useFilterField,\n} from \"@adapttable/vue/adapter\";\n\nimport { elementFilterControls } from \"./fieldControls\";\n\ndefineOptions({ name: \"ElementBasicFilterField\" });\nconst props = defineProps<\n FilterFieldOptions<TRow> & { classNames?: DataTableClassNames }\n>();\nconst model = useFilterField(() => props);\nconst controls = elementFilterControls(() => props.classNames ?? {});\nconst Render = () =>\n FilterFieldChrome({\n model: model.value,\n controls,\n classNames: props.classNames,\n });\nconst renderProps: string[] = [];\nRender.props = renderProps;\n</script>\n\n<template><Render /></template>\n","import {\n ChecklistChrome,\n type ChecklistFilterProps,\n type ChecklistSlots,\n useChecklistModel,\n} from \"@adapttable/vue/adapter\";\nimport { ElText } from \"element-plus\";\nimport {\n createVNode,\n defineComponent,\n h,\n type PropType,\n type SetupContext,\n type VNodeChild,\n} from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport ElementCheckbox from \"../controls/ElementCheckbox.vue\";\nimport ElementInput from \"../controls/ElementInput.vue\";\n\nconst controls: ChecklistSlots<VNodeChild> = {\n Search: (control) =>\n h(ElementInput, {\n type: \"search\",\n value: control.value,\n \"aria-label\": control.label,\n \"data-adapttable-part\": \"filter-checklist-search\",\n class: control.className,\n onChange: control.onChange,\n }),\n Button: (control) =>\n elementButton({ onClick: control.onClick }, control.label),\n Checkbox: (control) =>\n h(\"div\", { class: \"adapttable-element-plus-checklist-option\" }, [\n h(ElementCheckbox, {\n \"data-adapttable-part\": \"filter-checkbox\",\n class: control.className,\n label: control.label,\n labelVisible: true,\n checked: control.checked,\n onChange: control.onChange,\n }),\n h(\n ElText,\n {\n class: control.countClassName,\n \"data-adapttable-part\": \"filter-checklist-count\",\n type: \"info\",\n size: \"small\",\n },\n { default: () => control.count }\n ),\n ]),\n};\n\n// The presentation validates values; its key list preserves generic public\n// components and Vue fallthrough attribute inference.\nconst checklistRuntimeProps = {\n def: { type: Object as PropType<ChecklistFilterProps<unknown>[\"def\"]> },\n source: { type: Object as PropType<ChecklistFilterProps<unknown>[\"source\"]> },\n labels: { type: Object as PropType<ChecklistFilterProps<unknown>[\"labels\"]> },\n classNames: {\n type: Object as PropType<ChecklistFilterProps<unknown>[\"classNames\"]>,\n },\n};\n\nconst ElementChecklistFilterPresentation = defineComponent(\n (props: ChecklistFilterProps<unknown>) => {\n const model = useChecklistModel(() => props);\n return () => ChecklistChrome({ model: model.value, controls });\n },\n {\n name: \"ElementChecklistFilterPresentation\",\n props: checklistRuntimeProps,\n }\n);\n\n/** Preserve the canonical row contract without exposing versioned instance helpers. */\nexport function ElementChecklistFilter<TRow>(\n props: ChecklistFilterProps<TRow>,\n context: Pick<SetupContext, \"attrs\">\n) {\n return createVNode(ElementChecklistFilterPresentation, {\n ...context.attrs,\n ...props,\n });\n}\nElementChecklistFilter.props = Object.keys(checklistRuntimeProps);\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n type DataTableClassNames,\n defaultFilterRegistry,\n type FilterFieldOptions,\n filterLabel,\n filterWidgetKind,\n} from \"@adapttable/vue/adapter\";\nimport { ElFormItem } from \"element-plus\";\n\nimport ElementBasicFilterField from \"./ElementBasicFilterField.vue\";\nimport { ElementChecklistFilter } from \"./ElementChecklistFilter\";\n\ndefineOptions({ name: \"ElementFilterField\" });\nconst props = defineProps<\n FilterFieldOptions<TRow> & { classNames?: DataTableClassNames }\n>();\n</script>\n\n<template>\n <ElFormItem\n v-if=\"\n filterWidgetKind(props.def, props.registry ?? defaultFilterRegistry) ===\n 'checklist'\n \"\n :label=\"filterLabel(props.def)\"\n :class=\"props.classNames?.filterField\"\n data-adapttable-part=\"filter-field\"\n >\n <ElementChecklistFilter\n :def=\"props.def\"\n :source=\"props.source\"\n :labels=\"props.labels\"\n :class-names=\"props.classNames\"\n />\n </ElFormItem>\n <ElementBasicFilterField v-else v-bind=\"props\" />\n</template>\n","import {\n type FilterPanelSurfaceProps,\n FULLSCREEN_MODEL,\n useFeatureState,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport {\n type CardInstance,\n ClickOutside,\n ElCard,\n ElDrawer,\n ElPopover,\n} from \"element-plus\";\nimport {\n defineComponent,\n h,\n nextTick,\n onMounted,\n type PropType,\n shallowRef,\n withDirectives,\n} from \"vue\";\n\nimport { rtlScrollbarGutter } from \"../scrollbarGutter\";\n\n/** Kit overlays retain their own positioning, focus trap and modal backdrop. */\nexport const ElementFilterSurface = defineComponent(\n (\n props: FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n }\n ) => {\n const mounted = shallowRef(false);\n const active = useScopeActivity();\n const fullscreen = useFeatureState(FULLSCREEN_MODEL);\n const panel = shallowRef<CardInstance>();\n onMounted(() => {\n mounted.value = true;\n });\n const close: FilterPanelSurfaceProps[\"onClose\"] = (reason) => {\n if (!active.value || !props.open) return;\n props.onClose(reason);\n if (reason === \"escape\") {\n const anchor = props.anchor;\n void nextTick(() => {\n if (\n active.value &&\n !props.open &&\n props.anchor === anchor &&\n anchor?.isConnected\n )\n anchor.focus();\n });\n }\n };\n const outside = (event: MouseEvent) => {\n const target = event.target;\n if (target instanceof Node && props.anchor?.contains(target)) return;\n close(\"outside\");\n };\n const keydown = (event: KeyboardEvent) => {\n if (event.key !== \"Escape\") return;\n // Element's focus trap releases on any Escape that reaches the document,\n // including one an inner control handled or an IME composition owns, so\n // the panel keeps those Escapes inside itself.\n if (event.defaultPrevented || event.isComposing) {\n event.stopPropagation();\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n close(\"escape\");\n };\n // A closed native combobox must not swallow the containing overlay's Escape.\n // Open comboboxes keep the event so their own menu closes first.\n const captureKeydown = (event: KeyboardEvent) => {\n const target = event.target;\n if (\n target instanceof Element &&\n target.getAttribute(\"role\") === \"combobox\" &&\n target.getAttribute(\"aria-expanded\") === \"false\"\n )\n keydown(event);\n };\n const focusPanel = () => {\n const element: unknown = panel.value?.$el;\n if (!active.value || !props.open || !(element instanceof HTMLElement))\n return;\n const focused = element.ownerDocument.activeElement;\n if (focused === props.anchor || focused === element.ownerDocument.body)\n element.focus();\n };\n return () => {\n if (!mounted.value || !active.value) return null;\n if (props.modal)\n return h(\n ElDrawer,\n {\n modelValue: props.open,\n title: props.label,\n direction: props.dir === \"rtl\" ? \"ltr\" : \"rtl\",\n appendTo: props.container ?? fullscreen.value?.container ?? \"body\",\n appendToBody: true,\n modal: true,\n modalClass: props.backdropClassName,\n withHeader: false,\n showClose: false,\n destroyOnClose: true,\n // Relative to the drawer's overlay, which excludes a classic\n // scrollbar or a reserved gutter; 100vw does not.\n size: \"min(30rem, 100%)\",\n dir: props.dir,\n class: props.className,\n \"data-adapttable-part\": \"filters-panel\",\n beforeClose: () => close(\"outside\"),\n onKeydown: keydown,\n onKeydownCapture: captureKeydown,\n },\n { default: () => props.children }\n );\n if (!props.anchor) return null;\n return h(\n ElPopover,\n {\n visible: props.open,\n virtualTriggering: true,\n virtualRef: props.anchor,\n trigger: \"click\",\n role: \"dialog\",\n \"aria-label\": props.label,\n placement: props.dir === \"rtl\" ? \"bottom-end\" : \"bottom-start\",\n appendTo: props.container ?? fullscreen.value?.container ?? \"body\",\n teleported: true,\n persistent: false,\n showArrow: false,\n width: \"min(28rem, calc(100vw - 1rem))\",\n popperClass: \"adapttable-element-plus-filter-popover\",\n popperStyle: {\n padding: 0,\n translate: `${rtlScrollbarGutter(props.dir, props.anchor?.ownerDocument.defaultView)} 0`,\n },\n onAfterEnter: focusPanel,\n },\n {\n default: () =>\n withDirectives(\n h(\n ElCard,\n {\n ref: panel,\n shadow: \"never\",\n dir: props.dir,\n tabindex: -1,\n \"aria-label\": props.label,\n \"data-adapttable-part\": props.part ?? \"filters-popover\",\n class: props.className,\n onKeydown: keydown,\n onKeydownCapture: captureKeydown,\n },\n { default: () => props.children }\n ),\n [[ClickOutside, outside]]\n ),\n }\n );\n };\n },\n {\n name: \"ElementFilterSurface\",\n props: {\n className: {\n type: String as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"className\"]\n >,\n },\n open: {\n type: Boolean as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"open\"]\n >,\n default: undefined,\n },\n label: {\n type: String as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"label\"]\n >,\n },\n dir: {\n type: String as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"dir\"]\n >,\n },\n anchor: {\n type: Object as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"anchor\"]\n >,\n },\n container: {\n type: Object as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"container\"]\n >,\n },\n children: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"children\"]\n >,\n default: undefined,\n },\n onClose: {\n type: Function as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"onClose\"]\n >,\n },\n modal: {\n type: Boolean as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"modal\"]\n >,\n default: undefined,\n },\n part: {\n type: String as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"part\"]\n >,\n },\n backdropClassName: {\n type: String as PropType<\n (FilterPanelSurfaceProps & {\n readonly modal: boolean;\n readonly part?: string;\n /** Class for ElDrawer's modal mask, through its `modalClass` hook. */\n readonly backdropClassName?: string;\n })[\"backdropClassName\"]\n >,\n },\n },\n }\n);\n"],"mappings":";;;;;;;;;AAUA,SAAgB,sBACd,OACkB;CAClB,OAAO;EACL,QAAQ,YACN,EAAEA,aAAc;GACd,GAAG,QAAQ;GACX,OAAO,QAAQ;GACf,MAAM,QAAQ;GACd,OAAO,MAAM,CAAC,CAAC;GACf,UAAU,QAAQ;EACpB,CAAC;EAC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+0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editing-BX-jUtdO.cjs","names":["$attrs","defineComponent","useScopeActivity","shallowRef","computed","nextTick","h","ElementCheckbox","ElementMultiSelect","readMultiDraft","formatMultiDraft","ElementSelect","ElementInput","editorInputType","createVNode","elementButton","mergeProps","defineComponent","useClassNames","HistoryButtonsChrome","elementButton","slotRender","editableCellSlotKey","h","ElementEditableCell","extendFeature","bindingEditing","bindingRowEditing","rowEditActionsSlotKey","ElementRowEditActions","bindingBatchEditing","batchEditBarSlotKey","ElementBatchEditBar","bindingUndoRedoButtons","UNDO_REDO_CONTROL"],"sources":["../src/controls/ElementMultiSelect.vue","../src/controls/focusRef.ts","../src/editing/ElementCellEditor.ts","../src/editing/ElementEditableCell.vue","../src/editing/elementEditingButton.ts","../src/editing/ElementBatchEditBar.vue","../src/editing/ElementRowEditActions.vue","../src/editing/ElementHistoryButtons.ts","../src/editing.ts"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ElOption, ElSelect, type SelectInstance } from \"element-plus\";\nimport { nextTick, shallowRef } from \"vue\";\n\ndefineOptions({ inheritAttrs: false });\nconst props = defineProps<{\n value: readonly string[];\n options: readonly { value: string; label: string }[];\n}>();\nconst emit = defineEmits<{ change: [value: string[]] }>();\nconst control = shallowRef<SelectInstance>();\nfunction change(value: unknown): void {\n if (\n Array.isArray(value) &&\n value.every((item): item is string => typeof item === \"string\")\n )\n emit(\"change\", value);\n void nextTick(() => control.value?.$forceUpdate());\n}\ndefineExpose({\n focus: () => control.value?.focus(),\n blur: () => control.value?.blur(),\n});\n</script>\n\n<template>\n <ElSelect\n ref=\"control\"\n v-bind=\"$attrs\"\n :model-value=\"[...props.value]\"\n multiple\n :teleported=\"false\"\n :validate-event=\"false\"\n @update:model-value=\"change\"\n >\n <ElOption\n v-for=\"option in props.options\"\n :key=\"option.value\"\n :value=\"option.value\"\n :label=\"option.label\"\n />\n </ElSelect>\n</template>\n","import type { VNodeProps } from \"vue\";\n\ninterface FocusTarget {\n focus(): void;\n}\nfunction isFocusTarget(value: unknown): value is FocusTarget {\n return (\n value !== null &&\n typeof value === \"object\" &&\n \"focus\" in value &&\n typeof value.focus === \"function\"\n );\n}\n/** Keep the supported exposed focus handle, including its stable identity. */\nexport function focusControlRef(\n set: (target: FocusTarget | null) => void\n): VNodeProps[\"ref\"] {\n return (value) => {\n if (value === null) {\n set(null);\n return;\n }\n if (!isFocusTarget(value))\n throw new Error(\n \"AdaptTable: Element Plus control must expose its supported focus method.\"\n );\n set(value);\n };\n}\n","import {\n type EditableCellEditorProps,\n editorInputType,\n formatMultiDraft,\n readMultiDraft,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport {\n computed,\n createVNode,\n defineComponent,\n h,\n nextTick,\n onMounted,\n type PropType,\n shallowRef,\n watch,\n} from \"vue\";\n\nimport ElementCheckbox from \"../controls/ElementCheckbox.vue\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport ElementMultiSelect from \"../controls/ElementMultiSelect.vue\";\nimport ElementSelect from \"../controls/ElementSelect.vue\";\nimport { focusControlRef } from \"../controls/focusRef\";\n\n/** The kit owns its nested popup; draft and commit transitions stay in Chrome. */\nconst editorRuntimeProps = {\n controller: {\n type: Object as PropType<\n (EditableCellEditorProps<unknown> & {\n className?: string;\n })[\"controller\"]\n >,\n },\n label: {\n type: String as PropType<\n (EditableCellEditorProps<unknown> & { className?: string })[\"label\"]\n >,\n },\n attrs: {\n type: Object as PropType<\n (EditableCellEditorProps<unknown> & { className?: string })[\"attrs\"]\n >,\n },\n editorRef: {\n type: Function as PropType<\n (EditableCellEditorProps<unknown> & {\n className?: string;\n })[\"editorRef\"]\n >,\n },\n onChange: {\n type: Function as PropType<\n (EditableCellEditorProps<unknown> & {\n className?: string;\n })[\"onChange\"]\n >,\n },\n onBlur: {\n type: Function as PropType<\n (EditableCellEditorProps<unknown> & { className?: string })[\"onBlur\"]\n >,\n },\n onKeyDown: {\n type: Function as PropType<\n (EditableCellEditorProps<unknown> & {\n className?: string;\n })[\"onKeyDown\"]\n >,\n },\n className: {\n type: String as PropType<\n (EditableCellEditorProps<unknown> & {\n className?: string;\n })[\"className\"]\n >,\n },\n};\n\nconst ElementCellEditorPresentation = defineComponent(\n (props: EditableCellEditorProps<unknown> & { className?: string }) => {\n const active = useScopeActivity();\n const mounted = shallowRef(false);\n const host = shallowRef<HTMLElement | null>(null);\n const field = shallowRef<HTMLInputElement | HTMLTextAreaElement | null>(\n null\n );\n const popup = shallowRef(false);\n onMounted(() => {\n mounted.value = true;\n });\n const present = computed(() => !mounted.value || active.value);\n watch(\n active,\n (live) => {\n if (!live) popup.value = false;\n },\n { flush: \"sync\" }\n );\n function validation(): void {\n const target = field.value;\n if (!target || !active.value || !target.isConnected) return;\n for (const name of [\"aria-invalid\", \"aria-describedby\"] as const) {\n const value = props.attrs[name];\n if (typeof value === \"string\" || typeof value === \"boolean\")\n target.setAttribute(name, String(value));\n else target.removeAttribute(name);\n }\n }\n watch([field, active, () => props.attrs], validation, { flush: \"post\" });\n function focusin(event: FocusEvent): void {\n const target = event.target;\n if (\n target instanceof HTMLInputElement ||\n target instanceof HTMLTextAreaElement\n ) {\n // The native focus event identifies Select's field without private refs.\n field.value = target;\n validation();\n }\n }\n function keydown(event: KeyboardEvent): void {\n if (\n active.value &&\n !popup.value &&\n !event.defaultPrevented &&\n !event.isComposing\n )\n props.onKeyDown(event);\n }\n function focusout(event: FocusEvent): void {\n if (\n event.relatedTarget instanceof Node &&\n host.value?.contains(event.relatedTarget)\n )\n return;\n const commit = props.onBlur;\n void nextTick(() => {\n if (\n active.value &&\n !popup.value &&\n host.value &&\n !host.value.contains(document.activeElement)\n )\n commit();\n });\n }\n function control() {\n const editor = props.controller.editor;\n const owner = props.editorRef;\n const inputRef = (\n target: HTMLInputElement | HTMLTextAreaElement | null\n ): void => {\n field.value = target;\n owner(target);\n };\n const attrs = {\n ...props.attrs,\n class: props.className,\n \"aria-label\": props.label,\n };\n if (editor === \"boolean\")\n return h(ElementCheckbox, {\n ...attrs,\n label: props.label,\n checked: props.controller.draft === \"true\",\n inputRef,\n onChange: (checked) => props.onChange(String(checked)),\n });\n if (editor && typeof editor === \"object\") {\n const select = {\n ...attrs,\n ref: focusControlRef(props.editorRef),\n options: props.controller.selectOptions,\n onVisibleChange: (open: boolean) => {\n popup.value = open;\n },\n };\n if (editor.type === \"multi-select\")\n return h(ElementMultiSelect, {\n ...select,\n value: readMultiDraft(props.controller.draft),\n onChange: (values) => props.onChange(formatMultiDraft(values)),\n });\n return h(ElementSelect, {\n ...select,\n value: props.controller.draft,\n onChange: props.onChange,\n });\n }\n return h(ElementInput, {\n ...attrs,\n type: editorInputType(editor),\n value: props.controller.draft,\n inputRef,\n onChange: props.onChange,\n });\n }\n return () =>\n h(\n \"div\",\n {\n ref: host,\n class: \"adapttable-element-plus-editor-host\",\n onKeydownCapture: keydown,\n onFocusinCapture: focusin,\n onFocusout: focusout,\n },\n present.value ? [control()] : []\n );\n },\n {\n name: \"ElementCellEditor\",\n inheritAttrs: false,\n props: editorRuntimeProps,\n }\n);\n\n// Keep the row type at the functional boundary; the presentation validates\n// values and owns the editor's reactive lifecycle.\nfunction ElementCellEditor<TRow>(\n props: EditableCellEditorProps<TRow> & { className?: string }\n) {\n return createVNode(ElementCellEditorPresentation, { ...props });\n}\nElementCellEditor.props = Object.keys(\n editorRuntimeProps\n) as (keyof typeof editorRuntimeProps)[];\nElementCellEditor.inheritAttrs = false;\nexport default ElementCellEditor;\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n EditableCellChrome,\n type EditableCellChromeSlots,\n editableCustomControl,\n useEditableCellModel,\n type VueEditableCellProps,\n} from \"@adapttable/vue/adapter\";\nimport { Fragment, h, type VNodeChild } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\nimport ElementCellEditor from \"./ElementCellEditor\";\n\ndefineOptions({ name: \"ElementEditableCell\" });\nconst props = defineProps<VueEditableCellProps<TRow>>();\nconst names = useClassNames();\nconst model = useEditableCellModel(() => props);\nconst controls: EditableCellChromeSlots<TRow> = {\n Activate: (control) =>\n elementButton(\n {\n title: control.title,\n \"aria-label\": control.title,\n class: [control.className, names.value.editCellActivate],\n ref: control.activateRef,\n \"data-adapttable-part\": \"edit-cell-activate\",\n \"data-save-status\": control.saveStatus,\n \"data-dirty\": control.dirty ? \"\" : undefined,\n onClick: control.onClick,\n onDblclick: control.onDoubleClick,\n onKeydown: control.onKeyDown,\n },\n control.display\n ),\n Editor: (control) => {\n const editor = control.controller.editor;\n if (editor && typeof editor === \"object\" && editor.type === \"custom\")\n return h(Fragment, [\n editor.render(editableCustomControl(model.value)) as VNodeChild,\n ]);\n return h(ElementCellEditor<TRow>, {\n ...control,\n className: names.value.editCellEditor,\n });\n },\n Button: (control) =>\n elementButton(\n {\n class: [\n control.className,\n control.part === \"edit-cell-rollback\"\n ? names.value.editCellRollback\n : names.value.editCellConflictButton,\n ],\n \"data-adapttable-part\": control.part,\n onMousedown: control.onMouseDown,\n onClick: control.onClick,\n },\n control.label\n ),\n};\nconst Render = () =>\n EditableCellChrome({ model: model.value, classNames: names.value, controls });\nconst renderProps: string[] = [];\nRender.props = renderProps;\n</script>\n\n<template><Render /></template>\n","import type { EditingActionButtonProps } from \"@adapttable/vue/adapter\";\nimport { mergeProps, type VNodeChild } from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\n\nexport function elementEditingButton(\n control: EditingActionButtonProps,\n className?: string\n) {\n return elementButton(\n mergeProps(control.attrs, { class: className, onClick: control.onClick }),\n [\n control.icon === false ? null : (control.icon as VNodeChild),\n control.label,\n ]\n );\n}\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n BatchEditBarChrome,\n type BatchEditBarProps,\n} from \"@adapttable/vue/adapter\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementEditingButton } from \"./elementEditingButton\";\ndefineOptions({ name: \"ElementBatchEditBar\" });\nconst props = withDefaults(defineProps<BatchEditBarProps<TRow>>(), {\n contested: undefined,\n});\nconst names = useClassNames();\nconst Render = () =>\n BatchEditBarChrome({\n ...props,\n className: [props.className, names.value.batchEditBar]\n .filter(Boolean)\n .join(\" \"),\n controls: {\n Button: (control) =>\n elementEditingButton(control, names.value.batchEditButton),\n },\n });\n\n// Declare no props so Vue forwards all root attributes, including id and data-*.\nconst renderProps: string[] = [];\nRender.props = renderProps;\n</script>\n\n<template>\n <Render />\n</template>\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n RowEditActionsChrome,\n type RowEditActionsProps,\n} from \"@adapttable/vue/adapter\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementEditingButton } from \"./elementEditingButton\";\ndefineOptions({ name: \"ElementRowEditActions\" });\nconst props = withDefaults(defineProps<RowEditActionsProps<TRow>>(), {\n showBegin: undefined,\n});\nconst names = useClassNames();\nconst Render = () =>\n RowEditActionsChrome({\n ...props,\n className: [props.className, names.value.rowEditActions]\n .filter(Boolean)\n .join(\" \"),\n controls: {\n Button: (control) =>\n elementEditingButton(control, names.value.rowEditButton),\n },\n });\n\n// Declare no props so Vue forwards all root attributes, including id and data-*.\nconst renderProps: string[] = [];\nRender.props = renderProps;\n</script>\n\n<template>\n <Render />\n</template>\n","import {\n HistoryButtonsChrome,\n type ToolbarExtrasSlotProps,\n} from \"@adapttable/vue/adapter\";\nimport { defineComponent, type PropType } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\n\nexport const ElementHistoryButtons = defineComponent(\n (props: ToolbarExtrasSlotProps) => {\n const names = useClassNames();\n return () =>\n HistoryButtonsChrome({\n ...props,\n classNames: { ...names.value },\n slots: { Button: ({ label, attrs }) => elementButton(attrs, label) },\n });\n },\n {\n name: \"ElementHistoryButtons\",\n props: {\n onUndo: { type: Function as PropType<ToolbarExtrasSlotProps[\"onUndo\"]> },\n onRedo: { type: Function as PropType<ToolbarExtrasSlotProps[\"onRedo\"]> },\n canUndo: {\n type: Boolean as PropType<ToolbarExtrasSlotProps[\"canUndo\"]>,\n default: undefined,\n },\n canRedo: {\n type: Boolean as PropType<ToolbarExtrasSlotProps[\"canRedo\"]>,\n default: undefined,\n },\n undoLabel: {\n type: String as PropType<ToolbarExtrasSlotProps[\"undoLabel\"]>,\n },\n redoLabel: {\n type: String as PropType<ToolbarExtrasSlotProps[\"redoLabel\"]>,\n },\n density: { type: String as PropType<ToolbarExtrasSlotProps[\"density\"]> },\n onDensityChange: {\n type: Function as PropType<ToolbarExtrasSlotProps[\"onDensityChange\"]>,\n },\n labels: { type: Object as PropType<ToolbarExtrasSlotProps[\"labels\"]> },\n classNames: {\n type: Object as PropType<ToolbarExtrasSlotProps[\"classNames\"]>,\n },\n },\n }\n);\n","import type {\n CellEditHandler,\n StaticTableFeature,\n TableEditingOptions,\n TableFeature,\n} from \"@adapttable/vue\";\nimport {\n batchEditBarSlotKey,\n editableCellSlotKey,\n extendFeature,\n rowEditActionsSlotKey,\n slotRender,\n UNDO_REDO_CONTROL,\n} from \"@adapttable/vue/adapter\";\nimport {\n batchEditing as bindingBatchEditing,\n editing as bindingEditing,\n type EditingLifecycleExtras,\n rowEditing as bindingRowEditing,\n undoRedoButtons as bindingUndoRedoButtons,\n} from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { ElementEditableCell } from \"./editing/ElementEditableCell\";\nimport {\n ElementBatchEditBar,\n ElementRowEditActions,\n} from \"./editing/ElementEditingActions\";\nimport { ElementHistoryButtons } from \"./editing/ElementHistoryButtons\";\n\nfunction cellSlot<TRow>() {\n return slotRender(editableCellSlotKey<TRow>(), (props) =>\n h(ElementEditableCell<TRow>, { ...props })\n );\n}\n\n/** Element controls keep all validation, save and host-write transitions in the binding. */\nexport function editing<TRow>(\n onCellEdit: CellEditHandler<TRow>,\n extras: EditingLifecycleExtras<TRow> = {}\n): TableFeature<TRow> {\n return extendFeature(bindingEditing(onCellEdit, extras), [cellSlot<TRow>()]);\n}\n\n/** Edit a row as one gesture with explicit Element Plus Save and Cancel controls. */\nexport function rowEditing<TRow>(\n onRowEdit: NonNullable<TableEditingOptions<TRow>[\"onRowEdit\"]>,\n extras: EditingLifecycleExtras<TRow> = {}\n): TableFeature<TRow> {\n return extendFeature(bindingRowEditing(onRowEdit, extras), [\n cellSlot<TRow>(),\n slotRender(rowEditActionsSlotKey<TRow>(), (props) =>\n h(ElementRowEditActions<TRow>, { ...props })\n ),\n ]);\n}\n\n/** Stage edits across rows; host writes happen only on the batch Save action. */\nexport function batchEditing<TRow>(\n onBatchEdit: NonNullable<TableEditingOptions<TRow>[\"onBatchEdit\"]>,\n extras: EditingLifecycleExtras<TRow> = {}\n): TableFeature<TRow> {\n return extendFeature(bindingBatchEditing(onBatchEdit, extras), [\n cellSlot<TRow>(),\n slotRender(batchEditBarSlotKey<TRow>(), (props) =>\n h(ElementBatchEditBar<TRow>, { ...props })\n ),\n ]);\n}\n\nexport { ElementEditableCell } from \"./editing/ElementEditableCell\";\nexport {\n ElementBatchEditBar,\n ElementRowEditActions,\n} from \"./editing/ElementEditingActions\";\nexport type {\n BatchEditingState,\n BatchRowEdit,\n CellEditHandler,\n RowEditingState,\n TableEditingOptions,\n} from \"@adapttable/vue\";\nexport type { RowEditIcons } from \"@adapttable/vue/adapter\";\nexport type { EditingLifecycleExtras } from \"@adapttable/vue/features\";\nexport { dirtyIndicators, editHistory } from \"@adapttable/vue/features\";\n\n/** Opt-in Element Plus Undo and Redo buttons use the shell's history projection. */\nexport function undoRedoButtons(): StaticTableFeature {\n return extendFeature(bindingUndoRedoButtons(), [\n slotRender(UNDO_REDO_CONTROL, (props) =>\n h(ElementHistoryButtons, { ...props })\n ),\n ]);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;EAKA,MAAM,QAAQ;EAId,MAAM,OAAO;EACb,MAAM,WAAA,GAAU,IAAA,WAAA,CAA2B;EAC3C,SAAS,OAAO,OAAsB;GACpC,IACE,MAAM,QAAQ,KAAK,KACnB,MAAM,OAAO,SAAyB,OAAO,SAAS,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