@glodon-aiot/dataset-annotation 3.0.11-beta.4 → 3.0.11-beta.7

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.
@@ -1,15 +1,15 @@
1
1
  import { jsxs as o, jsx as a, Fragment as h } from "react/jsx-runtime";
2
- import { useState as n, useEffect as p } from "react";
3
- import k from "lodash";
2
+ import { useState as n, useEffect as l } from "react";
3
+ import k from "lodash/groupBy";
4
4
  import "./style.less.mjs";
5
5
  const v = ({
6
6
  labels: i = [],
7
7
  catagory: t
8
8
  }) => {
9
- const [s, m] = n([]), [c, d] = n([]);
10
- return p(() => {
11
- const r = k.groupBy(i, (e) => e.type);
12
- m(r.key), d(r.value);
9
+ const [r, m] = n([]), [c, d] = n([]);
10
+ return l(() => {
11
+ const s = k(i, (e) => e.type);
12
+ m(s.key), d(s.value);
13
13
  }, [i]), /* @__PURE__ */ o("div", {
14
14
  className: "mark-description-wrap",
15
15
  children: [/* @__PURE__ */ a("div", {
@@ -17,28 +17,28 @@ const v = ({
17
17
  children: t.name
18
18
  }), /* @__PURE__ */ a("div", {
19
19
  className: "mark-description-keys",
20
- children: s == null ? void 0 : s.map((r) => /* @__PURE__ */ a("div", {
21
- children: r.words
20
+ children: r == null ? void 0 : r.map((s) => /* @__PURE__ */ a("div", {
21
+ children: s.words
22
22
  }))
23
23
  }), /* @__PURE__ */ a("div", {
24
24
  className: "mark-description-values",
25
- children: c == null ? void 0 : c.map((r) => /* @__PURE__ */ a("div", {
26
- children: r.words
25
+ children: c == null ? void 0 : c.map((s) => /* @__PURE__ */ a("div", {
26
+ children: s.words
27
27
  }))
28
28
  })]
29
29
  });
30
- }, g = ({
30
+ }, w = ({
31
31
  labels: i = [],
32
32
  catagories: t = []
33
33
  }) => {
34
- var r;
35
- const [s, m] = n({}), [c, d] = n({});
36
- return p(() => {
37
- m(k.groupBy(i, (e) => e.catagoryId));
38
- }, [i]), p(() => {
34
+ var s;
35
+ const [r, m] = n({}), [c, d] = n({});
36
+ return l(() => {
37
+ m(k(i, (e) => e.catagoryId));
38
+ }, [i]), l(() => {
39
39
  const e = {};
40
- t.forEach((l) => e[l.id] = l.name), d(e);
41
- }, [t]), s ? /* @__PURE__ */ o("div", {
40
+ t.forEach((p) => e[p.id] = p.name), d(e);
41
+ }, [t]), r ? /* @__PURE__ */ o("div", {
42
42
  className: "mark-descriptions-wrap",
43
43
  children: [/* @__PURE__ */ o("div", {
44
44
  className: "mark-description-wrap mark-descriptions-header",
@@ -52,8 +52,8 @@ const v = ({
52
52
  className: "mark-description-values",
53
53
  children: "Value"
54
54
  })]
55
- }), (r = Object.keys(s)) == null ? void 0 : r.map((e) => /* @__PURE__ */ a(v, {
56
- labels: s[e],
55
+ }), (s = Object.keys(r)) == null ? void 0 : s.map((e) => /* @__PURE__ */ a(v, {
56
+ labels: r[e],
57
57
  catagory: {
58
58
  id: e,
59
59
  name: c[e]
@@ -62,5 +62,5 @@ const v = ({
62
62
  }) : /* @__PURE__ */ a(h, {});
63
63
  };
64
64
  export {
65
- g as default
65
+ w as default
66
66
  };