@atscript/vue-table 0.1.137 → 0.1.139
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/as-action-form-dialog.cjs +1 -1
- package/dist/as-action-form-dialog.mjs +1 -1
- package/dist/{as-action-menu-content-CVlExEpl.mjs → as-action-menu-content-D7NIwc9X.mjs} +1 -1
- package/dist/{as-action-menu-content-D8f60mY-.cjs → as-action-menu-content-DXuyDZ_X.cjs} +1 -1
- package/dist/{as-cell-array-BWHkJX3I.mjs → as-cell-array-Bgc4GYZf.mjs} +1 -1
- package/dist/{as-cell-array-D-8Pqlgo.cjs → as-cell-array-CCZ0Ajj9.cjs} +1 -1
- package/dist/as-cell-array.cjs +1 -1
- package/dist/as-cell-array.mjs +1 -1
- package/dist/{as-cell-date-mGlnDeLP.mjs → as-cell-date-B9mu0OOD.mjs} +1 -1
- package/dist/{as-cell-date-DviMJEqs.cjs → as-cell-date-RU5JPJhI.cjs} +1 -1
- package/dist/as-cell-date.cjs +1 -1
- package/dist/as-cell-date.mjs +1 -1
- package/dist/{as-cell-json-2I081xnO.mjs → as-cell-json-ByEGYRST.mjs} +1 -1
- package/dist/{as-cell-json-CaVB6e7V.cjs → as-cell-json-w5YJxNuF.cjs} +1 -1
- package/dist/as-cell-json.cjs +1 -1
- package/dist/as-cell-json.mjs +1 -1
- package/dist/{as-cell-number-CP2AZI9g.mjs → as-cell-number-CNDT6gfw.mjs} +1 -1
- package/dist/{as-cell-number-BnYbxOiG.cjs → as-cell-number-DGJCTXDf.cjs} +1 -1
- package/dist/as-cell-number.cjs +1 -1
- package/dist/as-cell-number.mjs +1 -1
- package/dist/{as-cell-union-NHpDCXty.mjs → as-cell-union-DMnoa7RM.mjs} +2 -2
- package/dist/{as-cell-union-BjMP91PS.cjs → as-cell-union-LOGvhPeK.cjs} +2 -2
- package/dist/as-cell-union.cjs +1 -1
- package/dist/as-cell-union.mjs +1 -1
- package/dist/{as-column-menu-BMTS3DO2.mjs → as-column-menu-CBtUfYEE.mjs} +2 -2
- package/dist/{as-column-menu-D_8NxujZ.cjs → as-column-menu-ChB7hzmr.cjs} +1 -1
- package/dist/as-column-menu.cjs +1 -1
- package/dist/as-column-menu.d.cts +1 -1
- package/dist/as-column-menu.d.mts +1 -1
- package/dist/as-column-menu.mjs +1 -1
- package/dist/{as-column-menu.vue-olu6BNEU.d.cts → as-column-menu.vue-Cul3eIz_.d.cts} +1 -1
- package/dist/{as-column-menu.vue-DIuEvru6.d.mts → as-column-menu.vue-Dw2m8ZqD.d.mts} +1 -1
- package/dist/{as-config-dialog-DHdpmRo9.mjs → as-config-dialog-DrcYlrOh.mjs} +5 -5
- package/dist/{as-config-dialog-BrVhIV_e.cjs → as-config-dialog-j_-oUmN7.cjs} +4 -4
- package/dist/as-config-dialog.cjs +1 -1
- package/dist/as-config-dialog.mjs +1 -1
- package/dist/{as-confirm-dialog-iytk-urB.cjs → as-confirm-dialog-CStjIWN0.cjs} +1 -1
- package/dist/{as-confirm-dialog-BG5vlbvV.mjs → as-confirm-dialog-Pnt60ALy.mjs} +1 -1
- package/dist/as-confirm-dialog.cjs +1 -1
- package/dist/as-confirm-dialog.mjs +1 -1
- package/dist/{as-filter-dialog-DoynFox2.cjs → as-filter-dialog-B6_NvvlM.cjs} +14 -14
- package/dist/{as-filter-dialog-DAvtsH3d.mjs → as-filter-dialog-CUzahpd_.mjs} +15 -15
- package/dist/as-filter-dialog.cjs +1 -1
- package/dist/as-filter-dialog.mjs +1 -1
- package/dist/{as-filter-field-DB5WFT4l.mjs → as-filter-field-3DJh_ICs.mjs} +5 -6
- package/dist/{as-filter-field-CBMDjApB.cjs → as-filter-field-DCUMuu0M.cjs} +4 -5
- package/dist/as-filter-field.cjs +1 -1
- package/dist/as-filter-field.mjs +1 -1
- package/dist/as-filter-input.cjs +1 -1
- package/dist/as-filter-input.mjs +1 -1
- package/dist/{as-filters-CiPv-dKs.cjs → as-filters-CHLPYHNP.cjs} +3 -3
- package/dist/{as-filters-DfBH5YH9.mjs → as-filters-D0DWDyiv.mjs} +3 -3
- package/dist/as-filters.cjs +1 -1
- package/dist/as-filters.mjs +1 -1
- package/dist/{as-preset-dialog-C0f_6VxJ.mjs → as-preset-dialog-H98DeOMM.mjs} +3 -3
- package/dist/{as-preset-dialog-D8o2ChtM.cjs → as-preset-dialog-RLW0gZDj.cjs} +3 -3
- package/dist/as-preset-dialog.cjs +1 -1
- package/dist/as-preset-dialog.mjs +1 -1
- package/dist/{as-preset-picker-CDItDinB.mjs → as-preset-picker-Cw7LB7o1.mjs} +2 -2
- package/dist/{as-preset-picker-DonMQ8Ia.cjs → as-preset-picker-yWXEhWEq.cjs} +2 -2
- package/dist/as-preset-picker.cjs +1 -1
- package/dist/as-preset-picker.mjs +1 -1
- package/dist/{as-row-actions-B8YANdb4.mjs → as-row-actions-BvJWHf3j.mjs} +2 -2
- package/dist/{as-row-actions-CAiCfw8d.cjs → as-row-actions-D_TqnP3S.cjs} +2 -2
- package/dist/as-row-actions.cjs +1 -1
- package/dist/as-row-actions.d.cts +1 -1
- package/dist/as-row-actions.d.mts +1 -1
- package/dist/as-row-actions.mjs +1 -1
- package/dist/{as-row-actions.vue-DZrASzp7.d.mts → as-row-actions.vue-DxXodLGq.d.mts} +1 -1
- package/dist/{as-row-actions.vue-Cac2kfwO.d.cts → as-row-actions.vue-WRrzvdbJ.d.cts} +1 -1
- package/dist/{as-table-BNfZcSra.cjs → as-table-CVD1zLva.cjs} +8 -34
- package/dist/{as-table-DtfWLLlb.mjs → as-table-D5mMZKKg.mjs} +8 -34
- package/dist/{as-table-actions-z5xUWtvK.mjs → as-table-actions-C6moFlxt.mjs} +2 -2
- package/dist/{as-table-actions-8yf2QIER.cjs → as-table-actions-D91sNgel.cjs} +2 -2
- package/dist/as-table-actions.cjs +1 -1
- package/dist/as-table-actions.d.cts +1 -1
- package/dist/as-table-actions.d.mts +1 -1
- package/dist/as-table-actions.mjs +1 -1
- package/dist/{as-table-actions.vue-66cjnFZI.d.mts → as-table-actions.vue-CPVhj2ZC.d.mts} +2 -2
- package/dist/{as-table-actions.vue-B7ttOxKU.d.cts → as-table-actions.vue-DB3LW-eI.d.cts} +2 -2
- package/dist/{as-table-base-D7mO_Zmv.mjs → as-table-base-CEpvNFBd.mjs} +2 -2
- package/dist/{as-table-base-CdtyDOra.cjs → as-table-base-CyBOmUK9.cjs} +2 -2
- package/dist/{as-table-cell-value-BAi5yadc.cjs → as-table-cell-value-Ct0KnyKc.cjs} +1 -1
- package/dist/{as-table-cell-value-BVcfhhCb.mjs → as-table-cell-value-D1eLiQKJ.mjs} +1 -1
- package/dist/as-table-cell-value.cjs +1 -1
- package/dist/as-table-cell-value.mjs +1 -1
- package/dist/{as-table-header-cell-Cl8waY_g.mjs → as-table-header-cell-CUs-sSBm.mjs} +2 -2
- package/dist/{as-table-header-cell-CiRLNVJz.cjs → as-table-header-cell-D7pW2sV3.cjs} +2 -2
- package/dist/as-table-header-cell.cjs +1 -1
- package/dist/as-table-header-cell.d.cts +1 -1
- package/dist/as-table-header-cell.d.mts +1 -1
- package/dist/as-table-header-cell.mjs +1 -1
- package/dist/{as-table-header-cell.vue-DhCxDIn1.d.mts → as-table-header-cell.vue-BDhs3PNi.d.mts} +1 -1
- package/dist/{as-table-header-cell.vue-DmncmpeQ.d.cts → as-table-header-cell.vue-DFaRLZZA.d.cts} +1 -1
- package/dist/{as-table-root-Bza3ZGJZ.mjs → as-table-root-C61wrFd9.mjs} +15 -29
- package/dist/{as-table-root-C6a6iO6M.cjs → as-table-root-C7Tr_9W-.cjs} +16 -30
- package/dist/as-table-root.cjs +1 -1
- package/dist/as-table-root.d.cts +1 -1
- package/dist/as-table-root.d.mts +1 -1
- package/dist/as-table-root.mjs +1 -1
- package/dist/{as-table-root.vue-zWOmt_ug.d.mts → as-table-root.vue-Bza3D5F1.d.mts} +22 -5
- package/dist/{as-table-root.vue-BllmTRXj.d.cts → as-table-root.vue-D5Xyux8I.d.cts} +22 -5
- package/dist/{as-table-status-CbKmSKAy.cjs → as-table-status-B-MjDXNZ.cjs} +5 -5
- package/dist/{as-table-status-D9YuoBOm.mjs → as-table-status-D08b0cqn.mjs} +5 -5
- package/dist/as-table.cjs +1 -1
- package/dist/as-table.d.cts +1 -1
- package/dist/as-table.d.mts +1 -1
- package/dist/as-table.mjs +1 -1
- package/dist/{as-table.vue-Cd1Hc5v9.d.mts → as-table.vue-BuZGgKuM.d.cts} +5 -5
- package/dist/{as-table.vue-Bzp4UOqz.d.cts → as-table.vue-CPfERNtx.d.mts} +5 -5
- package/dist/{as-window-table-OB4B1knU.cjs → as-window-table-BfSud7yB.cjs} +30 -13
- package/dist/{as-window-table-D5grrLFG.mjs → as-window-table-CjYMF0aX.mjs} +30 -13
- package/dist/as-window-table.cjs +1 -1
- package/dist/as-window-table.d.cts +1 -1
- package/dist/as-window-table.d.mts +1 -1
- package/dist/as-window-table.mjs +1 -1
- package/dist/{as-window-table.vue-CcDoghqs.d.mts → as-window-table.vue-3egLvwAy.d.mts} +15 -2
- package/dist/{as-window-table.vue-Db--CSWD.d.cts → as-window-table.vue-BIjQuSie.d.cts} +15 -2
- package/dist/index.cjs +40 -41
- package/dist/index.d.cts +8 -8
- package/dist/index.d.mts +8 -8
- package/dist/index.mjs +41 -42
- package/dist/{types-CuOHiH-S.d.mts → types-B6N5NDx_.d.cts} +27 -11
- package/dist/{types-n40LWFm_.d.cts → types-CgdpcJdd.d.mts} +27 -11
- package/dist/{use-table-DRN4nlZs.mjs → use-table-DUwUfjSZ.mjs} +3 -2
- package/dist/{use-table-JU7BAX4e.cjs → use-table-c4ku22Mx.cjs} +3 -2
- package/dist/use-table-column-handlers-Do0Z-R9D.cjs +96 -0
- package/dist/use-table-column-handlers-eKHCfUm_.mjs +85 -0
- package/dist/{use-table-component-DIWiP_Vs.cjs → use-table-component-DbQDINoa.cjs} +1 -1
- package/dist/{use-table-component-VUFlxIk-.mjs → use-table-component-wfU13P3L.mjs} +1 -1
- package/dist/{use-table-nav-bridge-BBtXE70x.cjs → use-table-nav-bridge-BLLVGR1r.cjs} +1 -1
- package/dist/{use-table-nav-bridge-DT8oU-6r.mjs → use-table-nav-bridge-DRrvQxXq.mjs} +1 -1
- package/dist/{use-table-state-CqU1N4Q9.mjs → use-table-state-BEwXQayO.mjs} +53 -7
- package/dist/{use-table-state-CoVe_8NI.cjs → use-table-state-Cnxv0w_E.cjs} +57 -5
- package/package.json +7 -7
- package/dist/use-table-column-handlers-BMrP0WY2.cjs +0 -45
- package/dist/use-table-column-handlers-Bx3JERqs.mjs +0 -40
- /package/dist/{as-cell-json-popover-vty5vMjW.cjs → as-cell-json-popover-BM2QLgfk.cjs} +0 -0
- /package/dist/{as-cell-json-popover-CH5bAcLE.mjs → as-cell-json-popover-Dkdv5Y9E.mjs} +0 -0
- /package/dist/{as-filter-input-C8KmOus8.mjs → as-filter-input-BM23TNeh.mjs} +0 -0
- /package/dist/{as-filter-input-DUqpkTkg.cjs → as-filter-input-DJu2k9gO.cjs} +0 -0
- /package/dist/{error-message-CfKpn_5w.cjs → error-message-CglODWl4.cjs} +0 -0
- /package/dist/{error-message-gNEXnnbb.mjs → error-message-hPSAu8Ug.mjs} +0 -0
- /package/dist/{format-cell-Bx7wNc4X.mjs → format-cell-D1Ziv96Q.mjs} +0 -0
- /package/dist/{format-cell-DaxV6WIJ.cjs → format-cell-vCNTh4WZ.cjs} +0 -0
- /package/dist/{use-cell-locale-caG2Fzpc.cjs → use-cell-locale-BGBRQB7s.cjs} +0 -0
- /package/dist/{use-cell-locale-CxQOQsns.mjs → use-cell-locale-MQXoONh5.mjs} +0 -0
- /package/dist/{use-seed-on-open-DSh4XFyp.mjs → use-seed-on-open-DO3A1kIb.mjs} +0 -0
- /package/dist/{use-seed-on-open-9TSm1Vbv.cjs → use-seed-on-open-Dg9I89fU.cjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as useTableContext,
|
|
2
|
-
import { t as errorMessage } from "./error-message-
|
|
1
|
+
import { a as useTableContext, d as ownerNameOf, f as readPresetLabel, l as ASPECT_ICONS, u as ASPECT_LABELS } from "./use-table-state-BEwXQayO.mjs";
|
|
2
|
+
import { t as errorMessage } from "./error-message-hPSAu8Ug.mjs";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, h, nextTick, normalizeClass, onScopeDispose, openBlock, ref, renderList, shallowRef, toDisplayString, unref, vModelCheckbox, vModelText, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
4
4
|
import { isSystemPresetId } from "@atscript/ui-table";
|
|
5
5
|
import { DropdownMenuContent, DropdownMenuItem, DropdownMenuPortal, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuTrigger } from "reka-ui";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
2
|
-
const require_error_message = require("./error-message-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-Cnxv0w_E.cjs");
|
|
2
|
+
const require_error_message = require("./error-message-CglODWl4.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let _atscript_ui_table = require("@atscript/ui-table");
|
|
5
5
|
let reka_ui = require("reka-ui");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_preset_picker = require("./as-preset-picker-
|
|
1
|
+
const require_as_preset_picker = require("./as-preset-picker-yWXEhWEq.cjs");
|
|
2
2
|
module.exports = require_as_preset_picker.as_preset_picker_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_preset_picker_default } from "./as-preset-picker-
|
|
1
|
+
import { t as as_preset_picker_default } from "./as-preset-picker-Cw7LB7o1.mjs";
|
|
2
2
|
export { as_preset_picker_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as as_action_menu_content_default } from "./as-action-menu-content-
|
|
1
|
+
import { E as triggerAction, S as intentClass, a as useTableContext, b as createNavigateGestures, g as applyRowGate, h as rowActionHref, v as ariaLabelFor, x as extractIdentifier } from "./use-table-state-BEwXQayO.mjs";
|
|
2
|
+
import { t as as_action_menu_content_default } from "./as-action-menu-content-D7NIwc9X.mjs";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, normalizeClass, openBlock, resolveDynamicComponent, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
4
4
|
import { DropdownMenuPortal, DropdownMenuRoot, DropdownMenuTrigger } from "reka-ui";
|
|
5
5
|
//#region src/components/defaults/as-row-actions.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
2
|
-
const require_as_action_menu_content = require("./as-action-menu-content-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-Cnxv0w_E.cjs");
|
|
2
|
+
const require_as_action_menu_content = require("./as-action-menu-content-DXuyDZ_X.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let reka_ui = require("reka-ui");
|
|
5
5
|
//#region src/components/defaults/as-row-actions.vue?vue&type=script&setup=true&lang.ts
|
package/dist/as-row-actions.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_row_actions = require("./as-row-actions-
|
|
1
|
+
const require_as_row_actions = require("./as-row-actions-D_TqnP3S.cjs");
|
|
2
2
|
module.exports = require_as_row_actions.as_row_actions_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-row-actions.vue-
|
|
1
|
+
import { t as _default } from "./as-row-actions.vue-WRrzvdbJ.cjs";
|
|
2
2
|
export = _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-row-actions.vue-
|
|
1
|
+
import { t as _default } from "./as-row-actions.vue-DxXodLGq.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-row-actions.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_row_actions_default } from "./as-row-actions-
|
|
1
|
+
import { t as as_row_actions_default } from "./as-row-actions-BvJWHf3j.mjs";
|
|
2
2
|
export { as_row_actions_default as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-Cnxv0w_E.cjs");
|
|
2
2
|
const require_use_table_selection = require("./use-table-selection-DtCV3rhu.cjs");
|
|
3
3
|
const require_use_has_emit_listener = require("./use-has-emit-listener-BaGFZDyM.cjs");
|
|
4
|
-
const require_use_table_column_handlers = require("./use-table-column-handlers-
|
|
5
|
-
const require_as_table_base = require("./as-table-base-
|
|
4
|
+
const require_use_table_column_handlers = require("./use-table-column-handlers-Do0Z-R9D.cjs");
|
|
5
|
+
const require_as_table_base = require("./as-table-base-CyBOmUK9.cjs");
|
|
6
6
|
let vue = require("vue");
|
|
7
7
|
//#region src/components/as-table.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
const _hoisted_1 = { class: "as-table-outer-wrap" };
|
|
@@ -105,37 +105,11 @@ var as_table_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
105
105
|
state.rowSelectable.value = val;
|
|
106
106
|
}, { immediate: true });
|
|
107
107
|
require_use_table_selection.useSelectModeReset(state, () => props.select);
|
|
108
|
-
(0, vue.watch)(() => {
|
|
109
|
-
const placement = props.rowActionsColumn;
|
|
110
|
-
if (!placement) return false;
|
|
111
|
-
if (placement === "merge-select" && props.select !== "none") return false;
|
|
112
|
-
return state.actions.cellRow.length > 0;
|
|
113
|
-
}, (on) => {
|
|
114
|
-
state.includeActions.value = on;
|
|
115
|
-
}, { immediate: true });
|
|
116
108
|
const effectiveRows = (0, vue.computed)(() => state.applyLocalSort(props.rows ?? state.results.value));
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
label: "",
|
|
122
|
-
type: require_use_table_state.ROW_ACTIONS_TYPE,
|
|
123
|
-
sortable: false,
|
|
124
|
-
filterable: false,
|
|
125
|
-
order: 0,
|
|
126
|
-
fixed: true,
|
|
127
|
-
width: acts.length === 1 && !acts[0]?.icon ? "8em" : "4em"
|
|
128
|
-
};
|
|
129
|
-
});
|
|
130
|
-
const effectiveColumns = (0, vue.computed)(() => {
|
|
131
|
-
const base = props.columns ?? state.columns.value;
|
|
132
|
-
const placement = props.rowActionsColumn;
|
|
133
|
-
if (placement === false || placement === void 0) return base;
|
|
134
|
-
if (state.actions.row.length === 0) return base;
|
|
135
|
-
if (placement === "first") return [actionsCol.value, ...base];
|
|
136
|
-
if (placement === "last") return [...base, actionsCol.value];
|
|
137
|
-
if (props.select === "none") return [actionsCol.value, ...base];
|
|
138
|
-
return base;
|
|
109
|
+
const effectiveColumns = require_use_table_column_handlers.useRowActionsColumn(state, {
|
|
110
|
+
placement: () => props.rowActionsColumn,
|
|
111
|
+
select: () => props.select,
|
|
112
|
+
columns: () => props.columns ?? state.columns.value
|
|
139
113
|
});
|
|
140
114
|
require_use_table_state.useRegisterMainActionListener(state, (req) => emit("main-action", req.row, req.absIndex, req.event), require_use_has_emit_listener.useHasEmitListener("onMainAction"));
|
|
141
115
|
const { onSort, onHide, onFilter, onFiltersOff, onResetWidth, onReorder, onClearFilters } = require_use_table_column_handlers.useTableColumnHandlers(state);
|
|
@@ -148,7 +122,7 @@ var as_table_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
148
122
|
return (_ctx, _cache) => {
|
|
149
123
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1, [(0, vue.createVNode)(require_as_table_base.as_table_base_default, {
|
|
150
124
|
"render-mode": "standalone",
|
|
151
|
-
columns: effectiveColumns
|
|
125
|
+
columns: (0, vue.unref)(effectiveColumns),
|
|
152
126
|
rows: effectiveRows.value,
|
|
153
127
|
sorters: (0, vue.unref)(state).sorters.value,
|
|
154
128
|
"selected-rows": (0, vue.unref)(state).selectedRows.value,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as useTableContext, i as useRegisterMainActionListener } from "./use-table-state-BEwXQayO.mjs";
|
|
2
2
|
import { t as useSelectModeReset } from "./use-table-selection-ULbKT2xW.mjs";
|
|
3
3
|
import { t as useHasEmitListener } from "./use-has-emit-listener-DrBbsLHQ.mjs";
|
|
4
|
-
import { t as useTableColumnHandlers } from "./use-table-column-handlers-
|
|
5
|
-
import { t as as_table_base_default } from "./as-table-base-
|
|
4
|
+
import { n as useRowActionsColumn, t as useTableColumnHandlers } from "./use-table-column-handlers-eKHCfUm_.mjs";
|
|
5
|
+
import { t as as_table_base_default } from "./as-table-base-CEpvNFBd.mjs";
|
|
6
6
|
import { computed, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderList, renderSlot, unref, watch, withCtx } from "vue";
|
|
7
7
|
//#region src/components/as-table.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
const _hoisted_1 = { class: "as-table-outer-wrap" };
|
|
@@ -105,37 +105,11 @@ var as_table_default = /* @__PURE__ */ defineComponent({
|
|
|
105
105
|
state.rowSelectable.value = val;
|
|
106
106
|
}, { immediate: true });
|
|
107
107
|
useSelectModeReset(state, () => props.select);
|
|
108
|
-
watch(() => {
|
|
109
|
-
const placement = props.rowActionsColumn;
|
|
110
|
-
if (!placement) return false;
|
|
111
|
-
if (placement === "merge-select" && props.select !== "none") return false;
|
|
112
|
-
return state.actions.cellRow.length > 0;
|
|
113
|
-
}, (on) => {
|
|
114
|
-
state.includeActions.value = on;
|
|
115
|
-
}, { immediate: true });
|
|
116
108
|
const effectiveRows = computed(() => state.applyLocalSort(props.rows ?? state.results.value));
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
label: "",
|
|
122
|
-
type: ROW_ACTIONS_TYPE,
|
|
123
|
-
sortable: false,
|
|
124
|
-
filterable: false,
|
|
125
|
-
order: 0,
|
|
126
|
-
fixed: true,
|
|
127
|
-
width: acts.length === 1 && !acts[0]?.icon ? "8em" : "4em"
|
|
128
|
-
};
|
|
129
|
-
});
|
|
130
|
-
const effectiveColumns = computed(() => {
|
|
131
|
-
const base = props.columns ?? state.columns.value;
|
|
132
|
-
const placement = props.rowActionsColumn;
|
|
133
|
-
if (placement === false || placement === void 0) return base;
|
|
134
|
-
if (state.actions.row.length === 0) return base;
|
|
135
|
-
if (placement === "first") return [actionsCol.value, ...base];
|
|
136
|
-
if (placement === "last") return [...base, actionsCol.value];
|
|
137
|
-
if (props.select === "none") return [actionsCol.value, ...base];
|
|
138
|
-
return base;
|
|
109
|
+
const effectiveColumns = useRowActionsColumn(state, {
|
|
110
|
+
placement: () => props.rowActionsColumn,
|
|
111
|
+
select: () => props.select,
|
|
112
|
+
columns: () => props.columns ?? state.columns.value
|
|
139
113
|
});
|
|
140
114
|
useRegisterMainActionListener(state, (req) => emit("main-action", req.row, req.absIndex, req.event), useHasEmitListener("onMainAction"));
|
|
141
115
|
const { onSort, onHide, onFilter, onFiltersOff, onResetWidth, onReorder, onClearFilters } = useTableColumnHandlers(state);
|
|
@@ -148,7 +122,7 @@ var as_table_default = /* @__PURE__ */ defineComponent({
|
|
|
148
122
|
return (_ctx, _cache) => {
|
|
149
123
|
return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(as_table_base_default, {
|
|
150
124
|
"render-mode": "standalone",
|
|
151
|
-
columns: effectiveColumns
|
|
125
|
+
columns: unref(effectiveColumns),
|
|
152
126
|
rows: effectiveRows.value,
|
|
153
127
|
sorters: unref(state).sorters.value,
|
|
154
128
|
"selected-rows": unref(state).selectedRows.value,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as as_action_menu_content_default } from "./as-action-menu-content-
|
|
1
|
+
import { E as triggerAction, S as intentClass, _ as applyRowsGate, a as useTableContext, b as createNavigateGestures, g as applyRowGate, h as rowActionHref, v as ariaLabelFor, y as collectIdentifiers } from "./use-table-state-BEwXQayO.mjs";
|
|
2
|
+
import { t as as_action_menu_content_default } from "./as-action-menu-content-D7NIwc9X.mjs";
|
|
3
3
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, normalizeClass, openBlock, ref, renderSlot, resolveDynamicComponent, toDisplayString, unref, watch, withCtx } from "vue";
|
|
4
4
|
import { DropdownMenuPortal, DropdownMenuRoot, DropdownMenuTrigger } from "reka-ui";
|
|
5
5
|
//#region src/components/as-table-actions.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
2
|
-
const require_as_action_menu_content = require("./as-action-menu-content-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-Cnxv0w_E.cjs");
|
|
2
|
+
const require_as_action_menu_content = require("./as-action-menu-content-DXuyDZ_X.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let reka_ui = require("reka-ui");
|
|
5
5
|
//#region src/components/as-table-actions.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_table_actions = require("./as-table-actions-
|
|
1
|
+
const require_as_table_actions = require("./as-table-actions-D91sNgel.cjs");
|
|
2
2
|
module.exports = require_as_table_actions.as_table_actions_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-table-actions.vue-
|
|
1
|
+
import { t as _default } from "./as-table-actions.vue-DB3LW-eI.cjs";
|
|
2
2
|
export = _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-table-actions.vue-
|
|
1
|
+
import { t as _default } from "./as-table-actions.vue-CPVhj2ZC.mjs";
|
|
2
2
|
export { _default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_table_actions_default } from "./as-table-actions-
|
|
1
|
+
import { t as as_table_actions_default } from "./as-table-actions-C6moFlxt.mjs";
|
|
2
2
|
export { as_table_actions_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as TVueTableActionInfo } from "./types-CgdpcJdd.mjs";
|
|
2
2
|
import * as vue from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/as-table-actions.vue.d.ts
|
|
@@ -18,7 +18,7 @@ declare var __VLS_1: {
|
|
|
18
18
|
defaultAction: TVueTableActionInfo | undefined;
|
|
19
19
|
otherActions: TVueTableActionInfo[];
|
|
20
20
|
trailingRowActions: TVueTableActionInfo[];
|
|
21
|
-
level: "row" | "
|
|
21
|
+
level: "row" | "table" | "rows";
|
|
22
22
|
ids: Record<string, unknown>[];
|
|
23
23
|
invoke: typeof invokeWith;
|
|
24
24
|
}, __VLS_12: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { w as TVueTableActionInfo } from "./types-B6N5NDx_.cjs";
|
|
2
2
|
import * as vue from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/as-table-actions.vue.d.ts
|
|
@@ -18,7 +18,7 @@ declare var __VLS_1: {
|
|
|
18
18
|
defaultAction: TVueTableActionInfo | undefined;
|
|
19
19
|
otherActions: TVueTableActionInfo[];
|
|
20
20
|
trailingRowActions: TVueTableActionInfo[];
|
|
21
|
-
level: "row" | "
|
|
21
|
+
level: "row" | "table" | "rows";
|
|
22
22
|
ids: Record<string, unknown>[];
|
|
23
23
|
invoke: typeof invokeWith;
|
|
24
24
|
}, __VLS_12: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as onSelectControlKeydown, o as useTableContextOptional } from "./use-table-state-BEwXQayO.mjs";
|
|
2
2
|
import { t as getCellValue } from "./get-cell-value-Cb3X8nUn.mjs";
|
|
3
|
-
import { a as useCellComponents, n as as_table_header_default, o as useCellResolver, r as as_table_colgroup_default, t as as_table_status_default } from "./as-table-status-
|
|
3
|
+
import { a as useCellComponents, n as as_table_header_default, o as useCellResolver, r as as_table_colgroup_default, t as as_table_status_default } from "./as-table-status-D08b0cqn.mjs";
|
|
4
4
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onMounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, unref, useSlots, watch, withCtx } from "vue";
|
|
5
5
|
import { DEFAULT_ROW_HEIGHT_PX, filledFilterCount } from "@atscript/ui-table";
|
|
6
6
|
import { useParentElement, useResizeObserver } from "@vueuse/core";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-Cnxv0w_E.cjs");
|
|
2
2
|
const require_get_cell_value = require("./get-cell-value-CJT4fk4y.cjs");
|
|
3
|
-
const require_as_table_status = require("./as-table-status-
|
|
3
|
+
const require_as_table_status = require("./as-table-status-B-MjDXNZ.cjs");
|
|
4
4
|
let vue = require("vue");
|
|
5
5
|
let _atscript_ui_table = require("@atscript/ui-table");
|
|
6
6
|
let _vueuse_core = require("@vueuse/core");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_get_cell_value = require("./get-cell-value-CJT4fk4y.cjs");
|
|
2
|
-
const require_format_cell = require("./format-cell-
|
|
2
|
+
const require_format_cell = require("./format-cell-vCNTh4WZ.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/components/defaults/as-table-cell-value.vue
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as getCellValue } from "./get-cell-value-Cb3X8nUn.mjs";
|
|
2
|
-
import { t as formatCellValue } from "./format-cell-
|
|
2
|
+
import { t as formatCellValue } from "./format-cell-D1Ziv96Q.mjs";
|
|
3
3
|
import { createElementBlock, defineComponent, normalizeClass, openBlock, toDisplayString, unref } from "vue";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/components/defaults/as-table-cell-value.vue
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_table_cell_value = require("./as-table-cell-value-
|
|
1
|
+
const require_as_table_cell_value = require("./as-table-cell-value-Ct0KnyKc.cjs");
|
|
2
2
|
module.exports = require_as_table_cell_value.as_table_cell_value_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_table_cell_value_default } from "./as-table-cell-value-
|
|
1
|
+
import { t as as_table_cell_value_default } from "./as-table-cell-value-D1eLiQKJ.mjs";
|
|
2
2
|
export { as_table_cell_value_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as useTableComponent } from "./use-table-component-
|
|
2
|
-
import { t as as_column_menu_default } from "./as-column-menu-
|
|
1
|
+
import { t as useTableComponent } from "./use-table-component-wfU13P3L.mjs";
|
|
2
|
+
import { t as as_column_menu_default } from "./as-column-menu-CBtUfYEE.mjs";
|
|
3
3
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, resolveDynamicComponent, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
4
4
|
import { isFilled } from "@atscript/ui-table";
|
|
5
5
|
//#region src/components/defaults/as-table-header-cell.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_use_table_component = require("./use-table-component-
|
|
2
|
-
const require_as_column_menu = require("./as-column-menu-
|
|
1
|
+
const require_use_table_component = require("./use-table-component-DbQDINoa.cjs");
|
|
2
|
+
const require_as_column_menu = require("./as-column-menu-ChB7hzmr.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let _atscript_ui_table = require("@atscript/ui-table");
|
|
5
5
|
//#region src/components/defaults/as-table-header-cell.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_table_header_cell = require("./as-table-header-cell-
|
|
1
|
+
const require_as_table_header_cell = require("./as-table-header-cell-D7pW2sV3.cjs");
|
|
2
2
|
module.exports = require_as_table_header_cell.as_table_header_cell_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-table-header-cell.vue-
|
|
1
|
+
import { t as _default } from "./as-table-header-cell.vue-DFaRLZZA.cjs";
|
|
2
2
|
export = _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-table-header-cell.vue-
|
|
1
|
+
import { t as _default } from "./as-table-header-cell.vue-BDhs3PNi.mjs";
|
|
2
2
|
export { _default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_table_header_cell_default } from "./as-table-header-cell-
|
|
1
|
+
import { t as as_table_header_cell_default } from "./as-table-header-cell-CUs-sSBm.mjs";
|
|
2
2
|
export { as_table_header_cell_default as default };
|
package/dist/{as-table-header-cell.vue-DhCxDIn1.d.mts → as-table-header-cell.vue-BDhs3PNi.d.mts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ColumnMenuConfig } from "./types-
|
|
1
|
+
import { r as ColumnMenuConfig } from "./types-CgdpcJdd.mjs";
|
|
2
2
|
import { ColumnDef } from "@atscript/ui";
|
|
3
3
|
import * as vue from "vue";
|
|
4
4
|
import { ColumnWidthEntry, FilterCondition } from "@atscript/ui-table";
|
package/dist/{as-table-header-cell.vue-DmncmpeQ.d.cts → as-table-header-cell.vue-DFaRLZZA.d.cts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ColumnMenuConfig } from "./types-
|
|
1
|
+
import { r as ColumnMenuConfig } from "./types-B6N5NDx_.cjs";
|
|
2
2
|
import * as vue from "vue";
|
|
3
3
|
import { ColumnDef } from "@atscript/ui";
|
|
4
4
|
import { ColumnWidthEntry, FilterCondition } from "@atscript/ui-table";
|
|
@@ -1,28 +1,10 @@
|
|
|
1
|
-
import { i as useRegisterMainActionListener, t as createStaticTableState } from "./use-table-state-
|
|
2
|
-
import { n as finalizeTableState, r as useTable } from "./use-table-
|
|
3
|
-
import { t as useTableNavBridge } from "./use-table-nav-bridge-
|
|
1
|
+
import { i as useRegisterMainActionListener, s as warnUnsupportedFilter, t as createStaticTableState } from "./use-table-state-BEwXQayO.mjs";
|
|
2
|
+
import { n as finalizeTableState, r as useTable } from "./use-table-DUwUfjSZ.mjs";
|
|
3
|
+
import { t as useTableNavBridge } from "./use-table-nav-bridge-DRrvQxXq.mjs";
|
|
4
4
|
import { t as useHasEmitListener } from "./use-has-emit-listener-DrBbsLHQ.mjs";
|
|
5
|
-
import { t as as_confirm_dialog_default } from "./as-confirm-dialog-
|
|
5
|
+
import { t as as_confirm_dialog_default } from "./as-confirm-dialog-Pnt60ALy.mjs";
|
|
6
6
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, defineAsyncComponent, defineComponent, mergeModels, openBlock, ref, renderSlot, resolveDynamicComponent, unref, useModel, watch } from "vue";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* `true` outside a production build — the gate for authoring-time warnings, so
|
|
10
|
-
* their strings and checks cost a shipped app nothing.
|
|
11
|
-
*
|
|
12
|
-
* Read from `process.env.NODE_ENV` rather than `import.meta.env`: bundlers
|
|
13
|
-
* replace this expression with a literal in both the ESM and the CJS output,
|
|
14
|
-
* while `import.meta` only exists in the former. Where neither a bundler nor a
|
|
15
|
-
* `process` shim is present the read throws — warnings stay on, which is the
|
|
16
|
-
* safe side of the trade.
|
|
17
|
-
*/
|
|
18
|
-
function detectDev() {
|
|
19
|
-
try {
|
|
20
|
-
return process.env.NODE_ENV !== "production";
|
|
21
|
-
} catch {
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
const DEV = detectDev();
|
|
7
|
+
import { DEV } from "@atscript/ui-table";
|
|
26
8
|
//#endregion
|
|
27
9
|
//#region src/components/as-table-root.vue
|
|
28
10
|
var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
@@ -181,7 +163,11 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
181
163
|
},
|
|
182
164
|
"urlQueryModifiers": {}
|
|
183
165
|
}),
|
|
184
|
-
emits: /* @__PURE__ */ mergeModels([
|
|
166
|
+
emits: /* @__PURE__ */ mergeModels([
|
|
167
|
+
"main-action",
|
|
168
|
+
"action",
|
|
169
|
+
"unsupported-filter"
|
|
170
|
+
], [
|
|
185
171
|
"update:filterFields",
|
|
186
172
|
"update:columnNames",
|
|
187
173
|
"update:columnWidths",
|
|
@@ -272,6 +258,7 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
272
258
|
watch(() => props.rows, () => localState.query({ silent: true }));
|
|
273
259
|
return localState;
|
|
274
260
|
}
|
|
261
|
+
const hasUnsupportedFilterListener = useHasEmitListener("onUnsupportedFilter");
|
|
275
262
|
const state = localMode ? createLocalState() : useTable(props.url, {
|
|
276
263
|
limit: props.limit,
|
|
277
264
|
rowValueFn: props.rowValueFn,
|
|
@@ -304,6 +291,7 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
304
291
|
urlQueryReady: urlQueryActive ? urlQueryReady : void 0,
|
|
305
292
|
onUrlQueryChange: urlQueryActive ? (s) => urlQuery.value = s : void 0,
|
|
306
293
|
urlQuerySync: props.urlQuerySync,
|
|
294
|
+
onUnsupportedFilter: (issue) => hasUnsupportedFilterListener.value ? emit("unsupported-filter", issue) : warnUnsupportedFilter(issue),
|
|
307
295
|
preset: props.preset,
|
|
308
296
|
displayColumns: props.displayColumns
|
|
309
297
|
});
|
|
@@ -311,7 +299,7 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
311
299
|
state.rowActions.value = value;
|
|
312
300
|
}, { immediate: true });
|
|
313
301
|
if (urlQueryActive && !localMode) {
|
|
314
|
-
let lastSeenQuery
|
|
302
|
+
let lastSeenQuery;
|
|
315
303
|
watch([
|
|
316
304
|
() => state.tableDef.value,
|
|
317
305
|
() => urlQuery.value,
|
|
@@ -319,11 +307,9 @@ var as_table_root_default = /* @__PURE__ */ defineComponent({
|
|
|
319
307
|
], ([def, q, presetReady]) => {
|
|
320
308
|
if (def === null || !presetReady) return;
|
|
321
309
|
const query = typeof q === "string" ? q : "";
|
|
322
|
-
if (
|
|
323
|
-
if (query !== "") state.applyUrlQuery(query, { mode: "merge" });
|
|
324
|
-
urlQueryReady.value = true;
|
|
325
|
-
} else if (query !== lastSeenQuery) state.applyUrlQuery(query, { mode: "replace" });
|
|
310
|
+
if (query !== lastSeenQuery) state.applyUrlQuery(query);
|
|
326
311
|
lastSeenQuery = query;
|
|
312
|
+
urlQueryReady.value = true;
|
|
327
313
|
}, { immediate: true });
|
|
328
314
|
}
|
|
329
315
|
useRegisterMainActionListener(state, (req) => emit("main-action", req.row, req.absIndex, req.event), useHasEmitListener("onMainAction"));
|
|
@@ -1,28 +1,10 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
2
|
-
const require_use_table = require("./use-table-
|
|
3
|
-
const require_use_table_nav_bridge = require("./use-table-nav-bridge-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-Cnxv0w_E.cjs");
|
|
2
|
+
const require_use_table = require("./use-table-c4ku22Mx.cjs");
|
|
3
|
+
const require_use_table_nav_bridge = require("./use-table-nav-bridge-BLLVGR1r.cjs");
|
|
4
4
|
const require_use_has_emit_listener = require("./use-has-emit-listener-BaGFZDyM.cjs");
|
|
5
|
-
const require_as_confirm_dialog = require("./as-confirm-dialog-
|
|
5
|
+
const require_as_confirm_dialog = require("./as-confirm-dialog-CStjIWN0.cjs");
|
|
6
6
|
let vue = require("vue");
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* `true` outside a production build — the gate for authoring-time warnings, so
|
|
10
|
-
* their strings and checks cost a shipped app nothing.
|
|
11
|
-
*
|
|
12
|
-
* Read from `process.env.NODE_ENV` rather than `import.meta.env`: bundlers
|
|
13
|
-
* replace this expression with a literal in both the ESM and the CJS output,
|
|
14
|
-
* while `import.meta` only exists in the former. Where neither a bundler nor a
|
|
15
|
-
* `process` shim is present the read throws — warnings stay on, which is the
|
|
16
|
-
* safe side of the trade.
|
|
17
|
-
*/
|
|
18
|
-
function detectDev() {
|
|
19
|
-
try {
|
|
20
|
-
return process.env.NODE_ENV !== "production";
|
|
21
|
-
} catch {
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
const DEV = detectDev();
|
|
7
|
+
let _atscript_ui_table = require("@atscript/ui-table");
|
|
26
8
|
//#endregion
|
|
27
9
|
//#region src/components/as-table-root.vue
|
|
28
10
|
var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -181,7 +163,11 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
181
163
|
},
|
|
182
164
|
"urlQueryModifiers": {}
|
|
183
165
|
}),
|
|
184
|
-
emits: /* @__PURE__ */ (0, vue.mergeModels)([
|
|
166
|
+
emits: /* @__PURE__ */ (0, vue.mergeModels)([
|
|
167
|
+
"main-action",
|
|
168
|
+
"action",
|
|
169
|
+
"unsupported-filter"
|
|
170
|
+
], [
|
|
185
171
|
"update:filterFields",
|
|
186
172
|
"update:columnNames",
|
|
187
173
|
"update:columnWidths",
|
|
@@ -232,7 +218,7 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
232
218
|
* Features that need a client are inert here and warned about once.
|
|
233
219
|
*/
|
|
234
220
|
function createLocalState() {
|
|
235
|
-
if (DEV) {
|
|
221
|
+
if (_atscript_ui_table.DEV) {
|
|
236
222
|
if (props.url) console.warn("[vue-table] <AsTableRoot>: :rows is set, so :url is ignored (local mode).");
|
|
237
223
|
if (props.preset) console.warn("[vue-table] <AsTableRoot>: presets need a server and are off in local mode.");
|
|
238
224
|
if (urlQueryActive) console.warn("[vue-table] <AsTableRoot>: v-model:urlQuery is not wired in local mode.");
|
|
@@ -272,6 +258,7 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
272
258
|
(0, vue.watch)(() => props.rows, () => localState.query({ silent: true }));
|
|
273
259
|
return localState;
|
|
274
260
|
}
|
|
261
|
+
const hasUnsupportedFilterListener = require_use_has_emit_listener.useHasEmitListener("onUnsupportedFilter");
|
|
275
262
|
const state = localMode ? createLocalState() : require_use_table.useTable(props.url, {
|
|
276
263
|
limit: props.limit,
|
|
277
264
|
rowValueFn: props.rowValueFn,
|
|
@@ -304,6 +291,7 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
304
291
|
urlQueryReady: urlQueryActive ? urlQueryReady : void 0,
|
|
305
292
|
onUrlQueryChange: urlQueryActive ? (s) => urlQuery.value = s : void 0,
|
|
306
293
|
urlQuerySync: props.urlQuerySync,
|
|
294
|
+
onUnsupportedFilter: (issue) => hasUnsupportedFilterListener.value ? emit("unsupported-filter", issue) : require_use_table_state.warnUnsupportedFilter(issue),
|
|
307
295
|
preset: props.preset,
|
|
308
296
|
displayColumns: props.displayColumns
|
|
309
297
|
});
|
|
@@ -311,7 +299,7 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
311
299
|
state.rowActions.value = value;
|
|
312
300
|
}, { immediate: true });
|
|
313
301
|
if (urlQueryActive && !localMode) {
|
|
314
|
-
let lastSeenQuery
|
|
302
|
+
let lastSeenQuery;
|
|
315
303
|
(0, vue.watch)([
|
|
316
304
|
() => state.tableDef.value,
|
|
317
305
|
() => urlQuery.value,
|
|
@@ -319,11 +307,9 @@ var as_table_root_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
319
307
|
], ([def, q, presetReady]) => {
|
|
320
308
|
if (def === null || !presetReady) return;
|
|
321
309
|
const query = typeof q === "string" ? q : "";
|
|
322
|
-
if (
|
|
323
|
-
if (query !== "") state.applyUrlQuery(query, { mode: "merge" });
|
|
324
|
-
urlQueryReady.value = true;
|
|
325
|
-
} else if (query !== lastSeenQuery) state.applyUrlQuery(query, { mode: "replace" });
|
|
310
|
+
if (query !== lastSeenQuery) state.applyUrlQuery(query);
|
|
326
311
|
lastSeenQuery = query;
|
|
312
|
+
urlQueryReady.value = true;
|
|
327
313
|
}, { immediate: true });
|
|
328
314
|
}
|
|
329
315
|
require_use_table_state.useRegisterMainActionListener(state, (req) => emit("main-action", req.row, req.absIndex, req.event), require_use_has_emit_listener.useHasEmitListener("onMainAction"));
|
package/dist/as-table-root.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_table_root = require("./as-table-root-
|
|
1
|
+
const require_as_table_root = require("./as-table-root-C7Tr_9W-.cjs");
|
|
2
2
|
module.exports = require_as_table_root.as_table_root_default;
|
package/dist/as-table-root.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-table-root.vue-
|
|
1
|
+
import { t as _default } from "./as-table-root.vue-D5Xyux8I.cjs";
|
|
2
2
|
export = _default;
|
package/dist/as-table-root.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-table-root.vue-
|
|
1
|
+
import { t as _default } from "./as-table-root.vue-Bza3D5F1.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-table-root.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_table_root_default } from "./as-table-root-
|
|
1
|
+
import { t as as_table_root_default } from "./as-table-root-C61wrFd9.mjs";
|
|
2
2
|
export { as_table_root_default as default };
|