@box/metadata-editor 1.15.4 → 1.16.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/filter-dropdown-menu.module.js +9 -12
- package/dist/chunks/metadata-instance-form-card-wrapper.js +32 -32
- package/dist/chunks/taxonomy-ancestor-status-pill.js +37 -38
- package/dist/chunks/types.js +3 -3
- package/dist/chunks/utils2.js +28 -30
- package/dist/esm/lib/components/combobox-with-api-pagination/combobox-with-api-pagination.js +93 -96
- package/dist/esm/lib/components/combobox-with-api-pagination/request.js +2 -2
- package/dist/esm/lib/components/combobox-with-api-pagination/use-async-list.js +3 -4
- package/dist/esm/lib/components/combobox-with-api-pagination/utils/use-controllable-state.js +21 -24
- package/dist/esm/lib/components/combobox-with-api-pagination/utils/use-intersection-observer.js +59 -61
- package/dist/esm/lib/components/filter-instances-dropdown/filter-instances-dropdown.js +39 -40
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-enum-field/metadata-enum-field.js +37 -37
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-float-field/use-float-validation.js +9 -9
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-multi-select-field/metadata-multi-select-field.js +35 -36
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/metadata-taxonomy-field.js +52 -52
- package/dist/esm/lib/components/metadata-editor-fields/metadata-editor-field-wrapper.js +22 -23
- package/dist/esm/lib/components/metadata-editor-fields/metadata-editor-fields.js +1 -2
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/autofill-overlay.js +31 -32
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance/custom-instance.js +22 -22
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +114 -114
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js +96 -98
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.js +29 -29
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.js +39 -40
- package/dist/esm/lib/constants.js +3 -3
- package/dist/i18n/en-x-pseudo.js +129 -129
- package/dist/i18n/en-x-pseudo.properties +129 -129
- package/dist/styles/autofill-overlay.css +1 -1
- package/dist/styles/filter-dropdown-menu.css +1 -1
- package/dist/styles/taxonomy-ancestor-status-pill.css +1 -1
- package/package.json +9 -9
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import { ComboboxWithApiTreeView as
|
|
2
|
-
import { useFormikContext as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import
|
|
1
|
+
import { ComboboxWithApiTreeView as W, ComboboxWithApiPagination as w } from "@box/combobox-with-api";
|
|
2
|
+
import { useFormikContext as A, getIn as K, Field as L } from "formik";
|
|
3
|
+
import { forwardRef as $, useCallback as j } from "react";
|
|
4
|
+
import { useIntl as D } from "react-intl";
|
|
5
|
+
import E from "../../../../messages.js";
|
|
6
6
|
import { g as y } from "../../../../../../chunks/utils2.js";
|
|
7
|
-
import { jsx as
|
|
8
|
-
const
|
|
9
|
-
description:
|
|
10
|
-
disableForm:
|
|
11
|
-
isAiSuggestionApplied:
|
|
12
|
-
fieldNamePrefix:
|
|
7
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
8
|
+
const J = /* @__PURE__ */ $(({
|
|
9
|
+
description: n,
|
|
10
|
+
disableForm: r,
|
|
11
|
+
isAiSuggestionApplied: i,
|
|
12
|
+
fieldNamePrefix: s,
|
|
13
13
|
label: a,
|
|
14
|
-
portalElement:
|
|
15
|
-
taxonomyOptionsFetcher:
|
|
14
|
+
portalElement: m,
|
|
15
|
+
taxonomyOptionsFetcher: d,
|
|
16
16
|
updateModePrefix: F,
|
|
17
|
-
className:
|
|
18
|
-
isMultilevelTaxonomyFieldEnabled:
|
|
17
|
+
className: u,
|
|
18
|
+
isMultilevelTaxonomyFieldEnabled: V
|
|
19
19
|
}, c) => {
|
|
20
|
-
const
|
|
21
|
-
setFieldValue:
|
|
20
|
+
const M = D(), h = `${F ?? s}.value`, {
|
|
21
|
+
setFieldValue: k,
|
|
22
22
|
values: p
|
|
23
|
-
} =
|
|
23
|
+
} = A(), {
|
|
24
24
|
metadata: {
|
|
25
25
|
templateKey: g,
|
|
26
|
-
scope:
|
|
26
|
+
scope: v
|
|
27
27
|
}
|
|
28
|
-
} = p,
|
|
29
|
-
key:
|
|
28
|
+
} = p, I = K(p, s), {
|
|
29
|
+
key: b,
|
|
30
30
|
optionsRules: {
|
|
31
|
-
multiSelect:
|
|
32
|
-
selectableLevels:
|
|
31
|
+
multiSelect: l,
|
|
32
|
+
selectableLevels: o
|
|
33
33
|
},
|
|
34
|
-
levels:
|
|
35
|
-
} =
|
|
36
|
-
|
|
34
|
+
levels: P
|
|
35
|
+
} = I, x = V && o?.some((e) => e > 1), f = j((e) => d(v, g, b, o?.[0], e), [b, v, o, d, g]), C = (e) => l || !e?.length ? M.formatMessage(E.taxonomyPlaceholder) : void 0, T = (e) => {
|
|
36
|
+
k(h, e);
|
|
37
37
|
};
|
|
38
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ t("div", {
|
|
39
39
|
"data-testid": `${a}-field`,
|
|
40
|
-
onKeyDown: (
|
|
40
|
+
onKeyDown: (e) => e.stopPropagation(),
|
|
41
41
|
role: "presentation",
|
|
42
|
-
children: /* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ t(L, {
|
|
43
43
|
name: h,
|
|
44
44
|
children: ({
|
|
45
|
-
field:
|
|
46
|
-
}) =>
|
|
45
|
+
field: e
|
|
46
|
+
}) => x ? /* @__PURE__ */ t(W, {
|
|
47
47
|
ref: c,
|
|
48
|
-
className:
|
|
49
|
-
closeOnSelection:
|
|
48
|
+
className: u,
|
|
49
|
+
closeOnSelection: x,
|
|
50
50
|
dataTargetId: "ComboboxWithApiTreeView-MetadataEditorTaxonomyField",
|
|
51
|
-
defaultFetcher:
|
|
52
|
-
disabled:
|
|
53
|
-
label: y(a,
|
|
54
|
-
levels:
|
|
55
|
-
multiselect:
|
|
51
|
+
defaultFetcher: f,
|
|
52
|
+
disabled: r,
|
|
53
|
+
label: y(a, n, i),
|
|
54
|
+
levels: P,
|
|
55
|
+
multiselect: l,
|
|
56
56
|
onValueChange: T,
|
|
57
|
-
placeholder:
|
|
58
|
-
portalElement:
|
|
59
|
-
selectableLevels:
|
|
60
|
-
value:
|
|
61
|
-
}) : /* @__PURE__ */
|
|
57
|
+
placeholder: C(e.value),
|
|
58
|
+
portalElement: m,
|
|
59
|
+
selectableLevels: o,
|
|
60
|
+
value: e.value
|
|
61
|
+
}) : /* @__PURE__ */ t(w, {
|
|
62
62
|
ref: c,
|
|
63
|
-
className:
|
|
63
|
+
className: u,
|
|
64
64
|
dataTargetId: "ComboboxWithApiPagination-MetadataEditorTaxonomyField",
|
|
65
|
-
defaultFetcher:
|
|
66
|
-
disabled:
|
|
67
|
-
label: y(a,
|
|
68
|
-
multiselect:
|
|
65
|
+
defaultFetcher: f,
|
|
66
|
+
disabled: r,
|
|
67
|
+
label: y(a, n, i),
|
|
68
|
+
multiselect: l,
|
|
69
69
|
onValueChange: T,
|
|
70
|
-
placeholder:
|
|
71
|
-
portalElement:
|
|
72
|
-
value:
|
|
70
|
+
placeholder: C(e.value),
|
|
71
|
+
portalElement: m,
|
|
72
|
+
value: e.value
|
|
73
73
|
})
|
|
74
74
|
})
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
export {
|
|
78
|
-
|
|
78
|
+
J as MetadataTaxonomyField
|
|
79
79
|
};
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useFormikContext as
|
|
3
|
-
import
|
|
4
|
-
import { forwardRef as
|
|
1
|
+
import $ from "clsx";
|
|
2
|
+
import { useFormikContext as C } from "formik";
|
|
3
|
+
import E from "lodash/isUndefined";
|
|
4
|
+
import { forwardRef as U, useCallback as S, useEffect as v, useMemo as j } from "react";
|
|
5
5
|
import { A as o } from "../../../../chunks/types.js";
|
|
6
|
-
import { UpdateModeFieldWrapper as
|
|
7
|
-
import { editorFieldTypes as
|
|
6
|
+
import { UpdateModeFieldWrapper as R } from "./components/update-mode-field-wrapper/update-mode-field-wrapper.js";
|
|
7
|
+
import { editorFieldTypes as T } from "./editor-field-types.js";
|
|
8
8
|
import { s as g } from "../../../../chunks/utils2.js";
|
|
9
|
-
import { jsx as l, jsxs as
|
|
10
|
-
import { AiSuggestionField as
|
|
11
|
-
const
|
|
9
|
+
import { jsx as l, jsxs as b } from "react/jsx-runtime";
|
|
10
|
+
import { AiSuggestionField as B } from "./components/ai-suggestion-field/ai-suggestion-field.js";
|
|
11
|
+
const Y = /* @__PURE__ */ U(({
|
|
12
12
|
disableForm: A,
|
|
13
13
|
portalElement: f,
|
|
14
14
|
field: e,
|
|
15
|
-
index:
|
|
15
|
+
index: I,
|
|
16
16
|
taxonomyOptionsFetcher: y,
|
|
17
17
|
isMultilevelTaxonomyFieldEnabled: h
|
|
18
18
|
}, x) => {
|
|
19
|
-
var v;
|
|
20
19
|
const {
|
|
21
20
|
setFieldValue: s
|
|
22
|
-
} =
|
|
21
|
+
} = C(), d = e.aiSuggestionState || o.Initial, a = d === o.Pending, F = d === o.Applied, M = d === o.Initial, u = T[e.type], {
|
|
23
22
|
aiSuggestion: t,
|
|
24
23
|
type: N,
|
|
25
24
|
value: c
|
|
26
|
-
} = e,
|
|
25
|
+
} = e, V = u && !e.hidden, W = !E(e.updateMode), i = `metadata.fields[${I}]`, k = e.type === "taxonomy" && e.optionsRules?.multiSelect, w = $({
|
|
27
26
|
[g.suggestionApplied]: F,
|
|
28
27
|
[g.hasSuggestion]: a,
|
|
29
28
|
[g.dateField]: N === "date"
|
|
@@ -34,16 +33,16 @@ const Z = /* @__PURE__ */ j(({
|
|
|
34
33
|
}, [i, s, n]), m = S(() => {
|
|
35
34
|
n(o.Initial), s(`${i}.aiSuggestion`, void 0);
|
|
36
35
|
}, [n, s, i]);
|
|
37
|
-
|
|
36
|
+
v(() => {
|
|
38
37
|
a && !c && r(t);
|
|
39
|
-
}, [t, a, r]),
|
|
38
|
+
}, [t, a, r]), v(() => {
|
|
40
39
|
M && t && n(o.Pending);
|
|
41
40
|
}, [M, t, n]);
|
|
42
|
-
const
|
|
43
|
-
return
|
|
41
|
+
const P = j(() => t && c === t, [a]);
|
|
42
|
+
return V ? W ? /* @__PURE__ */ l(R, {
|
|
44
43
|
fieldNamePrefix: i,
|
|
45
44
|
fieldType: e.type,
|
|
46
|
-
isTaxonomyMultiSelect:
|
|
45
|
+
isTaxonomyMultiSelect: k,
|
|
47
46
|
children: /* @__PURE__ */ l(u, {
|
|
48
47
|
ref: x,
|
|
49
48
|
description: e.description,
|
|
@@ -57,11 +56,11 @@ const Z = /* @__PURE__ */ j(({
|
|
|
57
56
|
portalElement: f,
|
|
58
57
|
taxonomyOptionsFetcher: y
|
|
59
58
|
})
|
|
60
|
-
}, e.key) : /* @__PURE__ */
|
|
59
|
+
}, e.key) : /* @__PURE__ */ b("div", {
|
|
61
60
|
className: g.fieldWrapper,
|
|
62
61
|
children: [/* @__PURE__ */ l(u, {
|
|
63
62
|
ref: x,
|
|
64
|
-
className:
|
|
63
|
+
className: w,
|
|
65
64
|
description: e.description,
|
|
66
65
|
disableForm: A,
|
|
67
66
|
fieldNamePrefix: i,
|
|
@@ -71,9 +70,9 @@ const Z = /* @__PURE__ */ j(({
|
|
|
71
70
|
onValueEdited: m,
|
|
72
71
|
portalElement: f,
|
|
73
72
|
taxonomyOptionsFetcher: y
|
|
74
|
-
}), a && /* @__PURE__ */ l(
|
|
73
|
+
}), a && /* @__PURE__ */ l(B, {
|
|
75
74
|
aiSuggestion: t,
|
|
76
|
-
isSameValue:
|
|
75
|
+
isSameValue: P,
|
|
77
76
|
onAiSuggestionAppend: () => {
|
|
78
77
|
const p = [...new Set([c, t].flat().filter(Boolean))];
|
|
79
78
|
r(p);
|
|
@@ -85,5 +84,5 @@ const Z = /* @__PURE__ */ j(({
|
|
|
85
84
|
}, e.key) : null;
|
|
86
85
|
});
|
|
87
86
|
export {
|
|
88
|
-
|
|
87
|
+
Y as MetadataEditorFieldWrapper
|
|
89
88
|
};
|
|
@@ -11,8 +11,7 @@ const C = (m) => {
|
|
|
11
11
|
values: i
|
|
12
12
|
} = d(), o = "metadata.fields", r = p(i, o), s = f(null), a = r.findIndex((e) => !e.hidden);
|
|
13
13
|
return l(() => {
|
|
14
|
-
|
|
15
|
-
a > -1 && ((e = s.current) == null || e.focus());
|
|
14
|
+
a > -1 && s.current?.focus();
|
|
16
15
|
}, []), r.length ? /* @__PURE__ */ t(u, {
|
|
17
16
|
name: o,
|
|
18
17
|
validateOnChange: !1,
|
|
@@ -1,65 +1,64 @@
|
|
|
1
|
-
import { LoadingIndicator as
|
|
2
|
-
import { AlertTriangle as
|
|
3
|
-
import {
|
|
1
|
+
import { LoadingIndicator as v, Text as m, TextButton as _ } from "@box/blueprint-web";
|
|
2
|
+
import { AlertTriangle as p } from "@box/blueprint-web-assets/icons/Line";
|
|
3
|
+
import { Size5 as f, SurfaceStatusSurfaceError as y } from "@box/blueprint-web-assets/tokens/tokens";
|
|
4
4
|
import O from "clsx";
|
|
5
5
|
import { useState as T } from "react";
|
|
6
6
|
import { useIntl as h } from "react-intl";
|
|
7
|
-
import { EXTRACT_AI_AGENT_LOCAL_STORAGE_KEY as
|
|
8
|
-
import
|
|
9
|
-
import { useErrorMessaging as
|
|
10
|
-
import { jsxs as
|
|
11
|
-
import '../../../../../../styles/autofill-overlay.css';const
|
|
12
|
-
autofillOverlay:
|
|
13
|
-
withError:
|
|
14
|
-
autofillOverlayTitle:
|
|
15
|
-
autofillOverlayDescription:
|
|
16
|
-
dismissButton:
|
|
17
|
-
overlayIcon: N
|
|
18
|
-
|
|
19
|
-
}, q = ({
|
|
7
|
+
import { EXTRACT_AI_AGENT_LOCAL_STORAGE_KEY as E } from "../../../../constants.js";
|
|
8
|
+
import i from "./messages.js";
|
|
9
|
+
import { useErrorMessaging as I } from "./useErrorMessaging.js";
|
|
10
|
+
import { jsxs as A, jsx as e } from "react/jsx-runtime";
|
|
11
|
+
import '../../../../../../styles/autofill-overlay.css';const x = "_autofillOverlay_1s073_1", B = "_withError_1s073_15", D = "_autofillOverlayTitle_1s073_19", M = "_autofillOverlayDescription_1s073_24", S = "_dismissButton_1s073_28", N = "_overlayIcon_1s073_32", s = {
|
|
12
|
+
autofillOverlay: x,
|
|
13
|
+
withError: B,
|
|
14
|
+
autofillOverlayTitle: D,
|
|
15
|
+
autofillOverlayDescription: M,
|
|
16
|
+
dismissButton: S,
|
|
17
|
+
overlayIcon: N
|
|
18
|
+
}, Y = ({
|
|
20
19
|
errorCode: t,
|
|
21
20
|
isFetchingSuggestions: u,
|
|
22
21
|
isLongLoading: l
|
|
23
22
|
}) => {
|
|
24
|
-
const
|
|
25
|
-
let o =
|
|
23
|
+
const a = h(), [d, g] = T(!1), r = I(t);
|
|
24
|
+
let o = a.formatMessage(i.defaultLoadingMessage);
|
|
26
25
|
t && (o = r.title);
|
|
27
|
-
const n = localStorage.getItem(
|
|
28
|
-
l && n === "standard" && (o =
|
|
29
|
-
const c = l && n === "standard" ?
|
|
30
|
-
return !u && !t || d ? null : /* @__PURE__ */
|
|
26
|
+
const n = localStorage.getItem(E);
|
|
27
|
+
l && n === "standard" && (o = a.formatMessage(i.longLoadingTitle));
|
|
28
|
+
const c = l && n === "standard" ? a.formatMessage(i.longLoadingDescription) : t && r.description;
|
|
29
|
+
return !u && !t || d ? null : /* @__PURE__ */ A("div", {
|
|
31
30
|
className: O(s.autofillOverlay, t && s.withError),
|
|
32
|
-
children: [t ? /* @__PURE__ */
|
|
31
|
+
children: [t ? /* @__PURE__ */ e(p, {
|
|
33
32
|
className: s.overlayIcon,
|
|
34
|
-
color:
|
|
33
|
+
color: y,
|
|
35
34
|
height: f,
|
|
36
35
|
role: "presentation",
|
|
37
36
|
width: f
|
|
38
|
-
}) : /* @__PURE__ */
|
|
39
|
-
"aria-label":
|
|
37
|
+
}) : /* @__PURE__ */ e(v, {
|
|
38
|
+
"aria-label": a.formatMessage(i.loadingAriaLabel),
|
|
40
39
|
"aria-live": "polite",
|
|
41
40
|
className: s.overlayIcon,
|
|
42
41
|
size: "large",
|
|
43
42
|
variant: "default"
|
|
44
|
-
}), /* @__PURE__ */
|
|
43
|
+
}), /* @__PURE__ */ e(m, {
|
|
45
44
|
as: "p",
|
|
46
45
|
className: s.autofillOverlayTitle,
|
|
47
46
|
variant: "subtitle",
|
|
48
47
|
children: o
|
|
49
|
-
}), c && /* @__PURE__ */
|
|
48
|
+
}), c && /* @__PURE__ */ e(m, {
|
|
50
49
|
as: "p",
|
|
51
50
|
className: s.autofillOverlayDescription,
|
|
52
51
|
color: "textOnLightSecondary",
|
|
53
52
|
variant: "bodyDefault",
|
|
54
53
|
children: c
|
|
55
|
-
}), t && /* @__PURE__ */
|
|
54
|
+
}), t && /* @__PURE__ */ e(_, {
|
|
56
55
|
className: s.dismissButton,
|
|
57
|
-
onClick: () =>
|
|
56
|
+
onClick: () => g(!0),
|
|
58
57
|
"data-target-id": "TextButton-dismissButton",
|
|
59
|
-
children:
|
|
58
|
+
children: a.formatMessage(i.dismissButton)
|
|
60
59
|
})]
|
|
61
60
|
});
|
|
62
61
|
};
|
|
63
62
|
export {
|
|
64
|
-
|
|
63
|
+
Y as AutofillOverlay
|
|
65
64
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { useFormikContext as A, FieldArray as
|
|
2
|
-
import { useState as f, useRef as
|
|
1
|
+
import { useFormikContext as A, FieldArray as v, Field as N } from "formik";
|
|
2
|
+
import { useState as f, useRef as k, useEffect as y } from "react";
|
|
3
3
|
import { useIntl as C } from "react-intl";
|
|
4
4
|
import { TextInput as q, IconButton as B, TextButton as T } from "@box/blueprint-web";
|
|
5
5
|
import { Trash as w } from "@box/blueprint-web-assets/icons/Line";
|
|
6
6
|
import { CustomInstanceNewField as M } from "../custom-instance-new-field/custom-instance-new-field.js";
|
|
7
7
|
import r from "./messages.js";
|
|
8
|
-
import { jsx as
|
|
8
|
+
import { jsx as e, jsxs as F } from "react/jsx-runtime";
|
|
9
9
|
import '../../../../../../styles/custom-instance.css';const R = "_customInstance_xq8r7_1", V = "_customInstanceField_xq8r7_7", j = "_customInstanceFieldInput_xq8r7_12", z = "_customInstanceFieldIcon_xq8r7_16", c = {
|
|
10
10
|
customInstance: R,
|
|
11
11
|
customInstanceField: V,
|
|
@@ -15,43 +15,43 @@ import '../../../../../../styles/custom-instance.css';const R = "_customInstance
|
|
|
15
15
|
const {
|
|
16
16
|
isLoading: l
|
|
17
17
|
} = p, {
|
|
18
|
-
values:
|
|
19
|
-
} = A(), i = C(), [m, a] = f(!
|
|
20
|
-
d(
|
|
18
|
+
values: s
|
|
19
|
+
} = A(), i = C(), [m, a] = f(!s.metadata.fields.length), [u, d] = f(0), h = () => {
|
|
20
|
+
d(s.metadata.fields.length);
|
|
21
21
|
}, b = (o) => {
|
|
22
22
|
d(o === 0 ? 0 : o - 1);
|
|
23
|
-
}, I =
|
|
23
|
+
}, I = k(null);
|
|
24
24
|
return y(() => {
|
|
25
|
-
|
|
26
|
-
}, [u,
|
|
27
|
-
children: /* @__PURE__ */
|
|
25
|
+
s.metadata.fields.length > 0 ? I.current.focus() : a(!0);
|
|
26
|
+
}, [u, s.metadata.fields.length]), /* @__PURE__ */ e("div", {
|
|
27
|
+
children: /* @__PURE__ */ e(v, {
|
|
28
28
|
name: "metadata.fields",
|
|
29
29
|
children: ({
|
|
30
30
|
remove: o,
|
|
31
31
|
push: _
|
|
32
32
|
}) => /* @__PURE__ */ F("div", {
|
|
33
33
|
className: c.customInstance,
|
|
34
|
-
children: [
|
|
34
|
+
children: [s?.metadata.fields.map((t, n) => /* @__PURE__ */ F("div", {
|
|
35
35
|
className: c.customInstanceField,
|
|
36
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ e("div", {
|
|
37
37
|
className: c.customInstanceFieldInput,
|
|
38
|
-
children: /* @__PURE__ */
|
|
38
|
+
children: /* @__PURE__ */ e(N, {
|
|
39
39
|
name: `metadata.fields[${n}].value`,
|
|
40
40
|
children: ({
|
|
41
41
|
field: g,
|
|
42
42
|
meta: x
|
|
43
|
-
}) => /* @__PURE__ */
|
|
43
|
+
}) => /* @__PURE__ */ e(q, {
|
|
44
44
|
...g,
|
|
45
45
|
ref: n === u ? I : null,
|
|
46
46
|
disabled: l,
|
|
47
47
|
error: x.error,
|
|
48
|
-
label:
|
|
48
|
+
label: t.key,
|
|
49
49
|
placeholder: i.formatMessage(r.setValuePlaceholder)
|
|
50
50
|
})
|
|
51
51
|
})
|
|
52
|
-
}), /* @__PURE__ */
|
|
52
|
+
}), /* @__PURE__ */ e(B, {
|
|
53
53
|
"aria-label": i.formatMessage(r.removeAttribute, {
|
|
54
|
-
fieldName:
|
|
54
|
+
fieldName: t.key
|
|
55
55
|
}),
|
|
56
56
|
className: c.customInstanceFieldIcon,
|
|
57
57
|
disabled: l,
|
|
@@ -62,16 +62,16 @@ import '../../../../../../styles/custom-instance.css';const R = "_customInstance
|
|
|
62
62
|
size: "x-small",
|
|
63
63
|
"data-target-id": "IconButton-removeAttribute"
|
|
64
64
|
})]
|
|
65
|
-
},
|
|
66
|
-
formKeys:
|
|
67
|
-
onAdd: (
|
|
65
|
+
}, t.key)), m && /* @__PURE__ */ e(M, {
|
|
66
|
+
formKeys: s.metadata.fields.map((t) => t.key),
|
|
67
|
+
onAdd: (t, n) => {
|
|
68
68
|
_({
|
|
69
|
-
key:
|
|
69
|
+
key: t,
|
|
70
70
|
value: n
|
|
71
71
|
}), h(), a(!1);
|
|
72
72
|
},
|
|
73
73
|
onCancel: () => a(!1)
|
|
74
|
-
}), !m && /* @__PURE__ */
|
|
74
|
+
}), !m && /* @__PURE__ */ e(T, {
|
|
75
75
|
disabled: l,
|
|
76
76
|
onClick: () => a(!0),
|
|
77
77
|
"data-target-id": "TextButton-addAttribute",
|