morya-ui 0.4.3 → 0.4.5
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/CHANGELOG.md +47 -0
- package/README.md +6 -0
- package/README.zh-CN.md +6 -0
- package/dist/{Button-Bjsth0ct.js → Button-fKkfCnYv.js} +1 -1
- package/dist/{Checkbox-Bo26OGHP.js → Checkbox-BXC2mLNd.js} +1 -1
- package/dist/DatePicker-DcVjiS5d.js +848 -0
- package/dist/{Empty-rMhOPi79.js → Empty-By1qe-ew.js} +1 -1
- package/dist/{FlyoutSubmenu-C0id6-Sb.js → FlyoutSubmenu-C1n-fr6i.js} +1 -1
- package/dist/{Input-CxSTVp9E.js → Input-D2bee2LU.js} +2 -2
- package/dist/{Loading-D_qRwfKv.js → Loading-DE9Iaiao.js} +3 -3
- package/dist/Pagination-DpNOb0CS.js +178 -0
- package/dist/{Popover-D1uZ1N9Z.js → Popover-Bnz7KNZq.js} +2 -2
- package/dist/{ProgressSpinner-hmR23xpi.js → ProgressSpinner-vBXGvQ92.js} +1 -1
- package/dist/{Radio-CZAyelC_.js → Radio-BbznzRbr.js} +1 -1
- package/dist/{Segmented-BpdO7arR.js → Segmented-CMP3nBAP.js} +1 -1
- package/dist/{Select-CySmusHs.js → Select-q4X2ff_M.js} +3 -3
- package/dist/{Textarea-DskjTCcz.js → Textarea-DsFOAtPd.js} +2 -2
- package/dist/{Tooltip-DSfkflHp.js → Tooltip-5zRVTTVs.js} +2 -2
- package/dist/accordion/style.css +4 -3
- package/dist/affix/style.css +4 -3
- package/dist/alert/index.js +2 -2
- package/dist/alert/style.css +4 -3
- package/dist/anchor/style.css +4 -3
- package/dist/auto-complete/index.js +3 -3
- package/dist/auto-complete/style.css +4 -3
- package/dist/avatar/style.css +4 -3
- package/dist/badge/style.css +4 -3
- package/dist/block-ui/index.js +1 -1
- package/dist/block-ui/style.css +4 -3
- package/dist/breadcrumb/index.js +1 -1
- package/dist/breadcrumb/style.css +4 -3
- package/dist/button/index.js +1 -1
- package/dist/button/style.css +4 -3
- package/dist/calendar/index.js +3 -3
- package/dist/calendar/style.css +246 -45
- package/dist/card/style.css +4 -3
- package/dist/carousel/index.js +2 -2
- package/dist/carousel/style.css +4 -3
- package/dist/cascade-select/index.js +3 -3
- package/dist/cascade-select/style.css +4 -3
- package/dist/checkbox/index.js +1 -1
- package/dist/checkbox/style.css +4 -3
- package/dist/chip/index.js +1 -1
- package/dist/chip/style.css +4 -3
- package/dist/command-menu/index.js +3 -3
- package/dist/command-menu/style.css +4 -3
- package/dist/components/DatePicker/DatePicker.vue.d.ts +21 -0
- package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/styles.css +242 -42
- package/dist/components/DatePicker/types.d.ts +20 -2
- package/dist/components/DatePicker/types.d.ts.map +1 -1
- package/dist/components/OrderList/OrderList.vue.d.ts +13 -7
- package/dist/components/OrderList/OrderList.vue.d.ts.map +1 -1
- package/dist/components/OrderList/styles.css +80 -7
- package/dist/components/OrderList/types.d.ts +20 -3
- package/dist/components/OrderList/types.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.vue.d.ts.map +1 -1
- package/dist/components/Pagination/styles.css +3 -30
- package/dist/components/Table/Table.vue.d.ts +37 -282
- package/dist/components/Table/Table.vue.d.ts.map +1 -1
- package/dist/components/Table/core/tree.d.ts +4 -0
- package/dist/components/Table/core/tree.d.ts.map +1 -1
- package/dist/components/Table/core/utils.d.ts +11 -3
- package/dist/components/Table/core/utils.d.ts.map +1 -1
- package/dist/components/Table/index.d.ts +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/render/TableColumnSetting.vue.d.ts +25 -0
- package/dist/components/Table/render/TableColumnSetting.vue.d.ts.map +1 -0
- package/dist/components/Table/render/TableTbody.vue.d.ts +16 -0
- package/dist/components/Table/render/TableTbody.vue.d.ts.map +1 -1
- package/dist/components/Table/render/TableThead.vue.d.ts +8 -0
- package/dist/components/Table/render/TableThead.vue.d.ts.map +1 -1
- package/dist/components/Table/state/internal.d.ts +1 -1
- package/dist/components/Table/state/internal.d.ts.map +1 -1
- package/dist/components/Table/state/usePageItems.d.ts +1 -3
- package/dist/components/Table/state/usePageItems.d.ts.map +1 -1
- package/dist/components/Table/state/useVirtualRows.d.ts +20 -2
- package/dist/components/Table/state/useVirtualRows.d.ts.map +1 -1
- package/dist/components/Table/styles.css +95 -0
- package/dist/components/Table/types.d.ts +77 -12
- package/dist/components/Table/types.d.ts.map +1 -1
- package/dist/{config-BEpyhJi3.js → config-Cd20zAyW.js} +11 -1
- package/dist/config-provider/index.js +1 -1
- package/dist/config-provider/style.css +4 -3
- package/dist/confirm-dialog/index.js +4 -4
- package/dist/confirm-dialog/style.css +4 -3
- package/dist/confirm-popup/index.js +4 -4
- package/dist/confirm-popup/style.css +4 -3
- package/dist/context-menu/index.js +3 -3
- package/dist/context-menu/style.css +4 -3
- package/dist/data-view/index.js +3 -3
- package/dist/data-view/style.css +7 -33
- package/dist/date-picker/index.js +1 -1
- package/dist/date-picker/style.css +378 -45
- package/dist/date-picker/style.js +1 -0
- package/dist/descriptions/index.js +1 -1
- package/dist/descriptions/style.css +4 -3
- package/dist/dialog/index.js +4 -4
- package/dist/dialog/style.css +4 -3
- package/dist/divider/style.css +4 -3
- package/dist/dock/style.css +4 -3
- package/dist/drawer/index.js +3 -3
- package/dist/drawer/style.css +4 -3
- package/dist/dropdown/index.js +4 -4
- package/dist/dropdown/style.css +4 -3
- package/dist/empty/index.js +1 -1
- package/dist/empty/style.css +4 -3
- package/dist/fieldset/style.css +4 -3
- package/dist/file-upload/index.js +1 -1
- package/dist/file-upload/style.css +4 -3
- package/dist/flex/index.js +1 -1
- package/dist/flex/style.css +4 -3
- package/dist/float-label/style.css +4 -3
- package/dist/fluid/style.css +4 -3
- package/dist/form/index.js +1 -1
- package/dist/form/style.css +4 -3
- package/dist/gallery/index.js +1 -1
- package/dist/gallery/style.css +4 -3
- package/dist/grid/style.css +4 -3
- package/dist/icon/style.css +4 -3
- package/dist/icon-field/style.css +4 -3
- package/dist/image/index.js +1 -1
- package/dist/image/style.css +4 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4118 -3439
- package/dist/inplace/style.css +4 -3
- package/dist/input/index.js +1 -1
- package/dist/input/style.css +4 -3
- package/dist/input-color/index.js +2 -2
- package/dist/input-color/style.css +4 -3
- package/dist/input-group/style.css +4 -3
- package/dist/input-number/index.js +2 -2
- package/dist/input-number/style.css +4 -3
- package/dist/input-otp/index.js +2 -2
- package/dist/input-otp/style.css +4 -3
- package/dist/input-password/index.js +2 -2
- package/dist/input-password/style.css +4 -3
- package/dist/input-tags/index.js +2 -2
- package/dist/input-tags/style.css +4 -3
- package/dist/knob/style.css +4 -3
- package/dist/label/style.css +4 -3
- package/dist/layout/index.js +1 -1
- package/dist/layout/style.css +4 -3
- package/dist/list/index.js +4 -4
- package/dist/list/style.css +7 -33
- package/dist/listbox/index.js +2 -2
- package/dist/listbox/style.css +4 -3
- package/dist/loading/index.js +1 -1
- package/dist/loading/style.css +4 -3
- package/dist/locale/de-DE.d.ts.map +1 -1
- package/dist/locale/en-US.d.ts.map +1 -1
- package/dist/locale/es-ES.d.ts.map +1 -1
- package/dist/locale/fr-FR.d.ts.map +1 -1
- package/dist/locale/ja-JP.d.ts.map +1 -1
- package/dist/locale/ko-KR.d.ts.map +1 -1
- package/dist/locale/pt-BR.d.ts.map +1 -1
- package/dist/locale/ru-RU.d.ts.map +1 -1
- package/dist/locale/types.d.ts +18 -0
- package/dist/locale/types.d.ts.map +1 -1
- package/dist/locale/zh-CN.d.ts.map +1 -1
- package/dist/locale/zh-TW.d.ts.map +1 -1
- package/dist/{locale-CZddM-tH.js → locale-BcxMPufl.js} +1 -1
- package/dist/mega-menu/index.js +3 -3
- package/dist/mega-menu/style.css +4 -3
- package/dist/mentions/index.js +3 -3
- package/dist/mentions/style.css +4 -3
- package/dist/menu/index.js +4 -4
- package/dist/menu/style.css +4 -3
- package/dist/menubar/index.js +3 -3
- package/dist/menubar/style.css +4 -3
- package/dist/message/index.js +3 -3
- package/dist/message/style.css +4 -3
- package/dist/meter-group/style.css +4 -3
- package/dist/order-list/index.js +191 -101
- package/dist/order-list/style.css +84 -10
- package/dist/page/index.js +3 -3
- package/dist/page/style.css +4 -3
- package/dist/pagination/index.js +1 -1
- package/dist/pagination/style.css +7 -33
- package/dist/panel/index.js +1 -1
- package/dist/panel/style.css +4 -3
- package/dist/pick-list/index.js +1 -1
- package/dist/pick-list/style.css +4 -3
- package/dist/popover/index.js +1 -1
- package/dist/popover/style.css +4 -3
- package/dist/progress-bar/style.css +4 -3
- package/dist/progress-spinner/index.js +1 -1
- package/dist/progress-spinner/style.css +4 -3
- package/dist/qr-code/index.js +3 -3
- package/dist/qr-code/style.css +4 -3
- package/dist/radio/index.js +1 -1
- package/dist/radio/style.css +4 -3
- package/dist/rating/index.js +2 -2
- package/dist/rating/style.css +4 -3
- package/dist/result/index.js +1 -1
- package/dist/result/style.css +4 -3
- package/dist/scroll-top/index.js +2 -2
- package/dist/scroll-top/style.css +4 -3
- package/dist/scrollbar/style.css +4 -3
- package/dist/segmented/index.js +1 -1
- package/dist/segmented/style.css +4 -3
- package/dist/select/index.js +1 -1
- package/dist/select/style.css +4 -3
- package/dist/select-button/index.js +1 -1
- package/dist/select-button/style.css +4 -3
- package/dist/sidebar/index.js +1 -1
- package/dist/sidebar/style.css +4 -3
- package/dist/skeleton/style.css +4 -3
- package/dist/slider/index.js +2 -2
- package/dist/slider/style.css +4 -3
- package/dist/space/index.js +1 -1
- package/dist/space/style.css +4 -3
- package/dist/speed-dial/index.js +3 -3
- package/dist/speed-dial/style.css +4 -3
- package/dist/split-button/index.js +3 -3
- package/dist/split-button/style.css +4 -3
- package/dist/splitter/index.js +1 -1
- package/dist/splitter/style.css +4 -3
- package/dist/statistic/style.css +4 -3
- package/dist/status/index.js +1 -1
- package/dist/status/style.css +4 -3
- package/dist/stepper/style.css +4 -3
- package/dist/styles.css +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/switch/style.css +4 -3
- package/dist/table/index.js +975 -714
- package/dist/table/style.css +102 -33
- package/dist/tabs/index.js +1 -1
- package/dist/tabs/style.css +4 -3
- package/dist/tag/index.js +2 -2
- package/dist/tag/style.css +4 -3
- package/dist/terminal/index.js +1 -1
- package/dist/terminal/style.css +4 -3
- package/dist/textarea/index.js +1 -1
- package/dist/textarea/style.css +4 -3
- package/dist/theme/styles.css +4 -3
- package/dist/tiered-menu/index.js +3 -3
- package/dist/tiered-menu/style.css +4 -3
- package/dist/time-picker/index.js +5 -1
- package/dist/time-picker/style.css +246 -45
- package/dist/timeline/style.css +4 -3
- package/dist/toast/index.js +3 -3
- package/dist/toast/style.css +4 -3
- package/dist/toggle-button/index.js +1 -1
- package/dist/toggle-button/style.css +4 -3
- package/dist/toolbar/style.css +4 -3
- package/dist/tooltip/index.js +1 -1
- package/dist/tooltip/style.css +4 -3
- package/dist/tour/index.js +3 -3
- package/dist/tour/style.css +4 -3
- package/dist/tree/index.js +2 -2
- package/dist/tree/style.css +4 -3
- package/dist/tree-select/index.js +4 -4
- package/dist/tree-select/style.css +4 -3
- package/dist/typography/index.js +2 -2
- package/dist/typography/style.css +4 -3
- package/dist/{useMotionTransition-DqL_SEML.js → useMotionTransition-DohkfWRB.js} +1 -1
- package/dist/virtual-scroller/style.css +4 -3
- package/dist/watermark/style.css +4 -3
- package/package.json +2 -1
- package/dist/DatePicker-CsMGzCqY.js +0 -630
- package/dist/Pagination-CnGOpp0m.js +0 -171
package/dist/table/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
2
|
import { t } from "../useControllable-elmWaz23.js";
|
|
3
3
|
import { t as n } from "../Icon-CmHjx7W8.js";
|
|
4
4
|
import { t as r } from "../Scrollbar-DTeJ8P5b.js";
|
|
5
|
-
import { t as i } from "../Button-
|
|
6
|
-
import { t as a } from "../Checkbox-
|
|
7
|
-
import { t as o } from "../Loading-
|
|
8
|
-
import { t as s } from "../Pagination-
|
|
9
|
-
import { t as c } from "../Input-
|
|
10
|
-
import { t as l } from "../Popover-
|
|
11
|
-
import { t as u } from "../Tooltip-
|
|
12
|
-
import { t as d } from "../Radio-
|
|
13
|
-
import { o as f } from "../config-
|
|
14
|
-
import { n as p } from "../locale-
|
|
5
|
+
import { t as i } from "../Button-fKkfCnYv.js";
|
|
6
|
+
import { t as a } from "../Checkbox-BXC2mLNd.js";
|
|
7
|
+
import { t as o } from "../Loading-DE9Iaiao.js";
|
|
8
|
+
import { t as s } from "../Pagination-DpNOb0CS.js";
|
|
9
|
+
import { t as c } from "../Input-D2bee2LU.js";
|
|
10
|
+
import { t as l } from "../Popover-Bnz7KNZq.js";
|
|
11
|
+
import { t as u } from "../Tooltip-5zRVTTVs.js";
|
|
12
|
+
import { t as d } from "../Radio-BbznzRbr.js";
|
|
13
|
+
import { o as f } from "../config-Cd20zAyW.js";
|
|
14
|
+
import { n as p } from "../locale-BcxMPufl.js";
|
|
15
15
|
import "./style.js";
|
|
16
|
-
import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createSlots as b, createTextVNode as x, createVNode as S, defineComponent as C, guardReactiveProps as w, mergeProps as T, nextTick as E, normalizeClass as D, normalizeProps as O, normalizeStyle as
|
|
16
|
+
import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createSlots as b, createTextVNode as x, createVNode as S, defineComponent as C, guardReactiveProps as w, mergeProps as T, nextTick as E, normalizeClass as D, normalizeProps as O, normalizeStyle as ee, onBeforeUnmount as te, onMounted as ne, openBlock as k, provide as A, ref as j, renderList as M, renderSlot as N, toDisplayString as P, toRefs as re, unref as F, useAttrs as ie, useSlots as ae, watch as I, withCtx as L, withKeys as oe, withModifiers as R } from "vue";
|
|
17
17
|
//#region src/components/Table/columns/keys.ts
|
|
18
18
|
var z = {
|
|
19
19
|
expand: "__m_expand",
|
|
@@ -109,44 +109,44 @@ function fe(e, t) {
|
|
|
109
109
|
})), ...n(i ?? [])], ...a.map(n)];
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function B(e, t, n) {
|
|
113
113
|
return typeof e == "string" ? e : e(t, n);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function pe(e, t, n, r) {
|
|
116
116
|
let i = t.find((t) => t.value === e.value), a = e.width ?? i?.width ?? (n ? 100 : null);
|
|
117
117
|
if (a && r) return `width: ${a}px; min-width: ${a}px;`;
|
|
118
118
|
let o = e.minWidth ?? i?.minWidth;
|
|
119
119
|
if (o && r) return `min-width: ${o}px;`;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function me(e, t, n, r) {
|
|
122
122
|
if (!r) return;
|
|
123
123
|
let i = n.find((t) => t.value === e);
|
|
124
124
|
if (i) return `${i.fixed === "right" ? "right" : "left"}: ${i.distance}px;z-index: ${t === "th" ? 3 : 1};position: sticky;`;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function he(e) {
|
|
127
127
|
if (e) {
|
|
128
128
|
if (e === "start" || e === "left") return "start";
|
|
129
129
|
if (e === "end" || e === "right") return "end";
|
|
130
130
|
if (e === "center") return "center";
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function ge(e) {
|
|
134
134
|
if (e === !0 || e === "left") return "left";
|
|
135
135
|
if (e === "right") return "right";
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function _e(e) {
|
|
138
138
|
return String(e.label ?? e.value ?? "");
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
let t = e.children?.length ? e.children.map(
|
|
140
|
+
function ve(e) {
|
|
141
|
+
let t = e.children?.length ? e.children.map(ve) : void 0;
|
|
142
142
|
return {
|
|
143
143
|
text: e.label,
|
|
144
144
|
value: e.key,
|
|
145
145
|
sortable: e.sortable,
|
|
146
|
-
fixed:
|
|
146
|
+
fixed: ge(e.fixed),
|
|
147
147
|
width: e.width,
|
|
148
148
|
minWidth: e.minWidth ?? (e.width ? void 0 : 80),
|
|
149
|
-
align:
|
|
149
|
+
align: he(e.align),
|
|
150
150
|
render: e.render,
|
|
151
151
|
showOverflowTooltip: e.showOverflowTooltip,
|
|
152
152
|
resizable: e.resizable,
|
|
@@ -155,20 +155,20 @@ function ye(e) {
|
|
|
155
155
|
children: t
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function ye(e) {
|
|
159
159
|
let t = [];
|
|
160
|
-
for (let n of e) n.children?.length ? t.push(...
|
|
160
|
+
for (let n of e) n.children?.length ? t.push(...ye(n.children)) : t.push(n);
|
|
161
161
|
return t;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
return e.children?.length ? e.children.reduce((e, t) => e +
|
|
163
|
+
function be(e) {
|
|
164
|
+
return e.children?.length ? e.children.reduce((e, t) => e + be(t), 0) : 1;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function xe(e) {
|
|
167
167
|
let t = 1;
|
|
168
|
-
for (let n of e) n.children?.length && (t = Math.max(t, 1 +
|
|
168
|
+
for (let n of e) n.children?.length && (t = Math.max(t, 1 + xe(n.children)));
|
|
169
169
|
return t;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Se(e, t) {
|
|
172
172
|
if (!t?.length) return e;
|
|
173
173
|
let n = new Set(t), r = (e) => {
|
|
174
174
|
let t = [];
|
|
@@ -183,9 +183,9 @@ function Ce(e, t) {
|
|
|
183
183
|
};
|
|
184
184
|
return r(e);
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function Ce(e, t) {
|
|
187
187
|
if (!t?.length) return e;
|
|
188
|
-
let n =
|
|
188
|
+
let n = ye(e), r = new Map(n.map((e) => [e.key, e])), i = [], a = /* @__PURE__ */ new Set();
|
|
189
189
|
for (let e of t) {
|
|
190
190
|
let t = r.get(e);
|
|
191
191
|
t && !a.has(e) && (i.push(t), a.add(e));
|
|
@@ -193,7 +193,7 @@ function we(e, t) {
|
|
|
193
193
|
for (let e of n) a.has(e.key) || i.push(e);
|
|
194
194
|
return i;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function we(e, t) {
|
|
197
197
|
if (!t) return e;
|
|
198
198
|
let n = (e) => e.map((e) => {
|
|
199
199
|
if (e.children?.length) return {
|
|
@@ -208,18 +208,18 @@ function Te(e, t) {
|
|
|
208
208
|
});
|
|
209
209
|
return n(e);
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
return
|
|
211
|
+
function Te(e, t = {}) {
|
|
212
|
+
return we(Ce(Se(e, t.hiddenColumns), t.columnOrder), t.columnWidths);
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
return
|
|
214
|
+
function Ee(e) {
|
|
215
|
+
return ye(e).map(ve);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
let t = e.map(
|
|
217
|
+
function De(e) {
|
|
218
|
+
let t = e.map(ve);
|
|
219
219
|
if (!t.some((e) => e.children?.length)) return [t];
|
|
220
|
-
let n =
|
|
220
|
+
let n = xe(t), r = Array.from({ length: n }, () => []), i = (e, t) => {
|
|
221
221
|
for (let a of e) {
|
|
222
|
-
let e =
|
|
222
|
+
let e = be(a);
|
|
223
223
|
a.children?.length ? (r[t].push({
|
|
224
224
|
...a,
|
|
225
225
|
colspan: e,
|
|
@@ -236,15 +236,15 @@ function Oe(e) {
|
|
|
236
236
|
};
|
|
237
237
|
return i(t, 0), r;
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function Oe(e) {
|
|
240
240
|
return e ?? "asc";
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function ke(e) {
|
|
243
243
|
return e ?? "";
|
|
244
244
|
}
|
|
245
245
|
//#endregion
|
|
246
246
|
//#region src/components/Table/core/utils.ts
|
|
247
|
-
function
|
|
247
|
+
function V(e, t) {
|
|
248
248
|
if (e.includes(".")) {
|
|
249
249
|
let n = e.split("."), r = t;
|
|
250
250
|
for (let e of n) if (r && typeof r == "object") r = r[e];
|
|
@@ -253,24 +253,24 @@ function B(e, t) {
|
|
|
253
253
|
}
|
|
254
254
|
return t[e] ?? "";
|
|
255
255
|
}
|
|
256
|
-
function
|
|
257
|
-
let n =
|
|
256
|
+
function Ae(e, t) {
|
|
257
|
+
let n = V(e, t);
|
|
258
258
|
return Array.isArray(n) ? n.join(",") : String(n ?? "");
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function H(e, t, n = "id") {
|
|
261
261
|
let r = e[n];
|
|
262
262
|
return typeof r == "string" || typeof r == "number" ? r : t;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function U(e) {
|
|
265
265
|
let t = { ...e };
|
|
266
|
-
return delete t[z.index], delete t[z.checkbox], delete t.
|
|
266
|
+
return delete t[z.index], delete t[z.checkbox], delete t[z.radio], delete t[z.expand], t;
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function W(e, t, n = "id") {
|
|
269
269
|
if (e === t) return !0;
|
|
270
|
-
let r = e[n], i = t[n]
|
|
271
|
-
return
|
|
270
|
+
let r = e[n], i = t[n];
|
|
271
|
+
return (typeof r == "string" || typeof r == "number") && (typeof i == "string" || typeof i == "number") && r === i;
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function je(e, t = "id") {
|
|
274
274
|
let n = /* @__PURE__ */ new Set();
|
|
275
275
|
for (let r of e) {
|
|
276
276
|
let e = r[t];
|
|
@@ -278,13 +278,13 @@ function Me(e, t = "id") {
|
|
|
278
278
|
}
|
|
279
279
|
return n;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function Me(e, t, n, r = "id") {
|
|
282
282
|
let i = e[r];
|
|
283
|
-
return typeof i == "string" || typeof i == "number" ? n.has(i) : t.some((t) =>
|
|
283
|
+
return typeof i == "string" || typeof i == "number" ? n.has(i) : t.some((t) => W(t, e, r));
|
|
284
284
|
}
|
|
285
285
|
//#endregion
|
|
286
286
|
//#region src/components/Table/core/tree.ts
|
|
287
|
-
function
|
|
287
|
+
function Ne(e) {
|
|
288
288
|
return {
|
|
289
289
|
childrenField: e?.childrenField ?? "children",
|
|
290
290
|
indent: e?.indent ?? 16,
|
|
@@ -303,7 +303,7 @@ function Pe(e) {
|
|
|
303
303
|
toggleMethod: e?.toggleMethod
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function Pe(e, t, n, r) {
|
|
307
307
|
let i = /* @__PURE__ */ new Map(), a = [];
|
|
308
308
|
for (let n of e) {
|
|
309
309
|
let e = n[t];
|
|
@@ -335,34 +335,37 @@ function Fe(e, t, n, r) {
|
|
|
335
335
|
};
|
|
336
336
|
return o(a), a;
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function G(e, t) {
|
|
339
339
|
let n = e[t];
|
|
340
340
|
return Array.isArray(n) ? n : [];
|
|
341
341
|
}
|
|
342
|
-
function
|
|
343
|
-
return
|
|
342
|
+
function Fe(e, t, n, r) {
|
|
343
|
+
return G(e, t).length > 0 ? !0 : n ? !!e[r] : !1;
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function Ie(e, t, n, r, i) {
|
|
346
346
|
let a = [], o = (e, s) => {
|
|
347
347
|
e.forEach((e, c) => {
|
|
348
|
-
let l =
|
|
349
|
-
|
|
348
|
+
let l = H(e, s + c, t);
|
|
349
|
+
Fe(e, n, r, i) && (a.push(l), o(G(e, n), 0));
|
|
350
350
|
});
|
|
351
351
|
};
|
|
352
352
|
return o(e, 0), a;
|
|
353
353
|
}
|
|
354
|
-
function
|
|
354
|
+
function Le(e, t, n, r, i, a, o) {
|
|
355
355
|
let s = [], c = /* @__PURE__ */ new Map(), l = new Set(t), u = (e, t, d) => {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
356
|
+
let f = e.length;
|
|
357
|
+
e.forEach((e, p) => {
|
|
358
|
+
let m = H(e, p, n), h = Fe(e, r, i, a);
|
|
359
|
+
if (c.set(m, {
|
|
359
360
|
depth: t,
|
|
360
|
-
hasChildren:
|
|
361
|
-
loading: o.has(
|
|
362
|
-
parentKey: d
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
361
|
+
hasChildren: h,
|
|
362
|
+
loading: o.has(m),
|
|
363
|
+
parentKey: d,
|
|
364
|
+
posInSet: p + 1,
|
|
365
|
+
setSize: f
|
|
366
|
+
}), s.push(e), h && l.has(m)) {
|
|
367
|
+
let n = G(e, r);
|
|
368
|
+
n.length && u(n, t + 1, m);
|
|
366
369
|
}
|
|
367
370
|
});
|
|
368
371
|
};
|
|
@@ -371,16 +374,16 @@ function Re(e, t, n, r, i, a, o) {
|
|
|
371
374
|
meta: c
|
|
372
375
|
};
|
|
373
376
|
}
|
|
374
|
-
function
|
|
377
|
+
function Re(e, t, n) {
|
|
375
378
|
let r = [];
|
|
376
379
|
for (let i of e) {
|
|
377
|
-
let e =
|
|
380
|
+
let e = G(i, t);
|
|
378
381
|
if (n(i)) {
|
|
379
382
|
r.push(i);
|
|
380
383
|
continue;
|
|
381
384
|
}
|
|
382
385
|
if (!e.length) continue;
|
|
383
|
-
let a =
|
|
386
|
+
let a = Re(e, t, n);
|
|
384
387
|
a.length && r.push({
|
|
385
388
|
...i,
|
|
386
389
|
[t]: a
|
|
@@ -388,105 +391,105 @@ function ze(e, t, n) {
|
|
|
388
391
|
}
|
|
389
392
|
return r;
|
|
390
393
|
}
|
|
391
|
-
function
|
|
394
|
+
function ze(e, t, n, r) {
|
|
392
395
|
let i = /* @__PURE__ */ new Set();
|
|
393
396
|
for (let [e, a] of r) a.parentKey === n && e !== t && i.add(e);
|
|
394
397
|
return [...e.filter((e) => !i.has(e) && e !== t), t];
|
|
395
398
|
}
|
|
396
399
|
//#endregion
|
|
397
400
|
//#region src/components/Table/core/treeSelection.ts
|
|
398
|
-
function
|
|
401
|
+
function K(e, t, n, r = 0, i = null) {
|
|
399
402
|
for (let a of e) {
|
|
400
403
|
n(a, r, i);
|
|
401
|
-
let e =
|
|
402
|
-
e.length &&
|
|
404
|
+
let e = G(a, t);
|
|
405
|
+
e.length && K(e, t, n, r + 1, a);
|
|
403
406
|
}
|
|
404
407
|
}
|
|
405
|
-
function
|
|
408
|
+
function Be(e, t) {
|
|
406
409
|
let n = [];
|
|
407
|
-
return
|
|
410
|
+
return K([e], t, (e) => {
|
|
408
411
|
n.push(e);
|
|
409
412
|
}), n;
|
|
410
413
|
}
|
|
411
|
-
function
|
|
414
|
+
function Ve(e, t) {
|
|
412
415
|
return !t || t(e);
|
|
413
416
|
}
|
|
414
|
-
function
|
|
415
|
-
let { selected: t, row: n, rowKey: r, childrenField: i, checkStrictly: a, checkMethod: o } = e, s =
|
|
417
|
+
function He(e) {
|
|
418
|
+
let { selected: t, row: n, rowKey: r, childrenField: i, checkStrictly: a, checkMethod: o } = e, s = U(n), c = (a ? [s] : Be(s, i)).filter((e) => Ve(e, o)).map(U);
|
|
416
419
|
if (!c.length) return {
|
|
417
420
|
next: t,
|
|
418
421
|
selected: !1,
|
|
419
422
|
affected: []
|
|
420
423
|
};
|
|
421
|
-
let l = !t.some((e) =>
|
|
422
|
-
if (l) for (let e of c) u.some((t) =>
|
|
423
|
-
else u = u.filter((e) => !c.some((t) =>
|
|
424
|
+
let l = !t.some((e) => W(e, s, r)), u = [...t];
|
|
425
|
+
if (l) for (let e of c) u.some((t) => W(t, e, r)) || u.push(e);
|
|
426
|
+
else u = u.filter((e) => !c.some((t) => W(e, t, r)));
|
|
424
427
|
return {
|
|
425
428
|
next: u,
|
|
426
429
|
selected: l,
|
|
427
430
|
affected: c
|
|
428
431
|
};
|
|
429
432
|
}
|
|
430
|
-
function
|
|
433
|
+
function Ue(e, t, n, r, i) {
|
|
431
434
|
let a = /* @__PURE__ */ new Set();
|
|
432
435
|
for (let e of t) {
|
|
433
436
|
let t = e[n];
|
|
434
437
|
(typeof t == "string" || typeof t == "number") && a.add(t);
|
|
435
438
|
}
|
|
436
439
|
let o = /* @__PURE__ */ new Set(), s = [];
|
|
437
|
-
|
|
438
|
-
let t =
|
|
440
|
+
K(e, r, (e) => {
|
|
441
|
+
let t = G(e, r);
|
|
439
442
|
t.length && s.push({
|
|
440
443
|
row: e,
|
|
441
444
|
children: t
|
|
442
445
|
});
|
|
443
446
|
}), s.reverse();
|
|
444
447
|
for (let { row: e, children: t } of s) {
|
|
445
|
-
let r =
|
|
448
|
+
let r = H(e, 0, n), s = 0, c = 0, l = 0;
|
|
446
449
|
for (let e of t) {
|
|
447
|
-
let t =
|
|
448
|
-
|
|
450
|
+
let t = H(e, 0, n);
|
|
451
|
+
Ve(e, i) && (l += 1), a.has(t) ? s += 1 : o.has(t) && (c += 1);
|
|
449
452
|
}
|
|
450
453
|
let u = l > 0 && s >= l;
|
|
451
454
|
u ? ((typeof r == "string" || typeof r == "number") && a.add(r), o.delete(r)) : !u && (s > 0 || c > 0) ? (o.add(r), a.delete(r)) : o.delete(r);
|
|
452
455
|
}
|
|
453
456
|
return o;
|
|
454
457
|
}
|
|
455
|
-
function
|
|
456
|
-
let a =
|
|
458
|
+
function We(e, t, n, r, i) {
|
|
459
|
+
let a = Ue(e, t, n, r, i), o = /* @__PURE__ */ new Set();
|
|
457
460
|
for (let e of t) {
|
|
458
461
|
let t = e[n];
|
|
459
462
|
(typeof t == "string" || typeof t == "number") && o.add(t);
|
|
460
463
|
}
|
|
461
464
|
let s = [];
|
|
462
|
-
|
|
463
|
-
|
|
465
|
+
K(e, r, (e) => {
|
|
466
|
+
G(e, r).length && s.push(e);
|
|
464
467
|
}), s.reverse();
|
|
465
468
|
let c = t.filter((e) => {
|
|
466
469
|
let t = e[n];
|
|
467
470
|
return typeof t != "string" && typeof t != "number" || !a.has(t);
|
|
468
471
|
});
|
|
469
472
|
for (let e of s) {
|
|
470
|
-
let t =
|
|
473
|
+
let t = H(e, 0, n);
|
|
471
474
|
if (a.has(t)) continue;
|
|
472
|
-
let s =
|
|
475
|
+
let s = G(e, r).filter((e) => Ve(e, i));
|
|
473
476
|
if (s.length) {
|
|
474
477
|
if (s.every((e) => {
|
|
475
|
-
let t =
|
|
476
|
-
return o.has(t) || c.some((t) =>
|
|
478
|
+
let t = H(e, 0, n);
|
|
479
|
+
return o.has(t) || c.some((t) => W(t, e, n));
|
|
477
480
|
})) {
|
|
478
|
-
let r =
|
|
479
|
-
c.some((e) =>
|
|
480
|
-
} else c = c.filter((t) => !
|
|
481
|
+
let r = U(e);
|
|
482
|
+
c.some((e) => W(e, r, n)) || (c.push(r), o.add(t));
|
|
483
|
+
} else c = c.filter((t) => !W(t, e, n)), o.delete(t);
|
|
481
484
|
}
|
|
482
485
|
}
|
|
483
486
|
return c;
|
|
484
487
|
}
|
|
485
488
|
//#endregion
|
|
486
489
|
//#region src/components/Table/columns/useFixedColumn.ts
|
|
487
|
-
var
|
|
488
|
-
function
|
|
489
|
-
let t = h(() => e.value.filter(
|
|
490
|
+
var Ge = (e) => e.fixed === "right", Ke = (e) => !!e.fixed;
|
|
491
|
+
function qe(e) {
|
|
492
|
+
let t = h(() => e.value.filter(Ke)), n = h(() => e.value.filter((e) => Ke(e) && !Ge(e))), r = h(() => e.value.filter(Ge));
|
|
490
493
|
return {
|
|
491
494
|
fixedHeaders: t,
|
|
492
495
|
lastFixedColumn: h(() => n.value.length ? n.value[n.value.length - 1].value : ""),
|
|
@@ -508,7 +511,7 @@ function Ye(e) {
|
|
|
508
511
|
})
|
|
509
512
|
};
|
|
510
513
|
}
|
|
511
|
-
function
|
|
514
|
+
function Je(e) {
|
|
512
515
|
let { showIndexSymbol: t, checkboxColumnWidth: n, expandColumnWidth: r, fixedCheckbox: i, fixedExpand: a, fixedIndex: o, headers: s, ifHasExpandSlot: c, indexColumnWidth: l, selectionColumn: u, isServerSideMode: d, mustSort: f, serverOptionsComputed: p, showIndex: m, sortBy: g, sortType: _, multiSort: v, sortMode: y, updateServerOptionsSort: b, emits: x } = e, S = h(() => s.value.some((e) => e.fixed)), C = h(() => S.value ? s.value.filter((e) => e.fixed && e.fixed !== "right") : []), w = h(() => S.value ? s.value.filter((e) => e.fixed === "right") : []), T = h(() => s.value.filter((e) => !e.fixed)), E = (e, t) => Array.isArray(e) && Array.isArray(t) ? {
|
|
513
516
|
sortBy: e,
|
|
514
517
|
sortDesc: t.map((e) => e === "desc")
|
|
@@ -524,7 +527,7 @@ function Xe(e) {
|
|
|
524
527
|
set: (e) => {
|
|
525
528
|
D.value = e;
|
|
526
529
|
}
|
|
527
|
-
}),
|
|
530
|
+
}), ee = h(() => {
|
|
528
531
|
let e = [
|
|
529
532
|
...C.value,
|
|
530
533
|
...T.value,
|
|
@@ -573,8 +576,8 @@ function Xe(e) {
|
|
|
573
576
|
});
|
|
574
577
|
return {
|
|
575
578
|
clientSortOptions: O,
|
|
576
|
-
headerColumns: h(() =>
|
|
577
|
-
headersForRender:
|
|
579
|
+
headerColumns: h(() => ee.value.map((e) => e.value)),
|
|
580
|
+
headersForRender: ee,
|
|
578
581
|
updateSortField: (e, t) => {
|
|
579
582
|
let n = null;
|
|
580
583
|
if (n = t === "none" ? "asc" : t === "asc" ? "desc" : f.value ? "asc" : null, d.value && b(e, n), y.value !== "emit") {
|
|
@@ -591,7 +594,7 @@ function Xe(e) {
|
|
|
591
594
|
sortDesc: n === "desc"
|
|
592
595
|
};
|
|
593
596
|
}
|
|
594
|
-
x("sort", {
|
|
597
|
+
x("sort-change", {
|
|
595
598
|
sortField: e,
|
|
596
599
|
sortOrder: n
|
|
597
600
|
});
|
|
@@ -601,7 +604,7 @@ function Xe(e) {
|
|
|
601
604
|
...p.value,
|
|
602
605
|
sortBy: null,
|
|
603
606
|
sortType: null
|
|
604
|
-
}), x("sort", {
|
|
607
|
+
}), x("sort-change", {
|
|
605
608
|
sortField: void 0,
|
|
606
609
|
sortOrder: null
|
|
607
610
|
});
|
|
@@ -612,10 +615,10 @@ function Xe(e) {
|
|
|
612
615
|
}
|
|
613
616
|
//#endregion
|
|
614
617
|
//#region src/components/Table/state/useClickRow.ts
|
|
615
|
-
function
|
|
618
|
+
function Ye(e) {
|
|
616
619
|
let t = (t, n, r, i) => {
|
|
617
620
|
e(t, {
|
|
618
|
-
row:
|
|
621
|
+
row: U(n),
|
|
619
622
|
index: r
|
|
620
623
|
}, i);
|
|
621
624
|
};
|
|
@@ -630,7 +633,7 @@ function Ze(e) {
|
|
|
630
633
|
}
|
|
631
634
|
//#endregion
|
|
632
635
|
//#region src/components/Table/state/useColumnResize.ts
|
|
633
|
-
function
|
|
636
|
+
function Xe(e, t, n) {
|
|
634
637
|
let r = null, i = null, a = 0;
|
|
635
638
|
function o() {
|
|
636
639
|
if (!i) return;
|
|
@@ -663,22 +666,22 @@ function Qe(e, t, n) {
|
|
|
663
666
|
startWidth: a
|
|
664
667
|
}, i = null, window.addEventListener("mousemove", s), window.addEventListener("mouseup", c);
|
|
665
668
|
}
|
|
666
|
-
return
|
|
669
|
+
return te(() => {
|
|
667
670
|
a && cancelAnimationFrame(a), window.removeEventListener("mousemove", s), window.removeEventListener("mouseup", c);
|
|
668
671
|
}), { onResizeStart: l };
|
|
669
672
|
}
|
|
670
673
|
//#endregion
|
|
671
674
|
//#region src/components/Table/core/tableQuery.ts
|
|
672
|
-
function
|
|
675
|
+
function Ze(e, t, n) {
|
|
673
676
|
if (typeof e == "number" && typeof t == "number") return e < t ? n ? 1 : -1 : e > t ? n ? -1 : 1 : 0;
|
|
674
677
|
let r = String(e ?? ""), i = String(t ?? "");
|
|
675
678
|
return r < i ? n ? 1 : -1 : r > i ? n ? -1 : 1 : 0;
|
|
676
679
|
}
|
|
677
|
-
function
|
|
680
|
+
function Qe(e, t) {
|
|
678
681
|
return typeof t == "function" ? t(e) : Array.isArray(t) ? t.length === 0 || t.some((t) => t === e || String(t) === String(e ?? "")) : typeof t == "string" ? String(e ?? "").toLowerCase().includes(t.toLowerCase()) : e === t || String(e ?? "") === String(t);
|
|
679
682
|
}
|
|
680
|
-
function
|
|
681
|
-
let { field: n, comparison: r, criteria: i } = t, a =
|
|
683
|
+
function $e(e, t) {
|
|
684
|
+
let { field: n, comparison: r, criteria: i } = t, a = V(String(n), e);
|
|
682
685
|
if (typeof r == "function") return r(a, i);
|
|
683
686
|
switch (r) {
|
|
684
687
|
case "=": return a === i;
|
|
@@ -695,32 +698,32 @@ function tt(e, t) {
|
|
|
695
698
|
default: return a === i;
|
|
696
699
|
}
|
|
697
700
|
}
|
|
698
|
-
function
|
|
701
|
+
function et(e, t, n) {
|
|
699
702
|
let r = [...e];
|
|
700
|
-
if (t) for (let [e, n] of Object.entries(t)) n != null && n !== "" && (r = r.filter((t) =>
|
|
701
|
-
if (n) for (let e of n) r = r.filter((t) =>
|
|
703
|
+
if (t) for (let [e, n] of Object.entries(t)) n != null && n !== "" && (r = r.filter((t) => Qe(V(e, t), n)));
|
|
704
|
+
if (n) for (let e of n) r = r.filter((t) => $e(t, e));
|
|
702
705
|
return r;
|
|
703
706
|
}
|
|
704
|
-
function
|
|
705
|
-
return typeof t == "string" && t !== "" ? String(
|
|
707
|
+
function tt(e, t) {
|
|
708
|
+
return typeof t == "string" && t !== "" ? String(V(t, e)) : Array.isArray(t) ? t.map((t) => String(V(t, e))).join("") : Object.values(e).join(" ");
|
|
706
709
|
}
|
|
707
|
-
function
|
|
710
|
+
function nt(e, t, n = "") {
|
|
708
711
|
if (!t) return e;
|
|
709
712
|
let r = t.toLowerCase();
|
|
710
|
-
return e.filter((e) =>
|
|
713
|
+
return e.filter((e) => tt(e, n).toLowerCase().includes(r));
|
|
711
714
|
}
|
|
712
|
-
function
|
|
715
|
+
function rt(e, t, n, r) {
|
|
713
716
|
let i = e[r], a = t[r];
|
|
714
|
-
return (r === 0 ? n :
|
|
715
|
-
for (let i = 0; i < r; i += 1) if (
|
|
716
|
-
return
|
|
717
|
+
return (r === 0 ? n : rt(e, t, n, r - 1)).sort((t, n) => {
|
|
718
|
+
for (let i = 0; i < r; i += 1) if (V(e[i], t) !== V(e[i], n)) return 0;
|
|
719
|
+
return Ze(V(i, t), V(i, n), a);
|
|
717
720
|
});
|
|
718
721
|
}
|
|
719
|
-
function
|
|
722
|
+
function it(e, t, n, r = !1) {
|
|
720
723
|
let i = [...e];
|
|
721
|
-
return r && Array.isArray(t) && Array.isArray(n) ? t.length === 0 ? i :
|
|
724
|
+
return r && Array.isArray(t) && Array.isArray(n) ? t.length === 0 ? i : rt(t, n, i, t.length - 1) : i.sort((e, r) => Ze(V(t, e), V(t, r), n));
|
|
722
725
|
}
|
|
723
|
-
function
|
|
726
|
+
function at(e, t) {
|
|
724
727
|
return e.indexOf(t) === -1 ? {
|
|
725
728
|
next: [...e, t],
|
|
726
729
|
expanded: !0
|
|
@@ -729,10 +732,10 @@ function st(e, t) {
|
|
|
729
732
|
expanded: !1
|
|
730
733
|
};
|
|
731
734
|
}
|
|
732
|
-
function
|
|
733
|
-
let r =
|
|
734
|
-
return e.some((e) =>
|
|
735
|
-
next: e.filter((e) => !
|
|
735
|
+
function ot(e, t, n = "id") {
|
|
736
|
+
let r = U(t);
|
|
737
|
+
return e.some((e) => W(e, r, n)) ? {
|
|
738
|
+
next: e.filter((e) => !W(e, r, n)),
|
|
736
739
|
selected: !1,
|
|
737
740
|
row: r
|
|
738
741
|
} : {
|
|
@@ -743,7 +746,7 @@ function ct(e, t, n = "id") {
|
|
|
743
746
|
}
|
|
744
747
|
//#endregion
|
|
745
748
|
//#region src/components/Table/state/useExpandableRow.ts
|
|
746
|
-
function
|
|
749
|
+
function st(e, t, n, r, i, a, o) {
|
|
747
750
|
let s = j([]), c = j(!1), l = h(() => e.value ?? s.value), u = h(() => ({
|
|
748
751
|
expandAll: !!i.value?.expandAll,
|
|
749
752
|
expandRowKeys: i.value?.expandRowKeys,
|
|
@@ -752,8 +755,8 @@ function lt(e, t, n, r, i, a, o) {
|
|
|
752
755
|
toggleMethod: i.value?.toggleMethod
|
|
753
756
|
}));
|
|
754
757
|
function d(e, t, n) {
|
|
755
|
-
s.value = e, r("update:expandedRowKeys", e), t != null && n != null && r("expand", {
|
|
756
|
-
row:
|
|
758
|
+
s.value = e, r("update:expandedRowKeys", e), t != null && n != null && r("expand-change", {
|
|
759
|
+
row: U(t),
|
|
757
760
|
expanded: n
|
|
758
761
|
});
|
|
759
762
|
}
|
|
@@ -769,7 +772,7 @@ function lt(e, t, n, r, i, a, o) {
|
|
|
769
772
|
return;
|
|
770
773
|
}
|
|
771
774
|
if (u.value.expandAll) {
|
|
772
|
-
d(o.value.map((e, n) =>
|
|
775
|
+
d(o.value.map((e, n) => H(e, n, t.value))), c.value = !0;
|
|
773
776
|
return;
|
|
774
777
|
}
|
|
775
778
|
u.value.expandRowKeys?.length && (d([...u.value.expandRowKeys]), c.value = !0);
|
|
@@ -777,24 +780,24 @@ function lt(e, t, n, r, i, a, o) {
|
|
|
777
780
|
}, { immediate: !0 }), I(i, () => {
|
|
778
781
|
c.value = !1;
|
|
779
782
|
});
|
|
780
|
-
let f = (e, r) =>
|
|
783
|
+
let f = (e, r) => H(e, n.value + r, t.value), p = (e, t) => l.value.includes(f(e, t));
|
|
781
784
|
function m(e) {
|
|
782
|
-
return l.value.includes(
|
|
785
|
+
return l.value.includes(H(e, 0, t.value));
|
|
783
786
|
}
|
|
784
787
|
function g() {
|
|
785
788
|
let e = new Set(l.value);
|
|
786
|
-
return o.value.filter((n, r) => e.has(
|
|
789
|
+
return o.value.filter((n, r) => e.has(H(n, r, t.value))).map(U);
|
|
787
790
|
}
|
|
788
791
|
function _(e, n) {
|
|
789
792
|
if (!a.value) return;
|
|
790
793
|
let i = Array.isArray(e) ? e : [e], o = [...l.value];
|
|
791
794
|
for (let e of i) {
|
|
792
|
-
let i =
|
|
795
|
+
let i = H(e, 0, t.value), a = o.includes(i);
|
|
793
796
|
a !== n && (u.value.toggleMethod && u.value.toggleMethod({
|
|
794
|
-
row:
|
|
797
|
+
row: U(e),
|
|
795
798
|
expanded: n
|
|
796
|
-
}) === !1 || (n ? u.value.accordion ? o = [i] : a || o.push(i) : o = o.filter((e) => e !== i), r("expand", {
|
|
797
|
-
row:
|
|
799
|
+
}) === !1 || (n ? u.value.accordion ? o = [i] : a || o.push(i) : o = o.filter((e) => e !== i), r("expand-change", {
|
|
800
|
+
row: U(e),
|
|
798
801
|
expanded: n
|
|
799
802
|
})));
|
|
800
803
|
}
|
|
@@ -806,7 +809,7 @@ function lt(e, t, n, r, i, a, o) {
|
|
|
806
809
|
d([]);
|
|
807
810
|
return;
|
|
808
811
|
}
|
|
809
|
-
d(o.value.map((e, n) =>
|
|
812
|
+
d(o.value.map((e, n) => H(e, n, t.value)));
|
|
810
813
|
}
|
|
811
814
|
}
|
|
812
815
|
function y() {
|
|
@@ -829,21 +832,18 @@ function lt(e, t, n, r, i, a, o) {
|
|
|
829
832
|
if (n?.stopPropagation(), !a.value || u.value.trigger === "manual") return;
|
|
830
833
|
let r = f(e, t), i = !l.value.includes(r);
|
|
831
834
|
if (u.value.toggleMethod && u.value.toggleMethod({
|
|
832
|
-
row:
|
|
835
|
+
row: U(e),
|
|
833
836
|
expanded: i
|
|
834
837
|
}) === !1) return;
|
|
835
838
|
let o;
|
|
836
|
-
u.value.accordion && i ? o = [r] : {next: o} =
|
|
839
|
+
u.value.accordion && i ? o = [r] : {next: o} = at(l.value, r), d(o, e, i);
|
|
837
840
|
}
|
|
838
841
|
};
|
|
839
842
|
}
|
|
840
843
|
//#endregion
|
|
841
844
|
//#region src/components/Table/state/usePageItems.ts
|
|
842
|
-
function
|
|
843
|
-
let l = h(() => (e.value - 1) * r.value + 1), u = h(() => t.value ? Math.min(s.value, e.value * r.value) : Math.min(o.value.length, e.value * r.value)), d = h(() => t.value ? n.value : o.value.slice(l.value - 1, u.value)), f = h(() =>
|
|
844
|
-
...e,
|
|
845
|
-
[z.index]: l.value + t
|
|
846
|
-
})) : d.value), p = h(() => Me(i.value, c.value)), m = (e) => Ne(e, i.value, p.value, c.value);
|
|
845
|
+
function ct(e, t, n, r, i, a, o, s, c) {
|
|
846
|
+
let l = h(() => (e.value - 1) * r.value + 1), u = h(() => t.value ? Math.min(s.value, e.value * r.value) : Math.min(o.value.length, e.value * r.value)), d = h(() => t.value ? n.value : o.value.slice(l.value - 1, u.value)), f = d, p = h(() => je(i.value, c.value)), m = (e) => Me(e, i.value, p.value, c.value);
|
|
847
847
|
return {
|
|
848
848
|
currentPageFirstIndex: l,
|
|
849
849
|
currentPageLastIndex: u,
|
|
@@ -862,7 +862,7 @@ function ut(e, t, n, r, i, a, o, s, c) {
|
|
|
862
862
|
}
|
|
863
863
|
//#endregion
|
|
864
864
|
//#region src/components/Table/state/usePagination.ts
|
|
865
|
-
function
|
|
865
|
+
function lt(e, t, n, r, i, a, o) {
|
|
866
866
|
let s = j(a.value ? a.value.page : e.value), c = h(() => Math.ceil(r.value / i.value)), l = h(() => c.value === 0 || s.value === c.value), u = h(() => s.value === 1);
|
|
867
867
|
return I(e, (e) => {
|
|
868
868
|
!t.value && e !== s.value && (s.value = e);
|
|
@@ -889,7 +889,7 @@ function dt(e, t, n, r, i, a, o) {
|
|
|
889
889
|
}
|
|
890
890
|
//#endregion
|
|
891
891
|
//#region src/components/Table/state/useRows.ts
|
|
892
|
-
function
|
|
892
|
+
function ut(e, t, n, r) {
|
|
893
893
|
let i = h(() => !e.value && !t.value.includes(r.value) ? [r.value, ...t.value] : t.value), a = j(n.value ? n.value.rowsPerPage : r.value);
|
|
894
894
|
return I(r, (t) => {
|
|
895
895
|
!e.value && t !== a.value && (a.value = t);
|
|
@@ -905,13 +905,13 @@ function ft(e, t, n, r) {
|
|
|
905
905
|
}
|
|
906
906
|
//#endregion
|
|
907
907
|
//#region src/components/Table/state/useServerOptions.ts
|
|
908
|
-
function
|
|
908
|
+
function dt(e, t) {
|
|
909
909
|
return {
|
|
910
910
|
sortBy: Array.isArray(e) ? [...e] : e ? [e] : [],
|
|
911
911
|
sortType: Array.isArray(t) ? [...t] : t ? [t] : []
|
|
912
912
|
};
|
|
913
913
|
}
|
|
914
|
-
function
|
|
914
|
+
function ft(e, t, n) {
|
|
915
915
|
let r = h({
|
|
916
916
|
get: () => {
|
|
917
917
|
if (!e.value) return null;
|
|
@@ -938,7 +938,7 @@ function mt(e, t, n) {
|
|
|
938
938
|
updateServerOptionsSort: (e, n) => {
|
|
939
939
|
if (r.value) {
|
|
940
940
|
if (t.value) {
|
|
941
|
-
let { sortBy: t, sortType: i } =
|
|
941
|
+
let { sortBy: t, sortType: i } = dt(r.value.sortBy, r.value.sortType), a = t.findIndex((t) => t === e);
|
|
942
942
|
a === -1 && n !== null ? (t.push(e), i.push(n)) : n === null ? a !== -1 && (t.splice(a, 1), i.splice(a, 1)) : a === -1 ? (t.push(e), i.push(n)) : i[a] = n, r.value = {
|
|
943
943
|
...r.value,
|
|
944
944
|
sortBy: t,
|
|
@@ -964,12 +964,12 @@ function mt(e, t, n) {
|
|
|
964
964
|
}
|
|
965
965
|
//#endregion
|
|
966
966
|
//#region src/components/Table/state/useTotalItems.ts
|
|
967
|
-
function
|
|
968
|
-
let f = h(() => r.value || s.value === "" ? i.value :
|
|
967
|
+
function pt(e, t, n, r, i, a, o, s, c, l, u, d) {
|
|
968
|
+
let f = h(() => r.value || s.value === "" ? i.value : nt(i.value, s.value, o.value)), p = h(() => et(f.value, n.value, t.value)), m = h(() => {
|
|
969
969
|
if (r.value) return i.value;
|
|
970
970
|
if (e.value === null) return p.value;
|
|
971
971
|
let { sortBy: t, sortDesc: n } = e.value;
|
|
972
|
-
return
|
|
972
|
+
return it(p.value, t, n, l.value);
|
|
973
973
|
}), g = h(() => r.value ? c.value : m.value.length), _ = h({
|
|
974
974
|
get: () => a.value ?? [],
|
|
975
975
|
set: (e) => d("update:selection", e)
|
|
@@ -979,37 +979,37 @@ function ht(e, t, n, r, i, a, o, s, c, l, u, d) {
|
|
|
979
979
|
selectItemsComputed: _,
|
|
980
980
|
totalItemsLength: g,
|
|
981
981
|
toggleSelectAll: (e, t) => {
|
|
982
|
-
let n = u.value, r = t.map(
|
|
982
|
+
let n = u.value, r = t.map(U);
|
|
983
983
|
if (e) {
|
|
984
984
|
let e = [..._.value];
|
|
985
|
-
for (let t of r) e.some((e) =>
|
|
985
|
+
for (let t of r) e.some((e) => W(e, t, n)) || e.push(t);
|
|
986
986
|
_.value = e, d("select-all");
|
|
987
987
|
return;
|
|
988
988
|
}
|
|
989
|
-
_.value = _.value.filter((e) => !r.some((t) =>
|
|
989
|
+
_.value = _.value.filter((e) => !r.some((t) => W(e, t, n)));
|
|
990
990
|
},
|
|
991
991
|
toggleSelectItem: (e) => {
|
|
992
|
-
let { next: t, selected: n, row: r } =
|
|
992
|
+
let { next: t, selected: n, row: r } = ot(_.value, e, u.value);
|
|
993
993
|
_.value = t, d(n ? "select-row" : "deselect-row", r);
|
|
994
994
|
}
|
|
995
995
|
};
|
|
996
996
|
}
|
|
997
997
|
//#endregion
|
|
998
998
|
//#region src/components/Table/state/useTreeRows.ts
|
|
999
|
-
function
|
|
1000
|
-
let s = h(() => e.value != null), c = h(() =>
|
|
999
|
+
function mt(e, t, n, r, i, a, o) {
|
|
1000
|
+
let s = h(() => e.value != null), c = h(() => Ne(e.value)), l = j([]), u = j(/* @__PURE__ */ new Set()), d = j(!1), f = h(() => r.value ?? l.value), p = h(() => {
|
|
1001
1001
|
if (!s.value) return [];
|
|
1002
|
-
let e = c.value, r = e.transform ?
|
|
1002
|
+
let e = c.value, r = e.transform ? Pe(t.value, e.rowField || n.value, e.parentField, e.childrenField) : t.value, o = i.value?.trim();
|
|
1003
1003
|
if (!o) return r;
|
|
1004
1004
|
let l = Array.isArray(a.value) ? a.value : a.value ? [a.value] : [];
|
|
1005
|
-
return
|
|
1005
|
+
return Re(r, e.childrenField, (e) => {
|
|
1006
1006
|
let t = l.length ? l.map((t) => String(e[t] ?? "")) : Object.values(e).filter((e) => typeof e != "object" || !e).map((e) => String(e)), n = o.toLowerCase();
|
|
1007
1007
|
return t.some((e) => e.toLowerCase().includes(n));
|
|
1008
1008
|
});
|
|
1009
1009
|
});
|
|
1010
1010
|
function m(e, t, n) {
|
|
1011
|
-
l.value = e, o("update:expandedRowKeys", e), t != null && n != null && o("expand", {
|
|
1012
|
-
row:
|
|
1011
|
+
l.value = e, o("update:expandedRowKeys", e), t != null && n != null && o("expand-change", {
|
|
1012
|
+
row: U(t),
|
|
1013
1013
|
expanded: n
|
|
1014
1014
|
});
|
|
1015
1015
|
}
|
|
@@ -1026,7 +1026,7 @@ function gt(e, t, n, r, i, a, o) {
|
|
|
1026
1026
|
}
|
|
1027
1027
|
let e = c.value;
|
|
1028
1028
|
if (e.expandAll) {
|
|
1029
|
-
m(
|
|
1029
|
+
m(Ie(p.value, n.value, e.childrenField, e.lazy, e.hasChildField)), d.value = !0;
|
|
1030
1030
|
return;
|
|
1031
1031
|
}
|
|
1032
1032
|
e.expandRowKeys?.length && (m([...e.expandRowKeys]), d.value = !0);
|
|
@@ -1039,23 +1039,23 @@ function gt(e, t, n, r, i, a, o) {
|
|
|
1039
1039
|
meta: /* @__PURE__ */ new Map()
|
|
1040
1040
|
};
|
|
1041
1041
|
let e = c.value;
|
|
1042
|
-
return
|
|
1042
|
+
return Le(p.value, f.value, n.value, e.childrenField, e.lazy, e.hasChildField, u.value);
|
|
1043
1043
|
}), _ = h(() => g.value.rows), v = h(() => g.value.meta);
|
|
1044
1044
|
function y(e, t = 0) {
|
|
1045
|
-
return
|
|
1045
|
+
return H(e, t, n.value);
|
|
1046
1046
|
}
|
|
1047
1047
|
function b(e) {
|
|
1048
1048
|
return f.value.includes(y(e));
|
|
1049
1049
|
}
|
|
1050
1050
|
function x() {
|
|
1051
1051
|
let e = new Set(f.value), t = [], n = c.value, r = (i) => {
|
|
1052
|
-
for (let a of i) e.has(y(a)) && t.push(
|
|
1052
|
+
for (let a of i) e.has(y(a)) && t.push(U(a)), r(G(a, n.childrenField));
|
|
1053
1053
|
};
|
|
1054
1054
|
return r(p.value), t;
|
|
1055
1055
|
}
|
|
1056
1056
|
async function S(e, t) {
|
|
1057
1057
|
let n = c.value;
|
|
1058
|
-
if (!n.lazy ||
|
|
1058
|
+
if (!n.lazy || G(e, n.childrenField).length || !n.loadMethod) return !0;
|
|
1059
1059
|
let r = new Set(u.value);
|
|
1060
1060
|
r.add(t), u.value = r;
|
|
1061
1061
|
try {
|
|
@@ -1065,26 +1065,26 @@ function gt(e, t, n, r, i, a, o) {
|
|
|
1065
1065
|
let e = new Set(u.value);
|
|
1066
1066
|
e.delete(t), u.value = e;
|
|
1067
1067
|
}
|
|
1068
|
-
return
|
|
1068
|
+
return Fe(e, n.childrenField, !1, n.hasChildField) ? !0 : (e[n.hasChildField] = !1, !1);
|
|
1069
1069
|
}
|
|
1070
1070
|
async function C(e, t) {
|
|
1071
1071
|
if (!s.value) return;
|
|
1072
1072
|
let n = Array.isArray(e) ? e : [e], r = c.value, i = [...f.value];
|
|
1073
1073
|
for (let e of n) {
|
|
1074
1074
|
let n = y(e);
|
|
1075
|
-
if ((v.value.get(n)?.hasChildren ??
|
|
1076
|
-
row:
|
|
1075
|
+
if ((v.value.get(n)?.hasChildren ?? Fe(e, r.childrenField, r.lazy, r.hasChildField)) && i.includes(n) !== t && !(r.toggleMethod && r.toggleMethod({
|
|
1076
|
+
row: U(e),
|
|
1077
1077
|
expanded: t
|
|
1078
1078
|
}) === !1)) {
|
|
1079
1079
|
if (t) {
|
|
1080
1080
|
if (!await S(e, n)) continue;
|
|
1081
1081
|
if (r.accordion) {
|
|
1082
1082
|
let e = v.value.get(n)?.parentKey ?? null;
|
|
1083
|
-
i =
|
|
1083
|
+
i = ze(i, n, e, v.value);
|
|
1084
1084
|
} else i.includes(n) || i.push(n);
|
|
1085
1085
|
} else i = i.filter((e) => e !== n);
|
|
1086
|
-
o("expand", {
|
|
1087
|
-
row:
|
|
1086
|
+
o("expand-change", {
|
|
1087
|
+
row: U(e),
|
|
1088
1088
|
expanded: t
|
|
1089
1089
|
});
|
|
1090
1090
|
}
|
|
@@ -1098,7 +1098,7 @@ function gt(e, t, n, r, i, a, o) {
|
|
|
1098
1098
|
m([]);
|
|
1099
1099
|
return;
|
|
1100
1100
|
}
|
|
1101
|
-
m(
|
|
1101
|
+
m(Ie(p.value, n.value, t.childrenField, t.lazy, t.hasChildField));
|
|
1102
1102
|
}
|
|
1103
1103
|
function T() {
|
|
1104
1104
|
m([]);
|
|
@@ -1112,11 +1112,11 @@ function gt(e, t, n, r, i, a, o) {
|
|
|
1112
1112
|
if (!i?.hasChildren) return;
|
|
1113
1113
|
let a = f.value.includes(r), o = !a;
|
|
1114
1114
|
if (c.value.toggleMethod && c.value.toggleMethod({
|
|
1115
|
-
row:
|
|
1115
|
+
row: U(e),
|
|
1116
1116
|
expanded: o
|
|
1117
1117
|
}) === !1 || o && !await S(e, r)) return;
|
|
1118
1118
|
let l;
|
|
1119
|
-
a ? {next: l} =
|
|
1119
|
+
a ? {next: l} = at(f.value, r) : c.value.accordion && i ? l = ze(f.value, r, i.parentKey, v.value) : {next: l} = at(f.value, r), m(l, e, o);
|
|
1120
1120
|
}
|
|
1121
1121
|
return {
|
|
1122
1122
|
treeEnabled: s,
|
|
@@ -1136,9 +1136,44 @@ function gt(e, t, n, r, i, a, o) {
|
|
|
1136
1136
|
}
|
|
1137
1137
|
//#endregion
|
|
1138
1138
|
//#region src/components/Table/state/useVirtualRows.ts
|
|
1139
|
-
function
|
|
1140
|
-
let o = h(() =>
|
|
1141
|
-
|
|
1139
|
+
function ht(e, t, n, r, i, a = 5, o = {}) {
|
|
1140
|
+
let s = h(() => !!o.dynamic?.value), c = h(() => o.rowKey?.value ?? "id"), l = j(/* @__PURE__ */ new Map());
|
|
1141
|
+
I(() => t.value, (e, t) => {
|
|
1142
|
+
if (e === t) return;
|
|
1143
|
+
let n = /* @__PURE__ */ new Set();
|
|
1144
|
+
e.forEach((e, t) => n.add(H(e, t, c.value)));
|
|
1145
|
+
let r = /* @__PURE__ */ new Map();
|
|
1146
|
+
for (let [e, t] of l.value) n.has(e) && r.set(e, t);
|
|
1147
|
+
l.value = r;
|
|
1148
|
+
});
|
|
1149
|
+
let u = h(() => {
|
|
1150
|
+
let e = t.value, r = Math.max(1, n.value), i = Array(e.length + 1);
|
|
1151
|
+
if (i[0] = 0, !s.value) {
|
|
1152
|
+
for (let t = 0; t < e.length; t += 1) i[t + 1] = (t + 1) * r;
|
|
1153
|
+
return i;
|
|
1154
|
+
}
|
|
1155
|
+
let a = l.value;
|
|
1156
|
+
for (let t = 0; t < e.length; t += 1) {
|
|
1157
|
+
let n = H(e[t], t, c.value), o = a.get(n) ?? r;
|
|
1158
|
+
i[t + 1] = i[t] + o;
|
|
1159
|
+
}
|
|
1160
|
+
return i;
|
|
1161
|
+
});
|
|
1162
|
+
function d(e) {
|
|
1163
|
+
let r = u.value;
|
|
1164
|
+
if (!s.value) {
|
|
1165
|
+
let t = Math.max(1, n.value);
|
|
1166
|
+
return Math.floor(e / t);
|
|
1167
|
+
}
|
|
1168
|
+
let i = 0, a = t.value.length - 1, o = 0;
|
|
1169
|
+
for (; i <= a;) {
|
|
1170
|
+
let t = i + a >> 1;
|
|
1171
|
+
r[t] <= e ? (o = t, i = t + 1) : a = t - 1;
|
|
1172
|
+
}
|
|
1173
|
+
return o;
|
|
1174
|
+
}
|
|
1175
|
+
let f = h(() => {
|
|
1176
|
+
let o = t.value, s = u.value, c = s[o.length] ?? 0;
|
|
1142
1177
|
if (!e.value || o.length === 0) return {
|
|
1143
1178
|
items: o,
|
|
1144
1179
|
startIndex: 0,
|
|
@@ -1147,31 +1182,112 @@ function _t(e, t, n, r, i, a = 5) {
|
|
|
1147
1182
|
offsetBottom: 0,
|
|
1148
1183
|
totalHeight: c
|
|
1149
1184
|
};
|
|
1150
|
-
let l = Math.max(
|
|
1185
|
+
let l = Math.max(1, n.value), f = Math.max(l, i.value || l * 10), p = d(r.value) - a, m = Math.max(0, p), h = f + a * 2 * l, g = s[m], _ = m;
|
|
1186
|
+
for (; _ < o.length && s[_ + 1] - g < h;) _ += 1;
|
|
1187
|
+
let v = g, y = Math.max(0, c - (s[_] ?? c));
|
|
1151
1188
|
return {
|
|
1152
|
-
items: o.slice(
|
|
1153
|
-
startIndex:
|
|
1154
|
-
endIndex:
|
|
1155
|
-
offsetTop:
|
|
1156
|
-
offsetBottom:
|
|
1189
|
+
items: o.slice(m, _),
|
|
1190
|
+
startIndex: m,
|
|
1191
|
+
endIndex: _,
|
|
1192
|
+
offsetTop: v,
|
|
1193
|
+
offsetBottom: y,
|
|
1157
1194
|
totalHeight: c
|
|
1158
1195
|
};
|
|
1159
|
-
});
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1196
|
+
}), p, m = /* @__PURE__ */ new WeakSet();
|
|
1197
|
+
function g(e, t, n) {
|
|
1198
|
+
s.value && e && (typeof ResizeObserver > "u" || m.has(e) || (m.add(e), p ||= new ResizeObserver((e) => {
|
|
1199
|
+
let t = !1, n = new Map(l.value);
|
|
1200
|
+
for (let r of e) {
|
|
1201
|
+
let e = r.target.dataset.rowKey;
|
|
1202
|
+
if (!e) continue;
|
|
1203
|
+
let i = Number(e), a = Number.isNaN(i) ? e : i, o = r.contentRect.height;
|
|
1204
|
+
n.get(a) !== o && (n.set(a, o), t = !0);
|
|
1205
|
+
}
|
|
1206
|
+
t && (l.value = n);
|
|
1207
|
+
}), p.observe(e)));
|
|
1208
|
+
}
|
|
1209
|
+
return te(() => {
|
|
1210
|
+
p?.disconnect(), p = void 0;
|
|
1211
|
+
}), I(s, (e) => {
|
|
1212
|
+
e || (p?.disconnect(), p = void 0, l.value = /* @__PURE__ */ new Map());
|
|
1213
|
+
}), {
|
|
1214
|
+
virtualItems: h(() => f.value.items),
|
|
1215
|
+
startIndex: h(() => f.value.startIndex),
|
|
1216
|
+
endIndex: h(() => f.value.endIndex),
|
|
1217
|
+
offsetTop: h(() => f.value.offsetTop),
|
|
1218
|
+
offsetBottom: h(() => f.value.offsetBottom),
|
|
1219
|
+
totalHeight: h(() => f.value.totalHeight),
|
|
1220
|
+
observeRow: g,
|
|
1221
|
+
dynamicEnabled: s
|
|
1167
1222
|
};
|
|
1168
1223
|
}
|
|
1169
1224
|
//#endregion
|
|
1170
|
-
//#region src/components/Table/render/
|
|
1171
|
-
var
|
|
1225
|
+
//#region src/components/Table/render/TableColumnSetting.vue?vue&type=script&setup=true&lang.ts
|
|
1226
|
+
var gt = ["aria-label", "aria-expanded"], _t = { class: "m-table__filter-title" }, vt = ["aria-label"], yt = { class: "m-table__filter-actions" }, bt = /* @__PURE__ */ C({
|
|
1227
|
+
__name: "TableColumnSetting",
|
|
1228
|
+
props: {
|
|
1229
|
+
columns: {},
|
|
1230
|
+
hiddenKeys: {}
|
|
1231
|
+
},
|
|
1232
|
+
emits: ["toggle", "reset"],
|
|
1233
|
+
setup(e, { emit: t }) {
|
|
1234
|
+
let r = e, o = t, s = p(), c = j(!1), u = h(() => new Set(r.hiddenKeys));
|
|
1235
|
+
function d(e) {
|
|
1236
|
+
return !u.value.has(e);
|
|
1237
|
+
}
|
|
1238
|
+
function f(e, t) {
|
|
1239
|
+
o("toggle", e, !!t);
|
|
1240
|
+
}
|
|
1241
|
+
function g() {
|
|
1242
|
+
o("reset");
|
|
1243
|
+
}
|
|
1244
|
+
return (t, r) => (k(), v("span", {
|
|
1245
|
+
class: "m-table__column-setting",
|
|
1246
|
+
onClick: r[2] ||= R(() => {}, ["stop"])
|
|
1247
|
+
}, [S(l, {
|
|
1248
|
+
modelValue: c.value,
|
|
1249
|
+
"onUpdate:modelValue": r[1] ||= (e) => c.value = e,
|
|
1250
|
+
placement: "bottom-end",
|
|
1251
|
+
trigger: "click"
|
|
1252
|
+
}, {
|
|
1253
|
+
content: L(() => [y("div", {
|
|
1254
|
+
class: "m-table__filter-panel",
|
|
1255
|
+
onClick: r[0] ||= R(() => {}, ["stop"])
|
|
1256
|
+
}, [
|
|
1257
|
+
y("p", _t, P(F(s).columnSettingsTitle), 1),
|
|
1258
|
+
y("div", {
|
|
1259
|
+
class: "m-table__filter-options",
|
|
1260
|
+
role: "group",
|
|
1261
|
+
"aria-label": F(s).columnSettingsTitle
|
|
1262
|
+
}, [(k(!0), v(m, null, M(e.columns, (e) => (k(), v("label", {
|
|
1263
|
+
key: e.value,
|
|
1264
|
+
class: "m-table__filter-option"
|
|
1265
|
+
}, [S(a, {
|
|
1266
|
+
"model-value": d(e.value),
|
|
1267
|
+
"onUpdate:modelValue": (t) => f(e.value, t)
|
|
1268
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"]), y("span", null, P(e.text), 1)]))), 128))], 8, vt),
|
|
1269
|
+
y("div", yt, [S(i, {
|
|
1270
|
+
size: "sm",
|
|
1271
|
+
variant: "text",
|
|
1272
|
+
onClick: g
|
|
1273
|
+
}, {
|
|
1274
|
+
default: L(() => [x(P(F(s).columnSettingsReset), 1)]),
|
|
1275
|
+
_: 1
|
|
1276
|
+
})])
|
|
1277
|
+
])]),
|
|
1278
|
+
default: L(() => [y("button", {
|
|
1279
|
+
type: "button",
|
|
1280
|
+
class: "m-table__filter-btn",
|
|
1281
|
+
"aria-label": F(s).columnSettings,
|
|
1282
|
+
"aria-expanded": c.value
|
|
1283
|
+
}, [S(n, { name: "settings" })], 8, gt)]),
|
|
1284
|
+
_: 1
|
|
1285
|
+
}, 8, ["modelValue"])]));
|
|
1286
|
+
}
|
|
1287
|
+
}), xt = { class: "m-table__tooltip-trigger" }, St = { class: "m-table__cell-text" }, Ct = {
|
|
1172
1288
|
key: 1,
|
|
1173
1289
|
class: "m-table__cell-text"
|
|
1174
|
-
},
|
|
1290
|
+
}, wt = /* @__PURE__ */ C({
|
|
1175
1291
|
__name: "TableDefaultCell",
|
|
1176
1292
|
props: {
|
|
1177
1293
|
column: {},
|
|
@@ -1179,62 +1295,72 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1179
1295
|
showTooltip: { type: Boolean }
|
|
1180
1296
|
},
|
|
1181
1297
|
setup(e) {
|
|
1182
|
-
let t = e, n = h(() =>
|
|
1183
|
-
return (t, r) => e.showTooltip ? (
|
|
1298
|
+
let t = e, n = h(() => Ae(t.column, t.item));
|
|
1299
|
+
return (t, r) => e.showTooltip ? (k(), g(u, {
|
|
1184
1300
|
key: 0,
|
|
1185
1301
|
content: n.value
|
|
1186
1302
|
}, {
|
|
1187
|
-
default: L(() => [y("span",
|
|
1303
|
+
default: L(() => [y("span", xt, [y("span", St, P(n.value), 1)])]),
|
|
1188
1304
|
_: 1
|
|
1189
|
-
}, 8, ["content"])) : (
|
|
1305
|
+
}, 8, ["content"])) : (k(), v("span", Ct, P(n.value), 1));
|
|
1190
1306
|
}
|
|
1191
|
-
}),
|
|
1307
|
+
}), Tt = ["aria-label"], Et = /* @__PURE__ */ C({
|
|
1192
1308
|
__name: "TableLoadingLine",
|
|
1193
1309
|
setup(e) {
|
|
1194
1310
|
let t = p();
|
|
1195
|
-
return (e, n) => (
|
|
1311
|
+
return (e, n) => (k(), v("div", {
|
|
1196
1312
|
class: "m-table__loading-line",
|
|
1197
1313
|
role: "status",
|
|
1198
1314
|
"aria-label": F(t).loading
|
|
1199
|
-
}, null, 8,
|
|
1315
|
+
}, null, 8, Tt));
|
|
1200
1316
|
}
|
|
1201
|
-
}),
|
|
1317
|
+
}), Dt = {
|
|
1202
1318
|
key: 0,
|
|
1203
1319
|
class: "m-table__virtual-spacer",
|
|
1204
1320
|
"aria-hidden": "true"
|
|
1205
|
-
},
|
|
1321
|
+
}, Ot = ["colspan"], kt = [
|
|
1206
1322
|
"data-row-key",
|
|
1323
|
+
"role",
|
|
1207
1324
|
"aria-level",
|
|
1325
|
+
"aria-posinset",
|
|
1326
|
+
"aria-setsize",
|
|
1208
1327
|
"aria-expanded",
|
|
1328
|
+
"aria-selected",
|
|
1329
|
+
"tabindex",
|
|
1209
1330
|
"onClick",
|
|
1210
1331
|
"onDblclick",
|
|
1211
|
-
"onContextmenu"
|
|
1212
|
-
|
|
1332
|
+
"onContextmenu",
|
|
1333
|
+
"onKeydown"
|
|
1334
|
+
], At = [
|
|
1213
1335
|
"rowspan",
|
|
1214
1336
|
"colspan",
|
|
1337
|
+
"role",
|
|
1215
1338
|
"onClick"
|
|
1216
|
-
],
|
|
1339
|
+
], jt = [
|
|
1217
1340
|
"aria-label",
|
|
1218
1341
|
"disabled",
|
|
1219
1342
|
"onClick"
|
|
1220
|
-
],
|
|
1343
|
+
], q = {
|
|
1221
1344
|
key: 1,
|
|
1222
1345
|
class: "m-table__tree-toggler-spacer"
|
|
1223
|
-
},
|
|
1346
|
+
}, Mt = {
|
|
1224
1347
|
key: 4,
|
|
1225
1348
|
class: "m-table__cell-text"
|
|
1226
|
-
},
|
|
1349
|
+
}, Nt = [
|
|
1227
1350
|
"aria-expanded",
|
|
1228
1351
|
"aria-label",
|
|
1229
1352
|
"onClick"
|
|
1230
|
-
],
|
|
1231
|
-
key:
|
|
1353
|
+
], Pt = {
|
|
1354
|
+
key: 6,
|
|
1355
|
+
class: "m-table__cell-text m-table__cell-text--index"
|
|
1356
|
+
}, Ft = {
|
|
1357
|
+
key: 8,
|
|
1232
1358
|
class: "m-table__cell-text"
|
|
1233
|
-
},
|
|
1359
|
+
}, It = ["colspan"], Lt = {
|
|
1234
1360
|
key: 1,
|
|
1235
1361
|
class: "m-table__virtual-spacer",
|
|
1236
1362
|
"aria-hidden": "true"
|
|
1237
|
-
},
|
|
1363
|
+
}, Rt = ["colspan"], zt = /* @__PURE__ */ C({
|
|
1238
1364
|
__name: "TableTbody",
|
|
1239
1365
|
props: {
|
|
1240
1366
|
bodyItems: {},
|
|
@@ -1274,7 +1400,12 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1274
1400
|
treeNodeColumn: {},
|
|
1275
1401
|
treeIndent: {},
|
|
1276
1402
|
getTreeMeta: { type: Function },
|
|
1277
|
-
isTreeNodeExpanded: { type: Function }
|
|
1403
|
+
isTreeNodeExpanded: { type: Function },
|
|
1404
|
+
isMultipleSelectable: { type: Boolean },
|
|
1405
|
+
isSingleSelectable: { type: Boolean },
|
|
1406
|
+
rowTabindex: {},
|
|
1407
|
+
pt: {},
|
|
1408
|
+
observeRow: { type: Function }
|
|
1278
1409
|
},
|
|
1279
1410
|
emits: [
|
|
1280
1411
|
"row-click",
|
|
@@ -1286,67 +1417,85 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1286
1417
|
"single-select"
|
|
1287
1418
|
],
|
|
1288
1419
|
setup(e, { emit: t }) {
|
|
1289
|
-
let r = e, i = t, o = ae(), s = p(), c = h(() => r.headersForRender.length);
|
|
1290
|
-
function
|
|
1420
|
+
let r = e, i = t, o = ae(), s = p(), c = h(() => r.headersForRender.length), l = h(() => r.rowTabindex ?? -1);
|
|
1421
|
+
function u(e) {
|
|
1291
1422
|
return le(e, r.columnAlignMap, r.bodyTextDirection);
|
|
1292
1423
|
}
|
|
1293
|
-
function
|
|
1294
|
-
return
|
|
1424
|
+
function f(e) {
|
|
1425
|
+
return me(e, "td", r.fixedColumnsInfos, r.hasFixedHeaders);
|
|
1295
1426
|
}
|
|
1296
|
-
function
|
|
1427
|
+
function b(e, t) {
|
|
1297
1428
|
return de(e, t, r.headerColumns, r.spanMethod, r.headersForRender);
|
|
1298
1429
|
}
|
|
1299
|
-
function
|
|
1430
|
+
function x(e) {
|
|
1300
1431
|
return r.showOverflowTooltip ? !0 : !!r.headers.find((t) => t.value === e)?.showOverflowTooltip;
|
|
1301
1432
|
}
|
|
1302
|
-
function
|
|
1433
|
+
function C(e) {
|
|
1434
|
+
return r.columnRenderMap.get(e);
|
|
1435
|
+
}
|
|
1436
|
+
function E(e, t, n) {
|
|
1303
1437
|
return {
|
|
1304
1438
|
row: t,
|
|
1305
1439
|
item: t,
|
|
1306
1440
|
column: e,
|
|
1307
|
-
value:
|
|
1441
|
+
value: e === z.index ? r.currentPageFirstIndex + r.bodyRowIndex(n) : V(e, t)
|
|
1308
1442
|
};
|
|
1309
1443
|
}
|
|
1310
|
-
function
|
|
1444
|
+
function te(e, t, n) {
|
|
1311
1445
|
i("row-click", e, t, n), r.clickRowToExpand && i("toggle-expand", e, r.bodyRowIndex(t), n);
|
|
1312
1446
|
}
|
|
1313
|
-
function
|
|
1447
|
+
function ne(e, t, n) {
|
|
1448
|
+
(n.key === "Enter" || n.key === " ") && n.target === n.currentTarget && (n.preventDefault(), te(e, t, n));
|
|
1449
|
+
}
|
|
1450
|
+
function A(e, t) {
|
|
1314
1451
|
return r.getTreeMeta?.(e, t);
|
|
1315
1452
|
}
|
|
1316
|
-
function
|
|
1453
|
+
function j(e, t, n) {
|
|
1454
|
+
r.observeRow && r.observeRow(e ?? null, t, n);
|
|
1455
|
+
}
|
|
1456
|
+
function re(e) {
|
|
1317
1457
|
return !!(r.treeEnabled && r.treeNodeColumn && e === r.treeNodeColumn);
|
|
1318
1458
|
}
|
|
1319
|
-
return (t, r) => (
|
|
1459
|
+
return (t, r) => (k(), v("tbody", T(e.pt, { class: "m-table__body" }), [
|
|
1320
1460
|
N(t.$slots, "body-prepend", O(w({
|
|
1321
1461
|
items: e.pageItems,
|
|
1322
1462
|
pagination: e.pagination,
|
|
1323
1463
|
headers: e.headersForRender
|
|
1324
1464
|
}))),
|
|
1325
|
-
e.virtualEnabled && e.offsetTop > 0 ? (
|
|
1465
|
+
e.virtualEnabled && e.offsetTop > 0 ? (k(), v("tr", Dt, [y("td", {
|
|
1326
1466
|
colspan: c.value,
|
|
1327
|
-
style:
|
|
1467
|
+
style: ee({
|
|
1328
1468
|
height: `${e.offsetTop}px`,
|
|
1329
1469
|
padding: 0,
|
|
1330
1470
|
border: 0
|
|
1331
1471
|
})
|
|
1332
|
-
}, null, 12,
|
|
1333
|
-
(
|
|
1472
|
+
}, null, 12, Ot)])) : _("", !0),
|
|
1473
|
+
(k(!0), v(m, null, M(e.bodyItems, (p, h) => (k(), v(m, { key: e.getBodyRowKey(p, h) }, [y("tr", {
|
|
1474
|
+
ref_for: !0,
|
|
1475
|
+
ref: (e) => j(e, p, h),
|
|
1334
1476
|
class: D([{
|
|
1335
1477
|
"m-table__row--striped": e.striped && (e.bodyRowIndex(h) + 1) % 2 == 0,
|
|
1336
1478
|
"m-table__row--selected": e.isRowSelected(p, h),
|
|
1337
1479
|
"m-table__row--current": e.isCurrentRow(p, h)
|
|
1338
1480
|
}, typeof e.bodyRowClassName == "string" ? e.bodyRowClassName : e.bodyRowClassName(p, e.bodyRowIndex(h) + 1)]),
|
|
1339
1481
|
"data-row-key": String(e.getBodyRowKey(p, h)),
|
|
1340
|
-
|
|
1341
|
-
"aria-
|
|
1342
|
-
|
|
1482
|
+
role: e.treeEnabled ? "row" : void 0,
|
|
1483
|
+
"aria-level": e.treeEnabled ? (A(p, h)?.depth ?? 0) + 1 : void 0,
|
|
1484
|
+
"aria-posinset": e.treeEnabled ? A(p, h)?.posInSet : void 0,
|
|
1485
|
+
"aria-setsize": e.treeEnabled ? A(p, h)?.setSize : void 0,
|
|
1486
|
+
"aria-expanded": e.treeEnabled && A(p, h)?.hasChildren ? e.isTreeNodeExpanded?.(p, h) ?? !1 : void 0,
|
|
1487
|
+
"aria-selected": e.treeEnabled && (e.isMultipleSelectable || e.isSingleSelectable) ? e.isRowSelected(p, h) : void 0,
|
|
1488
|
+
tabindex: l.value,
|
|
1489
|
+
onClick: (e) => te(p, h, e),
|
|
1343
1490
|
onDblclick: (e) => i("row-dblclick", p, h, e),
|
|
1344
|
-
onContextmenu: (e) => i("row-contextmenu", p, e)
|
|
1345
|
-
|
|
1491
|
+
onContextmenu: (e) => i("row-contextmenu", p, e),
|
|
1492
|
+
onKeydown: (e) => ne(p, h, e)
|
|
1493
|
+
}, [(k(!0), v(m, null, M(b(p, e.bodyRowIndex(h)), (c) => (k(), v(m, { key: c.column }, [c.visible ? (k(), v("td", {
|
|
1346
1494
|
key: 0,
|
|
1347
|
-
style:
|
|
1495
|
+
style: ee(f(c.column)),
|
|
1348
1496
|
rowspan: c.rowspan,
|
|
1349
1497
|
colspan: c.colspan,
|
|
1498
|
+
role: e.treeEnabled ? "gridcell" : void 0,
|
|
1350
1499
|
class: D([
|
|
1351
1500
|
{
|
|
1352
1501
|
"m-table__cell--shadow": c.column === e.lastFixedColumn,
|
|
@@ -1354,8 +1503,8 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1354
1503
|
"m-table__cell--expand": c.column === F(z).expand,
|
|
1355
1504
|
"m-table__cell--selection": c.column === F(z).checkbox || c.column === F(z).radio
|
|
1356
1505
|
},
|
|
1357
|
-
|
|
1358
|
-
F(
|
|
1506
|
+
u(c.column),
|
|
1507
|
+
F(B)(e.bodyItemClassName, c.column, e.bodyRowIndex(h) + 1)
|
|
1359
1508
|
]),
|
|
1360
1509
|
onClick: (t) => {
|
|
1361
1510
|
c.column === F(z).expand && i("toggle-expand", p, e.bodyRowIndex(h), t);
|
|
@@ -1363,40 +1512,40 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1363
1512
|
}, [y("div", { class: D(["m-table__cell-inner", {
|
|
1364
1513
|
"m-table__cell-inner--expand": c.column === F(z).expand,
|
|
1365
1514
|
"m-table__cell-inner--selection": c.column === F(z).checkbox || c.column === F(z).radio
|
|
1366
|
-
}]) }, [
|
|
1515
|
+
}]) }, [re(c.column) ? (k(), v("div", {
|
|
1367
1516
|
key: 0,
|
|
1368
1517
|
class: "m-table__tree-cell",
|
|
1369
|
-
style:
|
|
1370
|
-
}, [
|
|
1518
|
+
style: ee({ paddingLeft: `${(A(p, h)?.depth ?? 0) * (e.treeIndent ?? 16)}px` })
|
|
1519
|
+
}, [A(p, h)?.hasChildren ? (k(), v("button", {
|
|
1371
1520
|
key: 0,
|
|
1372
1521
|
type: "button",
|
|
1373
1522
|
class: D(["m-table__tree-toggler", {
|
|
1374
1523
|
"m-table__tree-toggler--expanded": e.isTreeNodeExpanded?.(p, h),
|
|
1375
|
-
"m-table__tree-toggler--loading":
|
|
1524
|
+
"m-table__tree-toggler--loading": A(p, h)?.loading
|
|
1376
1525
|
}]),
|
|
1377
1526
|
"aria-label": e.isTreeNodeExpanded?.(p, h) ? F(s).collapse : F(s).expand,
|
|
1378
|
-
disabled:
|
|
1527
|
+
disabled: A(p, h)?.loading,
|
|
1379
1528
|
onClick: R((t) => i("toggle-tree", p, e.bodyRowIndex(h), t), ["stop"])
|
|
1380
1529
|
}, [S(n, {
|
|
1381
|
-
name:
|
|
1530
|
+
name: A(p, h)?.loading ? "loader" : e.isTreeNodeExpanded?.(p, h) ? "chevron-down" : "chevron-right",
|
|
1382
1531
|
size: "sm"
|
|
1383
|
-
}, null, 8, ["name"])], 10,
|
|
1532
|
+
}, null, 8, ["name"])], 10, jt)) : (k(), v("span", q)), F(o)[`cell-${c.column}`] ? N(t.$slots, `cell-${c.column}`, T({ ref_for: !0 }, E(c.column, p, h)), void 0, void 0, 2) : F(o)[`cell-${c.column.toLowerCase()}`] ? N(t.$slots, `cell-${c.column.toLowerCase()}`, T({ ref_for: !0 }, E(c.column, p, h)), void 0, void 0, 3) : C(c.column) ? (k(), v("span", Mt, P(C(c.column)(p)), 1)) : (k(), g(wt, {
|
|
1384
1533
|
key: 5,
|
|
1385
1534
|
column: c.column,
|
|
1386
1535
|
item: p,
|
|
1387
|
-
"show-tooltip":
|
|
1536
|
+
"show-tooltip": x(c.column)
|
|
1388
1537
|
}, null, 8, [
|
|
1389
1538
|
"column",
|
|
1390
1539
|
"item",
|
|
1391
1540
|
"show-tooltip"
|
|
1392
|
-
]))], 4)) : F(o)[`cell-${c.column}`] ? N(t.$slots, `cell-${c.column}`, T({ ref_for: !0 },
|
|
1541
|
+
]))], 4)) : F(o)[`cell-${c.column}`] ? N(t.$slots, `cell-${c.column}`, T({ ref_for: !0 }, E(c.column, p, h)), void 0, void 0, 1) : F(o)[`cell-${c.column.toLowerCase()}`] ? N(t.$slots, `cell-${c.column.toLowerCase()}`, T({ ref_for: !0 }, E(c.column, p, h)), void 0, void 0, 2) : c.column === F(z).expand ? (k(), v("button", {
|
|
1393
1542
|
key: 3,
|
|
1394
1543
|
type: "button",
|
|
1395
1544
|
class: D(["m-table__expand-btn", { "m-table__expand-btn--expanded": e.isRowExpanded(p, e.bodyRowIndex(h)) }]),
|
|
1396
1545
|
"aria-expanded": e.isRowExpanded(p, e.bodyRowIndex(h)),
|
|
1397
1546
|
"aria-label": e.isRowExpanded(p, e.bodyRowIndex(h)) ? F(s).collapse : F(s).expand,
|
|
1398
1547
|
onClick: R((t) => i("toggle-expand", p, e.bodyRowIndex(h), t), ["stop"])
|
|
1399
|
-
}, [S(n, { name: "chevron-right" })], 10,
|
|
1548
|
+
}, [S(n, { name: "chevron-right" })], 10, Nt)) : c.column === F(z).checkbox ? (k(), g(a, {
|
|
1400
1549
|
key: 4,
|
|
1401
1550
|
"model-value": e.isRowSelected(p, h),
|
|
1402
1551
|
indeterminate: e.isRowIndeterminate?.(p, h) ?? !1,
|
|
@@ -1410,7 +1559,7 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1410
1559
|
"disabled",
|
|
1411
1560
|
"aria-label",
|
|
1412
1561
|
"onUpdate:modelValue"
|
|
1413
|
-
])) : c.column === F(z).radio ? (
|
|
1562
|
+
])) : c.column === F(z).radio ? (k(), g(d, {
|
|
1414
1563
|
key: 5,
|
|
1415
1564
|
"model-value": e.singleSelectedRowKey ?? void 0,
|
|
1416
1565
|
value: e.getBodyRowKey(p, h),
|
|
@@ -1424,43 +1573,43 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1424
1573
|
"disabled",
|
|
1425
1574
|
"aria-label",
|
|
1426
1575
|
"onUpdate:modelValue"
|
|
1427
|
-
])) : F(o)["body-cell"] ? N(t.$slots, "body-cell", T({ ref_for: !0 }, {
|
|
1576
|
+
])) : c.column === F(z).index ? (k(), v("span", Pt, P(e.currentPageFirstIndex + e.bodyRowIndex(h)), 1)) : F(o)["body-cell"] ? N(t.$slots, "body-cell", T({ ref_for: !0 }, {
|
|
1428
1577
|
column: c.column,
|
|
1429
1578
|
item: p,
|
|
1430
1579
|
row: p,
|
|
1431
|
-
value: F(
|
|
1432
|
-
}), void 0, void 0,
|
|
1433
|
-
key:
|
|
1580
|
+
value: F(V)(c.column, p)
|
|
1581
|
+
}), void 0, void 0, 7) : C(c.column) ? (k(), v("span", Ft, P(C(c.column)(p)), 1)) : (k(), g(wt, {
|
|
1582
|
+
key: 9,
|
|
1434
1583
|
column: c.column,
|
|
1435
1584
|
item: p,
|
|
1436
|
-
"show-tooltip":
|
|
1585
|
+
"show-tooltip": x(c.column)
|
|
1437
1586
|
}, null, 8, [
|
|
1438
1587
|
"column",
|
|
1439
1588
|
"item",
|
|
1440
1589
|
"show-tooltip"
|
|
1441
|
-
]))], 2)], 14,
|
|
1590
|
+
]))], 2)], 14, At)) : _("", !0)], 64))), 128))], 42, kt), e.ifHasExpandSlot && e.isRowExpanded(p, e.bodyRowIndex(h)) ? (k(), v("tr", {
|
|
1442
1591
|
key: 0,
|
|
1443
1592
|
class: D([{ "m-table__row--striped": e.striped && (e.bodyRowIndex(h) + 1) % 2 == 0 }, typeof e.bodyExpandRowClassName == "string" ? e.bodyExpandRowClassName : e.bodyExpandRowClassName(p, e.bodyRowIndex(h) + 1)])
|
|
1444
1593
|
}, [y("td", {
|
|
1445
1594
|
colspan: c.value,
|
|
1446
1595
|
class: "m-table__cell--expanded"
|
|
1447
|
-
}, [p.expandLoading ? (
|
|
1448
|
-
e.virtualEnabled && e.offsetBottom > 0 ? (
|
|
1596
|
+
}, [p.expandLoading ? (k(), g(Et, { key: 0 })) : _("", !0), N(t.$slots, "expansion", T({ ref_for: !0 }, { row: p }))], 8, It)], 2)) : _("", !0)], 64))), 128)),
|
|
1597
|
+
e.virtualEnabled && e.offsetBottom > 0 ? (k(), v("tr", Lt, [y("td", {
|
|
1449
1598
|
colspan: c.value,
|
|
1450
|
-
style:
|
|
1599
|
+
style: ee({
|
|
1451
1600
|
height: `${e.offsetBottom}px`,
|
|
1452
1601
|
padding: 0,
|
|
1453
1602
|
border: 0
|
|
1454
1603
|
})
|
|
1455
|
-
}, null, 12,
|
|
1604
|
+
}, null, 12, Rt)])) : _("", !0),
|
|
1456
1605
|
N(t.$slots, "body-append", O(w({
|
|
1457
1606
|
items: e.pageItems,
|
|
1458
1607
|
pagination: e.pagination,
|
|
1459
1608
|
headers: e.headersForRender
|
|
1460
1609
|
})))
|
|
1461
|
-
]));
|
|
1610
|
+
], 16));
|
|
1462
1611
|
}
|
|
1463
|
-
}),
|
|
1612
|
+
}), Bt = ["aria-label", "aria-expanded"], Vt = { class: "m-table__filter-title" }, Ht = ["aria-label"], Ut = { class: "m-table__filter-actions" }, J = /* @__PURE__ */ C({
|
|
1464
1613
|
__name: "TableHeaderFilter",
|
|
1465
1614
|
props: {
|
|
1466
1615
|
columnKey: {},
|
|
@@ -1495,7 +1644,7 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1495
1644
|
function O() {
|
|
1496
1645
|
d.value = "", f.value = [];
|
|
1497
1646
|
}
|
|
1498
|
-
return (t, r) => (
|
|
1647
|
+
return (t, r) => (k(), v("span", {
|
|
1499
1648
|
class: "m-table__filter",
|
|
1500
1649
|
onClick: r[3] ||= R(() => {}, ["stop"])
|
|
1501
1650
|
}, [S(l, {
|
|
@@ -1508,19 +1657,19 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1508
1657
|
class: "m-table__filter-panel",
|
|
1509
1658
|
onClick: r[1] ||= R(() => {}, ["stop"])
|
|
1510
1659
|
}, [
|
|
1511
|
-
y("p",
|
|
1512
|
-
_.value ? (
|
|
1660
|
+
y("p", Vt, P(C.value), 1),
|
|
1661
|
+
_.value ? (k(), v("div", {
|
|
1513
1662
|
key: 0,
|
|
1514
1663
|
class: "m-table__filter-options",
|
|
1515
1664
|
role: "group",
|
|
1516
1665
|
"aria-label": C.value
|
|
1517
|
-
}, [(
|
|
1666
|
+
}, [(k(!0), v(m, null, M(e.filters, (e, t) => (k(), v("label", {
|
|
1518
1667
|
key: t,
|
|
1519
1668
|
class: "m-table__filter-option"
|
|
1520
1669
|
}, [S(a, {
|
|
1521
1670
|
"model-value": T(e.value),
|
|
1522
1671
|
"onUpdate:modelValue": (t) => w(e.value, t)
|
|
1523
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"]), y("span", null, P(F(
|
|
1672
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"]), y("span", null, P(F(_e)(e)), 1)]))), 128))], 8, Ht)) : (k(), g(c, {
|
|
1524
1673
|
key: 1,
|
|
1525
1674
|
modelValue: d.value,
|
|
1526
1675
|
"onUpdate:modelValue": r[0] ||= (e) => d.value = e,
|
|
@@ -1532,7 +1681,7 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1532
1681
|
"placeholder",
|
|
1533
1682
|
"onKeydown"
|
|
1534
1683
|
])),
|
|
1535
|
-
y("div",
|
|
1684
|
+
y("div", Ut, [S(i, {
|
|
1536
1685
|
size: "sm",
|
|
1537
1686
|
variant: "text",
|
|
1538
1687
|
onClick: O
|
|
@@ -1553,28 +1702,34 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1553
1702
|
class: D(["m-table__filter-btn", { "m-table__filter-btn--active": b.value }]),
|
|
1554
1703
|
"aria-label": C.value,
|
|
1555
1704
|
"aria-expanded": u.value
|
|
1556
|
-
}, [S(n, { name: "filter" })], 10,
|
|
1705
|
+
}, [S(n, { name: "filter" })], 10, Bt)]),
|
|
1557
1706
|
_: 1
|
|
1558
1707
|
}, 8, ["modelValue"])]));
|
|
1559
1708
|
}
|
|
1560
|
-
}),
|
|
1709
|
+
}), Wt = ["role"], Y = [
|
|
1561
1710
|
"colspan",
|
|
1562
1711
|
"rowspan",
|
|
1563
1712
|
"aria-sort",
|
|
1564
1713
|
"tabindex",
|
|
1714
|
+
"role",
|
|
1715
|
+
"draggable",
|
|
1565
1716
|
"onClick",
|
|
1566
|
-
"onKeydown"
|
|
1567
|
-
|
|
1717
|
+
"onKeydown",
|
|
1718
|
+
"onDragstart",
|
|
1719
|
+
"onDragover",
|
|
1720
|
+
"onDragleave",
|
|
1721
|
+
"onDrop"
|
|
1722
|
+
], X = {
|
|
1568
1723
|
key: 0,
|
|
1569
1724
|
class: "m-table__cell-inner m-table__cell-inner--selection"
|
|
1570
|
-
},
|
|
1725
|
+
}, Gt = ["aria-label"], Kt = ["title"], qt = {
|
|
1571
1726
|
key: 3,
|
|
1572
1727
|
class: "m-table__sort",
|
|
1573
1728
|
"aria-hidden": "true"
|
|
1574
|
-
},
|
|
1729
|
+
}, Jt = {
|
|
1575
1730
|
key: 4,
|
|
1576
1731
|
class: "m-table__multi-sort-number"
|
|
1577
|
-
},
|
|
1732
|
+
}, Yt = ["onMousedown"], Xt = /* @__PURE__ */ C({
|
|
1578
1733
|
__name: "TableThead",
|
|
1579
1734
|
props: {
|
|
1580
1735
|
rows: {},
|
|
@@ -1590,18 +1745,22 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1590
1745
|
hasFixedHeaders: { type: Boolean },
|
|
1591
1746
|
filterValues: {},
|
|
1592
1747
|
isMultiSorting: { type: Function },
|
|
1593
|
-
getMultiSortNumber: { type: Function }
|
|
1748
|
+
getMultiSortNumber: { type: Function },
|
|
1749
|
+
treeEnabled: { type: Boolean },
|
|
1750
|
+
pt: {},
|
|
1751
|
+
columnDrag: { type: Boolean }
|
|
1594
1752
|
},
|
|
1595
1753
|
emits: [
|
|
1596
1754
|
"sort",
|
|
1597
1755
|
"toggle-select-all",
|
|
1598
1756
|
"filter-apply",
|
|
1599
|
-
"resize-start"
|
|
1757
|
+
"resize-start",
|
|
1758
|
+
"column-drop"
|
|
1600
1759
|
],
|
|
1601
1760
|
setup(e, { emit: t }) {
|
|
1602
1761
|
let r = e, i = t, o = ae(), s = p();
|
|
1603
1762
|
function c(e) {
|
|
1604
|
-
let t =
|
|
1763
|
+
let t = he(e.align);
|
|
1605
1764
|
return t === "center" ? "center" : t === "end" ? "right" : t === "start" ? "left" : r.headerTextDirection;
|
|
1606
1765
|
}
|
|
1607
1766
|
function l(e) {
|
|
@@ -1629,19 +1788,59 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1629
1788
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), f(e));
|
|
1630
1789
|
}
|
|
1631
1790
|
function y(e) {
|
|
1632
|
-
return
|
|
1791
|
+
return me(e, "th", r.fixedColumnsInfos, r.hasFixedHeaders);
|
|
1792
|
+
}
|
|
1793
|
+
let b = j(null), x = j(null);
|
|
1794
|
+
function C(e) {
|
|
1795
|
+
return !r.columnDrag || (e.colspan ?? 1) > 1 ? !1 : !se(e.value);
|
|
1796
|
+
}
|
|
1797
|
+
function w(e, t) {
|
|
1798
|
+
if (!C(e)) {
|
|
1799
|
+
t.preventDefault();
|
|
1800
|
+
return;
|
|
1801
|
+
}
|
|
1802
|
+
b.value = e.value, t.dataTransfer && (t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e.value));
|
|
1633
1803
|
}
|
|
1634
|
-
|
|
1804
|
+
function E(e, t) {
|
|
1805
|
+
r.columnDrag && (!b.value || b.value === e.value || C(e) && (t.preventDefault(), t.dataTransfer && (t.dataTransfer.dropEffect = "move"), x.value = e.value));
|
|
1806
|
+
}
|
|
1807
|
+
function O(e) {
|
|
1808
|
+
x.value === e.value && (x.value = null);
|
|
1809
|
+
}
|
|
1810
|
+
function te(e, t) {
|
|
1811
|
+
if (!r.columnDrag) return;
|
|
1812
|
+
t.preventDefault();
|
|
1813
|
+
let n = b.value, a = e.value;
|
|
1814
|
+
b.value = null, x.value = null, !(!n || n === a) && C(e) && i("column-drop", n, a);
|
|
1815
|
+
}
|
|
1816
|
+
function ne() {
|
|
1817
|
+
b.value = null, x.value = null;
|
|
1818
|
+
}
|
|
1819
|
+
return (t, r) => (k(), v("thead", T(e.pt, { class: ["m-table__header", [e.headerClassName]] }), [(k(!0), v(m, null, M(e.rows, (c, p) => (k(), v("tr", {
|
|
1820
|
+
key: p,
|
|
1821
|
+
role: e.treeEnabled ? "row" : void 0
|
|
1822
|
+
}, [(k(!0), v(m, null, M(c, (c, p) => (k(), v("th", {
|
|
1635
1823
|
key: `${c.value}-${p}`,
|
|
1636
|
-
class: D(u(c, p)
|
|
1637
|
-
|
|
1824
|
+
class: D([u(c, p), {
|
|
1825
|
+
"m-table__header-cell--draggable": C(c),
|
|
1826
|
+
"m-table__header-cell--drag-over": x.value === c.value,
|
|
1827
|
+
"m-table__header-cell--drag-source": b.value === c.value
|
|
1828
|
+
}]),
|
|
1829
|
+
style: ee(y(c.value)),
|
|
1638
1830
|
colspan: c.colspan || 1,
|
|
1639
1831
|
rowspan: c.rowspan || 1,
|
|
1640
1832
|
"aria-sort": d(c),
|
|
1641
1833
|
tabindex: c.sortable ? 0 : void 0,
|
|
1834
|
+
role: e.treeEnabled ? "columnheader" : void 0,
|
|
1835
|
+
draggable: C(c) || void 0,
|
|
1642
1836
|
onClick: R((e) => f(c), ["stop"]),
|
|
1643
|
-
onKeydown: (e) => h(c, e)
|
|
1644
|
-
|
|
1837
|
+
onKeydown: (e) => h(c, e),
|
|
1838
|
+
onDragstart: (e) => w(c, e),
|
|
1839
|
+
onDragover: (e) => E(c, e),
|
|
1840
|
+
onDragleave: (e) => O(c),
|
|
1841
|
+
onDrop: (e) => te(c, e),
|
|
1842
|
+
onDragend: ne
|
|
1843
|
+
}, [c.value === F(z).checkbox ? (k(), v("div", X, [e.showCheckboxHeader === !1 ? _("", !0) : (k(), g(a, {
|
|
1645
1844
|
key: e.multipleSelectStatus,
|
|
1646
1845
|
"model-value": e.multipleSelectStatus === "allSelected",
|
|
1647
1846
|
indeterminate: e.multipleSelectStatus === "partSelected",
|
|
@@ -1652,29 +1851,29 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1652
1851
|
"model-value",
|
|
1653
1852
|
"indeterminate",
|
|
1654
1853
|
"aria-label"
|
|
1655
|
-
]))])) : c.value === F(z).radio ? (
|
|
1854
|
+
]))])) : c.value === F(z).radio ? (k(), v("div", {
|
|
1656
1855
|
key: 1,
|
|
1657
1856
|
class: "m-table__cell-inner m-table__cell-inner--selection",
|
|
1658
1857
|
role: "columnheader",
|
|
1659
1858
|
"aria-label": F(s).selectOption
|
|
1660
|
-
}, null, 8,
|
|
1859
|
+
}, null, 8, Gt)) : (k(), v("span", {
|
|
1661
1860
|
key: 2,
|
|
1662
1861
|
class: D(l(c))
|
|
1663
1862
|
}, [
|
|
1664
|
-
F(o)[`header-${c.value}`] ? N(t.$slots, `header-${c.value}`, T({ ref_for: !0 }, c), void 0, void 0, 0) : F(o).header ? N(t.$slots, "header", T({ ref_for: !0 }, c), void 0, void 0, 1) : (
|
|
1863
|
+
F(o)[`header-${c.value}`] ? N(t.$slots, `header-${c.value}`, T({ ref_for: !0 }, c), void 0, void 0, 0) : F(o).header ? N(t.$slots, "header", T({ ref_for: !0 }, c), void 0, void 0, 1) : (k(), v("span", {
|
|
1665
1864
|
key: 2,
|
|
1666
1865
|
class: "m-table__header-text",
|
|
1667
1866
|
title: c.text
|
|
1668
|
-
}, P(c.text), 9,
|
|
1669
|
-
c.sortable ? (
|
|
1867
|
+
}, P(c.text), 9, Kt)),
|
|
1868
|
+
c.sortable ? (k(), v("span", qt, [S(n, {
|
|
1670
1869
|
name: "triangle-up",
|
|
1671
1870
|
class: "m-table__sort-icon m-table__sort-icon--ascending"
|
|
1672
1871
|
}), S(n, {
|
|
1673
1872
|
name: "triangle-down",
|
|
1674
1873
|
class: "m-table__sort-icon m-table__sort-icon--descending"
|
|
1675
1874
|
})])) : _("", !0),
|
|
1676
|
-
e.multiSort && e.isMultiSorting(c.value) ? (
|
|
1677
|
-
c.filterable ? (
|
|
1875
|
+
e.multiSort && e.isMultiSorting(c.value) ? (k(), v("span", Jt, P(e.getMultiSortNumber(c.value)), 1)) : _("", !0),
|
|
1876
|
+
c.filterable ? (k(), g(J, {
|
|
1678
1877
|
key: 5,
|
|
1679
1878
|
"column-key": c.value,
|
|
1680
1879
|
label: c.text,
|
|
@@ -1690,27 +1889,24 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1690
1889
|
"onApply",
|
|
1691
1890
|
"onClear"
|
|
1692
1891
|
])) : _("", !0)
|
|
1693
|
-
], 2)), c.resizable ? (
|
|
1892
|
+
], 2)), c.resizable ? (k(), v("span", {
|
|
1694
1893
|
key: 3,
|
|
1695
1894
|
class: "m-table__resize-handle",
|
|
1696
1895
|
onMousedown: (e) => i("resize-start", c, e),
|
|
1697
1896
|
onClick: r[2] ||= R(() => {}, ["stop"])
|
|
1698
|
-
}, null, 40,
|
|
1897
|
+
}, null, 40, Yt)) : _("", !0)], 46, Y))), 128))], 8, Wt))), 128))], 16));
|
|
1699
1898
|
}
|
|
1700
|
-
}),
|
|
1701
|
-
key: 4,
|
|
1702
|
-
class: "m-table__tfoot"
|
|
1703
|
-
}, Xt = { class: "m-table__cell-inner" }, Zt = { class: "m-table__cell-text" }, Qt = {
|
|
1899
|
+
}), Zt = {
|
|
1704
1900
|
key: 0,
|
|
1705
|
-
class: "m-
|
|
1706
|
-
|
|
1707
|
-
|
|
1901
|
+
class: "m-table__column-setting-anchor"
|
|
1902
|
+
}, Qt = ["aria-busy"], $t = ["aria-label", "role"], en = {
|
|
1903
|
+
key: 3,
|
|
1904
|
+
class: "m-table__body m-table__body--skeleton",
|
|
1905
|
+
"aria-hidden": "true"
|
|
1906
|
+
}, tn = { class: "m-table__cell-inner" }, nn = { class: "m-table__cell-text" }, rn = { class: "m-table__empty-text" }, an = {
|
|
1708
1907
|
key: 0,
|
|
1709
1908
|
class: "m-table__empty-description"
|
|
1710
|
-
},
|
|
1711
|
-
key: 0,
|
|
1712
|
-
class: "m-table__footer"
|
|
1713
|
-
}, nn = { class: "m-table__items-index" }, rn = " / ", an = /* @__PURE__ */ C({
|
|
1909
|
+
}, on = { class: "m-table__items-index" }, sn = " / ", cn = /* @__PURE__ */ C({
|
|
1714
1910
|
inheritAttrs: !1,
|
|
1715
1911
|
__name: "Table",
|
|
1716
1912
|
props: {
|
|
@@ -1722,19 +1918,9 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1722
1918
|
selectedItem: { default: null },
|
|
1723
1919
|
serverOptions: { default: null },
|
|
1724
1920
|
serverTotal: { default: 0 },
|
|
1725
|
-
|
|
1726
|
-
sortOrder: { default: "asc" },
|
|
1727
|
-
sortMode: { default: "client" },
|
|
1728
|
-
multiSort: {
|
|
1729
|
-
type: Boolean,
|
|
1730
|
-
default: !1
|
|
1731
|
-
},
|
|
1732
|
-
mustSort: {
|
|
1733
|
-
type: Boolean,
|
|
1734
|
-
default: !1
|
|
1735
|
-
},
|
|
1921
|
+
sortConfig: { default: null },
|
|
1736
1922
|
filterOptions: { default: null },
|
|
1737
|
-
|
|
1923
|
+
filterModel: { default: null },
|
|
1738
1924
|
searchField: { default: "" },
|
|
1739
1925
|
searchValue: { default: "" },
|
|
1740
1926
|
rowsPerPage: { default: 25 },
|
|
@@ -1752,6 +1938,11 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1752
1938
|
type: Boolean,
|
|
1753
1939
|
default: !1
|
|
1754
1940
|
},
|
|
1941
|
+
skeleton: {
|
|
1942
|
+
type: Boolean,
|
|
1943
|
+
default: !1
|
|
1944
|
+
},
|
|
1945
|
+
skeletonRows: { default: 5 },
|
|
1755
1946
|
emptyText: { default: void 0 },
|
|
1756
1947
|
emptyDescription: { default: void 0 },
|
|
1757
1948
|
striped: {
|
|
@@ -1857,8 +2048,20 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1857
2048
|
default: !1
|
|
1858
2049
|
},
|
|
1859
2050
|
virtualRowHeight: { default: 40 },
|
|
2051
|
+
virtualDynamicRowHeight: {
|
|
2052
|
+
type: Boolean,
|
|
2053
|
+
default: !1
|
|
2054
|
+
},
|
|
1860
2055
|
hiddenColumns: { default: null },
|
|
1861
2056
|
columnOrder: { default: null },
|
|
2057
|
+
columnSetting: {
|
|
2058
|
+
type: Boolean,
|
|
2059
|
+
default: !1
|
|
2060
|
+
},
|
|
2061
|
+
columnDrag: {
|
|
2062
|
+
type: Boolean,
|
|
2063
|
+
default: !1
|
|
2064
|
+
},
|
|
1862
2065
|
showFooter: {
|
|
1863
2066
|
type: Boolean,
|
|
1864
2067
|
default: !1
|
|
@@ -1882,9 +2085,9 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1882
2085
|
"select-row",
|
|
1883
2086
|
"deselect-row",
|
|
1884
2087
|
"select-all",
|
|
1885
|
-
"expand",
|
|
1886
|
-
"sort",
|
|
1887
|
-
"filter",
|
|
2088
|
+
"expand-change",
|
|
2089
|
+
"sort-change",
|
|
2090
|
+
"filter-change",
|
|
1888
2091
|
"update:selection",
|
|
1889
2092
|
"update:selectedItem",
|
|
1890
2093
|
"update:serverOptions",
|
|
@@ -1892,435 +2095,480 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
1892
2095
|
"current-change",
|
|
1893
2096
|
"update:page",
|
|
1894
2097
|
"update:expandedRowKeys",
|
|
1895
|
-
"update:
|
|
2098
|
+
"update:filterModel",
|
|
1896
2099
|
"update:columnWidths",
|
|
1897
2100
|
"update:hiddenColumns",
|
|
1898
2101
|
"update:columnOrder"
|
|
1899
2102
|
],
|
|
1900
2103
|
setup(n, { expose: i, emit: a }) {
|
|
1901
|
-
let c = n, l = a, u = ie(),
|
|
2104
|
+
let c = n, l = a, u = ie(), d = h(() => e(u, c.pt?.root)), x = h(() => c.pt?.scrollbar), C = h(() => c.pt?.thead), oe = h(() => c.pt?.tbody), R = h(() => c.pt?.tfoot), ue = h(() => c.pt?.pagination), de = h(() => c.pt?.emptyMessage), B = (e, ...t) => {
|
|
1902
2105
|
l(e, ...t);
|
|
1903
|
-
}, { value:
|
|
1904
|
-
controlled: () => c.
|
|
2106
|
+
}, { value: ge, setValue: _e } = t({
|
|
2107
|
+
controlled: () => c.filterModel ?? void 0,
|
|
1905
2108
|
defaultValue: null
|
|
1906
2109
|
}, (e) => {
|
|
1907
|
-
l("filter", e), l("update:
|
|
1908
|
-
}), { value:
|
|
2110
|
+
l("filter-change", e), l("update:filterModel", e);
|
|
2111
|
+
}), { value: ve, setValue: ye } = t({
|
|
1909
2112
|
controlled: () => c.columnWidths ?? void 0,
|
|
1910
2113
|
defaultValue: null
|
|
1911
2114
|
}, (e) => {
|
|
1912
2115
|
l("update:columnWidths", e ?? {});
|
|
1913
|
-
}), { value:
|
|
2116
|
+
}), { value: be, setValue: xe } = t({
|
|
1914
2117
|
controlled: () => c.hiddenColumns ?? void 0,
|
|
1915
2118
|
defaultValue: null
|
|
1916
2119
|
}, (e) => {
|
|
1917
2120
|
l("update:hiddenColumns", e ?? []);
|
|
1918
|
-
}), { value:
|
|
2121
|
+
}), { value: Se, setValue: Ce } = t({
|
|
1919
2122
|
controlled: () => c.columnOrder ?? void 0,
|
|
1920
2123
|
defaultValue: null
|
|
1921
2124
|
}, (e) => {
|
|
1922
2125
|
l("update:columnOrder", e ?? []);
|
|
1923
|
-
}),
|
|
1924
|
-
hiddenColumns:
|
|
1925
|
-
columnOrder:
|
|
1926
|
-
columnWidths:
|
|
1927
|
-
})),
|
|
1928
|
-
if (
|
|
1929
|
-
if (
|
|
1930
|
-
}),
|
|
1931
|
-
|
|
1932
|
-
|
|
2126
|
+
}), we = p(), { bodyTextDirection: V, checkboxColumnWidth: Ae, expandColumnWidth: je, expandedRowKeys: Me, filterOptions: Ne, fixedCheckbox: Pe, fixedExpand: G, fixedHeader: Fe, fixedIndex: Ie, headerTextDirection: Le, indexColumnWidth: Re, selectionMode: ze, selectedItem: K, loading: Ge, pageSizes: Ke, rowsPerPage: Ze, searchField: Qe, searchValue: $e, serverTotal: et, serverOptions: tt, showIndex: nt, tableHeight: rt, tableMinHeight: it, fill: at, showIndexSymbol: ot, headerItemClassName: dt, bodyRowClassName: gt, bodyExpandRowClassName: _t, bodyItemClassName: vt, tableClassName: yt, headerClassName: xt, showRowsPerPage: St, clickRowToExpand: Ct, expandable: wt, expandConfig: Tt, emptyDescription: Et, fit: Dt, emptyText: Ot, showHeader: kt, maxHeight: At, paginator: jt, rowKey: q, ariaLabel: Mt, size: Nt, virtual: Pt, virtualRowHeight: Ft, showFooter: It, footerMethod: Lt, spanMethod: Rt, treeConfig: Bt, checkboxConfig: Vt, radioConfig: Ht } = re(c), Ut = h(() => Te(c.columns, {
|
|
2127
|
+
hiddenColumns: be.value,
|
|
2128
|
+
columnOrder: Se.value,
|
|
2129
|
+
columnWidths: ve.value
|
|
2130
|
+
})), J = h(() => Ee(Ut.value)), Wt = h(() => De(Ut.value)), { treeEnabled: Y, treeResolved: X, treeRoots: Gt, flatRows: Kt, treeMeta: qt, expandedKeys: Jt, toggleTreeNode: Yt, isTreeExpandByRow: cn, getTreeExpandRecords: ln, setTreeExpand: un, setAllTreeExpand: dn, clearTreeExpand: fn, toggleTreeExpand: pn } = mt(Bt, h(() => c.rows), q, Me, $e, Qe, B), mn = h(() => Y.value ? Kt.value : c.rows), hn = h(() => Y.value ? "" : $e.value), gn = h(() => c.selection ?? null), _n = h(() => ke(c.sortConfig?.field)), vn = h(() => Oe(c.sortConfig?.order)), yn = h(() => !!c.sortConfig?.multiple), bn = h(() => !!c.sortConfig?.must), xn = h(() => c.sortConfig?.mode ?? "client"), Sn = h(() => c.page ?? 1), Cn = h(() => c.striped), wn = h(() => c.bordered), Tn = h(() => c.highlightCurrent), En = h(() => !c.rowHover), Dn = f("Table", () => Nt.value), On = h(() => {
|
|
2131
|
+
if (Dn.value === "small") return "m-table--small";
|
|
2132
|
+
if (Dn.value === "large") return "m-table--large";
|
|
2133
|
+
}), kn = h(() => [
|
|
2134
|
+
yt.value,
|
|
2135
|
+
On.value,
|
|
1933
2136
|
{
|
|
1934
|
-
"m-table--border":
|
|
1935
|
-
"m-table--striped":
|
|
1936
|
-
"m-table--enable-row-hover": !
|
|
1937
|
-
"m-table--fill":
|
|
1938
|
-
"m-table--virtual":
|
|
1939
|
-
"m-table--tree":
|
|
1940
|
-
"m-table--tree-line":
|
|
2137
|
+
"m-table--border": wn.value,
|
|
2138
|
+
"m-table--striped": Cn.value,
|
|
2139
|
+
"m-table--enable-row-hover": !En.value,
|
|
2140
|
+
"m-table--fill": at.value && !Ln.value,
|
|
2141
|
+
"m-table--virtual": mi.value,
|
|
2142
|
+
"m-table--tree": Y.value,
|
|
2143
|
+
"m-table--tree-line": Y.value && X.value.showLine
|
|
1941
2144
|
}
|
|
1942
|
-
]),
|
|
1943
|
-
checkStrictly:
|
|
1944
|
-
checkMethod:
|
|
1945
|
-
showHeader:
|
|
1946
|
-
checkRowKeys:
|
|
1947
|
-
reserve:
|
|
1948
|
-
trigger:
|
|
1949
|
-
})),
|
|
1950
|
-
strict:
|
|
1951
|
-
checkMethod:
|
|
1952
|
-
trigger:
|
|
1953
|
-
})),
|
|
2145
|
+
]), An = h(() => Y.value ? X.value.treeNode ? X.value.treeNode : J.value[0]?.value ?? null : null), jn = h(() => Y.value && X.value.trigger === "row"), Mn = h(() => ({
|
|
2146
|
+
checkStrictly: Vt.value?.checkStrictly ?? !1,
|
|
2147
|
+
checkMethod: Vt.value?.checkMethod,
|
|
2148
|
+
showHeader: Vt.value?.showHeader !== !1,
|
|
2149
|
+
checkRowKeys: Vt.value?.checkRowKeys,
|
|
2150
|
+
reserve: Vt.value?.reserve !== !1,
|
|
2151
|
+
trigger: Vt.value?.trigger ?? "default"
|
|
2152
|
+
})), Nn = h(() => ({
|
|
2153
|
+
strict: Ht.value?.strict !== !1,
|
|
2154
|
+
checkMethod: Ht.value?.checkMethod,
|
|
2155
|
+
trigger: Ht.value?.trigger ?? "default"
|
|
2156
|
+
})), Pn = h(() => Y.value && !Mn.value.checkStrictly), Fn = h(() => ci.value.length > 0 || Dt.value !== !1), In = h(() => Ot.value ?? we.value.emptyMessage), Ln = h(() => At.value ?? rt.value), Rn = h(() => at.value && !Ln.value), zn = h(() => rt.value ? `${rt.value}px` : Rn.value ? "100%" : null), Bn = h(() => At.value ? `${At.value}px` : null), Vn = h(() => `${it.value}px`), Z = ae(), Hn = h(() => !!Z.pagination), Un = h(() => !!Z.loading), Wn = h(() => c.skeleton), Gn = h(() => Math.max(1, c.skeletonRows ?? 5)), Kn = h(() => !Y.value && (wt.value || !!Tt.value || !!Z.expansion)), qn = Kn, Jn = h(() => !!Z.body), Yn = h(() => !!Z.footer), Xn = h(() => {
|
|
1954
2157
|
let e = /* @__PURE__ */ new Map();
|
|
1955
|
-
for (let t of
|
|
2158
|
+
for (let t of J.value) t.render && e.set(t.value, t.render);
|
|
1956
2159
|
return e;
|
|
1957
|
-
}),
|
|
2160
|
+
}), Zn = h(() => {
|
|
1958
2161
|
let e = /* @__PURE__ */ new Map();
|
|
1959
|
-
for (let t of
|
|
1960
|
-
let n =
|
|
2162
|
+
for (let t of J.value) {
|
|
2163
|
+
let n = he(t.align);
|
|
1961
2164
|
n && e.set(t.value, n);
|
|
1962
2165
|
}
|
|
1963
2166
|
return e;
|
|
1964
|
-
}),
|
|
1965
|
-
|
|
1966
|
-
let
|
|
1967
|
-
function
|
|
1968
|
-
|
|
1969
|
-
let t =
|
|
1970
|
-
|
|
1971
|
-
}
|
|
1972
|
-
let
|
|
1973
|
-
|
|
2167
|
+
}), Qn = j(), $n = j();
|
|
2168
|
+
A(ce, Qn);
|
|
2169
|
+
let er = j(!1), tr = j(!1), nr = j(null), rr = j(0), ir = j(0), ar = h(() => c.currentRowKey ?? nr.value);
|
|
2170
|
+
function or(e) {
|
|
2171
|
+
rr.value = e.scrollTop, er.value = e.scrollLeft > 0;
|
|
2172
|
+
let t = $n.value?.wrapRef;
|
|
2173
|
+
tr.value = t ? t.scrollWidth - t.clientWidth - t.scrollLeft > 1 : !1;
|
|
2174
|
+
}
|
|
2175
|
+
let sr;
|
|
2176
|
+
function cr() {
|
|
2177
|
+
let e = $n.value?.wrapRef;
|
|
2178
|
+
e && (ir.value = e.clientHeight);
|
|
2179
|
+
}
|
|
2180
|
+
function lr() {
|
|
2181
|
+
if (typeof ResizeObserver > "u") return;
|
|
2182
|
+
let e = $n.value?.wrapRef;
|
|
2183
|
+
e && (sr?.disconnect(), sr = new ResizeObserver(() => {
|
|
2184
|
+
cr();
|
|
2185
|
+
}), sr.observe(e));
|
|
2186
|
+
}
|
|
2187
|
+
te(() => {
|
|
2188
|
+
sr?.disconnect(), sr = void 0;
|
|
2189
|
+
});
|
|
2190
|
+
let ur = h(() => {
|
|
2191
|
+
let e = ze.value ?? (gn.value === null ? null : "multiple");
|
|
1974
2192
|
return e === "multiple" ? "checkbox" : e === "single" ? "radio" : null;
|
|
1975
|
-
}),
|
|
1976
|
-
"m-table__main--fixed-header":
|
|
1977
|
-
"m-table__main--fixed-height": !!
|
|
1978
|
-
"m-table__main--shadow":
|
|
1979
|
-
"m-table__main--shadow-end":
|
|
1980
|
-
"m-table__main--table-fixed":
|
|
1981
|
-
"m-table__main--border-cell":
|
|
1982
|
-
}]),
|
|
1983
|
-
showIndexSymbol:
|
|
1984
|
-
checkboxColumnWidth:
|
|
1985
|
-
expandColumnWidth:
|
|
1986
|
-
fixedCheckbox:
|
|
1987
|
-
fixedExpand:
|
|
1988
|
-
fixedIndex:
|
|
1989
|
-
headers:
|
|
1990
|
-
ifHasExpandSlot:
|
|
1991
|
-
indexColumnWidth:
|
|
1992
|
-
selectionColumn:
|
|
1993
|
-
isServerSideMode:
|
|
1994
|
-
mustSort:
|
|
1995
|
-
serverOptionsComputed:
|
|
1996
|
-
showIndex:
|
|
1997
|
-
sortBy:
|
|
1998
|
-
sortType:
|
|
1999
|
-
multiSort:
|
|
2000
|
-
sortMode:
|
|
2001
|
-
updateServerOptionsSort:
|
|
2002
|
-
emits:
|
|
2003
|
-
}),
|
|
2004
|
-
if (!
|
|
2005
|
-
let e =
|
|
2006
|
-
return e >= 0 ?
|
|
2007
|
-
}), { currentPaginationNumber:
|
|
2008
|
-
function
|
|
2009
|
-
if (
|
|
2010
|
-
let t =
|
|
2193
|
+
}), dr = h(() => ur.value === "checkbox"), fr = h(() => ur.value === "radio"), pr = h(() => ["m-table__main", {
|
|
2194
|
+
"m-table__main--fixed-header": Fe.value,
|
|
2195
|
+
"m-table__main--fixed-height": !!Ln.value || Rn.value,
|
|
2196
|
+
"m-table__main--shadow": er.value,
|
|
2197
|
+
"m-table__main--shadow-end": tr.value,
|
|
2198
|
+
"m-table__main--table-fixed": Fn.value,
|
|
2199
|
+
"m-table__main--border-cell": wn.value
|
|
2200
|
+
}]), mr = h(() => ({ minHeight: Vn.value })), hr = h(() => tt.value !== null), { serverOptionsComputed: gr, updateServerOptionsPage: _r, updateServerOptionsSort: vr, updateServerOptionsRowsPerPage: yr } = ft(tt, yn, B), { clientSortOptions: br, headerColumns: xr, headersForRender: Q, updateSortField: Sr, clearSort: Cr, isMultiSorting: wr, getMultiSortNumber: Tr } = Je({
|
|
2201
|
+
showIndexSymbol: ot,
|
|
2202
|
+
checkboxColumnWidth: Ae,
|
|
2203
|
+
expandColumnWidth: je,
|
|
2204
|
+
fixedCheckbox: Pe,
|
|
2205
|
+
fixedExpand: G,
|
|
2206
|
+
fixedIndex: Ie,
|
|
2207
|
+
headers: J,
|
|
2208
|
+
ifHasExpandSlot: Kn,
|
|
2209
|
+
indexColumnWidth: Re,
|
|
2210
|
+
selectionColumn: ur,
|
|
2211
|
+
isServerSideMode: hr,
|
|
2212
|
+
mustSort: bn,
|
|
2213
|
+
serverOptionsComputed: gr,
|
|
2214
|
+
showIndex: nt,
|
|
2215
|
+
sortBy: _n,
|
|
2216
|
+
sortType: vn,
|
|
2217
|
+
multiSort: yn,
|
|
2218
|
+
sortMode: xn,
|
|
2219
|
+
updateServerOptionsSort: vr,
|
|
2220
|
+
emits: B
|
|
2221
|
+
}), Er = h(() => Y.value || xn.value === "emit" ? null : br.value), { pageSizesComputed: Dr, rowsPerPageRef: Or, updateRowsPerPage: kr } = ut(hr, Ke, tt, Ze), { totalItems: Ar, selectItemsComputed: $, totalItemsLength: jr, toggleSelectAll: Mr, toggleSelectItem: Nr } = pt(Er, Ne, ge, hr, mn, gn, Qe, hn, et, yn, q, B), Pr = h(() => Pn.value ? Ue(Gt.value, $.value, q.value, X.value.childrenField, Mn.value.checkMethod) : /* @__PURE__ */ new Set()), Fr = h(() => {
|
|
2222
|
+
if (!K.value) return null;
|
|
2223
|
+
let e = Ar.value.findIndex((e) => W(e, K.value, q.value));
|
|
2224
|
+
return e >= 0 ? H(K.value, e, q.value) : null;
|
|
2225
|
+
}), { currentPaginationNumber: Ir, maxPaginationNumber: Lr, isLastPage: Rr, isFirstPage: zr, nextPage: Br, prevPage: Vr, updatePage: Hr } = lt(Sn, hr, Ge, jr, Or, tt, _r), { currentPageFirstIndex: Ur, currentPageLastIndex: Wr, multipleSelectStatus: Gr, pageItems: Kr, itemsInPage: qr, isItemSelected: Jr } = ct(Ir, hr, mn, Or, $, nt, Ar, jr, q);
|
|
2226
|
+
function Yr(e) {
|
|
2227
|
+
if (Pn.value) {
|
|
2228
|
+
let t = q.value, n = X.value.childrenField, r = Mn.value.checkMethod, i = [...$.value];
|
|
2011
2229
|
if (e) {
|
|
2012
|
-
for (let e of
|
|
2013
|
-
let a =
|
|
2014
|
-
for (let e of a) i.some((n) =>
|
|
2230
|
+
for (let e of qr.value) {
|
|
2231
|
+
let a = Be(U(e), n).filter((e) => Ve(e, r)).map(U);
|
|
2232
|
+
for (let e of a) i.some((n) => W(n, e, t)) || i.push(e);
|
|
2015
2233
|
}
|
|
2016
|
-
i =
|
|
2234
|
+
i = We(Gt.value, i, t, n, r), $.value = i, B("select-all");
|
|
2017
2235
|
return;
|
|
2018
2236
|
}
|
|
2019
|
-
for (let e of
|
|
2020
|
-
let r =
|
|
2021
|
-
i = i.filter((e) => !r.some((n) =>
|
|
2237
|
+
for (let e of qr.value) {
|
|
2238
|
+
let r = Be(U(e), n);
|
|
2239
|
+
i = i.filter((e) => !r.some((n) => W(e, n, t)));
|
|
2022
2240
|
}
|
|
2023
|
-
i =
|
|
2241
|
+
i = We(Gt.value, i, t, n, r), $.value = i;
|
|
2024
2242
|
return;
|
|
2025
2243
|
}
|
|
2026
|
-
|
|
2244
|
+
Mr(!!e, qr.value);
|
|
2027
2245
|
}
|
|
2028
|
-
function
|
|
2029
|
-
let t =
|
|
2246
|
+
function Xr(e) {
|
|
2247
|
+
let t = Mn.value.checkMethod;
|
|
2030
2248
|
if (!(t && !t(e))) {
|
|
2031
|
-
if (
|
|
2032
|
-
let { next: n, selected: r } =
|
|
2033
|
-
selected:
|
|
2249
|
+
if (Pn.value) {
|
|
2250
|
+
let { next: n, selected: r } = He({
|
|
2251
|
+
selected: $.value,
|
|
2034
2252
|
row: e,
|
|
2035
|
-
rowKey:
|
|
2036
|
-
childrenField:
|
|
2253
|
+
rowKey: q.value,
|
|
2254
|
+
childrenField: X.value.childrenField,
|
|
2037
2255
|
checkStrictly: !1,
|
|
2038
2256
|
checkMethod: t
|
|
2039
|
-
}), i =
|
|
2040
|
-
|
|
2257
|
+
}), i = We(Gt.value, n, q.value, X.value.childrenField, t);
|
|
2258
|
+
$.value = i, B(r ? "select-row" : "deselect-row", U(e));
|
|
2041
2259
|
return;
|
|
2042
2260
|
}
|
|
2043
|
-
|
|
2261
|
+
Nr(e);
|
|
2044
2262
|
}
|
|
2045
2263
|
}
|
|
2046
|
-
let
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2264
|
+
let Zr = h(() => Ir.value === 0 ? 0 : (Ir.value - 1) * Or.value), { expandResolved: Qr, isRowExpanded: $r, isRowExpandByRow: ei, getRowExpandRecords: ti, setRowExpand: ni, setAllRowExpand: ri, clearRowExpand: ii, toggleRowExpand: ai, toggleExpandRow: oi } = st(Me, q, Zr, B, Tt, qn, Ar), si = h(() => !Y.value && (Ct.value || Qr.value.trigger === "row")), { fixedHeaders: ci, lastFixedColumn: li, firstRightFixedColumn: ui, fixedColumnsInfos: di } = qe(Q), { clickRow: fi, dblClickRow: pi } = Ye(B), mi = h(() => !!Pt.value && !Kn.value && !!(Ln.value || Rn.value)), { virtualItems: hi, startIndex: gi, offsetTop: _i, offsetBottom: vi, observeRow: yi, dynamicEnabled: bi } = ht(mi, Kr, Ft, rr, ir, 5, {
|
|
2265
|
+
dynamic: h(() => !!c.virtualDynamicRowHeight),
|
|
2266
|
+
rowKey: q
|
|
2267
|
+
}), xi = h(() => mi.value ? hi.value : Kr.value), Si = h(() => {
|
|
2268
|
+
if (!It.value || Yn.value || !Lt.value) return [];
|
|
2269
|
+
let e = Q.value.filter((e) => !se(e.value) || e.value === z.index || e.value === z.checkbox || e.value === z.radio || e.value === z.expand);
|
|
2270
|
+
return Lt.value({
|
|
2050
2271
|
columns: e,
|
|
2051
|
-
data:
|
|
2272
|
+
data: Ar.value
|
|
2052
2273
|
});
|
|
2053
|
-
}), { onResizeStart:
|
|
2054
|
-
function
|
|
2274
|
+
}), { onResizeStart: Ci } = Xe(J, ve, ye), wi = fe(Wt, Q);
|
|
2275
|
+
function Ti(e, t) {
|
|
2055
2276
|
t.preventDefault(), l("row-contextmenu", e, t);
|
|
2056
2277
|
}
|
|
2057
|
-
function
|
|
2058
|
-
return
|
|
2278
|
+
function Ei(e) {
|
|
2279
|
+
return pe(e, J.value, ci.value.length, Fn.value);
|
|
2059
2280
|
}
|
|
2060
|
-
function
|
|
2061
|
-
return
|
|
2281
|
+
function Di(e, t = "th") {
|
|
2282
|
+
return me(e, t, di.value, ci.value.length > 0);
|
|
2062
2283
|
}
|
|
2063
|
-
function
|
|
2064
|
-
return le(e,
|
|
2284
|
+
function Oi(e) {
|
|
2285
|
+
return le(e, Zn.value, V.value);
|
|
2065
2286
|
}
|
|
2066
|
-
function
|
|
2067
|
-
return
|
|
2287
|
+
function ki(e, t) {
|
|
2288
|
+
return H(e, Zr.value + t, q.value);
|
|
2068
2289
|
}
|
|
2069
|
-
function
|
|
2070
|
-
return
|
|
2290
|
+
function Ai(e, t) {
|
|
2291
|
+
return H(e, mi.value ? Zr.value + gi.value + t : Zr.value + t, q.value);
|
|
2071
2292
|
}
|
|
2072
|
-
function
|
|
2073
|
-
return
|
|
2293
|
+
function ji(e) {
|
|
2294
|
+
return mi.value ? gi.value + e : e;
|
|
2074
2295
|
}
|
|
2075
|
-
function
|
|
2076
|
-
let n =
|
|
2077
|
-
return
|
|
2296
|
+
function Mi(e, t) {
|
|
2297
|
+
let n = Ai(e, t);
|
|
2298
|
+
return Pr.value.has(n) ? !1 : dr.value ? Jr(e) : fr.value ? Fr.value === n : !1;
|
|
2078
2299
|
}
|
|
2079
|
-
function
|
|
2080
|
-
return
|
|
2300
|
+
function Ni(e, t) {
|
|
2301
|
+
return Pr.value.has(Ai(e, t));
|
|
2081
2302
|
}
|
|
2082
|
-
function
|
|
2083
|
-
if (
|
|
2084
|
-
let t =
|
|
2303
|
+
function Pi(e) {
|
|
2304
|
+
if (dr.value) {
|
|
2305
|
+
let t = Mn.value.checkMethod;
|
|
2085
2306
|
return t ? !t(e) : !1;
|
|
2086
2307
|
}
|
|
2087
|
-
if (
|
|
2088
|
-
let t =
|
|
2308
|
+
if (fr.value) {
|
|
2309
|
+
let t = Nn.value.checkMethod;
|
|
2089
2310
|
return t ? !t(e) : !1;
|
|
2090
2311
|
}
|
|
2091
2312
|
return !1;
|
|
2092
2313
|
}
|
|
2093
|
-
function
|
|
2094
|
-
if (
|
|
2095
|
-
let t =
|
|
2096
|
-
if (!
|
|
2314
|
+
function Fi(e) {
|
|
2315
|
+
if (Pi(e)) return;
|
|
2316
|
+
let t = U(e);
|
|
2317
|
+
if (!Nn.value.strict && K.value && W(K.value, t, q.value)) {
|
|
2097
2318
|
l("update:selectedItem", null), l("deselect-row", t);
|
|
2098
2319
|
return;
|
|
2099
2320
|
}
|
|
2100
2321
|
l("update:selectedItem", t), l("select-row", t);
|
|
2101
2322
|
}
|
|
2102
|
-
function
|
|
2103
|
-
|
|
2323
|
+
function Ii(e) {
|
|
2324
|
+
kr(e);
|
|
2104
2325
|
}
|
|
2105
|
-
function
|
|
2106
|
-
return !
|
|
2326
|
+
function Li(e, t) {
|
|
2327
|
+
return !Tn.value || ar.value == null ? !1 : ar.value === Ai(e, t);
|
|
2107
2328
|
}
|
|
2108
|
-
function
|
|
2109
|
-
if (!
|
|
2110
|
-
let n =
|
|
2329
|
+
function Ri(e, t) {
|
|
2330
|
+
if (!Tn.value) return;
|
|
2331
|
+
let n = Ai(e, t), r = ar.value;
|
|
2111
2332
|
if (r === n) return;
|
|
2112
|
-
let i = r == null ? null :
|
|
2113
|
-
|
|
2333
|
+
let i = r == null ? null : Kr.value.find((e, t) => ki(e, t) === r) ?? null;
|
|
2334
|
+
nr.value = n, l("update:currentRowKey", n), l("current-change", e, i);
|
|
2114
2335
|
}
|
|
2115
|
-
function
|
|
2116
|
-
let r =
|
|
2117
|
-
|
|
2336
|
+
function zi(e, t, n) {
|
|
2337
|
+
let r = Zr.value + ji(t);
|
|
2338
|
+
fi(e, r, n), Ri(e, t), jn.value && Yt(e, ji(t), n), dr.value && Mn.value.trigger === "row" ? Xr(e) : fr.value && Nn.value.trigger === "row" && Fi(e);
|
|
2118
2339
|
}
|
|
2119
|
-
function
|
|
2120
|
-
|
|
2340
|
+
function Bi(e, t, n) {
|
|
2341
|
+
Yt(e, t, n);
|
|
2121
2342
|
}
|
|
2122
|
-
function
|
|
2123
|
-
return
|
|
2343
|
+
function Vi(e, t) {
|
|
2344
|
+
return qt.value.get(Ai(e, t));
|
|
2124
2345
|
}
|
|
2125
|
-
function
|
|
2126
|
-
return
|
|
2346
|
+
function Hi(e, t) {
|
|
2347
|
+
return Jt.value.includes(Ai(e, t));
|
|
2127
2348
|
}
|
|
2128
|
-
function
|
|
2129
|
-
|
|
2349
|
+
function Ui(e, t, n) {
|
|
2350
|
+
pi(e, Zr.value + ji(t), n);
|
|
2130
2351
|
}
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2352
|
+
let Wi = h(() => J.value.filter((e) => !se(e.value)));
|
|
2353
|
+
function Gi(e, t) {
|
|
2354
|
+
let n = new Set(be.value ?? []);
|
|
2355
|
+
t ? n.delete(e) : n.add(e), xe(n.size ? [...n] : null);
|
|
2134
2356
|
}
|
|
2135
|
-
function
|
|
2136
|
-
|
|
2357
|
+
function Ki() {
|
|
2358
|
+
xe(null);
|
|
2359
|
+
}
|
|
2360
|
+
function qi(e, t) {
|
|
2361
|
+
let n = J.value.filter((e) => !se(e.value)).map((e) => e.value), r = Se.value?.length ? [...Se.value] : n, i = r.indexOf(e);
|
|
2362
|
+
if (i === -1) return;
|
|
2363
|
+
let a = r.indexOf(t);
|
|
2364
|
+
if (a === -1) return;
|
|
2365
|
+
r.splice(i, 1);
|
|
2366
|
+
let o = r.indexOf(t), s = i < a ? o + 1 : o;
|
|
2367
|
+
r.splice(s, 0, e), Ce(r);
|
|
2368
|
+
}
|
|
2369
|
+
function Ji(e, t) {
|
|
2370
|
+
let n = { ...ge.value ?? {} };
|
|
2371
|
+
t == null || t === "" || Array.isArray(t) && t.length === 0 ? delete n[e] : n[e] = t, _e(Object.keys(n).length ? n : null);
|
|
2137
2372
|
}
|
|
2138
|
-
function
|
|
2139
|
-
|
|
2140
|
-
e && (Xn.value = e.clientHeight);
|
|
2373
|
+
function Yi(e) {
|
|
2374
|
+
e.sortable && e.sortType && Sr(e.value, e.sortType);
|
|
2141
2375
|
}
|
|
2142
|
-
function
|
|
2143
|
-
return
|
|
2376
|
+
function Xi() {
|
|
2377
|
+
return $.value;
|
|
2144
2378
|
}
|
|
2145
|
-
function
|
|
2379
|
+
function Zi(e, t) {
|
|
2146
2380
|
let n = Array.isArray(e) ? e : [e];
|
|
2147
|
-
for (let e of n)
|
|
2381
|
+
for (let e of n) Jr(e) !== t && Xr(e);
|
|
2148
2382
|
}
|
|
2149
|
-
function
|
|
2150
|
-
|
|
2383
|
+
function Qi() {
|
|
2384
|
+
$.value = [];
|
|
2151
2385
|
}
|
|
2152
|
-
function
|
|
2153
|
-
let e =
|
|
2386
|
+
function $i() {
|
|
2387
|
+
let e = Pr.value;
|
|
2154
2388
|
if (!e.size) return [];
|
|
2155
|
-
if (
|
|
2156
|
-
let t =
|
|
2157
|
-
for (let r of
|
|
2158
|
-
let t =
|
|
2159
|
-
e.has(t) && n.push(
|
|
2389
|
+
if (Y.value) {
|
|
2390
|
+
let t = X.value.childrenField, n = [];
|
|
2391
|
+
for (let r of Gt.value) for (let i of Be(r, t)) {
|
|
2392
|
+
let t = H(i, 0, q.value);
|
|
2393
|
+
e.has(t) && n.push(U(i));
|
|
2160
2394
|
}
|
|
2161
2395
|
return n;
|
|
2162
2396
|
}
|
|
2163
|
-
return
|
|
2397
|
+
return Ar.value.filter((t, n) => e.has(H(t, n, q.value))).map(U);
|
|
2164
2398
|
}
|
|
2165
|
-
function
|
|
2166
|
-
return
|
|
2399
|
+
function ea(e) {
|
|
2400
|
+
return Jr(e);
|
|
2167
2401
|
}
|
|
2168
|
-
function
|
|
2169
|
-
return
|
|
2402
|
+
function ta() {
|
|
2403
|
+
return Gr.value === "allSelected";
|
|
2170
2404
|
}
|
|
2171
|
-
function
|
|
2172
|
-
|
|
2405
|
+
function na(...e) {
|
|
2406
|
+
$n.value?.scrollTo(...e);
|
|
2173
2407
|
}
|
|
2174
|
-
async function
|
|
2175
|
-
let t =
|
|
2408
|
+
async function ra(e) {
|
|
2409
|
+
let t = H(e, 0, q.value), n = Ar.value.findIndex((n, r) => H(n, r, q.value) === t || W(n, e, q.value));
|
|
2176
2410
|
if (n < 0) return;
|
|
2177
|
-
if (!
|
|
2178
|
-
let e = Math.floor(n /
|
|
2179
|
-
e !==
|
|
2411
|
+
if (!hr.value && Or.value > 0) {
|
|
2412
|
+
let e = Math.floor(n / Or.value) + 1;
|
|
2413
|
+
e !== Ir.value && Hr(e);
|
|
2180
2414
|
}
|
|
2181
2415
|
await E();
|
|
2182
|
-
let r =
|
|
2416
|
+
let r = Qn.value?.querySelector(`[data-row-key="${CSS.escape(String(t))}"]`);
|
|
2183
2417
|
if (r instanceof HTMLElement) {
|
|
2184
2418
|
r.scrollIntoView({ block: "nearest" });
|
|
2185
2419
|
return;
|
|
2186
2420
|
}
|
|
2187
|
-
|
|
2421
|
+
mi.value && Ft.value && $n.value?.setScrollTop(n * Ft.value);
|
|
2188
2422
|
}
|
|
2189
|
-
function
|
|
2190
|
-
|
|
2423
|
+
function ia() {
|
|
2424
|
+
_e(null);
|
|
2191
2425
|
}
|
|
2192
|
-
function
|
|
2193
|
-
let e =
|
|
2194
|
-
if (!e?.length || c.selection != null ||
|
|
2426
|
+
function aa() {
|
|
2427
|
+
let e = Mn.value.checkRowKeys;
|
|
2428
|
+
if (!e?.length || c.selection != null || $.value.length > 0) return;
|
|
2195
2429
|
let t = new Set(e), n;
|
|
2196
|
-
if (
|
|
2197
|
-
let e =
|
|
2430
|
+
if (Y.value) {
|
|
2431
|
+
let e = X.value.childrenField;
|
|
2198
2432
|
n = [];
|
|
2199
|
-
for (let r of
|
|
2200
|
-
let e =
|
|
2201
|
-
t.has(e) && n.push(
|
|
2433
|
+
for (let r of Gt.value) for (let i of Be(r, e)) {
|
|
2434
|
+
let e = H(i, 0, q.value);
|
|
2435
|
+
t.has(e) && n.push(U(i));
|
|
2202
2436
|
}
|
|
2203
|
-
} else n =
|
|
2204
|
-
n.length && (
|
|
2437
|
+
} else n = Ar.value.filter((e, n) => t.has(H(e, n, q.value))).map(U);
|
|
2438
|
+
n.length && ($.value = n);
|
|
2205
2439
|
}
|
|
2206
|
-
|
|
2207
|
-
|
|
2440
|
+
ne(() => {
|
|
2441
|
+
mi.value && (cr(), lr()), aa();
|
|
2208
2442
|
}), I(() => c.currentRowKey, (e) => {
|
|
2209
|
-
e != null && (
|
|
2210
|
-
}), I(
|
|
2211
|
-
|
|
2443
|
+
e != null && (nr.value = e);
|
|
2444
|
+
}), I(Or, (e) => {
|
|
2445
|
+
hr.value ? yr(e) : Hr(1);
|
|
2212
2446
|
}), I([
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2447
|
+
$e,
|
|
2448
|
+
Ne,
|
|
2449
|
+
ge
|
|
2216
2450
|
], () => {
|
|
2217
|
-
|
|
2218
|
-
}), I(() => c.
|
|
2219
|
-
l("filter", e ?? null);
|
|
2220
|
-
}, { deep: !0 }), I(
|
|
2451
|
+
hr.value || Hr(1);
|
|
2452
|
+
}), I(() => c.filterModel, (e) => {
|
|
2453
|
+
l("filter-change", e ?? null);
|
|
2454
|
+
}, { deep: !0 }), I(Ir, (e) => {
|
|
2221
2455
|
l("update:page", e);
|
|
2222
|
-
}), I(
|
|
2223
|
-
|
|
2456
|
+
}), I(mi, async (e) => {
|
|
2457
|
+
if (!e) {
|
|
2458
|
+
sr?.disconnect(), sr = void 0;
|
|
2459
|
+
return;
|
|
2460
|
+
}
|
|
2461
|
+
await E(), cr(), lr();
|
|
2224
2462
|
});
|
|
2225
|
-
let
|
|
2226
|
-
isFirstPage:
|
|
2227
|
-
isLastPage:
|
|
2228
|
-
currentPaginationNumber:
|
|
2229
|
-
maxPaginationNumber:
|
|
2230
|
-
nextPage:
|
|
2231
|
-
prevPage:
|
|
2232
|
-
updatePage:
|
|
2463
|
+
let oa = h(() => ({
|
|
2464
|
+
isFirstPage: zr.value,
|
|
2465
|
+
isLastPage: Rr.value,
|
|
2466
|
+
currentPaginationNumber: Ir.value,
|
|
2467
|
+
maxPaginationNumber: Lr.value,
|
|
2468
|
+
nextPage: Br,
|
|
2469
|
+
prevPage: Vr,
|
|
2470
|
+
updatePage: Hr
|
|
2233
2471
|
}));
|
|
2234
2472
|
return i({
|
|
2235
|
-
currentPageFirstIndex:
|
|
2236
|
-
currentPageLastIndex:
|
|
2237
|
-
clientItemsLength:
|
|
2238
|
-
maxPaginationNumber:
|
|
2239
|
-
currentPaginationNumber:
|
|
2240
|
-
isLastPage:
|
|
2241
|
-
isFirstPage:
|
|
2242
|
-
nextPage:
|
|
2243
|
-
prevPage:
|
|
2244
|
-
updatePage:
|
|
2245
|
-
rowsPerPageOptions:
|
|
2246
|
-
rowsPerPageActiveOption:
|
|
2247
|
-
updateRowsPerPageActiveOption:
|
|
2248
|
-
setFilters:
|
|
2249
|
-
setColumnWidths:
|
|
2250
|
-
setHiddenColumns:
|
|
2251
|
-
setColumnOrder:
|
|
2252
|
-
getCheckboxRecords:
|
|
2253
|
-
setCheckboxRow:
|
|
2254
|
-
clearCheckboxRow:
|
|
2255
|
-
getCheckboxIndeterminateRecords:
|
|
2256
|
-
isCheckedByCheckboxRow:
|
|
2257
|
-
isAllCheckboxChecked:
|
|
2258
|
-
scrollTo:
|
|
2259
|
-
scrollToRow:
|
|
2260
|
-
clearSort:
|
|
2261
|
-
clearFilter:
|
|
2262
|
-
setRowExpand:
|
|
2263
|
-
setAllRowExpand:
|
|
2264
|
-
clearRowExpand:
|
|
2265
|
-
toggleRowExpand:
|
|
2266
|
-
isRowExpandByRow:
|
|
2267
|
-
getRowExpandRecords:
|
|
2268
|
-
isTreeExpandByRow:
|
|
2269
|
-
getTreeExpandRecords:
|
|
2270
|
-
setTreeExpand:
|
|
2271
|
-
setAllTreeExpand:
|
|
2272
|
-
clearTreeExpand:
|
|
2273
|
-
toggleTreeExpand:
|
|
2274
|
-
}), (e, t) => (
|
|
2473
|
+
currentPageFirstIndex: Ur,
|
|
2474
|
+
currentPageLastIndex: Wr,
|
|
2475
|
+
clientItemsLength: jr,
|
|
2476
|
+
maxPaginationNumber: Lr,
|
|
2477
|
+
currentPaginationNumber: Ir,
|
|
2478
|
+
isLastPage: Rr,
|
|
2479
|
+
isFirstPage: zr,
|
|
2480
|
+
nextPage: Br,
|
|
2481
|
+
prevPage: Vr,
|
|
2482
|
+
updatePage: Hr,
|
|
2483
|
+
rowsPerPageOptions: Dr,
|
|
2484
|
+
rowsPerPageActiveOption: Or,
|
|
2485
|
+
updateRowsPerPageActiveOption: kr,
|
|
2486
|
+
setFilters: _e,
|
|
2487
|
+
setColumnWidths: ye,
|
|
2488
|
+
setHiddenColumns: xe,
|
|
2489
|
+
setColumnOrder: Ce,
|
|
2490
|
+
getCheckboxRecords: Xi,
|
|
2491
|
+
setCheckboxRow: Zi,
|
|
2492
|
+
clearCheckboxRow: Qi,
|
|
2493
|
+
getCheckboxIndeterminateRecords: $i,
|
|
2494
|
+
isCheckedByCheckboxRow: ea,
|
|
2495
|
+
isAllCheckboxChecked: ta,
|
|
2496
|
+
scrollTo: na,
|
|
2497
|
+
scrollToRow: ra,
|
|
2498
|
+
clearSort: Cr,
|
|
2499
|
+
clearFilter: ia,
|
|
2500
|
+
setRowExpand: ni,
|
|
2501
|
+
setAllRowExpand: ri,
|
|
2502
|
+
clearRowExpand: ii,
|
|
2503
|
+
toggleRowExpand: ai,
|
|
2504
|
+
isRowExpandByRow: ei,
|
|
2505
|
+
getRowExpandRecords: ti,
|
|
2506
|
+
isTreeExpandByRow: cn,
|
|
2507
|
+
getTreeExpandRecords: ln,
|
|
2508
|
+
setTreeExpand: un,
|
|
2509
|
+
setAllTreeExpand: dn,
|
|
2510
|
+
clearTreeExpand: fn,
|
|
2511
|
+
toggleTreeExpand: pn
|
|
2512
|
+
}), (e, t) => (k(), v("div", T({
|
|
2275
2513
|
ref_key: "dataTable",
|
|
2276
|
-
ref:
|
|
2277
|
-
},
|
|
2278
|
-
loading: F(
|
|
2514
|
+
ref: Qn
|
|
2515
|
+
}, d.value, { class: ["m-table", kn.value] }), [S(o, {
|
|
2516
|
+
loading: F(Ge) && !Wn.value,
|
|
2279
2517
|
size: "sm"
|
|
2280
2518
|
}, b({
|
|
2281
|
-
default: L(() => [S(
|
|
2519
|
+
default: L(() => [n.columnSetting ? (k(), v("div", Zt, [S(bt, {
|
|
2520
|
+
columns: Wi.value,
|
|
2521
|
+
"hidden-keys": F(be) ?? [],
|
|
2522
|
+
onToggle: Gi,
|
|
2523
|
+
onReset: Ki
|
|
2524
|
+
}, null, 8, ["columns", "hidden-keys"])])) : _("", !0), S(r, T({
|
|
2282
2525
|
ref_key: "scrollbarRef",
|
|
2283
|
-
ref:
|
|
2526
|
+
ref: $n
|
|
2527
|
+
}, x.value, {
|
|
2284
2528
|
class: "m-table__scrollbar",
|
|
2285
|
-
height:
|
|
2286
|
-
"max-height":
|
|
2287
|
-
"wrap-style":
|
|
2288
|
-
"wrap-class":
|
|
2529
|
+
height: zn.value || void 0,
|
|
2530
|
+
"max-height": Bn.value || void 0,
|
|
2531
|
+
"wrap-style": mr.value,
|
|
2532
|
+
"wrap-class": pr.value,
|
|
2289
2533
|
noresize: "",
|
|
2290
|
-
onScroll:
|
|
2291
|
-
}, {
|
|
2534
|
+
onScroll: or
|
|
2535
|
+
}), {
|
|
2292
2536
|
default: L(() => [y("div", {
|
|
2293
2537
|
class: "m-table__surface",
|
|
2294
|
-
"aria-busy": F(
|
|
2538
|
+
"aria-busy": F(Ge) || void 0
|
|
2295
2539
|
}, [y("table", {
|
|
2296
|
-
"aria-label": F(
|
|
2297
|
-
role: F(
|
|
2540
|
+
"aria-label": F(Mt) || void 0,
|
|
2541
|
+
role: F(Y) ? "treegrid" : void 0
|
|
2298
2542
|
}, [
|
|
2299
|
-
y("colgroup", null, [(
|
|
2543
|
+
y("colgroup", null, [(k(!0), v(m, null, M(F(Q), (e, t) => (k(), v("col", {
|
|
2300
2544
|
key: t,
|
|
2301
|
-
style:
|
|
2545
|
+
style: ee(Ei(e))
|
|
2302
2546
|
}, null, 4))), 128))]),
|
|
2303
|
-
F(
|
|
2547
|
+
F(Z)["customize-headers"] ? N(e.$slots, "customize-headers", {}, void 0, void 0, 0) : F(Q).length && F(kt) ? (k(), g(Xt, {
|
|
2304
2548
|
key: 1,
|
|
2305
|
-
rows: F(
|
|
2306
|
-
"header-class-name": F(
|
|
2307
|
-
"header-item-class-name": F(
|
|
2308
|
-
"header-text-direction": F(
|
|
2309
|
-
"multi-sort":
|
|
2310
|
-
"multiple-select-status": F(
|
|
2311
|
-
"show-checkbox-header":
|
|
2312
|
-
"last-fixed-column": F(
|
|
2313
|
-
"first-right-fixed-column": F(
|
|
2314
|
-
"fixed-columns-infos": F(
|
|
2315
|
-
"has-fixed-headers": F(
|
|
2316
|
-
"filter-values": F(
|
|
2317
|
-
"is-multi-sorting": F(
|
|
2318
|
-
"get-multi-sort-number": F(
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2549
|
+
rows: F(wi),
|
|
2550
|
+
"header-class-name": F(xt),
|
|
2551
|
+
"header-item-class-name": F(dt),
|
|
2552
|
+
"header-text-direction": F(Le),
|
|
2553
|
+
"multi-sort": yn.value,
|
|
2554
|
+
"multiple-select-status": F(Gr),
|
|
2555
|
+
"show-checkbox-header": Mn.value.showHeader,
|
|
2556
|
+
"last-fixed-column": F(li),
|
|
2557
|
+
"first-right-fixed-column": F(ui),
|
|
2558
|
+
"fixed-columns-infos": F(di),
|
|
2559
|
+
"has-fixed-headers": F(ci).length > 0,
|
|
2560
|
+
"filter-values": F(ge),
|
|
2561
|
+
"is-multi-sorting": F(wr),
|
|
2562
|
+
"get-multi-sort-number": F(Tr),
|
|
2563
|
+
"tree-enabled": F(Y),
|
|
2564
|
+
pt: C.value,
|
|
2565
|
+
"column-drag": n.columnDrag,
|
|
2566
|
+
onSort: Yi,
|
|
2567
|
+
onToggleSelectAll: Yr,
|
|
2568
|
+
onFilterApply: Ji,
|
|
2569
|
+
onResizeStart: F(Ci),
|
|
2570
|
+
onColumnDrop: qi
|
|
2571
|
+
}, b({ _: 2 }, [M(F(Z), (t, n) => ({
|
|
2324
2572
|
name: n,
|
|
2325
2573
|
fn: L((t) => [N(e.$slots, n, O(w(t ?? {})))])
|
|
2326
2574
|
}))]), 1032, [
|
|
@@ -2338,97 +2586,110 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
2338
2586
|
"filter-values",
|
|
2339
2587
|
"is-multi-sorting",
|
|
2340
2588
|
"get-multi-sort-number",
|
|
2589
|
+
"tree-enabled",
|
|
2590
|
+
"pt",
|
|
2591
|
+
"column-drag",
|
|
2341
2592
|
"onResizeStart"
|
|
2342
2593
|
])) : _("", !0),
|
|
2343
|
-
|
|
2344
|
-
key:
|
|
2345
|
-
"
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
"
|
|
2349
|
-
"
|
|
2350
|
-
"
|
|
2351
|
-
"
|
|
2352
|
-
"
|
|
2353
|
-
"
|
|
2354
|
-
"body-
|
|
2355
|
-
|
|
2356
|
-
"
|
|
2357
|
-
"
|
|
2358
|
-
|
|
2359
|
-
"
|
|
2360
|
-
"
|
|
2594
|
+
Jn.value ? N(e.$slots, "body", O(w(F(Kr))), void 0, void 0, 2) : Wn.value && F(xr).length ? (k(), v("tbody", en, [(k(!0), v(m, null, M(Gn.value, (e) => (k(), v("tr", {
|
|
2595
|
+
key: e,
|
|
2596
|
+
class: "m-table__skeleton-row"
|
|
2597
|
+
}, [(k(!0), v(m, null, M(F(Q), (e) => (k(), v("td", { key: e.value }, [...t[1] ||= [y("div", { class: "m-table__cell-inner" }, [y("span", { class: "m-table__skeleton-bar" })], -1)]]))), 128))]))), 128))])) : F(xr).length ? (k(), g(zt, {
|
|
2598
|
+
key: 4,
|
|
2599
|
+
"body-items": xi.value,
|
|
2600
|
+
"page-items": F(Kr),
|
|
2601
|
+
"headers-for-render": F(Q),
|
|
2602
|
+
"header-columns": F(xr),
|
|
2603
|
+
"column-align-map": Zn.value,
|
|
2604
|
+
"column-render-map": Xn.value,
|
|
2605
|
+
"body-text-direction": F(V),
|
|
2606
|
+
"body-row-class-name": F(gt),
|
|
2607
|
+
"body-expand-row-class-name": F(_t),
|
|
2608
|
+
"body-item-class-name": F(vt),
|
|
2609
|
+
striped: Cn.value,
|
|
2610
|
+
"last-fixed-column": F(li),
|
|
2611
|
+
"first-right-fixed-column": F(ui),
|
|
2612
|
+
"fixed-columns-infos": F(di),
|
|
2613
|
+
"has-fixed-headers": F(ci).length > 0,
|
|
2614
|
+
"span-method": F(Rt),
|
|
2361
2615
|
"show-overflow-tooltip": c.showOverflowTooltip,
|
|
2362
|
-
headers:
|
|
2363
|
-
"virtual-enabled":
|
|
2364
|
-
"offset-top": F(
|
|
2365
|
-
"offset-bottom": F(
|
|
2366
|
-
"current-page-first-index": F(
|
|
2367
|
-
"single-selected-row-key":
|
|
2368
|
-
"click-row-to-expand":
|
|
2369
|
-
"if-has-expand-slot":
|
|
2370
|
-
pagination:
|
|
2371
|
-
"body-row-index":
|
|
2372
|
-
"get-body-row-key":
|
|
2373
|
-
"is-row-selected":
|
|
2374
|
-
"is-row-indeterminate":
|
|
2375
|
-
"is-row-check-disabled":
|
|
2376
|
-
"is-current-row":
|
|
2377
|
-
"is-row-expanded": F(
|
|
2378
|
-
"tree-enabled": F(
|
|
2379
|
-
"tree-node-column":
|
|
2380
|
-
"tree-indent": F(
|
|
2381
|
-
"get-tree-meta":
|
|
2382
|
-
"is-tree-node-expanded":
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2616
|
+
headers: J.value,
|
|
2617
|
+
"virtual-enabled": mi.value,
|
|
2618
|
+
"offset-top": F(_i),
|
|
2619
|
+
"offset-bottom": F(vi),
|
|
2620
|
+
"current-page-first-index": F(Ur),
|
|
2621
|
+
"single-selected-row-key": Fr.value,
|
|
2622
|
+
"click-row-to-expand": si.value,
|
|
2623
|
+
"if-has-expand-slot": Kn.value,
|
|
2624
|
+
pagination: oa.value,
|
|
2625
|
+
"body-row-index": ji,
|
|
2626
|
+
"get-body-row-key": Ai,
|
|
2627
|
+
"is-row-selected": Mi,
|
|
2628
|
+
"is-row-indeterminate": Ni,
|
|
2629
|
+
"is-row-check-disabled": Pi,
|
|
2630
|
+
"is-current-row": Li,
|
|
2631
|
+
"is-row-expanded": F($r),
|
|
2632
|
+
"tree-enabled": F(Y),
|
|
2633
|
+
"tree-node-column": An.value,
|
|
2634
|
+
"tree-indent": F(X).indent,
|
|
2635
|
+
"get-tree-meta": Vi,
|
|
2636
|
+
"is-tree-node-expanded": Hi,
|
|
2637
|
+
"is-multiple-selectable": dr.value,
|
|
2638
|
+
"is-single-selectable": fr.value,
|
|
2639
|
+
"observe-row": F(bi) ? F(yi) : void 0,
|
|
2640
|
+
pt: oe.value,
|
|
2641
|
+
onRowClick: zi,
|
|
2642
|
+
onRowDblclick: Ui,
|
|
2643
|
+
onRowContextmenu: Ti,
|
|
2644
|
+
onToggleExpand: t[0] ||= (e, t, n) => F(oi)(e, t, n),
|
|
2645
|
+
onToggleTree: Bi,
|
|
2646
|
+
onToggleSelect: Xr,
|
|
2647
|
+
onSingleSelect: Fi
|
|
2648
|
+
}, b({ _: 2 }, [M(F(Z), (t, n) => ({
|
|
2391
2649
|
name: n,
|
|
2392
2650
|
fn: L((t) => [N(e.$slots, n, O(w(t ?? {})))])
|
|
2393
|
-
}))]), 1032, /* @__PURE__ */ "body-items.page-items.headers-for-render.header-columns.column-align-map.column-render-map.body-text-direction.body-row-class-name.body-expand-row-class-name.body-item-class-name.striped.last-fixed-column.first-right-fixed-column.fixed-columns-infos.has-fixed-headers.span-method.show-overflow-tooltip.headers.virtual-enabled.offset-top.offset-bottom.current-page-first-index.single-selected-row-key.click-row-to-expand.if-has-expand-slot.pagination.is-row-expanded.tree-enabled.tree-node-column.tree-indent".split("."))) : _("", !0),
|
|
2394
|
-
F(
|
|
2395
|
-
columns: F(
|
|
2396
|
-
data: F(
|
|
2397
|
-
})), void 0, void 0, 0) : _("", !0), (
|
|
2651
|
+
}))]), 1032, /* @__PURE__ */ "body-items.page-items.headers-for-render.header-columns.column-align-map.column-render-map.body-text-direction.body-row-class-name.body-expand-row-class-name.body-item-class-name.striped.last-fixed-column.first-right-fixed-column.fixed-columns-infos.has-fixed-headers.span-method.show-overflow-tooltip.headers.virtual-enabled.offset-top.offset-bottom.current-page-first-index.single-selected-row-key.click-row-to-expand.if-has-expand-slot.pagination.is-row-expanded.tree-enabled.tree-node-column.tree-indent.is-multiple-selectable.is-single-selectable.observe-row.pt".split("."))) : _("", !0),
|
|
2652
|
+
F(It) && (Yn.value || Si.value.length) ? (k(), v("tfoot", T({ key: 5 }, R.value, { class: "m-table__tfoot" }), [Yn.value ? N(e.$slots, "footer", O(w({
|
|
2653
|
+
columns: F(Q),
|
|
2654
|
+
data: F(Ar)
|
|
2655
|
+
})), void 0, void 0, 0) : _("", !0), (k(!0), v(m, null, M(Si.value, (e, t) => (k(), v("tr", { key: t }, [(k(!0), v(m, null, M(F(Q), (t, n) => (k(), v("td", {
|
|
2398
2656
|
key: t.value,
|
|
2399
|
-
class: D(
|
|
2400
|
-
style:
|
|
2401
|
-
}, [y("div",
|
|
2402
|
-
], 8,
|
|
2657
|
+
class: D(Oi(t.value)),
|
|
2658
|
+
style: ee(Di(t.value, "td"))
|
|
2659
|
+
}, [y("div", tn, [y("span", nn, P(e[n] ?? ""), 1)])], 6))), 128))]))), 128))], 16)) : _("", !0)
|
|
2660
|
+
], 8, $t), !F(Kr).length && !F(Ge) && !Wn.value ? (k(), v("div", T({ key: 0 }, de.value, {
|
|
2661
|
+
class: "m-table__message",
|
|
2662
|
+
role: "status"
|
|
2663
|
+
}), [F(Z).empty ? N(e.$slots, "empty", {}, void 0, void 0, 0) : N(e.$slots, "empty", {}, () => [y("p", rn, P(In.value), 1), F(Et) ? (k(), v("p", an, P(F(Et)), 1)) : _("", !0)], void 0, 1)], 16)) : _("", !0)], 8, Qt)]),
|
|
2403
2664
|
_: 3
|
|
2404
|
-
},
|
|
2665
|
+
}, 16, [
|
|
2405
2666
|
"height",
|
|
2406
2667
|
"max-height",
|
|
2407
2668
|
"wrap-style",
|
|
2408
2669
|
"wrap-class"
|
|
2409
2670
|
])]),
|
|
2410
2671
|
_: 2
|
|
2411
|
-
}, [
|
|
2672
|
+
}, [Un.value ? {
|
|
2412
2673
|
name: "indicator",
|
|
2413
2674
|
fn: L(() => [N(e.$slots, "loading")]),
|
|
2414
2675
|
key: "0"
|
|
2415
|
-
} : void 0]), 1032, ["loading"]), F(
|
|
2416
|
-
isFirstPage: F(
|
|
2417
|
-
isLastPage: F(
|
|
2418
|
-
currentPaginationNumber: F(
|
|
2419
|
-
maxPaginationNumber: F(
|
|
2420
|
-
nextPage: F(
|
|
2421
|
-
prevPage: F(
|
|
2422
|
-
})), void 0, void 0, 0) : (
|
|
2676
|
+
} : void 0]), 1032, ["loading"]), F(jt) ? (k(), v("div", T({ key: 0 }, ue.value, { class: "m-table__footer" }), [y("div", on, P(`${F(Ur)}–${F(Wr)}`) + " " + P(sn) + " " + P(F(jr)), 1), Hn.value ? N(e.$slots, "pagination", O(w({
|
|
2677
|
+
isFirstPage: F(zr),
|
|
2678
|
+
isLastPage: F(Rr),
|
|
2679
|
+
currentPaginationNumber: F(Ir),
|
|
2680
|
+
maxPaginationNumber: F(Lr),
|
|
2681
|
+
nextPage: F(Br),
|
|
2682
|
+
prevPage: F(Vr)
|
|
2683
|
+
})), void 0, void 0, 0) : (k(), g(s, {
|
|
2423
2684
|
key: 1,
|
|
2424
|
-
"model-value": F(
|
|
2425
|
-
"total-records": F(
|
|
2426
|
-
rows: F(
|
|
2427
|
-
"page-sizes": F(
|
|
2428
|
-
"show-size-picker": F(
|
|
2429
|
-
disabled: F(
|
|
2430
|
-
"onUpdate:modelValue": F(
|
|
2431
|
-
"onUpdate:rows":
|
|
2685
|
+
"model-value": F(Ir),
|
|
2686
|
+
"total-records": F(jr),
|
|
2687
|
+
rows: F(Or),
|
|
2688
|
+
"page-sizes": F(Dr),
|
|
2689
|
+
"show-size-picker": F(St),
|
|
2690
|
+
disabled: F(Ge),
|
|
2691
|
+
"onUpdate:modelValue": F(Hr),
|
|
2692
|
+
"onUpdate:rows": Ii
|
|
2432
2693
|
}, null, 8, [
|
|
2433
2694
|
"model-value",
|
|
2434
2695
|
"total-records",
|
|
@@ -2437,8 +2698,8 @@ var vt = { class: "m-table__tooltip-trigger" }, yt = { class: "m-table__cell-tex
|
|
|
2437
2698
|
"show-size-picker",
|
|
2438
2699
|
"disabled",
|
|
2439
2700
|
"onUpdate:modelValue"
|
|
2440
|
-
]))])) : _("", !0)], 16));
|
|
2701
|
+
]))], 16)) : _("", !0)], 16));
|
|
2441
2702
|
}
|
|
2442
2703
|
});
|
|
2443
2704
|
//#endregion
|
|
2444
|
-
export {
|
|
2705
|
+
export { cn as MTable };
|