@adapttable/element-plus 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ElementCheckbox-BewKx6sv.cjs → ElementCheckbox-BXSH2jHY.cjs} +19 -13
- package/dist/ElementCheckbox-BXSH2jHY.cjs.map +1 -0
- package/dist/{ElementCheckbox-BQN4_eas.js → ElementCheckbox-DobrxadY.js} +21 -15
- package/dist/ElementCheckbox-DobrxadY.js.map +1 -0
- package/dist/{ElementColumnMenuPanel-D9oWJf02.js → ElementColumnMenuPanel-CPW4wU3M.js} +5 -5
- package/dist/ElementColumnMenuPanel-CPW4wU3M.js.map +1 -0
- package/dist/{ElementColumnMenuPanel-DavsUQAR.cjs → ElementColumnMenuPanel-Ddh01A17.cjs} +3 -3
- package/dist/ElementColumnMenuPanel-Ddh01A17.cjs.map +1 -0
- package/dist/{ElementFilterHeaderRow-C3N5F-sW.cjs → ElementFilterHeaderRow-D8ZZ3BOH.cjs} +32 -16
- package/dist/ElementFilterHeaderRow-D8ZZ3BOH.cjs.map +1 -0
- package/dist/{ElementFilterHeaderRow-qiv68upK.js → ElementFilterHeaderRow-DGp4Wrts.js} +33 -17
- package/dist/ElementFilterHeaderRow-DGp4Wrts.js.map +1 -0
- package/dist/ElementFilterHeaderRow.vue-aMWpPgI9.d.cts.map +1 -1
- package/dist/ElementFilterHeaderRow.vue-aMWpPgI9.d.ts.map +1 -1
- package/dist/{ElementFilterSurface-CUpyLfPF.cjs → ElementFilterSurface-CUgNfyWW.cjs} +8 -9
- package/dist/ElementFilterSurface-CUgNfyWW.cjs.map +1 -0
- package/dist/{ElementFilterSurface-CztEiJ0k.js → ElementFilterSurface-CiOApO3l.js} +10 -11
- package/dist/ElementFilterSurface-CiOApO3l.js.map +1 -0
- package/dist/{ElementInput-vBVDBaLp.cjs → ElementInput-BF97xXSC.cjs} +12 -7
- package/dist/ElementInput-BF97xXSC.cjs.map +1 -0
- package/dist/{ElementInput-BsoAvPfO.js → ElementInput-Cn9hpa9j.js} +13 -8
- package/dist/ElementInput-Cn9hpa9j.js.map +1 -0
- package/dist/{ElementRowActions-BKfX2XRn.js → ElementRowActions-CUlFbY6s.js} +5 -5
- package/dist/ElementRowActions-CUlFbY6s.js.map +1 -0
- package/dist/{ElementRowActions-B_rR7qSj.cjs → ElementRowActions-ClYC3Ssq.cjs} +5 -5
- package/dist/ElementRowActions-ClYC3Ssq.cjs.map +1 -0
- package/dist/{ElementSelect-CvGw_zHh.cjs → ElementSelect-1UwtGCCr.cjs} +13 -8
- package/dist/ElementSelect-1UwtGCCr.cjs.map +1 -0
- package/dist/{ElementSelect-BtmVMA7B.js → ElementSelect-BxFmnPpv.js} +14 -9
- package/dist/ElementSelect-BxFmnPpv.js.map +1 -0
- package/dist/{assistant-B27ZguV8.cjs → assistant-D4l4OdXN.cjs} +3 -3
- package/dist/{assistant-B27ZguV8.cjs.map → assistant-D4l4OdXN.cjs.map} +1 -1
- package/dist/{assistant-BPwGaQnx.js → assistant-DRDxJajO.js} +3 -3
- package/dist/{assistant-BPwGaQnx.js.map → assistant-DRDxJajO.js.map} +1 -1
- package/dist/assistant.cjs +1 -1
- package/dist/assistant.js +1 -1
- package/dist/batch-editing.cjs +1 -1
- package/dist/batch-editing.js +1 -1
- package/dist/{cell-navigation-BXE28fwQ.cjs → cell-navigation-DJ-_1Mjr.cjs} +2 -2
- package/dist/{cell-navigation-BXE28fwQ.cjs.map → cell-navigation-DJ-_1Mjr.cjs.map} +1 -1
- package/dist/{cell-navigation-THnr6YdK.js → cell-navigation-arDY86xD.js} +2 -2
- package/dist/{cell-navigation-THnr6YdK.js.map → cell-navigation-arDY86xD.js.map} +1 -1
- package/dist/cell-navigation.cjs +1 -1
- package/dist/cell-navigation.js +1 -1
- package/dist/{checkbox-DhUYYwWe.cjs → checkbox-BF19iMgI.cjs} +2 -2
- package/dist/{checkbox-DhUYYwWe.cjs.map → checkbox-BF19iMgI.cjs.map} +1 -1
- package/dist/{column-menu-Dna4oiPc.js → column-menu-BUxMPyJI.js} +7 -8
- package/dist/column-menu-BUxMPyJI.js.map +1 -0
- package/dist/{column-menu-C0YWdhRz.d.ts → column-menu-CAkx6AjR.d.ts} +5 -6
- package/dist/column-menu-CAkx6AjR.d.ts.map +1 -0
- package/dist/{column-menu-BUiQUex0.d.cts → column-menu-DsL_xeEM.d.cts} +5 -6
- package/dist/column-menu-DsL_xeEM.d.cts.map +1 -0
- package/dist/{column-menu-CNxXJ-ra.cjs → column-menu-jNw7kuxp.cjs} +6 -7
- package/dist/column-menu-jNw7kuxp.cjs.map +1 -0
- package/dist/column-menu.cjs +1 -1
- package/dist/column-menu.d.cts +1 -1
- package/dist/column-menu.d.ts +1 -1
- package/dist/column-menu.js +1 -1
- package/dist/column-selection.cjs +1 -1
- package/dist/column-selection.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/{density-Bj1pck4x.cjs → density-CJLZxF1h.cjs} +2 -2
- package/dist/density-CJLZxF1h.cjs.map +1 -0
- package/dist/{density-ChRp0NG3.js → density-OeJSiWSC.js} +4 -4
- package/dist/density-OeJSiWSC.js.map +1 -0
- package/dist/density.cjs +1 -1
- package/dist/density.js +1 -1
- package/dist/{editing-9371TGFz.cjs → editing-Bhw_4VG8.cjs} +16 -16
- package/dist/editing-Bhw_4VG8.cjs.map +1 -0
- package/dist/editing-BnLdNDlo.d.ts.map +1 -1
- package/dist/editing-Cg6ZNvSa.d.cts.map +1 -1
- package/dist/{editing-B_HAxfh4.js → editing-DHjzbw-I.js} +18 -18
- package/dist/editing-DHjzbw-I.js.map +1 -0
- package/dist/editing.cjs +1 -1
- package/dist/editing.js +1 -1
- package/dist/{elementHierarchyControlSlots-Ctcmq3T2.js → elementHierarchyControlSlots-21LL1wEw.js} +4 -4
- package/dist/{elementHierarchyControlSlots-Ctcmq3T2.js.map → elementHierarchyControlSlots-21LL1wEw.js.map} +1 -1
- package/dist/{elementRemainingControls-BPGBbbUF.js → elementRemainingControls-6tN9tgWx.js} +6 -6
- package/dist/elementRemainingControls-6tN9tgWx.js.map +1 -0
- package/dist/{elementRemainingControls-CtY2jZWN.cjs → elementRemainingControls-DvVVLXE0.cjs} +4 -4
- package/dist/elementRemainingControls-DvVVLXE0.cjs.map +1 -0
- package/dist/export-csv-DRDjZuQj.d.cts +9 -0
- package/dist/export-csv-DRDjZuQj.d.cts.map +1 -0
- package/dist/export-csv-VyICO_s0.d.ts +9 -0
- package/dist/export-csv-VyICO_s0.d.ts.map +1 -0
- package/dist/export-csv.cjs +11 -0
- package/dist/export-csv.cjs.map +1 -0
- package/dist/export-csv.d.cts +2 -0
- package/dist/export-csv.d.ts +2 -0
- package/dist/export-csv.js +10 -0
- package/dist/export-csv.js.map +1 -0
- package/dist/export-pdf.cjs +53 -0
- package/dist/export-pdf.cjs.map +1 -0
- package/dist/export-pdf.d.cts +8 -0
- package/dist/export-pdf.d.cts.map +1 -0
- package/dist/export-pdf.d.ts +8 -0
- package/dist/export-pdf.d.ts.map +1 -0
- package/dist/export-pdf.js +10 -0
- package/dist/export-pdf.js.map +1 -0
- package/dist/export-xlsx.cjs +23 -0
- package/dist/export-xlsx.cjs.map +1 -0
- package/dist/export-xlsx.d.cts +8 -0
- package/dist/export-xlsx.d.cts.map +1 -0
- package/dist/export-xlsx.d.ts +8 -0
- package/dist/export-xlsx.d.ts.map +1 -0
- package/dist/export-xlsx.js +10 -0
- package/dist/export-xlsx.js.map +1 -0
- package/dist/export.cjs +2 -2
- package/dist/export.d.cts +2 -8
- package/dist/export.d.ts +2 -8
- package/dist/export.js +1 -1
- package/dist/features.cjs +16 -15
- package/dist/features.d.cts +4 -3
- package/dist/features.d.ts +4 -3
- package/dist/features.js +15 -14
- package/dist/{filters-BMS9STAJ.js → filters-87q6jAVU.js} +73 -73
- package/dist/filters-87q6jAVU.js.map +1 -0
- package/dist/{filters-BYHvvws9.d.cts → filters-BySwxJJ0.d.cts} +9 -11
- package/dist/filters-BySwxJJ0.d.cts.map +1 -0
- package/dist/{filters-BuzAGNaj.cjs → filters-bdHAQnex.cjs} +72 -72
- package/dist/filters-bdHAQnex.cjs.map +1 -0
- package/dist/{filters-BJDFrg_k.d.ts → filters-iRpu_mXa.d.ts} +9 -11
- package/dist/filters-iRpu_mXa.d.ts.map +1 -0
- package/dist/filters.cjs +2 -2
- package/dist/filters.d.cts +1 -1
- package/dist/filters.d.ts +1 -1
- package/dist/filters.js +2 -2
- package/dist/{find-in-table--8ZBYijC.js → find-in-table-B9ySCCJh.js} +2 -2
- package/dist/{find-in-table--8ZBYijC.js.map → find-in-table-B9ySCCJh.js.map} +1 -1
- package/dist/{find-in-table-DOn2Hua1.cjs → find-in-table-WtXzIkkg.cjs} +2 -2
- package/dist/{find-in-table-DOn2Hua1.cjs.map → find-in-table-WtXzIkkg.cjs.map} +1 -1
- package/dist/find-in-table.cjs +1 -1
- package/dist/find-in-table.js +1 -1
- package/dist/{grouping-panel-CscefKyP.js → grouping-panel-B7j8sSpT.js} +3 -3
- package/dist/{grouping-panel-CscefKyP.js.map → grouping-panel-B7j8sSpT.js.map} +1 -1
- package/dist/{grouping-panel-C_QWRh_Q.cjs → grouping-panel-B_ibl915.cjs} +3 -3
- package/dist/{grouping-panel-C_QWRh_Q.cjs.map → grouping-panel-B_ibl915.cjs.map} +1 -1
- package/dist/grouping-panel.cjs +1 -1
- package/dist/grouping-panel.js +1 -1
- package/dist/grouping.cjs +2 -2
- package/dist/grouping.cjs.map +1 -1
- package/dist/grouping.js +2 -2
- package/dist/grouping.js.map +1 -1
- package/dist/header-filters-B2B5RqQS.d.ts.map +1 -1
- package/dist/{header-filters-BDSKDeJ9.cjs → header-filters-Cu7t_2IW.cjs} +8 -5
- package/dist/header-filters-Cu7t_2IW.cjs.map +1 -0
- package/dist/{header-filters-FQFlnVM9.js → header-filters-DUZI1x70.js} +9 -6
- package/dist/header-filters-DUZI1x70.js.map +1 -0
- package/dist/header-filters-hGm_7LFO.d.cts.map +1 -1
- package/dist/header-filters.cjs +2 -2
- package/dist/header-filters.js +2 -2
- package/dist/index.cjs +110 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +113 -51
- package/dist/index.js.map +1 -1
- package/dist/pivot.cjs +4 -5
- package/dist/pivot.cjs.map +1 -1
- package/dist/pivot.d.cts +3 -4
- package/dist/pivot.d.cts.map +1 -1
- package/dist/pivot.d.ts +3 -4
- package/dist/pivot.d.ts.map +1 -1
- package/dist/pivot.js +5 -6
- package/dist/pivot.js.map +1 -1
- package/dist/preset.cjs +9 -8
- package/dist/preset.cjs.map +1 -1
- package/dist/preset.js +8 -7
- package/dist/preset.js.map +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-kuiFvbsM.js → row-reorder-BYwX3CBP.js} +4 -4
- package/dist/row-reorder-BYwX3CBP.js.map +1 -0
- package/dist/{row-reorder-BNscjPNy.cjs → row-reorder-MSR2yDN6.cjs} +2 -2
- package/dist/row-reorder-MSR2yDN6.cjs.map +1 -0
- package/dist/row-reorder.cjs +1 -1
- package/dist/row-reorder.js +1 -1
- package/dist/rowActionsSlot-CdnzwBmt.js.map +1 -1
- package/dist/rowActionsSlot-Ps5hHI6n.cjs.map +1 -1
- package/dist/{saved-views-DW8WybwV.js → saved-views-DDo4Bl-f.js} +3 -3
- package/dist/{saved-views-DW8WybwV.js.map → saved-views-DDo4Bl-f.js.map} +1 -1
- package/dist/{saved-views-BTJxWOyY.cjs → saved-views-luZVHu3w.cjs} +3 -3
- package/dist/{saved-views-BTJxWOyY.cjs.map → saved-views-luZVHu3w.cjs.map} +1 -1
- package/dist/saved-views.cjs +1 -1
- package/dist/saved-views.js +1 -1
- package/dist/{scrollbarGutter-B-QczwA9.cjs → scrollbarGutter-CV4T0Q-9.cjs} +2 -2
- package/dist/{scrollbarGutter-B-QczwA9.cjs.map → scrollbarGutter-CV4T0Q-9.cjs.map} +1 -1
- package/dist/{scrollbarGutter-BNp0-4l1.js → scrollbarGutter-D9pkb_r0.js} +2 -2
- package/dist/{scrollbarGutter-BNp0-4l1.js.map → scrollbarGutter-D9pkb_r0.js.map} +1 -1
- package/dist/side-panel.cjs +1 -1
- package/dist/side-panel.js +1 -1
- package/dist/styles.css +33 -3
- package/dist/{export-DR1t4N5Q.js → withElementExport-B97s6RIr.js} +6 -6
- package/dist/withElementExport-B97s6RIr.js.map +1 -0
- package/dist/{export-CL36qPVY.cjs → withElementExport-J-6vXfL9.cjs} +7 -7
- package/dist/withElementExport-J-6vXfL9.cjs.map +1 -0
- package/package.json +33 -4
- package/dist/ElementCheckbox-BQN4_eas.js.map +0 -1
- package/dist/ElementCheckbox-BewKx6sv.cjs.map +0 -1
- package/dist/ElementColumnMenuPanel-D9oWJf02.js.map +0 -1
- package/dist/ElementColumnMenuPanel-DavsUQAR.cjs.map +0 -1
- package/dist/ElementFilterHeaderRow-C3N5F-sW.cjs.map +0 -1
- package/dist/ElementFilterHeaderRow-qiv68upK.js.map +0 -1
- package/dist/ElementFilterSurface-CUpyLfPF.cjs.map +0 -1
- package/dist/ElementFilterSurface-CztEiJ0k.js.map +0 -1
- package/dist/ElementInput-BsoAvPfO.js.map +0 -1
- package/dist/ElementInput-vBVDBaLp.cjs.map +0 -1
- package/dist/ElementRowActions-BKfX2XRn.js.map +0 -1
- package/dist/ElementRowActions-B_rR7qSj.cjs.map +0 -1
- package/dist/ElementSelect-BtmVMA7B.js.map +0 -1
- package/dist/ElementSelect-CvGw_zHh.cjs.map +0 -1
- package/dist/column-menu-BUiQUex0.d.cts.map +0 -1
- package/dist/column-menu-C0YWdhRz.d.ts.map +0 -1
- package/dist/column-menu-CNxXJ-ra.cjs.map +0 -1
- package/dist/column-menu-Dna4oiPc.js.map +0 -1
- package/dist/density-Bj1pck4x.cjs.map +0 -1
- package/dist/density-ChRp0NG3.js.map +0 -1
- package/dist/editing-9371TGFz.cjs.map +0 -1
- package/dist/editing-B_HAxfh4.js.map +0 -1
- package/dist/elementRemainingControls-BPGBbbUF.js.map +0 -1
- package/dist/elementRemainingControls-CtY2jZWN.cjs.map +0 -1
- package/dist/export-CL36qPVY.cjs.map +0 -1
- package/dist/export-DR1t4N5Q.js.map +0 -1
- package/dist/export.d.cts.map +0 -1
- package/dist/export.d.ts.map +0 -1
- package/dist/filters-BJDFrg_k.d.ts.map +0 -1
- package/dist/filters-BMS9STAJ.js.map +0 -1
- package/dist/filters-BYHvvws9.d.cts.map +0 -1
- package/dist/filters-BuzAGNaj.cjs.map +0 -1
- package/dist/header-filters-BDSKDeJ9.cjs.map +0 -1
- package/dist/header-filters-FQFlnVM9.js.map +0 -1
- package/dist/row-reorder-BNscjPNy.cjs.map +0 -1
- package/dist/row-reorder-kuiFvbsM.js.map +0 -1
package/dist/pivot.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pivot.cjs","names":["h","elementButton","ElementSelect","PivotPanelChrome"],"sources":["../src/pivot.ts"],"sourcesContent":["/** Pivot configuration with Element Plus selects and buttons over the binding's Chrome. */\nimport \"./pivot.css\";\n\nimport {\n PivotPanelChrome,\n type PivotPanelChromeProps,\n type PivotPanelSlots,\n} from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"./controls/button\";\nimport ElementSelect from \"./controls/ElementSelect.vue\";\n\nexport type PivotPanelProps = Omit<PivotPanelChromeProps, \"slots\">;\n\nconst slots: PivotPanelSlots = {\n Surface: ({ children, className, ...attrs }) =>\n h(\n \"div\",\n { ...attrs, class: [\"adapttable-element-plus-pivot\", className] },\n [children]\n ),\n Zone: ({ children, label, zone, ...attrs }) =>\n h(\"fieldset\", { ...attrs, \"data-zone\": zone }, [\n h(\"legend\", label),\n children,\n ]),\n Field: ({\n label,\n aggregation,\n onMoveUp,\n onMoveDown,\n onRemove,\n moveUpLabel,\n moveDownLabel,\n removeLabel,\n ...attrs\n }) =>\n h(\"div\", attrs, [\n h(\"span\", label),\n aggregation,\n elementButton(\n {\n type: \"button\",\n disabled: !onMoveUp,\n \"aria-label\": `${moveUpLabel}: ${label}`,\n onClick: onMoveUp,\n },\n moveUpLabel\n ),\n elementButton(\n {\n type: \"button\",\n disabled: !onMoveDown,\n \"aria-label\": `${moveDownLabel}: ${label}`,\n onClick: onMoveDown,\n },\n moveDownLabel\n ),\n elementButton(\n {\n type: \"button\",\n \"aria-label\": `${removeLabel}: ${label}`,\n onClick: onRemove,\n },\n removeLabel\n ),\n ]),\n Add: ({ label, options, onAdd }) =>\n h(ElementSelect, {\n \"aria-label\": label,\n disabled: !options.length,\n value: \"\",\n options: [\n { value: \"\", label },\n ...options.map((item) => ({ value: item.key, label: item.label })),\n ],\n onChange: (value: string) => {\n if (value) onAdd(value);\n },\n }),\n Agg: ({ label, value, options, optionLabels, onChange }) =>\n h(ElementSelect, {\n \"aria-label\": label,\n value,\n options: options.map((item) => ({\n value: item,\n label: optionLabels[item],\n })),\n onChange: (next: string) => {\n const option = options.find((item) => item === next);\n if (option) onChange(option);\n },\n }),\n};\n\n/** The pivot axes and measures, edited with Element Plus controls. */\nexport function PivotPanel(props: PivotPanelProps) {\n
|
|
1
|
+
{"version":3,"file":"pivot.cjs","names":["h","elementButton","ElementSelect","PivotPanelChrome"],"sources":["../src/pivot.ts"],"sourcesContent":["/** Pivot configuration with Element Plus selects and buttons over the binding's Chrome. */\nimport \"./pivot.css\";\n\nimport {\n PivotPanelChrome,\n type PivotPanelChromeProps,\n type PivotPanelSlots,\n withProps,\n} from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"./controls/button\";\nimport ElementSelect from \"./controls/ElementSelect.vue\";\n\nexport type PivotPanelProps = Omit<PivotPanelChromeProps, \"slots\">;\n\nconst slots: PivotPanelSlots = {\n Surface: ({ children, className, ...attrs }) =>\n h(\n \"div\",\n { ...attrs, class: [\"adapttable-element-plus-pivot\", className] },\n [children]\n ),\n Zone: ({ children, label, zone, ...attrs }) =>\n h(\"fieldset\", { ...attrs, \"data-zone\": zone }, [\n h(\"legend\", label),\n children,\n ]),\n Field: ({\n label,\n aggregation,\n onMoveUp,\n onMoveDown,\n onRemove,\n moveUpLabel,\n moveDownLabel,\n removeLabel,\n ...attrs\n }) =>\n h(\"div\", attrs, [\n h(\"span\", label),\n aggregation,\n elementButton(\n {\n type: \"button\",\n disabled: !onMoveUp,\n \"aria-label\": `${moveUpLabel}: ${label}`,\n onClick: onMoveUp,\n },\n moveUpLabel\n ),\n elementButton(\n {\n type: \"button\",\n disabled: !onMoveDown,\n \"aria-label\": `${moveDownLabel}: ${label}`,\n onClick: onMoveDown,\n },\n moveDownLabel\n ),\n elementButton(\n {\n type: \"button\",\n \"aria-label\": `${removeLabel}: ${label}`,\n onClick: onRemove,\n },\n removeLabel\n ),\n ]),\n Add: ({ label, options, onAdd }) =>\n h(ElementSelect, {\n \"aria-label\": label,\n disabled: !options.length,\n value: \"\",\n options: [\n { value: \"\", label },\n ...options.map((item) => ({ value: item.key, label: item.label })),\n ],\n onChange: (value: string) => {\n if (value) onAdd(value);\n },\n }),\n Agg: ({ label, value, options, optionLabels, onChange }) =>\n h(ElementSelect, {\n \"aria-label\": label,\n value,\n options: options.map((item) => ({\n value: item,\n label: optionLabels[item],\n })),\n onChange: (next: string) => {\n const option = options.find((item) => item === next);\n if (option) onChange(option);\n },\n }),\n};\n\n/** The pivot axes and measures, edited with Element Plus controls. */\nexport const PivotPanel = /* @__PURE__ */ withProps(\n function PivotPanel(props: PivotPanelProps) {\n return PivotPanelChrome({ ...props, slots });\n },\n [\"fields\", \"config\", \"onChange\", \"labels\", \"className\"]\n);\n"],"mappings":";;;;;;AAgBA,MAAM,QAAyB;CAC7B,UAAU,EAAE,UAAU,WAAW,GAAG,aAAA,GAClCA,IAAAA,EAAAA,CACE,OACA;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,MAAM,SAAS,QAAQ,MAAM,SAAS,SAAS,IAAI;GACnD,IAAI,QAAQ,SAAS,MAAM;EAC7B;CACF,CAAC;AACL;;AAGA,MAAa,aAA6B,iBAAA,GAAA,wBAAA,UAAA,CACxC,SAAS,WAAW,OAAwB;CAC1C,QAAA,GAAOC,wBAAAA,iBAAAA,CAAiB;EAAE,GAAG;EAAO;CAAM,CAAC;AAC7C,GACA;CAAC;CAAU;CAAU;CAAY;CAAU;AAAW,CACxD"}
|
package/dist/pivot.d.cts
CHANGED
|
@@ -2,10 +2,9 @@ import { PivotPanelChromeProps } from "@adapttable/vue/adapter";
|
|
|
2
2
|
//#region src/pivot.d.ts
|
|
3
3
|
type PivotPanelProps = Omit<PivotPanelChromeProps, "slots">;
|
|
4
4
|
/** The pivot axes and measures, edited with Element Plus controls. */
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
5
|
+
declare const PivotPanel: ((props: PivotPanelProps) => import("vue").VNodeChild) & {
|
|
6
|
+
props: string[];
|
|
7
|
+
};
|
|
9
8
|
//#endregion
|
|
10
9
|
export { PivotPanel, PivotPanelProps };
|
|
11
10
|
//# sourceMappingURL=pivot.d.cts.map
|
package/dist/pivot.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pivot.d.cts","names":[],"sources":["../src/pivot.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"pivot.d.cts","names":[],"sources":["../src/pivot.ts"],"mappings":";;KAcY,kBAAkB,KAAK;;cAoFtB,cAAU,OACM,kCAAe"}
|
package/dist/pivot.d.ts
CHANGED
|
@@ -2,10 +2,9 @@ import { PivotPanelChromeProps } from "@adapttable/vue/adapter";
|
|
|
2
2
|
//#region src/pivot.d.ts
|
|
3
3
|
type PivotPanelProps = Omit<PivotPanelChromeProps, "slots">;
|
|
4
4
|
/** The pivot axes and measures, edited with Element Plus controls. */
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
5
|
+
declare const PivotPanel: ((props: PivotPanelProps) => import("vue").VNodeChild) & {
|
|
6
|
+
props: string[];
|
|
7
|
+
};
|
|
9
8
|
//#endregion
|
|
10
9
|
export { PivotPanel, PivotPanelProps };
|
|
11
10
|
//# sourceMappingURL=pivot.d.ts.map
|
package/dist/pivot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pivot.d.ts","names":[],"sources":["../src/pivot.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"pivot.d.ts","names":[],"sources":["../src/pivot.ts"],"mappings":";;KAcY,kBAAkB,KAAK;;cAoFtB,cAAU,OACM,kCAAe"}
|
package/dist/pivot.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as elementButton } from "./button-DwB4UxI2.js";
|
|
2
|
-
import { t as _sfc_main } from "./ElementSelect-
|
|
2
|
+
import { t as _sfc_main } from "./ElementSelect-BxFmnPpv.js";
|
|
3
3
|
import { h } from "vue";
|
|
4
|
-
import { PivotPanelChrome } from "@adapttable/vue/adapter";
|
|
4
|
+
import { PivotPanelChrome, withProps } from "@adapttable/vue/adapter";
|
|
5
5
|
//#region src/pivot.ts
|
|
6
6
|
const slots = {
|
|
7
7
|
Surface: ({ children, className, ...attrs }) => h("div", {
|
|
@@ -62,19 +62,18 @@ const slots = {
|
|
|
62
62
|
})
|
|
63
63
|
};
|
|
64
64
|
/** The pivot axes and measures, edited with Element Plus controls. */
|
|
65
|
-
function PivotPanel(props) {
|
|
65
|
+
const PivotPanel = /* @__PURE__ */ withProps(function PivotPanel(props) {
|
|
66
66
|
return PivotPanelChrome({
|
|
67
67
|
...props,
|
|
68
68
|
slots
|
|
69
69
|
});
|
|
70
|
-
}
|
|
71
|
-
PivotPanel.props = [
|
|
70
|
+
}, [
|
|
72
71
|
"fields",
|
|
73
72
|
"config",
|
|
74
73
|
"onChange",
|
|
75
74
|
"labels",
|
|
76
75
|
"className"
|
|
77
|
-
];
|
|
76
|
+
]);
|
|
78
77
|
//#endregion
|
|
79
78
|
export { PivotPanel };
|
|
80
79
|
|
package/dist/pivot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pivot.js","names":["ElementSelect"],"sources":["../src/pivot.ts"],"sourcesContent":["/** Pivot configuration with Element Plus selects and buttons over the binding's Chrome. */\nimport \"./pivot.css\";\n\nimport {\n PivotPanelChrome,\n type PivotPanelChromeProps,\n type PivotPanelSlots,\n} from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"./controls/button\";\nimport ElementSelect from \"./controls/ElementSelect.vue\";\n\nexport type PivotPanelProps = Omit<PivotPanelChromeProps, \"slots\">;\n\nconst slots: PivotPanelSlots = {\n Surface: ({ children, className, ...attrs }) =>\n h(\n \"div\",\n { ...attrs, class: [\"adapttable-element-plus-pivot\", className] },\n [children]\n ),\n Zone: ({ children, label, zone, ...attrs }) =>\n h(\"fieldset\", { ...attrs, \"data-zone\": zone }, [\n h(\"legend\", label),\n children,\n ]),\n Field: ({\n label,\n aggregation,\n onMoveUp,\n onMoveDown,\n onRemove,\n moveUpLabel,\n moveDownLabel,\n removeLabel,\n ...attrs\n }) =>\n h(\"div\", attrs, [\n h(\"span\", label),\n aggregation,\n elementButton(\n {\n type: \"button\",\n disabled: !onMoveUp,\n \"aria-label\": `${moveUpLabel}: ${label}`,\n onClick: onMoveUp,\n },\n moveUpLabel\n ),\n elementButton(\n {\n type: \"button\",\n disabled: !onMoveDown,\n \"aria-label\": `${moveDownLabel}: ${label}`,\n onClick: onMoveDown,\n },\n moveDownLabel\n ),\n elementButton(\n {\n type: \"button\",\n \"aria-label\": `${removeLabel}: ${label}`,\n onClick: onRemove,\n },\n removeLabel\n ),\n ]),\n Add: ({ label, options, onAdd }) =>\n h(ElementSelect, {\n \"aria-label\": label,\n disabled: !options.length,\n value: \"\",\n options: [\n { value: \"\", label },\n ...options.map((item) => ({ value: item.key, label: item.label })),\n ],\n onChange: (value: string) => {\n if (value) onAdd(value);\n },\n }),\n Agg: ({ label, value, options, optionLabels, onChange }) =>\n h(ElementSelect, {\n \"aria-label\": label,\n value,\n options: options.map((item) => ({\n value: item,\n label: optionLabels[item],\n })),\n onChange: (next: string) => {\n const option = options.find((item) => item === next);\n if (option) onChange(option);\n },\n }),\n};\n\n/** The pivot axes and measures, edited with Element Plus controls. */\nexport function PivotPanel(props: PivotPanelProps) {\n
|
|
1
|
+
{"version":3,"file":"pivot.js","names":["ElementSelect"],"sources":["../src/pivot.ts"],"sourcesContent":["/** Pivot configuration with Element Plus selects and buttons over the binding's Chrome. */\nimport \"./pivot.css\";\n\nimport {\n PivotPanelChrome,\n type PivotPanelChromeProps,\n type PivotPanelSlots,\n withProps,\n} from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"./controls/button\";\nimport ElementSelect from \"./controls/ElementSelect.vue\";\n\nexport type PivotPanelProps = Omit<PivotPanelChromeProps, \"slots\">;\n\nconst slots: PivotPanelSlots = {\n Surface: ({ children, className, ...attrs }) =>\n h(\n \"div\",\n { ...attrs, class: [\"adapttable-element-plus-pivot\", className] },\n [children]\n ),\n Zone: ({ children, label, zone, ...attrs }) =>\n h(\"fieldset\", { ...attrs, \"data-zone\": zone }, [\n h(\"legend\", label),\n children,\n ]),\n Field: ({\n label,\n aggregation,\n onMoveUp,\n onMoveDown,\n onRemove,\n moveUpLabel,\n moveDownLabel,\n removeLabel,\n ...attrs\n }) =>\n h(\"div\", attrs, [\n h(\"span\", label),\n aggregation,\n elementButton(\n {\n type: \"button\",\n disabled: !onMoveUp,\n \"aria-label\": `${moveUpLabel}: ${label}`,\n onClick: onMoveUp,\n },\n moveUpLabel\n ),\n elementButton(\n {\n type: \"button\",\n disabled: !onMoveDown,\n \"aria-label\": `${moveDownLabel}: ${label}`,\n onClick: onMoveDown,\n },\n moveDownLabel\n ),\n elementButton(\n {\n type: \"button\",\n \"aria-label\": `${removeLabel}: ${label}`,\n onClick: onRemove,\n },\n removeLabel\n ),\n ]),\n Add: ({ label, options, onAdd }) =>\n h(ElementSelect, {\n \"aria-label\": label,\n disabled: !options.length,\n value: \"\",\n options: [\n { value: \"\", label },\n ...options.map((item) => ({ value: item.key, label: item.label })),\n ],\n onChange: (value: string) => {\n if (value) onAdd(value);\n },\n }),\n Agg: ({ label, value, options, optionLabels, onChange }) =>\n h(ElementSelect, {\n \"aria-label\": label,\n value,\n options: options.map((item) => ({\n value: item,\n label: optionLabels[item],\n })),\n onChange: (next: string) => {\n const option = options.find((item) => item === next);\n if (option) onChange(option);\n },\n }),\n};\n\n/** The pivot axes and measures, edited with Element Plus controls. */\nexport const PivotPanel = /* @__PURE__ */ withProps(\n function PivotPanel(props: PivotPanelProps) {\n return PivotPanelChrome({ ...props, slots });\n },\n [\"fields\", \"config\", \"onChange\", \"labels\", \"className\"]\n);\n"],"mappings":";;;;;AAgBA,MAAM,QAAyB;CAC7B,UAAU,EAAE,UAAU,WAAW,GAAG,YAClC,EACE,OACA;EAAE,GAAG;EAAO,OAAO,CAAC,iCAAiC,SAAS;CAAE,GAChE,CAAC,QAAQ,CACX;CACF,OAAO,EAAE,UAAU,OAAO,MAAM,GAAG,YACjC,EAAE,YAAY;EAAE,GAAG;EAAO,aAAa;CAAK,GAAG,CAC7C,EAAE,UAAU,KAAK,GACjB,QACF,CAAC;CACH,QAAQ,EACN,OACA,aACA,UACA,YACA,UACA,aACA,eACA,aACA,GAAG,YAEH,EAAE,OAAO,OAAO;EACd,EAAE,QAAQ,KAAK;EACf;EACA,cACE;GACE,MAAM;GACN,UAAU,CAAC;GACX,cAAc,GAAG,YAAY,IAAI;GACjC,SAAS;EACX,GACA,WACF;EACA,cACE;GACE,MAAM;GACN,UAAU,CAAC;GACX,cAAc,GAAG,cAAc,IAAI;GACnC,SAAS;EACX,GACA,aACF;EACA,cACE;GACE,MAAM;GACN,cAAc,GAAG,YAAY,IAAI;GACjC,SAAS;EACX,GACA,WACF;CACF,CAAC;CACH,MAAM,EAAE,OAAO,SAAS,YACtB,EAAEA,WAAe;EACf,cAAc;EACd,UAAU,CAAC,QAAQ;EACnB,OAAO;EACP,SAAS,CACP;GAAE,OAAO;GAAI;EAAM,GACnB,GAAG,QAAQ,KAAK,UAAU;GAAE,OAAO,KAAK;GAAK,OAAO,KAAK;EAAM,EAAE,CACnE;EACA,WAAW,UAAkB;GAC3B,IAAI,OAAO,MAAM,KAAK;EACxB;CACF,CAAC;CACH,MAAM,EAAE,OAAO,OAAO,SAAS,cAAc,eAC3C,EAAEA,WAAe;EACf,cAAc;EACd;EACA,SAAS,QAAQ,KAAK,UAAU;GAC9B,OAAO;GACP,OAAO,aAAa;EACtB,EAAE;EACF,WAAW,SAAiB;GAC1B,MAAM,SAAS,QAAQ,MAAM,SAAS,SAAS,IAAI;GACnD,IAAI,QAAQ,SAAS,MAAM;EAC7B;CACF,CAAC;AACL;;AAGA,MAAa,aAA6B,0BACxC,SAAS,WAAW,OAAwB;CAC1C,OAAO,iBAAiB;EAAE,GAAG;EAAO;CAAM,CAAC;AAC7C,GACA;CAAC;CAAU;CAAU;CAAY;CAAU;AAAW,CACxD"}
|
package/dist/preset.cjs
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_bulk_actions = require("./bulk-actions.cjs");
|
|
3
|
-
const require_column_menu = require("./column-menu-
|
|
4
|
-
const require_density = require("./density-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const
|
|
3
|
+
const require_column_menu = require("./column-menu-jNw7kuxp.cjs");
|
|
4
|
+
const require_density = require("./density-CJLZxF1h.cjs");
|
|
5
|
+
const require_export_csv = require("./export-csv.cjs");
|
|
6
|
+
require("./export.cjs");
|
|
7
|
+
const require_filters = require("./filters-bdHAQnex.cjs");
|
|
8
|
+
const require_find_in_table = require("./find-in-table-WtXzIkkg.cjs");
|
|
8
9
|
const require_fullscreen = require("./fullscreen.cjs");
|
|
9
10
|
const require_grouping = require("./grouping.cjs");
|
|
10
|
-
const require_header_filters = require("./header-filters-
|
|
11
|
-
const require_saved_views = require("./saved-views-
|
|
11
|
+
const require_header_filters = require("./header-filters-Cu7t_2IW.cjs");
|
|
12
|
+
const require_saved_views = require("./saved-views-luZVHu3w.cjs");
|
|
12
13
|
const require_status_bar = require("./status-bar-C-XuZg77.cjs");
|
|
13
14
|
require("./fit-columns.cjs");
|
|
14
15
|
require("./multi-sort.cjs");
|
|
@@ -20,7 +21,7 @@ function standardFeatures(options = {}) {
|
|
|
20
21
|
return (0, _adapttable_vue_adapter.standardFeatureList)({
|
|
21
22
|
columnMenu: require_column_menu.columnMenu,
|
|
22
23
|
densityChooser: require_density.densityChooser,
|
|
23
|
-
exportCsv:
|
|
24
|
+
exportCsv: require_export_csv.exportCsv,
|
|
24
25
|
findInTable: require_find_in_table.findInTable,
|
|
25
26
|
fitColumns: _adapttable_vue_features.fitColumns,
|
|
26
27
|
fullscreen: require_fullscreen.fullscreen,
|
package/dist/preset.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.cjs","names":["standardFeatureList"],"sources":["../src/preset.ts"],"sourcesContent":["/** The standard Element Plus table, composed from the public individual features. */\nimport type {\n BulkAction,\n FilterDef,\n StaticTableFeature,\n TableFeature,\n UseSavedViewsOptions,\n} from \"@adapttable/vue\";\nimport { standardFeatureList } from \"@adapttable/vue/adapter\";\n\nimport { bulkActions } from \"./bulk-actions\";\nimport { columnMenu } from \"./column-menu\";\nimport { densityChooser } from \"./density\";\nimport { exportCsv } from \"./export\";\nimport { filters } from \"./filters\";\nimport { findInTable } from \"./find-in-table\";\nimport { fitColumns } from \"./fit-columns\";\nimport { fullscreen } from \"./fullscreen\";\nimport { grouping } from \"./grouping\";\nimport { headerFilters } from \"./header-filters\";\nimport { multiSort } from \"./multi-sort\";\nimport { resizableColumns } from \"./resizable-columns\";\nimport { savedViews } from \"./saved-views\";\nimport { statusBar } from \"./status-bar\";\n\n/** Only configured members join the useful zero-argument feature list. @public */\nexport interface StandardFeatureOptions<TRow> {\n /** Group rows by these column keys. */\n readonly grouping?: string | readonly string[];\n /** Host-owned actions offered for selected rows. */\n readonly bulkActions?: readonly BulkAction[];\n /** Typed declarative filter definitions. */\n readonly filters?: readonly FilterDef<TRow>[];\n /** Saved-view persistence and naming. */\n readonly savedViews?: UseSavedViewsOptions;\n /** Show Find in the toolbar; keyboard Find remains available without it. */\n readonly findButton?: boolean;\n}\n\n/** Compose Element Plus features; append a same-ID feature to replace its default. @public */\nexport function standardFeatures(): StaticTableFeature[];\nexport function standardFeatures<TRow>(\n options?: StandardFeatureOptions<TRow>\n): TableFeature<TRow>[];\nexport function standardFeatures<TRow>(\n options: StandardFeatureOptions<TRow> = {}\n): TableFeature<TRow>[] {\n return standardFeatureList<\n TableFeature<TRow>,\n BulkAction,\n FilterDef<TRow>,\n UseSavedViewsOptions\n >(\n {\n columnMenu,\n densityChooser,\n exportCsv,\n findInTable,\n fitColumns,\n fullscreen,\n headerFilters,\n multiSort,\n resizableColumns,\n statusBar,\n grouping,\n bulkActions,\n filters,\n savedViews,\n },\n options\n );\n}\nexport type { FilterDef, UseSavedViewsOptions } from \"@adapttable/vue\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"preset.cjs","names":["standardFeatureList"],"sources":["../src/preset.ts"],"sourcesContent":["/** The standard Element Plus table, composed from the public individual features. */\nimport type {\n BulkAction,\n FilterDef,\n StaticTableFeature,\n TableFeature,\n UseSavedViewsOptions,\n} from \"@adapttable/vue\";\nimport { standardFeatureList } from \"@adapttable/vue/adapter\";\n\nimport { bulkActions } from \"./bulk-actions\";\nimport { columnMenu } from \"./column-menu\";\nimport { densityChooser } from \"./density\";\nimport { exportCsv } from \"./export\";\nimport { filters } from \"./filters\";\nimport { findInTable } from \"./find-in-table\";\nimport { fitColumns } from \"./fit-columns\";\nimport { fullscreen } from \"./fullscreen\";\nimport { grouping } from \"./grouping\";\nimport { headerFilters } from \"./header-filters\";\nimport { multiSort } from \"./multi-sort\";\nimport { resizableColumns } from \"./resizable-columns\";\nimport { savedViews } from \"./saved-views\";\nimport { statusBar } from \"./status-bar\";\n\n/** Only configured members join the useful zero-argument feature list. @public */\nexport interface StandardFeatureOptions<TRow> {\n /** Group rows by these column keys. */\n readonly grouping?: string | readonly string[];\n /** Host-owned actions offered for selected rows. */\n readonly bulkActions?: readonly BulkAction[];\n /** Typed declarative filter definitions. */\n readonly filters?: readonly FilterDef<TRow>[];\n /** Saved-view persistence and naming. */\n readonly savedViews?: UseSavedViewsOptions;\n /** Show Find in the toolbar; keyboard Find remains available without it. */\n readonly findButton?: boolean;\n}\n\n/** Compose Element Plus features; append a same-ID feature to replace its default. @public */\nexport function standardFeatures(): StaticTableFeature[];\nexport function standardFeatures<TRow>(\n options?: StandardFeatureOptions<TRow>\n): TableFeature<TRow>[];\nexport function standardFeatures<TRow>(\n options: StandardFeatureOptions<TRow> = {}\n): TableFeature<TRow>[] {\n return standardFeatureList<\n TableFeature<TRow>,\n BulkAction,\n FilterDef<TRow>,\n UseSavedViewsOptions\n >(\n {\n columnMenu,\n densityChooser,\n exportCsv,\n findInTable,\n fitColumns,\n fullscreen,\n headerFilters,\n multiSort,\n resizableColumns,\n statusBar,\n grouping,\n bulkActions,\n filters,\n savedViews,\n },\n options\n );\n}\nexport type { FilterDef, UseSavedViewsOptions } from \"@adapttable/vue\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA4CA,SAAgB,iBACd,UAAwC,CAAC,GACnB;CACtB,QAAA,GAAOA,wBAAAA,oBAAAA,CAML;EACE,YAAA,oBAAA;EACA,gBAAA,gBAAA;EACA,WAAA,mBAAA;EACA,aAAA,sBAAA;EACA,YAAA,yBAAA;EACA,YAAA,mBAAA;EACA,eAAA,uBAAA;EACA,WAAA,yBAAA;EACA,kBAAA,yBAAA;EACA,WAAA,mBAAA;EACA,UAAA,iBAAA;EACA,aAAA,qBAAA;EACA,SAAA,gBAAA;EACA,YAAA,oBAAA;CACF,GACA,OACF;AACF"}
|
package/dist/preset.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { bulkActions } from "./bulk-actions.js";
|
|
2
|
-
import { t as columnMenu } from "./column-menu-
|
|
3
|
-
import { t as densityChooser } from "./density-
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
2
|
+
import { t as columnMenu } from "./column-menu-BUxMPyJI.js";
|
|
3
|
+
import { t as densityChooser } from "./density-OeJSiWSC.js";
|
|
4
|
+
import { exportCsv } from "./export-csv.js";
|
|
5
|
+
import "./export.js";
|
|
6
|
+
import { n as filters } from "./filters-87q6jAVU.js";
|
|
7
|
+
import { t as findInTable } from "./find-in-table-B9ySCCJh.js";
|
|
7
8
|
import { fullscreen } from "./fullscreen.js";
|
|
8
9
|
import { grouping } from "./grouping.js";
|
|
9
|
-
import { t as headerFilters } from "./header-filters-
|
|
10
|
-
import { n as savedViews } from "./saved-views-
|
|
10
|
+
import { t as headerFilters } from "./header-filters-DUZI1x70.js";
|
|
11
|
+
import { n as savedViews } from "./saved-views-DDo4Bl-f.js";
|
|
11
12
|
import { n as statusBar } from "./status-bar-DaWh0Agh.js";
|
|
12
13
|
import { fitColumns } from "./fit-columns.js";
|
|
13
14
|
import { multiSort } from "./multi-sort.js";
|
package/dist/preset.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.js","names":[],"sources":["../src/preset.ts"],"sourcesContent":["/** The standard Element Plus table, composed from the public individual features. */\nimport type {\n BulkAction,\n FilterDef,\n StaticTableFeature,\n TableFeature,\n UseSavedViewsOptions,\n} from \"@adapttable/vue\";\nimport { standardFeatureList } from \"@adapttable/vue/adapter\";\n\nimport { bulkActions } from \"./bulk-actions\";\nimport { columnMenu } from \"./column-menu\";\nimport { densityChooser } from \"./density\";\nimport { exportCsv } from \"./export\";\nimport { filters } from \"./filters\";\nimport { findInTable } from \"./find-in-table\";\nimport { fitColumns } from \"./fit-columns\";\nimport { fullscreen } from \"./fullscreen\";\nimport { grouping } from \"./grouping\";\nimport { headerFilters } from \"./header-filters\";\nimport { multiSort } from \"./multi-sort\";\nimport { resizableColumns } from \"./resizable-columns\";\nimport { savedViews } from \"./saved-views\";\nimport { statusBar } from \"./status-bar\";\n\n/** Only configured members join the useful zero-argument feature list. @public */\nexport interface StandardFeatureOptions<TRow> {\n /** Group rows by these column keys. */\n readonly grouping?: string | readonly string[];\n /** Host-owned actions offered for selected rows. */\n readonly bulkActions?: readonly BulkAction[];\n /** Typed declarative filter definitions. */\n readonly filters?: readonly FilterDef<TRow>[];\n /** Saved-view persistence and naming. */\n readonly savedViews?: UseSavedViewsOptions;\n /** Show Find in the toolbar; keyboard Find remains available without it. */\n readonly findButton?: boolean;\n}\n\n/** Compose Element Plus features; append a same-ID feature to replace its default. @public */\nexport function standardFeatures(): StaticTableFeature[];\nexport function standardFeatures<TRow>(\n options?: StandardFeatureOptions<TRow>\n): TableFeature<TRow>[];\nexport function standardFeatures<TRow>(\n options: StandardFeatureOptions<TRow> = {}\n): TableFeature<TRow>[] {\n return standardFeatureList<\n TableFeature<TRow>,\n BulkAction,\n FilterDef<TRow>,\n UseSavedViewsOptions\n >(\n {\n columnMenu,\n densityChooser,\n exportCsv,\n findInTable,\n fitColumns,\n fullscreen,\n headerFilters,\n multiSort,\n resizableColumns,\n statusBar,\n grouping,\n bulkActions,\n filters,\n savedViews,\n },\n options\n );\n}\nexport type { FilterDef, UseSavedViewsOptions } from \"@adapttable/vue\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"preset.js","names":[],"sources":["../src/preset.ts"],"sourcesContent":["/** The standard Element Plus table, composed from the public individual features. */\nimport type {\n BulkAction,\n FilterDef,\n StaticTableFeature,\n TableFeature,\n UseSavedViewsOptions,\n} from \"@adapttable/vue\";\nimport { standardFeatureList } from \"@adapttable/vue/adapter\";\n\nimport { bulkActions } from \"./bulk-actions\";\nimport { columnMenu } from \"./column-menu\";\nimport { densityChooser } from \"./density\";\nimport { exportCsv } from \"./export\";\nimport { filters } from \"./filters\";\nimport { findInTable } from \"./find-in-table\";\nimport { fitColumns } from \"./fit-columns\";\nimport { fullscreen } from \"./fullscreen\";\nimport { grouping } from \"./grouping\";\nimport { headerFilters } from \"./header-filters\";\nimport { multiSort } from \"./multi-sort\";\nimport { resizableColumns } from \"./resizable-columns\";\nimport { savedViews } from \"./saved-views\";\nimport { statusBar } from \"./status-bar\";\n\n/** Only configured members join the useful zero-argument feature list. @public */\nexport interface StandardFeatureOptions<TRow> {\n /** Group rows by these column keys. */\n readonly grouping?: string | readonly string[];\n /** Host-owned actions offered for selected rows. */\n readonly bulkActions?: readonly BulkAction[];\n /** Typed declarative filter definitions. */\n readonly filters?: readonly FilterDef<TRow>[];\n /** Saved-view persistence and naming. */\n readonly savedViews?: UseSavedViewsOptions;\n /** Show Find in the toolbar; keyboard Find remains available without it. */\n readonly findButton?: boolean;\n}\n\n/** Compose Element Plus features; append a same-ID feature to replace its default. @public */\nexport function standardFeatures(): StaticTableFeature[];\nexport function standardFeatures<TRow>(\n options?: StandardFeatureOptions<TRow>\n): TableFeature<TRow>[];\nexport function standardFeatures<TRow>(\n options: StandardFeatureOptions<TRow> = {}\n): TableFeature<TRow>[] {\n return standardFeatureList<\n TableFeature<TRow>,\n BulkAction,\n FilterDef<TRow>,\n UseSavedViewsOptions\n >(\n {\n columnMenu,\n densityChooser,\n exportCsv,\n findInTable,\n fitColumns,\n fullscreen,\n headerFilters,\n multiSort,\n resizableColumns,\n statusBar,\n grouping,\n bulkActions,\n filters,\n savedViews,\n },\n options\n );\n}\nexport type { FilterDef, UseSavedViewsOptions } from \"@adapttable/vue\";\n"],"mappings":";;;;;;;;;;;;;;;;;AA4CA,SAAgB,iBACd,UAAwC,CAAC,GACnB;CACtB,OAAO,oBAML;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,GACA,OACF;AACF"}
|
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-ClYC3Ssq.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-CUlFbY6s.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-ClYC3Ssq.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-CUlFbY6s.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";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as useClassNames } from "./classNamesContext-18Wbxy4F.js";
|
|
2
2
|
import { t as elementButton } from "./button-DwB4UxI2.js";
|
|
3
|
-
import { createBlock, defineComponent, h,
|
|
4
|
-
import { RowReorderChrome, extendFeature, rowReorderControlKey, slotRender, useScopeActivity } from "@adapttable/vue/adapter";
|
|
3
|
+
import { createBlock, defineComponent, h, openBlock, shallowRef, useId, watch } from "vue";
|
|
4
|
+
import { RowReorderChrome, extendFeature, rowReorderControlKey, scheduleTick, slotRender, useScopeActivity } from "@adapttable/vue/adapter";
|
|
5
5
|
import { ElDialog, ElOption, ElSelect } from "element-plus";
|
|
6
6
|
import { rowReorder } from "@adapttable/vue/features";
|
|
7
7
|
import { useRowReorder } from "@adapttable/vue";
|
|
@@ -36,7 +36,7 @@ const ElementRowMoveMenu = defineComponent((props) => {
|
|
|
36
36
|
if (!isCurrent()) return;
|
|
37
37
|
const item = items.find((item) => item.id === value);
|
|
38
38
|
if (item && !item.disabled) item.onSelect();
|
|
39
|
-
|
|
39
|
+
scheduleTick(() => {
|
|
40
40
|
if (isCurrent()) trigger.value?.$forceUpdate();
|
|
41
41
|
});
|
|
42
42
|
}
|
|
@@ -154,4 +154,4 @@ function rowReorder$1(onRowReorder, options) {
|
|
|
154
154
|
//#endregion
|
|
155
155
|
export { useRowReorder as n, rowReorder$1 as t };
|
|
156
156
|
|
|
157
|
-
//# sourceMappingURL=row-reorder-
|
|
157
|
+
//# sourceMappingURL=row-reorder-BYwX3CBP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-reorder-BYwX3CBP.js","names":["rowReorder","bindingRowReorder","ElementRowReorder"],"sources":["../src/reorder/ElementRowMoveMenu.ts","../src/reorder/elementReorderControls.ts","../src/reorder/ElementRowReorder.vue","../src/row-reorder.ts"],"sourcesContent":["import {\n type RowMoveMenuSlotProps,\n scheduleTick,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport {\n ElDialog,\n ElOption,\n ElSelect,\n type SelectInstance,\n} from \"element-plus\";\nimport {\n defineComponent,\n h,\n type PropType,\n shallowRef,\n useId,\n watch,\n} from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\n/** The shared controller owns target selection and pending confirmation. */\nexport const ElementRowMoveMenu = defineComponent(\n (props: RowMoveMenuSlotProps) => {\n const active = useScopeActivity();\n let lifetime = 0;\n watch(active, () => lifetime++, { flush: \"sync\" });\n const trigger = shallowRef<SelectInstance>();\n const description = `adapttable-row-move-${useId()}`;\n return () => {\n const live = active.value;\n const ticket = lifetime;\n const items = props.items;\n const owner = props.confirmation;\n const isCurrent = () => live && active.value && ticket === lifetime;\n const finish = (kind: \"onConfirm\" | \"onCancel\") => {\n if (!isCurrent() || !owner) return;\n if (\n props.confirmation?.onConfirm === owner.onConfirm &&\n props.confirmation.onCancel === owner.onCancel\n )\n owner[kind]();\n };\n return h(\"span\", { \"data-adapttable-part\": \"row-move-menu\" }, [\n h(\n ElSelect,\n {\n ref: trigger,\n modelValue: \"\",\n placeholder: props.label,\n \"aria-label\": props.label,\n \"data-adapttable-part\": \"row-move-menu-trigger\",\n teleported: false,\n disabled: props.items.every((item) => item.disabled),\n validateEvent: false,\n \"onUpdate:modelValue\": (value: unknown) => {\n if (!isCurrent()) return;\n const item = items.find((item) => item.id === value);\n if (item && !item.disabled) item.onSelect();\n scheduleTick(() => {\n if (isCurrent()) trigger.value?.$forceUpdate();\n });\n },\n },\n {\n default: () =>\n props.items.map((item) =>\n h(ElOption, {\n key: item.id,\n value: item.id,\n label: item.label,\n disabled: item.disabled,\n title: item.disabledReason,\n \"data-adapttable-part\": \"row-move-menu-item\",\n })\n ),\n }\n ),\n owner\n ? h(\n ElDialog,\n {\n modelValue: active.value,\n title: owner.title,\n showClose: false,\n destroyOnClose: true,\n \"data-adapttable-part\": \"row-move-confirmation\",\n \"aria-describedby\": description,\n width: \"min(28rem, calc(100vw - 2rem))\",\n appendToBody: false,\n beforeClose: () => finish(\"onCancel\"),\n },\n {\n default: () => h(\"p\", { id: description }, owner.description),\n footer: () => [\n elementButton(\n {\n type: \"button\",\n \"data-adapttable-part\": \"row-move-cancel\",\n onClick: () => finish(\"onCancel\"),\n },\n owner.cancelLabel\n ),\n elementButton(\n {\n type: \"button\",\n \"data-adapttable-part\": \"row-move-confirm\",\n onClick: () => finish(\"onConfirm\"),\n },\n owner.confirmLabel\n ),\n ],\n }\n )\n : null,\n ]);\n };\n },\n {\n name: \"ElementRowMoveMenu\",\n props: {\n label: { type: String as PropType<RowMoveMenuSlotProps[\"label\"]> },\n items: { type: Array as PropType<RowMoveMenuSlotProps[\"items\"]> },\n confirmation: {\n type: Object as PropType<RowMoveMenuSlotProps[\"confirmation\"]>,\n },\n },\n }\n);\n","import type { RowReorderControlSlots } from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport { ElementRowMoveMenu } from \"./ElementRowMoveMenu\";\n\nexport const elementReorderControls: RowReorderControlSlots = {\n Handle: ({\n label,\n pressed,\n dragging,\n disabled,\n dragProps,\n onKeyDown,\n className,\n }) =>\n elementButton(\n {\n type: \"button\",\n \"aria-label\": label,\n \"aria-pressed\": pressed,\n \"data-dragging\": dragging ? \"\" : undefined,\n \"data-adapttable-part\": \"row-reorder-handle\",\n \"data-adapttable-grip\": \"\",\n class: className,\n disabled,\n draggable: dragProps.draggable,\n onDragstart: (event: DragEvent) => {\n if (event.dataTransfer)\n dragProps.onDragStart({\n ...event,\n dataTransfer: event.dataTransfer,\n clientY: event.clientY,\n currentTarget:\n event.currentTarget instanceof HTMLElement\n ? event.currentTarget\n : null,\n preventDefault: () => event.preventDefault(),\n });\n },\n onDragend: dragProps.onDragEnd,\n onKeydown: (event: KeyboardEvent) =>\n onKeyDown({\n key: event.key,\n currentTarget:\n event.currentTarget instanceof HTMLElement\n ? event.currentTarget\n : null,\n preventDefault: () => event.preventDefault(),\n }),\n },\n \"↕\"\n ),\n Button: ({ label, part, disabled, onClick, className }) =>\n elementButton(\n {\n type: \"button\",\n \"aria-label\": label,\n \"data-adapttable-part\": part,\n class: className,\n disabled,\n onClick,\n },\n label\n ),\n Menu: (props) => h(ElementRowMoveMenu, props),\n};\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n RowReorderChrome,\n type RowReorderControlProps,\n} from \"@adapttable/vue/adapter\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementReorderControls } from \"./elementReorderControls\";\n\nconst props = defineProps<RowReorderControlProps<TRow>>();\nconst names = useClassNames();\nconst Render = () =>\n RowReorderChrome({\n ...props,\n classNames: { ...names.value },\n slots: elementReorderControls,\n });\n\n// Declare no props so Vue forwards all root attributes, including id and data-*.\nconst renderProps: string[] = [];\nRender.props = renderProps;\n</script>\n\n<template>\n <Render />\n</template>\n","import type {\n RowReorderHandler,\n RowReorderOptions,\n TableFeature,\n} from \"@adapttable/vue\";\nimport {\n extendFeature,\n rowReorderControlKey,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { rowReorder as bindingRowReorder } from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport ElementRowReorder from \"./reorder/ElementRowReorder.vue\";\nexport {\n type RowReorderHandler,\n type RowReorderOptions,\n useRowReorder,\n} from \"@adapttable/vue\";\nexport function rowReorder<TRow>(\n onRowReorder: RowReorderHandler<TRow>,\n options?: RowReorderOptions<TRow>\n): TableFeature<TRow> {\n return extendFeature(bindingRowReorder(onRowReorder, options), [\n slotRender(rowReorderControlKey<TRow>(), (props) =>\n h(ElementRowReorder<TRow>, { ...props })\n ),\n ]);\n}\n"],"mappings":";;;;;;;;;AAsBA,MAAa,qBAAqB,iBAC/B,UAAgC;CAC/B,MAAM,S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GACf,GAAG;GACH,YAAY,EAAE,GAAG,MAAM,MAAM;GAC7B,OAAO;EACT,CAAC;EAIH,OAAO,QAAQ,CAAA;;GAIb,OAAA,UAAA,GAAA,YAAU,MAAA;;;;;;ACLZ,SAAgBA,aACd,cACA,SACoB;CACpB,OAAO,cAAcC,WAAkB,cAAc,OAAO,GAAG,CAC7D,WAAW,qBAA2B,IAAI,UACxC,EAAEC,WAAyB,EAAE,GAAG,MAAM,CAAC,CACzC,CACF,CAAC;AACH"}
|
|
@@ -35,7 +35,7 @@ const ElementRowMoveMenu = (0, vue.defineComponent)((props) => {
|
|
|
35
35
|
if (!isCurrent()) return;
|
|
36
36
|
const item = items.find((item) => item.id === value);
|
|
37
37
|
if (item && !item.disabled) item.onSelect();
|
|
38
|
-
(0,
|
|
38
|
+
(0, _adapttable_vue_adapter.scheduleTick)(() => {
|
|
39
39
|
if (isCurrent()) trigger.value?.$forceUpdate();
|
|
40
40
|
});
|
|
41
41
|
}
|
|
@@ -158,4 +158,4 @@ Object.defineProperty(exports, "rowReorder", {
|
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
160
|
|
|
161
|
-
//# sourceMappingURL=row-reorder-
|
|
161
|
+
//# sourceMappingURL=row-reorder-MSR2yDN6.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-reorder-MSR2yDN6.cjs","names":["defineComponent","useScopeActivity","shallowRef","useId","h","ElSelect","ElOption","ElDialog","elementButton","elementButton","h","extendFeature","bindingRowReorder","slotRender","rowReorderControlKey","h","ElementRowReorder"],"sources":["../src/reorder/ElementRowMoveMenu.ts","../src/reorder/elementReorderControls.ts","../src/reorder/ElementRowReorder.vue","../src/row-reorder.ts"],"sourcesContent":["import {\n type RowMoveMenuSlotProps,\n scheduleTick,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport {\n ElDialog,\n ElOption,\n ElSelect,\n type SelectInstance,\n} from \"element-plus\";\nimport {\n defineComponent,\n h,\n type PropType,\n shallowRef,\n useId,\n watch,\n} from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\n/** The shared controller owns target selection and pending confirmation. */\nexport const ElementRowMoveMenu = defineComponent(\n (props: RowMoveMenuSlotProps) => {\n const active = useScopeActivity();\n let lifetime = 0;\n watch(active, () => lifetime++, { flush: \"sync\" });\n const trigger = shallowRef<SelectInstance>();\n const description = `adapttable-row-move-${useId()}`;\n return () => {\n const live = active.value;\n const ticket = lifetime;\n const items = props.items;\n const owner = props.confirmation;\n const isCurrent = () => live && active.value && ticket === lifetime;\n const finish = (kind: \"onConfirm\" | \"onCancel\") => {\n if (!isCurrent() || !owner) return;\n if (\n props.confirmation?.onConfirm === owner.onConfirm &&\n props.confirmation.onCancel === owner.onCancel\n )\n owner[kind]();\n };\n return h(\"span\", { \"data-adapttable-part\": \"row-move-menu\" }, [\n h(\n ElSelect,\n {\n ref: trigger,\n modelValue: \"\",\n placeholder: props.label,\n \"aria-label\": props.label,\n \"data-adapttable-part\": \"row-move-menu-trigger\",\n teleported: false,\n disabled: props.items.every((item) => item.disabled),\n validateEvent: false,\n \"onUpdate:modelValue\": (value: unknown) => {\n if (!isCurrent()) return;\n const item = items.find((item) => item.id === value);\n if (item && !item.disabled) item.onSelect();\n scheduleTick(() => {\n if (isCurrent()) trigger.value?.$forceUpdate();\n });\n },\n },\n {\n default: () =>\n props.items.map((item) =>\n h(ElOption, {\n key: item.id,\n value: item.id,\n label: item.label,\n disabled: item.disabled,\n title: item.disabledReason,\n \"data-adapttable-part\": \"row-move-menu-item\",\n })\n ),\n }\n ),\n owner\n ? h(\n ElDialog,\n {\n modelValue: active.value,\n title: owner.title,\n showClose: false,\n destroyOnClose: true,\n \"data-adapttable-part\": \"row-move-confirmation\",\n \"aria-describedby\": description,\n width: \"min(28rem, calc(100vw - 2rem))\",\n appendToBody: false,\n beforeClose: () => finish(\"onCancel\"),\n },\n {\n default: () => h(\"p\", { id: description }, owner.description),\n footer: () => [\n elementButton(\n {\n type: \"button\",\n \"data-adapttable-part\": \"row-move-cancel\",\n onClick: () => finish(\"onCancel\"),\n },\n owner.cancelLabel\n ),\n elementButton(\n {\n type: \"button\",\n \"data-adapttable-part\": \"row-move-confirm\",\n onClick: () => finish(\"onConfirm\"),\n },\n owner.confirmLabel\n ),\n ],\n }\n )\n : null,\n ]);\n };\n },\n {\n name: \"ElementRowMoveMenu\",\n props: {\n label: { type: String as PropType<RowMoveMenuSlotProps[\"label\"]> },\n items: { type: Array as PropType<RowMoveMenuSlotProps[\"items\"]> },\n confirmation: {\n type: Object as PropType<RowMoveMenuSlotProps[\"confirmation\"]>,\n },\n },\n }\n);\n","import type { RowReorderControlSlots } from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { elementButton } from \"../controls/button\";\nimport { ElementRowMoveMenu } from \"./ElementRowMoveMenu\";\n\nexport const elementReorderControls: RowReorderControlSlots = {\n Handle: ({\n label,\n pressed,\n dragging,\n disabled,\n dragProps,\n onKeyDown,\n className,\n }) =>\n elementButton(\n {\n type: \"button\",\n \"aria-label\": label,\n \"aria-pressed\": pressed,\n \"data-dragging\": dragging ? \"\" : undefined,\n \"data-adapttable-part\": \"row-reorder-handle\",\n \"data-adapttable-grip\": \"\",\n class: className,\n disabled,\n draggable: dragProps.draggable,\n onDragstart: (event: DragEvent) => {\n if (event.dataTransfer)\n dragProps.onDragStart({\n ...event,\n dataTransfer: event.dataTransfer,\n clientY: event.clientY,\n currentTarget:\n event.currentTarget instanceof HTMLElement\n ? event.currentTarget\n : null,\n preventDefault: () => event.preventDefault(),\n });\n },\n onDragend: dragProps.onDragEnd,\n onKeydown: (event: KeyboardEvent) =>\n onKeyDown({\n key: event.key,\n currentTarget:\n event.currentTarget instanceof HTMLElement\n ? event.currentTarget\n : null,\n preventDefault: () => event.preventDefault(),\n }),\n },\n \"↕\"\n ),\n Button: ({ label, part, disabled, onClick, className }) =>\n elementButton(\n {\n type: \"button\",\n \"aria-label\": label,\n \"data-adapttable-part\": part,\n class: className,\n disabled,\n onClick,\n },\n label\n ),\n Menu: (props) => h(ElementRowMoveMenu, props),\n};\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n RowReorderChrome,\n type RowReorderControlProps,\n} from \"@adapttable/vue/adapter\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { elementReorderControls } from \"./elementReorderControls\";\n\nconst props = defineProps<RowReorderControlProps<TRow>>();\nconst names = useClassNames();\nconst Render = () =>\n RowReorderChrome({\n ...props,\n classNames: { ...names.value },\n slots: elementReorderControls,\n });\n\n// Declare no props so Vue forwards all root attributes, including id and data-*.\nconst renderProps: string[] = [];\nRender.props = renderProps;\n</script>\n\n<template>\n <Render />\n</template>\n","import type {\n RowReorderHandler,\n RowReorderOptions,\n TableFeature,\n} from \"@adapttable/vue\";\nimport {\n extendFeature,\n rowReorderControlKey,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { rowReorder as bindingRowReorder } from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport ElementRowReorder from \"./reorder/ElementRowReorder.vue\";\nexport {\n type RowReorderHandler,\n type RowReorderOptions,\n useRowReorder,\n} from \"@adapttable/vue\";\nexport function rowReorder<TRow>(\n onRowReorder: RowReorderHandler<TRow>,\n options?: RowReorderOptions<TRow>\n): TableFeature<TRow> {\n return extendFeature(bindingRowReorder(onRowReorder, options), [\n slotRender(rowReorderControlKey<TRow>(), (props) =>\n h(ElementRowReorder<TRow>, { ...props })\n ),\n ]);\n}\n"],"mappings":";;;;;;;;AAsBA,MAAa,sBAAA,GAAqBA,IAAAA,gBAAAA,EAC/B,UAAgC;CAC/B,MAAM,UAAA,GAASC,wBAAAA,iBAAAA,CAAiB;CAChC,IAAI,WAAW;CACf,CAAA,GAAA,IAAA,MAAA,CAAM,cAAc,YAAY,EAAE,OAAO,OAAO,CAAC;CACjD,MAAM,WAAA,GAAUC,IAAAA,WAAAA,CAA2B;CAC3C,MAAM,cAAc,wBAAA,GAAuBC,IAAAA,MAAAA,CAAM;CACj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ECzDA,MAAM,QAAQ;EACd,MAAM,SAAA,GAAQ,wBAAA,uBAAA,CAAc;EAC5B,MAAM,gBAAA,GACJ,wBAAA,iBAAA,CAAiB;GACf,GAAG;GACH,YAAY,EAAE,GAAG,MAAM,MAAM;GAC7B,OAAO;EACT,CAAC;EAIH,OAAO,QAAQ,CAAA;;GAIb,QAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,CAAU,MAAA;;;;;;ACLZ,SAAgB,WACd,cACA,SACoB;CACpB,QAAA,GAAOC,wBAAAA,cAAAA,EAAAA,GAAcC,yBAAAA,WAAAA,CAAkB,cAAc,OAAO,GAAG,EAAA,GAC7DC,wBAAAA,WAAAA,EAAAA,GAAWC,wBAAAA,qBAAAA,CAA2B,IAAI,WAAA,GACxCC,IAAAA,EAAAA,CAAEC,WAAyB,EAAE,GAAG,MAAM,CAAC,CACzC,CACF,CAAC;AACH"}
|
package/dist/row-reorder.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_row_reorder = require("./row-reorder-
|
|
2
|
+
const require_row_reorder = require("./row-reorder-MSR2yDN6.cjs");
|
|
3
3
|
let _adapttable_vue = require("@adapttable/vue");
|
|
4
4
|
exports.rowReorder = require_row_reorder.rowReorder;
|
|
5
5
|
Object.defineProperty(exports, "useRowReorder", {
|
package/dist/row-reorder.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as useRowReorder, t as rowReorder } from "./row-reorder-
|
|
1
|
+
import { n as useRowReorder, t as rowReorder } from "./row-reorder-BYwX3CBP.js";
|
|
2
2
|
export { rowReorder, useRowReorder };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rowActionsSlot-CdnzwBmt.js","names":[],"sources":["../src/rowActionsSlot.ts"],"sourcesContent":["import type { FeatureSlotKey, RowActionControl } from \"@adapttable/vue\";\nimport {\n type DataTableClassNames,\n featureSlotKey,\n type RowActionsLayout,\n} from \"@adapttable/vue/adapter\";\n\nexport interface RowActionsControlProps<TRow> {\n readonly controls: readonly RowActionControl<TRow>[];\n readonly layout?: RowActionsLayout;\n readonly label: string;\n readonly dir?: \"ltr\" | \"rtl\";\n readonly classNames: DataTableClassNames;\n}\n\n/** A lightweight channel; only rowActions() or rowPinning() loads its native menu. */\nexport const ROW_ACTIONS_CONTROL = featureSlotKey<\n RowActionsControlProps<unknown>\n>(\"element-plus-row-actions-control\", { single: true });\n\nexport function rowActionsControlKey<TRow>(): FeatureSlotKey<\n RowActionsControlProps<TRow>\n> {\n return ROW_ACTIONS_CONTROL
|
|
1
|
+
{"version":3,"file":"rowActionsSlot-CdnzwBmt.js","names":[],"sources":["../src/rowActionsSlot.ts"],"sourcesContent":["import type { FeatureSlotKey, RowActionControl } from \"@adapttable/vue\";\nimport {\n type DataTableClassNames,\n featureSlotKey,\n type RowActionsLayout,\n} from \"@adapttable/vue/adapter\";\n\nexport interface RowActionsControlProps<TRow> {\n readonly controls: readonly RowActionControl<TRow>[];\n readonly layout?: RowActionsLayout;\n readonly label: string;\n readonly dir?: \"ltr\" | \"rtl\";\n readonly classNames: DataTableClassNames;\n}\n\n/** A lightweight channel; only rowActions() or rowPinning() loads its native menu. */\nexport const ROW_ACTIONS_CONTROL = featureSlotKey<\n RowActionsControlProps<unknown>\n>(\"element-plus-row-actions-control\", { single: true });\n\nexport function rowActionsControlKey<TRow>(): FeatureSlotKey<\n RowActionsControlProps<TRow>\n> {\n return ROW_ACTIONS_CONTROL;\n}\n"],"mappings":";;;AAgBA,MAAa,sBAAsB,eAEjC,oCAAoC,EAAE,QAAQ,KAAK,CAAC;AAEtD,SAAgB,uBAEd;CACA,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rowActionsSlot-Ps5hHI6n.cjs","names":["featureSlotKey"],"sources":["../src/rowActionsSlot.ts"],"sourcesContent":["import type { FeatureSlotKey, RowActionControl } from \"@adapttable/vue\";\nimport {\n type DataTableClassNames,\n featureSlotKey,\n type RowActionsLayout,\n} from \"@adapttable/vue/adapter\";\n\nexport interface RowActionsControlProps<TRow> {\n readonly controls: readonly RowActionControl<TRow>[];\n readonly layout?: RowActionsLayout;\n readonly label: string;\n readonly dir?: \"ltr\" | \"rtl\";\n readonly classNames: DataTableClassNames;\n}\n\n/** A lightweight channel; only rowActions() or rowPinning() loads its native menu. */\nexport const ROW_ACTIONS_CONTROL = featureSlotKey<\n RowActionsControlProps<unknown>\n>(\"element-plus-row-actions-control\", { single: true });\n\nexport function rowActionsControlKey<TRow>(): FeatureSlotKey<\n RowActionsControlProps<TRow>\n> {\n return ROW_ACTIONS_CONTROL
|
|
1
|
+
{"version":3,"file":"rowActionsSlot-Ps5hHI6n.cjs","names":["featureSlotKey"],"sources":["../src/rowActionsSlot.ts"],"sourcesContent":["import type { FeatureSlotKey, RowActionControl } from \"@adapttable/vue\";\nimport {\n type DataTableClassNames,\n featureSlotKey,\n type RowActionsLayout,\n} from \"@adapttable/vue/adapter\";\n\nexport interface RowActionsControlProps<TRow> {\n readonly controls: readonly RowActionControl<TRow>[];\n readonly layout?: RowActionsLayout;\n readonly label: string;\n readonly dir?: \"ltr\" | \"rtl\";\n readonly classNames: DataTableClassNames;\n}\n\n/** A lightweight channel; only rowActions() or rowPinning() loads its native menu. */\nexport const ROW_ACTIONS_CONTROL = featureSlotKey<\n RowActionsControlProps<unknown>\n>(\"element-plus-row-actions-control\", { single: true });\n\nexport function rowActionsControlKey<TRow>(): FeatureSlotKey<\n RowActionsControlProps<TRow>\n> {\n return ROW_ACTIONS_CONTROL;\n}\n"],"mappings":";;AAgBA,MAAa,uBAAA,oCAAsBA,CAAAA,CAAAA,eAAAA,CAEjC,oCAAoC,EAAE,QAAQ,KAAK,CAAC;AAEtD,SAAgB,uBAEd;CACA,OAAO;AACT"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as elementButton } from "./button-DwB4UxI2.js";
|
|
2
|
-
import { t as _sfc_main } from "./ElementInput-
|
|
2
|
+
import { t as _sfc_main } from "./ElementInput-Cn9hpa9j.js";
|
|
3
3
|
import { t as ElementCard } from "./ElementCard-DZdAU6x8.js";
|
|
4
|
-
import { t as ElementColumnMenuPanel } from "./ElementColumnMenuPanel-
|
|
4
|
+
import { t as ElementColumnMenuPanel } from "./ElementColumnMenuPanel-CPW4wU3M.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-DDo4Bl-f.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saved-views-DW8WybwV.js","names":["ElementInput","savedViews","bindingSavedViews"],"sources":["../src/views/elementSavedViewsControls.ts","../src/saved-views.ts"],"sourcesContent":["import {\n managedOverlayPanel,\n type SavedViewsMenuSlots,\n type SavedViewsPanelSlots,\n} from \"@adapttable/vue/adapter\";\nimport { ElTag } from \"element-plus\";\nimport { h } from \"vue\";\n\nimport { ElementColumnMenuPanel } from \"../columns/ElementColumnMenuPanel\";\nimport { elementButton } from \"../controls/button\";\nimport ElementInput from \"../controls/ElementInput.vue\";\nimport { ElementCard } from \"../presentation/ElementCard\";\nimport type { DataTableClassNames } from \"../types\";\nexport const elementSavedViewsMenuSlots: SavedViewsMenuSlots = {\n Trigger: ({ attrs, label }) => elementButton(attrs, label),\n Button: ({ attrs, label }) => elementButton(attrs, label),\n Input: ({ attrs, value, onChange }) =>\n h(ElementInput, { ...attrs, value, onChange }),\n Panel: managedOverlayPanel((control) =>\n h(ElementColumnMenuPanel, {\n control,\n initialFocus: 'input[data-adapttable-part=\"views-input\"]',\n })\n ),\n};\nexport function elementSavedViewsPanelSlots(\n names: () => DataTableClassNames\n): SavedViewsPanelSlots {\n return {\n Surface: (props) =>\n h(\n ElementCard,\n {\n attrs: {\n \"data-adapttable-part\": props[\"data-adapttable-part\"],\n class: props.className,\n },\n },\n {\n default: () => [\n h(\n \"h2\",\n { \"data-adapttable-part\": \"saved-views-title\" },\n props.title\n ),\n props.children,\n props.footer\n ? h(\"span\", { \"data-adapttable-part\": \"saved-views-footer\" }, [\n props.footer,\n ])\n : null,\n ],\n }\n ),\n Row: (props) =>\n h(\n \"div\",\n {\n key: props.viewName,\n class: names().viewsRow,\n \"data-adapttable-part\": props[\"data-adapttable-part\"],\n style: props.layout.row,\n },\n [\n h(\n \"div\",\n {\n \"data-adapttable-part\": \"saved-view-caption\",\n style: props.layout.caption,\n },\n [\n props.isEditing\n ? props.name\n : elementButton(\n {\n type: \"button\",\n title: props.applyLabel,\n class: names().viewsItem,\n onClick: props.onApply,\n },\n [props.name]\n ),\n props.isDefault\n ? h(\n ElTag,\n { \"data-adapttable-part\": \"saved-view-default\" },\n { default: () => props.defaultLabel }\n )\n : null,\n props.readOnly\n ? h(\n ElTag,\n { \"data-adapttable-part\": \"saved-view-readonly\" },\n { default: () => props.readOnlyLabel }\n )\n : null,\n ]\n ),\n h(\n \"div\",\n {\n \"data-adapttable-part\": \"saved-view-controls\",\n style: props.layout.controls,\n },\n props.controls.map((control) =>\n elementButton(\n {\n key: control.key,\n type: \"button\",\n class: names().viewsDelete,\n title: control.label,\n \"aria-label\": control.label,\n \"aria-pressed\": control.pressed,\n disabled: !control.onPress,\n onClick: control.onPress,\n style: props.layout.control,\n },\n [control.icon]\n )\n )\n ),\n ]\n ),\n Input: (props) =>\n h(ElementInput, {\n inputRef: (element) => {\n if (element instanceof HTMLInputElement || element === null)\n props.ref(element);\n },\n class: names().viewsInput,\n \"aria-label\": props.label,\n value: props.value,\n onChange: props.onChange,\n onKeydown: (event: KeyboardEvent) => {\n if (event.isComposing) return;\n if (event.key === \"Enter\") {\n event.preventDefault();\n props.onCommit();\n }\n if (event.key === \"Escape\") {\n event.preventDefault();\n event.stopPropagation();\n props.onCancel();\n }\n },\n }),\n Empty: ({ message }) => h(\"p\", message),\n };\n}\n","import type { StaticTableFeature, UseSavedViewsOptions } from \"@adapttable/vue\";\nimport {\n extendFeature,\n SAVED_VIEWS_CONTROL,\n SavedViewsMenuChrome,\n SavedViewsPanelChrome,\n type SavedViewsPanelChromeProps,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { savedViews as bindingSavedViews } from \"@adapttable/vue/features\";\nimport { defineComponent, h, type MaybeRefOrGetter, type PropType } from \"vue\";\n\nimport type { DataTableClassNames } from \"./types\";\nimport {\n elementSavedViewsMenuSlots,\n elementSavedViewsPanelSlots,\n} from \"./views/elementSavedViewsControls\";\n\nexport type { DataTableClassNames } from \"./types\";\nexport type {\n SavedView,\n SavedViewsStore,\n UseSavedViewsOptions,\n} from \"@adapttable/vue\";\nexport interface SavedViewsPanelProps extends Omit<\n SavedViewsPanelChromeProps,\n \"slots\"\n> {\n readonly classNames?: DataTableClassNames;\n}\n\n/** Element Plus management surface over the binding's rename and ordering model. */\nexport const SavedViewsPanel = defineComponent(\n (props: SavedViewsPanelProps) => {\n const slots = elementSavedViewsPanelSlots(() => props.classNames ?? {});\n return () => {\n const { classNames, ...panelProps } = props;\n return h(SavedViewsPanelChrome, {\n ...panelProps,\n className: [props.className, classNames?.viewsPanel]\n .filter(Boolean)\n .join(\" \"),\n slots,\n });\n };\n },\n {\n name: \"SavedViewsPanel\",\n props: {\n views: { type: Array as PropType<SavedViewsPanelProps[\"views\"]> },\n onApply: { type: Function as PropType<SavedViewsPanelProps[\"onApply\"]> },\n onRename: {\n type: Function as PropType<SavedViewsPanelProps[\"onRename\"]>,\n },\n onMove: { type: Function as PropType<SavedViewsPanelProps[\"onMove\"]> },\n onSetDefault: {\n type: Function as PropType<SavedViewsPanelProps[\"onSetDefault\"]>,\n },\n onRemove: {\n type: Function as PropType<SavedViewsPanelProps[\"onRemove\"]>,\n },\n labels: { type: Object as PropType<SavedViewsPanelProps[\"labels\"]> },\n footer: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n SavedViewsPanelProps[\"footer\"]\n >,\n default: undefined,\n },\n className: {\n type: String as PropType<SavedViewsPanelProps[\"className\"]>,\n },\n classNames: {\n type: Object as PropType<SavedViewsPanelProps[\"classNames\"]>,\n },\n },\n }\n);\n\n/** The table creates the saved-view model once; this fill only renders it. */\nexport function savedViews(\n options: MaybeRefOrGetter<UseSavedViewsOptions>\n): StaticTableFeature {\n return extendFeature(bindingSavedViews(options), [\n slotRender(SAVED_VIEWS_CONTROL, (props) =>\n h(SavedViewsMenuChrome, { ...props, slots: elementSavedViewsMenuSlots })\n ),\n ]);\n}\n"],"mappings":";;;;;;;;;AAaA,MAAa,6BAAkD;CAC7D,UAAU,EAAE,OAAO,YAAY,cAAc,OAAO,KAAK;CACzD,SAAS,EAAE,OAAO,YAAY,cAAc,OAAO,KAAK;CACxD,QAAQ,EAAE,OAAO,OAAO,eACtB,EAAEA,WAAc;EAAE,GAAG;EAAO;EAAO;CAAS,CAAC;CAC/C,OAAO,qBAAqB,YAC1B,EAAE,wBAAwB;EACxB;EACA,cAAc;CAChB,CAAC,CACH;AACF;AACA,SAAgB,4BACd,OACsB;CACtB,OAAO;EACL,UAAU,UACR,EACE,aACA,EACE,OAAO;GACL,wBAAwB,MAAM;GAC9B,OAAO,MAAM;EACf,EACF,GACA,EACE,eAAe;GACb,EACE,MACA,EAAE,wBAAwB,oBAAoB,GAC9C,MAAM,KACR;GACA,MAAM;GACN,MAAM,SACF,EAAE,QAAQ,EAAE,wBAAwB,qBAAqB,GAAG,CAC1D,MAAM,MACR,CAAC,IACD;EACN,EACF,CACF;EACF,MAAM,UACJ,EACE,OACA;GACE,KAAK,MAAM;GACX,OAAO,MA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Ac,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-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,EAC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AyB;IACnC,IAAI,MAAM,aAAa;IACvB,IAAI,MAAM,QAAQ,SAAS;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,7 +1,7 @@
|
|
|
1
1
|
const require_button = require("./button-BFjBL9m3.cjs");
|
|
2
|
-
const require_ElementInput = require("./ElementInput-
|
|
2
|
+
const require_ElementInput = require("./ElementInput-BF97xXSC.cjs");
|
|
3
3
|
const require_ElementCard = require("./ElementCard-BRZekaHr.cjs");
|
|
4
|
-
const require_ElementColumnMenuPanel = require("./ElementColumnMenuPanel-
|
|
4
|
+
const require_ElementColumnMenuPanel = require("./ElementColumnMenuPanel-Ddh01A17.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-luZVHu3w.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"saved-views-BTJxWOyY.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,EAAA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A,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-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,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,CAAC,IACD;EACN,EACF,CACF;EACF,MAAM,WAAA,GACJA,IAAAA,EAAAA,CACE,OACA;GACE,KAAK,MAAM;GACX,OAAO,MAAM,CAAC,CAAC;GACf,wBAAwB,MAAM;GAC9B,OAAO,MAAM,OAAO;EACtB,GACA,EAAA,GACEA,IAAAA,EAAAA,CACE,OACA;GACE,wBAAwB;GACxB,OAAO,MAAM,OAAO;EACtB,GACA;GACE,MAAM,YACF,MAAM,OACND,eAA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,OAAO;CACxC;AACF;;;;ACpHA,MAAa,mBAAA,GAAkBM,IAAAA,gBAAAA,EAC5B,UAAgC;CAC/B,MAAM,QAAQ,kCAAkC,MAAM,cAAc,CAAC,CAAC;CACtE,aAAa;EACX,MAAM,EAAE,YAAY,GAAG,eAAe;EACtC,QAAA,GAAOC,IAAAA,EAAAA,CAAEC,wBAAAA,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,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"}
|
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-luZVHu3w.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-DDo4Bl-f.js";
|
|
2
2
|
export { SavedViewsPanel, savedViews };
|
|
@@ -8,7 +8,7 @@ function rtlScrollbarGutter(dir, view) {
|
|
|
8
8
|
if (dir !== "rtl" || !view) return "0px";
|
|
9
9
|
const layout = view.document.documentElement.getBoundingClientRect().width;
|
|
10
10
|
const gutter = view.innerWidth - layout;
|
|
11
|
-
return `${gutter
|
|
11
|
+
return `${Math.max(gutter, 0)}px`;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
14
|
Object.defineProperty(exports, "rtlScrollbarGutter", {
|
|
@@ -18,4 +18,4 @@ Object.defineProperty(exports, "rtlScrollbarGutter", {
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
//# sourceMappingURL=scrollbarGutter-
|
|
21
|
+
//# sourceMappingURL=scrollbarGutter-CV4T0Q-9.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollbarGutter-
|
|
1
|
+
{"version":3,"file":"scrollbarGutter-CV4T0Q-9.cjs","names":[],"sources":["../src/scrollbarGutter.ts"],"sourcesContent":["/**\n * Distance a fixed overlay is placed left of its trigger when the page\n * reserves a scrollbar gutter and the scrollbar itself is not taking that\n * space. Overlay math uses the wider viewport; the layout box does not.\n */\nexport function rtlScrollbarGutter(\n dir: string | undefined,\n view: Window | null | undefined\n): string {\n if (dir !== \"rtl\" || !view) return \"0px\";\n const layout = view.document.documentElement.getBoundingClientRect().width;\n const gutter = view.innerWidth - layout;\n return `${Math.max(gutter, 0)}px`;\n}\n"],"mappings":";;;;;;AAKA,SAAgB,mBACd,KACA,MACQ;CACR,IAAI,QAAQ,SAAS,CAAC,MAAM,OAAO;CACnC,MAAM,SAAS,KAAK,SAAS,gBAAgB,sBAAsB,CAAC,CAAC;CACrE,MAAM,SAAS,KAAK,aAAa;CACjC,OAAO,GAAG,KAAK,IAAI,QAAQ,CAAC,EAAE;AAChC"}
|
|
@@ -8,9 +8,9 @@ function rtlScrollbarGutter(dir, view) {
|
|
|
8
8
|
if (dir !== "rtl" || !view) return "0px";
|
|
9
9
|
const layout = view.document.documentElement.getBoundingClientRect().width;
|
|
10
10
|
const gutter = view.innerWidth - layout;
|
|
11
|
-
return `${gutter
|
|
11
|
+
return `${Math.max(gutter, 0)}px`;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
14
|
export { rtlScrollbarGutter as t };
|
|
15
15
|
|
|
16
|
-
//# sourceMappingURL=scrollbarGutter-
|
|
16
|
+
//# sourceMappingURL=scrollbarGutter-D9pkb_r0.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollbarGutter-
|
|
1
|
+
{"version":3,"file":"scrollbarGutter-D9pkb_r0.js","names":[],"sources":["../src/scrollbarGutter.ts"],"sourcesContent":["/**\n * Distance a fixed overlay is placed left of its trigger when the page\n * reserves a scrollbar gutter and the scrollbar itself is not taking that\n * space. Overlay math uses the wider viewport; the layout box does not.\n */\nexport function rtlScrollbarGutter(\n dir: string | undefined,\n view: Window | null | undefined\n): string {\n if (dir !== \"rtl\" || !view) return \"0px\";\n const layout = view.document.documentElement.getBoundingClientRect().width;\n const gutter = view.innerWidth - layout;\n return `${Math.max(gutter, 0)}px`;\n}\n"],"mappings":";;;;;;AAKA,SAAgB,mBACd,KACA,MACQ;CACR,IAAI,QAAQ,SAAS,CAAC,MAAM,OAAO;CACnC,MAAM,SAAS,KAAK,SAAS,gBAAgB,sBAAsB,CAAC,CAAC;CACrE,MAAM,SAAS,KAAK,aAAa;CACjC,OAAO,GAAG,KAAK,IAAI,QAAQ,CAAC,EAAE;AAChC"}
|