@box/metadata-editor 0.135.0 → 0.135.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.
@@ -1,61 +1,64 @@
1
- import { Card as E } from "@box/blueprint-web";
2
- import y from "clsx";
3
- import { TEMPLATE_CUSTOM_PROPERTIES as S } from "../esm/lib/constants.js";
1
+ import { useBlueprintModernization as E, Card as M } from "@box/blueprint-web";
2
+ import S from "clsx";
3
+ import { TEMPLATE_CUSTOM_PROPERTIES as b } from "../esm/lib/constants.js";
4
4
  import { MetadataInstanceFormFooter as w } from "../esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.js";
5
- import { MetadataInstanceFormHeader as M } from "../esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js";
6
- import { jsx as t, jsxs as b } from "react/jsx-runtime";
7
- import '../styles/metadata-instance-form-card-wrapper.css';const v = "_metadataInstanceForm_1e6l2_1", x = "_wrapperGradient_1e6l2_7", D = "_suggestionsFetching_1e6l2_12", I = "_metadataInstanceFormContent_1e6l2_18", L = "_showOverlay_1e6l2_25", s = {
8
- metadataInstanceForm: v,
9
- wrapperGradient: x,
10
- suggestionsFetching: D,
11
- metadataInstanceFormContent: I,
12
- showOverlay: L
13
- }, B = (n) => {
5
+ import { MetadataInstanceFormHeader as v } from "../esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js";
6
+ import { jsx as t, jsxs as x } from "react/jsx-runtime";
7
+ import '../styles/metadata-instance-form-card-wrapper.css';const D = "_metadataInstanceForm_moyil_1", I = "_wrapperGradient_moyil_7", L = "_suggestionsFetching_moyil_17", N = "_metadataInstanceFormContent_moyil_23", O = "_showOverlay_moyil_30", s = {
8
+ metadataInstanceForm: D,
9
+ wrapperGradient: I,
10
+ suggestionsFetching: L,
11
+ metadataInstanceFormContent: N,
12
+ showOverlay: O
13
+ }, K = (n) => {
14
14
  const {
15
15
  areAiSuggestionsAvailable: o,
16
- children: r,
17
- className: i,
18
- formRef: g,
19
- isAdvancedExtractAgentEnabled: m = !1,
20
- isAiSuggestionsFeatureEnabled: l,
21
- isBetaLanguageEnabled: d,
16
+ children: i,
17
+ className: r,
18
+ formRef: m,
19
+ isAdvancedExtractAgentEnabled: g = !1,
20
+ isAiSuggestionsFeatureEnabled: d,
21
+ isBetaLanguageEnabled: l,
22
22
  isLargeFile: c = !1,
23
- isDeleteButtonDisabled: F,
24
- suggestions: u,
23
+ isDeleteButtonDisabled: u,
24
+ suggestions: F,
25
25
  isFetchingSuggestions: e,
26
- isFormDirty: _ = !1,
26
+ isFormDirty: p = !1,
27
27
  selectedTemplateInstance: a,
28
- getAiSuggestions: p,
28
+ getAiSuggestions: _,
29
29
  handleCancel: h,
30
30
  handleDelete: f
31
- } = n, A = (a == null ? void 0 : a.templateKey) === S, C = !!u[a == null ? void 0 : a.templateKey];
31
+ } = n, {
32
+ enableModernizedComponents: y
33
+ } = E(), C = (a == null ? void 0 : a.templateKey) === b, A = !!F[a == null ? void 0 : a.templateKey];
32
34
  return /* @__PURE__ */ t("div", {
33
35
  className: e && s.wrapperGradient,
34
- children: /* @__PURE__ */ b(E, {
35
- ref: g,
36
- className: y(i, {
36
+ "data-modern": y,
37
+ children: /* @__PURE__ */ x(M, {
38
+ ref: m,
39
+ className: S(r, {
37
40
  [s.suggestionsFetching]: e
38
41
  }),
39
- children: [/* @__PURE__ */ t(M, {
42
+ children: [/* @__PURE__ */ t(v, {
40
43
  areAiSuggestionsAvailable: o,
41
- hasSuggestions: C,
42
- isAdvancedExtractAgentEnabled: m,
43
- isAiSuggestionsFeatureEnabled: l && !A,
44
- isBetaLanguageEnabled: d,
44
+ hasSuggestions: A,
45
+ isAdvancedExtractAgentEnabled: g,
46
+ isAiSuggestionsFeatureEnabled: d && !C,
47
+ isBetaLanguageEnabled: l,
45
48
  isLargeFile: c,
46
49
  isLoading: e,
47
- onAutofill: p,
50
+ onAutofill: _,
48
51
  templateName: a == null ? void 0 : a.displayName
49
- }), a && r, /* @__PURE__ */ t(w, {
50
- isDeleteButtonDisabled: F,
52
+ }), a && i, /* @__PURE__ */ t(w, {
53
+ isDeleteButtonDisabled: u,
51
54
  isLoading: e,
52
- onCancel: () => h(_),
55
+ onCancel: () => h(p),
53
56
  onDelete: f
54
57
  })]
55
58
  })
56
59
  });
57
60
  };
58
61
  export {
59
- B as M,
62
+ K as M,
60
63
  s
61
64
  };
@@ -1 +1 @@
1
- ._metadataInstanceForm_1e6l2_1{display:flex;flex-direction:column;gap:var(--space-3)}._wrapperGradient_1e6l2_7{background:linear-gradient(135deg,#fe03dc,#2784fa);border-radius:var(--radius-4)}._suggestionsFetching_1e6l2_12{background:var(--box-blue-02);background-clip:padding-box;border:var(--border-1) solid transparent}._metadataInstanceFormContent_1e6l2_18{position:relative;display:flex;flex-direction:column;gap:var(--space-3)}._showOverlay_1e6l2_25{min-height:172px}
1
+ ._metadataInstanceForm_moyil_1{display:flex;flex-direction:column;gap:var(--space-3)}._wrapperGradient_moyil_7[data-modern=false]{background:linear-gradient(135deg,#fe03dc,#2784fa);border-radius:var(--radius-4)}._wrapperGradient_moyil_7[data-modern=true]{background:linear-gradient(135deg,#fe03dc,#2784fa);border-radius:var(--bp-radius-10)}._suggestionsFetching_moyil_17{background:var(--box-blue-02);background-clip:padding-box;border:var(--border-1) solid transparent}._metadataInstanceFormContent_moyil_23{position:relative;display:flex;flex-direction:column;gap:var(--space-3)}._showOverlay_moyil_30{min-height:172px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/metadata-editor",
3
- "version": "0.135.0",
3
+ "version": "0.135.2",
4
4
  "peerDependencies": {
5
5
  "@ariakit/react": "0.4.15",
6
6
  "@box/box-ai-agent-selector": "^0.55.2",
@@ -15,9 +15,9 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "@ariakit/react": "0.4.15",
18
- "@box/box-ai-agent-selector": "^0.63.0",
18
+ "@box/box-ai-agent-selector": "^0.63.2",
19
19
  "@box/babel-plugin-target-attributes": "1.3.0",
20
- "@box/blueprint-web": "^12.76.1",
20
+ "@box/blueprint-web": "^12.77.0",
21
21
  "@box/blueprint-web-assets": "^4.68.0",
22
22
  "@box/storybook-utils": "^0.14.4",
23
23
  "@testing-library/react": "^15.0.6",