@atscript/vue-table 0.1.58
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/LICENSE +21 -0
- package/README.md +24 -0
- package/dist/as-action-form-dialog.cjs +221 -0
- package/dist/as-action-form-dialog.d.cts +6 -0
- package/dist/as-action-form-dialog.d.mts +7 -0
- package/dist/as-action-form-dialog.mjs +221 -0
- package/dist/as-action-menu-content-CXsdPn42.mjs +104 -0
- package/dist/as-action-menu-content-CyUfBrWH.cjs +109 -0
- package/dist/as-cell-array-CXeZzZqt.cjs +69 -0
- package/dist/as-cell-array-DOQKR6t5.mjs +64 -0
- package/dist/as-cell-array.cjs +3 -0
- package/dist/as-cell-array.d.cts +2 -0
- package/dist/as-cell-array.d.mts +2 -0
- package/dist/as-cell-array.mjs +3 -0
- package/dist/as-cell-array.vue-DZGM2VHh.d.mts +12 -0
- package/dist/as-cell-array.vue-pFs5GcCR.d.cts +12 -0
- package/dist/as-cell-date-CTrvxS1h.cjs +78 -0
- package/dist/as-cell-date-Cq49RHmL.mjs +73 -0
- package/dist/as-cell-date.cjs +3 -0
- package/dist/as-cell-date.d.cts +2 -0
- package/dist/as-cell-date.d.mts +2 -0
- package/dist/as-cell-date.mjs +3 -0
- package/dist/as-cell-date.vue-BBSps2B2.d.cts +12 -0
- package/dist/as-cell-date.vue-Zlt4mHWb.d.mts +12 -0
- package/dist/as-cell-json-BynWIs1d.mjs +37 -0
- package/dist/as-cell-json-DvHvQ6IL.cjs +42 -0
- package/dist/as-cell-json-popover-BWdNs1YU.cjs +70 -0
- package/dist/as-cell-json-popover-DUq25I0L.mjs +65 -0
- package/dist/as-cell-json.cjs +3 -0
- package/dist/as-cell-json.d.cts +2 -0
- package/dist/as-cell-json.d.mts +2 -0
- package/dist/as-cell-json.mjs +3 -0
- package/dist/as-cell-json.vue-C6wg4ARZ.d.cts +12 -0
- package/dist/as-cell-json.vue-CESWuCer.d.mts +12 -0
- package/dist/as-cell-number-0_WrSCzu.cjs +76 -0
- package/dist/as-cell-number-Bc1C97Vg.mjs +71 -0
- package/dist/as-cell-number.cjs +3 -0
- package/dist/as-cell-number.d.cts +2 -0
- package/dist/as-cell-number.d.mts +2 -0
- package/dist/as-cell-number.mjs +3 -0
- package/dist/as-cell-number.vue-1Oq7nVI3.d.mts +12 -0
- package/dist/as-cell-number.vue-CJ2K5zeM.d.cts +12 -0
- package/dist/as-cell-union-C1w3B38J.mjs +88 -0
- package/dist/as-cell-union-CFAI0utz.cjs +93 -0
- package/dist/as-cell-union.cjs +4 -0
- package/dist/as-cell-union.d.cts +2 -0
- package/dist/as-cell-union.d.mts +2 -0
- package/dist/as-cell-union.mjs +4 -0
- package/dist/as-cell-union.vue-CslPM_c2.d.cts +12 -0
- package/dist/as-cell-union.vue-NnDmQZOA.d.mts +12 -0
- package/dist/as-column-menu-CH9Htz0Q.cjs +220 -0
- package/dist/as-column-menu-DCfhorMP.mjs +215 -0
- package/dist/as-column-menu.cjs +2 -0
- package/dist/as-column-menu.d.cts +2 -0
- package/dist/as-column-menu.d.mts +2 -0
- package/dist/as-column-menu.mjs +2 -0
- package/dist/as-column-menu.vue-C9e6wJ3z.d.mts +47 -0
- package/dist/as-column-menu.vue-o0qFdzoL.d.cts +47 -0
- package/dist/as-config-dialog-d2k7_l0U.cjs +699 -0
- package/dist/as-config-dialog-vRklaKbi.mjs +688 -0
- package/dist/as-config-dialog.cjs +3 -0
- package/dist/as-config-dialog.d.cts +2 -0
- package/dist/as-config-dialog.d.mts +2 -0
- package/dist/as-config-dialog.mjs +3 -0
- package/dist/as-config-dialog.vue-C6Q62xF5.d.mts +7 -0
- package/dist/as-config-dialog.vue-DvvJi3xx.d.cts +7 -0
- package/dist/as-confirm-dialog-BLh3Ju4-.mjs +52 -0
- package/dist/as-confirm-dialog-BgpIEE2z.cjs +57 -0
- package/dist/as-confirm-dialog.cjs +3 -0
- package/dist/as-confirm-dialog.d.cts +2 -0
- package/dist/as-confirm-dialog.d.mts +2 -0
- package/dist/as-confirm-dialog.mjs +3 -0
- package/dist/as-confirm-dialog.vue-CXxLpzbu.d.cts +7 -0
- package/dist/as-confirm-dialog.vue-pas8jGhv.d.mts +7 -0
- package/dist/as-filter-dialog-C0HMpUPT.mjs +610 -0
- package/dist/as-filter-dialog-DcGvIV3h.cjs +621 -0
- package/dist/as-filter-dialog.cjs +15 -0
- package/dist/as-filter-dialog.d.cts +2 -0
- package/dist/as-filter-dialog.d.mts +2 -0
- package/dist/as-filter-dialog.mjs +15 -0
- package/dist/as-filter-dialog.vue-BV2J8PgZ.d.cts +7 -0
- package/dist/as-filter-dialog.vue-RDZjp4gJ.d.mts +7 -0
- package/dist/as-filter-field-B_tYzvvl.cjs +984 -0
- package/dist/as-filter-field-Bqvu2ASN.mjs +943 -0
- package/dist/as-filter-field.cjs +9 -0
- package/dist/as-filter-field.d.cts +2 -0
- package/dist/as-filter-field.d.mts +2 -0
- package/dist/as-filter-field.mjs +9 -0
- package/dist/as-filter-field.vue-ByQ8xIGq.d.cts +11 -0
- package/dist/as-filter-field.vue-QY8wi5S5.d.mts +11 -0
- package/dist/as-filter-input--nr72iwX.cjs +106 -0
- package/dist/as-filter-input-P1i0CW2-.mjs +101 -0
- package/dist/as-filter-input.cjs +2 -0
- package/dist/as-filter-input.d.cts +2 -0
- package/dist/as-filter-input.d.mts +2 -0
- package/dist/as-filter-input.mjs +2 -0
- package/dist/as-filter-input.vue-CBQ71eNg.d.mts +18 -0
- package/dist/as-filter-input.vue-CS4nOk_Q.d.cts +18 -0
- package/dist/as-filters-Bxa9ZEMm.mjs +44 -0
- package/dist/as-filters-xRT2qv56.cjs +49 -0
- package/dist/as-filters.cjs +10 -0
- package/dist/as-filters.d.cts +2 -0
- package/dist/as-filters.d.mts +2 -0
- package/dist/as-filters.mjs +10 -0
- package/dist/as-filters.vue-BsMgYUcX.d.mts +10 -0
- package/dist/as-filters.vue-fv-tRL2H.d.cts +10 -0
- package/dist/as-preset-dialog-BaTfwMnh.cjs +569 -0
- package/dist/as-preset-dialog-BdDRgwf_.mjs +564 -0
- package/dist/as-preset-dialog.cjs +4 -0
- package/dist/as-preset-dialog.d.cts +2 -0
- package/dist/as-preset-dialog.d.mts +2 -0
- package/dist/as-preset-dialog.mjs +4 -0
- package/dist/as-preset-dialog.vue-Bzv-ON9W.d.mts +7 -0
- package/dist/as-preset-dialog.vue-DP9fy00Y.d.cts +7 -0
- package/dist/as-preset-picker-BQbNEiy9.mjs +427 -0
- package/dist/as-preset-picker-Ce3crTQy.cjs +432 -0
- package/dist/as-preset-picker.cjs +4 -0
- package/dist/as-preset-picker.d.cts +2 -0
- package/dist/as-preset-picker.d.mts +2 -0
- package/dist/as-preset-picker.mjs +4 -0
- package/dist/as-preset-picker.vue-CTBk6leV.d.mts +7 -0
- package/dist/as-preset-picker.vue-DfXS3pGl.d.cts +7 -0
- package/dist/as-row-actions-B6Kob6gt.cjs +120 -0
- package/dist/as-row-actions-CeWBBGqh.mjs +115 -0
- package/dist/as-row-actions.cjs +4 -0
- package/dist/as-row-actions.d.cts +2 -0
- package/dist/as-row-actions.d.mts +2 -0
- package/dist/as-row-actions.mjs +4 -0
- package/dist/as-row-actions.vue-BPaQfGev.d.mts +11 -0
- package/dist/as-row-actions.vue-Bvcc2tUN.d.cts +11 -0
- package/dist/as-table-Cnw2fOqZ.mjs +204 -0
- package/dist/as-table-DlDFxdXI.cjs +209 -0
- package/dist/as-table-actions-BK1Thy2G.cjs +142 -0
- package/dist/as-table-actions-BpMiNFni.mjs +137 -0
- package/dist/as-table-actions.cjs +4 -0
- package/dist/as-table-actions.d.cts +2 -0
- package/dist/as-table-actions.d.mts +2 -0
- package/dist/as-table-actions.mjs +4 -0
- package/dist/as-table-actions.vue-B7Q-JA3z.d.cts +47 -0
- package/dist/as-table-actions.vue-Bs1Jl1ep.d.mts +47 -0
- package/dist/as-table-base-D0k4k7k_.mjs +646 -0
- package/dist/as-table-base-VIz-B_6_.cjs +651 -0
- package/dist/as-table-cell-value-B1CiJYFn.mjs +26 -0
- package/dist/as-table-cell-value-CuxRtFn9.cjs +31 -0
- package/dist/as-table-cell-value.cjs +3 -0
- package/dist/as-table-cell-value.d.cts +2 -0
- package/dist/as-table-cell-value.d.mts +2 -0
- package/dist/as-table-cell-value.mjs +3 -0
- package/dist/as-table-cell-value.vue-BgFDv2JQ.d.cts +12 -0
- package/dist/as-table-cell-value.vue-BuPCQ8YA.d.mts +12 -0
- package/dist/as-table-header-cell-C3zeZUZo.cjs +117 -0
- package/dist/as-table-header-cell-CBn_ioCe.mjs +112 -0
- package/dist/as-table-header-cell.cjs +3 -0
- package/dist/as-table-header-cell.d.cts +2 -0
- package/dist/as-table-header-cell.d.mts +2 -0
- package/dist/as-table-header-cell.mjs +3 -0
- package/dist/as-table-header-cell.vue-Bc_DSsGY.d.cts +31 -0
- package/dist/as-table-header-cell.vue-DNMOHfek.d.mts +31 -0
- package/dist/as-table-root-Br6WcGRo.cjs +263 -0
- package/dist/as-table-root-gG7pTIdD.mjs +258 -0
- package/dist/as-table-root.cjs +28 -0
- package/dist/as-table-root.d.cts +2 -0
- package/dist/as-table-root.d.mts +2 -0
- package/dist/as-table-root.mjs +28 -0
- package/dist/as-table-root.vue-5_OhVwse.d.mts +2258 -0
- package/dist/as-table-root.vue-CSqEtIll.d.cts +2258 -0
- package/dist/as-table-status-BjRGGuhC.mjs +683 -0
- package/dist/as-table-status-DWYoJIMC.cjs +724 -0
- package/dist/as-table.cjs +10 -0
- package/dist/as-table.d.cts +2 -0
- package/dist/as-table.d.mts +2 -0
- package/dist/as-table.mjs +10 -0
- package/dist/as-table.vue-BTYg-e3Z.d.mts +81 -0
- package/dist/as-table.vue-wdRARLIe.d.cts +81 -0
- package/dist/as-window-table-CKIfo3M_.mjs +709 -0
- package/dist/as-window-table-DE7_NyEP.cjs +714 -0
- package/dist/as-window-table.cjs +9 -0
- package/dist/as-window-table.d.cts +2 -0
- package/dist/as-window-table.d.mts +2 -0
- package/dist/as-window-table.mjs +9 -0
- package/dist/as-window-table.vue-Bf8xGC9M.d.mts +86 -0
- package/dist/as-window-table.vue-CA8qsrz4.d.cts +86 -0
- package/dist/format-cell-B2xMDYO9.mjs +27 -0
- package/dist/format-cell-D4mqaN0E.cjs +32 -0
- package/dist/get-cell-value-CZSVfDLg.cjs +19 -0
- package/dist/get-cell-value-DiH84HKL.mjs +14 -0
- package/dist/index.cjs +598 -0
- package/dist/index.d.cts +21 -0
- package/dist/index.d.mts +21 -0
- package/dist/index.mjs +505 -0
- package/dist/preset-aspect-display-BYeiSgcc.mjs +43 -0
- package/dist/preset-aspect-display-y8aal_EF.cjs +72 -0
- package/dist/types-BvvXN72P.d.mts +531 -0
- package/dist/types-CNMmF6W2.d.cts +531 -0
- package/dist/use-cell-locale-1uQaFTLQ.mjs +23 -0
- package/dist/use-cell-locale-B480_QYK.cjs +34 -0
- package/dist/use-table-column-handlers-CGYAY2xH.cjs +65 -0
- package/dist/use-table-column-handlers-t6xi1yCE.mjs +54 -0
- package/dist/use-table-state-C4JbonEZ.mjs +1822 -0
- package/dist/use-table-state-MU-vuzui.cjs +1917 -0
- package/package.json +195 -0
- package/styles.d.ts +2 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,598 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_use_table_state = require("./use-table-state-MU-vuzui.cjs");
|
|
3
|
+
const require_as_table_status = require("./as-table-status-DWYoJIMC.cjs");
|
|
4
|
+
const require_as_filter_field = require("./as-filter-field-B_tYzvvl.cjs");
|
|
5
|
+
const require_as_filter_dialog = require("./as-filter-dialog-DcGvIV3h.cjs");
|
|
6
|
+
require("./use-table-column-handlers-CGYAY2xH.cjs");
|
|
7
|
+
const require_get_cell_value = require("./get-cell-value-CZSVfDLg.cjs");
|
|
8
|
+
require("./as-cell-json-popover-BWdNs1YU.cjs");
|
|
9
|
+
const require_as_cell_array = require("./as-cell-array-CXeZzZqt.cjs");
|
|
10
|
+
const require_as_cell_date = require("./as-cell-date-CTrvxS1h.cjs");
|
|
11
|
+
const require_use_cell_locale = require("./use-cell-locale-B480_QYK.cjs");
|
|
12
|
+
const require_as_cell_json = require("./as-cell-json-DvHvQ6IL.cjs");
|
|
13
|
+
const require_as_cell_number = require("./as-cell-number-0_WrSCzu.cjs");
|
|
14
|
+
const require_format_cell = require("./format-cell-D4mqaN0E.cjs");
|
|
15
|
+
const require_as_cell_union = require("./as-cell-union-CFAI0utz.cjs");
|
|
16
|
+
const require_as_column_menu = require("./as-column-menu-CH9Htz0Q.cjs");
|
|
17
|
+
const require_as_config_dialog = require("./as-config-dialog-d2k7_l0U.cjs");
|
|
18
|
+
const require_as_confirm_dialog = require("./as-confirm-dialog-BgpIEE2z.cjs");
|
|
19
|
+
const require_as_filter_input = require("./as-filter-input--nr72iwX.cjs");
|
|
20
|
+
const require_as_table_cell_value = require("./as-table-cell-value-CuxRtFn9.cjs");
|
|
21
|
+
const require_as_table_header_cell = require("./as-table-header-cell-C3zeZUZo.cjs");
|
|
22
|
+
const require_as_window_table = require("./as-window-table-DE7_NyEP.cjs");
|
|
23
|
+
require("./as-table-base-VIz-B_6_.cjs");
|
|
24
|
+
const require_as_filters = require("./as-filters-xRT2qv56.cjs");
|
|
25
|
+
require("./preset-aspect-display-y8aal_EF.cjs");
|
|
26
|
+
const require_as_preset_dialog = require("./as-preset-dialog-BaTfwMnh.cjs");
|
|
27
|
+
require("./as-action-menu-content-CyUfBrWH.cjs");
|
|
28
|
+
const require_as_row_actions = require("./as-row-actions-B6Kob6gt.cjs");
|
|
29
|
+
const require_as_table_root = require("./as-table-root-Br6WcGRo.cjs");
|
|
30
|
+
const require_as_table = require("./as-table-DlDFxdXI.cjs");
|
|
31
|
+
const require_as_table_actions = require("./as-table-actions-BK1Thy2G.cjs");
|
|
32
|
+
const require_as_preset_picker = require("./as-preset-picker-Ce3crTQy.cjs");
|
|
33
|
+
let _atscript_ui = require("@atscript/ui");
|
|
34
|
+
let vue = require("vue");
|
|
35
|
+
let _atscript_ui_table = require("@atscript/ui-table");
|
|
36
|
+
let _vueuse_core = require("@vueuse/core");
|
|
37
|
+
//#region src/composables/use-table-filter.ts
|
|
38
|
+
/**
|
|
39
|
+
* Per-field filter state composable.
|
|
40
|
+
*
|
|
41
|
+
* Creates a working copy of filter conditions (cancel-safe dialog model).
|
|
42
|
+
* Call `apply()` to commit, `reset()` to revert, `clear()` to remove.
|
|
43
|
+
*
|
|
44
|
+
* Accepts `state` directly rather than injecting — safe to call outside `setup`.
|
|
45
|
+
*/
|
|
46
|
+
function useTableFilter(column, state) {
|
|
47
|
+
const filterType = (0, _atscript_ui_table.columnFilterType)(column.type);
|
|
48
|
+
const availableConditions = (0, _atscript_ui_table.conditionsForType)(filterType, column.nullable);
|
|
49
|
+
const defCondition = (0, _atscript_ui_table.defaultCondition)(filterType);
|
|
50
|
+
function cloneConditions() {
|
|
51
|
+
const existing = state.filters.value[column.path];
|
|
52
|
+
if (existing && existing.length > 0) return existing.map((c) => ({
|
|
53
|
+
type: c.type,
|
|
54
|
+
value: [...c.value]
|
|
55
|
+
}));
|
|
56
|
+
return [{
|
|
57
|
+
type: defCondition,
|
|
58
|
+
value: []
|
|
59
|
+
}];
|
|
60
|
+
}
|
|
61
|
+
const conditions = (0, vue.ref)(cloneConditions());
|
|
62
|
+
const filledCount = (0, vue.computed)(() => conditions.value.filter(_atscript_ui_table.isFilled).length);
|
|
63
|
+
function addCondition() {
|
|
64
|
+
conditions.value = [...conditions.value, {
|
|
65
|
+
type: defCondition,
|
|
66
|
+
value: []
|
|
67
|
+
}];
|
|
68
|
+
}
|
|
69
|
+
function removeCondition(index) {
|
|
70
|
+
conditions.value = conditions.value.filter((_, i) => i !== index);
|
|
71
|
+
if (conditions.value.length === 0) conditions.value = [{
|
|
72
|
+
type: defCondition,
|
|
73
|
+
value: []
|
|
74
|
+
}];
|
|
75
|
+
}
|
|
76
|
+
function updateCondition(index, update) {
|
|
77
|
+
conditions.value = conditions.value.map((c, i) => i === index ? {
|
|
78
|
+
...c,
|
|
79
|
+
...update
|
|
80
|
+
} : c);
|
|
81
|
+
}
|
|
82
|
+
function apply() {
|
|
83
|
+
state.setFieldFilter(column.path, conditions.value);
|
|
84
|
+
}
|
|
85
|
+
function clear() {
|
|
86
|
+
state.removeFieldFilter(column.path);
|
|
87
|
+
conditions.value = [{
|
|
88
|
+
type: defCondition,
|
|
89
|
+
value: []
|
|
90
|
+
}];
|
|
91
|
+
}
|
|
92
|
+
function reset() {
|
|
93
|
+
conditions.value = cloneConditions();
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
filterType,
|
|
97
|
+
availableConditions,
|
|
98
|
+
defaultCondition: defCondition,
|
|
99
|
+
conditions,
|
|
100
|
+
filledCount,
|
|
101
|
+
addCondition,
|
|
102
|
+
removeCondition,
|
|
103
|
+
updateCondition,
|
|
104
|
+
apply,
|
|
105
|
+
clear,
|
|
106
|
+
reset
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/composables/use-table-search.ts
|
|
111
|
+
/**
|
|
112
|
+
* Convenience composable for wiring a search input to the table.
|
|
113
|
+
* Must be called inside an `<AsTableRoot>` subtree.
|
|
114
|
+
*
|
|
115
|
+
* Returns the reactive `searchTerm` ref and an `onSearchInput` handler.
|
|
116
|
+
* The central filter/search watcher debounces the auto-query.
|
|
117
|
+
*/
|
|
118
|
+
function useTableSearch() {
|
|
119
|
+
const { state } = require_use_table_state.useTableContext();
|
|
120
|
+
function onSearchInput(event) {
|
|
121
|
+
state.searchTerm.value = event.target.value;
|
|
122
|
+
}
|
|
123
|
+
return {
|
|
124
|
+
searchTerm: state.searchTerm,
|
|
125
|
+
onSearchInput
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/composables/use-table-actions.ts
|
|
130
|
+
/**
|
|
131
|
+
* Inject the table-actions namespace from the closest `<AsTableRoot>` ancestor.
|
|
132
|
+
* Returns `state.actions` directly — no wrapping. Throws when called outside
|
|
133
|
+
* the provider tree (delegated to `useTableContext`).
|
|
134
|
+
*
|
|
135
|
+
* Useful for consumers that want the model without the chrome (custom
|
|
136
|
+
* toolbars, headless action buttons, programmatic invoke).
|
|
137
|
+
*/
|
|
138
|
+
function useTableActions() {
|
|
139
|
+
return require_use_table_state.useTableContext().state.actions;
|
|
140
|
+
}
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/composables/use-table-url-query.ts
|
|
143
|
+
/**
|
|
144
|
+
* Split a uniqu URL string on top-level `&` separators, respecting
|
|
145
|
+
* single-quoted string literals (`name='foo&bar'` is one segment, not two).
|
|
146
|
+
* Within a quote, `\'` escapes a literal apostrophe per @uniqu/url's encoder.
|
|
147
|
+
* Empty segments (from leading/trailing/double `&`) are dropped.
|
|
148
|
+
*/
|
|
149
|
+
function splitSegments(urlString) {
|
|
150
|
+
if (!urlString) return [];
|
|
151
|
+
const out = [];
|
|
152
|
+
let start = 0;
|
|
153
|
+
let inQuote = false;
|
|
154
|
+
const push = (end) => {
|
|
155
|
+
if (end > start) out.push(urlString.slice(start, end));
|
|
156
|
+
};
|
|
157
|
+
for (let i = 0; i < urlString.length; i++) {
|
|
158
|
+
const c = urlString[i];
|
|
159
|
+
if (c === "\\" && inQuote) {
|
|
160
|
+
i++;
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
if (c === "'") inQuote = !inQuote;
|
|
164
|
+
else if (c === "&" && !inQuote) {
|
|
165
|
+
push(i);
|
|
166
|
+
start = i + 1;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
push(urlString.length);
|
|
170
|
+
return out;
|
|
171
|
+
}
|
|
172
|
+
const KEY_CHAR = /[A-Za-z0-9_.$-]/;
|
|
173
|
+
/**
|
|
174
|
+
* Index of `=` if every char before it is URL-key-safe. Returns -1 when any
|
|
175
|
+
* non-key char (uniqu operator, whitespace, etc.) appears first — those
|
|
176
|
+
* segments must round-trip as a single bare key because vue-router's `query`
|
|
177
|
+
* record has no encoding for non-`=` separators.
|
|
178
|
+
*/
|
|
179
|
+
function findCleanEq(segment) {
|
|
180
|
+
for (let i = 0; i < segment.length; i++) {
|
|
181
|
+
const c = segment[i];
|
|
182
|
+
if (c === "=") return i > 0 ? i : -1;
|
|
183
|
+
if (!KEY_CHAR.test(c)) return -1;
|
|
184
|
+
}
|
|
185
|
+
return -1;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Bridge `<AsTableRoot v-model:url-query>` to vue-router. Uses **type-only**
|
|
189
|
+
* imports of `Router` and `RouteLocationNormalizedLoaded` — no runtime
|
|
190
|
+
* dependency on `vue-router` is added to `@atscript/vue-table`. Consumers
|
|
191
|
+
* pass in their already-resolved `useRoute()` and `useRouter()` instances.
|
|
192
|
+
*
|
|
193
|
+
* Scope: **owns the whole query string**. The getter returns the entire
|
|
194
|
+
* `route.query` serialized; the setter replaces `route.query` wholesale.
|
|
195
|
+
* Apps that need the table to coexist with non-table query params should
|
|
196
|
+
* write their own `computed` instead — that pattern is small and keeps the
|
|
197
|
+
* library's contract crisp.
|
|
198
|
+
*
|
|
199
|
+
* @example
|
|
200
|
+
* ```vue
|
|
201
|
+
* <script setup>
|
|
202
|
+
* import { useRoute, useRouter } from 'vue-router';
|
|
203
|
+
* import { useTableUrlQuery } from '@atscript/vue-table';
|
|
204
|
+
* const urlQuery = useTableUrlQuery(useRoute(), useRouter());
|
|
205
|
+
* <\/script>
|
|
206
|
+
* <template>
|
|
207
|
+
* <AsTableRoot v-model:url-query="urlQuery" url="/db/products" .../>
|
|
208
|
+
* </template>
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
function useTableUrlQuery(route, router, opts = {}) {
|
|
212
|
+
const navigate = (opts.mode ?? "replace") === "push" ? router.push.bind(router) : router.replace.bind(router);
|
|
213
|
+
return (0, vue.computed)({
|
|
214
|
+
get: () => {
|
|
215
|
+
const q = route.query;
|
|
216
|
+
const parts = [];
|
|
217
|
+
for (const key in q) {
|
|
218
|
+
const v = q[key];
|
|
219
|
+
if (Array.isArray(v)) for (const item of v) parts.push(item == null ? key : `${key}=${item}`);
|
|
220
|
+
else if (v == null) parts.push(key);
|
|
221
|
+
else parts.push(`${key}=${v}`);
|
|
222
|
+
}
|
|
223
|
+
return parts.join("&");
|
|
224
|
+
},
|
|
225
|
+
set: (urlString) => {
|
|
226
|
+
const query = {};
|
|
227
|
+
for (const segment of splitSegments(urlString)) {
|
|
228
|
+
const eqIdx = findCleanEq(segment);
|
|
229
|
+
if (eqIdx > 0) query[segment.slice(0, eqIdx)] = segment.slice(eqIdx + 1);
|
|
230
|
+
else query[segment] = null;
|
|
231
|
+
}
|
|
232
|
+
navigate({ query });
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region src/composables/use-app-prefs.ts
|
|
238
|
+
const APP_PREFS_BUS = Symbol("as-app-prefs");
|
|
239
|
+
const CACHE_PREFIX = "as-app-prefs";
|
|
240
|
+
const REGISTRY = /* @__PURE__ */ new Map();
|
|
241
|
+
function instanceKey(app, url) {
|
|
242
|
+
return `${app}|${url}`;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Public dev-facing composable for app-wide user preferences. Independent
|
|
246
|
+
* of presets / tables — devs can use it on any settings surface to read
|
|
247
|
+
* and write `appearance`, `language`, `density`, `customJson` etc. for
|
|
248
|
+
* `(currentUser, app)`.
|
|
249
|
+
*
|
|
250
|
+
* Multiple calls with the same `(app, url)` share one underlying instance,
|
|
251
|
+
* so duplicate widgets (sidebar + page header + /preferences) make a single
|
|
252
|
+
* `/query?type=appConf` request total.
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
* ```ts
|
|
256
|
+
* const { prefs, save } = useAppPrefs({ url: "/db/_presets" })
|
|
257
|
+
* // prefs.value.appearance is reactive in templates
|
|
258
|
+
* await save({ appearance: "dark" })
|
|
259
|
+
* ```
|
|
260
|
+
*/
|
|
261
|
+
function useAppPrefs(opts) {
|
|
262
|
+
const app = require_as_filter_field.injectPresetsApp(opts.app);
|
|
263
|
+
const key = instanceKey(app, opts.url);
|
|
264
|
+
const existing = REGISTRY.get(key);
|
|
265
|
+
if (existing) {
|
|
266
|
+
const requested = opts.cache !== false;
|
|
267
|
+
if (requested !== existing.cacheEnabled) console.warn(`[vue-table] useAppPrefs("${app}", "${opts.url}"): cache=${requested} ignored — first caller registered cache=${existing.cacheEnabled}.`);
|
|
268
|
+
return existing.public;
|
|
269
|
+
}
|
|
270
|
+
const instance = createInstance(app, opts);
|
|
271
|
+
REGISTRY.set(key, instance);
|
|
272
|
+
return instance.public;
|
|
273
|
+
}
|
|
274
|
+
function createInstance(app, opts) {
|
|
275
|
+
const scope = (0, vue.effectScope)(true);
|
|
276
|
+
return scope.run(() => {
|
|
277
|
+
const cacheEnabled = opts.cache !== false;
|
|
278
|
+
const client = new _atscript_ui_table.AppPrefsClient({
|
|
279
|
+
url: opts.url,
|
|
280
|
+
app,
|
|
281
|
+
clientFactory: opts.clientFactory
|
|
282
|
+
});
|
|
283
|
+
const cacheKey = `${CACHE_PREFIX}:${app}`;
|
|
284
|
+
const cache = cacheEnabled ? (0, _vueuse_core.useStorage)(cacheKey, null, void 0, {
|
|
285
|
+
listenToStorageChanges: true,
|
|
286
|
+
serializer: _vueuse_core.StorageSerializers.object,
|
|
287
|
+
flush: "sync"
|
|
288
|
+
}) : (0, vue.ref)(null);
|
|
289
|
+
function clearCache() {
|
|
290
|
+
cache.value = null;
|
|
291
|
+
if (cacheEnabled) try {
|
|
292
|
+
globalThis.localStorage?.removeItem(cacheKey);
|
|
293
|
+
} catch {}
|
|
294
|
+
}
|
|
295
|
+
const prefs = (0, vue.computed)({
|
|
296
|
+
get: () => cache.value ?? {},
|
|
297
|
+
set: (value) => {
|
|
298
|
+
cache.value = value;
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
const existing = (0, vue.shallowRef)(null);
|
|
302
|
+
const loading = (0, vue.ref)(false);
|
|
303
|
+
const error = (0, vue.ref)(null);
|
|
304
|
+
const denied = (0, vue.ref)(false);
|
|
305
|
+
const available = (0, vue.computed)(() => !denied.value);
|
|
306
|
+
const channel = createChannel(app);
|
|
307
|
+
async function reload() {
|
|
308
|
+
loading.value = true;
|
|
309
|
+
error.value = null;
|
|
310
|
+
try {
|
|
311
|
+
const result = await client.load();
|
|
312
|
+
if (result.denied) {
|
|
313
|
+
denied.value = true;
|
|
314
|
+
clearCache();
|
|
315
|
+
existing.value = null;
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
denied.value = false;
|
|
319
|
+
cache.value = { ...result.prefs };
|
|
320
|
+
existing.value = result.row;
|
|
321
|
+
} catch (err) {
|
|
322
|
+
if ((0, _atscript_ui_table.isAuthError)(err)) {
|
|
323
|
+
denied.value = true;
|
|
324
|
+
clearCache();
|
|
325
|
+
existing.value = null;
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
error.value = err;
|
|
329
|
+
console.warn("[vue-table] useAppPrefs load failed:", err);
|
|
330
|
+
} finally {
|
|
331
|
+
loading.value = false;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
async function save(patch) {
|
|
335
|
+
const prev = { ...prefs.value };
|
|
336
|
+
cache.value = {
|
|
337
|
+
...prev,
|
|
338
|
+
...patch
|
|
339
|
+
};
|
|
340
|
+
try {
|
|
341
|
+
const id = await client.save(existing.value, patch);
|
|
342
|
+
if (!existing.value && id) existing.value = {
|
|
343
|
+
id,
|
|
344
|
+
type: "appConf",
|
|
345
|
+
app,
|
|
346
|
+
user: "",
|
|
347
|
+
data: { ...prefs.value },
|
|
348
|
+
createdAt: 0,
|
|
349
|
+
updatedAt: 0
|
|
350
|
+
};
|
|
351
|
+
const snapshot = { ...prefs.value };
|
|
352
|
+
bus.emit({
|
|
353
|
+
app,
|
|
354
|
+
prefs: snapshot,
|
|
355
|
+
row: existing.value
|
|
356
|
+
});
|
|
357
|
+
channel?.postMessage({
|
|
358
|
+
type: "save",
|
|
359
|
+
prefs: snapshot,
|
|
360
|
+
row: existing.value
|
|
361
|
+
});
|
|
362
|
+
} catch (err) {
|
|
363
|
+
cache.value = prev;
|
|
364
|
+
throw err;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
function reset() {
|
|
368
|
+
clearCache();
|
|
369
|
+
existing.value = null;
|
|
370
|
+
error.value = null;
|
|
371
|
+
denied.value = false;
|
|
372
|
+
bus.emit({
|
|
373
|
+
app,
|
|
374
|
+
reset: true
|
|
375
|
+
});
|
|
376
|
+
channel?.postMessage({ type: "reset" });
|
|
377
|
+
}
|
|
378
|
+
const bus = (0, _vueuse_core.useEventBus)(APP_PREFS_BUS);
|
|
379
|
+
bus.on((payload) => {
|
|
380
|
+
if (payload.app !== app) return;
|
|
381
|
+
if ("reset" in payload) {
|
|
382
|
+
clearCache();
|
|
383
|
+
existing.value = null;
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
386
|
+
cache.value = { ...payload.prefs };
|
|
387
|
+
if (payload.row && !existing.value) existing.value = payload.row;
|
|
388
|
+
});
|
|
389
|
+
channel?.addEventListener("message", (e) => {
|
|
390
|
+
const msg = e.data;
|
|
391
|
+
if (!msg || typeof msg !== "object") return;
|
|
392
|
+
if (msg.type === "reset") {
|
|
393
|
+
clearCache();
|
|
394
|
+
existing.value = null;
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
if (msg.type === "save") {
|
|
398
|
+
cache.value = { ...msg.prefs };
|
|
399
|
+
if (msg.row && !existing.value) existing.value = msg.row;
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
if (opts.autoLoad !== false && typeof window !== "undefined") reload();
|
|
403
|
+
return {
|
|
404
|
+
cacheEnabled,
|
|
405
|
+
public: {
|
|
406
|
+
prefs,
|
|
407
|
+
loading,
|
|
408
|
+
error,
|
|
409
|
+
available,
|
|
410
|
+
reload,
|
|
411
|
+
save,
|
|
412
|
+
reset
|
|
413
|
+
},
|
|
414
|
+
dispose() {
|
|
415
|
+
channel?.close();
|
|
416
|
+
scope.stop();
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
function createChannel(app) {
|
|
422
|
+
if (typeof window === "undefined") return null;
|
|
423
|
+
if (typeof BroadcastChannel !== "function") return null;
|
|
424
|
+
try {
|
|
425
|
+
return new BroadcastChannel(`as-app-prefs:${app}`);
|
|
426
|
+
} catch {
|
|
427
|
+
return null;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
//#endregion
|
|
431
|
+
//#region src/composables/use-table-component.ts
|
|
432
|
+
/** Resolve a single skin-slot component from the injected `controls` map, falling back to the default. */
|
|
433
|
+
function useTableComponent(key, fallback) {
|
|
434
|
+
const { controls } = require_use_table_state.useTableContext();
|
|
435
|
+
return controls[key] ?? fallback;
|
|
436
|
+
}
|
|
437
|
+
//#endregion
|
|
438
|
+
//#region src/composables/create-default-controls.ts
|
|
439
|
+
/**
|
|
440
|
+
* Returns a fresh skin-slot map pre-filled with all built-in defaults.
|
|
441
|
+
*
|
|
442
|
+
* Spread or assign additional entries to override specific pieces:
|
|
443
|
+
* ```ts
|
|
444
|
+
* const controls = { ...createDefaultControls(), filterDialog: MyFilterDialog }
|
|
445
|
+
* ```
|
|
446
|
+
*
|
|
447
|
+
* `actionFormDialog` is intentionally not seeded — the table root
|
|
448
|
+
* lazy-mounts it only when an `@InputForm` action is detected. To override
|
|
449
|
+
* or eager-load, import from `@atscript/vue-table/as-action-form-dialog`
|
|
450
|
+
* and assign it as the `actionFormDialog` entry on this map.
|
|
451
|
+
*/
|
|
452
|
+
function createDefaultControls() {
|
|
453
|
+
return {
|
|
454
|
+
headerCell: require_as_table_header_cell.as_table_header_cell_default,
|
|
455
|
+
columnMenu: require_as_column_menu.as_column_menu_default,
|
|
456
|
+
filterDialog: require_as_filter_dialog.as_filter_dialog_default,
|
|
457
|
+
filterInput: require_as_filter_input.as_filter_input_default,
|
|
458
|
+
filterField: require_as_filter_field.as_filter_field_default,
|
|
459
|
+
configDialog: require_as_config_dialog.as_config_dialog_default,
|
|
460
|
+
confirmDialog: require_as_confirm_dialog.as_confirm_dialog_default,
|
|
461
|
+
rowActions: require_as_row_actions.as_row_actions_default
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
//#endregion
|
|
465
|
+
//#region src/composables/create-default-cell-types.ts
|
|
466
|
+
/**
|
|
467
|
+
* Returns a fresh cell-type-to-component map pre-filled with the built-in
|
|
468
|
+
* defaults. Spread to extend or override:
|
|
469
|
+
* ```ts
|
|
470
|
+
* const types = { ...createDefaultCellTypes(), status: StatusBadgeCell }
|
|
471
|
+
* ```
|
|
472
|
+
*/
|
|
473
|
+
function createDefaultCellTypes() {
|
|
474
|
+
return {
|
|
475
|
+
text: require_as_table_cell_value.as_table_cell_value_default,
|
|
476
|
+
number: require_as_cell_number.as_cell_number_default,
|
|
477
|
+
boolean: require_as_table_cell_value.as_table_cell_value_default,
|
|
478
|
+
date: require_as_cell_date.as_cell_date_default,
|
|
479
|
+
datetime: require_as_cell_date.as_cell_date_default,
|
|
480
|
+
relative: require_as_cell_date.as_cell_date_default,
|
|
481
|
+
array: require_as_cell_array.as_cell_array_default,
|
|
482
|
+
object: require_as_cell_json.as_cell_json_default,
|
|
483
|
+
union: require_as_cell_union.as_cell_union_default,
|
|
484
|
+
enum: require_as_table_cell_value.as_table_cell_value_default,
|
|
485
|
+
ref: require_as_table_cell_value.as_table_cell_value_default,
|
|
486
|
+
[require_use_table_state.ROW_ACTIONS_TYPE]: require_as_row_actions.as_row_actions_default
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
//#endregion
|
|
490
|
+
//#region src/utils/column-width.ts
|
|
491
|
+
const DEFAULT_WIDTHS = {
|
|
492
|
+
boolean: "5em",
|
|
493
|
+
number: "10em",
|
|
494
|
+
date: "13em",
|
|
495
|
+
datetime: "16em",
|
|
496
|
+
relative: "11em",
|
|
497
|
+
text: "15em",
|
|
498
|
+
array: "18em",
|
|
499
|
+
object: "18em"
|
|
500
|
+
};
|
|
501
|
+
/** Returns column width from annotation or type-based default. */
|
|
502
|
+
function getColumnWidth(column) {
|
|
503
|
+
return column.width || DEFAULT_WIDTHS[column.type] || "15em";
|
|
504
|
+
}
|
|
505
|
+
//#endregion
|
|
506
|
+
exports.AS_PRESETS_APP = require_as_filter_field.AS_PRESETS_APP;
|
|
507
|
+
exports.AsCellArray = require_as_cell_array.as_cell_array_default;
|
|
508
|
+
exports.AsCellDate = require_as_cell_date.as_cell_date_default;
|
|
509
|
+
exports.AsCellJson = require_as_cell_json.as_cell_json_default;
|
|
510
|
+
exports.AsCellNumber = require_as_cell_number.as_cell_number_default;
|
|
511
|
+
exports.AsColumnMenu = require_as_column_menu.as_column_menu_default;
|
|
512
|
+
exports.AsConfigDialog = require_as_config_dialog.as_config_dialog_default;
|
|
513
|
+
exports.AsFilterDialog = require_as_filter_dialog.as_filter_dialog_default;
|
|
514
|
+
exports.AsFilterField = require_as_filter_field.as_filter_field_default;
|
|
515
|
+
exports.AsFilterInput = require_as_filter_input.as_filter_input_default;
|
|
516
|
+
exports.AsFilters = require_as_filters.as_filters_default;
|
|
517
|
+
exports.AsPresetDialog = require_as_preset_dialog.as_preset_dialog_default;
|
|
518
|
+
exports.AsPresetPicker = require_as_preset_picker.as_preset_picker_default;
|
|
519
|
+
exports.AsRowActions = require_as_row_actions.as_row_actions_default;
|
|
520
|
+
exports.AsTable = require_as_table.as_table_default;
|
|
521
|
+
exports.AsTableActions = require_as_table_actions.as_table_actions_default;
|
|
522
|
+
exports.AsTableCellValue = require_as_table_cell_value.as_table_cell_value_default;
|
|
523
|
+
exports.AsTableHeaderCell = require_as_table_header_cell.as_table_header_cell_default;
|
|
524
|
+
exports.AsTableRoot = require_as_table_root.as_table_root_default;
|
|
525
|
+
exports.AsWindowTable = require_as_window_table.as_window_table_default;
|
|
526
|
+
Object.defineProperty(exports, "PRESET_ASPECTS", {
|
|
527
|
+
enumerable: true,
|
|
528
|
+
get: function() {
|
|
529
|
+
return _atscript_ui_table.PRESET_ASPECTS;
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
Object.defineProperty(exports, "STANDARD_PRESET_ID", {
|
|
533
|
+
enumerable: true,
|
|
534
|
+
get: function() {
|
|
535
|
+
return _atscript_ui_table.STANDARD_PRESET_ID;
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
Object.defineProperty(exports, "SYSTEM_PRESET_PREFIX", {
|
|
539
|
+
enumerable: true,
|
|
540
|
+
get: function() {
|
|
541
|
+
return _atscript_ui_table.SYSTEM_PRESET_PREFIX;
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
exports.clearTableCache = require_as_filter_field.clearTableCache;
|
|
545
|
+
exports.createDefaultCellTypes = createDefaultCellTypes;
|
|
546
|
+
exports.createDefaultControls = createDefaultControls;
|
|
547
|
+
exports.createStaticTableState = require_use_table_state.createStaticTableState;
|
|
548
|
+
exports.createTableState = require_use_table_state.createTableState;
|
|
549
|
+
exports.extractIdentifier = require_use_table_state.extractIdentifier;
|
|
550
|
+
exports.formatCellValue = require_format_cell.formatCellValue;
|
|
551
|
+
exports.getCellValue = require_get_cell_value.getCellValue;
|
|
552
|
+
exports.getColumnWidth = getColumnWidth;
|
|
553
|
+
Object.defineProperty(exports, "getDefaultClientFactory", {
|
|
554
|
+
enumerable: true,
|
|
555
|
+
get: function() {
|
|
556
|
+
return _atscript_ui.getDefaultClientFactory;
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
exports.injectPresetsApp = require_as_filter_field.injectPresetsApp;
|
|
560
|
+
Object.defineProperty(exports, "isSystemPresetId", {
|
|
561
|
+
enumerable: true,
|
|
562
|
+
get: function() {
|
|
563
|
+
return _atscript_ui_table.isSystemPresetId;
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
exports.provideCellLocale = require_use_cell_locale.provideCellLocale;
|
|
567
|
+
Object.defineProperty(exports, "resetDefaultClientFactory", {
|
|
568
|
+
enumerable: true,
|
|
569
|
+
get: function() {
|
|
570
|
+
return _atscript_ui.resetDefaultClientFactory;
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
Object.defineProperty(exports, "resolveSystemPresets", {
|
|
574
|
+
enumerable: true,
|
|
575
|
+
get: function() {
|
|
576
|
+
return _atscript_ui_table.resolveSystemPresets;
|
|
577
|
+
}
|
|
578
|
+
});
|
|
579
|
+
Object.defineProperty(exports, "setDefaultClientFactory", {
|
|
580
|
+
enumerable: true,
|
|
581
|
+
get: function() {
|
|
582
|
+
return _atscript_ui.setDefaultClientFactory;
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
exports.useAppPrefs = useAppPrefs;
|
|
586
|
+
exports.useCellLocale = require_use_cell_locale.useCellLocale;
|
|
587
|
+
exports.useLocalDraft = require_as_filter_field.useLocalDraft;
|
|
588
|
+
exports.usePresets = require_as_filter_field.usePresets;
|
|
589
|
+
exports.useTable = require_as_filter_field.useTable;
|
|
590
|
+
exports.useTableActions = useTableActions;
|
|
591
|
+
exports.useTableComponent = useTableComponent;
|
|
592
|
+
exports.useTableContext = require_use_table_state.useTableContext;
|
|
593
|
+
exports.useTableContextOptional = require_use_table_state.useTableContextOptional;
|
|
594
|
+
exports.useTableFilter = useTableFilter;
|
|
595
|
+
exports.useTableNavBridge = require_as_filter_dialog.useTableNavBridge;
|
|
596
|
+
exports.useTableSearch = useTableSearch;
|
|
597
|
+
exports.useTableSelection = require_as_table_status.useTableSelection;
|
|
598
|
+
exports.useTableUrlQuery = useTableUrlQuery;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { t as _default$9 } from "./as-filters.vue-fv-tRL2H.cjs";
|
|
2
|
+
import { t as _default$11 } from "./as-preset-picker.vue-DfXS3pGl.cjs";
|
|
3
|
+
import { _ as TableNavBridge, c as NavKeyOptions, d as ReactiveTableState, f as RowDeleteOpt, g as TableActionsState, h as TVueTableActionInfo, m as TAsTableControls, n as ColumnMenuConfig, o as InvokeOpts, p as TAsCellTypeComponents, r as ConfigTab, s as MainActionRequest, t as ActionResult, u as QueryErrorKind } from "./types-CNMmF6W2.cjs";
|
|
4
|
+
import { t as _default$14 } from "./as-table-actions.vue-B7Q-JA3z.cjs";
|
|
5
|
+
import { $ as createTableState, A as createDefaultControls, B as useTableSearch, C as formatCellValue, D as provideCellLocale, E as CellLocale, F as AS_PRESETS_APP, G as useTable, H as useTableNavBridge, I as injectPresetsApp, J as CreateStaticTableStateOptions, K as SelectionPersistence, L as UseTableUrlQueryOptions, M as UseAppPrefsOptions, N as UseAppPrefsReturn, O as useCellLocale, P as useAppPrefs, Q as createStaticTableState, R as useTableUrlQuery, S as extractIdentifier, T as getColumnWidth, U as UseTableOptions, V as useTableFilter, W as clearTableCache, X as TableContext, Y as CreateTableStateOptions, Z as TableStateInternals, _ as getDefaultClientFactory, a as PRESET_ASPECTS, at as usePresets, b as resolveSystemPresets, c as PresetData, ct as UseLocalDraftReturn, d as STANDARD_PRESET_ID, et as useTableContext, f as SYSTEM_PRESET_PREFIX, g as UserConfData, h as UrlQuerySync, i as ClientFactory, it as UsePresetsReturn, j as useTableComponent, k as createDefaultCellTypes, l as PresetSnapshot, lt as useLocalDraft, m as SystemPresetInput, n as AppConfData, nt as ActivePresetView, o as PresetAspect, ot as StorageLike, p as SystemPreset, q as useTableSelection, r as AsPresetEntryRow, rt as UsePresetsOptions, s as PresetCapabilities, st as UseLocalDraftOptions, t as _default$17, tt as useTableContextOptional, u as PresetSnapshotWire, v as isSystemPresetId, w as getCellValue, x as setDefaultClientFactory, y as resetDefaultClientFactory, z as useTableActions } from "./as-table-root.vue-CSqEtIll.cjs";
|
|
6
|
+
import { t as _default$13 } from "./as-table.vue-wdRARLIe.cjs";
|
|
7
|
+
import { t as _default$18 } from "./as-window-table.vue-CA8qsrz4.cjs";
|
|
8
|
+
import { t as _default } from "./as-cell-array.vue-pFs5GcCR.cjs";
|
|
9
|
+
import { t as _default$1 } from "./as-cell-date.vue-BBSps2B2.cjs";
|
|
10
|
+
import { t as _default$2 } from "./as-cell-json.vue-C6wg4ARZ.cjs";
|
|
11
|
+
import { t as _default$3 } from "./as-cell-number.vue-CJ2K5zeM.cjs";
|
|
12
|
+
import { t as _default$4 } from "./as-column-menu.vue-o0qFdzoL.cjs";
|
|
13
|
+
import { t as _default$5 } from "./as-config-dialog.vue-DvvJi3xx.cjs";
|
|
14
|
+
import { t as _default$6 } from "./as-filter-dialog.vue-BV2J8PgZ.cjs";
|
|
15
|
+
import { t as _default$7 } from "./as-filter-field.vue-ByQ8xIGq.cjs";
|
|
16
|
+
import { t as _default$8 } from "./as-filter-input.vue-CS4nOk_Q.cjs";
|
|
17
|
+
import { t as _default$10 } from "./as-preset-dialog.vue-DP9fy00Y.cjs";
|
|
18
|
+
import { t as _default$12 } from "./as-row-actions.vue-Bvcc2tUN.cjs";
|
|
19
|
+
import { t as _default$15 } from "./as-table-cell-value.vue-BgFDv2JQ.cjs";
|
|
20
|
+
import { t as _default$16 } from "./as-table-header-cell.vue-Bc_DSsGY.cjs";
|
|
21
|
+
export { AS_PRESETS_APP, ActionResult, ActivePresetView, AppConfData, _default as AsCellArray, _default$1 as AsCellDate, _default$2 as AsCellJson, _default$3 as AsCellNumber, _default$4 as AsColumnMenu, _default$5 as AsConfigDialog, _default$6 as AsFilterDialog, _default$7 as AsFilterField, _default$8 as AsFilterInput, _default$9 as AsFilters, _default$10 as AsPresetDialog, AsPresetEntryRow, _default$11 as AsPresetPicker, _default$12 as AsRowActions, _default$13 as AsTable, _default$14 as AsTableActions, _default$15 as AsTableCellValue, _default$16 as AsTableHeaderCell, _default$17 as AsTableRoot, _default$18 as AsWindowTable, CellLocale, ClientFactory, ColumnMenuConfig, ConfigTab, CreateStaticTableStateOptions, CreateTableStateOptions, InvokeOpts, MainActionRequest, NavKeyOptions, PRESET_ASPECTS, PresetAspect, PresetCapabilities, PresetData, PresetSnapshot, PresetSnapshotWire, QueryErrorKind, ReactiveTableState, RowDeleteOpt, STANDARD_PRESET_ID, SYSTEM_PRESET_PREFIX, SelectionPersistence, StorageLike, SystemPreset, SystemPresetInput, TAsCellTypeComponents, TAsTableControls, TVueTableActionInfo, TableActionsState, TableContext, TableNavBridge, TableStateInternals, UrlQuerySync, UseAppPrefsOptions, UseAppPrefsReturn, UseLocalDraftOptions, UseLocalDraftReturn, UsePresetsOptions, UsePresetsReturn, UseTableOptions, UseTableUrlQueryOptions, UserConfData, clearTableCache, createDefaultCellTypes, createDefaultControls, createStaticTableState, createTableState, extractIdentifier, formatCellValue, getCellValue, getColumnWidth, getDefaultClientFactory, injectPresetsApp, isSystemPresetId, provideCellLocale, resetDefaultClientFactory, resolveSystemPresets, setDefaultClientFactory, useAppPrefs, useCellLocale, useLocalDraft, usePresets, useTable, useTableActions, useTableComponent, useTableContext, useTableContextOptional, useTableFilter, useTableNavBridge, useTableSearch, useTableSelection, useTableUrlQuery };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { t as _default$9 } from "./as-filters.vue-BsMgYUcX.mjs";
|
|
2
|
+
import { t as _default$11 } from "./as-preset-picker.vue-CTBk6leV.mjs";
|
|
3
|
+
import { _ as TableNavBridge, c as NavKeyOptions, d as ReactiveTableState, f as RowDeleteOpt, g as TableActionsState, h as TVueTableActionInfo, m as TAsTableControls, n as ColumnMenuConfig, o as InvokeOpts, p as TAsCellTypeComponents, r as ConfigTab, s as MainActionRequest, t as ActionResult, u as QueryErrorKind } from "./types-BvvXN72P.mjs";
|
|
4
|
+
import { t as _default$14 } from "./as-table-actions.vue-Bs1Jl1ep.mjs";
|
|
5
|
+
import { $ as createTableState, A as createDefaultControls, B as useTableSearch, C as formatCellValue, D as provideCellLocale, E as CellLocale, F as AS_PRESETS_APP, G as useTable, H as useTableNavBridge, I as injectPresetsApp, J as CreateStaticTableStateOptions, K as SelectionPersistence, L as UseTableUrlQueryOptions, M as UseAppPrefsOptions, N as UseAppPrefsReturn, O as useCellLocale, P as useAppPrefs, Q as createStaticTableState, R as useTableUrlQuery, S as extractIdentifier, T as getColumnWidth, U as UseTableOptions, V as useTableFilter, W as clearTableCache, X as TableContext, Y as CreateTableStateOptions, Z as TableStateInternals, _ as getDefaultClientFactory, a as PRESET_ASPECTS, at as usePresets, b as resolveSystemPresets, c as PresetData, ct as UseLocalDraftReturn, d as STANDARD_PRESET_ID, et as useTableContext, f as SYSTEM_PRESET_PREFIX, g as UserConfData, h as UrlQuerySync, i as ClientFactory, it as UsePresetsReturn, j as useTableComponent, k as createDefaultCellTypes, l as PresetSnapshot, lt as useLocalDraft, m as SystemPresetInput, n as AppConfData, nt as ActivePresetView, o as PresetAspect, ot as StorageLike, p as SystemPreset, q as useTableSelection, r as AsPresetEntryRow, rt as UsePresetsOptions, s as PresetCapabilities, st as UseLocalDraftOptions, t as _default$17, tt as useTableContextOptional, u as PresetSnapshotWire, v as isSystemPresetId, w as getCellValue, x as setDefaultClientFactory, y as resetDefaultClientFactory, z as useTableActions } from "./as-table-root.vue-5_OhVwse.mjs";
|
|
6
|
+
import { t as _default$13 } from "./as-table.vue-BTYg-e3Z.mjs";
|
|
7
|
+
import { t as _default$18 } from "./as-window-table.vue-Bf8xGC9M.mjs";
|
|
8
|
+
import { t as _default } from "./as-cell-array.vue-DZGM2VHh.mjs";
|
|
9
|
+
import { t as _default$1 } from "./as-cell-date.vue-Zlt4mHWb.mjs";
|
|
10
|
+
import { t as _default$2 } from "./as-cell-json.vue-CESWuCer.mjs";
|
|
11
|
+
import { t as _default$3 } from "./as-cell-number.vue-1Oq7nVI3.mjs";
|
|
12
|
+
import { t as _default$4 } from "./as-column-menu.vue-C9e6wJ3z.mjs";
|
|
13
|
+
import { t as _default$5 } from "./as-config-dialog.vue-C6Q62xF5.mjs";
|
|
14
|
+
import { t as _default$6 } from "./as-filter-dialog.vue-RDZjp4gJ.mjs";
|
|
15
|
+
import { t as _default$7 } from "./as-filter-field.vue-QY8wi5S5.mjs";
|
|
16
|
+
import { t as _default$8 } from "./as-filter-input.vue-CBQ71eNg.mjs";
|
|
17
|
+
import { t as _default$10 } from "./as-preset-dialog.vue-Bzv-ON9W.mjs";
|
|
18
|
+
import { t as _default$12 } from "./as-row-actions.vue-BPaQfGev.mjs";
|
|
19
|
+
import { t as _default$15 } from "./as-table-cell-value.vue-BuPCQ8YA.mjs";
|
|
20
|
+
import { t as _default$16 } from "./as-table-header-cell.vue-DNMOHfek.mjs";
|
|
21
|
+
export { AS_PRESETS_APP, ActionResult, ActivePresetView, AppConfData, _default as AsCellArray, _default$1 as AsCellDate, _default$2 as AsCellJson, _default$3 as AsCellNumber, _default$4 as AsColumnMenu, _default$5 as AsConfigDialog, _default$6 as AsFilterDialog, _default$7 as AsFilterField, _default$8 as AsFilterInput, _default$9 as AsFilters, _default$10 as AsPresetDialog, AsPresetEntryRow, _default$11 as AsPresetPicker, _default$12 as AsRowActions, _default$13 as AsTable, _default$14 as AsTableActions, _default$15 as AsTableCellValue, _default$16 as AsTableHeaderCell, _default$17 as AsTableRoot, _default$18 as AsWindowTable, CellLocale, ClientFactory, ColumnMenuConfig, ConfigTab, CreateStaticTableStateOptions, CreateTableStateOptions, InvokeOpts, MainActionRequest, NavKeyOptions, PRESET_ASPECTS, PresetAspect, PresetCapabilities, PresetData, PresetSnapshot, PresetSnapshotWire, QueryErrorKind, ReactiveTableState, RowDeleteOpt, STANDARD_PRESET_ID, SYSTEM_PRESET_PREFIX, SelectionPersistence, StorageLike, SystemPreset, SystemPresetInput, TAsCellTypeComponents, TAsTableControls, TVueTableActionInfo, TableActionsState, TableContext, TableNavBridge, TableStateInternals, UrlQuerySync, UseAppPrefsOptions, UseAppPrefsReturn, UseLocalDraftOptions, UseLocalDraftReturn, UsePresetsOptions, UsePresetsReturn, UseTableOptions, UseTableUrlQueryOptions, UserConfData, clearTableCache, createDefaultCellTypes, createDefaultControls, createStaticTableState, createTableState, extractIdentifier, formatCellValue, getCellValue, getColumnWidth, getDefaultClientFactory, injectPresetsApp, isSystemPresetId, provideCellLocale, resetDefaultClientFactory, resolveSystemPresets, setDefaultClientFactory, useAppPrefs, useCellLocale, useLocalDraft, usePresets, useTable, useTableActions, useTableComponent, useTableContext, useTableContextOptional, useTableFilter, useTableNavBridge, useTableSearch, useTableSelection, useTableUrlQuery };
|