@box/metadata-template-editor 2.0.0 → 2.1.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.
@@ -8,14 +8,14 @@ import '../styles/chip.css';var a = {
8
8
  selected: "_selected_x2zx9_12"
9
9
  }, o = /* @__PURE__ */ function(e) {
10
10
  return e.Selected = "selected", e.Unselected = "unselected", e;
11
- }({}), s = ({ value: s, selected: c = !1 }) => {
12
- let { formatMessage: l } = n(), u = l(c ? e.chipSelected : e.chipNotSelected);
11
+ }({}), s = ({ value: o, selected: s = !1 }) => {
12
+ let { formatMessage: c } = n(), l = c(s ? e.chipSelected : e.chipNotSelected);
13
13
  return /* @__PURE__ */ r(t, {
14
14
  as: "span",
15
- className: i(a.chip, { [a.selected]: c }),
16
- "data-state": c ? o.Selected : o.Unselected,
17
- "aria-label": `${s}: ${u}`,
18
- children: s
15
+ className: i(a.chip, { [a.selected]: s }),
16
+ "data-state": s ? "selected" : "unselected",
17
+ "aria-label": `${o}: ${l}`,
18
+ children: o
19
19
  });
20
20
  };
21
21
  export { o as n, s as t };
@@ -72,7 +72,7 @@ function fe({ field: e, index: t, maxIndex: n, isExpanded: r, onChangeField: i,
72
72
  })
73
73
  });
74
74
  }
75
- var M = /* @__PURE__ */ m(function({ fields: l, onChangeFields: m, onDeleteFieldAtIndex: x, onDuplicateField: C, taxonomyOptions: E, fetchTaxonomies: O, disabledFieldTypes: M, taxonomyInitialStateLabels: N, firstInvalidFieldIndex: P, submitAttemptCount: F, fieldExtensions: I, onValidationChange: L }, R) {
75
+ var M = /*#__PURE__*/ m(function({ fields: l, onChangeFields: m, onDeleteFieldAtIndex: x, onDuplicateField: C, taxonomyOptions: E, fetchTaxonomies: O, disabledFieldTypes: M, taxonomyInitialStateLabels: N, firstInvalidFieldIndex: P, submitAttemptCount: F, fieldExtensions: I, onValidationChange: L }, R) {
76
76
  let { formatMessage: z } = d(), B = r(), pe = c(O, E), V = y(null), H = y(null), U = y(new Set(l.map((e) => A(e)))), W = a(), G = y(null);
77
77
  g(() => {
78
78
  G.current = null;
@@ -27,7 +27,7 @@ import '../styles/metadata-template-editor.css';var C = {
27
27
  templateKey: "",
28
28
  fields: [],
29
29
  hidden: !1
30
- }, w = /* @__PURE__ */ m(function({ onCancel: m, onDirtyStateChange: w, onValidationChange: re, onSubmitError: ie, onTemplateLoad: T, taxonomyOptions: E, fetchTaxonomies: D, disabledFieldTypes: O, taxonomyInitialStateLabels: k, formId: A, hideActions: j = !1, fieldExtensions: M, ...N }, P) {
30
+ }, w = /*#__PURE__*/ m(function({ onCancel: m, onDirtyStateChange: w, onValidationChange: re, onSubmitError: ie, onTemplateLoad: T, taxonomyOptions: E, fetchTaxonomies: D, disabledFieldTypes: O, taxonomyInitialStateLabels: k, formId: A, hideActions: j = !1, fieldExtensions: M, ...N }, P) {
31
31
  let F = i(), { formatMessage: I } = te(), { addNotification: L } = ee(), R = N.mode === e.Edit, [z, B] = y(!1), [V, H] = y(!1), U = h(() => {
32
32
  z ? H(!0) : m?.();
33
33
  }, [z, m]);
@@ -1,3 +1,3 @@
1
1
  import { createContext as e, useContext as t } from "react";
2
- var n = /* @__PURE__ */ e({ disabledFieldTypes: [] }), r = () => t(n);
2
+ var n = /*#__PURE__*/ e({ disabledFieldTypes: [] }), r = () => t(n);
3
3
  export { n as EditorConfigContext, r as useEditorConfig };
@@ -2,7 +2,7 @@ import { jsx as e } from "react/jsx-runtime";
2
2
  import { createContext as t, useCallback as n, useContext as r, useMemo as i, useState as a } from "react";
3
3
  import o from "lodash/cloneDeep";
4
4
  import s from "lodash/set";
5
- var c = /* @__PURE__ */ t(null);
5
+ var c = /*#__PURE__*/ t(null);
6
6
  function l() {
7
7
  let e = r(c);
8
8
  if (!e) throw Error("useFieldConfigurator must be used within a FieldConfiguratorContext provider");
@@ -1,5 +1,5 @@
1
1
  import { createContext as e, useContext as t } from "react";
2
- var n = /* @__PURE__ */ e([]);
2
+ var n = /*#__PURE__*/ e([]);
3
3
  function r() {
4
4
  return t(n);
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { createContext as e, useContext as t } from "react";
2
- var n = /* @__PURE__ */ e({
2
+ var n = /*#__PURE__*/ e({
3
3
  options: [],
4
4
  status: "success",
5
5
  onSelectorOpen: () => {}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@box/metadata-template-editor",
3
- "version": "2.0.0",
3
+ "version": "2.1.2",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "peerDependencies": {
6
- "@box/blueprint-web": "^16.0.0",
7
- "@box/blueprint-web-assets": "^5.0.0",
6
+ "@box/blueprint-web": "^16.1.2",
7
+ "@box/blueprint-web-assets": "^5.2.0",
8
8
  "@dnd-kit/core": "^6.1.0",
9
9
  "@dnd-kit/sortable": "^8.0.0",
10
10
  "@dnd-kit/utilities": "^3.2.2",
@@ -17,10 +17,10 @@
17
17
  "yup": "^1.6.1"
18
18
  },
19
19
  "devDependencies": {
20
- "@box/blueprint-web": "^16.0.0",
21
- "@box/blueprint-web-assets": "^5.0.0",
22
- "@box/eslint-plugin-blueprint": "2.0.0",
23
- "@box/storybook-utils": "1.0.0",
20
+ "@box/blueprint-web": "^16.1.2",
21
+ "@box/blueprint-web-assets": "^5.2.0",
22
+ "@box/eslint-plugin-blueprint": "2.1.1",
23
+ "@box/storybook-utils": "1.1.2",
24
24
  "@dnd-kit/core": "^6.1.0",
25
25
  "@dnd-kit/sortable": "^8.0.0",
26
26
  "@dnd-kit/utilities": "^3.2.2",