@box/metadata-editor 1.38.0 → 1.38.2
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/filter-dropdown-menu.module.js +9 -9
- package/dist/chunks/taxonomy-ancestor-status-pill.js +45 -45
- package/dist/chunks/utils2.js +23 -23
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/autofill-overlay.js +27 -27
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +98 -102
- package/dist/esm/lib/components/metadata-instance-list/metadata-instance-list.js +22 -25
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.js +27 -25
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.js +11 -9
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.js +37 -39
- package/dist/styles/autofill-overlay.css +1 -1
- package/dist/styles/filter-dropdown-menu.css +1 -1
- package/dist/styles/taxonomy-ancestor-status-pill.css +1 -1
- package/dist/styles/utils.css +1 -1
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.d.ts +1 -1
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/types.d.ts +1 -0
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.d.ts +1 -1
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/types.d.ts +1 -0
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.d.ts +1 -1
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/types.d.ts +1 -0
- package/package.json +9 -9
- package/dist/esm/lib/utils/confidence-score-context.js +0 -24
- package/dist/types/lib/test-utils/storybook-decorators.d.ts +0 -6
- package/dist/types/lib/utils/confidence-score-context.d.ts +0 -11
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import '../styles/filter-dropdown-menu.css';const c = "
|
|
1
|
+
import '../styles/filter-dropdown-menu.css';const c = "_content_1xvav_2", e = "_scrollableContainer_1xvav_21", a = "_item_1xvav_26", n = "_option_1xvav_36", o = "_search_1xvav_57", t = "_searchIcon_1xvav_62", s = "_clearSearchIcon_1xvav_76", r = "_searchInput_1xvav_84", _ = "_searchDivider_1xvav_138", v = {
|
|
2
2
|
content: c,
|
|
3
3
|
scrollableContainer: e,
|
|
4
|
-
item:
|
|
5
|
-
option:
|
|
6
|
-
search:
|
|
7
|
-
searchIcon:
|
|
8
|
-
clearSearchIcon:
|
|
9
|
-
searchInput:
|
|
10
|
-
searchDivider:
|
|
4
|
+
item: a,
|
|
5
|
+
option: n,
|
|
6
|
+
search: o,
|
|
7
|
+
searchIcon: t,
|
|
8
|
+
clearSearchIcon: s,
|
|
9
|
+
searchInput: r,
|
|
10
|
+
searchDivider: _
|
|
11
11
|
};
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
v as s
|
|
14
14
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Popover as t, FilterChip as
|
|
1
|
+
import { Popover as t, FilterChip as y, InlineNotice as A, TextButton as T, LoadingIndicator as I } from "@box/blueprint-web";
|
|
2
2
|
import { Loader as W } from "@box/blueprint-web-assets/icons/Fill";
|
|
3
3
|
import V from "lodash/orderBy";
|
|
4
4
|
import { useState as s } from "react";
|
|
5
|
-
import { useIntl as B, FormattedMessage as
|
|
6
|
-
import
|
|
7
|
-
import { jsxs as l, jsx as
|
|
8
|
-
import '../styles/taxonomy-ancestor-status-pill.css';const N = "
|
|
5
|
+
import { useIntl as B, FormattedMessage as _ } from "react-intl";
|
|
6
|
+
import n from "../esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/messages.js";
|
|
7
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
8
|
+
import '../styles/taxonomy-ancestor-status-pill.css';const N = "_popoverContentContainer_f0vo4_2", w = "_popoverMainContent_f0vo4_7", E = "_loadingIndicatorWrapper_f0vo4_11", D = "_errorMessageWrapper_f0vo4_18", P = "_errorMessageWrapperText_f0vo4_23", R = "_taxonomyAncestorTable_f0vo4_37", k = "_taxonomyValueGroup_f0vo4_80", K = "_taxonomyValueButton_f0vo4_85", G = "_taxonomyValueLabel_f0vo4_95", a = {
|
|
9
9
|
popoverContentContainer: N,
|
|
10
10
|
popoverMainContent: w,
|
|
11
11
|
loadingIndicatorWrapper: E,
|
|
@@ -24,18 +24,18 @@ import '../styles/taxonomy-ancestor-status-pill.css';const N = "_popoverContentC
|
|
|
24
24
|
};
|
|
25
25
|
function X({
|
|
26
26
|
taxonomyNodeFetcher: r,
|
|
27
|
-
scope:
|
|
28
|
-
taxonomyKey:
|
|
27
|
+
scope: f,
|
|
28
|
+
taxonomyKey: h,
|
|
29
29
|
value: x,
|
|
30
30
|
displayValue: c
|
|
31
31
|
}) {
|
|
32
32
|
const {
|
|
33
33
|
formatMessage: i
|
|
34
|
-
} = B(), [C, b] = s([]), [p, d] = s(!1), [m, g] = s(!1), [M,
|
|
35
|
-
d(!0), g(!1),
|
|
34
|
+
} = B(), [C, b] = s([]), [p, d] = s(!1), [m, g] = s(!1), [M, u] = s(!1), L = V(C, (e) => e.level), v = async () => {
|
|
35
|
+
d(!0), g(!1), u(!0);
|
|
36
36
|
try {
|
|
37
|
-
const
|
|
38
|
-
b(
|
|
37
|
+
const e = await r(f, h, x);
|
|
38
|
+
b(e);
|
|
39
39
|
} catch {
|
|
40
40
|
g(!0);
|
|
41
41
|
} finally {
|
|
@@ -43,63 +43,63 @@ function X({
|
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
return /* @__PURE__ */ l(t.Root, {
|
|
46
|
-
onOpenChange:
|
|
46
|
+
onOpenChange: u,
|
|
47
47
|
open: M,
|
|
48
|
-
children: [/* @__PURE__ */
|
|
49
|
-
children: /* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ o(t.Trigger, {
|
|
49
|
+
children: /* @__PURE__ */ o(y.ChipButton, {
|
|
50
50
|
"aria-checked": void 0,
|
|
51
|
-
className:
|
|
51
|
+
className: a.taxonomyValueButton,
|
|
52
52
|
disabled: !r,
|
|
53
|
-
onClick:
|
|
53
|
+
onClick: v,
|
|
54
54
|
onKeyDown: S,
|
|
55
55
|
role: void 0,
|
|
56
56
|
value: c,
|
|
57
|
-
children: /* @__PURE__ */
|
|
58
|
-
className:
|
|
57
|
+
children: /* @__PURE__ */ o(y.Label, {
|
|
58
|
+
className: a.taxonomyValueLabel,
|
|
59
59
|
children: c
|
|
60
60
|
})
|
|
61
61
|
})
|
|
62
|
-
}), /* @__PURE__ */
|
|
62
|
+
}), /* @__PURE__ */ o(t.ContentContainer, {
|
|
63
63
|
align: "start",
|
|
64
|
-
className:
|
|
64
|
+
className: a.popoverContentContainer,
|
|
65
65
|
collisionPadding: O,
|
|
66
66
|
onEscapeKeyDown: j,
|
|
67
67
|
children: /* @__PURE__ */ l(t.MainContent, {
|
|
68
|
-
className:
|
|
68
|
+
className: a.popoverMainContent,
|
|
69
69
|
children: [m && /* @__PURE__ */ l("div", {
|
|
70
|
-
className:
|
|
71
|
-
children: [/* @__PURE__ */
|
|
70
|
+
className: a.errorMessageWrapper,
|
|
71
|
+
children: [/* @__PURE__ */ o(A, {
|
|
72
72
|
variant: "error",
|
|
73
|
-
variantIconAriaLabel: i(
|
|
74
|
-
children: /* @__PURE__ */
|
|
75
|
-
...
|
|
73
|
+
variantIconAriaLabel: i(n.loadingResultsErrorIconLabel),
|
|
74
|
+
children: /* @__PURE__ */ o(_, {
|
|
75
|
+
...n.loadingResultsErrorMessage
|
|
76
76
|
})
|
|
77
|
-
}), /* @__PURE__ */
|
|
78
|
-
className:
|
|
77
|
+
}), /* @__PURE__ */ o(T, {
|
|
78
|
+
className: a.errorMessageWrapperText,
|
|
79
79
|
icon: W,
|
|
80
|
-
onClick:
|
|
80
|
+
onClick: v,
|
|
81
81
|
"data-target-id": "TextButton-loadingResultsErrorAction",
|
|
82
|
-
children: i(
|
|
82
|
+
children: i(n.loadingResultsErrorAction)
|
|
83
83
|
})]
|
|
84
|
-
}), p && /* @__PURE__ */
|
|
85
|
-
className:
|
|
86
|
-
children: /* @__PURE__ */
|
|
87
|
-
"aria-label": i(
|
|
84
|
+
}), p && /* @__PURE__ */ o("div", {
|
|
85
|
+
className: a.loadingIndicatorWrapper,
|
|
86
|
+
children: /* @__PURE__ */ o(I, {
|
|
87
|
+
"aria-label": i(n.loadingAriaLabel),
|
|
88
88
|
size: "large"
|
|
89
89
|
})
|
|
90
|
-
}), !m && !p && /* @__PURE__ */
|
|
91
|
-
className:
|
|
92
|
-
children: /* @__PURE__ */
|
|
93
|
-
children: L.map((
|
|
94
|
-
children: [/* @__PURE__ */
|
|
90
|
+
}), !m && !p && /* @__PURE__ */ o("table", {
|
|
91
|
+
className: a.taxonomyAncestorTable,
|
|
92
|
+
children: /* @__PURE__ */ o("tbody", {
|
|
93
|
+
children: L.map((e) => /* @__PURE__ */ l("tr", {
|
|
94
|
+
children: [/* @__PURE__ */ o("th", {
|
|
95
95
|
scope: "row",
|
|
96
|
-
children:
|
|
97
|
-
}), /* @__PURE__ */
|
|
98
|
-
children:
|
|
99
|
-
...
|
|
96
|
+
children: e.levelName
|
|
97
|
+
}), /* @__PURE__ */ o("td", {
|
|
98
|
+
children: e.levelValue || /* @__PURE__ */ o(_, {
|
|
99
|
+
...n.emptyAncestorLevelValue
|
|
100
100
|
})
|
|
101
101
|
})]
|
|
102
|
-
},
|
|
102
|
+
}, e.id || e.level))
|
|
103
103
|
})
|
|
104
104
|
})]
|
|
105
105
|
})
|
|
@@ -108,5 +108,5 @@ function X({
|
|
|
108
108
|
}
|
|
109
109
|
export {
|
|
110
110
|
X as T,
|
|
111
|
-
|
|
111
|
+
a as s
|
|
112
112
|
};
|
package/dist/chunks/utils2.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { BoxAiLogo as
|
|
2
|
-
import
|
|
1
|
+
import { BoxAiLogo as i } from "@box/blueprint-web-assets/icons/Logo";
|
|
2
|
+
import _ from "clsx";
|
|
3
3
|
import b from "../esm/lib/components/interactive-text/interactive-text.js";
|
|
4
4
|
import { convertISOStringtoRFC3339String as d } from "../esm/lib/utils/convertDate.js";
|
|
5
|
-
import { jsxs as u, jsx as
|
|
6
|
-
import '../styles/utils.css';const g = "
|
|
5
|
+
import { jsxs as u, jsx as a } from "react/jsx-runtime";
|
|
6
|
+
import '../styles/utils.css';const g = "_noAttributesText_6p6pr_2", m = "_fieldWrapper_6p6pr_6", x = "_hasSuggestion_6p6pr_11", T = "_dateField_6p6pr_33", f = "_suggestionApplied_6p6pr_37", h = "_labelWrapper_6p6pr_52", A = "_labelText_6p6pr_58", N = "_labelTruncated_6p6pr_61", S = "_labelIcon_6p6pr_68", l = {
|
|
7
7
|
noAttributesText: g,
|
|
8
|
-
fieldWrapper:
|
|
9
|
-
hasSuggestion:
|
|
10
|
-
dateField:
|
|
11
|
-
suggestionApplied:
|
|
12
|
-
labelWrapper:
|
|
13
|
-
labelText:
|
|
14
|
-
labelTruncated:
|
|
15
|
-
labelIcon:
|
|
16
|
-
},
|
|
8
|
+
fieldWrapper: m,
|
|
9
|
+
hasSuggestion: x,
|
|
10
|
+
dateField: T,
|
|
11
|
+
suggestionApplied: f,
|
|
12
|
+
labelWrapper: h,
|
|
13
|
+
labelText: A,
|
|
14
|
+
labelTruncated: N,
|
|
15
|
+
labelIcon: S
|
|
16
|
+
}, y = (t, e, r = !1, o = "label") => (p) => {
|
|
17
17
|
const {
|
|
18
|
-
className:
|
|
18
|
+
className: c,
|
|
19
19
|
...s
|
|
20
|
-
} =
|
|
20
|
+
} = p, n = _(c || l.labelText, l.labelTruncated);
|
|
21
21
|
return /* @__PURE__ */ u("div", {
|
|
22
22
|
className: l.labelWrapper,
|
|
23
|
-
children: [e ? /* @__PURE__ */
|
|
23
|
+
children: [e ? /* @__PURE__ */ a(b, {
|
|
24
24
|
as: o,
|
|
25
|
-
className:
|
|
25
|
+
className: n,
|
|
26
26
|
tooltipText: e,
|
|
27
27
|
...s,
|
|
28
28
|
children: t
|
|
29
|
-
}) : /* @__PURE__ */
|
|
30
|
-
className:
|
|
29
|
+
}) : /* @__PURE__ */ a("label", {
|
|
30
|
+
className: n,
|
|
31
31
|
...s,
|
|
32
32
|
children: t
|
|
33
|
-
}),
|
|
33
|
+
}), r && /* @__PURE__ */ a(i, {
|
|
34
34
|
className: l.labelIcon
|
|
35
35
|
})]
|
|
36
36
|
});
|
|
37
37
|
}, C = (t) => {
|
|
38
38
|
try {
|
|
39
|
-
const e = d(t),
|
|
40
|
-
return isNaN(
|
|
39
|
+
const e = d(t), r = new Date(e);
|
|
40
|
+
return isNaN(r.getTime()) ? null : e;
|
|
41
41
|
} catch {
|
|
42
42
|
return null;
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
export {
|
|
46
|
-
|
|
46
|
+
y as g,
|
|
47
47
|
l as s,
|
|
48
48
|
C as t
|
|
49
49
|
};
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { LoadingIndicator as
|
|
2
|
-
import { AlertTriangle as
|
|
1
|
+
import { LoadingIndicator as g, Text as m, TextButton as v } from "@box/blueprint-web";
|
|
2
|
+
import { AlertTriangle as _ } from "@box/blueprint-web-assets/icons/Line";
|
|
3
3
|
import { Size5 as f, SurfaceStatusSurfaceError as y } from "@box/blueprint-web-assets/tokens/tokens";
|
|
4
4
|
import O from "clsx";
|
|
5
5
|
import { useState as T } from "react";
|
|
6
6
|
import { useIntl as h } from "react-intl";
|
|
7
7
|
import { EXTRACT_AI_AGENT_LOCAL_STORAGE_KEY as E } from "../../../../constants.js";
|
|
8
|
-
import
|
|
8
|
+
import s from "./messages.js";
|
|
9
9
|
import { useErrorMessaging as I } from "./useErrorMessaging.js";
|
|
10
10
|
import { jsxs as A, jsx as e } from "react/jsx-runtime";
|
|
11
|
-
import '../../../../../../styles/autofill-overlay.css';const
|
|
12
|
-
autofillOverlay:
|
|
13
|
-
withError:
|
|
14
|
-
autofillOverlayTitle:
|
|
15
|
-
autofillOverlayDescription:
|
|
16
|
-
dismissButton:
|
|
17
|
-
overlayIcon:
|
|
11
|
+
import '../../../../../../styles/autofill-overlay.css';const j = "_autofillOverlay_16p2j_1", x = "_withError_16p2j_12", B = "_autofillOverlayTitle_16p2j_16", D = "_autofillOverlayDescription_16p2j_21", M = "_dismissButton_16p2j_25", S = "_overlayIcon_16p2j_29", a = {
|
|
12
|
+
autofillOverlay: j,
|
|
13
|
+
withError: x,
|
|
14
|
+
autofillOverlayTitle: B,
|
|
15
|
+
autofillOverlayDescription: D,
|
|
16
|
+
dismissButton: M,
|
|
17
|
+
overlayIcon: S
|
|
18
18
|
}, Y = ({
|
|
19
19
|
errorCode: t,
|
|
20
20
|
isFetchingSuggestions: u,
|
|
21
21
|
isLongLoading: l
|
|
22
22
|
}) => {
|
|
23
|
-
const
|
|
24
|
-
let o =
|
|
23
|
+
const i = h(), [p, d] = T(!1), r = I(t);
|
|
24
|
+
let o = i.formatMessage(s.defaultLoadingMessage);
|
|
25
25
|
t && (o = r.title);
|
|
26
26
|
const n = localStorage.getItem(E);
|
|
27
|
-
l && n === "standard" && (o =
|
|
28
|
-
const c = l && n === "standard" ?
|
|
29
|
-
return !u && !t ||
|
|
30
|
-
className: O(
|
|
31
|
-
children: [t ? /* @__PURE__ */ e(
|
|
32
|
-
className:
|
|
27
|
+
l && n === "standard" && (o = i.formatMessage(s.longLoadingTitle));
|
|
28
|
+
const c = l && n === "standard" ? i.formatMessage(s.longLoadingDescription) : t && r.description;
|
|
29
|
+
return !u && !t || p ? null : /* @__PURE__ */ A("div", {
|
|
30
|
+
className: O(a.autofillOverlay, t && a.withError),
|
|
31
|
+
children: [t ? /* @__PURE__ */ e(_, {
|
|
32
|
+
className: a.overlayIcon,
|
|
33
33
|
color: y,
|
|
34
34
|
height: f,
|
|
35
35
|
role: "presentation",
|
|
36
36
|
width: f
|
|
37
|
-
}) : /* @__PURE__ */ e(
|
|
38
|
-
"aria-label":
|
|
37
|
+
}) : /* @__PURE__ */ e(g, {
|
|
38
|
+
"aria-label": i.formatMessage(s.loadingAriaLabel),
|
|
39
39
|
"aria-live": "polite",
|
|
40
|
-
className:
|
|
40
|
+
className: a.overlayIcon,
|
|
41
41
|
size: "large",
|
|
42
42
|
variant: "default"
|
|
43
43
|
}), /* @__PURE__ */ e(m, {
|
|
44
44
|
as: "p",
|
|
45
|
-
className:
|
|
45
|
+
className: a.autofillOverlayTitle,
|
|
46
46
|
variant: "subtitle",
|
|
47
47
|
children: o
|
|
48
48
|
}), c && /* @__PURE__ */ e(m, {
|
|
49
49
|
as: "p",
|
|
50
|
-
className:
|
|
50
|
+
className: a.autofillOverlayDescription,
|
|
51
51
|
color: "textOnLightSecondary",
|
|
52
52
|
variant: "bodyDefault",
|
|
53
53
|
children: c
|
|
54
|
-
}), t && /* @__PURE__ */ e(
|
|
55
|
-
className:
|
|
56
|
-
onClick: () =>
|
|
54
|
+
}), t && /* @__PURE__ */ e(v, {
|
|
55
|
+
className: a.dismissButton,
|
|
56
|
+
onClick: () => d(!0),
|
|
57
57
|
"data-target-id": "TextButton-dismissButton",
|
|
58
|
-
children:
|
|
58
|
+
children: i.formatMessage(s.dismissButton)
|
|
59
59
|
})]
|
|
60
60
|
});
|
|
61
61
|
};
|
|
@@ -1,149 +1,145 @@
|
|
|
1
1
|
import "../custom-instance-new-field/custom-instance-new-field.js";
|
|
2
|
-
import { DeleteConfirmationModal as
|
|
2
|
+
import { DeleteConfirmationModal as J } from "../delete-confirmation-modal/delete-confirmation-modal.js";
|
|
3
3
|
import "../metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js";
|
|
4
4
|
import "../metadata-instance-form-header/metadata-instance-form-header.js";
|
|
5
|
-
import
|
|
6
|
-
import { Formik as
|
|
7
|
-
import
|
|
8
|
-
import { useState as y, useEffect as
|
|
9
|
-
import { TEMPLATE_CUSTOM_PROPERTIES as
|
|
10
|
-
import { useAutofill as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
const me = ({
|
|
5
|
+
import z from "clsx";
|
|
6
|
+
import { Formik as G, Form as H } from "formik";
|
|
7
|
+
import Q from "lodash/isEqual";
|
|
8
|
+
import { useState as y, useEffect as O, useRef as x, useMemo as X } from "react";
|
|
9
|
+
import { TEMPLATE_CUSTOM_PROPERTIES as Y } from "../../../../constants.js";
|
|
10
|
+
import { useAutofill as Z } from "../../../../utils/autofill-context.js";
|
|
11
|
+
import { TemplateInstance as ee } from "../../../metadata-editor-fields/metadata-editor-fields.js";
|
|
12
|
+
import { MetadataEmptyState as te } from "../../../metadata-empty-state/metadata-empty-state.js";
|
|
13
|
+
import { AutofillOverlay as ae } from "../autofill-overlay/autofill-overlay.js";
|
|
14
|
+
import { CustomInstance as ne } from "../custom-instance/custom-instance.js";
|
|
15
|
+
import { c as oe } from "../../../../../../chunks/utils.js";
|
|
16
|
+
import { s as d, M as se } from "../../../../../../chunks/metadata-instance-form-card-wrapper.js";
|
|
17
|
+
import { jsx as n, jsxs as S } from "react/jsx-runtime";
|
|
18
|
+
import { UnsavedChangesModal as re } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
|
|
19
|
+
const ie = ({
|
|
21
20
|
dirty: i,
|
|
22
21
|
onChange: l,
|
|
23
|
-
values:
|
|
22
|
+
values: t
|
|
24
23
|
}) => {
|
|
25
|
-
const s = x(
|
|
26
|
-
return i && !
|
|
27
|
-
},
|
|
24
|
+
const s = x(t);
|
|
25
|
+
return i && !Q(s.current.metadata.fields, t.metadata.fields) && (s.current = t, l(t)), null;
|
|
26
|
+
}, Ie = (i) => {
|
|
28
27
|
const {
|
|
29
28
|
areAiSuggestionsAvailable: l,
|
|
30
|
-
customRef:
|
|
29
|
+
customRef: t,
|
|
31
30
|
isLargeFile: s,
|
|
32
31
|
errorCode: m,
|
|
33
32
|
isAiSuggestionsFeatureEnabled: c,
|
|
34
33
|
isAdvancedExtractAgentEnabled: D = !1,
|
|
35
|
-
isBetaLanguageEnabled:
|
|
36
|
-
isDeleteButtonDisabled:
|
|
34
|
+
isBetaLanguageEnabled: I,
|
|
35
|
+
isDeleteButtonDisabled: v,
|
|
37
36
|
isDeleteConfirmationModalCheckboxEnabled: A,
|
|
38
|
-
isMultilevelTaxonomyFieldEnabled:
|
|
37
|
+
isMultilevelTaxonomyFieldEnabled: p,
|
|
39
38
|
isUnsavedChangesModalOpen: T = !1,
|
|
40
39
|
MetadataInstanceFormCustomWrapper: w,
|
|
41
40
|
selectedTemplateInstance: e,
|
|
42
41
|
onCancel: R,
|
|
43
|
-
onChange:
|
|
42
|
+
onChange: f,
|
|
44
43
|
onDelete: L,
|
|
45
|
-
onDiscardUnsavedChanges:
|
|
46
|
-
onSubmit:
|
|
44
|
+
onDiscardUnsavedChanges: k,
|
|
45
|
+
onSubmit: N,
|
|
47
46
|
setIsUnsavedChangesModalOpen: u,
|
|
48
47
|
taxonomyOptionsFetcher: g,
|
|
49
|
-
isConfidenceScoreReviewEnabled:
|
|
50
|
-
} = i,
|
|
48
|
+
isConfidenceScoreReviewEnabled: le = !1
|
|
49
|
+
} = i, P = w ?? se, [U, E] = y(!1), {
|
|
51
50
|
isFetchingSuggestions: o,
|
|
52
|
-
isLongLoading:
|
|
53
|
-
getAiSuggestions:
|
|
51
|
+
isLongLoading: C,
|
|
52
|
+
getAiSuggestions: B,
|
|
54
53
|
clearState: h,
|
|
55
|
-
suggestions:
|
|
56
|
-
} =
|
|
57
|
-
|
|
54
|
+
suggestions: K
|
|
55
|
+
} = Z();
|
|
56
|
+
O(() => () => {
|
|
58
57
|
h();
|
|
59
58
|
}, [h, e?.id]);
|
|
60
|
-
const b = e?.templateKey ===
|
|
61
|
-
await
|
|
62
|
-
},
|
|
59
|
+
const b = e?.templateKey === Y, V = async (a) => {
|
|
60
|
+
await N(a, oe(a, e));
|
|
61
|
+
}, W = (a) => {
|
|
63
62
|
a ? u(!0) : R();
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
},
|
|
63
|
+
}, j = () => {
|
|
64
|
+
E(!0);
|
|
65
|
+
}, _ = {
|
|
67
66
|
metadata: {
|
|
68
67
|
...e
|
|
69
68
|
}
|
|
70
|
-
}, F = x(null), [M,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}, [
|
|
74
|
-
const
|
|
69
|
+
}, F = x(null), [M, $] = y(null);
|
|
70
|
+
O(() => {
|
|
71
|
+
$(t ?? F.current);
|
|
72
|
+
}, [t, e?.templateKey, e?.scope]);
|
|
73
|
+
const q = X(() => {
|
|
75
74
|
const a = e?.fields.length === 0;
|
|
76
75
|
if (b)
|
|
77
|
-
return /* @__PURE__ */
|
|
76
|
+
return /* @__PURE__ */ n(ne, {
|
|
78
77
|
isLoading: o
|
|
79
78
|
});
|
|
80
79
|
if (a)
|
|
81
|
-
return /* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ n(te, {
|
|
82
81
|
isBoxAiSuggestionsFeatureEnabled: c,
|
|
83
82
|
level: "instance"
|
|
84
83
|
});
|
|
85
84
|
const r = !!(o || m);
|
|
86
|
-
return /* @__PURE__ */
|
|
87
|
-
className:
|
|
88
|
-
children: [/* @__PURE__ */
|
|
85
|
+
return /* @__PURE__ */ S("div", {
|
|
86
|
+
className: z(d.metadataInstanceFormContent, r && d.showOverlay),
|
|
87
|
+
children: [/* @__PURE__ */ n(ae, {
|
|
89
88
|
errorCode: m,
|
|
90
89
|
isFetchingSuggestions: o,
|
|
91
|
-
isLongLoading:
|
|
92
|
-
}), /* @__PURE__ */
|
|
90
|
+
isLongLoading: C
|
|
91
|
+
}), /* @__PURE__ */ n(ee, {
|
|
93
92
|
disableForm: o,
|
|
94
93
|
isExternallyOwned: e?.isExternallyOwned,
|
|
95
|
-
isMultilevelTaxonomyFieldEnabled:
|
|
96
|
-
portalElement:
|
|
94
|
+
isMultilevelTaxonomyFieldEnabled: p,
|
|
95
|
+
portalElement: t ?? M,
|
|
97
96
|
taxonomyOptionsFetcher: g
|
|
98
97
|
})]
|
|
99
98
|
});
|
|
100
|
-
}, [e?.fields.length, b, o,
|
|
101
|
-
return /* @__PURE__ */
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
})
|
|
144
|
-
}, `${e?.scope}.${e?.templateKey}`)
|
|
145
|
-
});
|
|
99
|
+
}, [e?.fields.length, b, o, C, t, M, g, c, p, m, e?.isExternallyOwned]);
|
|
100
|
+
return /* @__PURE__ */ n(G, {
|
|
101
|
+
initialValues: _,
|
|
102
|
+
onSubmit: V,
|
|
103
|
+
children: ({
|
|
104
|
+
values: a,
|
|
105
|
+
dirty: r
|
|
106
|
+
}) => /* @__PURE__ */ S(H, {
|
|
107
|
+
children: [/* @__PURE__ */ n(P, {
|
|
108
|
+
areAiSuggestionsAvailable: l,
|
|
109
|
+
className: d.metadataInstanceForm,
|
|
110
|
+
formRef: F,
|
|
111
|
+
formValues: a,
|
|
112
|
+
getAiSuggestions: B,
|
|
113
|
+
handleCancel: W,
|
|
114
|
+
handleDelete: j,
|
|
115
|
+
isAdvancedExtractAgentEnabled: D,
|
|
116
|
+
isAiSuggestionsFeatureEnabled: c,
|
|
117
|
+
isBetaLanguageEnabled: I,
|
|
118
|
+
isDeleteButtonDisabled: v,
|
|
119
|
+
isFetchingSuggestions: o,
|
|
120
|
+
isFormDirty: r,
|
|
121
|
+
isLargeFile: s,
|
|
122
|
+
selectedTemplateInstance: e,
|
|
123
|
+
suggestions: K,
|
|
124
|
+
children: e && q
|
|
125
|
+
}), f && /* @__PURE__ */ n(ie, {
|
|
126
|
+
dirty: r,
|
|
127
|
+
onChange: f,
|
|
128
|
+
values: a
|
|
129
|
+
}), /* @__PURE__ */ n(re, {
|
|
130
|
+
onBackToEdit: () => u(!1),
|
|
131
|
+
onDiscardChanges: k,
|
|
132
|
+
open: T
|
|
133
|
+
}), /* @__PURE__ */ n(J, {
|
|
134
|
+
isCheckboxEnabled: A,
|
|
135
|
+
onConfirm: () => L(e),
|
|
136
|
+
onDismiss: () => E(!1),
|
|
137
|
+
open: U,
|
|
138
|
+
templateName: e?.displayName
|
|
139
|
+
})]
|
|
140
|
+
})
|
|
141
|
+
}, `${e?.scope}.${e?.templateKey}`);
|
|
146
142
|
};
|
|
147
143
|
export {
|
|
148
|
-
|
|
144
|
+
Ie as MetadataInstanceForm
|
|
149
145
|
};
|
|
@@ -1,34 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getVisibleTemplates as f } from "../../utils/utils.js";
|
|
1
|
+
import { getVisibleTemplates as d } from "../../utils/utils.js";
|
|
3
2
|
import { MetadataInstance as l } from "./subcomponents/metadata-instance/metadata-instance.js";
|
|
4
|
-
import { jsx as
|
|
3
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
5
4
|
import "./subcomponents/metadata-instance-header/metadata-instance-header.js";
|
|
6
|
-
import '../../../../styles/metadata-instance-list.css';const p = "_metadataInstanceList_bd83w_1",
|
|
5
|
+
import '../../../../styles/metadata-instance-list.css';const p = "_metadataInstanceList_bd83w_1", f = {
|
|
7
6
|
metadataInstanceList: p
|
|
8
|
-
},
|
|
9
|
-
areAiSuggestionsAvailable:
|
|
10
|
-
isAiSuggestionsFeatureEnabled:
|
|
7
|
+
}, x = ({
|
|
8
|
+
areAiSuggestionsAvailable: s,
|
|
9
|
+
isAiSuggestionsFeatureEnabled: e,
|
|
11
10
|
isBetaLanguageEnabled: n,
|
|
12
11
|
onEdit: i,
|
|
13
|
-
templateInstances:
|
|
14
|
-
taxonomyNodeFetcher:
|
|
15
|
-
isAdvancedExtractAgentEnabled:
|
|
12
|
+
templateInstances: m,
|
|
13
|
+
taxonomyNodeFetcher: o,
|
|
14
|
+
isAdvancedExtractAgentEnabled: r = !1,
|
|
16
15
|
isConfidenceScoreReviewEnabled: c = !1
|
|
17
|
-
}) => /* @__PURE__ */
|
|
18
|
-
|
|
19
|
-
children: /* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, a.id))
|
|
30
|
-
})
|
|
16
|
+
}) => /* @__PURE__ */ a("div", {
|
|
17
|
+
className: f.metadataInstanceList,
|
|
18
|
+
children: d(m).map((t) => /* @__PURE__ */ a(l, {
|
|
19
|
+
areAiSuggestionsAvailable: s,
|
|
20
|
+
isAdvancedExtractAgentEnabled: r,
|
|
21
|
+
isAiSuggestionsFeatureEnabled: e,
|
|
22
|
+
isBetaLanguageEnabled: n,
|
|
23
|
+
isConfidenceScoreReviewEnabled: c,
|
|
24
|
+
onEdit: i,
|
|
25
|
+
taxonomyNodeFetcher: o,
|
|
26
|
+
templateInstance: t
|
|
27
|
+
}, t.id))
|
|
31
28
|
});
|
|
32
29
|
export {
|
|
33
|
-
|
|
30
|
+
x as MetadataInstanceList
|
|
34
31
|
};
|
|
@@ -1,54 +1,56 @@
|
|
|
1
|
-
import { Card as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useAutofill as
|
|
4
|
-
import { MetadataEmptyState as
|
|
5
|
-
import { MetadataInstanceContent as
|
|
6
|
-
import { MetadataInstanceFooter as
|
|
7
|
-
import { MetadataInstanceHeader as
|
|
1
|
+
import { Card as b, Divider as n } from "@box/blueprint-web";
|
|
2
|
+
import { useState as g } from "react";
|
|
3
|
+
import { useAutofill as H } from "../../../../utils/autofill-context.js";
|
|
4
|
+
import { MetadataEmptyState as _ } from "../../../metadata-empty-state/metadata-empty-state.js";
|
|
5
|
+
import { MetadataInstanceContent as M } from "../metadata-instance-content/metadata-instance-content.js";
|
|
6
|
+
import { MetadataInstanceFooter as N } from "../metadata-instance-footer/metadata-instance-footer.js";
|
|
7
|
+
import { MetadataInstanceHeader as x } from "../metadata-instance-header/metadata-instance-header.js";
|
|
8
8
|
import { jsxs as r, jsx as o, Fragment as u } from "react/jsx-runtime";
|
|
9
|
-
import '../../../../../../styles/metadata-instance.css';const
|
|
10
|
-
topDivider:
|
|
11
|
-
bottomDivider:
|
|
12
|
-
},
|
|
9
|
+
import '../../../../../../styles/metadata-instance.css';const F = "_topDivider_tzhlb_1", j = "_bottomDivider_tzhlb_5", p = {
|
|
10
|
+
topDivider: F,
|
|
11
|
+
bottomDivider: j
|
|
12
|
+
}, G = ({
|
|
13
13
|
areAiSuggestionsAvailable: y,
|
|
14
14
|
isAiSuggestionsFeatureEnabled: l,
|
|
15
15
|
isBetaLanguageEnabled: c,
|
|
16
16
|
onEdit: d,
|
|
17
17
|
templateInstance: t,
|
|
18
18
|
taxonomyNodeFetcher: h,
|
|
19
|
-
isAdvancedExtractAgentEnabled: v = !1
|
|
19
|
+
isAdvancedExtractAgentEnabled: v = !1,
|
|
20
|
+
isConfidenceScoreReviewEnabled: E
|
|
20
21
|
}) => {
|
|
21
|
-
const i = t.fields, m = (e) => !e.value || Array.isArray(e.value) && e.value.length === 0,
|
|
22
|
-
getAiSuggestions:
|
|
23
|
-
} =
|
|
24
|
-
d(t),
|
|
22
|
+
const i = t.fields, m = (e) => !e.value || Array.isArray(e.value) && e.value.length === 0, f = i.every(m), V = i.some(m), A = i.length > 0, [a, s] = g(!0), {
|
|
23
|
+
getAiSuggestions: D
|
|
24
|
+
} = H(), S = (e) => {
|
|
25
|
+
d(t), D(t.templateKey, t.scope, e);
|
|
25
26
|
};
|
|
26
|
-
return /* @__PURE__ */ r(
|
|
27
|
-
children: [/* @__PURE__ */ o(
|
|
27
|
+
return /* @__PURE__ */ r(b, {
|
|
28
|
+
children: [/* @__PURE__ */ o(x, {
|
|
28
29
|
areAiSuggestionsAvailable: y,
|
|
29
30
|
canEdit: t.canEdit,
|
|
30
31
|
isAdvancedExtractAgentEnabled: v,
|
|
31
32
|
isAiSuggestionsFeatureEnabled: l,
|
|
32
33
|
isBetaLanguageEnabled: c,
|
|
33
|
-
onAutofill:
|
|
34
|
+
onAutofill: S,
|
|
34
35
|
onEdit: () => d(t),
|
|
35
36
|
templateName: t?.displayName
|
|
36
37
|
}), /* @__PURE__ */ o(n, {
|
|
37
38
|
className: p.topDivider
|
|
38
|
-
}), a &&
|
|
39
|
-
isAnyEmptyValueHidden:
|
|
39
|
+
}), a && f ? /* @__PURE__ */ o(_, {
|
|
40
|
+
isAnyEmptyValueHidden: A,
|
|
40
41
|
isBoxAiSuggestionsFeatureEnabled: l,
|
|
41
42
|
level: "instance",
|
|
42
43
|
onShowEmptyValues: () => s(!1)
|
|
43
44
|
}) : /* @__PURE__ */ r(u, {
|
|
44
|
-
children: [/* @__PURE__ */ o(
|
|
45
|
+
children: [/* @__PURE__ */ o(M, {
|
|
46
|
+
isConfidenceScoreReviewEnabled: E,
|
|
45
47
|
shouldHideEmptyValues: a,
|
|
46
48
|
taxonomyNodeFetcher: h,
|
|
47
49
|
templateInstance: t
|
|
48
|
-
}),
|
|
50
|
+
}), V && /* @__PURE__ */ r(u, {
|
|
49
51
|
children: [/* @__PURE__ */ o(n, {
|
|
50
52
|
className: p.bottomDivider
|
|
51
|
-
}), /* @__PURE__ */ o(
|
|
53
|
+
}), /* @__PURE__ */ o(N, {
|
|
52
54
|
isAnyEmptyValueHidden: a,
|
|
53
55
|
onHideEmptyValues: () => s(!0),
|
|
54
56
|
onShowEmptyValues: () => s(!1)
|
|
@@ -58,5 +60,5 @@ import '../../../../../../styles/metadata-instance.css';const x = "_topDivider_t
|
|
|
58
60
|
});
|
|
59
61
|
};
|
|
60
62
|
export {
|
|
61
|
-
|
|
63
|
+
G as MetadataInstance
|
|
62
64
|
};
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import { MetadataInstanceEntry as
|
|
1
|
+
import { MetadataInstanceEntry as r } from "../metadata-instance-entry/metadata-instance-entry.js";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import '../../../../../../styles/metadata-instance-content.css';const
|
|
4
|
-
metadataInstanceContent:
|
|
5
|
-
},
|
|
3
|
+
import '../../../../../../styles/metadata-instance-content.css';const m = "_metadataInstanceContent_1a9zf_1", y = {
|
|
4
|
+
metadataInstanceContent: m
|
|
5
|
+
}, i = ({
|
|
6
6
|
shouldHideEmptyValues: a,
|
|
7
7
|
templateInstance: n,
|
|
8
|
-
taxonomyNodeFetcher: o
|
|
8
|
+
taxonomyNodeFetcher: o,
|
|
9
|
+
isConfidenceScoreReviewEnabled: s
|
|
9
10
|
}) => {
|
|
10
11
|
const {
|
|
11
|
-
fields:
|
|
12
|
+
fields: c = []
|
|
12
13
|
} = n;
|
|
13
14
|
return /* @__PURE__ */ e("div", {
|
|
14
|
-
className:
|
|
15
|
-
children:
|
|
15
|
+
className: y.metadataInstanceContent,
|
|
16
|
+
children: c.filter((t) => !t.hidden).map((t) => /* @__PURE__ */ e(r, {
|
|
16
17
|
confidenceScore: t.confidenceScore,
|
|
17
18
|
description: t.description,
|
|
19
|
+
isConfidenceScoreReviewEnabled: s,
|
|
18
20
|
isExternallyOwned: n.isExternallyOwned,
|
|
19
21
|
name: t.displayName || t.key,
|
|
20
22
|
scope: t.namespace,
|
|
@@ -27,5 +29,5 @@ import '../../../../../../styles/metadata-instance-content.css';const r = "_meta
|
|
|
27
29
|
});
|
|
28
30
|
};
|
|
29
31
|
export {
|
|
30
|
-
|
|
32
|
+
i as MetadataInstanceContent
|
|
31
33
|
};
|
|
@@ -1,91 +1,89 @@
|
|
|
1
|
-
import { Tooltip as
|
|
2
|
-
import { AlertCircle as
|
|
3
|
-
import { useIntl as
|
|
4
|
-
import { convertISOStringToUTCDate as
|
|
1
|
+
import { Tooltip as _, Status as h, Text as x } from "@box/blueprint-web";
|
|
2
|
+
import { AlertCircle as C } from "@box/blueprint-web-assets/icons/Medium";
|
|
3
|
+
import { useIntl as g, FormattedDate as T } from "react-intl";
|
|
4
|
+
import { convertISOStringToUTCDate as b } from "../../../../utils/convertDate.js";
|
|
5
5
|
import { C as v } from "../../../../../../chunks/types.js";
|
|
6
|
-
import { useIsConfidenceScoreReviewEnabled as E } from "../../../../utils/confidence-score-context.js";
|
|
7
6
|
import { getConfidenceScoreTooltip as D } from "../../../../utils/confidence-score/get-confidence-score-tooltip.js";
|
|
8
|
-
import
|
|
7
|
+
import E from "../../../interactive-text/interactive-text.js";
|
|
9
8
|
import { MetadataEntryDisplay as L } from "./metadata-entry-display.js";
|
|
10
9
|
import N from "./messages.js";
|
|
11
|
-
import { jsxs as m, jsx as
|
|
12
|
-
import '../../../../../../styles/metadata-instance-entry.css';const A = "_metadataInstanceEntry_fr9av_1", M = "_name_fr9av_6", j = "_labelContainer_fr9av_14",
|
|
10
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
11
|
+
import '../../../../../../styles/metadata-instance-entry.css';const A = "_metadataInstanceEntry_fr9av_1", M = "_name_fr9av_6", j = "_labelContainer_fr9av_14", w = "_confidenceScoreIcon_fr9av_20", n = {
|
|
13
12
|
metadataInstanceEntry: A,
|
|
14
13
|
name: M,
|
|
15
14
|
labelContainer: j,
|
|
16
|
-
confidenceScoreIcon:
|
|
17
|
-
},
|
|
18
|
-
description:
|
|
15
|
+
confidenceScoreIcon: w
|
|
16
|
+
}, K = ({
|
|
17
|
+
description: o,
|
|
19
18
|
name: a,
|
|
20
19
|
shouldHideEmptyValues: f,
|
|
21
20
|
type: c,
|
|
22
|
-
value:
|
|
21
|
+
value: t,
|
|
23
22
|
taxonomyNodeFetcher: d,
|
|
24
23
|
taxonomyKey: u,
|
|
25
|
-
scope:
|
|
26
|
-
isExternallyOwned:
|
|
27
|
-
confidenceScore:
|
|
24
|
+
scope: p,
|
|
25
|
+
isExternallyOwned: y,
|
|
26
|
+
confidenceScore: r,
|
|
27
|
+
isConfidenceScoreReviewEnabled: S = !1
|
|
28
28
|
}) => {
|
|
29
|
-
const {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (
|
|
33
|
-
return e.toString();
|
|
34
|
-
if (!e)
|
|
29
|
+
const i = g(), s = S && r?.status === v.ReviewIsNeeded ? D(i.formatMessage, r.status, r.value) : null, l = (() => {
|
|
30
|
+
if (typeof t == "number")
|
|
31
|
+
return t.toString();
|
|
32
|
+
if (!t)
|
|
35
33
|
return null;
|
|
36
|
-
if (Array.isArray(
|
|
37
|
-
return
|
|
38
|
-
if (c === "date" && typeof
|
|
39
|
-
const I =
|
|
40
|
-
return /* @__PURE__ */
|
|
34
|
+
if (Array.isArray(t))
|
|
35
|
+
return t.join(", ");
|
|
36
|
+
if (c === "date" && typeof t == "string") {
|
|
37
|
+
const I = b(t);
|
|
38
|
+
return /* @__PURE__ */ e(T, {
|
|
41
39
|
day: "numeric",
|
|
42
40
|
month: "long",
|
|
43
41
|
value: I,
|
|
44
42
|
year: "numeric"
|
|
45
43
|
});
|
|
46
44
|
}
|
|
47
|
-
return
|
|
45
|
+
return t;
|
|
48
46
|
})();
|
|
49
47
|
return f && !l ? null : /* @__PURE__ */ m("div", {
|
|
50
48
|
className: n.metadataInstanceEntry,
|
|
51
49
|
children: [/* @__PURE__ */ m("div", {
|
|
52
50
|
className: n.labelContainer,
|
|
53
|
-
children: [s && /* @__PURE__ */
|
|
51
|
+
children: [s && /* @__PURE__ */ e(_, {
|
|
54
52
|
content: s,
|
|
55
|
-
children: /* @__PURE__ */
|
|
53
|
+
children: /* @__PURE__ */ e("span", {
|
|
56
54
|
className: n.confidenceScoreIcon,
|
|
57
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ e(h, {
|
|
58
56
|
color: "SurfaceStatusSurfaceGray",
|
|
59
57
|
hideText: !0,
|
|
60
|
-
icon:
|
|
58
|
+
icon: C,
|
|
61
59
|
interactive: !0,
|
|
62
60
|
text: i.formatMessage(N.confidenceScoreIconAriaLabel)
|
|
63
61
|
})
|
|
64
62
|
})
|
|
65
|
-
}), /* @__PURE__ */
|
|
63
|
+
}), /* @__PURE__ */ e(x, {
|
|
66
64
|
as: "h5",
|
|
67
65
|
color: "textOnLightSecondary",
|
|
68
66
|
variant: "bodyDefaultBold",
|
|
69
67
|
className: n.name,
|
|
70
|
-
children:
|
|
68
|
+
children: o ? /* @__PURE__ */ e(E, {
|
|
71
69
|
as: "span",
|
|
72
70
|
color: "textOnLightSecondary",
|
|
73
|
-
tooltipText:
|
|
71
|
+
tooltipText: o,
|
|
74
72
|
variant: "bodyDefaultBold",
|
|
75
73
|
children: a
|
|
76
74
|
}) : a
|
|
77
75
|
})]
|
|
78
|
-
}), /* @__PURE__ */
|
|
76
|
+
}), /* @__PURE__ */ e(L, {
|
|
79
77
|
formattedValue: l,
|
|
80
|
-
isExternallyOwned:
|
|
81
|
-
scope:
|
|
78
|
+
isExternallyOwned: y,
|
|
79
|
+
scope: p,
|
|
82
80
|
taxonomyKey: u,
|
|
83
81
|
taxonomyNodeFetcher: d,
|
|
84
82
|
type: c,
|
|
85
|
-
value:
|
|
83
|
+
value: t
|
|
86
84
|
})]
|
|
87
85
|
});
|
|
88
86
|
};
|
|
89
87
|
export {
|
|
90
|
-
|
|
88
|
+
K as MetadataInstanceEntry
|
|
91
89
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._autofillOverlay_16p2j_1{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;padding:var(--space-4) var(--space-4) 0 var(--space-4);background:#fafcfee6}._withError_16p2j_12{background-color:#ffffffe6}._autofillOverlayTitle_16p2j_16{margin-top:var(--space-4);text-align:center}._autofillOverlayDescription_16p2j_21{text-align:center}._dismissButton_16p2j_25{margin-top:var(--space-4)}._overlayIcon_16p2j_29{position:relative;display:block;margin-top:var(--space-4)}._testContainerStyle_16p2j_35{position:relative;width:380px;height:600px;padding:var(--space-4);border:1px solid #000}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._content_1xvav_2{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);z-index:2147483647;box-sizing:border-box;width:17.75rem;padding:0;color:var(--text-text-on-light);background-color:var(--surface-menu-surface);border:var(--border-1) solid var(--border-card-border);border-radius:var(--radius-3);box-shadow:var(--dropshadow-3)}._scrollableContainer_1xvav_21{max-height:22.5rem;padding:var(--space-3)}._item_1xvav_26{position:relative;align-items:center;padding:var(--border-8);border:var(--border-2) solid transparent;border-radius:var(--radius-3);outline:none;-webkit-user-select:none;user-select:none}._option_1xvav_36{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer}._option_1xvav_36[aria-disabled]{color:var(--gray-65);pointer-events:none}._option_1xvav_36[data-active-item]:not(:hover),._option_1xvav_36[data-highlighted]:not(:hover){background-color:var(--surface-menu-surface-hover);border:var(--border-2) solid var(--border-input-border-focus)}._option_1xvav_36[data-state=open],._option_1xvav_36:hover{background-color:var(--surface-menu-surface-hover)}._search_1xvav_57{position:relative;height:fit-content;padding:var(--space-3)}._search_1xvav_57 ._searchIcon_1xvav_62{position:absolute;top:var(--space-8);left:var(--space-6);width:var(--size-4);height:var(--size-4);transform:translateY(-50%);pointer-events:none}._search_1xvav_57 ._searchIcon_1xvav_62._global_1xvav_71{left:var(--space-4);width:var(--size-5);height:var(--size-5)}._search_1xvav_57 ._clearSearchIcon_1xvav_76{position:absolute;top:var(--space-8);right:var(--space-6);width:var(--size-4);height:var(--size-4);transform:translateY(-50%)}._search_1xvav_57 ._searchInput_1xvav_84{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);box-sizing:border-box;width:100%;height:var(--size-10);padding-inline:var(--space-9) var(--space-6);padding-block:0;color:var(--text-text-on-light);background-color:var(--surface-search-surface);border:var(--border-1) solid transparent;border-radius:var(--radius-2);outline:0;box-shadow:unset;transition:border-color .15s ease,background-color .15s ease}._search_1xvav_57 ._searchInput_1xvav_84._global_1xvav_71{height:var(--size-12);border-radius:var(--radius-7);padding-inline:var(--space-12) var(--space-6)}._search_1xvav_57 ._searchInput_1xvav_84::-webkit-search-decoration,._search_1xvav_57 ._searchInput_1xvav_84::-webkit-search-cancel-button,._search_1xvav_57 ._searchInput_1xvav_84::-webkit-search-results-button,._search_1xvav_57 ._searchInput_1xvav_84::-webkit-search-results-decoration{appearance:none}._search_1xvav_57 ._searchInput_1xvav_84:hover{box-shadow:unset}._search_1xvav_57 ._searchInput_1xvav_84 ._firefoxDefaultOpacityFix_1xvav_116,._search_1xvav_57 ._searchInput_1xvav_84 ._searchInput_1xvav_84::placeholder{opacity:1}._search_1xvav_57 ._searchInput_1xvav_84::placeholder{color:var(--text-text-on-light-secondary)}._search_1xvav_57 ._searchInput_1xvav_84:not(:placeholder-shown){padding-inline-end:var(--space-8)}._search_1xvav_57 ._searchInput_1xvav_84:focus-visible{padding-inline-start:calc(var(--space-9) - var(--border-1));background-color:var(--surface-search-surface-focused);border:var(--border-2) solid #2486fc}._search_1xvav_57 ._searchInput_1xvav_84:not(:focus-visible,:disabled):hover{background-color:var(--surface-search-surface-hover);border-color:#6f6f6f}._search_1xvav_57 ._divider_1xvav_134{box-shadow:var(--dropshadow-3)}._searchDivider_1xvav_138{box-shadow:var(--dropshadow-1)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._popoverContentContainer_f0vo4_2{width:18.25rem;outline:none}._popoverMainContent_f0vo4_7{max-height:calc(var(--radix-popover-content-available-height) - var(--space-8) - var(--space-2) - var(--border-1))}._loadingIndicatorWrapper_f0vo4_11{position:relative;display:flex;align-items:end;height:var(--size-8)}._errorMessageWrapper_f0vo4_18{display:flex;flex-direction:column;justify-content:center}._errorMessageWrapper_f0vo4_18 ._errorMessageWrapperText_f0vo4_23{display:flex;gap:var(--space-1);align-items:center;justify-content:center;height:var(--size-8)}._container_f0vo4_31{display:flex;gap:var(--space-1);justify-content:center}table._taxonomyAncestorTable_f0vo4_37{width:100%;table-layout:fixed;border-spacing:0}table._taxonomyAncestorTable_f0vo4_37>tbody>tr{display:flex;flex-direction:column}table._taxonomyAncestorTable_f0vo4_37>tbody>tr:not(:last-child){margin-block-end:var(--space-2)}table._taxonomyAncestorTable_f0vo4_37>tbody>tr>th{font-weight:var(--body-default-bold-font-weight);font-size:var(--body-default-bold-font-size);font-family:var(--body-default-bold-font-family);line-height:var(--body-default-bold-line-height);letter-spacing:var(--body-default-bold-letter-spacing);text-transform:var(--body-default-bold-text-case);text-decoration:var(--body-default-bold-text-decoration);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block;padding:0;color:var(--text-text-on-light-secondary-hover);text-align:start}table._taxonomyAncestorTable_f0vo4_37>tbody>tr>td{font-weight:var(--body-default-font-weight);font-size:var(--body-default-font-size);font-family:var(--body-default-font-family);line-height:var(--body-default-line-height);letter-spacing:var(--body-default-letter-spacing);text-transform:var(--body-default-text-case);text-decoration:var(--body-default-text-decoration);display:block;padding:0;color:var(--text-text-on-light);word-break:break-all}@media(max-width:767px){._taxonomyValueGroup_f0vo4_80{flex-wrap:wrap}}._taxonomyValueButton_f0vo4_85{overflow-x:hidden}._taxonomyValueButton_f0vo4_85:focus-visible{overflow-x:hidden}._taxonomyValueButton_f0vo4_85:disabled{color:var(--text-text-on-light)}._taxonomyValueButton_f0vo4_85 ._taxonomyValueLabel_f0vo4_95{overflow-x:hidden;text-overflow:ellipsis}
|
package/dist/styles/utils.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._noAttributesText_6p6pr_2{text-align:center}._fieldWrapper_6p6pr_6{position:relative;isolation:isolate}._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>input,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>button,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>div[role=group]>div,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>div>div,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>div>input{border-bottom:none!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>input:not(:disabled,:focus-visible,._error_6p6pr_20):hover,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>button:not(:disabled,:focus-visible,._error_6p6pr_20):hover,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>div[role=group]>div:not(:disabled,:focus-visible,._error_6p6pr_20):hover,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>div>div:not(:disabled,:focus-visible,._error_6p6pr_20):hover,._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11>div>input:not(:disabled,:focus-visible,._error_6p6pr_20):hover{border-bottom:none}._fieldWrapper_6p6pr_6 ._hasSuggestion_6p6pr_11 div[role=group]>div{margin-right:var(--border-1);margin-left:var(--border-1)}._fieldWrapper_6p6pr_6 ._dateField_6p6pr_33>div[role=group]>div{padding-inline:.75rem}._fieldWrapper_6p6pr_6 ._suggestionApplied_6p6pr_37>._comboboxContainer_6p6pr_37,._fieldWrapper_6p6pr_6 ._suggestionApplied_6p6pr_37>input,._fieldWrapper_6p6pr_6 ._suggestionApplied_6p6pr_37>button,._fieldWrapper_6p6pr_6 ._suggestionApplied_6p6pr_37>div[role=group]>div,._fieldWrapper_6p6pr_6 ._suggestionApplied_6p6pr_37>div>div,._fieldWrapper_6p6pr_6 ._suggestionApplied_6p6pr_37>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(--border-1) transparent!important;border-radius:var(--radius-2);outline:none}._labelWrapper_6p6pr_52{display:flex;align-items:baseline;justify-content:space-between;width:100%}._labelWrapper_6p6pr_52 ._labelText_6p6pr_58{flex:unset!important}._labelWrapper_6p6pr_52 ._labelTruncated_6p6pr_61{flex:0 1 auto!important;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._labelWrapper_6p6pr_52 ._labelIcon_6p6pr_68{flex-shrink:0;width:var(--space-4);height:var(--space-4);margin-inline:var(--space-3)}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MetadataInstanceProps } from './types';
|
|
2
|
-
export declare const MetadataInstance: ({ areAiSuggestionsAvailable, isAiSuggestionsFeatureEnabled, isBetaLanguageEnabled, onEdit, templateInstance, taxonomyNodeFetcher, isAdvancedExtractAgentEnabled, }: MetadataInstanceProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const MetadataInstance: ({ areAiSuggestionsAvailable, isAiSuggestionsFeatureEnabled, isBetaLanguageEnabled, onEdit, templateInstance, taxonomyNodeFetcher, isAdvancedExtractAgentEnabled, isConfidenceScoreReviewEnabled, }: MetadataInstanceProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MetadataInstanceContentProps } from './types';
|
|
2
|
-
export declare const MetadataInstanceContent: ({ shouldHideEmptyValues, templateInstance, taxonomyNodeFetcher, }: MetadataInstanceContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const MetadataInstanceContent: ({ shouldHideEmptyValues, templateInstance, taxonomyNodeFetcher, isConfidenceScoreReviewEnabled, }: MetadataInstanceContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MetadataInstanceEntryProps } from './types';
|
|
2
|
-
export declare const MetadataInstanceEntry: ({ description, name, shouldHideEmptyValues, type, value, taxonomyNodeFetcher, taxonomyKey, scope, isExternallyOwned, confidenceScore, }: MetadataInstanceEntryProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const MetadataInstanceEntry: ({ description, name, shouldHideEmptyValues, type, value, taxonomyNodeFetcher, taxonomyKey, scope, isExternallyOwned, confidenceScore, isConfidenceScoreReviewEnabled, }: MetadataInstanceEntryProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -33,6 +33,7 @@ export type MetadataInstanceEntryProps = {
|
|
|
33
33
|
description?: string;
|
|
34
34
|
isExternallyOwned?: boolean;
|
|
35
35
|
confidenceScore?: ConfidenceScoreData;
|
|
36
|
+
isConfidenceScoreReviewEnabled?: boolean;
|
|
36
37
|
};
|
|
37
38
|
export type MetadataEntryDisplayProps = {
|
|
38
39
|
formattedValue: ReactNode;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-editor",
|
|
3
|
-
"version": "1.38.
|
|
3
|
+
"version": "1.38.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@ariakit/react": "0.4.15",
|
|
6
|
-
"@box/box-ai-agent-selector": "^1.30.
|
|
7
|
-
"@box/blueprint-web": "^12.
|
|
8
|
-
"@box/blueprint-web-assets": "^4.101.
|
|
9
|
-
"@box/combobox-with-api": "^1.32.
|
|
6
|
+
"@box/box-ai-agent-selector": "^1.30.4",
|
|
7
|
+
"@box/blueprint-web": "^12.136.0",
|
|
8
|
+
"@box/blueprint-web-assets": "^4.101.3",
|
|
9
|
+
"@box/combobox-with-api": "^1.32.4",
|
|
10
10
|
"formik": "^2.0.3",
|
|
11
11
|
"lodash": "^4.17.15",
|
|
12
12
|
"react": "^17.0.0 || ^18.0.0",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@ariakit/react": "0.4.15",
|
|
18
|
-
"@box/box-ai-agent-selector": "^1.30.
|
|
18
|
+
"@box/box-ai-agent-selector": "^1.30.4",
|
|
19
19
|
"@box/babel-plugin-target-attributes": "1.4.0",
|
|
20
|
-
"@box/blueprint-web": "^12.
|
|
21
|
-
"@box/blueprint-web-assets": "^4.101.
|
|
22
|
-
"@box/storybook-utils": "^0.16.
|
|
20
|
+
"@box/blueprint-web": "^12.136.0",
|
|
21
|
+
"@box/blueprint-web-assets": "^4.101.3",
|
|
22
|
+
"@box/storybook-utils": "^0.16.40",
|
|
23
23
|
"@testing-library/react": "^15.0.6",
|
|
24
24
|
"react": "^18.3.0",
|
|
25
25
|
"react-dom": "^18.3.0",
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { createContext as t, useMemo as c, useContext as s } from "react";
|
|
2
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
-
const r = /* @__PURE__ */ t(null), C = ({
|
|
4
|
-
children: e,
|
|
5
|
-
isConfidenceScoreReviewEnabled: o
|
|
6
|
-
}) => {
|
|
7
|
-
const n = c(() => ({
|
|
8
|
-
isConfidenceScoreReviewEnabled: o
|
|
9
|
-
}), [o]);
|
|
10
|
-
return /* @__PURE__ */ i(r.Provider, {
|
|
11
|
-
value: n,
|
|
12
|
-
children: e
|
|
13
|
-
});
|
|
14
|
-
}, f = () => {
|
|
15
|
-
const e = s(r);
|
|
16
|
-
if (!e)
|
|
17
|
-
throw new Error("useConfidenceScore should be wrapped inside ConfidenceScoreContextProvider");
|
|
18
|
-
return e;
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
r as ConfidenceScoreContext,
|
|
22
|
-
C as ConfidenceScoreContextProvider,
|
|
23
|
-
f as useIsConfidenceScoreReviewEnabled
|
|
24
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Decorator } from '@storybook/react';
|
|
2
|
-
/**
|
|
3
|
-
* Decorator that wraps stories with ConfidenceScoreContextProvider
|
|
4
|
-
* @param isConfidenceScoreReviewEnabled - Whether confidence score review is enabled
|
|
5
|
-
*/
|
|
6
|
-
export declare const withConfidenceScoreContext: (isConfidenceScoreReviewEnabled: boolean) => Decorator;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface ConfidenceScoreContextType {
|
|
3
|
-
isConfidenceScoreReviewEnabled: boolean;
|
|
4
|
-
}
|
|
5
|
-
export interface ConfidenceScoreContextProviderProps {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
isConfidenceScoreReviewEnabled: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare const ConfidenceScoreContext: React.Context<ConfidenceScoreContextType>;
|
|
10
|
-
export declare const ConfidenceScoreContextProvider: ({ children, isConfidenceScoreReviewEnabled, }: ConfidenceScoreContextProviderProps) => React.ReactElement;
|
|
11
|
-
export declare const useIsConfidenceScoreReviewEnabled: () => ConfidenceScoreContextType;
|