disguise-ui 0.1.3 → 0.2.1
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/disguise-ui.js +145 -93
- package/dist/style.css +1 -1
- package/dist/types/components/async-select/async-select.type.d.ts +14 -0
- package/dist/types/components/async-select/async-select.utils.d.ts +12 -0
- package/dist/types/components/async-select/async-select.vue.d.ts +52 -0
- package/dist/types/components/async-select/index.d.ts +2 -0
- package/dist/types/components/card/index.vue.d.ts +15 -0
- package/dist/types/components/crud-page/index.d.ts +2 -0
- package/dist/types/components/crud-page/index.type.d.ts +105 -0
- package/dist/types/components/crud-page/index.vue.d.ts +66 -0
- package/dist/types/components/dialog-list/index.vue.d.ts +540 -0
- package/dist/types/components/dict-tag/index.vue.d.ts +18 -0
- package/dist/types/components/disguise-icon/index.vue.d.ts +14 -0
- package/dist/types/components/drawer-form-page/index.d.ts +3 -0
- package/dist/types/components/drawer-form-page/index.type.d.ts +76 -0
- package/dist/types/components/drawer-form-page/index.vue.d.ts +94 -0
- package/dist/types/components/drawer-form-page/use-drawer-form-page.d.ts +4 -0
- package/dist/types/components/file-upload/components/file-status.vue.d.ts +50 -0
- package/dist/types/components/file-upload/composables/use-file-type.d.ts +41 -0
- package/dist/types/components/file-upload/composables/use-file-upload.d.ts +82 -0
- package/dist/types/components/file-upload/composables/use-file-upload.utils.d.ts +9 -0
- package/dist/types/components/file-upload/composables/use-multiple-file-upload.d.ts +119 -0
- package/dist/types/components/file-upload/file-upload.type.d.ts +68 -0
- package/dist/types/components/file-upload/file-upload.vue.d.ts +33 -0
- package/dist/types/components/file-upload/index.d.ts +2 -0
- package/dist/types/components/image-upload/index.vue.d.ts +26 -0
- package/dist/types/components/images-view/index.vue.d.ts +18 -0
- package/dist/types/components/import-dialog/index.d.ts +3 -0
- package/dist/types/components/import-dialog/index.type.d.ts +101 -0
- package/dist/types/components/import-dialog/index.vue.d.ts +35 -0
- package/dist/types/components/picture-upload/index.d.ts +3 -0
- package/dist/types/components/picture-upload/picture-upload.vue.d.ts +52 -0
- package/dist/types/components/rich-text-editor/index.vue.d.ts +35 -0
- package/dist/types/components/schema-form/index.d.ts +5 -0
- package/dist/types/components/schema-form/readonly-text.vue.d.ts +7 -0
- package/dist/types/components/schema-form/schema-form-item.vue.d.ts +36 -0
- package/dist/types/components/schema-form/schema-form-registry.d.ts +18 -0
- package/dist/types/components/schema-form/schema-form.type.d.ts +190 -0
- package/dist/types/components/schema-form/schema-form.util.d.ts +10 -0
- package/dist/types/components/schema-form/schema-form.vue.d.ts +59 -0
- package/dist/types/components/schema-form/translate-field.vue.d.ts +27 -0
- package/dist/types/components/schema-form/translate-toolbar.vue.d.ts +24 -0
- package/dist/types/components/schema-form/use-field-options.d.ts +4 -0
- package/dist/types/components/search-form/index.d.ts +2 -0
- package/dist/types/components/search-form/index.type.d.ts +3 -0
- package/dist/types/components/search-form/index.vue.d.ts +66 -0
- package/dist/types/components/table-entity/cells/avatar-cell.vue.d.ts +10 -0
- package/dist/types/components/table-entity/cells/file-cell.vue.d.ts +20 -0
- package/dist/types/components/table-entity/cells/index.d.ts +10 -0
- package/dist/types/components/table-entity/cells/list-expand-cell.vue.d.ts +19 -0
- package/dist/types/components/table-entity/cells/picture-cell.vue.d.ts +22 -0
- package/dist/types/components/table-entity/cells/price-cell.vue.d.ts +10 -0
- package/dist/types/components/table-entity/components/ColumnFixedPanel.vue.d.ts +13 -0
- package/dist/types/components/table-entity/components/ColumnSettingsPanel.vue.d.ts +25 -0
- package/dist/types/components/table-entity/composables/use-column-fixed.d.ts +15 -0
- package/dist/types/components/table-entity/composables/use-column-resize.d.ts +25 -0
- package/dist/types/components/table-entity/composables/use-column-settings.d.ts +41 -0
- package/dist/types/components/table-entity/composables/use-row-drag.d.ts +21 -0
- package/dist/types/components/table-entity/composables/use-table-selection.d.ts +23 -0
- package/dist/types/components/table-entity/index.type.d.ts +189 -0
- package/dist/types/components/table-entity/index.vue.d.ts +101 -0
- package/dist/types/components/table-entity/utils/column-slots.d.ts +8 -0
- package/dist/types/components/table-entity/utils/column-utils.d.ts +7 -0
- package/dist/types/components/table-entity/utils/list-expand.d.ts +9 -0
- package/dist/types/components/user-avatar-info/index.vue.d.ts +114 -0
- package/dist/types/composables/use-dict-data.d.ts +192 -0
- package/dist/types/composables/use-image-url.d.ts +8 -0
- package/dist/types/entities/index.d.ts +2 -0
- package/dist/types/entities/registry.d.ts +33 -0
- package/dist/types/index.d.ts +25 -0
- package/dist/types/runtime/access.d.ts +13 -0
- package/dist/types/runtime/context.d.ts +48 -0
- package/dist/types/runtime/dict.d.ts +22 -0
- package/dist/types/runtime/i18n.d.ts +12 -0
- package/dist/types/runtime/modal.d.ts +31 -0
- package/dist/types/runtime/preferences.d.ts +6 -0
- package/dist/types/runtime/request.d.ts +19 -0
- package/dist/types/runtime/types.d.ts +1 -0
- package/dist/types/runtime/upload.d.ts +5 -0
- package/dist/types/runtime/utils.d.ts +16 -0
- package/dist/types/services/file-upload.d.ts +11 -0
- package/dist/types/setup.d.ts +7 -0
- package/package.json +6 -3
package/dist/disguise-ui.js
CHANGED
|
@@ -1003,7 +1003,7 @@ function _r(e, t) {
|
|
|
1003
1003
|
return Number.isFinite(r) && t > 0 ? Math.round(r / t) : null;
|
|
1004
1004
|
}
|
|
1005
1005
|
function vr(e) {
|
|
1006
|
-
return
|
|
1006
|
+
return Array.from(e.querySelectorAll(".el-table-v2__body .el-table-v2__row"));
|
|
1007
1007
|
}
|
|
1008
1008
|
function yr(e) {
|
|
1009
1009
|
if (e) {
|
|
@@ -1018,16 +1018,16 @@ function br(e, t, n) {
|
|
|
1018
1018
|
}
|
|
1019
1019
|
function xr(e) {
|
|
1020
1020
|
let t = z(null), n = z(null), r = 0, i = 0, a = !1, o = "", s = "";
|
|
1021
|
-
function c(t, n) {
|
|
1022
|
-
let
|
|
1023
|
-
if (t < 0 || t >=
|
|
1024
|
-
let
|
|
1025
|
-
if (
|
|
1026
|
-
let
|
|
1027
|
-
for (let n = 1; n <
|
|
1028
|
-
let
|
|
1029
|
-
if (
|
|
1030
|
-
if (
|
|
1021
|
+
function c(t, n, r) {
|
|
1022
|
+
let i = e.getRows();
|
|
1023
|
+
if (t < 0 || t >= i.length) return null;
|
|
1024
|
+
let a = i[t];
|
|
1025
|
+
if (a && !e.isRowDisabled(a) && e.canDrop(r, a)) return t;
|
|
1026
|
+
let o = n >= 0 ? -1 : 1;
|
|
1027
|
+
for (let n = 1; n < i.length; n += 1) {
|
|
1028
|
+
let a = t + o * n, s = t - o * n, c = i[a], l = i[s];
|
|
1029
|
+
if (c && a >= 0 && a < i.length && !e.isRowDisabled(c) && e.canDrop(r, c)) return a;
|
|
1030
|
+
if (l && s >= 0 && s < i.length && !e.isRowDisabled(l) && e.canDrop(r, l)) return s;
|
|
1031
1031
|
}
|
|
1032
1032
|
return null;
|
|
1033
1033
|
}
|
|
@@ -1036,15 +1036,19 @@ function xr(e) {
|
|
|
1036
1036
|
if (!i || a == null || o == null) return;
|
|
1037
1037
|
let s = e.getRowHeight();
|
|
1038
1038
|
i.classList.add("table-entity--row-dragging");
|
|
1039
|
-
for (let
|
|
1040
|
-
let
|
|
1041
|
-
if (
|
|
1042
|
-
if (
|
|
1043
|
-
|
|
1039
|
+
for (let t of vr(i)) {
|
|
1040
|
+
let n = _r(t, s);
|
|
1041
|
+
if (n == null) continue;
|
|
1042
|
+
if (n === a) {
|
|
1043
|
+
t.classList.add("table-entity__row--lift"), t.style.zIndex = "5", t.style.transition = "none", t.style.transform = `translateY(${r}px)`;
|
|
1044
1044
|
continue;
|
|
1045
1045
|
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1046
|
+
if (e.isTree()) {
|
|
1047
|
+
t.classList.remove("table-entity__row--lift"), t.style.zIndex = "", t.style.transition = "", t.style.transform = "";
|
|
1048
|
+
continue;
|
|
1049
|
+
}
|
|
1050
|
+
let i = 0;
|
|
1051
|
+
a < o && n > a && n <= o && (i = -s), a > o && n >= o && n < a && (i = s), t.classList.remove("table-entity__row--lift"), t.style.zIndex = "", t.style.transition = "transform 0.2s ease", t.style.transform = i === 0 ? "" : `translateY(${i}px)`;
|
|
1048
1052
|
}
|
|
1049
1053
|
}
|
|
1050
1054
|
function u(e) {
|
|
@@ -1083,24 +1087,24 @@ function xr(e) {
|
|
|
1083
1087
|
if (!s || u == null) return;
|
|
1084
1088
|
let d = o.clientY - i;
|
|
1085
1089
|
(Math.abs(o.clientX - r) > 3 || Math.abs(d) > 3) && (a = !0);
|
|
1086
|
-
let f = e.getRowHeight(), p = u + Math.round(d / Math.max(f, 1)), m = e.getRows().length - 1, h =
|
|
1087
|
-
|
|
1090
|
+
let f = e.getRowHeight(), p = u + Math.round(d / Math.max(f, 1)), m = e.getRows().length - 1, h = Math.max(0, Math.min(m, p)), g = e.getRows()[u];
|
|
1091
|
+
if (!g) return;
|
|
1092
|
+
let _ = c(h, d, g);
|
|
1093
|
+
_ != null && (n.value = _), a && l(d);
|
|
1088
1094
|
}
|
|
1089
1095
|
async function m() {
|
|
1090
|
-
let r = t.value, i = n.value, o = a, s = e.getRoot(), c = s && r != null && i != null && r !== i ? u(s) : null;
|
|
1096
|
+
let r = t.value, i = n.value, o = a, s = e.getRoot(), c = e.getRows(), l = s && r != null && i != null && r !== i ? u(s) : null;
|
|
1091
1097
|
if (f(), o) {
|
|
1092
1098
|
let e = (t) => {
|
|
1093
1099
|
t.preventDefault(), t.stopPropagation(), document.removeEventListener("click", e, !0);
|
|
1094
1100
|
};
|
|
1095
1101
|
document.addEventListener("click", e, !0);
|
|
1096
1102
|
}
|
|
1097
|
-
if (!
|
|
1098
|
-
let
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
rows: l
|
|
1103
|
-
}), await M(), d(s, c));
|
|
1103
|
+
if (!l || !s || r == null || i == null || r === i) return;
|
|
1104
|
+
let p = c[r], m = c[i];
|
|
1105
|
+
if (!p || !m) return;
|
|
1106
|
+
let h = e.moveRows(p, m, r, i);
|
|
1107
|
+
h && (e.onSort(h), await M(), d(s, l));
|
|
1104
1108
|
}
|
|
1105
1109
|
function h(c) {
|
|
1106
1110
|
if (!e.isEnabled() || c.button !== 0) return;
|
|
@@ -1796,7 +1800,7 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
1796
1800
|
per_page: r.per_page
|
|
1797
1801
|
}), k = _(() => Math.max(1, Math.floor(r.width ?? E.value))), A = _(() => r.total == null ? c.value : Number(r.total)), j = _(() => r.showColumnSettings || typeof r.data == "function");
|
|
1798
1802
|
function M() {
|
|
1799
|
-
i("refresh"),
|
|
1803
|
+
i("refresh"), Qe();
|
|
1800
1804
|
}
|
|
1801
1805
|
let P = _(() => r.columns.filter(Boolean).map((e) => ({
|
|
1802
1806
|
...e,
|
|
@@ -1826,7 +1830,7 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
1826
1830
|
W.value = {
|
|
1827
1831
|
field: t,
|
|
1828
1832
|
order: n
|
|
1829
|
-
}, D.current_page === 1 ? (q(), typeof r.data == "function" &&
|
|
1833
|
+
}, D.current_page === 1 ? (q(), typeof r.data == "function" && Qe()) : (D.current_page = 1, i("update:current_page", 1), i("update:page", 1), q());
|
|
1830
1834
|
}
|
|
1831
1835
|
function q() {
|
|
1832
1836
|
i("change", {
|
|
@@ -1852,7 +1856,7 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
1852
1856
|
return t != null && String(t) !== "";
|
|
1853
1857
|
}), t = e?.key ?? e?.dataKey;
|
|
1854
1858
|
return t == null ? void 0 : String(t);
|
|
1855
|
-
}), pe = _(() => r.expandedRowKeys ?? C.value), ve = _(() => !r.tree || r.treeChildrenKey === "children" ? h.value :
|
|
1859
|
+
}), pe = _(() => r.expandedRowKeys ?? C.value), ve = _(() => !r.tree || r.treeChildrenKey === "children" ? h.value : et(h.value, r.treeChildrenKey));
|
|
1856
1860
|
function ye(e) {
|
|
1857
1861
|
let t = r.rowKey ?? "id", n = r.treeChildrenKey ?? "children", i = I.value.map((e) => ci(e));
|
|
1858
1862
|
return e.map((e) => {
|
|
@@ -1863,18 +1867,18 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
1863
1867
|
return Array.isArray(e[n]) && (a[n] = ye(e[n])), a;
|
|
1864
1868
|
});
|
|
1865
1869
|
}
|
|
1866
|
-
let be = _(() => B.value ? ye(ve.value) : ve.value), xe = _(() => r.tree ?
|
|
1870
|
+
let be = _(() => B.value ? ye(ve.value) : ve.value), xe = _(() => r.tree ? tt(ve.value, pe.value) : h.value), Se = _(() => r.tree ? tt(ve.value) : h.value);
|
|
1867
1871
|
J(() => r.current_page, (e) => {
|
|
1868
1872
|
D.current_page = e;
|
|
1869
1873
|
}), J(() => r.per_page, (e) => {
|
|
1870
1874
|
D.per_page = e;
|
|
1871
1875
|
}), J(() => r.data, async () => {
|
|
1872
|
-
await
|
|
1876
|
+
await Qe();
|
|
1873
1877
|
}, {
|
|
1874
1878
|
deep: !0,
|
|
1875
1879
|
immediate: !0
|
|
1876
1880
|
}), J(() => [D.current_page, D.per_page], async () => {
|
|
1877
|
-
typeof r.data == "function" && await
|
|
1881
|
+
typeof r.data == "function" && await Qe();
|
|
1878
1882
|
}), J(() => r.expandedRowKeys, (e) => {
|
|
1879
1883
|
e && (C.value = [...e]);
|
|
1880
1884
|
}, { immediate: !0 });
|
|
@@ -1883,38 +1887,86 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
1883
1887
|
return r.importDialog ? (a.value = !0, !0) : !1;
|
|
1884
1888
|
}
|
|
1885
1889
|
function ke(e) {
|
|
1886
|
-
i("importSuccess", e),
|
|
1890
|
+
i("importSuccess", e), Qe();
|
|
1887
1891
|
}
|
|
1888
1892
|
function Ae(e) {
|
|
1889
1893
|
i("importError", e);
|
|
1890
1894
|
}
|
|
1891
|
-
let je = _(() => r.rowDraggable
|
|
1895
|
+
let je = Symbol("table-entity-root-parent"), Me = _(() => r.rowDraggable), Ne = _(() => r.tree && fe.value ? tt(ve.value, pe.value) : r.tree ? ve.value : h.value), Pe = _(() => {
|
|
1896
|
+
let e = /* @__PURE__ */ new Map(), t = r.rowKey ?? "id", n = r.treeChildrenKey ?? "children";
|
|
1897
|
+
function i(r, a) {
|
|
1898
|
+
for (let o of r) {
|
|
1899
|
+
let r = o[t];
|
|
1900
|
+
e.set(r, a);
|
|
1901
|
+
let s = o[n];
|
|
1902
|
+
Array.isArray(s) && i(s, r);
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
return i(h.value, je), e;
|
|
1906
|
+
});
|
|
1907
|
+
function Fe(e, t, n, r, i, a = null) {
|
|
1908
|
+
let o = e.findIndex((e) => e[r] === t), s = e.findIndex((e) => e[r] === n);
|
|
1909
|
+
if (o >= 0 && s >= 0 && o !== s) return {
|
|
1910
|
+
newIndex: s,
|
|
1911
|
+
oldIndex: o,
|
|
1912
|
+
parentRowKey: a,
|
|
1913
|
+
rows: br(e, o, s)
|
|
1914
|
+
};
|
|
1915
|
+
for (let a = 0; a < e.length; a += 1) {
|
|
1916
|
+
let o = e[a], s = o[i];
|
|
1917
|
+
if (!Array.isArray(s)) continue;
|
|
1918
|
+
let c = Fe(s, t, n, r, i, o[r] ?? null);
|
|
1919
|
+
if (c) return {
|
|
1920
|
+
...c,
|
|
1921
|
+
rows: e.map((e, t) => t === a ? {
|
|
1922
|
+
...e,
|
|
1923
|
+
[i]: c.rows
|
|
1924
|
+
} : e)
|
|
1925
|
+
};
|
|
1926
|
+
}
|
|
1927
|
+
return null;
|
|
1928
|
+
}
|
|
1929
|
+
let { draggingIndex: Le, onPointerDown: ze, overIndex: Be } = xr({
|
|
1930
|
+
canDrop: (e, t) => {
|
|
1931
|
+
if (!r.tree) return !0;
|
|
1932
|
+
let n = r.rowKey ?? "id", i = Pe.value, a = e[n], o = t[n];
|
|
1933
|
+
return a != null && o != null && i.has(a) && i.has(o) && i.get(a) === i.get(o);
|
|
1934
|
+
},
|
|
1892
1935
|
getHandle: () => r.rowDragHandle || `.${Ei}`,
|
|
1893
1936
|
getRoot: () => T.value,
|
|
1894
1937
|
getRowHeight: () => r.rowHeight,
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1938
|
+
getRows: () => Ne.value,
|
|
1939
|
+
isEnabled: () => Me.value,
|
|
1940
|
+
isTree: () => r.tree,
|
|
1898
1941
|
isRowDisabled: (e) => r.rowDragDisabled?.(e) ?? !1,
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1942
|
+
moveRows: (e, t, n, i) => {
|
|
1943
|
+
if (!r.tree) {
|
|
1944
|
+
let e = br(h.value, n, i);
|
|
1945
|
+
return e === h.value ? null : (h.value = e, {
|
|
1946
|
+
newIndex: i,
|
|
1947
|
+
oldIndex: n,
|
|
1948
|
+
rows: e
|
|
1949
|
+
});
|
|
1950
|
+
}
|
|
1951
|
+
let a = r.rowKey ?? "id", o = Fe(h.value, e[a], t[a], a, r.treeChildrenKey ?? "children");
|
|
1952
|
+
return o ? (h.value = o.rows, o) : null;
|
|
1953
|
+
},
|
|
1954
|
+
onSort: (e) => i("rowSort", e)
|
|
1903
1955
|
});
|
|
1904
|
-
function
|
|
1905
|
-
if (!
|
|
1906
|
-
let
|
|
1907
|
-
return r.rowDragDisabled?.(e) &&
|
|
1956
|
+
function Ve({ rowData: e, rowIndex: t }) {
|
|
1957
|
+
if (!Me.value) return "";
|
|
1958
|
+
let n = [];
|
|
1959
|
+
return r.rowDragDisabled?.(e) && n.push("table-entity__row--drag-disabled"), Le.value != null && Be.value === t && Be.value !== Le.value && n.push("table-entity__row--drop-target"), n.join(" ");
|
|
1908
1960
|
}
|
|
1909
|
-
function
|
|
1910
|
-
if (!
|
|
1961
|
+
function He({ rowData: e, rowIndex: t }) {
|
|
1962
|
+
if (!Me.value) return {};
|
|
1911
1963
|
let n = e?.[r.rowKey ?? "id"];
|
|
1912
1964
|
return {
|
|
1913
1965
|
"data-row-index": t,
|
|
1914
1966
|
"data-row-key": String(n ?? t)
|
|
1915
1967
|
};
|
|
1916
1968
|
}
|
|
1917
|
-
let
|
|
1969
|
+
let Ue = _(() => ({
|
|
1918
1970
|
key: Ti,
|
|
1919
1971
|
dataKey: Ti,
|
|
1920
1972
|
title: "",
|
|
@@ -1924,33 +1976,33 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
1924
1976
|
title: "拖拽排序"
|
|
1925
1977
|
}, O(Z, { size: 16 }, () => O(it)))
|
|
1926
1978
|
}));
|
|
1927
|
-
function
|
|
1979
|
+
function We(e) {
|
|
1928
1980
|
if (!e || !r.permissionCode) return;
|
|
1929
1981
|
let t = e === "delete" ? "remove" : e === "view" ? "query" : e;
|
|
1930
1982
|
return `${r.permissionCode}:${t}`;
|
|
1931
1983
|
}
|
|
1932
|
-
function
|
|
1933
|
-
let t =
|
|
1984
|
+
function Ge(e) {
|
|
1985
|
+
let t = We(e);
|
|
1934
1986
|
return !t || m([t]);
|
|
1935
1987
|
}
|
|
1936
|
-
let
|
|
1988
|
+
let Ke = _(() => {
|
|
1937
1989
|
let e = /* @__PURE__ */ new Set();
|
|
1938
|
-
for (let t of r.actions ?? [])
|
|
1939
|
-
for (let t of r.pushActions ?? []) t.name &&
|
|
1990
|
+
for (let t of r.actions ?? []) Ge(t) && e.add(t);
|
|
1991
|
+
for (let t of r.pushActions ?? []) t.name && Ge(t.name) && e.add(t.name);
|
|
1940
1992
|
return e;
|
|
1941
1993
|
});
|
|
1942
|
-
function
|
|
1943
|
-
let n =
|
|
1994
|
+
function qe(e, t) {
|
|
1995
|
+
let n = We(t), r = H("access");
|
|
1944
1996
|
return !n || !r ? e : oe(e, [[r, [n]]]);
|
|
1945
1997
|
}
|
|
1946
|
-
let
|
|
1998
|
+
let Je = _(() => 50), Ye = _(() => {
|
|
1947
1999
|
if (!r.showActions) return null;
|
|
1948
|
-
let e =
|
|
2000
|
+
let e = Ke.value;
|
|
1949
2001
|
return {
|
|
1950
2002
|
key: wi,
|
|
1951
2003
|
dataKey: wi,
|
|
1952
2004
|
title: r.actionColumnTitle || u("components.tableEntity.action"),
|
|
1953
|
-
width:
|
|
2005
|
+
width: Je.value,
|
|
1954
2006
|
fixed: "right",
|
|
1955
2007
|
cellRenderer: (t) => {
|
|
1956
2008
|
let n = p.actionsCol;
|
|
@@ -1979,7 +2031,7 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
1979
2031
|
function c(e, n = !0) {
|
|
1980
2032
|
if (e.component) {
|
|
1981
2033
|
let r;
|
|
1982
|
-
return r = typeof e.component == "function" ? e.component({ row: t.rowData }) : O(e.component, { row: t.rowData }), n ?
|
|
2034
|
+
return r = typeof e.component == "function" ? e.component({ row: t.rowData }) : O(e.component, { row: t.rowData }), n ? qe(r, e.name) : r;
|
|
1983
2035
|
}
|
|
1984
2036
|
let r = O(X, {
|
|
1985
2037
|
type: e.type,
|
|
@@ -1990,7 +2042,7 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
1990
2042
|
row: t.rowData
|
|
1991
2043
|
})
|
|
1992
2044
|
}, () => e.label);
|
|
1993
|
-
return n ?
|
|
2045
|
+
return n ? qe(r, e.name) : r;
|
|
1994
2046
|
}
|
|
1995
2047
|
let l = o.length > 1 ? o : [], d = (l.length > 0 ? [] : o).map((e) => c(e));
|
|
1996
2048
|
if (l.length > 0) {
|
|
@@ -2003,7 +2055,7 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
2003
2055
|
size: "small",
|
|
2004
2056
|
title: u("components.tableEntity.moreActions")
|
|
2005
2057
|
}, () => "..."),
|
|
2006
|
-
dropdown: () => O(_e, {}, () => l.map((e, n) => e.component ?
|
|
2058
|
+
dropdown: () => O(_e, {}, () => l.map((e, n) => e.component ? qe(O(ge, { key: e.name ?? `component-${n}` }, () => c(e, !1)), e.name) : qe(O(ge, {
|
|
2007
2059
|
key: e.name,
|
|
2008
2060
|
onClick: () => i("handle-action", {
|
|
2009
2061
|
action: e.name,
|
|
@@ -2020,11 +2072,11 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
2020
2072
|
return O("div", { class: "table-entity__actions" }, d);
|
|
2021
2073
|
}
|
|
2022
2074
|
};
|
|
2023
|
-
}),
|
|
2075
|
+
}), Xe = _(() => {
|
|
2024
2076
|
let e = [];
|
|
2025
|
-
return
|
|
2077
|
+
return Me.value && !r.rowDragHandle && e.push(Ue.value), r.selectable && e.push(Q.value), e.push(...de.value), Ye.value && e.push(Ye.value), $e(e, k.value);
|
|
2026
2078
|
});
|
|
2027
|
-
function
|
|
2079
|
+
function Ze(e) {
|
|
2028
2080
|
return e.map((e) => {
|
|
2029
2081
|
let t = e.headerCellRenderer, n = ne(e), r = W.value.field === n, i = !!(e.sortable || e.sortOrder), a = i && r ? O("span", { class: ["table-entity__sort-arrow", W.value.order === "desc" ? "table-entity__sort-arrow--desc" : "table-entity__sort-arrow--asc"] }) : i ? O("span", { class: "table-entity__sort-icons" }, [O("span", { class: "table-entity__sort-arrow--asc" }), O("span", { class: "table-entity__sort-arrow--desc" })]) : null;
|
|
2030
2082
|
return {
|
|
@@ -2047,7 +2099,7 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
2047
2099
|
};
|
|
2048
2100
|
});
|
|
2049
2101
|
}
|
|
2050
|
-
async function
|
|
2102
|
+
async function Qe() {
|
|
2051
2103
|
if (Array.isArray(r.data)) h.value = [...r.data], c.value = h.value.length;
|
|
2052
2104
|
else if (typeof r.data != "function") h.value = [];
|
|
2053
2105
|
else {
|
|
@@ -2067,7 +2119,7 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
2067
2119
|
}
|
|
2068
2120
|
}
|
|
2069
2121
|
}
|
|
2070
|
-
function
|
|
2122
|
+
function $e(e, t) {
|
|
2071
2123
|
if (e.length === 0 || t <= 1) return e;
|
|
2072
2124
|
let n = e.map((e) => ({
|
|
2073
2125
|
...e,
|
|
@@ -2086,16 +2138,16 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
2086
2138
|
};
|
|
2087
2139
|
});
|
|
2088
2140
|
}
|
|
2089
|
-
function
|
|
2141
|
+
function et(e, t = "children") {
|
|
2090
2142
|
return e.map((e) => {
|
|
2091
2143
|
let n = e[t];
|
|
2092
2144
|
return Array.isArray(n) ? {
|
|
2093
2145
|
...e,
|
|
2094
|
-
children:
|
|
2146
|
+
children: et(n, t)
|
|
2095
2147
|
} : e;
|
|
2096
2148
|
});
|
|
2097
2149
|
}
|
|
2098
|
-
function
|
|
2150
|
+
function tt(e, t) {
|
|
2099
2151
|
let n = [], i = t ? new Set(t) : void 0, a = r.rowKey ?? "id";
|
|
2100
2152
|
function o(e) {
|
|
2101
2153
|
e.forEach((e) => {
|
|
@@ -2106,26 +2158,26 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
2106
2158
|
}
|
|
2107
2159
|
return o(e), n;
|
|
2108
2160
|
}
|
|
2109
|
-
function
|
|
2161
|
+
function nt(e) {
|
|
2110
2162
|
C.value = [...e], i("update:expandedRowKeys", [...e]);
|
|
2111
2163
|
}
|
|
2112
|
-
function
|
|
2113
|
-
|
|
2164
|
+
function rt(e) {
|
|
2165
|
+
nt(e);
|
|
2114
2166
|
}
|
|
2115
|
-
function
|
|
2116
|
-
|
|
2167
|
+
function ot(e) {
|
|
2168
|
+
nt(e), i("expandedRowsChange", [...e]);
|
|
2117
2169
|
}
|
|
2118
|
-
function
|
|
2170
|
+
function st(e) {
|
|
2119
2171
|
i("rowExpand", e);
|
|
2120
2172
|
}
|
|
2121
|
-
function
|
|
2173
|
+
function lt(e) {
|
|
2122
2174
|
D.current_page = e, i("update:current_page", e), i("pageChange", e), q();
|
|
2123
2175
|
}
|
|
2124
|
-
function
|
|
2176
|
+
function ut(e) {
|
|
2125
2177
|
D.per_page = e, i("update:per_page", e), q();
|
|
2126
2178
|
}
|
|
2127
|
-
async function
|
|
2128
|
-
e != null && D.current_page !== e ? (D.current_page = e, i("update:current_page", e), q()) : await
|
|
2179
|
+
async function dt(e) {
|
|
2180
|
+
e != null && D.current_page !== e ? (D.current_page = e, i("update:current_page", e), q()) : await Qe();
|
|
2129
2181
|
}
|
|
2130
2182
|
return t({
|
|
2131
2183
|
clearSelection: $,
|
|
@@ -2133,7 +2185,7 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
2133
2185
|
getSelectedCount: Ee,
|
|
2134
2186
|
setSelectedKeys: De,
|
|
2135
2187
|
openImport: Oe,
|
|
2136
|
-
reload:
|
|
2188
|
+
reload: dt
|
|
2137
2189
|
}), (t, n) => {
|
|
2138
2190
|
let i = H("loading");
|
|
2139
2191
|
return L(), b("div", { class: N(["table-entity", {
|
|
@@ -2208,15 +2260,15 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
2208
2260
|
ref: T,
|
|
2209
2261
|
class: "table-entity__viewport",
|
|
2210
2262
|
onMousedown: n[2] ||= (...e) => K(ue) && K(ue)(...e),
|
|
2211
|
-
onPointerdown: n[3] ||= (...e) => K(
|
|
2263
|
+
onPointerdown: n[3] ||= (...e) => K(ze) && K(ze)(...e)
|
|
2212
2264
|
}, [w(K(Ie), {
|
|
2213
|
-
columns:
|
|
2265
|
+
columns: Ze(Xe.value),
|
|
2214
2266
|
data: be.value,
|
|
2215
2267
|
width: k.value,
|
|
2216
2268
|
height: r.height,
|
|
2217
2269
|
"row-height": r.rowHeight,
|
|
2218
|
-
"row-class":
|
|
2219
|
-
"row-props":
|
|
2270
|
+
"row-class": Ve,
|
|
2271
|
+
"row-props": He,
|
|
2220
2272
|
cache: r.cache,
|
|
2221
2273
|
"estimated-row-height": B.value ? r.rowHeight : void 0,
|
|
2222
2274
|
"row-key": B.value ? "__measureKey" : r.rowKey,
|
|
@@ -2227,9 +2279,9 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
2227
2279
|
"icon-size": r.iconSize,
|
|
2228
2280
|
"row-event-handlers": r.selectable ? K(Ce) : void 0,
|
|
2229
2281
|
fixed: "",
|
|
2230
|
-
"onUpdate:expandedRowKeys":
|
|
2231
|
-
onExpandedRowsChange:
|
|
2232
|
-
onRowExpand:
|
|
2282
|
+
"onUpdate:expandedRowKeys": rt,
|
|
2283
|
+
onExpandedRowsChange: ot,
|
|
2284
|
+
onRowExpand: st
|
|
2233
2285
|
}, null, 8, [
|
|
2234
2286
|
"columns",
|
|
2235
2287
|
"data",
|
|
@@ -2258,8 +2310,8 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
2258
2310
|
layout: "total, sizes, prev, pager, next, jumper",
|
|
2259
2311
|
background: "",
|
|
2260
2312
|
"page-sizes": K(f),
|
|
2261
|
-
onSizeChange:
|
|
2262
|
-
onCurrentChange:
|
|
2313
|
+
onSizeChange: ut,
|
|
2314
|
+
onCurrentChange: lt
|
|
2263
2315
|
}, null, 8, [
|
|
2264
2316
|
"current-page",
|
|
2265
2317
|
"page-size",
|
|
@@ -2306,7 +2358,7 @@ var bi = { class: "table-entity__toolbar-right" }, xi = { class: "buttons" }, Si
|
|
|
2306
2358
|
], 2);
|
|
2307
2359
|
};
|
|
2308
2360
|
}
|
|
2309
|
-
}), [["__scopeId", "data-v-
|
|
2361
|
+
}), [["__scopeId", "data-v-f1a6db0c"]]), Oi = { class: "dialog-list" }, ki = { class: "dialog-list__bar" }, Ai = {
|
|
2310
2362
|
key: 0,
|
|
2311
2363
|
class: "dialog-list__count"
|
|
2312
2364
|
}, ji = { class: "dialog-list__table" }, Mi = /*#__PURE__*/ d(/* @__PURE__ */ E({
|