@box/metadata-editor 1.64.4 → 1.64.6
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/ai-suggestion-field.js +83 -0
- package/dist/chunks/autofill-overlay.js +63 -0
- package/dist/chunks/combobox-with-api-pagination.js +162 -0
- package/dist/chunks/custom-instance-new-field.js +60 -0
- package/dist/chunks/custom-instance.js +74 -0
- package/dist/chunks/delete-confirmation-modal.js +76 -0
- package/dist/chunks/field-action-bar.module.js +6 -8
- package/dist/chunks/filter-dropdown-menu.module.js +14 -13
- package/dist/chunks/filter-instances-dropdown.js +84 -0
- package/dist/chunks/interactive-header-text.js +19 -0
- package/dist/chunks/interactive-text.js +17 -0
- package/dist/chunks/metadata-editor.js +9 -0
- package/dist/chunks/metadata-instance-content.js +29 -0
- package/dist/chunks/metadata-instance-entry.js +82 -0
- package/dist/chunks/metadata-instance-footer.js +25 -0
- package/dist/chunks/metadata-instance-form-autofill-button.js +113 -0
- package/dist/chunks/metadata-instance-form-card-wrapper.js +47 -70
- package/dist/chunks/metadata-instance-form-footer.js +43 -0
- package/dist/chunks/metadata-instance-form-header.js +45 -0
- package/dist/chunks/metadata-instance-header.js +52 -0
- package/dist/chunks/metadata-instance-list.js +19 -0
- package/dist/chunks/metadata-instance.js +59 -0
- package/dist/chunks/shared-field-styles.module.js +5 -7
- package/dist/chunks/taxonomy-ancestor-status-pill.js +88 -109
- package/dist/chunks/types.js +8 -12
- package/dist/chunks/update-mode-field-wrapper.js +80 -0
- package/dist/chunks/utils.js +57 -54
- package/dist/chunks/utils2.js +50 -70
- package/dist/esm/index.js +27 -52
- package/dist/esm/lib/components/add-metadata-template-dropdown/add-metadata-template-dropdown.js +31 -43
- package/dist/esm/lib/components/add-metadata-template-dropdown/index.js +1 -3
- package/dist/esm/lib/components/add-metadata-template-dropdown/messages.js +15 -17
- package/dist/esm/lib/components/combobox-with-api-pagination/combobox-with-api-pagination.js +2 -205
- package/dist/esm/lib/components/combobox-with-api-pagination/index.js +2 -4
- package/dist/esm/lib/components/combobox-with-api-pagination/messages.js +31 -33
- package/dist/esm/lib/components/combobox-with-api-pagination/request.js +4 -6
- package/dist/esm/lib/components/combobox-with-api-pagination/use-async-list.js +113 -128
- package/dist/esm/lib/components/combobox-with-api-pagination/utils/is-abort-error.js +8 -10
- package/dist/esm/lib/components/combobox-with-api-pagination/utils/use-controllable-state.js +32 -34
- package/dist/esm/lib/components/combobox-with-api-pagination/utils/use-intersection-observer.js +72 -82
- package/dist/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-content.js +13 -18
- package/dist/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-empty-state.js +16 -19
- package/dist/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-item.js +12 -17
- package/dist/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-list.js +15 -20
- package/dist/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-root.js +13 -18
- package/dist/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-search.js +36 -44
- package/dist/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-trigger.js +7 -12
- package/dist/esm/lib/components/filter-dropdown-menu/index.js +16 -18
- package/dist/esm/lib/components/filter-dropdown-menu/messages.js +10 -12
- package/dist/esm/lib/components/filter-instances-dropdown/filter-instances-dropdown.js +2 -93
- package/dist/esm/lib/components/filter-instances-dropdown/index.js +2 -4
- package/dist/esm/lib/components/filter-instances-dropdown/messages.js +18 -20
- package/dist/esm/lib/components/interactive-header-text/interactive-header-text.js +2 -28
- package/dist/esm/lib/components/interactive-text/interactive-text.js +2 -30
- package/dist/esm/lib/components/metadata-editor-fields/components/ai-logo-badge/ai-logo-badge.js +20 -32
- package/dist/esm/lib/components/metadata-editor-fields/components/ai-logo-badge/index.js +2 -4
- package/dist/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/ai-suggestion-field.js +2 -110
- package/dist/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/index.js +2 -4
- package/dist/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/messages.js +50 -52
- package/dist/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/utils.js +12 -17
- package/dist/esm/lib/components/metadata-editor-fields/components/constants.js +2 -6
- package/dist/esm/lib/components/metadata-editor-fields/components/low-confidence-badge/index.js +2 -4
- package/dist/esm/lib/components/metadata-editor-fields/components/low-confidence-badge/low-confidence-badge.js +20 -24
- package/dist/esm/lib/components/metadata-editor-fields/components/low-confidence-suggestion-field/index.js +2 -4
- package/dist/esm/lib/components/metadata-editor-fields/components/low-confidence-suggestion-field/low-confidence-suggestion-field.js +66 -75
- package/dist/esm/lib/components/metadata-editor-fields/components/low-confidence-suggestion-field/messages.js +30 -32
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-date-field/metadata-date-field.js +43 -60
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-enum-field/metadata-enum-field.js +47 -71
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-float-field/metadata-float-field.js +32 -54
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-float-field/use-float-validation.js +8 -14
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-multi-select-field/metadata-multi-select-field.js +40 -62
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-string-field/metadata-string-field.js +28 -44
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/metadata-taxonomy-field.js +66 -95
- package/dist/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/messages.js +30 -32
- package/dist/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/mulitple-values-utils.js +7 -11
- package/dist/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/update-mode-field-wrapper.js +2 -92
- package/dist/esm/lib/components/metadata-editor-fields/editor-field-types.js +30 -34
- package/dist/esm/lib/components/metadata-editor-fields/hooks/use-memoized-field-label.js +11 -7
- package/dist/esm/lib/components/metadata-editor-fields/hooks/use-review-field-filter.js +35 -40
- package/dist/esm/lib/components/metadata-editor-fields/hooks/use-view-reference-tooltip.js +39 -34
- package/dist/esm/lib/components/metadata-editor-fields/messages.js +5 -9
- package/dist/esm/lib/components/metadata-editor-fields/metadata-editor-field-wrapper.js +186 -176
- package/dist/esm/lib/components/metadata-editor-fields/metadata-editor-fields.js +30 -42
- package/dist/esm/lib/components/metadata-editor-fields/utils.js +2 -13
- package/dist/esm/lib/components/metadata-empty-state/messages.js +42 -44
- package/dist/esm/lib/components/metadata-empty-state/metadata-empty-state.js +46 -62
- package/dist/esm/lib/components/metadata-instance-editor/index.js +7 -14
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/autofill-overlay.js +2 -64
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/messages.js +39 -41
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/useErrorMessaging.js +21 -26
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance/custom-instance.js +2 -86
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance/messages.js +15 -17
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/custom-instance-new-field.js +2 -62
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/messages.js +42 -44
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/delete-confirmation-modal.js +2 -91
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/messages.js +50 -52
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/constants.js +2 -7
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/messages.js +0 -1
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form-card-wrapper.js +2 -10
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +126 -155
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/utils.js +2 -9
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/messages.js +23 -25
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js +2 -128
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/messages.js +19 -21
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.js +2 -53
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.js +6 -10
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js +2 -58
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/messages.js +18 -20
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/metadata-instance-form-inline-notice.js +30 -37
- package/dist/esm/lib/components/metadata-instance-list/index.js +4 -8
- package/dist/esm/lib/components/metadata-instance-list/metadata-instance-list.js +2 -35
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.js +2 -79
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.js +2 -40
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/messages.js +5 -9
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-entry-display.js +14 -24
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.js +2 -112
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/messages.js +22 -24
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-ancestor-status-pill.js +2 -11
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-value.js +24 -36
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/messages.js +10 -12
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/metadata-instance-footer.js +2 -31
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/messages.js +15 -17
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.js +2 -63
- package/dist/esm/lib/components/metadata-instance-review-notice/messages.js +30 -32
- package/dist/esm/lib/components/metadata-instance-review-notice/metadata-instance-review-notice.js +22 -32
- package/dist/esm/lib/components/unsaved-changes-modal/index.js +2 -4
- package/dist/esm/lib/components/unsaved-changes-modal/messages.js +23 -25
- package/dist/esm/lib/components/unsaved-changes-modal/unsaved-changes-modal.js +41 -57
- package/dist/esm/lib/components/unsaved-changes-modal/utils.js +3 -5
- package/dist/esm/lib/constants.js +14 -18
- package/dist/esm/lib/defaults.js +14 -17
- package/dist/esm/lib/mappers.js +22 -28
- package/dist/esm/lib/messages.js +123 -126
- package/dist/esm/lib/metadata-editor.js +2 -14
- package/dist/esm/lib/utils/api-wrapper.js +12 -18
- package/dist/esm/lib/utils/autofill-context.js +65 -67
- package/dist/esm/lib/utils/check-if-has-bounding-boxes.js +2 -4
- package/dist/esm/lib/utils/confidence-score/format-confidence-score-percent.js +3 -5
- package/dist/esm/lib/utils/confidence-score/get-confidence-score-tooltip.js +12 -19
- package/dist/esm/lib/utils/confidence-score/get-fields-needing-review.js +5 -7
- package/dist/esm/lib/utils/confidence-score/index.js +5 -10
- package/dist/esm/lib/utils/confidence-score/is-confidence-score-needing-review.js +4 -6
- package/dist/esm/lib/utils/confidence-score/messages.js +14 -16
- package/dist/esm/lib/utils/convertDate.js +20 -31
- package/dist/esm/lib/utils/is-interactive-form-element.js +2 -4
- package/dist/esm/lib/utils/utils.js +4 -9
- package/dist/styles/autofill-overlay.css +1 -1
- package/dist/styles/combobox-with-api-pagination.css +1 -1
- package/dist/styles/custom-instance-new-field.css +1 -1
- package/dist/styles/custom-instance.css +1 -1
- package/dist/styles/delete-confirmation-modal.css +1 -1
- package/dist/styles/field-action-bar.css +1 -1
- package/dist/styles/filter-dropdown-menu.css +1 -1
- package/dist/styles/filter-instances-dropdown.css +1 -1
- package/dist/styles/interactive-header-text.css +1 -1
- package/dist/styles/interactive-text.css +1 -1
- package/dist/styles/metadata-editor.css +1 -0
- package/dist/styles/metadata-instance-content.css +1 -1
- package/dist/styles/metadata-instance-entry.css +1 -1
- package/dist/styles/metadata-instance-footer.css +1 -1
- package/dist/styles/metadata-instance-form-autofill-button.css +1 -1
- package/dist/styles/metadata-instance-form-card-wrapper.css +1 -1
- package/dist/styles/metadata-instance-form-footer.css +1 -1
- package/dist/styles/metadata-instance-form-header.css +1 -1
- package/dist/styles/metadata-instance-header.css +1 -1
- package/dist/styles/metadata-instance-list.css +1 -1
- package/dist/styles/shared-field-styles.css +1 -1
- package/dist/styles/taxonomy-ancestor-status-pill.css +1 -1
- package/dist/styles/update-mode-field-wrapper.css +1 -1
- package/dist/styles/utils.css +1 -1
- package/dist/types/lib/test-utils/index.d.ts +1 -0
- package/dist/types/lib/test-utils/pending-promise.d.ts +19 -0
- package/package.json +10 -10
|
@@ -1,112 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import N from "clsx";
|
|
4
|
-
import { useIntl as A, FormattedDate as L } from "react-intl";
|
|
5
|
-
import { checkIfHasBoundingBoxes as O } from "../../../../utils/check-if-has-bounding-boxes.js";
|
|
6
|
-
import { convertISOStringToUTCDate as j } from "../../../../utils/convertDate.js";
|
|
7
|
-
import k from "../../../interactive-text/interactive-text.js";
|
|
8
|
-
import V from "../../../../messages.js";
|
|
9
|
-
import { s as l } from "../../../../../../chunks/shared-field-styles.module.js";
|
|
10
|
-
import w from "./messages.js";
|
|
11
|
-
import { MetadataEntryDisplay as P } from "./metadata-entry-display.js";
|
|
12
|
-
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
13
|
-
import { isConfidenceScoreNeedingReview as G } from "../../../../utils/confidence-score/is-confidence-score-needing-review.js";
|
|
14
|
-
import { getConfidenceScoreTooltip as H } from "../../../../utils/confidence-score/get-confidence-score-tooltip.js";
|
|
15
|
-
import '../../../../../../styles/metadata-instance-entry.css';const K = "_metadataInstanceEntry_fr9av_1", U = "_name_fr9av_6", $ = "_labelContainer_fr9av_14", q = "_confidenceScoreIcon_fr9av_20", a = {
|
|
16
|
-
metadataInstanceEntry: K,
|
|
17
|
-
name: U,
|
|
18
|
-
labelContainer: $,
|
|
19
|
-
confidenceScoreIcon: q
|
|
20
|
-
}, it = ({
|
|
21
|
-
description: m,
|
|
22
|
-
isSelected: x,
|
|
23
|
-
name: f,
|
|
24
|
-
onClick: c,
|
|
25
|
-
shouldHideEmptyValues: I,
|
|
26
|
-
type: d,
|
|
27
|
-
value: t,
|
|
28
|
-
taxonomyNodeFetcher: S,
|
|
29
|
-
taxonomyKey: _,
|
|
30
|
-
scope: b,
|
|
31
|
-
isExternallyOwned: T,
|
|
32
|
-
confidenceScore: n,
|
|
33
|
-
isConfidenceScoreReviewEnabled: i = !1,
|
|
34
|
-
targetLocation: D
|
|
35
|
-
}) => {
|
|
36
|
-
const s = A(), B = i && !!n && G(n), C = O(D), r = i && !!n && C && !!c, p = B ? H(s.formatMessage, n) : null, u = (() => {
|
|
37
|
-
if (typeof t == "number")
|
|
38
|
-
return t.toString();
|
|
39
|
-
if (!t)
|
|
40
|
-
return null;
|
|
41
|
-
if (Array.isArray(t))
|
|
42
|
-
return t.join(", ");
|
|
43
|
-
if (d === "date" && typeof t == "string") {
|
|
44
|
-
const o = j(t);
|
|
45
|
-
return /* @__PURE__ */ e(L, {
|
|
46
|
-
day: "numeric",
|
|
47
|
-
month: "long",
|
|
48
|
-
value: o,
|
|
49
|
-
year: "numeric"
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
return t;
|
|
53
|
-
})(), v = {
|
|
54
|
-
"data-metadata-field": !0,
|
|
55
|
-
"data-testid": "metadata-field",
|
|
56
|
-
onClick: c,
|
|
57
|
-
onKeyDown: (o) => {
|
|
58
|
-
o.key === "Enter" && (o.preventDefault(), o.stopPropagation(), c?.());
|
|
59
|
-
},
|
|
60
|
-
role: "button",
|
|
61
|
-
tabIndex: 0
|
|
62
|
-
};
|
|
63
|
-
if (I && !u)
|
|
64
|
-
return null;
|
|
65
|
-
const y = /* @__PURE__ */ h("div", {
|
|
66
|
-
className: N(a.metadataInstanceEntry, i && l.spacious, r && l.clickableField, r && x && l.selectedField),
|
|
67
|
-
...r && v,
|
|
68
|
-
children: [/* @__PURE__ */ h("div", {
|
|
69
|
-
className: a.labelContainer,
|
|
70
|
-
children: [p && /* @__PURE__ */ e(g, {
|
|
71
|
-
content: p,
|
|
72
|
-
children: /* @__PURE__ */ e("span", {
|
|
73
|
-
className: a.confidenceScoreIcon,
|
|
74
|
-
children: /* @__PURE__ */ e(E, {
|
|
75
|
-
color: "SurfaceStatusSurfaceGray",
|
|
76
|
-
hideText: !0,
|
|
77
|
-
icon: M,
|
|
78
|
-
interactive: !0,
|
|
79
|
-
text: s.formatMessage(w.confidenceScoreIconAriaLabel)
|
|
80
|
-
})
|
|
81
|
-
})
|
|
82
|
-
}), /* @__PURE__ */ e(F, {
|
|
83
|
-
as: "h5",
|
|
84
|
-
color: "textOnLightSecondary",
|
|
85
|
-
variant: "bodyDefaultBold",
|
|
86
|
-
className: a.name,
|
|
87
|
-
children: m ? /* @__PURE__ */ e(k, {
|
|
88
|
-
as: "span",
|
|
89
|
-
color: "textOnLightSecondary",
|
|
90
|
-
tooltipText: m,
|
|
91
|
-
variant: "bodyDefaultBold",
|
|
92
|
-
children: f
|
|
93
|
-
}) : f
|
|
94
|
-
})]
|
|
95
|
-
}), /* @__PURE__ */ e(P, {
|
|
96
|
-
formattedValue: u,
|
|
97
|
-
isExternallyOwned: T,
|
|
98
|
-
scope: b,
|
|
99
|
-
taxonomyKey: _,
|
|
100
|
-
taxonomyNodeFetcher: S,
|
|
101
|
-
type: d,
|
|
102
|
-
value: t
|
|
103
|
-
})]
|
|
104
|
-
});
|
|
105
|
-
return r ? /* @__PURE__ */ e(g, {
|
|
106
|
-
content: s.formatMessage(V.viewOnDocument),
|
|
107
|
-
children: y
|
|
108
|
-
}) : y;
|
|
109
|
-
};
|
|
110
|
-
export {
|
|
111
|
-
it as MetadataInstanceEntry
|
|
112
|
-
};
|
|
1
|
+
import { t as e } from "../../../../../../chunks/metadata-instance-entry.js";
|
|
2
|
+
export { e as MetadataInstanceEntry };
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
var t = e({
|
|
3
|
+
loadingResultsErrorAction: {
|
|
4
|
+
id: "taxonomyAncestorStatusPill.errorAction",
|
|
5
|
+
defaultMessage: "Reload"
|
|
6
|
+
},
|
|
7
|
+
loadingResultsErrorMessage: {
|
|
8
|
+
id: "taxonomyAncestorStatusPill.errorMessage",
|
|
9
|
+
defaultMessage: "Failed to load details"
|
|
10
|
+
},
|
|
11
|
+
loadingResultsErrorIconLabel: {
|
|
12
|
+
id: "taxonomyAncestorStatusPill.errorIconLabel",
|
|
13
|
+
defaultMessage: "Error"
|
|
14
|
+
},
|
|
15
|
+
loadingAriaLabel: {
|
|
16
|
+
id: "taxonomyAncestorStatusPill.loadingAriaLabel",
|
|
17
|
+
defaultMessage: "Loading..."
|
|
18
|
+
},
|
|
19
|
+
emptyAncestorLevelValue: {
|
|
20
|
+
id: "taxonomyAncestorStatusPill.emptyAncestorLevelValue",
|
|
21
|
+
defaultMessage: "- -"
|
|
22
|
+
}
|
|
23
23
|
});
|
|
24
|
-
export {
|
|
25
|
-
o as default
|
|
26
|
-
};
|
|
24
|
+
export { t as default };
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
3
|
-
import "lodash/orderBy";
|
|
4
|
-
import "react";
|
|
5
|
-
import "react-intl";
|
|
6
|
-
import "./messages.js";
|
|
7
|
-
import { T as l } from "../../../../../../../chunks/taxonomy-ancestor-status-pill.js";
|
|
8
|
-
import "react/jsx-runtime";
|
|
9
|
-
export {
|
|
10
|
-
l as TaxonomyAncestorStatusPill
|
|
11
|
-
};
|
|
1
|
+
import { t as e } from "../../../../../../../chunks/taxonomy-ancestor-status-pill.js";
|
|
2
|
+
export { e as TaxonomyAncestorStatusPill };
|
|
@@ -1,37 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { jsx as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const i = a.displayValue === V ? m : a.displayValue;
|
|
25
|
-
return /* @__PURE__ */ o(f, {
|
|
26
|
-
displayValue: i,
|
|
27
|
-
scope: e,
|
|
28
|
-
taxonomyKey: l,
|
|
29
|
-
taxonomyNodeFetcher: s,
|
|
30
|
-
value: a.value
|
|
31
|
-
}, a.value);
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
export {
|
|
36
|
-
U as TaxonomyValue
|
|
1
|
+
import "../../../../metadata-editor-fields/components/update-mode-field-wrapper/mulitple-values-utils.js";
|
|
2
|
+
import { messages as e } from "../../../../metadata-editor-fields/components/update-mode-field-wrapper/messages.js";
|
|
3
|
+
import { n as t, t as n } from "../../../../../../../chunks/taxonomy-ancestor-status-pill.js";
|
|
4
|
+
import { FilterChip as r } from "@box/blueprint-web";
|
|
5
|
+
import { useIntl as i } from "react-intl";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
+
var o = ({ value: o, taxonomyNodeFetcher: s, taxonomyKey: c, scope: l, isExternallyOwned: u }) => {
|
|
8
|
+
let d = i();
|
|
9
|
+
if (!o || !Array.isArray(o) || !o.length) return null;
|
|
10
|
+
let f = d.formatMessage(e.multipleValues);
|
|
11
|
+
return /* @__PURE__ */ a(r.Group, {
|
|
12
|
+
className: t.taxonomyValueGroup,
|
|
13
|
+
disabled: u,
|
|
14
|
+
name: void 0,
|
|
15
|
+
type: "single",
|
|
16
|
+
children: o.map((e) => /* @__PURE__ */ a(n, {
|
|
17
|
+
displayValue: e.displayValue === "Multiple values" ? f : e.displayValue,
|
|
18
|
+
scope: l,
|
|
19
|
+
taxonomyKey: c,
|
|
20
|
+
taxonomyNodeFetcher: s,
|
|
21
|
+
value: e.value
|
|
22
|
+
}, e.value))
|
|
23
|
+
});
|
|
37
24
|
};
|
|
25
|
+
export { o as TaxonomyValue };
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
var t = e({
|
|
3
|
+
showEmptyValuesCTA: {
|
|
4
|
+
id: "metadataEditor.viewInstance.metadataInstanceFooter.showEmptyValuesCTA",
|
|
5
|
+
defaultMessage: "Show empty values"
|
|
6
|
+
},
|
|
7
|
+
hideEmptyValuesCTA: {
|
|
8
|
+
id: "metadataEditor.viewInstance.metadataInstanceFooter.hideEmptyValuesCTA",
|
|
9
|
+
defaultMessage: "Hide empty values"
|
|
10
|
+
}
|
|
11
11
|
});
|
|
12
|
-
export {
|
|
13
|
-
t as default
|
|
14
|
-
};
|
|
12
|
+
export { t as default };
|
|
@@ -1,31 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import s from "./messages.js";
|
|
4
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
-
import '../../../../../../styles/metadata-instance-footer.css';const d = "_metadataInstanceFooter_r5r5c_1", i = "_button_r5r5c_5", e = {
|
|
6
|
-
metadataInstanceFooter: d,
|
|
7
|
-
button: i
|
|
8
|
-
}, T = ({
|
|
9
|
-
isAnyEmptyValueHidden: n,
|
|
10
|
-
onHideEmptyValues: r,
|
|
11
|
-
onShowEmptyValues: m
|
|
12
|
-
}) => {
|
|
13
|
-
const a = c();
|
|
14
|
-
return /* @__PURE__ */ t("div", {
|
|
15
|
-
className: e.metadataInstanceFooter,
|
|
16
|
-
children: n ? /* @__PURE__ */ t(o, {
|
|
17
|
-
className: e.button,
|
|
18
|
-
onClick: m,
|
|
19
|
-
"data-target-id": "TextButton-showEmptyValuesCTA",
|
|
20
|
-
children: a.formatMessage(s.showEmptyValuesCTA)
|
|
21
|
-
}) : /* @__PURE__ */ t(o, {
|
|
22
|
-
className: e.button,
|
|
23
|
-
onClick: r,
|
|
24
|
-
"data-target-id": "TextButton-hideEmptyValuesCTA",
|
|
25
|
-
children: a.formatMessage(s.hideEmptyValuesCTA)
|
|
26
|
-
})
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
T as MetadataInstanceFooter
|
|
31
|
-
};
|
|
1
|
+
import { t as e } from "../../../../../../chunks/metadata-instance-footer.js";
|
|
2
|
+
export { e as MetadataInstanceFooter };
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { defineMessages as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { defineMessages as e } from "react-intl";
|
|
2
|
+
var t = e({
|
|
3
|
+
customInstanceTitle: {
|
|
4
|
+
id: "metadataEditor.viewInstance.metadataInstanceHeader.customMetadataTitle",
|
|
5
|
+
defaultMessage: "Custom Metadata"
|
|
6
|
+
},
|
|
7
|
+
editButtonTooltip: {
|
|
8
|
+
id: "metadataEditor.viewInstance.metadataInstanceHeader.editButtonTooltip",
|
|
9
|
+
defaultMessage: "Edit"
|
|
10
|
+
},
|
|
11
|
+
editButtonAriaLabel: {
|
|
12
|
+
id: "metadataEditor.viewInstance.metadataInstanceHeader.editButtonAriaLabel",
|
|
13
|
+
defaultMessage: "Edit {templateName}"
|
|
14
|
+
}
|
|
15
15
|
});
|
|
16
|
-
export {
|
|
17
|
-
a as default
|
|
18
|
-
};
|
|
16
|
+
export { t as default };
|
|
@@ -1,63 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { BoxAiAdvancedLogo24 as A, BoxAiLogo24 as C } from "@box/blueprint-web-assets/icons/Logo";
|
|
4
|
-
import { useLocalStorageAIAgents as L } from "@box/box-ai-agent-selector";
|
|
5
|
-
import { useMemo as b } from "react";
|
|
6
|
-
import { useIntl as h } from "react-intl";
|
|
7
|
-
import { EXTRACT_AI_AGENT_LOCAL_STORAGE_KEY as M, EXTRACT_AGENTS_MAP as H } from "../../../../constants.js";
|
|
8
|
-
import { autofillMessages as N } from "../../../../messages.js";
|
|
9
|
-
import { getTooltipContent as G } from "../../../../utils/utils.js";
|
|
10
|
-
import v from "../../../interactive-header-text/interactive-header-text.js";
|
|
11
|
-
import i from "./messages.js";
|
|
12
|
-
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
13
|
-
import '../../../../../../styles/metadata-instance-header.css';const x = "_metadataInstanceHeader_17bsu_1", R = "_iconButtonsContainer_17bsu_6", S = "_title_17bsu_14", s = {
|
|
14
|
-
metadataInstanceHeader: x,
|
|
15
|
-
iconButtonsContainer: R,
|
|
16
|
-
title: S
|
|
17
|
-
}, z = ({
|
|
18
|
-
areAiSuggestionsAvailable: m,
|
|
19
|
-
canEdit: u,
|
|
20
|
-
isAiSuggestionsFeatureEnabled: d,
|
|
21
|
-
isBetaLanguageEnabled: j,
|
|
22
|
-
onEdit: f,
|
|
23
|
-
onAutofill: _,
|
|
24
|
-
templateName: e,
|
|
25
|
-
isAdvancedExtractAgentEnabled: a = !1
|
|
26
|
-
}) => {
|
|
27
|
-
const t = h(), p = e || t.formatMessage(i.customInstanceTitle), B = d && e, [n] = L(M), g = a && H[n]?.AGENT_ID, I = b(() => G(a, n, t), [a, n, t]);
|
|
28
|
-
return /* @__PURE__ */ l("div", {
|
|
29
|
-
className: s.metadataInstanceHeader,
|
|
30
|
-
children: [/* @__PURE__ */ o(v, {
|
|
31
|
-
className: s.title,
|
|
32
|
-
title: p
|
|
33
|
-
}), u && /* @__PURE__ */ l("div", {
|
|
34
|
-
className: s.iconButtonsContainer,
|
|
35
|
-
children: [B && /* @__PURE__ */ o(r, {
|
|
36
|
-
content: I,
|
|
37
|
-
children: /* @__PURE__ */ o(c, {
|
|
38
|
-
"aria-label": t.formatMessage(N.autofillButtonAriaLabelWithTemplateName, {
|
|
39
|
-
templateName: e
|
|
40
|
-
}),
|
|
41
|
-
disabled: !m,
|
|
42
|
-
icon: n === "enhanced" && a ? A : C,
|
|
43
|
-
onClick: () => _(g || void 0),
|
|
44
|
-
variant: "icon-logo",
|
|
45
|
-
"data-target-id": "IconButton-autofillButtonAriaLabelWithTemplateName"
|
|
46
|
-
})
|
|
47
|
-
}), /* @__PURE__ */ o(r, {
|
|
48
|
-
content: t.formatMessage(i.editButtonTooltip),
|
|
49
|
-
children: /* @__PURE__ */ o(c, {
|
|
50
|
-
"aria-label": t.formatMessage(i.editButtonAriaLabel, {
|
|
51
|
-
templateName: e
|
|
52
|
-
}),
|
|
53
|
-
icon: T,
|
|
54
|
-
onClick: f,
|
|
55
|
-
"data-target-id": "IconButton-editButtonAriaLabel"
|
|
56
|
-
})
|
|
57
|
-
})]
|
|
58
|
-
})]
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
export {
|
|
62
|
-
z as MetadataInstanceHeader
|
|
63
|
-
};
|
|
1
|
+
import { t as e } from "../../../../../../chunks/metadata-instance-header.js";
|
|
2
|
+
export { e as MetadataInstanceHeader };
|
|
@@ -1,34 +1,32 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
2
|
+
var t = e({
|
|
3
|
+
reviewFieldsNoticeHeader: {
|
|
4
|
+
id: "groupSharedFeatures.metadataEditor.metadataInstanceReviewNotice.reviewFieldsNoticeHeader",
|
|
5
|
+
defaultMessage: "{count, plural, one {# field needs} other {# fields need}} review"
|
|
6
|
+
},
|
|
7
|
+
viewReviewFieldsCTA: {
|
|
8
|
+
id: "groupSharedFeatures.metadataEditor.metadataInstanceReviewNotice.viewReviewFieldsCTA",
|
|
9
|
+
defaultMessage: "View"
|
|
10
|
+
},
|
|
11
|
+
hideReviewFieldsCTA: {
|
|
12
|
+
id: "groupSharedFeatures.metadataEditor.metadataInstanceReviewNotice.hideReviewFieldsCTA",
|
|
13
|
+
defaultMessage: "Hide"
|
|
14
|
+
},
|
|
15
|
+
showingReviewFields: {
|
|
16
|
+
id: "groupSharedFeatures.metadataEditor.metadataInstanceReviewNotice.showingReviewFields",
|
|
17
|
+
defaultMessage: "Showing fields needing review"
|
|
18
|
+
},
|
|
19
|
+
viewButtonTooltip: {
|
|
20
|
+
id: "groupSharedFeatures.metadataEditor.metadataInstanceReviewNotice.viewButtonTooltip",
|
|
21
|
+
defaultMessage: "{count, plural, one {# field needs} other {# fields need}} review as Box AI returned low confidence. Click to start reviewing."
|
|
22
|
+
},
|
|
23
|
+
hideButtonTooltip: {
|
|
24
|
+
id: "groupSharedFeatures.metadataEditor.metadataInstanceReviewNotice.hideButtonTooltip",
|
|
25
|
+
defaultMessage: "Close review mode"
|
|
26
|
+
},
|
|
27
|
+
iconAriaLabel: {
|
|
28
|
+
id: "groupSharedFeatures.metadataEditor.metadataInstanceReviewNotice.iconAriaLabel",
|
|
29
|
+
defaultMessage: "Review alert"
|
|
30
|
+
}
|
|
31
31
|
});
|
|
32
|
-
export {
|
|
33
|
-
t as default
|
|
34
|
-
};
|
|
32
|
+
export { t as default };
|
package/dist/esm/lib/components/metadata-instance-review-notice/metadata-instance-review-notice.js
CHANGED
|
@@ -1,33 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ActionableInlineNotice as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
content: n,
|
|
23
|
-
children: /* @__PURE__ */ s(f, {
|
|
24
|
-
onPressedChange: a,
|
|
25
|
-
pressed: o,
|
|
26
|
-
children: o ? e.formatMessage(t.hideReviewFieldsCTA) : e.formatMessage(t.viewReviewFieldsCTA)
|
|
27
|
-
})
|
|
28
|
-
})
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
h as MetadataInstanceReviewNotice
|
|
1
|
+
import e from "./messages.js";
|
|
2
|
+
import { ActionableInlineNotice as t, TextToggleButton as n, Tooltip as r } from "@box/blueprint-web";
|
|
3
|
+
import { useIntl as i } from "react-intl";
|
|
4
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
5
|
+
import { AlertCircle as o } from "@box/blueprint-web-assets/icons/Medium";
|
|
6
|
+
var s = ({ fieldsNeedingReviewCount: s, isLowScoreFilteringEnabled: c = !1, onTextToggleClick: l }) => {
|
|
7
|
+
let u = i(), d = c ? u.formatMessage(e.showingReviewFields) : u.formatMessage(e.reviewFieldsNoticeHeader, { count: s }), f = c ? u.formatMessage(e.hideButtonTooltip) : u.formatMessage(e.viewButtonTooltip, { count: s });
|
|
8
|
+
return /* @__PURE__ */ a(t, {
|
|
9
|
+
backgroundColor: "backgroundGray",
|
|
10
|
+
iconAriaLabel: u.formatMessage(e.iconAriaLabel),
|
|
11
|
+
text: d,
|
|
12
|
+
icon: o,
|
|
13
|
+
children: /* @__PURE__ */ a(r, {
|
|
14
|
+
content: f,
|
|
15
|
+
children: /* @__PURE__ */ a(n, {
|
|
16
|
+
onPressedChange: l,
|
|
17
|
+
pressed: c,
|
|
18
|
+
children: c ? u.formatMessage(e.hideReviewFieldsCTA) : u.formatMessage(e.viewReviewFieldsCTA)
|
|
19
|
+
})
|
|
20
|
+
})
|
|
21
|
+
});
|
|
33
22
|
};
|
|
23
|
+
export { s as MetadataInstanceReviewNotice };
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import { defineMessages as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { defineMessages as e } from "react-intl";
|
|
2
|
+
var t = e({
|
|
3
|
+
unsavedChangesModalHeader: {
|
|
4
|
+
id: "metadataEditor.unsavedChangesModal.header",
|
|
5
|
+
defaultMessage: "Unsaved Changes"
|
|
6
|
+
},
|
|
7
|
+
unsavedChangesModalBody: {
|
|
8
|
+
id: "metadataEditor.unsavedChangesModal.body",
|
|
9
|
+
defaultMessage: "Metadata template(s) have unsaved changes. How would you like to proceed?"
|
|
10
|
+
},
|
|
11
|
+
unsavedChangesModalDiscardChangesCTA: {
|
|
12
|
+
id: "metadataEditor.unsavedChangesModal.discardChangesCTA",
|
|
13
|
+
defaultMessage: "Discard Changes"
|
|
14
|
+
},
|
|
15
|
+
unsavedChangesModalContinueEditingCTA: {
|
|
16
|
+
id: "metadataEditor.unsavedChangesModal.continueEditingCTA",
|
|
17
|
+
defaultMessage: "Continue Editing"
|
|
18
|
+
},
|
|
19
|
+
unsavedChangesModalCloseLabel: {
|
|
20
|
+
id: "metadataEditor.unsavedChangesModal.closeLabel",
|
|
21
|
+
defaultMessage: "Close"
|
|
22
|
+
}
|
|
23
23
|
});
|
|
24
|
-
export {
|
|
25
|
-
d as default
|
|
26
|
-
};
|
|
24
|
+
export { t as default };
|