@box/metadata-editor 1.70.1 → 1.70.3

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.
@@ -22,16 +22,18 @@ import '../styles/metadata-instance-entry.css';var C = {
22
22
  labelContainer: "_labelContainer_17ipu_15",
23
23
  confidenceScoreIcon: "_confidenceScoreIcon_17ipu_21"
24
24
  }, w = ({ description: w, isSelected: T, name: E, onClick: D, shouldHideEmptyValues: O, type: k, value: A, taxonomyNodeFetcher: j, taxonomyKey: M, scope: N, isExternallyOwned: P, confidenceScore: F, isConfidenceScoreReviewEnabled: I = !1, targetLocation: L }) => {
25
- let R = _(), { trackEvent: z } = n(), B = h(null), V = m(B), H = I && !!F && a(F), U = r(L), W = I && !!F && U && !!D, G = H ? i(R.formatMessage, F) : null, K = () => z(t.LOW_CONF_ICON_HOVER_READ_MODE, {
25
+ let R = _(), { trackEvent: z } = n(), B = h(null), V = m(B), H = (e) => {
26
+ B.current = e instanceof HTMLElement ? e : null;
27
+ }, U = I && !!F && a(F), W = r(L), G = I && !!F && W && !!D, K = U ? i(R.formatMessage, F) : null, q = () => z(t.LOW_CONF_ICON_HOVER_READ_MODE, {
26
28
  fieldType: k,
27
29
  confidenceLevel: F?.level,
28
30
  scope: N
29
- }), q = typeof A == "number" ? A.toString() : A ? Array.isArray(A) ? A.join(", ") : k === "date" && typeof A == "string" ? /* @__PURE__ */ y(g, {
31
+ }), J = typeof A == "number" ? A.toString() : A ? Array.isArray(A) ? A.join(", ") : k === "date" && typeof A == "string" ? /* @__PURE__ */ y(g, {
30
32
  day: "numeric",
31
33
  month: "long",
32
34
  value: s(A),
33
35
  year: "numeric"
34
- }) : A : null, J = {
36
+ }) : A : null, Y = {
35
37
  "data-metadata-field": !0,
36
38
  "data-target-id": "Button-metadataEditorFieldReadClick",
37
39
  "data-testid": "metadata-field",
@@ -42,26 +44,24 @@ import '../styles/metadata-instance-entry.css';var C = {
42
44
  role: "button",
43
45
  tabIndex: 0
44
46
  };
45
- if (O && !q) return null;
46
- let Y = (() => {
47
+ if (O && !J) return null;
48
+ let X = (() => {
47
49
  if (w) return V ? /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("div", { children: E }), /* @__PURE__ */ y("div", { children: w })] }) : w;
48
50
  if (V) return E;
49
- })(), X = /* @__PURE__ */ y("h5", {
50
- ref: B,
51
+ })(), Z = /* @__PURE__ */ y(f, {
52
+ ref: H,
53
+ as: "h5",
51
54
  className: x(C.name, w && c.interactiveTextHint),
52
- children: /* @__PURE__ */ y(f, {
53
- as: "span",
54
- color: "textOnLightSecondary",
55
- variant: "bodyDefaultBold",
56
- children: E
57
- })
58
- }), Z = /* @__PURE__ */ b("div", {
59
- className: x(C.metadataInstanceEntry, I && o.spacious, W && o.clickableField, W && T && o.selectedField),
60
- ...W && J,
55
+ color: "textOnLightSecondary",
56
+ variant: "bodyDefaultBold",
57
+ children: E
58
+ }), Q = /* @__PURE__ */ b("div", {
59
+ className: x(C.metadataInstanceEntry, I && o.spacious, G && o.clickableField, G && T && o.selectedField),
60
+ ...G && Y,
61
61
  children: [/* @__PURE__ */ b("div", {
62
62
  className: C.labelContainer,
63
- children: [G && /* @__PURE__ */ y(p, {
64
- content: G,
63
+ children: [K && /* @__PURE__ */ y(p, {
64
+ content: K,
65
65
  children: /* @__PURE__ */ y("span", {
66
66
  className: C.confidenceScoreIcon,
67
67
  children: /* @__PURE__ */ y(d, {
@@ -71,15 +71,15 @@ import '../styles/metadata-instance-entry.css';var C = {
71
71
  icon: S,
72
72
  interactive: !0,
73
73
  text: R.formatMessage(l.confidenceScoreIconAriaLabel),
74
- onMouseEnter: K
74
+ onMouseEnter: q
75
75
  })
76
76
  })
77
- }), Y ? /* @__PURE__ */ y(p, {
78
- content: Y,
79
- children: /* @__PURE__ */ y(v, { render: X })
80
- }) : X]
77
+ }), X ? /* @__PURE__ */ y(p, {
78
+ content: X,
79
+ children: /* @__PURE__ */ y(v, { render: Z })
80
+ }) : Z]
81
81
  }), /* @__PURE__ */ y(u, {
82
- formattedValue: q,
82
+ formattedValue: J,
83
83
  isExternallyOwned: P,
84
84
  scope: N,
85
85
  taxonomyKey: M,
@@ -88,9 +88,9 @@ import '../styles/metadata-instance-entry.css';var C = {
88
88
  value: A
89
89
  })]
90
90
  });
91
- return W ? /* @__PURE__ */ y(p, {
91
+ return G ? /* @__PURE__ */ y(p, {
92
92
  content: R.formatMessage(e.viewOnDocument),
93
- children: Z
94
- }) : Z;
93
+ children: Q
94
+ }) : Q;
95
95
  };
96
96
  export { w as t };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@box/metadata-editor",
3
- "version": "1.70.1",
3
+ "version": "1.70.3",
4
4
  "peerDependencies": {
5
5
  "@ariakit/react": "0.4.21",
6
- "@box/blueprint-web": "^14.22.0",
7
- "@box/blueprint-web-assets": "^4.115.9",
8
- "@box/box-ai-agent-selector": "^1.40.15",
9
- "@box/combobox-with-api": "^1.43.15",
6
+ "@box/blueprint-web": "^14.24.0",
7
+ "@box/blueprint-web-assets": "^4.115.11",
8
+ "@box/box-ai-agent-selector": "^1.40.17",
9
+ "@box/combobox-with-api": "^1.43.17",
10
10
  "formik": "^2.0.3",
11
11
  "lodash": "^4.17.15",
12
12
  "react": "^17.0.0 || ^18.0.0",
@@ -16,10 +16,10 @@
16
16
  "devDependencies": {
17
17
  "@ariakit/react": "0.4.21",
18
18
  "@box/babel-plugin-target-attributes": "1.5.19",
19
- "@box/blueprint-web": "^14.22.0",
20
- "@box/blueprint-web-assets": "^4.115.9",
21
- "@box/box-ai-agent-selector": "^1.40.15",
22
- "@box/storybook-utils": "^0.18.9",
19
+ "@box/blueprint-web": "^14.24.0",
20
+ "@box/blueprint-web-assets": "^4.115.11",
21
+ "@box/box-ai-agent-selector": "^1.40.17",
22
+ "@box/storybook-utils": "^0.18.11",
23
23
  "@testing-library/react": "^15.0.6",
24
24
  "react": "^18.3.0",
25
25
  "react-dom": "^18.3.0",