@box/metadata-editor 0.93.2 → 0.94.0

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,59 +1,75 @@
1
- import { useFormikContext as w, getIn as I, Field as K } from "formik";
2
- import { forwardRef as M } from "react";
1
+ import { ComboboxWithApiTreeView as K } from "@box/combobox-with-api";
2
+ import { useFormikContext as W, getIn as $, Field as j } from "formik";
3
+ import { forwardRef as D } from "react";
3
4
  import { useIntl as R } from "react-intl";
4
- import $ from "../../../../messages.js";
5
- import { ComboboxWithApiPagination as j } from "../../../combobox-with-api-pagination/combobox-with-api-pagination.js";
6
- import { g as A } from "../../../../../../chunks/utils2.js";
5
+ import q from "../../../../messages.js";
6
+ import { ComboboxWithApiPagination as z } from "../../../combobox-with-api-pagination/combobox-with-api-pagination.js";
7
+ import { g as x } from "../../../../../../chunks/utils2.js";
7
8
  import { jsx as e } from "react/jsx-runtime";
8
- const E = /* @__PURE__ */ M(({
9
- description: l,
10
- disableForm: s,
11
- isAiSuggestionApplied: d,
12
- fieldNamePrefix: r,
13
- label: n,
14
- portalElement: p,
15
- taxonomyOptionsFetcher: c,
16
- updateModePrefix: u,
17
- className: f
18
- }, g) => {
19
- const h = R(), a = `${u ?? r}.value`, {
20
- setFieldValue: F,
21
- values: i
22
- } = w(), {
9
+ const U = /* @__PURE__ */ D(({
10
+ description: i,
11
+ disableForm: l,
12
+ isAiSuggestionApplied: u,
13
+ fieldNamePrefix: p,
14
+ label: r,
15
+ portalElement: s,
16
+ taxonomyOptionsFetcher: y,
17
+ updateModePrefix: F,
18
+ className: c,
19
+ isMultilevelTaxonomyFieldEnabled: C
20
+ }, d) => {
21
+ const b = R(), n = `${F ?? p}.value`, {
22
+ setFieldValue: h,
23
+ values: f
24
+ } = W(), {
23
25
  metadata: {
24
- templateKey: v,
25
- scope: x
26
+ templateKey: k,
27
+ scope: M
26
28
  }
27
- } = i, y = I(i, r), {
28
- key: b,
29
+ } = f, P = $(f, p), {
30
+ key: T,
29
31
  optionsRules: {
30
- multiSelect: m,
32
+ multiSelect: a,
31
33
  selectableLevels: t
32
- }
33
- } = y, k = (o) => c(x, v, b, t == null ? void 0 : t[0], o), C = (o) => m || !(o != null && o.length) ? h.formatMessage($.taxonomyPlaceholder) : void 0;
34
+ },
35
+ levels: w
36
+ } = P, I = C && (t == null ? void 0 : t.some((o) => o > 1)), g = (o) => y(M, k, T, t == null ? void 0 : t[0], o), v = (o) => a || !(o != null && o.length) ? b.formatMessage(q.taxonomyPlaceholder) : void 0;
34
37
  return /* @__PURE__ */ e("div", {
35
- "data-testid": `${n}-field`,
38
+ "data-testid": `${r}-field`,
36
39
  onKeyDown: (o) => o.stopPropagation(),
37
40
  role: "presentation",
38
- children: /* @__PURE__ */ e(K, {
39
- name: a,
41
+ children: /* @__PURE__ */ e(j, {
42
+ name: n,
40
43
  children: ({
41
44
  field: o
42
- }) => /* @__PURE__ */ e(j, {
43
- ref: g,
44
- className: f,
45
- defaultFetcher: k,
46
- disabled: s,
47
- label: A(n, l, d),
48
- multiselect: m,
49
- onValueChange: (P) => F(a, P),
50
- placeholder: C(o.value),
51
- portalElement: p,
45
+ }) => I ? /* @__PURE__ */ e(K, {
46
+ ref: d,
47
+ className: c,
48
+ defaultFetcher: g,
49
+ disabled: l,
50
+ label: x(r, i, u),
51
+ levels: w,
52
+ multiselect: a,
53
+ onValueChange: (m) => h(n, m),
54
+ placeholder: v(o.value),
55
+ portalElement: s,
56
+ selectableLevels: t,
57
+ value: o.value
58
+ }) : /* @__PURE__ */ e(z, {
59
+ ref: d,
60
+ className: c,
61
+ defaultFetcher: g,
62
+ disabled: l,
63
+ label: x(r, i, u),
64
+ multiselect: a,
65
+ onValueChange: (m) => h(n, m),
66
+ placeholder: v(o.value),
67
+ portalElement: s,
52
68
  value: o.value
53
69
  })
54
70
  })
55
71
  });
56
72
  });
57
73
  export {
58
- E as MetadataTaxonomyField
74
+ U as MetadataTaxonomyField
59
75
  };
@@ -1,80 +1,84 @@
1
- import I from "clsx";
2
- import { useFormikContext as v } from "formik";
3
- import C from "lodash/isUndefined";
4
- import { forwardRef as P, useState as N, useCallback as R, useEffect as T, useMemo as U } from "react";
5
- import { AiSuggestionField as b } from "./components/ai-suggestion-field/ai-suggestion-field.js";
6
- import { UpdateModeFieldWrapper as j } from "./components/update-mode-field-wrapper/update-mode-field-wrapper.js";
7
- import { editorFieldTypes as $ } from "./editor-field-types.js";
1
+ import C from "clsx";
2
+ import { useFormikContext as E } from "formik";
3
+ import P from "lodash/isUndefined";
4
+ import { forwardRef as R, useState as V, useCallback as U, useEffect as j, useMemo as T } from "react";
5
+ import { AiSuggestionField as $ } from "./components/ai-suggestion-field/ai-suggestion-field.js";
6
+ import { UpdateModeFieldWrapper as b } from "./components/update-mode-field-wrapper/update-mode-field-wrapper.js";
7
+ import { editorFieldTypes as B } from "./editor-field-types.js";
8
8
  import { s as n } from "../../../../chunks/utils2.js";
9
- import { jsx as a, jsxs as B } from "react/jsx-runtime";
10
- const X = /* @__PURE__ */ P(({
9
+ import { jsx as a, jsxs as q } from "react/jsx-runtime";
10
+ const Y = /* @__PURE__ */ R(({
11
11
  disableForm: g,
12
12
  portalElement: c,
13
13
  field: e,
14
- index: V,
15
- taxonomyOptionsFetcher: m
16
- }, f) => {
17
- var M;
14
+ index: W,
15
+ taxonomyOptionsFetcher: m,
16
+ isMultilevelTaxonomyFieldEnabled: f
17
+ }, S) => {
18
+ var N;
18
19
  const {
19
- setFieldValue: S
20
- } = v(), [A, p] = N(!0), [r, y] = N(!1), l = $[e.type], {
20
+ setFieldValue: A
21
+ } = E(), [y, p] = V(!0), [r, h] = V(!1), l = B[e.type], {
21
22
  aiSuggestion: t,
22
- type: h,
23
+ type: x,
23
24
  value: d
24
- } = e, W = l && !e.hidden, k = !C(e.updateMode), s = `metadata.fields[${V}]`, w = e.type === "taxonomy" && ((M = e.optionsRules) == null ? void 0 : M.multiSelect), i = t && A, E = I({
25
+ } = e, k = l && !e.hidden, v = !P(e.updateMode), s = `metadata.fields[${W}]`, w = e.type === "taxonomy" && ((N = e.optionsRules) == null ? void 0 : N.multiSelect), i = t && y, I = C({
25
26
  [n.suggestionApplied]: r,
26
27
  [n.hasSuggestion]: i,
27
- [n.dateField]: h === "date"
28
- }), o = R((u) => {
29
- S(`${s}.value`, u), p(!1), y(!0);
30
- }, [s, S]);
31
- T(() => {
28
+ [n.dateField]: x === "date"
29
+ }), o = U((u) => {
30
+ A(`${s}.value`, u), p(!1), h(!0);
31
+ }, [s, A]);
32
+ j(() => {
32
33
  !i || d || o(t);
33
34
  }, [i, t, o]);
34
- const x = U(() => t && d === t, [A]), F = () => {
35
- r && y(!1), x && p(!1);
35
+ const F = T(() => t && d === t, [y]), M = () => {
36
+ r && h(!1), F && p(!1);
36
37
  };
37
- return W ? k ? /* @__PURE__ */ a(j, {
38
+ return k ? v ? /* @__PURE__ */ a(b, {
38
39
  fieldNamePrefix: s,
39
40
  fieldType: e.type,
40
41
  isTaxonomyMultiSelect: w,
41
42
  children: /* @__PURE__ */ a(l, {
42
- ref: f,
43
+ ref: S,
43
44
  description: e.description,
44
45
  disableForm: g,
45
46
  fieldNamePrefix: s,
46
47
  isAiSuggestionApplied: !1,
48
+ isMultilevelTaxonomyFieldEnabled: f,
47
49
  label: e.displayName,
48
- onValueEdited: F,
50
+ levels: e.levels,
51
+ onValueEdited: M,
49
52
  portalElement: c,
50
53
  taxonomyOptionsFetcher: m
51
54
  })
52
- }, e.key) : /* @__PURE__ */ B("div", {
55
+ }, e.key) : /* @__PURE__ */ q("div", {
53
56
  className: n.fieldWrapper,
54
57
  children: [/* @__PURE__ */ a(l, {
55
- ref: f,
56
- className: E,
58
+ ref: S,
59
+ className: I,
57
60
  description: e.description,
58
61
  disableForm: g,
59
62
  fieldNamePrefix: s,
60
63
  isAiSuggestionApplied: r,
64
+ isMultilevelTaxonomyFieldEnabled: f,
61
65
  label: e.displayName,
62
- onValueEdited: F,
66
+ onValueEdited: M,
63
67
  portalElement: c,
64
68
  taxonomyOptionsFetcher: m
65
- }), i && /* @__PURE__ */ a(b, {
69
+ }), i && /* @__PURE__ */ a($, {
66
70
  aiSuggestion: t,
67
- isSameValue: x,
71
+ isSameValue: F,
68
72
  onAiSuggestionAppend: () => {
69
73
  const u = [...new Set([d, t].flat().filter(Boolean))];
70
74
  o(u);
71
75
  },
72
76
  onAiSuggestionIgnore: () => p(!1),
73
77
  onAiSuggestionReplace: () => o(t),
74
- type: h
78
+ type: x
75
79
  })]
76
80
  }, e.key) : null;
77
81
  });
78
82
  export {
79
- X as MetadataEditorFieldWrapper
83
+ Y as MetadataEditorFieldWrapper
80
84
  };
@@ -1,121 +1,123 @@
1
- import _ from "clsx";
2
- import { Formik as $, Form as J } from "formik";
3
- import { useState as F, useEffect as M, useRef as q, useMemo as z } from "react";
4
- import { TEMPLATE_CUSTOM_PROPERTIES as G } from "../../../../constants.js";
5
- import { useAutofill as H } from "../../../../utils/autofill-context.js";
6
- import { TemplateInstance as Q } from "../../../metadata-editor-fields/metadata-editor-fields.js";
7
- import { MetadataEmptyState as X } from "../../../metadata-empty-state/metadata-empty-state.js";
8
- import { UnsavedChangesModal as Y } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
9
- import { AutofillOverlay as Z } from "../autofill-overlay/autofill-overlay.js";
10
- import { CustomInstance as I } from "../custom-instance/custom-instance.js";
11
- import { DeleteConfirmationModal as T } from "../delete-confirmation-modal/delete-confirmation-modal.js";
12
- import { c as oo } from "../../../../../../chunks/utils.js";
13
- import { s as e, M as ro } from "../../../../../../chunks/metadata-instance-form-card-wrapper.js";
1
+ import $ from "clsx";
2
+ import { Formik as J, Form as q } from "formik";
3
+ import { useState as M, useEffect as E, useRef as z, useMemo as G } from "react";
4
+ import { TEMPLATE_CUSTOM_PROPERTIES as H } from "../../../../constants.js";
5
+ import { useAutofill as Q } from "../../../../utils/autofill-context.js";
6
+ import { TemplateInstance as X } from "../../../metadata-editor-fields/metadata-editor-fields.js";
7
+ import { MetadataEmptyState as Y } from "../../../metadata-empty-state/metadata-empty-state.js";
8
+ import { UnsavedChangesModal as Z } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
9
+ import { AutofillOverlay as I } from "../autofill-overlay/autofill-overlay.js";
10
+ import { CustomInstance as T } from "../custom-instance/custom-instance.js";
11
+ import { DeleteConfirmationModal as oo } from "../delete-confirmation-modal/delete-confirmation-modal.js";
12
+ import { c as ro } from "../../../../../../chunks/utils.js";
13
+ import { s as m, M as to } from "../../../../../../chunks/metadata-instance-form-card-wrapper.js";
14
14
  import { jsx as t, jsxs as c } from "react/jsx-runtime";
15
- const Fo = (E) => {
15
+ const Mo = (y) => {
16
16
  const {
17
17
  areAiSuggestionsAvailable: S,
18
- customRef: i,
19
- isLargeFile: y,
20
- errorCode: m,
18
+ customRef: a,
19
+ isLargeFile: D,
20
+ errorCode: n,
21
21
  isAiSuggestionsFeatureEnabled: s,
22
- isBetaLanguageEnabled: D,
23
- isDeleteButtonDisabled: O,
24
- isUnsavedChangesModalOpen: b = !1,
25
- MetadataInstanceFormCustomWrapper: v,
22
+ isBetaLanguageEnabled: O,
23
+ isDeleteButtonDisabled: b,
24
+ isMultilevelTaxonomyFieldEnabled: l,
25
+ isUnsavedChangesModalOpen: v = !1,
26
+ MetadataInstanceFormCustomWrapper: A,
26
27
  selectedTemplateInstance: o,
27
- onCancel: A,
28
- onDelete: x,
29
- onDiscardUnsavedChanges: L,
30
- onSubmit: N,
28
+ onCancel: x,
29
+ onDelete: L,
30
+ onDiscardUnsavedChanges: N,
31
+ onSubmit: P,
31
32
  setIsUnsavedChangesModalOpen: f,
32
- taxonomyOptionsFetcher: l
33
- } = E, P = v ?? ro, [R, u] = F(!1), {
34
- isFetchingSuggestions: a,
33
+ taxonomyOptionsFetcher: u
34
+ } = y, R = A ?? to, [U, d] = M(!1), {
35
+ isFetchingSuggestions: i,
35
36
  isLongLoading: g,
36
- getAiSuggestions: U,
37
- clearState: d,
38
- suggestions: B
39
- } = H();
40
- M(() => () => {
41
- d();
42
- }, [d, o == null ? void 0 : o.id]);
43
- const p = (o == null ? void 0 : o.templateKey) === G, w = async (r) => {
44
- await N(r, oo(r, o));
45
- }, K = (r) => {
46
- r ? f(!0) : A();
47
- }, W = () => {
48
- u(!0);
49
- }, j = {
37
+ getAiSuggestions: B,
38
+ clearState: p,
39
+ suggestions: w
40
+ } = Q();
41
+ E(() => () => {
42
+ p();
43
+ }, [p, o == null ? void 0 : o.id]);
44
+ const h = (o == null ? void 0 : o.templateKey) === H, K = async (r) => {
45
+ await P(r, ro(r, o));
46
+ }, W = (r) => {
47
+ r ? f(!0) : x();
48
+ }, j = () => {
49
+ d(!0);
50
+ }, k = {
50
51
  metadata: {
51
52
  ...o
52
53
  }
53
- }, h = q(null), [C, k] = F(null);
54
- M(() => {
55
- k(i ?? h.current);
56
- }, [i, o == null ? void 0 : o.templateKey, o == null ? void 0 : o.scope]);
57
- const V = z(() => {
54
+ }, C = z(null), [F, V] = M(null);
55
+ E(() => {
56
+ V(a ?? C.current);
57
+ }, [a, o == null ? void 0 : o.templateKey, o == null ? void 0 : o.scope]);
58
+ const _ = G(() => {
58
59
  const r = (o == null ? void 0 : o.fields.length) === 0;
59
- if (p)
60
- return /* @__PURE__ */ t(I, {
61
- isLoading: a
60
+ if (h)
61
+ return /* @__PURE__ */ t(T, {
62
+ isLoading: i
62
63
  });
63
64
  if (r)
64
- return /* @__PURE__ */ t(X, {
65
+ return /* @__PURE__ */ t(Y, {
65
66
  isBoxAiSuggestionsFeatureEnabled: s,
66
67
  level: "instance"
67
68
  });
68
- const n = !!(a || m);
69
+ const e = !!(i || n);
69
70
  return /* @__PURE__ */ c("div", {
70
- className: _(e.metadataInstanceFormContent, n && e.showOverlay),
71
- children: [/* @__PURE__ */ t(Z, {
72
- errorCode: m,
73
- isFetchingSuggestions: a,
71
+ className: $(m.metadataInstanceFormContent, e && m.showOverlay),
72
+ children: [/* @__PURE__ */ t(I, {
73
+ errorCode: n,
74
+ isFetchingSuggestions: i,
74
75
  isLongLoading: g
75
- }), /* @__PURE__ */ t(Q, {
76
- disableForm: a,
77
- portalElement: i ?? C,
78
- taxonomyOptionsFetcher: l
76
+ }), /* @__PURE__ */ t(X, {
77
+ disableForm: i,
78
+ isMultilevelTaxonomyFieldEnabled: l,
79
+ portalElement: a ?? F,
80
+ taxonomyOptionsFetcher: u
79
81
  })]
80
82
  });
81
- }, [o == null ? void 0 : o.fields.length, p, a, g, i, C, l, s]);
82
- return /* @__PURE__ */ t($, {
83
- initialValues: j,
84
- onSubmit: w,
83
+ }, [o == null ? void 0 : o.fields.length, h, i, g, a, F, u, s, l, n]);
84
+ return /* @__PURE__ */ t(J, {
85
+ initialValues: k,
86
+ onSubmit: K,
85
87
  children: ({
86
88
  values: r,
87
- dirty: n
88
- }) => /* @__PURE__ */ c(J, {
89
- children: [/* @__PURE__ */ t(P, {
89
+ dirty: e
90
+ }) => /* @__PURE__ */ c(q, {
91
+ children: [/* @__PURE__ */ t(R, {
90
92
  areAiSuggestionsAvailable: S,
91
- className: e.metadataInstanceForm,
92
- formRef: h,
93
+ className: m.metadataInstanceForm,
94
+ formRef: C,
93
95
  formValues: r,
94
- getAiSuggestions: U,
95
- handleCancel: K,
96
- handleDelete: W,
96
+ getAiSuggestions: B,
97
+ handleCancel: W,
98
+ handleDelete: j,
97
99
  isAiSuggestionsFeatureEnabled: s,
98
- isBetaLanguageEnabled: D,
99
- isDeleteButtonDisabled: O,
100
- isFetchingSuggestions: a,
101
- isFormDirty: n,
102
- isLargeFile: y,
100
+ isBetaLanguageEnabled: O,
101
+ isDeleteButtonDisabled: b,
102
+ isFetchingSuggestions: i,
103
+ isFormDirty: e,
104
+ isLargeFile: D,
103
105
  selectedTemplateInstance: o,
104
- suggestions: B,
105
- children: o && V
106
- }), /* @__PURE__ */ t(Y, {
106
+ suggestions: w,
107
+ children: o && _
108
+ }), /* @__PURE__ */ t(Z, {
107
109
  onBackToEdit: () => f(!1),
108
- onDiscardChanges: L,
109
- open: b
110
- }), /* @__PURE__ */ t(T, {
111
- onConfirm: () => x(o),
112
- onDismiss: () => u(!1),
113
- open: R,
110
+ onDiscardChanges: N,
111
+ open: v
112
+ }), /* @__PURE__ */ t(oo, {
113
+ onConfirm: () => L(o),
114
+ onDismiss: () => d(!1),
115
+ open: U,
114
116
  templateName: o == null ? void 0 : o.displayName
115
117
  })]
116
118
  })
117
119
  }, `${o == null ? void 0 : o.scope}.${o == null ? void 0 : o.templateKey}`);
118
120
  };
119
121
  export {
120
- Fo as MetadataInstanceForm
122
+ Mo as MetadataInstanceForm
121
123
  };
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@box/metadata-editor",
3
- "version": "0.93.2",
3
+ "version": "0.94.0",
4
4
  "peerDependencies": {
5
5
  "@ariakit/react": "0.4.15",
6
6
  "@box/blueprint-web": "^7.30.3",
7
7
  "@box/blueprint-web-assets": "^4.21.0",
8
+ "@box/combobox-with-api": "^0.26.0",
8
9
  "formik": "^2.0.3",
9
10
  "lodash": "^4.17.15",
10
11
  "react": "^17.0.0 || ^18.0.0",
@@ -14,8 +15,8 @@
14
15
  "devDependencies": {
15
16
  "@ariakit/react": "0.4.15",
16
17
  "@box/babel-plugin-target-attributes": "1.3.0",
17
- "@box/blueprint-web": "^9.18.6",
18
- "@box/blueprint-web-assets": "^4.34.0",
18
+ "@box/blueprint-web": "^9.18.7",
19
+ "@box/blueprint-web-assets": "^4.35.0",
19
20
  "@box/storybook-utils": "^0.8.3",
20
21
  "@testing-library/react": "^15.0.6",
21
22
  "react": "^18.3.0",
@@ -53,5 +54,5 @@
53
54
  "**/*.css"
54
55
  ],
55
56
  "license": "SEE LICENSE IN LICENSE",
56
- "gitHead": "d7b0622598d060b689dc20c6767f6f43ea081211"
57
+ "gitHead": "5eb52096a2a42a1994eae25786776f8853ca1cb5"
57
58
  }
@@ -1,6 +1,7 @@
1
- import { BaseOptionType, FetcherResponse, PaginationQueryInput } from '../../../combobox-with-api-pagination/types';
1
+ import { TreeOptionType, TreeQueryInput } from '@box/combobox-with-api';
2
+ import { FetcherResponse, PaginationQueryInput } from '../../../combobox-with-api-pagination/types';
2
3
  import { MetadataFieldProps } from '../../types';
3
4
  export type MetadataTaxonomyFieldProps = Omit<MetadataFieldProps, 'portalElement'> & {
4
5
  portalElement?: HTMLElement | (() => HTMLElement);
5
6
  };
6
- export type TaxonomyOptionsFetcher = (scope: string, templateKey: string, fieldKey: string, level: number, options: PaginationQueryInput) => Promise<FetcherResponse<BaseOptionType>>;
7
+ export type TaxonomyOptionsFetcher = (scope: string, templateKey: string, fieldKey: string, level: number, options: PaginationQueryInput | TreeQueryInput) => Promise<FetcherResponse<TreeOptionType>>;
@@ -1,9 +1,11 @@
1
+ import { Level } from '@box/combobox-with-api';
1
2
  import { MetadataTemplateField, MetadataTemplateFieldOption } from '../../types';
2
3
  import { TaxonomyOptionsFetcher } from './components/metadata-taxonomy-field/types';
3
4
  export type TemplateInstanceProps = {
4
5
  disableForm: boolean;
5
6
  portalElement?: HTMLElement;
6
7
  taxonomyOptionsFetcher: TaxonomyOptionsFetcher;
8
+ isMultilevelTaxonomyFieldEnabled: boolean;
7
9
  };
8
10
  export type MetadataFieldProps = {
9
11
  description?: string | null;
@@ -16,7 +18,9 @@ export type MetadataFieldProps = {
16
18
  options?: Array<MetadataTemplateFieldOption>;
17
19
  taxonomyOptionsFetcher: TaxonomyOptionsFetcher;
18
20
  className?: string;
21
+ levels?: Level[];
19
22
  onValueEdited: () => void;
23
+ isMultilevelTaxonomyFieldEnabled: boolean;
20
24
  };
21
25
  export type MetadataEditorFieldWrapperProps = TemplateInstanceProps & {
22
26
  field: MetadataTemplateField;
@@ -10,6 +10,8 @@ export type MetadataInstanceFormProps = {
10
10
  isBetaLanguageEnabled: boolean;
11
11
  isDeleteButtonDisabled: boolean;
12
12
  isLargeFile: boolean;
13
+ /** When true enables the multilevel taxonomy filed component with tree selection */
14
+ isMultilevelTaxonomyFieldEnabled: boolean;
13
15
  isUnsavedChangesModalOpen: boolean;
14
16
  selectedTemplateInstance: MetadataTemplateInstance | null;
15
17
  onCancel: () => void;
@@ -1,4 +1,9 @@
1
1
  import { AutofillSuggestions, MetadataTemplate, MetadataTemplateField, MetadataTemplateInstance, MetadataTemplateOption } from '../types';
2
+ declare const taxonomyLevels: {
3
+ displayName: string;
4
+ description: string;
5
+ level: number;
6
+ }[];
2
7
  declare const stringField: MetadataTemplateField;
3
8
  declare const dateField: MetadataTemplateField;
4
9
  declare const enumField: MetadataTemplateField;
@@ -6,6 +11,8 @@ declare const floatField: MetadataTemplateField;
6
11
  declare const multiSelectField: MetadataTemplateField;
7
12
  declare const taxonomySingleSelectSingleLevelField: MetadataTemplateField;
8
13
  declare const taxonomyMultiSelectSingleLevelField: MetadataTemplateField;
14
+ declare const taxonomySingleSelectMultiLevelField: MetadataTemplateField;
15
+ declare const taxonomyMultiSelectMultiLevelField: MetadataTemplateField;
9
16
  declare const taxonomySingleSelectSingleLevelFieldWithValue: MetadataTemplateField;
10
17
  declare const taxonomyMultiSelectSingleLevelFieldWithValue: MetadataTemplateField;
11
18
  declare const hiddenField: MetadataTemplateField;
@@ -43,4 +50,4 @@ declare const firstTemplateInstanceFieldsWithSuggestions: MetadataTemplateField[
43
50
  declare const secondTemplateInstance: MetadataTemplate;
44
51
  declare const secondTemplateSuggestions: AutofillSuggestions;
45
52
  declare const secondTemplateInstanceFieldsWithSuggestions: MetadataTemplateField[];
46
- export { allFieldsSuggestions, allFieldsTemplate, allFieldsTemplateInstance, allFieldsWithAiSuggestions, customTemplate, customTemplateInstance, customTemplateInstanceWithAllFieldsEmpty, customTemplateInstanceWithoutEditPermissions, customTemplateInstanceWithoutEmptyValues, dateField, dateSuggestionTemplateInstance, emptyCustomTemplateInstance, emptyTemplateInstance, enumField, fields, firstTemplateInstance, firstTemplateInstanceFieldsWithSuggestions, firstTemplateSuggestions, floatField, floatInstanceField, hiddenField, hiddenTemplate, hiddenTemplateInstance, multiSelectField, noFieldsTemplate, nonHiddenFieldsTemplate, nonHiddenFieldsWithValuesTemplate, noValueField, onlyRequiredPropsTemplateInstance, secondTemplateInstance, secondTemplateInstanceFieldsWithSuggestions, secondTemplateSuggestions, stringField, taxonomyMultiSelectSingleLevelField, taxonomyMultiSelectSingleLevelFieldWithValue, taxonomySingleSelectSingleLevelField, taxonomySingleSelectSingleLevelFieldWithValue, templateInstancesList, templateInstanceWithAllFieldsEmpty, templateInstanceWithoutEditPermissions, templateInstanceWithoutEmptyValues, templateInstanceWithSomeFieldsEmpty, templateOptions, templates, };
53
+ export { allFieldsSuggestions, allFieldsTemplate, allFieldsTemplateInstance, allFieldsWithAiSuggestions, customTemplate, customTemplateInstance, customTemplateInstanceWithAllFieldsEmpty, customTemplateInstanceWithoutEditPermissions, customTemplateInstanceWithoutEmptyValues, dateField, dateSuggestionTemplateInstance, emptyCustomTemplateInstance, emptyTemplateInstance, enumField, fields, firstTemplateInstance, firstTemplateInstanceFieldsWithSuggestions, firstTemplateSuggestions, floatField, floatInstanceField, hiddenField, hiddenTemplate, hiddenTemplateInstance, multiSelectField, noFieldsTemplate, nonHiddenFieldsTemplate, nonHiddenFieldsWithValuesTemplate, noValueField, onlyRequiredPropsTemplateInstance, secondTemplateInstance, secondTemplateInstanceFieldsWithSuggestions, secondTemplateSuggestions, stringField, taxonomyLevels, taxonomyMultiSelectMultiLevelField, taxonomyMultiSelectSingleLevelField, taxonomyMultiSelectSingleLevelFieldWithValue, taxonomySingleSelectMultiLevelField, taxonomySingleSelectSingleLevelField, taxonomySingleSelectSingleLevelFieldWithValue, templateInstancesList, templateInstanceWithAllFieldsEmpty, templateInstanceWithoutEditPermissions, templateInstanceWithoutEmptyValues, templateInstanceWithSomeFieldsEmpty, templateOptions, templates, };
@@ -1,3 +1,4 @@
1
+ import { Level } from '@box/combobox-with-api';
1
2
  import { BaseOptionType } from './components/combobox-with-api-pagination/types';
2
3
  export type { FormValues } from './components/metadata-instance-editor/types';
3
4
  export type MetadataEmptyStateProps = {
@@ -41,6 +42,7 @@ export type MetadataTemplateField = {
41
42
  namespace?: string;
42
43
  taxonomyKey?: string;
43
44
  taxonomyId?: string;
45
+ levels?: Level[];
44
46
  type: MetadataTemplateFieldType;
45
47
  updateMode?: MetadataUpdateMode;
46
48
  value?: MetadataFormFieldValue;