@box/metadata-editor 0.88.0 → 0.89.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/chunks/metadata-instance-form-card-wrapper.js +2 -2
- package/esm/lib/components/metadata-instance-editor/subcomponents/autofill-loading-state/autofill-loading-state.js +23 -17
- package/esm/lib/components/metadata-instance-editor/subcomponents/autofill-loading-state/messages.js +8 -0
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +70 -67
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js +28 -30
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js +2 -2
- package/esm/lib/components/metadata-instance-list/metadata-instance-list.js +15 -13
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.js +35 -34
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.js +1 -1
- package/esm/lib/utils/autofill-context.js +38 -30
- package/i18n/bn-IN.js +2 -0
- package/i18n/da-DK.js +2 -0
- package/i18n/de-DE.js +2 -0
- package/i18n/en-AU.js +2 -0
- package/i18n/en-CA.js +2 -0
- package/i18n/en-GB.js +2 -0
- package/i18n/en-US.js +2 -0
- package/i18n/en-US.properties +4 -0
- package/i18n/en-x-pseudo.js +2 -0
- package/i18n/es-419.js +2 -0
- package/i18n/es-ES.js +2 -0
- package/i18n/fi-FI.js +2 -0
- package/i18n/fr-CA.js +2 -0
- package/i18n/fr-FR.js +2 -0
- package/i18n/hi-IN.js +2 -0
- package/i18n/it-IT.js +2 -0
- package/i18n/ja-JP.js +2 -0
- package/i18n/json/src/lib/components/metadata-instance-editor/subcomponents/autofill-loading-state/messages.json +1 -1
- package/i18n/ko-KR.js +2 -0
- package/i18n/nb-NO.js +2 -0
- package/i18n/nl-NL.js +2 -0
- package/i18n/pl-PL.js +2 -0
- package/i18n/pt-BR.js +2 -0
- package/i18n/ru-RU.js +2 -0
- package/i18n/sv-SE.js +2 -0
- package/i18n/tr-TR.js +2 -0
- package/i18n/zh-CN.js +2 -0
- package/i18n/zh-TW.js +2 -0
- package/package.json +2 -2
- package/styles/autofill-loading-state.css +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/autofill-loading-state/autofill-loading-state.d.ts +4 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/autofill-loading-state/messages.d.ts +10 -0
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/types.d.ts +2 -2
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/types.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/types.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/metadata-instance-list.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/types.d.ts +1 -0
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/types.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/types.d.ts +1 -0
- package/types/lib/utils/autofill-context.d.ts +2 -1
@@ -15,7 +15,7 @@ import '../styles/metadata-instance-form-card-wrapper.css';const y = "_metadataI
|
|
15
15
|
className: n,
|
16
16
|
formRef: g,
|
17
17
|
isAiSuggestionsFeatureEnabled: m,
|
18
|
-
|
18
|
+
isBetaLanguageEnabled: d,
|
19
19
|
isDeleteButtonDisabled: c,
|
20
20
|
suggestions: l,
|
21
21
|
isFetchingSuggestions: s,
|
@@ -35,8 +35,8 @@ import '../styles/metadata-instance-form-card-wrapper.css';const y = "_metadataI
|
|
35
35
|
children: [/* @__PURE__ */ t(C, {
|
36
36
|
areAiSuggestionsAvailable: o,
|
37
37
|
hasSuggestions: _,
|
38
|
-
iaBetaLanguageEnabled: d,
|
39
38
|
isAiSuggestionsFeatureEnabled: m && !h,
|
39
|
+
isBetaLanguageEnabled: d,
|
40
40
|
isLoading: s,
|
41
41
|
onAutofill: p,
|
42
42
|
templateName: a == null ? void 0 : a.displayName
|
@@ -1,28 +1,34 @@
|
|
1
|
-
import { LoadingIndicator as
|
2
|
-
import { u as
|
1
|
+
import { LoadingIndicator as r, Text as i } from "@box/blueprint-web";
|
2
|
+
import { u as d } from "../../../../../../chunks/index.js";
|
3
3
|
import a from "./messages.js";
|
4
|
-
import { jsxs as
|
5
|
-
import '../../../../../../styles/autofill-loading-state.css';const
|
6
|
-
autofillLoadingState:
|
7
|
-
loadingIcon:
|
8
|
-
testContainerStyle:
|
9
|
-
},
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
4
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
5
|
+
import '../../../../../../styles/autofill-loading-state.css';const g = "_autofillLoadingState_hoso1_1", f = "_loadingIcon_hoso1_8", m = "_testContainerStyle_hoso1_15", n = {
|
6
|
+
autofillLoadingState: g,
|
7
|
+
loadingIcon: f,
|
8
|
+
testContainerStyle: m
|
9
|
+
}, h = ({
|
10
|
+
isLongLoading: o
|
11
|
+
}) => {
|
12
|
+
const t = d(), s = o ? t.formatMessage(a.longLoadingTitle) : t.formatMessage(a.defaultLoadingMessage), l = o && t.formatMessage(a.longLoadingDescription);
|
13
|
+
return /* @__PURE__ */ c("div", {
|
14
|
+
className: n.autofillLoadingState,
|
15
|
+
children: [/* @__PURE__ */ e(r, {
|
14
16
|
"aria-label": t.formatMessage(a.loadingAriaLabel),
|
15
17
|
"aria-live": "polite",
|
16
|
-
className:
|
18
|
+
className: n.loadingIcon,
|
17
19
|
size: "large",
|
18
20
|
variant: "default"
|
19
|
-
}), /* @__PURE__ */
|
21
|
+
}), /* @__PURE__ */ e(i, {
|
20
22
|
as: "p",
|
21
|
-
variant: "
|
22
|
-
children:
|
23
|
+
variant: "subtitle",
|
24
|
+
children: s
|
25
|
+
}), o && /* @__PURE__ */ e(i, {
|
26
|
+
as: "p",
|
27
|
+
variant: "bodyDefault",
|
28
|
+
children: l
|
23
29
|
})]
|
24
30
|
});
|
25
31
|
};
|
26
32
|
export {
|
27
|
-
|
33
|
+
h as AutofillLoadingState
|
28
34
|
};
|
package/esm/lib/components/metadata-instance-editor/subcomponents/autofill-loading-state/messages.js
CHANGED
@@ -7,6 +7,14 @@ const e = a({
|
|
7
7
|
loadingAriaLabel: {
|
8
8
|
id: "metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel",
|
9
9
|
defaultMessage: "Loading"
|
10
|
+
},
|
11
|
+
longLoadingTitle: {
|
12
|
+
id: "metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle",
|
13
|
+
defaultMessage: "This is taking longer than usual"
|
14
|
+
},
|
15
|
+
longLoadingDescription: {
|
16
|
+
id: "metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription",
|
17
|
+
defaultMessage: "Still working on it!"
|
10
18
|
}
|
11
19
|
});
|
12
20
|
export {
|
@@ -1,106 +1,109 @@
|
|
1
|
-
import { Formik as
|
2
|
-
import { useState as
|
3
|
-
import { TEMPLATE_CUSTOM_PROPERTIES as
|
4
|
-
import { AutofillLoadingState as
|
5
|
-
import { useAutofill as
|
6
|
-
import { TemplateInstance as
|
7
|
-
import { MetadataEmptyState as
|
8
|
-
import { UnsavedChangesModal as
|
9
|
-
import { CustomInstance as
|
10
|
-
import { DeleteConfirmationModal as
|
11
|
-
import { c as
|
12
|
-
import { s as
|
13
|
-
import { jsx as r, jsxs as
|
14
|
-
const
|
1
|
+
import { Formik as j, Form as k } from "formik";
|
2
|
+
import { useState as d, useEffect as h, useRef as V, useMemo as _ } from "react";
|
3
|
+
import { TEMPLATE_CUSTOM_PROPERTIES as $ } from "../../../../constants.js";
|
4
|
+
import { AutofillLoadingState as w } from "../autofill-loading-state/autofill-loading-state.js";
|
5
|
+
import { useAutofill as J } from "../../../../utils/autofill-context.js";
|
6
|
+
import { TemplateInstance as q } from "../../../metadata-editor-fields/metadata-editor-fields.js";
|
7
|
+
import { MetadataEmptyState as z } from "../../../metadata-empty-state/metadata-empty-state.js";
|
8
|
+
import { UnsavedChangesModal as G } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
|
9
|
+
import { CustomInstance as H } from "../custom-instance/custom-instance.js";
|
10
|
+
import { DeleteConfirmationModal as Q } from "../delete-confirmation-modal/delete-confirmation-modal.js";
|
11
|
+
import { c as X } from "../../../../../../chunks/utils.js";
|
12
|
+
import { s as Y, M as Z } from "../../../../../../chunks/metadata-instance-form-card-wrapper.js";
|
13
|
+
import { jsx as r, jsxs as I } from "react/jsx-runtime";
|
14
|
+
const go = (C) => {
|
15
15
|
const {
|
16
|
-
areAiSuggestionsAvailable:
|
17
|
-
customRef:
|
16
|
+
areAiSuggestionsAvailable: M,
|
17
|
+
customRef: a,
|
18
18
|
isAiSuggestionsFeatureEnabled: n,
|
19
|
-
|
20
|
-
isDeleteButtonDisabled:
|
21
|
-
isUnsavedChangesModalOpen:
|
22
|
-
MetadataInstanceFormCustomWrapper:
|
19
|
+
isBetaLanguageEnabled: S,
|
20
|
+
isDeleteButtonDisabled: E,
|
21
|
+
isUnsavedChangesModalOpen: c = !1,
|
22
|
+
MetadataInstanceFormCustomWrapper: F,
|
23
23
|
selectedTemplateInstance: o,
|
24
|
-
onCancel:
|
25
|
-
onDelete:
|
26
|
-
onDiscardUnsavedChanges:
|
27
|
-
onSubmit:
|
24
|
+
onCancel: D,
|
25
|
+
onDelete: y,
|
26
|
+
onDiscardUnsavedChanges: b,
|
27
|
+
onSubmit: A,
|
28
28
|
setIsUnsavedChangesModalOpen: s,
|
29
29
|
taxonomyOptionsFetcher: e
|
30
|
-
} =
|
31
|
-
isFetchingSuggestions:
|
30
|
+
} = C, O = F ?? Z, [L, m] = d(!1), {
|
31
|
+
isFetchingSuggestions: i,
|
32
|
+
isLongLoading: u,
|
32
33
|
getAiSuggestions: v,
|
33
|
-
clearSuggestions:
|
34
|
+
clearSuggestions: f,
|
34
35
|
suggestions: x
|
35
|
-
} =
|
36
|
-
|
37
|
-
|
38
|
-
}, [
|
39
|
-
const
|
40
|
-
await
|
36
|
+
} = J();
|
37
|
+
h(() => () => {
|
38
|
+
f();
|
39
|
+
}, [f]);
|
40
|
+
const l = (o == null ? void 0 : o.templateKey) === $, P = async (t) => {
|
41
|
+
await A(t, X(t, o));
|
41
42
|
}, R = (t) => {
|
42
|
-
t ? s(!0) :
|
43
|
+
t ? s(!0) : D();
|
43
44
|
}, U = () => {
|
44
45
|
m(!0);
|
45
46
|
}, B = {
|
46
47
|
metadata: {
|
47
48
|
...o
|
48
49
|
}
|
49
|
-
},
|
50
|
-
|
51
|
-
|
52
|
-
}, [
|
53
|
-
const
|
54
|
-
if (
|
55
|
-
return /* @__PURE__ */ r(
|
50
|
+
}, g = V(null), [p, N] = d(null);
|
51
|
+
h(() => {
|
52
|
+
N(a ?? g.current);
|
53
|
+
}, [a, o == null ? void 0 : o.templateKey, o == null ? void 0 : o.scope]);
|
54
|
+
const K = _(() => {
|
55
|
+
if (i)
|
56
|
+
return /* @__PURE__ */ r(w, {
|
57
|
+
isLongLoading: u
|
58
|
+
});
|
56
59
|
const t = (o == null ? void 0 : o.fields.length) === 0;
|
57
|
-
return
|
58
|
-
isLoading:
|
59
|
-
}) : t ? /* @__PURE__ */ r(
|
60
|
+
return l ? /* @__PURE__ */ r(H, {
|
61
|
+
isLoading: i
|
62
|
+
}) : t ? /* @__PURE__ */ r(z, {
|
60
63
|
isBoxAiSuggestionsFeatureEnabled: n,
|
61
64
|
level: "instance"
|
62
|
-
}) : /* @__PURE__ */ r(
|
63
|
-
disableForm:
|
64
|
-
portalElement:
|
65
|
+
}) : /* @__PURE__ */ r(q, {
|
66
|
+
disableForm: i,
|
67
|
+
portalElement: a ?? p,
|
65
68
|
taxonomyOptionsFetcher: e
|
66
69
|
});
|
67
|
-
}, [o == null ? void 0 : o.fields.length,
|
68
|
-
return /* @__PURE__ */ r(
|
70
|
+
}, [o == null ? void 0 : o.fields.length, l, i, u, a, p, e, n]);
|
71
|
+
return /* @__PURE__ */ r(j, {
|
69
72
|
initialValues: B,
|
70
73
|
onSubmit: P,
|
71
74
|
children: ({
|
72
75
|
values: t,
|
73
|
-
dirty:
|
74
|
-
}) => /* @__PURE__ */
|
75
|
-
children: [/* @__PURE__ */ r(
|
76
|
-
areAiSuggestionsAvailable:
|
77
|
-
className:
|
78
|
-
formRef:
|
76
|
+
dirty: W
|
77
|
+
}) => /* @__PURE__ */ I(k, {
|
78
|
+
children: [/* @__PURE__ */ r(O, {
|
79
|
+
areAiSuggestionsAvailable: M,
|
80
|
+
className: Y.metadataInstanceForm,
|
81
|
+
formRef: g,
|
79
82
|
formValues: t,
|
80
83
|
getAiSuggestions: v,
|
81
84
|
handleCancel: R,
|
82
85
|
handleDelete: U,
|
83
|
-
iaBetaLanguageEnabled: M,
|
84
86
|
isAiSuggestionsFeatureEnabled: n,
|
85
|
-
|
86
|
-
|
87
|
-
|
87
|
+
isBetaLanguageEnabled: S,
|
88
|
+
isDeleteButtonDisabled: E,
|
89
|
+
isFetchingSuggestions: i,
|
90
|
+
isFormDirty: W,
|
88
91
|
selectedTemplateInstance: o,
|
89
92
|
suggestions: x,
|
90
|
-
children: o &&
|
91
|
-
}), /* @__PURE__ */ r(
|
93
|
+
children: o && K
|
94
|
+
}), /* @__PURE__ */ r(G, {
|
92
95
|
onBackToEdit: () => s(!1),
|
93
|
-
onDiscardChanges:
|
94
|
-
open:
|
95
|
-
}), /* @__PURE__ */ r(
|
96
|
-
onConfirm: () =>
|
96
|
+
onDiscardChanges: b,
|
97
|
+
open: c
|
98
|
+
}), /* @__PURE__ */ r(Q, {
|
99
|
+
onConfirm: () => y(o),
|
97
100
|
onDismiss: () => m(!1),
|
98
|
-
open:
|
101
|
+
open: L,
|
99
102
|
templateName: o == null ? void 0 : o.displayName
|
100
103
|
})]
|
101
104
|
})
|
102
105
|
}, `${o == null ? void 0 : o.scope}.${o == null ? void 0 : o.templateKey}`);
|
103
106
|
};
|
104
107
|
export {
|
105
|
-
|
108
|
+
go as MetadataInstanceForm
|
106
109
|
};
|
@@ -1,65 +1,63 @@
|
|
1
|
-
import { LoadingIndicator as v, IconButton as
|
1
|
+
import { LoadingIndicator as v, IconButton as k, Tooltip as x, Button as K } from "@box/blueprint-web";
|
2
2
|
import { BoxAiLogo as p } from "@box/blueprint-web-assets/icons/Logo";
|
3
|
-
import { useFormikContext as
|
3
|
+
import { useFormikContext as L, getIn as i } from "formik";
|
4
4
|
import { useEffect as h } from "react";
|
5
5
|
import { u as C } from "../../../../../../chunks/index.js";
|
6
6
|
import { useAutofill as F } from "../../../../utils/autofill-context.js";
|
7
|
-
import
|
7
|
+
import n from "./messages.js";
|
8
8
|
import { jsx as l } from "react/jsx-runtime";
|
9
9
|
import '../../../../../../styles/metadata-instance-form-autofill-button.css';const T = "_loadingIndicator_1vv9u_1", _ = {
|
10
10
|
loadingIndicator: T
|
11
11
|
}, w = ({
|
12
12
|
areAiSuggestionsAvailable: B,
|
13
|
-
|
14
|
-
isLoading:
|
15
|
-
variant:
|
16
|
-
onAutofill:
|
13
|
+
isBetaLanguageEnabled: b,
|
14
|
+
isLoading: c,
|
15
|
+
variant: I = "secondary-button",
|
16
|
+
onAutofill: y
|
17
17
|
}) => {
|
18
18
|
const {
|
19
|
-
isSubmitting:
|
19
|
+
isSubmitting: A,
|
20
20
|
values: e,
|
21
|
-
setFieldValue:
|
22
|
-
} =
|
23
|
-
suggestions:
|
21
|
+
setFieldValue: u
|
22
|
+
} = L(), t = C(), {
|
23
|
+
suggestions: o
|
24
24
|
} = F();
|
25
25
|
h(() => {
|
26
|
-
if (
|
27
|
-
const
|
28
|
-
|
26
|
+
if (o) {
|
27
|
+
const a = i(e, "metadata.fields"), r = i(e, "metadata.templateKey");
|
28
|
+
u("metadata.fields", a == null ? void 0 : a.map((s) => {
|
29
29
|
var g;
|
30
|
-
const f = (g =
|
30
|
+
const f = (g = o == null ? void 0 : o[r]) == null ? void 0 : g[s.key];
|
31
31
|
return f ? {
|
32
|
-
...
|
32
|
+
...s,
|
33
33
|
aiSuggestion: f
|
34
|
-
} :
|
34
|
+
} : s;
|
35
35
|
}));
|
36
36
|
}
|
37
|
-
}, [
|
37
|
+
}, [o, u]);
|
38
38
|
const m = () => {
|
39
|
-
const
|
40
|
-
|
41
|
-
}, d = !B ||
|
42
|
-
"aria-label": t.formatMessage(
|
39
|
+
const a = i(e, "metadata.templateKey"), r = i(e, "metadata.scope");
|
40
|
+
y(a, r);
|
41
|
+
}, d = !B || A || c, M = c ? /* @__PURE__ */ l(v, {
|
42
|
+
"aria-label": t.formatMessage(n.loadingButtonAriaLabel),
|
43
43
|
className: _.loadingIndicator
|
44
|
-
}) : /* @__PURE__ */ l(
|
45
|
-
"aria-label": t.formatMessage(
|
44
|
+
}) : /* @__PURE__ */ l(k, {
|
45
|
+
"aria-label": t.formatMessage(n.autofillButtonAriaLabel),
|
46
46
|
disabled: d,
|
47
47
|
icon: p,
|
48
48
|
onClick: m,
|
49
49
|
variant: "icon-logo",
|
50
50
|
"data-target-id": "IconButton-autofillButtonAriaLabel"
|
51
51
|
});
|
52
|
-
return /* @__PURE__ */ l(
|
53
|
-
content: b ? t.formatMessage(
|
54
|
-
children:
|
52
|
+
return /* @__PURE__ */ l(x, {
|
53
|
+
content: b ? t.formatMessage(n.autofillButtonTooltip) : t.formatMessage(n.autofillButtonTooltipGA),
|
54
|
+
children: I === "secondary-button" ? /* @__PURE__ */ l(K, {
|
55
55
|
disabled: d,
|
56
56
|
icon: p,
|
57
|
-
loading: r,
|
58
|
-
loadingAriaLabel: t.formatMessage(o.loadingButtonAriaLabel),
|
59
57
|
onClick: m,
|
60
58
|
variant: "secondary",
|
61
59
|
"data-target-id": "Button-autofillButton",
|
62
|
-
children: t.formatMessage(
|
60
|
+
children: t.formatMessage(n.autofillButton)
|
63
61
|
}) : M
|
64
62
|
});
|
65
63
|
};
|
@@ -11,7 +11,7 @@ import '../../../../../../styles/metadata-instance-form-header.css';const F = "_
|
|
11
11
|
areAiSuggestionsAvailable: r,
|
12
12
|
hasSuggestions: m,
|
13
13
|
isAiSuggestionsFeatureEnabled: c,
|
14
|
-
|
14
|
+
isBetaLanguageEnabled: n,
|
15
15
|
isLoading: l,
|
16
16
|
templateName: d,
|
17
17
|
onAutofill: f
|
@@ -25,7 +25,7 @@ import '../../../../../../styles/metadata-instance-form-header.css';const F = "_
|
|
25
25
|
title: I
|
26
26
|
}), c ? /* @__PURE__ */ o(H, {
|
27
27
|
areAiSuggestionsAvailable: r,
|
28
|
-
|
28
|
+
isBetaLanguageEnabled: n,
|
29
29
|
isLoading: l,
|
30
30
|
onAutofill: f
|
31
31
|
}) : null]
|
@@ -1,24 +1,26 @@
|
|
1
|
-
import { MetadataInstance as
|
2
|
-
import { getVisibleTemplates as
|
1
|
+
import { MetadataInstance as d } from "./subcomponents/metadata-instance/metadata-instance.js";
|
2
|
+
import { getVisibleTemplates as o } from "../../utils/utils.js";
|
3
3
|
import { jsx as a } from "react/jsx-runtime";
|
4
|
-
import '../../../../styles/metadata-instance-list.css';const
|
5
|
-
metadataInstanceList:
|
6
|
-
},
|
4
|
+
import '../../../../styles/metadata-instance-list.css';const r = "_metadataInstanceList_bd83w_1", p = {
|
5
|
+
metadataInstanceList: r
|
6
|
+
}, f = ({
|
7
7
|
areAiSuggestionsAvailable: s,
|
8
8
|
isAiSuggestionsFeatureEnabled: e,
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
isBetaLanguageEnabled: n,
|
10
|
+
onEdit: i,
|
11
|
+
templateInstances: m,
|
12
|
+
taxonomyNodeFetcher: c
|
12
13
|
}) => /* @__PURE__ */ a("div", {
|
13
|
-
className:
|
14
|
-
children:
|
14
|
+
className: p.metadataInstanceList,
|
15
|
+
children: o(m).map((t) => /* @__PURE__ */ a(d, {
|
15
16
|
areAiSuggestionsAvailable: s,
|
16
17
|
isAiSuggestionsFeatureEnabled: e,
|
17
|
-
|
18
|
-
|
18
|
+
isBetaLanguageEnabled: n,
|
19
|
+
onEdit: i,
|
20
|
+
taxonomyNodeFetcher: c,
|
19
21
|
templateInstance: t
|
20
22
|
}, t.id))
|
21
23
|
});
|
22
24
|
export {
|
23
|
-
|
25
|
+
f as MetadataInstanceList
|
24
26
|
};
|
@@ -1,59 +1,60 @@
|
|
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
|
8
|
-
import { jsxs as
|
9
|
-
import '../../../../../../styles/metadata-instance.css';const
|
10
|
-
topDivider:
|
11
|
-
bottomDivider:
|
12
|
-
},
|
1
|
+
import { Card as D, Divider as u } from "@box/blueprint-web";
|
2
|
+
import { useState as S } from "react";
|
3
|
+
import { useAutofill as b } from "../../../../utils/autofill-context.js";
|
4
|
+
import { MetadataEmptyState as g } from "../../../metadata-empty-state/metadata-empty-state.js";
|
5
|
+
import { MetadataInstanceContent as H } from "../metadata-instance-content/metadata-instance-content.js";
|
6
|
+
import { MetadataInstanceFooter as _ } from "../metadata-instance-footer/metadata-instance-footer.js";
|
7
|
+
import { MetadataInstanceHeader as M } from "../metadata-instance-header/metadata-instance-header.js";
|
8
|
+
import { jsxs as a, jsx as t, Fragment as n } from "react/jsx-runtime";
|
9
|
+
import '../../../../../../styles/metadata-instance.css';const N = "_topDivider_tzhlb_1", x = "_bottomDivider_tzhlb_5", y = {
|
10
|
+
topDivider: N,
|
11
|
+
bottomDivider: x
|
12
|
+
}, k = ({
|
13
13
|
areAiSuggestionsAvailable: p,
|
14
14
|
isAiSuggestionsFeatureEnabled: d,
|
15
|
+
isBetaLanguageEnabled: c,
|
15
16
|
onEdit: l,
|
16
17
|
templateInstance: o,
|
17
|
-
taxonomyNodeFetcher:
|
18
|
+
taxonomyNodeFetcher: h
|
18
19
|
}) => {
|
19
|
-
const
|
20
|
-
getAiSuggestions:
|
21
|
-
} =
|
22
|
-
l(o),
|
20
|
+
const i = o.fields, m = (s) => !s.value || Array.isArray(s.value) && s.value.length === 0, v = i.every(m), E = i.some(m), f = i.length > 0, [e, r] = S(!0), {
|
21
|
+
getAiSuggestions: V
|
22
|
+
} = b(), A = () => {
|
23
|
+
l(o), V(o.templateKey, o.scope);
|
23
24
|
};
|
24
|
-
return /* @__PURE__ */
|
25
|
-
children: [/* @__PURE__ */ t(
|
25
|
+
return /* @__PURE__ */ a(D, {
|
26
|
+
children: [/* @__PURE__ */ t(M, {
|
26
27
|
areAiSuggestionsAvailable: p,
|
27
28
|
canEdit: o.canEdit,
|
28
|
-
iaBetaLanguageEnabled: !1,
|
29
29
|
isAiSuggestionsFeatureEnabled: d,
|
30
|
-
|
30
|
+
isBetaLanguageEnabled: c,
|
31
|
+
onAutofill: A,
|
31
32
|
onEdit: () => l(o),
|
32
33
|
templateName: o == null ? void 0 : o.displayName
|
33
34
|
}), /* @__PURE__ */ t(u, {
|
34
35
|
className: y.topDivider
|
35
|
-
}),
|
36
|
-
isAnyEmptyValueHidden:
|
36
|
+
}), e && v ? /* @__PURE__ */ t(g, {
|
37
|
+
isAnyEmptyValueHidden: f,
|
37
38
|
isBoxAiSuggestionsFeatureEnabled: d,
|
38
39
|
level: "instance",
|
39
|
-
onShowEmptyValues: () =>
|
40
|
-
}) : /* @__PURE__ */
|
41
|
-
children: [/* @__PURE__ */ t(
|
42
|
-
shouldHideEmptyValues:
|
43
|
-
taxonomyNodeFetcher:
|
40
|
+
onShowEmptyValues: () => r(!1)
|
41
|
+
}) : /* @__PURE__ */ a(n, {
|
42
|
+
children: [/* @__PURE__ */ t(H, {
|
43
|
+
shouldHideEmptyValues: e,
|
44
|
+
taxonomyNodeFetcher: h,
|
44
45
|
templateInstance: o
|
45
|
-
}),
|
46
|
+
}), E && /* @__PURE__ */ a(n, {
|
46
47
|
children: [/* @__PURE__ */ t(u, {
|
47
48
|
className: y.bottomDivider
|
48
|
-
}), /* @__PURE__ */ t(
|
49
|
-
isAnyEmptyValueHidden:
|
50
|
-
onHideEmptyValues: () =>
|
51
|
-
onShowEmptyValues: () =>
|
49
|
+
}), /* @__PURE__ */ t(_, {
|
50
|
+
isAnyEmptyValueHidden: e,
|
51
|
+
onHideEmptyValues: () => r(!0),
|
52
|
+
onShowEmptyValues: () => r(!1)
|
52
53
|
})]
|
53
54
|
})]
|
54
55
|
})]
|
55
56
|
});
|
56
57
|
};
|
57
58
|
export {
|
58
|
-
|
59
|
+
k as MetadataInstance
|
59
60
|
};
|
@@ -13,7 +13,7 @@ import '../../../../../../styles/metadata-instance-header.css';const b = "_metad
|
|
13
13
|
areAiSuggestionsAvailable: c,
|
14
14
|
canEdit: l,
|
15
15
|
isAiSuggestionsFeatureEnabled: d,
|
16
|
-
|
16
|
+
isBetaLanguageEnabled: m,
|
17
17
|
onEdit: u,
|
18
18
|
onAutofill: f,
|
19
19
|
templateName: n
|
@@ -1,51 +1,59 @@
|
|
1
|
-
import { createContext as
|
2
|
-
import { TEMPLATE_CUSTOM_PROPERTIES as
|
1
|
+
import T, { createContext as v, useState as u, useCallback as w, useMemo as x, useContext as A } from "react";
|
2
|
+
import { TEMPLATE_CUSTOM_PROPERTIES as E } from "../constants.js";
|
3
3
|
import { jsx as P } from "react/jsx-runtime";
|
4
|
-
const
|
5
|
-
children:
|
4
|
+
const C = /* @__PURE__ */ v(null), M = ({
|
5
|
+
children: e,
|
6
6
|
isAiSuggestionsFeatureEnabled: o,
|
7
|
-
fetchSuggestions:
|
7
|
+
fetchSuggestions: l
|
8
8
|
}) => {
|
9
|
-
const [
|
10
|
-
|
9
|
+
const [s, a] = u({}), [r, c] = u(!1), [f, g] = u(!1);
|
10
|
+
T.useEffect(() => {
|
11
|
+
let t;
|
12
|
+
return r ? t = setTimeout(() => {
|
13
|
+
g(!0);
|
14
|
+
}, 3e4) : (g(!1), clearTimeout(t)), () => clearTimeout(t);
|
15
|
+
}, [r]);
|
16
|
+
const m = w(async (t, S) => {
|
17
|
+
let n = [];
|
11
18
|
if (!o)
|
12
19
|
throw new Error("AI Suggestions feature not available.");
|
13
|
-
if (
|
20
|
+
if (t === E)
|
14
21
|
throw new Error("Can't fetch suggestions for Custom Metadata instance");
|
15
22
|
c(!0);
|
16
23
|
try {
|
17
|
-
|
18
|
-
...
|
19
|
-
[
|
20
|
-
...Object.fromEntries(
|
24
|
+
n = await l(t, S), a({
|
25
|
+
...s,
|
26
|
+
[t]: {
|
27
|
+
...Object.fromEntries(n.map((i) => [i.key, i.aiSuggestion]))
|
21
28
|
}
|
22
29
|
});
|
23
30
|
} catch {
|
24
31
|
} finally {
|
25
32
|
c(!1);
|
26
33
|
}
|
27
|
-
return
|
28
|
-
}, [o,
|
29
|
-
|
30
|
-
}, []),
|
31
|
-
clearSuggestions:
|
32
|
-
getAiSuggestions:
|
34
|
+
return n;
|
35
|
+
}, [o, s, l]), h = w(() => {
|
36
|
+
a({});
|
37
|
+
}, []), d = x(() => ({
|
38
|
+
clearSuggestions: h,
|
39
|
+
getAiSuggestions: m,
|
33
40
|
isAiSuggestionsFeatureEnabled: o,
|
34
|
-
isFetchingSuggestions:
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
41
|
+
isFetchingSuggestions: r,
|
42
|
+
isLongLoading: f,
|
43
|
+
suggestions: s
|
44
|
+
}), [h, m, o, r, f, s]);
|
45
|
+
return /* @__PURE__ */ P(C.Provider, {
|
46
|
+
value: d,
|
47
|
+
children: e
|
40
48
|
});
|
41
|
-
},
|
42
|
-
const
|
43
|
-
if (!
|
49
|
+
}, _ = () => {
|
50
|
+
const e = A(C);
|
51
|
+
if (!e)
|
44
52
|
throw new Error("useAutofill should be wrapped inside AutofillProvider");
|
45
|
-
return
|
53
|
+
return e;
|
46
54
|
};
|
47
55
|
export {
|
48
|
-
|
56
|
+
C as AutofillContext,
|
49
57
|
M as AutofillContextProvider,
|
50
|
-
|
58
|
+
_ as useAutofill
|
51
59
|
};
|
package/i18n/bn-IN.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "যেমন, 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ মান যোগ করুন",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "{fieldName} অ্যাট্রিবিউট মুছুন",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "মান সেট করুন",
|
package/i18n/da-DK.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "f.eks. 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Tilføj attribut",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Slet attributten {fieldName}",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Indstil værdi",
|
package/i18n/de-DE.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "z. B. 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Attribut hinzufügen",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "{fieldName}-Attribut löschen",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Wert festlegen",
|
package/i18n/en-AU.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "e.g. 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Add Attribute",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Delete {fieldName} attribute",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Set value",
|
package/i18n/en-CA.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "e.g. 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Add Attribute",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Delete {fieldName} attribute",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Set value",
|
package/i18n/en-GB.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "e.g. 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Add Attribute",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Delete {fieldName} attribute",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Set value",
|
package/i18n/en-US.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "e.g. 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Add Attribute",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Delete {fieldName} attribute",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Set value",
|
package/i18n/en-US.properties
CHANGED
@@ -164,6 +164,10 @@ metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder = e.g. 42
|
|
164
164
|
metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage = Extracting Metadata
|
165
165
|
# Aria label for loading spinner
|
166
166
|
metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel = Loading
|
167
|
+
# Description for long loading state while fetching AI suggestions
|
168
|
+
metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription = Still working on it!
|
169
|
+
# Title for long loading state while fetching AI suggestions
|
170
|
+
metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle = This is taking longer than usual
|
167
171
|
# Button that allow to add new attribute to metadata custom instance
|
168
172
|
metadataEditor.metadataInstanceEditor.customInstance.addAttribute = + Add Attribute
|
169
173
|
# Aria label for button that allow to remove attribute from metadata custom instance
|
package/i18n/en-x-pseudo.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "⟦萬萬 ê.ĝ. 42 國國⟧",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "⟦萬萬萬萬 + Āďď Αţŧгіьùτę 國國國國⟧",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "⟦萬萬萬萬萬萬 Ðέľėťē {fieldName} åττŕϊьűτε 國國國國國國⟧",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "⟦萬萬 Śēŧ νâľűё 國國⟧",
|
package/i18n/es-419.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "Por ejemplo, 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Agregar atributo",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Eliminar el atributo {fieldName}",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Establecer el valor",
|
package/i18n/es-ES.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "Por ejemplo, 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Agregar atributo",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Eliminar el atributo {fieldName}",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Establecer el valor",
|
package/i18n/fi-FI.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "esim. 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Lisää attribuutti",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Poista määrite {fieldName}",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Aseta arvo",
|
package/i18n/fr-CA.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "par exemple 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Ajouter un attribut",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Supprimer l'attribut {fieldName}",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Définir la valeur",
|
package/i18n/fr-FR.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "par exemple 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Ajouter un attribut",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Supprimer l'attribut {fieldName}",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Définir la valeur",
|
package/i18n/hi-IN.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "जैसे 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "अधिक एट्रिब्यूट जोड़ें",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "{fieldName} एट्रीब्यूट को हटाएँ",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "वैल्यू सेट करें",
|
package/i18n/it-IT.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "es. 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Aggiungi attributo",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Elimina attributo {fieldName}",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Imposta valore",
|
package/i18n/ja-JP.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "例: 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ 属性の追加",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "{fieldName}属性を削除",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "値を設定",
|
@@ -1 +1 @@
|
|
1
|
-
[{"id":"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage","description":"Loading message when autofill metadata extraction endpoint is called","defaultMessage":"Extracting Metadata"},{"id":"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel","description":"Aria label for loading spinner","defaultMessage":"Loading"}]
|
1
|
+
[{"id":"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage","description":"Loading message when autofill metadata extraction endpoint is called","defaultMessage":"Extracting Metadata"},{"id":"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel","description":"Aria label for loading spinner","defaultMessage":"Loading"},{"id":"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle","description":"Title for long loading state while fetching AI suggestions","defaultMessage":"This is taking longer than usual"},{"id":"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription","description":"Description for long loading state while fetching AI suggestions","defaultMessage":"Still working on it!"}]
|
package/i18n/ko-KR.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "예: 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ 속성 추가",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "{fieldName} 속성 삭제",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "값 설정",
|
package/i18n/nb-NO.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "f.eks. 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "Legg til attributt",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Slett {fieldName} attributt",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Angi verdi",
|
package/i18n/nl-NL.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "bijv. 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Kenmerk toevoegen",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Kenmerk {fieldName} verwijderen",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Waarde instellen",
|
package/i18n/pl-PL.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "np. 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Dodaj atrybut",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Usuń atrybut {fieldName}",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Ustaw wartość",
|
package/i18n/pt-BR.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "por exemplo, 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Adicionar atributo",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Excluir atributo de {fieldName}",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Definir valor",
|
package/i18n/ru-RU.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "например, 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "Добавить атрибут",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Удалить атрибут {fieldName}",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Установить значение",
|
package/i18n/sv-SE.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "t.ex. 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Lägg till attribut",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "Radera {fieldName} attribut",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Ställ in värde",
|
package/i18n/tr-TR.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "örn. 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ Öznitelik Ekle",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "{fieldName} özniteliğini sil",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "Değeri ayarla",
|
package/i18n/zh-CN.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "例如 42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ 添加属性",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "删除 {fieldName} 属性",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "设置值",
|
package/i18n/zh-TW.js
CHANGED
@@ -82,6 +82,8 @@ export default {
|
|
82
82
|
"metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder": "例如,42",
|
83
83
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.defaultLoadingMessage": "Extracting Metadata",
|
84
84
|
"metadataEditor.metadataInstanceEditor.autofillLoadingState.loadingAriaLabel": "Loading",
|
85
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingDescription": "Still working on it!",
|
86
|
+
"metadataEditor.metadataInstanceEditor.autofillLoadingState.longLoadingTitle": "This is taking longer than usual",
|
85
87
|
"metadataEditor.metadataInstanceEditor.customInstance.addAttribute": "+ 新增屬性",
|
86
88
|
"metadataEditor.metadataInstanceEditor.customInstance.removeAttribute": "刪除 {fieldName} 屬性",
|
87
89
|
"metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder": "設定值",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@box/metadata-editor",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.89.0",
|
4
4
|
"peerDependencies": {
|
5
5
|
"@ariakit/react": "0.4.15",
|
6
6
|
"@box/blueprint-web": "^7.30.3",
|
@@ -53,5 +53,5 @@
|
|
53
53
|
"**/*.css"
|
54
54
|
],
|
55
55
|
"license": "SEE LICENSE IN LICENSE",
|
56
|
-
"gitHead": "
|
56
|
+
"gitHead": "73bd618b9f774f317b466bef57062ff424c90c50"
|
57
57
|
}
|
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._autofillLoadingState_hoso1_1{height:320px;display:flex;align-items:center;flex-direction:column}._loadingIcon_hoso1_8{margin-top:96px;display:block;position:relative;margin-bottom:var(--space-4)}._testContainerStyle_hoso1_15{border:1px solid #000}
|
@@ -1 +1,4 @@
|
|
1
|
-
export
|
1
|
+
export type AutofillLoadingStateProps = {
|
2
|
+
isLongLoading: boolean;
|
3
|
+
};
|
4
|
+
export declare const AutofillLoadingState: ({ isLongLoading }: AutofillLoadingStateProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -9,5 +9,15 @@ declare const messages: {
|
|
9
9
|
description: string;
|
10
10
|
id: string;
|
11
11
|
};
|
12
|
+
longLoadingTitle: {
|
13
|
+
defaultMessage: string;
|
14
|
+
description: string;
|
15
|
+
id: string;
|
16
|
+
};
|
17
|
+
longLoadingDescription: {
|
18
|
+
defaultMessage: string;
|
19
|
+
description: string;
|
20
|
+
id: string;
|
21
|
+
};
|
12
22
|
};
|
13
23
|
export default messages;
|
@@ -4,7 +4,7 @@ import { FormValues } from '../../types';
|
|
4
4
|
export type MetadataInstanceFormProps = {
|
5
5
|
areAiSuggestionsAvailable: boolean;
|
6
6
|
isAiSuggestionsFeatureEnabled: boolean;
|
7
|
-
|
7
|
+
isBetaLanguageEnabled: boolean;
|
8
8
|
isDeleteButtonDisabled: boolean;
|
9
9
|
isUnsavedChangesModalOpen: boolean;
|
10
10
|
selectedTemplateInstance: MetadataTemplateInstance | null;
|
@@ -23,7 +23,7 @@ export type MetadataInstanceFormWrapperProps<T> = {
|
|
23
23
|
children: React.ReactNode;
|
24
24
|
formValues: FormValues;
|
25
25
|
isAiSuggestionsFeatureEnabled: boolean;
|
26
|
-
|
26
|
+
isBetaLanguageEnabled: boolean;
|
27
27
|
isDeleteButtonDisabled: boolean;
|
28
28
|
isFetchingSuggestions: boolean;
|
29
29
|
isFormDirty: boolean;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { MetadataInstanceFormAutofillButtonProps } from './types';
|
2
|
-
export declare const MetadataInstanceFormAutofillButton: ({ areAiSuggestionsAvailable,
|
2
|
+
export declare const MetadataInstanceFormAutofillButton: ({ areAiSuggestionsAvailable, isBetaLanguageEnabled, isLoading, variant, onAutofill, }: MetadataInstanceFormAutofillButtonProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { MetadataTemplateField, MetadataTemplateInstance } from '../../../../types';
|
2
2
|
export type MetadataInstanceFormAutofillButtonProps = {
|
3
3
|
areAiSuggestionsAvailable: boolean;
|
4
|
-
|
4
|
+
isBetaLanguageEnabled: boolean;
|
5
5
|
isLoading: boolean;
|
6
6
|
onAutofill?: (templateKey: MetadataTemplateInstance['templateKey'], scope: MetadataTemplateInstance['scope']) => Promise<MetadataTemplateField[]>;
|
7
7
|
variant?: 'secondary-button' | 'icon-button';
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { MetadataInstanceFormHeaderProps } from './types';
|
2
|
-
export declare const MetadataInstanceFormHeader: ({ areAiSuggestionsAvailable, hasSuggestions, isAiSuggestionsFeatureEnabled,
|
2
|
+
export declare const MetadataInstanceFormHeader: ({ areAiSuggestionsAvailable, hasSuggestions, isAiSuggestionsFeatureEnabled, isBetaLanguageEnabled, isLoading, templateName, onAutofill, }: MetadataInstanceFormHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -3,7 +3,7 @@ export type MetadataInstanceFormHeaderProps = {
|
|
3
3
|
areAiSuggestionsAvailable: boolean;
|
4
4
|
hasSuggestions: boolean;
|
5
5
|
isAiSuggestionsFeatureEnabled: boolean;
|
6
|
-
|
6
|
+
isBetaLanguageEnabled: boolean;
|
7
7
|
isLoading: boolean;
|
8
8
|
onAutofill?: (templateKey: MetadataTemplateInstance['templateKey'], scope: MetadataTemplateInstance['scope']) => Promise<MetadataTemplateField[]>;
|
9
9
|
templateName?: string;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { MetadataInstanceListProps } from './types';
|
2
|
-
export declare const MetadataInstanceList: ({ areAiSuggestionsAvailable, isAiSuggestionsFeatureEnabled, onEdit, templateInstances, taxonomyNodeFetcher, }: MetadataInstanceListProps) => import("react/jsx-runtime").JSX.Element;
|
2
|
+
export declare const MetadataInstanceList: ({ areAiSuggestionsAvailable, isAiSuggestionsFeatureEnabled, isBetaLanguageEnabled, onEdit, templateInstances, taxonomyNodeFetcher, }: MetadataInstanceListProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { MetadataInstanceProps } from './types';
|
2
|
-
export declare const MetadataInstance: ({ areAiSuggestionsAvailable, isAiSuggestionsFeatureEnabled, onEdit, templateInstance, taxonomyNodeFetcher, }: MetadataInstanceProps) => import("react/jsx-runtime").JSX.Element;
|
2
|
+
export declare const MetadataInstance: ({ areAiSuggestionsAvailable, isAiSuggestionsFeatureEnabled, isBetaLanguageEnabled, onEdit, templateInstance, taxonomyNodeFetcher, }: MetadataInstanceProps) => import("react/jsx-runtime").JSX.Element;
|
package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/types.d.ts
CHANGED
@@ -3,6 +3,7 @@ import { TaxonomyNodeFetcher } from '../metadata-instance-entry/types';
|
|
3
3
|
export type MetadataInstanceProps = {
|
4
4
|
areAiSuggestionsAvailable: boolean;
|
5
5
|
isAiSuggestionsFeatureEnabled: boolean;
|
6
|
+
isBetaLanguageEnabled: boolean;
|
6
7
|
onEdit: (templateInstance: MetadataTemplateInstance) => void;
|
7
8
|
templateInstance: MetadataTemplateInstance;
|
8
9
|
taxonomyNodeFetcher: TaxonomyNodeFetcher;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { MetadataInstanceHeaderProps } from './types';
|
2
|
-
export declare const MetadataInstanceHeader: ({ areAiSuggestionsAvailable, canEdit, isAiSuggestionsFeatureEnabled,
|
2
|
+
export declare const MetadataInstanceHeader: ({ areAiSuggestionsAvailable, canEdit, isAiSuggestionsFeatureEnabled, isBetaLanguageEnabled, onEdit, onAutofill, templateName, }: MetadataInstanceHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -2,7 +2,7 @@ export type MetadataInstanceHeaderProps = {
|
|
2
2
|
areAiSuggestionsAvailable: boolean;
|
3
3
|
canEdit: boolean;
|
4
4
|
isAiSuggestionsFeatureEnabled: boolean;
|
5
|
-
|
5
|
+
isBetaLanguageEnabled: boolean;
|
6
6
|
onEdit: () => void;
|
7
7
|
onAutofill: () => void;
|
8
8
|
templateName?: string;
|
@@ -3,6 +3,7 @@ import { TaxonomyNodeFetcher } from './subcomponents/metadata-instance-entry/typ
|
|
3
3
|
export type MetadataInstanceListProps = {
|
4
4
|
areAiSuggestionsAvailable: boolean;
|
5
5
|
isAiSuggestionsFeatureEnabled: boolean;
|
6
|
+
isBetaLanguageEnabled: boolean;
|
6
7
|
onEdit: (templateInstacne: MetadataTemplateInstance) => void;
|
7
8
|
templateInstances: MetadataTemplateInstance[];
|
8
9
|
taxonomyNodeFetcher: TaxonomyNodeFetcher;
|
@@ -3,8 +3,9 @@ import { AutofillSuggestions, MetadataTemplateField, MetadataTemplateInstance }
|
|
3
3
|
export interface AutofillContextType {
|
4
4
|
clearSuggestions: () => void;
|
5
5
|
getAiSuggestions: (templateKey: MetadataTemplateInstance['templateKey'], scope: MetadataTemplateInstance['scope']) => Promise<MetadataTemplateField[]>;
|
6
|
-
isFetchingSuggestions: boolean;
|
7
6
|
isAiSuggestionsFeatureEnabled: boolean;
|
7
|
+
isFetchingSuggestions: boolean;
|
8
|
+
isLongLoading: boolean;
|
8
9
|
suggestions: AutofillSuggestions;
|
9
10
|
}
|
10
11
|
export interface AutofillContextProviderProps {
|