@box/metadata-editor 1.62.0 → 1.62.1
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/chunks/utils2.js +37 -37
- package/dist/styles/utils.css +1 -1
- package/package.json +9 -9
package/dist/chunks/utils2.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { memo as
|
|
1
|
+
import b from "clsx";
|
|
2
|
+
import { memo as u, createElement as f } from "react";
|
|
3
3
|
import { convertISOStringtoRFC3339String as g } from "../esm/lib/utils/convertDate.js";
|
|
4
|
-
import
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { isConfidenceScoreNeedingReview as
|
|
7
|
-
import { LowConfidenceBadge as
|
|
8
|
-
import { AiLogoBadge as
|
|
9
|
-
import '../styles/utils.css';const
|
|
10
|
-
noAttributesText:
|
|
11
|
-
fieldWrapper:
|
|
12
|
-
hasSuggestion:
|
|
13
|
-
hasConfidenceReview:
|
|
14
|
-
dateField:
|
|
15
|
-
aiApproved:
|
|
16
|
-
labelWrapper:
|
|
17
|
-
labelText:
|
|
4
|
+
import T from "../esm/lib/components/interactive-text/interactive-text.js";
|
|
5
|
+
import { jsx as r, jsxs as N } from "react/jsx-runtime";
|
|
6
|
+
import { isConfidenceScoreNeedingReview as h } from "../esm/lib/utils/confidence-score/is-confidence-score-needing-review.js";
|
|
7
|
+
import { LowConfidenceBadge as A } from "../esm/lib/components/metadata-editor-fields/components/low-confidence-badge/low-confidence-badge.js";
|
|
8
|
+
import { AiLogoBadge as C } from "../esm/lib/components/metadata-editor-fields/components/ai-logo-badge/ai-logo-badge.js";
|
|
9
|
+
import '../styles/utils.css';const S = "_noAttributesText_1lpn0_2", x = "_fieldWrapper_1lpn0_6", L = "_hasSuggestion_1lpn0_11", w = "_hasConfidenceReview_1lpn0_16", F = "_dateField_1lpn0_44", W = "_aiApproved_1lpn0_49", I = "_labelWrapper_1lpn0_95", v = "_labelText_1lpn0_101", P = "_labelTruncated_1lpn0_104", R = "_labelIcon_1lpn0_111", s = {
|
|
10
|
+
noAttributesText: S,
|
|
11
|
+
fieldWrapper: x,
|
|
12
|
+
hasSuggestion: L,
|
|
13
|
+
hasConfidenceReview: w,
|
|
14
|
+
dateField: F,
|
|
15
|
+
aiApproved: W,
|
|
16
|
+
labelWrapper: I,
|
|
17
|
+
labelText: v,
|
|
18
18
|
labelTruncated: P,
|
|
19
19
|
labelIcon: R
|
|
20
|
-
}, D = /* @__PURE__ */
|
|
20
|
+
}, D = /* @__PURE__ */ u(function({
|
|
21
21
|
fieldName: e,
|
|
22
|
-
fieldDescription:
|
|
23
|
-
isAiSuggestionApplied:
|
|
24
|
-
as:
|
|
22
|
+
fieldDescription: l,
|
|
23
|
+
isAiSuggestionApplied: n,
|
|
24
|
+
as: o,
|
|
25
25
|
confidenceScore: a,
|
|
26
|
-
labelProps:
|
|
26
|
+
labelProps: p
|
|
27
27
|
}) {
|
|
28
28
|
const {
|
|
29
|
-
className:
|
|
29
|
+
className: d,
|
|
30
30
|
...i
|
|
31
|
-
} =
|
|
31
|
+
} = p, c = b(d || s.labelText, s.labelTruncated), m = !!a && h(a), _ = () => a && m ? /* @__PURE__ */ r(A, {}) : n || a ? /* @__PURE__ */ r(C, {
|
|
32
32
|
className: s.labelIcon,
|
|
33
33
|
confidenceScore: a
|
|
34
34
|
}) : null;
|
|
35
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ N("div", {
|
|
36
36
|
className: s.labelWrapper,
|
|
37
|
-
children: [
|
|
38
|
-
as:
|
|
37
|
+
children: [l ? /* @__PURE__ */ r(T, {
|
|
38
|
+
as: o,
|
|
39
39
|
className: c,
|
|
40
|
-
tooltipText:
|
|
40
|
+
tooltipText: l,
|
|
41
41
|
...i,
|
|
42
42
|
children: e
|
|
43
|
-
}) : /* @__PURE__ */ f(
|
|
43
|
+
}) : /* @__PURE__ */ f(o, {
|
|
44
44
|
className: c,
|
|
45
45
|
...i
|
|
46
|
-
}, e),
|
|
46
|
+
}, e), _()]
|
|
47
47
|
});
|
|
48
48
|
}, (t, e) => {
|
|
49
|
-
const
|
|
50
|
-
return t.fieldName === e.fieldName && t.fieldDescription === e.fieldDescription && t.isAiSuggestionApplied === e.isAiSuggestionApplied && t.confidenceScore === e.confidenceScore && t.as === e.as &&
|
|
51
|
-
}), G = (t, e,
|
|
52
|
-
as:
|
|
53
|
-
confidenceScore:
|
|
49
|
+
const l = t.labelProps, n = e.labelProps;
|
|
50
|
+
return t.fieldName === e.fieldName && t.fieldDescription === e.fieldDescription && t.isAiSuggestionApplied === e.isAiSuggestionApplied && t.confidenceScore === e.confidenceScore && t.as === e.as && l.className === n.className && l.htmlFor === n.htmlFor && l.id === n.id;
|
|
51
|
+
}), G = (t, e, l = !1, n = "label", o) => (a) => /* @__PURE__ */ r(D, {
|
|
52
|
+
as: n,
|
|
53
|
+
confidenceScore: o,
|
|
54
54
|
fieldDescription: e,
|
|
55
55
|
fieldName: t,
|
|
56
|
-
isAiSuggestionApplied:
|
|
56
|
+
isAiSuggestionApplied: l,
|
|
57
57
|
labelProps: a
|
|
58
58
|
}), H = (t) => {
|
|
59
59
|
try {
|
|
60
|
-
const e = g(t),
|
|
61
|
-
return isNaN(
|
|
60
|
+
const e = g(t), l = new Date(e);
|
|
61
|
+
return isNaN(l.getTime()) ? null : e;
|
|
62
62
|
} catch {
|
|
63
63
|
return null;
|
|
64
64
|
}
|
package/dist/styles/utils.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._noAttributesText_1lpn0_2{text-align:center}._fieldWrapper_1lpn0_6{position:relative;isolation:isolate}._fieldWrapper_1lpn0_6 ._hasSuggestion_1lpn0_11>input,._fieldWrapper_1lpn0_6 ._hasSuggestion_1lpn0_11>button,._fieldWrapper_1lpn0_6 ._hasSuggestion_1lpn0_11>div[role=group]>div,._fieldWrapper_1lpn0_6 ._hasSuggestion_1lpn0_11>div>div,._fieldWrapper_1lpn0_6 ._hasSuggestion_1lpn0_11>div>input,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>input,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>button,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>div[role=group]>div,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>div>div,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>div>input{border-bottom:none!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}._fieldWrapper_1lpn0_6 ._hasSuggestion_1lpn0_11>input:not(:disabled,:focus-visible,._error_1lpn0_25):hover,._fieldWrapper_1lpn0_6 ._hasSuggestion_1lpn0_11>button:not(:disabled,:focus-visible,._error_1lpn0_25):hover,._fieldWrapper_1lpn0_6 ._hasSuggestion_1lpn0_11>div[role=group]>div:not(:disabled,:focus-visible,._error_1lpn0_25):hover,._fieldWrapper_1lpn0_6 ._hasSuggestion_1lpn0_11>div>div:not(:disabled,:focus-visible,._error_1lpn0_25):hover,._fieldWrapper_1lpn0_6 ._hasSuggestion_1lpn0_11>div>input:not(:disabled,:focus-visible,._error_1lpn0_25):hover,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>input:not(:disabled,:focus-visible,._error_1lpn0_25):hover,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>button:not(:disabled,:focus-visible,._error_1lpn0_25):hover,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>div[role=group]>div:not(:disabled,:focus-visible,._error_1lpn0_25):hover,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>div>div:not(:disabled,:focus-visible,._error_1lpn0_25):hover,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>div>input:not(:disabled,:focus-visible,._error_1lpn0_25):hover{border-bottom:none}._fieldWrapper_1lpn0_6 ._hasSuggestion_1lpn0_11 div[role=group]>div,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16 div[role=group]>div{margin-right:var(--bp-border-01);margin-left:var(--bp-border-01)}._fieldWrapper_1lpn0_6 ._dateField_1lpn0_44>div[role=group]>div{padding-inline:var(--bp-space-030);background:var(--bp-surface-input-surface)}._fieldWrapper_1lpn0_6 ._aiApproved_1lpn0_49>._comboboxContainer_1lpn0_49,._fieldWrapper_1lpn0_6 ._aiApproved_1lpn0_49>input,._fieldWrapper_1lpn0_6 ._aiApproved_1lpn0_49>button,._fieldWrapper_1lpn0_6 ._aiApproved_1lpn0_49>div[role=group]>div,._fieldWrapper_1lpn0_6 ._aiApproved_1lpn0_49>div>div,._fieldWrapper_1lpn0_6 ._aiApproved_1lpn0_49>div>input{box-sizing:border-box!important;background-image:linear-gradient(#fff,#fff),linear-gradient(135deg,#fe03dc,#2784fa)!important;background-clip:padding-box,border-box!important;background-origin:border-box!important;border:double var(--bp-border-01) transparent!important;outline:none}._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>._comboboxContainer_1lpn0_49,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>input,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>button,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>div[role=group]>div,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>div>div,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>div>input{box-sizing:border-box!important;background-image:linear-gradient(#fff,#fff),linear-gradient(135deg,#fe03dc,#2784fa)!important;background-clip:padding-box,border-box!important;background-origin:border-box!important;border:double var(--bp-border-01) transparent!important;outline:none;border-bottom:none!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important;padding-top:var(--bp-border-01)!important}._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>input:focus-visible,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>button:focus-visible,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>div[role=group]>div:focus-within,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>div>div:focus-within,._fieldWrapper_1lpn0_6 ._hasConfidenceReview_1lpn0_16>div>input:focus-visible{background:#fff!important;border-style:solid!important;border-width:.125rem!important;border-color:#2486fc!important;border-bottom:none!important;padding-top:0!important;outline:0}._labelWrapper_1lpn0_95{display:flex;align-items:baseline;justify-content:space-between;width:100%}._labelWrapper_1lpn0_95 ._labelText_1lpn0_101{flex:unset!important}._labelWrapper_1lpn0_95 ._labelTruncated_1lpn0_104{flex:0 1 auto!important;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._labelWrapper_1lpn0_95 ._labelIcon_1lpn0_111{flex-shrink:0;width:var(--bp-space-040);height:var(--bp-space-040);margin-inline:var(--bp-space-030)}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-editor",
|
|
3
|
-
"version": "1.62.
|
|
3
|
+
"version": "1.62.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@ariakit/react": "0.4.21",
|
|
6
|
-
"@box/blueprint-web": "^14.
|
|
7
|
-
"@box/blueprint-web-assets": "^4.111.
|
|
8
|
-
"@box/box-ai-agent-selector": "^1.39.
|
|
9
|
-
"@box/combobox-with-api": "^1.42.
|
|
6
|
+
"@box/blueprint-web": "^14.2.0",
|
|
7
|
+
"@box/blueprint-web-assets": "^4.111.19",
|
|
8
|
+
"@box/box-ai-agent-selector": "^1.39.23",
|
|
9
|
+
"@box/combobox-with-api": "^1.42.24",
|
|
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.10",
|
|
19
|
-
"@box/blueprint-web": "^14.
|
|
20
|
-
"@box/blueprint-web-assets": "^4.111.
|
|
21
|
-
"@box/box-ai-agent-selector": "^1.39.
|
|
22
|
-
"@box/storybook-utils": "^0.17.
|
|
19
|
+
"@box/blueprint-web": "^14.2.0",
|
|
20
|
+
"@box/blueprint-web-assets": "^4.111.19",
|
|
21
|
+
"@box/box-ai-agent-selector": "^1.39.23",
|
|
22
|
+
"@box/storybook-utils": "^0.17.19",
|
|
23
23
|
"@testing-library/react": "^15.0.6",
|
|
24
24
|
"react": "^18.3.0",
|
|
25
25
|
"react-dom": "^18.3.0",
|