@pantograph/vue 0.15.0 → 0.15.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/dist/ActionButton/index.js +1 -1
- package/dist/ActionButton/index.umd.cjs +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-4bWnl8i0.js → ActionButton.vue_vue_type_script_setup_true_lang-DgyV4xRm.js} +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-C_7SZxPE.js → ActionButton.vue_vue_type_script_setup_true_lang-UVa0o0Ij.js} +2 -2
- package/dist/Alert/index.js +1 -1
- package/dist/Alert/index.umd.cjs +1 -1
- package/dist/{Alert.vue_vue_type_style_index_0_lang-BSPB5uP9.js → Alert.vue_vue_type_style_index_0_lang-DxbZ0Dgp.js} +3 -3
- package/dist/{Alert.vue_vue_type_style_index_0_lang-De8BdiEm.js → Alert.vue_vue_type_style_index_0_lang-tp9Yuyhx.js} +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/Avatar/index.umd.cjs +1 -1
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-DeTUyD13.js → Avatar.vue_vue_type_style_index_0_lang-B_L_lRri.js} +2 -2
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-CrIwlgJN.js → Avatar.vue_vue_type_style_index_0_lang-C6nX1g5s.js} +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/AvatarGroup/index.umd.cjs +1 -1
- package/dist/Badge/index.js +1 -1
- package/dist/Badge/index.umd.cjs +1 -1
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-CvnE7Srj.js → Badge.vue_vue_type_script_setup_true_lang-C9YYaZPq.js} +1 -1
- package/dist/{Badge.vue_vue_type_script_setup_true_lang-DYPVS-yf.js → Badge.vue_vue_type_script_setup_true_lang-D_Kb6YYk.js} +1 -1
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-eeWTMdbl.js → BaseButton.vue_vue_type_style_index_0_lang-CDwjubhE.js} +1 -1
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-CgMukDgL.js → BaseButton.vue_vue_type_style_index_0_lang-HfsOA9_2.js} +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/Button/index.umd.cjs +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-B6PUOUfI.js → Button.vue_vue_type_script_setup_true_lang-BNTreTjC.js} +2 -2
- package/dist/{Button.vue_vue_type_script_setup_true_lang-DjzpN9q5.js → Button.vue_vue_type_script_setup_true_lang-CvISLevL.js} +1 -1
- package/dist/Checkbox/index.js +1 -1
- package/dist/Checkbox/index.umd.cjs +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-CP6XeMyz.js → Checkbox.vue_vue_type_style_index_0_lang-D-oXRs9j.js} +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-BoCylzCv.js → Checkbox.vue_vue_type_style_index_0_lang-DmYIG1dJ.js} +1 -1
- package/dist/CheckboxGroup/index.js +1 -1
- package/dist/CheckboxGroup/index.umd.cjs +1 -1
- package/dist/Chip/index.js +2 -2
- package/dist/Chip/index.umd.cjs +1 -1
- package/dist/{Chip.vue_vue_type_style_index_0_lang-DkdkKJvb.js → Chip.vue_vue_type_style_index_0_lang-D9b9CzL-.js} +1 -1
- package/dist/{Chip.vue_vue_type_style_index_0_lang-B8_9Fuov.js → Chip.vue_vue_type_style_index_0_lang-QPy9oUi2.js} +1 -1
- package/dist/ChipGroup/index.js +1 -1
- package/dist/ChipGroup/index.umd.cjs +1 -1
- package/dist/{ChipGroup.vue_vue_type_style_index_0_lang-Cn0SS405.js → ChipGroup.vue_vue_type_style_index_0_lang-CHpFQGo2.js} +1 -1
- package/dist/{ChipGroup.vue_vue_type_style_index_0_lang-DXgB3D2F.js → ChipGroup.vue_vue_type_style_index_0_lang-uLOZBssn.js} +1 -1
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ColorPicker/index.umd.cjs +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-OlYb1GsW.js → ColorPicker.vue_vue_type_style_index_0_lang-BFy2WG4I.js} +2 -2
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-BJqIuqb1.js → ColorPicker.vue_vue_type_style_index_0_lang-DiLY5TEe.js} +1 -1
- package/dist/ColorSwatch/index.js +1 -1
- package/dist/ColorSwatch/index.umd.cjs +1 -1
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-DmhhCVv7.js → ColorSwatch.vue_vue_type_style_index_0_lang-CUk1dzLL.js} +1 -1
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-B35b1BsJ.js → ColorSwatch.vue_vue_type_style_index_0_lang-ena7zgve.js} +3 -3
- package/dist/ColorSwatchGroup/index.js +1 -1
- package/dist/ColorSwatchGroup/index.umd.cjs +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-CUBuxVaq.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-BFapju8t.js} +5 -5
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-CYLmaqeI.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-qPcgpY1d.js} +1 -1
- package/dist/ColorTrigger/index.js +1 -1
- package/dist/ColorTrigger/index.umd.cjs +1 -1
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-DNZxq-yR.js → ColorTrigger.vue_vue_type_style_index_0_lang-BLaALuwC.js} +2 -2
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-YWVLXFVc.js → ColorTrigger.vue_vue_type_style_index_0_lang-DCR5hP83.js} +1 -1
- package/dist/DataTable/DataTable.model.d.ts +4 -1
- package/dist/DataTable/index.d.ts +2 -1
- package/dist/DataTable/index.js +1 -1
- package/dist/DataTable/index.umd.cjs +1 -1
- package/dist/DataTable/types.d.ts +69 -0
- package/dist/DataTable/{useColumn.d.ts → useCell.d.ts} +1 -2
- package/dist/DataTable/useCol.d.ts +11 -0
- package/dist/DataTable/useColumnWrap.d.ts +1 -1
- package/dist/DataTable/useSelection.d.ts +28 -0
- package/dist/DataTable/useSort.d.ts +21 -0
- package/dist/DataTable.vue_vue_type_style_index_0_lang-ATKG2Cmd.js +1 -0
- package/dist/DataTable.vue_vue_type_style_index_0_lang-DrlPDQwn.js +972 -0
- package/dist/DropZone/DropZone.d.ts +53 -0
- package/dist/DropZone/index.d.ts +2 -1
- package/dist/DropZone/index.js +7 -1
- package/dist/DropZone/index.umd.cjs +1 -1
- package/dist/DropZone.vue_vue_type_style_index_0_lang-CVlC2HPc.js +1 -0
- package/dist/DropZone.vue_vue_type_style_index_0_lang-DswnAgcQ.js +121 -0
- package/dist/FloatButton/index.js +1 -1
- package/dist/FloatButton/index.umd.cjs +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-BxvHC70e.js → FloatButton.vue_vue_type_script_setup_true_lang-B0H9wD6k.js} +2 -2
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-COenBFvO.js → FloatButton.vue_vue_type_script_setup_true_lang-Bbt9lIzt.js} +1 -1
- package/dist/GraphicalObject/index.js +1 -1
- package/dist/GraphicalObject/index.umd.cjs +1 -1
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-Bc5zh_wp.js → GraphicalObject.vue_vue_type_script_setup_true_lang-BJxJMvEW.js} +1 -1
- package/dist/{GraphicalObject.vue_vue_type_script_setup_true_lang-CwxMftZ5.js → GraphicalObject.vue_vue_type_script_setup_true_lang-DiOcyHlU.js} +1 -1
- package/dist/IconButton/index.js +1 -1
- package/dist/IconButton/index.umd.cjs +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-Bi_qwuVm.js → IconButton.vue_vue_type_script_setup_true_lang-jsgZCtDw.js} +2 -2
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-efWR_OuR.js → IconButton.vue_vue_type_script_setup_true_lang-qMI8hvaP.js} +1 -1
- package/dist/IndentLevel/index.js +1 -1
- package/dist/IndentLevel/index.umd.cjs +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-ChiSKb-J.js → IndentLevel.vue_vue_type_style_index_0_lang-Ce8LV7Lh.js} +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-C_b-LVE0.js → IndentLevel.vue_vue_type_style_index_0_lang-Cko7CNe8.js} +1 -1
- package/dist/Indicator/index.js +1 -1
- package/dist/Indicator/index.umd.cjs +1 -1
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-DjRN5aRj.js → Indicator.vue_vue_type_script_setup_true_lang-B8kmhRfQ.js} +1 -1
- package/dist/{Indicator.vue_vue_type_script_setup_true_lang-RPFjQEzE.js → Indicator.vue_vue_type_script_setup_true_lang-BzfzbSZa.js} +1 -1
- package/dist/Input/Input.model.d.ts +1 -1
- package/dist/Input/index.js +1 -1
- package/dist/Input/index.umd.cjs +1 -1
- package/dist/Input.vue_vue_type_style_index_0_lang-DCCIX52B.js +1 -0
- package/dist/Input.vue_vue_type_style_index_0_lang-DhUwuI6B.js +199 -0
- package/dist/Menu/index.js +1 -1
- package/dist/Menu/index.umd.cjs +1 -1
- package/dist/{Menu.vue_vue_type_style_index_0_lang-DacaUajM.js → Menu.vue_vue_type_style_index_0_lang-DIMEa_Ht.js} +1 -1
- package/dist/{Menu.vue_vue_type_style_index_0_lang-BVNhKBcu.js → Menu.vue_vue_type_style_index_0_lang-DRWb6YFs.js} +3 -3
- package/dist/MenuItem/index.js +1 -1
- package/dist/MenuItem/index.umd.cjs +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/Popover/index.umd.cjs +1 -1
- package/dist/Popover.vue_vue_type_style_index_0_lang-CFAYIAUF.js +153 -0
- package/dist/Popover.vue_vue_type_style_index_0_lang-CuBS3grq.js +1 -0
- package/dist/RadioGroup/index.js +1 -1
- package/dist/RadioGroup/index.umd.cjs +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-BsA4i2NS.js → RadioGroup.vue_vue_type_script_setup_true_lang-cFRkXOQf.js} +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-B9tmAIEG.js → RadioGroup.vue_vue_type_script_setup_true_lang-lWkHiWdf.js} +1 -1
- package/dist/ScrollContainer/ScrollContainer.d.ts +247 -1
- package/dist/ScrollContainer/index.js +5 -4
- package/dist/ScrollContainer/index.umd.cjs +1 -1
- package/dist/ScrollContainer.model-DPWJjLfW.js +4 -0
- package/dist/ScrollContainer.model-Tt-6E8TA.js +1 -0
- package/dist/ScrollContainer.vue_vue_type_style_index_0_lang-C22K1mpy.js +1 -0
- package/dist/ScrollContainer.vue_vue_type_style_index_0_lang-DcxqgHqY.js +173 -0
- package/dist/Switch/index.js +1 -1
- package/dist/Switch/index.umd.cjs +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-mkO4UH9N.js → Switch.vue_vue_type_style_index_0_lang-6gVnb9xl.js} +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-D03EmiSs.js → Switch.vue_vue_type_style_index_0_lang-Q8bdnZwm.js} +1 -1
- package/dist/THead.vue_vue_type_style_index_0_lang-CjNYs1Lo.js +1 -0
- package/dist/THead.vue_vue_type_style_index_0_lang-CzOa1Qzl.js +190 -0
- package/dist/Table/Tr.d.ts +5 -0
- package/dist/Table/index.js +1 -1
- package/dist/Table/index.umd.cjs +1 -1
- package/dist/Tooltip/Tooltip.d.ts +33 -0
- package/dist/Tooltip/index.d.ts +2 -0
- package/dist/Tooltip/index.js +7 -0
- package/dist/Tooltip/index.umd.cjs +1 -0
- package/dist/Tooltip/register.d.ts +3 -0
- package/dist/Tooltip.vue_vue_type_script_setup_true_lang-DWMPc3HZ.js +1 -0
- package/dist/Tooltip.vue_vue_type_script_setup_true_lang-DX19Sbqt.js +88 -0
- package/dist/Tree/Tree.d.ts +2 -1
- package/dist/Tree/index.js +1 -1
- package/dist/Tree/index.umd.cjs +1 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-C88TjWts.js +504 -0
- package/dist/Tree.vue_vue_type_style_index_0_lang-DHQevJVn.js +1 -0
- package/dist/_baseIteratee-BBuodSH6.js +215 -0
- package/dist/_baseIteratee-CDuwB1bO.js +1 -0
- package/dist/_flatRest-DfF7R94v.js +1 -0
- package/dist/{_flatRest-Bw7fWA39.js → _flatRest-TqrGvOlu.js} +16 -12
- package/dist/{cloneDeep-unwWx7xF.js → cloneDeep-BJojf7NO.js} +1 -1
- package/dist/cloneDeep-DaX9li9z.js +1 -0
- package/dist/{get-w4jLplqh.js → get-CDLMdUvE.js} +1 -1
- package/dist/{get-FzuQyzCL.js → get-CukCUUmn.js} +1 -1
- package/dist/index.js +126 -121
- package/dist/index.umd.cjs +1 -1
- package/dist/{omit-6FeILhm3.js → omit-BTWlW6dc.js} +1 -1
- package/dist/{omit-DB3u1XL5.js → omit-BYRdzoed.js} +15 -15
- package/dist/{pick-DUYr5oPc.js → pick-CbcKnkja.js} +1 -1
- package/dist/{pick-BEnuz3iO.js → pick-CyXixg42.js} +1 -1
- package/dist/style/index.css +1 -1
- package/dist/{uniq-BoseFDe4.js → uniq-BkI6s4BR.js} +1 -1
- package/dist/{uniq-Yl5OObL1.js → uniq-FpLq1Xk8.js} +1 -1
- package/package.json +8 -3
- package/dist/DataTable.vue_vue_type_style_index_0_lang-BP5c0rda.js +0 -1
- package/dist/DataTable.vue_vue_type_style_index_0_lang-C-7s05L-.js +0 -786
- package/dist/Input.vue_vue_type_style_index_0_lang-CCKpwRTa.js +0 -270
- package/dist/Input.vue_vue_type_style_index_0_lang-Ct9RhrT6.js +0 -1
- package/dist/Popover.vue_vue_type_style_index_0_lang-B695YDJE.js +0 -1
- package/dist/Popover.vue_vue_type_style_index_0_lang-ByhaxoQo.js +0 -153
- package/dist/ScrollContainer.model-BzodTc4p.js +0 -147
- package/dist/ScrollContainer.model-VXisa1jV.js +0 -1
- package/dist/THead.vue_vue_type_style_index_0_lang-B4yro5EP.js +0 -180
- package/dist/THead.vue_vue_type_style_index_0_lang-C1I8ZLa2.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-DKtLWacR.js +0 -501
- package/dist/Tree.vue_vue_type_style_index_0_lang-DnnW2v03.js +0 -1
- package/dist/_baseIsEqual-B1yr67CO.js +0 -145
- package/dist/_baseIsEqual-DysaakgW.js +0 -1
- package/dist/_flatRest-B2xTunyg.js +0 -1
- package/dist/cloneDeep-CNkGIW_B.js +0 -1
|
@@ -0,0 +1,972 @@
|
|
|
1
|
+
import { h as qe, ref as G, computed as I, watch as ie, unref as t, nextTick as se, defineComponent as xe, useSlots as Ze, useTemplateRef as Ge, onBeforeUnmount as Ue, shallowRef as Je, createElementBlock as $, openBlock as C, normalizeClass as b, createVNode as S, withCtx as y, mergeProps as R, normalizeStyle as Qe, createElementVNode as H, createBlock as E, createCommentVNode as O, Fragment as K, renderList as j, renderSlot as W, createTextVNode as Xe, toDisplayString as ye, createSlots as ve, withModifiers as Ce, normalizeProps as oe, guardReactiveProps as Ye } from "vue";
|
|
2
|
+
import { flattenBy as De, createColumnHelper as Ke, useVueTable as et, getSortedRowModel as tt, getCoreRowModel as ot } from "@tanstack/vue-table";
|
|
3
|
+
import { _ as Se } from "./Checkbox.vue_vue_type_style_index_0_lang-DmYIG1dJ.js";
|
|
4
|
+
import { _ as nt, a as ne } from "./Menu.vue_vue_type_style_index_0_lang-DRWb6YFs.js";
|
|
5
|
+
import { _ as rt } from "./ActionButton.vue_vue_type_script_setup_true_lang-UVa0o0Ij.js";
|
|
6
|
+
import { _ as lt } from "./Empty.vue_vue_type_style_index_0_lang-Jm_jtiLY.js";
|
|
7
|
+
import { o as ce } from "./omit-BYRdzoed.js";
|
|
8
|
+
import { f as Z, h as L, i as ae, k as st } from "./_getTag-z7QaQ5uZ.js";
|
|
9
|
+
import { usePCId as it, getBemBlock as ct, wgt_pre as at, generateVariantClassList as ut, getBemElement as B } from "@pantograph/utils";
|
|
10
|
+
import { useBreakpoints as ft, useIntersectionObserver as dt } from "@vueuse/core";
|
|
11
|
+
import { _ as mt } from "./Skeleton.vue_vue_type_style_index_0_lang-aSGb2hn6.js";
|
|
12
|
+
import { _ as ke } from "./Popover.vue_vue_type_style_index_0_lang-CFAYIAUF.js";
|
|
13
|
+
import { _ as gt } from "./Tooltip.vue_vue_type_script_setup_true_lang-DX19Sbqt.js";
|
|
14
|
+
import { _ as pt } from "./Badge.vue_vue_type_script_setup_true_lang-D_Kb6YYk.js";
|
|
15
|
+
import { _ as _e } from "./Divider.vue_vue_type_style_index_0_lang-DapqjSGc.js";
|
|
16
|
+
import { _ as be } from "./IconButton.vue_vue_type_script_setup_true_lang-jsgZCtDw.js";
|
|
17
|
+
import { _ as re } from "./Icon.vue_vue_type_style_index_0_lang-D2A2tkHI.js";
|
|
18
|
+
import { _ as ht } from "./Switch.vue_vue_type_style_index_0_lang-6gVnb9xl.js";
|
|
19
|
+
import { cva as wt } from "class-variance-authority";
|
|
20
|
+
import { i as Re } from "./isEmpty-BEYnAygl.js";
|
|
21
|
+
import { i as yt, b as vt, a as Y } from "./isArray-CdbPONHA.js";
|
|
22
|
+
import { _ as Ct, e as St, c as x, a as kt, d as _t, b as X } from "./THead.vue_vue_type_style_index_0_lang-CzOa1Qzl.js";
|
|
23
|
+
import { c as F } from "./cloneDeep-BJojf7NO.js";
|
|
24
|
+
import { _ as bt } from "./ScrollContainer.vue_vue_type_style_index_0_lang-DcxqgHqY.js";
|
|
25
|
+
import { a as Rt, b as $t } from "./_baseIteratee-BBuodSH6.js";
|
|
26
|
+
import { g as $e } from "./get-CukCUUmn.js";
|
|
27
|
+
import { u as Bt } from "./uniq-FpLq1Xk8.js";
|
|
28
|
+
import { getBreakpoints as Pt } from "@pantograph/tokens";
|
|
29
|
+
import { i as Be } from "./isNumber-BopDesuz.js";
|
|
30
|
+
import { k as zt, m as Pe, a as le, b as At, l as Le, s as Tt, o as Dt, i as Kt, e as Lt, n as Mt } from "./_flatRest-TqrGvOlu.js";
|
|
31
|
+
const Vt = ({ isColumnWrapped: o, selectionId: l }) => {
|
|
32
|
+
const r = (e) => {
|
|
33
|
+
var a;
|
|
34
|
+
const m = (k) => k === "list" ? "md" : "sm";
|
|
35
|
+
return {
|
|
36
|
+
...(e == null ? void 0 : e.skeletonProps) ?? {},
|
|
37
|
+
style: "width: 100%",
|
|
38
|
+
size: m((a = e == null ? void 0 : e.skeletonProps) == null ? void 0 : a.type)
|
|
39
|
+
};
|
|
40
|
+
}, d = (e) => {
|
|
41
|
+
var a, k;
|
|
42
|
+
const m = (a = e.props) == null ? void 0 : a.column.columnDef;
|
|
43
|
+
return L(m == null ? void 0 : m.render) && e.props.row ? (k = m == null ? void 0 : m.render) == null ? void 0 : k.call(m, {
|
|
44
|
+
index: e.props.row.index,
|
|
45
|
+
record: e.props.row.original,
|
|
46
|
+
column: ce(m, "render")
|
|
47
|
+
}) : typeof e.render == "function" || typeof e.render == "object" ? qe(e.render, e.props) : e.render;
|
|
48
|
+
}, f = (e) => {
|
|
49
|
+
let m = {};
|
|
50
|
+
if (e) {
|
|
51
|
+
const a = (T) => Number(T) >= 0 ? `${T}px` : T, { width: k, maxWidth: A, minWidth: v } = e;
|
|
52
|
+
(k || A || v) && (m = {
|
|
53
|
+
width: a(k),
|
|
54
|
+
maxWidth: a(A),
|
|
55
|
+
minWidth: a(v),
|
|
56
|
+
overflow: k || A ? "hidden" : void 0
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return m;
|
|
60
|
+
}, n = {}, i = (e, m = !0) => {
|
|
61
|
+
var k;
|
|
62
|
+
let a = 1;
|
|
63
|
+
return ((k = e == null ? void 0 : e.subHeaders) == null ? void 0 : k.length) === 1 && e.column.id === e.subHeaders[0].column.id && (a += i(e.subHeaders[0], !1)), m && (!n[e.column.id] || n[e.column.id] < a) && (n[e.column.id] = a), a;
|
|
64
|
+
}, g = (e, m = {}) => {
|
|
65
|
+
var a;
|
|
66
|
+
if (e != null && e.column) {
|
|
67
|
+
const k = (a = e == null ? void 0 : e.column) == null ? void 0 : a.columnDef, A = [], v = {};
|
|
68
|
+
if (Z(k)) {
|
|
69
|
+
let T = o(e.column.id);
|
|
70
|
+
const { customCell: M, class: U } = k;
|
|
71
|
+
if (Re(U) || A.push(U), M && (Z(M) || L(M))) {
|
|
72
|
+
const J = (N) => {
|
|
73
|
+
if (Z(N)) {
|
|
74
|
+
const { wrap: Q, colSpan: D, rowSpan: ee } = N;
|
|
75
|
+
T = T || (Q ?? !1), v.colSpan = D, v.rowSpan = ee;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
L(M) && e.row ? J(
|
|
79
|
+
M({
|
|
80
|
+
index: e.row.index,
|
|
81
|
+
record: e.row.original,
|
|
82
|
+
column: k
|
|
83
|
+
})
|
|
84
|
+
) : J(M);
|
|
85
|
+
}
|
|
86
|
+
e.header ? v.rowSpan = i(e.header) : T && (v.wrap = !0);
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
class: Re(A) ? void 0 : A,
|
|
90
|
+
...v,
|
|
91
|
+
...m
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
return {};
|
|
95
|
+
};
|
|
96
|
+
return {
|
|
97
|
+
getSkeletonProps: r,
|
|
98
|
+
RenderCell: d,
|
|
99
|
+
getThProps: (e) => {
|
|
100
|
+
var m, a, k;
|
|
101
|
+
return g(e, {
|
|
102
|
+
colSpan: (m = e == null ? void 0 : e.header) == null ? void 0 : m.colSpan,
|
|
103
|
+
"data-has-children": ((k = (a = e == null ? void 0 : e.column) == null ? void 0 : a.columns) == null ? void 0 : k.length) > 1 ? !0 : void 0
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
getTdProps: (e) => g(e),
|
|
107
|
+
getColProps: (e) => {
|
|
108
|
+
const m = f(e.columnDef);
|
|
109
|
+
return e.id === l && (m.width = "var(--pt-dimension-2800)"), {
|
|
110
|
+
style: m
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
isThVisible: (e, m, a) => n[a] === 1 ? !0 : m - e === n[a]
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
var Et = "[object Boolean]";
|
|
117
|
+
function Ot(o) {
|
|
118
|
+
return o === !0 || o === !1 || yt(o) && vt(o) == Et;
|
|
119
|
+
}
|
|
120
|
+
const Wt = (o) => {
|
|
121
|
+
const l = G([]), r = (g) => g ? l.value.findIndex((p) => p.id === g) : -1, d = (g) => {
|
|
122
|
+
if (g) return l.value.find((p) => p.id === g);
|
|
123
|
+
}, f = (g) => {
|
|
124
|
+
var p;
|
|
125
|
+
return !!((p = d(g)) != null && p.wrap);
|
|
126
|
+
}, n = (g) => {
|
|
127
|
+
const { id: p } = g;
|
|
128
|
+
if (!p) return !1;
|
|
129
|
+
const _ = g.wrap ?? !f(p), u = r(p);
|
|
130
|
+
return u >= 0 ? l.value[u] = { id: p, wrap: _ } : l.value.push({ id: p, wrap: _ }), !0;
|
|
131
|
+
}, i = I(
|
|
132
|
+
() => (o.columns ?? []).filter((g) => Ot(g.wrap)).map((g) => ({
|
|
133
|
+
id: g.id,
|
|
134
|
+
wrap: !!g.wrap
|
|
135
|
+
}))
|
|
136
|
+
);
|
|
137
|
+
return ie(
|
|
138
|
+
i,
|
|
139
|
+
(g) => {
|
|
140
|
+
l.value = [...l.value, ...g];
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
immediate: !0,
|
|
144
|
+
deep: !0
|
|
145
|
+
}
|
|
146
|
+
), {
|
|
147
|
+
isColumnWrapped: f,
|
|
148
|
+
toggleWrap: n
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
function ze(o, l) {
|
|
152
|
+
return Rt(o, l);
|
|
153
|
+
}
|
|
154
|
+
const Ht = (o, { colId: l, onSelectionChange: r }) => {
|
|
155
|
+
const d = G({}), f = I(() => Object.keys(d.value));
|
|
156
|
+
ie(
|
|
157
|
+
() => {
|
|
158
|
+
var u;
|
|
159
|
+
return (u = o.rowSelection) == null ? void 0 : u.selectedRowKeys;
|
|
160
|
+
},
|
|
161
|
+
(u, c) => {
|
|
162
|
+
var e, m;
|
|
163
|
+
if ((m = (e = o.rowSelection) == null ? void 0 : e.selectedRowKeys) != null && m.length && !ze(u, c)) {
|
|
164
|
+
const a = Object.fromEntries(
|
|
165
|
+
t(o.rowSelection.selectedRowKeys ?? Object.keys(d.value)).map(
|
|
166
|
+
(k) => [k, !0]
|
|
167
|
+
)
|
|
168
|
+
);
|
|
169
|
+
ze(a, d.value) || (d.value = a);
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
{ immediate: !0 }
|
|
173
|
+
);
|
|
174
|
+
const n = I(
|
|
175
|
+
() => o.rowKey ? De(o.data, (u) => u.children).map(
|
|
176
|
+
(u) => u[o.rowKey]
|
|
177
|
+
) : []
|
|
178
|
+
), i = () => {
|
|
179
|
+
const u = Object.fromEntries(
|
|
180
|
+
f.value.filter((c) => {
|
|
181
|
+
var e;
|
|
182
|
+
return !((e = o.rowSelection) != null && e.preserveSelectedRowKeys) && o.rowKey ? n.value.includes(c) : !0;
|
|
183
|
+
}).map((c) => [c, !0])
|
|
184
|
+
);
|
|
185
|
+
Object.keys(u).length !== f.value.length && (d.value = u, se(() => {
|
|
186
|
+
r();
|
|
187
|
+
}));
|
|
188
|
+
}, g = Ke();
|
|
189
|
+
return {
|
|
190
|
+
rowSelection: d,
|
|
191
|
+
selectedRowKeys: f,
|
|
192
|
+
checkSelections: i,
|
|
193
|
+
getSelectionCol: () => {
|
|
194
|
+
if (o.rowSelection && o.rowKey)
|
|
195
|
+
return g.accessor(l, {
|
|
196
|
+
id: l,
|
|
197
|
+
enableSorting: !1
|
|
198
|
+
});
|
|
199
|
+
},
|
|
200
|
+
clearSelection: () => {
|
|
201
|
+
d.value = {};
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
}, It = (o, { selectedRowKeys: l, props: r }) => {
|
|
205
|
+
const d = I(() => o.getIsAllRowsSelected() ? !0 : o.getIsSomeRowsSelected() ? "indeterminate" : !1), f = I(() => ({
|
|
206
|
+
selectedRowKeys: l.value,
|
|
207
|
+
selectedRows: o.getFilteredSelectedRowModel().flatRows.map((u) => u.original)
|
|
208
|
+
})), n = (u) => {
|
|
209
|
+
o.getIsSomeRowsSelected() || o.getIsAllRowsSelected() ? o.toggleAllRowsSelected(!1) : o.toggleAllRowsSelected(!0), se(() => {
|
|
210
|
+
var c, e;
|
|
211
|
+
L((c = r.rowSelection) == null ? void 0 : c.onSelectAll) && r.rowSelection.onSelectAll({ ...f.value, selected: u }), L((e = r.rowSelection) == null ? void 0 : e.onChange) && r.rowSelection.onChange(f.value);
|
|
212
|
+
});
|
|
213
|
+
}, i = (u, c) => {
|
|
214
|
+
var e;
|
|
215
|
+
c.toggleSelected(u, {
|
|
216
|
+
selectChildren: !((e = r.rowSelection) != null && e.checkStrictly)
|
|
217
|
+
}), se(() => {
|
|
218
|
+
var m, a;
|
|
219
|
+
L((m = r.rowSelection) == null ? void 0 : m.onSelect) && r.rowSelection.onSelect({
|
|
220
|
+
...f.value,
|
|
221
|
+
selected: u,
|
|
222
|
+
record: c.original
|
|
223
|
+
}), L((a = r.rowSelection) == null ? void 0 : a.onChange) && r.rowSelection.onChange(f.value);
|
|
224
|
+
});
|
|
225
|
+
}, g = (u) => {
|
|
226
|
+
var c, e;
|
|
227
|
+
return L((c = r.rowSelection) == null ? void 0 : c.getCheckboxProps) && ((e = r.rowSelection) == null || e.getCheckboxProps(u)), {};
|
|
228
|
+
}, p = (u) => {
|
|
229
|
+
var c;
|
|
230
|
+
if (u.getIsSelected()) return !0;
|
|
231
|
+
if ((c = u.subRows) != null && c.length) {
|
|
232
|
+
if (u.getIsAllSubRowsSelected()) return !0;
|
|
233
|
+
if (u.getIsSomeSelected()) return "indeterminate";
|
|
234
|
+
}
|
|
235
|
+
return !1;
|
|
236
|
+
}, _ = I(() => o.getFilteredSelectedRowModel().flatRows.length);
|
|
237
|
+
return {
|
|
238
|
+
getCheckedAll: d,
|
|
239
|
+
checkAll: n,
|
|
240
|
+
check: i,
|
|
241
|
+
getCheckboxProps: g,
|
|
242
|
+
getRowChecked: p,
|
|
243
|
+
selectedItemsLength: _,
|
|
244
|
+
getSelectCallbackProps: f
|
|
245
|
+
};
|
|
246
|
+
}, jt = ({
|
|
247
|
+
props: o,
|
|
248
|
+
prefix: l,
|
|
249
|
+
slots: r,
|
|
250
|
+
getSelectionCol: d
|
|
251
|
+
}) => {
|
|
252
|
+
const f = Ke(), n = I(() => {
|
|
253
|
+
var c;
|
|
254
|
+
return ((c = o.actionCol) == null ? void 0 : c.id) ?? `$${l}_action$`;
|
|
255
|
+
}), i = I(() => {
|
|
256
|
+
var A;
|
|
257
|
+
const c = (v) => ce(v ?? {}, "columns", "id"), e = (v) => {
|
|
258
|
+
var M;
|
|
259
|
+
const T = v.id ?? it(`${l}--col`);
|
|
260
|
+
return Y($e(v, o.childrenColumnName ?? "children")) ? f.group({
|
|
261
|
+
header: v.title,
|
|
262
|
+
id: T,
|
|
263
|
+
columns: (M = $e(v, o.childrenColumnName ?? "children") ?? []) == null ? void 0 : M.map(e),
|
|
264
|
+
enableSorting: !1,
|
|
265
|
+
...c(v)
|
|
266
|
+
}) : f.accessor(v.dataIndex ?? v.id, {
|
|
267
|
+
header: v.title,
|
|
268
|
+
id: T,
|
|
269
|
+
enableSorting: !!v.sorter,
|
|
270
|
+
...c(v)
|
|
271
|
+
});
|
|
272
|
+
};
|
|
273
|
+
if (!Y(o.columns)) throw "no columns";
|
|
274
|
+
const m = o.columns.map(({ id: v }) => v);
|
|
275
|
+
if (Bt(m).length !== m.length) throw "no uniq column ids";
|
|
276
|
+
const a = [], k = d();
|
|
277
|
+
return k && a.push(k), o.columns.forEach((v) => {
|
|
278
|
+
a.push(e(v));
|
|
279
|
+
}), (r.action || r.hoverAction) && a.push(
|
|
280
|
+
f.accessor(n.value, {
|
|
281
|
+
id: n.value,
|
|
282
|
+
header: (A = o.actionCol) == null ? void 0 : A.title,
|
|
283
|
+
enableSorting: !1,
|
|
284
|
+
...c(o.actionCol)
|
|
285
|
+
})
|
|
286
|
+
), a;
|
|
287
|
+
}), g = Pt(), _ = ft(
|
|
288
|
+
Object.fromEntries(
|
|
289
|
+
Object.keys(g).map((c) => [c, g[c].minWidth])
|
|
290
|
+
),
|
|
291
|
+
{ strategy: "min-width" }
|
|
292
|
+
).active(), u = G({});
|
|
293
|
+
return ie(
|
|
294
|
+
_,
|
|
295
|
+
(c) => {
|
|
296
|
+
u.value = Object.fromEntries(
|
|
297
|
+
De(i.value, (e) => e.columns).map((e) => {
|
|
298
|
+
var m;
|
|
299
|
+
return [
|
|
300
|
+
e.id,
|
|
301
|
+
Y(e == null ? void 0 : e.responsive) ? ((m = e.responsive) == null ? void 0 : m.includes(c)) ?? !1 : !0
|
|
302
|
+
];
|
|
303
|
+
})
|
|
304
|
+
);
|
|
305
|
+
},
|
|
306
|
+
{ immediate: !0 }
|
|
307
|
+
), {
|
|
308
|
+
cols: i,
|
|
309
|
+
actionId: n,
|
|
310
|
+
columnVisibility: u
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
function Ft(o) {
|
|
314
|
+
return function(l, r, d) {
|
|
315
|
+
for (var f = -1, n = Object(l), i = d(l), g = i.length; g--; ) {
|
|
316
|
+
var p = i[++f];
|
|
317
|
+
if (r(n[p], p, n) === !1)
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
return l;
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
var Nt = Ft();
|
|
324
|
+
function qt(o, l) {
|
|
325
|
+
return o && Nt(o, l, zt);
|
|
326
|
+
}
|
|
327
|
+
function xt(o, l) {
|
|
328
|
+
return function(r, d) {
|
|
329
|
+
if (r == null)
|
|
330
|
+
return r;
|
|
331
|
+
if (!ae(r))
|
|
332
|
+
return o(r, d);
|
|
333
|
+
for (var f = r.length, n = -1, i = Object(r); ++n < f && d(i[n], n, i) !== !1; )
|
|
334
|
+
;
|
|
335
|
+
return r;
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
var Zt = xt(qt);
|
|
339
|
+
function Gt(o, l) {
|
|
340
|
+
var r = -1, d = ae(o) ? Array(o.length) : [];
|
|
341
|
+
return Zt(o, function(f, n, i) {
|
|
342
|
+
d[++r] = l(f, n, i);
|
|
343
|
+
}), d;
|
|
344
|
+
}
|
|
345
|
+
function Ut(o, l) {
|
|
346
|
+
var r = o.length;
|
|
347
|
+
for (o.sort(l); r--; )
|
|
348
|
+
o[r] = o[r].value;
|
|
349
|
+
return o;
|
|
350
|
+
}
|
|
351
|
+
function Jt(o, l) {
|
|
352
|
+
if (o !== l) {
|
|
353
|
+
var r = o !== void 0, d = o === null, f = o === o, n = Pe(o), i = l !== void 0, g = l === null, p = l === l, _ = Pe(l);
|
|
354
|
+
if (!g && !_ && !n && o > l || n && i && p && !g && !_ || d && i && p || !r && p || !f)
|
|
355
|
+
return 1;
|
|
356
|
+
if (!d && !n && !_ && o < l || _ && r && f && !d && !n || g && r && f || !i && f || !p)
|
|
357
|
+
return -1;
|
|
358
|
+
}
|
|
359
|
+
return 0;
|
|
360
|
+
}
|
|
361
|
+
function Qt(o, l, r) {
|
|
362
|
+
for (var d = -1, f = o.criteria, n = l.criteria, i = f.length, g = r.length; ++d < i; ) {
|
|
363
|
+
var p = Jt(f[d], n[d]);
|
|
364
|
+
if (p) {
|
|
365
|
+
if (d >= g)
|
|
366
|
+
return p;
|
|
367
|
+
var _ = r[d];
|
|
368
|
+
return p * (_ == "desc" ? -1 : 1);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
return o.index - l.index;
|
|
372
|
+
}
|
|
373
|
+
function Xt(o, l, r) {
|
|
374
|
+
l.length ? l = le(l, function(n) {
|
|
375
|
+
return Y(n) ? function(i) {
|
|
376
|
+
return At(i, n.length === 1 ? n[0] : n);
|
|
377
|
+
} : n;
|
|
378
|
+
}) : l = [Le];
|
|
379
|
+
var d = -1;
|
|
380
|
+
l = le(l, st($t));
|
|
381
|
+
var f = Gt(o, function(n, i, g) {
|
|
382
|
+
var p = le(l, function(_) {
|
|
383
|
+
return _(n);
|
|
384
|
+
});
|
|
385
|
+
return { criteria: p, index: ++d, value: n };
|
|
386
|
+
});
|
|
387
|
+
return Ut(f, function(n, i) {
|
|
388
|
+
return Qt(n, i, r);
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
function Yt(o, l) {
|
|
392
|
+
return Tt(Dt(o, l, Le), o + "");
|
|
393
|
+
}
|
|
394
|
+
function Ae(o, l, r) {
|
|
395
|
+
if (!Z(r))
|
|
396
|
+
return !1;
|
|
397
|
+
var d = typeof l;
|
|
398
|
+
return (d == "number" ? ae(r) && Kt(l, r.length) : d == "string" && l in r) ? Lt(r[l], o) : !1;
|
|
399
|
+
}
|
|
400
|
+
var Te = Yt(function(o, l) {
|
|
401
|
+
if (o == null)
|
|
402
|
+
return [];
|
|
403
|
+
var r = l.length;
|
|
404
|
+
return r > 1 && Ae(o, l[0], l[1]) ? l = [] : r > 2 && Ae(l[0], l[1], l[2]) && (l = [l[0]]), Xt(o, Mt(l), []);
|
|
405
|
+
});
|
|
406
|
+
const eo = (o, l, r) => {
|
|
407
|
+
const d = (u) => {
|
|
408
|
+
const c = p(u);
|
|
409
|
+
if (!c) return "tabler:arrows-up-down";
|
|
410
|
+
if (c === "desc") return "tabler:arrow-down";
|
|
411
|
+
if (c === "asc") return "tabler:arrow-up";
|
|
412
|
+
}, f = (u) => {
|
|
413
|
+
const c = p(u);
|
|
414
|
+
if (!c) return "Sort A → Z";
|
|
415
|
+
if (c === "desc") return "Sorted Z → A\u2028Click to change sort";
|
|
416
|
+
if (c === "asc") return "Sorted A → Z\u2028Click to change sort";
|
|
417
|
+
}, n = G([]), i = G([]), g = (u, c) => {
|
|
418
|
+
const e = F(
|
|
419
|
+
[...n.value, ...i.value].find((a) => a.id === u.id)
|
|
420
|
+
) ?? {
|
|
421
|
+
id: u.id,
|
|
422
|
+
sorter: u.columnDef.sorter,
|
|
423
|
+
multiple: u.columnDef.multiSort
|
|
424
|
+
};
|
|
425
|
+
c ? e.desc = c === "desc" : e.desc === void 0 ? e.desc = !1 : e.desc === !0 ? e.desc = void 0 : e.desc = !0;
|
|
426
|
+
const m = () => e.desc === void 0 ? !1 : e.desc === !0 ? "desc" : "asc";
|
|
427
|
+
Be(u.columnDef.multiSort) && [...n.value, ...i.value].every((a) => Be(a.multiple)) ? (n.value = F(n.value).filter((a) => a.id !== u.id), i.value = F(i.value).filter((a) => a.id !== u.id), e.sorter === "server" ? i.value.push(e) : n.value.push(e), n.value = Te(n.value, "multiple"), i.value = Te(i.value, "multiple")) : e.sorter === "server" ? (n.value = [], i.value = [e]) : (n.value = [e], i.value = []), n.value = n.value.filter((a) => a.desc !== void 0), i.value = i.value.filter((a) => a.desc !== void 0), l("sort", u.columnDef, m(), F([...n.value, ...i.value]));
|
|
428
|
+
}, p = (u) => {
|
|
429
|
+
const c = [...i.value, ...n.value].find((e) => u.id === e.id);
|
|
430
|
+
return (c == null ? void 0 : c.desc) === !1 ? "asc" : (c == null ? void 0 : c.desc) === !0 ? "desc" : !1;
|
|
431
|
+
};
|
|
432
|
+
return {
|
|
433
|
+
data: I(() => (r(), [...o.data])),
|
|
434
|
+
sorting: n,
|
|
435
|
+
getSortIcon: d,
|
|
436
|
+
getSortTooltip: f,
|
|
437
|
+
toggleSort: g,
|
|
438
|
+
getIsSorted: p
|
|
439
|
+
};
|
|
440
|
+
}, Do = /* @__PURE__ */ xe({
|
|
441
|
+
__name: "DataTable",
|
|
442
|
+
props: {
|
|
443
|
+
columns: {},
|
|
444
|
+
childrenColumnName: { default: "children" },
|
|
445
|
+
data: {},
|
|
446
|
+
class: {},
|
|
447
|
+
scrollViewportCls: {},
|
|
448
|
+
scrollAreaCls: {},
|
|
449
|
+
theadCls: {},
|
|
450
|
+
tbodyCls: {},
|
|
451
|
+
actionHoverCls: {},
|
|
452
|
+
rootCls: {},
|
|
453
|
+
rowSelection: {},
|
|
454
|
+
rowKey: {},
|
|
455
|
+
lazyLoading: { type: Boolean },
|
|
456
|
+
loading: { type: Boolean },
|
|
457
|
+
emptyProps: {},
|
|
458
|
+
scrollContainerProps: {},
|
|
459
|
+
size: {},
|
|
460
|
+
batchActionsTitle: { default: "Records selected :" },
|
|
461
|
+
loadingRowCount: { default: 5 },
|
|
462
|
+
stickyHeader: { type: Boolean },
|
|
463
|
+
zebra: { type: Boolean, default: !0 },
|
|
464
|
+
tableLayout: { default: "fixed" },
|
|
465
|
+
actionCol: {},
|
|
466
|
+
noHeader: { type: Boolean },
|
|
467
|
+
rowProps: {}
|
|
468
|
+
},
|
|
469
|
+
emits: ["fetch", "rowClick", "sort"],
|
|
470
|
+
setup(o, { emit: l }) {
|
|
471
|
+
const r = o, d = l, f = Ze(), n = ct("data_table", at), i = `$${n}_selection$`, g = wt(n, {
|
|
472
|
+
variants: {
|
|
473
|
+
empty: ut("empty", n)
|
|
474
|
+
}
|
|
475
|
+
}), { rowSelection: p, checkSelections: _, getSelectionCol: u, clearSelection: c, selectedRowKeys: e } = Ht(r, {
|
|
476
|
+
colId: i,
|
|
477
|
+
onSelectionChange: () => {
|
|
478
|
+
var s;
|
|
479
|
+
L((s = r.rowSelection) == null ? void 0 : s.onChange) && r.rowSelection.onChange(de.value);
|
|
480
|
+
}
|
|
481
|
+
}), { cols: m, actionId: a, columnVisibility: k } = jt({ props: r, slots: f, prefix: n, getSelectionCol: u }), { toggleWrap: A, isColumnWrapped: v } = Wt(r), { getSortTooltip: T, getSortIcon: M, sorting: U, data: J, toggleSort: N, getIsSorted: Q } = eo(
|
|
482
|
+
r,
|
|
483
|
+
d,
|
|
484
|
+
_
|
|
485
|
+
), D = et({
|
|
486
|
+
// debugTable: true,
|
|
487
|
+
getSubRows: (s) => s.children,
|
|
488
|
+
enableSorting: !0,
|
|
489
|
+
enableMultiSort: !0,
|
|
490
|
+
get data() {
|
|
491
|
+
return J.value;
|
|
492
|
+
},
|
|
493
|
+
state: {
|
|
494
|
+
get sorting() {
|
|
495
|
+
return U.value;
|
|
496
|
+
},
|
|
497
|
+
get rowSelection() {
|
|
498
|
+
return p.value;
|
|
499
|
+
},
|
|
500
|
+
get columnVisibility() {
|
|
501
|
+
return k.value;
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
enableRowSelection: !0,
|
|
505
|
+
get columns() {
|
|
506
|
+
return m.value;
|
|
507
|
+
},
|
|
508
|
+
getRowId(s, P) {
|
|
509
|
+
return r.rowKey ? s[r.rowKey] : P;
|
|
510
|
+
},
|
|
511
|
+
getRowCanExpand: () => !0,
|
|
512
|
+
getCoreRowModel: ot(),
|
|
513
|
+
getSortedRowModel: tt(),
|
|
514
|
+
onRowSelectionChange: (s) => {
|
|
515
|
+
p.value = typeof s == "function" ? s(p.value) : s;
|
|
516
|
+
}
|
|
517
|
+
}), {
|
|
518
|
+
getCheckedAll: ee,
|
|
519
|
+
checkAll: Me,
|
|
520
|
+
check: Ve,
|
|
521
|
+
getRowChecked: ue,
|
|
522
|
+
selectedItemsLength: fe,
|
|
523
|
+
getCheckboxProps: Ee,
|
|
524
|
+
getSelectCallbackProps: de
|
|
525
|
+
} = It(D, {
|
|
526
|
+
selectedRowKeys: e,
|
|
527
|
+
props: r
|
|
528
|
+
}), me = Ge("target"), { stop: Oe } = dt(me, ([s]) => {
|
|
529
|
+
r.lazyLoading && !r.loading && (s != null && s.isIntersecting) && d("fetch");
|
|
530
|
+
});
|
|
531
|
+
Ue(Oe);
|
|
532
|
+
const { getSkeletonProps: We, getThProps: He, RenderCell: ge, getTdProps: te, getColProps: Ie, isThVisible: je } = Vt({
|
|
533
|
+
selectionId: i,
|
|
534
|
+
isColumnWrapped: v
|
|
535
|
+
}), pe = Je(0), Fe = ({ item: s }, P) => {
|
|
536
|
+
s.key === "a-z" && N(P, "asc"), s.key === "z-a" && N(P, "desc"), s.key === "wrap" && A({ id: P.id }), pe.value++;
|
|
537
|
+
}, he = I(
|
|
538
|
+
() => D.getHeaderGroups().map((s) => ({
|
|
539
|
+
...s,
|
|
540
|
+
headers: s.headers.map((P) => ({
|
|
541
|
+
...P,
|
|
542
|
+
bindings: He(P.getContext())
|
|
543
|
+
}))
|
|
544
|
+
}))
|
|
545
|
+
), q = (s) => {
|
|
546
|
+
const P = F(ce(s ?? {}, "row"));
|
|
547
|
+
let w = {};
|
|
548
|
+
r.rowProps && (L(r.rowProps) && (w = F(r.rowProps(s) ?? {})), Z(r.rowProps) && (w = F(r.rowProps)));
|
|
549
|
+
const z = L(w.onClick) || s.row ? (h) => {
|
|
550
|
+
s.row && d("rowClick", s.row, h), L(w.onClick) && w.onClick(h);
|
|
551
|
+
} : void 0;
|
|
552
|
+
return { ...w, ...P, onClick: z };
|
|
553
|
+
};
|
|
554
|
+
return (s, P) => (C(), $("div", {
|
|
555
|
+
class: b([t(B)(t(n), "root"), s.rootCls])
|
|
556
|
+
}, [
|
|
557
|
+
S(ke, {
|
|
558
|
+
"z-index": "1",
|
|
559
|
+
open: !!(t(fe) && f.batchActions),
|
|
560
|
+
placement: "bottom",
|
|
561
|
+
"side-offset": -54,
|
|
562
|
+
"container-cls": "pantograph-tokens pantograph-dark"
|
|
563
|
+
}, {
|
|
564
|
+
content: y(() => [
|
|
565
|
+
H("div", {
|
|
566
|
+
class: b(t(B)(t(n), "batch_actions"))
|
|
567
|
+
}, [
|
|
568
|
+
S(pt, {
|
|
569
|
+
text: t(fe),
|
|
570
|
+
size: "xsm"
|
|
571
|
+
}, null, 8, ["text"]),
|
|
572
|
+
H("div", {
|
|
573
|
+
class: b(t(B)(t(n), "batch_actions__title"))
|
|
574
|
+
}, ye(s.batchActionsTitle), 3),
|
|
575
|
+
H("div", {
|
|
576
|
+
class: b(t(B)(t(n), "batch_actions__actions"))
|
|
577
|
+
}, [
|
|
578
|
+
W(s.$slots, "batchActions", oe(Ye(t(de))))
|
|
579
|
+
], 2),
|
|
580
|
+
S(_e, {
|
|
581
|
+
type: "vertical",
|
|
582
|
+
class: b(t(B)(t(n), "batch_actions__divider"))
|
|
583
|
+
}, null, 8, ["class"]),
|
|
584
|
+
S(be, {
|
|
585
|
+
icon: "tabler:x",
|
|
586
|
+
color: "gray",
|
|
587
|
+
type: "ghost",
|
|
588
|
+
onClick: t(c)
|
|
589
|
+
}, null, 8, ["onClick"])
|
|
590
|
+
], 2)
|
|
591
|
+
]),
|
|
592
|
+
default: y(() => [
|
|
593
|
+
S(t(bt), R(s.scrollContainerProps, {
|
|
594
|
+
"root-props": { class: t(B)(t(n), "scroll_container") },
|
|
595
|
+
class: t(B)(t(n), "scroll_area")
|
|
596
|
+
}), {
|
|
597
|
+
default: y(() => [
|
|
598
|
+
S(t(Ct), {
|
|
599
|
+
size: s.size,
|
|
600
|
+
style: Qe({
|
|
601
|
+
tableLayout: s.tableLayout
|
|
602
|
+
}),
|
|
603
|
+
class: b([
|
|
604
|
+
t(g)({
|
|
605
|
+
empty: !t(D).getRowModel().rows.length
|
|
606
|
+
}),
|
|
607
|
+
r.class
|
|
608
|
+
])
|
|
609
|
+
}, {
|
|
610
|
+
default: y(() => [
|
|
611
|
+
H("colgroup", null, [
|
|
612
|
+
(C(!0), $(K, null, j(t(D).getVisibleLeafColumns(), (w) => (C(), $("col", R({
|
|
613
|
+
key: w.id,
|
|
614
|
+
ref_for: !0
|
|
615
|
+
}, t(Ie)(w)), null, 16))), 128))
|
|
616
|
+
]),
|
|
617
|
+
s.noHeader ? O("", !0) : (C(), E(t(St), {
|
|
618
|
+
key: 0,
|
|
619
|
+
class: b(s.theadCls),
|
|
620
|
+
sticky: s.stickyHeader
|
|
621
|
+
}, {
|
|
622
|
+
default: y(() => [
|
|
623
|
+
(C(!0), $(K, null, j(he.value, (w, z) => (C(), E(t(x), R({
|
|
624
|
+
key: w.id,
|
|
625
|
+
ref_for: !0
|
|
626
|
+
}, q({ index: z, header: !0 })), {
|
|
627
|
+
default: y(() => [
|
|
628
|
+
(C(!0), $(K, null, j(w.headers, (h) => (C(), $(K, {
|
|
629
|
+
key: h.id
|
|
630
|
+
}, [
|
|
631
|
+
t(je)(z, he.value.length, h.column.id) ? (C(), E(t(kt), R({
|
|
632
|
+
key: 0,
|
|
633
|
+
ref_for: !0
|
|
634
|
+
}, h.bindings, {
|
|
635
|
+
"data-selection": h.column.id === i
|
|
636
|
+
}), {
|
|
637
|
+
default: y(() => [
|
|
638
|
+
H("div", {
|
|
639
|
+
class: b(t(B)(t(n), "header"))
|
|
640
|
+
}, [
|
|
641
|
+
H("div", {
|
|
642
|
+
class: b(t(B)(t(n), "header__content"))
|
|
643
|
+
}, [
|
|
644
|
+
h.column.id !== i ? (C(), $(K, { key: 0 }, [
|
|
645
|
+
H("div", {
|
|
646
|
+
class: b(t(B)(t(n), "header__content__title"))
|
|
647
|
+
}, [
|
|
648
|
+
W(s.$slots, "headerCell", R({ ref_for: !0 }, {
|
|
649
|
+
column: h.column.columnDef
|
|
650
|
+
}), () => [
|
|
651
|
+
S(t(ge), {
|
|
652
|
+
props: h.getContext(),
|
|
653
|
+
render: h.column.columnDef.header
|
|
654
|
+
}, null, 8, ["props", "render"])
|
|
655
|
+
])
|
|
656
|
+
], 2),
|
|
657
|
+
h.column.getCanSort() ? (C(), E(gt, {
|
|
658
|
+
key: 0,
|
|
659
|
+
placement: "bottom"
|
|
660
|
+
}, {
|
|
661
|
+
content: y(() => [
|
|
662
|
+
Xe(ye(t(T)(h.column)), 1)
|
|
663
|
+
]),
|
|
664
|
+
default: y(() => [
|
|
665
|
+
S(rt, {
|
|
666
|
+
class: b({ hide_filter_action: !t(Q)(h.column) }),
|
|
667
|
+
icon: t(M)(h.column),
|
|
668
|
+
size: "sm",
|
|
669
|
+
type: "ghost",
|
|
670
|
+
variant: "icon",
|
|
671
|
+
active: !!t(Q)(h.column),
|
|
672
|
+
onClick: (V) => t(N)(h.column)
|
|
673
|
+
}, null, 8, ["class", "icon", "active", "onClick"])
|
|
674
|
+
]),
|
|
675
|
+
_: 2
|
|
676
|
+
}, 1024)) : O("", !0)
|
|
677
|
+
], 64)) : (C(), $(K, { key: 1 }, [
|
|
678
|
+
H("div", {
|
|
679
|
+
class: b(t(B)(t(n), "selection_space"))
|
|
680
|
+
}, null, 2),
|
|
681
|
+
S(Se, {
|
|
682
|
+
rootCls: "w-fit",
|
|
683
|
+
checked: t(ee),
|
|
684
|
+
onChange: t(Me)
|
|
685
|
+
}, null, 8, ["checked", "onChange"])
|
|
686
|
+
], 64))
|
|
687
|
+
], 2),
|
|
688
|
+
![t(a), i].includes(h.column.id) && !h.column.columns.length ? (C(), $("div", {
|
|
689
|
+
key: 0,
|
|
690
|
+
class: b(t(B)(t(n), "header__action"))
|
|
691
|
+
}, [
|
|
692
|
+
(C(), E(ke, {
|
|
693
|
+
"z-index": "1",
|
|
694
|
+
placement: "bottom-end",
|
|
695
|
+
key: pe.value
|
|
696
|
+
}, {
|
|
697
|
+
content: y(() => [
|
|
698
|
+
S(nt, {
|
|
699
|
+
onSelect: (V) => Fe(V, h.column)
|
|
700
|
+
}, {
|
|
701
|
+
default: y(() => [
|
|
702
|
+
h.column.getCanSort() ? (C(), $(K, { key: 0 }, [
|
|
703
|
+
S(ne, {
|
|
704
|
+
title: "Sort A → Z",
|
|
705
|
+
key: "a-z"
|
|
706
|
+
}, {
|
|
707
|
+
leading: y(({ iconSize: V }) => [
|
|
708
|
+
S(re, {
|
|
709
|
+
icon: "tabler:arrow-up",
|
|
710
|
+
size: V
|
|
711
|
+
}, null, 8, ["size"])
|
|
712
|
+
]),
|
|
713
|
+
_: 1
|
|
714
|
+
}),
|
|
715
|
+
S(ne, {
|
|
716
|
+
title: "Sort Z → A",
|
|
717
|
+
key: "z-a"
|
|
718
|
+
}, {
|
|
719
|
+
leading: y(({ iconSize: V }) => [
|
|
720
|
+
S(re, {
|
|
721
|
+
icon: "tabler:arrow-down",
|
|
722
|
+
size: V
|
|
723
|
+
}, null, 8, ["size"])
|
|
724
|
+
]),
|
|
725
|
+
_: 1
|
|
726
|
+
}),
|
|
727
|
+
S(_e)
|
|
728
|
+
], 64)) : O("", !0),
|
|
729
|
+
S(ne, {
|
|
730
|
+
title: "Wrap Column",
|
|
731
|
+
key: "wrap"
|
|
732
|
+
}, {
|
|
733
|
+
leading: y(({ iconSize: V }) => [
|
|
734
|
+
S(re, {
|
|
735
|
+
icon: "tabler:text-wrap",
|
|
736
|
+
size: V
|
|
737
|
+
}, null, 8, ["size"])
|
|
738
|
+
]),
|
|
739
|
+
trailing: y(() => [
|
|
740
|
+
S(ht, {
|
|
741
|
+
checked: t(v)(h.column.id)
|
|
742
|
+
}, null, 8, ["checked"])
|
|
743
|
+
]),
|
|
744
|
+
_: 2
|
|
745
|
+
}, 1024)
|
|
746
|
+
]),
|
|
747
|
+
_: 2
|
|
748
|
+
}, 1032, ["onSelect"])
|
|
749
|
+
]),
|
|
750
|
+
default: y(() => [
|
|
751
|
+
S(be, {
|
|
752
|
+
icon: "tabler:dots-vertical",
|
|
753
|
+
size: "sm",
|
|
754
|
+
color: "gray",
|
|
755
|
+
type: "ghost",
|
|
756
|
+
class: b(t(B)(t(n), "header__action__hover"))
|
|
757
|
+
}, null, 8, ["class"])
|
|
758
|
+
]),
|
|
759
|
+
_: 2
|
|
760
|
+
}, 1024))
|
|
761
|
+
], 2)) : O("", !0)
|
|
762
|
+
], 2)
|
|
763
|
+
]),
|
|
764
|
+
_: 2
|
|
765
|
+
}, 1040, ["data-selection"])) : O("", !0)
|
|
766
|
+
], 64))), 128))
|
|
767
|
+
]),
|
|
768
|
+
_: 2
|
|
769
|
+
}, 1040))), 128))
|
|
770
|
+
]),
|
|
771
|
+
_: 3
|
|
772
|
+
}, 8, ["class", "sticky"])),
|
|
773
|
+
S(t(_t), {
|
|
774
|
+
class: b(s.tbodyCls),
|
|
775
|
+
ref: "body"
|
|
776
|
+
}, {
|
|
777
|
+
default: y(() => [
|
|
778
|
+
(C(!0), $(K, null, j(t(D).getRowModel().rows, (w, z) => (C(), E(t(x), R(
|
|
779
|
+
{
|
|
780
|
+
key: w.id,
|
|
781
|
+
ref_for: !0
|
|
782
|
+
},
|
|
783
|
+
q({
|
|
784
|
+
index: z,
|
|
785
|
+
zebra: s.zebra,
|
|
786
|
+
checked: !!t(ue)(w),
|
|
787
|
+
row: w.original
|
|
788
|
+
})
|
|
789
|
+
), {
|
|
790
|
+
default: y(() => [
|
|
791
|
+
(C(!0), $(K, null, j(w.getVisibleCells(), (h) => {
|
|
792
|
+
var V, we;
|
|
793
|
+
return C(), $(K, {
|
|
794
|
+
key: h.id
|
|
795
|
+
}, [
|
|
796
|
+
((V = t(te)(h.getContext())) == null ? void 0 : V.colSpan) !== 0 && ((we = t(te)(h.getContext())) == null ? void 0 : we.rowSpan) !== 0 ? (C(), E(t(X), R({
|
|
797
|
+
key: 0,
|
|
798
|
+
ref_for: !0
|
|
799
|
+
}, t(te)(h.getContext())), ve({
|
|
800
|
+
default: y(() => [
|
|
801
|
+
h.column.id === t(a) && (f.hoverAction || f.action) ? (C(), $("div", {
|
|
802
|
+
key: 0,
|
|
803
|
+
onClick: P[0] || (P[0] = Ce(() => {
|
|
804
|
+
}, ["stop"])),
|
|
805
|
+
class: b(t(B)(t(n), "action_cell"))
|
|
806
|
+
}, [
|
|
807
|
+
H("div", {
|
|
808
|
+
class: b([t(B)(t(n), "action_cell__hover"), s.actionHoverCls])
|
|
809
|
+
}, [
|
|
810
|
+
W(s.$slots, "hoverAction", R(
|
|
811
|
+
{ ref_for: !0 },
|
|
812
|
+
{
|
|
813
|
+
column: h.column.columnDef,
|
|
814
|
+
record: w.original,
|
|
815
|
+
index: z
|
|
816
|
+
}
|
|
817
|
+
))
|
|
818
|
+
], 2),
|
|
819
|
+
W(s.$slots, "action", R(
|
|
820
|
+
{ ref_for: !0 },
|
|
821
|
+
{
|
|
822
|
+
column: h.column.columnDef,
|
|
823
|
+
record: w.original,
|
|
824
|
+
index: z
|
|
825
|
+
}
|
|
826
|
+
))
|
|
827
|
+
], 2)) : h.column.id !== i ? W(s.$slots, "bodyCell", R(
|
|
828
|
+
{
|
|
829
|
+
key: 1,
|
|
830
|
+
ref_for: !0
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
column: h.column.columnDef,
|
|
834
|
+
record: w.original,
|
|
835
|
+
index: z
|
|
836
|
+
}
|
|
837
|
+
), () => [
|
|
838
|
+
S(t(ge), {
|
|
839
|
+
render: h.column.columnDef.cell,
|
|
840
|
+
props: h.getContext()
|
|
841
|
+
}, null, 8, ["render", "props"])
|
|
842
|
+
]) : s.rowKey && w.original[s.rowKey] ? (C(), $("div", {
|
|
843
|
+
key: 2,
|
|
844
|
+
class: b(t(B)(t(n), "selection")),
|
|
845
|
+
onClick: P[1] || (P[1] = Ce(() => {
|
|
846
|
+
}, ["stop"]))
|
|
847
|
+
}, [
|
|
848
|
+
H("div", {
|
|
849
|
+
class: b(t(B)(t(n), "selection_space"))
|
|
850
|
+
}, null, 2),
|
|
851
|
+
S(Se, R({
|
|
852
|
+
rootCls: "w-fit",
|
|
853
|
+
disabled: !w.getCanSelect(),
|
|
854
|
+
checked: t(ue)(w),
|
|
855
|
+
onChange: (Ne) => t(Ve)(Ne, w),
|
|
856
|
+
ref_for: !0
|
|
857
|
+
}, t(Ee)(w.original)), null, 16, ["disabled", "checked", "onChange"])
|
|
858
|
+
], 2)) : O("", !0)
|
|
859
|
+
]),
|
|
860
|
+
_: 2
|
|
861
|
+
}, [
|
|
862
|
+
f.cellAction && ![t(a), i].includes(h.column.id) ? {
|
|
863
|
+
name: "absoluteAction",
|
|
864
|
+
fn: y(() => [
|
|
865
|
+
W(s.$slots, "cellAction", R(
|
|
866
|
+
{ ref_for: !0 },
|
|
867
|
+
{
|
|
868
|
+
column: h.column.columnDef,
|
|
869
|
+
record: w.original,
|
|
870
|
+
index: z
|
|
871
|
+
}
|
|
872
|
+
))
|
|
873
|
+
]),
|
|
874
|
+
key: "0"
|
|
875
|
+
} : void 0
|
|
876
|
+
]), 1040)) : O("", !0)
|
|
877
|
+
], 64);
|
|
878
|
+
}), 128))
|
|
879
|
+
]),
|
|
880
|
+
_: 2
|
|
881
|
+
}, 1040))), 128)),
|
|
882
|
+
r.loading ? (C(!0), $(K, { key: 0 }, j(t(D).getRowModel().rows.length ? 2 : s.loadingRowCount, (w) => (C(), E(t(x), R({
|
|
883
|
+
key: w,
|
|
884
|
+
ref_for: !0
|
|
885
|
+
}, q({ index: w, zebra: s.zebra, loading: !0 })), {
|
|
886
|
+
default: y(() => [
|
|
887
|
+
(C(!0), $(K, null, j(t(D).getVisibleLeafColumns(), (z, h) => (C(), E(t(X), { key: h }, {
|
|
888
|
+
default: y(() => [
|
|
889
|
+
z.id !== i ? W(s.$slots, "skeleton", R({
|
|
890
|
+
key: 0,
|
|
891
|
+
ref_for: !0
|
|
892
|
+
}, { index: h, column: z.columnDef }), () => [
|
|
893
|
+
S(mt, R({ ref_for: !0 }, t(We)(z.columnDef)), null, 16)
|
|
894
|
+
]) : O("", !0)
|
|
895
|
+
]),
|
|
896
|
+
_: 2
|
|
897
|
+
}, 1024))), 128))
|
|
898
|
+
]),
|
|
899
|
+
_: 2
|
|
900
|
+
}, 1040))), 128)) : O("", !0),
|
|
901
|
+
t(D).getRowModel().rows.length ? O("", !0) : (C(), E(t(x), oe(R({ key: 1 }, q({ empty: !0 }))), {
|
|
902
|
+
default: y(() => [
|
|
903
|
+
S(t(X), {
|
|
904
|
+
colspan: t(D).getVisibleLeafColumns().length,
|
|
905
|
+
empty: ""
|
|
906
|
+
}, {
|
|
907
|
+
default: y(() => [
|
|
908
|
+
S(lt, R({ type: "advance" }, s.emptyProps), ve({ _: 2 }, [
|
|
909
|
+
f.emptyTitle ? {
|
|
910
|
+
name: "title",
|
|
911
|
+
fn: y(() => [
|
|
912
|
+
W(s.$slots, "emptyTitle")
|
|
913
|
+
]),
|
|
914
|
+
key: "0"
|
|
915
|
+
} : void 0,
|
|
916
|
+
f.emptyDescription ? {
|
|
917
|
+
name: "description",
|
|
918
|
+
fn: y(() => [
|
|
919
|
+
W(s.$slots, "emptyDescription")
|
|
920
|
+
]),
|
|
921
|
+
key: "1"
|
|
922
|
+
} : void 0,
|
|
923
|
+
f.emptyActions ? {
|
|
924
|
+
name: "actions",
|
|
925
|
+
fn: y(() => [
|
|
926
|
+
W(s.$slots, "emptyActions")
|
|
927
|
+
]),
|
|
928
|
+
key: "2"
|
|
929
|
+
} : void 0,
|
|
930
|
+
f.emptyImage ? {
|
|
931
|
+
name: "image",
|
|
932
|
+
fn: y(() => [
|
|
933
|
+
W(s.$slots, "emptyImage")
|
|
934
|
+
]),
|
|
935
|
+
key: "3"
|
|
936
|
+
} : void 0
|
|
937
|
+
]), 1040)
|
|
938
|
+
]),
|
|
939
|
+
_: 3
|
|
940
|
+
}, 8, ["colspan"])
|
|
941
|
+
]),
|
|
942
|
+
_: 3
|
|
943
|
+
}, 16)),
|
|
944
|
+
s.lazyLoading ? (C(), E(t(x), oe(R({ key: 2 }, q({ lazyLoadObserver: !0 }))), {
|
|
945
|
+
default: y(() => [
|
|
946
|
+
S(t(X), {
|
|
947
|
+
ref_key: "target",
|
|
948
|
+
ref: me,
|
|
949
|
+
"lazy-load-observer": "",
|
|
950
|
+
colspan: t(D).getVisibleLeafColumns().length
|
|
951
|
+
}, null, 8, ["colspan"])
|
|
952
|
+
]),
|
|
953
|
+
_: 1
|
|
954
|
+
}, 16)) : O("", !0)
|
|
955
|
+
]),
|
|
956
|
+
_: 3
|
|
957
|
+
}, 8, ["class"])
|
|
958
|
+
]),
|
|
959
|
+
_: 3
|
|
960
|
+
}, 8, ["size", "style", "class"])
|
|
961
|
+
]),
|
|
962
|
+
_: 3
|
|
963
|
+
}, 16, ["root-props", "class"])
|
|
964
|
+
]),
|
|
965
|
+
_: 3
|
|
966
|
+
}, 8, ["open"])
|
|
967
|
+
], 2));
|
|
968
|
+
}
|
|
969
|
+
});
|
|
970
|
+
export {
|
|
971
|
+
Do as _
|
|
972
|
+
};
|