@box/metadata-editor 0.119.0 → 0.120.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/esm/lib/components/combobox-with-api-pagination/combobox-with-api-pagination.js +43 -43
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/autofill-overlay.js +38 -35
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/messages.js +8 -0
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/useErrorMessaging.js +28 -0
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/constants.js +3 -2
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +44 -44
- package/dist/i18n/bn-IN.js +2 -0
- package/dist/i18n/da-DK.js +2 -0
- package/dist/i18n/de-DE.js +2 -0
- package/dist/i18n/en-AU.js +2 -0
- package/dist/i18n/en-CA.js +2 -0
- package/dist/i18n/en-GB.js +2 -0
- package/dist/i18n/en-US.js +2 -0
- package/dist/i18n/en-US.properties +4 -0
- package/dist/i18n/en-x-pseudo.js +129 -127
- package/dist/i18n/en-x-pseudo.properties +127 -127
- package/dist/i18n/es-419.js +2 -0
- package/dist/i18n/es-ES.js +2 -0
- package/dist/i18n/fi-FI.js +2 -0
- package/dist/i18n/fr-CA.js +2 -0
- package/dist/i18n/fr-FR.js +2 -0
- package/dist/i18n/hi-IN.js +2 -0
- package/dist/i18n/it-IT.js +2 -0
- package/dist/i18n/ja-JP.js +4 -2
- package/dist/i18n/ja-JP.properties +2 -2
- package/dist/i18n/json/src/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/messages.json +1 -1
- package/dist/i18n/ko-KR.js +2 -0
- package/dist/i18n/nb-NO.js +2 -0
- package/dist/i18n/nl-NL.js +2 -0
- package/dist/i18n/pl-PL.js +2 -0
- package/dist/i18n/pt-BR.js +2 -0
- package/dist/i18n/ru-RU.js +2 -0
- package/dist/i18n/sv-SE.js +2 -0
- package/dist/i18n/tr-TR.js +2 -0
- package/dist/i18n/zh-CN.js +2 -0
- package/dist/i18n/zh-TW.js +2 -0
- package/dist/styles/autofill-overlay.css +1 -1
- package/dist/types/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/messages.d.ts +10 -0
- package/dist/types/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/useErrorMessaging.d.ts +6 -0
- package/dist/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/constants.d.ts +1 -0
- package/dist/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/types.d.ts +2 -2
- package/package.json +5 -5
package/dist/esm/lib/components/combobox-with-api-pagination/combobox-with-api-pagination.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
import { ComboboxItemValue as te } from "@ariakit/react";
|
2
2
|
import { Combobox as m, useForkRef as re, LoadingIndicator as ne, InlineNotice as ie, Text as se } from "@box/blueprint-web";
|
3
3
|
import { Search as ae, Loader as le } from "@box/blueprint-web-assets/icons/Fill";
|
4
|
-
import { IconIconOnLightSecondary as ce, Size6 as
|
5
|
-
import
|
6
|
-
import { forwardRef as
|
7
|
-
import { useIntl as
|
4
|
+
import { IconIconOnLightSecondary as ce, Size6 as T, Size1 as ue } from "@box/blueprint-web-assets/tokens/tokens";
|
5
|
+
import S from "clsx";
|
6
|
+
import { forwardRef as F, useRef as v, useCallback as de, useMemo as R, useEffect as me } from "react";
|
7
|
+
import { useIntl as P, FormattedMessage as V } from "react-intl";
|
8
8
|
import i from "./messages.js";
|
9
9
|
import { useAsyncList as pe } from "./use-async-list.js";
|
10
10
|
import { useControllableState as he } from "./utils/use-controllable-state.js";
|
11
11
|
import { useTrackVisibility as fe } from "./utils/use-intersection-observer.js";
|
12
|
-
import { jsx as r, jsxs as
|
12
|
+
import { jsx as r, jsxs as N, Fragment as ge } from "react/jsx-runtime";
|
13
13
|
import '../../../../styles/combobox-with-api-pagination.css';const be = "_container_syvk5_1", xe = "_disabled_syvk5_7", _e = "_highlightOptionText_syvk5_11", Oe = "_selected_syvk5_23", ye = "_option_syvk5_34", ve = "_errorComboboxOption_syvk5_38", Re = "_errorComboboxOptionText_syvk5_43", a = {
|
14
14
|
container: be,
|
15
15
|
disabled: xe,
|
@@ -18,29 +18,29 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
18
18
|
option: ye,
|
19
19
|
errorComboboxOption: ve,
|
20
20
|
errorComboboxOptionText: Re
|
21
|
-
},
|
21
|
+
}, k = /* @__PURE__ */ F(({
|
22
22
|
onTryAgain: L
|
23
23
|
}, p) => {
|
24
24
|
const {
|
25
25
|
formatMessage: h
|
26
|
-
} =
|
27
|
-
return /* @__PURE__ */
|
26
|
+
} = P();
|
27
|
+
return /* @__PURE__ */ N(ge, {
|
28
28
|
children: [/* @__PURE__ */ r(ie, {
|
29
29
|
variant: "error",
|
30
30
|
variantIconAriaLabel: h(i.loadingResultsErrorIconLabel),
|
31
|
-
children: /* @__PURE__ */ r(
|
31
|
+
children: /* @__PURE__ */ r(V, {
|
32
32
|
...i.loadingResultsErrorMessage
|
33
33
|
})
|
34
34
|
}), /* @__PURE__ */ r(m.Option, {
|
35
35
|
ref: p,
|
36
36
|
className: a.errorComboboxOption,
|
37
37
|
onClick: L,
|
38
|
-
children: /* @__PURE__ */
|
38
|
+
children: /* @__PURE__ */ N(se, {
|
39
39
|
as: "span",
|
40
40
|
className: a.errorComboboxOptionText,
|
41
41
|
color: "textOnLightLink",
|
42
42
|
variant: "bodyDefaultBold",
|
43
|
-
children: [/* @__PURE__ */ r(
|
43
|
+
children: [/* @__PURE__ */ r(V, {
|
44
44
|
...i.loadingResultsErrorAction
|
45
45
|
}), /* @__PURE__ */ r(le, {
|
46
46
|
color: "currentColor",
|
@@ -52,36 +52,36 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
52
52
|
});
|
53
53
|
}), C = "__LOADING__", A = "__LOADING_ERROR__", Ce = "0px 0px 20px 0px", Ae = /* @__PURE__ */ r(ae, {
|
54
54
|
color: ce,
|
55
|
-
height:
|
55
|
+
height: T,
|
56
56
|
role: "presentation",
|
57
57
|
style: {
|
58
58
|
padding: ue,
|
59
59
|
boxSizing: "border-box"
|
60
60
|
},
|
61
|
-
width:
|
62
|
-
}), we = /* @__PURE__ */
|
61
|
+
width: T
|
62
|
+
}), we = /* @__PURE__ */ F(function(p, h) {
|
63
63
|
const {
|
64
|
-
defaultFetcher:
|
64
|
+
defaultFetcher: D,
|
65
65
|
onInputValueChange: f,
|
66
|
-
value:
|
67
|
-
onValueChange:
|
68
|
-
noResultMessage:
|
69
|
-
defaultValue:
|
70
|
-
loadingAriaLabel:
|
66
|
+
value: w,
|
67
|
+
onValueChange: B,
|
68
|
+
noResultMessage: W,
|
69
|
+
defaultValue: z = [],
|
70
|
+
loadingAriaLabel: G,
|
71
71
|
multiselect: l = !1,
|
72
|
-
disabled:
|
73
|
-
className:
|
74
|
-
displaySingleSelectionAsChip:
|
72
|
+
disabled: j,
|
73
|
+
className: U,
|
74
|
+
displaySingleSelectionAsChip: E = !0,
|
75
75
|
...q
|
76
76
|
} = p, {
|
77
77
|
formatMessage: u
|
78
|
-
} =
|
78
|
+
} = P(), g = v(null), b = v(!0), e = pe({
|
79
79
|
async load({
|
80
80
|
marker: o,
|
81
81
|
searchInput: t,
|
82
82
|
signal: y
|
83
83
|
}) {
|
84
|
-
const c = await
|
84
|
+
const c = await D({
|
85
85
|
signal: y,
|
86
86
|
marker: o,
|
87
87
|
searchInput: t
|
@@ -91,14 +91,14 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
91
91
|
marker: c.marker
|
92
92
|
};
|
93
93
|
}
|
94
|
-
}),
|
95
|
-
|
94
|
+
}), I = v(!1), H = de(() => {
|
95
|
+
I.current || (e.reload(), I.current = !0);
|
96
96
|
}, []), [n, x] = he({
|
97
|
-
prop:
|
98
|
-
defaultProp:
|
99
|
-
onChange:
|
97
|
+
prop: w,
|
98
|
+
defaultProp: z,
|
99
|
+
onChange: B
|
100
100
|
}), _ = !l && n.length === 1, J = (o) => {
|
101
|
-
o === void 0 ? (x([]), b.current || (e.search(""), b.current = !0)) : Array.isArray(o) ? x(o) : x([o]);
|
101
|
+
o === void 0 ? (x([]), (!b.current || !E) && (e.search(""), b.current = !0)) : Array.isArray(o) ? x(o) : x([o]);
|
102
102
|
}, K = R(() => n.length === 0 ? l ? [] : void 0 : l ? n : n[0], [l, n]), O = R(() => n.filter((o) => !e.items.some((t) => t.value === o.value)), [n, e.items]), Q = (o) => {
|
103
103
|
const {
|
104
104
|
value: t,
|
@@ -119,7 +119,7 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
119
119
|
})
|
120
120
|
}) : null;
|
121
121
|
if (t === A && e.hasError && !e.isEmpty)
|
122
|
-
return /* @__PURE__ */ r(
|
122
|
+
return /* @__PURE__ */ r(k, {
|
123
123
|
onTryAgain: () => {
|
124
124
|
var s;
|
125
125
|
e.loadMore(), (s = g.current) == null || s.focus();
|
@@ -133,7 +133,7 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
133
133
|
className: a.option,
|
134
134
|
value: t,
|
135
135
|
children: /* @__PURE__ */ r(te, {
|
136
|
-
className:
|
136
|
+
className: S(a.highlightOptionText, oe && a.selected),
|
137
137
|
value: y || t
|
138
138
|
})
|
139
139
|
});
|
@@ -148,17 +148,17 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
148
148
|
e.reload(), (o = g.current) == null || o.focus();
|
149
149
|
};
|
150
150
|
let d;
|
151
|
-
e.hasError && !e.isLoading ? d = /* @__PURE__ */ r(
|
151
|
+
e.hasError && !e.isLoading ? d = /* @__PURE__ */ r(k, {
|
152
152
|
onTryAgain: Y
|
153
|
-
}) : e.isEmpty && !e.isLoading ? d =
|
153
|
+
}) : e.isEmpty && !e.isLoading ? d = W || u(i.noResults) : d = void 0;
|
154
154
|
const [Z, {
|
155
155
|
rootRef: $,
|
156
|
-
isVisible:
|
156
|
+
isVisible: M
|
157
157
|
}] = fe({
|
158
158
|
rootMargin: Ce
|
159
159
|
});
|
160
160
|
me(() => {
|
161
|
-
if (!(
|
161
|
+
if (!(M && e.hasNextPage))
|
162
162
|
return;
|
163
163
|
const t = setTimeout(() => {
|
164
164
|
e.loadMore();
|
@@ -166,7 +166,7 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
166
166
|
return () => {
|
167
167
|
clearTimeout(t);
|
168
168
|
};
|
169
|
-
}, [
|
169
|
+
}, [M]);
|
170
170
|
const ee = R(() => {
|
171
171
|
const o = e.hasNextPage ? {
|
172
172
|
displayValue: C,
|
@@ -181,18 +181,18 @@ import '../../../../styles/combobox-with-api-pagination.css';const be = "_contai
|
|
181
181
|
as: "input",
|
182
182
|
...q,
|
183
183
|
ref: re(g, h),
|
184
|
-
className:
|
184
|
+
className: S({
|
185
185
|
[a.disabled]: _
|
186
|
-
},
|
186
|
+
}, U),
|
187
187
|
clearButtonAriaLabel: u(i.clearButtonAriaLabel),
|
188
|
-
disabled:
|
189
|
-
displaySingleSelectionAsChip:
|
188
|
+
disabled: j || _,
|
189
|
+
displaySingleSelectionAsChip: E,
|
190
190
|
displayValue: (o) => o.displayValue || o.value,
|
191
191
|
endComboboxIcon: Ae,
|
192
192
|
focusLoop: !1,
|
193
193
|
getPopoverRef: $,
|
194
194
|
loading: e.isReloading,
|
195
|
-
loadingAriaLabel:
|
195
|
+
loadingAriaLabel: G || u(i.loadingAriaLabel),
|
196
196
|
multiselect: l,
|
197
197
|
noResultMessage: d,
|
198
198
|
onFocus: H,
|
@@ -1,59 +1,62 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import
|
5
|
-
import {
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import {
|
9
|
-
import
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
1
|
+
import { LoadingIndicator as v, Text as c, TextButton as d } from "@box/blueprint-web";
|
2
|
+
import { AlertTriangle as p } from "@box/blueprint-web-assets/icons/Line";
|
3
|
+
import { SurfaceStatusSurfaceError as _, Size5 as m } from "@box/blueprint-web-assets/tokens/tokens";
|
4
|
+
import g from "clsx";
|
5
|
+
import { useState as O } from "react";
|
6
|
+
import { useIntl as h } from "react-intl";
|
7
|
+
import e from "./messages.js";
|
8
|
+
import { useErrorMessaging as S } from "./useErrorMessaging.js";
|
9
|
+
import { jsxs as T, jsx as a } from "react/jsx-runtime";
|
10
|
+
import '../../../../../../styles/autofill-overlay.css';const x = "_autofillOverlay_1s073_1", B = "_withError_1s073_15", D = "_autofillOverlayTitle_1s073_19", I = "_autofillOverlayDescription_1s073_24", M = "_dismissButton_1s073_28", E = "_overlayIcon_1s073_32", N = "_testContainerStyle_1s073_38", s = {
|
11
|
+
autofillOverlay: x,
|
12
|
+
withError: B,
|
13
|
+
autofillOverlayTitle: D,
|
14
|
+
autofillOverlayDescription: I,
|
15
|
+
dismissButton: M,
|
16
|
+
overlayIcon: E,
|
17
|
+
testContainerStyle: N
|
18
|
+
}, G = ({
|
19
|
+
errorCode: t,
|
20
|
+
isFetchingSuggestions: f,
|
19
21
|
isLongLoading: o
|
20
22
|
}) => {
|
21
|
-
const
|
22
|
-
let l =
|
23
|
-
|
24
|
-
const
|
25
|
-
return !
|
26
|
-
className:
|
27
|
-
children: [
|
23
|
+
const i = h(), [u, y] = O(!1), r = S(t);
|
24
|
+
let l = i.formatMessage(e.defaultLoadingMessage);
|
25
|
+
t && (l = r.title), o && (l = i.formatMessage(e.longLoadingTitle));
|
26
|
+
const n = o ? i.formatMessage(e.longLoadingDescription) : t && r.description;
|
27
|
+
return !f && !t || u ? null : /* @__PURE__ */ T("div", {
|
28
|
+
className: g(s.autofillOverlay, t && s.withError),
|
29
|
+
children: [t ? /* @__PURE__ */ a(p, {
|
28
30
|
className: s.overlayIcon,
|
29
|
-
color:
|
31
|
+
color: _,
|
30
32
|
height: m,
|
31
33
|
role: "presentation",
|
32
34
|
width: m
|
33
|
-
}) : /* @__PURE__ */ a(
|
34
|
-
"aria-label":
|
35
|
+
}) : /* @__PURE__ */ a(v, {
|
36
|
+
"aria-label": i.formatMessage(e.loadingAriaLabel),
|
35
37
|
"aria-live": "polite",
|
36
38
|
className: s.overlayIcon,
|
37
39
|
size: "large",
|
38
40
|
variant: "default"
|
39
|
-
}), /* @__PURE__ */ a(
|
41
|
+
}), /* @__PURE__ */ a(c, {
|
40
42
|
as: "p",
|
41
43
|
className: s.autofillOverlayTitle,
|
42
44
|
variant: "subtitle",
|
43
45
|
children: l
|
44
|
-
}),
|
46
|
+
}), n && /* @__PURE__ */ a(c, {
|
45
47
|
as: "p",
|
48
|
+
className: s.autofillOverlayDescription,
|
46
49
|
color: "textOnLightSecondary",
|
47
50
|
variant: "bodyDefault",
|
48
|
-
children:
|
49
|
-
}),
|
51
|
+
children: n
|
52
|
+
}), t && /* @__PURE__ */ a(d, {
|
50
53
|
className: s.dismissButton,
|
51
|
-
onClick: () =>
|
54
|
+
onClick: () => y(!0),
|
52
55
|
"data-target-id": "TextButton-dismissButton",
|
53
|
-
children:
|
56
|
+
children: i.formatMessage(e.dismissButton)
|
54
57
|
})]
|
55
58
|
});
|
56
59
|
};
|
57
60
|
export {
|
58
|
-
|
61
|
+
G as AutofillOverlay
|
59
62
|
};
|
package/dist/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/messages.js
CHANGED
@@ -16,6 +16,14 @@ const e = a({
|
|
16
16
|
id: "metadataEditor.metadataInstanceEditor.autofillOverlay.errorDescription",
|
17
17
|
defaultMessage: "Please try again in a few minutes"
|
18
18
|
},
|
19
|
+
missingPermissionsErrorTitle: {
|
20
|
+
id: "metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorTitle",
|
21
|
+
defaultMessage: "Can’t Extract Metadata"
|
22
|
+
},
|
23
|
+
missingPermissionsErrorDescription: {
|
24
|
+
id: "metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorDescription",
|
25
|
+
defaultMessage: "You don’t have permission to access the destination folder to extract metadata. Please contact the owner or your admin."
|
26
|
+
},
|
19
27
|
loadingAriaLabel: {
|
20
28
|
id: "metadataEditor.metadataInstanceEditor.autofillOverlay.loadingAriaLabel",
|
21
29
|
defaultMessage: "Loading"
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { useIntl as t } from "react-intl";
|
2
|
+
import { ERROR_CODE_METADATA_PRECONDITION_FAILED as i, ERROR_CODE_METADATA_AUTOFILL_TIMEOUT as o, ERROR_CODE_MISSING_PERMISSIONS as a } from "../metadata-instance-form/constants.js";
|
3
|
+
import e from "./messages.js";
|
4
|
+
const c = (s) => {
|
5
|
+
const r = t();
|
6
|
+
if (!s)
|
7
|
+
return {
|
8
|
+
title: r.formatMessage(e.errorTitle),
|
9
|
+
description: r.formatMessage(e.errorDescription)
|
10
|
+
};
|
11
|
+
switch (s) {
|
12
|
+
case a:
|
13
|
+
return {
|
14
|
+
title: r.formatMessage(e.missingPermissionsErrorTitle),
|
15
|
+
description: r.formatMessage(e.missingPermissionsErrorDescription)
|
16
|
+
};
|
17
|
+
case o:
|
18
|
+
case i:
|
19
|
+
default:
|
20
|
+
return {
|
21
|
+
title: r.formatMessage(e.errorTitle),
|
22
|
+
description: r.formatMessage(e.errorDescription)
|
23
|
+
};
|
24
|
+
}
|
25
|
+
};
|
26
|
+
export {
|
27
|
+
c as useErrorMessaging
|
28
|
+
};
|
@@ -1,6 +1,7 @@
|
|
1
|
-
const _ = "metadata_autofill_timeout_error", o = "metadata_precondition_failed_error",
|
1
|
+
const _ = "metadata_autofill_timeout_error", o = "metadata_precondition_failed_error", r = "missing_permissions_error", E = "unknown_error";
|
2
2
|
export {
|
3
3
|
_ as ERROR_CODE_METADATA_AUTOFILL_TIMEOUT,
|
4
4
|
o as ERROR_CODE_METADATA_PRECONDITION_FAILED,
|
5
|
-
|
5
|
+
r as ERROR_CODE_MISSING_PERMISSIONS,
|
6
|
+
E as ERROR_CODE_UNKNOWN
|
6
7
|
};
|
@@ -10,20 +10,20 @@ import { TEMPLATE_CUSTOM_PROPERTIES as I } from "../../../../constants.js";
|
|
10
10
|
import { useAutofill as T } from "../../../../utils/autofill-context.js";
|
11
11
|
import { TemplateInstance as oo } from "../../../metadata-editor-fields/metadata-editor-fields.js";
|
12
12
|
import { MetadataEmptyState as ro } from "../../../metadata-empty-state/metadata-empty-state.js";
|
13
|
-
import { AutofillOverlay as
|
14
|
-
import { CustomInstance as
|
13
|
+
import { AutofillOverlay as io } from "../autofill-overlay/autofill-overlay.js";
|
14
|
+
import { CustomInstance as to } from "../custom-instance/custom-instance.js";
|
15
15
|
import { e as ao, c as no } from "../../../../../../chunks/utils.js";
|
16
|
-
import { s as
|
17
|
-
import { jsx as
|
18
|
-
import { UnsavedChangesModal as
|
16
|
+
import { s as u, M as so } from "../../../../../../chunks/metadata-instance-form-card-wrapper.js";
|
17
|
+
import { jsx as t, jsxs as D } from "react/jsx-runtime";
|
18
|
+
import { UnsavedChangesModal as eo } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
|
19
19
|
const mo = ({
|
20
|
-
dirty:
|
20
|
+
dirty: e,
|
21
21
|
onChange: m,
|
22
22
|
values: r
|
23
23
|
}) => {
|
24
24
|
const n = O(r);
|
25
|
-
return
|
26
|
-
}, vo = (
|
25
|
+
return e && !Y(n.current.metadata.fields, r.metadata.fields) && (n.current = r, m(r)), null;
|
26
|
+
}, vo = (e) => {
|
27
27
|
const {
|
28
28
|
areAiSuggestionsAvailable: m,
|
29
29
|
customRef: r,
|
@@ -34,7 +34,7 @@ const mo = ({
|
|
34
34
|
isBetaLanguageEnabled: A,
|
35
35
|
isDeleteButtonDisabled: v,
|
36
36
|
isDeleteConfirmationModalCheckboxEnabled: L,
|
37
|
-
isMultilevelTaxonomyFieldEnabled:
|
37
|
+
isMultilevelTaxonomyFieldEnabled: d,
|
38
38
|
isUnsavedChangesModalOpen: R = !1,
|
39
39
|
MetadataInstanceFormCustomWrapper: k,
|
40
40
|
selectedTemplateInstance: o,
|
@@ -45,69 +45,69 @@ const mo = ({
|
|
45
45
|
onSubmit: B,
|
46
46
|
setIsUnsavedChangesModalOpen: p,
|
47
47
|
taxonomyOptionsFetcher: h
|
48
|
-
} =
|
48
|
+
} = e, V = k ?? so, [W, C] = S(!1), {
|
49
49
|
isFetchingSuggestions: a,
|
50
|
-
isLongLoading:
|
50
|
+
isLongLoading: E,
|
51
51
|
getAiSuggestions: w,
|
52
|
-
clearState:
|
52
|
+
clearState: c,
|
53
53
|
suggestions: K
|
54
54
|
} = T();
|
55
55
|
y(() => () => {
|
56
|
-
|
57
|
-
}, [
|
58
|
-
const F = (o == null ? void 0 : o.templateKey) === I, j = async (
|
59
|
-
await B(
|
60
|
-
}, _ = (
|
61
|
-
|
56
|
+
c();
|
57
|
+
}, [c, o == null ? void 0 : o.id]);
|
58
|
+
const F = (o == null ? void 0 : o.templateKey) === I, j = async (i) => {
|
59
|
+
await B(i, no(i, o));
|
60
|
+
}, _ = (i) => {
|
61
|
+
i ? p(!0) : N();
|
62
62
|
}, $ = () => {
|
63
|
-
|
63
|
+
C(!0);
|
64
64
|
}, q = {
|
65
65
|
metadata: {
|
66
66
|
...o,
|
67
|
-
fields: ao(o.fields)
|
67
|
+
fields: ao((o == null ? void 0 : o.fields) ?? [])
|
68
68
|
}
|
69
69
|
}, M = O(null), [b, J] = S(null);
|
70
70
|
y(() => {
|
71
71
|
J(r ?? M.current);
|
72
72
|
}, [r, o == null ? void 0 : o.templateKey, o == null ? void 0 : o.scope]);
|
73
73
|
const z = Z(() => {
|
74
|
-
const
|
74
|
+
const i = (o == null ? void 0 : o.fields.length) === 0;
|
75
75
|
if (F)
|
76
|
-
return /* @__PURE__ */
|
76
|
+
return /* @__PURE__ */ t(to, {
|
77
77
|
isLoading: a
|
78
78
|
});
|
79
|
-
if (
|
80
|
-
return /* @__PURE__ */
|
79
|
+
if (i)
|
80
|
+
return /* @__PURE__ */ t(ro, {
|
81
81
|
isBoxAiSuggestionsFeatureEnabled: f,
|
82
82
|
level: "instance"
|
83
83
|
});
|
84
|
-
const
|
84
|
+
const s = !!(a || l);
|
85
85
|
return /* @__PURE__ */ D("div", {
|
86
|
-
className: H(
|
87
|
-
children: [/* @__PURE__ */
|
86
|
+
className: H(u.metadataInstanceFormContent, s && u.showOverlay),
|
87
|
+
children: [/* @__PURE__ */ t(io, {
|
88
88
|
errorCode: l,
|
89
89
|
isFetchingSuggestions: a,
|
90
|
-
isLongLoading:
|
91
|
-
}), /* @__PURE__ */
|
90
|
+
isLongLoading: E
|
91
|
+
}), /* @__PURE__ */ t(oo, {
|
92
92
|
disableForm: a,
|
93
|
-
isMultilevelTaxonomyFieldEnabled:
|
93
|
+
isMultilevelTaxonomyFieldEnabled: d,
|
94
94
|
portalElement: r ?? b,
|
95
95
|
taxonomyOptionsFetcher: h
|
96
96
|
})]
|
97
97
|
});
|
98
|
-
}, [o == null ? void 0 : o.fields.length, F, a,
|
99
|
-
return /* @__PURE__ */
|
98
|
+
}, [o == null ? void 0 : o.fields.length, F, a, E, r, b, h, f, d, l]);
|
99
|
+
return /* @__PURE__ */ t(Q, {
|
100
100
|
initialValues: q,
|
101
101
|
onSubmit: j,
|
102
102
|
children: ({
|
103
|
-
values:
|
104
|
-
dirty:
|
103
|
+
values: i,
|
104
|
+
dirty: s
|
105
105
|
}) => /* @__PURE__ */ D(X, {
|
106
|
-
children: [/* @__PURE__ */
|
106
|
+
children: [/* @__PURE__ */ t(V, {
|
107
107
|
areAiSuggestionsAvailable: m,
|
108
|
-
className:
|
108
|
+
className: u.metadataInstanceForm,
|
109
109
|
formRef: M,
|
110
|
-
formValues:
|
110
|
+
formValues: i,
|
111
111
|
getAiSuggestions: w,
|
112
112
|
handleCancel: _,
|
113
113
|
handleDelete: $,
|
@@ -116,23 +116,23 @@ const mo = ({
|
|
116
116
|
isBetaLanguageEnabled: A,
|
117
117
|
isDeleteButtonDisabled: v,
|
118
118
|
isFetchingSuggestions: a,
|
119
|
-
isFormDirty:
|
119
|
+
isFormDirty: s,
|
120
120
|
isLargeFile: n,
|
121
121
|
selectedTemplateInstance: o,
|
122
122
|
suggestions: K,
|
123
123
|
children: o && z
|
124
|
-
}), g && /* @__PURE__ */
|
125
|
-
dirty:
|
124
|
+
}), g && /* @__PURE__ */ t(mo, {
|
125
|
+
dirty: s,
|
126
126
|
onChange: g,
|
127
|
-
values:
|
128
|
-
}), /* @__PURE__ */
|
127
|
+
values: i
|
128
|
+
}), /* @__PURE__ */ t(eo, {
|
129
129
|
onBackToEdit: () => p(!1),
|
130
130
|
onDiscardChanges: U,
|
131
131
|
open: R
|
132
|
-
}), /* @__PURE__ */
|
132
|
+
}), /* @__PURE__ */ t(G, {
|
133
133
|
isCheckboxEnabled: L,
|
134
134
|
onConfirm: () => P(o),
|
135
|
-
onDismiss: () =>
|
135
|
+
onDismiss: () => C(!1),
|
136
136
|
open: W,
|
137
137
|
templateName: o == null ? void 0 : o.displayName
|
138
138
|
})]
|
package/dist/i18n/bn-IN.js
CHANGED
@@ -95,6 +95,8 @@ export default {
|
|
95
95
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.loadingAriaLabel": "লোড করা হচ্ছে",
|
96
96
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingDescription": "এখনও এটির কাজ চলছে!",
|
97
97
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingTitle": "এটিতে স্বাভাবিকের চেয়ে বেশি সময় লাগে",
|
98
|
+
"metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorDescription": "You don’t have permission to access the destination folder to extract metadata. Please contact the owner or your admin.",
|
99
|
+
"metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorTitle": "Can’t Extract Metadata",
|
98
100
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ মান যোগ করুন",
|
99
101
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "{fieldName} অ্যাট্রিবিউট মুছুন",
|
100
102
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "মান সেট করুন",
|
package/dist/i18n/da-DK.js
CHANGED
@@ -95,6 +95,8 @@ export default {
|
|
95
95
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.loadingAriaLabel": "Indlæser",
|
96
96
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingDescription": "Arbejder stadig på det!",
|
97
97
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingTitle": "Det tager længere tid end normalt",
|
98
|
+
"metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorDescription": "You don’t have permission to access the destination folder to extract metadata. Please contact the owner or your admin.",
|
99
|
+
"metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorTitle": "Can’t Extract Metadata",
|
98
100
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Tilføj attribut",
|
99
101
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Slet attributten {fieldName}",
|
100
102
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Indstil værdi",
|
package/dist/i18n/de-DE.js
CHANGED
@@ -95,6 +95,8 @@ export default {
|
|
95
95
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.loadingAriaLabel": "Laden",
|
96
96
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingDescription": "Noch in Arbeit!",
|
97
97
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingTitle": "Dies dauert länger als üblich",
|
98
|
+
"metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorDescription": "You don’t have permission to access the destination folder to extract metadata. Please contact the owner or your admin.",
|
99
|
+
"metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorTitle": "Can’t Extract Metadata",
|
98
100
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Attribut hinzufügen",
|
99
101
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "{fieldName}-Attribut löschen",
|
100
102
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Wert festlegen",
|
package/dist/i18n/en-AU.js
CHANGED
@@ -95,6 +95,8 @@ export default {
|
|
95
95
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.loadingAriaLabel": "Loading",
|
96
96
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingDescription": "Still working on it!",
|
97
97
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingTitle": "This is taking longer than usual",
|
98
|
+
"metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorDescription": "You don’t have permission to access the destination folder to extract metadata. Please contact the owner or your admin.",
|
99
|
+
"metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorTitle": "Can’t Extract Metadata",
|
98
100
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Add Attribute",
|
99
101
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Delete {fieldName} attribute",
|
100
102
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Set value",
|
package/dist/i18n/en-CA.js
CHANGED
@@ -95,6 +95,8 @@ export default {
|
|
95
95
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.loadingAriaLabel": "Loading",
|
96
96
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingDescription": "Still working on it!",
|
97
97
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingTitle": "This is taking longer than usual",
|
98
|
+
"metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorDescription": "You don’t have permission to access the destination folder to extract metadata. Please contact the owner or your admin.",
|
99
|
+
"metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorTitle": "Can’t Extract Metadata",
|
98
100
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Add Attribute",
|
99
101
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Delete {fieldName} attribute",
|
100
102
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Set value",
|
package/dist/i18n/en-GB.js
CHANGED
@@ -95,6 +95,8 @@ export default {
|
|
95
95
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.loadingAriaLabel": "Loading",
|
96
96
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingDescription": "Still working on it!",
|
97
97
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingTitle": "This is taking longer than usual",
|
98
|
+
"metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorDescription": "You don’t have permission to access the destination folder to extract metadata. Please contact the owner or your admin.",
|
99
|
+
"metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorTitle": "Can’t Extract Metadata",
|
98
100
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Add Attribute",
|
99
101
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Delete {fieldName} attribute",
|
100
102
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Set value",
|
package/dist/i18n/en-US.js
CHANGED
@@ -95,6 +95,8 @@ export default {
|
|
95
95
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.loadingAriaLabel": "Loading",
|
96
96
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingDescription": "Still working on it!",
|
97
97
|
"metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingTitle": "This is taking longer than usual",
|
98
|
+
"metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorDescription": "You don’t have permission to access the destination folder to extract metadata. Please contact the owner or your admin.",
|
99
|
+
"metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorTitle": "Can’t Extract Metadata",
|
98
100
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Add Attribute",
|
99
101
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Delete {fieldName} attribute",
|
100
102
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Set value",
|
@@ -190,6 +190,10 @@ metadataEditor.metadataInstanceEditor.autofillOverlay.loadingAriaLabel = Loading
|
|
190
190
|
metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingDescription = Still working on it!
|
191
191
|
# Title for long loading state while fetching AI suggestions
|
192
192
|
metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingTitle = This is taking longer than usual
|
193
|
+
# Description for error state when user lacks permissions for metadata extraction
|
194
|
+
metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorDescription = You don’t have permission to access the destination folder to extract metadata. Please contact the owner or your admin.
|
195
|
+
# Title for error state when user lacks permissions for metadata extraction
|
196
|
+
metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorTitle = Can’t Extract Metadata
|
193
197
|
# Button that allow to add new attribute to metadata custom instance
|
194
198
|
metadataEditor.metadataInstanceEditor.customInstance.addAttribute = + Add Attribute
|
195
199
|
# Aria label for button that allow to remove attribute from metadata custom instance
|