@adapttable/element-plus 0.6.0 → 0.6.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 (128) hide show
  1. package/README.md +1 -1
  2. package/dist/{ElementCard-BRZekaHr.cjs → ElementCard-DQpWVv24.cjs} +2 -2
  3. package/dist/{ElementCard-BRZekaHr.cjs.map → ElementCard-DQpWVv24.cjs.map} +1 -1
  4. package/dist/{ElementCard-DZdAU6x8.js → ElementCard-czqeWAnk.js} +2 -2
  5. package/dist/{ElementCard-DZdAU6x8.js.map → ElementCard-czqeWAnk.js.map} +1 -1
  6. package/dist/{ElementColumnMenuPanel-Ddh01A17.cjs → ElementColumnMenuPanel-BfFgrSEJ.cjs} +3 -3
  7. package/dist/{ElementColumnMenuPanel-Ddh01A17.cjs.map → ElementColumnMenuPanel-BfFgrSEJ.cjs.map} +1 -1
  8. package/dist/{ElementColumnMenuPanel-CPW4wU3M.js → ElementColumnMenuPanel-Nkilw7G4.js} +3 -3
  9. package/dist/{ElementColumnMenuPanel-CPW4wU3M.js.map → ElementColumnMenuPanel-Nkilw7G4.js.map} +1 -1
  10. package/dist/{ElementFilterField-Dfzy-Yk4.cjs → ElementFilterField-BbwJTXvK.cjs} +2 -2
  11. package/dist/{ElementFilterField-Dfzy-Yk4.cjs.map → ElementFilterField-BbwJTXvK.cjs.map} +1 -1
  12. package/dist/{ElementFilterField-C8EJjVB_.js → ElementFilterField-N8tiYPGN.js} +2 -2
  13. package/dist/{ElementFilterField-C8EJjVB_.js.map → ElementFilterField-N8tiYPGN.js.map} +1 -1
  14. package/dist/{ElementFilterHeaderRow-DGp4Wrts.js → ElementFilterHeaderRow-BVo9WSuR.js} +2 -2
  15. package/dist/{ElementFilterHeaderRow-DGp4Wrts.js.map → ElementFilterHeaderRow-BVo9WSuR.js.map} +1 -1
  16. package/dist/{ElementFilterHeaderRow-D8ZZ3BOH.cjs → ElementFilterHeaderRow-D22VL0F8.cjs} +2 -2
  17. package/dist/{ElementFilterHeaderRow-D8ZZ3BOH.cjs.map → ElementFilterHeaderRow-D22VL0F8.cjs.map} +1 -1
  18. package/dist/{ElementRowActions-CUdXemC-.js → ElementRowActions-Djhrf9rm.js} +2 -2
  19. package/dist/{ElementRowActions-CUdXemC-.js.map → ElementRowActions-Djhrf9rm.js.map} +1 -1
  20. package/dist/{ElementRowActions-XyX2PAWL.cjs → ElementRowActions-DzAA3wSa.cjs} +2 -2
  21. package/dist/{ElementRowActions-XyX2PAWL.cjs.map → ElementRowActions-DzAA3wSa.cjs.map} +1 -1
  22. package/dist/assistant.cjs +2 -2
  23. package/dist/assistant.js +2 -2
  24. package/dist/batch-editing.cjs +1 -1
  25. package/dist/batch-editing.js +1 -1
  26. package/dist/bulk-actions.cjs +1 -1
  27. package/dist/bulk-actions.js +1 -1
  28. package/dist/{button-BFjBL9m3.cjs → button-BuXbfKKx.cjs} +3 -2
  29. package/dist/button-BuXbfKKx.cjs.map +1 -0
  30. package/dist/{button-DwB4UxI2.js → button-DUddRulx.js} +3 -2
  31. package/dist/button-DUddRulx.js.map +1 -0
  32. package/dist/{checkbox-BF19iMgI.cjs → checkbox-DRhRrexK.cjs} +2 -2
  33. package/dist/{checkbox-BF19iMgI.cjs.map → checkbox-DRhRrexK.cjs.map} +1 -1
  34. package/dist/column-layout.cjs +1 -1
  35. package/dist/column-layout.js +1 -1
  36. package/dist/{column-menu-CwTWnahc.js → column-menu-DaOcmA45.js} +33 -13
  37. package/dist/column-menu-DaOcmA45.js.map +1 -0
  38. package/dist/{column-menu-CqyYtohz.cjs → column-menu-eS7ylKfB.cjs} +33 -13
  39. package/dist/column-menu-eS7ylKfB.cjs.map +1 -0
  40. package/dist/column-menu.cjs +1 -1
  41. package/dist/column-menu.js +1 -1
  42. package/dist/command-palette.cjs +1 -1
  43. package/dist/command-palette.js +1 -1
  44. package/dist/context-menu.cjs +1 -1
  45. package/dist/context-menu.js +1 -1
  46. package/dist/{editing-CSqZENeW.cjs → editing-Bal8jOJT.cjs} +2 -2
  47. package/dist/{editing-CSqZENeW.cjs.map → editing-Bal8jOJT.cjs.map} +1 -1
  48. package/dist/{editing-BlpYR839.js → editing-BgWyfVFS.js} +2 -2
  49. package/dist/{editing-BlpYR839.js.map → editing-BgWyfVFS.js.map} +1 -1
  50. package/dist/editing.cjs +1 -1
  51. package/dist/editing.js +1 -1
  52. package/dist/{elementActionSlots-CbKE3WnM.js → elementActionSlots-BOdXhb05.js} +2 -2
  53. package/dist/{elementActionSlots-CbKE3WnM.js.map → elementActionSlots-BOdXhb05.js.map} +1 -1
  54. package/dist/{elementActionSlots-DlhU82H7.cjs → elementActionSlots-WeXIVVnx.cjs} +2 -2
  55. package/dist/{elementActionSlots-DlhU82H7.cjs.map → elementActionSlots-WeXIVVnx.cjs.map} +1 -1
  56. package/dist/{elementHierarchyControlSlots-21LL1wEw.js → elementHierarchyControlSlots-CBz7cgOw.js} +2 -2
  57. package/dist/{elementHierarchyControlSlots-21LL1wEw.js.map → elementHierarchyControlSlots-CBz7cgOw.js.map} +1 -1
  58. package/dist/{elementRemainingControls-DvVVLXE0.cjs → elementRemainingControls-CvGiKtfz.cjs} +3 -3
  59. package/dist/{elementRemainingControls-DvVVLXE0.cjs.map → elementRemainingControls-CvGiKtfz.cjs.map} +1 -1
  60. package/dist/{elementRemainingControls-6tN9tgWx.js → elementRemainingControls-J7eDWROX.js} +3 -3
  61. package/dist/{elementRemainingControls-6tN9tgWx.js.map → elementRemainingControls-J7eDWROX.js.map} +1 -1
  62. package/dist/{export-x-Ow8SY5.cjs → export-Cln4twUm.cjs} +2 -2
  63. package/dist/{export-x-Ow8SY5.cjs.map → export-Cln4twUm.cjs.map} +1 -1
  64. package/dist/{export-kuOvIoQg.js → export-DMEVONO6.js} +2 -2
  65. package/dist/{export-kuOvIoQg.js.map → export-DMEVONO6.js.map} +1 -1
  66. package/dist/export-pdf.cjs +1 -1
  67. package/dist/export-pdf.js +1 -1
  68. package/dist/export-xlsx.cjs +1 -1
  69. package/dist/export-xlsx.js +1 -1
  70. package/dist/export.cjs +1 -1
  71. package/dist/export.js +1 -1
  72. package/dist/filtering.cjs +2 -2
  73. package/dist/filtering.js +2 -2
  74. package/dist/{filters-CYQFsZ_f.cjs → filters-B3GI0d_7.cjs} +3 -3
  75. package/dist/{filters-CYQFsZ_f.cjs.map → filters-B3GI0d_7.cjs.map} +1 -1
  76. package/dist/{filters-CIQ1uMZw.js → filters-C5j2hjd3.js} +3 -3
  77. package/dist/{filters-CIQ1uMZw.js.map → filters-C5j2hjd3.js.map} +1 -1
  78. package/dist/filters.cjs +2 -2
  79. package/dist/filters.js +2 -2
  80. package/dist/{find-in-table-WtXzIkkg.cjs → find-in-table-Bn5eTjXM.cjs} +2 -2
  81. package/dist/{find-in-table-WtXzIkkg.cjs.map → find-in-table-Bn5eTjXM.cjs.map} +1 -1
  82. package/dist/{find-in-table-B9ySCCJh.js → find-in-table-oPAJgCGy.js} +2 -2
  83. package/dist/{find-in-table-B9ySCCJh.js.map → find-in-table-oPAJgCGy.js.map} +1 -1
  84. package/dist/find-in-table.cjs +1 -1
  85. package/dist/find-in-table.js +1 -1
  86. package/dist/fullscreen.cjs +1 -1
  87. package/dist/fullscreen.js +1 -1
  88. package/dist/grouping-panel.cjs +2 -2
  89. package/dist/grouping-panel.js +2 -2
  90. package/dist/grouping.cjs +2 -2
  91. package/dist/grouping.js +2 -2
  92. package/dist/{header-filters-COkO6tD4.cjs → header-filters-D7475LRH.cjs} +3 -3
  93. package/dist/{header-filters-COkO6tD4.cjs.map → header-filters-D7475LRH.cjs.map} +1 -1
  94. package/dist/{header-filters-B2veND8x.js → header-filters-s7nFkTHe.js} +3 -3
  95. package/dist/{header-filters-B2veND8x.js.map → header-filters-s7nFkTHe.js.map} +1 -1
  96. package/dist/header-filters.cjs +2 -2
  97. package/dist/header-filters.js +2 -2
  98. package/dist/index.cjs +4 -4
  99. package/dist/index.js +4 -4
  100. package/dist/pivot.cjs +1 -1
  101. package/dist/pivot.js +1 -1
  102. package/dist/preset.cjs +6 -6
  103. package/dist/preset.js +6 -6
  104. package/dist/print.cjs +1 -1
  105. package/dist/print.js +1 -1
  106. package/dist/row-actions.cjs +1 -1
  107. package/dist/row-actions.js +1 -1
  108. package/dist/row-pinning.cjs +1 -1
  109. package/dist/row-pinning.js +1 -1
  110. package/dist/row-reorder.cjs +1 -1
  111. package/dist/row-reorder.js +1 -1
  112. package/dist/{saved-views-luZVHu3w.cjs → saved-views-BdoXhuyE.cjs} +4 -4
  113. package/dist/{saved-views-luZVHu3w.cjs.map → saved-views-BdoXhuyE.cjs.map} +1 -1
  114. package/dist/{saved-views-DDo4Bl-f.js → saved-views-DAkqlIlo.js} +4 -4
  115. package/dist/{saved-views-DDo4Bl-f.js.map → saved-views-DAkqlIlo.js.map} +1 -1
  116. package/dist/saved-views.cjs +1 -1
  117. package/dist/saved-views.js +1 -1
  118. package/dist/side-panel.cjs +1 -1
  119. package/dist/side-panel.js +1 -1
  120. package/dist/{withElementExport-B97s6RIr.js → withElementExport-CX-S76EV.js} +3 -3
  121. package/dist/{withElementExport-B97s6RIr.js.map → withElementExport-CX-S76EV.js.map} +1 -1
  122. package/dist/{withElementExport-J-6vXfL9.cjs → withElementExport-CmkGvvZT.cjs} +3 -3
  123. package/dist/{withElementExport-J-6vXfL9.cjs.map → withElementExport-CmkGvvZT.cjs.map} +1 -1
  124. package/package.json +3 -3
  125. package/dist/button-BFjBL9m3.cjs.map +0 -1
  126. package/dist/button-DwB4UxI2.js.map +0 -1
  127. package/dist/column-menu-CqyYtohz.cjs.map +0 -1
  128. package/dist/column-menu-CwTWnahc.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"elementRemainingControls-6tN9tgWx.js","names":["ElementInput"],"sources":["../src/actions/ElementCommandSurface.ts","../src/actions/ElementContextSurface.ts","../src/actions/elementRemainingControls.ts"],"sourcesContent":["import {\n type ManagedCommandPaletteSurfaceProps,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { ElDialog } from \"element-plus\";\nimport { defineComponent, h, type PropType, shallowRef } from \"vue\";\n/** ElDialog owns focus trapping, Escape and outside dismissal. */\nexport const ElementCommandSurface = defineComponent(\n (props: {\n readonly control: ManagedCommandPaletteSurfaceProps;\n readonly container?: HTMLElement;\n readonly dir?: \"ltr\" | \"rtl\";\n }) => {\n const active = useScopeActivity();\n const body = shallowRef<HTMLElement | null>(null);\n return () => {\n const owner = props.control;\n return h(\n ElDialog,\n {\n modelValue: active.value && owner.open && owner.isCurrent(),\n title: owner.label,\n class: owner.className,\n dir: props.dir,\n appendTo: props.container ?? \"body\",\n appendToBody: true,\n width: \"min(32rem, calc(100vw - 2rem))\",\n destroyOnClose: true,\n showClose: false,\n closeOnClickModal: true,\n closeOnPressEscape: true,\n beforeClose: () => {\n if (active.value && owner.isCurrent()) owner.onClose();\n },\n },\n {\n default: () =>\n h(\"div\", { ref: body, \"data-adapttable-part\": \"command-palette\" }, [\n owner.children,\n ]),\n }\n );\n };\n },\n {\n name: \"ElementCommandSurface\",\n props: {\n control: { type: Object as PropType<ManagedCommandPaletteSurfaceProps> },\n container: { type: Object as PropType<HTMLElement | undefined> },\n dir: { type: String as PropType<(\"ltr\" | \"rtl\") | undefined> },\n },\n }\n);\n","import {\n type ContextMenuSurfaceProps,\n scheduleTick,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport {\n type DropdownInstance,\n ElDropdown,\n ElDropdownMenu,\n} from \"element-plus\";\nimport {\n defineComponent,\n h,\n onScopeDispose,\n type PropType,\n shallowRef,\n type VNodeChild,\n watch,\n} from \"vue\";\n\n/** The public dropdown API synchronizes the primitive with the binding's open session. */\nexport const ElementContextSurface = defineComponent(\n (\n props: ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n }\n ) => {\n const active = useScopeActivity();\n const control = shallowRef<DropdownInstance>();\n let live = true;\n let generation = 0;\n onScopeDispose(() => {\n live = false;\n generation++;\n });\n const virtualAnchor = {\n getBoundingClientRect: () => new DOMRect(props.at.x, props.at.y, 0, 0),\n get contextElement() {\n return props.anchorRef.current ?? undefined;\n },\n };\n watch(\n [active, () => props.at],\n () => {\n generation++;\n },\n { flush: \"sync\", immediate: true }\n );\n watch(\n [active, control, () => props.at],\n () => {\n const ticket = generation;\n scheduleTick(() => {\n if (live && active.value && ticket === generation)\n control.value?.handleOpen();\n else if (!active.value) control.value?.handleClose();\n });\n },\n { flush: \"post\", immediate: true }\n );\n return () => {\n if (!active.value) return null;\n const at = props.at;\n const ticket = generation;\n const onClose = props.onClose;\n const isCurrent = () =>\n live &&\n active.value &&\n ticket === generation &&\n props.at === at &&\n props.onClose === onClose;\n return h(\n ElDropdown,\n {\n ref: control,\n virtualTriggering: true,\n virtualRef: virtualAnchor,\n trigger: \"contextmenu\",\n role: \"menu\",\n showTimeout: 0,\n hideTimeout: 0,\n hideOnClick: false,\n placement: \"bottom-start\",\n appendTo: props.container ?? \"body\",\n teleported: true,\n persistent: false,\n showArrow: false,\n maxHeight: \"min(70vh, 32rem)\",\n popperStyle: { maxWidth: \"calc(100vw - 1rem)\" },\n onVisibleChange: (visible: boolean) => {\n if (visible || !isCurrent()) return;\n onClose();\n // A rejected controlled close keeps the same native session open.\n scheduleTick(() => {\n if (isCurrent()) control.value?.handleOpen();\n });\n },\n },\n {\n dropdown: () =>\n h(\n ElDropdownMenu,\n {\n \"aria-label\": props.label,\n class: props.className,\n dir: props.dir,\n \"data-adapttable-part\": \"context-menu\",\n onKeydown: (event: KeyboardEvent) => {\n if (\n !isCurrent() ||\n event.key !== \"Escape\" ||\n event.defaultPrevented ||\n event.isComposing ||\n !(event.target instanceof Element) ||\n event.target.closest('[role=\"menu\"]') !==\n event.currentTarget\n )\n return;\n event.preventDefault();\n event.stopPropagation();\n control.value?.handleClose();\n },\n onFocus: (event: FocusEvent) => {\n if (\n !isCurrent() ||\n event.target !== event.currentTarget ||\n !(event.currentTarget instanceof HTMLElement)\n )\n return;\n event.currentTarget\n .querySelector<HTMLElement>(\n '[role=\"menuitem\"]:not([aria-disabled=\"true\"])'\n )\n ?.focus();\n },\n },\n { default: () => props.children }\n ),\n }\n );\n };\n },\n {\n name: \"ElementContextSurface\",\n props: {\n at: {\n type: Object as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"at\"]\n >,\n },\n anchorRef: {\n type: Object as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"anchorRef\"]\n >,\n },\n label: {\n type: String as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"label\"]\n >,\n },\n onClose: {\n type: Function as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"onClose\"]\n >,\n },\n container: {\n type: Object as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"container\"]\n >,\n },\n children: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"children\"]\n >,\n default: undefined,\n },\n className: {\n type: String as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"className\"]\n >,\n },\n dir: {\n type: String as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"dir\"]\n >,\n },\n },\n }\n);\n","import {\n type ActionButton,\n type CommandPaletteSlots,\n type ContextMenuSlots,\n managedCommandPaletteSurface,\n type SidePanelSlots,\n toVueAttrs,\n} from \"@adapttable/vue/adapter\";\nimport { ElDivider, ElDropdownItem } from \"element-plus\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport { ElementCard } from \"../presentation/ElementCard\";\nimport { ElementCommandSurface } from \"./ElementCommandSurface\";\nimport { ElementContextSurface } from \"./ElementContextSurface\";\nexport const elementActionButton = ({ attrs, label, icon }: ActionButton) =>\n elementButton(attrs, [icon, label]);\nexport const elementPaletteSlots = (\n names: () => Readonly<Record<string, string | undefined>> = () => ({}),\n container: () => HTMLElement | undefined = () => undefined,\n dir: () => \"ltr\" | \"rtl\" | undefined = () => undefined\n): CommandPaletteSlots => ({\n Surface: managedCommandPaletteSurface((control) =>\n h(ElementCommandSurface, { control, container: container(), dir: dir() })\n ),\n Input: ({ inputProps }) => {\n const { onChange, ref, value, ...attrs } = inputProps;\n return h(ElementInput, {\n ...toVueAttrs(attrs),\n value,\n inputRef: (element) => {\n if (element instanceof HTMLInputElement || element === null)\n ref(element);\n },\n class: names().commandInput,\n onChange,\n });\n },\n Item: ({ command, itemProps }) =>\n elementButton(\n {\n ...toVueAttrs(itemProps),\n class: names().commandItem,\n type: \"button\",\n tabindex: -1,\n disabled: command.disabled,\n },\n command.label\n ),\n Empty: ({ message }) =>\n h(\n \"p\",\n { \"data-adapttable-part\": \"command-empty\", class: names().commandEmpty },\n message\n ),\n});\nexport const elementContextMenuSlots = (\n names: () => Readonly<Record<string, string | undefined>> = () => ({}),\n dir: () => \"ltr\" | \"rtl\" | undefined = () => undefined\n): ContextMenuSlots => ({\n Surface: (props) => h(ElementContextSurface, { ...props, dir: dir() }),\n Item: ({ item, onSelect }) =>\n h(\n ElDropdownItem,\n {\n disabled: item.disabled,\n textValue: item.label,\n \"aria-disabled\": item.disabled,\n \"data-danger\": item.danger ? \"\" : undefined,\n \"data-adapttable-part\": \"context-menu-item\",\n class: names().contextMenuItem,\n onClick: onSelect,\n },\n { default: () => item.label }\n ),\n Separator: () =>\n h(ElDivider, {\n role: \"separator\",\n \"data-adapttable-part\": \"context-menu-separator\",\n class: names().contextMenuSeparator,\n }),\n});\nexport const elementSidePanelSlots = (\n names: () => Readonly<Record<string, string | undefined>> = () => ({})\n): SidePanelSlots => {\n let closeChoice: (() => void) | undefined;\n return {\n Frame: (props) => {\n const close = closeChoice;\n return h(\n ElementCard,\n {\n attrs: {\n \"data-adapttable-part\": \"side-panel\",\n class: props.className,\n \"data-side\": props.side,\n style: { minWidth: \"min(18rem,100%)\", maxWidth: \"100%\" },\n onKeydownCapture: (event: KeyboardEvent) => {\n const target = event.target;\n // ElSelect stops Escape even while closed; forward that case to the\n // binding's current close callback before the native event is consumed.\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 !target.closest('[role=\"dialog\"],[role=\"menu\"]')\n ) {\n event.preventDefault();\n event.stopPropagation();\n close?.();\n }\n },\n },\n },\n { default: () => props.children }\n );\n },\n Tab: (props) =>\n elementButton(\n { ...toVueAttrs(props.buttonProps), class: names().sidePanelTab },\n props.panel.label\n ),\n Close: (props) => {\n closeChoice = props.onClose;\n return elementButton(\n {\n type: \"button\",\n \"aria-label\": props.label,\n \"data-adapttable-part\": \"side-panel-close\",\n class: names().sidePanelClose,\n onClick: props.onClose,\n },\n props.label\n );\n },\n };\n};\n"],"mappings":";;;;;;;;AAOA,MAAa,wBAAwB,iBAClC,UAIK;CACJ,MAAM,SAAS,iBAAiB;CAChC,MAAM,OAAO,WAA+B,IAAI;CAChD,aAAa;EACX,MAAM,QAAQ,MAAM;EACpB,OAAO,EACL,UACA;GACE,YAAY,OAAO,SAAS,MAAM,QAAQ,MAAM,UAAU;GAC1D,OAAO,MAAM;GACb,OAAO,MAAM;GACb,KAAK,MAAM;GACX,UAAU,MAAM,aAAa;GAC7B,cAAc;GACd,OAAO;GACP,gBAAgB;GAChB,WAAW;GACX,mBAAmB;GACnB,oBAAoB;GACpB,mBAAmB;IACjB,IAAI,OAAO,SAAS,MAAM,UAAU,GAAG,MAAM,QAAQ;GACvD;EACF,GACA,EACE,eACE,EAAE,OAAO;GAAE,KAAK;GA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AAO;KAAE,UAAU;KAAmB,UAAU;IAAO;IACvD,mBAAmB,UAAyB;KAC1C,MAAM,SAAS,MAAM;KAGrB,IACE,MAAM,QAAQ,YACd,CAAC,MAAM,oBACP,CAAC,MAAM,eACP,kBAAkB,WAClB,OAAO,aAAa,MAAM,MAAM,cAChC,OAAO,aAAa,eAAe,MAAM,WACzC,CAAC,OAAO,QAAQ,mCAA+B,GAC/C;MACA,MAAM,eAAe;MACrB,MAAM,gBAAgB;MACtB,QAAQ;KACV;IACF;GACF,EACF,GACA,EAAE,eAAe,MAAM,SAAS,CAClC;EACF;EACA,MAAM,UACJ,cACE;GAAE,GAAG,WAAW,MAAM,WAAW;GAAG,OAAO,MAAM,CAAC,CAAC;EAAa,GAChE,MAAM,MAAM,KACd;EACF,QAAQ,UAAU;GAChB,cAAc,MAAM;GACpB,OAAO,cACL;IACE,MAAM;IACN,cAAc,MAAM;IACpB,wBAAwB;IACxB,OAAO,MAAM,CAAC,CAAC;IACf,SAAS,MAAM;GACjB,GACA,MAAM,KACR;EACF;CACF;AACF"}
1
+ {"version":3,"file":"elementRemainingControls-J7eDWROX.js","names":["ElementInput"],"sources":["../src/actions/ElementCommandSurface.ts","../src/actions/ElementContextSurface.ts","../src/actions/elementRemainingControls.ts"],"sourcesContent":["import {\n type ManagedCommandPaletteSurfaceProps,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { ElDialog } from \"element-plus\";\nimport { defineComponent, h, type PropType, shallowRef } from \"vue\";\n/** ElDialog owns focus trapping, Escape and outside dismissal. */\nexport const ElementCommandSurface = defineComponent(\n (props: {\n readonly control: ManagedCommandPaletteSurfaceProps;\n readonly container?: HTMLElement;\n readonly dir?: \"ltr\" | \"rtl\";\n }) => {\n const active = useScopeActivity();\n const body = shallowRef<HTMLElement | null>(null);\n return () => {\n const owner = props.control;\n return h(\n ElDialog,\n {\n modelValue: active.value && owner.open && owner.isCurrent(),\n title: owner.label,\n class: owner.className,\n dir: props.dir,\n appendTo: props.container ?? \"body\",\n appendToBody: true,\n width: \"min(32rem, calc(100vw - 2rem))\",\n destroyOnClose: true,\n showClose: false,\n closeOnClickModal: true,\n closeOnPressEscape: true,\n beforeClose: () => {\n if (active.value && owner.isCurrent()) owner.onClose();\n },\n },\n {\n default: () =>\n h(\"div\", { ref: body, \"data-adapttable-part\": \"command-palette\" }, [\n owner.children,\n ]),\n }\n );\n };\n },\n {\n name: \"ElementCommandSurface\",\n props: {\n control: { type: Object as PropType<ManagedCommandPaletteSurfaceProps> },\n container: { type: Object as PropType<HTMLElement | undefined> },\n dir: { type: String as PropType<(\"ltr\" | \"rtl\") | undefined> },\n },\n }\n);\n","import {\n type ContextMenuSurfaceProps,\n scheduleTick,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport {\n type DropdownInstance,\n ElDropdown,\n ElDropdownMenu,\n} from \"element-plus\";\nimport {\n defineComponent,\n h,\n onScopeDispose,\n type PropType,\n shallowRef,\n type VNodeChild,\n watch,\n} from \"vue\";\n\n/** The public dropdown API synchronizes the primitive with the binding's open session. */\nexport const ElementContextSurface = defineComponent(\n (\n props: ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n }\n ) => {\n const active = useScopeActivity();\n const control = shallowRef<DropdownInstance>();\n let live = true;\n let generation = 0;\n onScopeDispose(() => {\n live = false;\n generation++;\n });\n const virtualAnchor = {\n getBoundingClientRect: () => new DOMRect(props.at.x, props.at.y, 0, 0),\n get contextElement() {\n return props.anchorRef.current ?? undefined;\n },\n };\n watch(\n [active, () => props.at],\n () => {\n generation++;\n },\n { flush: \"sync\", immediate: true }\n );\n watch(\n [active, control, () => props.at],\n () => {\n const ticket = generation;\n scheduleTick(() => {\n if (live && active.value && ticket === generation)\n control.value?.handleOpen();\n else if (!active.value) control.value?.handleClose();\n });\n },\n { flush: \"post\", immediate: true }\n );\n return () => {\n if (!active.value) return null;\n const at = props.at;\n const ticket = generation;\n const onClose = props.onClose;\n const isCurrent = () =>\n live &&\n active.value &&\n ticket === generation &&\n props.at === at &&\n props.onClose === onClose;\n return h(\n ElDropdown,\n {\n ref: control,\n virtualTriggering: true,\n virtualRef: virtualAnchor,\n trigger: \"contextmenu\",\n role: \"menu\",\n showTimeout: 0,\n hideTimeout: 0,\n hideOnClick: false,\n placement: \"bottom-start\",\n appendTo: props.container ?? \"body\",\n teleported: true,\n persistent: false,\n showArrow: false,\n maxHeight: \"min(70vh, 32rem)\",\n popperStyle: { maxWidth: \"calc(100vw - 1rem)\" },\n onVisibleChange: (visible: boolean) => {\n if (visible || !isCurrent()) return;\n onClose();\n // A rejected controlled close keeps the same native session open.\n scheduleTick(() => {\n if (isCurrent()) control.value?.handleOpen();\n });\n },\n },\n {\n dropdown: () =>\n h(\n ElDropdownMenu,\n {\n \"aria-label\": props.label,\n class: props.className,\n dir: props.dir,\n \"data-adapttable-part\": \"context-menu\",\n onKeydown: (event: KeyboardEvent) => {\n if (\n !isCurrent() ||\n event.key !== \"Escape\" ||\n event.defaultPrevented ||\n event.isComposing ||\n !(event.target instanceof Element) ||\n event.target.closest('[role=\"menu\"]') !==\n event.currentTarget\n )\n return;\n event.preventDefault();\n event.stopPropagation();\n control.value?.handleClose();\n },\n onFocus: (event: FocusEvent) => {\n if (\n !isCurrent() ||\n event.target !== event.currentTarget ||\n !(event.currentTarget instanceof HTMLElement)\n )\n return;\n event.currentTarget\n .querySelector<HTMLElement>(\n '[role=\"menuitem\"]:not([aria-disabled=\"true\"])'\n )\n ?.focus();\n },\n },\n { default: () => props.children }\n ),\n }\n );\n };\n },\n {\n name: \"ElementContextSurface\",\n props: {\n at: {\n type: Object as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"at\"]\n >,\n },\n anchorRef: {\n type: Object as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"anchorRef\"]\n >,\n },\n label: {\n type: String as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"label\"]\n >,\n },\n onClose: {\n type: Function as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"onClose\"]\n >,\n },\n container: {\n type: Object as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"container\"]\n >,\n },\n children: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"children\"]\n >,\n default: undefined,\n },\n className: {\n type: String as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"className\"]\n >,\n },\n dir: {\n type: String as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"dir\"]\n >,\n },\n },\n }\n);\n","import {\n type ActionButton,\n type CommandPaletteSlots,\n type ContextMenuSlots,\n managedCommandPaletteSurface,\n type SidePanelSlots,\n toVueAttrs,\n} from \"@adapttable/vue/adapter\";\nimport { ElDivider, ElDropdownItem } from \"element-plus\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport { ElementCard } from \"../presentation/ElementCard\";\nimport { ElementCommandSurface } from \"./ElementCommandSurface\";\nimport { ElementContextSurface } from \"./ElementContextSurface\";\nexport const elementActionButton = ({ attrs, label, icon }: ActionButton) =>\n elementButton(attrs, [icon, label]);\nexport const elementPaletteSlots = (\n names: () => Readonly<Record<string, string | undefined>> = () => ({}),\n container: () => HTMLElement | undefined = () => undefined,\n dir: () => \"ltr\" | \"rtl\" | undefined = () => undefined\n): CommandPaletteSlots => ({\n Surface: managedCommandPaletteSurface((control) =>\n h(ElementCommandSurface, { control, container: container(), dir: dir() })\n ),\n Input: ({ inputProps }) => {\n const { onChange, ref, value, ...attrs } = inputProps;\n return h(ElementInput, {\n ...toVueAttrs(attrs),\n value,\n inputRef: (element) => {\n if (element instanceof HTMLInputElement || element === null)\n ref(element);\n },\n class: names().commandInput,\n onChange,\n });\n },\n Item: ({ command, itemProps }) =>\n elementButton(\n {\n ...toVueAttrs(itemProps),\n class: names().commandItem,\n type: \"button\",\n tabindex: -1,\n disabled: command.disabled,\n },\n command.label\n ),\n Empty: ({ message }) =>\n h(\n \"p\",\n { \"data-adapttable-part\": \"command-empty\", class: names().commandEmpty },\n message\n ),\n});\nexport const elementContextMenuSlots = (\n names: () => Readonly<Record<string, string | undefined>> = () => ({}),\n dir: () => \"ltr\" | \"rtl\" | undefined = () => undefined\n): ContextMenuSlots => ({\n Surface: (props) => h(ElementContextSurface, { ...props, dir: dir() }),\n Item: ({ item, onSelect }) =>\n h(\n ElDropdownItem,\n {\n disabled: item.disabled,\n textValue: item.label,\n \"aria-disabled\": item.disabled,\n \"data-danger\": item.danger ? \"\" : undefined,\n \"data-adapttable-part\": \"context-menu-item\",\n class: names().contextMenuItem,\n onClick: onSelect,\n },\n { default: () => item.label }\n ),\n Separator: () =>\n h(ElDivider, {\n role: \"separator\",\n \"data-adapttable-part\": \"context-menu-separator\",\n class: names().contextMenuSeparator,\n }),\n});\nexport const elementSidePanelSlots = (\n names: () => Readonly<Record<string, string | undefined>> = () => ({})\n): SidePanelSlots => {\n let closeChoice: (() => void) | undefined;\n return {\n Frame: (props) => {\n const close = closeChoice;\n return h(\n ElementCard,\n {\n attrs: {\n \"data-adapttable-part\": \"side-panel\",\n class: props.className,\n \"data-side\": props.side,\n style: { minWidth: \"min(18rem,100%)\", maxWidth: \"100%\" },\n onKeydownCapture: (event: KeyboardEvent) => {\n const target = event.target;\n // ElSelect stops Escape even while closed; forward that case to the\n // binding's current close callback before the native event is consumed.\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 !target.closest('[role=\"dialog\"],[role=\"menu\"]')\n ) {\n event.preventDefault();\n event.stopPropagation();\n close?.();\n }\n },\n },\n },\n { default: () => props.children }\n );\n },\n Tab: (props) =>\n elementButton(\n { ...toVueAttrs(props.buttonProps), class: names().sidePanelTab },\n props.panel.label\n ),\n Close: (props) => {\n closeChoice = props.onClose;\n return elementButton(\n {\n type: \"button\",\n \"aria-label\": props.label,\n \"data-adapttable-part\": \"side-panel-close\",\n class: names().sidePanelClose,\n onClick: props.onClose,\n },\n props.label\n );\n },\n };\n};\n"],"mappings":";;;;;;;;AAOA,MAAa,wBAAwB,iBAClC,UAIK;CACJ,MAAM,SAAS,iBAAiB;CAChC,MAAM,OAAO,WAA+B,IAAI;CAChD,aAAa;EACX,MAAM,QAAQ,MAAM;EACpB,OAAO,EACL,UACA;GACE,YAAY,OAAO,SAAS,MAAM,QAAQ,MAAM,UAAU;GAC1D,OAAO,MAAM;GACb,OAAO,MAAM;GACb,KAAK,MAAM;GACX,UAAU,MAAM,aAAa;GAC7B,cAAc;GACd,OAAO;GACP,gBAAgB;GAChB,WAAW;GACX,mBAAmB;GACnB,oBAAoB;GACpB,mBAAmB;IACjB,IAAI,OAAO,SAAS,MAAM,UAAU,GAAG,MAAM,QAAQ;GACvD;EACF,GACA,EACE,eACE,EAAE,OAAO;GAAE,KAAK;GAAM,wBAAwB;EAAkB,GAAG,CACjE,MAAM,QACR,CAAC,EACL,CACF;CACF;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,SAAS,EAAE,MAAM,OAAsD;EACvE,WAAW,EAAE,MAAM,OAA4C;EAC/D,KAAK,EAAE,MAAM,OAAgD;CAC/D;AACF,CACF;;;;AC/BA,MAAa,wBAAwB,iBAEjC,UAGG;CACH,MAAM,SAAS,iBAAiB;CAChC,MAAM,UAAU,WAA6B;CAC7C,IAAI,OAAO;CACX,IAAI,aAAa;CACjB,qBAAqB;EACnB,OAAO;EACP;C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ACF;EACA,MAAM,UACJ,cACE;GAAE,GAAG,WAAW,MAAM,WAAW;GAAG,OAAO,MAAM,CAAC,CAAC;EAAa,GAChE,MAAM,MAAM,KACd;EACF,QAAQ,UAAU;GAChB,cAAc,MAAM;GACpB,OAAO,cACL;IACE,MAAM;IACN,cAAc,MAAM;IACpB,wBAAwB;IACxB,OAAO,MAAM,CAAC,CAAC;IACf,SAAS,MAAM;GACjB,GACA,MAAM,KACR;EACF;CACF;AACF"}
@@ -1,4 +1,4 @@
1
- const require_withElementExport = require("./withElementExport-J-6vXfL9.cjs");
1
+ const require_withElementExport = require("./withElementExport-CmkGvvZT.cjs");
2
2
  let _adapttable_vue_features = require("@adapttable/vue/features");
3
3
  //#region src/export-csv.ts
4
4
  function exportCsv(options = true) {
@@ -12,4 +12,4 @@ Object.defineProperty(exports, "exportCsv", {
12
12
  }
13
13
  });
14
14
 
15
- //# sourceMappingURL=export-x-Ow8SY5.cjs.map
15
+ //# sourceMappingURL=export-Cln4twUm.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"export-x-Ow8SY5.cjs","names":["withElementExport","bindingExport"],"sources":["../src/export-csv.ts"],"sourcesContent":["import type { StaticTableFeature, TableFeature } from \"@adapttable/vue\";\nimport {\n exportCsv as bindingExport,\n type ExportCsvOptions,\n} from \"@adapttable/vue/features\";\n\nimport { withElementExport } from \"./export/withElementExport\";\n\n/** Export the current view as CSV through the binding's cancellable export model. */\nexport function exportCsv(options?: boolean): StaticTableFeature;\nexport function exportCsv<TRow>(\n options?: boolean | ExportCsvOptions<TRow>\n): TableFeature<TRow>;\nexport function exportCsv<TRow>(\n options: boolean | ExportCsvOptions<TRow> = true\n): TableFeature<TRow> {\n return withElementExport(bindingExport<TRow>(options));\n}\nexport type { ExportCsvOptions } from \"@adapttable/vue/features\";\n"],"mappings":";;;AAaA,SAAgB,UACd,UAA4C,MACxB;CACpB,OAAOA,0BAAAA,mBAAAA,GAAkBC,yBAAAA,UAAAA,CAAoB,OAAO,CAAC;AACvD"}
1
+ {"version":3,"file":"export-Cln4twUm.cjs","names":["withElementExport","bindingExport"],"sources":["../src/export-csv.ts"],"sourcesContent":["import type { StaticTableFeature, TableFeature } from \"@adapttable/vue\";\nimport {\n exportCsv as bindingExport,\n type ExportCsvOptions,\n} from \"@adapttable/vue/features\";\n\nimport { withElementExport } from \"./export/withElementExport\";\n\n/** Export the current view as CSV through the binding's cancellable export model. */\nexport function exportCsv(options?: boolean): StaticTableFeature;\nexport function exportCsv<TRow>(\n options?: boolean | ExportCsvOptions<TRow>\n): TableFeature<TRow>;\nexport function exportCsv<TRow>(\n options: boolean | ExportCsvOptions<TRow> = true\n): TableFeature<TRow> {\n return withElementExport(bindingExport<TRow>(options));\n}\nexport type { ExportCsvOptions } from \"@adapttable/vue/features\";\n"],"mappings":";;;AAaA,SAAgB,UACd,UAA4C,MACxB;CACpB,OAAOA,0BAAAA,mBAAAA,GAAkBC,yBAAAA,UAAAA,CAAoB,OAAO,CAAC;AACvD"}
@@ -1,4 +1,4 @@
1
- import { t as withElementExport } from "./withElementExport-B97s6RIr.js";
1
+ import { t as withElementExport } from "./withElementExport-CX-S76EV.js";
2
2
  import { exportCsv } from "@adapttable/vue/features";
3
3
  //#region src/export-csv.ts
4
4
  function exportCsv$1(options = true) {
@@ -7,4 +7,4 @@ function exportCsv$1(options = true) {
7
7
  //#endregion
8
8
  export { exportCsv$1 as t };
9
9
 
10
- //# sourceMappingURL=export-kuOvIoQg.js.map
10
+ //# sourceMappingURL=export-DMEVONO6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"export-kuOvIoQg.js","names":["exportCsv","bindingExport"],"sources":["../src/export-csv.ts"],"sourcesContent":["import type { StaticTableFeature, TableFeature } from \"@adapttable/vue\";\nimport {\n exportCsv as bindingExport,\n type ExportCsvOptions,\n} from \"@adapttable/vue/features\";\n\nimport { withElementExport } from \"./export/withElementExport\";\n\n/** Export the current view as CSV through the binding's cancellable export model. */\nexport function exportCsv(options?: boolean): StaticTableFeature;\nexport function exportCsv<TRow>(\n options?: boolean | ExportCsvOptions<TRow>\n): TableFeature<TRow>;\nexport function exportCsv<TRow>(\n options: boolean | ExportCsvOptions<TRow> = true\n): TableFeature<TRow> {\n return withElementExport(bindingExport<TRow>(options));\n}\nexport type { ExportCsvOptions } from \"@adapttable/vue/features\";\n"],"mappings":";;;AAaA,SAAgBA,YACd,UAA4C,MACxB;CACpB,OAAO,kBAAkBC,UAAoB,OAAO,CAAC;AACvD"}
1
+ {"version":3,"file":"export-DMEVONO6.js","names":["exportCsv","bindingExport"],"sources":["../src/export-csv.ts"],"sourcesContent":["import type { StaticTableFeature, TableFeature } from \"@adapttable/vue\";\nimport {\n exportCsv as bindingExport,\n type ExportCsvOptions,\n} from \"@adapttable/vue/features\";\n\nimport { withElementExport } from \"./export/withElementExport\";\n\n/** Export the current view as CSV through the binding's cancellable export model. */\nexport function exportCsv(options?: boolean): StaticTableFeature;\nexport function exportCsv<TRow>(\n options?: boolean | ExportCsvOptions<TRow>\n): TableFeature<TRow>;\nexport function exportCsv<TRow>(\n options: boolean | ExportCsvOptions<TRow> = true\n): TableFeature<TRow> {\n return withElementExport(bindingExport<TRow>(options));\n}\nexport type { ExportCsvOptions } from \"@adapttable/vue/features\";\n"],"mappings":";;;AAaA,SAAgBA,YACd,UAA4C,MACxB;CACpB,OAAO,kBAAkBC,UAAoB,OAAO,CAAC;AACvD"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_withElementExport = require("./withElementExport-J-6vXfL9.cjs");
2
+ const require_withElementExport = require("./withElementExport-CmkGvvZT.cjs");
3
3
  let _adapttable_vue_pdf = require("@adapttable/vue/pdf");
4
4
  //#region src/export-pdf.ts
5
5
  function exportPdf(options = true) {
@@ -1,4 +1,4 @@
1
- import { t as withElementExport } from "./withElementExport-B97s6RIr.js";
1
+ import { t as withElementExport } from "./withElementExport-CX-S76EV.js";
2
2
  import { buildPrintDocument, buildPrintTableHtml, buildTablePdf, exportPdf as exportPdf$1, openPrintLayout, pdfWriter, printStyles, printTable } from "@adapttable/vue/pdf";
3
3
  //#region src/export-pdf.ts
4
4
  function exportPdf(options = true) {
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_withElementExport = require("./withElementExport-J-6vXfL9.cjs");
2
+ const require_withElementExport = require("./withElementExport-CmkGvvZT.cjs");
3
3
  let _adapttable_vue_xlsx = require("@adapttable/vue/xlsx");
4
4
  //#region src/export-xlsx.ts
5
5
  function exportXlsx(options = true) {
@@ -1,4 +1,4 @@
1
- import { t as withElementExport } from "./withElementExport-B97s6RIr.js";
1
+ import { t as withElementExport } from "./withElementExport-CX-S76EV.js";
2
2
  import { buildTableXlsx, exportXlsx as exportXlsx$1, xlsxWriter } from "@adapttable/vue/xlsx";
3
3
  //#region src/export-xlsx.ts
4
4
  function exportXlsx(options = true) {
package/dist/export.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_export = require("./export-x-Ow8SY5.cjs");
2
+ const require_export = require("./export-Cln4twUm.cjs");
3
3
  exports.exportCsv = require_export.exportCsv;
package/dist/export.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as exportCsv } from "./export-kuOvIoQg.js";
1
+ import { t as exportCsv } from "./export-DMEVONO6.js";
2
2
  export { exportCsv };
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_filters = require("./filters-CYQFsZ_f.cjs");
3
- const require_header_filters = require("./header-filters-COkO6tD4.cjs");
2
+ const require_filters = require("./filters-B3GI0d_7.cjs");
3
+ const require_header_filters = require("./header-filters-D7475LRH.cjs");
4
4
  let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
5
5
  //#region src/filtering.ts
6
6
  /**
package/dist/filtering.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as filters } from "./filters-CIQ1uMZw.js";
2
- import { t as headerFilters } from "./header-filters-B2veND8x.js";
1
+ import { n as filters } from "./filters-C5j2hjd3.js";
2
+ import { t as headerFilters } from "./header-filters-s7nFkTHe.js";
3
3
  import { filteringFamilyList } from "@adapttable/vue/adapter";
4
4
  //#region src/filtering.ts
5
5
  /**
@@ -1,7 +1,7 @@
1
- const require_button = require("./button-BFjBL9m3.cjs");
1
+ const require_button = require("./button-BuXbfKKx.cjs");
2
2
  const require_ElementInput = require("./ElementInput-BF97xXSC.cjs");
3
3
  const require_ElementSelect = require("./ElementSelect-1UwtGCCr.cjs");
4
- const require_ElementFilterField = require("./ElementFilterField-Dfzy-Yk4.cjs");
4
+ const require_ElementFilterField = require("./ElementFilterField-BbwJTXvK.cjs");
5
5
  let vue = require("vue");
6
6
  let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
7
7
  let element_plus = require("element-plus");
@@ -304,4 +304,4 @@ Object.defineProperty(exports, "textFilterWidget", {
304
304
  }
305
305
  });
306
306
 
307
- //# sourceMappingURL=filters-CYQFsZ_f.cjs.map
307
+ //# sourceMappingURL=filters-B3GI0d_7.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"filters-CYQFsZ_f.cjs","names":["defineComponent","useClassNames","FilterChipsChrome","elementButton","h","ElFormItem","ElText","ElementSelect","ElementInput","elementButton","ElCollapse","ElCollapseItem","defineComponent","useFilterTreeModel","FilterTreeChrome","createVNode","useClassNames","useFeatureState","filterViewKey","elementButton","h","ElIcon","ElTag","filterWidgetComponent","ElementFilterSurface","FilterPanelChrome","defineComponent","h","ElementBasicFilterField","ElementChecklistField","textFieldPart","booleanFieldPart","selectFieldPart","multiSelectFieldPart","rangeFieldPart","extendFeature","bindingFilters","slotRender","FILTERS_PANEL","h","ACTIVE_FILTER_CHIPS"],"sources":["../src/filters/ElementFilterChips.ts","../src/filters/ElementFilterTree.ts","../src/filters/ElementFiltersPanel.ts","../src/filters/widgets.ts","../src/filters.ts"],"sourcesContent":["import {\n type ActiveFilterChipsSlotProps,\n FilterChipsChrome,\n} from \"@adapttable/vue/adapter\";\nimport { defineComponent, type PropType } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\n\nexport const ElementFilterChips = defineComponent(\n (props: ActiveFilterChipsSlotProps) => {\n const names = useClassNames();\n return () =>\n FilterChipsChrome({\n ...props,\n classNames: names.value,\n slots: {\n Remove: ({ attrs }) =>\n elementButton({ ...attrs, text: true, size: \"small\" }, \"×\"),\n Clear: ({ attrs, label }) =>\n elementButton({ ...attrs, text: true, size: \"small\" }, label),\n },\n });\n },\n {\n name: \"ElementFilterChips\",\n props: {\n chips: { type: Array as PropType<ActiveFilterChipsSlotProps[\"chips\"]> },\n labels: {\n type: Object as PropType<ActiveFilterChipsSlotProps[\"labels\"]>,\n },\n onClearAll: {\n type: Function as PropType<ActiveFilterChipsSlotProps[\"onClearAll\"]>,\n },\n },\n }\n);\n","import {\n type FilterTreeBuilderProps,\n FilterTreeChrome,\n type FilterTreeSlots,\n useFilterTreeModel,\n withProps,\n} from \"@adapttable/vue/adapter\";\nimport {\n type CollapseModelValue,\n ElCollapse,\n ElCollapseItem,\n ElFormItem,\n ElText,\n} from \"element-plus\";\nimport {\n createVNode,\n defineComponent,\n h,\n type SetupContext,\n type VNodeChild,\n} from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport ElementSelect from \"../controls/ElementSelect.vue\";\n\nconst controls: FilterTreeSlots<VNodeChild> = {\n Select: (control) =>\n h(\n ElFormItem,\n { class: control.fieldClassName, \"data-adapttable-part\": \"filter-field\" },\n {\n label: () =>\n h(\n ElText,\n {\n class: control.labelClassName,\n \"data-adapttable-part\": \"filter-label\",\n },\n { default: () => control.label }\n ),\n default: () =>\n h(ElementSelect, {\n value: control.value,\n options: control.options,\n class: control.className,\n \"aria-label\": control.label,\n \"data-adapttable-part\": control.part,\n onChange: control.onChange,\n }),\n }\n ),\n Input: (control) =>\n h(\n ElFormItem,\n { class: control.fieldClassName, \"data-adapttable-part\": \"filter-field\" },\n {\n label: () =>\n h(\n ElText,\n {\n class: control.labelClassName,\n \"data-adapttable-part\": \"filter-label\",\n },\n { default: () => control.label }\n ),\n default: () =>\n h(ElementInput, {\n value: control.value,\n type: control.type,\n class: control.className,\n \"aria-label\": control.label,\n \"data-adapttable-part\": \"filter-input\",\n onChange: control.onChange,\n }),\n }\n ),\n Button: (control) =>\n elementButton(\n {\n class: control.className,\n \"data-adapttable-part\": control.part,\n onClick: control.onClick,\n },\n control.label\n ),\n Disclosure: (control) =>\n h(\n ElCollapse,\n {\n modelValue: control.expanded ? [\"query\"] : [],\n class: control.className,\n \"data-adapttable-part\": \"filter-tree\",\n \"onUpdate:modelValue\": (value: CollapseModelValue) =>\n control.onExpandedChange(\n Array.isArray(value) && value.includes(\"query\")\n ),\n },\n {\n default: () =>\n h(\n ElCollapseItem,\n { name: \"query\" },\n {\n title: () =>\n h(\n ElText,\n {\n class: control.summaryClassName,\n \"data-adapttable-part\": \"filter-tree-summary\",\n },\n { default: () => control.label }\n ),\n default: () => control.children,\n }\n ),\n }\n ),\n};\n\nconst treeProps = {\n defs: null,\n source: null,\n labels: null,\n registry: null,\n classNames: null,\n defaultExpanded: { type: Boolean, default: undefined },\n} satisfies Record<keyof FilterTreeBuilderProps<unknown>, unknown>;\n\nconst ElementFilterTreePresentation = defineComponent(\n (props: FilterTreeBuilderProps<unknown>) => {\n const model = useFilterTreeModel(() => props);\n return () => FilterTreeChrome({ model: model.value, controls });\n },\n {\n name: \"ElementFilterTreePresentation\",\n props: treeProps,\n }\n);\n\n/** Preserve the canonical row contract without exposing versioned instance helpers. */\nexport const ElementFilterTree = /* @__PURE__ */ withProps(\n function ElementFilterTree<TRow>(\n props: FilterTreeBuilderProps<TRow>,\n context: Pick<SetupContext, \"attrs\">\n ) {\n return createVNode(ElementFilterTreePresentation, {\n ...context.attrs,\n ...props,\n });\n },\n treeProps\n);\n","import {\n FilterPanelChrome,\n type FilterPanelSlots,\n filterViewKey,\n type FilterWidget,\n filterWidgetComponent,\n useFeatureState,\n} from \"@adapttable/vue/adapter\";\nimport { ElIcon, ElTag } from \"element-plus\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\nimport { ElementFilterSurface } from \"./ElementFilterSurface\";\nimport { ElementFilterTree } from \"./ElementFilterTree\";\n\nfunction useElementFiltersPanel(props: {\n readonly widgets: readonly FilterWidget[];\n}) {\n const widgets = props.widgets;\n const names = useClassNames();\n const model = useFeatureState(filterViewKey<unknown>());\n const controls: FilterPanelSlots<unknown> = {\n Trigger: (control) =>\n elementButton(\n {\n ...control.attrs,\n ref: control.triggerRef,\n class: names.value.filtersButton,\n onPointerdown: control.onPointerDown,\n onClick: control.onClick,\n },\n [\n h(\n ElIcon,\n {\n \"data-adapttable-part\": \"filters-icon\",\n class: names.value.filtersIcon,\n \"aria-hidden\": \"true\",\n },\n {\n default: () =>\n h(\"svg\", { viewBox: \"0 0 24 24\", focusable: \"false\" }, [\n h(\"path\", {\n d: \"M3 4h18l-7 8v7l-4 2v-9z\",\n fill: \"none\",\n stroke: \"currentColor\",\n }),\n ]),\n }\n ),\n control.label,\n control.count\n ? h(\n ElTag,\n {\n \"data-adapttable-part\": \"filters-count\",\n class: names.value.filtersCount,\n size: \"small\",\n round: true,\n },\n { default: () => control.count }\n )\n : null,\n ]\n ),\n Button: (control) =>\n elementButton(\n {\n \"data-adapttable-part\": control.part,\n class: {\n \"filters-clear\": names.value.filtersClear,\n \"filters-close\": names.value.filtersClose,\n \"filters-done\": names.value.filtersDone,\n }[control.part],\n disabled: control.disabled,\n onClick: control.onClick,\n },\n control.label\n ),\n Field: (field) =>\n h(filterWidgetComponent(field.def, field.registry, widgets), {\n ...field,\n classNames: names.value,\n }),\n Tree: (tree) => h(ElementFilterTree, { ...tree, classNames: names.value }),\n Popover: (surface) => h(ElementFilterSurface, { ...surface, modal: false }),\n Drawer: (surface) =>\n h(ElementFilterSurface, {\n ...surface,\n modal: true,\n backdropClassName: names.value.filtersBackdrop,\n }),\n };\n return () =>\n model.value\n ? FilterPanelChrome({\n model: model.value,\n controls,\n classNames: names.value,\n })\n : null;\n}\n\nexport const ElementFiltersPanel = defineComponent({\n name: \"ElementFiltersPanel\",\n props: {\n /** The widgets the panel draws its fields with. */\n widgets: {\n type: Array as PropType<readonly FilterWidget[]>,\n required: true,\n },\n },\n setup: useElementFiltersPanel,\n});\n","import {\n booleanFieldPart,\n type DataTableClassNames,\n type FilterFieldOptions,\n type FilterFieldPart,\n type FilterWidget,\n multiSelectFieldPart,\n rangeFieldPart,\n selectFieldPart,\n textFieldPart,\n} from \"@adapttable/vue/adapter\";\nimport { type FunctionalComponent, h } from \"vue\";\n\nimport ElementBasicFilterField from \"./ElementBasicFilterField.vue\";\nimport ElementChecklistField from \"./ElementChecklistField.vue\";\n\n/** A field drawn by one shared field part. */\nfunction basicWidget(part: FilterFieldPart): FilterWidget {\n const render: FunctionalComponent<\n FilterFieldOptions<unknown> & { classNames?: DataTableClassNames }\n > = (props) =>\n h(ElementBasicFilterField<unknown>, { ...props, parts: [part] });\n return { kinds: part.kinds, render };\n}\n\nconst ChecklistField: FunctionalComponent<\n FilterFieldOptions<unknown> & { classNames?: DataTableClassNames }\n> = (props) => h(ElementChecklistField<unknown>, { ...props });\n\n/** The Element Plus text filter: its operator and its value. @public */\nexport const textFilterWidget = /* @__PURE__ */ basicWidget(textFieldPart);\n/** The Element Plus yes/no filter. @public */\nexport const booleanFilterWidget =\n /* @__PURE__ */ basicWidget(booleanFieldPart);\n/** The Element Plus single-choice filter. @public */\nexport const selectFilterWidget = /* @__PURE__ */ basicWidget(selectFieldPart);\n/** The Element Plus multiple-choice filter. @public */\nexport const multiSelectFilterWidget =\n /* @__PURE__ */ basicWidget(multiSelectFieldPart);\n/** The Element Plus searchable checklist filter. @public */\nexport const checklistFilterWidget: FilterWidget = {\n kinds: [\"checklist\"],\n render: ChecklistField,\n};\n/** The Element Plus operator-first number and date range filter. @public */\nexport const rangeFilterWidget = /* @__PURE__ */ basicWidget(rangeFieldPart);\n\n/** Every built-in widget: what the automatic filters form draws. */\nexport const FILTER_WIDGETS: readonly FilterWidget[] = [\n textFilterWidget,\n booleanFilterWidget,\n selectFilterWidget,\n multiSelectFilterWidget,\n checklistFilterWidget,\n rangeFilterWidget,\n];\n","import type { FilterDef, TableFeature } from \"@adapttable/vue\";\nimport {\n ACTIVE_FILTER_CHIPS,\n type AdapterFiltersFeature,\n extendFeature,\n FILTERS_PANEL,\n type FilterWidget,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport {\n filters as bindingFilters,\n type FiltersOptions,\n} from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { ElementFilterChips } from \"./filters/ElementFilterChips\";\nimport { ElementFiltersPanel } from \"./filters/ElementFiltersPanel\";\nimport { FILTER_WIDGETS } from \"./filters/widgets\";\n\n/**\n * Declarative filters whose fields are drawn with only the given widgets, so\n * the widgets a table never shows stay out of its bundle. A filter whose\n * widget is missing throws when its field draws.\n *\n * @param widgets - The widgets to draw fields with, such as `textFilterWidget`.\n *\n * @public\n */\nexport function filtersWith(\n widgets: readonly FilterWidget[]\n): AdapterFiltersFeature {\n return <TRow>(\n defs: readonly FilterDef<TRow>[] = [],\n options: FiltersOptions = {}\n ): TableFeature<TRow> =>\n extendFeature(bindingFilters(defs, options), [\n slotRender(FILTERS_PANEL, () => h(ElementFiltersPanel, { widgets })),\n slotRender(ACTIVE_FILTER_CHIPS, (props) =>\n h(ElementFilterChips, { ...props })\n ),\n ]);\n}\n\n/** Declarative filters with this kit's chip strip, panel and every widget. @public */\nexport const filters = /* @__PURE__ */ filtersWith(FILTER_WIDGETS);\n\nexport { ElementChecklistFilter as ChecklistFilter } from \"./filters/ElementChecklistFilter\";\nexport { default as FilterField } from \"./filters/ElementFilterField.vue\";\nexport { ElementFilterTree as FilterTreeBuilder } from \"./filters/ElementFilterTree\";\nexport {\n booleanFilterWidget,\n checklistFilterWidget,\n multiSelectFilterWidget,\n rangeFilterWidget,\n selectFilterWidget,\n textFilterWidget,\n} from \"./filters/widgets\";\nexport type { FilterDef, FilterOption, FilterTypeSpec } from \"@adapttable/vue\";\nexport type {\n AdapterFiltersFeature,\n FilterWidget,\n} from \"@adapttable/vue/adapter\";\nexport type {\n ChecklistFilterProps,\n FilterFieldOptions,\n FilterTreeBuilderProps,\n} from \"@adapttable/vue/adapter\";\nexport type { FiltersOptions } from \"@adapttable/vue/features\";\nexport { filterTypes } from \"@adapttable/vue/features\";\n"],"mappings":";;;;;;;;;AASA,MAAa,sBAAA,GAAqBA,IAAAA,gBAAAA,EAC/B,UAAsC;CACrC,MAAM,SAAA,GAAQC,wBAAAA,uBAAAA,CAAc;CAC5B,cAAA,GACEC,wBAAAA,kBAAAA,CAAkB;EAChB,GAAG;EACH,YAAY,MAAM;EAClB,OAAO;GACL,SAAS,EAAE,YACTC,eAAAA,cAAc;IAAE,GAAG;IAAO,MAAM;IAAM,MAAM;GAAQ,GAAG,GAAG;GAC5D,QAAQ,EAAE,OAAO,YACfA,eAAAA,cAAc;IAAE,GAAG;IAAO,MAAM;IAAM,MAAM;GAAQ,GAAG,KAAK;EAChE;CACF,CAAC;AACL,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EAAE,MAAM,MAAuD;EACtE,QAAQ,EACN,MAAM,OACR;EACA,YAAY,EACV,MAAM,SACR;CACF;AACF,CACF;;;ACVA,MAAM,WAAwC;CAC5C,SAAS,aAAA,GACPC,IAAAA,EAAAA,CACEC,aAAAA,YACA;EAAE,OAAO,QAAQ;EAAgB,wBAAwB;CAAe,GACxE;EACE,cAAA,GACED,IAAAA,EAAAA,CACEE,aAAAA,QACA;GACE,OAAO,QAAQ;GACf,wBAAwB;EAC1B,GACA,EAAE,eAAe,QAAQ,MAAM,CACjC;EACF,gBAAA,GACEF,IAAAA,EAAAA,CAAEG,sBAAAA,WAAe;GACf,O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E,2BAAAA,aAAgC,EAAE,GAAG,MAAM,CAAC;;AAG7D,MAAa,mBAAmC,4BAAYC,wBAAAA,aAAa;;AAEzE,MAAa,sBACK,4BAAYC,wBAAAA,gBAAgB;;AAE9C,MAAa,qBAAqC,4BAAYC,wBAAAA,eAAe;;AAE7E,MAAa,0BACK,4BAAYC,wBAAAA,oBAAoB;;AAElD,MAAa,wBAAsC;CACjD,OAAO,CAAC,WAAW;CACnB,QAAQ;AACV;;AAEA,MAAa,oBAAoC,4BAAYC,wBAAAA,cAAc;;AAG3E,MAAa,iBAA0C;CACrD;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;AC3BA,SAAgB,YACd,SACuB;CACvB,QACE,OAAmC,CAAC,GACpC,UAA0B,CAAC,OAAA,GAE3BC,wBAAAA,cAAAA,EAAAA,GAAcC,yBAAAA,QAAAA,CAAe,MAAM,OAAO,GAAG,EAAA,GAC3CC,wBAAAA,WAAAA,CAAWC,wBAAAA,sBAAAA,GAAqBC,IAAAA,EAAAA,CAAE,qBAAqB,EAAE,QAAQ,CAAC,CAAC,IAAA,GACnEF,wBAAAA,WAAAA,CAAWG,wBAAAA,sBAAsB,WAAA,GAC/BD,IAAAA,EAAAA,CAAE,oBAAoB,EAAE,GAAG,MAAM,CAAC,CACpC,CACF,CAAC;AACL;;AAGA,MAAa,UAA0B,4BAAY,cAAc"}
1
+ {"version":3,"file":"filters-B3GI0d_7.cjs","names":["defineComponent","useClassNames","FilterChipsChrome","elementButton","h","ElFormItem","ElText","ElementSelect","ElementInput","elementButton","ElCollapse","ElCollapseItem","defineComponent","useFilterTreeModel","FilterTreeChrome","createVNode","useClassNames","useFeatureState","filterViewKey","elementButton","h","ElIcon","ElTag","filterWidgetComponent","ElementFilterSurface","FilterPanelChrome","defineComponent","h","ElementBasicFilterField","ElementChecklistField","textFieldPart","booleanFieldPart","selectFieldPart","multiSelectFieldPart","rangeFieldPart","extendFeature","bindingFilters","slotRender","FILTERS_PANEL","h","ACTIVE_FILTER_CHIPS"],"sources":["../src/filters/ElementFilterChips.ts","../src/filters/ElementFilterTree.ts","../src/filters/ElementFiltersPanel.ts","../src/filters/widgets.ts","../src/filters.ts"],"sourcesContent":["import {\n type ActiveFilterChipsSlotProps,\n FilterChipsChrome,\n} from \"@adapttable/vue/adapter\";\nimport { defineComponent, type PropType } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\n\nexport const ElementFilterChips = defineComponent(\n (props: ActiveFilterChipsSlotProps) => {\n const names = useClassNames();\n return () =>\n FilterChipsChrome({\n ...props,\n classNames: names.value,\n slots: {\n Remove: ({ attrs }) =>\n elementButton({ ...attrs, text: true, size: \"small\" }, \"×\"),\n Clear: ({ attrs, label }) =>\n elementButton({ ...attrs, text: true, size: \"small\" }, label),\n },\n });\n },\n {\n name: \"ElementFilterChips\",\n props: {\n chips: { type: Array as PropType<ActiveFilterChipsSlotProps[\"chips\"]> },\n labels: {\n type: Object as PropType<ActiveFilterChipsSlotProps[\"labels\"]>,\n },\n onClearAll: {\n type: Function as PropType<ActiveFilterChipsSlotProps[\"onClearAll\"]>,\n },\n },\n }\n);\n","import {\n type FilterTreeBuilderProps,\n FilterTreeChrome,\n type FilterTreeSlots,\n useFilterTreeModel,\n withProps,\n} from \"@adapttable/vue/adapter\";\nimport {\n type CollapseModelValue,\n ElCollapse,\n ElCollapseItem,\n ElFormItem,\n ElText,\n} from \"element-plus\";\nimport {\n createVNode,\n defineComponent,\n h,\n type SetupContext,\n type VNodeChild,\n} from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport ElementSelect from \"../controls/ElementSelect.vue\";\n\nconst controls: FilterTreeSlots<VNodeChild> = {\n Select: (control) =>\n h(\n ElFormItem,\n { class: control.fieldClassName, \"data-adapttable-part\": \"filter-field\" },\n {\n label: () =>\n h(\n ElText,\n {\n class: control.labelClassName,\n \"data-adapttable-part\": \"filter-label\",\n },\n { default: () => control.label }\n ),\n default: () =>\n h(ElementSelect, {\n value: control.value,\n options: control.options,\n class: control.className,\n \"aria-label\": control.label,\n \"data-adapttable-part\": control.part,\n onChange: control.onChange,\n }),\n }\n ),\n Input: (control) =>\n h(\n ElFormItem,\n { class: control.fieldClassName, \"data-adapttable-part\": \"filter-field\" },\n {\n label: () =>\n h(\n ElText,\n {\n class: control.labelClassName,\n \"data-adapttable-part\": \"filter-label\",\n },\n { default: () => control.label }\n ),\n default: () =>\n h(ElementInput, {\n value: control.value,\n type: control.type,\n class: control.className,\n \"aria-label\": control.label,\n \"data-adapttable-part\": \"filter-input\",\n onChange: control.onChange,\n }),\n }\n ),\n Button: (control) =>\n elementButton(\n {\n class: control.className,\n \"data-adapttable-part\": control.part,\n onClick: control.onClick,\n },\n control.label\n ),\n Disclosure: (control) =>\n h(\n ElCollapse,\n {\n modelValue: control.expanded ? [\"query\"] : [],\n class: control.className,\n \"data-adapttable-part\": \"filter-tree\",\n \"onUpdate:modelValue\": (value: CollapseModelValue) =>\n control.onExpandedChange(\n Array.isArray(value) && value.includes(\"query\")\n ),\n },\n {\n default: () =>\n h(\n ElCollapseItem,\n { name: \"query\" },\n {\n title: () =>\n h(\n ElText,\n {\n class: control.summaryClassName,\n \"data-adapttable-part\": \"filter-tree-summary\",\n },\n { default: () => control.label }\n ),\n default: () => control.children,\n }\n ),\n }\n ),\n};\n\nconst treeProps = {\n defs: null,\n source: null,\n labels: null,\n registry: null,\n classNames: null,\n defaultExpanded: { type: Boolean, default: undefined },\n} satisfies Record<keyof FilterTreeBuilderProps<unknown>, unknown>;\n\nconst ElementFilterTreePresentation = defineComponent(\n (props: FilterTreeBuilderProps<unknown>) => {\n const model = useFilterTreeModel(() => props);\n return () => FilterTreeChrome({ model: model.value, controls });\n },\n {\n name: \"ElementFilterTreePresentation\",\n props: treeProps,\n }\n);\n\n/** Preserve the canonical row contract without exposing versioned instance helpers. */\nexport const ElementFilterTree = /* @__PURE__ */ withProps(\n function ElementFilterTree<TRow>(\n props: FilterTreeBuilderProps<TRow>,\n context: Pick<SetupContext, \"attrs\">\n ) {\n return createVNode(ElementFilterTreePresentation, {\n ...context.attrs,\n ...props,\n });\n },\n treeProps\n);\n","import {\n FilterPanelChrome,\n type FilterPanelSlots,\n filterViewKey,\n type FilterWidget,\n filterWidgetComponent,\n useFeatureState,\n} from \"@adapttable/vue/adapter\";\nimport { ElIcon, ElTag } from \"element-plus\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\nimport { ElementFilterSurface } from \"./ElementFilterSurface\";\nimport { ElementFilterTree } from \"./ElementFilterTree\";\n\nfunction useElementFiltersPanel(props: {\n readonly widgets: readonly FilterWidget[];\n}) {\n const widgets = props.widgets;\n const names = useClassNames();\n const model = useFeatureState(filterViewKey<unknown>());\n const controls: FilterPanelSlots<unknown> = {\n Trigger: (control) =>\n elementButton(\n {\n ...control.attrs,\n ref: control.triggerRef,\n class: names.value.filtersButton,\n onPointerdown: control.onPointerDown,\n onClick: control.onClick,\n },\n [\n h(\n ElIcon,\n {\n \"data-adapttable-part\": \"filters-icon\",\n class: names.value.filtersIcon,\n \"aria-hidden\": \"true\",\n },\n {\n default: () =>\n h(\"svg\", { viewBox: \"0 0 24 24\", focusable: \"false\" }, [\n h(\"path\", {\n d: \"M3 4h18l-7 8v7l-4 2v-9z\",\n fill: \"none\",\n stroke: \"currentColor\",\n }),\n ]),\n }\n ),\n control.label,\n control.count\n ? h(\n ElTag,\n {\n \"data-adapttable-part\": \"filters-count\",\n class: names.value.filtersCount,\n size: \"small\",\n round: true,\n },\n { default: () => control.count }\n )\n : null,\n ]\n ),\n Button: (control) =>\n elementButton(\n {\n \"data-adapttable-part\": control.part,\n class: {\n \"filters-clear\": names.value.filtersClear,\n \"filters-close\": names.value.filtersClose,\n \"filters-done\": names.value.filtersDone,\n }[control.part],\n disabled: control.disabled,\n onClick: control.onClick,\n },\n control.label\n ),\n Field: (field) =>\n h(filterWidgetComponent(field.def, field.registry, widgets), {\n ...field,\n classNames: names.value,\n }),\n Tree: (tree) => h(ElementFilterTree, { ...tree, classNames: names.value }),\n Popover: (surface) => h(ElementFilterSurface, { ...surface, modal: false }),\n Drawer: (surface) =>\n h(ElementFilterSurface, {\n ...surface,\n modal: true,\n backdropClassName: names.value.filtersBackdrop,\n }),\n };\n return () =>\n model.value\n ? FilterPanelChrome({\n model: model.value,\n controls,\n classNames: names.value,\n })\n : null;\n}\n\nexport const ElementFiltersPanel = defineComponent({\n name: \"ElementFiltersPanel\",\n props: {\n /** The widgets the panel draws its fields with. */\n widgets: {\n type: Array as PropType<readonly FilterWidget[]>,\n required: true,\n },\n },\n setup: useElementFiltersPanel,\n});\n","import {\n booleanFieldPart,\n type DataTableClassNames,\n type FilterFieldOptions,\n type FilterFieldPart,\n type FilterWidget,\n multiSelectFieldPart,\n rangeFieldPart,\n selectFieldPart,\n textFieldPart,\n} from \"@adapttable/vue/adapter\";\nimport { type FunctionalComponent, h } from \"vue\";\n\nimport ElementBasicFilterField from \"./ElementBasicFilterField.vue\";\nimport ElementChecklistField from \"./ElementChecklistField.vue\";\n\n/** A field drawn by one shared field part. */\nfunction basicWidget(part: FilterFieldPart): FilterWidget {\n const render: FunctionalComponent<\n FilterFieldOptions<unknown> & { classNames?: DataTableClassNames }\n > = (props) =>\n h(ElementBasicFilterField<unknown>, { ...props, parts: [part] });\n return { kinds: part.kinds, render };\n}\n\nconst ChecklistField: FunctionalComponent<\n FilterFieldOptions<unknown> & { classNames?: DataTableClassNames }\n> = (props) => h(ElementChecklistField<unknown>, { ...props });\n\n/** The Element Plus text filter: its operator and its value. @public */\nexport const textFilterWidget = /* @__PURE__ */ basicWidget(textFieldPart);\n/** The Element Plus yes/no filter. @public */\nexport const booleanFilterWidget =\n /* @__PURE__ */ basicWidget(booleanFieldPart);\n/** The Element Plus single-choice filter. @public */\nexport const selectFilterWidget = /* @__PURE__ */ basicWidget(selectFieldPart);\n/** The Element Plus multiple-choice filter. @public */\nexport const multiSelectFilterWidget =\n /* @__PURE__ */ basicWidget(multiSelectFieldPart);\n/** The Element Plus searchable checklist filter. @public */\nexport const checklistFilterWidget: FilterWidget = {\n kinds: [\"checklist\"],\n render: ChecklistField,\n};\n/** The Element Plus operator-first number and date range filter. @public */\nexport const rangeFilterWidget = /* @__PURE__ */ basicWidget(rangeFieldPart);\n\n/** Every built-in widget: what the automatic filters form draws. */\nexport const FILTER_WIDGETS: readonly FilterWidget[] = [\n textFilterWidget,\n booleanFilterWidget,\n selectFilterWidget,\n multiSelectFilterWidget,\n checklistFilterWidget,\n rangeFilterWidget,\n];\n","import type { FilterDef, TableFeature } from \"@adapttable/vue\";\nimport {\n ACTIVE_FILTER_CHIPS,\n type AdapterFiltersFeature,\n extendFeature,\n FILTERS_PANEL,\n type FilterWidget,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport {\n filters as bindingFilters,\n type FiltersOptions,\n} from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { ElementFilterChips } from \"./filters/ElementFilterChips\";\nimport { ElementFiltersPanel } from \"./filters/ElementFiltersPanel\";\nimport { FILTER_WIDGETS } from \"./filters/widgets\";\n\n/**\n * Declarative filters whose fields are drawn with only the given widgets, so\n * the widgets a table never shows stay out of its bundle. A filter whose\n * widget is missing throws when its field draws.\n *\n * @param widgets - The widgets to draw fields with, such as `textFilterWidget`.\n *\n * @public\n */\nexport function filtersWith(\n widgets: readonly FilterWidget[]\n): AdapterFiltersFeature {\n return <TRow>(\n defs: readonly FilterDef<TRow>[] = [],\n options: FiltersOptions = {}\n ): TableFeature<TRow> =>\n extendFeature(bindingFilters(defs, options), [\n slotRender(FILTERS_PANEL, () => h(ElementFiltersPanel, { widgets })),\n slotRender(ACTIVE_FILTER_CHIPS, (props) =>\n h(ElementFilterChips, { ...props })\n ),\n ]);\n}\n\n/** Declarative filters with this kit's chip strip, panel and every widget. @public */\nexport const filters = /* @__PURE__ */ filtersWith(FILTER_WIDGETS);\n\nexport { ElementChecklistFilter as ChecklistFilter } from \"./filters/ElementChecklistFilter\";\nexport { default as FilterField } from \"./filters/ElementFilterField.vue\";\nexport { ElementFilterTree as FilterTreeBuilder } from \"./filters/ElementFilterTree\";\nexport {\n booleanFilterWidget,\n checklistFilterWidget,\n multiSelectFilterWidget,\n rangeFilterWidget,\n selectFilterWidget,\n textFilterWidget,\n} from \"./filters/widgets\";\nexport type { FilterDef, FilterOption, FilterTypeSpec } from \"@adapttable/vue\";\nexport type {\n AdapterFiltersFeature,\n FilterWidget,\n} from \"@adapttable/vue/adapter\";\nexport type {\n ChecklistFilterProps,\n FilterFieldOptions,\n FilterTreeBuilderProps,\n} from \"@adapttable/vue/adapter\";\nexport type { FiltersOptions } from \"@adapttable/vue/features\";\nexport { filterTypes } from \"@adapttable/vue/features\";\n"],"mappings":";;;;;;;;;AASA,MAAa,sBAAA,GAAqBA,IAAAA,gBAAAA,EAC/B,UAAsC;CACrC,MAAM,SAAA,GAAQC,wBAAAA,uBAAAA,CAAc;CAC5B,cAAA,GACEC,wBAAAA,kBAAAA,CAAkB;EAChB,GAAG;EACH,YAAY,MAAM;EAClB,OAAO;GACL,SAAS,EAAE,YACTC,eAAAA,cAAc;IAAE,GAAG;IAAO,MAAM;IAAM,MAAM;GAAQ,GAAG,GAAG;GAC5D,QAAQ,EAAE,OAAO,YACfA,eAAAA,cAAc;IAAE,GAAG;IAAO,MAAM;IAAM,MAAM;GAAQ,GAAG,KAAK;EAChE;CACF,CAAC;AACL,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EAAE,MAAM,MAAuD;EACtE,QAAQ,EACN,MAAM,OACR;EACA,YAAY,EACV,MAAM,SACR;CACF;AACF,CACF;;;ACVA,MAAM,WAAwC;CAC5C,SAAS,aAAA,GACPC,IAAAA,EAAAA,CACEC,aAAAA,YACA;EAAE,OAAO,QAAQ;EAAgB,wBAAwB;CAAe,GACxE;EACE,cAAA,GACED,IAAAA,EAAAA,CACEE,aA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AE,GAAG;EAAO,OAAO,CAAC,IAAI;CAAE,CAAC;CACjE,OAAO;EAAE,OAAO,KAAK;EAAO;CAAO;AACrC;AAEA,MAAM,kBAED,WAAA,GAAUD,IAAAA,EAAAA,CAAEE,2BAAAA,aAAgC,EAAE,GAAG,MAAM,CAAC;;AAG7D,MAAa,mBAAmC,4BAAYC,wBAAAA,aAAa;;AAEzE,MAAa,sBACK,4BAAYC,wBAAAA,gBAAgB;;AAE9C,MAAa,qBAAqC,4BAAYC,wBAAAA,eAAe;;AAE7E,MAAa,0BACK,4BAAYC,wBAAAA,oBAAoB;;AAElD,MAAa,wBAAsC;CACjD,OAAO,CAAC,WAAW;CACnB,QAAQ;AACV;;AAEA,MAAa,oBAAoC,4BAAYC,wBAAAA,cAAc;;AAG3E,MAAa,iBAA0C;CACrD;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;AC3BA,SAAgB,YACd,SACuB;CACvB,QACE,OAAmC,CAAC,GACpC,UAA0B,CAAC,OAAA,GAE3BC,wBAAAA,cAAAA,EAAAA,GAAcC,yBAAAA,QAAAA,CAAe,MAAM,OAAO,GAAG,EAAA,GAC3CC,wBAAAA,WAAAA,CAAWC,wBAAAA,sBAAAA,GAAqBC,IAAAA,EAAAA,CAAE,qBAAqB,EAAE,QAAQ,CAAC,CAAC,IAAA,GACnEF,wBAAAA,WAAAA,CAAWG,wBAAAA,sBAAsB,WAAA,GAC/BD,IAAAA,EAAAA,CAAE,oBAAoB,EAAE,GAAG,MAAM,CAAC,CACpC,CACF,CAAC;AACL;;AAGA,MAAa,UAA0B,4BAAY,cAAc"}
@@ -1,8 +1,8 @@
1
1
  import { n as useClassNames } from "./classNamesContext-18Wbxy4F.js";
2
- import { t as elementButton } from "./button-DwB4UxI2.js";
2
+ import { t as elementButton } from "./button-DUddRulx.js";
3
3
  import { t as _sfc_main } from "./ElementInput-Cn9hpa9j.js";
4
4
  import { t as _sfc_main$1 } from "./ElementSelect-BxFmnPpv.js";
5
- import { a as ElementFilterSurface, i as _sfc_main$2, n as _sfc_main$3 } from "./ElementFilterField-C8EJjVB_.js";
5
+ import { a as ElementFilterSurface, i as _sfc_main$2, n as _sfc_main$3 } from "./ElementFilterField-N8tiYPGN.js";
6
6
  import { createVNode, defineComponent, h } from "vue";
7
7
  import { ACTIVE_FILTER_CHIPS, FILTERS_PANEL, FilterChipsChrome, FilterPanelChrome, FilterTreeChrome, booleanFieldPart, extendFeature, filterViewKey, filterWidgetComponent, multiSelectFieldPart, rangeFieldPart, selectFieldPart, slotRender, textFieldPart, useFeatureState, useFilterTreeModel, withProps } from "@adapttable/vue/adapter";
8
8
  import { ElCollapse, ElCollapseItem, ElFormItem, ElIcon, ElTag, ElText } from "element-plus";
@@ -252,4 +252,4 @@ const filters$1 = /* @__PURE__ */ filtersWith(FILTER_WIDGETS);
252
252
  //#endregion
253
253
  export { checklistFilterWidget as a, selectFilterWidget as c, booleanFilterWidget as i, textFilterWidget as l, filters$1 as n, multiSelectFilterWidget as o, filtersWith as r, rangeFilterWidget as s, filterTypes as t, ElementFilterTree as u };
254
254
 
255
- //# sourceMappingURL=filters-CIQ1uMZw.js.map
255
+ //# sourceMappingURL=filters-C5j2hjd3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filters-CIQ1uMZw.js","names":["ElementSelect","ElementInput","ElementBasicFilterField","ElementChecklistField","bindingFilters","filters"],"sources":["../src/filters/ElementFilterChips.ts","../src/filters/ElementFilterTree.ts","../src/filters/ElementFiltersPanel.ts","../src/filters/widgets.ts","../src/filters.ts"],"sourcesContent":["import {\n type ActiveFilterChipsSlotProps,\n FilterChipsChrome,\n} from \"@adapttable/vue/adapter\";\nimport { defineComponent, type PropType } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\n\nexport const ElementFilterChips = defineComponent(\n (props: ActiveFilterChipsSlotProps) => {\n const names = useClassNames();\n return () =>\n FilterChipsChrome({\n ...props,\n classNames: names.value,\n slots: {\n Remove: ({ attrs }) =>\n elementButton({ ...attrs, text: true, size: \"small\" }, \"×\"),\n Clear: ({ attrs, label }) =>\n elementButton({ ...attrs, text: true, size: \"small\" }, label),\n },\n });\n },\n {\n name: \"ElementFilterChips\",\n props: {\n chips: { type: Array as PropType<ActiveFilterChipsSlotProps[\"chips\"]> },\n labels: {\n type: Object as PropType<ActiveFilterChipsSlotProps[\"labels\"]>,\n },\n onClearAll: {\n type: Function as PropType<ActiveFilterChipsSlotProps[\"onClearAll\"]>,\n },\n },\n }\n);\n","import {\n type FilterTreeBuilderProps,\n FilterTreeChrome,\n type FilterTreeSlots,\n useFilterTreeModel,\n withProps,\n} from \"@adapttable/vue/adapter\";\nimport {\n type CollapseModelValue,\n ElCollapse,\n ElCollapseItem,\n ElFormItem,\n ElText,\n} from \"element-plus\";\nimport {\n createVNode,\n defineComponent,\n h,\n type SetupContext,\n type VNodeChild,\n} from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport ElementSelect from \"../controls/ElementSelect.vue\";\n\nconst controls: FilterTreeSlots<VNodeChild> = {\n Select: (control) =>\n h(\n ElFormItem,\n { class: control.fieldClassName, \"data-adapttable-part\": \"filter-field\" },\n {\n label: () =>\n h(\n ElText,\n {\n class: control.labelClassName,\n \"data-adapttable-part\": \"filter-label\",\n },\n { default: () => control.label }\n ),\n default: () =>\n h(ElementSelect, {\n value: control.value,\n options: control.options,\n class: control.className,\n \"aria-label\": control.label,\n \"data-adapttable-part\": control.part,\n onChange: control.onChange,\n }),\n }\n ),\n Input: (control) =>\n h(\n ElFormItem,\n { class: control.fieldClassName, \"data-adapttable-part\": \"filter-field\" },\n {\n label: () =>\n h(\n ElText,\n {\n class: control.labelClassName,\n \"data-adapttable-part\": \"filter-label\",\n },\n { default: () => control.label }\n ),\n default: () =>\n h(ElementInput, {\n value: control.value,\n type: control.type,\n class: control.className,\n \"aria-label\": control.label,\n \"data-adapttable-part\": \"filter-input\",\n onChange: control.onChange,\n }),\n }\n ),\n Button: (control) =>\n elementButton(\n {\n class: control.className,\n \"data-adapttable-part\": control.part,\n onClick: control.onClick,\n },\n control.label\n ),\n Disclosure: (control) =>\n h(\n ElCollapse,\n {\n modelValue: control.expanded ? [\"query\"] : [],\n class: control.className,\n \"data-adapttable-part\": \"filter-tree\",\n \"onUpdate:modelValue\": (value: CollapseModelValue) =>\n control.onExpandedChange(\n Array.isArray(value) && value.includes(\"query\")\n ),\n },\n {\n default: () =>\n h(\n ElCollapseItem,\n { name: \"query\" },\n {\n title: () =>\n h(\n ElText,\n {\n class: control.summaryClassName,\n \"data-adapttable-part\": \"filter-tree-summary\",\n },\n { default: () => control.label }\n ),\n default: () => control.children,\n }\n ),\n }\n ),\n};\n\nconst treeProps = {\n defs: null,\n source: null,\n labels: null,\n registry: null,\n classNames: null,\n defaultExpanded: { type: Boolean, default: undefined },\n} satisfies Record<keyof FilterTreeBuilderProps<unknown>, unknown>;\n\nconst ElementFilterTreePresentation = defineComponent(\n (props: FilterTreeBuilderProps<unknown>) => {\n const model = useFilterTreeModel(() => props);\n return () => FilterTreeChrome({ model: model.value, controls });\n },\n {\n name: \"ElementFilterTreePresentation\",\n props: treeProps,\n }\n);\n\n/** Preserve the canonical row contract without exposing versioned instance helpers. */\nexport const ElementFilterTree = /* @__PURE__ */ withProps(\n function ElementFilterTree<TRow>(\n props: FilterTreeBuilderProps<TRow>,\n context: Pick<SetupContext, \"attrs\">\n ) {\n return createVNode(ElementFilterTreePresentation, {\n ...context.attrs,\n ...props,\n });\n },\n treeProps\n);\n","import {\n FilterPanelChrome,\n type FilterPanelSlots,\n filterViewKey,\n type FilterWidget,\n filterWidgetComponent,\n useFeatureState,\n} from \"@adapttable/vue/adapter\";\nimport { ElIcon, ElTag } from \"element-plus\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\nimport { ElementFilterSurface } from \"./ElementFilterSurface\";\nimport { ElementFilterTree } from \"./ElementFilterTree\";\n\nfunction useElementFiltersPanel(props: {\n readonly widgets: readonly FilterWidget[];\n}) {\n const widgets = props.widgets;\n const names = useClassNames();\n const model = useFeatureState(filterViewKey<unknown>());\n const controls: FilterPanelSlots<unknown> = {\n Trigger: (control) =>\n elementButton(\n {\n ...control.attrs,\n ref: control.triggerRef,\n class: names.value.filtersButton,\n onPointerdown: control.onPointerDown,\n onClick: control.onClick,\n },\n [\n h(\n ElIcon,\n {\n \"data-adapttable-part\": \"filters-icon\",\n class: names.value.filtersIcon,\n \"aria-hidden\": \"true\",\n },\n {\n default: () =>\n h(\"svg\", { viewBox: \"0 0 24 24\", focusable: \"false\" }, [\n h(\"path\", {\n d: \"M3 4h18l-7 8v7l-4 2v-9z\",\n fill: \"none\",\n stroke: \"currentColor\",\n }),\n ]),\n }\n ),\n control.label,\n control.count\n ? h(\n ElTag,\n {\n \"data-adapttable-part\": \"filters-count\",\n class: names.value.filtersCount,\n size: \"small\",\n round: true,\n },\n { default: () => control.count }\n )\n : null,\n ]\n ),\n Button: (control) =>\n elementButton(\n {\n \"data-adapttable-part\": control.part,\n class: {\n \"filters-clear\": names.value.filtersClear,\n \"filters-close\": names.value.filtersClose,\n \"filters-done\": names.value.filtersDone,\n }[control.part],\n disabled: control.disabled,\n onClick: control.onClick,\n },\n control.label\n ),\n Field: (field) =>\n h(filterWidgetComponent(field.def, field.registry, widgets), {\n ...field,\n classNames: names.value,\n }),\n Tree: (tree) => h(ElementFilterTree, { ...tree, classNames: names.value }),\n Popover: (surface) => h(ElementFilterSurface, { ...surface, modal: false }),\n Drawer: (surface) =>\n h(ElementFilterSurface, {\n ...surface,\n modal: true,\n backdropClassName: names.value.filtersBackdrop,\n }),\n };\n return () =>\n model.value\n ? FilterPanelChrome({\n model: model.value,\n controls,\n classNames: names.value,\n })\n : null;\n}\n\nexport const ElementFiltersPanel = defineComponent({\n name: \"ElementFiltersPanel\",\n props: {\n /** The widgets the panel draws its fields with. */\n widgets: {\n type: Array as PropType<readonly FilterWidget[]>,\n required: true,\n },\n },\n setup: useElementFiltersPanel,\n});\n","import {\n booleanFieldPart,\n type DataTableClassNames,\n type FilterFieldOptions,\n type FilterFieldPart,\n type FilterWidget,\n multiSelectFieldPart,\n rangeFieldPart,\n selectFieldPart,\n textFieldPart,\n} from \"@adapttable/vue/adapter\";\nimport { type FunctionalComponent, h } from \"vue\";\n\nimport ElementBasicFilterField from \"./ElementBasicFilterField.vue\";\nimport ElementChecklistField from \"./ElementChecklistField.vue\";\n\n/** A field drawn by one shared field part. */\nfunction basicWidget(part: FilterFieldPart): FilterWidget {\n const render: FunctionalComponent<\n FilterFieldOptions<unknown> & { classNames?: DataTableClassNames }\n > = (props) =>\n h(ElementBasicFilterField<unknown>, { ...props, parts: [part] });\n return { kinds: part.kinds, render };\n}\n\nconst ChecklistField: FunctionalComponent<\n FilterFieldOptions<unknown> & { classNames?: DataTableClassNames }\n> = (props) => h(ElementChecklistField<unknown>, { ...props });\n\n/** The Element Plus text filter: its operator and its value. @public */\nexport const textFilterWidget = /* @__PURE__ */ basicWidget(textFieldPart);\n/** The Element Plus yes/no filter. @public */\nexport const booleanFilterWidget =\n /* @__PURE__ */ basicWidget(booleanFieldPart);\n/** The Element Plus single-choice filter. @public */\nexport const selectFilterWidget = /* @__PURE__ */ basicWidget(selectFieldPart);\n/** The Element Plus multiple-choice filter. @public */\nexport const multiSelectFilterWidget =\n /* @__PURE__ */ basicWidget(multiSelectFieldPart);\n/** The Element Plus searchable checklist filter. @public */\nexport const checklistFilterWidget: FilterWidget = {\n kinds: [\"checklist\"],\n render: ChecklistField,\n};\n/** The Element Plus operator-first number and date range filter. @public */\nexport const rangeFilterWidget = /* @__PURE__ */ basicWidget(rangeFieldPart);\n\n/** Every built-in widget: what the automatic filters form draws. */\nexport const FILTER_WIDGETS: readonly FilterWidget[] = [\n textFilterWidget,\n booleanFilterWidget,\n selectFilterWidget,\n multiSelectFilterWidget,\n checklistFilterWidget,\n rangeFilterWidget,\n];\n","import type { FilterDef, TableFeature } from \"@adapttable/vue\";\nimport {\n ACTIVE_FILTER_CHIPS,\n type AdapterFiltersFeature,\n extendFeature,\n FILTERS_PANEL,\n type FilterWidget,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport {\n filters as bindingFilters,\n type FiltersOptions,\n} from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { ElementFilterChips } from \"./filters/ElementFilterChips\";\nimport { ElementFiltersPanel } from \"./filters/ElementFiltersPanel\";\nimport { FILTER_WIDGETS } from \"./filters/widgets\";\n\n/**\n * Declarative filters whose fields are drawn with only the given widgets, so\n * the widgets a table never shows stay out of its bundle. A filter whose\n * widget is missing throws when its field draws.\n *\n * @param widgets - The widgets to draw fields with, such as `textFilterWidget`.\n *\n * @public\n */\nexport function filtersWith(\n widgets: readonly FilterWidget[]\n): AdapterFiltersFeature {\n return <TRow>(\n defs: readonly FilterDef<TRow>[] = [],\n options: FiltersOptions = {}\n ): TableFeature<TRow> =>\n extendFeature(bindingFilters(defs, options), [\n slotRender(FILTERS_PANEL, () => h(ElementFiltersPanel, { widgets })),\n slotRender(ACTIVE_FILTER_CHIPS, (props) =>\n h(ElementFilterChips, { ...props })\n ),\n ]);\n}\n\n/** Declarative filters with this kit's chip strip, panel and every widget. @public */\nexport const filters = /* @__PURE__ */ filtersWith(FILTER_WIDGETS);\n\nexport { ElementChecklistFilter as ChecklistFilter } from \"./filters/ElementChecklistFilter\";\nexport { default as FilterField } from \"./filters/ElementFilterField.vue\";\nexport { ElementFilterTree as FilterTreeBuilder } from \"./filters/ElementFilterTree\";\nexport {\n booleanFilterWidget,\n checklistFilterWidget,\n multiSelectFilterWidget,\n rangeFilterWidget,\n selectFilterWidget,\n textFilterWidget,\n} from \"./filters/widgets\";\nexport type { FilterDef, FilterOption, FilterTypeSpec } from \"@adapttable/vue\";\nexport type {\n AdapterFiltersFeature,\n FilterWidget,\n} from \"@adapttable/vue/adapter\";\nexport type {\n ChecklistFilterProps,\n FilterFieldOptions,\n FilterTreeBuilderProps,\n} from \"@adapttable/vue/adapter\";\nexport type { FiltersOptions } from \"@adapttable/vue/features\";\nexport { filterTypes } from \"@adapttable/vue/features\";\n"],"mappings":";;;;;;;;;;AASA,MAAa,qBAAqB,iBAC/B,UAAsC;CACrC,MAAM,QAAQ,cAAc;CAC5B,aACE,kBAAkB;EAChB,GAAG;EACH,YAAY,MAAM;EAClB,OAAO;GACL,SAAS,EAAE,YACT,cAAc;IAAE,GAAG;IAAO,MAAM;IAAM,MAAM;GAAQ,GAAG,GAAG;GAC5D,QAAQ,EAAE,OAAO,YACf,cAAc;IAAE,GAAG;IAAO,MAAM;IAAM,MAAM;GAAQ,GAAG,KAAK;EAChE;CACF,CAAC;AACL,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EAAE,MAAM,MAAuD;EACtE,QAAQ,EACN,MAAM,OACR;EACA,YAAY,EACV,MAAM,SACR;CACF;AACF,CACF;;;ACVA,MAAM,WAAwC;CAC5C,SAAS,YACP,EACE,YACA;EAAE,OAAO,QAAQ;EAAgB,wBAAwB;CAAe,GACxE;EACE,aACE,EACE,QACA;GACE,OAAO,QAAQ;GACf,wBAAwB;EAC1B,GACA,EAAE,eAAe,QAAQ,MAAM,CACjC;EACF,eACE,EAAEA,aAAe;GACf,OAAO,QAAQ;GACf,SAAS,QAAQ;GACjB,OAAO,QAAQ;GACf,cAAc,QAAQ;GACtB,wBAAwB,QAAQ;GAChC,UAAU,QAAQ;EACpB,CAAC;CACL,CACF;CACF,QAAQ,YACN,EACE,YACA;EAAE,OAAO,QAAQ;EAAgB,wBAAwB;CAAe,GACxE;EACE,aACE,EACE,QACA;GACE,OAAO,QAAQ;GACf,wBAAwB;EAC1B,GACA,EAAE,eAAe,QAAQ,MAAM,CACjC;EACF,eACE,EAAEC,WAAc;GACd,OAAO,QAAQ;GACf,MAAM,QAAQ;GACd,OAAO,QAAQ;GACf,cAAc,QAAQ;GACtB,wBAAwB;GACxB,UAAU,QAAQ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CAAE,CAAC;CACjE,OAAO;EAAE,OAAO,KAAK;EAAO;CAAO;AACrC;AAEA,MAAM,kBAED,UAAU,EAAEC,aAAgC,EAAE,GAAG,MAAM,CAAC;;AAG7D,MAAa,mBAAmC,4BAAY,aAAa;;AAEzE,MAAa,sBACK,4BAAY,gBAAgB;;AAE9C,MAAa,qBAAqC,4BAAY,eAAe;;AAE7E,MAAa,0BACK,4BAAY,oBAAoB;;AAElD,MAAa,wBAAsC;CACjD,OAAO,CAAC,WAAW;CACnB,QAAQ;AACV;;AAEA,MAAa,oBAAoC,4BAAY,cAAc;;AAG3E,MAAa,iBAA0C;CACrD;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;AC3BA,SAAgB,YACd,SACuB;CACvB,QACE,OAAmC,CAAC,GACpC,UAA0B,CAAC,MAE3B,cAAcC,QAAe,MAAM,OAAO,GAAG,CAC3C,WAAW,qBAAqB,EAAE,qBAAqB,EAAE,QAAQ,CAAC,CAAC,GACnE,WAAW,sBAAsB,UAC/B,EAAE,oBAAoB,EAAE,GAAG,MAAM,CAAC,CACpC,CACF,CAAC;AACL;;AAGA,MAAaC,YAA0B,4BAAY,cAAc"}
1
+ {"version":3,"file":"filters-C5j2hjd3.js","names":["ElementSelect","ElementInput","ElementBasicFilterField","ElementChecklistField","bindingFilters","filters"],"sources":["../src/filters/ElementFilterChips.ts","../src/filters/ElementFilterTree.ts","../src/filters/ElementFiltersPanel.ts","../src/filters/widgets.ts","../src/filters.ts"],"sourcesContent":["import {\n type ActiveFilterChipsSlotProps,\n FilterChipsChrome,\n} from \"@adapttable/vue/adapter\";\nimport { defineComponent, type PropType } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\n\nexport const ElementFilterChips = defineComponent(\n (props: ActiveFilterChipsSlotProps) => {\n const names = useClassNames();\n return () =>\n FilterChipsChrome({\n ...props,\n classNames: names.value,\n slots: {\n Remove: ({ attrs }) =>\n elementButton({ ...attrs, text: true, size: \"small\" }, \"×\"),\n Clear: ({ attrs, label }) =>\n elementButton({ ...attrs, text: true, size: \"small\" }, label),\n },\n });\n },\n {\n name: \"ElementFilterChips\",\n props: {\n chips: { type: Array as PropType<ActiveFilterChipsSlotProps[\"chips\"]> },\n labels: {\n type: Object as PropType<ActiveFilterChipsSlotProps[\"labels\"]>,\n },\n onClearAll: {\n type: Function as PropType<ActiveFilterChipsSlotProps[\"onClearAll\"]>,\n },\n },\n }\n);\n","import {\n type FilterTreeBuilderProps,\n FilterTreeChrome,\n type FilterTreeSlots,\n useFilterTreeModel,\n withProps,\n} from \"@adapttable/vue/adapter\";\nimport {\n type CollapseModelValue,\n ElCollapse,\n ElCollapseItem,\n ElFormItem,\n ElText,\n} from \"element-plus\";\nimport {\n createVNode,\n defineComponent,\n h,\n type SetupContext,\n type VNodeChild,\n} from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport ElementSelect from \"../controls/ElementSelect.vue\";\n\nconst controls: FilterTreeSlots<VNodeChild> = {\n Select: (control) =>\n h(\n ElFormItem,\n { class: control.fieldClassName, \"data-adapttable-part\": \"filter-field\" },\n {\n label: () =>\n h(\n ElText,\n {\n class: control.labelClassName,\n \"data-adapttable-part\": \"filter-label\",\n },\n { default: () => control.label }\n ),\n default: () =>\n h(ElementSelect, {\n value: control.value,\n options: control.options,\n class: control.className,\n \"aria-label\": control.label,\n \"data-adapttable-part\": control.part,\n onChange: control.onChange,\n }),\n }\n ),\n Input: (control) =>\n h(\n ElFormItem,\n { class: control.fieldClassName, \"data-adapttable-part\": \"filter-field\" },\n {\n label: () =>\n h(\n ElText,\n {\n class: control.labelClassName,\n \"data-adapttable-part\": \"filter-label\",\n },\n { default: () => control.label }\n ),\n default: () =>\n h(ElementInput, {\n value: control.value,\n type: control.type,\n class: control.className,\n \"aria-label\": control.label,\n \"data-adapttable-part\": \"filter-input\",\n onChange: control.onChange,\n }),\n }\n ),\n Button: (control) =>\n elementButton(\n {\n class: control.className,\n \"data-adapttable-part\": control.part,\n onClick: control.onClick,\n },\n control.label\n ),\n Disclosure: (control) =>\n h(\n ElCollapse,\n {\n modelValue: control.expanded ? [\"query\"] : [],\n class: control.className,\n \"data-adapttable-part\": \"filter-tree\",\n \"onUpdate:modelValue\": (value: CollapseModelValue) =>\n control.onExpandedChange(\n Array.isArray(value) && value.includes(\"query\")\n ),\n },\n {\n default: () =>\n h(\n ElCollapseItem,\n { name: \"query\" },\n {\n title: () =>\n h(\n ElText,\n {\n class: control.summaryClassName,\n \"data-adapttable-part\": \"filter-tree-summary\",\n },\n { default: () => control.label }\n ),\n default: () => control.children,\n }\n ),\n }\n ),\n};\n\nconst treeProps = {\n defs: null,\n source: null,\n labels: null,\n registry: null,\n classNames: null,\n defaultExpanded: { type: Boolean, default: undefined },\n} satisfies Record<keyof FilterTreeBuilderProps<unknown>, unknown>;\n\nconst ElementFilterTreePresentation = defineComponent(\n (props: FilterTreeBuilderProps<unknown>) => {\n const model = useFilterTreeModel(() => props);\n return () => FilterTreeChrome({ model: model.value, controls });\n },\n {\n name: \"ElementFilterTreePresentation\",\n props: treeProps,\n }\n);\n\n/** Preserve the canonical row contract without exposing versioned instance helpers. */\nexport const ElementFilterTree = /* @__PURE__ */ withProps(\n function ElementFilterTree<TRow>(\n props: FilterTreeBuilderProps<TRow>,\n context: Pick<SetupContext, \"attrs\">\n ) {\n return createVNode(ElementFilterTreePresentation, {\n ...context.attrs,\n ...props,\n });\n },\n treeProps\n);\n","import {\n FilterPanelChrome,\n type FilterPanelSlots,\n filterViewKey,\n type FilterWidget,\n filterWidgetComponent,\n useFeatureState,\n} from \"@adapttable/vue/adapter\";\nimport { ElIcon, ElTag } from \"element-plus\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\nimport { ElementFilterSurface } from \"./ElementFilterSurface\";\nimport { ElementFilterTree } from \"./ElementFilterTree\";\n\nfunction useElementFiltersPanel(props: {\n readonly widgets: readonly FilterWidget[];\n}) {\n const widgets = props.widgets;\n const names = useClassNames();\n const model = useFeatureState(filterViewKey<unknown>());\n const controls: FilterPanelSlots<unknown> = {\n Trigger: (control) =>\n elementButton(\n {\n ...control.attrs,\n ref: control.triggerRef,\n class: names.value.filtersButton,\n onPointerdown: control.onPointerDown,\n onClick: control.onClick,\n },\n [\n h(\n ElIcon,\n {\n \"data-adapttable-part\": \"filters-icon\",\n class: names.value.filtersIcon,\n \"aria-hidden\": \"true\",\n },\n {\n default: () =>\n h(\"svg\", { viewBox: \"0 0 24 24\", focusable: \"false\" }, [\n h(\"path\", {\n d: \"M3 4h18l-7 8v7l-4 2v-9z\",\n fill: \"none\",\n stroke: \"currentColor\",\n }),\n ]),\n }\n ),\n control.label,\n control.count\n ? h(\n ElTag,\n {\n \"data-adapttable-part\": \"filters-count\",\n class: names.value.filtersCount,\n size: \"small\",\n round: true,\n },\n { default: () => control.count }\n )\n : null,\n ]\n ),\n Button: (control) =>\n elementButton(\n {\n \"data-adapttable-part\": control.part,\n class: {\n \"filters-clear\": names.value.filtersClear,\n \"filters-close\": names.value.filtersClose,\n \"filters-done\": names.value.filtersDone,\n }[control.part],\n disabled: control.disabled,\n onClick: control.onClick,\n },\n control.label\n ),\n Field: (field) =>\n h(filterWidgetComponent(field.def, field.registry, widgets), {\n ...field,\n classNames: names.value,\n }),\n Tree: (tree) => h(ElementFilterTree, { ...tree, classNames: names.value }),\n Popover: (surface) => h(ElementFilterSurface, { ...surface, modal: false }),\n Drawer: (surface) =>\n h(ElementFilterSurface, {\n ...surface,\n modal: true,\n backdropClassName: names.value.filtersBackdrop,\n }),\n };\n return () =>\n model.value\n ? FilterPanelChrome({\n model: model.value,\n controls,\n classNames: names.value,\n })\n : null;\n}\n\nexport const ElementFiltersPanel = defineComponent({\n name: \"ElementFiltersPanel\",\n props: {\n /** The widgets the panel draws its fields with. */\n widgets: {\n type: Array as PropType<readonly FilterWidget[]>,\n required: true,\n },\n },\n setup: useElementFiltersPanel,\n});\n","import {\n booleanFieldPart,\n type DataTableClassNames,\n type FilterFieldOptions,\n type FilterFieldPart,\n type FilterWidget,\n multiSelectFieldPart,\n rangeFieldPart,\n selectFieldPart,\n textFieldPart,\n} from \"@adapttable/vue/adapter\";\nimport { type FunctionalComponent, h } from \"vue\";\n\nimport ElementBasicFilterField from \"./ElementBasicFilterField.vue\";\nimport ElementChecklistField from \"./ElementChecklistField.vue\";\n\n/** A field drawn by one shared field part. */\nfunction basicWidget(part: FilterFieldPart): FilterWidget {\n const render: FunctionalComponent<\n FilterFieldOptions<unknown> & { classNames?: DataTableClassNames }\n > = (props) =>\n h(ElementBasicFilterField<unknown>, { ...props, parts: [part] });\n return { kinds: part.kinds, render };\n}\n\nconst ChecklistField: FunctionalComponent<\n FilterFieldOptions<unknown> & { classNames?: DataTableClassNames }\n> = (props) => h(ElementChecklistField<unknown>, { ...props });\n\n/** The Element Plus text filter: its operator and its value. @public */\nexport const textFilterWidget = /* @__PURE__ */ basicWidget(textFieldPart);\n/** The Element Plus yes/no filter. @public */\nexport const booleanFilterWidget =\n /* @__PURE__ */ basicWidget(booleanFieldPart);\n/** The Element Plus single-choice filter. @public */\nexport const selectFilterWidget = /* @__PURE__ */ basicWidget(selectFieldPart);\n/** The Element Plus multiple-choice filter. @public */\nexport const multiSelectFilterWidget =\n /* @__PURE__ */ basicWidget(multiSelectFieldPart);\n/** The Element Plus searchable checklist filter. @public */\nexport const checklistFilterWidget: FilterWidget = {\n kinds: [\"checklist\"],\n render: ChecklistField,\n};\n/** The Element Plus operator-first number and date range filter. @public */\nexport const rangeFilterWidget = /* @__PURE__ */ basicWidget(rangeFieldPart);\n\n/** Every built-in widget: what the automatic filters form draws. */\nexport const FILTER_WIDGETS: readonly FilterWidget[] = [\n textFilterWidget,\n booleanFilterWidget,\n selectFilterWidget,\n multiSelectFilterWidget,\n checklistFilterWidget,\n rangeFilterWidget,\n];\n","import type { FilterDef, TableFeature } from \"@adapttable/vue\";\nimport {\n ACTIVE_FILTER_CHIPS,\n type AdapterFiltersFeature,\n extendFeature,\n FILTERS_PANEL,\n type FilterWidget,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport {\n filters as bindingFilters,\n type FiltersOptions,\n} from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { ElementFilterChips } from \"./filters/ElementFilterChips\";\nimport { ElementFiltersPanel } from \"./filters/ElementFiltersPanel\";\nimport { FILTER_WIDGETS } from \"./filters/widgets\";\n\n/**\n * Declarative filters whose fields are drawn with only the given widgets, so\n * the widgets a table never shows stay out of its bundle. A filter whose\n * widget is missing throws when its field draws.\n *\n * @param widgets - The widgets to draw fields with, such as `textFilterWidget`.\n *\n * @public\n */\nexport function filtersWith(\n widgets: readonly FilterWidget[]\n): AdapterFiltersFeature {\n return <TRow>(\n defs: readonly FilterDef<TRow>[] = [],\n options: FiltersOptions = {}\n ): TableFeature<TRow> =>\n extendFeature(bindingFilters(defs, options), [\n slotRender(FILTERS_PANEL, () => h(ElementFiltersPanel, { widgets })),\n slotRender(ACTIVE_FILTER_CHIPS, (props) =>\n h(ElementFilterChips, { ...props })\n ),\n ]);\n}\n\n/** Declarative filters with this kit's chip strip, panel and every widget. @public */\nexport const filters = /* @__PURE__ */ filtersWith(FILTER_WIDGETS);\n\nexport { ElementChecklistFilter as ChecklistFilter } from \"./filters/ElementChecklistFilter\";\nexport { default as FilterField } from \"./filters/ElementFilterField.vue\";\nexport { ElementFilterTree as FilterTreeBuilder } from \"./filters/ElementFilterTree\";\nexport {\n booleanFilterWidget,\n checklistFilterWidget,\n multiSelectFilterWidget,\n rangeFilterWidget,\n selectFilterWidget,\n textFilterWidget,\n} from \"./filters/widgets\";\nexport type { FilterDef, FilterOption, FilterTypeSpec } from \"@adapttable/vue\";\nexport type {\n AdapterFiltersFeature,\n FilterWidget,\n} from \"@adapttable/vue/adapter\";\nexport type {\n ChecklistFilterProps,\n FilterFieldOptions,\n FilterTreeBuilderProps,\n} from \"@adapttable/vue/adapter\";\nexport type { FiltersOptions } from \"@adapttable/vue/features\";\nexport { filterTypes } from \"@adapttable/vue/features\";\n"],"mappings":";;;;;;;;;;AASA,MAAa,qBAAqB,iBAC/B,UAAsC;CACrC,MAAM,QAAQ,cAAc;CAC5B,aACE,kBAAkB;EAChB,GAAG;EACH,YAAY,MAAM;EAClB,OAAO;GACL,SAAS,EAAE,YACT,cAAc;IAAE,GAAG;IAAO,MAAM;IAAM,MAAM;GAAQ,GAAG,GAAG;GAC5D,QAAQ,EAAE,OAAO,YACf,cAAc;IAAE,GAAG;IAAO,MAAM;IAAM,MAAM;GAAQ,GAAG,KAAK;EAChE;CACF,CAAC;AACL,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EAAE,MAAM,MAAuD;EACtE,QAAQ,EACN,MAAM,OACR;EACA,YAAY,EACV,MAAM,SACR;CACF;AACF,CACF;;;ACVA,MAAM,WAAwC;CAC5C,SAAS,YACP,EACE,YACA;EAAE,OAAO,QAAQ;EAAgB,wBAAwB;CAAe,GACxE;EACE,aACE,EACE,QACA;GACE,OAAO,QAAQ;GACf,wBAAwB;EAC1B,GACA,EAAE,eAAe,QAAQ,MAAM,CACjC;EACF,eACE,EAAEA,aAAe;GACf,OAAO,QAAQ;GACf,SAAS,QAAQ;GACjB,OAAO,QAAQ;GACf,cAAc,QAAQ;GACtB,wBAAwB,QAAQ;GAChC,UAAU,QAAQ;EACpB,CAAC;CACL,CACF;CACF,QAAQ,YACN,EACE,YACA;EAAE,OAAO,QAAQ;EAAgB,wBAAwB;CAAe,GACxE;EACE,aACE,EACE,QACA;GACE,OAAO,QAAQ;GACf,wBAAwB;EAC1B,GACA,EAAE,eAAe,QAAQ,MAAM,CACjC;EACF,eACE,EAAEC,WAAc;GACd,OAAO,QAAQ;GACf,MAAM,QAAQ;GACd,OAAO,QAAQ;GACf,cAAc,QAAQ;GACtB,wBAAwB;GACxB,UAAU,QAAQ;EACpB,CAAC;CACL,CACF;CACF,SA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OAAO,KAAK;EAAO;CAAO;AACrC;AAEA,MAAM,kBAED,UAAU,EAAEC,aAAgC,EAAE,GAAG,MAAM,CAAC;;AAG7D,MAAa,mBAAmC,4BAAY,aAAa;;AAEzE,MAAa,sBACK,4BAAY,gBAAgB;;AAE9C,MAAa,qBAAqC,4BAAY,eAAe;;AAE7E,MAAa,0BACK,4BAAY,oBAAoB;;AAElD,MAAa,wBAAsC;CACjD,OAAO,CAAC,WAAW;CACnB,QAAQ;AACV;;AAEA,MAAa,oBAAoC,4BAAY,cAAc;;AAG3E,MAAa,iBAA0C;CACrD;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;AC3BA,SAAgB,YACd,SACuB;CACvB,QACE,OAAmC,CAAC,GACpC,UAA0B,CAAC,MAE3B,cAAcC,QAAe,MAAM,OAAO,GAAG,CAC3C,WAAW,qBAAqB,EAAE,qBAAqB,EAAE,QAAQ,CAAC,CAAC,GACnE,WAAW,sBAAsB,UAC/B,EAAE,oBAAoB,EAAE,GAAG,MAAM,CAAC,CACpC,CACF,CAAC;AACL;;AAGA,MAAaC,YAA0B,4BAAY,cAAc"}
package/dist/filters.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_filters = require("./filters-CYQFsZ_f.cjs");
3
- const require_ElementFilterField = require("./ElementFilterField-Dfzy-Yk4.cjs");
2
+ const require_filters = require("./filters-B3GI0d_7.cjs");
3
+ const require_ElementFilterField = require("./ElementFilterField-BbwJTXvK.cjs");
4
4
  let _adapttable_vue_features = require("@adapttable/vue/features");
5
5
  exports.ChecklistFilter = require_ElementFilterField.ElementChecklistFilter;
6
6
  exports.FilterField = require_ElementFilterField._sfc_main;
package/dist/filters.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as checklistFilterWidget, c as selectFilterWidget, i as booleanFilterWidget, l as textFilterWidget, n as filters, o as multiSelectFilterWidget, r as filtersWith, s as rangeFilterWidget, t as filterTypes, u as ElementFilterTree } from "./filters-CIQ1uMZw.js";
2
- import { r as ElementChecklistFilter, t as _sfc_main } from "./ElementFilterField-C8EJjVB_.js";
1
+ import { a as checklistFilterWidget, c as selectFilterWidget, i as booleanFilterWidget, l as textFilterWidget, n as filters, o as multiSelectFilterWidget, r as filtersWith, s as rangeFilterWidget, t as filterTypes, u as ElementFilterTree } from "./filters-C5j2hjd3.js";
2
+ import { r as ElementChecklistFilter, t as _sfc_main } from "./ElementFilterField-N8tiYPGN.js";
3
3
  export { ElementChecklistFilter as ChecklistFilter, _sfc_main as FilterField, ElementFilterTree as FilterTreeBuilder, booleanFilterWidget, checklistFilterWidget, filterTypes, filters, filtersWith, multiSelectFilterWidget, rangeFilterWidget, selectFilterWidget, textFilterWidget };
@@ -1,4 +1,4 @@
1
- const require_button = require("./button-BFjBL9m3.cjs");
1
+ const require_button = require("./button-BuXbfKKx.cjs");
2
2
  const require_ElementInput = require("./ElementInput-BF97xXSC.cjs");
3
3
  let vue = require("vue");
4
4
  let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
@@ -58,4 +58,4 @@ Object.defineProperty(exports, "findInTable", {
58
58
  }
59
59
  });
60
60
 
61
- //# sourceMappingURL=find-in-table-WtXzIkkg.cjs.map
61
+ //# sourceMappingURL=find-in-table-Bn5eTjXM.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"find-in-table-WtXzIkkg.cjs","names":["defineComponent","useClassNames","FindBarChrome","h","ElementInput","elementButton","extendFeature","bindingFindInTable","slotRender","FIND_BAR","h","FIND_BUTTON","elementButton"],"sources":["../src/navigation/ElementFindBar.ts","../src/find-in-table.ts"],"sourcesContent":["import { FindBarChrome, type FindBarProps } from \"@adapttable/vue/adapter\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\n\nexport const ElementFindBar = defineComponent(\n (props: FindBarProps) => {\n const names = useClassNames();\n return () =>\n FindBarChrome({\n ...props,\n slots: {\n Search: (control) =>\n h(ElementInput, {\n type: \"search\",\n value: control.value,\n \"aria-label\": control.label,\n placeholder: control.placeholder,\n class: [\n \"adapttable-element-plus-find-input\",\n names.value.findInput,\n ],\n \"data-adapttable-part\": \"find-input\",\n inputRef: control.focusRef,\n onChange: control.onChange,\n onKeydown: control.onKeyDown,\n }),\n Button: (control) =>\n elementButton(\n {\n type: \"button\",\n \"aria-label\": control.label,\n \"data-adapttable-part\": control.part,\n class: names.value.findButton,\n disabled: control.disabled,\n onClick: control.onClick,\n },\n control.label\n ),\n },\n });\n },\n {\n name: \"ElementFindBar\",\n props: {\n find: { type: Object as PropType<FindBarProps[\"find\"]> },\n labels: { type: Object as PropType<FindBarProps[\"labels\"]> },\n className: { type: String as PropType<FindBarProps[\"className\"]> },\n },\n }\n);\n","import type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n extendFeature,\n FIND_BAR,\n FIND_BUTTON,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { findInTable as bindingFindInTable } from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"./controls/button\";\nimport { ElementFindBar } from \"./navigation/ElementFindBar\";\n\n/** Find the prepared table rows, with an optional Element Plus toolbar button. */\nexport function findInTable(\n options: { readonly button?: boolean } = {}\n): StaticTableFeature {\n return extendFeature(bindingFindInTable(), [\n slotRender(FIND_BAR, (props) => h(ElementFindBar, props)),\n ...(options.button\n ? [\n slotRender(FIND_BUTTON, (control) =>\n elementButton(\n {\n type: \"button\",\n \"aria-label\": control.label,\n \"data-adapttable-part\": \"find-button\",\n class: control.className,\n onClick: control.onClick,\n },\n control.label\n )\n ),\n ]\n : []),\n ]);\n}\n"],"mappings":";;;;;;AAOA,MAAa,kBAAA,GAAiBA,IAAAA,gBAAAA,EAC3B,UAAwB;CACvB,MAAM,SAAA,GAAQC,wBAAAA,uBAAAA,CAAc;CAC5B,cAAA,GACEC,wBAAAA,cAAAA,CAAc;EACZ,GAAG;EACH,OAAO;GACL,SAAS,aAAA,GACPC,IAAAA,EAAAA,CAAEC,qBAAAA,WAAc;IACd,MAAM;IACN,OAAO,QAAQ;IACf,cAAc,QAAQ;IACtB,aAAa,QAAQ;IACrB,OAAO,CACL,sCACA,MAAM,MAAM,SACd;IACA,wBAAwB;IACxB,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,WAAW,QAAQ;GACrB,CAAC;GACH,SAAS,YACPC,eAAAA,cACE;IACE,MAAM;IACN,cAAc,QAAQ;IACtB,wBAAwB,QAAQ;IAChC,OAAO,MAAM,MAAM;IACnB,UAAU,QAAQ;IAClB,SAAS,QAAQ;GACnB,GACA,QAAQ,KACV;EACJ;CACF,CAAC;AACL,GACA;CACE,MAAM;CACN,OAAO;EACL,MAAM,EAAE,MAAM,OAAyC;EACvD,QAAQ,EAAE,MAAM,OAA2C;EAC3D,WAAW,EAAE,MAAM,OAA8C;CACnE;AACF,CACF;;;;ACtCA,SAAgB,YACd,UAAyC,CAAC,GACtB;CACpB,QAAA,GAAOC,wBAAAA,cAAAA,EAAAA,GAAcC,yBAAAA,YAAAA,CAAmB,GAAG,EAAA,GACzCC,wBAAAA,WAAAA,CAAWC,wBAAAA,WAAW,WAAA,GAAUC,IAAAA,EAAAA,CAAE,gBAAgB,KAAK,CAAC,GACxD,GAAI,QAAQ,SACR,EAAA,GACEF,wBAAAA,WAAAA,CAAWG,wBAAAA,cAAc,YACvBC,eAAAA,cACE;EACE,MAAM;EACN,cAAc,QAAQ;EACtB,wBAAwB;EACxB,OAAO,QAAQ;EACf,SAAS,QAAQ;CACnB,GACA,QAAQ,KACV,CACF,CACF,IACA,CAAC,CACP,CAAC;AACH"}
1
+ {"version":3,"file":"find-in-table-Bn5eTjXM.cjs","names":["defineComponent","useClassNames","FindBarChrome","h","ElementInput","elementButton","extendFeature","bindingFindInTable","slotRender","FIND_BAR","h","FIND_BUTTON","elementButton"],"sources":["../src/navigation/ElementFindBar.ts","../src/find-in-table.ts"],"sourcesContent":["import { FindBarChrome, type FindBarProps } from \"@adapttable/vue/adapter\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\n\nexport const ElementFindBar = defineComponent(\n (props: FindBarProps) => {\n const names = useClassNames();\n return () =>\n FindBarChrome({\n ...props,\n slots: {\n Search: (control) =>\n h(ElementInput, {\n type: \"search\",\n value: control.value,\n \"aria-label\": control.label,\n placeholder: control.placeholder,\n class: [\n \"adapttable-element-plus-find-input\",\n names.value.findInput,\n ],\n \"data-adapttable-part\": \"find-input\",\n inputRef: control.focusRef,\n onChange: control.onChange,\n onKeydown: control.onKeyDown,\n }),\n Button: (control) =>\n elementButton(\n {\n type: \"button\",\n \"aria-label\": control.label,\n \"data-adapttable-part\": control.part,\n class: names.value.findButton,\n disabled: control.disabled,\n onClick: control.onClick,\n },\n control.label\n ),\n },\n });\n },\n {\n name: \"ElementFindBar\",\n props: {\n find: { type: Object as PropType<FindBarProps[\"find\"]> },\n labels: { type: Object as PropType<FindBarProps[\"labels\"]> },\n className: { type: String as PropType<FindBarProps[\"className\"]> },\n },\n }\n);\n","import type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n extendFeature,\n FIND_BAR,\n FIND_BUTTON,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { findInTable as bindingFindInTable } from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"./controls/button\";\nimport { ElementFindBar } from \"./navigation/ElementFindBar\";\n\n/** Find the prepared table rows, with an optional Element Plus toolbar button. */\nexport function findInTable(\n options: { readonly button?: boolean } = {}\n): StaticTableFeature {\n return extendFeature(bindingFindInTable(), [\n slotRender(FIND_BAR, (props) => h(ElementFindBar, props)),\n ...(options.button\n ? [\n slotRender(FIND_BUTTON, (control) =>\n elementButton(\n {\n type: \"button\",\n \"aria-label\": control.label,\n \"data-adapttable-part\": \"find-button\",\n class: control.className,\n onClick: control.onClick,\n },\n control.label\n )\n ),\n ]\n : []),\n ]);\n}\n"],"mappings":";;;;;;AAOA,MAAa,kBAAA,GAAiBA,IAAAA,gBAAAA,EAC3B,UAAwB;CACvB,MAAM,SAAA,GAAQC,wBAAAA,uBAAAA,CAAc;CAC5B,cAAA,GACEC,wBAAAA,cAAAA,CAAc;EACZ,GAAG;EACH,OAAO;GACL,SAAS,aAAA,GACPC,IAAAA,EAAAA,CAAEC,qBAAAA,WAAc;IACd,MAAM;IACN,OAAO,QAAQ;IACf,cAAc,QAAQ;IACtB,aAAa,QAAQ;IACrB,OAAO,CACL,sCACA,MAAM,MAAM,SACd;IACA,wBAAwB;IACxB,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,WAAW,QAAQ;GACrB,CAAC;GACH,SAAS,YACPC,eAAAA,cACE;IACE,MAAM;IACN,cAAc,QAAQ;IACtB,wBAAwB,QAAQ;IAChC,OAAO,MAAM,MAAM;IACnB,UAAU,QAAQ;IAClB,SAAS,QAAQ;GACnB,GACA,QAAQ,KACV;EACJ;CACF,CAAC;AACL,GACA;CACE,MAAM;CACN,OAAO;EACL,MAAM,EAAE,MAAM,OAAyC;EACvD,QAAQ,EAAE,MAAM,OAA2C;EAC3D,WAAW,EAAE,MAAM,OAA8C;CACnE;AACF,CACF;;;;ACtCA,SAAgB,YACd,UAAyC,CAAC,GACtB;CACpB,QAAA,GAAOC,wBAAAA,cAAAA,EAAAA,GAAcC,yBAAAA,YAAAA,CAAmB,GAAG,EAAA,GACzCC,wBAAAA,WAAAA,CAAWC,wBAAAA,WAAW,WAAA,GAAUC,IAAAA,EAAAA,CAAE,gBAAgB,KAAK,CAAC,GACxD,GAAI,QAAQ,SACR,EAAA,GACEF,wBAAAA,WAAAA,CAAWG,wBAAAA,cAAc,YACvBC,eAAAA,cACE;EACE,MAAM;EACN,cAAc,QAAQ;EACtB,wBAAwB;EACxB,OAAO,QAAQ;EACf,SAAS,QAAQ;CACnB,GACA,QAAQ,KACV,CACF,CACF,IACA,CAAC,CACP,CAAC;AACH"}
@@ -1,5 +1,5 @@
1
1
  import { n as useClassNames } from "./classNamesContext-18Wbxy4F.js";
2
- import { t as elementButton } from "./button-DwB4UxI2.js";
2
+ import { t as elementButton } from "./button-DUddRulx.js";
3
3
  import { t as _sfc_main } from "./ElementInput-Cn9hpa9j.js";
4
4
  import { defineComponent, h } from "vue";
5
5
  import { FIND_BAR, FIND_BUTTON, FindBarChrome, extendFeature, slotRender } from "@adapttable/vue/adapter";
@@ -54,4 +54,4 @@ function findInTable$1(options = {}) {
54
54
  //#endregion
55
55
  export { findInTable$1 as t };
56
56
 
57
- //# sourceMappingURL=find-in-table-B9ySCCJh.js.map
57
+ //# sourceMappingURL=find-in-table-oPAJgCGy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"find-in-table-B9ySCCJh.js","names":["ElementInput","findInTable","bindingFindInTable"],"sources":["../src/navigation/ElementFindBar.ts","../src/find-in-table.ts"],"sourcesContent":["import { FindBarChrome, type FindBarProps } from \"@adapttable/vue/adapter\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\n\nexport const ElementFindBar = defineComponent(\n (props: FindBarProps) => {\n const names = useClassNames();\n return () =>\n FindBarChrome({\n ...props,\n slots: {\n Search: (control) =>\n h(ElementInput, {\n type: \"search\",\n value: control.value,\n \"aria-label\": control.label,\n placeholder: control.placeholder,\n class: [\n \"adapttable-element-plus-find-input\",\n names.value.findInput,\n ],\n \"data-adapttable-part\": \"find-input\",\n inputRef: control.focusRef,\n onChange: control.onChange,\n onKeydown: control.onKeyDown,\n }),\n Button: (control) =>\n elementButton(\n {\n type: \"button\",\n \"aria-label\": control.label,\n \"data-adapttable-part\": control.part,\n class: names.value.findButton,\n disabled: control.disabled,\n onClick: control.onClick,\n },\n control.label\n ),\n },\n });\n },\n {\n name: \"ElementFindBar\",\n props: {\n find: { type: Object as PropType<FindBarProps[\"find\"]> },\n labels: { type: Object as PropType<FindBarProps[\"labels\"]> },\n className: { type: String as PropType<FindBarProps[\"className\"]> },\n },\n }\n);\n","import type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n extendFeature,\n FIND_BAR,\n FIND_BUTTON,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { findInTable as bindingFindInTable } from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"./controls/button\";\nimport { ElementFindBar } from \"./navigation/ElementFindBar\";\n\n/** Find the prepared table rows, with an optional Element Plus toolbar button. */\nexport function findInTable(\n options: { readonly button?: boolean } = {}\n): StaticTableFeature {\n return extendFeature(bindingFindInTable(), [\n slotRender(FIND_BAR, (props) => h(ElementFindBar, props)),\n ...(options.button\n ? [\n slotRender(FIND_BUTTON, (control) =>\n elementButton(\n {\n type: \"button\",\n \"aria-label\": control.label,\n \"data-adapttable-part\": \"find-button\",\n class: control.className,\n onClick: control.onClick,\n },\n control.label\n )\n ),\n ]\n : []),\n ]);\n}\n"],"mappings":";;;;;;;AAOA,MAAa,iBAAiB,iBAC3B,UAAwB;CACvB,MAAM,QAAQ,cAAc;CAC5B,aACE,cAAc;EACZ,GAAG;EACH,OAAO;GACL,SAAS,YACP,EAAEA,WAAc;IACd,MAAM;IACN,OAAO,QAAQ;IACf,cAAc,QAAQ;IACtB,aAAa,QAAQ;IACrB,OAAO,CACL,sCACA,MAAM,MAAM,SACd;IACA,wBAAwB;IACxB,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,WAAW,QAAQ;GACrB,CAAC;GACH,SAAS,YACP,cACE;IACE,MAAM;IACN,cAAc,QAAQ;IACtB,wBAAwB,QAAQ;IAChC,OAAO,MAAM,MAAM;IACnB,UAAU,QAAQ;IAClB,SAAS,QAAQ;GACnB,GACA,QAAQ,KACV;EACJ;CACF,CAAC;AACL,GACA;CACE,MAAM;CACN,OAAO;EACL,MAAM,EAAE,MAAM,OAAyC;EACvD,QAAQ,EAAE,MAAM,OAA2C;EAC3D,WAAW,EAAE,MAAM,OAA8C;CACnE;AACF,CACF;;;;ACtCA,SAAgBC,cACd,UAAyC,CAAC,GACtB;CACpB,OAAO,cAAcC,YAAmB,GAAG,CACzC,WAAW,WAAW,UAAU,EAAE,gBAAgB,KAAK,CAAC,GACxD,GAAI,QAAQ,SACR,CACE,WAAW,cAAc,YACvB,cACE;EACE,MAAM;EACN,cAAc,QAAQ;EACtB,wBAAwB;EACxB,OAAO,QAAQ;EACf,SAAS,QAAQ;CACnB,GACA,QAAQ,KACV,CACF,CACF,IACA,CAAC,CACP,CAAC;AACH"}
1
+ {"version":3,"file":"find-in-table-oPAJgCGy.js","names":["ElementInput","findInTable","bindingFindInTable"],"sources":["../src/navigation/ElementFindBar.ts","../src/find-in-table.ts"],"sourcesContent":["import { FindBarChrome, type FindBarProps } from \"@adapttable/vue/adapter\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\n\nexport const ElementFindBar = defineComponent(\n (props: FindBarProps) => {\n const names = useClassNames();\n return () =>\n FindBarChrome({\n ...props,\n slots: {\n Search: (control) =>\n h(ElementInput, {\n type: \"search\",\n value: control.value,\n \"aria-label\": control.label,\n placeholder: control.placeholder,\n class: [\n \"adapttable-element-plus-find-input\",\n names.value.findInput,\n ],\n \"data-adapttable-part\": \"find-input\",\n inputRef: control.focusRef,\n onChange: control.onChange,\n onKeydown: control.onKeyDown,\n }),\n Button: (control) =>\n elementButton(\n {\n type: \"button\",\n \"aria-label\": control.label,\n \"data-adapttable-part\": control.part,\n class: names.value.findButton,\n disabled: control.disabled,\n onClick: control.onClick,\n },\n control.label\n ),\n },\n });\n },\n {\n name: \"ElementFindBar\",\n props: {\n find: { type: Object as PropType<FindBarProps[\"find\"]> },\n labels: { type: Object as PropType<FindBarProps[\"labels\"]> },\n className: { type: String as PropType<FindBarProps[\"className\"]> },\n },\n }\n);\n","import type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n extendFeature,\n FIND_BAR,\n FIND_BUTTON,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { findInTable as bindingFindInTable } from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"./controls/button\";\nimport { ElementFindBar } from \"./navigation/ElementFindBar\";\n\n/** Find the prepared table rows, with an optional Element Plus toolbar button. */\nexport function findInTable(\n options: { readonly button?: boolean } = {}\n): StaticTableFeature {\n return extendFeature(bindingFindInTable(), [\n slotRender(FIND_BAR, (props) => h(ElementFindBar, props)),\n ...(options.button\n ? [\n slotRender(FIND_BUTTON, (control) =>\n elementButton(\n {\n type: \"button\",\n \"aria-label\": control.label,\n \"data-adapttable-part\": \"find-button\",\n class: control.className,\n onClick: control.onClick,\n },\n control.label\n )\n ),\n ]\n : []),\n ]);\n}\n"],"mappings":";;;;;;;AAOA,MAAa,iBAAiB,iBAC3B,UAAwB;CACvB,MAAM,QAAQ,cAAc;CAC5B,aACE,cAAc;EACZ,GAAG;EACH,OAAO;GACL,SAAS,YACP,EAAEA,WAAc;IACd,MAAM;IACN,OAAO,QAAQ;IACf,cAAc,QAAQ;IACtB,aAAa,QAAQ;IACrB,OAAO,CACL,sCACA,MAAM,MAAM,SACd;IACA,wBAAwB;IACxB,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,WAAW,QAAQ;GACrB,CAAC;GACH,SAAS,YACP,cACE;IACE,MAAM;IACN,cAAc,QAAQ;IACtB,wBAAwB,QAAQ;IAChC,OAAO,MAAM,MAAM;IACnB,UAAU,QAAQ;IAClB,SAAS,QAAQ;GACnB,GACA,QAAQ,KACV;EACJ;CACF,CAAC;AACL,GACA;CACE,MAAM;CACN,OAAO;EACL,MAAM,EAAE,MAAM,OAAyC;EACvD,QAAQ,EAAE,MAAM,OAA2C;EAC3D,WAAW,EAAE,MAAM,OAA8C;CACnE;AACF,CACF;;;;ACtCA,SAAgBC,cACd,UAAyC,CAAC,GACtB;CACpB,OAAO,cAAcC,YAAmB,GAAG,CACzC,WAAW,WAAW,UAAU,EAAE,gBAAgB,KAAK,CAAC,GACxD,GAAI,QAAQ,SACR,CACE,WAAW,cAAc,YACvB,cACE;EACE,MAAM;EACN,cAAc,QAAQ;EACtB,wBAAwB;EACxB,OAAO,QAAQ;EACf,SAAS,QAAQ;CACnB,GACA,QAAQ,KACV,CACF,CACF,IACA,CAAC,CACP,CAAC;AACH"}
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_find_in_table = require("./find-in-table-WtXzIkkg.cjs");
2
+ const require_find_in_table = require("./find-in-table-Bn5eTjXM.cjs");
3
3
  exports.findInTable = require_find_in_table.findInTable;
@@ -1,2 +1,2 @@
1
- import { t as findInTable } from "./find-in-table-B9ySCCJh.js";
1
+ import { t as findInTable } from "./find-in-table-oPAJgCGy.js";
2
2
  export { findInTable };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_button = require("./button-BFjBL9m3.cjs");
2
+ const require_button = require("./button-BuXbfKKx.cjs");
3
3
  let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
4
4
  let _adapttable_vue_features = require("@adapttable/vue/features");
5
5
  //#region src/fullscreen.ts
@@ -1,4 +1,4 @@
1
- import { t as elementButton } from "./button-DwB4UxI2.js";
1
+ import { t as elementButton } from "./button-DUddRulx.js";
2
2
  import { FULLSCREEN_CONTROL, FullscreenButtonChrome, extendFeature, slotRender } from "@adapttable/vue/adapter";
3
3
  import { fullscreen as fullscreen$1 } from "@adapttable/vue/features";
4
4
  //#region src/fullscreen.ts
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_button = require("./button-BFjBL9m3.cjs");
2
+ const require_button = require("./button-BuXbfKKx.cjs");
3
3
  const require_ElementCheckbox = require("./ElementCheckbox-BXSH2jHY.cjs");
4
4
  const require_ElementSelect = require("./ElementSelect-1UwtGCCr.cjs");
5
- const require_ElementCard = require("./ElementCard-BRZekaHr.cjs");
5
+ const require_ElementCard = require("./ElementCard-DQpWVv24.cjs");
6
6
  const require_grouping = require("./grouping.cjs");
7
7
  let vue = require("vue");
8
8
  let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
@@ -1,8 +1,8 @@
1
1
  import { n as useClassNames } from "./classNamesContext-18Wbxy4F.js";
2
- import { t as elementButton } from "./button-DwB4UxI2.js";
2
+ import { t as elementButton } from "./button-DUddRulx.js";
3
3
  import { t as _sfc_main$1 } from "./ElementCheckbox-DobrxadY.js";
4
4
  import { t as _sfc_main$2 } from "./ElementSelect-BxFmnPpv.js";
5
- import { t as ElementCard } from "./ElementCard-DZdAU6x8.js";
5
+ import { t as ElementCard } from "./ElementCard-czqeWAnk.js";
6
6
  import { grouping as grouping$1 } from "./grouping.js";
7
7
  import { createBlock, defineComponent, h, openBlock } from "vue";
8
8
  import { GroupingPanelChrome, extendFeature, groupingPanelControlKey, slotRender, toVueAttrs } from "@adapttable/vue/adapter";
package/dist/grouping.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_button = require("./button-BFjBL9m3.cjs");
3
- const require_checkbox = require("./checkbox-BF19iMgI.cjs");
2
+ const require_button = require("./button-BuXbfKKx.cjs");
3
+ const require_checkbox = require("./checkbox-DRhRrexK.cjs");
4
4
  let vue = require("vue");
5
5
  let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
6
6
  let _adapttable_vue_features = require("@adapttable/vue/features");
package/dist/grouping.js CHANGED
@@ -1,5 +1,5 @@
1
- import { t as elementButton } from "./button-DwB4UxI2.js";
2
- import { n as elementSelectionCheckbox, t as ELEMENT_GROUP_ROW } from "./elementHierarchyControlSlots-21LL1wEw.js";
1
+ import { t as elementButton } from "./button-DUddRulx.js";
2
+ import { n as elementSelectionCheckbox, t as ELEMENT_GROUP_ROW } from "./elementHierarchyControlSlots-CBz7cgOw.js";
3
3
  import { h } from "vue";
4
4
  import { GroupRowChrome, extendFeature, slotRender } from "@adapttable/vue/adapter";
5
5
  import { grouping as grouping$1 } from "@adapttable/vue/features";