@adapttable/naive-ui 0.5.0 → 0.6.1
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/README.md +6 -6
- package/dist/{NaiveRowActions-BR140413.cjs → NaiveRowActions-DUlkorWa.cjs} +2 -2
- package/dist/NaiveRowActions-DUlkorWa.cjs.map +1 -0
- package/dist/{NaiveRowActions-DVyMXQJq.js → NaiveRowActions-DdHuWGCQ.js} +2 -2
- package/dist/NaiveRowActions-DdHuWGCQ.js.map +1 -0
- package/dist/assistant.cjs +360 -5
- package/dist/assistant.cjs.map +1 -0
- package/dist/assistant.js +356 -1
- package/dist/assistant.js.map +1 -0
- package/dist/batch-editing.cjs +1 -1
- package/dist/batch-editing.d.cts +1 -1
- package/dist/batch-editing.d.ts +1 -1
- package/dist/batch-editing.js +1 -1
- package/dist/cell-navigation.cjs.map +1 -1
- package/dist/cell-navigation.d.cts +1 -1
- package/dist/cell-navigation.d.cts.map +1 -1
- package/dist/cell-navigation.d.ts +1 -1
- package/dist/cell-navigation.d.ts.map +1 -1
- package/dist/cell-navigation.js.map +1 -1
- package/dist/column-layout.cjs +24 -0
- package/dist/column-layout.cjs.map +1 -0
- package/dist/column-layout.d.cts +12 -0
- package/dist/column-layout.d.cts.map +1 -0
- package/dist/column-layout.d.ts +12 -0
- package/dist/column-layout.d.ts.map +1 -0
- package/dist/column-layout.js +22 -0
- package/dist/column-layout.js.map +1 -0
- package/dist/{column-menu-GUeADLrH.cjs → column-menu-B-EhL5Ih.cjs} +3 -3
- package/dist/{column-menu-GUeADLrH.cjs.map → column-menu-B-EhL5Ih.cjs.map} +1 -1
- package/dist/{column-menu-BeNblq2u.js → column-menu-BwKtCGEo.js} +3 -3
- package/dist/{column-menu-BeNblq2u.js.map → column-menu-BwKtCGEo.js.map} +1 -1
- package/dist/column-menu.cjs +1 -1
- package/dist/column-menu.d.cts +24 -2
- package/dist/column-menu.d.cts.map +1 -0
- package/dist/column-menu.d.ts +24 -2
- package/dist/column-menu.d.ts.map +1 -0
- package/dist/column-menu.js +1 -1
- package/dist/command-palette.cjs +112 -2
- package/dist/command-palette.cjs.map +1 -0
- package/dist/command-palette.js +111 -1
- package/dist/command-palette.js.map +1 -0
- package/dist/context-menu.cjs +140 -2
- package/dist/context-menu.cjs.map +1 -0
- package/dist/context-menu.js +139 -1
- package/dist/context-menu.js.map +1 -0
- package/dist/{editing-DTOBwNI6.js → editing-Btr52gcG.js} +19 -5
- package/dist/{editing-DTOBwNI6.js.map → editing-Btr52gcG.js.map} +1 -1
- package/dist/{editing-BAUOl5Ox.cjs → editing-CIvf43jv.cjs} +23 -3
- package/dist/editing-CIvf43jv.cjs.map +1 -0
- package/dist/{editing-Dho3Y2RK.d.ts → editing-dN16BK0k.d.ts} +10 -2
- package/dist/{editing-Dho3Y2RK.d.ts.map → editing-dN16BK0k.d.ts.map} +1 -1
- package/dist/{editing-CdIoFGiK.d.cts → editing-xDGCcasQ.d.cts} +10 -2
- package/dist/{editing-CdIoFGiK.d.cts.map → editing-xDGCcasQ.d.cts.map} +1 -1
- package/dist/editing.cjs +4 -13
- package/dist/editing.d.cts +2 -2
- package/dist/editing.d.ts +2 -2
- package/dist/editing.js +2 -2
- package/dist/export-DLLCc4Lb.js +10 -0
- package/dist/export-DLLCc4Lb.js.map +1 -0
- package/dist/{export-csv.cjs → export-fT_9Xp5t.cjs} +7 -3
- package/dist/export-fT_9Xp5t.cjs.map +1 -0
- package/dist/export.cjs +2 -2
- package/dist/export.d.cts +9 -2
- package/dist/export.d.cts.map +1 -0
- package/dist/export.d.ts +9 -2
- package/dist/export.d.ts.map +1 -0
- package/dist/export.js +1 -1
- package/dist/filtering.cjs +22 -0
- package/dist/filtering.cjs.map +1 -0
- package/dist/filtering.d.cts +13 -0
- package/dist/filtering.d.cts.map +1 -0
- package/dist/filtering.d.ts +13 -0
- package/dist/filtering.d.ts.map +1 -0
- package/dist/filtering.js +21 -0
- package/dist/filtering.js.map +1 -0
- package/dist/{filters-Cy170_qU.js → filters-BxRu0r4j.js} +6 -5
- package/dist/filters-BxRu0r4j.js.map +1 -0
- package/dist/{filters-DIlfaXQJ.cjs → filters-U0LYOQjA.cjs} +5 -4
- package/dist/filters-U0LYOQjA.cjs.map +1 -0
- package/dist/filters.cjs +1 -1
- package/dist/filters.d.cts +90 -2
- package/dist/filters.d.cts.map +1 -0
- package/dist/filters.d.ts +90 -2
- package/dist/filters.d.ts.map +1 -0
- package/dist/filters.js +1 -1
- package/dist/grouping-panel.cjs +146 -3
- package/dist/grouping-panel.cjs.map +1 -0
- package/dist/grouping-panel.js +145 -2
- package/dist/grouping-panel.js.map +1 -0
- package/dist/header-filters.d.cts +52 -2
- package/dist/header-filters.d.cts.map +1 -0
- package/dist/header-filters.d.ts +52 -2
- package/dist/header-filters.d.ts.map +1 -0
- package/dist/index.cjs +2 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -27
- package/dist/index.js.map +1 -1
- package/dist/preset.cjs +8 -9
- package/dist/preset.cjs.map +1 -1
- package/dist/preset.js +7 -8
- 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.cjs +185 -2
- package/dist/row-reorder.cjs.map +1 -0
- package/dist/row-reorder.d.cts +2 -1
- package/dist/row-reorder.d.cts.map +1 -1
- package/dist/row-reorder.d.ts +2 -1
- package/dist/row-reorder.d.ts.map +1 -1
- package/dist/row-reorder.js +185 -1
- package/dist/row-reorder.js.map +1 -0
- package/dist/selection.cjs +8 -0
- package/dist/selection.d.cts +2 -0
- package/dist/selection.d.ts +2 -0
- package/dist/selection.js +2 -0
- package/dist/side-panel.cjs +59 -2
- package/dist/side-panel.cjs.map +1 -0
- package/dist/side-panel.js +58 -1
- package/dist/side-panel.js.map +1 -0
- package/dist/styles.css +39 -39
- package/package.json +33 -23
- package/dist/NaiveRowActions-BR140413.cjs.map +0 -1
- package/dist/NaiveRowActions-DVyMXQJq.js.map +0 -1
- package/dist/assistant-DppW6EN1.cjs +0 -380
- package/dist/assistant-DppW6EN1.cjs.map +0 -1
- package/dist/assistant-_SYRZCOi.js +0 -357
- package/dist/assistant-_SYRZCOi.js.map +0 -1
- package/dist/column-menu-DdWVP1hz.d.cts +0 -23
- package/dist/column-menu-DdWVP1hz.d.cts.map +0 -1
- package/dist/column-menu-DdWVP1hz.d.ts +0 -23
- package/dist/column-menu-DdWVP1hz.d.ts.map +0 -1
- package/dist/command-palette-4qS9viir.cjs +0 -117
- package/dist/command-palette-4qS9viir.cjs.map +0 -1
- package/dist/command-palette-CSI-tgcP.js +0 -112
- package/dist/command-palette-CSI-tgcP.js.map +0 -1
- package/dist/context-menu-CsbLaMcR.js +0 -140
- package/dist/context-menu-CsbLaMcR.js.map +0 -1
- package/dist/context-menu-qVwE9S2V.cjs +0 -145
- package/dist/context-menu-qVwE9S2V.cjs.map +0 -1
- package/dist/editing-BAUOl5Ox.cjs.map +0 -1
- package/dist/export-csv-BU39yRSN.d.ts +0 -9
- package/dist/export-csv-BU39yRSN.d.ts.map +0 -1
- package/dist/export-csv-DRDjZuQj.d.cts +0 -9
- package/dist/export-csv-DRDjZuQj.d.cts.map +0 -1
- package/dist/export-csv.cjs.map +0 -1
- package/dist/export-csv.d.cts +0 -2
- package/dist/export-csv.d.ts +0 -2
- package/dist/export-csv.js +0 -10
- package/dist/export-csv.js.map +0 -1
- package/dist/features.cjs +0 -225
- package/dist/features.d.cts +0 -41
- package/dist/features.d.ts +0 -41
- package/dist/features.js +0 -37
- package/dist/filters-ClqB1_n4.d.cts +0 -90
- package/dist/filters-ClqB1_n4.d.cts.map +0 -1
- package/dist/filters-Cy170_qU.js.map +0 -1
- package/dist/filters-DIlfaXQJ.cjs.map +0 -1
- package/dist/filters-b2ZuVZPI.d.ts +0 -90
- package/dist/filters-b2ZuVZPI.d.ts.map +0 -1
- package/dist/grouping-panel-BPaPG49S.cjs +0 -151
- package/dist/grouping-panel-BPaPG49S.cjs.map +0 -1
- package/dist/grouping-panel-CYUPSa0u.js +0 -146
- package/dist/grouping-panel-CYUPSa0u.js.map +0 -1
- package/dist/header-filters-CQg6clum.d.cts +0 -52
- package/dist/header-filters-CQg6clum.d.cts.map +0 -1
- package/dist/header-filters-CQg6clum.d.ts +0 -52
- package/dist/header-filters-CQg6clum.d.ts.map +0 -1
- package/dist/row-reorder-2Ztn7QRu.cjs +0 -191
- package/dist/row-reorder-2Ztn7QRu.cjs.map +0 -1
- package/dist/row-reorder-DBzbJ20V.js +0 -186
- package/dist/row-reorder-DBzbJ20V.js.map +0 -1
- package/dist/side-panel-Bf4zBlYZ.cjs +0 -64
- package/dist/side-panel-Bf4zBlYZ.cjs.map +0 -1
- package/dist/side-panel-CLTgXUnb.js +0 -59
- package/dist/side-panel-CLTgXUnb.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-fT_9Xp5t.cjs","names":["withNaiveExport","bindingExport"],"sources":["../src/export-csv.ts"],"sourcesContent":["import type { StaticTableFeature, TableFeature } from \"@adapttable/vue\";\nimport {\n exportCsv as bindingExport,\n type ExportCsvOptions,\n} from \"@adapttable/vue/features\";\n\nimport { withNaiveExport } from \"./export/withNaiveExport\";\n\n/** Export the current view as CSV through the binding's cancellable export model. */\nexport function exportCsv(options?: boolean): StaticTableFeature;\nexport function exportCsv<TRow>(\n options?: boolean | ExportCsvOptions<TRow>\n): TableFeature<TRow>;\nexport function exportCsv<TRow>(\n options: boolean | ExportCsvOptions<TRow> = true\n): TableFeature<TRow> {\n return withNaiveExport(bindingExport<TRow>(options));\n}\nexport type { ExportCsvOptions } from \"@adapttable/vue/features\";\n"],"mappings":";;;AAaA,SAAgB,UACd,UAA4C,MACxB;CACpB,OAAOA,wBAAAA,iBAAAA,GAAgBC,yBAAAA,UAAAA,CAAoB,OAAO,CAAC;AACrD"}
|
package/dist/export.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
exports.exportCsv =
|
|
2
|
+
const require_export = require("./export-fT_9Xp5t.cjs");
|
|
3
|
+
exports.exportCsv = require_export.exportCsv;
|
package/dist/export.d.cts
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { StaticTableFeature, TableFeature } from "@adapttable/vue";
|
|
2
|
+
import { ExportCsvOptions, ExportCsvOptions as ExportCsvOptions$1 } from "@adapttable/vue/features";
|
|
3
|
+
//#region src/export-csv.d.ts
|
|
4
|
+
/** Export the current view as CSV through the binding's cancellable export model. */
|
|
5
|
+
declare function exportCsv(options?: boolean): StaticTableFeature;
|
|
6
|
+
declare function exportCsv<TRow>(options?: boolean | ExportCsvOptions$1<TRow>): TableFeature<TRow>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { type ExportCsvOptions, exportCsv };
|
|
9
|
+
//# sourceMappingURL=export.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.d.cts","names":[],"sources":["../src/export-csv.ts"],"mappings":";;;;iBASgB,UAAU,oBAAoB;iBAC9B,UAAU,MACxB,oBAAoB,mBAAiB,QACpC,aAAa"}
|
package/dist/export.d.ts
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { StaticTableFeature, TableFeature } from "@adapttable/vue";
|
|
2
|
+
import { ExportCsvOptions, ExportCsvOptions as ExportCsvOptions$1 } from "@adapttable/vue/features";
|
|
3
|
+
//#region src/export-csv.d.ts
|
|
4
|
+
/** Export the current view as CSV through the binding's cancellable export model. */
|
|
5
|
+
declare function exportCsv(options?: boolean): StaticTableFeature;
|
|
6
|
+
declare function exportCsv<TRow>(options?: boolean | ExportCsvOptions$1<TRow>): TableFeature<TRow>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { type ExportCsvOptions, exportCsv };
|
|
9
|
+
//# sourceMappingURL=export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.d.ts","names":[],"sources":["../src/export-csv.ts"],"mappings":";;;;iBASgB,UAAU,oBAAoB;iBAC9B,UAAU,MACxB,oBAAoB,mBAAiB,QACpC,aAAa"}
|
package/dist/export.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { exportCsv } from "./export-
|
|
1
|
+
import { t as exportCsv } from "./export-DLLCc4Lb.js";
|
|
2
2
|
export { exportCsv };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_filters = require("./filters-U0LYOQjA.cjs");
|
|
3
|
+
const require_header_filters = require("./header-filters-CvStECsj.cjs");
|
|
4
|
+
let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
|
|
5
|
+
//#region src/filtering.ts
|
|
6
|
+
/**
|
|
7
|
+
* All of filtering — the filter panel for the given definitions and the
|
|
8
|
+
* header controls — with this kit's controls, passed to `features` as one
|
|
9
|
+
* entry.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
function filteringFamily(defs) {
|
|
14
|
+
return (0, _adapttable_vue_adapter.filteringFamilyList)({
|
|
15
|
+
filters: (given) => require_filters.filters(given),
|
|
16
|
+
headerFilters: require_header_filters.headerFilters
|
|
17
|
+
}, defs);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.filteringFamily = filteringFamily;
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=filtering.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filtering.cjs","names":["filteringFamilyList","filters"],"sources":["../src/filtering.ts"],"sourcesContent":["/**\n * The filtering family — `@adapttable/naive-ui/filtering`.\n *\n * Its own entry, so a table that imports `filters` or `headerFilters` alone\n * loads that member alone.\n */\nimport type { FilterDef, TableFeature } from \"@adapttable/vue\";\nimport { filteringFamilyList } from \"@adapttable/vue/adapter\";\n\nimport { filters } from \"./filters\";\nimport { headerFilters } from \"./header-filters\";\n\n/**\n * All of filtering — the filter panel for the given definitions and the\n * header controls — with this kit's controls, passed to `features` as one\n * entry.\n *\n * @public\n */\nexport function filteringFamily<TRow>(\n defs: readonly FilterDef<TRow>[]\n): readonly TableFeature<TRow>[] {\n return filteringFamilyList<TableFeature<TRow>, FilterDef<TRow>>(\n { filters: (given) => filters(given), headerFilters },\n defs\n );\n}\n"],"mappings":";;;;;;;;;;;;AAmBA,SAAgB,gBACd,MAC+B;CAC/B,QAAA,GAAOA,wBAAAA,oBAAAA,CACL;EAAE,UAAU,UAAUC,gBAAAA,QAAQ,KAAK;EAAG,eAAA,uBAAA;CAAc,GACpD,IACF;AACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FilterDef, TableFeature } from "@adapttable/vue";
|
|
2
|
+
//#region src/filtering.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* All of filtering — the filter panel for the given definitions and the
|
|
5
|
+
* header controls — with this kit's controls, passed to `features` as one
|
|
6
|
+
* entry.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
declare function filteringFamily<TRow>(defs: readonly FilterDef<TRow>[]): readonly TableFeature<TRow>[];
|
|
11
|
+
//#endregion
|
|
12
|
+
export { filteringFamily };
|
|
13
|
+
//# sourceMappingURL=filtering.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filtering.d.cts","names":[],"sources":["../src/filtering.ts"],"mappings":";;;;;;;;;iBAmBgB,gBAAgB,MAC9B,eAAe,UAAU,mBACf,aAAa"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FilterDef, TableFeature } from "@adapttable/vue";
|
|
2
|
+
//#region src/filtering.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* All of filtering — the filter panel for the given definitions and the
|
|
5
|
+
* header controls — with this kit's controls, passed to `features` as one
|
|
6
|
+
* entry.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
declare function filteringFamily<TRow>(defs: readonly FilterDef<TRow>[]): readonly TableFeature<TRow>[];
|
|
11
|
+
//#endregion
|
|
12
|
+
export { filteringFamily };
|
|
13
|
+
//# sourceMappingURL=filtering.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filtering.d.ts","names":[],"sources":["../src/filtering.ts"],"mappings":";;;;;;;;;iBAmBgB,gBAAgB,MAC9B,eAAe,UAAU,mBACf,aAAa"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { n as filters } from "./filters-BxRu0r4j.js";
|
|
2
|
+
import { t as headerFilters } from "./header-filters-Bxb3snYP.js";
|
|
3
|
+
import { filteringFamilyList } from "@adapttable/vue/adapter";
|
|
4
|
+
//#region src/filtering.ts
|
|
5
|
+
/**
|
|
6
|
+
* All of filtering — the filter panel for the given definitions and the
|
|
7
|
+
* header controls — with this kit's controls, passed to `features` as one
|
|
8
|
+
* entry.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
function filteringFamily(defs) {
|
|
13
|
+
return filteringFamilyList({
|
|
14
|
+
filters: (given) => filters(given),
|
|
15
|
+
headerFilters
|
|
16
|
+
}, defs);
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { filteringFamily };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=filtering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filtering.js","names":[],"sources":["../src/filtering.ts"],"sourcesContent":["/**\n * The filtering family — `@adapttable/naive-ui/filtering`.\n *\n * Its own entry, so a table that imports `filters` or `headerFilters` alone\n * loads that member alone.\n */\nimport type { FilterDef, TableFeature } from \"@adapttable/vue\";\nimport { filteringFamilyList } from \"@adapttable/vue/adapter\";\n\nimport { filters } from \"./filters\";\nimport { headerFilters } from \"./header-filters\";\n\n/**\n * All of filtering — the filter panel for the given definitions and the\n * header controls — with this kit's controls, passed to `features` as one\n * entry.\n *\n * @public\n */\nexport function filteringFamily<TRow>(\n defs: readonly FilterDef<TRow>[]\n): readonly TableFeature<TRow>[] {\n return filteringFamilyList<TableFeature<TRow>, FilterDef<TRow>>(\n { filters: (given) => filters(given), headerFilters },\n defs\n );\n}\n"],"mappings":";;;;;;;;;;;AAmBA,SAAgB,gBACd,MAC+B;CAC/B,OAAO,oBACL;EAAE,UAAU,UAAU,QAAQ,KAAK;EAAG;CAAc,GACpD,IACF;AACF"}
|
|
@@ -2,7 +2,7 @@ import { t as naiveButton } from "./button-BxXdDW7A.js";
|
|
|
2
2
|
import { t as naiveInput } from "./input-YgQ2d8K9.js";
|
|
3
3
|
import { t as naiveSelect } from "./select-Bgc5ttop.js";
|
|
4
4
|
import { i as _sfc_main$2, n as _sfc_main$3, o as NaiveFilterSurface } from "./NaiveFilterField-SRraOkWU.js";
|
|
5
|
-
import { ACTIVE_FILTER_CHIPS, FilterChipsChrome, FilterPanelChrome, FilterTreeChrome,
|
|
5
|
+
import { ACTIVE_FILTER_CHIPS, FILTERS_PANEL, FilterChipsChrome, FilterPanelChrome, FilterTreeChrome, booleanFieldPart, extendFeature, filterViewKey, filterWidgetComponent, mergeVueAttrs, multiSelectFieldPart, rangeFieldPart, selectFieldPart, slotRender, textFieldPart, useDataTableClassNames, useFeatureState, useFilterTreeModel } from "@adapttable/vue/adapter";
|
|
6
6
|
import { filterTypes, filters } from "@adapttable/vue/features";
|
|
7
7
|
import { createBlock, createElementVNode, createPropsRestProxy, createVNode, defineComponent, h, normalizeClass, openBlock, unref, useId, withCtx } from "vue";
|
|
8
8
|
import { NCollapse, NCollapseItem, NFormItem, NIcon } from "naive-ui";
|
|
@@ -140,7 +140,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
140
140
|
});
|
|
141
141
|
//#endregion
|
|
142
142
|
//#region src/filters/NaiveFiltersPanel.ts
|
|
143
|
-
function useNaiveFiltersPanel(
|
|
143
|
+
function useNaiveFiltersPanel(props) {
|
|
144
|
+
const widgets = props.widgets;
|
|
144
145
|
const names = useDataTableClassNames();
|
|
145
146
|
const model = useFeatureState(filterViewKey());
|
|
146
147
|
const buttonClass = (part) => {
|
|
@@ -207,7 +208,7 @@ widgets: {
|
|
|
207
208
|
type: Array,
|
|
208
209
|
required: true
|
|
209
210
|
} },
|
|
210
|
-
setup:
|
|
211
|
+
setup: useNaiveFiltersPanel
|
|
211
212
|
});
|
|
212
213
|
//#endregion
|
|
213
214
|
//#region src/filters/widgets.ts
|
|
@@ -259,11 +260,11 @@ const FILTER_WIDGETS = [
|
|
|
259
260
|
* @public
|
|
260
261
|
*/
|
|
261
262
|
function filtersWith(widgets) {
|
|
262
|
-
return (defs = [], options = {}) => extendFeature(filters(defs, options), [slotRender(
|
|
263
|
+
return (defs = [], options = {}) => extendFeature(filters(defs, options), [slotRender(FILTERS_PANEL, () => h(NaiveFiltersPanel, { widgets })), slotRender(ACTIVE_FILTER_CHIPS, (props) => h(NaiveFilterChips, { ...props }))]);
|
|
263
264
|
}
|
|
264
265
|
/** Declarative filters with this kit's chip strip, panel and every widget. @public */
|
|
265
266
|
const filters$1 = /* @__PURE__ */ filtersWith(FILTER_WIDGETS);
|
|
266
267
|
//#endregion
|
|
267
268
|
export { checklistFilterWidget as a, selectFilterWidget as c, booleanFilterWidget as i, textFilterWidget as l, filters$1 as n, multiSelectFilterWidget as o, filtersWith as r, rangeFilterWidget as s, filterTypes as t, _sfc_main as u };
|
|
268
269
|
|
|
269
|
-
//# sourceMappingURL=filters-
|
|
270
|
+
//# sourceMappingURL=filters-BxRu0r4j.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters-BxRu0r4j.js","names":["NaiveFilterTree","NaiveBasicFilterField","NaiveChecklistField","bindingFilters","filters"],"sources":["../src/filters/NaiveFilterChips.ts","../src/filters/NaiveFilterDisclosure.vue","../src/filters/NaiveFilterTree.vue","../src/filters/NaiveFiltersPanel.ts","../src/filters/widgets.ts","../src/filters.ts"],"sourcesContent":["import {\n type ActiveFilterChipsSlotProps,\n FilterChipsChrome,\n useDataTableClassNames,\n} from \"@adapttable/vue/adapter\";\nimport { defineComponent, type PropType } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\n\nexport const NaiveFilterChips = defineComponent(\n (props: ActiveFilterChipsSlotProps) => {\n const names = useDataTableClassNames();\n return () =>\n FilterChipsChrome({\n ...props,\n classNames: names.value,\n slots: {\n Remove: ({ attrs }) => naiveButton(attrs, \"×\", { text: true }),\n Clear: ({ attrs, label }) => naiveButton(attrs, label),\n },\n });\n },\n {\n name: \"NaiveFilterChips\",\n props: {\n chips: { type: Array as PropType<ActiveFilterChipsSlotProps[\"chips\"]> },\n labels: {\n type: Object as PropType<ActiveFilterChipsSlotProps[\"labels\"]>,\n },\n onClearAll: {\n type: Function as PropType<ActiveFilterChipsSlotProps[\"onClearAll\"]>,\n },\n },\n }\n);\n","<script setup lang=\"ts\">\nimport type { FilterTreeDisclosureProps } from \"@adapttable/vue/adapter\";\nimport { NCollapse, NCollapseItem } from \"naive-ui\";\nimport { useId, type VNodeChild } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\n\ndefineOptions({ name: \"NaiveFilterDisclosure\" });\nconst props = defineProps<{\n readonly control: FilterTreeDisclosureProps<VNodeChild>;\n}>();\nconst contentId = `adapttable-naive-filter-tree-${useId()}`;\nconst Trigger = () =>\n naiveButton(\n {\n \"data-adapttable-part\": \"filter-tree-summary\",\n \"aria-expanded\": props.control.expanded,\n \"aria-controls\": contentId,\n class: props.control.summaryClassName,\n onClick: () => props.control.onExpandedChange(!props.control.expanded),\n },\n props.control.label\n );\nconst Content = () => props.control.children;\n</script>\n\n<template>\n <NCollapse\n data-adapttable-part=\"filter-tree\"\n :class=\"control.className\"\n :expanded-names=\"control.expanded ? ['advanced'] : []\"\n :trigger-areas=\"[]\"\n >\n <template #arrow><span aria-hidden=\"true\" /></template>\n <NCollapseItem name=\"advanced\">\n <template #header><Trigger /></template>\n <div :id=\"contentId\"><Content /></div>\n </NCollapseItem>\n </NCollapse>\n</template>\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n type FilterTreeBuilderProps,\n FilterTreeChrome,\n type FilterTreeSlots,\n useFilterTreeModel,\n} from \"@adapttable/vue/adapter\";\nimport { NFormItem } from \"naive-ui\";\nimport { h, type VNodeChild } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\nimport { naiveInput } from \"../controls/input\";\nimport { naiveSelect } from \"../controls/select\";\nimport NaiveFilterDisclosure from \"./NaiveFilterDisclosure.vue\";\n\ndefineOptions({ name: \"NaiveFilterTree\" });\nconst {\n defaultExpanded = undefined,\n labels = undefined,\n classNames = undefined,\n registry = undefined,\n ...props\n} = defineProps<{\n readonly defs: FilterTreeBuilderProps<TRow>[\"defs\"];\n readonly source: FilterTreeBuilderProps<TRow>[\"source\"];\n readonly labels?: NonNullable<FilterTreeBuilderProps<TRow>[\"labels\"]>;\n readonly classNames?: NonNullable<FilterTreeBuilderProps<TRow>[\"classNames\"]>;\n readonly registry?: NonNullable<FilterTreeBuilderProps<TRow>[\"registry\"]>;\n readonly defaultExpanded?: boolean;\n}>();\nconst model = useFilterTreeModel(() => ({\n ...props,\n defaultExpanded,\n labels,\n classNames,\n registry,\n}));\nfunction field(\n control: { label: string; fieldClassName?: string; labelClassName?: string },\n content: () => VNodeChild\n) {\n return h(\n NFormItem,\n {\n \"data-adapttable-part\": \"filter-field\",\n class: control.fieldClassName,\n showFeedback: false,\n size: \"small\",\n },\n {\n label: () =>\n h(\n \"span\",\n {\n \"data-adapttable-part\": \"filter-label\",\n class: control.labelClassName,\n },\n control.label\n ),\n default: content,\n }\n );\n}\nconst controls: FilterTreeSlots<VNodeChild> = {\n Select: (control) =>\n field(control, () =>\n naiveSelect({\n ...control,\n attrs: {\n \"data-adapttable-part\": control.part,\n \"aria-label\": control.label,\n class: control.className,\n },\n })\n ),\n Input: (control) =>\n field(control, () =>\n naiveInput({\n ...control,\n attrs: {\n \"data-adapttable-part\": \"filter-input\",\n \"aria-label\": control.label,\n class: control.className,\n },\n })\n ),\n Button: (control) =>\n naiveButton(\n {\n \"data-adapttable-part\": control.part,\n class: control.className,\n onClick: control.onClick,\n },\n control.label\n ),\n Disclosure: (control) => h(NaiveFilterDisclosure, { control }),\n};\nconst Render = () => FilterTreeChrome({ model: model.value, controls });\nRender.props = [] as string[];\n</script>\n\n<template><Render /></template>\n","import {\n FilterPanelChrome,\n type FilterPanelSlots,\n filterViewKey,\n type FilterWidget,\n filterWidgetComponent,\n mergeVueAttrs,\n useDataTableClassNames,\n useFeatureState,\n} from \"@adapttable/vue/adapter\";\nimport { NIcon } from \"naive-ui\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\nimport { NaiveFilterSurface } from \"./NaiveFilterSurface\";\nimport NaiveFilterTree from \"./NaiveFilterTree.vue\";\n\nfunction useNaiveFiltersPanel(props: {\n readonly widgets: readonly FilterWidget[];\n}) {\n const widgets = props.widgets;\n const names = useDataTableClassNames();\n const model = useFeatureState(filterViewKey<unknown>());\n const buttonClass = (part: string) => {\n if (part === \"filters-clear\") return names.value.filtersClear;\n if (part === \"filters-close\") return names.value.filtersClose;\n return names.value.filtersDone;\n };\n const controls: FilterPanelSlots<unknown> = {\n Trigger: (trigger) =>\n naiveButton(\n mergeVueAttrs(trigger.attrs, {\n ref: trigger.triggerRef,\n class: names.value.filtersButton,\n onPointerdown: trigger.onPointerDown,\n onClick: trigger.onClick,\n }),\n [\n h(\n NIcon,\n {\n \"data-adapttable-part\": \"filters-icon\",\n class: names.value.filtersIcon,\n \"aria-hidden\": \"true\",\n },\n {\n default: () =>\n h(\"svg\", { viewBox: \"0 0 24 24\", focusable: \"false\" }, [\n h(\"path\", {\n d: \"M3 4h18l-7 8v7l-4 2v-9z\",\n fill: \"none\",\n stroke: \"currentColor\",\n }),\n ]),\n }\n ),\n trigger.label,\n trigger.count\n ? h(\n \"span\",\n {\n \"data-adapttable-part\": \"filters-count\",\n class: names.value.filtersCount,\n },\n ` (${trigger.count})`\n )\n : null,\n ]\n ),\n Button: (button) =>\n naiveButton(\n {\n \"data-adapttable-part\": button.part,\n class: buttonClass(button.part),\n disabled: button.disabled,\n onClick: button.onClick,\n },\n button.label\n ),\n Tree: (tree) => h(NaiveFilterTree, { ...tree, classNames: names.value }),\n Field: (field) =>\n h(filterWidgetComponent(field.def, field.registry, widgets), {\n ...field,\n }),\n Popover: (surface) => h(NaiveFilterSurface, { ...surface, modal: false }),\n Drawer: (surface) => h(NaiveFilterSurface, { ...surface, modal: true }),\n };\n return () =>\n model.value\n ? FilterPanelChrome({\n model: model.value,\n controls,\n classNames: names.value,\n })\n : null;\n}\n\nexport const NaiveFiltersPanel = defineComponent({\n name: \"NaiveFiltersPanel\",\n props: {\n /** The widgets the panel draws its fields with. */\n widgets: {\n type: Array as PropType<readonly FilterWidget[]>,\n required: true,\n },\n },\n setup: useNaiveFiltersPanel,\n});\n","import {\n booleanFieldPart,\n type FilterFieldOptions,\n type FilterFieldPart,\n type FilterWidget,\n multiSelectFieldPart,\n rangeFieldPart,\n selectFieldPart,\n textFieldPart,\n} from \"@adapttable/vue/adapter\";\nimport { type FunctionalComponent, h } from \"vue\";\n\nimport NaiveBasicFilterField from \"./NaiveBasicFilterField.vue\";\nimport NaiveChecklistField from \"./NaiveChecklistField.vue\";\n\n/** A field drawn by one shared field part. */\nfunction basicWidget(part: FilterFieldPart): FilterWidget {\n const render: FunctionalComponent<FilterFieldOptions<unknown>> = (props) =>\n h(NaiveBasicFilterField<unknown>, { ...props, parts: [part] });\n return { kinds: part.kinds, render };\n}\n\nconst ChecklistField: FunctionalComponent<FilterFieldOptions<unknown>> = (\n props\n) => h(NaiveChecklistField<unknown>, { ...props });\n\n/** The Naive UI text filter: its operator and its value. @public */\nexport const textFilterWidget = /* @__PURE__ */ basicWidget(textFieldPart);\n/** The Naive UI yes/no filter. @public */\nexport const booleanFilterWidget =\n /* @__PURE__ */ basicWidget(booleanFieldPart);\n/** The Naive UI single-choice filter. @public */\nexport const selectFilterWidget = /* @__PURE__ */ basicWidget(selectFieldPart);\n/** The Naive UI multiple-choice filter. @public */\nexport const multiSelectFilterWidget =\n /* @__PURE__ */ basicWidget(multiSelectFieldPart);\n/** The Naive UI searchable checklist filter. @public */\nexport const checklistFilterWidget: FilterWidget = {\n kinds: [\"checklist\"],\n render: ChecklistField,\n};\n/** The Naive UI operator-first number and date range filter. @public */\nexport const rangeFilterWidget = /* @__PURE__ */ basicWidget(rangeFieldPart);\n\n/** Every built-in widget: what the automatic filters form draws. */\nexport const FILTER_WIDGETS: readonly FilterWidget[] = [\n textFilterWidget,\n booleanFilterWidget,\n selectFilterWidget,\n multiSelectFilterWidget,\n checklistFilterWidget,\n rangeFilterWidget,\n];\n","import type { FilterDef, TableFeature } from \"@adapttable/vue\";\nimport {\n ACTIVE_FILTER_CHIPS,\n type AdapterFiltersFeature,\n extendFeature,\n FILTERS_PANEL,\n type FilterWidget,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport {\n filters as bindingFilters,\n type FiltersOptions,\n} from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { NaiveFilterChips } from \"./filters/NaiveFilterChips\";\nimport { NaiveFiltersPanel } from \"./filters/NaiveFiltersPanel\";\nimport { FILTER_WIDGETS } from \"./filters/widgets\";\n\n/**\n * Declarative filters whose fields are drawn with only the given widgets, so\n * the widgets a table never shows stay out of its bundle. A filter whose\n * widget is missing throws when its field draws.\n *\n * @param widgets - The widgets to draw fields with, such as `textFilterWidget`.\n *\n * @public\n */\nexport function filtersWith(\n widgets: readonly FilterWidget[]\n): AdapterFiltersFeature {\n return <TRow>(\n defs: readonly FilterDef<TRow>[] = [],\n options: FiltersOptions = {}\n ): TableFeature<TRow> =>\n extendFeature(bindingFilters(defs, options), [\n slotRender(FILTERS_PANEL, () => h(NaiveFiltersPanel, { widgets })),\n slotRender(ACTIVE_FILTER_CHIPS, (props) =>\n h(NaiveFilterChips, { ...props })\n ),\n ]);\n}\n\n/** Declarative filters with this kit's chip strip, panel and every widget. @public */\nexport const filters = /* @__PURE__ */ filtersWith(FILTER_WIDGETS);\n\nexport { default as ChecklistFilter } from \"./filters/NaiveChecklistFilter.vue\";\nexport { default as NaiveFilterField } from \"./filters/NaiveFilterField.vue\";\nexport { default as FilterTreeBuilder } from \"./filters/NaiveFilterTree.vue\";\nexport {\n booleanFilterWidget,\n checklistFilterWidget,\n multiSelectFilterWidget,\n rangeFilterWidget,\n selectFilterWidget,\n textFilterWidget,\n} from \"./filters/widgets\";\nexport type { FilterDef, FilterOption, FilterTypeSpec } from \"@adapttable/vue\";\nexport type {\n AdapterFiltersFeature,\n FilterWidget,\n} from \"@adapttable/vue/adapter\";\nexport type {\n ChecklistFilterProps,\n FilterTreeBuilderProps,\n} from \"@adapttable/vue/adapter\";\nexport type { FiltersOptions } from \"@adapttable/vue/features\";\nexport { filterTypes } from \"@adapttable/vue/features\";\n"],"mappings":";;;;;;;;;AASA,MAAa,mBAAmB,iBAC7B,UAAsC;CACrC,MAAM,QAAQ,uBAAuB;CACrC,aACE,kBAAkB;EAChB,GAAG;EACH,YAAY,MAAM;EAClB,OAAO;GACL,SAAS,EAAE,YAAY,YAAY,OAAO,KAAK,EAAE,MAAM,KAAK,CAAC;GAC7D,QAAQ,EAAE,OAAO,YAAY,YAAY,OAAO,KAAK;EACvD;CACF,CAAC;AACL,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EAAE,MAAM,MAAuD;EACtE,QAAQ,EACN,MAAM,OACR;EACA,YAAY,EACV,MAAM,SACR;CACF;AACF,CACF;;;;;;;;EC1BA,MAAM,QAAQ;E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CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;ACxBA,SAAgB,YACd,SACuB;CACvB,QACE,OAAmC,CAAC,GACpC,UAA0B,CAAC,MAE3B,cAAcC,QAAe,MAAM,OAAO,GAAG,CAC3C,WAAW,qBAAqB,EAAE,mBAAmB,EAAE,QAAQ,CAAC,CAAC,GACjE,WAAW,sBAAsB,UAC/B,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC,CAClC,CACF,CAAC;AACL;;AAGA,MAAaC,YAA0B,4BAAY,cAAc"}
|
|
@@ -140,7 +140,8 @@ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
|
140
140
|
});
|
|
141
141
|
//#endregion
|
|
142
142
|
//#region src/filters/NaiveFiltersPanel.ts
|
|
143
|
-
function useNaiveFiltersPanel(
|
|
143
|
+
function useNaiveFiltersPanel(props) {
|
|
144
|
+
const widgets = props.widgets;
|
|
144
145
|
const names = (0, _adapttable_vue_adapter.useDataTableClassNames)();
|
|
145
146
|
const model = (0, _adapttable_vue_adapter.useFeatureState)((0, _adapttable_vue_adapter.filterViewKey)());
|
|
146
147
|
const buttonClass = (part) => {
|
|
@@ -207,7 +208,7 @@ widgets: {
|
|
|
207
208
|
type: Array,
|
|
208
209
|
required: true
|
|
209
210
|
} },
|
|
210
|
-
setup:
|
|
211
|
+
setup: useNaiveFiltersPanel
|
|
211
212
|
});
|
|
212
213
|
//#endregion
|
|
213
214
|
//#region src/filters/widgets.ts
|
|
@@ -259,7 +260,7 @@ const FILTER_WIDGETS = [
|
|
|
259
260
|
* @public
|
|
260
261
|
*/
|
|
261
262
|
function filtersWith(widgets) {
|
|
262
|
-
return (defs = [], options = {}) => (0, _adapttable_vue_adapter.extendFeature)((0, _adapttable_vue_features.filters)(defs, options), [(0, _adapttable_vue_adapter.slotRender)(_adapttable_vue_adapter.
|
|
263
|
+
return (defs = [], options = {}) => (0, _adapttable_vue_adapter.extendFeature)((0, _adapttable_vue_features.filters)(defs, options), [(0, _adapttable_vue_adapter.slotRender)(_adapttable_vue_adapter.FILTERS_PANEL, () => (0, vue.h)(NaiveFiltersPanel, { widgets })), (0, _adapttable_vue_adapter.slotRender)(_adapttable_vue_adapter.ACTIVE_FILTER_CHIPS, (props) => (0, vue.h)(NaiveFilterChips, { ...props }))]);
|
|
263
264
|
}
|
|
264
265
|
/** Declarative filters with this kit's chip strip, panel and every widget. @public */
|
|
265
266
|
const filters = /* @__PURE__ */ filtersWith(FILTER_WIDGETS);
|
|
@@ -319,4 +320,4 @@ Object.defineProperty(exports, "textFilterWidget", {
|
|
|
319
320
|
}
|
|
320
321
|
});
|
|
321
322
|
|
|
322
|
-
//# sourceMappingURL=filters-
|
|
323
|
+
//# sourceMappingURL=filters-U0LYOQjA.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters-U0LYOQjA.cjs","names":["defineComponent","useDataTableClassNames","FilterChipsChrome","naiveButton","useDataTableClassNames","useFeatureState","filterViewKey","naiveButton","mergeVueAttrs","h","NIcon","NaiveFilterTree","filterWidgetComponent","NaiveFilterSurface","FilterPanelChrome","defineComponent","h","NaiveBasicFilterField","NaiveChecklistField","textFieldPart","booleanFieldPart","selectFieldPart","multiSelectFieldPart","rangeFieldPart","extendFeature","bindingFilters","slotRender","FILTERS_PANEL","h","ACTIVE_FILTER_CHIPS"],"sources":["../src/filters/NaiveFilterChips.ts","../src/filters/NaiveFilterDisclosure.vue","../src/filters/NaiveFilterTree.vue","../src/filters/NaiveFiltersPanel.ts","../src/filters/widgets.ts","../src/filters.ts"],"sourcesContent":["import {\n type ActiveFilterChipsSlotProps,\n FilterChipsChrome,\n useDataTableClassNames,\n} from \"@adapttable/vue/adapter\";\nimport { defineComponent, type PropType } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\n\nexport const NaiveFilterChips = defineComponent(\n (props: ActiveFilterChipsSlotProps) => {\n const names = useDataTableClassNames();\n return () =>\n FilterChipsChrome({\n ...props,\n classNames: names.value,\n slots: {\n Remove: ({ attrs }) => naiveButton(attrs, \"×\", { text: true }),\n Clear: ({ attrs, label }) => naiveButton(attrs, label),\n },\n });\n },\n {\n name: \"NaiveFilterChips\",\n props: {\n chips: { type: Array as PropType<ActiveFilterChipsSlotProps[\"chips\"]> },\n labels: {\n type: Object as PropType<ActiveFilterChipsSlotProps[\"labels\"]>,\n },\n onClearAll: {\n type: Function as PropType<ActiveFilterChipsSlotProps[\"onClearAll\"]>,\n },\n },\n }\n);\n","<script setup lang=\"ts\">\nimport type { FilterTreeDisclosureProps } from \"@adapttable/vue/adapter\";\nimport { NCollapse, NCollapseItem } from \"naive-ui\";\nimport { useId, type VNodeChild } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\n\ndefineOptions({ name: \"NaiveFilterDisclosure\" });\nconst props = defineProps<{\n readonly control: FilterTreeDisclosureProps<VNodeChild>;\n}>();\nconst contentId = `adapttable-naive-filter-tree-${useId()}`;\nconst Trigger = () =>\n naiveButton(\n {\n \"data-adapttable-part\": \"filter-tree-summary\",\n \"aria-expanded\": props.control.expanded,\n \"aria-controls\": contentId,\n class: props.control.summaryClassName,\n onClick: () => props.control.onExpandedChange(!props.control.expanded),\n },\n props.control.label\n );\nconst Content = () => props.control.children;\n</script>\n\n<template>\n <NCollapse\n data-adapttable-part=\"filter-tree\"\n :class=\"control.className\"\n :expanded-names=\"control.expanded ? ['advanced'] : []\"\n :trigger-areas=\"[]\"\n >\n <template #arrow><span aria-hidden=\"true\" /></template>\n <NCollapseItem name=\"advanced\">\n <template #header><Trigger /></template>\n <div :id=\"contentId\"><Content /></div>\n </NCollapseItem>\n </NCollapse>\n</template>\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n type FilterTreeBuilderProps,\n FilterTreeChrome,\n type FilterTreeSlots,\n useFilterTreeModel,\n} from \"@adapttable/vue/adapter\";\nimport { NFormItem } from \"naive-ui\";\nimport { h, type VNodeChild } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\nimport { naiveInput } from \"../controls/input\";\nimport { naiveSelect } from \"../controls/select\";\nimport NaiveFilterDisclosure from \"./NaiveFilterDisclosure.vue\";\n\ndefineOptions({ name: \"NaiveFilterTree\" });\nconst {\n defaultExpanded = undefined,\n labels = undefined,\n classNames = undefined,\n registry = undefined,\n ...props\n} = defineProps<{\n readonly defs: FilterTreeBuilderProps<TRow>[\"defs\"];\n readonly source: FilterTreeBuilderProps<TRow>[\"source\"];\n readonly labels?: NonNullable<FilterTreeBuilderProps<TRow>[\"labels\"]>;\n readonly classNames?: NonNullable<FilterTreeBuilderProps<TRow>[\"classNames\"]>;\n readonly registry?: NonNullable<FilterTreeBuilderProps<TRow>[\"registry\"]>;\n readonly defaultExpanded?: boolean;\n}>();\nconst model = useFilterTreeModel(() => ({\n ...props,\n defaultExpanded,\n labels,\n classNames,\n registry,\n}));\nfunction field(\n control: { label: string; fieldClassName?: string; labelClassName?: string },\n content: () => VNodeChild\n) {\n return h(\n NFormItem,\n {\n \"data-adapttable-part\": \"filter-field\",\n class: control.fieldClassName,\n showFeedback: false,\n size: \"small\",\n },\n {\n label: () =>\n h(\n \"span\",\n {\n \"data-adapttable-part\": \"filter-label\",\n class: control.labelClassName,\n },\n control.label\n ),\n default: content,\n }\n );\n}\nconst controls: FilterTreeSlots<VNodeChild> = {\n Select: (control) =>\n field(control, () =>\n naiveSelect({\n ...control,\n attrs: {\n \"data-adapttable-part\": control.part,\n \"aria-label\": control.label,\n class: control.className,\n },\n })\n ),\n Input: (control) =>\n field(control, () =>\n naiveInput({\n ...control,\n attrs: {\n \"data-adapttable-part\": \"filter-input\",\n \"aria-label\": control.label,\n class: control.className,\n },\n })\n ),\n Button: (control) =>\n naiveButton(\n {\n \"data-adapttable-part\": control.part,\n class: control.className,\n onClick: control.onClick,\n },\n control.label\n ),\n Disclosure: (control) => h(NaiveFilterDisclosure, { control }),\n};\nconst Render = () => FilterTreeChrome({ model: model.value, controls });\nRender.props = [] as string[];\n</script>\n\n<template><Render /></template>\n","import {\n FilterPanelChrome,\n type FilterPanelSlots,\n filterViewKey,\n type FilterWidget,\n filterWidgetComponent,\n mergeVueAttrs,\n useDataTableClassNames,\n useFeatureState,\n} from \"@adapttable/vue/adapter\";\nimport { NIcon } from \"naive-ui\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\nimport { NaiveFilterSurface } from \"./NaiveFilterSurface\";\nimport NaiveFilterTree from \"./NaiveFilterTree.vue\";\n\nfunction useNaiveFiltersPanel(props: {\n readonly widgets: readonly FilterWidget[];\n}) {\n const widgets = props.widgets;\n const names = useDataTableClassNames();\n const model = useFeatureState(filterViewKey<unknown>());\n const buttonClass = (part: string) => {\n if (part === \"filters-clear\") return names.value.filtersClear;\n if (part === \"filters-close\") return names.value.filtersClose;\n return names.value.filtersDone;\n };\n const controls: FilterPanelSlots<unknown> = {\n Trigger: (trigger) =>\n naiveButton(\n mergeVueAttrs(trigger.attrs, {\n ref: trigger.triggerRef,\n class: names.value.filtersButton,\n onPointerdown: trigger.onPointerDown,\n onClick: trigger.onClick,\n }),\n [\n h(\n NIcon,\n {\n \"data-adapttable-part\": \"filters-icon\",\n class: names.value.filtersIcon,\n \"aria-hidden\": \"true\",\n },\n {\n default: () =>\n h(\"svg\", { viewBox: \"0 0 24 24\", focusable: \"false\" }, [\n h(\"path\", {\n d: \"M3 4h18l-7 8v7l-4 2v-9z\",\n fill: \"none\",\n stroke: \"currentColor\",\n }),\n ]),\n }\n ),\n trigger.label,\n trigger.count\n ? h(\n \"span\",\n {\n \"data-adapttable-part\": \"filters-count\",\n class: names.value.filtersCount,\n },\n ` (${trigger.count})`\n )\n : null,\n ]\n ),\n Button: (button) =>\n naiveButton(\n {\n \"data-adapttable-part\": button.part,\n class: buttonClass(button.part),\n disabled: button.disabled,\n onClick: button.onClick,\n },\n button.label\n ),\n Tree: (tree) => h(NaiveFilterTree, { ...tree, classNames: names.value }),\n Field: (field) =>\n h(filterWidgetComponent(field.def, field.registry, widgets), {\n ...field,\n }),\n Popover: (surface) => h(NaiveFilterSurface, { ...surface, modal: false }),\n Drawer: (surface) => h(NaiveFilterSurface, { ...surface, modal: true }),\n };\n return () =>\n model.value\n ? FilterPanelChrome({\n model: model.value,\n controls,\n classNames: names.value,\n })\n : null;\n}\n\nexport const NaiveFiltersPanel = defineComponent({\n name: \"NaiveFiltersPanel\",\n props: {\n /** The widgets the panel draws its fields with. */\n widgets: {\n type: Array as PropType<readonly FilterWidget[]>,\n required: true,\n },\n },\n setup: useNaiveFiltersPanel,\n});\n","import {\n booleanFieldPart,\n type FilterFieldOptions,\n type FilterFieldPart,\n type FilterWidget,\n multiSelectFieldPart,\n rangeFieldPart,\n selectFieldPart,\n textFieldPart,\n} from \"@adapttable/vue/adapter\";\nimport { type FunctionalComponent, h } from \"vue\";\n\nimport NaiveBasicFilterField from \"./NaiveBasicFilterField.vue\";\nimport NaiveChecklistField from \"./NaiveChecklistField.vue\";\n\n/** A field drawn by one shared field part. */\nfunction basicWidget(part: FilterFieldPart): FilterWidget {\n const render: FunctionalComponent<FilterFieldOptions<unknown>> = (props) =>\n h(NaiveBasicFilterField<unknown>, { ...props, parts: [part] });\n return { kinds: part.kinds, render };\n}\n\nconst ChecklistField: FunctionalComponent<FilterFieldOptions<unknown>> = (\n props\n) => h(NaiveChecklistField<unknown>, { ...props });\n\n/** The Naive UI text filter: its operator and its value. @public */\nexport const textFilterWidget = /* @__PURE__ */ basicWidget(textFieldPart);\n/** The Naive UI yes/no filter. @public */\nexport const booleanFilterWidget =\n /* @__PURE__ */ basicWidget(booleanFieldPart);\n/** The Naive UI single-choice filter. @public */\nexport const selectFilterWidget = /* @__PURE__ */ basicWidget(selectFieldPart);\n/** The Naive UI multiple-choice filter. @public */\nexport const multiSelectFilterWidget =\n /* @__PURE__ */ basicWidget(multiSelectFieldPart);\n/** The Naive UI searchable checklist filter. @public */\nexport const checklistFilterWidget: FilterWidget = {\n kinds: [\"checklist\"],\n render: ChecklistField,\n};\n/** The Naive UI operator-first number and date range filter. @public */\nexport const rangeFilterWidget = /* @__PURE__ */ basicWidget(rangeFieldPart);\n\n/** Every built-in widget: what the automatic filters form draws. */\nexport const FILTER_WIDGETS: readonly FilterWidget[] = [\n textFilterWidget,\n booleanFilterWidget,\n selectFilterWidget,\n multiSelectFilterWidget,\n checklistFilterWidget,\n rangeFilterWidget,\n];\n","import type { FilterDef, TableFeature } from \"@adapttable/vue\";\nimport {\n ACTIVE_FILTER_CHIPS,\n type AdapterFiltersFeature,\n extendFeature,\n FILTERS_PANEL,\n type FilterWidget,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport {\n filters as bindingFilters,\n type FiltersOptions,\n} from \"@adapttable/vue/features\";\nimport { h } from \"vue\";\n\nimport { NaiveFilterChips } from \"./filters/NaiveFilterChips\";\nimport { NaiveFiltersPanel } from \"./filters/NaiveFiltersPanel\";\nimport { FILTER_WIDGETS } from \"./filters/widgets\";\n\n/**\n * Declarative filters whose fields are drawn with only the given widgets, so\n * the widgets a table never shows stay out of its bundle. A filter whose\n * widget is missing throws when its field draws.\n *\n * @param widgets - The widgets to draw fields with, such as `textFilterWidget`.\n *\n * @public\n */\nexport function filtersWith(\n widgets: readonly FilterWidget[]\n): AdapterFiltersFeature {\n return <TRow>(\n defs: readonly FilterDef<TRow>[] = [],\n options: FiltersOptions = {}\n ): TableFeature<TRow> =>\n extendFeature(bindingFilters(defs, options), [\n slotRender(FILTERS_PANEL, () => h(NaiveFiltersPanel, { widgets })),\n slotRender(ACTIVE_FILTER_CHIPS, (props) =>\n h(NaiveFilterChips, { ...props })\n ),\n ]);\n}\n\n/** Declarative filters with this kit's chip strip, panel and every widget. @public */\nexport const filters = /* @__PURE__ */ filtersWith(FILTER_WIDGETS);\n\nexport { default as ChecklistFilter } from \"./filters/NaiveChecklistFilter.vue\";\nexport { default as NaiveFilterField } from \"./filters/NaiveFilterField.vue\";\nexport { default as FilterTreeBuilder } from \"./filters/NaiveFilterTree.vue\";\nexport {\n booleanFilterWidget,\n checklistFilterWidget,\n multiSelectFilterWidget,\n rangeFilterWidget,\n selectFilterWidget,\n textFilterWidget,\n} from \"./filters/widgets\";\nexport type { FilterDef, FilterOption, FilterTypeSpec } from \"@adapttable/vue\";\nexport type {\n AdapterFiltersFeature,\n FilterWidget,\n} from \"@adapttable/vue/adapter\";\nexport type {\n ChecklistFilterProps,\n FilterTreeBuilderProps,\n} from \"@adapttable/vue/adapter\";\nexport type { FiltersOptions } from \"@adapttable/vue/features\";\nexport { filterTypes } from \"@adapttable/vue/features\";\n"],"mappings":";;;;;;;;;AASA,MAAa,oBAAA,GAAmBA,IAAAA,gBAAAA,EAC7B,UAAsC;CACrC,MAAM,SAAA,GAAQC,wBAAAA,uBAAAA,CAAuB;CACrC,cAAA,GACEC,wBAAAA,kBAAAA,CAAkB;EAChB,GAAG;EACH,YAAY,MAAM;EAClB,OAAO;GACL,SAAS,EAAE,YAAYC,eAAAA,YAAY,OAAO,KAAK,EAAE,MAAM,KAAK,CAAC;GAC7D,QAAQ,EAAE,OAAO,YAAYA,eAAAA,YAAY,OAAO,KAAK;EACvD;CACF,CAAC;AACL,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EAAE,MAAM,MAAuD;EACtE,QAAQ,EACN,MAAM,OACR;EACA,YAAY,EACV,MAAM,SACR;CACF;AACF,CACF;;;;;;;;EC1BA,MAAM,QAAQ;EAGd,MAAM,YAAY,iCAAA,GAAgC,IAAA,MAAA,CAAM;EACxD,MAAM,gBACJ,eAAA,YACE;GACE,wBAAwB;GACxB,iBAAiB,MAAM,QAAQ;GAC/B,iBAAiB;GACjB,OAAO,MAAM,QAAQ;GACrB,eAAe,MAAM,QAAQ,iBAAiB,CAAC,MAAM,QAAQ,QAAQ;EACvE,GACA,MAAM,QAAQ,KAChB;EACF,MAAM,gBAAgB,MAAM,QAAQ;;GAIlC,QAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,EAAA,GAWY,IAAA,MAAA,CAAA,SAAA,SAAA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AAA,GAChEC,IAAAA,EAAAA,CAAEC,yBAAAA,aAAgC;EAAE,GAAG;EAAO,OAAO,CAAC,IAAI;CAAE,CAAC;CAC/D,OAAO;EAAE,OAAO,KAAK;EAAO;CAAO;AACrC;AAEA,MAAM,kBACJ,WAAA,GACGD,IAAAA,EAAAA,CAAEE,yBAAAA,aAA8B,EAAE,GAAG,MAAM,CAAC;;AAGjD,MAAa,mBAAmC,4BAAYC,wBAAAA,aAAa;;AAEzE,MAAa,sBACK,4BAAYC,wBAAAA,gBAAgB;;AAE9C,MAAa,qBAAqC,4BAAYC,wBAAAA,eAAe;;AAE7E,MAAa,0BACK,4BAAYC,wBAAAA,oBAAoB;;AAElD,MAAa,wBAAsC;CACjD,OAAO,CAAC,WAAW;CACnB,QAAQ;AACV;;AAEA,MAAa,oBAAoC,4BAAYC,wBAAAA,cAAc;;AAG3E,MAAa,iBAA0C;CACrD;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;ACxBA,SAAgB,YACd,SACuB;CACvB,QACE,OAAmC,CAAC,GACpC,UAA0B,CAAC,OAAA,GAE3BC,wBAAAA,cAAAA,EAAAA,GAAcC,yBAAAA,QAAAA,CAAe,MAAM,OAAO,GAAG,EAAA,GAC3CC,wBAAAA,WAAAA,CAAWC,wBAAAA,sBAAAA,GAAqBC,IAAAA,EAAAA,CAAE,mBAAmB,EAAE,QAAQ,CAAC,CAAC,IAAA,GACjEF,wBAAAA,WAAAA,CAAWG,wBAAAA,sBAAsB,WAAA,GAC/BD,IAAAA,EAAAA,CAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC,CAClC,CACF,CAAC;AACL;;AAGA,MAAa,UAA0B,4BAAY,cAAc"}
|
package/dist/filters.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_filters = require("./filters-
|
|
2
|
+
const require_filters = require("./filters-U0LYOQjA.cjs");
|
|
3
3
|
const require_NaiveFilterField = require("./NaiveFilterField-CP2V5YLz.cjs");
|
|
4
4
|
let _adapttable_vue_features = require("@adapttable/vue/features");
|
|
5
5
|
exports.ChecklistFilter = require_NaiveFilterField._sfc_main$2;
|
package/dist/filters.d.cts
CHANGED
|
@@ -1,2 +1,90 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { FilterDef, FilterOption, FilterTypeSpec } from "@adapttable/vue";
|
|
2
|
+
import { AdapterFiltersFeature, AdapterFiltersFeature as AdapterFiltersFeature$1, ChecklistFilterProps, ChecklistFilterProps as ChecklistFilterProps$1, FilterFieldOptions, FilterTreeBuilderProps, FilterTreeBuilderProps as FilterTreeBuilderProps$1, FilterWidget, FilterWidget as FilterWidget$1 } from "@adapttable/vue/adapter";
|
|
3
|
+
import { FiltersOptions, filterTypes } from "@adapttable/vue/features";
|
|
4
|
+
//#region src/filters/NaiveChecklistFilter.vue.d.ts
|
|
5
|
+
declare const __VLS_export$2: <TRow>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$2<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal$2<{
|
|
7
|
+
readonly def: ChecklistFilterProps$1<TRow>["def"];
|
|
8
|
+
readonly source: ChecklistFilterProps$1<TRow>["source"];
|
|
9
|
+
readonly labels?: NonNullable<ChecklistFilterProps$1<TRow>["labels"]>;
|
|
10
|
+
readonly classNames?: NonNullable<ChecklistFilterProps$1<TRow>["classNames"]>;
|
|
11
|
+
}> & (typeof globalThis extends {
|
|
12
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
13
|
+
} ? P : {});
|
|
14
|
+
expose: (exposed: {}) => void;
|
|
15
|
+
attrs: any;
|
|
16
|
+
slots: {};
|
|
17
|
+
emit: {};
|
|
18
|
+
}>) => import("vue").VNode & {
|
|
19
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: typeof __VLS_export$2;
|
|
22
|
+
type __VLS_PrettifyLocal$2<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/filters/NaiveFilterField.vue.d.ts
|
|
25
|
+
declare const __VLS_export$1: <TRow>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$1<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
26
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal$1<FilterFieldOptions<TRow>> & (typeof globalThis extends {
|
|
27
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
28
|
+
} ? P : {});
|
|
29
|
+
expose: (exposed: {}) => void;
|
|
30
|
+
attrs: any;
|
|
31
|
+
slots: {};
|
|
32
|
+
emit: {};
|
|
33
|
+
}>) => import("vue").VNode & {
|
|
34
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
35
|
+
};
|
|
36
|
+
declare const _default$2: typeof __VLS_export$1;
|
|
37
|
+
type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/filters/NaiveFilterTree.vue.d.ts
|
|
40
|
+
declare const __VLS_export: <TRow>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
41
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
42
|
+
readonly defs: FilterTreeBuilderProps$1<TRow>["defs"];
|
|
43
|
+
readonly source: FilterTreeBuilderProps$1<TRow>["source"];
|
|
44
|
+
readonly labels?: NonNullable<FilterTreeBuilderProps$1<TRow>["labels"]>;
|
|
45
|
+
readonly classNames?: NonNullable<FilterTreeBuilderProps$1<TRow>["classNames"]>;
|
|
46
|
+
readonly registry?: NonNullable<FilterTreeBuilderProps$1<TRow>["registry"]>;
|
|
47
|
+
readonly defaultExpanded?: boolean;
|
|
48
|
+
}> & (typeof globalThis extends {
|
|
49
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
50
|
+
} ? P : {});
|
|
51
|
+
expose: (exposed: {}) => void;
|
|
52
|
+
attrs: any;
|
|
53
|
+
slots: {};
|
|
54
|
+
emit: {};
|
|
55
|
+
}>) => import("vue").VNode & {
|
|
56
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
57
|
+
};
|
|
58
|
+
declare const _default$1: typeof __VLS_export;
|
|
59
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/filters/widgets.d.ts
|
|
62
|
+
/** The Naive UI text filter: its operator and its value. @public */
|
|
63
|
+
declare const textFilterWidget: FilterWidget$1;
|
|
64
|
+
/** The Naive UI yes/no filter. @public */
|
|
65
|
+
declare const booleanFilterWidget: FilterWidget$1;
|
|
66
|
+
/** The Naive UI single-choice filter. @public */
|
|
67
|
+
declare const selectFilterWidget: FilterWidget$1;
|
|
68
|
+
/** The Naive UI multiple-choice filter. @public */
|
|
69
|
+
declare const multiSelectFilterWidget: FilterWidget$1;
|
|
70
|
+
/** The Naive UI searchable checklist filter. @public */
|
|
71
|
+
declare const checklistFilterWidget: FilterWidget$1;
|
|
72
|
+
/** The Naive UI operator-first number and date range filter. @public */
|
|
73
|
+
declare const rangeFilterWidget: FilterWidget$1;
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/filters.d.ts
|
|
76
|
+
/**
|
|
77
|
+
* Declarative filters whose fields are drawn with only the given widgets, so
|
|
78
|
+
* the widgets a table never shows stay out of its bundle. A filter whose
|
|
79
|
+
* widget is missing throws when its field draws.
|
|
80
|
+
*
|
|
81
|
+
* @param widgets - The widgets to draw fields with, such as `textFilterWidget`.
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
declare function filtersWith(widgets: readonly FilterWidget$1[]): AdapterFiltersFeature$1;
|
|
86
|
+
/** Declarative filters with this kit's chip strip, panel and every widget. @public */
|
|
87
|
+
declare const filters: AdapterFiltersFeature$1;
|
|
88
|
+
//#endregion
|
|
89
|
+
export { type AdapterFiltersFeature, _default as ChecklistFilter, type ChecklistFilterProps, type FilterDef, type FilterOption, _default$1 as FilterTreeBuilder, type FilterTreeBuilderProps, type FilterTypeSpec, type FilterWidget, type FiltersOptions, _default$2 as NaiveFilterField, booleanFilterWidget, checklistFilterWidget, filterTypes, filters, filtersWith, multiSelectFilterWidget, rangeFilterWidget, selectFilterWidget, textFilterWidget };
|
|
90
|
+
//# sourceMappingURL=filters.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters.d.cts","names":[],"sources":["../src/filters/NaiveChecklistFilter.vue","../src/filters/NaiveFilterField.vue","../src/filters/NaiveFilterTree.vue","../src/filters/widgets.ts","../src/filters.ts"],"mappings":";;;;cA2EM,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAwEO,qBAAc,cAAc;aArEpB,KAAA,uBAAqB;aAClB,QAAA,uBAAqB;aACpB,SAAA,YAAY,uBAAqB;aAC7B,aAAA,YAAY,uBAAqB;eAkE4B;IAAqB,4BAA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ypeSpec } from "@adapttable/vue";
|
|
2
|
+
import { AdapterFiltersFeature, AdapterFiltersFeature as AdapterFiltersFeature$1, ChecklistFilterProps, ChecklistFilterProps as ChecklistFilterProps$1, FilterFieldOptions, FilterTreeBuilderProps, FilterTreeBuilderProps as FilterTreeBuilderProps$1, FilterWidget, FilterWidget as FilterWidget$1 } from "@adapttable/vue/adapter";
|
|
3
|
+
import { FiltersOptions, filterTypes } from "@adapttable/vue/features";
|
|
4
|
+
//#region src/filters/NaiveChecklistFilter.vue.d.ts
|
|
5
|
+
declare const __VLS_export$2: <TRow>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$2<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
6
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal$2<{
|
|
7
|
+
readonly def: ChecklistFilterProps$1<TRow>["def"];
|
|
8
|
+
readonly source: ChecklistFilterProps$1<TRow>["source"];
|
|
9
|
+
readonly labels?: NonNullable<ChecklistFilterProps$1<TRow>["labels"]>;
|
|
10
|
+
readonly classNames?: NonNullable<ChecklistFilterProps$1<TRow>["classNames"]>;
|
|
11
|
+
}> & (typeof globalThis extends {
|
|
12
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
13
|
+
} ? P : {});
|
|
14
|
+
expose: (exposed: {}) => void;
|
|
15
|
+
attrs: any;
|
|
16
|
+
slots: {};
|
|
17
|
+
emit: {};
|
|
18
|
+
}>) => import("vue").VNode & {
|
|
19
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: typeof __VLS_export$2;
|
|
22
|
+
type __VLS_PrettifyLocal$2<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/filters/NaiveFilterField.vue.d.ts
|
|
25
|
+
declare const __VLS_export$1: <TRow>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal$1<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
26
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal$1<FilterFieldOptions<TRow>> & (typeof globalThis extends {
|
|
27
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
28
|
+
} ? P : {});
|
|
29
|
+
expose: (exposed: {}) => void;
|
|
30
|
+
attrs: any;
|
|
31
|
+
slots: {};
|
|
32
|
+
emit: {};
|
|
33
|
+
}>) => import("vue").VNode & {
|
|
34
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
35
|
+
};
|
|
36
|
+
declare const _default$2: typeof __VLS_export$1;
|
|
37
|
+
type __VLS_PrettifyLocal$1<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/filters/NaiveFilterTree.vue.d.ts
|
|
40
|
+
declare const __VLS_export: <TRow>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
41
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
42
|
+
readonly defs: FilterTreeBuilderProps$1<TRow>["defs"];
|
|
43
|
+
readonly source: FilterTreeBuilderProps$1<TRow>["source"];
|
|
44
|
+
readonly labels?: NonNullable<FilterTreeBuilderProps$1<TRow>["labels"]>;
|
|
45
|
+
readonly classNames?: NonNullable<FilterTreeBuilderProps$1<TRow>["classNames"]>;
|
|
46
|
+
readonly registry?: NonNullable<FilterTreeBuilderProps$1<TRow>["registry"]>;
|
|
47
|
+
readonly defaultExpanded?: boolean;
|
|
48
|
+
}> & (typeof globalThis extends {
|
|
49
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
50
|
+
} ? P : {});
|
|
51
|
+
expose: (exposed: {}) => void;
|
|
52
|
+
attrs: any;
|
|
53
|
+
slots: {};
|
|
54
|
+
emit: {};
|
|
55
|
+
}>) => import("vue").VNode & {
|
|
56
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
57
|
+
};
|
|
58
|
+
declare const _default$1: typeof __VLS_export;
|
|
59
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/filters/widgets.d.ts
|
|
62
|
+
/** The Naive UI text filter: its operator and its value. @public */
|
|
63
|
+
declare const textFilterWidget: FilterWidget$1;
|
|
64
|
+
/** The Naive UI yes/no filter. @public */
|
|
65
|
+
declare const booleanFilterWidget: FilterWidget$1;
|
|
66
|
+
/** The Naive UI single-choice filter. @public */
|
|
67
|
+
declare const selectFilterWidget: FilterWidget$1;
|
|
68
|
+
/** The Naive UI multiple-choice filter. @public */
|
|
69
|
+
declare const multiSelectFilterWidget: FilterWidget$1;
|
|
70
|
+
/** The Naive UI searchable checklist filter. @public */
|
|
71
|
+
declare const checklistFilterWidget: FilterWidget$1;
|
|
72
|
+
/** The Naive UI operator-first number and date range filter. @public */
|
|
73
|
+
declare const rangeFilterWidget: FilterWidget$1;
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/filters.d.ts
|
|
76
|
+
/**
|
|
77
|
+
* Declarative filters whose fields are drawn with only the given widgets, so
|
|
78
|
+
* the widgets a table never shows stay out of its bundle. A filter whose
|
|
79
|
+
* widget is missing throws when its field draws.
|
|
80
|
+
*
|
|
81
|
+
* @param widgets - The widgets to draw fields with, such as `textFilterWidget`.
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
declare function filtersWith(widgets: readonly FilterWidget$1[]): AdapterFiltersFeature$1;
|
|
86
|
+
/** Declarative filters with this kit's chip strip, panel and every widget. @public */
|
|
87
|
+
declare const filters: AdapterFiltersFeature$1;
|
|
88
|
+
//#endregion
|
|
89
|
+
export { type AdapterFiltersFeature, _default as ChecklistFilter, type ChecklistFilterProps, type FilterDef, type FilterOption, _default$1 as FilterTreeBuilder, type FilterTreeBuilderProps, type FilterTypeSpec, type FilterWidget, type FiltersOptions, _default$2 as NaiveFilterField, booleanFilterWidget, checklistFilterWidget, filterTypes, filters, filtersWith, multiSelectFilterWidget, rangeFilterWidget, selectFilterWidget, textFilterWidget };
|
|
90
|
+
//# sourceMappingURL=filters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters.d.ts","names":[],"sources":["../src/filters/NaiveChecklistFilter.vue","../src/filters/NaiveFilterField.vue","../src/filters/NaiveFilterTree.vue","../src/filters/widgets.ts","../src/filters.ts"],"mappings":";;;;cA2EM,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAwEO,qBAAc,cAAc;aArEpB,KAAA,uBAAqB;aAClB,QAAA,uBAAqB;aACpB,SAAA,YAAY,uBAAqB;aAC7B,aAAA,YAAY,uBAAqB;eAkE4B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,iBAAO;KACvB,sBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;cC5H9F,iBAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,sBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAmCO,qBAAc,cAAc,sBAAmB,mBAAA,iBAA8B;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,mBAAO;KACvB,sBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;cCkC9F,eAAiB,MACtB,aAAa,YAAY,eAAe,wBACxC,YAAY,oBAAoB,KAAK,YAAY,eAAe,6CAChE,gBAAgB,YAAY,eAAe,yBAC3C,cAAA;EAgHO,qBAAc,cAAc;aA7GnB,MAAA,yBAAuB;aACrB,QAAA,yBAAuB;aACtB,SAAA,YAAY,yBAAuB;aAC/B,aAAA,YAAY,yBAAuB;aACrC,WAAA,YAAY,yBAAuB;aAC5B;eAwGwD;IAAqB,4BAA4B;MAAM;EACnI,SAAC;EACF;EACA;EACD;qBAGmB;EAAU,QAAQ,YAAY,eAAe;;cAClD,mBAAO;KACvB,oBAAoB,MAAM,mBAAmB,WAAW,IAAI,EAAE,WAAW,WAAW,KAAK,IAAI,EAAE;;;;cCxNvF,kBAAgB;;cAEhB,qBAAmB;;cAGnB,oBAAkB;;cAElB,yBAAuB;;cAGvB,uBAAuB;;cAKvB,mBAAiB;;;;;;;;;;;;iBCdd,YACd,kBAAkB,mBACjB;;cAcU,SAAO"}
|
package/dist/filters.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as checklistFilterWidget, c as selectFilterWidget, i as booleanFilterWidget, l as textFilterWidget, n as filters, o as multiSelectFilterWidget, r as filtersWith, s as rangeFilterWidget, t as filterTypes, u as _sfc_main$1 } from "./filters-
|
|
1
|
+
import { a as checklistFilterWidget, c as selectFilterWidget, i as booleanFilterWidget, l as textFilterWidget, n as filters, o as multiSelectFilterWidget, r as filtersWith, s as rangeFilterWidget, t as filterTypes, u as _sfc_main$1 } from "./filters-BxRu0r4j.js";
|
|
2
2
|
import { r as _sfc_main, t as _sfc_main$2 } from "./NaiveFilterField-SRraOkWU.js";
|
|
3
3
|
export { _sfc_main as ChecklistFilter, _sfc_main$1 as FilterTreeBuilder, _sfc_main$2 as NaiveFilterField, booleanFilterWidget, checklistFilterWidget, filterTypes, filters, filtersWith, multiSelectFilterWidget, rangeFilterWidget, selectFilterWidget, textFilterWidget };
|