@caspeco/casper-ui-library 9.0.2 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -4
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/icon/icons/calendar-icon.d.ts +2 -0
- package/dist/components/icon/icons/calendar-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/calendar-icon.js +8 -0
- package/dist/components/icon/icons/cart-icon.js +1 -1
- package/dist/components/icon/icons/closed-icon.d.ts +2 -0
- package/dist/components/icon/icons/closed-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/closed-icon.js +8 -0
- package/dist/components/icon/icons/comment-add-icon.d.ts +2 -0
- package/dist/components/icon/icons/comment-add-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/comment-add-icon.js +8 -0
- package/dist/components/icon/icons/comment-icon.js +1 -1
- package/dist/components/icon/icons/deliverect-icon.d.ts +2 -0
- package/dist/components/icon/icons/deliverect-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/deliverect-icon.js +8 -0
- package/dist/components/icon/icons/door-closed-icon.d.ts +2 -0
- package/dist/components/icon/icons/door-closed-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/door-closed-icon.js +8 -0
- package/dist/components/icon/icons/door-open-icon.d.ts +2 -0
- package/dist/components/icon/icons/door-open-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/door-open-icon.js +8 -0
- package/dist/components/icon/icons/failed-print-icon.d.ts +2 -0
- package/dist/components/icon/icons/failed-print-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/failed-print-icon.js +8 -0
- package/dist/components/icon/icons/index.d.ts +27 -4
- package/dist/components/icon/icons/index.d.ts.map +1 -1
- package/dist/components/icon/icons/key-command-icon.d.ts +2 -0
- package/dist/components/icon/icons/key-command-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/key-command-icon.js +8 -0
- package/dist/components/icon/icons/key-enter-icon.d.ts +2 -0
- package/dist/components/icon/icons/key-enter-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/key-enter-icon.js +8 -0
- package/dist/components/icon/icons/key-option-icon.d.ts +2 -0
- package/dist/components/icon/icons/key-option-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/key-option-icon.js +8 -0
- package/dist/components/icon/icons/message-add-icon.d.ts +2 -0
- package/dist/components/icon/icons/message-add-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/message-add-icon.js +8 -0
- package/dist/components/icon/icons/message-icon.js +1 -1
- package/dist/components/icon/icons/message-lines-icon.d.ts +2 -0
- package/dist/components/icon/icons/message-lines-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/message-lines-icon.js +8 -0
- package/dist/components/icon/icons/module-home-icon.js +1 -1
- package/dist/components/icon/icons/no-cart-icon.d.ts +2 -0
- package/dist/components/icon/icons/no-cart-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/no-cart-icon.js +8 -0
- package/dist/components/icon/icons/note-icon.d.ts +2 -0
- package/dist/components/icon/icons/note-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/note-icon.js +8 -0
- package/dist/components/icon/icons/product-my-pages-icon.d.ts +2 -0
- package/dist/components/icon/icons/product-my-pages-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/product-my-pages-icon.js +8 -0
- package/dist/components/icon/icons/puck-icon.d.ts +2 -0
- package/dist/components/icon/icons/puck-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/puck-icon.js +8 -0
- package/dist/components/icon/icons/redo-icon.d.ts +2 -0
- package/dist/components/icon/icons/redo-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/redo-icon.js +8 -0
- package/dist/components/icon/icons/sidebar-hide-icon.d.ts +2 -0
- package/dist/components/icon/icons/sidebar-hide-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/sidebar-hide-icon.js +8 -0
- package/dist/components/icon/icons/sidebar-left-icon.d.ts +2 -0
- package/dist/components/icon/icons/sidebar-left-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/sidebar-left-icon.js +8 -0
- package/dist/components/icon/icons/sidebar-right-icon.d.ts +2 -0
- package/dist/components/icon/icons/sidebar-right-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/sidebar-right-icon.js +8 -0
- package/dist/components/icon/icons/sidebar-show-icon.d.ts +2 -0
- package/dist/components/icon/icons/sidebar-show-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/sidebar-show-icon.js +8 -0
- package/dist/components/icon/icons/swatch-icon.d.ts +2 -0
- package/dist/components/icon/icons/swatch-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/swatch-icon.js +8 -0
- package/dist/components/icon/icons/trivec-icon.d.ts +2 -0
- package/dist/components/icon/icons/trivec-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/trivec-icon.js +9 -0
- package/dist/components/icon/icons/waste-icon.d.ts +2 -0
- package/dist/components/icon/icons/waste-icon.d.ts.map +1 -0
- package/dist/components/icon/icons/waste-icon.js +8 -0
- package/dist/components/table/table-toolbar-settings.d.ts +15 -1
- package/dist/components/table/table-toolbar-settings.d.ts.map +1 -1
- package/dist/components/table/table-toolbar-settings.js +71 -44
- package/dist/components/table/table-toolbar-settings.spec.d.ts +2 -0
- package/dist/components/table/table-toolbar-settings.spec.d.ts.map +1 -0
- package/dist/components/table/table.constants.d.ts +2 -0
- package/dist/components/table/table.constants.d.ts.map +1 -0
- package/dist/components/table/table.constants.js +4 -0
- package/dist/components/table/translations.d.ts +14 -0
- package/dist/components/table/translations.d.ts.map +1 -1
- package/dist/components/table/translations.js +12 -0
- package/dist/index.js +727 -681
- package/dist/node_modules/@dnd-kit/abstract/index.js +502 -442
- package/dist/node_modules/@dnd-kit/dom/index.js +817 -779
- package/dist/node_modules/@dnd-kit/dom/sortable.js +260 -262
- package/dist/node_modules/@dnd-kit/dom/utilities.js +470 -463
- package/dist/node_modules/@dnd-kit/react/hooks.js +26 -26
- package/dist/node_modules/@dnd-kit/react/index.js +8 -1
- package/dist/node_modules/@dnd-kit/react/sortable.js +45 -46
- package/dist/node_modules/@preact/signals-core/dist/signals-core.module.js +11 -11
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +85 -73
- package/package.json +20 -18
- package/dist/components/icon/icons/tablet-icon.d.ts +0 -2
- package/dist/components/icon/icons/tablet-icon.d.ts.map +0 -1
- package/dist/components/icon/icons/tablet-icon.js +0 -8
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
import { useEffect as p, useRef as s, useLayoutEffect as w, useMemo as y, useState as E, useCallback as k } from "react";
|
|
2
2
|
import "../state/dist/index.js";
|
|
3
|
-
import { flushSync as
|
|
3
|
+
import { flushSync as M } from "react-dom";
|
|
4
4
|
import { currentValue as m } from "./utilities.js";
|
|
5
|
-
import { effect as
|
|
6
|
-
var
|
|
5
|
+
import { effect as O, untracked as S } from "../../@preact/signals-core/dist/signals-core.module.js";
|
|
6
|
+
var V = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", a = V ? w : p;
|
|
7
7
|
function L() {
|
|
8
8
|
const e = E(0)[1];
|
|
9
9
|
return k(() => {
|
|
10
10
|
e((t) => t + 1);
|
|
11
11
|
}, [e]);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function C(e, t) {
|
|
14
14
|
const n = s(/* @__PURE__ */ new Map()), r = L();
|
|
15
15
|
return a(() => {
|
|
16
16
|
if (!e) {
|
|
17
17
|
n.current.clear();
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
return
|
|
21
|
-
var
|
|
22
|
-
let c = !1,
|
|
23
|
-
for (const
|
|
24
|
-
const [f] =
|
|
25
|
-
|
|
20
|
+
return O(() => {
|
|
21
|
+
var u;
|
|
22
|
+
let c = !1, o = !1;
|
|
23
|
+
for (const l of n.current) {
|
|
24
|
+
const [f] = l, d = S(() => l[1]), i = e[f];
|
|
25
|
+
d !== i && (c = !0, n.current.set(f, i), o = (u = t?.(f, d, i)) != null ? u : !1);
|
|
26
26
|
}
|
|
27
|
-
c && (
|
|
27
|
+
c && (o ? queueMicrotask(() => M(r)) : r());
|
|
28
28
|
});
|
|
29
29
|
}, [e]), y(
|
|
30
30
|
() => e && new Proxy(e, {
|
|
31
|
-
get(
|
|
32
|
-
const
|
|
33
|
-
return n.current.set(c,
|
|
31
|
+
get(u, c) {
|
|
32
|
+
const o = u[c];
|
|
33
|
+
return n.current.set(c, o), o;
|
|
34
34
|
}
|
|
35
35
|
}),
|
|
36
36
|
[e]
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function D(e, t) {
|
|
40
40
|
e();
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function I(e) {
|
|
43
43
|
const t = s(e);
|
|
44
44
|
return a(() => {
|
|
45
45
|
t.current = e;
|
|
46
46
|
}, [e]), t;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
const
|
|
48
|
+
function R(e, t, n = p, r = Object.is) {
|
|
49
|
+
const u = s(e);
|
|
50
50
|
n(() => {
|
|
51
|
-
const c =
|
|
52
|
-
r(e, c) || (
|
|
51
|
+
const c = u.current;
|
|
52
|
+
r(e, c) || (u.current = e, t(e, c));
|
|
53
53
|
}, [t, e]);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function _(e, t) {
|
|
56
56
|
const n = s(m(e));
|
|
57
57
|
a(() => {
|
|
58
58
|
const r = m(e);
|
|
@@ -60,10 +60,10 @@ function j(e, t) {
|
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
C as useDeepSignal,
|
|
64
|
+
D as useImmediateEffect,
|
|
65
65
|
a as useIsomorphicLayoutEffect,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
I as useLatest,
|
|
67
|
+
_ as useOnElementChange,
|
|
68
|
+
R as useOnValueChange
|
|
69
69
|
};
|
|
@@ -60,7 +60,14 @@ function Wr(e) {
|
|
|
60
60
|
"onDragOver",
|
|
61
61
|
"onDragEnd"
|
|
62
62
|
]);
|
|
63
|
-
const p = b(null), {
|
|
63
|
+
const p = b(null), {
|
|
64
|
+
plugins: I,
|
|
65
|
+
modifiers: M,
|
|
66
|
+
sensors: w
|
|
67
|
+
} = f, m = R(I, k.plugins), E = R(w, k.sensors), v = R(
|
|
68
|
+
M,
|
|
69
|
+
k.modifiers
|
|
70
|
+
), y = h(a), _ = h(i), rr = h(c), er = h(u), tr = h(d), B = h(n), s = Er(() => {
|
|
64
71
|
var S;
|
|
65
72
|
return (S = f.manager) != null ? S : new W(f);
|
|
66
73
|
});
|
|
@@ -1,79 +1,78 @@
|
|
|
1
|
-
import { useCallback as
|
|
2
|
-
import { deepEqual as
|
|
1
|
+
import { useCallback as d } from "react";
|
|
2
|
+
import { deepEqual as p } from "../state/dist/index.js";
|
|
3
3
|
import { defaultSortableTransition as x, Sortable as R } from "../dom/sortable.js";
|
|
4
4
|
import { isSortable as rr } from "../dom/sortable.js";
|
|
5
5
|
import { useInstance as T } from "./index.js";
|
|
6
|
-
import { useDeepSignal as V, useOnValueChange as i, useIsomorphicLayoutEffect as
|
|
7
|
-
import { currentValue as
|
|
8
|
-
import { batch as
|
|
9
|
-
var
|
|
6
|
+
import { useDeepSignal as V, useOnValueChange as i, useIsomorphicLayoutEffect as q, useImmediateEffect as L, useOnElementChange as f } from "./hooks.js";
|
|
7
|
+
import { currentValue as m } from "./utilities.js";
|
|
8
|
+
import { batch as N } from "../../@preact/signals-core/dist/signals-core.module.js";
|
|
9
|
+
var U = Object.defineProperty, k = Object.defineProperties, z = Object.getOwnPropertyDescriptors, I = Object.getOwnPropertySymbols, A = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable, j = (o, t, a) => t in o ? U(o, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : o[t] = a, v = (o, t) => {
|
|
10
10
|
for (var a in t || (t = {}))
|
|
11
11
|
A.call(t, a) && j(o, a, t[a]);
|
|
12
12
|
if (I)
|
|
13
13
|
for (var a of I(t))
|
|
14
14
|
B.call(t, a) && j(o, a, t[a]);
|
|
15
15
|
return o;
|
|
16
|
-
}, F = (o, t) =>
|
|
16
|
+
}, F = (o, t) => k(o, z(t));
|
|
17
17
|
function Y(o) {
|
|
18
18
|
const {
|
|
19
19
|
accept: t,
|
|
20
20
|
collisionDetector: a,
|
|
21
|
-
collisionPriority:
|
|
22
|
-
id:
|
|
23
|
-
data:
|
|
24
|
-
element:
|
|
25
|
-
handle:
|
|
26
|
-
index:
|
|
27
|
-
group:
|
|
28
|
-
disabled:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} = o, l =
|
|
35
|
-
F(
|
|
21
|
+
collisionPriority: _,
|
|
22
|
+
id: b,
|
|
23
|
+
data: g,
|
|
24
|
+
element: O,
|
|
25
|
+
handle: h,
|
|
26
|
+
index: c,
|
|
27
|
+
group: y,
|
|
28
|
+
disabled: D,
|
|
29
|
+
modifiers: P,
|
|
30
|
+
sensors: S,
|
|
31
|
+
target: w,
|
|
32
|
+
type: C,
|
|
33
|
+
plugins: E
|
|
34
|
+
} = o, l = v(v({}, x), o.transition), r = T((e) => new R(
|
|
35
|
+
F(v({}, o), {
|
|
36
36
|
transition: l,
|
|
37
37
|
register: !1,
|
|
38
|
-
handle:
|
|
39
|
-
element:
|
|
40
|
-
target:
|
|
41
|
-
feedback: d
|
|
38
|
+
handle: m(h),
|
|
39
|
+
element: m(O),
|
|
40
|
+
target: m(w)
|
|
42
41
|
}),
|
|
43
42
|
e
|
|
44
43
|
)), u = V(r, G);
|
|
45
|
-
return i(
|
|
46
|
-
|
|
47
|
-
r.group =
|
|
44
|
+
return i(b, () => r.id = b), q(() => {
|
|
45
|
+
N(() => {
|
|
46
|
+
r.group = y, r.index = c;
|
|
48
47
|
});
|
|
49
|
-
}, [r,
|
|
48
|
+
}, [r, y, c]), i(C, () => r.type = C), i(
|
|
50
49
|
t,
|
|
51
50
|
() => r.accept = t,
|
|
52
51
|
void 0,
|
|
53
|
-
|
|
54
|
-
), i(
|
|
55
|
-
|
|
52
|
+
p
|
|
53
|
+
), i(g, () => g && (r.data = g)), i(
|
|
54
|
+
c,
|
|
56
55
|
() => {
|
|
57
56
|
var e;
|
|
58
57
|
(e = r.manager) != null && e.dragOperation.status.idle && l?.idle && r.refreshShape();
|
|
59
58
|
},
|
|
60
|
-
|
|
61
|
-
),
|
|
59
|
+
L
|
|
60
|
+
), f(h, (e) => r.handle = e), f(O, (e) => r.element = e), f(w, (e) => r.target = e), i(D, () => r.disabled = D === !0), i(S, () => r.sensors = S), i(
|
|
62
61
|
a,
|
|
63
62
|
() => r.collisionDetector = a
|
|
64
63
|
), i(
|
|
65
|
-
|
|
66
|
-
() => r.collisionPriority =
|
|
67
|
-
), i(
|
|
64
|
+
_,
|
|
65
|
+
() => r.collisionPriority = _
|
|
66
|
+
), i(E, () => r.plugins = E, void 0, p), i(
|
|
68
67
|
l,
|
|
69
68
|
() => r.transition = l,
|
|
70
69
|
void 0,
|
|
71
|
-
|
|
70
|
+
p
|
|
72
71
|
), i(
|
|
73
|
-
|
|
74
|
-
() => r.modifiers =
|
|
72
|
+
P,
|
|
73
|
+
() => r.modifiers = P,
|
|
75
74
|
void 0,
|
|
76
|
-
|
|
75
|
+
p
|
|
77
76
|
), i(
|
|
78
77
|
o.alignment,
|
|
79
78
|
() => r.alignment = o.alignment
|
|
@@ -91,27 +90,27 @@ function Y(o) {
|
|
|
91
90
|
get isDropTarget() {
|
|
92
91
|
return u.isDropTarget;
|
|
93
92
|
},
|
|
94
|
-
handleRef:
|
|
93
|
+
handleRef: d(
|
|
95
94
|
(e) => {
|
|
96
95
|
r.handle = e ?? void 0;
|
|
97
96
|
},
|
|
98
97
|
[r]
|
|
99
98
|
),
|
|
100
|
-
ref:
|
|
99
|
+
ref: d(
|
|
101
100
|
(e) => {
|
|
102
101
|
var n, s;
|
|
103
102
|
!e && ((n = r.element) != null && n.isConnected) && !((s = r.manager) != null && s.dragOperation.status.idle) || (r.element = e ?? void 0);
|
|
104
103
|
},
|
|
105
104
|
[r]
|
|
106
105
|
),
|
|
107
|
-
sourceRef:
|
|
106
|
+
sourceRef: d(
|
|
108
107
|
(e) => {
|
|
109
108
|
var n, s;
|
|
110
109
|
!e && ((n = r.source) != null && n.isConnected) && !((s = r.manager) != null && s.dragOperation.status.idle) || (r.source = e ?? void 0);
|
|
111
110
|
},
|
|
112
111
|
[r]
|
|
113
112
|
),
|
|
114
|
-
targetRef:
|
|
113
|
+
targetRef: d(
|
|
115
114
|
(e) => {
|
|
116
115
|
var n, s;
|
|
117
116
|
!e && ((n = r.target) != null && n.isConnected) && !((s = r.manager) != null && s.dragOperation.status.idle) || (r.target = e ?? void 0);
|
|
@@ -23,7 +23,7 @@ function l() {
|
|
|
23
23
|
if (d = 0, e--, i) throw t;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function C(t) {
|
|
27
27
|
if (e > 0) return t();
|
|
28
28
|
p = ++U, e++;
|
|
29
29
|
try {
|
|
@@ -78,7 +78,7 @@ f.prototype.U = function(t) {
|
|
|
78
78
|
};
|
|
79
79
|
f.prototype.subscribe = function(t) {
|
|
80
80
|
var i = this;
|
|
81
|
-
return
|
|
81
|
+
return O(function() {
|
|
82
82
|
var o = i.value, r = n;
|
|
83
83
|
n = void 0;
|
|
84
84
|
try {
|
|
@@ -122,7 +122,7 @@ Object.defineProperty(f.prototype, "value", { get: function() {
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
} });
|
|
125
|
-
function
|
|
125
|
+
function j(t, i) {
|
|
126
126
|
return new f(t, i);
|
|
127
127
|
}
|
|
128
128
|
function m(t) {
|
|
@@ -189,7 +189,7 @@ Object.defineProperty(h.prototype, "value", { get: function() {
|
|
|
189
189
|
if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
|
|
190
190
|
return this.v;
|
|
191
191
|
} });
|
|
192
|
-
function
|
|
192
|
+
function k(t, i) {
|
|
193
193
|
return new h(t, i);
|
|
194
194
|
}
|
|
195
195
|
function g(t) {
|
|
@@ -211,7 +211,7 @@ function y(t) {
|
|
|
211
211
|
for (var i = t.s; i !== void 0; i = i.n) i.S.U(i);
|
|
212
212
|
t.x = void 0, t.s = void 0, g(t);
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function N(t) {
|
|
215
215
|
if (n !== this) throw new Error("Out-of-order effect");
|
|
216
216
|
b(this), n = t, this.f &= -2, 8 & this.f && y(this), l();
|
|
217
217
|
}
|
|
@@ -232,7 +232,7 @@ v.prototype.S = function() {
|
|
|
232
232
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
233
233
|
this.f |= 1, this.f &= -9, g(this), x(this), e++;
|
|
234
234
|
var t = n;
|
|
235
|
-
return n = this,
|
|
235
|
+
return n = this, N.bind(this, t);
|
|
236
236
|
};
|
|
237
237
|
v.prototype.N = function() {
|
|
238
238
|
2 & this.f || (this.f |= 2, this.u = u, u = this);
|
|
@@ -243,7 +243,7 @@ v.prototype.d = function() {
|
|
|
243
243
|
v.prototype.dispose = function() {
|
|
244
244
|
this.d();
|
|
245
245
|
};
|
|
246
|
-
function
|
|
246
|
+
function O(t, i) {
|
|
247
247
|
var o = new v(t, i);
|
|
248
248
|
try {
|
|
249
249
|
o.c();
|
|
@@ -257,9 +257,9 @@ export {
|
|
|
257
257
|
h as Computed,
|
|
258
258
|
v as Effect,
|
|
259
259
|
f as Signal,
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
260
|
+
C as batch,
|
|
261
|
+
k as computed,
|
|
262
|
+
O as effect,
|
|
263
|
+
j as signal,
|
|
264
264
|
S as untracked
|
|
265
265
|
};
|