@box/metadata-editor 0.85.0 → 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/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
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@box/metadata-editor",
|
3
|
-
"version": "0.85.
|
3
|
+
"version": "0.85.2",
|
4
4
|
"peerDependencies": {
|
5
5
|
"@ariakit/react": "0.4.15",
|
6
6
|
"@box/blueprint-web": "^7.30.3",
|
@@ -14,9 +14,9 @@
|
|
14
14
|
"devDependencies": {
|
15
15
|
"@ariakit/react": "0.4.15",
|
16
16
|
"@box/babel-plugin-target-attributes": "1.3.0",
|
17
|
-
"@box/blueprint-web": "^9.16.
|
18
|
-
"@box/blueprint-web-assets": "^4.32.
|
19
|
-
"@box/storybook-utils": "^0.8.
|
17
|
+
"@box/blueprint-web": "^9.16.2",
|
18
|
+
"@box/blueprint-web-assets": "^4.32.1",
|
19
|
+
"@box/storybook-utils": "^0.8.2",
|
20
20
|
"@testing-library/react": "^15.0.6",
|
21
21
|
"react": "^18.3.0",
|
22
22
|
"react-dom": "^18.3.0",
|
@@ -53,5 +53,5 @@
|
|
53
53
|
"**/*.css"
|
54
54
|
],
|
55
55
|
"license": "SEE LICENSE IN LICENSE",
|
56
|
-
"gitHead": "
|
56
|
+
"gitHead": "9c7b8b2a403ff2bc3d0f313cdc8a7fb3a73079ed"
|
57
57
|
}
|
@@ -1 +1 @@
|
|
1
|
-
._wrapperGradient_t2yak_1{background:linear-gradient(135deg,#fe03dc
|
1
|
+
._wrapperGradient_t2yak_1{background:linear-gradient(135deg,#fe03dc,#2784fa);border-radius:0 0 var(--radius-2) var(--radius-2)}._wrapperGradient_t2yak_1 ._wrapper_t2yak_1{display:flex;justify-content:space-between;align-items:center;-webkit-user-select:none;user-select:none;padding:var(--space-2) var(--space-3);position:relative;box-sizing:border-box;background:var(--box-blue-02);background-clip:padding-box;border:var(--border-1) solid transparent;border-radius:inherit}._wrapperGradient_t2yak_1 ._wrapper_t2yak_1 ._buttons_t2yak_18{display:flex;gap:var(--space-1)}._wrapperGradient_t2yak_1 ._wrapper_t2yak_1 ._selectTrigger_t2yak_22{width:var(--size-6);height:var(--size-6)}._wrapperGradient_t2yak_1 ._wrapper_t2yak_1>div>p{overflow-wrap:anywhere}
|
package/styles/utils.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
._noAttributesText_1ggnw_1{text-align:center}._fieldWrapper_1ggnw_5{isolation:isolate;position:relative}._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>input,._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>button,._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>div[role=group]>div,._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>div>div{border-bottom:none!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>input:not(:disabled):not(:focus-visible):not(._error_1ggnw_18):hover,._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>button:not(:disabled):not(:focus-visible):not(._error_1ggnw_18):hover,._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>div[role=group]>div:not(:disabled):not(:focus-visible):not(._error_1ggnw_18):hover,._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>div>div:not(:disabled):not(:focus-visible):not(._error_1ggnw_18):hover{border-bottom:none}._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10 div[role=group]>div{margin-left:var(--border-1);margin-right:var(--border-1)}._fieldWrapper_1ggnw_5 ._dateField_1ggnw_30>div[role=group]>div{padding-inline:.75rem}._fieldWrapper_1ggnw_5 ._suggestionApplied_1ggnw_34>._comboboxContainer_1ggnw_34,._fieldWrapper_1ggnw_5 ._suggestionApplied_1ggnw_34>input,._fieldWrapper_1ggnw_5 ._suggestionApplied_1ggnw_34>button,._fieldWrapper_1ggnw_5 ._suggestionApplied_1ggnw_34>div[role=group]>div,._fieldWrapper_1ggnw_5 ._suggestionApplied_1ggnw_34>div>div{border:double var(--border-1) transparent!important;box-sizing:border-box!important;border-radius:var(--radius-2);background-image:linear-gradient(#fff,#fff),linear-gradient(135deg,#fe03dc
|
1
|
+
._noAttributesText_1ggnw_1{text-align:center}._fieldWrapper_1ggnw_5{isolation:isolate;position:relative}._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>input,._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>button,._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>div[role=group]>div,._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>div>div{border-bottom:none!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important}._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>input:not(:disabled):not(:focus-visible):not(._error_1ggnw_18):hover,._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>button:not(:disabled):not(:focus-visible):not(._error_1ggnw_18):hover,._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>div[role=group]>div:not(:disabled):not(:focus-visible):not(._error_1ggnw_18):hover,._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10>div>div:not(:disabled):not(:focus-visible):not(._error_1ggnw_18):hover{border-bottom:none}._fieldWrapper_1ggnw_5 ._hasSuggestion_1ggnw_10 div[role=group]>div{margin-left:var(--border-1);margin-right:var(--border-1)}._fieldWrapper_1ggnw_5 ._dateField_1ggnw_30>div[role=group]>div{padding-inline:.75rem}._fieldWrapper_1ggnw_5 ._suggestionApplied_1ggnw_34>._comboboxContainer_1ggnw_34,._fieldWrapper_1ggnw_5 ._suggestionApplied_1ggnw_34>input,._fieldWrapper_1ggnw_5 ._suggestionApplied_1ggnw_34>button,._fieldWrapper_1ggnw_5 ._suggestionApplied_1ggnw_34>div[role=group]>div,._fieldWrapper_1ggnw_5 ._suggestionApplied_1ggnw_34>div>div{border:double var(--border-1) transparent!important;box-sizing:border-box!important;border-radius:var(--radius-2);background-image:linear-gradient(#fff,#fff),linear-gradient(135deg,#fe03dc,#2784fa)!important;background-origin:border-box!important;background-clip:padding-box,border-box!important;outline:none}._labelWrapper_1ggnw_48{width:100%;display:flex;align-items:baseline;justify-content:space-between}._labelWrapper_1ggnw_48 ._labelText_1ggnw_54{flex:unset!important}._labelWrapper_1ggnw_48 ._labelIcon_1ggnw_57{margin-inline-end:var(--space-3);margin-inline-start:var(--space-3);height:var(--space-4);width:var(--space-4)}
|
package/types/lib/components/add-metadata-template-dropdown/add-metadata-template-dropdown.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
1
|
+
import { AddMetadataTemplateDropdownProps } from './types';
|
2
2
|
export declare function AddMetadataTemplateDropdown({ availableTemplates, onSelect, selectedTemplates, }: AddMetadataTemplateDropdownProps): import("react/jsx-runtime").JSX.Element;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import {
|
2
|
-
export declare const ComboboxWithApiPagination: import(
|
3
|
-
defaultFetcher(input: import(
|
1
|
+
import { BaseOptionType } from './types';
|
2
|
+
export declare const ComboboxWithApiPagination: import('react').ForwardRefExoticComponent<{
|
3
|
+
defaultFetcher(input: import('./types').PaginationQueryInput): Promise<import('./types').FetcherResponse<BaseOptionType>>;
|
4
4
|
placeholder?: string;
|
5
5
|
includeTextInputOption?: boolean;
|
6
|
-
noResultMessage?: import(
|
6
|
+
noResultMessage?: import('react').ReactElement | string;
|
7
7
|
onInputValueChange?: (inputValue: string) => void;
|
8
8
|
multiselect?: boolean;
|
9
9
|
onValueChange?: (selectedOptions: BaseOptionType[]) => void;
|
@@ -14,4 +14,4 @@ export declare const ComboboxWithApiPagination: import("react").ForwardRefExotic
|
|
14
14
|
portalElement?: HTMLElement | (() => HTMLElement);
|
15
15
|
experimentalVirtualization?: boolean;
|
16
16
|
className?: string;
|
17
|
-
} & import(
|
17
|
+
} & import('@box/blueprint-web').Labelable & import('react').RefAttributes<HTMLInputElement>>;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { Labelable } from '@box/blueprint-web/src/lib/util-components/labelable/types';
|
2
|
+
import { ReactElement } from 'react';
|
3
3
|
export interface PaginationQueryInput {
|
4
4
|
marker?: string;
|
5
5
|
searchInput?: string;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ComboboxProviderProps } from '@ariakit/react';
|
2
2
|
export type FilterDropdownMenuRootProps = ComboboxProviderProps;
|
3
3
|
/**
|
4
4
|
* The Filtered Dropdown Menu component displays a menu to the user, such as a set of actions or functions—triggered by a button.
|
@@ -1,26 +1,26 @@
|
|
1
1
|
export declare const FilterDropdownMenu: {
|
2
2
|
Root: {
|
3
|
-
(props: import(
|
3
|
+
(props: import('@ariakit/react').ComboboxProviderProps): import("react/jsx-runtime").JSX.Element;
|
4
4
|
displayName: string;
|
5
5
|
};
|
6
6
|
Trigger: {
|
7
|
-
({ triggerButton, ...rest }: import(
|
7
|
+
({ triggerButton, ...rest }: import('./filter-dropdown-menu-trigger').FilterDropdownMenuTriggerProps): import("react/jsx-runtime").JSX.Element;
|
8
8
|
displayName: string;
|
9
9
|
};
|
10
10
|
Content: {
|
11
|
-
(props: import(
|
11
|
+
(props: import('@ariakit/react').MenuProps): import("react/jsx-runtime").JSX.Element;
|
12
12
|
displayName: string;
|
13
13
|
};
|
14
14
|
Item: {
|
15
|
-
(props: import(
|
15
|
+
(props: import('@ariakit/react').ComboboxItemProps): import("react/jsx-runtime").JSX.Element;
|
16
16
|
displayName: string;
|
17
17
|
};
|
18
18
|
List: {
|
19
|
-
(props: import(
|
19
|
+
(props: import('@ariakit/react').ComboboxListProps): import("react/jsx-runtime").JSX.Element;
|
20
20
|
displayName: string;
|
21
21
|
};
|
22
22
|
Search: {
|
23
|
-
(props: import(
|
23
|
+
(props: import('@ariakit/react').ComboboxProps): import("react/jsx-runtime").JSX.Element;
|
24
24
|
displayName: string;
|
25
25
|
};
|
26
26
|
EmptyState: {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
1
|
+
import { FilterInstancesDropdownProps } from './types';
|
2
2
|
export declare function FilterInstancesDropdown({ appliedTemplates, selectedTemplates, setSelectedTemplates, }: FilterInstancesDropdownProps): import("react/jsx-runtime").JSX.Element;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
1
|
+
import { AiSuggestionFieldProps } from './types';
|
2
2
|
export declare function AiSuggestionField({ aiSuggestion, onAiSuggestionAppend, onAiSuggestionReplace, onAiSuggestionIgnore, type, isSameValue, }: AiSuggestionFieldProps): import("react/jsx-runtime").JSX.Element;
|
package/types/lib/components/metadata-editor-fields/components/ai-suggestion-field/types.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { MetadataFieldValue, MetadataTemplateFieldType } from '../../../../types';
|
2
2
|
export interface AiSuggestionFieldProps {
|
3
3
|
/**
|
4
4
|
* Represents the AI suggestion to be displayed or processed.
|
package/types/lib/components/metadata-editor-fields/components/ai-suggestion-field/utils.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { ReactElement } from 'react';
|
2
|
+
import { MetadataFieldValue, MetadataTemplateFieldType } from '../../../../types';
|
3
3
|
export declare function formatSuggestionValue(value: MetadataFieldValue, { type, locale }?: {
|
4
4
|
type?: MetadataTemplateFieldType;
|
5
5
|
locale?: string;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
export declare const MetadataDateField: import(
|
1
|
+
import { MetadataFieldProps } from '../../types';
|
2
|
+
export declare const MetadataDateField: import('react').ForwardRefExoticComponent<MetadataFieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
3
3
|
export default MetadataDateField;
|
package/types/lib/components/metadata-editor-fields/components/metadata-date-field/types.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { CalendarDate, CalendarDateTime, ZonedDateTime } from '@box/blueprint-web';
|
2
2
|
export type CalendarDateType = InstanceType<typeof CalendarDate>;
|
3
3
|
export type CalendarDateTimeType = InstanceType<typeof CalendarDateTime>;
|
4
4
|
export type ZonedDateTimeType = InstanceType<typeof ZonedDateTime>;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
export declare const MetadataEnumField: import(
|
1
|
+
import { MetadataFieldProps } from '../../types';
|
2
|
+
export declare const MetadataEnumField: import('react').ForwardRefExoticComponent<MetadataFieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
3
3
|
export default MetadataEnumField;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
export declare const MetadataFloatField: import(
|
1
|
+
import { MetadataFieldProps } from '../../types';
|
2
|
+
export declare const MetadataFloatField: import('react').ForwardRefExoticComponent<MetadataFieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
3
3
|
export default MetadataFloatField;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
export declare const MetadataMultiSelectField: import(
|
1
|
+
import { MetadataFieldProps } from '../../types';
|
2
|
+
export declare const MetadataMultiSelectField: import('react').ForwardRefExoticComponent<MetadataFieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
3
3
|
export default MetadataMultiSelectField;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
export declare const MetadataStringField: import(
|
1
|
+
import { MetadataFieldProps } from '../../types';
|
2
|
+
export declare const MetadataStringField: import('react').ForwardRefExoticComponent<MetadataFieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
3
3
|
export default MetadataStringField;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export declare const MetadataTaxonomyField: import(
|
1
|
+
export declare const MetadataTaxonomyField: import('react').ForwardRefExoticComponent<Omit<import('../../types').MetadataFieldProps, "portalElement"> & {
|
2
2
|
portalElement?: HTMLElement | (() => HTMLElement);
|
3
|
-
} & import(
|
3
|
+
} & import('react').RefAttributes<HTMLInputElement>>;
|