@box/metadata-editor 1.58.3 → 1.59.0
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/metadata-instance-form-card-wrapper.js +41 -40
- package/dist/chunks/shared-field-styles.module.js +8 -0
- package/dist/chunks/utils2.js +33 -33
- package/dist/esm/lib/components/metadata-editor-fields/metadata-editor-field-wrapper.js +128 -96
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +110 -106
- package/dist/esm/lib/components/metadata-instance-list/metadata-instance-list.js +19 -15
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.js +39 -35
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.js +27 -20
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.js +71 -55
- package/dist/esm/lib/utils/check-if-has-bounding-boxes.js +4 -0
- package/dist/esm/lib/utils/is-interactive-form-element.js +4 -0
- package/dist/i18n/en-x-pseudo.js +151 -151
- package/dist/i18n/en-x-pseudo.properties +151 -151
- package/dist/styles/metadata-instance-content.css +1 -1
- package/dist/styles/metadata-instance-form-card-wrapper.css +1 -1
- package/dist/styles/shared-field-styles.css +1 -0
- package/dist/styles/utils.css +1 -1
- package/dist/types/lib/components/metadata-editor-fields/types.d.ts +2 -0
- package/dist/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/types.d.ts +2 -0
- package/dist/types/lib/components/metadata-instance-list/metadata-instance-list.d.ts +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 +3 -1
- 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 +3 -1
- 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 +4 -1
- package/dist/types/lib/components/metadata-instance-list/types.d.ts +3 -1
- package/dist/types/lib/utils/check-if-has-bounding-boxes.d.ts +2 -0
- package/dist/types/lib/utils/is-interactive-form-element.d.ts +1 -0
- package/package.json +9 -9
|
@@ -1,151 +1,155 @@
|
|
|
1
1
|
import "../custom-instance-new-field/custom-instance-new-field.js";
|
|
2
|
-
import { DeleteConfirmationModal as
|
|
2
|
+
import { DeleteConfirmationModal as X } 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
|
|
9
|
-
import { TEMPLATE_CUSTOM_PROPERTIES as
|
|
10
|
-
import { useAutofill as
|
|
11
|
-
import { TemplateInstance as
|
|
12
|
-
import { MetadataEmptyState as
|
|
13
|
-
import { AutofillOverlay as
|
|
14
|
-
import { CustomInstance as
|
|
15
|
-
import { c as
|
|
16
|
-
import { s as
|
|
17
|
-
import { jsx as n, jsxs as
|
|
18
|
-
import { UnsavedChangesModal as
|
|
19
|
-
const
|
|
20
|
-
dirty:
|
|
21
|
-
onChange:
|
|
5
|
+
import Y from "clsx";
|
|
6
|
+
import { Formik as Z, Form as ee } from "formik";
|
|
7
|
+
import te from "lodash/isEqual";
|
|
8
|
+
import { useState as I, useEffect as v, useRef as w, useMemo as ae } from "react";
|
|
9
|
+
import { TEMPLATE_CUSTOM_PROPERTIES as ne } from "../../../../constants.js";
|
|
10
|
+
import { useAutofill as oe } from "../../../../utils/autofill-context.js";
|
|
11
|
+
import { TemplateInstance as se } from "../../../metadata-editor-fields/metadata-editor-fields.js";
|
|
12
|
+
import { MetadataEmptyState as re } from "../../../metadata-empty-state/metadata-empty-state.js";
|
|
13
|
+
import { AutofillOverlay as ie } from "../autofill-overlay/autofill-overlay.js";
|
|
14
|
+
import { CustomInstance as le } from "../custom-instance/custom-instance.js";
|
|
15
|
+
import { c as me } from "../../../../../../chunks/utils.js";
|
|
16
|
+
import { s as l, M as de } from "../../../../../../chunks/metadata-instance-form-card-wrapper.js";
|
|
17
|
+
import { jsx as n, jsxs as D } from "react/jsx-runtime";
|
|
18
|
+
import { UnsavedChangesModal as ce } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
|
|
19
|
+
const pe = ({
|
|
20
|
+
dirty: m,
|
|
21
|
+
onChange: d,
|
|
22
22
|
values: t
|
|
23
23
|
}) => {
|
|
24
|
-
const s =
|
|
25
|
-
return
|
|
26
|
-
},
|
|
24
|
+
const s = w(t);
|
|
25
|
+
return m && !te(s.current.metadata.fields, t.metadata.fields) && (s.current = t, d(t)), null;
|
|
26
|
+
}, Re = (m) => {
|
|
27
27
|
const {
|
|
28
|
-
areAiSuggestionsAvailable:
|
|
28
|
+
areAiSuggestionsAvailable: d,
|
|
29
29
|
customRef: t,
|
|
30
30
|
isLargeFile: s,
|
|
31
|
-
errorCode:
|
|
32
|
-
isAiSuggestionsFeatureEnabled:
|
|
33
|
-
isAdvancedExtractAgentEnabled:
|
|
34
|
-
isBetaLanguageEnabled:
|
|
35
|
-
isDeleteButtonDisabled:
|
|
36
|
-
isDeleteConfirmationModalCheckboxEnabled:
|
|
37
|
-
isMultilevelTaxonomyFieldEnabled:
|
|
38
|
-
isUnsavedChangesModalOpen:
|
|
39
|
-
MetadataInstanceFormCustomWrapper:
|
|
31
|
+
errorCode: c,
|
|
32
|
+
isAiSuggestionsFeatureEnabled: p,
|
|
33
|
+
isAdvancedExtractAgentEnabled: A = !1,
|
|
34
|
+
isBetaLanguageEnabled: R,
|
|
35
|
+
isDeleteButtonDisabled: T,
|
|
36
|
+
isDeleteConfirmationModalCheckboxEnabled: L,
|
|
37
|
+
isMultilevelTaxonomyFieldEnabled: f,
|
|
38
|
+
isUnsavedChangesModalOpen: k = !1,
|
|
39
|
+
MetadataInstanceFormCustomWrapper: N,
|
|
40
40
|
selectedTemplateInstance: e,
|
|
41
|
-
onCancel:
|
|
41
|
+
onCancel: P,
|
|
42
42
|
onChange: u,
|
|
43
|
-
onDelete:
|
|
44
|
-
onDiscardUnsavedChanges:
|
|
45
|
-
onSubmit:
|
|
46
|
-
onToggleReviewFilter:
|
|
43
|
+
onDelete: U,
|
|
44
|
+
onDiscardUnsavedChanges: B,
|
|
45
|
+
onSubmit: K,
|
|
46
|
+
onToggleReviewFilter: V,
|
|
47
47
|
setIsUnsavedChangesModalOpen: g,
|
|
48
48
|
shouldShowOnlyReviewFields: h = !1,
|
|
49
|
-
taxonomyOptionsFetcher:
|
|
50
|
-
isConfidenceScoreReviewEnabled:
|
|
51
|
-
|
|
49
|
+
taxonomyOptionsFetcher: C,
|
|
50
|
+
isConfidenceScoreReviewEnabled: r = !1,
|
|
51
|
+
onSelectMetadataField: E,
|
|
52
|
+
selectedMetadataFieldId: F
|
|
53
|
+
} = m, W = N ?? de, [j, M] = I(!1), {
|
|
52
54
|
isFetchingSuggestions: o,
|
|
53
|
-
isLongLoading:
|
|
54
|
-
getAiSuggestions:
|
|
55
|
-
clearState:
|
|
56
|
-
suggestions:
|
|
57
|
-
} =
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, [
|
|
61
|
-
const
|
|
62
|
-
await
|
|
63
|
-
},
|
|
64
|
-
a ? g(!0) :
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
},
|
|
55
|
+
isLongLoading: b,
|
|
56
|
+
getAiSuggestions: _,
|
|
57
|
+
clearState: y,
|
|
58
|
+
suggestions: $
|
|
59
|
+
} = oe();
|
|
60
|
+
v(() => () => {
|
|
61
|
+
y();
|
|
62
|
+
}, [y, e?.id]);
|
|
63
|
+
const S = e?.templateKey === ne, q = async (a) => {
|
|
64
|
+
await K(a, me(a, e));
|
|
65
|
+
}, G = (a) => {
|
|
66
|
+
a ? g(!0) : P();
|
|
67
|
+
}, J = () => {
|
|
68
|
+
M(!0);
|
|
69
|
+
}, z = {
|
|
68
70
|
metadata: {
|
|
69
71
|
...e
|
|
70
72
|
}
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
}, O = w(null), [x, H] = I(null);
|
|
74
|
+
v(() => {
|
|
75
|
+
H(t ?? O.current);
|
|
74
76
|
}, [t, e?.templateKey, e?.scope]);
|
|
75
|
-
const
|
|
77
|
+
const Q = ae(() => {
|
|
76
78
|
const a = e?.fields.length === 0;
|
|
77
|
-
if (
|
|
78
|
-
return /* @__PURE__ */ n(
|
|
79
|
+
if (S)
|
|
80
|
+
return /* @__PURE__ */ n(le, {
|
|
79
81
|
isLoading: o
|
|
80
82
|
});
|
|
81
83
|
if (a)
|
|
82
|
-
return /* @__PURE__ */ n(
|
|
83
|
-
isBoxAiSuggestionsFeatureEnabled:
|
|
84
|
+
return /* @__PURE__ */ n(re, {
|
|
85
|
+
isBoxAiSuggestionsFeatureEnabled: p,
|
|
84
86
|
level: "instance"
|
|
85
87
|
});
|
|
86
|
-
const
|
|
87
|
-
return /* @__PURE__ */
|
|
88
|
-
className:
|
|
89
|
-
children: [/* @__PURE__ */ n(
|
|
90
|
-
errorCode:
|
|
88
|
+
const i = !!(o || c);
|
|
89
|
+
return /* @__PURE__ */ D("div", {
|
|
90
|
+
className: Y(l.metadataInstanceFormContent, i && l.showOverlay, r && l.metadataInstanceFormContentReducedGap),
|
|
91
|
+
children: [/* @__PURE__ */ n(ie, {
|
|
92
|
+
errorCode: c,
|
|
91
93
|
isFetchingSuggestions: o,
|
|
92
|
-
isLongLoading:
|
|
93
|
-
}), /* @__PURE__ */ n(
|
|
94
|
+
isLongLoading: b
|
|
95
|
+
}), /* @__PURE__ */ n(se, {
|
|
94
96
|
disableForm: o,
|
|
95
|
-
isConfidenceScoreReviewEnabled:
|
|
97
|
+
isConfidenceScoreReviewEnabled: r,
|
|
96
98
|
isExternallyOwned: e?.isExternallyOwned,
|
|
97
|
-
isMultilevelTaxonomyFieldEnabled:
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
isMultilevelTaxonomyFieldEnabled: f,
|
|
100
|
+
onSelectMetadataField: E,
|
|
101
|
+
selectedMetadataFieldId: F,
|
|
102
|
+
portalElement: t ?? x,
|
|
103
|
+
taxonomyOptionsFetcher: C
|
|
100
104
|
})]
|
|
101
105
|
});
|
|
102
|
-
}, [e?.fields.length, e?.isExternallyOwned,
|
|
103
|
-
return /* @__PURE__ */ n(
|
|
104
|
-
initialValues:
|
|
105
|
-
onSubmit:
|
|
106
|
+
}, [e?.fields.length, e?.isExternallyOwned, S, o, b, t, x, C, p, r, f, c, h, E, F]);
|
|
107
|
+
return /* @__PURE__ */ n(Z, {
|
|
108
|
+
initialValues: z,
|
|
109
|
+
onSubmit: q,
|
|
106
110
|
children: ({
|
|
107
111
|
values: a,
|
|
108
|
-
dirty:
|
|
109
|
-
}) => /* @__PURE__ */
|
|
110
|
-
children: [/* @__PURE__ */ n(
|
|
111
|
-
areAiSuggestionsAvailable:
|
|
112
|
-
className:
|
|
113
|
-
formRef:
|
|
112
|
+
dirty: i
|
|
113
|
+
}) => /* @__PURE__ */ D(ee, {
|
|
114
|
+
children: [/* @__PURE__ */ n(W, {
|
|
115
|
+
areAiSuggestionsAvailable: d,
|
|
116
|
+
className: l.metadataInstanceForm,
|
|
117
|
+
formRef: O,
|
|
114
118
|
formValues: a,
|
|
115
|
-
getAiSuggestions:
|
|
116
|
-
handleCancel:
|
|
117
|
-
handleDelete:
|
|
118
|
-
isAdvancedExtractAgentEnabled:
|
|
119
|
-
isAiSuggestionsFeatureEnabled:
|
|
120
|
-
isBetaLanguageEnabled:
|
|
121
|
-
isConfidenceScoreReviewEnabled:
|
|
122
|
-
isDeleteButtonDisabled:
|
|
119
|
+
getAiSuggestions: _,
|
|
120
|
+
handleCancel: G,
|
|
121
|
+
handleDelete: J,
|
|
122
|
+
isAdvancedExtractAgentEnabled: A,
|
|
123
|
+
isAiSuggestionsFeatureEnabled: p,
|
|
124
|
+
isBetaLanguageEnabled: R,
|
|
125
|
+
isConfidenceScoreReviewEnabled: r,
|
|
126
|
+
isDeleteButtonDisabled: T,
|
|
123
127
|
isFetchingSuggestions: o,
|
|
124
|
-
isFormDirty:
|
|
128
|
+
isFormDirty: i,
|
|
125
129
|
isLargeFile: s,
|
|
126
|
-
onToggleReviewFilter:
|
|
130
|
+
onToggleReviewFilter: V,
|
|
127
131
|
selectedTemplateInstance: e,
|
|
128
132
|
shouldShowOnlyReviewFields: h,
|
|
129
|
-
suggestions:
|
|
130
|
-
children: e &&
|
|
131
|
-
}), u && /* @__PURE__ */ n(
|
|
132
|
-
dirty:
|
|
133
|
+
suggestions: $,
|
|
134
|
+
children: e && Q
|
|
135
|
+
}), u && /* @__PURE__ */ n(pe, {
|
|
136
|
+
dirty: i,
|
|
133
137
|
onChange: u,
|
|
134
138
|
values: a
|
|
135
|
-
}), /* @__PURE__ */ n(
|
|
139
|
+
}), /* @__PURE__ */ n(ce, {
|
|
136
140
|
onBackToEdit: () => g(!1),
|
|
137
|
-
onDiscardChanges:
|
|
138
|
-
open:
|
|
139
|
-
}), /* @__PURE__ */ n(
|
|
140
|
-
isCheckboxEnabled:
|
|
141
|
-
onConfirm: () =>
|
|
142
|
-
onDismiss: () =>
|
|
143
|
-
open:
|
|
141
|
+
onDiscardChanges: B,
|
|
142
|
+
open: k
|
|
143
|
+
}), /* @__PURE__ */ n(X, {
|
|
144
|
+
isCheckboxEnabled: L,
|
|
145
|
+
onConfirm: () => U(e),
|
|
146
|
+
onDismiss: () => M(!1),
|
|
147
|
+
open: j,
|
|
144
148
|
templateName: e?.displayName
|
|
145
149
|
})]
|
|
146
150
|
})
|
|
147
151
|
}, `${e?.scope}.${e?.templateKey}`);
|
|
148
152
|
};
|
|
149
153
|
export {
|
|
150
|
-
|
|
154
|
+
Re as MetadataInstanceForm
|
|
151
155
|
};
|
|
@@ -1,31 +1,35 @@
|
|
|
1
|
-
import { getVisibleTemplates as
|
|
2
|
-
import { MetadataInstance as
|
|
1
|
+
import { getVisibleTemplates as p } from "../../utils/utils.js";
|
|
2
|
+
import { MetadataInstance as f } from "./subcomponents/metadata-instance/metadata-instance.js";
|
|
3
3
|
import { jsx as a } from "react/jsx-runtime";
|
|
4
4
|
import "./subcomponents/metadata-instance-header/metadata-instance-header.js";
|
|
5
|
-
import '../../../../styles/metadata-instance-list.css';const
|
|
6
|
-
metadataInstanceList:
|
|
7
|
-
},
|
|
5
|
+
import '../../../../styles/metadata-instance-list.css';const I = "_metadataInstanceList_bd83w_1", L = {
|
|
6
|
+
metadataInstanceList: I
|
|
7
|
+
}, g = ({
|
|
8
8
|
areAiSuggestionsAvailable: s,
|
|
9
9
|
isAiSuggestionsFeatureEnabled: e,
|
|
10
10
|
isBetaLanguageEnabled: n,
|
|
11
11
|
onEdit: i,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
onSelectMetadataField: m,
|
|
13
|
+
selectedMetadataFieldId: o,
|
|
14
|
+
templateInstances: r,
|
|
15
|
+
taxonomyNodeFetcher: c,
|
|
16
|
+
isAdvancedExtractAgentEnabled: d = !1,
|
|
17
|
+
isConfidenceScoreReviewEnabled: l = !1
|
|
16
18
|
}) => /* @__PURE__ */ a("div", {
|
|
17
|
-
className:
|
|
18
|
-
children:
|
|
19
|
+
className: L.metadataInstanceList,
|
|
20
|
+
children: p(r).map((t) => /* @__PURE__ */ a(f, {
|
|
19
21
|
areAiSuggestionsAvailable: s,
|
|
20
|
-
isAdvancedExtractAgentEnabled:
|
|
22
|
+
isAdvancedExtractAgentEnabled: d,
|
|
21
23
|
isAiSuggestionsFeatureEnabled: e,
|
|
22
24
|
isBetaLanguageEnabled: n,
|
|
23
|
-
isConfidenceScoreReviewEnabled:
|
|
25
|
+
isConfidenceScoreReviewEnabled: l,
|
|
24
26
|
onEdit: i,
|
|
25
|
-
|
|
27
|
+
onSelectMetadataField: m,
|
|
28
|
+
selectedMetadataFieldId: o,
|
|
29
|
+
taxonomyNodeFetcher: c,
|
|
26
30
|
templateInstance: t
|
|
27
31
|
}, t.id))
|
|
28
32
|
});
|
|
29
33
|
export {
|
|
30
|
-
|
|
34
|
+
g as MetadataInstanceList
|
|
31
35
|
};
|
|
@@ -1,67 +1,71 @@
|
|
|
1
|
-
import { Card as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useAutofill as
|
|
4
|
-
import { getFieldsNeedingReview as
|
|
5
|
-
import { MetadataEmptyState as
|
|
6
|
-
import { MetadataInstanceContent as
|
|
7
|
-
import { MetadataInstanceFooter as
|
|
8
|
-
import { MetadataInstanceHeader as
|
|
9
|
-
import { MetadataInstanceReviewNotice as
|
|
1
|
+
import { Card as F, Divider as v } from "@box/blueprint-web";
|
|
2
|
+
import { useState as H } from "react";
|
|
3
|
+
import { useAutofill as M } from "../../../../utils/autofill-context.js";
|
|
4
|
+
import { getFieldsNeedingReview as R } from "../../../../utils/confidence-score/get-fields-needing-review.js";
|
|
5
|
+
import { MetadataEmptyState as b } from "../../../metadata-empty-state/metadata-empty-state.js";
|
|
6
|
+
import { MetadataInstanceContent as C } from "../metadata-instance-content/metadata-instance-content.js";
|
|
7
|
+
import { MetadataInstanceFooter as j } from "../metadata-instance-footer/metadata-instance-footer.js";
|
|
8
|
+
import { MetadataInstanceHeader as T } from "../metadata-instance-header/metadata-instance-header.js";
|
|
9
|
+
import { MetadataInstanceReviewNotice as k } from "../../../metadata-instance-review-notice/metadata-instance-review-notice.js";
|
|
10
10
|
import { jsxs as d, jsx as t, Fragment as p } from "react/jsx-runtime";
|
|
11
|
-
import '../../../../../../styles/metadata-instance.css';const
|
|
12
|
-
topDivider:
|
|
13
|
-
reviewNotice:
|
|
14
|
-
bottomDivider:
|
|
15
|
-
},
|
|
11
|
+
import '../../../../../../styles/metadata-instance.css';const B = "_topDivider_1xnom_1", K = "_reviewNotice_1xnom_5", W = "_bottomDivider_1xnom_9", l = {
|
|
12
|
+
topDivider: B,
|
|
13
|
+
reviewNotice: K,
|
|
14
|
+
bottomDivider: W
|
|
15
|
+
}, Z = ({
|
|
16
16
|
areAiSuggestionsAvailable: y,
|
|
17
17
|
isAiSuggestionsFeatureEnabled: n,
|
|
18
18
|
isBetaLanguageEnabled: f,
|
|
19
19
|
onEdit: s,
|
|
20
|
+
onSelectMetadataField: h,
|
|
21
|
+
selectedMetadataFieldId: N,
|
|
20
22
|
templateInstance: e,
|
|
21
|
-
taxonomyNodeFetcher:
|
|
22
|
-
isAdvancedExtractAgentEnabled:
|
|
23
|
+
taxonomyNodeFetcher: g,
|
|
24
|
+
isAdvancedExtractAgentEnabled: w = !1,
|
|
23
25
|
isConfidenceScoreReviewEnabled: m = !1
|
|
24
26
|
}) => {
|
|
25
|
-
const i = e.fields, c = (o) => !o.value || Array.isArray(o.value) && o.value.length === 0,
|
|
26
|
-
getAiSuggestions:
|
|
27
|
-
} =
|
|
28
|
-
s(e),
|
|
29
|
-
},
|
|
27
|
+
const i = e.fields, c = (o) => !o.value || Array.isArray(o.value) && o.value.length === 0, E = i.every(c), V = i.some(c), A = i.length > 0, u = R(i).length, D = m && u > 0, [r, a] = H(!0), {
|
|
28
|
+
getAiSuggestions: _
|
|
29
|
+
} = M(), x = (o) => {
|
|
30
|
+
s(e), _(e.templateKey, e.scope, o);
|
|
31
|
+
}, S = () => {
|
|
30
32
|
s(e, !0);
|
|
31
33
|
};
|
|
32
|
-
return /* @__PURE__ */ d(
|
|
33
|
-
children: [/* @__PURE__ */ t(
|
|
34
|
+
return /* @__PURE__ */ d(F, {
|
|
35
|
+
children: [/* @__PURE__ */ t(T, {
|
|
34
36
|
areAiSuggestionsAvailable: y,
|
|
35
37
|
canEdit: e.canEdit,
|
|
36
|
-
isAdvancedExtractAgentEnabled:
|
|
38
|
+
isAdvancedExtractAgentEnabled: w,
|
|
37
39
|
isAiSuggestionsFeatureEnabled: n,
|
|
38
40
|
isBetaLanguageEnabled: f,
|
|
39
|
-
onAutofill:
|
|
41
|
+
onAutofill: x,
|
|
40
42
|
onEdit: () => s(e),
|
|
41
43
|
templateName: e?.displayName
|
|
42
44
|
}), /* @__PURE__ */ t(v, {
|
|
43
45
|
className: l.topDivider
|
|
44
|
-
}),
|
|
46
|
+
}), D && /* @__PURE__ */ t("div", {
|
|
45
47
|
className: l.reviewNotice,
|
|
46
|
-
children: /* @__PURE__ */ t(
|
|
48
|
+
children: /* @__PURE__ */ t(k, {
|
|
47
49
|
fieldsNeedingReviewCount: u,
|
|
48
|
-
onTextToggleClick:
|
|
50
|
+
onTextToggleClick: S
|
|
49
51
|
})
|
|
50
|
-
}), r &&
|
|
51
|
-
isAnyEmptyValueHidden:
|
|
52
|
+
}), r && E ? /* @__PURE__ */ t(b, {
|
|
53
|
+
isAnyEmptyValueHidden: A,
|
|
52
54
|
isBoxAiSuggestionsFeatureEnabled: n,
|
|
53
55
|
level: "instance",
|
|
54
56
|
onShowEmptyValues: () => a(!1)
|
|
55
57
|
}) : /* @__PURE__ */ d(p, {
|
|
56
|
-
children: [/* @__PURE__ */ t(
|
|
58
|
+
children: [/* @__PURE__ */ t(C, {
|
|
57
59
|
isConfidenceScoreReviewEnabled: m,
|
|
60
|
+
onSelectMetadataField: h,
|
|
61
|
+
selectedMetadataFieldId: N,
|
|
58
62
|
shouldHideEmptyValues: r,
|
|
59
|
-
taxonomyNodeFetcher:
|
|
63
|
+
taxonomyNodeFetcher: g,
|
|
60
64
|
templateInstance: e
|
|
61
|
-
}),
|
|
65
|
+
}), V && /* @__PURE__ */ d(p, {
|
|
62
66
|
children: [/* @__PURE__ */ t(v, {
|
|
63
67
|
className: l.bottomDivider
|
|
64
|
-
}), /* @__PURE__ */ t(
|
|
68
|
+
}), /* @__PURE__ */ t(j, {
|
|
65
69
|
isAnyEmptyValueHidden: r,
|
|
66
70
|
onHideEmptyValues: () => a(!0),
|
|
67
71
|
onShowEmptyValues: () => a(!1)
|
|
@@ -71,5 +75,5 @@ import '../../../../../../styles/metadata-instance.css';const T = "_topDivider_1
|
|
|
71
75
|
});
|
|
72
76
|
};
|
|
73
77
|
export {
|
|
74
|
-
|
|
78
|
+
Z as MetadataInstance
|
|
75
79
|
};
|
|
@@ -1,33 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import p from "clsx";
|
|
2
|
+
import { MetadataInstanceEntry as y } from "../metadata-instance-entry/metadata-instance-entry.js";
|
|
3
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
4
|
+
import '../../../../../../styles/metadata-instance-content.css';const i = "_metadataInstanceContent_1cb0f_1", C = "_metadataInstanceContentReducedGap_1cb0f_7", c = {
|
|
5
|
+
metadataInstanceContent: i,
|
|
6
|
+
metadataInstanceContentReducedGap: C
|
|
7
|
+
}, _ = ({
|
|
8
|
+
onSelectMetadataField: n,
|
|
9
|
+
selectedMetadataFieldId: s,
|
|
10
|
+
shouldHideEmptyValues: m,
|
|
11
|
+
templateInstance: a,
|
|
12
|
+
taxonomyNodeFetcher: d,
|
|
13
|
+
isConfidenceScoreReviewEnabled: e
|
|
10
14
|
}) => {
|
|
11
15
|
const {
|
|
12
|
-
fields:
|
|
13
|
-
} =
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
className:
|
|
16
|
-
children:
|
|
16
|
+
fields: r = []
|
|
17
|
+
} = a;
|
|
18
|
+
return /* @__PURE__ */ o("div", {
|
|
19
|
+
className: p(c.metadataInstanceContent, e && c.metadataInstanceContentReducedGap),
|
|
20
|
+
children: r.filter((t) => !t.hidden).map((t) => /* @__PURE__ */ o(y, {
|
|
17
21
|
confidenceScore: t.confidenceScore,
|
|
18
22
|
description: t.description,
|
|
19
|
-
isConfidenceScoreReviewEnabled:
|
|
20
|
-
isExternallyOwned:
|
|
23
|
+
isConfidenceScoreReviewEnabled: e,
|
|
24
|
+
isExternallyOwned: a.isExternallyOwned,
|
|
25
|
+
isSelected: s === t.id,
|
|
21
26
|
name: t.displayName || t.key,
|
|
27
|
+
onClick: n ? () => n(t) : void 0,
|
|
22
28
|
scope: t.namespace,
|
|
23
|
-
shouldHideEmptyValues:
|
|
29
|
+
shouldHideEmptyValues: m,
|
|
24
30
|
taxonomyKey: t.taxonomyKey,
|
|
25
|
-
taxonomyNodeFetcher:
|
|
31
|
+
taxonomyNodeFetcher: d,
|
|
26
32
|
type: t.type,
|
|
27
|
-
value: t.value
|
|
33
|
+
value: t.value,
|
|
34
|
+
targetLocation: t.targetLocation
|
|
28
35
|
}, t.id))
|
|
29
36
|
});
|
|
30
37
|
};
|
|
31
38
|
export {
|
|
32
|
-
|
|
39
|
+
_ as MetadataInstanceContent
|
|
33
40
|
};
|