admins-components 9.0.9 → 9.0.11

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.
Files changed (92) hide show
  1. package/dist/admins-components.js +18 -17
  2. package/dist/admins-components100.js +250 -25
  3. package/dist/admins-components101.js +26 -27
  4. package/dist/admins-components102.js +25 -169
  5. package/dist/admins-components103.js +165 -61
  6. package/dist/admins-components104.js +61 -60
  7. package/dist/admins-components105.js +65 -28
  8. package/dist/admins-components106.js +28 -14
  9. package/dist/admins-components107.js +15 -26
  10. package/dist/admins-components108.js +26 -8
  11. package/dist/admins-components109.js +9 -4
  12. package/dist/admins-components110.js +4 -3
  13. package/dist/admins-components111.js +2 -2
  14. package/dist/admins-components112.js +3 -21
  15. package/dist/admins-components113.js +21 -14
  16. package/dist/admins-components114.js +14 -8
  17. package/dist/admins-components115.js +8 -13
  18. package/dist/admins-components116.js +11 -24
  19. package/dist/admins-components117.js +24 -81
  20. package/dist/admins-components118.js +82 -10
  21. package/dist/admins-components119.js +10 -4
  22. package/dist/admins-components120.js +5 -8
  23. package/dist/admins-components121.js +7 -6
  24. package/dist/admins-components122.js +6 -5
  25. package/dist/admins-components123.js +4 -13
  26. package/dist/admins-components124.js +11 -9
  27. package/dist/admins-components125.js +13 -30
  28. package/dist/admins-components126.js +30 -4
  29. package/dist/admins-components127.js +4 -29
  30. package/dist/admins-components128.js +29 -5
  31. package/dist/admins-components129.js +3 -3
  32. package/dist/admins-components13.js +1 -1
  33. package/dist/admins-components130.js +4 -7
  34. package/dist/admins-components131.js +7 -73
  35. package/dist/admins-components132.js +71 -26
  36. package/dist/admins-components133.js +27 -57
  37. package/dist/admins-components134.js +57 -22
  38. package/dist/admins-components135.js +21 -47
  39. package/dist/admins-components136.js +48 -29
  40. package/dist/admins-components137.js +31 -3
  41. package/dist/admins-components138.js +3 -179
  42. package/dist/admins-components139.js +176 -43
  43. package/dist/admins-components140.js +44 -35
  44. package/dist/admins-components141.js +34 -43
  45. package/dist/admins-components142.js +42 -137
  46. package/dist/admins-components143.js +134 -51
  47. package/dist/admins-components144.js +58 -7
  48. package/dist/admins-components145.js +6 -5
  49. package/dist/admins-components146.js +6 -76
  50. package/dist/admins-components147.js +76 -29
  51. package/dist/admins-components148.js +29 -1931
  52. package/dist/admins-components149.js +1748 -24628
  53. package/dist/admins-components15.js +9 -10
  54. package/dist/admins-components150.js +24810 -8
  55. package/dist/admins-components151.js +9 -7
  56. package/dist/admins-components152.js +7 -142
  57. package/dist/admins-components153.js +141 -8
  58. package/dist/admins-components154.js +3 -3
  59. package/dist/admins-components155.js +10 -0
  60. package/dist/admins-components157.js +161 -44
  61. package/dist/admins-components158.js +50 -8
  62. package/dist/admins-components159.js +8 -49
  63. package/dist/admins-components160.js +50 -6
  64. package/dist/admins-components161.js +6 -80
  65. package/dist/admins-components162.js +70 -48
  66. package/dist/admins-components163.js +30 -31
  67. package/dist/admins-components164.js +58 -8
  68. package/dist/admins-components165.js +8 -51
  69. package/dist/admins-components166.js +51 -8
  70. package/dist/admins-components167.js +10 -0
  71. package/dist/{admins-components168.js → admins-components169.js} +3 -3
  72. package/dist/admins-components18.js +90 -91
  73. package/dist/admins-components20.js +40 -40
  74. package/dist/admins-components46.js +1 -1
  75. package/dist/admins-components57.js +33 -26
  76. package/dist/admins-components59.js +44 -32
  77. package/dist/admins-components62.js +61 -43
  78. package/dist/admins-components66.js +32 -21
  79. package/dist/admins-components69.js +25 -17
  80. package/dist/admins-components77.js +4 -2
  81. package/dist/admins-components78.js +2 -2
  82. package/dist/admins-components87.js +126 -131
  83. package/dist/admins-components95.js +3 -3
  84. package/dist/admins-components98.js +19 -6
  85. package/dist/admins-components99.js +5 -250
  86. package/dist/base.css +1 -1
  87. package/dist/src/index.d.ts +1 -0
  88. package/dist/src/styles/components/data-table/data-cards.scss_vue_type_style_index_0_src_true_lang.css +1 -1
  89. package/dist/src/styles/components/data-table/data-list.scss_vue_type_style_index_0_src_true_lang.css +1 -1
  90. package/dist/src/styles/components/data-table/data-table.scss_vue_type_style_index_0_src_true_lang.css +1 -1
  91. package/package.json +1 -1
  92. package/dist/admins-components156.js +0 -169
@@ -10,10 +10,14 @@ import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d
10
10
  var E = { class: "c-table-wrapper ac-component" }, D = { key: 0 }, O = ["onClick"], k = {
11
11
  key: 1,
12
12
  class: "c-actions-header"
13
- }, A = ["onClick"], j = {
13
+ }, A = { key: 0 }, j = ["onClick"], M = {
14
14
  key: 1,
15
15
  class: "c-actions-cell"
16
- }, M = { class: "c-actions-wrap" }, N = /* @__PURE__ */ g({
16
+ }, N = { class: "c-actions-wrap" }, P = { key: 1 }, F = { class: "c-table__loading-row" }, I = ["colspan"], L = { class: "c-table__loading-wrap" }, R = {
17
+ key: 0,
18
+ class: "c-table__backdrop",
19
+ "aria-hidden": "true"
20
+ }, z = /* @__PURE__ */ g({
17
21
  __name: "DataTable",
18
22
  props: {
19
23
  config: {},
@@ -26,68 +30,67 @@ var E = { class: "c-table-wrapper ac-component" }, D = { key: 0 }, O = ["onClick
26
30
  },
27
31
  emits: ["selection-change", "sort-change"],
28
32
  setup(i, { emit: g }) {
29
- let N = i, P = g, F = x(null), { selectedKeys: I, allSelected: L, toggle: R, toggleAll: z } = r(() => N.items, () => N.config.selectableAttr, (e) => P("selection-change", e)), B = l(() => N.config.columns.filter((e) => e.visible !== !1));
30
- function V(e) {
31
- let t = F.value?.key === e && F.value.direction === "asc" ? "desc" : "asc";
32
- F.value = {
33
+ let z = i, B = g, V = x(null), { selectedKeys: H, allSelected: U, toggle: W, toggleAll: G } = r(() => z.items, () => z.config.selectableAttr, (e) => B("selection-change", e)), K = l(() => z.config.columns.filter((e) => e.visible !== !1));
34
+ function q(e) {
35
+ let t = V.value?.key === e && V.value.direction === "asc" ? "desc" : "asc";
36
+ V.value = {
33
37
  key: e,
34
38
  direction: t
35
- }, P("sort-change", {
39
+ }, B("sort-change", {
36
40
  key: e,
37
41
  direction: t
38
42
  });
39
43
  }
40
- return (r, l) => (b(), f("div", E, [i.loading ? (b(), u(n, {
41
- key: 0,
42
- loading: !0
43
- })) : (b(), f("table", {
44
- key: 1,
45
- class: v(["c-table", { "is-compact": i.settings.compact }]),
44
+ return (r, l) => (b(), f("div", E, [p("table", {
45
+ class: v(["c-table", {
46
+ "is-compact": i.settings.compact,
47
+ "is-loading": i.loading
48
+ }]),
46
49
  style: y({ "--action-count": i.config.actions?.length ?? 0 })
47
50
  }, [p("thead", null, [p("tr", null, [
48
51
  i.config.selectableAttr ? (b(), f("th", D, [p("span", {
49
- class: v(["c-checkbox", { "c-checkbox--checked": w(L) }]),
50
- onClick: l[0] ||= (...e) => w(z) && w(z)(...e)
52
+ class: v(["c-checkbox", { "c-checkbox--checked": w(U) }]),
53
+ onClick: l[0] ||= (...e) => w(G) && w(G)(...e)
51
54
  }, null, 2)])) : d("", !0),
52
- (b(!0), f(c, null, S(B.value, (e) => (b(), f("th", {
55
+ (b(!0), f(c, null, S(K.value, (e) => (b(), f("th", {
53
56
  key: e.property,
54
57
  class: v({
55
58
  "c-sortable": e.sort,
56
- "c-sortable--sorted": F.value?.key === e.property
59
+ "c-sortable--sorted": V.value?.key === e.property
57
60
  }),
58
- onClick: (t) => e.sort ? V(e.property) : void 0
61
+ onClick: (t) => e.sort ? q(e.property) : void 0
59
62
  }, [m(C(e.label) + " ", 1), e.sort ? (b(), f("span", {
60
63
  key: 0,
61
64
  class: v(["c-sort-icon fa-solid", {
62
- "fa-sort": F.value?.key !== e.property,
63
- "fa-sort-down": F.value?.key === e.property && F.value.direction === "desc",
64
- "fa-sort-up": F.value?.key === e.property && F.value.direction === "asc",
65
- "c-sort-icon--active": F.value?.key === e.property,
66
- "is-asc": F.value?.key === e.property && F.value.direction === "asc",
67
- "is-desc": F.value?.key === e.property && F.value.direction === "desc"
65
+ "fa-sort": V.value?.key !== e.property,
66
+ "fa-sort-down": V.value?.key === e.property && V.value.direction === "desc",
67
+ "fa-sort-up": V.value?.key === e.property && V.value.direction === "asc",
68
+ "c-sort-icon--active": V.value?.key === e.property,
69
+ "is-asc": V.value?.key === e.property && V.value.direction === "asc",
70
+ "is-desc": V.value?.key === e.property && V.value.direction === "desc"
68
71
  }])
69
72
  }, null, 2)) : d("", !0)], 10, O))), 128)),
70
73
  i.config.actions ? (b(), f("th", k, C(i.config.actionHeader ?? ""), 1)) : d("", !0)
71
- ])]), p("tbody", null, [(b(!0), f(c, null, S(i.items, (n, r) => (b(), f("tr", {
74
+ ])]), !i.loading || i.items.length > 0 ? (b(), f("tbody", A, [(b(!0), f(c, null, S(i.items, (n, r) => (b(), f("tr", {
72
75
  key: r,
73
76
  class: v({
74
- "is-selected": i.config.selectableAttr && w(I).has(n[i.config.selectableAttr]),
77
+ "is-selected": i.config.selectableAttr && w(H).has(n[i.config.selectableAttr]),
75
78
  "is-striped": i.settings.striped && r % 2 == 1
76
79
  })
77
80
  }, [
78
81
  i.config.selectableAttr ? (b(), f("td", {
79
82
  key: 0,
80
83
  class: "pointer",
81
- onClick: T((e) => w(R)(n), ["stop"])
82
- }, [p("span", { class: v(["c-checkbox", { "c-checkbox--checked": w(I).has(n[i.config.selectableAttr]) }]) }, null, 2)], 8, A)) : d("", !0),
83
- (b(!0), f(c, null, S(B.value, (e) => (b(), f("td", {
84
+ onClick: T((e) => w(W)(n), ["stop"])
85
+ }, [p("span", { class: v(["c-checkbox", { "c-checkbox--checked": w(H).has(n[i.config.selectableAttr]) }]) }, null, 2)], 8, j)) : d("", !0),
86
+ (b(!0), f(c, null, S(K.value, (e) => (b(), f("td", {
84
87
  key: e.property,
85
88
  class: v(["c-table__cell", [e.class]])
86
89
  }, [h(s, {
87
90
  item: n,
88
91
  col: e
89
92
  }, null, 8, ["item", "col"])], 2))), 128)),
90
- i.config.actions ? (b(), f("td", j, [p("div", M, [(b(!0), f(c, null, S(i.config.actions, (r, i) => (b(), f(c, { key: i }, [w(o)(r) ? (b(), u(t, _({
93
+ i.config.actions ? (b(), f("td", M, [p("div", N, [(b(!0), f(c, null, S(i.config.actions, (r, i) => (b(), f(c, { key: i }, [w(o)(r) ? (b(), u(t, _({
91
94
  key: 0,
92
95
  icon: r.icon,
93
96
  label: r.label,
@@ -115,8 +118,17 @@ var E = { class: "c-table-wrapper ac-component" }, D = { key: 0 }, O = ["onClick
115
118
  "ariaLabel",
116
119
  "callback"
117
120
  ]))], 64))), 128))])])) : d("", !0)
118
- ], 2))), 128))])], 6))]));
121
+ ], 2))), 128))])) : (b(), f("tbody", P, [p("tr", F, [p("td", {
122
+ colspan: K.value.length + +!!i.config.selectableAttr + +!!i.config.actions,
123
+ class: "c-table__loading-cell"
124
+ }, [p("div", L, [h(n, {
125
+ loading: !0,
126
+ size: "2.5rem"
127
+ })])], 8, I)])]))], 6), i.loading && i.items.length > 0 ? (b(), f("div", R, [h(n, {
128
+ loading: !0,
129
+ size: "2.5rem"
130
+ })])) : d("", !0)]));
119
131
  }
120
132
  });
121
133
  //#endregion
122
- export { N as default };
134
+ export { z as default };
@@ -6,9 +6,16 @@ import { useSelection as i } from "./admins-components53.js";
6
6
  import { dataCardsSettingsDefaults as a } from "./admins-components54.js";
7
7
  import { buildActionGroupMenuItems as o, getColumnValue as s, isActionGroup as c } from "./admins-components55.js";
8
8
  import l from "./admins-components58.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";
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, watch as E, withDirectives as D, withModifiers as O } from "vue";
10
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__ */ _({
11
+ var k = ["onClick", "onPointerdown"], A = ["onClick"], j = { class: "c-card__heading" }, M = { class: "c-card__label" }, N = ["innerHTML"], P = { class: "c-card__body" }, F = { class: "c-card__field-label" }, I = {
12
+ key: 1,
13
+ class: "c-cards__loading-wrap"
14
+ }, L = {
15
+ key: 2,
16
+ class: "c-cards__backdrop",
17
+ "aria-hidden": "true"
18
+ }, R = /* @__PURE__ */ _({
12
19
  __name: "DataCards",
13
20
  props: {
14
21
  config: {},
@@ -21,10 +28,14 @@ var O = { class: "ac-component" }, k = ["onClick", "onPointerdown"], A = ["onCli
21
28
  },
22
29
  emits: ["selection-change"],
23
30
  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;
31
+ let R = a, z = _, { selectedKeys: B, toggle: V } = i(() => R.items, () => R.config.selectableAttr, (e) => z("selection-change", e)), H = x(/* @__PURE__ */ new Set());
32
+ E(() => R.items, () => {
33
+ H.value = /* @__PURE__ */ new Set();
34
+ });
35
+ let U = d(() => R.config.columns.filter((e) => e.visible !== !1)), W = d(() => {
36
+ let e = R.settings;
26
37
  if (e?.cardHeaderColumns) {
27
- let t = B.value.filter((t) => e.cardHeaderColumns[t.property]);
38
+ let t = U.value.filter((t) => e.cardHeaderColumns[t.property]);
28
39
  if (t.length > 0) {
29
40
  if (e.cardHeaderOrder) {
30
41
  let n = e.cardHeaderOrder;
@@ -36,84 +47,85 @@ var O = { class: "ac-component" }, k = ["onClick", "onPointerdown"], A = ["onCli
36
47
  return t;
37
48
  }
38
49
  }
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);
50
+ let t = U.value.filter((e) => e.primary);
51
+ return t.length > 0 ? t : U.value.slice(0, 1);
52
+ }), G = null, K = !1;
53
+ function q(e, t) {
54
+ R.config.selectableAttr && e.button === 0 && (K = !1, G = setTimeout(() => {
55
+ K = !0, V(t);
45
56
  }, 500));
46
57
  }
47
- function G() {
48
- H &&= (clearTimeout(H), null);
58
+ function J() {
59
+ G &&= (clearTimeout(G), null);
49
60
  }
50
- function K(e) {
51
- U && e.preventDefault();
61
+ function Y(e) {
62
+ K && e.preventDefault();
52
63
  }
53
- function q(e) {
54
- if (U) {
55
- U = !1;
64
+ function X(e) {
65
+ if (K) {
66
+ K = !1;
56
67
  return;
57
68
  }
58
- J(e);
69
+ Z(e);
59
70
  }
60
- function J(e) {
61
- z.value.has(e) ? z.value.delete(e) : z.value.add(e), z.value = new Set(z.value);
71
+ function Z(e) {
72
+ H.value.has(e) ? H.value.delete(e) : H.value.add(e), H.value = new Set(H.value);
62
73
  }
63
- return (i, d) => (b(), m("div", O, [a.loading ? (b(), f(r, {
74
+ return (i, d) => (b(), m("div", { class: y(["ac-component", { "is-loading": a.loading }]) }, [!a.loading || a.items.length > 0 ? (b(), m("div", {
64
75
  key: 0,
65
- loading: !0
66
- })) : (b(), m("div", {
67
- key: 1,
68
76
  class: y(["c-cards", { "is-compact": a.settings.compact }])
69
77
  }, [(b(!0), m(u, null, S(a.items, (r, i) => (b(), m("div", {
70
78
  key: i,
71
79
  class: y(["c-card", {
72
- "is-open": z.value.has(i),
73
- "is-selected": a.config.selectableAttr && w(L).has(r[a.config.selectableAttr])
80
+ "is-open": H.value.has(i),
81
+ "is-selected": a.config.selectableAttr && w(B).has(r[a.config.selectableAttr])
74
82
  }])
75
83
  }, [h("button", {
76
84
  type: "button",
77
85
  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
86
+ onClick: (e) => X(i),
87
+ onPointerdown: (e) => q(e, r),
88
+ onPointerup: d[0] ||= (e) => J(),
89
+ onPointerleave: d[1] ||= (e) => J(),
90
+ onContextmenu: Y
83
91
  }, [
84
92
  a.config.selectableAttr ? (b(), m("span", {
85
93
  key: 0,
86
94
  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", {
95
+ onClick: O((e) => w(V)(r), ["stop"])
96
+ }, [h("span", { class: y(["c-card__check", { "is-checked": w(B).has(r[a.config.selectableAttr]) }]) }, [...d[3] ||= [h("i", { class: "fa-solid fa-check" }, null, -1)]], 2)], 8, A)) : p("", !0),
97
+ h("span", j, [(b(!0), m(u, null, S(W.value, (e, t) => (b(), m("span", {
90
98
  key: e.property,
91
99
  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))]),
100
+ }, [h("span", M, C(e.label), 1), h("span", {
101
+ class: y(["c-card__title", { "c-truncate": a.settings.compact && t === 0 }]),
102
+ innerHTML: w(s)(r, e)
103
+ }, null, 10, N)]))), 128))]),
93
104
  d[4] ||= h("span", {
94
105
  class: "c-card__icon",
95
106
  "aria-hidden": "true"
96
107
  }, [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", {
108
+ ], 40, k), D(h("div", P, [(b(!0), m(u, null, S(U.value, (e) => (b(), m("div", {
98
109
  key: e.property,
99
110
  class: "c-card__field",
100
111
  tabindex: "0"
101
112
  }, [
102
- h("span", P, C(e.label), 1),
113
+ h("span", F, C(e.label), 1),
103
114
  g(l, {
104
115
  item: r,
105
116
  col: e,
106
117
  class: "c-card__field-value",
107
118
  copy: !1
108
119
  }, null, 8, ["item", "col"]),
109
- g(n, {
120
+ w(s)(r, e) ? (b(), f(n, {
121
+ key: 0,
110
122
  class: "c-card__field-copy click-expand",
111
123
  value: w(s)(r, e)
112
- }, null, 8, ["value"])
124
+ }, null, 8, ["value"])) : p("", !0)
113
125
  ]))), 128)), a.config.actions ? (b(), m("div", {
114
126
  key: 0,
115
127
  class: "c-card__actions",
116
- onClick: d[2] ||= D(() => {}, ["stop"])
128
+ onClick: d[2] ||= O(() => {}, ["stop"])
117
129
  }, [(b(!0), m(u, null, S(a.config.actions, (n, i) => (b(), m(u, { key: i }, [w(c)(n) ? (b(), f(t, v({
118
130
  key: 0,
119
131
  icon: n.icon,
@@ -141,8 +153,14 @@ var O = { class: "ac-component" }, k = ["onClick", "onPointerdown"], A = ["onCli
141
153
  "ariaLabel",
142
154
  "disabled",
143
155
  "callback"
144
- ]))], 64))), 128))])) : p("", !0)], 512), [[T, z.value.has(i)]])], 2))), 128))], 2))]));
156
+ ]))], 64))), 128))])) : p("", !0)], 512), [[T, H.value.has(i)]])], 2))), 128))], 2)) : (b(), m("div", I, [g(r, {
157
+ loading: !0,
158
+ size: "2.5rem"
159
+ })])), a.loading && a.items.length > 0 ? (b(), m("div", L, [g(r, {
160
+ loading: !0,
161
+ size: "2.5rem"
162
+ })])) : p("", !0)], 2));
145
163
  }
146
164
  });
147
165
  //#endregion
148
- export { F as default };
166
+ export { R as default };
@@ -59,14 +59,25 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
59
59
  let e = localStorage.getItem(R.value), t = z();
60
60
  if (e) {
61
61
  let n = JSON.parse(e);
62
- L.value = n.settings ? ee(t, n.settings) : t;
62
+ L.value = n.settings ? ve(ee(t, n.settings), F.columns) : t;
63
63
  } else L.value = t;
64
64
  } catch {
65
65
  L.value = z();
66
66
  }
67
67
  I("change", L.value);
68
68
  }
69
- function ve() {
69
+ function ve(e, t) {
70
+ let n = t.map((e) => e.property), r = (e) => {
71
+ let t = new Set(n), r = (e ?? []).filter((e) => t.has(e)), i = n.filter((e) => !r.includes(e));
72
+ return [...r, ...i];
73
+ };
74
+ return {
75
+ ...e,
76
+ columnOrder: r(e.columnOrder),
77
+ cardHeaderOrder: r(e.cardHeaderOrder)
78
+ };
79
+ }
80
+ function ye() {
70
81
  try {
71
82
  let e = R.value, t = localStorage.getItem(e), n = t ? JSON.parse(t) : {};
72
83
  n.settings = L.value, localStorage.setItem(e, JSON.stringify(n));
@@ -77,7 +88,7 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
77
88
  L.value = {
78
89
  ...L.value,
79
90
  [e]: t
80
- }, ve();
91
+ }, ye();
81
92
  }
82
93
  function V(e) {
83
94
  B("columns", {
@@ -101,18 +112,18 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
101
112
  });
102
113
  }
103
114
  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) {
115
+ function be(e) {
105
116
  q.value = e;
106
117
  }
107
- function be(e, t) {
118
+ function xe(e, t) {
108
119
  if (e.preventDefault(), q.value === null || q.value === t) return;
109
120
  let n = [...L.value.columnOrder], r = n.splice(q.value, 1)[0];
110
121
  r && (n.splice(t, 0, r), q.value = t, B("columnOrder", n));
111
122
  }
112
- function xe() {
123
+ function Se() {
113
124
  q.value = null;
114
125
  }
115
- function Se(e) {
126
+ function Ce(e) {
116
127
  J.value = J.value === e ? null : e;
117
128
  }
118
129
  function Z(e) {
@@ -122,18 +133,18 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
122
133
  let n = [...L.value.columnOrder], r = n[J.value];
123
134
  n[J.value] = n[t], n[t] = r, B("columnOrder", n), J.value = t;
124
135
  }
125
- function Ce(e) {
136
+ function we(e) {
126
137
  Y.value = e;
127
138
  }
128
- function we(e, t) {
139
+ function Q(e, t) {
129
140
  if (e.preventDefault(), Y.value === null || Y.value === t) return;
130
141
  let n = [...L.value.cardHeaderOrder], r = n.splice(Y.value, 1)[0];
131
142
  r && (n.splice(t, 0, r), Y.value = t, B("cardHeaderOrder", n));
132
143
  }
133
- function Q() {
144
+ function Te() {
134
145
  Y.value = null;
135
146
  }
136
- function Te(e) {
147
+ function Ee(e) {
137
148
  X.value = X.value === e ? null : e;
138
149
  }
139
150
  function $(e) {
@@ -143,7 +154,7 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
143
154
  let n = [...L.value.cardHeaderOrder], r = n[X.value];
144
155
  n[X.value] = n[t], n[t] = r, B("cardHeaderOrder", n), X.value = t;
145
156
  }
146
- function Ee() {
157
+ function De() {
147
158
  localStorage.removeItem(R.value), L.value = z(), I("change", L.value);
148
159
  }
149
160
  return h(_e), (n, r) => {
@@ -197,11 +208,11 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
197
208
  "table-options__item--dragging": p.orderable && Y.value === t
198
209
  }]),
199
210
  draggable: p.orderable,
200
- onDragstart: C((e) => p.orderable && Ce(t), ["stop"]),
201
- onDragover: C((e) => p.orderable && we(e, t), ["prevent"]),
211
+ onDragstart: C((e) => p.orderable && we(t), ["stop"]),
212
+ onDragover: C((e) => p.orderable && Q(e, t), ["prevent"]),
202
213
  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"])
214
+ onDragend: r[8] ||= (e) => p.orderable && Te(),
215
+ onClick: C((n) => p.orderable ? Ee(t) : !e.primary && H(e.property), ["prevent"])
205
216
  }, [p.orderable ? (g(), l("i", fe)) : c("", !0), u("span", {
206
217
  class: "table-options__toggle",
207
218
  onClick: C((t) => !e.primary && H(e.property), ["stop"])
@@ -226,11 +237,11 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
226
237
  "table-options__item--dragging": p.orderable && q.value === t
227
238
  }]),
228
239
  draggable: p.orderable,
229
- onDragstart: C((e) => p.orderable && ye(t), ["stop"]),
230
- onDragover: C((e) => p.orderable && be(e, t), ["prevent"]),
240
+ onDragstart: C((e) => p.orderable && be(t), ["stop"]),
241
+ onDragover: C((e) => p.orderable && xe(e, t), ["prevent"]),
231
242
  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"])
243
+ onDragend: r[12] ||= (e) => p.orderable && Se(),
244
+ onClick: C((n) => p.orderable ? Ce(t) : !e.primary && V(e.property), ["prevent"])
234
245
  }, [p.orderable ? (g(), l("i", O)) : c("", !0), u("span", {
235
246
  class: "table-options__toggle",
236
247
  onClick: C((t) => !e.primary && V(e.property), ["stop"])
@@ -250,7 +261,7 @@ var te = { class: "table-options" }, ne = { class: "table-options__col" }, re =
250
261
  disabled: !ge.value,
251
262
  label: "Alapértelmezés visszaállítása",
252
263
  size: "small",
253
- onClick: Ee
264
+ onClick: De
254
265
  }, null, 8, ["disabled"]), f(e, {
255
266
  label: "OK",
256
267
  onClick: r[15] ||= (e) => I("close")
@@ -45,27 +45,35 @@ var E = /* @__PURE__ */ o({
45
45
  } catch {}
46
46
  }
47
47
  let O = n(() => Math.max(1, Math.ceil(T.settings.total / T.settings.pageSize))), k = n(() => T.settings.total === 0 ? 0 : (T.settings.page - 1) * T.settings.pageSize + 1), A = n(() => Math.min(T.settings.page * T.settings.pageSize, T.settings.total)), j = n(() => {
48
- let e = O.value, t = T.settings.page, n = [];
49
- if (e <= 7) {
50
- for (let t = 1; t <= e; t++) n.push(t);
51
- return n;
48
+ let e = O.value, t = T.settings.page;
49
+ if (e <= M) {
50
+ let t = [];
51
+ for (let n = 1; n <= e; n++) t.push(n);
52
+ return t;
52
53
  }
53
- n.push(1), t > 3 && n.push("...");
54
- let r = Math.max(2, t - 1), i = Math.min(e - 1, t + 1);
55
- for (let e = r; e <= i; e++) n.push(e);
56
- return t < e - 2 && n.push("..."), n.push(e), n;
57
- });
58
- function M(e) {
54
+ let n = M - 2, r = t - 1, i = t + 1;
55
+ for (r < 2 && (i = Math.min(e - 1, i + (2 - r)), r = 2), i > e - 1 && (r = Math.max(2, r - (i - (e - 1))), i = e - 1); i - r + 1 < n;) {
56
+ let t = r > 2, a = i < e - 1;
57
+ if (!t && !a) break;
58
+ let o = r - 2, s = e - 1 - i, c = +((t ? r - 1 : 0) > 2) + +(i < e - 1), l = +(r > 2) + +((a ? i + 1 : 0) < e - 1), u = i - r + 2, d = !1;
59
+ if (t && (o >= s || !a) && u + c <= n ? (r--, d = !0) : a && u + l <= n && (i++, d = !0), !d) break;
60
+ }
61
+ let a = r > 2, o = i < e - 1, s = [];
62
+ s.push(1), a && s.push("...");
63
+ for (let e = r; e <= i; e++) s.push(e);
64
+ return o && s.push("..."), s.push(e), s;
65
+ }), M = 7;
66
+ function N(e) {
59
67
  let t = T.settings.page, n = O.value, r = e === 1 || e === n, i = e === t;
60
68
  return t > 3 && t < n - 2 && !r && !i;
61
69
  }
62
- function N(e) {
70
+ function P(e) {
63
71
  e < 1 || e > O.value || e === T.settings.page || E("update:pagination", {
64
72
  page: e,
65
73
  pageSize: T.settings.pageSize
66
74
  });
67
75
  }
68
- function P(e) {
76
+ function F(e) {
69
77
  let t = Number(e.target.value);
70
78
  D(t), E("update:pagination", {
71
79
  page: 1,
@@ -79,28 +87,28 @@ var E = /* @__PURE__ */ o({
79
87
  icon: "fa-solid fa-chevron-left",
80
88
  rel: "prev",
81
89
  disabled: o.settings.page <= 1,
82
- callback: () => N(o.settings.page - 1)
90
+ callback: () => P(o.settings.page - 1)
83
91
  }, null, 8, ["disabled", "callback"]),
84
92
  (c(!0), r(t, null, l(j.value, (e, n) => (c(), r(t, { key: n }, [e === "..." ? (c(), r("span", _, "…")) : (c(), r("button", {
85
93
  key: 1,
86
94
  type: "button",
87
95
  class: s(["c-paginator__page", {
88
96
  "is-active": e === o.settings.page,
89
- "is-hidden-sm": M(e)
97
+ "is-hidden-sm": N(e)
90
98
  }]),
91
- onClick: (t) => N(e)
99
+ onClick: (t) => P(e)
92
100
  }, u(e), 11, v))], 64))), 128)),
93
101
  a(e, {
94
102
  icon: "fa-solid fa-chevron-right",
95
103
  rel: "next",
96
104
  disabled: o.settings.page >= O.value,
97
- callback: () => N(o.settings.page + 1)
105
+ callback: () => P(o.settings.page + 1)
98
106
  }, null, 8, ["disabled", "callback"])
99
107
  ]),
100
108
  i("div", y, [i("select", {
101
109
  class: "c-paginator__select",
102
110
  value: o.settings.pageSize,
103
- onChange: P
111
+ onChange: F
104
112
  }, [(c(), r(t, null, l(S, (e) => i("option", {
105
113
  key: e,
106
114
  value: e
@@ -1,7 +1,9 @@
1
1
  import { parseDropdownValue as e } from "./admins-components72.js";
2
2
  //#region src/utils/filterUrlSync.ts
3
3
  function t(e) {
4
- let t = new URLSearchParams(window.location.search), r = {};
4
+ let t = new URLSearchParams(window.location.search);
5
+ if (!window.location.search) return null;
6
+ let r = {};
5
7
  for (let i of e) {
6
8
  if (i.type === "separator") continue;
7
9
  let e = t.get(i.key);
@@ -44,4 +46,4 @@ function a(e, t) {
44
46
  window.history.replaceState(null, "", i);
45
47
  }
46
48
  //#endregion
47
- export { t as getFilterParams, i as readFilterParams, a as writeFilterParams };
49
+ export { t as getFilterParams, i as readUrlFilterParams, a as writeFilterParams };
@@ -6,7 +6,7 @@ import i from "./admins-components22.js";
6
6
  import a from "./admins-components27.js";
7
7
  import o from "./admins-components75.js";
8
8
  import { debounce as s } from "./admins-components76.js";
9
- import { readFilterParams as c, writeFilterParams as l } from "./admins-components77.js";
9
+ import { readUrlFilterParams as c, writeFilterParams as l } from "./admins-components77.js";
10
10
  import { Fragment as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as h, defineComponent as g, mergeProps as _, normalizeClass as v, onMounted as y, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, watch as T, withCtx as E } from "vue";
11
11
  //#region src/components/data-table/DataFilters.vue?vue&type=script&setup=true&lang.ts
12
12
  var D = { class: "data-filters" }, O = {
@@ -81,7 +81,7 @@ var D = { class: "data-filters" }, O = {
81
81
  y(() => {
82
82
  if (!L.handleUrl) return;
83
83
  let e = c(L.items);
84
- console.log(e), Object.keys(e).length > 0 && (z.value = {
84
+ Object.keys(e).length > 0 && (z.value = {
85
85
  ...z.value,
86
86
  ...e
87
87
  });