@atscript/vue-table 0.1.140 → 0.1.142
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-B5RFt7Hc.cjs → as-action-menu-content-BaNFBYn3.cjs} +1 -1
- package/dist/{as-action-menu-content-KNJr1EkO.mjs → as-action-menu-content-miQYVP7x.mjs} +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.vue-DKQNY5gh.d.cts → as-column-menu.vue-Ca3wSDxw.d.mts} +2 -2
- package/dist/{as-column-menu.vue-hOmuVcKf.d.mts → as-column-menu.vue-Co7FtiEM.d.cts} +2 -2
- package/dist/{as-config-dialog-B1KJJSHE.cjs → as-config-dialog-CVSOrS9O.cjs} +2 -2
- package/dist/{as-config-dialog-JXNkCCrh.mjs → as-config-dialog-Di02V3bs.mjs} +2 -2
- package/dist/as-config-dialog.cjs +1 -1
- package/dist/as-config-dialog.mjs +1 -1
- package/dist/{as-confirm-dialog-CC6U8nLZ.mjs → as-confirm-dialog-C9Qat2rG.mjs} +1 -1
- package/dist/{as-confirm-dialog-a736BLOm.cjs → as-confirm-dialog-fCwo1ty9.cjs} +1 -1
- package/dist/as-confirm-dialog.cjs +1 -1
- package/dist/as-confirm-dialog.mjs +1 -1
- package/dist/{as-filter-dialog-IflKkOd8.cjs → as-filter-dialog-DYpbsNDx.cjs} +7 -7
- package/dist/{as-filter-dialog-C3wltqrN.mjs → as-filter-dialog-DdtrTT5w.mjs} +7 -7
- package/dist/as-filter-dialog.cjs +1 -1
- package/dist/as-filter-dialog.mjs +1 -1
- package/dist/{as-filter-field-pygBjA-K.cjs → as-filter-field-4-qFRsJx.cjs} +8 -10
- package/dist/{as-filter-field-D_6DlFcp.mjs → as-filter-field-DEQVodKG.mjs} +8 -10
- package/dist/as-filter-field.cjs +1 -1
- package/dist/as-filter-field.mjs +1 -1
- package/dist/{as-filters-BIoEsPD0.cjs → as-filters-C6ZkLrf4.cjs} +68 -25
- package/dist/{as-filters-BDzQ2SM_.mjs → as-filters-Dd_j6_6G.mjs} +69 -26
- package/dist/as-filters.cjs +1 -1
- package/dist/as-filters.d.cts +1 -1
- package/dist/as-filters.d.mts +1 -1
- package/dist/as-filters.mjs +1 -1
- package/dist/{as-filters.vue-BSgUEh4D.d.mts → as-filters.vue-dHbGmcbr.d.mts} +56 -4
- package/dist/{as-filters.vue-DMXZhQW3.d.cts → as-filters.vue-vH1FHn9L.d.cts} +56 -4
- package/dist/{as-preset-dialog-D_w4cxKS.mjs → as-preset-dialog-Bap48oUv.mjs} +1 -1
- package/dist/{as-preset-dialog-BgZB8xyk.cjs → as-preset-dialog-SYA-6lGR.cjs} +1 -1
- package/dist/as-preset-dialog.cjs +1 -1
- package/dist/as-preset-dialog.mjs +1 -1
- package/dist/{as-preset-picker-XnGrqHyF.cjs → as-preset-picker-BdKTZa95.cjs} +27 -21
- package/dist/{as-preset-picker-B8d6l3U1.mjs → as-preset-picker-NBrvsE6s.mjs} +27 -21
- package/dist/as-preset-picker.cjs +1 -1
- package/dist/as-preset-picker.mjs +1 -1
- package/dist/{as-residual-filter-C65QsWxr.mjs → as-residual-filter-BFnbI3h3.mjs} +1 -1
- package/dist/{as-residual-filter-ihvXCtpH.cjs → as-residual-filter-CZ-Bytdj.cjs} +1 -1
- package/dist/as-residual-filter.cjs +1 -1
- package/dist/as-residual-filter.mjs +1 -1
- package/dist/{as-row-actions-C6N0lcZb.cjs → as-row-actions-C3xHkX53.cjs} +2 -2
- package/dist/{as-row-actions-xQ9M1PrO.mjs → as-row-actions-KeoHo9Ex.mjs} +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-C8vslg0n.d.mts → as-row-actions.vue-D3_z3ytk.d.cts} +1 -1
- package/dist/{as-row-actions.vue-B3XAxDAL.d.cts → as-row-actions.vue-nmaDuxBT.d.mts} +1 -1
- package/dist/{as-table-status-2rA91OFT.mjs → as-select-cell-KD_ns8DS.mjs} +149 -36
- package/dist/{as-table-status-UWTPJJUL.cjs → as-select-cell-XnzNuW2v.cjs} +154 -35
- package/dist/{as-table-B49x0hDM.mjs → as-table-NHqyekNd.mjs} +10 -11
- package/dist/{as-table-actions-B2Hy3h7v.mjs → as-table-actions-BpEFcsgh.mjs} +2 -2
- package/dist/{as-table-actions-B-jY3s6f.cjs → as-table-actions-UQmFtRdJ.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-BgTJuXEH.d.cts → as-table-actions.vue-BG3JVaBQ.d.mts} +1 -1
- package/dist/{as-table-actions.vue-BnLH2NqO.d.mts → as-table-actions.vue-DcuzNZoC.d.cts} +1 -1
- package/dist/{as-table-ouPxssqv.cjs → as-table-ay1yel3u.cjs} +10 -11
- package/dist/{as-table-base-DErJfFYz.mjs → as-table-base-89DkDZ-1.mjs} +46 -60
- package/dist/{as-table-base-ceywcVRq.cjs → as-table-base-umzg4PBR.cjs} +51 -65
- package/dist/{as-table-header-cell-Ccf06b2_.mjs → as-table-header-cell-DU3ws2x9.mjs} +1 -1
- package/dist/{as-table-header-cell-ZCk3XD_d.cjs → as-table-header-cell-f3YpgJX1.cjs} +1 -1
- 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-C7jNmdDh.d.mts → as-table-header-cell.vue-5VGRc23o.d.mts} +1 -1
- package/dist/{as-table-header-cell.vue-DkClJBAT.d.cts → as-table-header-cell.vue-XR90UlHO.d.cts} +1 -1
- package/dist/{as-table-root-CG7bLzcQ.mjs → as-table-root-47hiBEnq.mjs} +8 -5
- package/dist/{as-table-root-_58hdHAi.cjs → as-table-root-DDeGktcl.cjs} +8 -5
- 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-DpPRMy3v.d.mts → as-table-root.vue-BGx453_Q.d.mts} +30 -4
- package/dist/{as-table-root.vue-D8hH1xGK.d.cts → as-table-root.vue-yZ7ZcwdT.d.cts} +32 -6
- 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-CudFoZTF.d.mts → as-table.vue-CwI5Z0y5.d.cts} +13 -11
- package/dist/{as-table.vue-Bv6sKnL5.d.cts → as-table.vue-wdFf4hMW.d.mts} +13 -11
- package/dist/{as-window-table-KyS6YUpa.mjs → as-window-table-C312T_bc.mjs} +83 -62
- package/dist/{as-window-table-C9YtzepV.cjs → as-window-table-hOYLNhX3.cjs} +89 -68
- 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-COVl3die.d.mts → as-window-table.vue-D6UDA6td.d.cts} +9 -7
- package/dist/{as-window-table.vue-CRWdhOgC.d.cts → as-window-table.vue-Deg1mj3t.d.mts} +9 -7
- package/dist/index.cjs +18 -18
- package/dist/index.d.cts +10 -10
- package/dist/index.d.mts +10 -10
- package/dist/index.mjs +18 -18
- package/dist/{types-BCixOa8x.d.cts → types-BU7J-a1r.d.mts} +79 -10
- package/dist/{types-D7qVxU_y.d.mts → types-D4dK49sA.d.cts} +79 -10
- package/dist/{use-table-2xPxoNRX.mjs → use-table-DlqGHjPh.mjs} +3 -2
- package/dist/{use-table-column-handlers-p_xK-l0e.mjs → use-table-column-handlers-0myVzrZR.mjs} +1 -1
- package/dist/{use-table-column-handlers-rqFo9HLz.cjs → use-table-column-handlers-BHMCo_HR.cjs} +1 -1
- package/dist/{use-table-component-XQ-Qt_sp.cjs → use-table-component-IziAm0vk.cjs} +1 -1
- package/dist/{use-table-component-BYO0zMQj.mjs → use-table-component-TLwFq4rx.mjs} +1 -1
- package/dist/{use-table-nav-bridge-BDBnRc4C.mjs → use-table-nav-bridge-CkQqimdS.mjs} +1 -1
- package/dist/{use-table-nav-bridge-DvrsPanF.cjs → use-table-nav-bridge-QU4jKhqx.cjs} +1 -1
- package/dist/{use-table-state-pF_9gnTG.cjs → use-table-state-BiklfjP0.cjs} +243 -45
- package/dist/{use-table-state-BzjbnpBA.mjs → use-table-state-Cq-3tbVr.mjs} +227 -47
- package/dist/{use-table-B45WZLwg.cjs → use-table-yZNJTfRq.cjs} +3 -2
- package/package.json +9 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as as_action_menu_content_default } from "./as-action-menu-content-
|
|
1
|
+
import { C as createNavigateGestures, S as collectIdentifiers, T as intentClass, a as useTableContext, b as applyRowsGate, k as triggerAction, v as rowActionHref, x as ariaLabelFor, y as applyRowGate } from "./use-table-state-Cq-3tbVr.mjs";
|
|
2
|
+
import { t as as_action_menu_content_default } from "./as-action-menu-content-miQYVP7x.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-BiklfjP0.cjs");
|
|
2
|
+
const require_as_action_menu_content = require("./as-action-menu-content-BaNFBYn3.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-UQmFtRdJ.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-DcuzNZoC.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-BG3JVaBQ.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-BpEFcsgh.mjs";
|
|
2
2
|
export { as_table_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-BiklfjP0.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-BHMCo_HR.cjs");
|
|
5
|
+
const require_as_table_base = require("./as-table-base-umzg4PBR.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" };
|
|
@@ -61,6 +61,11 @@ var as_table_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
61
61
|
required: false,
|
|
62
62
|
default: "none"
|
|
63
63
|
},
|
|
64
|
+
selectOn: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: false,
|
|
67
|
+
default: "row"
|
|
68
|
+
},
|
|
64
69
|
rowDelete: {
|
|
65
70
|
type: [Boolean, Object],
|
|
66
71
|
required: false,
|
|
@@ -113,12 +118,6 @@ var as_table_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
113
118
|
});
|
|
114
119
|
require_use_table_state.useRegisterMainActionListener(state, (req) => emit("main-action", req.row, req.absIndex, req.event), require_use_has_emit_listener.useHasEmitListener("onMainAction"));
|
|
115
120
|
const { onSort, onHide, onFilter, onFiltersOff, onResetWidth, onReorder, onClearFilters } = require_use_table_column_handlers.useTableColumnHandlers(state);
|
|
116
|
-
function handleSelectAll() {
|
|
117
|
-
state.selectAll(effectiveRows.value);
|
|
118
|
-
}
|
|
119
|
-
function handleDeselectAll() {
|
|
120
|
-
state.selectedRows.value = [];
|
|
121
|
-
}
|
|
122
121
|
return (_ctx, _cache) => {
|
|
123
122
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1, [(0, vue.createVNode)(require_as_table_base.as_table_base_default, {
|
|
124
123
|
"render-mode": "standalone",
|
|
@@ -127,6 +126,7 @@ var as_table_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
127
126
|
sorters: (0, vue.unref)(state).sorters.value,
|
|
128
127
|
"selected-rows": (0, vue.unref)(state).selectedRows.value,
|
|
129
128
|
select: props.select,
|
|
129
|
+
"select-on": props.selectOn,
|
|
130
130
|
"row-value-fn": (0, vue.unref)(state).rowValueFn,
|
|
131
131
|
querying: (0, vue.unref)(state).querying.value,
|
|
132
132
|
"query-error": (0, vue.unref)(state).queryError.value,
|
|
@@ -149,8 +149,6 @@ var as_table_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
149
149
|
onHide: (0, vue.unref)(onHide),
|
|
150
150
|
onFilter: (0, vue.unref)(onFilter),
|
|
151
151
|
onFiltersOff: (0, vue.unref)(onFiltersOff),
|
|
152
|
-
onSelectAll: handleSelectAll,
|
|
153
|
-
onDeselectAll: handleDeselectAll,
|
|
154
152
|
onReorder: (0, vue.unref)(onReorder),
|
|
155
153
|
onResize: (0, vue.unref)(state).setColumnWidth,
|
|
156
154
|
onResetWidth: (0, vue.unref)(onResetWidth),
|
|
@@ -167,6 +165,7 @@ var as_table_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
167
165
|
"sorters",
|
|
168
166
|
"selected-rows",
|
|
169
167
|
"select",
|
|
168
|
+
"select-on",
|
|
170
169
|
"row-value-fn",
|
|
171
170
|
"querying",
|
|
172
171
|
"query-error",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as toSelectAllState, o as useTableContextOptional } from "./use-table-state-Cq-3tbVr.mjs";
|
|
2
2
|
import { t as getCellValue } from "./get-cell-value-Cb3X8nUn.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { i as as_table_colgroup_default, n as as_table_status_default, o as useCellComponents, r as as_table_header_default, s as useCellResolver, t as as_select_cell_default } from "./as-select-cell-KD_ns8DS.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";
|
|
@@ -166,27 +166,9 @@ const _hoisted_6 = [
|
|
|
166
166
|
];
|
|
167
167
|
const _hoisted_7 = {
|
|
168
168
|
key: 0,
|
|
169
|
-
class: "as-td-select",
|
|
170
169
|
role: "gridcell"
|
|
171
170
|
};
|
|
172
|
-
const _hoisted_8 =
|
|
173
|
-
"tabindex",
|
|
174
|
-
"aria-checked",
|
|
175
|
-
"aria-disabled",
|
|
176
|
-
"aria-label",
|
|
177
|
-
"title",
|
|
178
|
-
"onKeydown"
|
|
179
|
-
];
|
|
180
|
-
const _hoisted_9 = {
|
|
181
|
-
key: 0,
|
|
182
|
-
class: "as-table-checkbox-tick",
|
|
183
|
-
"aria-hidden": "true"
|
|
184
|
-
};
|
|
185
|
-
const _hoisted_10 = {
|
|
186
|
-
key: 0,
|
|
187
|
-
role: "gridcell"
|
|
188
|
-
};
|
|
189
|
-
const _hoisted_11 = {
|
|
171
|
+
const _hoisted_8 = {
|
|
190
172
|
key: 3,
|
|
191
173
|
class: "as-td-filler",
|
|
192
174
|
role: "gridcell"
|
|
@@ -218,6 +200,11 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
|
|
|
218
200
|
required: false,
|
|
219
201
|
default: "none"
|
|
220
202
|
},
|
|
203
|
+
selectOn: {
|
|
204
|
+
type: String,
|
|
205
|
+
required: false,
|
|
206
|
+
default: "row"
|
|
207
|
+
},
|
|
221
208
|
renderMode: {
|
|
222
209
|
type: String,
|
|
223
210
|
required: false,
|
|
@@ -315,8 +302,6 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
|
|
|
315
302
|
"filters-off",
|
|
316
303
|
"row-click",
|
|
317
304
|
"row-dblclick",
|
|
318
|
-
"select-all",
|
|
319
|
-
"deselect-all",
|
|
320
305
|
"reorder",
|
|
321
306
|
"resize",
|
|
322
307
|
"reset-width"
|
|
@@ -382,18 +367,12 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
|
|
|
382
367
|
function metaFor(index) {
|
|
383
368
|
return rowHooks.value.metas[index] ?? DEFAULT_ROW_META;
|
|
384
369
|
}
|
|
385
|
-
/** Accessible name for a row's selection control, carrying the disabled reason. */
|
|
386
|
-
function selectLabel(verdict) {
|
|
387
|
-
if (verdict.ok) return "Select row";
|
|
388
|
-
return verdict.reason ? `Select row, ${verdict.reason}` : "Select row, not selectable";
|
|
389
|
-
}
|
|
390
370
|
const hasActiveFilters = computed(() => props.filters ? filledFilterCount(props.filters) > 0 : false);
|
|
391
371
|
const showSelectAllCheckbox = computed(() => isStandalone.value && props.select === "multi" && !!props.selectedRows);
|
|
392
372
|
const selectAllState = computed(() => {
|
|
393
373
|
if (!showSelectAllCheckbox.value) return void 0;
|
|
394
|
-
if ((props.selectedRows ?? []).length === 0) return "none";
|
|
395
374
|
const { selectable, selected } = rowHooks.value;
|
|
396
|
-
return
|
|
375
|
+
return toSelectAllState(selected, selectable);
|
|
397
376
|
});
|
|
398
377
|
const emit = __emit;
|
|
399
378
|
const slots = useSlots();
|
|
@@ -406,15 +385,15 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
|
|
|
406
385
|
if (!ctx || !props.rowValueFn) return false;
|
|
407
386
|
return ctx.state.isPkSelected(props.rowValueFn(row));
|
|
408
387
|
}
|
|
409
|
-
function ariaSelectedFor(
|
|
388
|
+
function ariaSelectedFor(selected) {
|
|
410
389
|
if (props.select === "none") return void 0;
|
|
411
|
-
return
|
|
390
|
+
return selected ? "true" : "false";
|
|
412
391
|
}
|
|
413
392
|
function onRowClick(row, event, index) {
|
|
414
393
|
emit("row-click", row, event);
|
|
415
394
|
if (!isStandalone.value) return;
|
|
416
395
|
if (ctx) ctx.state.setActive(index);
|
|
417
|
-
if (props.select === "none") return;
|
|
396
|
+
if (props.select === "none" || props.selectOn === "control") return;
|
|
418
397
|
if (!ctx) return;
|
|
419
398
|
ctx.state.toggleActiveSelection(props.select);
|
|
420
399
|
}
|
|
@@ -424,19 +403,14 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
|
|
|
424
403
|
ctx.state.setActive(index);
|
|
425
404
|
ctx.state.requestMainAction(event);
|
|
426
405
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
406
|
+
/** The header checkbox acts on the loaded (rendered) rows. */
|
|
407
|
+
function onToggleAll() {
|
|
408
|
+
ctx?.state.toggleAll(props.rows);
|
|
430
409
|
}
|
|
431
410
|
function onTbodyKeydown(event) {
|
|
432
411
|
if (!isStandalone.value || !ctx) return;
|
|
433
412
|
ctx.state.handleNavKey(event, { mode: props.select });
|
|
434
413
|
}
|
|
435
|
-
/** Space on a row's selection control toggles just that row. */
|
|
436
|
-
function onSelectCellKeydown(event, index) {
|
|
437
|
-
if (!ctx) return;
|
|
438
|
-
onSelectControlKeydown(event, index, props.select, ctx.state);
|
|
439
|
-
}
|
|
440
414
|
const scrollContainerRef = ref(null);
|
|
441
415
|
function alignActiveRow(idx) {
|
|
442
416
|
if (!ctx) return;
|
|
@@ -567,6 +541,7 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
|
|
|
567
541
|
"column-min-width": __props.columnMinWidth,
|
|
568
542
|
"has-select-column": hasValue.value,
|
|
569
543
|
"select-all-state": selectAllState.value,
|
|
544
|
+
"selected-count": unref(ctx)?.state.selectedCount.value ?? 0,
|
|
570
545
|
"with-filler": __props.stretch,
|
|
571
546
|
"enable-auto-fit": true,
|
|
572
547
|
"aria-rowindex": isStandalone.value ? 1 : void 0,
|
|
@@ -577,8 +552,11 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
|
|
|
577
552
|
onResetWidth: _cache[4] || (_cache[4] = (c) => emit("reset-width", c)),
|
|
578
553
|
onReorder: _cache[5] || (_cache[5] = (f, t, p) => emit("reorder", f, t, p)),
|
|
579
554
|
onResize: _cache[6] || (_cache[6] = (p, w) => emit("resize", p, w)),
|
|
580
|
-
|
|
581
|
-
}, createSlots({
|
|
555
|
+
onToggleAll
|
|
556
|
+
}, createSlots({
|
|
557
|
+
"header-__select": withCtx((scope) => [renderSlot(_ctx.$slots, "header-__select", normalizeProps(guardReactiveProps(scope)))]),
|
|
558
|
+
_: 2
|
|
559
|
+
}, [renderList(__props.columns, (col) => {
|
|
582
560
|
return {
|
|
583
561
|
name: `header-${col.path}`,
|
|
584
562
|
fn: withCtx((scope) => [renderSlot(_ctx.$slots, `header-${col.path}`, normalizeProps(guardReactiveProps(scope)))])
|
|
@@ -594,6 +572,7 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
|
|
|
594
572
|
"column-min-width",
|
|
595
573
|
"has-select-column",
|
|
596
574
|
"select-all-state",
|
|
575
|
+
"selected-count",
|
|
597
576
|
"with-filler",
|
|
598
577
|
"aria-rowindex"
|
|
599
578
|
])) : createCommentVNode("v-if", true),
|
|
@@ -674,7 +653,7 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
|
|
|
674
653
|
"aria-activedescendant": ariaActiveDescendant.value,
|
|
675
654
|
onKeydown: onTbodyKeydown
|
|
676
655
|
}, {
|
|
677
|
-
default: withCtx(({ item, index, spaceBefore }) => [createCommentVNode("\n `meta`
|
|
656
|
+
default: withCtx(({ item, index, spaceBefore }) => [createCommentVNode("\n `meta` (the row's hook results + its selectability verdict) and\n `selected` are resolved ONCE per row; `v-bind=\"meta.attrs\"` comes FIRST so every\n framework binding after it wins — consumer attrs can decorate a\n row but can never rewrite its id / role / aria / data contract.\n "), (openBlock(true), createElementBlock(Fragment, null, renderList([[metaFor(index), isPkSelected(item)]], ([meta, selected]) => {
|
|
678
657
|
return openBlock(), createElementBlock("tr", mergeProps({
|
|
679
658
|
key: 0,
|
|
680
659
|
ref_for: true
|
|
@@ -682,7 +661,7 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
|
|
|
682
661
|
id: rowIdFor(index),
|
|
683
662
|
role: "row",
|
|
684
663
|
"aria-rowindex": index + 2,
|
|
685
|
-
"aria-selected": ariaSelectedFor(
|
|
664
|
+
"aria-selected": ariaSelectedFor(selected),
|
|
686
665
|
"data-selectable": meta.selectable.ok ? void 0 : "false",
|
|
687
666
|
class: [{ "as-table-row-active": isActiveRow(index) }, meta.cls],
|
|
688
667
|
style: {
|
|
@@ -692,19 +671,26 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
|
|
|
692
671
|
onClick: ($event) => onRowClick(item, $event, index),
|
|
693
672
|
onDblclick: ($event) => onRowDblClick(item, $event, index)
|
|
694
673
|
}), [
|
|
695
|
-
hasValue.value ? (openBlock(),
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
"
|
|
703
|
-
|
|
704
|
-
"
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
}
|
|
674
|
+
hasValue.value ? (openBlock(), createBlock(as_select_cell_default, {
|
|
675
|
+
key: 0,
|
|
676
|
+
row: item,
|
|
677
|
+
index,
|
|
678
|
+
selected,
|
|
679
|
+
verdict: meta.selectable,
|
|
680
|
+
select: __props.select,
|
|
681
|
+
"select-on": __props.selectOn
|
|
682
|
+
}, createSlots({ _: 2 }, [unref(slots)["cell-__select"] ? {
|
|
683
|
+
name: "default",
|
|
684
|
+
fn: withCtx((scope) => [renderSlot(_ctx.$slots, "cell-__select", mergeProps({ ref_for: true }, scope))]),
|
|
685
|
+
key: "0"
|
|
686
|
+
} : void 0]), 1032, [
|
|
687
|
+
"row",
|
|
688
|
+
"index",
|
|
689
|
+
"selected",
|
|
690
|
+
"verdict",
|
|
691
|
+
"select",
|
|
692
|
+
"select-on"
|
|
693
|
+
])) : createCommentVNode("v-if", true),
|
|
708
694
|
unref(hasAnyCellBindings) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(__props.columns, (col) => {
|
|
709
695
|
return openBlock(), createElementBlock(Fragment, { key: col.path }, [(openBlock(true), createElementBlock(Fragment, null, renderList([unref(cellResolver)(col, item, index)], (bindings) => {
|
|
710
696
|
return openBlock(), createElementBlock(Fragment, { key: 0 }, [cellSlotFlags.value[col.path] ? (openBlock(), createElementBlock("td", mergeProps({
|
|
@@ -722,7 +708,7 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
|
|
|
722
708
|
}, { ref_for: true }, bindings), null, 16, ["row", "column"]))], 64);
|
|
723
709
|
}), 128))], 64);
|
|
724
710
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 2 }, renderList(__props.columns, (col) => {
|
|
725
|
-
return openBlock(), createElementBlock(Fragment, { key: col.path }, [cellSlotFlags.value[col.path] ? (openBlock(), createElementBlock("td",
|
|
711
|
+
return openBlock(), createElementBlock(Fragment, { key: col.path }, [cellSlotFlags.value[col.path] ? (openBlock(), createElementBlock("td", _hoisted_7, [renderSlot(_ctx.$slots, `cell-${col.path}`, {
|
|
726
712
|
row: item,
|
|
727
713
|
value: unref(getCellValue)(item, col.path),
|
|
728
714
|
column: col
|
|
@@ -733,7 +719,7 @@ var as_table_base_default = /* @__PURE__ */ defineComponent({
|
|
|
733
719
|
role: "gridcell"
|
|
734
720
|
}, null, 8, ["row", "column"]))], 64);
|
|
735
721
|
}), 128)),
|
|
736
|
-
__props.stretch ? (openBlock(), createElementBlock("td",
|
|
722
|
+
__props.stretch ? (openBlock(), createElementBlock("td", _hoisted_8)) : createCommentVNode("v-if", true)
|
|
737
723
|
], 16, _hoisted_6);
|
|
738
724
|
}), 128))]),
|
|
739
725
|
_: 3
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-BiklfjP0.cjs");
|
|
2
2
|
const require_get_cell_value = require("./get-cell-value-CJT4fk4y.cjs");
|
|
3
|
-
const
|
|
3
|
+
const require_as_select_cell = require("./as-select-cell-XnzNuW2v.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");
|
|
@@ -166,27 +166,9 @@ const _hoisted_6 = [
|
|
|
166
166
|
];
|
|
167
167
|
const _hoisted_7 = {
|
|
168
168
|
key: 0,
|
|
169
|
-
class: "as-td-select",
|
|
170
169
|
role: "gridcell"
|
|
171
170
|
};
|
|
172
|
-
const _hoisted_8 =
|
|
173
|
-
"tabindex",
|
|
174
|
-
"aria-checked",
|
|
175
|
-
"aria-disabled",
|
|
176
|
-
"aria-label",
|
|
177
|
-
"title",
|
|
178
|
-
"onKeydown"
|
|
179
|
-
];
|
|
180
|
-
const _hoisted_9 = {
|
|
181
|
-
key: 0,
|
|
182
|
-
class: "as-table-checkbox-tick",
|
|
183
|
-
"aria-hidden": "true"
|
|
184
|
-
};
|
|
185
|
-
const _hoisted_10 = {
|
|
186
|
-
key: 0,
|
|
187
|
-
role: "gridcell"
|
|
188
|
-
};
|
|
189
|
-
const _hoisted_11 = {
|
|
171
|
+
const _hoisted_8 = {
|
|
190
172
|
key: 3,
|
|
191
173
|
class: "as-td-filler",
|
|
192
174
|
role: "gridcell"
|
|
@@ -218,6 +200,11 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
218
200
|
required: false,
|
|
219
201
|
default: "none"
|
|
220
202
|
},
|
|
203
|
+
selectOn: {
|
|
204
|
+
type: String,
|
|
205
|
+
required: false,
|
|
206
|
+
default: "row"
|
|
207
|
+
},
|
|
221
208
|
renderMode: {
|
|
222
209
|
type: String,
|
|
223
210
|
required: false,
|
|
@@ -315,8 +302,6 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
315
302
|
"filters-off",
|
|
316
303
|
"row-click",
|
|
317
304
|
"row-dblclick",
|
|
318
|
-
"select-all",
|
|
319
|
-
"deselect-all",
|
|
320
305
|
"reorder",
|
|
321
306
|
"resize",
|
|
322
307
|
"reset-width"
|
|
@@ -324,8 +309,8 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
324
309
|
setup(__props, { emit: __emit }) {
|
|
325
310
|
const props = __props;
|
|
326
311
|
const ctx = require_use_table_state.useTableContextOptional();
|
|
327
|
-
const { resolve: cellResolver, hasAnyCellBindings } =
|
|
328
|
-
const cellComponents =
|
|
312
|
+
const { resolve: cellResolver, hasAnyCellBindings } = require_as_select_cell.useCellResolver(() => ctx?.state.tableDef.value ?? null);
|
|
313
|
+
const cellComponents = require_as_select_cell.useCellComponents(() => props.columns);
|
|
329
314
|
const isStandalone = (0, vue.computed)(() => props.renderMode === "standalone");
|
|
330
315
|
const isCombobox = (0, vue.computed)(() => props.renderMode === "combobox");
|
|
331
316
|
const isListbox = (0, vue.computed)(() => props.renderMode === "listbox");
|
|
@@ -382,18 +367,12 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
382
367
|
function metaFor(index) {
|
|
383
368
|
return rowHooks.value.metas[index] ?? DEFAULT_ROW_META;
|
|
384
369
|
}
|
|
385
|
-
/** Accessible name for a row's selection control, carrying the disabled reason. */
|
|
386
|
-
function selectLabel(verdict) {
|
|
387
|
-
if (verdict.ok) return "Select row";
|
|
388
|
-
return verdict.reason ? `Select row, ${verdict.reason}` : "Select row, not selectable";
|
|
389
|
-
}
|
|
390
370
|
const hasActiveFilters = (0, vue.computed)(() => props.filters ? (0, _atscript_ui_table.filledFilterCount)(props.filters) > 0 : false);
|
|
391
371
|
const showSelectAllCheckbox = (0, vue.computed)(() => isStandalone.value && props.select === "multi" && !!props.selectedRows);
|
|
392
372
|
const selectAllState = (0, vue.computed)(() => {
|
|
393
373
|
if (!showSelectAllCheckbox.value) return void 0;
|
|
394
|
-
if ((props.selectedRows ?? []).length === 0) return "none";
|
|
395
374
|
const { selectable, selected } = rowHooks.value;
|
|
396
|
-
return
|
|
375
|
+
return require_use_table_state.toSelectAllState(selected, selectable);
|
|
397
376
|
});
|
|
398
377
|
const emit = __emit;
|
|
399
378
|
const slots = (0, vue.useSlots)();
|
|
@@ -406,15 +385,15 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
406
385
|
if (!ctx || !props.rowValueFn) return false;
|
|
407
386
|
return ctx.state.isPkSelected(props.rowValueFn(row));
|
|
408
387
|
}
|
|
409
|
-
function ariaSelectedFor(
|
|
388
|
+
function ariaSelectedFor(selected) {
|
|
410
389
|
if (props.select === "none") return void 0;
|
|
411
|
-
return
|
|
390
|
+
return selected ? "true" : "false";
|
|
412
391
|
}
|
|
413
392
|
function onRowClick(row, event, index) {
|
|
414
393
|
emit("row-click", row, event);
|
|
415
394
|
if (!isStandalone.value) return;
|
|
416
395
|
if (ctx) ctx.state.setActive(index);
|
|
417
|
-
if (props.select === "none") return;
|
|
396
|
+
if (props.select === "none" || props.selectOn === "control") return;
|
|
418
397
|
if (!ctx) return;
|
|
419
398
|
ctx.state.toggleActiveSelection(props.select);
|
|
420
399
|
}
|
|
@@ -424,19 +403,14 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
424
403
|
ctx.state.setActive(index);
|
|
425
404
|
ctx.state.requestMainAction(event);
|
|
426
405
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
406
|
+
/** The header checkbox acts on the loaded (rendered) rows. */
|
|
407
|
+
function onToggleAll() {
|
|
408
|
+
ctx?.state.toggleAll(props.rows);
|
|
430
409
|
}
|
|
431
410
|
function onTbodyKeydown(event) {
|
|
432
411
|
if (!isStandalone.value || !ctx) return;
|
|
433
412
|
ctx.state.handleNavKey(event, { mode: props.select });
|
|
434
413
|
}
|
|
435
|
-
/** Space on a row's selection control toggles just that row. */
|
|
436
|
-
function onSelectCellKeydown(event, index) {
|
|
437
|
-
if (!ctx) return;
|
|
438
|
-
require_use_table_state.onSelectControlKeydown(event, index, props.select, ctx.state);
|
|
439
|
-
}
|
|
440
414
|
const scrollContainerRef = (0, vue.ref)(null);
|
|
441
415
|
function alignActiveRow(idx) {
|
|
442
416
|
if (!ctx) return;
|
|
@@ -544,7 +518,7 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
544
518
|
"aria-rowcount": ariaRowCount.value,
|
|
545
519
|
"aria-multiselectable": isStandalone.value && __props.select === "multi" ? "true" : void 0
|
|
546
520
|
}, [
|
|
547
|
-
(0, vue.createVNode)(
|
|
521
|
+
(0, vue.createVNode)(require_as_select_cell.as_table_colgroup_default, {
|
|
548
522
|
columns: __props.columns,
|
|
549
523
|
"column-widths": __props.columnWidths,
|
|
550
524
|
"has-select": hasValue.value,
|
|
@@ -555,7 +529,7 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
555
529
|
"has-select",
|
|
556
530
|
"with-filler"
|
|
557
531
|
]),
|
|
558
|
-
!__props.headless ? ((0, vue.openBlock)(), (0, vue.createBlock)(
|
|
532
|
+
!__props.headless ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_as_select_cell.as_table_header_default, {
|
|
559
533
|
key: 0,
|
|
560
534
|
columns: __props.columns,
|
|
561
535
|
sorters: __props.sorters,
|
|
@@ -567,6 +541,7 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
567
541
|
"column-min-width": __props.columnMinWidth,
|
|
568
542
|
"has-select-column": hasValue.value,
|
|
569
543
|
"select-all-state": selectAllState.value,
|
|
544
|
+
"selected-count": (0, vue.unref)(ctx)?.state.selectedCount.value ?? 0,
|
|
570
545
|
"with-filler": __props.stretch,
|
|
571
546
|
"enable-auto-fit": true,
|
|
572
547
|
"aria-rowindex": isStandalone.value ? 1 : void 0,
|
|
@@ -577,8 +552,11 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
577
552
|
onResetWidth: _cache[4] || (_cache[4] = (c) => emit("reset-width", c)),
|
|
578
553
|
onReorder: _cache[5] || (_cache[5] = (f, t, p) => emit("reorder", f, t, p)),
|
|
579
554
|
onResize: _cache[6] || (_cache[6] = (p, w) => emit("resize", p, w)),
|
|
580
|
-
|
|
581
|
-
}, (0, vue.createSlots)({
|
|
555
|
+
onToggleAll
|
|
556
|
+
}, (0, vue.createSlots)({
|
|
557
|
+
"header-__select": (0, vue.withCtx)((scope) => [(0, vue.renderSlot)(_ctx.$slots, "header-__select", (0, vue.normalizeProps)((0, vue.guardReactiveProps)(scope)))]),
|
|
558
|
+
_: 2
|
|
559
|
+
}, [(0, vue.renderList)(__props.columns, (col) => {
|
|
582
560
|
return {
|
|
583
561
|
name: `header-${col.path}`,
|
|
584
562
|
fn: (0, vue.withCtx)((scope) => [(0, vue.renderSlot)(_ctx.$slots, `header-${col.path}`, (0, vue.normalizeProps)((0, vue.guardReactiveProps)(scope)))])
|
|
@@ -594,6 +572,7 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
594
572
|
"column-min-width",
|
|
595
573
|
"has-select-column",
|
|
596
574
|
"select-all-state",
|
|
575
|
+
"selected-count",
|
|
597
576
|
"with-filler",
|
|
598
577
|
"aria-rowindex"
|
|
599
578
|
])) : (0, vue.createCommentVNode)("v-if", true),
|
|
@@ -674,7 +653,7 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
674
653
|
"aria-activedescendant": ariaActiveDescendant.value,
|
|
675
654
|
onKeydown: onTbodyKeydown
|
|
676
655
|
}, {
|
|
677
|
-
default: (0, vue.withCtx)(({ item, index, spaceBefore }) => [(0, vue.createCommentVNode)("\n `meta`
|
|
656
|
+
default: (0, vue.withCtx)(({ item, index, spaceBefore }) => [(0, vue.createCommentVNode)("\n `meta` (the row's hook results + its selectability verdict) and\n `selected` are resolved ONCE per row; `v-bind=\"meta.attrs\"` comes FIRST so every\n framework binding after it wins — consumer attrs can decorate a\n row but can never rewrite its id / role / aria / data contract.\n "), ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)([[metaFor(index), isPkSelected(item)]], ([meta, selected]) => {
|
|
678
657
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("tr", (0, vue.mergeProps)({
|
|
679
658
|
key: 0,
|
|
680
659
|
ref_for: true
|
|
@@ -682,7 +661,7 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
682
661
|
id: rowIdFor(index),
|
|
683
662
|
role: "row",
|
|
684
663
|
"aria-rowindex": index + 2,
|
|
685
|
-
"aria-selected": ariaSelectedFor(
|
|
664
|
+
"aria-selected": ariaSelectedFor(selected),
|
|
686
665
|
"data-selectable": meta.selectable.ok ? void 0 : "false",
|
|
687
666
|
class: [{ "as-table-row-active": isActiveRow(index) }, meta.cls],
|
|
688
667
|
style: {
|
|
@@ -692,19 +671,26 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
692
671
|
onClick: ($event) => onRowClick(item, $event, index),
|
|
693
672
|
onDblclick: ($event) => onRowDblClick(item, $event, index)
|
|
694
673
|
}), [
|
|
695
|
-
hasValue.value ? ((0, vue.openBlock)(), (0, vue.
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
"
|
|
703
|
-
|
|
704
|
-
"
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
}
|
|
674
|
+
hasValue.value ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_as_select_cell.as_select_cell_default, {
|
|
675
|
+
key: 0,
|
|
676
|
+
row: item,
|
|
677
|
+
index,
|
|
678
|
+
selected,
|
|
679
|
+
verdict: meta.selectable,
|
|
680
|
+
select: __props.select,
|
|
681
|
+
"select-on": __props.selectOn
|
|
682
|
+
}, (0, vue.createSlots)({ _: 2 }, [(0, vue.unref)(slots)["cell-__select"] ? {
|
|
683
|
+
name: "default",
|
|
684
|
+
fn: (0, vue.withCtx)((scope) => [(0, vue.renderSlot)(_ctx.$slots, "cell-__select", (0, vue.mergeProps)({ ref_for: true }, scope))]),
|
|
685
|
+
key: "0"
|
|
686
|
+
} : void 0]), 1032, [
|
|
687
|
+
"row",
|
|
688
|
+
"index",
|
|
689
|
+
"selected",
|
|
690
|
+
"verdict",
|
|
691
|
+
"select",
|
|
692
|
+
"select-on"
|
|
693
|
+
])) : (0, vue.createCommentVNode)("v-if", true),
|
|
708
694
|
(0, vue.unref)(hasAnyCellBindings) ? ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, (0, vue.renderList)(__props.columns, (col) => {
|
|
709
695
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: col.path }, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)([(0, vue.unref)(cellResolver)(col, item, index)], (bindings) => {
|
|
710
696
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [cellSlotFlags.value[col.path] ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("td", (0, vue.mergeProps)({
|
|
@@ -722,7 +708,7 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
722
708
|
}, { ref_for: true }, bindings), null, 16, ["row", "column"]))], 64);
|
|
723
709
|
}), 128))], 64);
|
|
724
710
|
}), 128)) : ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, { key: 2 }, (0, vue.renderList)(__props.columns, (col) => {
|
|
725
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: col.path }, [cellSlotFlags.value[col.path] ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("td",
|
|
711
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: col.path }, [cellSlotFlags.value[col.path] ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("td", _hoisted_7, [(0, vue.renderSlot)(_ctx.$slots, `cell-${col.path}`, {
|
|
726
712
|
row: item,
|
|
727
713
|
value: (0, vue.unref)(require_get_cell_value.getCellValue)(item, col.path),
|
|
728
714
|
column: col
|
|
@@ -733,7 +719,7 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
733
719
|
role: "gridcell"
|
|
734
720
|
}, null, 8, ["row", "column"]))], 64);
|
|
735
721
|
}), 128)),
|
|
736
|
-
__props.stretch ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("td",
|
|
722
|
+
__props.stretch ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("td", _hoisted_8)) : (0, vue.createCommentVNode)("v-if", true)
|
|
737
723
|
], 16, _hoisted_6);
|
|
738
724
|
}), 128))]),
|
|
739
725
|
_: 3
|
|
@@ -745,7 +731,7 @@ var as_table_base_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
745
731
|
"aria-activedescendant"
|
|
746
732
|
])], 2112)) : (0, vue.createCommentVNode)("v-if", true)
|
|
747
733
|
], 10, _hoisted_1),
|
|
748
|
-
(0, vue.createVNode)(
|
|
734
|
+
(0, vue.createVNode)(require_as_select_cell.as_table_status_default, {
|
|
749
735
|
"query-error": __props.queryError,
|
|
750
736
|
"is-empty": __props.rows.length === 0,
|
|
751
737
|
querying: !!__props.querying,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as useTableComponent } from "./use-table-component-
|
|
1
|
+
import { t as useTableComponent } from "./use-table-component-TLwFq4rx.mjs";
|
|
2
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_use_table_component = require("./use-table-component-
|
|
1
|
+
const require_use_table_component = require("./use-table-component-IziAm0vk.cjs");
|
|
2
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");
|
|
@@ -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-f3YpgJX1.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-XR90UlHO.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-5VGRc23o.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-DU3ws2x9.mjs";
|
|
2
2
|
export { as_table_header_cell_default as default };
|