@box/metadata-editor 0.84.10 → 0.85.2
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/filter-dropdown-menu.module.js +4 -5
- package/chunks/index.js +292 -0
- package/chunks/message.js +18 -0
- package/chunks/taxonomy-ancestor-status-pill.js +33 -33
- package/chunks/utils2.js +7 -8
- package/esm/lib/components/add-metadata-template-dropdown/add-metadata-template-dropdown.js +5 -5
- package/esm/lib/components/add-metadata-template-dropdown/messages.js +1 -1
- package/esm/lib/components/combobox-with-api-pagination/combobox-with-api-pagination.js +29 -29
- package/esm/lib/components/combobox-with-api-pagination/messages.js +1 -1
- package/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-empty-state.js +1 -1
- package/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-search.js +6 -6
- package/esm/lib/components/filter-dropdown-menu/messages.js +1 -1
- package/esm/lib/components/filter-instances-dropdown/filter-instances-dropdown.js +10 -11
- package/esm/lib/components/filter-instances-dropdown/messages.js +1 -1
- package/esm/lib/components/interactive-header-text/interactive-header-text.js +8 -9
- package/esm/lib/components/interactive-text/interactive-text.js +11 -12
- package/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/ai-suggestion-field.js +14 -14
- package/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/messages.js +1 -1
- package/esm/lib/components/metadata-editor-fields/components/metadata-date-field/metadata-date-field.js +1 -1
- package/esm/lib/components/metadata-editor-fields/components/metadata-enum-field/metadata-enum-field.js +28 -27
- package/esm/lib/components/metadata-editor-fields/components/metadata-float-field/use-float-validation.js +6 -6
- package/esm/lib/components/metadata-editor-fields/components/metadata-multi-select-field/metadata-multi-select-field.js +5 -5
- package/esm/lib/components/metadata-editor-fields/components/metadata-string-field/metadata-string-field.js +9 -9
- package/esm/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/metadata-taxonomy-field.js +5 -5
- package/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/messages.js +1 -1
- package/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/update-mode-field-wrapper.js +2 -3
- package/esm/lib/components/metadata-editor-fields/metadata-editor-field-wrapper.js +567 -70
- package/esm/lib/components/metadata-editor-fields/metadata-editor-fields.js +19 -18
- package/esm/lib/components/metadata-empty-state/messages.js +1 -1
- package/esm/lib/components/metadata-empty-state/metadata-empty-state.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance/custom-instance.js +13 -14
- package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance/messages.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/custom-instance-new-field.js +4 -5
- package/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/messages.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/delete-confirmation-modal.js +14 -14
- package/esm/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/messages.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +27 -28
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/messages.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js +10 -11
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/messages.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.js +4 -5
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.js +1 -1
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js +16 -17
- package/esm/lib/components/metadata-instance-list/metadata-instance-list.js +8 -9
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.js +7 -8
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.js +3 -4
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.js +8 -9
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/messages.js +3 -3
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-ancestor-status-pill.js +4 -3
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/messages.js +1 -1
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/metadata-instance-footer.js +6 -7
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/messages.js +1 -1
- package/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.js +10 -11
- package/esm/lib/components/unsaved-changes-modal/messages.js +1 -1
- package/esm/lib/components/unsaved-changes-modal/unsaved-changes-modal.js +19 -18
- package/esm/lib/messages.js +1 -1
- package/esm/lib/metadata-editor.js +4 -5
- package/i18n/en-x-pseudo.js +111 -111
- package/i18n/en-x-pseudo.properties +111 -111
- package/package.json +5 -5
- package/styles/ai-suggestion-field.css +1 -1
- package/styles/utils.css +1 -1
- package/types/lib/components/add-metadata-template-dropdown/add-metadata-template-dropdown.d.ts +1 -1
- package/types/lib/components/add-metadata-template-dropdown/types.d.ts +1 -1
- package/types/lib/components/combobox-with-api-pagination/combobox-with-api-pagination.d.ts +5 -5
- package/types/lib/components/combobox-with-api-pagination/types.d.ts +2 -2
- package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-content.d.ts +1 -1
- package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-item.d.ts +1 -1
- package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-list.d.ts +1 -1
- package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-root.d.ts +1 -1
- package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-search.d.ts +1 -1
- package/types/lib/components/filter-dropdown-menu/filter-dropdown-menu-trigger.d.ts +1 -1
- package/types/lib/components/filter-dropdown-menu/index.d.ts +6 -6
- package/types/lib/components/filter-instances-dropdown/filter-instances-dropdown.d.ts +1 -1
- package/types/lib/components/filter-instances-dropdown/types.d.ts +1 -1
- package/types/lib/components/interactive-header-text/interactive-header-text.d.ts +1 -1
- package/types/lib/components/interactive-text/interactive-text.d.ts +1 -1
- package/types/lib/components/metadata-editor-fields/components/ai-suggestion-field/ai-suggestion-field.d.ts +1 -1
- package/types/lib/components/metadata-editor-fields/components/ai-suggestion-field/types.d.ts +1 -1
- package/types/lib/components/metadata-editor-fields/components/ai-suggestion-field/utils.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/metadata-date-field/metadata-date-field.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/metadata-date-field/types.d.ts +1 -1
- package/types/lib/components/metadata-editor-fields/components/metadata-enum-field/metadata-enum-field.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/metadata-float-field/metadata-float-field.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/metadata-multi-select-field/metadata-multi-select-field.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/metadata-string-field/metadata-string-field.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/metadata-taxonomy-field.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/types.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/update-mode-field-wrapper.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/editor-field-types.d.ts +6 -6
- package/types/lib/components/metadata-editor-fields/metadata-editor-field-wrapper.d.ts +4 -4
- package/types/lib/components/metadata-editor-fields/metadata-editor-fields.d.ts +1 -1
- package/types/lib/components/metadata-editor-fields/types.d.ts +2 -2
- package/types/lib/components/metadata-editor-fields/utils.d.ts +1 -1
- package/types/lib/components/metadata-empty-state/metadata-empty-state.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/custom-instance/custom-instance.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/custom-instance-new-field.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/delete-confirmation-modal.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form-card-wrapper.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/types.d.ts +3 -3
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/utils.d.ts +3 -3
- 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-footer/metadata-instance-form-footer.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-editor/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 +2 -2
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/types.d.ts +2 -2
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-entry-display.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-ancestor-status-pill.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-value.d.ts +1 -1
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/types.d.ts +2 -2
- package/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/metadata-instance-footer.d.ts +1 -1
- 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/types.d.ts +2 -2
- package/types/lib/components/unsaved-changes-modal/types.d.ts +1 -1
- package/types/lib/components/unsaved-changes-modal/unsaved-changes-modal.d.ts +1 -1
- package/types/lib/defaults.d.ts +1 -1
- package/types/lib/mappers.d.ts +2 -2
- package/types/lib/test-utils/formik-wrapper.d.ts +3 -3
- package/types/lib/test-utils/sample-data.d.ts +1 -1
- package/types/lib/test-utils/test-utils.d.ts +1 -1
- package/types/lib/types.d.ts +1 -1
- package/types/lib/utils/api-wrapper.d.ts +1 -1
- package/types/lib/utils/autofill-context.d.ts +2 -2
- package/types/lib/utils/convertDate.d.ts +1 -1
- package/types/lib/utils/utils.d.ts +1 -1
@@ -1,4 +1,3 @@
|
|
1
|
-
import "../../../../../../styles/metadata-instance.css";
|
2
1
|
import { Card as A, Divider as u } from "@box/blueprint-web";
|
3
2
|
import { useState as D } from "react";
|
4
3
|
import { useAutofill as S } from "../../../../utils/autofill-context.js";
|
@@ -7,20 +6,20 @@ import { MetadataInstanceContent as g } from "../metadata-instance-content/metad
|
|
7
6
|
import { MetadataInstanceFooter as H } from "../metadata-instance-footer/metadata-instance-footer.js";
|
8
7
|
import { MetadataInstanceHeader as _ } from "../metadata-instance-header/metadata-instance-header.js";
|
9
8
|
import { jsxs as a, jsx as t, Fragment as n } from "react/jsx-runtime";
|
10
|
-
const M = "_topDivider_tzhlb_1", N = "_bottomDivider_tzhlb_5", y = {
|
9
|
+
import '../../../../../../styles/metadata-instance.css';const M = "_topDivider_tzhlb_1", N = "_bottomDivider_tzhlb_5", y = {
|
11
10
|
topDivider: M,
|
12
11
|
bottomDivider: N
|
13
|
-
},
|
12
|
+
}, W = ({
|
14
13
|
areAiSuggestionsAvailable: p,
|
15
14
|
isAiSuggestionsFeatureEnabled: d,
|
16
|
-
onEdit:
|
15
|
+
onEdit: l,
|
17
16
|
templateInstance: o,
|
18
17
|
taxonomyNodeFetcher: c
|
19
18
|
}) => {
|
20
|
-
const i = o.fields,
|
19
|
+
const i = o.fields, m = (s) => !s.value || Array.isArray(s.value) && s.value.length === 0, h = i.every(m), v = i.some(m), E = i.length > 0, [e, r] = D(!0), {
|
21
20
|
getAiSuggestions: f
|
22
21
|
} = S(), V = () => {
|
23
|
-
|
22
|
+
l(o), f(o.templateKey, o.scope);
|
24
23
|
};
|
25
24
|
return /* @__PURE__ */ a(A, {
|
26
25
|
children: [/* @__PURE__ */ t(_, {
|
@@ -28,7 +27,7 @@ const M = "_topDivider_tzhlb_1", N = "_bottomDivider_tzhlb_5", y = {
|
|
28
27
|
canEdit: o.canEdit,
|
29
28
|
isAiSuggestionsFeatureEnabled: d,
|
30
29
|
onAutofill: V,
|
31
|
-
onEdit: () =>
|
30
|
+
onEdit: () => l(o),
|
32
31
|
templateName: o == null ? void 0 : o.displayName
|
33
32
|
}), /* @__PURE__ */ t(u, {
|
34
33
|
className: y.topDivider
|
@@ -55,5 +54,5 @@ const M = "_topDivider_tzhlb_1", N = "_bottomDivider_tzhlb_5", y = {
|
|
55
54
|
});
|
56
55
|
};
|
57
56
|
export {
|
58
|
-
|
57
|
+
W as MetadataInstance
|
59
58
|
};
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import "../../../../../../styles/metadata-instance-content.css";
|
2
1
|
import { MetadataInstanceEntry as c } from "../metadata-instance-entry/metadata-instance-entry.js";
|
3
2
|
import { jsx as a } from "react/jsx-runtime";
|
4
|
-
const m = "_metadataInstanceContent_1a9zf_1", r = {
|
3
|
+
import '../../../../../../styles/metadata-instance-content.css';const m = "_metadataInstanceContent_1a9zf_1", r = {
|
5
4
|
metadataInstanceContent: m
|
6
|
-
},
|
5
|
+
}, d = ({
|
7
6
|
shouldHideEmptyValues: n,
|
8
7
|
templateInstance: e,
|
9
8
|
taxonomyNodeFetcher: o
|
@@ -26,5 +25,5 @@ const m = "_metadataInstanceContent_1a9zf_1", r = {
|
|
26
25
|
});
|
27
26
|
};
|
28
27
|
export {
|
29
|
-
|
28
|
+
d as MetadataInstanceContent
|
30
29
|
};
|
@@ -1,21 +1,20 @@
|
|
1
|
-
import "../../../../../../styles/metadata-instance-entry.css";
|
2
1
|
import { Text as f } from "@box/blueprint-web";
|
3
|
-
import {
|
2
|
+
import { F as y } from "../../../../../../chunks/index.js";
|
4
3
|
import { convertISOStringToUTCDate as l } from "../../../../utils/convertDate.js";
|
5
4
|
import p from "../../../interactive-text/interactive-text.js";
|
6
5
|
import { MetadataEntryDisplay as u } from "./metadata-entry-display.js";
|
7
6
|
import { jsxs as x, jsx as r } from "react/jsx-runtime";
|
8
|
-
const g = "_metadataInstanceEntry_gwoh6_1", h = {
|
7
|
+
import '../../../../../../styles/metadata-instance-entry.css';const g = "_metadataInstanceEntry_gwoh6_1", h = {
|
9
8
|
metadataInstanceEntry: g
|
10
|
-
},
|
9
|
+
}, O = ({
|
11
10
|
description: n,
|
12
11
|
name: a,
|
13
12
|
shouldHideEmptyValues: i,
|
14
13
|
type: o,
|
15
14
|
value: t,
|
16
15
|
taxonomyNodeFetcher: m,
|
17
|
-
taxonomyKey:
|
18
|
-
scope:
|
16
|
+
taxonomyKey: s,
|
17
|
+
scope: c
|
19
18
|
}) => {
|
20
19
|
const e = (() => {
|
21
20
|
if (typeof t == "number")
|
@@ -50,8 +49,8 @@ const g = "_metadataInstanceEntry_gwoh6_1", h = {
|
|
50
49
|
}) : a
|
51
50
|
}), /* @__PURE__ */ r(u, {
|
52
51
|
formattedValue: e,
|
53
|
-
scope:
|
54
|
-
taxonomyKey:
|
52
|
+
scope: c,
|
53
|
+
taxonomyKey: s,
|
55
54
|
taxonomyNodeFetcher: m,
|
56
55
|
type: o,
|
57
56
|
value: t
|
@@ -59,5 +58,5 @@ const g = "_metadataInstanceEntry_gwoh6_1", h = {
|
|
59
58
|
});
|
60
59
|
};
|
61
60
|
export {
|
62
|
-
|
61
|
+
O as MetadataInstanceEntry
|
63
62
|
};
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
const
|
1
|
+
import { d as e } from "../../../../../../../chunks/index.js";
|
2
|
+
const s = e({
|
3
3
|
loadingResultsErrorAction: {
|
4
4
|
id: "taxonomyAncestorStatusPill.errorAction",
|
5
5
|
defaultMessage: "Reload"
|
@@ -22,5 +22,5 @@ const o = e({
|
|
22
22
|
}
|
23
23
|
});
|
24
24
|
export {
|
25
|
-
|
25
|
+
s as default
|
26
26
|
};
|
@@ -2,10 +2,11 @@ import "@box/blueprint-web";
|
|
2
2
|
import "@box/blueprint-web-assets/icons/Fill";
|
3
3
|
import "lodash/orderBy";
|
4
4
|
import "react";
|
5
|
-
import "
|
5
|
+
import "../../../../../../../chunks/index.js";
|
6
6
|
import "./messages.js";
|
7
|
-
import { T as
|
7
|
+
import { T as n } from "../../../../../../../chunks/taxonomy-ancestor-status-pill.js";
|
8
8
|
import "react/jsx-runtime";
|
9
|
+
import "../../../../../../../chunks/message.js";
|
9
10
|
export {
|
10
|
-
|
11
|
+
n as TaxonomyAncestorStatusPill
|
11
12
|
};
|
@@ -1,12 +1,11 @@
|
|
1
|
-
import "../../../../../../styles/metadata-instance-footer.css";
|
2
1
|
import { TextButton as o } from "@box/blueprint-web";
|
3
|
-
import {
|
2
|
+
import { u as c } from "../../../../../../chunks/index.js";
|
4
3
|
import s from "./messages.js";
|
5
4
|
import { jsx as t } from "react/jsx-runtime";
|
6
|
-
const
|
7
|
-
metadataInstanceFooter:
|
8
|
-
button:
|
9
|
-
},
|
5
|
+
import '../../../../../../styles/metadata-instance-footer.css';const u = "_metadataInstanceFooter_6auqo_1", d = "_button_6auqo_5", a = {
|
6
|
+
metadataInstanceFooter: u,
|
7
|
+
button: d
|
8
|
+
}, T = ({
|
10
9
|
isAnyEmptyValueHidden: n,
|
11
10
|
onHideEmptyValues: r,
|
12
11
|
onShowEmptyValues: m
|
@@ -28,5 +27,5 @@ const i = "_metadataInstanceFooter_6auqo_1", u = "_button_6auqo_5", a = {
|
|
28
27
|
});
|
29
28
|
};
|
30
29
|
export {
|
31
|
-
|
30
|
+
T as MetadataInstanceFooter
|
32
31
|
};
|
@@ -1,16 +1,15 @@
|
|
1
|
-
import "
|
2
|
-
import { Tooltip as i, IconButton as r } from "@box/blueprint-web";
|
1
|
+
import { Tooltip as i, IconButton as s } from "@box/blueprint-web";
|
3
2
|
import { Pencil as p } from "@box/blueprint-web-assets/icons/Line";
|
4
3
|
import { BoxAiLogo as I } from "@box/blueprint-web-assets/icons/Logo";
|
5
|
-
import {
|
4
|
+
import { u as g } from "../../../../../../chunks/index.js";
|
6
5
|
import _ from "../../../interactive-header-text/interactive-header-text.js";
|
7
6
|
import o from "./messages.js";
|
8
|
-
import { jsxs as
|
9
|
-
const x = "_metadataInstanceHeader_54pdx_1", b = "_iconButtonsContainer_54pdx_6", A = "_title_54pdx_14", e = {
|
7
|
+
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
8
|
+
import '../../../../../../styles/metadata-instance-header.css';const x = "_metadataInstanceHeader_54pdx_1", b = "_iconButtonsContainer_54pdx_6", A = "_title_54pdx_14", e = {
|
10
9
|
metadataInstanceHeader: x,
|
11
10
|
iconButtonsContainer: b,
|
12
11
|
title: A
|
13
|
-
},
|
12
|
+
}, j = ({
|
14
13
|
areAiSuggestionsAvailable: c,
|
15
14
|
canEdit: l,
|
16
15
|
isAiSuggestionsFeatureEnabled: d,
|
@@ -19,16 +18,16 @@ const x = "_metadataInstanceHeader_54pdx_1", b = "_iconButtonsContainer_54pdx_6"
|
|
19
18
|
templateName: n
|
20
19
|
}) => {
|
21
20
|
const t = g(), f = n || t.formatMessage(o.customInstanceTitle), B = d && n;
|
22
|
-
return /* @__PURE__ */
|
21
|
+
return /* @__PURE__ */ r("div", {
|
23
22
|
className: e.metadataInstanceHeader,
|
24
23
|
children: [/* @__PURE__ */ a(_, {
|
25
24
|
className: e.title,
|
26
25
|
title: f
|
27
|
-
}), l && /* @__PURE__ */
|
26
|
+
}), l && /* @__PURE__ */ r("div", {
|
28
27
|
className: e.iconButtonsContainer,
|
29
28
|
children: [B && /* @__PURE__ */ a(i, {
|
30
29
|
content: t.formatMessage(o.autofillButtonTooltip),
|
31
|
-
children: /* @__PURE__ */ a(
|
30
|
+
children: /* @__PURE__ */ a(s, {
|
32
31
|
"aria-label": t.formatMessage(o.autofillButtonAriaLabel, {
|
33
32
|
templateName: n
|
34
33
|
}),
|
@@ -40,7 +39,7 @@ const x = "_metadataInstanceHeader_54pdx_1", b = "_iconButtonsContainer_54pdx_6"
|
|
40
39
|
})
|
41
40
|
}), /* @__PURE__ */ a(i, {
|
42
41
|
content: t.formatMessage(o.editButtonTooltip),
|
43
|
-
children: /* @__PURE__ */ a(
|
42
|
+
children: /* @__PURE__ */ a(s, {
|
44
43
|
"aria-label": t.formatMessage(o.editButtonAriaLabel, {
|
45
44
|
templateName: n
|
46
45
|
}),
|
@@ -53,5 +52,5 @@ const x = "_metadataInstanceHeader_54pdx_1", b = "_iconButtonsContainer_54pdx_6"
|
|
53
52
|
});
|
54
53
|
};
|
55
54
|
export {
|
56
|
-
|
55
|
+
j as MetadataInstanceHeader
|
57
56
|
};
|
@@ -1,52 +1,53 @@
|
|
1
1
|
import { Modal as e } from "@box/blueprint-web";
|
2
2
|
import { useState as M, useEffect as p, useCallback as d } from "react";
|
3
|
-
import {
|
4
|
-
import
|
5
|
-
import { jsx as a, jsxs as
|
3
|
+
import { u as v } from "../../../../chunks/index.js";
|
4
|
+
import o from "./messages.js";
|
5
|
+
import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
6
|
+
import { M as h } from "../../../../chunks/message.js";
|
6
7
|
function x({
|
7
8
|
onBackToEdit: i,
|
8
9
|
onDiscardChanges: c,
|
9
|
-
defaultOpen:
|
10
|
-
open: r =
|
10
|
+
defaultOpen: C = !0,
|
11
|
+
open: r = C
|
11
12
|
}) {
|
12
|
-
const t = v(), [
|
13
|
-
p(() =>
|
13
|
+
const t = v(), [g, n] = M(r);
|
14
|
+
p(() => n(r), [r]);
|
14
15
|
const l = d(() => {
|
15
|
-
i(),
|
16
|
+
i(), n(!1);
|
16
17
|
}, [i]), u = d(() => {
|
17
|
-
c(),
|
18
|
+
c(), n(!1);
|
18
19
|
}, [c]), f = d((s) => {
|
19
|
-
|
20
|
+
n(s), s || l();
|
20
21
|
}, [l]);
|
21
22
|
return /* @__PURE__ */ a(e, {
|
22
23
|
modal: !0,
|
23
24
|
onOpenChange: f,
|
24
|
-
open:
|
25
|
-
children: /* @__PURE__ */
|
25
|
+
open: g,
|
26
|
+
children: /* @__PURE__ */ m(e.Content, {
|
26
27
|
onEscapeKeyDown: (s) => s.stopPropagation(),
|
27
28
|
size: "small",
|
28
29
|
children: [/* @__PURE__ */ a(e.Header, {
|
29
30
|
children: /* @__PURE__ */ a(h, {
|
30
|
-
...
|
31
|
+
...o.unsavedChangesModalHeader
|
31
32
|
})
|
32
33
|
}), /* @__PURE__ */ a(e.ScrollableContainer, {
|
33
34
|
children: /* @__PURE__ */ a(e.Body, {
|
34
35
|
children: /* @__PURE__ */ a(h, {
|
35
|
-
...
|
36
|
+
...o.unsavedChangesModalBody
|
36
37
|
})
|
37
38
|
})
|
38
|
-
}), /* @__PURE__ */
|
39
|
+
}), /* @__PURE__ */ m(e.Footer, {
|
39
40
|
children: [/* @__PURE__ */ a(e.Footer.SecondaryButton, {
|
40
41
|
onClick: u,
|
41
42
|
size: "large",
|
42
|
-
children: t.formatMessage(
|
43
|
+
children: t.formatMessage(o.unsavedChangesModalDiscardChangesCTA)
|
43
44
|
}), /* @__PURE__ */ a(e.Footer.PrimaryButton, {
|
44
45
|
onClick: l,
|
45
46
|
size: "large",
|
46
|
-
children: t.formatMessage(
|
47
|
+
children: t.formatMessage(o.unsavedChangesModalContinueEditingCTA)
|
47
48
|
})]
|
48
49
|
}), /* @__PURE__ */ a(e.Close, {
|
49
|
-
"aria-label": t.formatMessage(
|
50
|
+
"aria-label": t.formatMessage(o.unsavedChangesModalCloseLabel)
|
50
51
|
})]
|
51
52
|
})
|
52
53
|
});
|
package/esm/lib/messages.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
import "../../styles/metadata-editor.css";
|
2
1
|
import { jsx as t } from "react/jsx-runtime";
|
3
|
-
const e = {};
|
4
|
-
function
|
2
|
+
import '../../styles/metadata-editor.css';const e = {};
|
3
|
+
function r(a) {
|
5
4
|
return /* @__PURE__ */ t("div", {
|
6
5
|
className: e.container,
|
7
6
|
children: /* @__PURE__ */ t("h1", {
|
@@ -10,6 +9,6 @@ function i(o) {
|
|
10
9
|
});
|
11
10
|
}
|
12
11
|
export {
|
13
|
-
|
14
|
-
|
12
|
+
r as MetadataEditor,
|
13
|
+
r as default
|
15
14
|
};
|