morya-ui 0.3.0 → 0.3.2
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 +64 -0
- package/dist/Button-dMqRmoYa.js +222 -0
- package/dist/{Card-Dsmnzong.js → Card-B1CB9Trm.js} +3 -5
- package/dist/Empty-C5tndBOm.js +147 -0
- package/dist/Icon-od9Ob-Ay.js +393 -0
- package/dist/Loading-BSsRs6v9.js +420 -0
- package/dist/Pagination-CqpC5EAs.js +166 -0
- package/dist/Select-CKGrSoaC.js +572 -0
- package/dist/Skeleton-DCYdXAH2.js +59 -0
- package/dist/accordion/style.css +20 -71
- package/dist/auto-complete/index.js +118 -120
- package/dist/auto-complete/style.css +24 -88
- package/dist/avatar/index.js +1 -1
- package/dist/avatar/style.css +10 -67
- package/dist/badge/style.css +10 -68
- package/dist/block-ui/style.css +10 -68
- package/dist/breadcrumb/style.css +10 -61
- package/dist/button/index.js +1 -1
- package/dist/button/style.css +72 -78
- package/dist/card/index.js +1 -1
- package/dist/card/style.css +30 -67
- package/dist/carousel/index.js +72 -64
- package/dist/carousel/style.css +36 -82
- package/dist/cascade-select/index.js +1 -1
- package/dist/cascade-select/style.css +24 -81
- package/dist/checkbox/style.css +10 -61
- package/dist/chip/index.js +1 -1
- package/dist/chip/style.css +10 -67
- package/dist/command-menu/index.js +37 -39
- package/dist/command-menu/style.css +10 -75
- package/dist/components/Accordion/styles.css +10 -10
- package/dist/components/AutoComplete/AutoComplete.vue.d.ts.map +1 -1
- package/dist/components/AutoComplete/styles.css +0 -7
- package/dist/components/Badge/styles.css +0 -7
- package/dist/components/BlockUI/styles.css +0 -7
- package/dist/components/Button/Button.vue.d.ts +2 -0
- package/dist/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/components/Button/styles.css +62 -11
- package/dist/components/Button/types.d.ts +4 -0
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Card/Card.vue.d.ts +2 -2
- package/dist/components/Card/Card.vue.d.ts.map +1 -1
- package/dist/components/Card/index.d.ts +1 -1
- package/dist/components/Card/index.d.ts.map +1 -1
- package/dist/components/Card/styles.css +20 -6
- package/dist/components/Card/types.d.ts +4 -2
- package/dist/components/Card/types.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
- package/dist/components/Carousel/styles.css +26 -15
- package/dist/components/CommandMenu/CommandMenu.vue.d.ts.map +1 -1
- package/dist/components/ConfigProvider/ConfigProvider.vue.d.ts +2 -2
- package/dist/components/DataView/DataView.vue.d.ts +7 -7
- package/dist/components/DataView/DataView.vue.d.ts.map +1 -1
- package/dist/components/DataView/styles.css +0 -20
- package/dist/components/Dialog/styles.css +3 -46
- package/dist/components/Dock/styles.css +0 -10
- package/dist/components/Drawer/styles.css +2 -51
- package/dist/components/Dropdown/Dropdown.vue.d.ts +2 -2
- package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/DropdownNodes.vue.d.ts +8 -9
- package/dist/components/Dropdown/DropdownNodes.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/styles.css +24 -5
- package/dist/components/Fieldset/styles.css +0 -7
- package/dist/components/FileUpload/FileUpload.vue.d.ts.map +1 -1
- package/dist/components/FileUpload/fileUtils.d.ts +8 -0
- package/dist/components/FileUpload/fileUtils.d.ts.map +1 -0
- package/dist/components/Gallery/styles.css +0 -8
- package/dist/components/Icon/Icon.vue.d.ts.map +1 -1
- package/dist/components/Icon/icon-categories.d.ts.map +1 -1
- package/dist/components/Icon/icons-types.d.ts +4 -2
- package/dist/components/Icon/icons-types.d.ts.map +1 -1
- package/dist/components/Icon/icons.d.ts +250 -561
- package/dist/components/Icon/icons.d.ts.map +1 -1
- package/dist/components/Icon/index.d.ts +2 -2
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/styles.css +0 -6
- package/dist/components/Knob/styles.css +0 -6
- package/dist/components/Layout/styles.css +5 -14
- package/dist/components/Listbox/Listbox.vue.d.ts.map +1 -1
- package/dist/components/Loading/styles.css +0 -16
- package/dist/components/Menu/Menu.vue.d.ts.map +1 -1
- package/dist/components/Menu/styles.css +6 -7
- package/dist/components/Menubar/Menubar.vue.d.ts.map +1 -1
- package/dist/components/Menubar/styles.css +4 -0
- package/dist/components/Message/styles.css +0 -13
- package/dist/components/Page/PageContent.vue.d.ts +2 -1
- package/dist/components/Page/PageContent.vue.d.ts.map +1 -1
- package/dist/components/Page/PageFilterChips.vue.d.ts +16 -0
- package/dist/components/Page/PageFilterChips.vue.d.ts.map +1 -0
- package/dist/components/Page/PageFilters.vue.d.ts +15 -3
- package/dist/components/Page/PageFilters.vue.d.ts.map +1 -1
- package/dist/components/Page/PageHeader.vue.d.ts +8 -4
- package/dist/components/Page/PageHeader.vue.d.ts.map +1 -1
- package/dist/components/Page/PagePlaceholder.vue.d.ts +6 -2
- package/dist/components/Page/PagePlaceholder.vue.d.ts.map +1 -1
- package/dist/components/Page/PageSection.vue.d.ts +8 -2
- package/dist/components/Page/PageSection.vue.d.ts.map +1 -1
- package/dist/components/Page/PageStat.vue.d.ts +8 -3
- package/dist/components/Page/PageStat.vue.d.ts.map +1 -1
- package/dist/components/Page/index.d.ts +2 -1
- package/dist/components/Page/index.d.ts.map +1 -1
- package/dist/components/Page/styles.css +239 -44
- package/dist/components/Page/types.d.ts +40 -0
- package/dist/components/Page/types.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.vue.d.ts.map +1 -1
- package/dist/components/Pagination/styles.css +7 -10
- package/dist/components/Pagination/types.d.ts +1 -1
- package/dist/components/Pagination/types.d.ts.map +1 -1
- package/dist/components/Panel/styles.css +0 -7
- package/dist/components/Popover/styles.css +20 -17
- package/dist/components/ProgressBar/styles.css +0 -9
- package/dist/components/ProgressSpinner/styles.css +0 -7
- package/dist/components/ScrollTop/styles.css +0 -7
- package/dist/components/Scrollbar/Scrollbar.vue.d.ts +1 -1
- package/dist/components/Scrollbar/styles.css +0 -8
- package/dist/components/Select/Select.vue.d.ts +10 -8
- package/dist/components/Select/Select.vue.d.ts.map +1 -1
- package/dist/components/Select/selectOptions.d.ts +46 -0
- package/dist/components/Select/selectOptions.d.ts.map +1 -0
- package/dist/components/Select/styles.css +35 -8
- package/dist/components/Select/types.d.ts +11 -1
- package/dist/components/Select/types.d.ts.map +1 -1
- package/dist/components/Sidebar/styles.css +0 -6
- package/dist/components/Skeleton/styles.css +0 -6
- package/dist/components/Slider/styles.css +9 -0
- package/dist/components/SplitButton/styles.css +5 -0
- package/dist/components/Status/styles.css +0 -7
- package/dist/components/Switch/styles.css +0 -7
- package/dist/components/Table/Table.vue.d.ts +26 -26
- package/dist/components/Table/Table.vue.d.ts.map +1 -1
- package/dist/components/Table/TableLoadingLine.vue.d.ts.map +1 -1
- package/dist/components/Table/hooks/useExpandableRow.d.ts.map +1 -1
- package/dist/components/Table/hooks/useTotalItems.d.ts.map +1 -1
- package/dist/components/Table/styles.css +61 -44
- package/dist/components/Table/tableQuery.d.ts +30 -0
- package/dist/components/Table/tableQuery.d.ts.map +1 -0
- package/dist/components/Tree/Tree.vue.d.ts.map +1 -1
- package/dist/components/Tree/treeQuery.d.ts +31 -0
- package/dist/components/Tree/treeQuery.d.ts.map +1 -0
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
- package/dist/components/TreeSelect/styles.css +1 -1
- package/dist/config-provider/index.js +1 -1
- package/dist/config-provider/style.css +72 -72
- package/dist/confirm-dialog/index.js +2 -2
- package/dist/confirm-dialog/style.css +75 -124
- package/dist/confirm-popup/index.js +2 -2
- package/dist/confirm-popup/style.css +72 -78
- package/dist/context-menu/index.js +2 -2
- package/dist/context-menu/style.css +10 -75
- package/dist/data-view/index.js +47 -47
- package/dist/data-view/style.css +393 -174
- package/dist/data-view/style.js +1 -1
- package/dist/date-picker/index.js +1 -1
- package/dist/date-picker/style.css +10 -67
- package/dist/dialog/index.js +2 -2
- package/dist/dialog/style.css +75 -124
- package/dist/divider/style.css +10 -61
- package/dist/dock/index.js +2 -2
- package/dist/dock/style.css +10 -77
- package/dist/drawer/index.js +1 -1
- package/dist/drawer/style.css +12 -118
- package/dist/dropdown/index.js +110 -91
- package/dist/dropdown/style.css +34 -80
- package/dist/empty/index.js +5 -150
- package/dist/empty/style.css +10 -67
- package/dist/fieldset/index.js +1 -1
- package/dist/fieldset/style.css +10 -74
- package/dist/file-upload/index.js +148 -146
- package/dist/file-upload/style.css +10 -67
- package/dist/filterByQuery-Bczaxzih.js +17 -0
- package/dist/flex/style.css +10 -61
- package/dist/float-label/style.css +10 -61
- package/dist/fluid/style.css +10 -61
- package/dist/form/style.css +10 -61
- package/dist/gallery/index.js +1 -1
- package/dist/gallery/style.css +10 -83
- package/dist/grid/style.css +10 -61
- package/dist/icon/index.js +93 -39
- package/dist/icon/style.css +10 -67
- package/dist/icon-COrt_N8A.js +18 -0
- package/dist/icon-field/style.css +10 -61
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5400 -5145
- package/dist/inplace/style.css +10 -61
- package/dist/input/index.js +1 -1
- package/dist/input/style.css +10 -67
- package/dist/input-color/style.css +10 -61
- package/dist/input-group/style.css +10 -61
- package/dist/input-number/index.js +1 -1
- package/dist/input-number/style.css +10 -67
- package/dist/input-otp/style.css +10 -61
- package/dist/input-password/index.js +1 -1
- package/dist/input-password/style.css +10 -67
- package/dist/input-tags/index.js +1 -1
- package/dist/input-tags/style.css +10 -67
- package/dist/knob/style.css +10 -67
- package/dist/label/style.css +10 -61
- package/dist/layout/index.js +1 -1
- package/dist/layout/style.css +15 -89
- package/dist/listbox/index.js +30 -32
- package/dist/listbox/style.css +10 -69
- package/dist/loading/index.js +32 -446
- package/dist/loading/style.css +10 -77
- package/dist/mega-menu/index.js +2 -2
- package/dist/mega-menu/style.css +10 -67
- package/dist/menu/index.js +265 -255
- package/dist/menu/style.css +36 -99
- package/dist/menubar/index.js +6 -3
- package/dist/menubar/style.css +14 -75
- package/dist/message/index.js +1 -1
- package/dist/message/style.css +10 -80
- package/dist/meter-group/style.css +10 -61
- package/dist/order-list/index.js +1 -1
- package/dist/order-list/style.css +10 -67
- package/dist/page/index.js +229 -70
- package/dist/page/style.css +1186 -113
- package/dist/page/style.js +3 -0
- package/dist/pagination/index.js +1 -1
- package/dist/pagination/style.css +210 -77
- package/dist/pagination/style.js +1 -0
- package/dist/panel/index.js +1 -1
- package/dist/panel/style.css +10 -74
- package/dist/pick-list/index.js +1 -1
- package/dist/pick-list/style.css +10 -67
- package/dist/popover/style.css +30 -78
- package/dist/progress-bar/style.css +10 -70
- package/dist/progress-spinner/index.js +105 -2
- package/dist/progress-spinner/style.css +10 -68
- package/dist/radio/style.css +10 -61
- package/dist/rating/index.js +1 -1
- package/dist/rating/style.css +10 -67
- package/dist/resolver-map.d.ts.map +1 -1
- package/dist/resolver.js +1 -0
- package/dist/result/index.js +1 -1
- package/dist/result/style.css +10 -67
- package/dist/scroll-top/index.js +1 -1
- package/dist/scroll-top/style.css +10 -82
- package/dist/scrollbar/style.css +10 -69
- package/dist/select/index.js +2 -478
- package/dist/select/style.css +59 -89
- package/dist/select-button/style.css +10 -61
- package/dist/shared/config.d.ts +2 -2
- package/dist/shared/filterByQuery.d.ts +14 -0
- package/dist/shared/filterByQuery.d.ts.map +1 -0
- package/dist/shared/menu/expand.d.ts +38 -0
- package/dist/shared/menu/expand.d.ts.map +1 -0
- package/dist/shared/menu/icon.d.ts.map +1 -1
- package/dist/shared/menu/index.d.ts +2 -0
- package/dist/shared/menu/index.d.ts.map +1 -1
- package/dist/shared/styles/select-overlay.css +14 -6
- package/dist/sidebar/index.js +2 -2
- package/dist/sidebar/style.css +10 -73
- package/dist/skeleton/index.js +2 -59
- package/dist/skeleton/style.css +10 -67
- package/dist/slider/style.css +19 -61
- package/dist/space/style.css +10 -61
- package/dist/speed-dial/index.js +2 -2
- package/dist/speed-dial/style.css +10 -67
- package/dist/split-button/index.js +1 -1
- package/dist/split-button/style.css +77 -78
- package/dist/splitter/style.css +10 -61
- package/dist/status/index.js +1 -1
- package/dist/status/style.css +10 -74
- package/dist/stepper/index.js +1 -1
- package/dist/stepper/style.css +10 -67
- package/dist/styles/base.css +5 -50
- package/dist/styles.css +1 -1
- package/dist/switch/style.css +10 -68
- package/dist/table/index.js +409 -373
- package/dist/table/style.css +457 -215
- package/dist/table/style.js +1 -1
- package/dist/tabs/index.js +1 -1
- package/dist/tabs/style.css +10 -75
- package/dist/tag/index.js +1 -1
- package/dist/tag/style.css +10 -67
- package/dist/terminal/style.css +10 -61
- package/dist/textarea/index.js +1 -1
- package/dist/textarea/style.css +10 -67
- package/dist/theme/styles.css +5 -11
- package/dist/theme/useMotion.d.ts +5 -1
- package/dist/theme/useMotion.d.ts.map +1 -1
- package/dist/tiered-menu/index.js +1 -1
- package/dist/tiered-menu/style.css +10 -75
- package/dist/timeline/index.js +1 -1
- package/dist/timeline/style.css +10 -75
- package/dist/toast/index.js +1 -1
- package/dist/toast/style.css +10 -67
- package/dist/toggle-button/index.js +2 -2
- package/dist/toggle-button/style.css +10 -67
- package/dist/toolbar/style.css +10 -61
- package/dist/tooltip/style.css +10 -61
- package/dist/tree/index.js +159 -173
- package/dist/tree/style.css +10 -67
- package/dist/tree-select/index.js +200 -213
- package/dist/tree-select/style.css +25 -82
- package/dist/tree-table/index.js +1 -1
- package/dist/tree-table/style.css +10 -67
- package/dist/treeQuery-CnHkyYOA.js +107 -0
- package/dist/virtual-scroller/style.css +10 -69
- package/package.json +1 -1
- package/dist/Button-B5X_R4Md.js +0 -156
- package/dist/Icon-lcN1rS87.js +0 -610
- package/dist/Pagination-CVrH8Ypi.js +0 -158
- package/dist/ProgressSpinner-BeWVF6Jv.js +0 -105
- package/dist/checkStrategy-CZzuUKDI.js +0 -63
- package/dist/components/Icon/icons-tabler.d.ts +0 -77
- package/dist/components/Icon/icons-tabler.d.ts.map +0 -1
- package/dist/icon-DWXkh-RM.js +0 -27
package/dist/table/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
2
|
import { t } from "../useControllable-elmWaz23.js";
|
|
3
|
-
import { t as n } from "../Icon-
|
|
3
|
+
import { t as n } from "../Icon-od9Ob-Ay.js";
|
|
4
4
|
import { t as r } from "../Scrollbar-DTeJ8P5b.js";
|
|
5
5
|
import { t as i } from "../Checkbox-BzbAUfyZ.js";
|
|
6
|
-
import { t as a } from "../
|
|
7
|
-
import { t as o } from "../
|
|
6
|
+
import { t as a } from "../Loading-BSsRs6v9.js";
|
|
7
|
+
import { t as o } from "../Pagination-CqpC5EAs.js";
|
|
8
8
|
import { t as s } from "../Tooltip-D5DO0B3z.js";
|
|
9
9
|
import { t as c } from "../Radio-rF6zdR5Y.js";
|
|
10
10
|
import { o as l } from "../config-CapALqt3.js";
|
|
11
11
|
import { n as u } from "../locale-Bzm2nbEp.js";
|
|
12
12
|
import "./style.js";
|
|
13
|
-
import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g,
|
|
13
|
+
import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createSlots as _, createVNode as v, defineComponent as y, guardReactiveProps as b, mergeProps as x, normalizeClass as S, normalizeProps as C, normalizeStyle as w, openBlock as T, provide as E, ref as D, renderList as O, renderSlot as k, toDisplayString as A, toRefs as ee, unref as j, useAttrs as te, useSlots as ne, watch as M, withCtx as re, withModifiers as N } from "vue";
|
|
14
14
|
//#region src/components/Table/hooks/useClickRow.ts
|
|
15
|
-
function
|
|
15
|
+
function ie(e, t, n, r) {
|
|
16
16
|
return { clickRow: (i, a, o, s) => {
|
|
17
17
|
if (e.value !== o) return;
|
|
18
18
|
let c = { ...i };
|
|
@@ -24,7 +24,7 @@ function ae(e, t, n, r) {
|
|
|
24
24
|
}
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/components/Table/utils.ts
|
|
27
|
-
function
|
|
27
|
+
function P(e, t) {
|
|
28
28
|
if (e.includes(".")) {
|
|
29
29
|
let n = e.split("."), r = t;
|
|
30
30
|
for (let e of n) if (r && typeof r == "object") r = r[e];
|
|
@@ -33,29 +33,103 @@ function M(e, t) {
|
|
|
33
33
|
}
|
|
34
34
|
return t[e] ?? "";
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
let n =
|
|
36
|
+
function ae(e, t) {
|
|
37
|
+
let n = P(e, t);
|
|
38
38
|
return Array.isArray(n) ? n.join(",") : String(n ?? "");
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function oe(e, t, n = "id") {
|
|
41
41
|
let r = e[n];
|
|
42
42
|
return typeof r == "string" || typeof r == "number" ? r : t;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function F(e, t, n = "id") {
|
|
45
45
|
let r = e[n], i = t[n];
|
|
46
46
|
return (typeof r == "string" || typeof r == "number") && (typeof i == "string" || typeof i == "number") ? r === i : JSON.stringify(e) === JSON.stringify(t);
|
|
47
47
|
}
|
|
48
48
|
//#endregion
|
|
49
|
+
//#region src/components/Table/tableQuery.ts
|
|
50
|
+
function se(e, t, n) {
|
|
51
|
+
if (typeof e == "number" && typeof t == "number") return e < t ? n ? 1 : -1 : e > t ? n ? -1 : 1 : 0;
|
|
52
|
+
let r = String(e ?? ""), i = String(t ?? "");
|
|
53
|
+
return r < i ? n ? 1 : -1 : r > i ? n ? -1 : 1 : 0;
|
|
54
|
+
}
|
|
55
|
+
function ce(e, t) {
|
|
56
|
+
return typeof t == "function" ? t(e) : Array.isArray(t) ? t.includes(e) : e === t || String(e ?? "") === String(t);
|
|
57
|
+
}
|
|
58
|
+
function I(e, t) {
|
|
59
|
+
let { field: n, comparison: r, criteria: i } = t, a = P(String(n), e);
|
|
60
|
+
if (typeof r == "function") return r(a, i);
|
|
61
|
+
switch (r) {
|
|
62
|
+
case "=": return a === i;
|
|
63
|
+
case "!=": return a !== i;
|
|
64
|
+
case ">": return Number(a) > Number(i);
|
|
65
|
+
case "<": return Number(a) < Number(i);
|
|
66
|
+
case "<=": return Number(a) <= Number(i);
|
|
67
|
+
case ">=": return Number(a) >= Number(i);
|
|
68
|
+
case "between": {
|
|
69
|
+
let e = i, t = Number(a);
|
|
70
|
+
return t >= Math.min(...e) && t <= Math.max(...e);
|
|
71
|
+
}
|
|
72
|
+
case "in": return i.includes(a);
|
|
73
|
+
default: return a === i;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
function L(e, t, n) {
|
|
77
|
+
let r = [...e];
|
|
78
|
+
if (t) for (let [e, n] of Object.entries(t)) n != null && n !== "" && (r = r.filter((t) => ce(P(e, t), n)));
|
|
79
|
+
if (n) for (let e of n) r = r.filter((t) => I(t, e));
|
|
80
|
+
return r;
|
|
81
|
+
}
|
|
82
|
+
function le(e, t) {
|
|
83
|
+
return typeof t == "string" && t !== "" ? String(P(t, e)) : Array.isArray(t) ? t.map((t) => String(P(t, e))).join("") : Object.values(e).join(" ");
|
|
84
|
+
}
|
|
85
|
+
function ue(e, t, n = "") {
|
|
86
|
+
if (!t) return e;
|
|
87
|
+
let r = t.toLowerCase();
|
|
88
|
+
return e.filter((e) => le(e, n).toLowerCase().includes(r));
|
|
89
|
+
}
|
|
90
|
+
function R(e, t, n, r) {
|
|
91
|
+
let i = e[r], a = t[r];
|
|
92
|
+
return (r === 0 ? n : R(e, t, n, r - 1)).sort((t, n) => {
|
|
93
|
+
for (let i = 0; i < r; i += 1) if (P(e[i], t) !== P(e[i], n)) return 0;
|
|
94
|
+
return se(P(i, t), P(i, n), a);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function de(e, t, n, r = !1) {
|
|
98
|
+
let i = [...e];
|
|
99
|
+
return r && Array.isArray(t) && Array.isArray(n) ? t.length === 0 ? i : R(t, n, i, t.length - 1) : i.sort((e, r) => se(P(t, e), P(t, r), n));
|
|
100
|
+
}
|
|
101
|
+
function fe(e, t) {
|
|
102
|
+
return e.indexOf(t) === -1 ? {
|
|
103
|
+
next: [...e, t],
|
|
104
|
+
expanded: !0
|
|
105
|
+
} : {
|
|
106
|
+
next: e.filter((e) => e !== t),
|
|
107
|
+
expanded: !1
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function z(e, t, n = "id") {
|
|
111
|
+
let r = { ...t };
|
|
112
|
+
return delete r.checkbox, delete r.index, t.checkbox ? {
|
|
113
|
+
next: e.filter((e) => !F(e, r, n)),
|
|
114
|
+
selected: !1,
|
|
115
|
+
row: r
|
|
116
|
+
} : {
|
|
117
|
+
next: [r, ...e],
|
|
118
|
+
selected: !0,
|
|
119
|
+
row: r
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
//#endregion
|
|
49
123
|
//#region src/components/Table/hooks/useExpandableRow.ts
|
|
50
|
-
function
|
|
51
|
-
let i =
|
|
124
|
+
function pe(e, t, n, r) {
|
|
125
|
+
let i = D([]), a = f(() => e.value ?? i.value), o = (e, r) => oe(e, n.value + r, t.value);
|
|
52
126
|
return {
|
|
53
127
|
expandedKeys: a,
|
|
54
128
|
isRowExpanded: (e, t) => a.value.includes(o(e, t)),
|
|
55
129
|
toggleExpandRow: (e, t, n) => {
|
|
56
130
|
n.stopPropagation();
|
|
57
|
-
let
|
|
58
|
-
i.value =
|
|
131
|
+
let { next: s, expanded: c } = fe(a.value, o(e, t));
|
|
132
|
+
i.value = s, r("update:expandedRowKeys", s), r("expand", {
|
|
59
133
|
row: e,
|
|
60
134
|
expanded: c
|
|
61
135
|
});
|
|
@@ -64,9 +138,9 @@ function ce(e, t, n, r) {
|
|
|
64
138
|
}
|
|
65
139
|
//#endregion
|
|
66
140
|
//#region src/components/Table/hooks/useFixedColumn.ts
|
|
67
|
-
var
|
|
68
|
-
function
|
|
69
|
-
let t = f(() => e.value.filter(
|
|
141
|
+
var me = (e) => e.fixed === "right", he = (e) => !!e.fixed;
|
|
142
|
+
function ge(e) {
|
|
143
|
+
let t = f(() => e.value.filter(he)), n = f(() => e.value.filter((e) => he(e) && !me(e))), r = f(() => e.value.filter(me));
|
|
70
144
|
return {
|
|
71
145
|
fixedHeaders: t,
|
|
72
146
|
lastFixedColumn: f(() => n.value.length ? n.value[n.value.length - 1].value : ""),
|
|
@@ -88,19 +162,19 @@ function de(e) {
|
|
|
88
162
|
})
|
|
89
163
|
};
|
|
90
164
|
}
|
|
91
|
-
function
|
|
92
|
-
let x = f(() => o.value.some((e) => e.fixed)), S = f(() => x.value ? o.value.filter((e) => e.fixed && e.fixed !== "right") : []), C = f(() => x.value ? o.value.filter((e) => e.fixed === "right") : []), w = f(() => o.value.filter((e) => !e.fixed)),
|
|
165
|
+
function _e(e, t, n, r, i, a, o, s, c, l, u, d, p, m, h, g, _, v, y, b) {
|
|
166
|
+
let x = f(() => o.value.some((e) => e.fixed)), S = f(() => x.value ? o.value.filter((e) => e.fixed && e.fixed !== "right") : []), C = f(() => x.value ? o.value.filter((e) => e.fixed === "right") : []), w = f(() => o.value.filter((e) => !e.fixed)), T = (e, t) => Array.isArray(e) && Array.isArray(t) ? {
|
|
93
167
|
sortBy: e,
|
|
94
168
|
sortDesc: t.map((e) => e === "desc")
|
|
95
169
|
} : e === "" ? null : {
|
|
96
170
|
sortBy: h.value,
|
|
97
171
|
sortDesc: g.value === "desc"
|
|
98
|
-
}, E = T(
|
|
99
|
-
get: () => v.value === "emit" ?
|
|
172
|
+
}, E = D(T(h.value, g.value)), O = f({
|
|
173
|
+
get: () => v.value === "emit" ? T(h.value, g.value) : E.value,
|
|
100
174
|
set: (e) => {
|
|
101
175
|
E.value = e;
|
|
102
176
|
}
|
|
103
|
-
}),
|
|
177
|
+
}), k = f(() => {
|
|
104
178
|
let o = [
|
|
105
179
|
...S.value,
|
|
106
180
|
...w.value,
|
|
@@ -113,10 +187,10 @@ function fe(e, t, n, r, i, a, o, s, c, l, u, d, p, m, h, g, _, v, y, b) {
|
|
|
113
187
|
t.sortType = p.value.sortType[e];
|
|
114
188
|
} else t.value === p.value.sortBy && p.value.sortType && (t.sortType = p.value.sortType);
|
|
115
189
|
}
|
|
116
|
-
if (
|
|
117
|
-
let e =
|
|
118
|
-
t.sortType =
|
|
119
|
-
} else
|
|
190
|
+
if (O.value && Array.isArray(O.value.sortBy) && Array.isArray(O.value.sortDesc) && O.value.sortBy.includes(t.value)) {
|
|
191
|
+
let e = O.value.sortBy.indexOf(t.value);
|
|
192
|
+
t.sortType = O.value.sortDesc[e] ? "desc" : "asc";
|
|
193
|
+
} else O.value && t.value === O.value.sortBy && (t.sortType = O.value.sortDesc ? "desc" : "asc");
|
|
120
194
|
return t;
|
|
121
195
|
}), u = s.value ? [{
|
|
122
196
|
text: "",
|
|
@@ -142,9 +216,9 @@ function fe(e, t, n, r, i, a, o, s, c, l, u, d, p, m, h, g, _, v, y, b) {
|
|
|
142
216
|
return f.length ? [...f, ...d] : d;
|
|
143
217
|
});
|
|
144
218
|
return {
|
|
145
|
-
clientSortOptions:
|
|
146
|
-
headerColumns: f(() =>
|
|
147
|
-
headersForRender:
|
|
219
|
+
clientSortOptions: O,
|
|
220
|
+
headerColumns: f(() => k.value.map((e) => e.value)),
|
|
221
|
+
headersForRender: k,
|
|
148
222
|
updateSortField: (e, t) => {
|
|
149
223
|
let n = null;
|
|
150
224
|
if (n = t === "none" ? "asc" : t === "asc" ? "desc" : d.value ? "asc" : null, u.value && y(e, n), v.value !== "emit") {
|
|
@@ -161,17 +235,17 @@ function fe(e, t, n, r, i, a, o, s, c, l, u, d, p, m, h, g, _, v, y, b) {
|
|
|
161
235
|
sortOrder: n
|
|
162
236
|
});
|
|
163
237
|
},
|
|
164
|
-
isMultiSorting: (e) => p.value && Array.isArray(p.value.sortBy) ? p.value.sortBy.includes(e) :
|
|
165
|
-
getMultiSortNumber: (e) => p.value && Array.isArray(p.value.sortBy) ? p.value.sortBy.indexOf(e) + 1 :
|
|
238
|
+
isMultiSorting: (e) => p.value && Array.isArray(p.value.sortBy) ? p.value.sortBy.includes(e) : O.value && Array.isArray(O.value.sortBy) ? O.value.sortBy.includes(e) : !1,
|
|
239
|
+
getMultiSortNumber: (e) => p.value && Array.isArray(p.value.sortBy) ? p.value.sortBy.indexOf(e) + 1 : O.value && Array.isArray(O.value.sortBy) ? O.value.sortBy.indexOf(e) + 1 : !1
|
|
166
240
|
};
|
|
167
241
|
}
|
|
168
242
|
//#endregion
|
|
169
243
|
//#region src/components/Table/hooks/usePageItems.ts
|
|
170
|
-
function
|
|
244
|
+
function ve(e, t, n, r, i, a, o, s, c, l) {
|
|
171
245
|
let u = f(() => (e.value - 1) * i.value + 1), d = f(() => n.value ? Math.min(c.value, e.value * i.value) : Math.min(s.value.length, e.value * i.value)), p = f(() => n.value ? r.value : s.value.slice(u.value - 1, d.value)), m = f(() => o.value ? p.value.map((e, t) => ({
|
|
172
246
|
index: u.value + t,
|
|
173
247
|
...e
|
|
174
|
-
})) : p.value), h = f(() => a.value.length === 0 || a.value.every((e) => s.value.every((t) => !
|
|
248
|
+
})) : p.value), h = f(() => a.value.length === 0 || a.value.every((e) => s.value.every((t) => !F(e, t, l.value))) ? "noneSelected" : a.value.length === s.value.length && a.value.every((e) => s.value.some((t) => F(e, t, l.value))) ? "allSelected" : "partSelected");
|
|
175
249
|
return {
|
|
176
250
|
currentPageFirstIndex: u,
|
|
177
251
|
currentPageLastIndex: d,
|
|
@@ -185,7 +259,7 @@ function pe(e, t, n, r, i, a, o, s, c, l) {
|
|
|
185
259
|
})) : m.value.map((e) => {
|
|
186
260
|
let t = { ...e };
|
|
187
261
|
return delete t.index, {
|
|
188
|
-
checkbox: a.value.some((e) =>
|
|
262
|
+
checkbox: a.value.some((e) => F(e, t, l.value)),
|
|
189
263
|
...e
|
|
190
264
|
};
|
|
191
265
|
}) : m.value)
|
|
@@ -193,8 +267,8 @@ function pe(e, t, n, r, i, a, o, s, c, l) {
|
|
|
193
267
|
}
|
|
194
268
|
//#endregion
|
|
195
269
|
//#region src/components/Table/hooks/usePagination.ts
|
|
196
|
-
function
|
|
197
|
-
let s =
|
|
270
|
+
function ye(e, t, n, r, i, a, o) {
|
|
271
|
+
let s = D(a.value ? a.value.page : e.value), c = f(() => Math.ceil(r.value / i.value)), l = f(() => c.value === 0 || s.value === c.value), u = f(() => s.value === 1);
|
|
198
272
|
return {
|
|
199
273
|
currentPaginationNumber: s,
|
|
200
274
|
maxPaginationNumber: c,
|
|
@@ -216,8 +290,8 @@ function me(e, t, n, r, i, a, o) {
|
|
|
216
290
|
}
|
|
217
291
|
//#endregion
|
|
218
292
|
//#region src/components/Table/hooks/useRows.ts
|
|
219
|
-
function
|
|
220
|
-
let i = f(() => !e.value && !t.value.includes(r.value) ? [r.value, ...t.value] : t.value), a =
|
|
293
|
+
function be(e, t, n, r) {
|
|
294
|
+
let i = f(() => !e.value && !t.value.includes(r.value) ? [r.value, ...t.value] : t.value), a = D(n.value ? n.value.rowsPerPage : r.value);
|
|
221
295
|
return {
|
|
222
296
|
rowsItemsComputed: i,
|
|
223
297
|
rowsPerPageRef: a,
|
|
@@ -228,7 +302,7 @@ function he(e, t, n, r) {
|
|
|
228
302
|
}
|
|
229
303
|
//#endregion
|
|
230
304
|
//#region src/components/Table/hooks/useServerOptions.ts
|
|
231
|
-
function
|
|
305
|
+
function xe(e, t, n) {
|
|
232
306
|
let r = f({
|
|
233
307
|
get: () => {
|
|
234
308
|
if (!e.value) return null;
|
|
@@ -275,157 +349,113 @@ function ge(e, t, n) {
|
|
|
275
349
|
}
|
|
276
350
|
//#endregion
|
|
277
351
|
//#region src/components/Table/hooks/useTotalItems.ts
|
|
278
|
-
function
|
|
279
|
-
|
|
280
|
-
let r = String(e ?? ""), i = String(t ?? "");
|
|
281
|
-
return r < i ? n ? 1 : -1 : r > i ? n ? -1 : 1 : 0;
|
|
282
|
-
}
|
|
283
|
-
function F(e, t) {
|
|
284
|
-
return typeof t == "function" ? t(e) : Array.isArray(t) ? t.includes(e) : e === t || String(e ?? "") === String(t);
|
|
285
|
-
}
|
|
286
|
-
function _e(e, t, n, r, i, a, o, s, c, l, u, d) {
|
|
287
|
-
let p = (e) => typeof o.value == "string" && o.value !== "" ? String(M(o.value, e)) : Array.isArray(o.value) ? o.value.map((t) => String(M(t, e))).join("") : Object.values(e).join(" "), m = f(() => {
|
|
288
|
-
if (!r.value && s.value !== "") {
|
|
289
|
-
let e = s.value.toLowerCase();
|
|
290
|
-
return i.value.filter((t) => p(t).toLowerCase().includes(e));
|
|
291
|
-
}
|
|
292
|
-
return i.value;
|
|
293
|
-
}), h = f(() => {
|
|
294
|
-
let e = [...m.value];
|
|
295
|
-
if (n.value) for (let [t, r] of Object.entries(n.value)) r != null && r !== "" && (e = e.filter((e) => F(M(t, e), r)));
|
|
296
|
-
if (t.value) for (let n of t.value) e = e.filter((e) => {
|
|
297
|
-
let { field: t, comparison: r, criteria: i } = n, a = M(String(t), e);
|
|
298
|
-
if (typeof r == "function") return r(a, i);
|
|
299
|
-
switch (r) {
|
|
300
|
-
case "=": return a === i;
|
|
301
|
-
case "!=": return a !== i;
|
|
302
|
-
case ">": return Number(a) > Number(i);
|
|
303
|
-
case "<": return Number(a) < Number(i);
|
|
304
|
-
case "<=": return Number(a) <= Number(i);
|
|
305
|
-
case ">=": return Number(a) >= Number(i);
|
|
306
|
-
case "between": {
|
|
307
|
-
let e = i, t = Number(a);
|
|
308
|
-
return t >= Math.min(...e) && t <= Math.max(...e);
|
|
309
|
-
}
|
|
310
|
-
case "in": return i.includes(a);
|
|
311
|
-
default: return a === i;
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
return e;
|
|
315
|
-
});
|
|
316
|
-
function g(e, t, n, r) {
|
|
317
|
-
let i = e[r], a = t[r];
|
|
318
|
-
return (r === 0 ? n : g(e, t, n, r - 1)).sort((t, n) => {
|
|
319
|
-
for (let i = 0; i < r; i += 1) if (M(e[i], t) !== M(e[i], n)) return 0;
|
|
320
|
-
return P(M(i, t), M(i, n), a);
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
let _ = f(() => {
|
|
352
|
+
function Se(e, t, n, r, i, a, o, s, c, l, u, d) {
|
|
353
|
+
let p = f(() => r.value || s.value === "" ? i.value : ue(i.value, s.value, o.value)), m = f(() => L(p.value, n.value, t.value)), h = f(() => {
|
|
324
354
|
if (r.value) return i.value;
|
|
325
|
-
if (e.value === null) return
|
|
326
|
-
let { sortBy: t, sortDesc: n } = e.value
|
|
327
|
-
return
|
|
328
|
-
}),
|
|
355
|
+
if (e.value === null) return m.value;
|
|
356
|
+
let { sortBy: t, sortDesc: n } = e.value;
|
|
357
|
+
return de(m.value, t, n, l.value);
|
|
358
|
+
}), g = f(() => r.value ? c.value : h.value.length), _ = f({
|
|
329
359
|
get: () => a.value ?? [],
|
|
330
360
|
set: (e) => d("update:selection", e)
|
|
331
361
|
});
|
|
332
362
|
return {
|
|
333
|
-
totalItems:
|
|
334
|
-
selectItemsComputed:
|
|
335
|
-
totalItemsLength:
|
|
363
|
+
totalItems: h,
|
|
364
|
+
selectItemsComputed: _,
|
|
365
|
+
totalItemsLength: g,
|
|
336
366
|
toggleSelectAll: (e) => {
|
|
337
|
-
|
|
367
|
+
_.value = e ? h.value : [], e && d("selectAll");
|
|
338
368
|
},
|
|
339
369
|
toggleSelectItem: (e) => {
|
|
340
|
-
let
|
|
341
|
-
|
|
370
|
+
let { next: t, selected: n, row: r } = z(_.value, e, u.value);
|
|
371
|
+
_.value = t, d(n ? "selectRow" : "deselectRow", r);
|
|
342
372
|
}
|
|
343
373
|
};
|
|
344
374
|
}
|
|
345
|
-
function
|
|
375
|
+
function Ce(e) {
|
|
346
376
|
if (e) return e === "left" || e === "start" ? "start" : e === "right" || e === "end" ? "end" : "center";
|
|
347
377
|
}
|
|
348
|
-
function
|
|
378
|
+
function we(e) {
|
|
349
379
|
if (e === !0 || e === "left") return "left";
|
|
350
380
|
if (e === "right") return "right";
|
|
351
381
|
}
|
|
352
|
-
function
|
|
382
|
+
function Te(e) {
|
|
353
383
|
return {
|
|
354
384
|
text: e.label,
|
|
355
385
|
value: e.key,
|
|
356
386
|
sortable: e.sortable,
|
|
357
|
-
fixed:
|
|
387
|
+
fixed: we(e.fixed),
|
|
358
388
|
width: e.width,
|
|
359
389
|
minWidth: e.minWidth ?? (e.width ? void 0 : 80),
|
|
360
|
-
align:
|
|
390
|
+
align: Ce(e.align),
|
|
361
391
|
render: e.render,
|
|
362
392
|
showOverflowTooltip: e.showOverflowTooltip
|
|
363
393
|
};
|
|
364
394
|
}
|
|
365
|
-
function
|
|
366
|
-
return e.map(
|
|
395
|
+
function Ee(e) {
|
|
396
|
+
return e.map(Te);
|
|
367
397
|
}
|
|
368
|
-
function
|
|
398
|
+
function De(e) {
|
|
369
399
|
return e ?? "asc";
|
|
370
400
|
}
|
|
371
|
-
function
|
|
401
|
+
function Oe(e) {
|
|
372
402
|
return e ?? "";
|
|
373
403
|
}
|
|
374
404
|
//#endregion
|
|
375
|
-
//#region
|
|
376
|
-
var
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
405
|
+
//#region src/components/Table/TableLoadingLine.vue?vue&type=script&setup=true&lang.ts
|
|
406
|
+
var ke = ["aria-label"], Ae = /* @__PURE__ */ y({
|
|
407
|
+
__name: "TableLoadingLine",
|
|
408
|
+
setup(e) {
|
|
409
|
+
let t = u();
|
|
410
|
+
return (e, n) => (T(), h("div", {
|
|
411
|
+
class: "m-table__loading-line",
|
|
412
|
+
role: "status",
|
|
413
|
+
"aria-label": j(t).loading
|
|
414
|
+
}, null, 8, ke));
|
|
415
|
+
}
|
|
416
|
+
}), je = ["aria-label"], Me = ["aria-busy"], Ne = ["id"], Pe = [
|
|
385
417
|
"aria-sort",
|
|
386
418
|
"tabindex",
|
|
387
419
|
"onClick",
|
|
388
420
|
"onKeydown"
|
|
389
|
-
],
|
|
421
|
+
], Fe = {
|
|
390
422
|
key: 0,
|
|
391
423
|
class: "m-table__cell-inner m-table__cell-inner--selection"
|
|
392
|
-
},
|
|
424
|
+
}, Ie = {
|
|
393
425
|
key: 1,
|
|
394
426
|
class: "m-table__cell-inner m-table__cell-inner--selection"
|
|
395
|
-
},
|
|
427
|
+
}, Le = ["title"], Re = {
|
|
396
428
|
key: 4,
|
|
397
|
-
class: "m-
|
|
398
|
-
|
|
429
|
+
class: "m-table__sort",
|
|
430
|
+
"aria-hidden": "true"
|
|
431
|
+
}, ze = {
|
|
399
432
|
key: 5,
|
|
400
433
|
class: "m-table__multi-sort-number"
|
|
401
|
-
},
|
|
434
|
+
}, Be = {
|
|
402
435
|
key: 3,
|
|
403
436
|
class: "m-table__body"
|
|
404
|
-
},
|
|
437
|
+
}, Ve = [
|
|
405
438
|
"onClick",
|
|
406
439
|
"onDblclick",
|
|
407
440
|
"onContextmenu"
|
|
408
|
-
],
|
|
441
|
+
], He = ["onClick"], Ue = [
|
|
409
442
|
"aria-expanded",
|
|
410
443
|
"aria-label",
|
|
411
444
|
"onClick"
|
|
412
|
-
],
|
|
445
|
+
], We = {
|
|
413
446
|
key: 6,
|
|
414
447
|
class: "m-table__cell-text"
|
|
415
|
-
},
|
|
448
|
+
}, Ge = { class: "m-table__tooltip-trigger" }, Ke = { class: "m-table__cell-text" }, qe = ["colspan"], Je = {
|
|
416
449
|
key: 0,
|
|
417
|
-
class: "m-table__loading"
|
|
418
|
-
}, Ge = { class: "m-table__loading-body" }, Ke = {
|
|
419
|
-
key: 1,
|
|
420
450
|
class: "m-table__message",
|
|
421
451
|
role: "status"
|
|
422
|
-
},
|
|
452
|
+
}, Ye = { class: "m-table__empty-text" }, Xe = {
|
|
423
453
|
key: 0,
|
|
424
454
|
class: "m-table__empty-description"
|
|
425
|
-
},
|
|
455
|
+
}, Ze = {
|
|
426
456
|
key: 0,
|
|
427
457
|
class: "m-table__footer"
|
|
428
|
-
},
|
|
458
|
+
}, Qe = { class: "m-table__items-index" }, $e = /* @__PURE__ */ y({
|
|
429
459
|
inheritAttrs: !1,
|
|
430
460
|
__name: "Table",
|
|
431
461
|
props: {
|
|
@@ -595,362 +625,368 @@ var Ee = /*#__PURE__*/ I(we, [["render", L]]), De = ["aria-label"], Oe = ["aria-
|
|
|
595
625
|
"update:expandedRowKeys",
|
|
596
626
|
"update:filters"
|
|
597
627
|
],
|
|
598
|
-
setup(
|
|
599
|
-
let
|
|
600
|
-
|
|
601
|
-
}, { value:
|
|
602
|
-
controlled: () =>
|
|
628
|
+
setup(y, { expose: se, emit: ce }) {
|
|
629
|
+
let I = y, L = ce, le = te(), { rootAttrs: ue } = e(le, () => I.pt), R = (e, ...t) => {
|
|
630
|
+
L(e, ...t);
|
|
631
|
+
}, { value: de, setValue: fe } = t({
|
|
632
|
+
controlled: () => I.filters ?? void 0,
|
|
603
633
|
defaultValue: null
|
|
604
634
|
}, (e) => {
|
|
605
|
-
|
|
606
|
-
}),
|
|
607
|
-
if (
|
|
608
|
-
if (
|
|
609
|
-
}),
|
|
610
|
-
|
|
611
|
-
|
|
635
|
+
L("filter", e), L("update:filters", e);
|
|
636
|
+
}), z = u(), { tableNodeId: me, clickEventType: he, bodyTextDirection: we, checkboxColumnWidth: Te, expandColumnWidth: ke, expandedRowKeys: $e, filterOptions: et, fixedCheckbox: tt, fixedExpand: nt, fixedHeader: rt, fixedIndex: it, headerTextDirection: at, indexColumnWidth: ot, selectionMode: st, selectedItem: ct, loading: B, mustSort: lt, multiSort: ut, rowsItems: dt, rowsPerPage: ft, searchField: pt, searchValue: mt, serverItemsLength: ht, serverOptions: gt, showIndex: _t, sortMode: vt, tableHeight: yt, tableMinHeight: bt, rowsOfPageSeparatorMessage: xt, showIndexSymbol: St, preventContextMenuRow: Ct, headerItemClassName: wt, bodyRowClassName: Tt, bodyExpandRowClassName: Et, bodyItemClassName: Dt, tableClassName: Ot, headerClassName: kt, rowsPerPageMessage: At, hideHeader: jt, hideRowsPerPage: Mt, clickRowToExpand: Nt, expandable: Pt, emptyDescription: Ft, fit: It, emptyText: Lt, showHeader: Rt, maxHeight: zt, paginator: Bt, rowKey: V, ariaLabel: Vt, size: Ht } = ee(I), H = f(() => Ee(I.columns)), Ut = f(() => I.rows), Wt = f(() => I.selection ?? null), Gt = f(() => Oe(I.sortField)), Kt = f(() => De(I.sortOrder)), qt = f(() => I.page ?? 1), Jt = f(() => I.striped), Yt = f(() => I.bordered), Xt = f(() => I.highlightCurrent), Zt = f(() => !I.rowHover), Qt = l("Table", () => Ht.value), $t = f(() => {
|
|
637
|
+
if (Qt.value === "small") return "m-table--small";
|
|
638
|
+
if (Qt.value === "large") return "m-table--large";
|
|
639
|
+
}), en = f(() => [
|
|
640
|
+
Ot.value,
|
|
641
|
+
$t.value,
|
|
612
642
|
{
|
|
613
|
-
"m-table--border":
|
|
614
|
-
"m-table--striped":
|
|
615
|
-
"m-table--enable-row-hover": !
|
|
643
|
+
"m-table--border": Yt.value,
|
|
644
|
+
"m-table--striped": Jt.value,
|
|
645
|
+
"m-table--enable-row-hover": !Zt.value
|
|
616
646
|
}
|
|
617
|
-
]),
|
|
647
|
+
]), tn = f(() => $n.value.length > 0 || It.value !== !1), nn = f(() => Lt.value ?? z.value.emptyMessage), rn = f(() => Rt.value ?? !jt.value), an = f(() => zt.value ?? yt.value), on = f(() => an.value ? `${an.value}px` : null), sn = f(() => `${bt.value}px`), U = ne(), cn = f(() => !!U.pagination), ln = f(() => !!U.loading), un = f(() => Pt.value || !!U.expansion), dn = f(() => !!U.body), fn = f(() => {
|
|
618
648
|
let e = /* @__PURE__ */ new Map();
|
|
619
649
|
for (let t of H.value) t.render && e.set(t.value, t.render);
|
|
620
650
|
return e;
|
|
621
|
-
}),
|
|
651
|
+
}), pn = f(() => {
|
|
622
652
|
let e = /* @__PURE__ */ new Map();
|
|
623
653
|
for (let t of H.value) {
|
|
624
|
-
let n =
|
|
654
|
+
let n = Ce(t.align);
|
|
625
655
|
n && e.set(t.value, n);
|
|
626
656
|
}
|
|
627
657
|
return e;
|
|
628
|
-
}),
|
|
629
|
-
|
|
630
|
-
let
|
|
631
|
-
function
|
|
632
|
-
|
|
633
|
-
let t =
|
|
634
|
-
|
|
658
|
+
}), mn = D(), hn = D();
|
|
659
|
+
E("dataTable", mn);
|
|
660
|
+
let gn = D(!1), _n = D(!1), vn = D(null), yn = f(() => I.currentRowKey ?? vn.value);
|
|
661
|
+
function bn(e) {
|
|
662
|
+
gn.value = e.scrollLeft > 0;
|
|
663
|
+
let t = hn.value?.wrapRef;
|
|
664
|
+
_n.value = t ? t.scrollWidth - t.clientWidth - t.scrollLeft > 1 : !1;
|
|
635
665
|
}
|
|
636
|
-
let
|
|
637
|
-
let e =
|
|
666
|
+
let xn = f(() => {
|
|
667
|
+
let e = st.value ?? (Wt.value === null ? null : "multiple");
|
|
638
668
|
return e === "multiple" ? "checkbox" : e === "single" ? "radio" : null;
|
|
639
|
-
}),
|
|
640
|
-
"m-table__main--fixed-header":
|
|
641
|
-
"m-table__main--fixed-height": !!
|
|
642
|
-
"m-table__main--shadow":
|
|
643
|
-
"m-table__main--shadow-end":
|
|
644
|
-
"m-table__main--table-fixed":
|
|
645
|
-
"m-table__main--border-cell":
|
|
646
|
-
}]),
|
|
647
|
-
if (!
|
|
648
|
-
let e =
|
|
649
|
-
return e >= 0 ?
|
|
650
|
-
}), { currentPaginationNumber: J, maxPaginationNumber: Y, isLastPage:
|
|
651
|
-
function
|
|
652
|
-
|
|
669
|
+
}), Sn = f(() => xn.value === "checkbox"), Cn = f(() => xn.value === "radio"), wn = f(() => ["m-table__main", {
|
|
670
|
+
"m-table__main--fixed-header": rt.value,
|
|
671
|
+
"m-table__main--fixed-height": !!an.value,
|
|
672
|
+
"m-table__main--shadow": gn.value,
|
|
673
|
+
"m-table__main--shadow-end": _n.value,
|
|
674
|
+
"m-table__main--table-fixed": tn.value,
|
|
675
|
+
"m-table__main--border-cell": Yt.value
|
|
676
|
+
}]), Tn = f(() => ({ minHeight: sn.value })), W = f(() => gt.value !== null), { serverOptionsComputed: En, updateServerOptionsPage: Dn, updateServerOptionsSort: On, updateServerOptionsRowsPerPage: kn } = xe(gt, ut, R), { clientSortOptions: An, headerColumns: jn, headersForRender: G, updateSortField: Mn, isMultiSorting: Nn, getMultiSortNumber: Pn } = _e(St, Te, ke, tt, nt, it, H, un, ot, xn, W, lt, En, _t, Gt, Kt, ut, vt, On, R), Fn = f(() => vt.value === "emit" ? null : An.value), { rowsItemsComputed: In, rowsPerPageRef: K, updateRowsPerPage: Ln } = be(W, dt, gt, ft), { totalItems: Rn, selectItemsComputed: zn, totalItemsLength: q, toggleSelectAll: Bn, toggleSelectItem: Vn } = Se(Fn, et, de, W, Ut, Wt, pt, mt, ht, ut, V, R), Hn = f(() => {
|
|
677
|
+
if (!ct.value) return null;
|
|
678
|
+
let e = Rn.value.findIndex((e) => F(e, ct.value, V.value));
|
|
679
|
+
return e >= 0 ? oe(ct.value, e, V.value) : null;
|
|
680
|
+
}), { currentPaginationNumber: J, maxPaginationNumber: Y, isLastPage: Un, isFirstPage: Wn, nextPage: Gn, prevPage: Kn, updatePage: X, updateCurrentPaginationNumber: qn } = ye(qt, W, B, q, K, gt, Dn), { currentPageFirstIndex: Z, currentPageLastIndex: Jn, multipleSelectStatus: Yn, pageItems: Q } = ve(J, Sn, W, Ut, K, zn, _t, Rn, q, V), Xn = f(() => J.value === 0 ? 0 : (J.value - 1) * K.value), { isRowExpanded: Zn, toggleExpandRow: Qn } = pe($e, V, Xn, R), { fixedHeaders: $n, lastFixedColumn: er, firstRightFixedColumn: tr, fixedColumnsInfos: nr } = ge(G), { clickRow: rr } = ie(he, Sn, _t, R);
|
|
681
|
+
function ir(e, t) {
|
|
682
|
+
Ct.value && t.preventDefault(), L("contextmenuRow", e, t);
|
|
653
683
|
}
|
|
654
|
-
function
|
|
655
|
-
let t = H.value.find((t) => t.value === e.value), n = e.width ?? t?.width ?? (
|
|
656
|
-
if (n &&
|
|
684
|
+
function ar(e) {
|
|
685
|
+
let t = H.value.find((t) => t.value === e.value), n = e.width ?? t?.width ?? ($n.value.length ? 100 : null);
|
|
686
|
+
if (n && tn.value) return `width: ${n}px; min-width: ${n}px;`;
|
|
657
687
|
let r = t?.minWidth;
|
|
658
|
-
if (r &&
|
|
688
|
+
if (r && tn.value) return `min-width: ${r}px;`;
|
|
659
689
|
}
|
|
660
|
-
function
|
|
661
|
-
if (
|
|
662
|
-
let n =
|
|
690
|
+
function or(e, t = "th") {
|
|
691
|
+
if (!$n.value.length) return;
|
|
692
|
+
let n = nr.value.find((t) => t.value === e);
|
|
663
693
|
if (n) return `${n.fixed === "right" ? "right" : "left"}: ${n.distance}px;z-index: ${t === "th" ? 3 : 1};position: sticky;`;
|
|
664
694
|
}
|
|
665
|
-
function
|
|
666
|
-
let n = typeof
|
|
695
|
+
function sr(e, t) {
|
|
696
|
+
let n = typeof wt.value == "string" ? wt.value : wt.value(e, t + 1);
|
|
667
697
|
return [{
|
|
668
698
|
"m-table__cell--selection": e.text === "checkbox" || e.value === "radio",
|
|
669
699
|
"m-table__header-cell--sortable": e.sortable,
|
|
670
700
|
"m-table__header-cell--ascending": e.sortable && e.sortType === "asc",
|
|
671
701
|
"m-table__header-cell--descending": e.sortable && e.sortType === "desc",
|
|
672
|
-
"m-table__header-cell--shadow": e.value ===
|
|
673
|
-
"m-table__header-cell--shadow-end": e.value ===
|
|
702
|
+
"m-table__header-cell--shadow": e.value === er.value,
|
|
703
|
+
"m-table__header-cell--shadow-end": e.value === tr.value
|
|
674
704
|
}, n];
|
|
675
705
|
}
|
|
676
|
-
function
|
|
677
|
-
return ["m-table__header-inner", `m-table__header-inner--${
|
|
706
|
+
function cr() {
|
|
707
|
+
return ["m-table__header-inner", `m-table__header-inner--${at.value}`];
|
|
678
708
|
}
|
|
679
|
-
function
|
|
709
|
+
function lr(e) {
|
|
680
710
|
if (e === "center") return "m-table__cell--center";
|
|
681
711
|
if (e === "right" || e === "end") return "m-table__cell--right";
|
|
682
712
|
}
|
|
683
|
-
function
|
|
684
|
-
return
|
|
713
|
+
function ur(e) {
|
|
714
|
+
return lr(pn.value.get(e) || we.value);
|
|
685
715
|
}
|
|
686
|
-
function
|
|
716
|
+
function dr(e, t) {
|
|
687
717
|
return {
|
|
688
718
|
row: t,
|
|
689
719
|
item: t,
|
|
690
720
|
column: e,
|
|
691
|
-
value:
|
|
721
|
+
value: P(e, t)
|
|
692
722
|
};
|
|
693
723
|
}
|
|
694
|
-
function
|
|
695
|
-
return
|
|
724
|
+
function fr(e) {
|
|
725
|
+
return I.showOverflowTooltip ? !0 : !!H.value.find((t) => t.value === e)?.showOverflowTooltip;
|
|
696
726
|
}
|
|
697
|
-
function
|
|
727
|
+
function pr(e) {
|
|
698
728
|
if (e.sortable) return e.sortType === "asc" ? "ascending" : e.sortType === "desc" ? "descending" : "none";
|
|
699
729
|
}
|
|
700
|
-
function
|
|
701
|
-
e.sortable && e.sortType &&
|
|
730
|
+
function mr(e) {
|
|
731
|
+
e.sortable && e.sortType && Mn(e.value, e.sortType);
|
|
702
732
|
}
|
|
703
|
-
function
|
|
704
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
733
|
+
function hr(e, t) {
|
|
734
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), mr(e));
|
|
705
735
|
}
|
|
706
736
|
function $(e, t) {
|
|
707
|
-
return
|
|
737
|
+
return oe(e, Xn.value + t, V.value);
|
|
708
738
|
}
|
|
709
|
-
function
|
|
710
|
-
return
|
|
739
|
+
function gr(e, t) {
|
|
740
|
+
return Sn.value ? !!e.checkbox : Cn.value ? Hn.value === $(e, t) : !1;
|
|
711
741
|
}
|
|
712
|
-
function
|
|
742
|
+
function _r(e) {
|
|
713
743
|
let t = { ...e };
|
|
714
|
-
delete t.index,
|
|
744
|
+
delete t.index, L("update:selectedItem", t), L("selectRow", t);
|
|
745
|
+
}
|
|
746
|
+
function vr(e) {
|
|
747
|
+
Ln(e);
|
|
715
748
|
}
|
|
716
|
-
function yr(e) {
|
|
717
|
-
|
|
749
|
+
function yr(e, t) {
|
|
750
|
+
return !Xt.value || yn.value == null ? !1 : yn.value === $(e, t);
|
|
718
751
|
}
|
|
719
752
|
function br(e, t) {
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
function xr(e, t) {
|
|
723
|
-
if (!Zt.value) return;
|
|
724
|
-
let n = $(e, t), r = bn.value;
|
|
753
|
+
if (!Xt.value) return;
|
|
754
|
+
let n = $(e, t), r = yn.value;
|
|
725
755
|
if (r === n) return;
|
|
726
756
|
let i = r == null ? null : Q.value.find((e, t) => $(e, t) === r) ?? null;
|
|
727
|
-
|
|
757
|
+
vn.value = n, L("update:currentRowKey", n), L("current-change", e, i);
|
|
728
758
|
}
|
|
729
|
-
function
|
|
730
|
-
|
|
759
|
+
function xr(e, t, n, r) {
|
|
760
|
+
rr(e, Xn.value + t, n, r), n === "single" && br(e, t);
|
|
731
761
|
}
|
|
732
|
-
return
|
|
733
|
-
e != null && (
|
|
734
|
-
}),
|
|
735
|
-
|
|
736
|
-
}),
|
|
737
|
-
W.value ?
|
|
738
|
-
}),
|
|
739
|
-
W.value ||
|
|
740
|
-
}),
|
|
741
|
-
|
|
742
|
-
}, { deep: !0 }),
|
|
743
|
-
|
|
744
|
-
}),
|
|
745
|
-
currentPageFirstIndex:
|
|
746
|
-
currentPageLastIndex:
|
|
762
|
+
return M(() => I.currentRowKey, (e) => {
|
|
763
|
+
e != null && (vn.value = e);
|
|
764
|
+
}), M(B, (e, t) => {
|
|
765
|
+
En.value && e === !1 && t === !0 && qn(En.value.page);
|
|
766
|
+
}), M(K, (e) => {
|
|
767
|
+
W.value ? kn(e) : X(1);
|
|
768
|
+
}), M([mt, et], () => {
|
|
769
|
+
W.value || X(1);
|
|
770
|
+
}), M(() => I.filters, (e) => {
|
|
771
|
+
L("filter", e ?? null);
|
|
772
|
+
}, { deep: !0 }), M(Q, (e) => L("updatePageItems", e)), M(Rn, (e) => L("updateTotalItems", e)), M(J, (e) => {
|
|
773
|
+
L("update:page", e), L("page", e);
|
|
774
|
+
}), se({
|
|
775
|
+
currentPageFirstIndex: Z,
|
|
776
|
+
currentPageLastIndex: Jn,
|
|
747
777
|
clientItemsLength: q,
|
|
748
778
|
maxPaginationNumber: Y,
|
|
749
779
|
currentPaginationNumber: J,
|
|
750
|
-
isLastPage:
|
|
780
|
+
isLastPage: Un,
|
|
751
781
|
isFirstPage: Wn,
|
|
752
782
|
nextPage: Gn,
|
|
753
783
|
prevPage: Kn,
|
|
754
|
-
updatePage:
|
|
755
|
-
rowsPerPageOptions:
|
|
784
|
+
updatePage: X,
|
|
785
|
+
rowsPerPageOptions: In,
|
|
756
786
|
rowsPerPageActiveOption: K,
|
|
757
|
-
updateRowsPerPageActiveOption:
|
|
758
|
-
setFilters:
|
|
759
|
-
}), (e, t) => (
|
|
787
|
+
updateRowsPerPageActiveOption: Ln,
|
|
788
|
+
setFilters: fe
|
|
789
|
+
}), (e, t) => (T(), h("div", x({
|
|
760
790
|
ref_key: "dataTable",
|
|
761
|
-
ref:
|
|
762
|
-
},
|
|
763
|
-
class: ["m-table",
|
|
764
|
-
"aria-label":
|
|
765
|
-
}), [
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
},
|
|
779
|
-
|
|
780
|
-
|
|
791
|
+
ref: mn
|
|
792
|
+
}, j(ue), {
|
|
793
|
+
class: ["m-table", en.value],
|
|
794
|
+
"aria-label": j(Vt) || void 0
|
|
795
|
+
}), [v(a, {
|
|
796
|
+
loading: j(B),
|
|
797
|
+
size: "sm"
|
|
798
|
+
}, _({
|
|
799
|
+
default: re(() => [v(r, {
|
|
800
|
+
ref_key: "scrollbarRef",
|
|
801
|
+
ref: hn,
|
|
802
|
+
class: "m-table__scrollbar",
|
|
803
|
+
height: on.value || void 0,
|
|
804
|
+
"wrap-style": Tn.value,
|
|
805
|
+
"wrap-class": wn.value,
|
|
806
|
+
noresize: "",
|
|
807
|
+
onScroll: bn
|
|
808
|
+
}, {
|
|
809
|
+
default: re(() => [g("div", {
|
|
810
|
+
class: "m-table__surface",
|
|
811
|
+
"aria-busy": j(B) || void 0
|
|
812
|
+
}, [g("table", { id: j(me) || void 0 }, [
|
|
813
|
+
g("colgroup", null, [(T(!0), h(d, null, O(j(G), (e, t) => (T(), h("col", {
|
|
781
814
|
key: t,
|
|
782
|
-
style:
|
|
815
|
+
style: w(ar(e))
|
|
783
816
|
}, null, 4))), 128))]),
|
|
784
|
-
|
|
817
|
+
j(U)["customize-headers"] ? k(e.$slots, "customize-headers", {}, void 0, void 0, 0) : j(G).length && rn.value ? (T(), h("thead", {
|
|
785
818
|
key: 1,
|
|
786
|
-
class:
|
|
787
|
-
}, [g("tr", null, [(
|
|
788
|
-
key:
|
|
789
|
-
class:
|
|
790
|
-
style:
|
|
791
|
-
"aria-sort":
|
|
792
|
-
tabindex:
|
|
793
|
-
onClick:
|
|
794
|
-
onKeydown: (e) =>
|
|
795
|
-
}, [
|
|
796
|
-
key:
|
|
797
|
-
"model-value":
|
|
798
|
-
indeterminate:
|
|
799
|
-
"aria-label":
|
|
800
|
-
"onUpdate:modelValue":
|
|
801
|
-
onClick: t[0] ||=
|
|
819
|
+
class: S(["m-table__header", [j(kt)]])
|
|
820
|
+
}, [g("tr", null, [(T(!0), h(d, null, O(j(G), (r, a) => (T(), h("th", {
|
|
821
|
+
key: a,
|
|
822
|
+
class: S(sr(r, a)),
|
|
823
|
+
style: w(or(r.value)),
|
|
824
|
+
"aria-sort": pr(r),
|
|
825
|
+
tabindex: r.sortable ? 0 : void 0,
|
|
826
|
+
onClick: N((e) => mr(r), ["stop"]),
|
|
827
|
+
onKeydown: (e) => hr(r, e)
|
|
828
|
+
}, [r.text === "checkbox" ? (T(), h("div", Fe, [(T(), p(i, {
|
|
829
|
+
key: j(Yn),
|
|
830
|
+
"model-value": j(Yn) === "allSelected",
|
|
831
|
+
indeterminate: j(Yn) === "partSelected",
|
|
832
|
+
"aria-label": j(z).selectAllPage,
|
|
833
|
+
"onUpdate:modelValue": j(Bn),
|
|
834
|
+
onClick: t[0] ||= N(() => {}, ["stop"])
|
|
802
835
|
}, null, 8, [
|
|
803
836
|
"model-value",
|
|
804
837
|
"indeterminate",
|
|
805
838
|
"aria-label",
|
|
806
839
|
"onUpdate:modelValue"
|
|
807
|
-
]))])) :
|
|
840
|
+
]))])) : r.value === "radio" ? (T(), h("div", Ie)) : (T(), h("span", {
|
|
808
841
|
key: 2,
|
|
809
|
-
class:
|
|
842
|
+
class: S(cr())
|
|
810
843
|
}, [
|
|
811
|
-
|
|
844
|
+
j(U)[`header-${r.value}`] ? k(e.$slots, `header-${r.value}`, x({ ref_for: !0 }, r), void 0, void 0, 0) : j(U)[`header-${r.value.toLowerCase()}`] ? k(e.$slots, `header-${r.value.toLowerCase()}`, x({ ref_for: !0 }, r), void 0, void 0, 1) : j(U).header ? k(e.$slots, "header", x({ ref_for: !0 }, r), void 0, void 0, 2) : (T(), h("span", {
|
|
812
845
|
key: 3,
|
|
813
846
|
class: "m-table__header-text",
|
|
814
|
-
title:
|
|
815
|
-
},
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
847
|
+
title: r.text
|
|
848
|
+
}, A(r.text), 9, Le)),
|
|
849
|
+
r.sortable ? (T(), h("span", Re, [v(n, {
|
|
850
|
+
name: "triangle-up",
|
|
851
|
+
class: "m-table__sort-icon m-table__sort-icon--ascending"
|
|
852
|
+
}), v(n, {
|
|
853
|
+
name: "triangle-down",
|
|
854
|
+
class: "m-table__sort-icon m-table__sort-icon--descending"
|
|
855
|
+
})])) : m("", !0),
|
|
856
|
+
j(ut) && j(Nn)(r.value) ? (T(), h("span", ze, A(j(Pn)(r.value)), 1)) : m("", !0)
|
|
857
|
+
], 2))], 46, Pe))), 128))])], 2)) : m("", !0),
|
|
858
|
+
dn.value ? k(e.$slots, "body", C(b(j(Q))), void 0, void 0, 2) : j(jn).length ? (T(), h("tbody", Be, [
|
|
859
|
+
k(e.$slots, "body-prepend", C(b({
|
|
860
|
+
items: j(Q),
|
|
822
861
|
pagination: {
|
|
823
|
-
isFirstPage:
|
|
824
|
-
isLastPage:
|
|
825
|
-
currentPaginationNumber:
|
|
826
|
-
maxPaginationNumber:
|
|
827
|
-
nextPage:
|
|
828
|
-
prevPage:
|
|
862
|
+
isFirstPage: j(Wn),
|
|
863
|
+
isLastPage: j(Un),
|
|
864
|
+
currentPaginationNumber: j(J),
|
|
865
|
+
maxPaginationNumber: j(Y),
|
|
866
|
+
nextPage: j(Gn),
|
|
867
|
+
prevPage: j(Kn)
|
|
829
868
|
},
|
|
830
|
-
headers:
|
|
869
|
+
headers: j(G)
|
|
831
870
|
}))),
|
|
832
|
-
(
|
|
833
|
-
class:
|
|
834
|
-
"m-table__row--striped":
|
|
835
|
-
"m-table__row--selected":
|
|
836
|
-
"m-table__row--current":
|
|
837
|
-
}, typeof
|
|
871
|
+
(T(!0), h(d, null, O(j(Q), (r, a) => (T(), h(d, { key: $(r, a) }, [g("tr", {
|
|
872
|
+
class: S([{
|
|
873
|
+
"m-table__row--striped": Jt.value && (a + 1) % 2 == 0,
|
|
874
|
+
"m-table__row--selected": gr(r, a),
|
|
875
|
+
"m-table__row--current": yr(r, a)
|
|
876
|
+
}, typeof j(Tt) == "string" ? j(Tt) : j(Tt)(r, a + 1)]),
|
|
838
877
|
onClick: (e) => {
|
|
839
|
-
|
|
878
|
+
xr(r, a, "single", e), j(Nt) && j(Qn)(r, a, e);
|
|
840
879
|
},
|
|
841
|
-
onDblclick: (e) =>
|
|
842
|
-
onContextmenu: (e) =>
|
|
843
|
-
}, [(
|
|
880
|
+
onDblclick: (e) => xr(r, a, "double", e),
|
|
881
|
+
onContextmenu: (e) => ir(r, e)
|
|
882
|
+
}, [(T(!0), h(d, null, O(j(jn), (o, l) => (T(), h("td", {
|
|
844
883
|
key: l,
|
|
845
|
-
style:
|
|
846
|
-
class:
|
|
884
|
+
style: w(or(o, "td")),
|
|
885
|
+
class: S([
|
|
847
886
|
{
|
|
848
|
-
"m-table__cell--shadow": o ===
|
|
849
|
-
"m-table__cell--shadow-end": o ===
|
|
887
|
+
"m-table__cell--shadow": o === j(er),
|
|
888
|
+
"m-table__cell--shadow-end": o === j(tr),
|
|
850
889
|
"m-table__cell--expand": o === "expand",
|
|
851
890
|
"m-table__cell--selection": o === "checkbox" || o === "radio"
|
|
852
891
|
},
|
|
853
|
-
|
|
854
|
-
typeof
|
|
892
|
+
ur(o),
|
|
893
|
+
typeof j(Dt) == "string" ? j(Dt) : j(Dt)(o, a + 1)
|
|
855
894
|
]),
|
|
856
|
-
onClick: (e) => o === "expand" ?
|
|
857
|
-
}, [g("div", { class:
|
|
895
|
+
onClick: (e) => o === "expand" ? j(Qn)(r, a, e) : null
|
|
896
|
+
}, [g("div", { class: S(["m-table__cell-inner", {
|
|
858
897
|
"m-table__cell-inner--expand": o === "expand",
|
|
859
898
|
"m-table__cell-inner--selection": o === "checkbox" || o === "radio"
|
|
860
|
-
}]) }, [
|
|
899
|
+
}]) }, [j(U)[`cell-${o}`] ? k(e.$slots, `cell-${o}`, x({ ref_for: !0 }, dr(o, r)), void 0, void 0, 0) : j(U)[`cell-${o.toLowerCase()}`] ? k(e.$slots, `cell-${o.toLowerCase()}`, x({ ref_for: !0 }, dr(o, r)), void 0, void 0, 1) : o === "expand" ? (T(), h("button", {
|
|
861
900
|
key: 2,
|
|
862
901
|
type: "button",
|
|
863
|
-
class:
|
|
864
|
-
"aria-expanded":
|
|
865
|
-
"aria-label":
|
|
866
|
-
onClick:
|
|
867
|
-
}, [
|
|
902
|
+
class: S(["m-table__expand-btn", { "m-table__expand-btn--expanded": j(Zn)(r, a) }]),
|
|
903
|
+
"aria-expanded": j(Zn)(r, a),
|
|
904
|
+
"aria-label": j(z).expand,
|
|
905
|
+
onClick: N((e) => j(Qn)(r, a, e), ["stop"])
|
|
906
|
+
}, [v(n, { name: "chevron-right" })], 10, Ue)) : o === "checkbox" ? (T(), p(i, {
|
|
868
907
|
key: 3,
|
|
869
908
|
"model-value": !!r.checkbox,
|
|
870
|
-
"aria-label":
|
|
871
|
-
"onUpdate:modelValue": (e) =>
|
|
872
|
-
onClick: t[1] ||=
|
|
909
|
+
"aria-label": j(z).selectRow.replace("{index}", String(j(Z) + a)),
|
|
910
|
+
"onUpdate:modelValue": (e) => j(Vn)(r),
|
|
911
|
+
onClick: t[1] ||= N(() => {}, ["stop"])
|
|
873
912
|
}, null, 8, [
|
|
874
913
|
"model-value",
|
|
875
914
|
"aria-label",
|
|
876
915
|
"onUpdate:modelValue"
|
|
877
|
-
])) : o === "radio" ? (
|
|
916
|
+
])) : o === "radio" ? (T(), p(c, {
|
|
878
917
|
key: 4,
|
|
879
|
-
"model-value":
|
|
918
|
+
"model-value": Hn.value ?? void 0,
|
|
880
919
|
value: $(r, a),
|
|
881
|
-
"aria-label":
|
|
882
|
-
"onUpdate:modelValue": (e) =>
|
|
883
|
-
onClick: t[2] ||=
|
|
920
|
+
"aria-label": j(z).selectRow.replace("{index}", String(j(Z) + a)),
|
|
921
|
+
"onUpdate:modelValue": (e) => _r(r),
|
|
922
|
+
onClick: t[2] ||= N(() => {}, ["stop"])
|
|
884
923
|
}, null, 8, [
|
|
885
924
|
"model-value",
|
|
886
925
|
"value",
|
|
887
926
|
"aria-label",
|
|
888
927
|
"onUpdate:modelValue"
|
|
889
|
-
])) :
|
|
928
|
+
])) : j(U)["body-cell"] ? k(e.$slots, "body-cell", x({ ref_for: !0 }, {
|
|
890
929
|
column: o,
|
|
891
930
|
item: r,
|
|
892
931
|
row: r,
|
|
893
|
-
value:
|
|
894
|
-
}), void 0, void 0, 5) :
|
|
932
|
+
value: j(P)(o, r)
|
|
933
|
+
}), void 0, void 0, 5) : fn.value.get(o) ? (T(), h("span", We, A(fn.value.get(o)(r)), 1)) : (T(), p(s, {
|
|
895
934
|
key: 7,
|
|
896
|
-
content:
|
|
897
|
-
disabled: !
|
|
935
|
+
content: j(ae)(o, r),
|
|
936
|
+
disabled: !fr(o)
|
|
898
937
|
}, {
|
|
899
|
-
default:
|
|
938
|
+
default: re(() => [g("span", Ge, [g("span", Ke, A(j(ae)(o, r)), 1)])]),
|
|
900
939
|
_: 2
|
|
901
|
-
}, 1032, ["content", "disabled"]))], 2)], 14,
|
|
940
|
+
}, 1032, ["content", "disabled"]))], 2)], 14, He))), 128))], 42, Ve), un.value && j(Zn)(r, a) ? (T(), h("tr", {
|
|
902
941
|
key: 0,
|
|
903
|
-
class:
|
|
942
|
+
class: S([{ "m-table__row--striped": Jt.value && (a + 1) % 2 == 0 }, typeof j(Et) == "string" ? j(Et) : j(Et)(r, a + 1)])
|
|
904
943
|
}, [g("td", {
|
|
905
|
-
colspan:
|
|
944
|
+
colspan: j(G).length,
|
|
906
945
|
class: "m-table__cell--expanded"
|
|
907
|
-
}, [r.expandLoading ? (
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
})) : m("", !0), D(e.$slots, "expansion", b({ ref_for: !0 }, { row: r }))], 8, Ue)], 2)) : m("", !0)], 64))), 128)),
|
|
911
|
-
D(e.$slots, "body-append", S(y({
|
|
912
|
-
items: k(Q),
|
|
946
|
+
}, [r.expandLoading ? (T(), p(Ae, { key: 0 })) : m("", !0), k(e.$slots, "expansion", x({ ref_for: !0 }, { row: r }))], 8, qe)], 2)) : m("", !0)], 64))), 128)),
|
|
947
|
+
k(e.$slots, "body-append", C(b({
|
|
948
|
+
items: j(Q),
|
|
913
949
|
pagination: {
|
|
914
|
-
isFirstPage:
|
|
915
|
-
isLastPage:
|
|
916
|
-
currentPaginationNumber:
|
|
917
|
-
maxPaginationNumber:
|
|
918
|
-
nextPage:
|
|
919
|
-
prevPage:
|
|
920
|
-
updatePage:
|
|
950
|
+
isFirstPage: j(Wn),
|
|
951
|
+
isLastPage: j(Un),
|
|
952
|
+
currentPaginationNumber: j(J),
|
|
953
|
+
maxPaginationNumber: j(Y),
|
|
954
|
+
nextPage: j(Gn),
|
|
955
|
+
prevPage: j(Kn),
|
|
956
|
+
updatePage: j(X)
|
|
921
957
|
},
|
|
922
|
-
headers:
|
|
958
|
+
headers: j(G)
|
|
923
959
|
})))
|
|
924
960
|
])) : m("", !0)
|
|
925
|
-
], 8,
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
]
|
|
932
|
-
_:
|
|
933
|
-
},
|
|
934
|
-
"
|
|
935
|
-
"
|
|
936
|
-
"
|
|
937
|
-
]),
|
|
938
|
-
isFirstPage:
|
|
939
|
-
isLastPage:
|
|
940
|
-
currentPaginationNumber:
|
|
941
|
-
maxPaginationNumber:
|
|
942
|
-
nextPage:
|
|
943
|
-
prevPage:
|
|
944
|
-
})), void 0, void 0, 0) : (
|
|
961
|
+
], 8, Ne), !j(Q).length && !j(B) ? (T(), h("div", Je, [j(U).empty ? k(e.$slots, "empty", {}, void 0, void 0, 0) : k(e.$slots, "empty", {}, () => [g("p", Ye, A(nn.value), 1), j(Ft) ? (T(), h("p", Xe, A(j(Ft)), 1)) : m("", !0)], void 0, 1)])) : m("", !0)], 8, Me)]),
|
|
962
|
+
_: 3
|
|
963
|
+
}, 8, [
|
|
964
|
+
"height",
|
|
965
|
+
"wrap-style",
|
|
966
|
+
"wrap-class"
|
|
967
|
+
])]),
|
|
968
|
+
_: 2
|
|
969
|
+
}, [ln.value ? {
|
|
970
|
+
name: "indicator",
|
|
971
|
+
fn: re(() => [k(e.$slots, "loading")]),
|
|
972
|
+
key: "0"
|
|
973
|
+
} : void 0]), 1032, ["loading"]), j(Bt) ? (T(), h("div", Ze, [g("div", Qe, A(`${j(Z)}–${j(Jn)}`) + " " + A(j(xt)) + " " + A(j(q)), 1), cn.value ? k(e.$slots, "pagination", C(b({
|
|
974
|
+
isFirstPage: j(Wn),
|
|
975
|
+
isLastPage: j(Un),
|
|
976
|
+
currentPaginationNumber: j(J),
|
|
977
|
+
maxPaginationNumber: j(Y),
|
|
978
|
+
nextPage: j(Gn),
|
|
979
|
+
prevPage: j(Kn)
|
|
980
|
+
})), void 0, void 0, 0) : (T(), p(o, {
|
|
945
981
|
key: 1,
|
|
946
|
-
"model-value":
|
|
947
|
-
"total-records":
|
|
948
|
-
rows:
|
|
949
|
-
"page-sizes":
|
|
950
|
-
"show-size-picker": !
|
|
951
|
-
disabled:
|
|
952
|
-
"onUpdate:modelValue":
|
|
953
|
-
"onUpdate:rows":
|
|
982
|
+
"model-value": j(J),
|
|
983
|
+
"total-records": j(q),
|
|
984
|
+
rows: j(K),
|
|
985
|
+
"page-sizes": j(In),
|
|
986
|
+
"show-size-picker": !j(Mt),
|
|
987
|
+
disabled: j(B),
|
|
988
|
+
"onUpdate:modelValue": j(X),
|
|
989
|
+
"onUpdate:rows": vr
|
|
954
990
|
}, null, 8, [
|
|
955
991
|
"model-value",
|
|
956
992
|
"total-records",
|
|
@@ -959,8 +995,8 @@ var Ee = /*#__PURE__*/ I(we, [["render", L]]), De = ["aria-label"], Oe = ["aria-
|
|
|
959
995
|
"show-size-picker",
|
|
960
996
|
"disabled",
|
|
961
997
|
"onUpdate:modelValue"
|
|
962
|
-
]))])) : m("", !0)], 16,
|
|
998
|
+
]))])) : m("", !0)], 16, je));
|
|
963
999
|
}
|
|
964
1000
|
});
|
|
965
1001
|
//#endregion
|
|
966
|
-
export {
|
|
1002
|
+
export { $e as MTable };
|