@adapttable/element-plus 0.6.1 → 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.
- package/dist/{ElementCard-BRZekaHr.cjs → ElementCard-DQpWVv24.cjs} +2 -2
- package/dist/{ElementCard-BRZekaHr.cjs.map → ElementCard-DQpWVv24.cjs.map} +1 -1
- package/dist/{ElementCard-DZdAU6x8.js → ElementCard-czqeWAnk.js} +2 -2
- package/dist/{ElementCard-DZdAU6x8.js.map → ElementCard-czqeWAnk.js.map} +1 -1
- package/dist/{ElementColumnMenuPanel-Ddh01A17.cjs → ElementColumnMenuPanel-BfFgrSEJ.cjs} +3 -3
- package/dist/{ElementColumnMenuPanel-Ddh01A17.cjs.map → ElementColumnMenuPanel-BfFgrSEJ.cjs.map} +1 -1
- package/dist/{ElementColumnMenuPanel-CPW4wU3M.js → ElementColumnMenuPanel-Nkilw7G4.js} +3 -3
- package/dist/{ElementColumnMenuPanel-CPW4wU3M.js.map → ElementColumnMenuPanel-Nkilw7G4.js.map} +1 -1
- package/dist/{ElementFilterField-Dfzy-Yk4.cjs → ElementFilterField-BbwJTXvK.cjs} +2 -2
- package/dist/{ElementFilterField-Dfzy-Yk4.cjs.map → ElementFilterField-BbwJTXvK.cjs.map} +1 -1
- package/dist/{ElementFilterField-C8EJjVB_.js → ElementFilterField-N8tiYPGN.js} +2 -2
- package/dist/{ElementFilterField-C8EJjVB_.js.map → ElementFilterField-N8tiYPGN.js.map} +1 -1
- package/dist/{ElementFilterHeaderRow-DGp4Wrts.js → ElementFilterHeaderRow-BVo9WSuR.js} +2 -2
- package/dist/{ElementFilterHeaderRow-DGp4Wrts.js.map → ElementFilterHeaderRow-BVo9WSuR.js.map} +1 -1
- package/dist/{ElementFilterHeaderRow-D8ZZ3BOH.cjs → ElementFilterHeaderRow-D22VL0F8.cjs} +2 -2
- package/dist/{ElementFilterHeaderRow-D8ZZ3BOH.cjs.map → ElementFilterHeaderRow-D22VL0F8.cjs.map} +1 -1
- package/dist/{ElementRowActions-CUdXemC-.js → ElementRowActions-Djhrf9rm.js} +2 -2
- package/dist/{ElementRowActions-CUdXemC-.js.map → ElementRowActions-Djhrf9rm.js.map} +1 -1
- package/dist/{ElementRowActions-XyX2PAWL.cjs → ElementRowActions-DzAA3wSa.cjs} +2 -2
- package/dist/{ElementRowActions-XyX2PAWL.cjs.map → ElementRowActions-DzAA3wSa.cjs.map} +1 -1
- package/dist/assistant.cjs +2 -2
- package/dist/assistant.js +2 -2
- package/dist/batch-editing.cjs +1 -1
- package/dist/batch-editing.js +1 -1
- package/dist/bulk-actions.cjs +1 -1
- package/dist/bulk-actions.js +1 -1
- package/dist/{button-BFjBL9m3.cjs → button-BuXbfKKx.cjs} +3 -2
- package/dist/button-BuXbfKKx.cjs.map +1 -0
- package/dist/{button-DwB4UxI2.js → button-DUddRulx.js} +3 -2
- package/dist/button-DUddRulx.js.map +1 -0
- package/dist/{checkbox-BF19iMgI.cjs → checkbox-DRhRrexK.cjs} +2 -2
- package/dist/{checkbox-BF19iMgI.cjs.map → checkbox-DRhRrexK.cjs.map} +1 -1
- package/dist/column-layout.cjs +1 -1
- package/dist/column-layout.js +1 -1
- package/dist/{column-menu-CwTWnahc.js → column-menu-DaOcmA45.js} +33 -13
- package/dist/column-menu-DaOcmA45.js.map +1 -0
- package/dist/{column-menu-CqyYtohz.cjs → column-menu-eS7ylKfB.cjs} +33 -13
- package/dist/column-menu-eS7ylKfB.cjs.map +1 -0
- package/dist/column-menu.cjs +1 -1
- package/dist/column-menu.js +1 -1
- package/dist/command-palette.cjs +1 -1
- package/dist/command-palette.js +1 -1
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/{editing-CSqZENeW.cjs → editing-Bal8jOJT.cjs} +2 -2
- package/dist/{editing-CSqZENeW.cjs.map → editing-Bal8jOJT.cjs.map} +1 -1
- package/dist/{editing-BlpYR839.js → editing-BgWyfVFS.js} +2 -2
- package/dist/{editing-BlpYR839.js.map → editing-BgWyfVFS.js.map} +1 -1
- package/dist/editing.cjs +1 -1
- package/dist/editing.js +1 -1
- package/dist/{elementActionSlots-CbKE3WnM.js → elementActionSlots-BOdXhb05.js} +2 -2
- package/dist/{elementActionSlots-CbKE3WnM.js.map → elementActionSlots-BOdXhb05.js.map} +1 -1
- package/dist/{elementActionSlots-DlhU82H7.cjs → elementActionSlots-WeXIVVnx.cjs} +2 -2
- package/dist/{elementActionSlots-DlhU82H7.cjs.map → elementActionSlots-WeXIVVnx.cjs.map} +1 -1
- package/dist/{elementHierarchyControlSlots-21LL1wEw.js → elementHierarchyControlSlots-CBz7cgOw.js} +2 -2
- package/dist/{elementHierarchyControlSlots-21LL1wEw.js.map → elementHierarchyControlSlots-CBz7cgOw.js.map} +1 -1
- package/dist/{elementRemainingControls-DvVVLXE0.cjs → elementRemainingControls-CvGiKtfz.cjs} +3 -3
- package/dist/{elementRemainingControls-DvVVLXE0.cjs.map → elementRemainingControls-CvGiKtfz.cjs.map} +1 -1
- package/dist/{elementRemainingControls-6tN9tgWx.js → elementRemainingControls-J7eDWROX.js} +3 -3
- package/dist/{elementRemainingControls-6tN9tgWx.js.map → elementRemainingControls-J7eDWROX.js.map} +1 -1
- package/dist/{export-x-Ow8SY5.cjs → export-Cln4twUm.cjs} +2 -2
- package/dist/{export-x-Ow8SY5.cjs.map → export-Cln4twUm.cjs.map} +1 -1
- package/dist/{export-kuOvIoQg.js → export-DMEVONO6.js} +2 -2
- package/dist/{export-kuOvIoQg.js.map → export-DMEVONO6.js.map} +1 -1
- package/dist/export-pdf.cjs +1 -1
- package/dist/export-pdf.js +1 -1
- package/dist/export-xlsx.cjs +1 -1
- package/dist/export-xlsx.js +1 -1
- package/dist/export.cjs +1 -1
- package/dist/export.js +1 -1
- package/dist/filtering.cjs +2 -2
- package/dist/filtering.js +2 -2
- package/dist/{filters-CYQFsZ_f.cjs → filters-B3GI0d_7.cjs} +3 -3
- package/dist/{filters-CYQFsZ_f.cjs.map → filters-B3GI0d_7.cjs.map} +1 -1
- package/dist/{filters-CIQ1uMZw.js → filters-C5j2hjd3.js} +3 -3
- package/dist/{filters-CIQ1uMZw.js.map → filters-C5j2hjd3.js.map} +1 -1
- package/dist/filters.cjs +2 -2
- package/dist/filters.js +2 -2
- package/dist/{find-in-table-WtXzIkkg.cjs → find-in-table-Bn5eTjXM.cjs} +2 -2
- package/dist/{find-in-table-WtXzIkkg.cjs.map → find-in-table-Bn5eTjXM.cjs.map} +1 -1
- package/dist/{find-in-table-B9ySCCJh.js → find-in-table-oPAJgCGy.js} +2 -2
- package/dist/{find-in-table-B9ySCCJh.js.map → find-in-table-oPAJgCGy.js.map} +1 -1
- package/dist/find-in-table.cjs +1 -1
- package/dist/find-in-table.js +1 -1
- package/dist/fullscreen.cjs +1 -1
- package/dist/fullscreen.js +1 -1
- package/dist/grouping-panel.cjs +2 -2
- package/dist/grouping-panel.js +2 -2
- package/dist/grouping.cjs +2 -2
- package/dist/grouping.js +2 -2
- package/dist/{header-filters-COkO6tD4.cjs → header-filters-D7475LRH.cjs} +3 -3
- package/dist/{header-filters-COkO6tD4.cjs.map → header-filters-D7475LRH.cjs.map} +1 -1
- package/dist/{header-filters-B2veND8x.js → header-filters-s7nFkTHe.js} +3 -3
- package/dist/{header-filters-B2veND8x.js.map → header-filters-s7nFkTHe.js.map} +1 -1
- package/dist/header-filters.cjs +2 -2
- package/dist/header-filters.js +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/dist/pivot.cjs +1 -1
- package/dist/pivot.js +1 -1
- package/dist/preset.cjs +6 -6
- package/dist/preset.js +6 -6
- package/dist/print.cjs +1 -1
- package/dist/print.js +1 -1
- package/dist/row-actions.cjs +1 -1
- package/dist/row-actions.js +1 -1
- package/dist/row-pinning.cjs +1 -1
- package/dist/row-pinning.js +1 -1
- package/dist/row-reorder.cjs +1 -1
- package/dist/row-reorder.js +1 -1
- package/dist/{saved-views-luZVHu3w.cjs → saved-views-BdoXhuyE.cjs} +4 -4
- package/dist/{saved-views-luZVHu3w.cjs.map → saved-views-BdoXhuyE.cjs.map} +1 -1
- package/dist/{saved-views-DDo4Bl-f.js → saved-views-DAkqlIlo.js} +4 -4
- package/dist/{saved-views-DDo4Bl-f.js.map → saved-views-DAkqlIlo.js.map} +1 -1
- package/dist/saved-views.cjs +1 -1
- package/dist/saved-views.js +1 -1
- package/dist/side-panel.cjs +1 -1
- package/dist/side-panel.js +1 -1
- package/dist/{withElementExport-B97s6RIr.js → withElementExport-CX-S76EV.js} +3 -3
- package/dist/{withElementExport-B97s6RIr.js.map → withElementExport-CX-S76EV.js.map} +1 -1
- package/dist/{withElementExport-J-6vXfL9.cjs → withElementExport-CmkGvvZT.cjs} +3 -3
- package/dist/{withElementExport-J-6vXfL9.cjs.map → withElementExport-CmkGvvZT.cjs.map} +1 -1
- package/package.json +2 -2
- package/dist/button-BFjBL9m3.cjs.map +0 -1
- package/dist/button-DwB4UxI2.js.map +0 -1
- package/dist/column-menu-CqyYtohz.cjs.map +0 -1
- package/dist/column-menu-CwTWnahc.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_button = require("./button-
|
|
2
|
-
const require_ElementFilterField = require("./ElementFilterField-
|
|
1
|
+
const require_button = require("./button-BuXbfKKx.cjs");
|
|
2
|
+
const require_ElementFilterField = require("./ElementFilterField-BbwJTXvK.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
|
|
5
5
|
let _adapttable_vue_features = require("@adapttable/vue/features");
|
|
@@ -77,4 +77,4 @@ Object.defineProperty(exports, "headerFilters", {
|
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
|
|
80
|
-
//# sourceMappingURL=header-filters-
|
|
80
|
+
//# sourceMappingURL=header-filters-D7475LRH.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header-filters-
|
|
1
|
+
{"version":3,"file":"header-filters-D7475LRH.cjs","names":["extendFeature","bindingHeaderFilters","slotRender","headerFilterSlotKey","h","ElementHeaderFilter"],"sources":["../src/filters/ElementHeaderFilter.vue","../src/header-filters.ts"],"sourcesContent":["<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n HeaderFilterChrome,\n type HeaderFilterChromeSlots,\n type HeaderFilterOptions,\n mergeVueAttrs,\n useHeaderFilter,\n} from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\nimport ElementFilterField from \"./ElementFilterField.vue\";\nimport { ElementFilterSurface } from \"./ElementFilterSurface\";\n\ndefineOptions({ name: \"ElementHeaderFilter\" });\nconst { closeOnSelect = undefined, ...props } =\n defineProps<HeaderFilterOptions<TRow>>();\nconst names = useClassNames();\nconst model = useHeaderFilter(() => ({ ...props, closeOnSelect }));\nconst controls: HeaderFilterChromeSlots<TRow> = {\n Trigger: (control) =>\n elementButton(\n mergeVueAttrs(control.attrs, {\n class: [\n names.value.filterHeaderButton,\n names.value.filterHeaderTrigger,\n ],\n ref: control.triggerRef,\n \"aria-label\": control.label,\n \"data-active\": control.count > 0 ? \"\" : undefined,\n onPointerdown: control.onPointerDown,\n onClick: control.onClick,\n }),\n control.label\n ),\n Field: (field) =>\n h(ElementFilterField<TRow>, { ...field, classNames: names.value }),\n Popover: (surface) =>\n h(ElementFilterSurface, {\n ...surface,\n modal: false,\n part: \"filter-header-cell\",\n }),\n};\nconst Render = () => HeaderFilterChrome({ model: model.value, controls });\nconst renderProps: string[] = [];\nRender.props = renderProps;\n</script>\n\n<template><Render /></template>\n","import { type StaticTableFeature } from \"@adapttable/vue\";\nimport {\n extendFeature,\n headerFilterSlotKey,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { headerFilters as bindingHeaderFilters } from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport ElementHeaderFilter from \"./filters/ElementHeaderFilter.vue\";\n\n/** Element anchored column filters share the binding's lifecycle and field models. */\nexport function headerFilters(): StaticTableFeature {\n return extendFeature(bindingHeaderFilters(), [\n slotRender(headerFilterSlotKey<unknown>(), (props) =>\n h(ElementHeaderFilter, { ...props })\n ),\n ]);\n}\nexport { default as FilterHeaderControl } from \"./filters/ElementFilterHeaderControl.vue\";\nexport { default as FilterHeaderRow } from \"./filters/ElementFilterHeaderRow.vue\";\nexport { ElementHeaderFilter };\nexport type {\n FilterHeaderControlOptions,\n FilterHeaderControlProps,\n FilterHeaderRowProps,\n} from \"@adapttable/vue/adapter\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,SAAA,GACJ,IAAA,qBAAA,CAAA,SAAA,CAAA,eAAA,CAAA;EACF,MAAM,SAAA,GAAQ,wBAAA,uBAAA,CAAc;EAC5B,MAAM,SAAA,GAAQ,wBAAA,gBAAA,QAAuB;GAAE,GAAG;GAAO,eAAY,QAAA;EAAE,EAAE;EACjE,MAAM,WAA0C;GAC9C,UAAU,YACR,eAAA,eAAA,GACE,wBAAA,cAAA,CAAc,QAAQ,OAAO;IAC3B,OAAO,CACL,MAAM,MAAM,oBACZ,MAAM,MAAM,mBACd;IACA,KAAK,QAAQ;IACb,cAAc,QAAQ;IACtB,eAAe,QAAQ,QAAQ,IAAI,KAAK,KAAA;IACxC,eAAe,QAAQ;IACvB,SAAS,QAAQ;GACnB,CAAC,GACD,QAAQ,KACV;GACF,QAAQ,WAAA,GACN,IAAA,EAAA,CAAE,2BAAA,WAA0B;IAAE,GAAG;IAAO,YAAY,MAAM;GAAM,CAAC;GACnE,UAAU,aAAA,GACR,IAAA,EAAA,CAAE,2BAAA,sBAAsB;IACtB,GAAG;IACH,OAAO;IACP,MAAM;GACR,CAAC;EACL;EACA,MAAM,gBAAA,GAAe,wBAAA,mBAAA,CAAmB;GAAE,OAAO,MAAM;GAAO;EAAS,CAAC;EAExE,OAAO,QAAQ,CAAA;;GAGL,QAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,CAAU,MAAA;;;;;;;ACtCpB,SAAgB,gBAAoC;CAClD,QAAA,GAAOA,wBAAAA,cAAAA,EAAAA,GAAcC,yBAAAA,cAAAA,CAAqB,GAAG,EAAA,GAC3CC,wBAAAA,WAAAA,EAAAA,GAAWC,wBAAAA,oBAAAA,CAA6B,IAAI,WAAA,GAC1CC,IAAAA,EAAAA,CAAEC,WAAqB,EAAE,GAAG,MAAM,CAAC,CACrC,CACF,CAAC;AACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as useClassNames } from "./classNamesContext-18Wbxy4F.js";
|
|
2
|
-
import { t as elementButton } from "./button-
|
|
3
|
-
import { a as ElementFilterSurface, t as _sfc_main$1 } from "./ElementFilterField-
|
|
2
|
+
import { t as elementButton } from "./button-DUddRulx.js";
|
|
3
|
+
import { a as ElementFilterSurface, t as _sfc_main$1 } from "./ElementFilterField-N8tiYPGN.js";
|
|
4
4
|
import { createBlock, createPropsRestProxy, defineComponent, h, openBlock } from "vue";
|
|
5
5
|
import { HeaderFilterChrome, extendFeature, headerFilterSlotKey, mergeVueAttrs, slotRender, useHeaderFilter } from "@adapttable/vue/adapter";
|
|
6
6
|
import { headerFilters } from "@adapttable/vue/features";
|
|
@@ -67,4 +67,4 @@ function headerFilters$1() {
|
|
|
67
67
|
//#endregion
|
|
68
68
|
export { _sfc_main as n, headerFilters$1 as t };
|
|
69
69
|
|
|
70
|
-
//# sourceMappingURL=header-filters-
|
|
70
|
+
//# sourceMappingURL=header-filters-s7nFkTHe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header-filters-
|
|
1
|
+
{"version":3,"file":"header-filters-s7nFkTHe.js","names":["headerFilters","bindingHeaderFilters","ElementHeaderFilter"],"sources":["../src/filters/ElementHeaderFilter.vue","../src/header-filters.ts"],"sourcesContent":["<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n HeaderFilterChrome,\n type HeaderFilterChromeSlots,\n type HeaderFilterOptions,\n mergeVueAttrs,\n useHeaderFilter,\n} from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementButton } from \"../controls/button\";\nimport ElementFilterField from \"./ElementFilterField.vue\";\nimport { ElementFilterSurface } from \"./ElementFilterSurface\";\n\ndefineOptions({ name: \"ElementHeaderFilter\" });\nconst { closeOnSelect = undefined, ...props } =\n defineProps<HeaderFilterOptions<TRow>>();\nconst names = useClassNames();\nconst model = useHeaderFilter(() => ({ ...props, closeOnSelect }));\nconst controls: HeaderFilterChromeSlots<TRow> = {\n Trigger: (control) =>\n elementButton(\n mergeVueAttrs(control.attrs, {\n class: [\n names.value.filterHeaderButton,\n names.value.filterHeaderTrigger,\n ],\n ref: control.triggerRef,\n \"aria-label\": control.label,\n \"data-active\": control.count > 0 ? \"\" : undefined,\n onPointerdown: control.onPointerDown,\n onClick: control.onClick,\n }),\n control.label\n ),\n Field: (field) =>\n h(ElementFilterField<TRow>, { ...field, classNames: names.value }),\n Popover: (surface) =>\n h(ElementFilterSurface, {\n ...surface,\n modal: false,\n part: \"filter-header-cell\",\n }),\n};\nconst Render = () => HeaderFilterChrome({ model: model.value, controls });\nconst renderProps: string[] = [];\nRender.props = renderProps;\n</script>\n\n<template><Render /></template>\n","import { type StaticTableFeature } from \"@adapttable/vue\";\nimport {\n extendFeature,\n headerFilterSlotKey,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { headerFilters as bindingHeaderFilters } from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport ElementHeaderFilter from \"./filters/ElementHeaderFilter.vue\";\n\n/** Element anchored column filters share the binding's lifecycle and field models. */\nexport function headerFilters(): StaticTableFeature {\n return extendFeature(bindingHeaderFilters(), [\n slotRender(headerFilterSlotKey<unknown>(), (props) =>\n h(ElementHeaderFilter, { ...props })\n ),\n ]);\n}\nexport { default as FilterHeaderControl } from \"./filters/ElementFilterHeaderControl.vue\";\nexport { default as FilterHeaderRow } from \"./filters/ElementFilterHeaderRow.vue\";\nexport { ElementHeaderFilter };\nexport type {\n FilterHeaderControlOptions,\n FilterHeaderControlProps,\n FilterHeaderRowProps,\n} from \"@adapttable/vue/adapter\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,QACJ,qBAAA,SAAA,CAAA,eAAA,CAAA;EACF,MAAM,QAAQ,cAAc;EAC5B,MAAM,QAAQ,uBAAuB;GAAE,GAAG;GAAO,eAAY,QAAA;EAAE,EAAE;EACjE,MAAM,WAA0C;GAC9C,UAAU,YACR,cACE,cAAc,QAAQ,OAAO;IAC3B,OAAO,CACL,MAAM,MAAM,oBACZ,MAAM,MAAM,mBACd;IACA,KAAK,QAAQ;IACb,cAAc,QAAQ;IACtB,eAAe,QAAQ,QAAQ,IAAI,KAAK,KAAA;IACxC,eAAe,QAAQ;IACvB,SAAS,QAAQ;GACnB,CAAC,GACD,QAAQ,KACV;GACF,QAAQ,UACN,EAAE,aAA0B;IAAE,GAAG;IAAO,YAAY,MAAM;GAAM,CAAC;GACnE,UAAU,YACR,EAAE,sBAAsB;IACtB,GAAG;IACH,OAAO;IACP,MAAM;GACR,CAAC;EACL;EACA,MAAM,eAAe,mBAAmB;GAAE,OAAO,MAAM;GAAO;EAAS,CAAC;EAExE,OAAO,QAAQ,CAAA;;GAGL,OAAA,UAAA,GAAA,YAAU,MAAA;;;;;;;ACtCpB,SAAgBA,kBAAoC;CAClD,OAAO,cAAcC,cAAqB,GAAG,CAC3C,WAAW,oBAA6B,IAAI,UAC1C,EAAEC,WAAqB,EAAE,GAAG,MAAM,CAAC,CACrC,CACF,CAAC;AACH"}
|
package/dist/header-filters.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ElementFilterHeaderRow = require("./ElementFilterHeaderRow-
|
|
3
|
-
const require_header_filters = require("./header-filters-
|
|
2
|
+
const require_ElementFilterHeaderRow = require("./ElementFilterHeaderRow-D22VL0F8.cjs");
|
|
3
|
+
const require_header_filters = require("./header-filters-D7475LRH.cjs");
|
|
4
4
|
exports.ElementHeaderFilter = require_header_filters._sfc_main;
|
|
5
5
|
exports.FilterHeaderControl = require_ElementFilterHeaderRow._sfc_main$1;
|
|
6
6
|
exports.FilterHeaderRow = require_ElementFilterHeaderRow._sfc_main;
|
package/dist/header-filters.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as _sfc_main$1, t as _sfc_main$2 } from "./ElementFilterHeaderRow-
|
|
2
|
-
import { n as _sfc_main, t as headerFilters } from "./header-filters-
|
|
1
|
+
import { n as _sfc_main$1, t as _sfc_main$2 } from "./ElementFilterHeaderRow-BVo9WSuR.js";
|
|
2
|
+
import { n as _sfc_main, t as headerFilters } from "./header-filters-s7nFkTHe.js";
|
|
3
3
|
export { _sfc_main as ElementHeaderFilter, _sfc_main$1 as FilterHeaderControl, _sfc_main$2 as FilterHeaderRow, headerFilters };
|
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_button = require("./button-
|
|
3
|
-
const require_checkbox = require("./checkbox-
|
|
2
|
+
const require_button = require("./button-BuXbfKKx.cjs");
|
|
3
|
+
const require_checkbox = require("./checkbox-DRhRrexK.cjs");
|
|
4
4
|
const require_ElementInput = require("./ElementInput-BF97xXSC.cjs");
|
|
5
5
|
const require_ElementSelect = require("./ElementSelect-1UwtGCCr.cjs");
|
|
6
|
-
const require_ElementCard = require("./ElementCard-
|
|
6
|
+
const require_ElementCard = require("./ElementCard-DQpWVv24.cjs");
|
|
7
7
|
const require_rowActionsSlot = require("./rowActionsSlot-Ps5hHI6n.cjs");
|
|
8
|
-
const require_ElementFilterHeaderRow = require("./ElementFilterHeaderRow-
|
|
8
|
+
const require_ElementFilterHeaderRow = require("./ElementFilterHeaderRow-D22VL0F8.cjs");
|
|
9
9
|
let vue = require("vue");
|
|
10
10
|
let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
|
|
11
11
|
let element_plus = require("element-plus");
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as provideClassNames } from "./classNamesContext-18Wbxy4F.js";
|
|
2
|
-
import { t as elementButton } from "./button-
|
|
3
|
-
import { n as elementSelectionCheckbox, t as ELEMENT_GROUP_ROW } from "./elementHierarchyControlSlots-
|
|
2
|
+
import { t as elementButton } from "./button-DUddRulx.js";
|
|
3
|
+
import { n as elementSelectionCheckbox, t as ELEMENT_GROUP_ROW } from "./elementHierarchyControlSlots-CBz7cgOw.js";
|
|
4
4
|
import { t as _sfc_main$3 } from "./ElementInput-Cn9hpa9j.js";
|
|
5
5
|
import { t as _sfc_main$4 } from "./ElementSelect-BxFmnPpv.js";
|
|
6
|
-
import { t as ElementCard } from "./ElementCard-
|
|
6
|
+
import { t as ElementCard } from "./ElementCard-czqeWAnk.js";
|
|
7
7
|
import { n as rowActionsControlKey, t as ROW_ACTIONS_CONTROL } from "./rowActionsSlot-CdnzwBmt.js";
|
|
8
|
-
import { n as _sfc_main$1, t as _sfc_main$2 } from "./ElementFilterHeaderRow-
|
|
8
|
+
import { n as _sfc_main$1, t as _sfc_main$2 } from "./ElementFilterHeaderRow-BVo9WSuR.js";
|
|
9
9
|
import { Fragment, computed, createBlock, createPropsRestProxy, defineComponent, getCurrentInstance, h, inject, mergeProps, onBeforeUnmount, onBeforeUpdate, onDeactivated, onScopeDispose, openBlock, shallowRef, unref, useSlots, watch } from "vue";
|
|
10
10
|
import { ColumnGroupToggleChrome, DataTableSurfaceChrome, DesktopTableChrome, EXTRA_ROW_PARTS, MobileSummaryChrome, NO_CLASS_NAMES, keepTableControls, mergeVueAttrs, renderCell, renderFeatureSlot, selectionCheckboxControl, tableRowView, useDataTableShell, useLocaleLabels, withKitEnvironment, withProps } from "@adapttable/vue/adapter";
|
|
11
11
|
import { ElCard, ElIcon, ElMessageBox, ElSkeletonItem, configProviderContextKey } from "element-plus";
|
package/dist/pivot.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_button = require("./button-
|
|
2
|
+
const require_button = require("./button-BuXbfKKx.cjs");
|
|
3
3
|
const require_ElementSelect = require("./ElementSelect-1UwtGCCr.cjs");
|
|
4
4
|
let vue = require("vue");
|
|
5
5
|
let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
|
package/dist/pivot.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as elementButton } from "./button-
|
|
1
|
+
import { t as elementButton } from "./button-DUddRulx.js";
|
|
2
2
|
import { t as _sfc_main } from "./ElementSelect-BxFmnPpv.js";
|
|
3
3
|
import { h } from "vue";
|
|
4
4
|
import { PivotPanelChrome, withProps } from "@adapttable/vue/adapter";
|
package/dist/preset.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_density = require("./density-CJLZxF1h.cjs");
|
|
3
3
|
const require_fullscreen = require("./fullscreen.cjs");
|
|
4
|
-
const require_filters = require("./filters-
|
|
5
|
-
const require_header_filters = require("./header-filters-
|
|
4
|
+
const require_filters = require("./filters-B3GI0d_7.cjs");
|
|
5
|
+
const require_header_filters = require("./header-filters-D7475LRH.cjs");
|
|
6
6
|
const require_grouping = require("./grouping.cjs");
|
|
7
|
-
const require_find_in_table = require("./find-in-table-
|
|
7
|
+
const require_find_in_table = require("./find-in-table-Bn5eTjXM.cjs");
|
|
8
8
|
const require_status_bar = require("./status-bar-C-XuZg77.cjs");
|
|
9
9
|
const require_bulk_actions = require("./bulk-actions.cjs");
|
|
10
|
-
const require_column_menu = require("./column-menu-
|
|
11
|
-
const require_export = require("./export-
|
|
10
|
+
const require_column_menu = require("./column-menu-eS7ylKfB.cjs");
|
|
11
|
+
const require_export = require("./export-Cln4twUm.cjs");
|
|
12
12
|
require("./fit-columns.cjs");
|
|
13
13
|
require("./multi-sort.cjs");
|
|
14
14
|
require("./resizable-columns.cjs");
|
|
15
|
-
const require_saved_views = require("./saved-views-
|
|
15
|
+
const require_saved_views = require("./saved-views-BdoXhuyE.cjs");
|
|
16
16
|
let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
|
|
17
17
|
let _adapttable_vue_features = require("@adapttable/vue/features");
|
|
18
18
|
//#region src/preset.ts
|
package/dist/preset.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as densityChooser } from "./density-OeJSiWSC.js";
|
|
2
2
|
import { fullscreen } from "./fullscreen.js";
|
|
3
|
-
import { n as filters } from "./filters-
|
|
4
|
-
import { t as headerFilters } from "./header-filters-
|
|
3
|
+
import { n as filters } from "./filters-C5j2hjd3.js";
|
|
4
|
+
import { t as headerFilters } from "./header-filters-s7nFkTHe.js";
|
|
5
5
|
import { grouping } from "./grouping.js";
|
|
6
|
-
import { t as findInTable } from "./find-in-table-
|
|
6
|
+
import { t as findInTable } from "./find-in-table-oPAJgCGy.js";
|
|
7
7
|
import { n as statusBar } from "./status-bar-DaWh0Agh.js";
|
|
8
8
|
import { bulkActions } from "./bulk-actions.js";
|
|
9
|
-
import { t as columnMenu } from "./column-menu-
|
|
10
|
-
import { t as exportCsv } from "./export-
|
|
9
|
+
import { t as columnMenu } from "./column-menu-DaOcmA45.js";
|
|
10
|
+
import { t as exportCsv } from "./export-DMEVONO6.js";
|
|
11
11
|
import { fitColumns } from "./fit-columns.js";
|
|
12
12
|
import { multiSort } from "./multi-sort.js";
|
|
13
13
|
import { resizableColumns } from "./resizable-columns.js";
|
|
14
|
-
import { n as savedViews } from "./saved-views-
|
|
14
|
+
import { n as savedViews } from "./saved-views-DAkqlIlo.js";
|
|
15
15
|
import { standardFeatureList } from "@adapttable/vue/adapter";
|
|
16
16
|
//#region src/preset.ts
|
|
17
17
|
function standardFeatures(options = {}) {
|
package/dist/print.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_elementActionSlots = require("./elementActionSlots-
|
|
2
|
+
const require_elementActionSlots = require("./elementActionSlots-WeXIVVnx.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/print.ts
|
package/dist/print.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as elementActionSlots } from "./elementActionSlots-
|
|
1
|
+
import { t as elementActionSlots } from "./elementActionSlots-BOdXhb05.js";
|
|
2
2
|
import { PRINT_CONTROL, PrintChrome, extendFeature, slotRender } from "@adapttable/vue/adapter";
|
|
3
3
|
import { print as print$1 } from "@adapttable/vue/features";
|
|
4
4
|
//#region src/print.ts
|
package/dist/row-actions.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rowActionsSlot = require("./rowActionsSlot-Ps5hHI6n.cjs");
|
|
3
|
-
const require_ElementRowActions = require("./ElementRowActions-
|
|
3
|
+
const require_ElementRowActions = require("./ElementRowActions-DzAA3wSa.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/row-actions.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as rowActionsControlKey } from "./rowActionsSlot-CdnzwBmt.js";
|
|
2
|
-
import { t as ElementRowActions } from "./ElementRowActions-
|
|
2
|
+
import { t as ElementRowActions } from "./ElementRowActions-Djhrf9rm.js";
|
|
3
3
|
import { h } from "vue";
|
|
4
4
|
import { extendFeature, slotRender } from "@adapttable/vue/adapter";
|
|
5
5
|
import { rowActions as rowActions$1 } from "@adapttable/vue/features";
|
package/dist/row-pinning.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rowActionsSlot = require("./rowActionsSlot-Ps5hHI6n.cjs");
|
|
3
|
-
const require_ElementRowActions = require("./ElementRowActions-
|
|
3
|
+
const require_ElementRowActions = require("./ElementRowActions-DzAA3wSa.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/row-pinning.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as rowActionsControlKey } from "./rowActionsSlot-CdnzwBmt.js";
|
|
2
|
-
import { t as ElementRowActions } from "./ElementRowActions-
|
|
2
|
+
import { t as ElementRowActions } from "./ElementRowActions-Djhrf9rm.js";
|
|
3
3
|
import { h } from "vue";
|
|
4
4
|
import { extendFeature, slotRender } from "@adapttable/vue/adapter";
|
|
5
5
|
import { rowPinning as rowPinning$1 } from "@adapttable/vue/features";
|
package/dist/row-reorder.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_button = require("./button-
|
|
2
|
+
const require_button = require("./button-BuXbfKKx.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
|
|
5
5
|
let element_plus = require("element-plus");
|
package/dist/row-reorder.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as useClassNames } from "./classNamesContext-18Wbxy4F.js";
|
|
2
|
-
import { t as elementButton } from "./button-
|
|
2
|
+
import { t as elementButton } from "./button-DUddRulx.js";
|
|
3
3
|
import { createBlock, defineComponent, h, openBlock, shallowRef, useId, watch } from "vue";
|
|
4
4
|
import { RowReorderChrome, extendFeature, rowReorderControlKey, scheduleTick, slotRender, useScopeActivity } from "@adapttable/vue/adapter";
|
|
5
5
|
import { ElDialog, ElOption, ElSelect } from "element-plus";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_button = require("./button-
|
|
1
|
+
const require_button = require("./button-BuXbfKKx.cjs");
|
|
2
2
|
const require_ElementInput = require("./ElementInput-BF97xXSC.cjs");
|
|
3
|
-
const require_ElementCard = require("./ElementCard-
|
|
4
|
-
const require_ElementColumnMenuPanel = require("./ElementColumnMenuPanel-
|
|
3
|
+
const require_ElementCard = require("./ElementCard-DQpWVv24.cjs");
|
|
4
|
+
const require_ElementColumnMenuPanel = require("./ElementColumnMenuPanel-BfFgrSEJ.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");
|
|
@@ -143,4 +143,4 @@ Object.defineProperty(exports, "savedViews", {
|
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
146
|
-
//# sourceMappingURL=saved-views-
|
|
146
|
+
//# sourceMappingURL=saved-views-BdoXhuyE.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saved-views-luZVHu3w.cjs","names":["elementButton","h","ElementInput","managedOverlayPanel","ElementColumnMenuPanel","ElementCard","ElTag","defineComponent","h","SavedViewsPanelChrome","extendFeature","bindingSavedViews","slotRender","SAVED_VIEWS_CONTROL","SavedViewsMenuChrome"],"sources":["../src/views/elementSavedViewsControls.ts","../src/saved-views.ts"],"sourcesContent":["import {\n managedOverlayPanel,\n type SavedViewsMenuSlots,\n type SavedViewsPanelSlots,\n} from \"@adapttable/vue/adapter\";\nimport { ElTag } from \"element-plus\";\nimport { h } from \"vue\";\n\nimport { ElementColumnMenuPanel } from \"../columns/ElementColumnMenuPanel\";\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport { ElementCard } from \"../presentation/ElementCard\";\nimport type { DataTableClassNames } from \"../types\";\nexport const elementSavedViewsMenuSlots: SavedViewsMenuSlots = {\n Trigger: ({ attrs, label }) => elementButton(attrs, label),\n Button: ({ attrs, label }) => elementButton(attrs, label),\n Input: ({ attrs, value, onChange }) =>\n h(ElementInput, { ...attrs, value, onChange }),\n Panel: managedOverlayPanel((control) =>\n h(ElementColumnMenuPanel, {\n control,\n initialFocus: 'input[data-adapttable-part=\"views-input\"]',\n })\n ),\n};\nexport function elementSavedViewsPanelSlots(\n names: () => DataTableClassNames\n): SavedViewsPanelSlots {\n return {\n Surface: (props) =>\n h(\n ElementCard,\n {\n attrs: {\n \"data-adapttable-part\": props[\"data-adapttable-part\"],\n class: props.className,\n },\n },\n {\n default: () => [\n h(\n \"h2\",\n { \"data-adapttable-part\": \"saved-views-title\" },\n props.title\n ),\n props.children,\n props.footer\n ? h(\"span\", { \"data-adapttable-part\": \"saved-views-footer\" }, [\n props.footer,\n ])\n : null,\n ],\n }\n ),\n Row: (props) =>\n h(\n \"div\",\n {\n key: props.viewName,\n class: names().viewsRow,\n \"data-adapttable-part\": props[\"data-adapttable-part\"],\n style: props.layout.row,\n },\n [\n h(\n \"div\",\n {\n \"data-adapttable-part\": \"saved-view-caption\",\n style: props.layout.caption,\n },\n [\n props.isEditing\n ? props.name\n : elementButton(\n {\n type: \"button\",\n title: props.applyLabel,\n class: names().viewsItem,\n onClick: props.onApply,\n },\n [props.name]\n ),\n props.isDefault\n ? h(\n ElTag,\n { \"data-adapttable-part\": \"saved-view-default\" },\n { default: () => props.defaultLabel }\n )\n : null,\n props.readOnly\n ? h(\n ElTag,\n { \"data-adapttable-part\": \"saved-view-readonly\" },\n { default: () => props.readOnlyLabel }\n )\n : null,\n ]\n ),\n h(\n \"div\",\n {\n \"data-adapttable-part\": \"saved-view-controls\",\n style: props.layout.controls,\n },\n props.controls.map((control) =>\n elementButton(\n {\n key: control.key,\n type: \"button\",\n class: names().viewsDelete,\n title: control.label,\n \"aria-label\": control.label,\n \"aria-pressed\": control.pressed,\n disabled: !control.onPress,\n onClick: control.onPress,\n style: props.layout.control,\n },\n [control.icon]\n )\n )\n ),\n ]\n ),\n Input: (props) =>\n h(ElementInput, {\n inputRef: (element) => {\n if (element instanceof HTMLInputElement || element === null)\n props.ref(element);\n },\n class: names().viewsInput,\n \"aria-label\": props.label,\n value: props.value,\n onChange: props.onChange,\n onKeydown: (event: KeyboardEvent) => {\n if (event.isComposing) return;\n if (event.key === \"Enter\") {\n event.preventDefault();\n props.onCommit();\n }\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n props.onCancel();\n }\n },\n }),\n Empty: ({ message }) => h(\"p\", message),\n };\n}\n","import type { StaticTableFeature, UseSavedViewsOptions } from \"@adapttable/vue\";\nimport {\n extendFeature,\n SAVED_VIEWS_CONTROL,\n SavedViewsMenuChrome,\n SavedViewsPanelChrome,\n type SavedViewsPanelChromeProps,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { savedViews as bindingSavedViews } from \"@adapttable/vue/features\";\nimport { defineComponent, h, type MaybeRefOrGetter, type PropType } from \"vue\";\n\nimport type { DataTableClassNames } from \"./types\";\nimport {\n elementSavedViewsMenuSlots,\n elementSavedViewsPanelSlots,\n} from \"./views/elementSavedViewsControls\";\n\nexport type { DataTableClassNames } from \"./types\";\nexport type {\n SavedView,\n SavedViewsStore,\n UseSavedViewsOptions,\n} from \"@adapttable/vue\";\nexport interface SavedViewsPanelProps extends Omit<\n SavedViewsPanelChromeProps,\n \"slots\"\n> {\n readonly classNames?: DataTableClassNames;\n}\n\n/** Element Plus management surface over the binding's rename and ordering model. */\nexport const SavedViewsPanel = defineComponent(\n (props: SavedViewsPanelProps) => {\n const slots = elementSavedViewsPanelSlots(() => props.classNames ?? {});\n return () => {\n const { classNames, ...panelProps } = props;\n return h(SavedViewsPanelChrome, {\n ...panelProps,\n className: [props.className, classNames?.viewsPanel]\n .filter(Boolean)\n .join(\" \"),\n slots,\n });\n };\n },\n {\n name: \"SavedViewsPanel\",\n props: {\n views: { type: Array as PropType<SavedViewsPanelProps[\"views\"]> },\n onApply: { type: Function as PropType<SavedViewsPanelProps[\"onApply\"]> },\n onRename: {\n type: Function as PropType<SavedViewsPanelProps[\"onRename\"]>,\n },\n onMove: { type: Function as PropType<SavedViewsPanelProps[\"onMove\"]> },\n onSetDefault: {\n type: Function as PropType<SavedViewsPanelProps[\"onSetDefault\"]>,\n },\n onRemove: {\n type: Function as PropType<SavedViewsPanelProps[\"onRemove\"]>,\n },\n labels: { type: Object as PropType<SavedViewsPanelProps[\"labels\"]> },\n footer: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n SavedViewsPanelProps[\"footer\"]\n >,\n default: undefined,\n },\n className: {\n type: String as PropType<SavedViewsPanelProps[\"className\"]>,\n },\n classNames: {\n type: Object as PropType<SavedViewsPanelProps[\"classNames\"]>,\n },\n },\n }\n);\n\n/** The table creates the saved-view model once; this fill only renders it. */\nexport function savedViews(\n options: MaybeRefOrGetter<UseSavedViewsOptions>\n): StaticTableFeature {\n return extendFeature(bindingSavedViews(options), [\n slotRender(SAVED_VIEWS_CONTROL, (props) =>\n h(SavedViewsMenuChrome, { ...props, slots: elementSavedViewsMenuSlots })\n ),\n ]);\n}\n"],"mappings":";;;;;;;;;AAaA,MAAa,6BAAkD;CAC7D,UAAU,EAAE,OAAO,YAAYA,eAAAA,cAAc,OAAO,KAAK;CACzD,SAAS,EAAE,OAAO,YAAYA,eAAAA,cAAc,OAAO,KAAK;CACxD,QAAQ,EAAE,OAAO,OAAO,gBAAA,GACtBC,IAAAA,EAAAA,CAAEC,qBAAAA,WAAc;EAAE,GAAG;EAAO;EAAO;CAAS,CAAC;CAC/C,QAAA,GAAOC,wBAAAA,oBAAAA,EAAqB,aAAA,GAC1BF,IAAAA,EAAAA,CAAEG,+BAAAA,wBAAwB;EACxB;EACA,cAAc;CAChB,CAAC,CACH;AACF;AACA,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mD;EACnE,QAAQ;GACN,MAAM;IAAC;IAAQ;IAAQ;IAAS;IAAO;GAAM;GAG7C,SAAS,KAAA;EACX;EACA,WAAW,EACT,MAAM,OACR;EACA,YAAY,EACV,MAAM,OACR;CACF;AACF,CACF;;AAGA,SAAgB,WACd,SACoB;CACpB,QAAA,GAAOC,wBAAAA,cAAAA,EAAAA,GAAcC,yBAAAA,WAAAA,CAAkB,OAAO,GAAG,EAAA,GAC/CC,wBAAAA,WAAAA,CAAWC,wBAAAA,sBAAsB,WAAA,GAC/BL,IAAAA,EAAAA,CAAEM,wBAAAA,sBAAsB;EAAE,GAAG;EAAO,OAAO;CAA2B,CAAC,CACzE,CACF,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"saved-views-BdoXhuyE.cjs","names":["elementButton","h","ElementInput","managedOverlayPanel","ElementColumnMenuPanel","ElementCard","ElTag","defineComponent","h","SavedViewsPanelChrome","extendFeature","bindingSavedViews","slotRender","SAVED_VIEWS_CONTROL","SavedViewsMenuChrome"],"sources":["../src/views/elementSavedViewsControls.ts","../src/saved-views.ts"],"sourcesContent":["import {\n managedOverlayPanel,\n type SavedViewsMenuSlots,\n type SavedViewsPanelSlots,\n} from \"@adapttable/vue/adapter\";\nimport { ElTag } from \"element-plus\";\nimport { h } from \"vue\";\n\nimport { ElementColumnMenuPanel } from \"../columns/ElementColumnMenuPanel\";\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport { ElementCard } from \"../presentation/ElementCard\";\nimport type { DataTableClassNames } from \"../types\";\nexport const elementSavedViewsMenuSlots: SavedViewsMenuSlots = {\n Trigger: ({ attrs, label }) => elementButton(attrs, label),\n Button: ({ attrs, label }) => elementButton(attrs, label),\n Input: ({ attrs, value, onChange }) =>\n h(ElementInput, { ...attrs, value, onChange }),\n Panel: managedOverlayPanel((control) =>\n h(ElementColumnMenuPanel, {\n control,\n initialFocus: 'input[data-adapttable-part=\"views-input\"]',\n })\n ),\n};\nexport function elementSavedViewsPanelSlots(\n names: () => DataTableClassNames\n): SavedViewsPanelSlots {\n return {\n Surface: (props) =>\n h(\n ElementCard,\n {\n attrs: {\n \"data-adapttable-part\": props[\"data-adapttable-part\"],\n class: props.className,\n },\n },\n {\n default: () => [\n h(\n \"h2\",\n { \"data-adapttable-part\": \"saved-views-title\" },\n props.title\n ),\n props.children,\n props.footer\n ? h(\"span\", { \"data-adapttable-part\": \"saved-views-footer\" }, [\n props.footer,\n ])\n : null,\n ],\n }\n ),\n Row: (props) =>\n h(\n \"div\",\n {\n key: props.viewName,\n class: names().viewsRow,\n \"data-adapttable-part\": props[\"data-adapttable-part\"],\n style: props.layout.row,\n },\n [\n h(\n \"div\",\n {\n \"data-adapttable-part\": \"saved-view-caption\",\n style: props.layout.caption,\n },\n [\n props.isEditing\n ? props.name\n : elementButton(\n {\n type: \"button\",\n title: props.applyLabel,\n class: names().viewsItem,\n onClick: props.onApply,\n },\n [props.name]\n ),\n props.isDefault\n ? h(\n ElTag,\n { \"data-adapttable-part\": \"saved-view-default\" },\n { default: () => props.defaultLabel }\n )\n : null,\n props.readOnly\n ? h(\n ElTag,\n { \"data-adapttable-part\": \"saved-view-readonly\" },\n { default: () => props.readOnlyLabel }\n )\n : null,\n ]\n ),\n h(\n \"div\",\n {\n \"data-adapttable-part\": \"saved-view-controls\",\n style: props.layout.controls,\n },\n props.controls.map((control) =>\n elementButton(\n {\n key: control.key,\n type: \"button\",\n class: names().viewsDelete,\n title: control.label,\n \"aria-label\": control.label,\n \"aria-pressed\": control.pressed,\n disabled: !control.onPress,\n onClick: control.onPress,\n style: props.layout.control,\n },\n [control.icon]\n )\n )\n ),\n ]\n ),\n Input: (props) =>\n h(ElementInput, {\n inputRef: (element) => {\n if (element instanceof HTMLInputElement || element === null)\n props.ref(element);\n },\n class: names().viewsInput,\n \"aria-label\": props.label,\n value: props.value,\n onChange: props.onChange,\n onKeydown: (event: KeyboardEvent) => {\n if (event.isComposing) return;\n if (event.key === \"Enter\") {\n event.preventDefault();\n props.onCommit();\n }\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n props.onCancel();\n }\n },\n }),\n Empty: ({ message }) => h(\"p\", message),\n };\n}\n","import type { StaticTableFeature, UseSavedViewsOptions } from \"@adapttable/vue\";\nimport {\n extendFeature,\n SAVED_VIEWS_CONTROL,\n SavedViewsMenuChrome,\n SavedViewsPanelChrome,\n type SavedViewsPanelChromeProps,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { savedViews as bindingSavedViews } from \"@adapttable/vue/features\";\nimport { defineComponent, h, type MaybeRefOrGetter, type PropType } from \"vue\";\n\nimport type { DataTableClassNames } from \"./types\";\nimport {\n elementSavedViewsMenuSlots,\n elementSavedViewsPanelSlots,\n} from \"./views/elementSavedViewsControls\";\n\nexport type { DataTableClassNames } from \"./types\";\nexport type {\n SavedView,\n SavedViewsStore,\n UseSavedViewsOptions,\n} from \"@adapttable/vue\";\nexport interface SavedViewsPanelProps extends Omit<\n SavedViewsPanelChromeProps,\n \"slots\"\n> {\n readonly classNames?: DataTableClassNames;\n}\n\n/** Element Plus management surface over the binding's rename and ordering model. */\nexport const SavedViewsPanel = defineComponent(\n (props: SavedViewsPanelProps) => {\n const slots = elementSavedViewsPanelSlots(() => props.classNames ?? {});\n return () => {\n const { classNames, ...panelProps } = props;\n return h(SavedViewsPanelChrome, {\n ...panelProps,\n className: [props.className, classNames?.viewsPanel]\n .filter(Boolean)\n .join(\" \"),\n slots,\n });\n };\n },\n {\n name: \"SavedViewsPanel\",\n props: {\n views: { type: Array as PropType<SavedViewsPanelProps[\"views\"]> },\n onApply: { type: Function as PropType<SavedViewsPanelProps[\"onApply\"]> },\n onRename: {\n type: Function as PropType<SavedViewsPanelProps[\"onRename\"]>,\n },\n onMove: { type: Function as PropType<SavedViewsPanelProps[\"onMove\"]> },\n onSetDefault: {\n type: Function as PropType<SavedViewsPanelProps[\"onSetDefault\"]>,\n },\n onRemove: {\n type: Function as PropType<SavedViewsPanelProps[\"onRemove\"]>,\n },\n labels: { type: Object as PropType<SavedViewsPanelProps[\"labels\"]> },\n footer: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n SavedViewsPanelProps[\"footer\"]\n >,\n default: undefined,\n },\n className: {\n type: String as PropType<SavedViewsPanelProps[\"className\"]>,\n },\n classNames: {\n type: Object as PropType<SavedViewsPanelProps[\"classNames\"]>,\n },\n },\n }\n);\n\n/** The table creates the saved-view model once; this fill only renders it. */\nexport function savedViews(\n options: MaybeRefOrGetter<UseSavedViewsOptions>\n): StaticTableFeature {\n return extendFeature(bindingSavedViews(options), [\n slotRender(SAVED_VIEWS_CONTROL, (props) =>\n h(SavedViewsMenuChrome, { ...props, slots: elementSavedViewsMenuSlots })\n ),\n ]);\n}\n"],"mappings":";;;;;;;;;AAaA,MAAa,6BAAkD;CAC7D,UAAU,EAAE,OAAO,YAAYA,eAAAA,cAAc,OAAO,KAAK;CACzD,SAAS,EAAE,OAAO,YAAYA,eAAAA,cAAc,OAAO,KAAK;CACxD,QAAQ,EAAE,OAAO,OAAO,gBAAA,GACtBC,IAAAA,EAAAA,CAAEC,qBAAAA,WAAc;EAAE,GAAG;EAAO;EAAO;CAAS,CAAC;CAC/C,QAAA,GAAOC,wBAAAA,oBAAAA,EAAqB,aAAA,GAC1BF,IAAAA,EAAAA,CAAEG,+BAAAA,wBAAwB;EACxB;EACA,cAAc;CAChB,CAAC,CACH;AACF;AACA,SAAgB,4BACd,OACsB;CACtB,OAAO;EACL,UAAU,WAAA,GACRH,IAAAA,EAAAA,CACEI,oBAAAA,aACA,EACE,OAAO;GACL,wBAAwB,MAAM;GAC9B,OAAO,MAAM;EACf,EACF,GACA,EACE,eAAe;IACbJ,GAAAA,IAAAA,EAAAA,CACE,MACA,EAAE,wBAAwB,oBAAoB,GAC9C,MAAM,KACR;GACA,MAAM;GACN,MAAM,UAAA,GACFA,IAAAA,EAAAA,CAAE,QAAQ,EAAE,wBAAwB,qBAAqB,GAAG,CAC1D,MAAM,MACR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,CAAEM,wBAAAA,sBAAsB;EAAE,GAAG;EAAO,OAAO;CAA2B,CAAC,CACzE,CACF,CAAC;AACH"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as elementButton } from "./button-
|
|
1
|
+
import { t as elementButton } from "./button-DUddRulx.js";
|
|
2
2
|
import { t as _sfc_main } from "./ElementInput-Cn9hpa9j.js";
|
|
3
|
-
import { t as ElementCard } from "./ElementCard-
|
|
4
|
-
import { t as ElementColumnMenuPanel } from "./ElementColumnMenuPanel-
|
|
3
|
+
import { t as ElementCard } from "./ElementCard-czqeWAnk.js";
|
|
4
|
+
import { t as ElementColumnMenuPanel } from "./ElementColumnMenuPanel-Nkilw7G4.js";
|
|
5
5
|
import { defineComponent, h } from "vue";
|
|
6
6
|
import { SAVED_VIEWS_CONTROL, SavedViewsMenuChrome, SavedViewsPanelChrome, extendFeature, managedOverlayPanel, slotRender } from "@adapttable/vue/adapter";
|
|
7
7
|
import { ElTag } from "element-plus";
|
|
@@ -132,4 +132,4 @@ function savedViews$1(options) {
|
|
|
132
132
|
//#endregion
|
|
133
133
|
export { savedViews$1 as n, SavedViewsPanel as t };
|
|
134
134
|
|
|
135
|
-
//# sourceMappingURL=saved-views-
|
|
135
|
+
//# sourceMappingURL=saved-views-DAkqlIlo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saved-views-DDo4Bl-f.js","names":["ElementInput","savedViews","bindingSavedViews"],"sources":["../src/views/elementSavedViewsControls.ts","../src/saved-views.ts"],"sourcesContent":["import {\n managedOverlayPanel,\n type SavedViewsMenuSlots,\n type SavedViewsPanelSlots,\n} from \"@adapttable/vue/adapter\";\nimport { ElTag } from \"element-plus\";\nimport { h } from \"vue\";\n\nimport { ElementColumnMenuPanel } from \"../columns/ElementColumnMenuPanel\";\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport { ElementCard } from \"../presentation/ElementCard\";\nimport type { DataTableClassNames } from \"../types\";\nexport const elementSavedViewsMenuSlots: SavedViewsMenuSlots = {\n Trigger: ({ attrs, label }) => elementButton(attrs, label),\n Button: ({ attrs, label }) => elementButton(attrs, label),\n Input: ({ attrs, value, onChange }) =>\n h(ElementInput, { ...attrs, value, onChange }),\n Panel: managedOverlayPanel((control) =>\n h(ElementColumnMenuPanel, {\n control,\n initialFocus: 'input[data-adapttable-part=\"views-input\"]',\n })\n ),\n};\nexport function elementSavedViewsPanelSlots(\n names: () => DataTableClassNames\n): SavedViewsPanelSlots {\n return {\n Surface: (props) =>\n h(\n ElementCard,\n {\n attrs: {\n \"data-adapttable-part\": props[\"data-adapttable-part\"],\n class: props.className,\n },\n },\n {\n default: () => [\n h(\n \"h2\",\n { \"data-adapttable-part\": \"saved-views-title\" },\n props.title\n ),\n props.children,\n props.footer\n ? h(\"span\", { \"data-adapttable-part\": \"saved-views-footer\" }, [\n props.footer,\n ])\n : null,\n ],\n }\n ),\n Row: (props) =>\n h(\n \"div\",\n {\n key: props.viewName,\n class: names().viewsRow,\n \"data-adapttable-part\": props[\"data-adapttable-part\"],\n style: props.layout.row,\n },\n [\n h(\n \"div\",\n {\n \"data-adapttable-part\": \"saved-view-caption\",\n style: props.layout.caption,\n },\n [\n props.isEditing\n ? props.name\n : elementButton(\n {\n type: \"button\",\n title: props.applyLabel,\n class: names().viewsItem,\n onClick: props.onApply,\n },\n [props.name]\n ),\n props.isDefault\n ? h(\n ElTag,\n { \"data-adapttable-part\": \"saved-view-default\" },\n { default: () => props.defaultLabel }\n )\n : null,\n props.readOnly\n ? h(\n ElTag,\n { \"data-adapttable-part\": \"saved-view-readonly\" },\n { default: () => props.readOnlyLabel }\n )\n : null,\n ]\n ),\n h(\n \"div\",\n {\n \"data-adapttable-part\": \"saved-view-controls\",\n style: props.layout.controls,\n },\n props.controls.map((control) =>\n elementButton(\n {\n key: control.key,\n type: \"button\",\n class: names().viewsDelete,\n title: control.label,\n \"aria-label\": control.label,\n \"aria-pressed\": control.pressed,\n disabled: !control.onPress,\n onClick: control.onPress,\n style: props.layout.control,\n },\n [control.icon]\n )\n )\n ),\n ]\n ),\n Input: (props) =>\n h(ElementInput, {\n inputRef: (element) => {\n if (element instanceof HTMLInputElement || element === null)\n props.ref(element);\n },\n class: names().viewsInput,\n \"aria-label\": props.label,\n value: props.value,\n onChange: props.onChange,\n onKeydown: (event: KeyboardEvent) => {\n if (event.isComposing) return;\n if (event.key === \"Enter\") {\n event.preventDefault();\n props.onCommit();\n }\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n props.onCancel();\n }\n },\n }),\n Empty: ({ message }) => h(\"p\", message),\n };\n}\n","import type { StaticTableFeature, UseSavedViewsOptions } from \"@adapttable/vue\";\nimport {\n extendFeature,\n SAVED_VIEWS_CONTROL,\n SavedViewsMenuChrome,\n SavedViewsPanelChrome,\n type SavedViewsPanelChromeProps,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { savedViews as bindingSavedViews } from \"@adapttable/vue/features\";\nimport { defineComponent, h, type MaybeRefOrGetter, type PropType } from \"vue\";\n\nimport type { DataTableClassNames } from \"./types\";\nimport {\n elementSavedViewsMenuSlots,\n elementSavedViewsPanelSlots,\n} from \"./views/elementSavedViewsControls\";\n\nexport type { DataTableClassNames } from \"./types\";\nexport type {\n SavedView,\n SavedViewsStore,\n UseSavedViewsOptions,\n} from \"@adapttable/vue\";\nexport interface SavedViewsPanelProps extends Omit<\n SavedViewsPanelChromeProps,\n \"slots\"\n> {\n readonly classNames?: DataTableClassNames;\n}\n\n/** Element Plus management surface over the binding's rename and ordering model. */\nexport const SavedViewsPanel = defineComponent(\n (props: SavedViewsPanelProps) => {\n const slots = elementSavedViewsPanelSlots(() => props.classNames ?? {});\n return () => {\n const { classNames, ...panelProps } = props;\n return h(SavedViewsPanelChrome, {\n ...panelProps,\n className: [props.className, classNames?.viewsPanel]\n .filter(Boolean)\n .join(\" \"),\n slots,\n });\n };\n },\n {\n name: \"SavedViewsPanel\",\n props: {\n views: { type: Array as PropType<SavedViewsPanelProps[\"views\"]> },\n onApply: { type: Function as PropType<SavedViewsPanelProps[\"onApply\"]> },\n onRename: {\n type: Function as PropType<SavedViewsPanelProps[\"onRename\"]>,\n },\n onMove: { type: Function as PropType<SavedViewsPanelProps[\"onMove\"]> },\n onSetDefault: {\n type: Function as PropType<SavedViewsPanelProps[\"onSetDefault\"]>,\n },\n onRemove: {\n type: Function as PropType<SavedViewsPanelProps[\"onRemove\"]>,\n },\n labels: { type: Object as PropType<SavedViewsPanelProps[\"labels\"]> },\n footer: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n SavedViewsPanelProps[\"footer\"]\n >,\n default: undefined,\n },\n className: {\n type: String as PropType<SavedViewsPanelProps[\"className\"]>,\n },\n classNames: {\n type: Object as PropType<SavedViewsPanelProps[\"classNames\"]>,\n },\n },\n }\n);\n\n/** The table creates the saved-view model once; this fill only renders it. */\nexport function savedViews(\n options: MaybeRefOrGetter<UseSavedViewsOptions>\n): StaticTableFeature {\n return extendFeature(bindingSavedViews(options), [\n slotRender(SAVED_VIEWS_CONTROL, (props) =>\n h(SavedViewsMenuChrome, { ...props, slots: elementSavedViewsMenuSlots })\n ),\n ]);\n}\n"],"mappings":";;;;;;;;;AAaA,MAAa,6BAAkD;CAC7D,UAAU,EAAE,OAAO,YAAY,cAAc,OAAO,KAAK;CACzD,SAAS,EAAE,OAAO,YAAY,cAAc,OAAO,KAAK;CACxD,QAAQ,EAAE,OAAO,OAAO,eACtB,EAAEA,WAAc;EAAE,GAAG;EAAO;EAAO;CAAS,CAAC;CAC/C,OAAO,qBAAqB,YAC1B,EAAE,wBAAwB;EACxB;EACA,cAAc;CAChB,CAAC,CACH;AACF;AACA,SAAgB,4BACd,OACsB;CACtB,OAAO;EACL,UAAU,UACR,EACE,aACA,EACE,OAAO;GACL,wBAAwB,MAAM;GAC9B,OAAO,MAAM;EACf,EACF,GACA,EACE,eAAe;GACb,EACE,MACA,EAAE,wBAAwB,oBAAoB,GAC9C,MAA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AS;KACzB,MAAM,eAAe;KACrB,MAAM,SAAS;IACjB;IACA,IAAI,MAAM,QAAQ,UAAU;KAC1B,MAAM,eAAe;KACrB,MAAM,gBAAgB;KACtB,MAAM,SAAS;IACjB;GACF;EACF,CAAC;EACH,QAAQ,EAAE,cAAc,EAAE,KAAK,OAAO;CACxC;AACF;;;;ACpHA,MAAa,kBAAkB,iBAC5B,UAAgC;CAC/B,MAAM,QAAQ,kCAAkC,MAAM,cAAc,CAAC,CAAC;CACtE,aAAa;EACX,MAAM,EAAE,YAAY,GAAG,eAAe;EACtC,OAAO,EAAE,uBAAuB;GAC9B,GAAG;GACH,WAAW,CAAC,MAAM,WAAW,YAAY,UAAU,CAAC,CACjD,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;GACX;EACF,CAAC;CACH;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EAAE,MAAM,MAAiD;EAChE,SAAS,EAAE,MAAM,SAAsD;EACvE,UAAU,EACR,MAAM,SACR;EACA,QAAQ,EAAE,MAAM,SAAqD;EACrE,cAAc,EACZ,MAAM,SACR;EACA,UAAU,EACR,MAAM,SACR;EACA,QAAQ,EAAE,MAAM,OAAmD;EACnE,QAAQ;GACN,MAAM;IAAC;IAAQ;IAAQ;IAAS;IAAO;GAAM;GAG7C,SAAS,KAAA;EACX;EACA,WAAW,EACT,MAAM,OACR;EACA,YAAY,EACV,MAAM,OACR;CACF;AACF,CACF;;AAGA,SAAgBC,aACd,SACoB;CACpB,OAAO,cAAcC,WAAkB,OAAO,GAAG,CAC/C,WAAW,sBAAsB,UAC/B,EAAE,sBAAsB;EAAE,GAAG;EAAO,OAAO;CAA2B,CAAC,CACzE,CACF,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"saved-views-DAkqlIlo.js","names":["ElementInput","savedViews","bindingSavedViews"],"sources":["../src/views/elementSavedViewsControls.ts","../src/saved-views.ts"],"sourcesContent":["import {\n managedOverlayPanel,\n type SavedViewsMenuSlots,\n type SavedViewsPanelSlots,\n} from \"@adapttable/vue/adapter\";\nimport { ElTag } from \"element-plus\";\nimport { h } from \"vue\";\n\nimport { ElementColumnMenuPanel } from \"../columns/ElementColumnMenuPanel\";\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport { ElementCard } from \"../presentation/ElementCard\";\nimport type { DataTableClassNames } from \"../types\";\nexport const elementSavedViewsMenuSlots: SavedViewsMenuSlots = {\n Trigger: ({ attrs, label }) => elementButton(attrs, label),\n Button: ({ attrs, label }) => elementButton(attrs, label),\n Input: ({ attrs, value, onChange }) =>\n h(ElementInput, { ...attrs, value, onChange }),\n Panel: managedOverlayPanel((control) =>\n h(ElementColumnMenuPanel, {\n control,\n initialFocus: 'input[data-adapttable-part=\"views-input\"]',\n })\n ),\n};\nexport function elementSavedViewsPanelSlots(\n names: () => DataTableClassNames\n): SavedViewsPanelSlots {\n return {\n Surface: (props) =>\n h(\n ElementCard,\n {\n attrs: {\n \"data-adapttable-part\": props[\"data-adapttable-part\"],\n class: props.className,\n },\n },\n {\n default: () => [\n h(\n \"h2\",\n { \"data-adapttable-part\": \"saved-views-title\" },\n props.title\n ),\n props.children,\n props.footer\n ? h(\"span\", { \"data-adapttable-part\": \"saved-views-footer\" }, [\n props.footer,\n ])\n : null,\n ],\n }\n ),\n Row: (props) =>\n h(\n \"div\",\n {\n key: props.viewName,\n class: names().viewsRow,\n \"data-adapttable-part\": props[\"data-adapttable-part\"],\n style: props.layout.row,\n },\n [\n h(\n \"div\",\n {\n \"data-adapttable-part\": \"saved-view-caption\",\n style: props.layout.caption,\n },\n [\n props.isEditing\n ? props.name\n : elementButton(\n {\n type: \"button\",\n title: props.applyLabel,\n class: names().viewsItem,\n onClick: props.onApply,\n },\n [props.name]\n ),\n props.isDefault\n ? h(\n ElTag,\n { \"data-adapttable-part\": \"saved-view-default\" },\n { default: () => props.defaultLabel }\n )\n : null,\n props.readOnly\n ? h(\n ElTag,\n { \"data-adapttable-part\": \"saved-view-readonly\" },\n { default: () => props.readOnlyLabel }\n )\n : null,\n ]\n ),\n h(\n \"div\",\n {\n \"data-adapttable-part\": \"saved-view-controls\",\n style: props.layout.controls,\n },\n props.controls.map((control) =>\n elementButton(\n {\n key: control.key,\n type: \"button\",\n class: names().viewsDelete,\n title: control.label,\n \"aria-label\": control.label,\n \"aria-pressed\": control.pressed,\n disabled: !control.onPress,\n onClick: control.onPress,\n style: props.layout.control,\n },\n [control.icon]\n )\n )\n ),\n ]\n ),\n Input: (props) =>\n h(ElementInput, {\n inputRef: (element) => {\n if (element instanceof HTMLInputElement || element === null)\n props.ref(element);\n },\n class: names().viewsInput,\n \"aria-label\": props.label,\n value: props.value,\n onChange: props.onChange,\n onKeydown: (event: KeyboardEvent) => {\n if (event.isComposing) return;\n if (event.key === \"Enter\") {\n event.preventDefault();\n props.onCommit();\n }\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n props.onCancel();\n }\n },\n }),\n Empty: ({ message }) => h(\"p\", message),\n };\n}\n","import type { StaticTableFeature, UseSavedViewsOptions } from \"@adapttable/vue\";\nimport {\n extendFeature,\n SAVED_VIEWS_CONTROL,\n SavedViewsMenuChrome,\n SavedViewsPanelChrome,\n type SavedViewsPanelChromeProps,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { savedViews as bindingSavedViews } from \"@adapttable/vue/features\";\nimport { defineComponent, h, type MaybeRefOrGetter, type PropType } from \"vue\";\n\nimport type { DataTableClassNames } from \"./types\";\nimport {\n elementSavedViewsMenuSlots,\n elementSavedViewsPanelSlots,\n} from \"./views/elementSavedViewsControls\";\n\nexport type { DataTableClassNames } from \"./types\";\nexport type {\n SavedView,\n SavedViewsStore,\n UseSavedViewsOptions,\n} from \"@adapttable/vue\";\nexport interface SavedViewsPanelProps extends Omit<\n SavedViewsPanelChromeProps,\n \"slots\"\n> {\n readonly classNames?: DataTableClassNames;\n}\n\n/** Element Plus management surface over the binding's rename and ordering model. */\nexport const SavedViewsPanel = defineComponent(\n (props: SavedViewsPanelProps) => {\n const slots = elementSavedViewsPanelSlots(() => props.classNames ?? {});\n return () => {\n const { classNames, ...panelProps } = props;\n return h(SavedViewsPanelChrome, {\n ...panelProps,\n className: [props.className, classNames?.viewsPanel]\n .filter(Boolean)\n .join(\" \"),\n slots,\n });\n };\n },\n {\n name: \"SavedViewsPanel\",\n props: {\n views: { type: Array as PropType<SavedViewsPanelProps[\"views\"]> },\n onApply: { type: Function as PropType<SavedViewsPanelProps[\"onApply\"]> },\n onRename: {\n type: Function as PropType<SavedViewsPanelProps[\"onRename\"]>,\n },\n onMove: { type: Function as PropType<SavedViewsPanelProps[\"onMove\"]> },\n onSetDefault: {\n type: Function as PropType<SavedViewsPanelProps[\"onSetDefault\"]>,\n },\n onRemove: {\n type: Function as PropType<SavedViewsPanelProps[\"onRemove\"]>,\n },\n labels: { type: Object as PropType<SavedViewsPanelProps[\"labels\"]> },\n footer: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n SavedViewsPanelProps[\"footer\"]\n >,\n default: undefined,\n },\n className: {\n type: String as PropType<SavedViewsPanelProps[\"className\"]>,\n },\n classNames: {\n type: Object as PropType<SavedViewsPanelProps[\"classNames\"]>,\n },\n },\n }\n);\n\n/** The table creates the saved-view model once; this fill only renders it. */\nexport function savedViews(\n options: MaybeRefOrGetter<UseSavedViewsOptions>\n): StaticTableFeature {\n return extendFeature(bindingSavedViews(options), [\n slotRender(SAVED_VIEWS_CONTROL, (props) =>\n h(SavedViewsMenuChrome, { ...props, slots: elementSavedViewsMenuSlots })\n ),\n ]);\n}\n"],"mappings":";;;;;;;;;AAaA,MAAa,6BAAkD;CAC7D,UAAU,EAAE,OAAO,YAAY,cAAc,OAAO,KAAK;CACzD,SAAS,EAAE,OAAO,YAAY,cAAc,OAAO,KAAK;CACxD,QAAQ,EAAE,OAAO,OAAO,eACtB,EAAEA,WAAc;EAAE,GAAG;EAAO;EAAO;CAAS,CAAC;CAC/C,OAAO,qBAAqB,YAC1B,EAAE,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E,GAAG;EAAO,OAAO;CAA2B,CAAC,CACzE,CACF,CAAC;AACH"}
|
package/dist/saved-views.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_saved_views = require("./saved-views-
|
|
2
|
+
const require_saved_views = require("./saved-views-BdoXhuyE.cjs");
|
|
3
3
|
exports.SavedViewsPanel = require_saved_views.SavedViewsPanel;
|
|
4
4
|
exports.savedViews = require_saved_views.savedViews;
|
package/dist/saved-views.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as savedViews, t as SavedViewsPanel } from "./saved-views-
|
|
1
|
+
import { n as savedViews, t as SavedViewsPanel } from "./saved-views-DAkqlIlo.js";
|
|
2
2
|
export { SavedViewsPanel, savedViews };
|
package/dist/side-panel.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_elementRemainingControls = require("./elementRemainingControls-
|
|
2
|
+
const require_elementRemainingControls = require("./elementRemainingControls-CvGiKtfz.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
|
|
5
5
|
let _adapttable_vue_features = require("@adapttable/vue/features");
|
package/dist/side-panel.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as elementSidePanelSlots } from "./elementRemainingControls-
|
|
1
|
+
import { i as elementSidePanelSlots } from "./elementRemainingControls-J7eDWROX.js";
|
|
2
2
|
import { defineComponent, h } from "vue";
|
|
3
3
|
import { SIDE_PANEL_CONTROL, SidePanelChrome, extendFeature, slotRender } from "@adapttable/vue/adapter";
|
|
4
4
|
import { sidePanel as sidePanel$1 } from "@adapttable/vue/features";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as elementButton } from "./button-
|
|
2
|
-
import { t as ElementCard } from "./ElementCard-
|
|
1
|
+
import { t as elementButton } from "./button-DUddRulx.js";
|
|
2
|
+
import { t as ElementCard } from "./ElementCard-czqeWAnk.js";
|
|
3
3
|
import { h } from "vue";
|
|
4
4
|
import { EXPORT_CONTROL, ExportChrome, extendFeature, slotRender } from "@adapttable/vue/adapter";
|
|
5
5
|
import { ElIcon, ElLink, ElProgress } from "element-plus";
|
|
@@ -71,4 +71,4 @@ function withElementExport(feature) {
|
|
|
71
71
|
//#endregion
|
|
72
72
|
export { withElementExport as t };
|
|
73
73
|
|
|
74
|
-
//# sourceMappingURL=withElementExport-
|
|
74
|
+
//# sourceMappingURL=withElementExport-CX-S76EV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withElementExport-
|
|
1
|
+
{"version":3,"file":"withElementExport-CX-S76EV.js","names":[],"sources":["../src/actions/elementExportSlots.ts","../src/export/withElementExport.ts"],"sourcesContent":["import type { ExportSlots } from \"@adapttable/vue/adapter\";\nimport { ElIcon, ElLink, ElProgress } from \"element-plus\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport { ElementCard } from \"../presentation/ElementCard\";\nexport const elementExportSlots = (\n names: Readonly<Record<string, string | undefined>> = {}\n): ExportSlots => ({\n Button: ({ attrs, label, icon }) =>\n elementButton(\n { ...attrs, loading: attrs[\"aria-busy\"] === true },\n [attrs[\"aria-busy\"] === true ? null : icon, label],\n () =>\n h(\n ElIcon,\n {\n \"aria-hidden\": \"true\",\n \"data-adapttable-part\": \"export-spinner\",\n class: [\"is-loading\", names.exportSpinner],\n },\n {\n default: () =>\n h(\n \"svg\",\n {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n },\n [h(\"path\", { d: \"M21 12a9 9 0 1 1-6.22-8.56\" })]\n ),\n }\n )\n ),\n Surface: (props) =>\n h(\n ElementCard,\n {\n attrs: {\n \"data-adapttable-part\": \"export-progress-surface\",\n class: names.exportProgress,\n role: \"region\",\n \"aria-label\": props.heading,\n },\n },\n {\n default: () => [\n h(\"h3\", props.heading),\n props.status === \"busy\"\n ? h(ElProgress, {\n \"data-adapttable-part\": \"export-progress-bar\",\n class: names.exportProgressBar,\n percentage: props.progress ?? 0,\n indeterminate: props.progress === undefined,\n \"aria-label\": props.progressLabel,\n })\n : null,\n props.message\n ? h(\n \"p\",\n {\n \"data-adapttable-part\": \"export-progress-message\",\n class: names.exportProgressMessage,\n },\n props.message\n )\n : null,\n props.error\n ? h(\n \"p\",\n {\n role: \"alert\",\n \"data-adapttable-part\": \"export-progress-message\",\n class: names.exportProgressMessage,\n },\n props.error\n )\n : null,\n h(\"div\", { \"data-adapttable-part\": \"export-progress-actions\" }, [\n ...(\n [\n [\"cancel\", props.cancel],\n [\"retry\", props.retry],\n [\"dismiss\", props.dismiss],\n ] as const\n ).map(([key, action]) =>\n action\n ? elementButton(\n {\n key,\n type: \"button\",\n \"data-adapttable-part\": `export-progress-${key}`,\n class: names.exportProgressButton,\n onClick: action.onAction,\n },\n action.label\n )\n : null\n ),\n props.download\n ? h(\n ElLink,\n {\n \"data-adapttable-part\": \"export-progress-download\",\n class: names.exportProgressDownload,\n href: props.download.url,\n download: \"\",\n },\n { default: () => props.download?.label }\n )\n : null,\n ]),\n ],\n }\n ),\n});\n","import type { TableFeature } from \"@adapttable/vue\";\nimport {\n EXPORT_CONTROL,\n ExportChrome,\n extendFeature,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { elementExportSlots } from \"../actions/elementExportSlots\";\n\n/** An export feature, drawn with Element's own export controls. */\nexport function withElementExport<TRow>(\n feature: TableFeature<TRow>\n): TableFeature<TRow> {\n return extendFeature(feature, [\n slotRender(EXPORT_CONTROL, (props) =>\n h(ExportChrome, {\n ...props,\n slots: elementExportSlots(props.classNames),\n })\n ),\n ]);\n}\n"],"mappings":";;;;;;AAMA,MAAa,sBACX,QAAsD,CAAC,OACtC;CACjB,SAAS,EAAE,OAAO,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ACZ,GACA,EAAE,eAAe,MAAM,UAAU,MAAM,CACzC,IACA,IACN,CAAC;CACH,EACF,CACF;AACJ;;;;ACzGA,SAAgB,kBACd,SACoB;CACpB,OAAO,cAAc,SAAS,CAC5B,WAAW,iBAAiB,UAC1B,EAAE,cAAc;EACd,GAAG;EACH,OAAO,mBAAmB,MAAM,UAAU;CAC5C,CAAC,CACH,CACF,CAAC;AACH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_button = require("./button-
|
|
2
|
-
const require_ElementCard = require("./ElementCard-
|
|
1
|
+
const require_button = require("./button-BuXbfKKx.cjs");
|
|
2
|
+
const require_ElementCard = require("./ElementCard-DQpWVv24.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
|
|
5
5
|
let element_plus = require("element-plus");
|
|
@@ -76,4 +76,4 @@ Object.defineProperty(exports, "withElementExport", {
|
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
-
//# sourceMappingURL=withElementExport-
|
|
79
|
+
//# sourceMappingURL=withElementExport-CmkGvvZT.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withElementExport-
|
|
1
|
+
{"version":3,"file":"withElementExport-CmkGvvZT.cjs","names":["elementButton","h","ElIcon","ElementCard","ElProgress","ElLink","extendFeature","slotRender","EXPORT_CONTROL","h","ExportChrome"],"sources":["../src/actions/elementExportSlots.ts","../src/export/withElementExport.ts"],"sourcesContent":["import type { ExportSlots } from \"@adapttable/vue/adapter\";\nimport { ElIcon, ElLink, ElProgress } from \"element-plus\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport { ElementCard } from \"../presentation/ElementCard\";\nexport const elementExportSlots = (\n names: Readonly<Record<string, string | undefined>> = {}\n): ExportSlots => ({\n Button: ({ attrs, label, icon }) =>\n elementButton(\n { ...attrs, loading: attrs[\"aria-busy\"] === true },\n [attrs[\"aria-busy\"] === true ? null : icon, label],\n () =>\n h(\n ElIcon,\n {\n \"aria-hidden\": \"true\",\n \"data-adapttable-part\": \"export-spinner\",\n class: [\"is-loading\", names.exportSpinner],\n },\n {\n default: () =>\n h(\n \"svg\",\n {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-width\": 2,\n },\n [h(\"path\", { d: \"M21 12a9 9 0 1 1-6.22-8.56\" })]\n ),\n }\n )\n ),\n Surface: (props) =>\n h(\n ElementCard,\n {\n attrs: {\n \"data-adapttable-part\": \"export-progress-surface\",\n class: names.exportProgress,\n role: \"region\",\n \"aria-label\": props.heading,\n },\n },\n {\n default: () => [\n h(\"h3\", props.heading),\n props.status === \"busy\"\n ? h(ElProgress, {\n \"data-adapttable-part\": \"export-progress-bar\",\n class: names.exportProgressBar,\n percentage: props.progress ?? 0,\n indeterminate: props.progress === undefined,\n \"aria-label\": props.progressLabel,\n })\n : null,\n props.message\n ? h(\n \"p\",\n {\n \"data-adapttable-part\": \"export-progress-message\",\n class: names.exportProgressMessage,\n },\n props.message\n )\n : null,\n props.error\n ? h(\n \"p\",\n {\n role: \"alert\",\n \"data-adapttable-part\": \"export-progress-message\",\n class: names.exportProgressMessage,\n },\n props.error\n )\n : null,\n h(\"div\", { \"data-adapttable-part\": \"export-progress-actions\" }, [\n ...(\n [\n [\"cancel\", props.cancel],\n [\"retry\", props.retry],\n [\"dismiss\", props.dismiss],\n ] as const\n ).map(([key, action]) =>\n action\n ? elementButton(\n {\n key,\n type: \"button\",\n \"data-adapttable-part\": `export-progress-${key}`,\n class: names.exportProgressButton,\n onClick: action.onAction,\n },\n action.label\n )\n : null\n ),\n props.download\n ? h(\n ElLink,\n {\n \"data-adapttable-part\": \"export-progress-download\",\n class: names.exportProgressDownload,\n href: props.download.url,\n download: \"\",\n },\n { default: () => props.download?.label }\n )\n : null,\n ]),\n ],\n }\n ),\n});\n","import type { TableFeature } from \"@adapttable/vue\";\nimport {\n EXPORT_CONTROL,\n ExportChrome,\n extendFeature,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { elementExportSlots } from \"../actions/elementExportSlots\";\n\n/** An export feature, drawn with Element's own export controls. */\nexport function withElementExport<TRow>(\n feature: TableFeature<TRow>\n): TableFeature<TRow> {\n return extendFeature(feature, [\n slotRender(EXPORT_CONTROL, (props) =>\n h(ExportChrome, {\n ...props,\n slots: elementExportSlots(props.classNames),\n })\n ),\n ]);\n}\n"],"mappings":";;;;;;AAMA,MAAa,sBACX,QAAsD,CAAC,OACtC;CACjB,SAAS,EAAE,OAAO,OAAO,WACvBA,eAAAA,cACE;EAAE,GAAG;EAAO,SAAS,MAAM,iBAAiB;CAAK,GACjD,CAAC,MAAM,iBAAiB,OAAO,OAAO,MAAM,KAAK,UAAA,GAE/CC,IAAAA,EAAAA,CACEC,aAAAA,QACA;EACE,eAAe;EACf,wBAAwB;EACxB,OAAO,CAAC,cAAc,MAAM,aAAa;CAC3C,GACA,EACE,gBAAA,GACED,IAAAA,EAAAA,CACE,OACA;EACE,SAAS;EACT,MAAM;EACN,QAAQ;EACR,gBAAgB;CAClB,GACA,EAAA,GAACA,IAAAA,EAAAA,CAAE,QAAQ,EAAE,GAAG,6BAA6B,CAAC,CAAC,CACjD,EACJ,CACF,CACJ;CACF,UAAU,WAAA,GACRA,IAAAA,EAAAA,CACEE,oBAAAA,aACA,EACE,OAAO;EACL,wBAAwB;EACxB,OAAO,MAAM;EACb,MAAM;EACN,cAAc,MAAM;CACtB,EACF,GACA,EACE,eAAe;GACbF,GAAAA,IAAAA,EAAAA,CAAE,MAAM,MAAM,OAAO;EACrB,MAAM,WAAW,UAAA,GACbA,IAAAA,EAAAA,CAAEG,aAAAA,YAAY;GACZ,wBAAwB;GACxB,OAAO,MAAM;GACb,YAAY,MAAM,YAAY;GAC9B,eAAe,MAAM,aAAa,KAAA;GAClC,cAAc,MAAM;EACtB,CAAC,IACD;EACJ,MAAM,WAAA,GACFH,IAAAA,EAAAA,CACE,KACA;GACE,wBAAwB;GACxB,OAAO,MAAM;EACf,GACA,MAAM,OACR,IACA;EACJ,MAAM,SAAA,GACFA,IAAAA,EAAAA,CACE,KACA;GACE,MAAM;GACN,wBAAwB;GACxB,OAAO,MAAM;EACf,GACA,MAAM,KACR,IACA;GACJA,GAAAA,IAAAA,EAAAA,CAAE,OAAO,EAAE,wBAAwB,0BAA0B,GAAG,CAC9D,GACE;GACE,CAAC,UAAU,MAAM,MAAM;GACvB,CAAC,SAAS,MAAM,KAAK;GACrB,CAAC,WAAW,MAAM,OAAO;EAC3B,CAAC,CACD,KAAK,CAAC,KAAK,YACX,SACID,eAAAA,cACE;GACE;GACA,MAAM;GACN,wBAAwB,mBAAmB;GAC3C,OAAO,MAAM;GACb,SAAS,OAAO;EAClB,GACA,OAAO,KACT,IACA,IACN,GACA,MAAM,YAAA,GACFC,IAAAA,EAAAA,CACEI,aAAAA,QACA;GACE,wBAAwB;GACxB,OAAO,MAAM;GACb,MAAM,MAAM,SAAS;GACrB,UAAU;EACZ,GACA,EAAE,eAAe,MAAM,UAAU,MAAM,CACzC,IACA,IACN,CAAC;CACH,EACF,CACF;AACJ;;;;ACzGA,SAAgB,kBACd,SACoB;CACpB,QAAA,GAAOC,wBAAAA,cAAAA,CAAc,SAAS,EAAA,GAC5BC,wBAAAA,WAAAA,CAAWC,wBAAAA,iBAAiB,WAAA,GAC1BC,IAAAA,EAAAA,CAAEC,wBAAAA,cAAc;EACd,GAAG;EACH,OAAO,mBAAmB,MAAM,UAAU;CAC5C,CAAC,CACH,CACF,CAAC;AACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adapttable/element-plus",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Element Plus data table controls for the AdaptTable Vue binding — sorting, filters, editing, grouping, responsive cards, URL state and RTL.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"module": "./dist/index.js",
|
|
28
28
|
"types": "./dist/index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@adapttable/vue": "0.
|
|
30
|
+
"@adapttable/vue": "0.9.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"element-plus": "^2.14.7",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button-BFjBL9m3.cjs","names":["defineComponent","shallowRef","mergeProps","h","ElButton"],"sources":["../src/controls/ref.ts","../src/controls/button.ts"],"sourcesContent":["import type { ElementRef } from \"@adapttable/vue\";\n\n/** Attribute bags carry optional callbacks; kit controls resolve their DOM target. */\nexport function isElementRef(value: unknown): value is ElementRef<Element> {\n return typeof value === \"function\";\n}\n","import type { Attrs } from \"@adapttable/vue\";\nimport { useElementRef } from \"@adapttable/vue/adapter\";\nimport { type ButtonInstance, ElButton } from \"element-plus\";\nimport {\n defineComponent,\n h,\n mergeProps,\n type PropType,\n shallowRef,\n type VNode,\n type VNodeChild,\n} from \"vue\";\n\nimport { isElementRef } from \"./ref\";\n\nconst ElementButton = defineComponent(\n (\n props: {\n readonly attrs: Attrs;\n readonly content: VNodeChild;\n readonly loading?: () => VNodeChild;\n },\n { attrs }\n ) => {\n const control = shallowRef<ButtonInstance>();\n useElementRef(\n () => {\n const target: unknown = control.value?.$el;\n if (target == null) return null;\n return target instanceof HTMLButtonElement ? target : null;\n },\n () => (isElementRef(props.attrs.ref) ? props.attrs.ref : undefined)\n );\n return () => {\n const incoming = mergeProps(props.attrs, attrs);\n const nativeAttrs = Object.fromEntries(\n Object.entries(incoming).filter(\n ([name]) => name !== \"ref\" && name !== \"type\"\n )\n );\n const type = incoming.type;\n const nativeType =\n type === \"submit\" || type === \"reset\" ? type : \"button\";\n return h(\n ElButton,\n { ...nativeAttrs, nativeType, ref: control },\n props.loading\n ? { default: () => props.content, loading: props.loading }\n : { default: () => props.content }\n );\n };\n },\n {\n name: \"ElementButton\",\n props: {\n attrs: { type: Object as PropType<Attrs> },\n content: {\n type: [String, Number, Boolean, Array, Object] as PropType<VNodeChild>,\n default: undefined,\n },\n loading: { type: Function as PropType<(() => VNodeChild) | undefined> },\n },\n inheritAttrs: false,\n }\n);\n\n/**\n * Element Plus retains its native button; one setup scope owns its DOM ref.\n * `loading` replaces ElButton's busy icon while its `loading` prop is set.\n */\nexport function elementButton(\n attrs: Attrs,\n content: VNodeChild,\n loading?: () => VNodeChild\n): VNode {\n const key = attrs.key;\n return h(ElementButton, {\n key:\n typeof key === \"string\" ||\n typeof key === \"number\" ||\n typeof key === \"symbol\"\n ? key\n : undefined,\n attrs,\n content,\n loading,\n });\n}\n"],"mappings":";;;;;AAGA,SAAgB,aAAa,OAA8C;CACzE,OAAO,OAAO,UAAU;AAC1B;;;ACUA,MAAM,iBAAA,GAAgBA,IAAAA,gBAAAA,EAElB,OAKA,EAAE,YACC;CACH,MAAM,WAAA,GAAUC,IAAAA,WAAAA,CAA2B;CAC3C,CAAA,GAAA,wBAAA,cAAA,OACQ;EACJ,MAAM,SAAkB,QAAQ,OAAO;EACvC,IAAI,UAAU,MAAM,OAAO;EAC3B,OAAO,kBAAkB,oBAAoB,SAAS;CACxD,SACO,aAAa,MAAM,MAAM,GAAG,IAAI,MAAM,MAAM,MAAM,KAAA,CAC3D;CACA,aAAa;EACX,MAAM,YAAA,GAAWC,IAAAA,WAAAA,CAAW,MAAM,OAAO,KAAK;EAC9C,MAAM,cAAc,OAAO,YACzB,OAAO,QAAQ,QAAQ,CAAC,CAAC,QACtB,CAAC,UAAU,SAAS,SAAS,SAAS,MACzC,CACF;EACA,MAAM,OAAO,SAAS;EACtB,MAAM,aACJ,SAAS,YAAY,SAAS,UAAU,OAAO;EACjD,QAAA,GAAOC,IAAAA,EAAAA,CACLC,aAAAA,UACA;GAAE,GAAG;GAAa;GAAY,KAAK;EAAQ,GAC3C,MAAM,UACF;GAAE,eAAe,MAAM;GAAS,SAAS,MAAM;EAAQ,IACvD,EAAE,eAAe,MAAM,QAAQ,CACrC;CACF;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EAAE,MAAM,OAA0B;EACzC,SAAS;GACP,MAAM;IAAC;IAAQ;IAAQ;IAAS;IAAO;GAAM;GAC7C,SAAS,KAAA;EACX;EACA,SAAS,EAAE,MAAM,SAAqD;CACxE;CACA,cAAc;AAChB,CACF;;;;;AAMA,SAAgB,cACd,OACA,SACA,SACO;CACP,MAAM,MAAM,MAAM;CAClB,QAAA,GAAOD,IAAAA,EAAAA,CAAE,eAAe;EACtB,KACE,OAAO,QAAQ,YACf,OAAO,QAAQ,YACf,OAAO,QAAQ,WACX,MACA,KAAA;EACN;EACA;EACA;CACF,CAAC;AACH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button-DwB4UxI2.js","names":[],"sources":["../src/controls/ref.ts","../src/controls/button.ts"],"sourcesContent":["import type { ElementRef } from \"@adapttable/vue\";\n\n/** Attribute bags carry optional callbacks; kit controls resolve their DOM target. */\nexport function isElementRef(value: unknown): value is ElementRef<Element> {\n return typeof value === \"function\";\n}\n","import type { Attrs } from \"@adapttable/vue\";\nimport { useElementRef } from \"@adapttable/vue/adapter\";\nimport { type ButtonInstance, ElButton } from \"element-plus\";\nimport {\n defineComponent,\n h,\n mergeProps,\n type PropType,\n shallowRef,\n type VNode,\n type VNodeChild,\n} from \"vue\";\n\nimport { isElementRef } from \"./ref\";\n\nconst ElementButton = defineComponent(\n (\n props: {\n readonly attrs: Attrs;\n readonly content: VNodeChild;\n readonly loading?: () => VNodeChild;\n },\n { attrs }\n ) => {\n const control = shallowRef<ButtonInstance>();\n useElementRef(\n () => {\n const target: unknown = control.value?.$el;\n if (target == null) return null;\n return target instanceof HTMLButtonElement ? target : null;\n },\n () => (isElementRef(props.attrs.ref) ? props.attrs.ref : undefined)\n );\n return () => {\n const incoming = mergeProps(props.attrs, attrs);\n const nativeAttrs = Object.fromEntries(\n Object.entries(incoming).filter(\n ([name]) => name !== \"ref\" && name !== \"type\"\n )\n );\n const type = incoming.type;\n const nativeType =\n type === \"submit\" || type === \"reset\" ? type : \"button\";\n return h(\n ElButton,\n { ...nativeAttrs, nativeType, ref: control },\n props.loading\n ? { default: () => props.content, loading: props.loading }\n : { default: () => props.content }\n );\n };\n },\n {\n name: \"ElementButton\",\n props: {\n attrs: { type: Object as PropType<Attrs> },\n content: {\n type: [String, Number, Boolean, Array, Object] as PropType<VNodeChild>,\n default: undefined,\n },\n loading: { type: Function as PropType<(() => VNodeChild) | undefined> },\n },\n inheritAttrs: false,\n }\n);\n\n/**\n * Element Plus retains its native button; one setup scope owns its DOM ref.\n * `loading` replaces ElButton's busy icon while its `loading` prop is set.\n */\nexport function elementButton(\n attrs: Attrs,\n content: VNodeChild,\n loading?: () => VNodeChild\n): VNode {\n const key = attrs.key;\n return h(ElementButton, {\n key:\n typeof key === \"string\" ||\n typeof key === \"number\" ||\n typeof key === \"symbol\"\n ? key\n : undefined,\n attrs,\n content,\n loading,\n });\n}\n"],"mappings":";;;;;AAGA,SAAgB,aAAa,OAA8C;CACzE,OAAO,OAAO,UAAU;AAC1B;;;ACUA,MAAM,gBAAgB,iBAElB,OAKA,EAAE,YACC;CACH,MAAM,UAAU,WAA2B;CAC3C,oBACQ;EACJ,MAAM,SAAkB,QAAQ,OAAO;EACvC,IAAI,UAAU,MAAM,OAAO;EAC3B,OAAO,kBAAkB,oBAAoB,SAAS;CACxD,SACO,aAAa,MAAM,MAAM,GAAG,IAAI,MAAM,MAAM,MAAM,KAAA,CAC3D;CACA,aAAa;EACX,MAAM,WAAW,WAAW,MAAM,OAAO,KAAK;EAC9C,MAAM,cAAc,OAAO,YACzB,OAAO,QAAQ,QAAQ,CAAC,CAAC,QACtB,CAAC,UAAU,SAAS,SAAS,SAAS,MACzC,CACF;EACA,MAAM,OAAO,SAAS;EACtB,MAAM,aACJ,SAAS,YAAY,SAAS,UAAU,OAAO;EACjD,OAAO,EACL,UACA;GAAE,GAAG;GAAa;GAAY,KAAK;EAAQ,GAC3C,MAAM,UACF;GAAE,eAAe,MAAM;GAAS,SAAS,MAAM;EAAQ,IACvD,EAAE,eAAe,MAAM,QAAQ,CACrC;CACF;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EAAE,MAAM,OAA0B;EACzC,SAAS;GACP,MAAM;IAAC;IAAQ;IAAQ;IAAS;IAAO;GAAM;GAC7C,SAAS,KAAA;EACX;EACA,SAAS,EAAE,MAAM,SAAqD;CACxE;CACA,cAAc;AAChB,CACF;;;;;AAMA,SAAgB,cACd,OACA,SACA,SACO;CACP,MAAM,MAAM,MAAM;CAClB,OAAO,EAAE,eAAe;EACtB,KACE,OAAO,QAAQ,YACf,OAAO,QAAQ,YACf,OAAO,QAAQ,WACX,MACA,KAAA;EACN;EACA;EACA;CACF,CAAC;AACH"}
|