@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.
Files changed (62) hide show
  1. package/dist/{ElementColumnMenuPanel-D7SdfclW.js → ElementColumnMenuPanel-D9oWJf02.js} +10 -5
  2. package/dist/ElementColumnMenuPanel-D9oWJf02.js.map +1 -0
  3. package/dist/{ElementColumnMenuPanel-DRQbZVow.cjs → ElementColumnMenuPanel-DavsUQAR.cjs} +10 -5
  4. package/dist/ElementColumnMenuPanel-DavsUQAR.cjs.map +1 -0
  5. package/dist/{ElementFilterSurface-DcPyYCK-.cjs → ElementFilterSurface-B8Fo3hPb.cjs} +7 -1
  6. package/dist/ElementFilterSurface-B8Fo3hPb.cjs.map +1 -0
  7. package/dist/{ElementFilterSurface-DdvPfm1N.js → ElementFilterSurface-BR_nBvZU.js} +8 -2
  8. package/dist/ElementFilterSurface-BR_nBvZU.js.map +1 -0
  9. package/dist/batch-editing.cjs +1 -1
  10. package/dist/batch-editing.js +1 -1
  11. package/dist/{column-menu-CfqfyZzs.js → column-menu-C6gwlyUQ.js} +2 -2
  12. package/dist/{column-menu-CfqfyZzs.js.map → column-menu-C6gwlyUQ.js.map} +1 -1
  13. package/dist/{column-menu-DfTLlqC-.cjs → column-menu-CtaKQS3b.cjs} +2 -2
  14. package/dist/{column-menu-DfTLlqC-.cjs.map → column-menu-CtaKQS3b.cjs.map} +1 -1
  15. package/dist/column-menu.cjs +1 -1
  16. package/dist/column-menu.js +1 -1
  17. package/dist/{editing-BX-jUtdO.cjs → editing-BMtWRqqJ.cjs} +8 -3
  18. package/dist/editing-BMtWRqqJ.cjs.map +1 -0
  19. package/dist/editing-BnLdNDlo.d.ts.map +1 -1
  20. package/dist/editing-Cg6ZNvSa.d.cts.map +1 -1
  21. package/dist/{editing-C1Hy-MCQ.js → editing-CohAxA65.js} +8 -3
  22. package/dist/editing-CohAxA65.js.map +1 -0
  23. package/dist/editing.cjs +1 -1
  24. package/dist/editing.js +1 -1
  25. package/dist/{filters-BA8vjGzr.cjs → filters-2G3MfNF7.cjs} +12 -4
  26. package/dist/filters-2G3MfNF7.cjs.map +1 -0
  27. package/dist/{filters-Dg22pfUy.js → filters-DD-qeRIb.js} +12 -4
  28. package/dist/filters-DD-qeRIb.js.map +1 -0
  29. package/dist/filters.cjs +2 -2
  30. package/dist/filters.js +2 -2
  31. package/dist/grouping-panel.cjs +9 -7
  32. package/dist/grouping-panel.cjs.map +1 -1
  33. package/dist/grouping-panel.js +9 -7
  34. package/dist/grouping-panel.js.map +1 -1
  35. package/dist/{header-filters-B_WFdnIO.js → header-filters-Chknfchw.js} +2 -2
  36. package/dist/{header-filters-B_WFdnIO.js.map → header-filters-Chknfchw.js.map} +1 -1
  37. package/dist/{header-filters-DnlmROS8.cjs → header-filters-D71v75Us.cjs} +2 -2
  38. package/dist/{header-filters-DnlmROS8.cjs.map → header-filters-D71v75Us.cjs.map} +1 -1
  39. package/dist/header-filters.cjs +1 -1
  40. package/dist/header-filters.js +1 -1
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.d.cts.map +1 -1
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js.map +1 -1
  45. package/dist/preset.cjs +4 -4
  46. package/dist/preset.js +4 -4
  47. package/dist/{saved-views-DLiRBZ13.cjs → saved-views-BTJxWOyY.cjs} +2 -2
  48. package/dist/{saved-views-DLiRBZ13.cjs.map → saved-views-BTJxWOyY.cjs.map} +1 -1
  49. package/dist/{saved-views-BtC15-kG.js → saved-views-DW8WybwV.js} +2 -2
  50. package/dist/{saved-views-BtC15-kG.js.map → saved-views-DW8WybwV.js.map} +1 -1
  51. package/dist/saved-views.cjs +1 -1
  52. package/dist/saved-views.js +1 -1
  53. package/dist/styles.css +258 -1
  54. package/package.json +3 -3
  55. package/dist/ElementColumnMenuPanel-D7SdfclW.js.map +0 -1
  56. package/dist/ElementColumnMenuPanel-DRQbZVow.cjs.map +0 -1
  57. package/dist/ElementFilterSurface-DcPyYCK-.cjs.map +0 -1
  58. package/dist/ElementFilterSurface-DdvPfm1N.js.map +0 -1
  59. package/dist/editing-BX-jUtdO.cjs.map +0 -1
  60. package/dist/editing-C1Hy-MCQ.js.map +0 -1
  61. package/dist/filters-BA8vjGzr.cjs.map +0 -1
  62. package/dist/filters-Dg22pfUy.js.map +0 -1
@@ -60,10 +60,15 @@ const ElementColumnMenuPanel = defineComponent((props) => {
60
60
  event.stopPropagation();
61
61
  close("escape");
62
62
  };
63
- watch([active, () => props.control.anchor], ([enabled, anchor], _previous, cleanup) => {
64
- if (!enabled || !anchor) return;
65
- anchor.addEventListener("keydown", keydown);
66
- cleanup(() => anchor.removeEventListener("keydown", keydown));
63
+ watch([
64
+ active,
65
+ () => props.control.anchor,
66
+ () => props.control.open
67
+ ], ([enabled, anchor], _previous, cleanup) => {
68
+ if (!enabled || !anchor || !props.control.open) return;
69
+ const document = anchor.ownerDocument;
70
+ document.addEventListener("keydown", keydown);
71
+ cleanup(() => document.removeEventListener("keydown", keydown));
67
72
  }, { immediate: true });
68
73
  const focus = () => {
69
74
  if (!active.value || !props.control.open || !props.control.isCurrent()) return;
@@ -123,4 +128,4 @@ const ElementColumnMenuPanel = defineComponent((props) => {
123
128
  //#endregion
124
129
  export { columnMenuContainer as n, ElementColumnMenuPanel as t };
125
130
 
126
- //# sourceMappingURL=ElementColumnMenuPanel-D7SdfclW.js.map
131
+ //# sourceMappingURL=ElementColumnMenuPanel-D9oWJf02.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElementColumnMenuPanel-D9oWJf02.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, () => props.control.open],\n ([enabled, anchor], _previous, cleanup) => {\n if (!enabled || !anchor || !props.control.open) return;\n const document = anchor.ownerDocument;\n document.addEventListener(\"keydown\", keydown);\n cleanup(() => document.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,QAAQ,WAA+B,IAAI;CACjD,MAAM,YAAY,WAAoB;EACpC,IAAI,UAAU,MAAM;GAClB,MAAM,QAAQ;GACd;EACF;EACA,MAAM,QAAQ,kBAAkB,cAAc,SAAS;CACzD;CACA,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;EAC9D,cAAc,EAAE,MAAM,OAAuC;CAC/D;AACF,CACF"}
@@ -60,10 +60,15 @@ const ElementColumnMenuPanel = (0, vue.defineComponent)((props) => {
60
60
  event.stopPropagation();
61
61
  close("escape");
62
62
  };
63
- (0, vue.watch)([active, () => props.control.anchor], ([enabled, anchor], _previous, cleanup) => {
64
- if (!enabled || !anchor) return;
65
- anchor.addEventListener("keydown", keydown);
66
- cleanup(() => anchor.removeEventListener("keydown", keydown));
63
+ (0, vue.watch)([
64
+ active,
65
+ () => props.control.anchor,
66
+ () => props.control.open
67
+ ], ([enabled, anchor], _previous, cleanup) => {
68
+ if (!enabled || !anchor || !props.control.open) return;
69
+ const document = anchor.ownerDocument;
70
+ document.addEventListener("keydown", keydown);
71
+ cleanup(() => document.removeEventListener("keydown", keydown));
67
72
  }, { immediate: true });
68
73
  const focus = () => {
69
74
  if (!active.value || !props.control.open || !props.control.isCurrent()) return;
@@ -134,4 +139,4 @@ Object.defineProperty(exports, "columnMenuContainer", {
134
139
  }
135
140
  });
136
141
 
137
- //# sourceMappingURL=ElementColumnMenuPanel-DRQbZVow.cjs.map
142
+ //# sourceMappingURL=ElementColumnMenuPanel-DavsUQAR.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElementColumnMenuPanel-DavsUQAR.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, () => props.control.open],\n ([enabled, anchor], _previous, cleanup) => {\n if (!enabled || !anchor || !props.control.open) return;\n const document = anchor.ownerDocument;\n document.addEventListener(\"keydown\", keydown);\n cleanup(() => document.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,GAAqBC,IAAAA,WAAAA,CAA0B;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,SAAA,GAAQA,IAAAA,WAAAA,CAA+B,IAAI;CACjD,MAAM,YAAY,WAAoB;EACpC,IAAI,UAAU,MAAM;GAClB,MAAM,QAAQ;GACd;EACF;EACA,MAAM,QAAQ,kBAAkB,cAAc,SAAS;CACzD;CACA,CAAA,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,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"}
@@ -185,6 +185,12 @@ const ElementFilterSurface = (0, vue.defineComponent)((props) => {
185
185
  event.stopPropagation();
186
186
  close("escape");
187
187
  };
188
+ (0, vue.watch)(() => active.value && props.open, (open, _previous, cleanup) => {
189
+ const document = props.anchor?.ownerDocument;
190
+ if (!open || !document) return;
191
+ document.addEventListener("keydown", keydown);
192
+ cleanup(() => document.removeEventListener("keydown", keydown));
193
+ }, { immediate: true });
188
194
  const captureKeydown = (event) => {
189
195
  const target = event.target;
190
196
  if (target instanceof Element && target.getAttribute("role") === "combobox" && target.getAttribute("aria-expanded") === "false") keydown(event);
@@ -299,4 +305,4 @@ Object.defineProperty(exports, "_sfc_main", {
299
305
  }
300
306
  });
301
307
 
302
- //# sourceMappingURL=ElementFilterSurface-DcPyYCK-.cjs.map
308
+ //# sourceMappingURL=ElementFilterSurface-B8Fo3hPb.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElementFilterSurface-B8Fo3hPb.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 watch,\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 // Escape also dismisses while focus is still on the external trigger,\n // before the native enter transition has moved it into the card.\n watch(\n () => active.value && props.open,\n (open, _previous, cleanup) => {\n const document = props.anchor?.ownerDocument;\n if (!open || !document) return;\n document.addEventListener(\"keydown\", keydown);\n cleanup(() => document.removeEventListener(\"keydown\", keydown));\n },\n { immediate: true }\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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;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"}
@@ -3,7 +3,7 @@ import { t as _sfc_main$2 } from "./ElementCheckbox-BQN4_eas.js";
3
3
  import { t as _sfc_main$3 } from "./ElementInput-BsoAvPfO.js";
4
4
  import { t as _sfc_main$4 } from "./ElementSelect-Cl5ZjuQM.js";
5
5
  import { t as rtlScrollbarGutter } from "./scrollbarGutter-BNp0-4l1.js";
6
- import { createBlock, createVNode, defineComponent, h, mergeProps, nextTick, normalizeClass, normalizeProps, onMounted, openBlock, shallowRef, unref, withCtx, withDirectives } from "vue";
6
+ import { createBlock, createVNode, defineComponent, h, mergeProps, nextTick, normalizeClass, normalizeProps, onMounted, openBlock, shallowRef, unref, watch, withCtx, withDirectives } from "vue";
7
7
  import { ChecklistChrome, FULLSCREEN_MODEL, FilterFieldChrome, defaultFilterRegistry, filterLabel, filterWidgetKind, useChecklistModel, useFeatureState, useFilterField, useScopeActivity } from "@adapttable/vue/adapter";
8
8
  import { ClickOutside, ElCard, ElDrawer, ElFormItem, ElPopover, ElText } from "element-plus";
9
9
  //#region src/filters/fieldControls.ts
@@ -185,6 +185,12 @@ const ElementFilterSurface = defineComponent((props) => {
185
185
  event.stopPropagation();
186
186
  close("escape");
187
187
  };
188
+ watch(() => active.value && props.open, (open, _previous, cleanup) => {
189
+ const document = props.anchor?.ownerDocument;
190
+ if (!open || !document) return;
191
+ document.addEventListener("keydown", keydown);
192
+ cleanup(() => document.removeEventListener("keydown", keydown));
193
+ }, { immediate: true });
188
194
  const captureKeydown = (event) => {
189
195
  const target = event.target;
190
196
  if (target instanceof Element && target.getAttribute("role") === "combobox" && target.getAttribute("aria-expanded") === "false") keydown(event);
@@ -282,4 +288,4 @@ const ElementFilterSurface = defineComponent((props) => {
282
288
  //#endregion
283
289
  export { _sfc_main as n, ElementChecklistFilter as r, ElementFilterSurface as t };
284
290
 
285
- //# sourceMappingURL=ElementFilterSurface-DdvPfm1N.js.map
291
+ //# sourceMappingURL=ElementFilterSurface-BR_nBvZU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElementFilterSurface-BR_nBvZU.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 watch,\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 // Escape also dismisses while focus is still on the external trigger,\n // before the native enter transition has moved it into the card.\n watch(\n () => active.value && props.open,\n (open, _previous, cleanup) => {\n const document = props.anchor?.ownerDocument;\n if (!open || !document) return;\n document.addEventListener(\"keydown\", keydown);\n cleanup(() => document.removeEventListener(\"keydown\", keydown));\n },\n { immediate: true }\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;EACH,SAAS,YACP,EAAEC,aAAe;GACf,GAAG,QAAQ;GACX,OAAO,QAAQ;GACf,SAAS,QAAQ;GACjB,OACE,QAAQ,MAAM,4BAA4B,oBACtC,MAAM,CAAC,CAAC,iBACR,MAAM,CAAC,CAAC;GACd,UAAU,QAAQ;EACpB,CAAC;EACH,WAAW,YACT,EAAEC,aAAiB;GACjB,GAAG,QAAQ;GACX,SAAS,QAAQ;GACjB,OAAO,QAAQ;GACf,cAAc;GACd,OAAO,MAAM,CAAC,CAAC;GACf,UAAU,QAAQ;EACpB,CAAC;CACL;AACF;;;;;;;;;;;;;;;EChCA,MAAM,QAAQ;EAGd,MAAM,QAAQ,qBAAqB,KAAK;EACxC,MAAM,WAAW,4BAA4B,MAAM,cAAc,CAAC,CAAC;EACnE,MAAM,eACJ,kBAAkB;GAChB,OAAO,MAAM;GACb;GACA,YAAY,MAAM;EACpB,CAAC;EAEH,OAAO,QAAQ,CAAA;;GAGL,OAAA,U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GACZ,WAAW;GACX,OAAO;GACP,aAAa;GACb,aAAa;IACX,SAAS;IACT,WAAW,GAAG,mBAAmB,MAAM,KAAK,MAAM,QAAQ,cAAc,WAAW,EAAE;GACvF;GACA,cAAc;EAChB,GACA,EACE,eACE,eACE,EACE,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,CAAC,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,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_editing = require("./editing-BX-jUtdO.cjs");
2
+ const require_editing = require("./editing-BMtWRqqJ.cjs");
3
3
  exports.ElementBatchEditBar = require_editing._sfc_main$1;
4
4
  exports.batchEditing = require_editing.batchEditing;
@@ -1,2 +1,2 @@
1
- import { c as _sfc_main, t as batchEditing } from "./editing-C1Hy-MCQ.js";
1
+ import { c as _sfc_main, t as batchEditing } from "./editing-CohAxA65.js";
2
2
  export { _sfc_main as ElementBatchEditBar, batchEditing };
@@ -1,7 +1,7 @@
1
1
  import { n as isElementRef, t as elementButton } from "./button-DwB4UxI2.js";
2
2
  import { t as _sfc_main } from "./ElementInput-BsoAvPfO.js";
3
3
  import { t as _sfc_main$1 } from "./ElementSelect-Cl5ZjuQM.js";
4
- import { n as columnMenuContainer, t as ElementColumnMenuPanel } from "./ElementColumnMenuPanel-D7SdfclW.js";
4
+ import { n as columnMenuContainer, t as ElementColumnMenuPanel } from "./ElementColumnMenuPanel-D9oWJf02.js";
5
5
  import { createVNode, defineComponent, h, inject } from "vue";
6
6
  import { COLUMN_HEADER_RENAME, COLUMN_MENU, ColumnHeaderRenameChrome, ColumnMenuChrome, extendFeature, managedOverlayPanel, slotRender, useColumnMenu } from "@adapttable/vue/adapter";
7
7
  import { columnMenu } from "@adapttable/vue/features";
@@ -112,4 +112,4 @@ function columnMenu$1() {
112
112
  //#endregion
113
113
  export { ColumnMenu as n, columnMenu$1 as t };
114
114
 
115
- //# sourceMappingURL=column-menu-CfqfyZzs.js.map
115
+ //# sourceMappingURL=column-menu-C6gwlyUQ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"column-menu-CfqfyZzs.js","names":["ElementSelect","ElementInput","columnMenu","bindingColumnMenu"],"sources":["../src/columns/ElementColumnChoice.ts","../src/columns/elementColumnMenuControls.ts","../src/columns/ColumnMenu.ts","../src/column-menu.ts"],"sourcesContent":["import type { ColumnMenuSlots } from \"@adapttable/vue/adapter\";\nimport { defineComponent, h, inject, type PropType } from \"vue\";\n\nimport ElementSelect from \"../controls/ElementSelect.vue\";\nimport { columnMenuContainer } from \"./panelContext\";\n\ntype ChoiceControl = Parameters<ColumnMenuSlots[\"Choice\"]>[0];\nfunction isKeyboardHandler(\n value: unknown\n): value is (event: KeyboardEvent) => void {\n return typeof value === \"function\";\n}\nexport const ElementColumnChoice = defineComponent(\n (props: { readonly control: ChoiceControl }) => {\n const container = inject(columnMenuContainer, undefined);\n const escape = (event: KeyboardEvent) => {\n const target = event.target;\n if (\n event.key === \"Escape\" &&\n !event.defaultPrevented &&\n !event.isComposing &&\n target instanceof Element &&\n target.getAttribute(\"role\") === \"combobox\" &&\n target.getAttribute(\"aria-expanded\") === \"false\"\n ) {\n const handler = props.control.attrs.onKeydown;\n if (isKeyboardHandler(handler)) handler(event);\n }\n };\n return () =>\n h(ElementSelect, {\n ...props.control.attrs,\n value: props.control.value,\n options: props.control.options,\n teleported: container?.value != null,\n appendTo: container?.value ?? undefined,\n onChange: props.control.onChange,\n onKeydownCapture: escape,\n });\n },\n {\n name: \"ElementColumnChoice\",\n props: {\n control: { type: Object as PropType<ChoiceControl> },\n },\n }\n);\n","import {\n type ColumnMenuButtonProps,\n type ColumnMenuSlots,\n managedOverlayPanel,\n} from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport { isElementRef } from \"../controls/ref\";\nimport { ElementColumnChoice } from \"./ElementColumnChoice\";\nimport { ElementColumnMenuPanel } from \"./ElementColumnMenuPanel\";\n\nfunction button(control: ColumnMenuButtonProps) {\n const icons = {\n grip: \"⠿\",\n visible: \"◉\",\n hidden: \"○\",\n pin: \"⌖\",\n more: \"⋯\",\n rename: \"✎\",\n };\n return elementButton(\n { \"aria-label\": control.label, ...control.attrs },\n control.icon\n ? h(\"span\", { \"aria-hidden\": \"true\" }, icons[control.icon])\n : control.label\n );\n}\nexport const elementColumnMenuSlots: ColumnMenuSlots = {\n Trigger: button,\n Button: button,\n Input: ({ attrs, value, onChange }) => {\n const nativeAttrs = Object.fromEntries(\n Object.entries(attrs).filter(([key]) => key !== \"ref\" && key !== \"type\")\n );\n return h(ElementInput, {\n ...nativeAttrs,\n value,\n type: attrs.type === \"search\" ? \"search\" : \"text\",\n inputRef: isElementRef(attrs.ref) ? attrs.ref : undefined,\n onChange,\n });\n },\n Choice: (control) => h(ElementColumnChoice, { control }),\n Panel: managedOverlayPanel((control) =>\n h(ElementColumnMenuPanel, { control })\n ),\n};\n","import {\n ColumnMenuChrome,\n type ColumnMenuSlotProps,\n useColumnMenu,\n} from \"@adapttable/vue/adapter\";\nimport { createVNode, defineComponent, h, type SetupContext } from \"vue\";\n\nimport { elementColumnMenuSlots } from \"./elementColumnMenuControls\";\n\nconst menuProps = {\n allColumns: null,\n layout: null,\n labels: null,\n hasRowActions: Boolean,\n hasRowReorder: Boolean,\n onAutoSize: null,\n onAutoSizeColumn: null,\n onSortColumn: null,\n onFilterColumn: null,\n onRenameColumn: null,\n sortBy: null,\n sortDir: null,\n dir: null,\n groupingPanel: null,\n featureHost: null,\n classNames: null,\n container: null,\n} satisfies Record<keyof ColumnMenuSlotProps<unknown>, unknown>;\nconst ElementColumnMenuPresentation = defineComponent(\n (props: ColumnMenuSlotProps<unknown>) => {\n const model = useColumnMenu(() => props);\n return () => h(ColumnMenuChrome, { model, slots: elementColumnMenuSlots });\n },\n { name: \"ElementColumnMenuPresentation\", props: menuProps }\n);\nexport function ColumnMenu<TRow>(\n props: ColumnMenuSlotProps<TRow>,\n context: Pick<SetupContext, \"attrs\">\n) {\n return createVNode(ElementColumnMenuPresentation, {\n ...context.attrs,\n ...props,\n });\n}\nColumnMenu.props = menuProps;\n","import type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n COLUMN_HEADER_RENAME,\n COLUMN_MENU,\n ColumnHeaderRenameChrome,\n extendFeature,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { columnMenu as bindingColumnMenu } from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { ColumnMenu } from \"./columns/ColumnMenu\";\nimport { elementColumnMenuSlots } from \"./columns/elementColumnMenuControls\";\n\nexport function columnMenu(): StaticTableFeature {\n return extendFeature(bindingColumnMenu(), [\n slotRender(COLUMN_MENU, (props) => h(ColumnMenu<never>, { ...props })),\n slotRender(COLUMN_HEADER_RENAME, (props) =>\n h(ColumnHeaderRenameChrome, { ...props, slots: elementColumnMenuSlots })\n ),\n ]);\n}\nexport { ColumnMenu } from \"./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AAQ,MAAM,CACzE;EACA,OAAO,EAAEC,WAAc;GACrB,GAAG;GACH;GACA,MAAM,MAAM,SAAS,WAAW,WAAW;GAC3C,UAAU,aAAa,MAAM,GAAG,IAAI,MAAM,MAAM,KAAA;GAChD;EACF,CAAC;CACH;CACA,SAAS,YAAY,EAAE,qBAAqB,EAAE,QAAQ,CAAC;CACvD,OAAO,qBAAqB,YAC1B,EAAE,wBAAwB,EAAE,QAAQ,CAAC,CACvC;AACF;;;ACvCA,MAAM,YAAY;CAChB,YAAY;CACZ,QAAQ;CACR,QAAQ;CACR,eAAe;CACf,eAAe;CACf,YAAY;CACZ,kBAAkB;CAClB,cAAc;CACd,gBAAgB;CAChB,gBAAgB;CAChB,QAAQ;CACR,SAAS;CACT,KAAK;CACL,eAAe;CACf,aAAa;CACb,YAAY;CACZ,WAAW;AACb;AACA,MAAM,gCAAgC,iBACnC,UAAwC;CACvC,MAAM,QAAQ,oBAAoB,KAAK;CACvC,aAAa,EAAE,kBAAkB;EAAE;EAAO,OAAO;CAAuB,CAAC;AAC3E,GACA;CAAE,MAAM;CAAiC,OAAO;AAAU,CAC5D;AACA,SAAgB,WACd,OACA,SACA;CACA,OAAO,YAAY,+BAA+B;EAChD,GAAG,QAAQ;EACX,GAAG;CACL,CAAC;AACH;AACA,WAAW,QAAQ;;;AC9BnB,SAAgBC,eAAiC;CAC/C,OAAO,cAAcC,WAAkB,GAAG,CACxC,WAAW,cAAc,UAAU,EAAE,YAAmB,EAAE,GAAG,MAAM,CAAC,CAAC,GACrE,WAAW,uBAAuB,UAChC,EAAE,0BAA0B;EAAE,GAAG;EAAO,OAAO;CAAuB,CAAC,CACzE,CACF,CAAC;AACH"}
1
+ {"version":3,"file":"column-menu-C6gwlyUQ.js","names":["ElementSelect","ElementInput","columnMenu","bindingColumnMenu"],"sources":["../src/columns/ElementColumnChoice.ts","../src/columns/elementColumnMenuControls.ts","../src/columns/ColumnMenu.ts","../src/column-menu.ts"],"sourcesContent":["import type { ColumnMenuSlots } from \"@adapttable/vue/adapter\";\nimport { defineComponent, h, inject, type PropType } from \"vue\";\n\nimport ElementSelect from \"../controls/ElementSelect.vue\";\nimport { columnMenuContainer } from \"./panelContext\";\n\ntype ChoiceControl = Parameters<ColumnMenuSlots[\"Choice\"]>[0];\nfunction isKeyboardHandler(\n value: unknown\n): value is (event: KeyboardEvent) => void {\n return typeof value === \"function\";\n}\nexport const ElementColumnChoice = defineComponent(\n (props: { readonly control: ChoiceControl }) => {\n const container = inject(columnMenuContainer, undefined);\n const escape = (event: KeyboardEvent) => {\n const target = event.target;\n if (\n event.key === \"Escape\" &&\n !event.defaultPrevented &&\n !event.isComposing &&\n target instanceof Element &&\n target.getAttribute(\"role\") === \"combobox\" &&\n target.getAttribute(\"aria-expanded\") === \"false\"\n ) {\n const handler = props.control.attrs.onKeydown;\n if (isKeyboardHandler(handler)) handler(event);\n }\n };\n return () =>\n h(ElementSelect, {\n ...props.control.attrs,\n value: props.control.value,\n options: props.control.options,\n teleported: container?.value != null,\n appendTo: container?.value ?? undefined,\n onChange: props.control.onChange,\n onKeydownCapture: escape,\n });\n },\n {\n name: \"ElementColumnChoice\",\n props: {\n control: { type: Object as PropType<ChoiceControl> },\n },\n }\n);\n","import {\n type ColumnMenuButtonProps,\n type ColumnMenuSlots,\n managedOverlayPanel,\n} from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport { isElementRef } from \"../controls/ref\";\nimport { ElementColumnChoice } from \"./ElementColumnChoice\";\nimport { ElementColumnMenuPanel } from \"./ElementColumnMenuPanel\";\n\nfunction button(control: ColumnMenuButtonProps) {\n const icons = {\n grip: \"⠿\",\n visible: \"◉\",\n hidden: \"○\",\n pin: \"⌖\",\n more: \"⋯\",\n rename: \"✎\",\n };\n return elementButton(\n { \"aria-label\": control.label, ...control.attrs },\n control.icon\n ? h(\"span\", { \"aria-hidden\": \"true\" }, icons[control.icon])\n : control.label\n );\n}\nexport const elementColumnMenuSlots: ColumnMenuSlots = {\n Trigger: button,\n Button: button,\n Input: ({ attrs, value, onChange }) => {\n const nativeAttrs = Object.fromEntries(\n Object.entries(attrs).filter(([key]) => key !== \"ref\" && key !== \"type\")\n );\n return h(ElementInput, {\n ...nativeAttrs,\n value,\n type: attrs.type === \"search\" ? \"search\" : \"text\",\n inputRef: isElementRef(attrs.ref) ? attrs.ref : undefined,\n onChange,\n });\n },\n Choice: (control) => h(ElementColumnChoice, { control }),\n Panel: managedOverlayPanel((control) =>\n h(ElementColumnMenuPanel, { control })\n ),\n};\n","import {\n ColumnMenuChrome,\n type ColumnMenuSlotProps,\n useColumnMenu,\n} from \"@adapttable/vue/adapter\";\nimport { createVNode, defineComponent, h, type SetupContext } from \"vue\";\n\nimport { elementColumnMenuSlots } from \"./elementColumnMenuControls\";\n\nconst menuProps = {\n allColumns: null,\n layout: null,\n labels: null,\n hasRowActions: Boolean,\n hasRowReorder: Boolean,\n onAutoSize: null,\n onAutoSizeColumn: null,\n onSortColumn: null,\n onFilterColumn: null,\n onRenameColumn: null,\n sortBy: null,\n sortDir: null,\n dir: null,\n groupingPanel: null,\n featureHost: null,\n classNames: null,\n container: null,\n} satisfies Record<keyof ColumnMenuSlotProps<unknown>, unknown>;\nconst ElementColumnMenuPresentation = defineComponent(\n (props: ColumnMenuSlotProps<unknown>) => {\n const model = useColumnMenu(() => props);\n return () => h(ColumnMenuChrome, { model, slots: elementColumnMenuSlots });\n },\n { name: \"ElementColumnMenuPresentation\", props: menuProps }\n);\nexport function ColumnMenu<TRow>(\n props: ColumnMenuSlotProps<TRow>,\n context: Pick<SetupContext, \"attrs\">\n) {\n return createVNode(ElementColumnMenuPresentation, {\n ...context.attrs,\n ...props,\n });\n}\nColumnMenu.props = menuProps;\n","import type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n COLUMN_HEADER_RENAME,\n COLUMN_MENU,\n ColumnHeaderRenameChrome,\n extendFeature,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { columnMenu as bindingColumnMenu } from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { ColumnMenu } from \"./columns/ColumnMenu\";\nimport { elementColumnMenuSlots } from \"./columns/elementColumnMenuControls\";\n\nexport function columnMenu(): StaticTableFeature {\n return extendFeature(bindingColumnMenu(), [\n slotRender(COLUMN_MENU, (props) => h(ColumnMenu<never>, { ...props })),\n slotRender(COLUMN_HEADER_RENAME, (props) =>\n h(ColumnHeaderRenameChrome, { ...props, slots: elementColumnMenuSlots })\n ),\n ]);\n}\nexport { ColumnMenu } from \"./columns/ColumnMenu\";\nexport type { ColumnMenuSlotProps } from \"@adapttable/vue/adapter\";\n"],"mappings":";;;;;;;;AAOA,SAAS,kBACP,OACyC;CACzC,OAAO,OAAO,UAAU;AAC1B;AACA,MAAa,sBAAsB,iBAChC,UAA+C;CAC9C,MAAM,YAAY,OAAO,qBAAqB,KAAA,CAAS;CACvD,MAAM,UAAU,UAAyB;EACvC,MAAM,SAAS,MAAM;EACrB,IACE,MAAM,QAAQ,YACd,CAAC,MAAM,oBACP,CAAC,MAAM,eACP,kBAAkB,WAClB,OAAO,aAAa,MAAM,MAAM,cAChC,OAAO,aAAa,eAAe,MAAM,SACzC;GACA,MAAM,UAAU,MAAM,QAAQ,MAAM;GACpC,IAAI,kBAAkB,OAAO,GAAG,QAAQ,KAAK;EAC/C;CACF;CACA,aACE,EAAEA,aAAe;EACf,GAAG,MAAM,QAAQ;EACjB,OAAO,MAAM,QAAQ;EACrB,SAAS,MAAM,QAAQ;EACvB,YAAY,WAAW,SAAS;EAChC,UAAU,WAAW,SAAS,KAAA;EAC9B,UAAU,MAAM,QAAQ;EACxB,kBAAkB;CACpB,CAAC;AACL,GACA;CACE,MAAM;CACN,OAAO,EACL,SAAS,EAAE,MAAM,OAAkC,EACrD;AACF,CACF;;;ACjCA,SAAS,OAAO,SAAgC;CAC9C,MAAM,QAAQ;EACZ,MAAM;EACN,SAAS;EACT,QA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AAcC,WAAkB,GAAG,CACxC,WAAW,cAAc,UAAU,EAAE,YAAmB,EAAE,GAAG,MAAM,CAAC,CAAC,GACrE,WAAW,uBAAuB,UAChC,EAAE,0BAA0B;EAAE,GAAG;EAAO,OAAO;CAAuB,CAAC,CACzE,CACF,CAAC;AACH"}
@@ -1,7 +1,7 @@
1
1
  const require_button = require("./button-BFjBL9m3.cjs");
2
2
  const require_ElementInput = require("./ElementInput-vBVDBaLp.cjs");
3
3
  const require_ElementSelect = require("./ElementSelect-K1rRvu5q.cjs");
4
- const require_ElementColumnMenuPanel = require("./ElementColumnMenuPanel-DRQbZVow.cjs");
4
+ const require_ElementColumnMenuPanel = require("./ElementColumnMenuPanel-DavsUQAR.cjs");
5
5
  let vue = require("vue");
6
6
  let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
7
7
  let _adapttable_vue_features = require("@adapttable/vue/features");
@@ -123,4 +123,4 @@ Object.defineProperty(exports, "columnMenu", {
123
123
  }
124
124
  });
125
125
 
126
- //# sourceMappingURL=column-menu-DfTLlqC-.cjs.map
126
+ //# sourceMappingURL=column-menu-CtaKQS3b.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"column-menu-DfTLlqC-.cjs","names":["defineComponent","inject","columnMenuContainer","h","ElementSelect","elementButton","h","ElementInput","isElementRef","managedOverlayPanel","ElementColumnMenuPanel","defineComponent","useColumnMenu","h","ColumnMenuChrome","createVNode","extendFeature","bindingColumnMenu","slotRender","COLUMN_MENU","h","COLUMN_HEADER_RENAME","ColumnHeaderRenameChrome"],"sources":["../src/columns/ElementColumnChoice.ts","../src/columns/elementColumnMenuControls.ts","../src/columns/ColumnMenu.ts","../src/column-menu.ts"],"sourcesContent":["import type { ColumnMenuSlots } from \"@adapttable/vue/adapter\";\nimport { defineComponent, h, inject, type PropType } from \"vue\";\n\nimport ElementSelect from \"../controls/ElementSelect.vue\";\nimport { columnMenuContainer } from \"./panelContext\";\n\ntype ChoiceControl = Parameters<ColumnMenuSlots[\"Choice\"]>[0];\nfunction isKeyboardHandler(\n value: unknown\n): value is (event: KeyboardEvent) => void {\n return typeof value === \"function\";\n}\nexport const ElementColumnChoice = defineComponent(\n (props: { readonly control: ChoiceControl }) => {\n const container = inject(columnMenuContainer, undefined);\n const escape = (event: KeyboardEvent) => {\n const target = event.target;\n if (\n event.key === \"Escape\" &&\n !event.defaultPrevented &&\n !event.isComposing &&\n target instanceof Element &&\n target.getAttribute(\"role\") === \"combobox\" &&\n target.getAttribute(\"aria-expanded\") === \"false\"\n ) {\n const handler = props.control.attrs.onKeydown;\n if (isKeyboardHandler(handler)) handler(event);\n }\n };\n return () =>\n h(ElementSelect, {\n ...props.control.attrs,\n value: props.control.value,\n options: props.control.options,\n teleported: container?.value != null,\n appendTo: container?.value ?? undefined,\n onChange: props.control.onChange,\n onKeydownCapture: escape,\n });\n },\n {\n name: \"ElementColumnChoice\",\n props: {\n control: { type: Object as PropType<ChoiceControl> },\n },\n }\n);\n","import {\n type ColumnMenuButtonProps,\n type ColumnMenuSlots,\n managedOverlayPanel,\n} from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport { isElementRef } from \"../controls/ref\";\nimport { ElementColumnChoice } from \"./ElementColumnChoice\";\nimport { ElementColumnMenuPanel } from \"./ElementColumnMenuPanel\";\n\nfunction button(control: ColumnMenuButtonProps) {\n const icons = {\n grip: \"⠿\",\n visible: \"◉\",\n hidden: \"○\",\n pin: \"⌖\",\n more: \"⋯\",\n rename: \"✎\",\n };\n return elementButton(\n { \"aria-label\": control.label, ...control.attrs },\n control.icon\n ? h(\"span\", { \"aria-hidden\": \"true\" }, icons[control.icon])\n : control.label\n );\n}\nexport const elementColumnMenuSlots: ColumnMenuSlots = {\n Trigger: button,\n Button: button,\n Input: ({ attrs, value, onChange }) => {\n const nativeAttrs = Object.fromEntries(\n Object.entries(attrs).filter(([key]) => key !== \"ref\" && key !== \"type\")\n );\n return h(ElementInput, {\n ...nativeAttrs,\n value,\n type: attrs.type === \"search\" ? \"search\" : \"text\",\n inputRef: isElementRef(attrs.ref) ? attrs.ref : undefined,\n onChange,\n });\n },\n Choice: (control) => h(ElementColumnChoice, { control }),\n Panel: managedOverlayPanel((control) =>\n h(ElementColumnMenuPanel, { control })\n ),\n};\n","import {\n ColumnMenuChrome,\n type ColumnMenuSlotProps,\n useColumnMenu,\n} from \"@adapttable/vue/adapter\";\nimport { createVNode, defineComponent, h, type SetupContext } from \"vue\";\n\nimport { elementColumnMenuSlots } from \"./elementColumnMenuControls\";\n\nconst menuProps = {\n allColumns: null,\n layout: null,\n labels: null,\n hasRowActions: Boolean,\n hasRowReorder: Boolean,\n onAutoSize: null,\n onAutoSizeColumn: null,\n onSortColumn: null,\n onFilterColumn: null,\n onRenameColumn: null,\n sortBy: null,\n sortDir: null,\n dir: null,\n groupingPanel: null,\n featureHost: null,\n classNames: null,\n container: null,\n} satisfies Record<keyof ColumnMenuSlotProps<unknown>, unknown>;\nconst ElementColumnMenuPresentation = defineComponent(\n (props: ColumnMenuSlotProps<unknown>) => {\n const model = useColumnMenu(() => props);\n return () => h(ColumnMenuChrome, { model, slots: elementColumnMenuSlots });\n },\n { name: \"ElementColumnMenuPresentation\", props: menuProps }\n);\nexport function ColumnMenu<TRow>(\n props: ColumnMenuSlotProps<TRow>,\n context: Pick<SetupContext, \"attrs\">\n) {\n return createVNode(ElementColumnMenuPresentation, {\n ...context.attrs,\n ...props,\n });\n}\nColumnMenu.props = menuProps;\n","import type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n COLUMN_HEADER_RENAME,\n COLUMN_MENU,\n ColumnHeaderRenameChrome,\n extendFeature,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { columnMenu as bindingColumnMenu } from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { ColumnMenu } from \"./columns/ColumnMenu\";\nimport { elementColumnMenuSlots } from \"./columns/elementColumnMenuControls\";\n\nexport function columnMenu(): StaticTableFeature {\n return extendFeature(bindingColumnMenu(), [\n slotRender(COLUMN_MENU, (props) => h(ColumnMenu<never>, { ...props })),\n slotRender(COLUMN_HEADER_RENAME, (props) =>\n h(ColumnHeaderRenameChrome, { ...props, slots: elementColumnMenuSlots })\n ),\n ]);\n}\nexport { ColumnMenu } from \"./columns/ColumnMenu\";\nexport type { ColumnMenuSlotProps } from \"@adapttable/vue/adapter\";\n"],"mappings":";;;;;;;;AAOA,SAAS,kBACP,OACyC;CACzC,OAAO,OAAO,UAAU;AAC1B;AACA,MAAa,uBAAA,GAAsBA,IAAAA,gBAAAA,EAChC,UAA+C;CAC9C,MAAM,aAAA,GAAYC,IAAAA,OAAAA,CAAOC,+BAAAA,qBAAqB,KAAA,CAAS;CACvD,MAAM,UAAU,UAAyB;EACvC,MAAM,SAAS,MAAM;EACrB,IACE,MAAM,QAAQ,YACd,CAAC,MAAM,oBACP,CAAC,MAAM,eACP,kBAAkB,WAClB,OAAO,aAAa,MAAM,MAAM,cAChC,OAAO,aAAa,eAAe,MAAM,SACzC;GACA,MAAM,UAAU,MAAM,QAAQ,MAAM;GACpC,IAAI,kBAAkB,OAAO,GAAG,QAAQ,KAAK;EAC/C;CACF;CACA,cAAA,GACEC,IAAAA,EAAAA,CAAEC,sBAAAA,WAAe;EACf,GAAG,MAAM,QAAQ;EACjB,OAAO,MAAM,QAAQ;EACrB,SAAS,MAAM,QAAQ;EACvB,YAAY,WAAW,SAAS;EAChC,UAAU,WAAW,SAAS,KAAA;EAC9B,UAAU,MAAM,QAAQ;EACxB,kBAAkB;CACpB,CAAC;AACL,GACA;CACE,MAAM;CACN,OAAO,EACL,SAAS,EAAE,MAAM,OAAkC,EACrD;AACF,CACF;;;ACjCA,SAAS,OAAO,SAAgC;CAC9C,MAAM,QAAQ;EACZ,MAAM;EACN,SAAS;EACT,QAAQ;EACR,KAAK;EACL,MAAM;EACN,QAAQ;CACV;CACA,OAAOC,eAAAA,cACL;EAAE,cAAc,QAA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ACA;CACA,QAAA,GAAOC,IAAAA,YAAAA,CAAY,+BAA+B;EAChD,GAAG,QAAQ;EACX,GAAG;CACL,CAAC;AACH;AACA,WAAW,QAAQ;;;AC9BnB,SAAgB,aAAiC;CAC/C,QAAA,GAAOC,wBAAAA,cAAAA,EAAAA,GAAcC,yBAAAA,WAAAA,CAAkB,GAAG,EAAA,GACxCC,wBAAAA,WAAAA,CAAWC,wBAAAA,cAAc,WAAA,GAAUC,IAAAA,EAAAA,CAAE,YAAmB,EAAE,GAAG,MAAM,CAAC,CAAC,IAAA,GACrEF,wBAAAA,WAAAA,CAAWG,wBAAAA,uBAAuB,WAAA,GAChCD,IAAAA,EAAAA,CAAEE,wBAAAA,0BAA0B;EAAE,GAAG;EAAO,OAAO;CAAuB,CAAC,CACzE,CACF,CAAC;AACH"}
1
+ {"version":3,"file":"column-menu-CtaKQS3b.cjs","names":["defineComponent","inject","columnMenuContainer","h","ElementSelect","elementButton","h","ElementInput","isElementRef","managedOverlayPanel","ElementColumnMenuPanel","defineComponent","useColumnMenu","h","ColumnMenuChrome","createVNode","extendFeature","bindingColumnMenu","slotRender","COLUMN_MENU","h","COLUMN_HEADER_RENAME","ColumnHeaderRenameChrome"],"sources":["../src/columns/ElementColumnChoice.ts","../src/columns/elementColumnMenuControls.ts","../src/columns/ColumnMenu.ts","../src/column-menu.ts"],"sourcesContent":["import type { ColumnMenuSlots } from \"@adapttable/vue/adapter\";\nimport { defineComponent, h, inject, type PropType } from \"vue\";\n\nimport ElementSelect from \"../controls/ElementSelect.vue\";\nimport { columnMenuContainer } from \"./panelContext\";\n\ntype ChoiceControl = Parameters<ColumnMenuSlots[\"Choice\"]>[0];\nfunction isKeyboardHandler(\n value: unknown\n): value is (event: KeyboardEvent) => void {\n return typeof value === \"function\";\n}\nexport const ElementColumnChoice = defineComponent(\n (props: { readonly control: ChoiceControl }) => {\n const container = inject(columnMenuContainer, undefined);\n const escape = (event: KeyboardEvent) => {\n const target = event.target;\n if (\n event.key === \"Escape\" &&\n !event.defaultPrevented &&\n !event.isComposing &&\n target instanceof Element &&\n target.getAttribute(\"role\") === \"combobox\" &&\n target.getAttribute(\"aria-expanded\") === \"false\"\n ) {\n const handler = props.control.attrs.onKeydown;\n if (isKeyboardHandler(handler)) handler(event);\n }\n };\n return () =>\n h(ElementSelect, {\n ...props.control.attrs,\n value: props.control.value,\n options: props.control.options,\n teleported: container?.value != null,\n appendTo: container?.value ?? undefined,\n onChange: props.control.onChange,\n onKeydownCapture: escape,\n });\n },\n {\n name: \"ElementColumnChoice\",\n props: {\n control: { type: Object as PropType<ChoiceControl> },\n },\n }\n);\n","import {\n type ColumnMenuButtonProps,\n type ColumnMenuSlots,\n managedOverlayPanel,\n} from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport { isElementRef } from \"../controls/ref\";\nimport { ElementColumnChoice } from \"./ElementColumnChoice\";\nimport { ElementColumnMenuPanel } from \"./ElementColumnMenuPanel\";\n\nfunction button(control: ColumnMenuButtonProps) {\n const icons = {\n grip: \"⠿\",\n visible: \"◉\",\n hidden: \"○\",\n pin: \"⌖\",\n more: \"⋯\",\n rename: \"✎\",\n };\n return elementButton(\n { \"aria-label\": control.label, ...control.attrs },\n control.icon\n ? h(\"span\", { \"aria-hidden\": \"true\" }, icons[control.icon])\n : control.label\n );\n}\nexport const elementColumnMenuSlots: ColumnMenuSlots = {\n Trigger: button,\n Button: button,\n Input: ({ attrs, value, onChange }) => {\n const nativeAttrs = Object.fromEntries(\n Object.entries(attrs).filter(([key]) => key !== \"ref\" && key !== \"type\")\n );\n return h(ElementInput, {\n ...nativeAttrs,\n value,\n type: attrs.type === \"search\" ? \"search\" : \"text\",\n inputRef: isElementRef(attrs.ref) ? attrs.ref : undefined,\n onChange,\n });\n },\n Choice: (control) => h(ElementColumnChoice, { control }),\n Panel: managedOverlayPanel((control) =>\n h(ElementColumnMenuPanel, { control })\n ),\n};\n","import {\n ColumnMenuChrome,\n type ColumnMenuSlotProps,\n useColumnMenu,\n} from \"@adapttable/vue/adapter\";\nimport { createVNode, defineComponent, h, type SetupContext } from \"vue\";\n\nimport { elementColumnMenuSlots } from \"./elementColumnMenuControls\";\n\nconst menuProps = {\n allColumns: null,\n layout: null,\n labels: null,\n hasRowActions: Boolean,\n hasRowReorder: Boolean,\n onAutoSize: null,\n onAutoSizeColumn: null,\n onSortColumn: null,\n onFilterColumn: null,\n onRenameColumn: null,\n sortBy: null,\n sortDir: null,\n dir: null,\n groupingPanel: null,\n featureHost: null,\n classNames: null,\n container: null,\n} satisfies Record<keyof ColumnMenuSlotProps<unknown>, unknown>;\nconst ElementColumnMenuPresentation = defineComponent(\n (props: ColumnMenuSlotProps<unknown>) => {\n const model = useColumnMenu(() => props);\n return () => h(ColumnMenuChrome, { model, slots: elementColumnMenuSlots });\n },\n { name: \"ElementColumnMenuPresentation\", props: menuProps }\n);\nexport function ColumnMenu<TRow>(\n props: ColumnMenuSlotProps<TRow>,\n context: Pick<SetupContext, \"attrs\">\n) {\n return createVNode(ElementColumnMenuPresentation, {\n ...context.attrs,\n ...props,\n });\n}\nColumnMenu.props = menuProps;\n","import type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n COLUMN_HEADER_RENAME,\n COLUMN_MENU,\n ColumnHeaderRenameChrome,\n extendFeature,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { columnMenu as bindingColumnMenu } from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { ColumnMenu } from \"./columns/ColumnMenu\";\nimport { elementColumnMenuSlots } from \"./columns/elementColumnMenuControls\";\n\nexport function columnMenu(): StaticTableFeature {\n return extendFeature(bindingColumnMenu(), [\n slotRender(COLUMN_MENU, (props) => h(ColumnMenu<never>, { ...props })),\n slotRender(COLUMN_HEADER_RENAME, (props) =>\n h(ColumnHeaderRenameChrome, { ...props, slots: elementColumnMenuSlots })\n ),\n ]);\n}\nexport { ColumnMenu } from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AAkB,GAAG,EAAA,GACxCC,wBAAAA,WAAAA,CAAWC,wBAAAA,cAAc,WAAA,GAAUC,IAAAA,EAAAA,CAAE,YAAmB,EAAE,GAAG,MAAM,CAAC,CAAC,IAAA,GACrEF,wBAAAA,WAAAA,CAAWG,wBAAAA,uBAAuB,WAAA,GAChCD,IAAAA,EAAAA,CAAEE,wBAAAA,0BAA0B;EAAE,GAAG;EAAO,OAAO;CAAuB,CAAC,CACzE,CACF,CAAC;AACH"}
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_column_menu = require("./column-menu-DfTLlqC-.cjs");
2
+ const require_column_menu = require("./column-menu-CtaKQS3b.cjs");
3
3
  exports.ColumnMenu = require_column_menu.ColumnMenu;
4
4
  exports.columnMenu = require_column_menu.columnMenu;
@@ -1,2 +1,2 @@
1
- import { n as ColumnMenu, t as columnMenu } from "./column-menu-CfqfyZzs.js";
1
+ import { n as ColumnMenu, t as columnMenu } from "./column-menu-C6gwlyUQ.js";
2
2
  export { ColumnMenu, columnMenu };
@@ -219,8 +219,13 @@ const _sfc_main$2 = /*@__PURE__*/ (0, vue.defineComponent)({
219
219
  const controls = {
220
220
  Activate: (control) => require_button.elementButton({
221
221
  title: control.title,
222
- "aria-label": control.title,
223
- class: [control.className, names.value.editCellActivate],
222
+ text: true,
223
+ "aria-description": control.title,
224
+ class: [
225
+ "adapttable-element-edit-value",
226
+ control.className,
227
+ names.value.editCellActivate
228
+ ],
224
229
  ref: control.activateRef,
225
230
  "data-adapttable-part": "edit-cell-activate",
226
231
  "data-save-status": control.saveStatus,
@@ -420,4 +425,4 @@ Object.defineProperty(exports, "undoRedoButtons", {
420
425
  }
421
426
  });
422
427
 
423
- //# sourceMappingURL=editing-BX-jUtdO.cjs.map
428
+ //# sourceMappingURL=editing-BMtWRqqJ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editing-BMtWRqqJ.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 text: true,\n \"aria-description\": control.title,\n class: [\n \"adapttable-element-edit-value\",\n control.className,\n names.value.editCellActivate,\n ],\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\n<style>\n.el-button.adapttable-element-edit-value {\n justify-content: start;\n inline-size: 100%;\n min-inline-size: 0;\n block-size: auto;\n padding: 0;\n border: 0;\n color: inherit;\n font: inherit;\n text-align: inherit;\n white-space: normal;\n overflow-wrap: anywhere;\n cursor: text;\n}\n.el-button.adapttable-element-edit-value > span {\n min-inline-size: 0;\n}\n</style>\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":";;;;;;;;;;;;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F,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"editing-BnLdNDlo.d.ts","names":[],"sources":["../src/editing/ElementEditableCell.vue","../src/editing/ElementBatchEditBar.vue","../src/editing/ElementRowEditActions.vue","../src/editing.ts"],"mappings":";;;;cAoFM,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EA+EO,qBAAc,cAAc,sBAAmB,qBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,mBAAO;KACvB,sBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;cCtI9F,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAmDO,qBAAc,cAAc,sBAAmB,kBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,mBAAO;KACvB,sBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;cChE9F,eAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,oBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAmDO,qBAAc,cAAc,oBAAmB,oBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,iBAAO;KACvB,oBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;;iBCrEpF,UAAQ,MACtB,YAAY,gBAAgB,OAC5B,SAAQ,uBAAuB,QAC9B,aAAa;;iBAKA,aAAW,MACzB,WAAW,YAAY,oBAAoB,qBAC3C,SAAQ,uBAAuB,QAC9B,aAAa;;iBAUA,eAAa,MAC3B,aAAa,YAAY,oBAAoB,uBAC7C,SAAQ,uBAAuB,QAC9B,aAAa;;iBA0BA,qBAAmB"}
1
+ {"version":3,"file":"editing-BnLdNDlo.d.ts","names":[],"sources":["../src/editing/ElementEditableCell.vue","../src/editing/ElementBatchEditBar.vue","../src/editing/ElementRowEditActions.vue","../src/editing.ts"],"mappings":";;;;cA6GM,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAoFO,qBAAc,cAAc,sBAAmB,qBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,mBAAO;KACvB,sBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;cCpK9F,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAmDO,qBAAc,cAAc,sBAAmB,kBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,mBAAO;KACvB,sBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;cChE9F,eAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,oBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAmDO,qBAAc,cAAc,oBAAmB,oBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,iBAAO;KACvB,oBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;;iBCrEpF,UAAQ,MACtB,YAAY,gBAAgB,OAC5B,SAAQ,uBAAuB,QAC9B,aAAa;;iBAKA,aAAW,MACzB,WAAW,YAAY,oBAAoB,qBAC3C,SAAQ,uBAAuB,QAC9B,aAAa;;iBAUA,eAAa,MAC3B,aAAa,YAAY,oBAAoB,uBAC7C,SAAQ,uBAAuB,QAC9B,aAAa;;iBA0BA,qBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"editing-Cg6ZNvSa.d.cts","names":[],"sources":["../src/editing/ElementEditableCell.vue","../src/editing/ElementBatchEditBar.vue","../src/editing/ElementRowEditActions.vue","../src/editing.ts"],"mappings":";;;;cAoFM,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EA+EO,qBAAc,cAAc,sBAAmB,qBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,mBAAO;KACvB,sBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;cCtI9F,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAmDO,qBAAc,cAAc,sBAAmB,kBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,mBAAO;KACvB,sBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;cChE9F,eAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,oBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAmDO,qBAAc,cAAc,oBAAmB,oBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,iBAAO;KACvB,oBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;;iBCrEpF,QAAQ,MACtB,YAAY,gBAAgB,OAC5B,SAAQ,uBAAuB,QAC9B,aAAa;;iBAKA,WAAW,MACzB,WAAW,YAAY,oBAAoB,qBAC3C,SAAQ,uBAAuB,QAC9B,aAAa;;iBAUA,aAAa,MAC3B,aAAa,YAAY,oBAAoB,uBAC7C,SAAQ,uBAAuB,QAC9B,aAAa;;iBA0BA,mBAAmB"}
1
+ {"version":3,"file":"editing-Cg6ZNvSa.d.cts","names":[],"sources":["../src/editing/ElementEditableCell.vue","../src/editing/ElementBatchEditBar.vue","../src/editing/ElementRowEditActions.vue","../src/editing.ts"],"mappings":";;;;cA6GM,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAoFO,qBAAc,cAAc,sBAAmB,qBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,mBAAO;KACvB,sBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;cCpK9F,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAmDO,qBAAc,cAAc,sBAAmB,kBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,mBAAO;KACvB,sBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;cChE9F,eAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,oBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAmDO,qBAAc,cAAc,oBAAmB,oBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,iBAAO;KACvB,oBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;;iBCrEpF,QAAQ,MACtB,YAAY,gBAAgB,OAC5B,SAAQ,uBAAuB,QAC9B,aAAa;;iBAKA,WAAW,MACzB,WAAW,YAAY,oBAAoB,qBAC3C,SAAQ,uBAAuB,QAC9B,aAAa;;iBAUA,aAAa,MAC3B,aAAa,YAAY,oBAAoB,uBAC7C,SAAQ,uBAAuB,QAC9B,aAAa;;iBA0BA,mBAAmB"}
@@ -220,8 +220,13 @@ const _sfc_main$2 = /*@__PURE__*/ defineComponent({
220
220
  const controls = {
221
221
  Activate: (control) => elementButton({
222
222
  title: control.title,
223
- "aria-label": control.title,
224
- class: [control.className, names.value.editCellActivate],
223
+ text: true,
224
+ "aria-description": control.title,
225
+ class: [
226
+ "adapttable-element-edit-value",
227
+ control.className,
228
+ names.value.editCellActivate
229
+ ],
225
230
  ref: control.activateRef,
226
231
  "data-adapttable-part": "edit-cell-activate",
227
232
  "data-save-status": control.saveStatus,
@@ -380,4 +385,4 @@ function undoRedoButtons$1() {
380
385
  //#endregion
381
386
  export { rowEditing$1 as a, _sfc_main$1 as c, editing$1 as i, _sfc_main$2 as l, dirtyIndicators as n, undoRedoButtons$1 as o, editHistory as r, _sfc_main as s, batchEditing$1 as t };
382
387
 
383
- //# sourceMappingURL=editing-C1Hy-MCQ.js.map
388
+ //# sourceMappingURL=editing-CohAxA65.js.map