admins-components 9.0.4 → 9.0.6
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/admins-components.js +58 -54
- package/dist/admins-components10.js +10 -0
- package/dist/admins-components100.js +23 -247
- package/dist/admins-components101.js +171 -26
- package/dist/admins-components102.js +65 -25
- package/dist/admins-components103.js +67 -162
- package/dist/admins-components104.js +27 -65
- package/dist/admins-components105.js +12 -63
- package/dist/admins-components106.js +26 -29
- package/dist/admins-components107.js +10 -16
- package/dist/admins-components108.js +3 -26
- package/dist/admins-components109.js +2 -8
- package/dist/admins-components11.js +38 -9
- package/dist/admins-components110.js +3 -4
- package/dist/admins-components111.js +21 -3
- package/dist/admins-components112.js +14 -3
- package/dist/admins-components113.js +7 -20
- package/dist/admins-components114.js +13 -14
- package/dist/admins-components115.js +34 -8
- package/dist/admins-components116.js +82 -12
- package/dist/admins-components117.js +9 -24
- package/dist/admins-components118.js +4 -82
- package/dist/admins-components119.js +8 -11
- package/dist/admins-components12.js +141 -37
- package/dist/admins-components120.js +6 -4
- package/dist/admins-components121.js +6 -8
- package/dist/admins-components122.js +14 -6
- package/dist/admins-components123.js +11 -4
- package/dist/admins-components124.js +30 -15
- package/dist/admins-components125.js +4 -13
- package/dist/admins-components126.js +29 -30
- package/dist/admins-components127.js +5 -4
- package/dist/admins-components128.js +5 -29
- package/dist/admins-components129.js +21 -4
- package/dist/admins-components13.js +5 -142
- package/dist/admins-components130.js +81 -4
- package/dist/admins-components131.js +32 -7
- package/dist/admins-components132.js +58 -73
- package/dist/admins-components133.js +24 -29
- package/dist/admins-components134.js +47 -56
- package/dist/admins-components135.js +31 -23
- package/dist/admins-components136.js +3 -50
- package/dist/admins-components137.js +184 -29
- package/dist/admins-components138.js +46 -3
- package/dist/admins-components139.js +35 -177
- package/dist/admins-components14.js +46 -5
- package/dist/admins-components140.js +41 -41
- package/dist/admins-components141.js +137 -32
- package/dist/admins-components142.js +54 -42
- package/dist/admins-components143.js +6 -140
- package/dist/admins-components144.js +5 -57
- package/dist/admins-components145.js +75 -6
- package/dist/admins-components146.js +28 -5
- package/dist/admins-components147.js +1929 -74
- package/dist/admins-components148.js +25068 -29
- package/dist/admins-components149.js +8 -1930
- package/dist/admins-components15.js +4 -46
- package/dist/admins-components150.js +5 -24809
- package/dist/admins-components151.js +141 -8
- package/dist/admins-components152.js +8 -141
- package/dist/admins-components153.js +3 -3
- package/dist/admins-components155.js +169 -0
- package/dist/admins-components156.js +44 -161
- package/dist/admins-components157.js +8 -50
- package/dist/admins-components158.js +49 -8
- package/dist/admins-components159.js +6 -50
- package/dist/admins-components16.js +94 -4
- package/dist/admins-components160.js +80 -6
- package/dist/admins-components161.js +48 -70
- package/dist/admins-components162.js +32 -31
- package/dist/admins-components163.js +8 -58
- package/dist/admins-components164.js +51 -8
- package/dist/admins-components165.js +8 -51
- package/dist/{admins-components168.js → admins-components167.js} +5 -5
- package/dist/admins-components17.js +225 -91
- package/dist/admins-components18.js +5 -228
- package/dist/admins-components19.js +181 -5
- package/dist/admins-components21.js +7 -0
- package/dist/admins-components22.js +72 -6
- package/dist/admins-components23.js +6 -72
- package/dist/admins-components24.js +58 -6
- package/dist/admins-components26.js +7 -0
- package/dist/admins-components27.js +60 -6
- package/dist/admins-components29.js +7 -0
- package/dist/admins-components30.js +36 -6
- package/dist/admins-components32.js +7 -0
- package/dist/admins-components33.js +36 -6
- package/dist/admins-components34.js +4 -36
- package/dist/admins-components35.js +32 -4
- package/dist/admins-components37.js +7 -0
- package/dist/admins-components38.js +147 -6
- package/dist/admins-components4.js +2 -2
- package/dist/admins-components40.js +7 -0
- package/dist/admins-components41.js +124 -6
- package/dist/admins-components42.js +4 -124
- package/dist/admins-components43.js +179 -4
- package/dist/admins-components44.js +4 -179
- package/dist/admins-components45.js +19 -4
- package/dist/admins-components47.js +7 -0
- package/dist/admins-components48.js +54 -6
- package/dist/admins-components49.js +93 -54
- package/dist/admins-components5.js +5 -0
- package/dist/admins-components51.js +7 -0
- package/dist/admins-components52.js +25 -6
- package/dist/admins-components53.js +9 -25
- package/dist/admins-components54.js +19 -9
- package/dist/admins-components55.js +72 -18
- package/dist/admins-components56.js +59 -73
- package/dist/admins-components57.js +4 -59
- package/dist/admins-components58.js +121 -0
- package/dist/admins-components6.js +29 -6
- package/dist/admins-components60.js +6 -6
- package/dist/admins-components61.js +126 -103
- package/dist/admins-components63.js +3 -3
- package/dist/admins-components64.js +7 -143
- package/dist/admins-components65.js +264 -0
- package/dist/admins-components67.js +6 -7
- package/dist/admins-components68.js +98 -250
- package/dist/admins-components7.js +252 -29
- package/dist/admins-components70.js +2 -2
- package/dist/admins-components71.js +54 -106
- package/dist/admins-components72.js +222 -0
- package/dist/admins-components74.js +6 -59
- package/dist/admins-components75.js +8 -221
- package/dist/admins-components76.js +47 -0
- package/dist/admins-components77.js +250 -6
- package/dist/admins-components79.js +7 -46
- package/dist/admins-components80.js +32 -245
- package/dist/admins-components82.js +2 -3
- package/dist/admins-components83.js +192 -31
- package/dist/admins-components85.js +2 -2
- package/dist/admins-components86.js +200 -195
- package/dist/admins-components88.js +3 -2
- package/dist/admins-components89.js +3 -203
- package/dist/admins-components90.js +17 -0
- package/dist/admins-components91.js +3 -7
- package/dist/admins-components92.js +52 -3
- package/dist/admins-components93.js +80 -50
- package/dist/admins-components94.js +109 -77
- package/dist/admins-components95.js +44 -3
- package/dist/admins-components96.js +101 -108
- package/dist/admins-components97.js +6 -23
- package/dist/admins-components98.js +257 -100
- package/dist/admins-components99.js +27 -7
- package/dist/base.css +1 -1
- package/dist/src/components/Button.vue.d.ts +1 -1
- package/dist/src/components/Calendar.vue.d.ts +1 -1
- package/dist/src/components/ConfirmModal.vue.d.ts +1 -1
- package/dist/src/components/DatePicker.vue.d.ts +2 -2
- package/dist/src/components/DateRangePicker.vue.d.ts +2 -2
- package/dist/src/components/DropdownMenu.vue.d.ts +2 -2
- package/dist/src/components/DropdownSelect.vue.d.ts +1 -1
- package/dist/src/components/HeaderComponent.vue.d.ts +2 -2
- package/dist/src/components/custom/ImagePicker.vue.d.ts +1 -1
- package/dist/src/components/data-table/DataCards.vue.d.ts +2 -2
- package/dist/src/components/data-table/DataCell.vue.d.ts +1 -1
- package/dist/src/components/data-table/DataFilters.vue.d.ts +4 -4
- package/dist/src/components/data-table/DataList.vue.d.ts +4 -4
- package/dist/src/components/data-table/DataListGuide.vue.d.ts +1 -1
- package/dist/src/components/data-table/DataListOptions.vue.d.ts +2 -2
- package/dist/src/components/data-table/DataPaginator.vue.d.ts +1 -1
- package/dist/src/components/data-table/DataTable.vue.d.ts +3 -3
- package/dist/src/components/data-table/FilterTags.vue.d.ts +1 -1
- package/dist/src/components/data-table/FiltersHistory.vue.d.ts +1 -1
- package/dist/src/index.d.ts +85 -80
- package/dist/src/styles/components/data-table/data-list.scss_vue_type_style_index_0_src_true_lang.css +1 -1
- package/dist/src/styles/components/data-table/filter-tags.scss_vue_type_style_index_0_src_true_lang.css +1 -1
- package/dist/src/styles/components/loader.scss_vue_type_style_index_0_src_true_lang.css +1 -1
- package/dist/src/vueformelements/config/ExternalArticleOfferElementConfig.d.ts +1 -1
- package/package.json +4 -5
- package/dist/admins-components154.js +0 -10
- package/dist/admins-components166.js +0 -10
- package/dist/admins-components20.js +0 -182
- package/dist/admins-components25.js +0 -59
- package/dist/admins-components28.js +0 -61
- package/dist/admins-components31.js +0 -37
- package/dist/admins-components36.js +0 -33
- package/dist/admins-components39.js +0 -148
- package/dist/admins-components46.js +0 -20
- package/dist/admins-components50.js +0 -94
- package/dist/admins-components59.js +0 -8
- package/dist/admins-components66.js +0 -8
- package/dist/admins-components73.js +0 -7
- package/dist/admins-components78.js +0 -9
- package/dist/admins-components8.js +0 -253
- package/dist/index.d.ts +0 -2
- package/dist/src/components/data-table/DataCell.vue_vue_type_style_index_0_scoped_d46d9895_lang.css +0 -1
- package/dist/src/styles/_buttons.scss_vue_type_style_index_0_src_true_lang.css +0 -1
|
@@ -1,144 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { buildActionGroupMenuItems as o, getColumnValue as s, isActionGroup as c } from "./admins-components55.js";
|
|
8
|
-
import l from "./admins-components60.js";
|
|
9
|
-
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, mergeProps as v, normalizeClass as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, vShow as T, withDirectives as E, withModifiers as D } from "vue";
|
|
10
|
-
//#region src/components/data-table/DataCards.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var O = { class: "ac-component" }, k = ["onClick", "onPointerdown"], A = ["onClick"], j = { class: "c-card__heading" }, M = { class: "c-card__label" }, N = { class: "c-card__body" }, P = { class: "c-card__field-label" }, F = /* @__PURE__ */ _({
|
|
12
|
-
__name: "DataCards",
|
|
13
|
-
props: {
|
|
14
|
-
config: {},
|
|
15
|
-
items: {},
|
|
16
|
-
settings: { default: () => ({ ...a }) },
|
|
17
|
-
loading: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: !1
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
emits: ["selection-change"],
|
|
23
|
-
setup(a, { emit: _ }) {
|
|
24
|
-
let F = a, I = _, { selectedKeys: L, toggle: R } = i(() => F.items, () => F.config.selectableAttr, (e) => I("selection-change", e)), z = x(/* @__PURE__ */ new Set()), B = d(() => F.config.columns.filter((e) => e.visible !== !1)), V = d(() => {
|
|
25
|
-
let e = F.settings;
|
|
26
|
-
if (e?.cardHeaderColumns) {
|
|
27
|
-
let t = B.value.filter((t) => e.cardHeaderColumns[t.property]);
|
|
28
|
-
if (t.length > 0) {
|
|
29
|
-
if (e.cardHeaderOrder) {
|
|
30
|
-
let n = e.cardHeaderOrder;
|
|
31
|
-
return [...t].sort((e, t) => {
|
|
32
|
-
let r = n.indexOf(e.property), i = n.indexOf(t.property);
|
|
33
|
-
return (r === -1 ? 999 : r) - (i === -1 ? 999 : i);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
return t;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
let t = B.value.filter((e) => e.primary);
|
|
40
|
-
return t.length > 0 ? t : B.value.slice(0, 1);
|
|
41
|
-
}), H = null, U = !1;
|
|
42
|
-
function W(e, t) {
|
|
43
|
-
F.config.selectableAttr && e.button === 0 && (U = !1, H = setTimeout(() => {
|
|
44
|
-
U = !0, R(t);
|
|
45
|
-
}, 500));
|
|
46
|
-
}
|
|
47
|
-
function G() {
|
|
48
|
-
H &&= (clearTimeout(H), null);
|
|
49
|
-
}
|
|
50
|
-
function K(e) {
|
|
51
|
-
U && e.preventDefault();
|
|
52
|
-
}
|
|
53
|
-
function q(e) {
|
|
54
|
-
if (U) {
|
|
55
|
-
U = !1;
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
J(e);
|
|
59
|
-
}
|
|
60
|
-
function J(e) {
|
|
61
|
-
z.value.has(e) ? z.value.delete(e) : z.value.add(e), z.value = new Set(z.value);
|
|
62
|
-
}
|
|
63
|
-
return (i, d) => (b(), m("div", O, [a.loading ? (b(), f(r, {
|
|
64
|
-
key: 0,
|
|
65
|
-
loading: !0
|
|
66
|
-
})) : (b(), m("div", {
|
|
67
|
-
key: 1,
|
|
68
|
-
class: y(["c-cards", { "is-compact": a.settings.compact }])
|
|
69
|
-
}, [(b(!0), m(u, null, S(a.items, (r, i) => (b(), m("div", {
|
|
70
|
-
key: i,
|
|
71
|
-
class: y(["c-card", {
|
|
72
|
-
"is-open": z.value.has(i),
|
|
73
|
-
"is-selected": a.config.selectableAttr && w(L).has(r[a.config.selectableAttr])
|
|
74
|
-
}])
|
|
75
|
-
}, [h("button", {
|
|
76
|
-
type: "button",
|
|
77
|
-
class: "c-card__header",
|
|
78
|
-
onClick: (e) => q(i),
|
|
79
|
-
onPointerdown: (e) => W(e, r),
|
|
80
|
-
onPointerup: d[0] ||= (e) => G(),
|
|
81
|
-
onPointerleave: d[1] ||= (e) => G(),
|
|
82
|
-
onContextmenu: K
|
|
83
|
-
}, [
|
|
84
|
-
a.config.selectableAttr ? (b(), m("span", {
|
|
85
|
-
key: 0,
|
|
86
|
-
class: "c-card__check-zone",
|
|
87
|
-
onClick: D((e) => w(R)(r), ["stop"])
|
|
88
|
-
}, [h("span", { class: y(["c-card__check", { "is-checked": w(L).has(r[a.config.selectableAttr]) }]) }, [...d[3] ||= [h("i", { class: "fa-solid fa-check" }, null, -1)]], 2)], 8, A)) : p("", !0),
|
|
89
|
-
h("span", j, [(b(!0), m(u, null, S(V.value, (e, t) => (b(), m("span", {
|
|
90
|
-
key: e.property,
|
|
91
|
-
class: "c-card__heading-item"
|
|
92
|
-
}, [h("span", M, C(e.label), 1), h("span", { class: y(["c-card__title", { "c-truncate": a.settings.compact && t === 0 }]) }, C(w(s)(r, e)), 3)]))), 128))]),
|
|
93
|
-
d[4] ||= h("span", {
|
|
94
|
-
class: "c-card__icon",
|
|
95
|
-
"aria-hidden": "true"
|
|
96
|
-
}, [h("i", { class: "fa-solid fa-chevron-down" })], -1)
|
|
97
|
-
], 40, k), E(h("div", N, [(b(!0), m(u, null, S(B.value, (e) => (b(), m("div", {
|
|
98
|
-
key: e.property,
|
|
99
|
-
class: "c-card__field",
|
|
100
|
-
tabindex: "0"
|
|
101
|
-
}, [
|
|
102
|
-
h("span", P, C(e.label), 1),
|
|
103
|
-
g(l, {
|
|
104
|
-
item: r,
|
|
105
|
-
col: e,
|
|
106
|
-
class: "c-card__field-value",
|
|
107
|
-
copy: !1
|
|
108
|
-
}, null, 8, ["item", "col"]),
|
|
109
|
-
g(n, {
|
|
110
|
-
class: "c-card__field-copy click-expand",
|
|
111
|
-
value: w(s)(r, e)
|
|
112
|
-
}, null, 8, ["value"])
|
|
113
|
-
]))), 128)), a.config.actions ? (b(), m("div", {
|
|
114
|
-
key: 0,
|
|
115
|
-
class: "c-card__actions",
|
|
116
|
-
onClick: d[2] ||= D(() => {}, ["stop"])
|
|
117
|
-
}, [(b(!0), m(u, null, S(a.config.actions, (n, i) => (b(), m(u, { key: i }, [w(c)(n) ? (b(), f(t, v({
|
|
118
|
-
key: 0,
|
|
119
|
-
icon: n.icon,
|
|
120
|
-
label: n.label,
|
|
121
|
-
items: w(o)(n, r)
|
|
122
|
-
}, { ref_for: !0 }, n.config), null, 16, [
|
|
123
|
-
"icon",
|
|
124
|
-
"label",
|
|
125
|
-
"items"
|
|
126
|
-
])) : (b(), f(e, v({
|
|
127
|
-
key: 1,
|
|
128
|
-
type: n.type,
|
|
129
|
-
icon: n.icon,
|
|
130
|
-
label: n.cardLabel ?? n.label,
|
|
131
|
-
outline: "",
|
|
132
|
-
disabled: n.disabled ? n.disabled(r) : !1,
|
|
133
|
-
callback: () => n.callback(r)
|
|
134
|
-
}, { ref_for: !0 }, n.config), null, 16, [
|
|
135
|
-
"type",
|
|
136
|
-
"icon",
|
|
137
|
-
"label",
|
|
138
|
-
"disabled",
|
|
139
|
-
"callback"
|
|
140
|
-
]))], 64))), 128))])) : p("", !0)], 512), [[T, z.value.has(i)]])], 2))), 128))], 2))]));
|
|
141
|
-
}
|
|
142
|
-
});
|
|
1
|
+
//#region src/utils/objects.ts
|
|
2
|
+
function e(t, n) {
|
|
3
|
+
let r = { ...t };
|
|
4
|
+
for (let i in n) n[i] && typeof n[i] == "object" && !Array.isArray(n[i]) && i in t && typeof t[i] == "object" ? r[i] = e(t[i], n[i]) : r[i] = n[i];
|
|
5
|
+
return r;
|
|
6
|
+
}
|
|
143
7
|
//#endregion
|
|
144
|
-
export {
|
|
8
|
+
export { e as deepMerge };
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import e from "./admins-components5.js";
|
|
2
|
+
import t from "./admins-components26.js";
|
|
3
|
+
import { dataCardsSettingsDefaults as n, dataListSettingsDefaults as r, dataTableSettingsDefaults as i } from "./admins-components53.js";
|
|
4
|
+
import { deepMerge as ee } from "./admins-components64.js";
|
|
5
|
+
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, onMounted as h, openBlock as g, ref as _, renderList as v, resolveDirective as y, toDisplayString as b, withCtx as x, withDirectives as S, withModifiers as C } from "vue";
|
|
6
|
+
//#region src/components/data-table/DataListOptions.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var te = { class: "table-options" }, ne = { class: "table-options__col" }, re = { class: "table-options__list" }, ie = { class: "table-options__col" }, ae = { class: "table-options__title" }, oe = { class: "table-options__title-value" }, se = { class: "layout-switch" }, ce = { class: "table-options__col" }, le = { class: "table-options__title flex-center gap-1" }, ue = { class: "table-options__list" }, de = [
|
|
8
|
+
"draggable",
|
|
9
|
+
"onDragstart",
|
|
10
|
+
"onDragover",
|
|
11
|
+
"onClick"
|
|
12
|
+
], fe = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "fa-solid fa-grip-vertical table-options__drag-handle"
|
|
15
|
+
}, pe = ["onClick"], me = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "table-options__move-actions"
|
|
18
|
+
}, he = ["disabled"], w = ["disabled"], T = { class: "table-options__col" }, E = { class: "table-options__list" }, D = [
|
|
19
|
+
"draggable",
|
|
20
|
+
"onDragstart",
|
|
21
|
+
"onDragover",
|
|
22
|
+
"onClick"
|
|
23
|
+
], O = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "fa-solid fa-grip-vertical table-options__drag-handle"
|
|
26
|
+
}, k = ["onClick"], A = {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: "table-options__move-actions"
|
|
29
|
+
}, j = ["disabled"], M = ["disabled"], N = { class: "table-options__footer" }, P = /*@__PURE__*/ p({
|
|
30
|
+
__name: "DataListOptions",
|
|
31
|
+
props: {
|
|
32
|
+
open: { type: Boolean },
|
|
33
|
+
columns: {},
|
|
34
|
+
settings: {},
|
|
35
|
+
position: {},
|
|
36
|
+
storageKey: {},
|
|
37
|
+
orderable: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !1
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
emits: ["close", "change"],
|
|
43
|
+
setup(p, { emit: P }) {
|
|
44
|
+
let F = p, I = P, L = _(z()), R = o(() => `data-list-${F.storageKey}`), ge = o(() => JSON.stringify(L.value) !== JSON.stringify(z()));
|
|
45
|
+
function z() {
|
|
46
|
+
return {
|
|
47
|
+
...n,
|
|
48
|
+
...i,
|
|
49
|
+
...r,
|
|
50
|
+
...F.settings,
|
|
51
|
+
columns: Object.fromEntries(F.columns.map((e) => [e.property, F.settings.columns?.[e.property] ?? e.visible !== !1])),
|
|
52
|
+
cardHeaderColumns: Object.fromEntries(F.columns.map((e) => [e.property, F.settings.cardHeaderColumns?.[e.property] ?? e.primary === !0])),
|
|
53
|
+
columnOrder: F.settings.columnOrder ?? F.columns.map((e) => e.property),
|
|
54
|
+
cardHeaderOrder: F.settings.cardHeaderOrder ?? F.columns.map((e) => e.property)
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function _e() {
|
|
58
|
+
try {
|
|
59
|
+
let e = localStorage.getItem(R.value), t = z();
|
|
60
|
+
if (e) {
|
|
61
|
+
let n = JSON.parse(e);
|
|
62
|
+
L.value = n.settings ? ee(t, n.settings) : t;
|
|
63
|
+
} else L.value = t;
|
|
64
|
+
} catch {
|
|
65
|
+
L.value = z();
|
|
66
|
+
}
|
|
67
|
+
I("change", L.value);
|
|
68
|
+
}
|
|
69
|
+
function ve() {
|
|
70
|
+
try {
|
|
71
|
+
let e = R.value, t = localStorage.getItem(e), n = t ? JSON.parse(t) : {};
|
|
72
|
+
n.settings = L.value, localStorage.setItem(e, JSON.stringify(n));
|
|
73
|
+
} catch {}
|
|
74
|
+
I("change", L.value);
|
|
75
|
+
}
|
|
76
|
+
function B(e, t) {
|
|
77
|
+
L.value = {
|
|
78
|
+
...L.value,
|
|
79
|
+
[e]: t
|
|
80
|
+
}, ve();
|
|
81
|
+
}
|
|
82
|
+
function V(e) {
|
|
83
|
+
B("columns", {
|
|
84
|
+
...L.value.columns,
|
|
85
|
+
[e]: !L.value.columns[e]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function H(e) {
|
|
89
|
+
B("cardHeaderColumns", {
|
|
90
|
+
...L.value.cardHeaderColumns,
|
|
91
|
+
[e]: !L.value.cardHeaderColumns[e]
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function U(e) {
|
|
95
|
+
B(e, !L.value[e]);
|
|
96
|
+
}
|
|
97
|
+
function W(e, t) {
|
|
98
|
+
return [...e].sort((e, n) => {
|
|
99
|
+
let r = t.indexOf(e.property), i = t.indexOf(n.property);
|
|
100
|
+
return (r === -1 ? 999 : r) - (i === -1 ? 999 : i);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
let G = o(() => W(F.columns, L.value.columnOrder)), K = o(() => W(F.columns, L.value.cardHeaderOrder)), q = _(null), J = _(null), Y = _(null), X = _(null);
|
|
104
|
+
function ye(e) {
|
|
105
|
+
q.value = e;
|
|
106
|
+
}
|
|
107
|
+
function be(e, t) {
|
|
108
|
+
if (e.preventDefault(), q.value === null || q.value === t) return;
|
|
109
|
+
let n = [...L.value.columnOrder], r = n.splice(q.value, 1)[0];
|
|
110
|
+
r && (n.splice(t, 0, r), q.value = t, B("columnOrder", n));
|
|
111
|
+
}
|
|
112
|
+
function xe() {
|
|
113
|
+
q.value = null;
|
|
114
|
+
}
|
|
115
|
+
function Se(e) {
|
|
116
|
+
J.value = J.value === e ? null : e;
|
|
117
|
+
}
|
|
118
|
+
function Z(e) {
|
|
119
|
+
if (J.value === null) return;
|
|
120
|
+
let t = J.value + e;
|
|
121
|
+
if (t < 0 || t >= L.value.columnOrder.length) return;
|
|
122
|
+
let n = [...L.value.columnOrder], r = n[J.value];
|
|
123
|
+
n[J.value] = n[t], n[t] = r, B("columnOrder", n), J.value = t;
|
|
124
|
+
}
|
|
125
|
+
function Ce(e) {
|
|
126
|
+
Y.value = e;
|
|
127
|
+
}
|
|
128
|
+
function we(e, t) {
|
|
129
|
+
if (e.preventDefault(), Y.value === null || Y.value === t) return;
|
|
130
|
+
let n = [...L.value.cardHeaderOrder], r = n.splice(Y.value, 1)[0];
|
|
131
|
+
r && (n.splice(t, 0, r), Y.value = t, B("cardHeaderOrder", n));
|
|
132
|
+
}
|
|
133
|
+
function Q() {
|
|
134
|
+
Y.value = null;
|
|
135
|
+
}
|
|
136
|
+
function Te(e) {
|
|
137
|
+
X.value = X.value === e ? null : e;
|
|
138
|
+
}
|
|
139
|
+
function $(e) {
|
|
140
|
+
if (X.value === null) return;
|
|
141
|
+
let t = X.value + e;
|
|
142
|
+
if (t < 0 || t >= L.value.cardHeaderOrder.length) return;
|
|
143
|
+
let n = [...L.value.cardHeaderOrder], r = n[X.value];
|
|
144
|
+
n[X.value] = n[t], n[t] = r, B("cardHeaderOrder", n), X.value = t;
|
|
145
|
+
}
|
|
146
|
+
function Ee() {
|
|
147
|
+
localStorage.removeItem(R.value), L.value = z(), I("change", L.value);
|
|
148
|
+
}
|
|
149
|
+
return h(_e), (n, r) => {
|
|
150
|
+
let i = y("tooltip");
|
|
151
|
+
return g(), s(t, {
|
|
152
|
+
open: p.open,
|
|
153
|
+
title: "Lista beállítások",
|
|
154
|
+
position: F.position,
|
|
155
|
+
onClose: r[16] ||= (e) => I("close")
|
|
156
|
+
}, {
|
|
157
|
+
default: x(() => [u("div", te, [
|
|
158
|
+
u("div", ne, [r[19] ||= u("h4", { class: "table-options__title" }, "Megjelenés", -1), u("ul", re, [u("li", {
|
|
159
|
+
class: "table-options__item",
|
|
160
|
+
onClick: r[1] ||= (e) => U("compact"),
|
|
161
|
+
title: "A sorok közötti térköz csökkentése"
|
|
162
|
+
}, [u("span", {
|
|
163
|
+
class: m(["c-checkbox", { "c-checkbox--checked": L.value.compact }]),
|
|
164
|
+
onClick: r[0] ||= C((e) => U("compact"), ["stop"])
|
|
165
|
+
}, null, 2), r[17] ||= u("span", null, "Kompakt", -1)]), u("li", {
|
|
166
|
+
class: "table-options__item",
|
|
167
|
+
onClick: r[3] ||= (e) => U("striped"),
|
|
168
|
+
title: "A páros sorok háttere kicsit sötétebb (csak táblázat nézetben)"
|
|
169
|
+
}, [u("span", {
|
|
170
|
+
class: m(["c-checkbox", { "c-checkbox--checked": L.value.striped }]),
|
|
171
|
+
onClick: r[2] ||= C((e) => U("striped"), ["stop"])
|
|
172
|
+
}, null, 2), r[18] ||= u("span", null, "Sávos (striped)", -1)])])]),
|
|
173
|
+
u("div", ie, [u("h4", ae, [r[20] ||= d(" Elrendezés ", -1), u("span", oe, "— " + b(L.value.layout === "screen" ? "Auto" : L.value.layout === "table" ? "Táblázat" : "Kártyák"), 1)]), u("div", se, [
|
|
174
|
+
u("button", {
|
|
175
|
+
class: m(["layout-switch__btn", { "layout-switch__btn--active": L.value.layout === "screen" }]),
|
|
176
|
+
title: "Kijelző méretéhez igazodó elrendezés",
|
|
177
|
+
onClick: r[4] ||= (e) => B("layout", "screen")
|
|
178
|
+
}, [...r[21] ||= [u("i", { class: "fa-solid fa-display" }, null, -1)]], 2),
|
|
179
|
+
u("button", {
|
|
180
|
+
class: m(["layout-switch__btn", { "layout-switch__btn--active": L.value.layout === "table" }]),
|
|
181
|
+
title: "Táblázat nézet",
|
|
182
|
+
onClick: r[5] ||= (e) => B("layout", "table")
|
|
183
|
+
}, [...r[22] ||= [u("i", { class: "fa-solid fa-table-list" }, null, -1)]], 2),
|
|
184
|
+
u("button", {
|
|
185
|
+
class: m(["layout-switch__btn", { "layout-switch__btn--active": L.value.layout === "cards" }]),
|
|
186
|
+
title: "Kártya nézet",
|
|
187
|
+
onClick: r[6] ||= (e) => B("layout", "cards")
|
|
188
|
+
}, [...r[23] ||= [u("i", { class: "fa-solid fa-list" }, null, -1)]], 2)
|
|
189
|
+
])]),
|
|
190
|
+
u("div", ce, [
|
|
191
|
+
S((g(), l("h4", le, [...r[24] ||= [d(" Kártya fejléc ", -1), u("i", { class: "fa-regular fa-question-circle" }, null, -1)]])), [[i, "Kártya nézetben, a sorok fejlécén megjelenő oszlopok"]]),
|
|
192
|
+
u("ul", ue, [(g(!0), l(a, null, v(K.value, (e, t) => (g(), l("li", {
|
|
193
|
+
key: "ch-" + e.property,
|
|
194
|
+
class: m(["table-options__item", {
|
|
195
|
+
"table-options__item--disabled": e.primary,
|
|
196
|
+
"table-options__item--selected": p.orderable && X.value === t,
|
|
197
|
+
"table-options__item--dragging": p.orderable && Y.value === t
|
|
198
|
+
}]),
|
|
199
|
+
draggable: p.orderable,
|
|
200
|
+
onDragstart: C((e) => p.orderable && Ce(t), ["stop"]),
|
|
201
|
+
onDragover: C((e) => p.orderable && we(e, t), ["prevent"]),
|
|
202
|
+
onDrop: r[7] ||= C(() => {}, ["prevent"]),
|
|
203
|
+
onDragend: r[8] ||= (e) => p.orderable && Q(),
|
|
204
|
+
onClick: C((n) => p.orderable ? Te(t) : !e.primary && H(e.property), ["prevent"])
|
|
205
|
+
}, [p.orderable ? (g(), l("i", fe)) : c("", !0), u("span", {
|
|
206
|
+
class: "table-options__toggle",
|
|
207
|
+
onClick: C((t) => !e.primary && H(e.property), ["stop"])
|
|
208
|
+
}, [u("span", { class: m(["c-checkbox", { "c-checkbox--checked": L.value.cardHeaderColumns[e.property] }]) }, null, 2), u("span", null, b(e.label), 1)], 8, pe)], 42, de))), 128))]),
|
|
209
|
+
p.orderable && X.value !== null ? (g(), l("div", me, [u("button", {
|
|
210
|
+
class: "table-options__move-btn",
|
|
211
|
+
disabled: X.value === 0,
|
|
212
|
+
onClick: r[9] ||= (e) => $(-1)
|
|
213
|
+
}, [...r[25] ||= [u("i", { class: "fa-solid fa-arrow-up" }, null, -1)]], 8, he), u("button", {
|
|
214
|
+
class: "table-options__move-btn",
|
|
215
|
+
disabled: X.value === K.value.length - 1,
|
|
216
|
+
onClick: r[10] ||= (e) => $(1)
|
|
217
|
+
}, [...r[26] ||= [u("i", { class: "fa-solid fa-arrow-down" }, null, -1)]], 8, w)])) : c("", !0)
|
|
218
|
+
]),
|
|
219
|
+
u("div", T, [
|
|
220
|
+
r[29] ||= u("h4", { class: "table-options__title" }, "Oszlopok", -1),
|
|
221
|
+
u("ul", E, [(g(!0), l(a, null, v(G.value, (e, t) => (g(), l("li", {
|
|
222
|
+
key: e.property,
|
|
223
|
+
class: m(["table-options__item", {
|
|
224
|
+
"table-options__item--disabled": e.primary,
|
|
225
|
+
"table-options__item--selected": p.orderable && J.value === t,
|
|
226
|
+
"table-options__item--dragging": p.orderable && q.value === t
|
|
227
|
+
}]),
|
|
228
|
+
draggable: p.orderable,
|
|
229
|
+
onDragstart: C((e) => p.orderable && ye(t), ["stop"]),
|
|
230
|
+
onDragover: C((e) => p.orderable && be(e, t), ["prevent"]),
|
|
231
|
+
onDrop: r[11] ||= C(() => {}, ["prevent"]),
|
|
232
|
+
onDragend: r[12] ||= (e) => p.orderable && xe(),
|
|
233
|
+
onClick: C((n) => p.orderable ? Se(t) : !e.primary && V(e.property), ["prevent"])
|
|
234
|
+
}, [p.orderable ? (g(), l("i", O)) : c("", !0), u("span", {
|
|
235
|
+
class: "table-options__toggle",
|
|
236
|
+
onClick: C((t) => !e.primary && V(e.property), ["stop"])
|
|
237
|
+
}, [u("span", { class: m(["c-checkbox", { "c-checkbox--checked": L.value.columns[e.property] }]) }, null, 2), u("span", null, b(e.label), 1)], 8, k)], 42, D))), 128))]),
|
|
238
|
+
p.orderable && J.value !== null ? (g(), l("div", A, [u("button", {
|
|
239
|
+
class: "table-options__move-btn",
|
|
240
|
+
disabled: J.value === 0,
|
|
241
|
+
onClick: r[13] ||= (e) => Z(-1)
|
|
242
|
+
}, [...r[27] ||= [u("i", { class: "fa-solid fa-arrow-up" }, null, -1)]], 8, j), u("button", {
|
|
243
|
+
class: "table-options__move-btn",
|
|
244
|
+
disabled: J.value === G.value.length - 1,
|
|
245
|
+
onClick: r[14] ||= (e) => Z(1)
|
|
246
|
+
}, [...r[28] ||= [u("i", { class: "fa-solid fa-arrow-down" }, null, -1)]], 8, M)])) : c("", !0)
|
|
247
|
+
])
|
|
248
|
+
]), u("div", N, [f(e, {
|
|
249
|
+
icon: "fa-solid fa-triangle-exclamation",
|
|
250
|
+
disabled: !ge.value,
|
|
251
|
+
label: "Alapértelmezés visszaállítása",
|
|
252
|
+
size: "small",
|
|
253
|
+
onClick: Ee
|
|
254
|
+
}, null, 8, ["disabled"]), f(e, {
|
|
255
|
+
label: "OK",
|
|
256
|
+
onClick: r[15] ||= (e) => I("close")
|
|
257
|
+
})])]),
|
|
258
|
+
_: 1
|
|
259
|
+
}, 8, ["open", "position"]);
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
//#endregion
|
|
264
|
+
export { P as default };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
1
|
+
import './src/styles/components/data-table/data-list-options.scss_vue_type_style_index_0_src_true_lang.css';
|
|
2
|
+
import e from "./admins-components65.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/data-table/DataListOptions.vue
|
|
5
|
+
var t = e;
|
|
7
6
|
//#endregion
|
|
8
|
-
export {
|
|
7
|
+
export { t as default };
|