@box/metadata-editor 0.65.0 → 0.65.1

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,50 +1,50 @@
1
1
  import "../../../../../../styles/metadata-instance.css";
2
- import { useState as v } from "react";
3
- import { Card as E, Divider as m } from "@box/blueprint-web";
4
- import { useAutofill as D } from "../../../../utils/autofill-context.js";
5
- import { MetadataInstanceHeader as V } from "../metadata-instance-header/metadata-instance-header.js";
6
- import { MetadataInstanceContent as A } from "../metadata-instance-content/metadata-instance-content.js";
7
- import { MetadataInstanceFooter as S } from "../metadata-instance-footer/metadata-instance-footer.js";
8
- import { MetadataEmptyState as b } from "../../../metadata-empty-state/metadata-empty-state.js";
9
- import { jsxs as a, jsx as o, Fragment as u } from "react/jsx-runtime";
10
- const H = "_topDivider_tzhlb_1", _ = "_bottomDivider_tzhlb_5", n = {
11
- topDivider: H,
12
- bottomDivider: _
13
- }, B = ({
2
+ import { Card as h, Divider as l } from "@box/blueprint-web";
3
+ import { useState as D } from "react";
4
+ import { useAutofill as V } from "../../../../utils/autofill-context.js";
5
+ import { MetadataEmptyState as A } from "../../../metadata-empty-state/metadata-empty-state.js";
6
+ import { MetadataInstanceContent as S } from "../metadata-instance-content/metadata-instance-content.js";
7
+ import { MetadataInstanceFooter as b } from "../metadata-instance-footer/metadata-instance-footer.js";
8
+ import { MetadataInstanceHeader as H } from "../metadata-instance-header/metadata-instance-header.js";
9
+ import { jsxs as d, jsx as t, Fragment as u } from "react/jsx-runtime";
10
+ const _ = "_topDivider_tzhlb_1", g = "_bottomDivider_tzhlb_5", n = {
11
+ topDivider: _,
12
+ bottomDivider: g
13
+ }, K = ({
14
14
  areAiSuggestionsAvailable: p,
15
- isAiSuggestionsFeatureEnabled: d,
16
- onEdit: l,
17
- templateInstance: t
15
+ isAiSuggestionsFeatureEnabled: a,
16
+ onEdit: m,
17
+ templateInstance: o
18
18
  }) => {
19
- const e = t.fields, y = e.every((s) => !s.value), f = e.some((s) => !s.value), c = e.length > 0, [i, r] = v(!0), {
20
- getAiSuggestions: h
21
- } = D();
22
- return /* @__PURE__ */ a(E, {
23
- children: [/* @__PURE__ */ o(V, {
19
+ const i = o.fields, y = i.every((s) => !s.value), f = i.some((s) => !s.value), c = i.length > 0, [e, r] = D(!0), {
20
+ getAiSuggestions: v
21
+ } = V(), E = () => {
22
+ m(o), v(o.templateKey, i);
23
+ };
24
+ return /* @__PURE__ */ d(h, {
25
+ children: [/* @__PURE__ */ t(H, {
24
26
  areAiSuggestionsAvailable: p,
25
- canEdit: !0,
26
- isAiSuggestionsFeatureEnabled: d,
27
- onAutofill: () => {
28
- l(t), h(t.templateKey, e);
29
- },
30
- onEdit: () => l(t),
31
- templateName: t == null ? void 0 : t.displayName
32
- }), /* @__PURE__ */ o(m, {
27
+ canEdit: o.canEdit,
28
+ isAiSuggestionsFeatureEnabled: a,
29
+ onAutofill: E,
30
+ onEdit: () => m(o),
31
+ templateName: o == null ? void 0 : o.displayName
32
+ }), /* @__PURE__ */ t(l, {
33
33
  className: n.topDivider
34
- }), i && y ? /* @__PURE__ */ o(b, {
34
+ }), e && y ? /* @__PURE__ */ t(A, {
35
35
  isAnyEmptyValueHidden: c,
36
- isBoxAiSuggestionsFeatureEnabled: d,
36
+ isBoxAiSuggestionsFeatureEnabled: a,
37
37
  level: "instance",
38
38
  onShowEmptyValues: () => r(!1)
39
- }) : /* @__PURE__ */ a(u, {
40
- children: [/* @__PURE__ */ o(A, {
41
- shouldHideEmptyValues: i,
42
- templateInstance: t
43
- }), f && /* @__PURE__ */ a(u, {
44
- children: [/* @__PURE__ */ o(m, {
39
+ }) : /* @__PURE__ */ d(u, {
40
+ children: [/* @__PURE__ */ t(S, {
41
+ shouldHideEmptyValues: e,
42
+ templateInstance: o
43
+ }), f && /* @__PURE__ */ d(u, {
44
+ children: [/* @__PURE__ */ t(l, {
45
45
  className: n.bottomDivider
46
- }), /* @__PURE__ */ o(S, {
47
- isAnyEmptyValueHidden: i,
46
+ }), /* @__PURE__ */ t(b, {
47
+ isAnyEmptyValueHidden: e,
48
48
  onHideEmptyValues: () => r(!0),
49
49
  onShowEmptyValues: () => r(!1)
50
50
  })]
@@ -53,5 +53,5 @@ const H = "_topDivider_tzhlb_1", _ = "_bottomDivider_tzhlb_5", n = {
53
53
  });
54
54
  };
55
55
  export {
56
- B as MetadataInstance
56
+ K as MetadataInstance
57
57
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/metadata-editor",
3
- "version": "0.65.0",
3
+ "version": "0.65.1",
4
4
  "peerDependencies": {
5
5
  "@ariakit/react": "0.4.5",
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": "9210e9b3a6f169b12238b78e4c4060c1e228cd70"
56
+ "gitHead": "b3c8f235ca17a93a637e7f0adbd794c167d54795"
57
57
  }
@@ -24,6 +24,8 @@ declare const customTemplateInstance: MetadataTemplateInstance;
24
24
  declare const customTemplateInstanceWithoutEmptyValues: MetadataTemplateInstance;
25
25
  declare const emptyCustomTemplateInstance: MetadataTemplateInstance;
26
26
  declare const customTemplateInstanceWithAllFieldsEmpty: MetadataTemplateInstance;
27
+ declare const templateInstanceWithoutEditPermissions: MetadataTemplateInstance;
28
+ declare const customTemplateInstanceWithoutEditPermissions: MetadataTemplateInstance;
27
29
  declare const templateInstancesList: MetadataTemplateInstance[];
28
30
  declare const allFieldsWithAiSuggestions: MetadataTemplateField[];
29
31
  declare const allFieldsSuggestions: AutofillSuggestions;
@@ -33,4 +35,4 @@ declare const firstTemplateInstanceFieldsWithSuggestions: MetadataTemplateField[
33
35
  declare const secondTemplateInstance: MetadataTemplate;
34
36
  declare const secondTemplateSuggestions: AutofillSuggestions;
35
37
  declare const secondTemplateInstanceFieldsWithSuggestions: MetadataTemplateField[];
36
- export { allFieldsTemplate, allFieldsTemplateInstance, customTemplate, customTemplateInstance, customTemplateInstanceWithAllFieldsEmpty, customTemplateInstanceWithoutEmptyValues, dateField, emptyCustomTemplateInstance, emptyTemplateInstance, enumField, fields, floatField, hiddenField, multiSelectField, noFieldsTemplate, nonHiddenFieldsTemplate, nonHiddenFieldsWithValuesTemplate, noValueField, stringField, taxonomySingleSelectSingleLevelField, taxonomyMultiSelectSingleLevelField, templateInstancesList, templateInstanceWithAllFieldsEmpty, templateInstanceWithoutEmptyValues, templateOptions, templates, allFieldsWithAiSuggestions, allFieldsSuggestions, firstTemplateInstance, firstTemplateInstanceFieldsWithSuggestions, secondTemplateInstance, firstTemplateSuggestions, secondTemplateSuggestions, secondTemplateInstanceFieldsWithSuggestions, };
38
+ export { allFieldsSuggestions, allFieldsTemplate, allFieldsTemplateInstance, allFieldsWithAiSuggestions, customTemplate, customTemplateInstance, customTemplateInstanceWithAllFieldsEmpty, customTemplateInstanceWithoutEditPermissions, customTemplateInstanceWithoutEmptyValues, dateField, emptyCustomTemplateInstance, emptyTemplateInstance, enumField, fields, firstTemplateInstance, firstTemplateInstanceFieldsWithSuggestions, firstTemplateSuggestions, floatField, hiddenField, multiSelectField, noFieldsTemplate, nonHiddenFieldsTemplate, nonHiddenFieldsWithValuesTemplate, noValueField, secondTemplateInstance, secondTemplateInstanceFieldsWithSuggestions, secondTemplateSuggestions, stringField, taxonomyMultiSelectSingleLevelField, taxonomySingleSelectSingleLevelField, templateInstancesList, templateInstanceWithAllFieldsEmpty, templateInstanceWithoutEditPermissions, templateInstanceWithoutEmptyValues, templateOptions, templates, };