@milaboratories/uikit 2.2.94 → 2.2.96

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 (61) hide show
  1. package/.turbo/turbo-build.log +30 -25
  2. package/.turbo/turbo-type-check.log +1 -1
  3. package/CHANGELOG.md +15 -0
  4. package/dist/components/DataTable/TableComponent.vue.js +1 -1
  5. package/dist/components/PlAccordion/PlAccordionSection.vue2.js +21 -21
  6. package/dist/components/PlAccordion/PlAccordionSection.vue2.js.map +1 -1
  7. package/dist/components/PlAutocomplete/PlAutocomplete.vue.js.map +1 -1
  8. package/dist/components/PlDropdown/OptionList.vue.d.ts +77 -0
  9. package/dist/components/PlDropdown/OptionList.vue.d.ts.map +1 -0
  10. package/dist/components/PlDropdown/OptionList.vue.js +88 -0
  11. package/dist/components/PlDropdown/OptionList.vue.js.map +1 -0
  12. package/dist/components/PlDropdown/OptionList.vue2.js +5 -0
  13. package/dist/components/PlDropdown/OptionList.vue2.js.map +1 -0
  14. package/dist/components/PlDropdown/PlDropdown.vue.d.ts.map +1 -1
  15. package/dist/components/PlDropdown/PlDropdown.vue.js +110 -122
  16. package/dist/components/PlDropdown/PlDropdown.vue.js.map +1 -1
  17. package/dist/components/PlDropdown/types.d.ts +7 -0
  18. package/dist/components/PlDropdown/types.d.ts.map +1 -0
  19. package/dist/components/PlDropdown/useGroupBy.d.ts +7 -0
  20. package/dist/components/PlDropdown/useGroupBy.d.ts.map +1 -0
  21. package/dist/components/PlDropdown/useGroupBy.js +36 -0
  22. package/dist/components/PlDropdown/useGroupBy.js.map +1 -0
  23. package/dist/components/PlDropdownRef/PlDropdownRef.vue.d.ts +1 -1
  24. package/dist/components/PlDropdownRef/PlDropdownRef.vue.d.ts.map +1 -1
  25. package/dist/components/PlDropdownRef/PlDropdownRef.vue.js +11 -10
  26. package/dist/components/PlDropdownRef/PlDropdownRef.vue.js.map +1 -1
  27. package/dist/components/PlElementList/PlElementList.vue.d.ts +19 -19
  28. package/dist/components/PlElementList/PlElementList.vue.d.ts.map +1 -1
  29. package/dist/components/PlElementList/PlElementList.vue2.js +145 -133
  30. package/dist/components/PlElementList/PlElementList.vue2.js.map +1 -1
  31. package/dist/components/PlElementList/PlElementListItem.vue2.js.map +1 -1
  32. package/dist/components/PlElementList/PlElementListItem.vue3.js +33 -33
  33. package/dist/components/PlSlideModal/PlSlideModal.vue.js +1 -1
  34. package/dist/helpers/utils.d.ts +1 -0
  35. package/dist/helpers/utils.d.ts.map +1 -1
  36. package/dist/helpers/utils.js +2 -1
  37. package/dist/helpers/utils.js.map +1 -1
  38. package/dist/sdk/model/dist/index.js +1 -1
  39. package/dist/sdk/model/dist/index.js.map +1 -1
  40. package/dist/types.d.ts +4 -14
  41. package/dist/types.d.ts.map +1 -1
  42. package/dist/utils/TextLabel.vue.d.ts +18 -0
  43. package/dist/utils/TextLabel.vue.d.ts.map +1 -0
  44. package/dist/utils/TextLabel.vue.js +26 -0
  45. package/dist/utils/TextLabel.vue.js.map +1 -0
  46. package/dist/utils/TextLabel.vue2.js +13 -0
  47. package/dist/utils/TextLabel.vue2.js.map +1 -0
  48. package/package.json +4 -4
  49. package/src/components/PlAccordion/PlAccordionSection.vue +3 -3
  50. package/src/components/PlAutocomplete/PlAutocomplete.vue +1 -1
  51. package/src/components/PlDropdown/OptionList.vue +71 -0
  52. package/src/components/PlDropdown/PlDropdown.vue +29 -25
  53. package/src/components/PlDropdown/pl-dropdown.scss +4 -0
  54. package/src/components/PlDropdown/types.ts +3 -0
  55. package/src/components/PlDropdown/useGroupBy.ts +63 -0
  56. package/src/components/PlDropdownRef/PlDropdownRef.vue +1 -0
  57. package/src/components/PlElementList/PlElementList.vue +81 -70
  58. package/src/components/PlElementList/PlElementListItem.vue +2 -2
  59. package/src/helpers/utils.ts +1 -0
  60. package/src/types.ts +5 -15
  61. package/src/utils/TextLabel.vue +43 -0
@@ -1,15 +1,15 @@
1
- import { defineComponent as ce, mergeModels as X, useModel as u, useSlots as ve, computed as g, shallowRef as C, watch as me, createElementBlock as P, openBlock as b, normalizeClass as R, createElementVNode as be, createCommentVNode as ye, Fragment as Y, renderList as Z, createBlock as _, createSlots as ee, withCtx as S, renderSlot as k } from "vue";
2
- import { isNil as c, shallowHash as te } from "../../lib/util/helpers/dist/index.js";
1
+ import { defineComponent as me, mergeModels as X, useModel as u, useSlots as de, computed as c, shallowRef as T, watch as ve, createElementBlock as P, openBlock as v, normalizeClass as R, createElementVNode as be, createCommentVNode as ye, Fragment as Y, renderList as Z, createBlock as x, createSlots as _, withCtx as S, renderSlot as C } from "vue";
2
+ import { shallowHash as ee, isNil as b } from "../../lib/util/helpers/dist/index.js";
3
3
  import { useSortable as he } from "../../node_modules/.pnpm/@vueuse_integrations@13.3.0_axios@1.8.1_focus-trap@7.6.0_sortablejs@1.15.6_vue@3.5.13_typescript@5.6.3_/node_modules/@vueuse/integrations/useSortable.js";
4
- import { optionalUpdateRef as v, moveElements as ae } from "./utils.js";
5
- import ne from "./PlElementListItem.vue.js";
6
- const ke = /* @__PURE__ */ ce({
4
+ import { optionalUpdateRef as m, moveElements as te } from "./utils.js";
5
+ import ae from "./PlElementListItem.vue.js";
6
+ const Ce = /* @__PURE__ */ me({
7
7
  __name: "PlElementList",
8
8
  props: /* @__PURE__ */ X({
9
+ getItemKey: {},
9
10
  itemClass: { type: [String, Array, Function], default: void 0 },
10
11
  activeItems: { default: void 0 },
11
12
  enableDragging: { type: Boolean, default: void 0 },
12
- getItemKey: { type: Function, default: void 0 },
13
13
  onDragEnd: { type: Function, default: void 0 },
14
14
  onSort: { type: Function, default: void 0 },
15
15
  enableExpanding: { type: Boolean, default: void 0 },
@@ -41,189 +41,201 @@ const ke = /* @__PURE__ */ ce({
41
41
  toggledItemsModifiers: {}
42
42
  }),
43
43
  emits: /* @__PURE__ */ X(["itemClick"], ["update:items", "update:draggableItems", "update:removableItems", "update:expandableItems", "update:expandedItems", "update:pinnableItems", "update:pinnedItems", "update:toggableItems", "update:toggledItems"]),
44
- setup(o, { emit: le }) {
45
- const d = u(o, "items"), se = u(o, "draggableItems"), ie = u(o, "removableItems"), oe = u(o, "expandableItems"), y = u(o, "expandedItems"), re = u(o, "pinnableItems"), r = u(o, "pinnedItems"), ue = u(o, "toggableItems"), f = u(o, "toggledItems"), n = o, I = le, T = ve(), D = g(() => n.enableDragging !== !1 && !c(n.getItemKey)), h = g(() => d.value.filter(E)), de = g(() => h.value.length > 0), p = g(() => d.value.filter((e) => !E(e))), $ = g(() => p.value.length > 0), x = C(), w = C(), F = C(), M = g((e) => {
46
- const t = te(...d.value);
47
- if (x.value === void 0) return e ?? t;
48
- const a = te(...x.value);
49
- return t === a ? e ?? t : e !== t ? t : a;
44
+ setup(i, { emit: le }) {
45
+ const f = u(i, "items"), se = u(i, "draggableItems"), oe = u(i, "removableItems"), ne = u(i, "expandableItems"), y = u(i, "expandedItems"), ie = u(i, "pinnableItems"), r = u(i, "pinnedItems"), re = u(i, "toggableItems"), g = u(i, "toggledItems"), s = i, D = le, I = de(), $ = c(() => s.enableDragging !== !1), h = c(() => f.value.filter(E)), ue = c(() => h.value.length > 0), k = c(() => f.value.filter((a, l) => !E(a, l))), w = c(() => k.value.length > 0), K = T(), M = T(), p = T(), fe = c((a) => {
46
+ const l = ee(...f.value.map(s.getItemKey));
47
+ if (K.value === void 0) return a ?? l;
48
+ const t = ee(...K.value.map(s.getItemKey));
49
+ return l === t ? a ?? l : a !== l ? l : t;
50
50
  });
51
- B(de, w, h, () => 0), B($, F, p, () => h.value.length);
52
- function B(e, t, a, l) {
53
- const s = he(t, a, {
51
+ F(ue, M, h, () => 0), F(w, p, k, () => h.value.length);
52
+ function F(a, l, t, e) {
53
+ const o = he(l, t, {
54
54
  handle: '[data-draggable="true"]',
55
55
  animation: 150,
56
56
  forceFallback: !0,
57
57
  fallbackOnBody: !0,
58
58
  scrollSensitivity: 80,
59
59
  forceAutoScrollFallback: !0,
60
- onUpdate: (i) => {
61
- var m;
62
- if (i.oldIndex == null || i.newIndex == null)
60
+ onUpdate: (n) => {
61
+ var d;
62
+ if (n.oldIndex == null || n.newIndex == null)
63
63
  throw new Error("Sortable event has no index");
64
- ((m = n.onDragEnd) == null ? void 0 : m.call(n, i.oldIndex, i.newIndex)) !== !1 && A(l() + i.oldIndex, l() + i.newIndex, !0);
64
+ ((d = s.onDragEnd) == null ? void 0 : d.call(s, n.oldIndex, n.newIndex)) !== !1 && B(e() + n.oldIndex, e() + n.newIndex, !0);
65
65
  }
66
66
  });
67
- return me(e, (i) => i ? s.start() : s.stop()), s;
67
+ return ve(a, (n) => n ? o.start() : o.stop()), o;
68
68
  }
69
- function A(e, t, a) {
70
- var s;
71
- if (e === t) return;
72
- a && (x.value = ae(d.value.slice(), e, t)), ((s = n.onSort) == null ? void 0 : s.call(n, e, t)) === !1 || (ae(d.value, e, t), v(d));
69
+ function B(a, l, t) {
70
+ var o;
71
+ if (a === l) return;
72
+ t && (K.value = te(f.value.slice(), a, l)), ((o = s.onSort) == null ? void 0 : o.call(s, a, l)) === !1 || (te(f.value, a, l), m(f));
73
73
  }
74
- function K(e) {
75
- var t;
76
- return ((t = n.activeItems) == null ? void 0 : t.has(e)) ?? !1;
74
+ function A(a, l) {
75
+ var e;
76
+ const t = s.getItemKey(a, l);
77
+ return ((e = s.activeItems) == null ? void 0 : e.has(t)) ?? !1;
77
78
  }
78
- function H(e) {
79
- var t;
80
- return n.enableDragging === !1 ? !1 : ((t = se.value) == null ? void 0 : t.has(e)) ?? !0;
79
+ function H(a, l) {
80
+ var e;
81
+ const t = s.getItemKey(a, l);
82
+ return s.enableDragging === !1 ? !1 : ((e = se.value) == null ? void 0 : e.has(t)) ?? !0;
81
83
  }
82
- function z(e) {
83
- var t;
84
- return n.enableToggling === !1 ? !1 : !c(f.value) && (((t = ue.value) == null ? void 0 : t.has(e)) ?? !0);
84
+ function z(a, l) {
85
+ var e;
86
+ const t = s.getItemKey(a, l);
87
+ return s.enableToggling === !1 ? !1 : !b(g.value) && (((e = re.value) == null ? void 0 : e.has(t)) ?? !0);
85
88
  }
86
- function L(e) {
87
- var t;
88
- return ((t = f.value) == null ? void 0 : t.has(e)) ?? !1;
89
+ function L(a, l) {
90
+ var e;
91
+ const t = s.getItemKey(a, l);
92
+ return ((e = g.value) == null ? void 0 : e.has(t)) ?? !1;
89
93
  }
90
- function N(e) {
91
- var t;
92
- return n.enablePinning === !1 ? !1 : !c(r.value) && (((t = re.value) == null ? void 0 : t.has(e)) ?? !0);
94
+ function N(a, l) {
95
+ var e;
96
+ const t = s.getItemKey(a, l);
97
+ return s.enablePinning === !1 ? !1 : !b(r.value) && (((e = ie.value) == null ? void 0 : e.has(t)) ?? !0);
93
98
  }
94
- function E(e) {
95
- var t;
96
- return ((t = r.value) == null ? void 0 : t.has(e)) ?? !1;
99
+ function E(a, l) {
100
+ var e;
101
+ const t = s.getItemKey(a, l);
102
+ return ((e = r.value) == null ? void 0 : e.has(t)) ?? !1;
97
103
  }
98
- function U(e) {
99
- var t;
100
- return n.enableExpanding === !1 ? !1 : !c(y.value) && (((t = oe.value) == null ? void 0 : t.has(e)) ?? !0);
104
+ function U(a, l) {
105
+ var e;
106
+ const t = s.getItemKey(a, l);
107
+ return s.enableExpanding === !1 ? !1 : !b(y.value) && (((e = ne.value) == null ? void 0 : e.has(t)) ?? !0);
101
108
  }
102
- function V(e) {
103
- var t;
104
- return ((t = y.value) == null ? void 0 : t.has(e)) ?? !1;
109
+ function V(a, l) {
110
+ var e;
111
+ const t = s.getItemKey(a, l);
112
+ return ((e = y.value) == null ? void 0 : e.has(t)) ?? !1;
105
113
  }
106
- function j(e) {
107
- var t;
108
- return n.enableRemoving === !1 || ((t = ie.value) == null ? void 0 : t.has(e)) === !1 ? !1 : n.enableRemoving === !0 || typeof n.onRemove == "function";
114
+ function j(a, l) {
115
+ var e;
116
+ const t = s.getItemKey(a, l);
117
+ return s.enableRemoving === !1 || ((e = oe.value) == null ? void 0 : e.has(t)) === !1 ? !1 : s.enableRemoving === !0 || typeof s.onRemove == "function";
109
118
  }
110
- function q(e, t) {
111
- var l;
112
- if (((l = n.onExpand) == null ? void 0 : l.call(n, e, t)) === !1 || c(y.value)) return;
113
- const a = y.value;
114
- a.has(e) ? a.delete(e) : a.add(e), v(y);
119
+ function q(a, l) {
120
+ var o;
121
+ if (((o = s.onExpand) == null ? void 0 : o.call(s, a, l)) === !1 || b(y.value)) return;
122
+ const t = s.getItemKey(a, l), e = y.value;
123
+ e.has(t) ? e.delete(t) : e.add(t), m(y);
115
124
  }
116
- function G(e, t) {
117
- var l;
118
- if (((l = n.onToggle) == null ? void 0 : l.call(n, e, t)) === !1 || c(f.value)) return;
119
- const a = f.value;
120
- a.has(e) ? a.delete(e) : a.add(e), v(f);
125
+ function G(a, l) {
126
+ var o;
127
+ if (((o = s.onToggle) == null ? void 0 : o.call(s, a, l)) === !1 || b(g.value)) return;
128
+ const t = s.getItemKey(a, l), e = g.value;
129
+ e.has(t) ? e.delete(t) : e.add(t), m(g);
121
130
  }
122
- function J(e, t) {
123
- var s;
124
- if (t === -1)
131
+ function J(a, l) {
132
+ var n;
133
+ if (l === -1)
125
134
  throw new Error("Pinnable item not found");
126
- if (((s = n.onPin) == null ? void 0 : s.call(n, e, t)) === !1 || c(r.value)) return;
127
- const a = r.value, l = a.has(e);
128
- l ? a.delete(e) : a.add(e), v(r), A(t, a.size + (l ? 0 : -1), !1);
135
+ if (((n = s.onPin) == null ? void 0 : n.call(s, a, l)) === !1 || b(r.value)) return;
136
+ const t = s.getItemKey(a, l), e = r.value, o = e.has(t);
137
+ o ? e.delete(t) : e.add(t), m(r), B(l, e.size + (o ? 0 : -1), !1);
129
138
  }
130
- function O(e, t) {
131
- var a, l, s;
132
- ((a = n.onRemove) == null ? void 0 : a.call(n, e, t)) !== !1 && (d.value.splice(t, 1), v(d), (l = r.value) != null && l.has(e) && (r.value.delete(e), v(r)), (s = f.value) != null && s.has(e) && (f.value.delete(e), v(f)));
139
+ function O(a, l) {
140
+ var t, e, o;
141
+ if (((t = s.onRemove) == null ? void 0 : t.call(s, a, l)) !== !1) {
142
+ const n = s.getItemKey(a, l);
143
+ f.value.splice(l, 1), m(f), (e = r.value) != null && e.has(n) && (r.value.delete(n), m(r)), (o = g.value) != null && o.has(n) && (g.value.delete(n), m(g));
144
+ }
133
145
  }
134
- const Q = (e, t) => c(n.getItemKey) ? `${M.value}-${t}` : `${M.value}-${n.getItemKey(e)}`, fe = g(() => h.value.map(Q)), ge = g(() => p.value.map(Q)), W = (e, t) => typeof n.itemClass == "function" ? n.itemClass(e, t) : n.itemClass ?? null;
135
- return (e, t) => (b(), P("div", {
136
- class: R(e.$style.root)
146
+ const Q = (a, l) => `${fe.value}-${s.getItemKey(a, l)}`, ge = c(() => h.value.map(Q)), ce = c(() => k.value.map(Q)), W = (a, l) => typeof s.itemClass == "function" ? s.itemClass(a, l) : s.itemClass ?? null;
147
+ return (a, l) => (v(), P("div", {
148
+ class: R(a.$style.root)
137
149
  }, [
138
150
  be("div", {
139
151
  ref_key: "pinnedContainerRef",
140
- ref: w,
141
- class: R(e.$style.list)
152
+ ref: M,
153
+ class: R(a.$style.list)
142
154
  }, [
143
- (b(!0), P(Y, null, Z(h.value, (a, l) => (b(), _(ne, {
144
- key: fe.value[l],
145
- class: R([e.$style.item, W(a, l)]),
146
- index: l,
147
- item: a,
148
- showDragHandle: D.value,
149
- isActive: K(a),
150
- isDraggable: H(a),
151
- isRemovable: j(a),
152
- isToggable: z(a),
153
- isToggled: L(a),
154
- isPinnable: N(a),
155
- isPinned: E(a),
156
- isExpandable: U(a),
157
- isExpanded: V(a),
158
- onClick: (s) => I("itemClick", a),
155
+ (v(!0), P(Y, null, Z(h.value, (t, e) => (v(), x(ae, {
156
+ key: ge.value[e],
157
+ class: R([a.$style.item, W(t, e)]),
158
+ index: e,
159
+ item: t,
160
+ showDragHandle: $.value,
161
+ isActive: A(t, e),
162
+ isDraggable: H(t, e),
163
+ isRemovable: j(t, e),
164
+ isToggable: z(t, e),
165
+ isToggled: L(t, e),
166
+ isPinnable: N(t, e),
167
+ isPinned: E(t, e),
168
+ isExpandable: U(t, e),
169
+ isExpanded: V(t, e),
170
+ onClick: (o) => D("itemClick", t),
159
171
  onRemove: O,
160
172
  onToggle: G,
161
173
  onPin: J,
162
174
  onExpand: q
163
- }, ee({
164
- title: S(({ item: s, index: i }) => [
165
- k(e.$slots, "item-title", {
166
- index: i,
167
- item: s
175
+ }, _({
176
+ title: S(({ item: o, index: n }) => [
177
+ C(a.$slots, "item-title", {
178
+ index: n,
179
+ item: o
168
180
  })
169
181
  ]),
170
182
  _: 2
171
183
  }, [
172
- T["item-content"] ? {
184
+ I["item-content"] ? {
173
185
  name: "content",
174
- fn: S(({ item: s, index: i }) => [
175
- k(e.$slots, "item-content", {
176
- index: i,
177
- item: s
186
+ fn: S(({ item: o, index: n }) => [
187
+ C(a.$slots, "item-content", {
188
+ index: n,
189
+ item: o
178
190
  })
179
191
  ]),
180
192
  key: "0"
181
193
  } : void 0
182
194
  ]), 1032, ["class", "index", "item", "showDragHandle", "isActive", "isDraggable", "isRemovable", "isToggable", "isToggled", "isPinnable", "isPinned", "isExpandable", "isExpanded", "onClick"]))), 128))
183
195
  ], 2),
184
- $.value ? (b(), P("div", {
196
+ w.value ? (v(), P("div", {
185
197
  key: 0,
186
198
  ref_key: "unpinnedContainerRef",
187
- ref: F,
188
- class: R(e.$style.list)
199
+ ref: p,
200
+ class: R(a.$style.list)
189
201
  }, [
190
- (b(!0), P(Y, null, Z(p.value, (a, l) => {
191
- var s;
192
- return b(), _(ne, {
193
- key: ge.value[l],
194
- class: R([e.$style.item, W(a, l)]),
195
- index: l + (((s = r.value) == null ? void 0 : s.size) ?? 0),
196
- item: a,
197
- showDragHandle: D.value,
198
- isActive: K(a),
199
- isDraggable: H(a),
200
- isRemovable: j(a),
201
- isToggable: z(a),
202
- isToggled: L(a),
203
- isPinnable: N(a),
204
- isPinned: E(a),
205
- isExpandable: U(a),
206
- isExpanded: V(a),
207
- onClick: (i) => I("itemClick", a),
202
+ (v(!0), P(Y, null, Z(k.value, (t, e) => {
203
+ var o;
204
+ return v(), x(ae, {
205
+ key: ce.value[e],
206
+ class: R([a.$style.item, W(t, e)]),
207
+ index: e + (((o = r.value) == null ? void 0 : o.size) ?? 0),
208
+ item: t,
209
+ showDragHandle: $.value,
210
+ isActive: A(t, e),
211
+ isDraggable: H(t, e),
212
+ isRemovable: j(t, e),
213
+ isToggable: z(t, e),
214
+ isToggled: L(t, e),
215
+ isPinnable: N(t, e),
216
+ isPinned: E(t, e),
217
+ isExpandable: U(t, e),
218
+ isExpanded: V(t, e),
219
+ onClick: (n) => D("itemClick", t),
208
220
  onRemove: O,
209
221
  onToggle: G,
210
222
  onPin: J,
211
223
  onExpand: q
212
- }, ee({
213
- title: S(({ item: i, index: m }) => [
214
- k(e.$slots, "item-title", {
215
- index: m,
216
- item: i
224
+ }, _({
225
+ title: S(({ item: n, index: d }) => [
226
+ C(a.$slots, "item-title", {
227
+ index: d,
228
+ item: n
217
229
  })
218
230
  ]),
219
231
  _: 2
220
232
  }, [
221
- T["item-content"] ? {
233
+ I["item-content"] ? {
222
234
  name: "content",
223
- fn: S(({ item: i, index: m }) => [
224
- k(e.$slots, "item-content", {
225
- index: m,
226
- item: i
235
+ fn: S(({ item: n, index: d }) => [
236
+ C(a.$slots, "item-content", {
237
+ index: d,
238
+ item: n
227
239
  })
228
240
  ]),
229
241
  key: "0"
@@ -235,6 +247,6 @@ const ke = /* @__PURE__ */ ce({
235
247
  }
236
248
  });
237
249
  export {
238
- ke as default
250
+ Ce as default
239
251
  };
240
252
  //# sourceMappingURL=PlElementList.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlElementList.vue2.js","sources":["../../../src/components/PlElementList/PlElementList.vue"],"sourcesContent":["<script generic=\"T extends unknown = unknown, K extends number | string = number | string\" lang=\"ts\" setup>\nimport type { ShallowRef } from 'vue';\nimport { computed, shallowRef, watch } from 'vue';\nimport { isNil, shallowHash } from '@milaboratories/helpers';\nimport { useSortable } from '@vueuse/integrations/useSortable';\nimport { type SortableEvent } from 'sortablejs';\nimport { moveElements, optionalUpdateRef } from './utils.ts';\nimport PlElementListItem from './PlElementListItem.vue';\n\nconst itemsRef = defineModel<T[]>('items', { required: true });\nconst draggableSetRef = defineModel<Set<T>>('draggableItems');\nconst removableSetRef = defineModel<Set<T>>('removableItems');\n\nconst expandableSetRef = defineModel<Set<T>>('expandableItems');\nconst expandedSetRef = defineModel<Set<T>>('expandedItems');\n\nconst pinnableSetRef = defineModel<Set<T>>('pinnableItems');\nconst pinnedSetRef = defineModel<Set<T>>('pinnedItems');\n\nconst toggableSetRef = defineModel<Set<T>>('toggableItems');\nconst toggledSetRef = defineModel<Set<T>>('toggledItems');\n\nconst props = withDefaults(\n defineProps<{\n itemClass?: string | string[] | ((item: T, index: number) => string | string[]);\n activeItems?: Set<T>;\n\n enableDragging?: boolean;\n getItemKey?: (item: T) => K;\n onDragEnd?: (oldIndex: number, newIndex: number) => void | boolean;\n onSort?: (oldIndex: number, newIndex: number) => void | boolean;\n\n enableExpanding?: boolean;\n onExpand?: (item: T, index: number) => void | boolean;\n\n enableRemoving?: boolean;\n onRemove?: (item: T, index: number) => void | boolean;\n\n enableToggling?: boolean;\n onToggle?: (item: T, index: number) => void | boolean;\n\n enablePinning?: boolean;\n onPin?: (item: T, index: number) => void | boolean;\n }>(), {\n itemClass: undefined,\n activeItems: undefined,\n\n enableDragging: undefined,\n enableRemoving: undefined,\n enableExpanding: undefined,\n enableToggling: undefined,\n enablePinning: undefined,\n\n getItemKey: undefined,\n onDragEnd: undefined,\n onSort: undefined,\n onRemove: undefined,\n onExpand: undefined,\n onToggle: undefined,\n onPin: undefined,\n },\n);\n\nconst emits = defineEmits<{\n (e: 'itemClick', item: T): void;\n}>();\n\nconst slots = defineSlots<{\n ['item-title']: (props: { item: T; index: number }) => unknown;\n ['item-content']?: (props: { item: T; index: number }) => unknown;\n}>();\n\nconst dndSortingEnabled = computed((): boolean => {\n return props.enableDragging !== false && !isNil(props.getItemKey);\n});\n\nconst pinnedItemsRef = computed(() => itemsRef.value.filter(isPinned));\nconst hasPinnedItems = computed(() => pinnedItemsRef.value.length > 0);\n\nconst unpinnedItemsRef = computed(() => itemsRef.value.filter((item) => !isPinned(item)));\nconst hasUnpinnedItems = computed(() => unpinnedItemsRef.value.length > 0);\n\nconst domProjectionItemsRef = shallowRef<undefined | T[]>();\nconst pinnedContainerRef = shallowRef<HTMLElement>();\nconst unpinnedContainerRef = shallowRef<HTMLElement>();\n\n// version fix problem with sync between data and rendered values when items have been changed\nconst versionRef = computed<number>((oldVersion) => {\n const currentVersion = shallowHash(...itemsRef.value);\n\n if (domProjectionItemsRef.value === undefined) return oldVersion ?? currentVersion;\n\n const lastSortedVersion = shallowHash(...domProjectionItemsRef.value);\n\n if (currentVersion === lastSortedVersion) return oldVersion ?? currentVersion;\n\n return oldVersion !== currentVersion ? currentVersion : lastSortedVersion;\n});\n\ncreateSortable(hasPinnedItems, pinnedContainerRef, pinnedItemsRef, () => 0);\ncreateSortable(hasUnpinnedItems, unpinnedContainerRef, unpinnedItemsRef, () => pinnedItemsRef.value.length);\n\nfunction createSortable(toggler: ShallowRef<boolean>, elRef: ShallowRef<undefined | HTMLElement>, itemsRef: ShallowRef<T[]>, getOffset: () => number) {\n const sortable = useSortable(elRef, itemsRef, {\n handle: `[data-draggable=\"true\"]`,\n animation: 150,\n forceFallback: true,\n fallbackOnBody: true,\n scrollSensitivity: 80,\n forceAutoScrollFallback: true,\n onUpdate: (evt: SortableEvent) => {\n if (evt.oldIndex == null || evt.newIndex == null) {\n throw new Error('Sortable event has no index');\n }\n if (props.onDragEnd?.(evt.oldIndex, evt.newIndex) !== false) {\n moveItems(getOffset() + evt.oldIndex, getOffset() + evt.newIndex, true);\n }\n },\n });\n watch(toggler, (on) => on ? sortable.start() : sortable.stop());\n\n return sortable;\n}\n\nfunction moveItems(oldIndex: number, newIndex: number, afterUpdateDom: boolean) {\n if (oldIndex === newIndex) return;\n\n if (afterUpdateDom) {\n domProjectionItemsRef.value = moveElements(itemsRef.value.slice(), oldIndex, newIndex);\n }\n\n const preventDefault = props.onSort?.(oldIndex, newIndex) === false;\n\n if (!preventDefault) {\n moveElements(itemsRef.value, oldIndex, newIndex);\n optionalUpdateRef(itemsRef);\n }\n}\n\nfunction isActive(item: T): boolean {\n return props.activeItems?.has(item) ?? false;\n}\n\nfunction isDraggable(item: T): boolean {\n if (props.enableDragging === false) return false;\n return (draggableSetRef.value?.has(item) ?? true);\n}\n\nfunction isToggable(item: T): boolean {\n if (props.enableToggling === false) return false;\n return !isNil(toggledSetRef.value) && (toggableSetRef.value?.has(item) ?? true);\n}\n\nfunction isToggled(item: T): boolean {\n return toggledSetRef.value?.has(item) ?? false;\n}\n\nfunction isPinnable(item: T): boolean {\n if (props.enablePinning === false) return false;\n return !isNil(pinnedSetRef.value) && (pinnableSetRef.value?.has(item) ?? true);\n}\n\nfunction isPinned(item: T): boolean {\n return pinnedSetRef.value?.has(item) ?? false;\n}\n\nfunction isExpandable(item: T): boolean {\n if (props.enableExpanding === false) return false;\n return !isNil(expandedSetRef.value) && (expandableSetRef.value?.has(item) ?? true);\n}\n\nfunction isExpanded(item: T): boolean {\n return expandedSetRef.value?.has(item) ?? false;\n}\n\nfunction isRemovable(item: T): boolean {\n if (props.enableRemoving === false) return false;\n if (removableSetRef.value?.has(item) === false) return false;\n return props.enableRemoving === true || typeof props.onRemove === 'function';\n}\n\nfunction handleExpand(item: T, index: number) {\n if (props.onExpand?.(item, index) === false || isNil(expandedSetRef.value)) return;\n\n const expanded = expandedSetRef.value;\n if (expanded.has(item)) expanded.delete(item);\n else expanded.add(item);\n optionalUpdateRef(expandedSetRef);\n}\n\nfunction handleToggle(item: T, index: number) {\n if (props.onToggle?.(item, index) === false || isNil(toggledSetRef.value)) return;\n\n const toggled = toggledSetRef.value;\n if (toggled.has(item)) toggled.delete(item);\n else toggled.add(item);\n optionalUpdateRef(toggledSetRef);\n}\n\nfunction handlePin(item: T, oldIndex: number) {\n if (oldIndex === -1) {\n throw new Error('Pinnable item not found');\n }\n\n if (props.onPin?.(item, oldIndex) === false || isNil(pinnedSetRef.value)) return;\n\n const pinned = pinnedSetRef.value;\n const alreadyPinned = pinned.has(item);\n if (alreadyPinned) pinned.delete(item);\n else pinned.add(item);\n optionalUpdateRef(pinnedSetRef);\n moveItems(oldIndex, pinned.size + (alreadyPinned ? 0 : -1), false);\n}\n\nfunction handleRemove(item: T, index: number) {\n if (props.onRemove?.(item, index) !== false) {\n itemsRef.value.splice(index, 1);\n optionalUpdateRef(itemsRef);\n\n if (pinnedSetRef.value?.has(item)) {\n pinnedSetRef.value.delete(item);\n optionalUpdateRef(pinnedSetRef);\n }\n\n if (toggledSetRef.value?.has(item)) {\n toggledSetRef.value.delete(item);\n optionalUpdateRef(toggledSetRef);\n }\n }\n}\n\n// version fix problem with sync between data and rendered values\nconst getKey = (item: T, index: number) => {\n if (isNil(props.getItemKey)) return `${versionRef.value}-${index}`;\n return `${versionRef.value}-${props.getItemKey(item)}`;\n};\nconst pinnedKeysRef = computed(() => pinnedItemsRef.value.map(getKey));\nconst unpinnedKeysRef = computed(() => unpinnedItemsRef.value.map(getKey));\n\nconst getItemClass = (item: T, index: number): null | string | string[] => {\n if (typeof props.itemClass === 'function') {\n return props.itemClass(item, index);\n }\n return props.itemClass ?? null;\n};\n\n</script>\n\n<template>\n <div :class=\"$style.root\">\n <div ref=\"pinnedContainerRef\" :class=\"$style.list\">\n <PlElementListItem\n v-for=\"(pinnedItem, pinnedIndex) in pinnedItemsRef\" :key=\"pinnedKeysRef[pinnedIndex]\"\n :class=\"[$style.item, getItemClass(pinnedItem, pinnedIndex)]\"\n\n :index=\"pinnedIndex\"\n :item=\"pinnedItem\"\n :showDragHandle=\"dndSortingEnabled\"\n :isActive=\"isActive(pinnedItem)\"\n :isDraggable=\"isDraggable(pinnedItem)\"\n :isRemovable=\"isRemovable(pinnedItem)\"\n :isToggable=\"isToggable(pinnedItem)\"\n :isToggled=\"isToggled(pinnedItem)\"\n :isPinnable=\"isPinnable(pinnedItem)\"\n :isPinned=\"isPinned(pinnedItem)\"\n :isExpandable=\"isExpandable(pinnedItem)\"\n :isExpanded=\"isExpanded(pinnedItem)\"\n\n @click=\"emits('itemClick', pinnedItem)\"\n @remove=\"handleRemove\"\n @toggle=\"handleToggle\"\n @pin=\"handlePin\"\n @expand=\"handleExpand\"\n >\n <template #title=\"{ item, index }\">\n <slot :index=\"index\" :item=\"item\" name=\"item-title\" />\n </template>\n <template v-if=\"slots['item-content']\" #content=\"{ item, index }\">\n <slot :index=\"index\" :item=\"item\" name=\"item-content\" />\n </template>\n </PlElementListItem>\n </div>\n <div v-if=\"hasUnpinnedItems\" ref=\"unpinnedContainerRef\" :class=\"$style.list\">\n <PlElementListItem\n v-for=\"(unpinnedItem, unpinnedIndex) in unpinnedItemsRef\" :key=\"unpinnedKeysRef[unpinnedIndex]\"\n :class=\"[$style.item, getItemClass(unpinnedItem, unpinnedIndex)]\"\n\n :index=\"unpinnedIndex + (pinnedSetRef?.size ?? 0)\"\n :item=\"unpinnedItem\"\n :showDragHandle=\"dndSortingEnabled\"\n :isActive=\"isActive(unpinnedItem)\"\n :isDraggable=\"isDraggable(unpinnedItem)\"\n :isRemovable=\"isRemovable(unpinnedItem)\"\n :isToggable=\"isToggable(unpinnedItem)\"\n :isToggled=\"isToggled(unpinnedItem)\"\n :isPinnable=\"isPinnable(unpinnedItem)\"\n :isPinned=\"isPinned(unpinnedItem)\"\n :isExpandable=\"isExpandable(unpinnedItem)\"\n :isExpanded=\"isExpanded(unpinnedItem)\"\n\n @click=\"emits('itemClick', unpinnedItem)\"\n @remove=\"handleRemove\"\n @toggle=\"handleToggle\"\n @pin=\"handlePin\"\n @expand=\"handleExpand\"\n >\n <template #title=\"{ item, index }\">\n <slot :index=\"index\" :item=\"item\" name=\"item-title\" />\n </template>\n <template v-if=\"slots['item-content']\" #content=\"{ item, index }\">\n <slot :index=\"index\" :item=\"item\" name=\"item-content\" />\n </template>\n </PlElementListItem>\n </div>\n </div>\n</template>\n\n<style module>\n.root, .list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 180px;\n}\n\n.item {\n width: 100%;\n}\n\n:global(.sortable-ghost) {\n visibility: hidden;\n}\n:global(.sortable-drag) {\n opacity: 1;\n}\n</style>\n"],"names":["itemsRef","_useModel","__props","draggableSetRef","removableSetRef","expandableSetRef","expandedSetRef","pinnableSetRef","pinnedSetRef","toggableSetRef","toggledSetRef","props","emits","__emit","slots","_useSlots","dndSortingEnabled","computed","isNil","pinnedItemsRef","isPinned","hasPinnedItems","unpinnedItemsRef","item","hasUnpinnedItems","domProjectionItemsRef","shallowRef","pinnedContainerRef","unpinnedContainerRef","versionRef","oldVersion","currentVersion","shallowHash","lastSortedVersion","createSortable","toggler","elRef","getOffset","sortable","useSortable","evt","_a","moveItems","watch","on","oldIndex","newIndex","afterUpdateDom","moveElements","optionalUpdateRef","isActive","isDraggable","isToggable","isToggled","isPinnable","isExpandable","isExpanded","isRemovable","handleExpand","index","expanded","handleToggle","toggled","handlePin","pinned","alreadyPinned","handleRemove","_b","_c","getKey","pinnedKeysRef","unpinnedKeysRef","getItemClass"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASM,UAAAA,IAAWC,EAAgBC,GAAC,OAA2B,GACvDC,KAAkBF,EAAmBC,GAAC,gBAAgB,GACtDE,KAAkBH,EAAmBC,GAAC,gBAAgB,GAEtDG,KAAmBJ,EAAoBC,GAAA,iBAAiB,GACxDI,IAAiBL,EAAmBC,GAAC,eAAe,GAEpDK,KAAiBN,EAAmBC,GAAC,eAAe,GACpDM,IAAeP,EAAmBC,GAAC,aAAa,GAEhDO,KAAiBR,EAAmBC,GAAC,eAAe,GACpDQ,IAAgBT,EAAmBC,GAAC,cAAc,GAElDS,IAAQT,GAyCRU,IAAQC,IAIRC,IAAQC,GAGV,GAEEC,IAAoBC,EAAS,MAC1BN,EAAM,mBAAmB,MAAS,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"PlElementList.vue2.js","sources":["../../../src/components/PlElementList/PlElementList.vue"],"sourcesContent":["<script generic=\"T extends unknown = unknown, K extends number | string = number | string\" lang=\"ts\" setup>\nimport type { ShallowRef } from 'vue';\nimport { computed, shallowRef, watch } from 'vue';\nimport { isNil, shallowHash } from '@milaboratories/helpers';\nimport { useSortable } from '@vueuse/integrations/useSortable';\nimport { type SortableEvent } from 'sortablejs';\nimport { moveElements, optionalUpdateRef } from './utils.ts';\nimport PlElementListItem from './PlElementListItem.vue';\n\nconst itemsRef = defineModel<T[]>('items', { required: true });\nconst draggableSetRef = defineModel<Set<K>>('draggableItems');\nconst removableSetRef = defineModel<Set<K>>('removableItems');\n\nconst expandableSetRef = defineModel<Set<K>>('expandableItems');\nconst expandedSetRef = defineModel<Set<K>>('expandedItems');\n\nconst pinnableSetRef = defineModel<Set<K>>('pinnableItems');\nconst pinnedSetRef = defineModel<Set<K>>('pinnedItems');\n\nconst toggableSetRef = defineModel<Set<K>>('toggableItems');\nconst toggledSetRef = defineModel<Set<K>>('toggledItems');\n\nconst props = withDefaults(\n defineProps<{\n getItemKey: (item: T, index: number) => K;\n\n itemClass?: string | string[] | ((item: T, index: number) => string | string[]);\n activeItems?: Set<K>;\n\n enableDragging?: boolean;\n onDragEnd?: (oldIndex: number, newIndex: number) => void | boolean;\n onSort?: (oldIndex: number, newIndex: number) => void | boolean;\n\n enableExpanding?: boolean;\n onExpand?: (item: T, index: number) => void | boolean;\n\n enableRemoving?: boolean;\n onRemove?: (item: T, index: number) => void | boolean;\n\n enableToggling?: boolean;\n onToggle?: (item: T, index: number) => void | boolean;\n\n enablePinning?: boolean;\n onPin?: (item: T, index: number) => void | boolean;\n }>(), {\n itemClass: undefined,\n activeItems: undefined,\n\n enableDragging: undefined,\n enableRemoving: undefined,\n enableExpanding: undefined,\n enableToggling: undefined,\n enablePinning: undefined,\n\n onDragEnd: undefined,\n onSort: undefined,\n onRemove: undefined,\n onExpand: undefined,\n onToggle: undefined,\n onPin: undefined,\n },\n);\n\nconst emits = defineEmits<{\n (e: 'itemClick', item: T): void;\n}>();\n\nconst slots = defineSlots<{\n ['item-title']: (props: { item: T; index: number }) => unknown;\n ['item-content']?: (props: { item: T; index: number }) => unknown;\n}>();\n\nconst dndSortingEnabled = computed((): boolean => {\n return props.enableDragging !== false;\n});\n\nconst pinnedItemsRef = computed(() => itemsRef.value.filter(isPinned));\nconst hasPinnedItems = computed(() => pinnedItemsRef.value.length > 0);\n\nconst unpinnedItemsRef = computed(() => itemsRef.value.filter((item, index) => !isPinned(item, index)));\nconst hasUnpinnedItems = computed(() => unpinnedItemsRef.value.length > 0);\n\nconst domProjectionItemsRef = shallowRef<undefined | T[]>();\nconst pinnedContainerRef = shallowRef<HTMLElement>();\nconst unpinnedContainerRef = shallowRef<HTMLElement>();\n\n// version fix problem with sync between data and rendered values when items have been changed\nconst versionRef = computed<number>((oldVersion) => {\n const currentVersion = shallowHash(...itemsRef.value.map(props.getItemKey));\n\n if (domProjectionItemsRef.value === undefined) return oldVersion ?? currentVersion;\n\n const lastSortedVersion = shallowHash(...domProjectionItemsRef.value.map(props.getItemKey));\n\n if (currentVersion === lastSortedVersion) return oldVersion ?? currentVersion;\n\n return oldVersion !== currentVersion ? currentVersion : lastSortedVersion;\n});\n\ncreateSortable(hasPinnedItems, pinnedContainerRef, pinnedItemsRef, () => 0);\ncreateSortable(hasUnpinnedItems, unpinnedContainerRef, unpinnedItemsRef, () => pinnedItemsRef.value.length);\n\nfunction createSortable(toggler: ShallowRef<boolean>, elRef: ShallowRef<undefined | HTMLElement>, itemsRef: ShallowRef<T[]>, getOffset: () => number) {\n const sortable = useSortable(elRef, itemsRef, {\n handle: `[data-draggable=\"true\"]`,\n animation: 150,\n forceFallback: true,\n fallbackOnBody: true,\n scrollSensitivity: 80,\n forceAutoScrollFallback: true,\n onUpdate: (evt: SortableEvent) => {\n if (evt.oldIndex == null || evt.newIndex == null) {\n throw new Error('Sortable event has no index');\n }\n if (props.onDragEnd?.(evt.oldIndex, evt.newIndex) !== false) {\n moveItems(getOffset() + evt.oldIndex, getOffset() + evt.newIndex, true);\n }\n },\n });\n watch(toggler, (on) => on ? sortable.start() : sortable.stop());\n\n return sortable;\n}\n\nfunction moveItems(oldIndex: number, newIndex: number, afterUpdateDom: boolean) {\n if (oldIndex === newIndex) return;\n\n if (afterUpdateDom) {\n domProjectionItemsRef.value = moveElements(itemsRef.value.slice(), oldIndex, newIndex);\n }\n\n const preventDefault = props.onSort?.(oldIndex, newIndex) === false;\n\n if (!preventDefault) {\n moveElements(itemsRef.value, oldIndex, newIndex);\n optionalUpdateRef(itemsRef);\n }\n}\n\nfunction isActive(item: T, index: number): boolean {\n const k = props.getItemKey(item, index);\n return props.activeItems?.has(k) ?? false;\n}\n\nfunction isDraggable(item: T, index: number): boolean {\n const k = props.getItemKey(item, index);\n if (props.enableDragging === false) return false;\n return (draggableSetRef.value?.has(k) ?? true);\n}\n\nfunction isToggable(item: T, index: number): boolean {\n const k = props.getItemKey(item, index);\n if (props.enableToggling === false) return false;\n return !isNil(toggledSetRef.value) && (toggableSetRef.value?.has(k) ?? true);\n}\n\nfunction isToggled(item: T, index: number): boolean {\n const k = props.getItemKey(item, index);\n return toggledSetRef.value?.has(k) ?? false;\n}\n\nfunction isPinnable(item: T, index: number): boolean {\n const k = props.getItemKey(item, index);\n if (props.enablePinning === false) return false;\n return !isNil(pinnedSetRef.value) && (pinnableSetRef.value?.has(k) ?? true);\n}\n\nfunction isPinned(item: T, index: number): boolean {\n const k = props.getItemKey(item, index);\n return pinnedSetRef.value?.has(k) ?? false;\n}\n\nfunction isExpandable(item: T, index: number): boolean {\n const k = props.getItemKey(item, index);\n if (props.enableExpanding === false) return false;\n return !isNil(expandedSetRef.value) && (expandableSetRef.value?.has(k) ?? true);\n}\n\nfunction isExpanded(item: T, index: number): boolean {\n const k = props.getItemKey(item, index);\n return expandedSetRef.value?.has(k) ?? false;\n}\n\nfunction isRemovable(item: T, index: number): boolean {\n const k = props.getItemKey(item, index);\n if (props.enableRemoving === false) return false;\n if (removableSetRef.value?.has(k) === false) return false;\n return props.enableRemoving === true || typeof props.onRemove === 'function';\n}\n\nfunction handleExpand(item: T, index: number) {\n if (props.onExpand?.(item, index) === false || isNil(expandedSetRef.value)) return;\n const k = props.getItemKey(item, index);\n const expanded = expandedSetRef.value;\n if (expanded.has(k)) expanded.delete(k);\n else expanded.add(k);\n optionalUpdateRef(expandedSetRef);\n}\n\nfunction handleToggle(item: T, index: number) {\n if (props.onToggle?.(item, index) === false || isNil(toggledSetRef.value)) return;\n const k = props.getItemKey(item, index);\n const toggled = toggledSetRef.value;\n if (toggled.has(k)) toggled.delete(k);\n else toggled.add(k);\n optionalUpdateRef(toggledSetRef);\n}\n\nfunction handlePin(item: T, index: number) {\n if (index === -1) {\n throw new Error('Pinnable item not found');\n }\n\n if (props.onPin?.(item, index) === false || isNil(pinnedSetRef.value)) return;\n\n const k = props.getItemKey(item, index);\n const pinned = pinnedSetRef.value;\n const alreadyPinned = pinned.has(k);\n if (alreadyPinned) pinned.delete(k);\n else pinned.add(k);\n optionalUpdateRef(pinnedSetRef);\n moveItems(index, pinned.size + (alreadyPinned ? 0 : -1), false);\n}\n\nfunction handleRemove(item: T, index: number) {\n if (props.onRemove?.(item, index) !== false) {\n const k = props.getItemKey(item, index);\n\n itemsRef.value.splice(index, 1);\n optionalUpdateRef(itemsRef);\n\n if (pinnedSetRef.value?.has(k)) {\n pinnedSetRef.value.delete(k);\n optionalUpdateRef(pinnedSetRef);\n }\n\n if (toggledSetRef.value?.has(k)) {\n toggledSetRef.value.delete(k);\n optionalUpdateRef(toggledSetRef);\n }\n }\n}\n\n// version fix problem with sync between data and rendered values\nconst getKey = (item: T, index: number) => {\n return `${versionRef.value}-${props.getItemKey(item, index)}`;\n};\nconst pinnedKeysRef = computed(() => pinnedItemsRef.value.map(getKey));\nconst unpinnedKeysRef = computed(() => unpinnedItemsRef.value.map(getKey));\n\nconst getItemClass = (item: T, index: number): null | string | string[] => {\n if (typeof props.itemClass === 'function') {\n return props.itemClass(item, index);\n }\n return props.itemClass ?? null;\n};\n\n</script>\n\n<template>\n <div :class=\"$style.root\">\n <div ref=\"pinnedContainerRef\" :class=\"$style.list\">\n <PlElementListItem\n v-for=\"(pinnedItem, pinnedIndex) in pinnedItemsRef\" :key=\"pinnedKeysRef[pinnedIndex]\"\n :class=\"[$style.item, getItemClass(pinnedItem, pinnedIndex)]\"\n\n :index=\"pinnedIndex\"\n :item=\"pinnedItem\"\n :showDragHandle=\"dndSortingEnabled\"\n :isActive=\"isActive(pinnedItem, pinnedIndex)\"\n :isDraggable=\"isDraggable(pinnedItem, pinnedIndex)\"\n :isRemovable=\"isRemovable(pinnedItem, pinnedIndex)\"\n :isToggable=\"isToggable(pinnedItem, pinnedIndex)\"\n :isToggled=\"isToggled(pinnedItem, pinnedIndex)\"\n :isPinnable=\"isPinnable(pinnedItem, pinnedIndex)\"\n :isPinned=\"isPinned(pinnedItem, pinnedIndex)\"\n :isExpandable=\"isExpandable(pinnedItem, pinnedIndex)\"\n :isExpanded=\"isExpanded(pinnedItem, pinnedIndex)\"\n\n @click=\"emits('itemClick', pinnedItem)\"\n @remove=\"handleRemove\"\n @toggle=\"handleToggle\"\n @pin=\"handlePin\"\n @expand=\"handleExpand\"\n >\n <template #title=\"{ item, index }\">\n <slot :index=\"index\" :item=\"item\" name=\"item-title\" />\n </template>\n <template v-if=\"slots['item-content']\" #content=\"{ item, index }\">\n <slot :index=\"index\" :item=\"item\" name=\"item-content\" />\n </template>\n </PlElementListItem>\n </div>\n <div v-if=\"hasUnpinnedItems\" ref=\"unpinnedContainerRef\" :class=\"$style.list\">\n <PlElementListItem\n v-for=\"(unpinnedItem, unpinnedIndex) in unpinnedItemsRef\" :key=\"unpinnedKeysRef[unpinnedIndex]\"\n :class=\"[$style.item, getItemClass(unpinnedItem, unpinnedIndex)]\"\n\n :index=\"unpinnedIndex + (pinnedSetRef?.size ?? 0)\"\n :item=\"unpinnedItem\"\n :showDragHandle=\"dndSortingEnabled\"\n :isActive=\"isActive(unpinnedItem, unpinnedIndex)\"\n :isDraggable=\"isDraggable(unpinnedItem, unpinnedIndex)\"\n :isRemovable=\"isRemovable(unpinnedItem, unpinnedIndex)\"\n :isToggable=\"isToggable(unpinnedItem, unpinnedIndex)\"\n :isToggled=\"isToggled(unpinnedItem, unpinnedIndex)\"\n :isPinnable=\"isPinnable(unpinnedItem, unpinnedIndex)\"\n :isPinned=\"isPinned(unpinnedItem, unpinnedIndex)\"\n :isExpandable=\"isExpandable(unpinnedItem, unpinnedIndex)\"\n :isExpanded=\"isExpanded(unpinnedItem, unpinnedIndex)\"\n\n @click=\"emits('itemClick', unpinnedItem)\"\n @remove=\"handleRemove\"\n @toggle=\"handleToggle\"\n @pin=\"handlePin\"\n @expand=\"handleExpand\"\n >\n <template #title=\"{ item, index }\">\n <slot :index=\"index\" :item=\"item\" name=\"item-title\" />\n </template>\n <template v-if=\"slots['item-content']\" #content=\"{ item, index }\">\n <slot :index=\"index\" :item=\"item\" name=\"item-content\" />\n </template>\n </PlElementListItem>\n </div>\n </div>\n</template>\n\n<style module>\n.root, .list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-width: 180px;\n}\n\n.item {\n width: 100%;\n}\n\n:global(.sortable-ghost) {\n visibility: hidden;\n}\n:global(.sortable-drag) {\n opacity: 1;\n}\n</style>\n"],"names":["itemsRef","_useModel","__props","draggableSetRef","removableSetRef","expandableSetRef","expandedSetRef","pinnableSetRef","pinnedSetRef","toggableSetRef","toggledSetRef","props","emits","__emit","slots","_useSlots","dndSortingEnabled","computed","pinnedItemsRef","isPinned","hasPinnedItems","unpinnedItemsRef","item","index","hasUnpinnedItems","domProjectionItemsRef","shallowRef","pinnedContainerRef","unpinnedContainerRef","versionRef","oldVersion","currentVersion","shallowHash","lastSortedVersion","createSortable","toggler","elRef","getOffset","sortable","useSortable","evt","_a","moveItems","watch","on","oldIndex","newIndex","afterUpdateDom","moveElements","optionalUpdateRef","isActive","k","isDraggable","isToggable","isNil","isToggled","isPinnable","isExpandable","isExpanded","isRemovable","handleExpand","expanded","handleToggle","toggled","handlePin","pinned","alreadyPinned","handleRemove","_b","_c","getKey","pinnedKeysRef","unpinnedKeysRef","getItemClass"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASM,UAAAA,IAAWC,EAAgBC,GAAC,OAA2B,GACvDC,KAAkBF,EAAmBC,GAAC,gBAAgB,GACtDE,KAAkBH,EAAmBC,GAAC,gBAAgB,GAEtDG,KAAmBJ,EAAoBC,GAAA,iBAAiB,GACxDI,IAAiBL,EAAmBC,GAAC,eAAe,GAEpDK,KAAiBN,EAAmBC,GAAC,eAAe,GACpDM,IAAeP,EAAmBC,GAAC,aAAa,GAEhDO,KAAiBR,EAAmBC,GAAC,eAAe,GACpDQ,IAAgBT,EAAmBC,GAAC,cAAc,GAElDS,IAAQT,GAyCRU,IAAQC,IAIRC,IAAQC,GAGV,GAEEC,IAAoBC,EAAS,MAC1BN,EAAM,mBAAmB,EACjC,GAEKO,IAAiBD,EAAS,MAAMjB,EAAS,MAAM,OAAOmB,CAAQ,CAAC,GAC/DC,KAAiBH,EAAS,MAAMC,EAAe,MAAM,SAAS,CAAC,GAE/DG,IAAmBJ,EAAS,MAAMjB,EAAS,MAAM,OAAO,CAACsB,GAAMC,MAAU,CAACJ,EAASG,GAAMC,CAAK,CAAC,CAAC,GAChGC,IAAmBP,EAAS,MAAMI,EAAiB,MAAM,SAAS,CAAC,GAEnEI,IAAwBC,EAA4B,GACpDC,IAAqBD,EAAwB,GAC7CE,IAAuBF,EAAwB,GAG/CG,KAAaZ,EAAiB,CAACa,MAAe;AAC5C,YAAAC,IAAiBC,GAAY,GAAGhC,EAAS,MAAM,IAAIW,EAAM,UAAU,CAAC;AAE1E,UAAIc,EAAsB,UAAU,OAAW,QAAOK,KAAcC;AAE9D,Y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M,aAAc,aACtBA,EAAM,UAAUW,GAAMC,CAAK,IAE7BZ,EAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PlElementListItem.vue2.js","sources":["../../../src/components/PlElementList/PlElementListItem.vue"],"sourcesContent":["<script generic=\"T extends unknown = unknown\" lang=\"ts\" setup>\nimport { computed } from 'vue';\nimport { PlIcon16 } from '../PlIcon16';\nimport { PlIcon24 } from '../PlIcon24';\n\nconst props = defineProps<{\n item: T;\n index: number;\n showDragHandle: boolean;\n isActive: boolean;\n isDraggable: boolean;\n isRemovable: boolean;\n isExpandable: boolean;\n isExpanded: boolean;\n isToggable: boolean;\n isToggled: boolean;\n isPinnable: boolean;\n isPinned: boolean;\n}>();\n\nconst slots = defineSlots<{\n title: (props: { item: T; index: number }) => unknown;\n content?: (props: { item: T; index: number }) => unknown;\n}>();\nconst hasContentSlot = computed(() => slots['content'] !== undefined);\n\nconst emit = defineEmits<{\n (e: 'expand', item: T, index: number): void;\n (e: 'toggle', item: T, index: number): void;\n (e: 'pin', item: T, index: number): void;\n (e: 'remove', item: T, index: number): void;\n}>();\n</script>\n\n<template>\n <div\n :class=\"[$style.root, {\n [$style.active]: props.isActive,\n [$style.pinned]: props.isPinned,\n [$style.disabled]: props.isToggled,\n }]\"\n >\n <div\n :class=\"[$style.head, {\n [$style.clickable]: hasContentSlot,\n }]\"\n @click=\"isExpandable && emit('expand', props.item, props.index)\"\n >\n <div\n v-if=\"props.showDragHandle\"\n :class=\"[$style.action, $style.draggable, { [$style.disable]: !props.isDraggable } ]\"\n :data-draggable=\"props.isDraggable\"\n >\n <PlIcon16 name=\"drag-dots\" />\n </div>\n <PlIcon16 v-if=\"isExpandable\" :class=\"[$style.contentChevron, { [$style.opened]: props.isExpanded }]\" name=\"chevron-down\" />\n\n <div :class=\"$style.title\">\n <slot name=\"title\" :item=\"props.item\" :index=\"props.index\" />\n </div>\n\n <div :class=\"[$style.actions, $style.showOnHover]\">\n <div\n v-if=\"props.isToggable\"\n :class=\"[$style.action, $style.clickable, { [$style.disable]: !props.isToggable }]\"\n @click.stop=\"emit('toggle', props.item, props.index)\"\n >\n <PlIcon24 :name=\"props.isToggled === true ? 'view-hide' : 'view-show'\" size=\"16\" />\n </div>\n <div\n v-if=\"props.isPinnable\"\n :class=\"[$style.action, $style.clickable, {\n [$style.disable]: !props.isPinnable,\n [$style.activated]: props.isPinned,\n }]\"\n @click.stop=\"emit('pin', props.item, props.index)\"\n >\n <PlIcon24 name=\"pin\" size=\"16\" />\n </div>\n <div\n v-if=\"props.isRemovable\"\n :class=\"[$style.action, $style.clickable]\"\n @click.stop=\"emit('remove', props.item, props.index)\"\n >\n <PlIcon16 name=\"close\" />\n </div>\n </div>\n </div>\n <div v-if=\"hasContentSlot && props.isExpanded\" :class=\"$style.body\">\n <slot name=\"content\" :item=\"props.item\" :index=\"props.index\" />\n </div>\n </div>\n</template>\n\n<style module>\n@use '../../assets/variables.scss' as *;\n\n.root {\n --background: rgba(255, 255, 255, 0.8);\n --border-color: var(--color-div-grey);\n --head-background: unset;\n --box-shadow: none;\n --box-shadow-active: 0 0 0 4px color-mix(in srgb, var(--border-color-focus) 50%, transparent);\n\n &:global(.sortable-drag),\n &:global(.sortable-chosen) {\n --head-background: var(--gradient-light-lime);\n --border-color: var(--border-color-focus);\n --box-shadow: var(--box-shadow-active)\n }\n}\n.root {\n display: flex;\n flex-direction: column;\n justify-content: center;\n border-radius: var(--border-radius);\n border: 1px solid var(--border-color);\n background-color: var(--background);\n transition: box-shadow 0.15s;\n box-shadow: var(--box-shadow);;\n overflow: hidden;\n\n &:hover {\n --border-color: var(--border-color-focus);\n }\n\n &.disabled {\n opacity: 0.6;\n filter: grayscale(1);\n }\n\n &.pinned {\n --background: var(--bg-base-light);\n }\n\n &.active {\n --border-color: var(--border-color-focus);\n --head-background: var(--btn-accent-positive-500);\n }\n}\n\n.head {\n position: relative;\n display: flex;\n align-items: center;\n padding: 8px;\n border-radius: var(--border-radius) var(--border-radius) 0 0;\n background: var(--head-background);\n\n &:hover, &.opened {\n --head-background: var(--gradient-light-lime);\n }\n}\n\n.contentChevron {\n display: block;\n width: 16px;\n height: 16px;\n margin-right: 4px;\n transform: rotate(-90deg);\n transition: transform 0.15s;\n\n &.opened {\n transform: rotate(0deg);\n }\n}\n\n.title {\n display: flex;\n flex-direction: row;\n gap: 8px;\n max-width: calc(100% - 50px);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.body {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 24px;\n border-radius: 0 0 var(--border-radius) var(--border-radius);\n}\n\n.actions {\n position: absolute;\n top: 8px;\n right: 8px;\n display: flex;\n align-items: center;\n background-color: var(--background);\n border-radius: var(--border-radius);\n}\n\n.action {\n width: 24px;\n height: 24px;\n padding: 4px; /* use padding instead of gap on parent, for better accessibility */\n opacity: 0.6;\n border-radius: var(--border-radius);\n transition: all 0.15s;\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n &:hover {\n opacity: 1;\n background-color: var(--bg-elevated-02);\n }\n\n &.activated {\n opacity: 0.8;\n }\n\n &.disable {\n cursor: not-allowed;\n opacity: 0.4;\n }\n}\n\n.clickable {\n cursor: pointer;\n}\n\n.draggable {\n cursor: grab;\n}\n\n.showOnHover {\n opacity: 0;\n transition: opacity 0.15s;\n}\n\n.root:hover .showOnHover {\n opacity: 1;\n}\n</style>\n"],"names":["props","__props","slots","_useSlots","hasContentSlot","computed","emit","__emit"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAKA,UAAMA,IAAQC,GAeRC,IAAQC,EAGV,GACEC,IAAiBC,EAAS,MAAMH,EAAM,YAAe,MAAS,GAE9DI,IAAOC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"PlElementListItem.vue2.js","sources":["../../../src/components/PlElementList/PlElementListItem.vue"],"sourcesContent":["<script generic=\"T extends unknown = unknown\" lang=\"ts\" setup>\nimport { computed } from 'vue';\nimport { PlIcon16 } from '../PlIcon16';\nimport { PlIcon24 } from '../PlIcon24';\n\nconst props = defineProps<{\n item: T;\n index: number;\n showDragHandle: boolean;\n isActive: boolean;\n isDraggable: boolean;\n isRemovable: boolean;\n isExpandable: boolean;\n isExpanded: boolean;\n isToggable: boolean;\n isToggled: boolean;\n isPinnable: boolean;\n isPinned: boolean;\n}>();\n\nconst slots = defineSlots<{\n title: (props: { item: T; index: number }) => unknown;\n content?: (props: { item: T; index: number }) => unknown;\n}>();\nconst hasContentSlot = computed(() => slots['content'] !== undefined);\n\nconst emit = defineEmits<{\n (e: 'expand', item: T, index: number): void;\n (e: 'toggle', item: T, index: number): void;\n (e: 'pin', item: T, index: number): void;\n (e: 'remove', item: T, index: number): void;\n}>();\n</script>\n\n<template>\n <div\n :class=\"[$style.root, {\n [$style.active]: props.isActive,\n [$style.pinned]: props.isPinned,\n [$style.disabled]: props.isToggled,\n }]\"\n >\n <div\n :class=\"[$style.head, {\n [$style.clickable]: hasContentSlot,\n }]\"\n @click=\"isExpandable && emit('expand', props.item, props.index)\"\n >\n <div\n v-if=\"props.showDragHandle\"\n :class=\"[$style.action, $style.draggable, { [$style.disable]: !props.isDraggable } ]\"\n :data-draggable=\"props.isDraggable\"\n >\n <PlIcon16 name=\"drag-dots\" />\n </div>\n <PlIcon16 v-if=\"isExpandable\" :class=\"[$style.contentChevron, { [$style.opened]: props.isExpanded }]\" name=\"chevron-down\" />\n\n <div :class=\"$style.title\">\n <slot name=\"title\" :item=\"props.item\" :index=\"props.index\" />\n </div>\n\n <div :class=\"[$style.actions, $style.showOnHover]\">\n <div\n v-if=\"props.isToggable\"\n :class=\"[$style.action, $style.clickable, { [$style.disable]: !props.isToggable }]\"\n @click.stop=\"emit('toggle', props.item, props.index)\"\n >\n <PlIcon24 :name=\"props.isToggled === true ? 'view-hide' : 'view-show'\" size=\"16\" />\n </div>\n <div\n v-if=\"props.isPinnable\"\n :class=\"[$style.action, $style.clickable, {\n [$style.disable]: !props.isPinnable,\n [$style.activated]: props.isPinned,\n }]\"\n @click.stop=\"emit('pin', props.item, props.index)\"\n >\n <PlIcon24 name=\"pin\" size=\"16\" />\n </div>\n <div\n v-if=\"props.isRemovable\"\n :class=\"[$style.action, $style.clickable]\"\n @click.stop=\"emit('remove', props.item, props.index)\"\n >\n <PlIcon16 name=\"close\" />\n </div>\n </div>\n </div>\n <div v-if=\"hasContentSlot && props.isExpanded\" :class=\"$style.body\">\n <slot name=\"content\" :item=\"props.item\" :index=\"props.index\" />\n </div>\n </div>\n</template>\n\n<style module>\n@use '../../assets/variables.scss' as *;\n\n.root {\n --background: rgba(255, 255, 255, 0.8);\n --border-color: var(--color-div-grey);\n --head-background: unset;\n --box-shadow: none;\n --box-shadow-active: 0 0 0 4px color-mix(in srgb, var(--border-color-focus) 50%, transparent);\n\n &:global(.sortable-drag),\n &:global(.sortable-chosen) {\n --head-background: var(--gradient-light-lime);\n --border-color: var(--border-color-focus);\n --box-shadow: var(--box-shadow-active)\n }\n}\n.root {\n display: flex;\n flex-direction: column;\n justify-content: center;\n border-radius: var(--border-radius);\n border: 1px solid var(--border-color);\n background-color: var(--background);\n transition: box-shadow 0.15s;\n box-shadow: var(--box-shadow);;\n overflow: hidden;\n\n &:hover {\n --border-color: var(--border-color-focus);\n }\n\n &.disabled {\n opacity: 0.6;\n filter: grayscale(1);\n }\n\n &.pinned {\n --background: var(--bg-base-light);\n }\n\n &.active {\n --border-color: var(--border-color-focus);\n --head-background: var(--btn-accent-positive-500);\n }\n}\n\n.head {\n position: relative;\n display: flex;\n align-items: center;\n padding: 8px;\n border-radius: var(--border-radius) var(--border-radius) 0 0;\n background: var(--head-background);\n\n &:hover, &.opened {\n --head-background: var(--gradient-light-lime);\n }\n}\n\n.contentChevron {\n display: block;\n width: 16px;\n height: 16px;\n margin-right: 4px;\n transform: rotate(-90deg);\n transition: transform 0.15s;\n\n &.opened {\n transform: rotate(0deg);\n }\n}\n\n.title {\n display: flex;\n flex-direction: row;\n flex: 1 1 0;\n gap: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.body {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 24px;\n border-radius: 0 0 var(--border-radius) var(--border-radius);\n}\n\n.actions {\n position: absolute;\n top: 8px;\n right: 8px;\n display: flex;\n align-items: center;\n background-color: var(--background);\n border-radius: var(--border-radius);\n}\n\n.action {\n width: 24px;\n height: 24px;\n padding: 4px; /* use padding instead of gap on parent, for better accessibility */\n opacity: 0.6;\n border-radius: var(--border-radius);\n transition: all 0.15s;\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n &:hover {\n opacity: 1;\n background-color: var(--bg-elevated-02);\n }\n\n &.activated {\n opacity: 0.8;\n }\n\n &.disable {\n cursor: not-allowed;\n opacity: 0.4;\n }\n}\n\n.clickable {\n cursor: pointer;\n}\n\n.draggable {\n cursor: grab;\n}\n\n.showOnHover {\n opacity: 0;\n transition: opacity 0.15s;\n}\n\n.root:hover .showOnHover {\n opacity: 1;\n}\n</style>\n"],"names":["props","__props","slots","_useSlots","hasContentSlot","computed","emit","__emit"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAKA,UAAMA,IAAQC,GAeRC,IAAQC,EAGV,GACEC,IAAiBC,EAAS,MAAMH,EAAM,YAAe,MAAS,GAE9DI,IAAOC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,39 +1,39 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('@use "../../assets/variables.scss" as *;._root_lt147_4{--background: rgba(255, 255, 255, .8);--border-color: var(--color-div-grey);--head-background: unset;--box-shadow: none;--box-shadow-active: 0 0 0 4px color-mix(in srgb, var(--border-color-focus) 50%, transparent)}._root_lt147_4.sortable-drag,._root_lt147_4.sortable-chosen{--head-background: var(--gradient-light-lime);--border-color: var(--border-color-focus);--box-shadow: var(--box-shadow-active) }._root_lt147_4{display:flex;flex-direction:column;justify-content:center;border-radius:var(--border-radius);border:1px solid var(--border-color);background-color:var(--background);transition:box-shadow .15s;box-shadow:var(--box-shadow);overflow:hidden}._root_lt147_4:hover{--border-color: var(--border-color-focus)}._root_lt147_4._disabled_lt147_33{opacity:.6;filter:grayscale(1)}._root_lt147_4._pinned_lt147_38{--background: var(--bg-base-light)}._root_lt147_4._active_lt147_42{--border-color: var(--border-color-focus);--head-background: var(--btn-accent-positive-500)}._head_lt147_48{position:relative;display:flex;align-items:center;padding:8px;border-radius:var(--border-radius) var(--border-radius) 0 0;background:var(--head-background)}._head_lt147_48:hover,._head_lt147_48._opened_lt147_56{--head-background: var(--gradient-light-lime)}._contentChevron_lt147_61{display:block;width:16px;height:16px;margin-right:4px;transform:rotate(-90deg);transition:transform .15s}._contentChevron_lt147_61._opened_lt147_56{transform:rotate(0)}._title_lt147_74{display:flex;flex-direction:row;gap:8px;max-width:calc(100% - 50px);overflow:hidden;text-overflow:ellipsis}._body_lt147_83{display:flex;flex-direction:column;gap:8px;padding:24px;border-radius:0 0 var(--border-radius) var(--border-radius)}._actions_lt147_91{position:absolute;top:8px;right:8px;display:flex;align-items:center;background-color:var(--background);border-radius:var(--border-radius)}._action_lt147_91{width:24px;height:24px;padding:4px;opacity:.6;border-radius:var(--border-radius);transition:all .15s}._action_lt147_91 svg{width:16px;height:16px}._action_lt147_91:hover{opacity:1;background-color:var(--bg-elevated-02)}._action_lt147_91._activated_lt147_119{opacity:.8}._action_lt147_91._disable_lt147_33{cursor:not-allowed;opacity:.4}._clickable_lt147_129{cursor:pointer}._draggable_lt147_133{cursor:grab}._showOnHover_lt147_137{opacity:0;transition:opacity .15s}._root_lt147_4:hover ._showOnHover_lt147_137{opacity:1}')),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- const t = "_root_lt147_4", o = "_disabled_lt147_33", _ = "_pinned_lt147_38", e = "_active_lt147_42", n = "_head_lt147_48", c = "_opened_lt147_56", l = "_contentChevron_lt147_61", a = "_title_lt147_74", s = "_body_lt147_83", d = "_actions_lt147_91", i = "_action_lt147_91", b = "_activated_lt147_119", r = "_disable_lt147_33", v = "_clickable_lt147_129", h = "_draggable_lt147_133", p = "_showOnHover_lt147_137", g = {
3
- root: t,
4
- disabled: o,
5
- pinned: _,
6
- active: e,
7
- head: n,
1
+ (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('@use "../../assets/variables.scss" as *;._root_1n01w_4{--background: rgba(255, 255, 255, .8);--border-color: var(--color-div-grey);--head-background: unset;--box-shadow: none;--box-shadow-active: 0 0 0 4px color-mix(in srgb, var(--border-color-focus) 50%, transparent)}._root_1n01w_4.sortable-drag,._root_1n01w_4.sortable-chosen{--head-background: var(--gradient-light-lime);--border-color: var(--border-color-focus);--box-shadow: var(--box-shadow-active) }._root_1n01w_4{display:flex;flex-direction:column;justify-content:center;border-radius:var(--border-radius);border:1px solid var(--border-color);background-color:var(--background);transition:box-shadow .15s;box-shadow:var(--box-shadow);overflow:hidden}._root_1n01w_4:hover{--border-color: var(--border-color-focus)}._root_1n01w_4._disabled_1n01w_33{opacity:.6;filter:grayscale(1)}._root_1n01w_4._pinned_1n01w_38{--background: var(--bg-base-light)}._root_1n01w_4._active_1n01w_42{--border-color: var(--border-color-focus);--head-background: var(--btn-accent-positive-500)}._head_1n01w_48{position:relative;display:flex;align-items:center;padding:8px;border-radius:var(--border-radius) var(--border-radius) 0 0;background:var(--head-background)}._head_1n01w_48:hover,._head_1n01w_48._opened_1n01w_56{--head-background: var(--gradient-light-lime)}._contentChevron_1n01w_61{display:block;width:16px;height:16px;margin-right:4px;transform:rotate(-90deg);transition:transform .15s}._contentChevron_1n01w_61._opened_1n01w_56{transform:rotate(0)}._title_1n01w_74{display:flex;flex-direction:row;flex:1 1 0;gap:8px;overflow:hidden;text-overflow:ellipsis}._body_1n01w_83{display:flex;flex-direction:column;gap:12px;padding:24px;border-radius:0 0 var(--border-radius) var(--border-radius)}._actions_1n01w_91{position:absolute;top:8px;right:8px;display:flex;align-items:center;background-color:var(--background);border-radius:var(--border-radius)}._action_1n01w_91{width:24px;height:24px;padding:4px;opacity:.6;border-radius:var(--border-radius);transition:all .15s}._action_1n01w_91 svg{width:16px;height:16px}._action_1n01w_91:hover{opacity:1;background-color:var(--bg-elevated-02)}._action_1n01w_91._activated_1n01w_119{opacity:.8}._action_1n01w_91._disable_1n01w_33{cursor:not-allowed;opacity:.4}._clickable_1n01w_129{cursor:pointer}._draggable_1n01w_133{cursor:grab}._showOnHover_1n01w_137{opacity:0;transition:opacity .15s}._root_1n01w_4:hover ._showOnHover_1n01w_137{opacity:1}')),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
+ const n = "_root_1n01w_4", t = "_disabled_1n01w_33", o = "_pinned_1n01w_38", _ = "_active_1n01w_42", e = "_head_1n01w_48", c = "_opened_1n01w_56", a = "_contentChevron_1n01w_61", s = "_title_1n01w_74", d = "_body_1n01w_83", i = "_actions_1n01w_91", l = "_action_1n01w_91", w = "_activated_1n01w_119", b = "_disable_1n01w_33", r = "_clickable_1n01w_129", v = "_draggable_1n01w_133", h = "_showOnHover_1n01w_137", p = {
3
+ root: n,
4
+ disabled: t,
5
+ pinned: o,
6
+ active: _,
7
+ head: e,
8
8
  opened: c,
9
- contentChevron: l,
10
- title: a,
11
- body: s,
12
- actions: d,
13
- action: i,
14
- activated: b,
15
- disable: r,
16
- clickable: v,
17
- draggable: h,
18
- showOnHover: p
9
+ contentChevron: a,
10
+ title: s,
11
+ body: d,
12
+ actions: i,
13
+ action: l,
14
+ activated: w,
15
+ disable: b,
16
+ clickable: r,
17
+ draggable: v,
18
+ showOnHover: h
19
19
  };
20
20
  export {
21
- i as action,
22
- d as actions,
23
- b as activated,
24
- e as active,
25
- s as body,
26
- v as clickable,
27
- l as contentChevron,
28
- g as default,
29
- r as disable,
30
- o as disabled,
31
- h as draggable,
32
- n as head,
21
+ l as action,
22
+ i as actions,
23
+ w as activated,
24
+ _ as active,
25
+ d as body,
26
+ r as clickable,
27
+ a as contentChevron,
28
+ p as default,
29
+ b as disable,
30
+ t as disabled,
31
+ v as draggable,
32
+ e as head,
33
33
  c as opened,
34
- _ as pinned,
35
- t as root,
36
- p as showOnHover,
37
- a as title
34
+ o as pinned,
35
+ n as root,
36
+ h as showOnHover,
37
+ s as title
38
38
  };
39
39
  //# sourceMappingURL=PlElementListItem.vue3.js.map