@blocklet/labels 1.5.103 → 1.5.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +83 -89
- package/dist/index.umd.js +3 -3
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
import { createContext as q, useRef as D, useState as z, useCallback as k, useEffect as W, useMemo as T, useContext as H } from "react";
|
|
2
|
-
import R from "@mui/icons-material
|
|
2
|
+
import { ExpandMore as R, Translate as X, Add as ee, EditOutlined as te, DeleteOutlineOutlined as ne, Edit as re, LabelOutlined as oe } from "@mui/icons-material";
|
|
3
3
|
import p from "@mui/material/Box";
|
|
4
4
|
import { styled as J } from "@mui/material/styles";
|
|
5
|
-
import { Tree as
|
|
6
|
-
import { Icon as
|
|
5
|
+
import { Tree as le } from "react-arborist";
|
|
6
|
+
import { Icon as ie } from "@iconify/react";
|
|
7
7
|
import { jsx as n, jsxs as C, Fragment as P } from "react/jsx-runtime";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
8
|
+
import ae from "lodash/omit";
|
|
9
|
+
import se, { components as _ } from "react-select";
|
|
10
|
+
import ce from "@mui/material/Typography";
|
|
11
11
|
import A from "@mui/material/Button";
|
|
12
12
|
import E from "@mui/material/IconButton";
|
|
13
|
-
import oe from "@mui/icons-material/DeleteOutlineOutlined";
|
|
14
|
-
import le from "@mui/icons-material/EditOutlined";
|
|
15
|
-
import ie from "@mui/icons-material/Add";
|
|
16
13
|
import j from "@mui/material/TextField";
|
|
17
14
|
import $ from "@mui/material/ClickAwayListener";
|
|
18
|
-
import { GithubPicker as
|
|
15
|
+
import { GithubPicker as de } from "react-color";
|
|
19
16
|
import K from "@arcblock/ux/lib/Dialog";
|
|
20
|
-
import { TextField as V, InputAdornment as
|
|
21
|
-
import
|
|
22
|
-
import ue from "@mui/material/Popover";
|
|
17
|
+
import { TextField as V, InputAdornment as ue, IconButton as he, Box as B } from "@mui/material";
|
|
18
|
+
import pe from "@mui/material/Popover";
|
|
23
19
|
import { useLocaleContext as Q } from "@arcblock/ux/lib/Locale/context";
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import me from "@mui/icons-material/LabelOutlined";
|
|
27
|
-
import fe from "@mui/material/Chip";
|
|
20
|
+
import fe from "@mui/material/Alert";
|
|
21
|
+
import me from "@mui/material/Chip";
|
|
28
22
|
const ge = (e) => /* @__PURE__ */ n("svg", {
|
|
29
23
|
viewBox: "0 0 24 24",
|
|
30
24
|
width: "1.2em",
|
|
@@ -98,7 +92,7 @@ function be({
|
|
|
98
92
|
renderItem: i
|
|
99
93
|
} = H(Y), {
|
|
100
94
|
data: s
|
|
101
|
-
} = e, h = s.icon ? /* @__PURE__ */ n(
|
|
95
|
+
} = e, h = s.icon ? /* @__PURE__ */ n(ie, {
|
|
102
96
|
icon: s.icon,
|
|
103
97
|
style: {
|
|
104
98
|
fontSize: 18
|
|
@@ -110,7 +104,7 @@ function be({
|
|
|
110
104
|
}
|
|
111
105
|
}), g = (d) => {
|
|
112
106
|
d.stopPropagation(), e.isInternal && e.toggle();
|
|
113
|
-
},
|
|
107
|
+
}, f = (d) => {
|
|
114
108
|
d.stopPropagation(), o && l(e.id);
|
|
115
109
|
}, x = /* @__PURE__ */ C(P, {
|
|
116
110
|
children: [/* @__PURE__ */ C(p, {
|
|
@@ -154,7 +148,7 @@ function be({
|
|
|
154
148
|
justifyContent: "space-between"
|
|
155
149
|
},
|
|
156
150
|
ref: a,
|
|
157
|
-
onClick:
|
|
151
|
+
onClick: f,
|
|
158
152
|
children: [!i && x, !!i && i(x, e.data)]
|
|
159
153
|
});
|
|
160
154
|
}
|
|
@@ -182,7 +176,7 @@ function F({
|
|
|
182
176
|
sx: i,
|
|
183
177
|
...s
|
|
184
178
|
}) {
|
|
185
|
-
const h = D(), g = [...Array.isArray(i) ? i : [i]], [
|
|
179
|
+
const h = D(), g = [...Array.isArray(i) ? i : [i]], [f, x] = z(0), d = k(() => {
|
|
186
180
|
var u, v;
|
|
187
181
|
x((((v = (u = h.current) == null ? void 0 : u.visibleNodes) == null ? void 0 : v.length) || 0) * l);
|
|
188
182
|
}, [l]);
|
|
@@ -196,10 +190,10 @@ function F({
|
|
|
196
190
|
children: /* @__PURE__ */ n(Se, {
|
|
197
191
|
...s,
|
|
198
192
|
sx: g,
|
|
199
|
-
children: /* @__PURE__ */ n(
|
|
193
|
+
children: /* @__PURE__ */ n(le, {
|
|
200
194
|
data: e,
|
|
201
195
|
rowHeight: l,
|
|
202
|
-
height:
|
|
196
|
+
height: f,
|
|
203
197
|
indent: 32,
|
|
204
198
|
ref: h,
|
|
205
199
|
onToggle: () => {
|
|
@@ -244,7 +238,7 @@ const O = (e) => e.reduce((t, a) => {
|
|
|
244
238
|
};
|
|
245
239
|
return /* @__PURE__ */ C(P, {
|
|
246
240
|
children: [/* @__PURE__ */ n(_.MenuList, {
|
|
247
|
-
...
|
|
241
|
+
...ae(e, ["addon"]),
|
|
248
242
|
children: /* @__PURE__ */ n(p, {
|
|
249
243
|
sx: {
|
|
250
244
|
px: 2,
|
|
@@ -317,20 +311,20 @@ function Ae({
|
|
|
317
311
|
maxHeight: s = 264,
|
|
318
312
|
...h
|
|
319
313
|
}) {
|
|
320
|
-
const g = D(null),
|
|
321
|
-
data:
|
|
322
|
-
label:
|
|
323
|
-
value:
|
|
324
|
-
})), [e]), x =
|
|
325
|
-
...
|
|
314
|
+
const g = D(null), f = T(() => O(e).map((m) => ({
|
|
315
|
+
data: m,
|
|
316
|
+
label: m.name,
|
|
317
|
+
value: m.id
|
|
318
|
+
})), [e]), x = f.reduce((m, I) => ({
|
|
319
|
+
...m,
|
|
326
320
|
[I.data.id]: I
|
|
327
|
-
}), {}), d = Array.isArray(t) ? t : [t], b = d.map((
|
|
328
|
-
prev: d.map((
|
|
321
|
+
}), {}), d = Array.isArray(t) ? t : [t], b = d.map((m) => x[m]), u = D({
|
|
322
|
+
prev: d.map((m) => {
|
|
329
323
|
var I;
|
|
330
|
-
return ((I = x[
|
|
324
|
+
return ((I = x[m]) == null ? void 0 : I.data) || "";
|
|
331
325
|
})
|
|
332
|
-
}), v = (
|
|
333
|
-
!i || !Array.isArray(
|
|
326
|
+
}), v = (m, I) => {
|
|
327
|
+
!i || !Array.isArray(m) ? l(m ? [m.data] : []) : u.current.current = m.map((c) => c.data), ["clear", "remove-value"].includes(I.action) && g.current && setTimeout(() => {
|
|
334
328
|
var c;
|
|
335
329
|
return (c = g == null ? void 0 : g.current) == null ? void 0 : c.blur();
|
|
336
330
|
}, 1);
|
|
@@ -339,14 +333,14 @@ function Ae({
|
|
|
339
333
|
};
|
|
340
334
|
return /* @__PURE__ */ n(p, {
|
|
341
335
|
...h,
|
|
342
|
-
children: /* @__PURE__ */ n(
|
|
336
|
+
children: /* @__PURE__ */ n(se, {
|
|
343
337
|
ref: g,
|
|
344
338
|
defaultValue: b,
|
|
345
|
-
options:
|
|
339
|
+
options: f,
|
|
346
340
|
onChange: v,
|
|
347
341
|
components: {
|
|
348
|
-
MenuList: (
|
|
349
|
-
...
|
|
342
|
+
MenuList: (m) => /* @__PURE__ */ n(ze, {
|
|
343
|
+
...m,
|
|
350
344
|
addon: o
|
|
351
345
|
}),
|
|
352
346
|
...r && {
|
|
@@ -356,23 +350,23 @@ function Ae({
|
|
|
356
350
|
placeholder: "Select labels",
|
|
357
351
|
styles: {
|
|
358
352
|
...r && ke,
|
|
359
|
-
menu: (
|
|
360
|
-
...
|
|
353
|
+
menu: (m) => ({
|
|
354
|
+
...m,
|
|
361
355
|
...a && {
|
|
362
356
|
paddingBottom: "36px"
|
|
363
357
|
},
|
|
364
358
|
zIndex: 99
|
|
365
359
|
}),
|
|
366
|
-
menuList: (
|
|
367
|
-
...
|
|
360
|
+
menuList: (m) => ({
|
|
361
|
+
...m,
|
|
368
362
|
overflowY: "auto",
|
|
369
363
|
maxHeight: `${s}px`
|
|
370
364
|
})
|
|
371
365
|
},
|
|
372
|
-
theme: (
|
|
373
|
-
...
|
|
366
|
+
theme: (m) => ({
|
|
367
|
+
...m,
|
|
374
368
|
colors: {
|
|
375
|
-
...
|
|
369
|
+
...m.colors,
|
|
376
370
|
primary25: "#ddd",
|
|
377
371
|
primary50: "#ddd",
|
|
378
372
|
primary: "#ddd"
|
|
@@ -438,22 +432,22 @@ function Ee({
|
|
|
438
432
|
} = Q(), {
|
|
439
433
|
translation: o,
|
|
440
434
|
onChange: l
|
|
441
|
-
} = e, [r, i] = z(null), s = (
|
|
442
|
-
const x =
|
|
435
|
+
} = e, [r, i] = z(null), s = (f) => {
|
|
436
|
+
const x = f.currentTarget.closest(".MuiInputBase-root");
|
|
443
437
|
x && i(x);
|
|
444
438
|
}, h = () => {
|
|
445
439
|
i(null);
|
|
446
|
-
}, g = a.filter((
|
|
440
|
+
}, g = a.filter((f) => f.code !== "en");
|
|
447
441
|
return /* @__PURE__ */ n(V, {
|
|
448
442
|
...t,
|
|
449
443
|
InputProps: {
|
|
450
|
-
endAdornment: /* @__PURE__ */ C(
|
|
444
|
+
endAdornment: /* @__PURE__ */ C(ue, {
|
|
451
445
|
position: "end",
|
|
452
|
-
children: [/* @__PURE__ */ n(
|
|
446
|
+
children: [/* @__PURE__ */ n(he, {
|
|
453
447
|
edge: "end",
|
|
454
448
|
onClick: s,
|
|
455
|
-
children: /* @__PURE__ */ n(
|
|
456
|
-
}), /* @__PURE__ */ n(
|
|
449
|
+
children: /* @__PURE__ */ n(X, {})
|
|
450
|
+
}), /* @__PURE__ */ n(pe, {
|
|
457
451
|
open: !!r,
|
|
458
452
|
anchorEl: r,
|
|
459
453
|
onClose: h,
|
|
@@ -482,7 +476,7 @@ function Ee({
|
|
|
482
476
|
p: 2
|
|
483
477
|
},
|
|
484
478
|
children: g.map(({
|
|
485
|
-
code:
|
|
479
|
+
code: f,
|
|
486
480
|
name: x
|
|
487
481
|
}) => /* @__PURE__ */ C(B, {
|
|
488
482
|
sx: {
|
|
@@ -503,18 +497,18 @@ function Ee({
|
|
|
503
497
|
flex: 1
|
|
504
498
|
},
|
|
505
499
|
children: /* @__PURE__ */ n(V, {
|
|
506
|
-
value: o[
|
|
500
|
+
value: o[f] || "",
|
|
507
501
|
size: "small",
|
|
508
502
|
sx: {
|
|
509
503
|
width: 1
|
|
510
504
|
},
|
|
511
505
|
onChange: (d) => l({
|
|
512
506
|
...o,
|
|
513
|
-
[
|
|
507
|
+
[f]: d.target.value
|
|
514
508
|
})
|
|
515
509
|
})
|
|
516
510
|
})]
|
|
517
|
-
},
|
|
511
|
+
}, f))
|
|
518
512
|
})
|
|
519
513
|
})]
|
|
520
514
|
})
|
|
@@ -533,7 +527,7 @@ function Le({
|
|
|
533
527
|
color: (t == null ? void 0 : t.color) || "#ddd",
|
|
534
528
|
slug: (t == null ? void 0 : t.id) || "",
|
|
535
529
|
translation: (t == null ? void 0 : t.translation) || {}
|
|
536
|
-
}), h = (v) => /^#([0-9A-F]{3}){1,2}$/i.test(v), g = T(() => r ? i.name && i.color && i.slug && h(i.color) : i.name && i.color && h(i.color), [i, r]), [
|
|
530
|
+
}), h = (v) => /^#([0-9A-F]{3}){1,2}$/i.test(v), g = T(() => r ? i.name && i.color && i.slug && h(i.color) : i.name && i.color && h(i.color), [i, r]), [f, x] = z(!1), d = () => {
|
|
537
531
|
a({
|
|
538
532
|
...t,
|
|
539
533
|
name: i.name,
|
|
@@ -648,13 +642,13 @@ function Le({
|
|
|
648
642
|
}
|
|
649
643
|
}
|
|
650
644
|
})]
|
|
651
|
-
}),
|
|
645
|
+
}), f && /* @__PURE__ */ n(p, {
|
|
652
646
|
sx: {
|
|
653
647
|
position: "absolute",
|
|
654
648
|
top: 48,
|
|
655
649
|
zIndex: 1
|
|
656
650
|
},
|
|
657
|
-
children: /* @__PURE__ */ n(
|
|
651
|
+
children: /* @__PURE__ */ n(de, {
|
|
658
652
|
color: i.color,
|
|
659
653
|
onChangeComplete: b
|
|
660
654
|
})
|
|
@@ -696,7 +690,7 @@ function Me({
|
|
|
696
690
|
children: /* @__PURE__ */ C(p, {
|
|
697
691
|
width: 600,
|
|
698
692
|
minHeight: 280,
|
|
699
|
-
children: [/* @__PURE__ */ n(
|
|
693
|
+
children: [/* @__PURE__ */ n(fe, {
|
|
700
694
|
severity: "info",
|
|
701
695
|
sx: {
|
|
702
696
|
mb: 2
|
|
@@ -760,12 +754,12 @@ function De({
|
|
|
760
754
|
})]
|
|
761
755
|
});
|
|
762
756
|
}
|
|
763
|
-
function
|
|
757
|
+
function lt({
|
|
764
758
|
data: e,
|
|
765
759
|
api: t,
|
|
766
760
|
...a
|
|
767
761
|
}) {
|
|
768
|
-
const [o, l] = z(null), [r, i] = z(null), [s, h] = z(Z(e)), g = T(() => O(s), [s]),
|
|
762
|
+
const [o, l] = z(null), [r, i] = z(null), [s, h] = z(Z(e)), g = T(() => O(s), [s]), f = T(() => {
|
|
769
763
|
const c = (y, w) => y.map((S) => (w && (S.parent = w), S.children && (S.children = c(S.children, S)), S));
|
|
770
764
|
return c(s);
|
|
771
765
|
}, [s]), x = (c) => {
|
|
@@ -809,7 +803,7 @@ function ut({
|
|
|
809
803
|
translation: JSON.stringify(S),
|
|
810
804
|
parentId: y == null ? void 0 : y.id
|
|
811
805
|
}), d(c)), l(null);
|
|
812
|
-
},
|
|
806
|
+
}, m = async () => {
|
|
813
807
|
!r || (await t.deleteLabel(r.id), b(r), i(null));
|
|
814
808
|
}, I = (c, y) => /* @__PURE__ */ C(P, {
|
|
815
809
|
children: [/* @__PURE__ */ C(p, {
|
|
@@ -852,7 +846,7 @@ function ut({
|
|
|
852
846
|
color: "grey.500"
|
|
853
847
|
},
|
|
854
848
|
onClick: () => u(y),
|
|
855
|
-
children: /* @__PURE__ */ n(
|
|
849
|
+
children: /* @__PURE__ */ n(ee, {
|
|
856
850
|
sx: {
|
|
857
851
|
fontSize: 20
|
|
858
852
|
}
|
|
@@ -864,7 +858,7 @@ function ut({
|
|
|
864
858
|
color: "grey.500"
|
|
865
859
|
},
|
|
866
860
|
onClick: () => v(y),
|
|
867
|
-
children: /* @__PURE__ */ n(
|
|
861
|
+
children: /* @__PURE__ */ n(te, {
|
|
868
862
|
sx: {
|
|
869
863
|
fontSize: 18
|
|
870
864
|
}
|
|
@@ -876,7 +870,7 @@ function ut({
|
|
|
876
870
|
color: "grey.500"
|
|
877
871
|
},
|
|
878
872
|
onClick: () => i(y),
|
|
879
|
-
children: /* @__PURE__ */ n(
|
|
873
|
+
children: /* @__PURE__ */ n(ne, {
|
|
880
874
|
sx: {
|
|
881
875
|
fontSize: 20
|
|
882
876
|
}
|
|
@@ -893,7 +887,7 @@ function ut({
|
|
|
893
887
|
alignItems: "center",
|
|
894
888
|
justifyContent: "space-between"
|
|
895
889
|
},
|
|
896
|
-
children: [/* @__PURE__ */ n(
|
|
890
|
+
children: [/* @__PURE__ */ n(ce, {
|
|
897
891
|
component: "h2",
|
|
898
892
|
variant: "h6",
|
|
899
893
|
children: "Manage labels"
|
|
@@ -929,7 +923,7 @@ function ut({
|
|
|
929
923
|
pt: 0.5
|
|
930
924
|
},
|
|
931
925
|
children: /* @__PURE__ */ n(je, {
|
|
932
|
-
data:
|
|
926
|
+
data: f,
|
|
933
927
|
selected: [],
|
|
934
928
|
renderItem: I,
|
|
935
929
|
rowHeight: 64
|
|
@@ -944,11 +938,11 @@ function ut({
|
|
|
944
938
|
open: !!r,
|
|
945
939
|
onClose: () => i(null),
|
|
946
940
|
label: r,
|
|
947
|
-
onSubmit:
|
|
941
|
+
onSubmit: m
|
|
948
942
|
}, r == null ? void 0 : r.id)]
|
|
949
943
|
});
|
|
950
944
|
}
|
|
951
|
-
const G = q({}), U = () => H(G),
|
|
945
|
+
const G = q({}), U = () => H(G), it = () => {
|
|
952
946
|
const {
|
|
953
947
|
updateLabels: e
|
|
954
948
|
} = U();
|
|
@@ -956,7 +950,7 @@ const G = q({}), U = () => H(G), ht = () => {
|
|
|
956
950
|
e();
|
|
957
951
|
}, []);
|
|
958
952
|
};
|
|
959
|
-
function
|
|
953
|
+
function at({
|
|
960
954
|
fetchLabels: e,
|
|
961
955
|
children: t
|
|
962
956
|
}) {
|
|
@@ -1004,7 +998,7 @@ function pt({
|
|
|
1004
998
|
}, [a]), s = k((d) => d.filter(Boolean).map((b) => r[b]).map(i), [r, i]), h = k((d) => (d == null ? void 0 : d.split(",")) || [], []), g = k((d = []) => {
|
|
1005
999
|
if (!!(d != null && d.length))
|
|
1006
1000
|
return d.join(",");
|
|
1007
|
-
}, []),
|
|
1001
|
+
}, []), f = T(() => o.labels.map(i), [o.labels, i]), x = T(() => ({
|
|
1008
1002
|
loading: o.loading,
|
|
1009
1003
|
labels: o.labels || [],
|
|
1010
1004
|
updateLabels: () => l((d) => ({
|
|
@@ -1014,15 +1008,15 @@ function pt({
|
|
|
1014
1008
|
getLabelsById: s,
|
|
1015
1009
|
parseLabelIds: h,
|
|
1016
1010
|
stringifyLabelIds: g,
|
|
1017
|
-
localizedLabels:
|
|
1018
|
-
flattenedLabels: O(
|
|
1019
|
-
}), [o, s, h, g,
|
|
1011
|
+
localizedLabels: f,
|
|
1012
|
+
flattenedLabels: O(f || [])
|
|
1013
|
+
}), [o, s, h, g, f]);
|
|
1020
1014
|
return /* @__PURE__ */ n(G.Provider, {
|
|
1021
1015
|
value: x,
|
|
1022
1016
|
children: t
|
|
1023
1017
|
});
|
|
1024
1018
|
}
|
|
1025
|
-
function
|
|
1019
|
+
function st({
|
|
1026
1020
|
labels: e,
|
|
1027
1021
|
editable: t,
|
|
1028
1022
|
onChange: a,
|
|
@@ -1033,17 +1027,17 @@ function mt({
|
|
|
1033
1027
|
labels: i,
|
|
1034
1028
|
loading: s,
|
|
1035
1029
|
getLabelsById: h
|
|
1036
|
-
} = U(), [g,
|
|
1030
|
+
} = U(), [g, f] = z(!1);
|
|
1037
1031
|
if (s || !t && r)
|
|
1038
1032
|
return null;
|
|
1039
1033
|
const x = (u) => {
|
|
1040
1034
|
a == null || a(u), setTimeout(() => {
|
|
1041
|
-
|
|
1035
|
+
f(!1);
|
|
1042
1036
|
}, 300);
|
|
1043
1037
|
};
|
|
1044
1038
|
if (g)
|
|
1045
1039
|
return /* @__PURE__ */ n($, {
|
|
1046
|
-
onClickAway: () => g &&
|
|
1040
|
+
onClickAway: () => g && f(!1),
|
|
1047
1041
|
children: /* @__PURE__ */ n("div", {
|
|
1048
1042
|
children: /* @__PURE__ */ n(Ae, {
|
|
1049
1043
|
data: i,
|
|
@@ -1060,7 +1054,7 @@ function mt({
|
|
|
1060
1054
|
}, ...Array.isArray(o) ? o : [o]];
|
|
1061
1055
|
return /* @__PURE__ */ C(p, {
|
|
1062
1056
|
sx: b,
|
|
1063
|
-
children: [d.map((u) => u ? l ? l(u) : /* @__PURE__ */ n(
|
|
1057
|
+
children: [d.map((u) => u ? l ? l(u) : /* @__PURE__ */ n(me, {
|
|
1064
1058
|
label: u.name,
|
|
1065
1059
|
variant: "filled",
|
|
1066
1060
|
size: "small",
|
|
@@ -1070,11 +1064,11 @@ function mt({
|
|
|
1070
1064
|
}, u.id) : null), t && !r && /* @__PURE__ */ n(E, {
|
|
1071
1065
|
color: "inherit",
|
|
1072
1066
|
size: "small",
|
|
1073
|
-
onClick: () =>
|
|
1067
|
+
onClick: () => f(!0),
|
|
1074
1068
|
sx: {
|
|
1075
1069
|
color: "grey.400"
|
|
1076
1070
|
},
|
|
1077
|
-
children: /* @__PURE__ */ n(
|
|
1071
|
+
children: /* @__PURE__ */ n(re, {
|
|
1078
1072
|
sx: {
|
|
1079
1073
|
fontSize: 20
|
|
1080
1074
|
}
|
|
@@ -1082,19 +1076,19 @@ function mt({
|
|
|
1082
1076
|
}), t && r && /* @__PURE__ */ n(A, {
|
|
1083
1077
|
color: "inherit",
|
|
1084
1078
|
variant: "outlined",
|
|
1085
|
-
startIcon: /* @__PURE__ */ n(
|
|
1086
|
-
onClick: () =>
|
|
1079
|
+
startIcon: /* @__PURE__ */ n(oe, {}),
|
|
1080
|
+
onClick: () => f(!0),
|
|
1087
1081
|
children: "Edit labels"
|
|
1088
1082
|
})]
|
|
1089
1083
|
});
|
|
1090
1084
|
}
|
|
1091
1085
|
export {
|
|
1092
|
-
|
|
1086
|
+
lt as LabelManager,
|
|
1093
1087
|
Ae as LabelPicker,
|
|
1094
1088
|
F as LabelTree,
|
|
1095
|
-
|
|
1096
|
-
|
|
1089
|
+
st as Labels,
|
|
1090
|
+
at as LabelsProvider,
|
|
1097
1091
|
Ie as transformLabels,
|
|
1098
1092
|
U as useLabelsContext,
|
|
1099
|
-
|
|
1093
|
+
it as useLabelsUpdateOnDestroy
|
|
1100
1094
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(f,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react"),require("@mui/icons-material"),require("@mui/material/Box"),require("@mui/material/styles"),require("react-arborist"),require("@iconify/react"),require("react/jsx-runtime"),require("lodash/omit"),require("react-select"),require("@mui/material/Typography"),require("@mui/material/Button"),require("@mui/material/IconButton"),require("@mui/material/TextField"),require("@mui/material/ClickAwayListener"),require("react-color"),require("@arcblock/ux/lib/Dialog"),require("@mui/material"),require("@mui/material/Popover"),require("@arcblock/ux/lib/Locale/context"),require("@mui/material/Alert"),require("@mui/material/Chip")):typeof define=="function"&&define.amd?define(["exports","react","@mui/icons-material","@mui/material/Box","@mui/material/styles","react-arborist","@iconify/react","react/jsx-runtime","lodash/omit","react-select","@mui/material/Typography","@mui/material/Button","@mui/material/IconButton","@mui/material/TextField","@mui/material/ClickAwayListener","react-color","@arcblock/ux/lib/Dialog","@mui/material","@mui/material/Popover","@arcblock/ux/lib/Locale/context","@mui/material/Alert","@mui/material/Chip"],c):(f=typeof globalThis<"u"?globalThis:f||self,c(f.DiscussKitComponents={},f.React,f.iconsMaterial,f.Box,f.styles,f.reactArborist,f.react$1,f.jsxRuntime,f.omit,f.Select,f.Typography,f.Button,f.IconButton,f.TextField,f.ClickAwayListener,f.reactColor,f.Dialog,f.material,f.Popover,f.context,f.Alert,f.Chip))})(this,function(f,c,z,U,F,Y,Z,e,G,N,X,R,ee,te,re,ne,le,_,oe,j,ae,se){"use strict";const T=t=>t&&typeof t=="object"&&"default"in t?t:{default:t},p=T(U),ie=T(G),de=T(N),ce=T(X),A=T(R),q=T(ee),E=T(te),W=T(re),V=T(le),ue=T(oe),fe=T(ae),he=T(se),pe=t=>e.jsx("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...t,children:e.jsx("path",{fill:"currentColor",d:"M5 19q-.825 0-1.413-.587Q3 17.825 3 17V7q0-.825.587-1.412Q4.175 5 5 5h10q.5 0 .938.225q.437.225.712.625l3.525 5q.375.525.375 1.15q0 .625-.375 1.15l-3.525 5q-.275.4-.712.625Q15.5 19 15 19Z"})}),ge=t=>e.jsx("svg",{viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...t,children:e.jsx("path",{fill:"currentColor",d:"m10 16.4l-4-4L7.4 11l2.6 2.6L16.6 7L18 8.4Z"})}),H=c.createContext({});function ye({selectable:t=!1,selected:r=[],onSelect:s,renderItem:l,children:o}){const n=g=>r.indexOf(g)!==-1,a=g=>{Array.from(new Set(r).add(g)),s==null||s(g)},i=c.useMemo(()=>({selectable:t,selected:r,isSelected:n,select:a,renderItem:l}),[r]);return e.jsx(H.Provider,{value:i,children:o})}const xe=t=>{var r;return t.isLeaf||!((r=t.data.children)!=null&&r.length)};function me({node:t}){return xe(t)?e.jsx("span",{}):t.isOpen?e.jsx(z.ExpandMore,{style:{fontSize:20}}):e.jsx(z.ExpandMore,{style:{fontSize:20,transform:"rotate(-90deg)"}})}function Ce({node:t,style:r,dragHandle:s}){const{selectable:l,select:o,isSelected:n,renderItem:a}=c.useContext(H),{data:i}=t,g=i.icon?e.jsx(Z.Icon,{icon:i.icon,style:{fontSize:18}}):e.jsx(pe,{style:{fontSize:18,color:i.color||"#ddd"}}),m=u=>{u.stopPropagation(),t.isInternal&&t.toggle()},y=u=>{u.stopPropagation(),l&&o(t.id)},C=e.jsxs(e.Fragment,{children:[e.jsxs(p.default,{sx:{display:"flex",alignItems:"center",flex:1},children:[e.jsx(p.default,{sx:{display:"flex",cursor:"pointer"},onClick:m,children:e.jsx(me,{node:t})}),e.jsx(p.default,{sx:{display:"flex",alignItems:"center",width:22,height:22},children:g}),e.jsx(p.default,{component:"span",sx:{color:"grey.700"},children:t.data.name})]}),l&&n(t.id)&&e.jsx(ge,{})]});return e.jsxs(p.default,{className:"label-tree-item",style:r,sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},ref:s,onClick:y,children:[!a&&C,!!a&&a(C,t.data)]})}const ve=F.styled(p.default)`
|
|
2
2
|
> div,
|
|
3
3
|
> div > div,
|
|
4
4
|
> div > div > div {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
.label-tree-item {
|
|
12
12
|
width: 100%;
|
|
13
13
|
}
|
|
14
|
-
`;function
|
|
14
|
+
`;function O({data:t,selectable:r,selected:s=[],onSelect:l,rowHeight:o=28,renderItem:n,sx:a,...i}){const g=c.useRef(),m=[...Array.isArray(a)?a:[a]],[y,C]=c.useState(0),u=c.useCallback(()=>{var h,S;C((((S=(h=g.current)==null?void 0:h.visibleNodes)==null?void 0:S.length)||0)*o)},[o]);c.useEffect(()=>{u()},[t,u]);const b=()=>{setTimeout(u)};return e.jsx(ye,{selectable:r,selected:s,onSelect:l,renderItem:n,children:e.jsx(ve,{...i,sx:m,children:e.jsx(Y.Tree,{data:t,rowHeight:o,height:y,indent:32,ref:g,onToggle:b,children:Ce})})})}const B=t=>t.reduce((r,s)=>{var l;return r.push(s),(l=s.children)!=null&&l.length&&r.push(...B(s.children)),r},[]),J=t=>t.map(r=>{var s;return(s=r.children)!=null&&s.length&&(r.children=J(r.children)),r}),be=(t,r=null)=>{try{return JSON.parse(t)}catch{return r}},K=t=>{const r=t.reduce((o,n)=>(o[n.id]=o[n.id]||{},n.parentId&&(o[n.id].parent=n.parentId,o[n.parentId]=o[n.parentId]||{},o[n.parentId].children=o[n.parentId].children||[],o[n.parentId].children.push(n.id)),o),{}),s=t.map(({parentId:o,translation:n,...a})=>({...a,translation:be(n),children:[]})),l=s.reduce((o,n)=>({...o,[n.id]:n}),{});return s.forEach(o=>{const n=r[o.id];n.parent&&l[n.parent]&&(o.parent=l[n.parent]),n.children&&(o.children=n.children.map(a=>l[a]))}),s.filter(o=>!o.parent)},Se=t=>{const{options:r,getValue:s,selectProps:l,selectOption:o}=t,n=s(),a=i=>{const g=r.find(m=>m.data.id===i);g&&o(g)};return e.jsxs(e.Fragment,{children:[e.jsx(N.components.MenuList,{...ie.default(t,["addon"]),children:e.jsx(p.default,{sx:{px:2,py:1},children:e.jsx(O,{data:l.data,selectable:!0,onSelect:a,selected:n.map(i=>i.data.id)})})}),t.addon]})},we=({children:t,...r})=>{const[s,l]=t,o=Array.isArray(s)?s.length:0;return e.jsxs(N.components.ValueContainer,{...r,children:[e.jsx(p.default,{component:"span",sx:{fontSize:13,fontWeight:"bold"},children:o?"Labels":"Filter by labels"}),!!o&&e.jsx(p.default,{sx:{display:"inline-flex",justifyContent:"center",alignItems:"center",width:22,height:22,ml:1,borderRadius:"100%",fontSize:12,bgcolor:"grey.200"},children:o}),l]})},Ie={control:t=>({...t,minHeight:31}),valueContainer:t=>({...t,display:"flex"}),dropdownIndicator:t=>({...t,padding:"0 4px"}),clearIndicator:t=>({...t,padding:"4px"})};function $({data:t,value:r=[],editable:s=!1,addon:l,onChange:o,compact:n,isMulti:a=!0,maxHeight:i=264,...g}){const m=c.useRef(null),y=c.useMemo(()=>B(t).map(x=>({data:x,label:x.name,value:x.id})),[t]),C=y.reduce((x,k)=>({...x,[k.data.id]:k}),{}),u=Array.isArray(r)?r:[r],b=u.map(x=>C[x]),h=c.useRef({prev:u.map(x=>{var k;return((k=C[x])==null?void 0:k.data)||""})}),S=(x,k)=>{!a||!Array.isArray(x)?o(x?[x.data]:[]):h.current.current=x.map(d=>d.data),["clear","remove-value"].includes(k.action)&&m.current&&setTimeout(()=>{var d;return(d=m==null?void 0:m.current)==null?void 0:d.blur()},1)},M=()=>{h.current.current&&JSON.stringify(h.current.prev.map(k=>k.id))!==JSON.stringify(h.current.current.map(k=>k.id))&&(o(h.current.current),h.current.prev=h.current.current)};return e.jsx(p.default,{...g,children:e.jsx(de.default,{ref:m,defaultValue:b,options:y,onChange:S,components:{MenuList:x=>e.jsx(Se,{...x,addon:l}),...n&&{ValueContainer:we}},placeholder:"Select labels",styles:{...n&&Ie,menu:x=>({...x,...s&&{paddingBottom:"36px"},zIndex:99}),menuList:x=>({...x,overflowY:"auto",maxHeight:`${i}px`})},theme:x=>({...x,colors:{...x.colors,primary25:"#ddd",primary50:"#ddd",primary:"#ddd"}}),isSearchable:!1,isMulti:a,closeMenuOnSelect:!a,onMenuClose:M,isClearable:!0,data:t})})}var P=function(){return P=Object.assign||function(r){for(var s,l=1,o=arguments.length;l<o;l++){s=arguments[l];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(r[n]=s[n])}return r},P.apply(this,arguments)};function ke(t,r){var s=typeof Symbol=="function"&&t[Symbol.iterator];if(!s)return t;var l=s.call(t),o,n=[],a;try{for(;(r===void 0||r-- >0)&&!(o=l.next()).done;)n.push(o.value)}catch(i){a={error:i}}finally{try{o&&!o.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}return n}typeof SuppressedError=="function"&&SuppressedError;var Te=function(t){return typeof t=="function"},ze=function(t){var r=ke(c.useState(t),2),s=r[0],l=r[1],o=c.useCallback(function(n){l(function(a){var i=Te(n)?n(a):n;return i?P(P({},a),i):a})},[]);return[s,o]};const _e=ze;function Ae({I18NProps:t,...r}){const{languages:s}=j.useLocaleContext(),{translation:l,onChange:o}=t,[n,a]=c.useState(null),i=y=>{const C=y.currentTarget.closest(".MuiInputBase-root");C&&a(C)},g=()=>{a(null)},m=s.filter(y=>y.code!=="en");return e.jsx(_.TextField,{...r,InputProps:{endAdornment:e.jsxs(_.InputAdornment,{position:"end",children:[e.jsx(_.IconButton,{edge:"end",onClick:i,children:e.jsx(z.Translate,{})}),e.jsx(ue.default,{open:!!n,anchorEl:n,onClose:g,transformOrigin:{vertical:"top",horizontal:"right"},anchorOrigin:{vertical:"bottom",horizontal:"right"},PaperProps:{sx:{width:n==null?void 0:n.clientWidth,maxHeight:200,overflowY:"auto",bgcolor:"grey.50"}},elevation:1,sx:{mt:2},children:e.jsx(_.Box,{sx:{p:2},children:m.map(({code:y,name:C})=>e.jsxs(_.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between","& + &":{mt:1}},children:[e.jsx(_.Box,{sx:{flex:"0 0 120px"},children:C}),e.jsx(_.Box,{sx:{flex:1},children:e.jsx(_.TextField,{value:l[y]||"",size:"small",sx:{width:1},onChange:u=>o({...l,[y]:u.target.value})})})]},y))})})]})}})}function Be({open:t,initialLabel:r,onSubmit:s,onClose:l,...o}){const n=!(r!=null&&r.id),[a,i]=_e({name:(r==null?void 0:r.name)||"",color:(r==null?void 0:r.color)||"#ddd",slug:(r==null?void 0:r.id)||"",translation:(r==null?void 0:r.translation)||{}}),g=S=>/^#([0-9A-F]{3}){1,2}$/i.test(S),m=c.useMemo(()=>n?a.name&&a.color&&a.slug&&g(a.color):a.name&&a.color&&g(a.color),[a,n]),[y,C]=c.useState(!1),u=()=>{s({...r,name:a.name,color:a.color,id:a.slug,translation:a.translation})},b=S=>{i({color:S.hex}),setTimeout(()=>C(!1))},h=S=>{i({color:S.target.value})};return e.jsx(V.default,{open:t,showCloseButton:!0,maxWidth:"lg",title:n?"Create label":"Edit label",actions:e.jsxs(e.Fragment,{children:[e.jsx(A.default,{color:"inherit",variant:"contained",size:"small",onClick:l,children:"Cancel"}),e.jsx(A.default,{color:"primary",variant:"contained",size:"small",onClick:u,disabled:!m,children:n?"Create":"Save Changes"})]}),onClose:l,...o,children:e.jsxs(p.default,{width:600,minHeight:280,children:[e.jsx(Ae,{label:"Name",value:a.name,placeholder:"New label",size:"small",fullWidth:!0,onChange:S=>i({name:S.target.value}),I18NProps:{translation:a.translation,onChange:S=>i({translation:S})}}),e.jsx(E.default,{label:"Slug",value:a.slug,size:"small",fullWidth:!0,disabled:!n,onChange:S=>i({slug:S.target.value}),sx:{mt:2}}),(r==null?void 0:r.parent)&&e.jsx(E.default,{label:"Parent",value:r.parent.name,size:"small",fullWidth:!0,disabled:!0,sx:{mt:2}}),e.jsx(W.default,{onClickAway:()=>C(!1),children:e.jsxs(p.default,{sx:{position:"relative",mt:2},children:[e.jsxs(p.default,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(p.default,{sx:{width:30,height:30,bgcolor:a.color,borderRadius:1},onClick:()=>C(!0)}),e.jsx(E.default,{label:"",value:a.color,size:"small",onChange:h,inputProps:{maxLength:7},sx:{width:100,".MuiInputBase-root":{height:32}}})]}),y&&e.jsx(p.default,{sx:{position:"absolute",top:48,zIndex:1},children:e.jsx(ne.GithubPicker,{color:a.color,onChangeComplete:b})})]})})]})})}function Le({open:t,label:r,onSubmit:s,onClose:l,...o}){return e.jsx(V.default,{open:t,showCloseButton:!0,maxWidth:"md",title:"Delete",actions:e.jsxs(e.Fragment,{children:[e.jsx(A.default,{color:"inherit",variant:"contained",size:"small",onClick:l,children:"Cancel"}),e.jsx(A.default,{color:"primary",variant:"contained",size:"small",onClick:s,children:"Delete"})]}),onClose:l,...o,children:e.jsxs(p.default,{width:600,minHeight:280,children:[e.jsx(fe.default,{severity:"info",sx:{mb:2},children:"Are you sure you want to delete these labels ?"}),e.jsx(O,{data:[r]})]})})}const qe=F.styled(O)`
|
|
15
15
|
.label-tree-item {
|
|
16
16
|
&:before {
|
|
17
17
|
content: '';
|
|
@@ -31,4 +31,4 @@
|
|
|
31
31
|
box-sizing: border-box;
|
|
32
32
|
padding: 0 16px;
|
|
33
33
|
}
|
|
34
|
-
`;function
|
|
34
|
+
`;function Oe({locale:t,value:r}){return e.jsxs(p.default,{sx:{display:"flex",alignItems:"center",flex:"0 0 auto",px:1,py:.25,fontSize:12,bgcolor:"grey.300",borderRadius:2},className:"label-translation-tag",children:[e.jsx(p.default,{sx:{pr:.5,borderRight:1,borderColor:"grey.400"},children:t}),e.jsx(p.default,{sx:{pl:.5},children:r})]})}function Pe({data:t,api:r,...s}){const[l,o]=c.useState(null),[n,a]=c.useState(null),[i,g]=c.useState(J(t)),m=c.useMemo(()=>B(i),[i]),y=c.useMemo(()=>{const d=(v,I)=>v.map(w=>(I&&(w.parent=I),w.children&&(w.children=d(w.children,w)),w));return d(i)},[i]),C=d=>{var v,I;d.parent?(d.parent.children=(I=(v=d.parent)==null?void 0:v.children)==null?void 0:I.map(w=>w.id===d.id?{...d}:w),C(d.parent)):g(i.map(w=>w.id===d.id?{...d}:w))},u=d=>{d.parent?(d.parent.children=d.parent.children||[],d.parent.children.push(d),g([...i])):g([...i,d])},b=d=>{var v;d.parent?d.parent.children=(v=d.parent.children)==null?void 0:v.filter(I=>I.id!==d.id):g(i.filter(I=>I.id!==d.id))},h=d=>{if(l)return;o({id:"",name:"New label",parent:d,color:"#dddddd"})},S=d=>{l||o(d)},M=async d=>{if(!l)return;const{parent:v,children:I,translation:w,...L}=d;l.id?(await r.updateLabel({...L,translation:JSON.stringify(w),parentId:v==null?void 0:v.id}),C(d)):(await r.createLabel({...L,translation:JSON.stringify(w),parentId:v==null?void 0:v.id}),u(d)),o(null)},x=async()=>{!n||(await r.deleteLabel(n.id),b(n),a(null))},k=(d,v)=>e.jsxs(e.Fragment,{children:[e.jsxs(p.default,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},className:"label-name",children:[e.jsx(p.default,{children:d}),v.translation&&e.jsx(p.default,{sx:{display:"flex",alignItems:"center",gap:.5,ml:2},className:"label-translation",children:Object.keys(v.translation).map(I=>{var L;const w=(L=v.translation)==null?void 0:L[I];return w?e.jsx(Oe,{locale:I,value:w},I):null})})]}),e.jsxs(p.default,{sx:{display:"flex",gap:1,flex:"0 0 auto"},className:"label-action",children:[e.jsx(q.default,{color:"inherit",size:"small",sx:{color:"grey.500"},onClick:()=>h(v),children:e.jsx(z.Add,{sx:{fontSize:20}})}),e.jsx(q.default,{color:"inherit",size:"small",sx:{color:"grey.500"},onClick:()=>S(v),children:e.jsx(z.EditOutlined,{sx:{fontSize:18}})}),e.jsx(q.default,{color:"inherit",size:"small",sx:{color:"grey.500"},onClick:()=>a(v),children:e.jsx(z.DeleteOutlineOutlined,{sx:{fontSize:20}})})]})]});return e.jsxs(p.default,{...s,className:"label-container",children:[e.jsxs(p.default,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsx(ce.default,{component:"h2",variant:"h6",children:"Manage labels"}),e.jsx(A.default,{color:"primary",variant:"contained",size:"small",sx:{textTransform:"none"},onClick:()=>h(),children:"New label"})]}),e.jsxs(p.default,{sx:{mt:2,border:1,borderColor:"grey.300",borderRadius:1,overflow:"hidden"},children:[e.jsxs(p.default,{sx:{p:2,fontSize:14,fontWeight:"bold",bgcolor:"grey.200"},className:"label-header",children:[m.length," labels"]}),e.jsx(p.default,{sx:{pt:.5},children:e.jsx(qe,{data:y,selected:[],renderItem:k,rowHeight:64})})]}),e.jsx(Be,{open:!!l,onClose:()=>o(null),initialLabel:l,onSubmit:M},l==null?void 0:l.id),e.jsx(Le,{open:!!n,onClose:()=>a(null),label:n,onSubmit:x},n==null?void 0:n.id)]})}const Q=c.createContext({}),D=()=>c.useContext(Q),Ne=()=>{const{updateLabels:t}=D();c.useEffect(()=>()=>{t()},[])};function Ee({fetchLabels:t,children:r}){const{locale:s}=j.useLocaleContext(),[l,o]=c.useState({loading:!0,labels:[],updateCounter:1});c.useEffect(()=>{(async()=>{try{o(h=>({...h,loading:!0}));const b=await t();o(h=>({...h,loading:!1,labels:K(b)}))}catch(b){console.error(b),o(h=>({...h,loading:!1,labels:[]}))}})()},[l.updateCounter]);const n=c.useMemo(()=>{var b;return(b=l.labels)!=null&&b.length?B(l.labels).reduce((h,S)=>({...h,[S.id]:S}),{}):{}},[l.labels]),a=c.useCallback(u=>{var b;return{...u,name:((b=u.translation)==null?void 0:b[s])||u.name}},[s]),i=c.useCallback(u=>u.filter(Boolean).map(b=>n[b]).map(a),[n,a]),g=c.useCallback(u=>(u==null?void 0:u.split(","))||[],[]),m=c.useCallback((u=[])=>{if(!!(u!=null&&u.length))return u.join(",")},[]),y=c.useMemo(()=>l.labels.map(a),[l.labels,a]),C=c.useMemo(()=>({loading:l.loading,labels:l.labels||[],updateLabels:()=>o(u=>({...u,updateCounter:++l.updateCounter})),getLabelsById:i,parseLabelIds:g,stringifyLabelIds:m,localizedLabels:y,flattenedLabels:B(y||[])}),[l,i,g,m,y]);return e.jsx(Q.Provider,{value:C,children:r})}function De({labels:t,editable:r,onChange:s,sx:l,renderLabel:o}){const n=!(t!=null&&t.length),{labels:a,loading:i,getLabelsById:g}=D(),[m,y]=c.useState(!1);if(i||!r&&n)return null;const C=h=>{s==null||s(h),setTimeout(()=>{y(!1)},300)};if(m)return e.jsx(W.default,{onClickAway:()=>m&&y(!1),children:e.jsx("div",{children:e.jsx($,{data:a,value:t||[],onChange:C})})});const u=g(t||[]),b=[{display:"flex",gap:1,alignItems:"center",flexWrap:"wrap"},...Array.isArray(l)?l:[l]];return e.jsxs(p.default,{sx:b,children:[u.map(h=>h?o?o(h):e.jsx(he.default,{label:h.name,variant:"filled",size:"small",sx:{borderRadius:1}},h.id):null),r&&!n&&e.jsx(q.default,{color:"inherit",size:"small",onClick:()=>y(!0),sx:{color:"grey.400"},children:e.jsx(z.Edit,{sx:{fontSize:20}})}),r&&n&&e.jsx(A.default,{color:"inherit",variant:"outlined",startIcon:e.jsx(z.LabelOutlined,{}),onClick:()=>y(!0),children:"Edit labels"})]})}f.LabelManager=Pe,f.LabelPicker=$,f.LabelTree=O,f.Labels=De,f.LabelsProvider=Ee,f.transformLabels=K,f.useLabelsContext=D,f.useLabelsUpdateOnDestroy=Ne,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/labels",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.105",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"resolutions": {
|
|
76
76
|
"react": "^18.2.0"
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "7f57f0b1c40c2c4f91c73afab103257785d78687"
|
|
79
79
|
}
|