@box/metadata-view 1.54.9 → 1.54.11

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.
Files changed (109) hide show
  1. package/dist/chunks/action-bar.js +48 -0
  2. package/dist/chunks/empty-state.js +24 -0
  3. package/dist/chunks/error-state.js +23 -0
  4. package/dist/chunks/filter-row.module.js +6 -8
  5. package/dist/chunks/filter-side-panel.js +65 -0
  6. package/dist/chunks/header.js +56 -0
  7. package/dist/chunks/inline-editing-cell.js +34 -0
  8. package/dist/chunks/item-action-menu.js +86 -0
  9. package/dist/chunks/metadata-grid.js +44 -0
  10. package/dist/chunks/metadata-location-field.js +35 -0
  11. package/dist/chunks/metadata-view.js +102 -0
  12. package/dist/chunks/pagination-controls.js +40 -0
  13. package/dist/chunks/table-row.js +72 -0
  14. package/dist/chunks/types.js +6 -11
  15. package/dist/chunks/types2.js +4 -0
  16. package/dist/chunks/zoom-button.js +20 -0
  17. package/dist/esm/index.js +29 -59
  18. package/dist/esm/lib/components/action-bar/action-bar.js +2 -62
  19. package/dist/esm/lib/components/action-bar/index.js +2 -4
  20. package/dist/esm/lib/components/action-bar/messages.js +22 -24
  21. package/dist/esm/lib/components/action-bar/zoom-button.js +2 -30
  22. package/dist/esm/lib/components/constants.js +14 -6
  23. package/dist/esm/lib/components/empty-state/empty-state.js +2 -30
  24. package/dist/esm/lib/components/empty-state/index.js +2 -4
  25. package/dist/esm/lib/components/empty-state/messages.js +10 -12
  26. package/dist/esm/lib/components/error-state/error-state.js +2 -31
  27. package/dist/esm/lib/components/error-state/index.js +2 -4
  28. package/dist/esm/lib/components/error-state/messages.js +10 -12
  29. package/dist/esm/lib/components/filter-row/advanced-field-content.js +30 -52
  30. package/dist/esm/lib/components/filter-row/advanced-filter-context.js +3 -6
  31. package/dist/esm/lib/components/filter-row/all-filters-chip.js +31 -49
  32. package/dist/esm/lib/components/filter-row/filter-row.js +35 -59
  33. package/dist/esm/lib/components/filter-row/form-filter-chip.js +84 -113
  34. package/dist/esm/lib/components/filter-row/index.js +6 -12
  35. package/dist/esm/lib/components/filter-row/initial-field-values.js +31 -51
  36. package/dist/esm/lib/components/filter-row/is-blank-or-not-blank-filter.js +2 -4
  37. package/dist/esm/lib/components/filter-row/is-filter-selected.js +37 -58
  38. package/dist/esm/lib/components/filter-row/messages.js +38 -40
  39. package/dist/esm/lib/components/filter-row/metadata-filter-chip.js +74 -103
  40. package/dist/esm/lib/components/filter-row/predefinedFilters/index.js +2 -6
  41. package/dist/esm/lib/components/filter-row/predefinedFilters/predefined-filter-options-factory.js +14 -21
  42. package/dist/esm/lib/components/filter-row/predefinedFilters/use-predefined-filter.js +58 -71
  43. package/dist/esm/lib/components/filter-row/select-filter-chip.js +41 -58
  44. package/dist/esm/lib/components/filter-row/use-form-filter-chip.js +36 -40
  45. package/dist/esm/lib/components/filter-sidepanel/filter-side-panel.js +2 -82
  46. package/dist/esm/lib/components/filter-sidepanel/filter.js +95 -140
  47. package/dist/esm/lib/components/filter-sidepanel/index.js +3 -6
  48. package/dist/esm/lib/components/filter-sidepanel/messages.js +18 -20
  49. package/dist/esm/lib/components/header/header.js +2 -82
  50. package/dist/esm/lib/components/header/index.js +2 -4
  51. package/dist/esm/lib/components/header/messages.js +14 -16
  52. package/dist/esm/lib/components/index.js +26 -53
  53. package/dist/esm/lib/components/item-action-menu/identifier.js +4 -7
  54. package/dist/esm/lib/components/item-action-menu/index.js +2 -4
  55. package/dist/esm/lib/components/item-action-menu/item-action-menu.js +2 -127
  56. package/dist/esm/lib/components/item-action-menu/messages.js +5 -9
  57. package/dist/esm/lib/components/metadata-grid/index.js +2 -4
  58. package/dist/esm/lib/components/metadata-grid/messages.js +5 -9
  59. package/dist/esm/lib/components/metadata-grid/metadata-grid.js +2 -62
  60. package/dist/esm/lib/components/metadata-table/actionColumn.js +3 -5
  61. package/dist/esm/lib/components/metadata-table/hooks/useInfiniteScrollTableItems.js +24 -29
  62. package/dist/esm/lib/components/metadata-table/index.js +4 -8
  63. package/dist/esm/lib/components/metadata-table/messages.js +14 -16
  64. package/dist/esm/lib/components/metadata-table/metadata-table.js +89 -127
  65. package/dist/esm/lib/components/metadata-table/table-body/ghost-table-body.js +10 -19
  66. package/dist/esm/lib/components/metadata-table/table-body/ghost-table-row/ghost-table-row.js +8 -19
  67. package/dist/esm/lib/components/metadata-table/table-body/ghost-table-row/index.js +2 -4
  68. package/dist/esm/lib/components/metadata-table/table-body/inline-editing-cell/index.js +2 -4
  69. package/dist/esm/lib/components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js +2 -56
  70. package/dist/esm/lib/components/metadata-table/table-body/table-body-with-data.js +135 -209
  71. package/dist/esm/lib/components/metadata-table/table-body/table-row/index.js +2 -4
  72. package/dist/esm/lib/components/metadata-table/table-body/table-row/table-row.js +2 -12
  73. package/dist/esm/lib/components/metadata-table/table-renderer.js +34 -55
  74. package/dist/esm/lib/components/metadata-value/index.js +6 -12
  75. package/dist/esm/lib/components/metadata-value/messages.js +15 -17
  76. package/dist/esm/lib/components/metadata-value/metadata-checkbox-field.js +24 -34
  77. package/dist/esm/lib/components/metadata-value/metadata-file-chip.js +14 -22
  78. package/dist/esm/lib/components/metadata-value/metadata-file-field.js +12 -19
  79. package/dist/esm/lib/components/metadata-value/metadata-location-field.js +2 -48
  80. package/dist/esm/lib/components/metadata-value/metadata-radio-field.js +26 -37
  81. package/dist/esm/lib/components/metadata-value/metadata-search-field.js +19 -30
  82. package/dist/esm/lib/components/pagination/index.js +4 -9
  83. package/dist/esm/lib/components/pagination/marker-based-pagination.js +12 -19
  84. package/dist/esm/lib/components/pagination/messages.js +19 -21
  85. package/dist/esm/lib/components/pagination/offset-based-pagination.js +22 -31
  86. package/dist/esm/lib/components/pagination/pagination-controls.js +2 -53
  87. package/dist/esm/lib/components/pagination/pagination.js +20 -35
  88. package/dist/esm/lib/components/pagination/utils.js +4 -6
  89. package/dist/esm/lib/components/sort-dropdown/index.js +2 -4
  90. package/dist/esm/lib/components/sort-dropdown/sort-dropdown.js +37 -56
  91. package/dist/esm/lib/components/switch-case/index.js +2 -5
  92. package/dist/esm/lib/components/switch-case/switch-case.js +4 -12
  93. package/dist/esm/lib/hooks/use-header.js +41 -37
  94. package/dist/esm/lib/index.js +28 -59
  95. package/dist/esm/lib/metadata-view.js +2 -151
  96. package/dist/styles/action-bar.css +1 -1
  97. package/dist/styles/empty-state.css +1 -1
  98. package/dist/styles/filter-row.css +1 -1
  99. package/dist/styles/header.css +1 -1
  100. package/dist/styles/inline-editing-cell.css +1 -1
  101. package/dist/styles/item-action-menu.css +1 -1
  102. package/dist/styles/metadata-grid.css +1 -1
  103. package/dist/styles/metadata-view.css +1 -1
  104. package/dist/styles/pagination-controls.css +1 -1
  105. package/dist/styles/table-row.css +1 -0
  106. package/dist/styles/zoom-button.css +1 -1
  107. package/package.json +14 -14
  108. package/dist/chunks/index.js +0 -105
  109. package/dist/styles/index.css +0 -1
@@ -1,141 +1,96 @@
1
- import { MetadataEnumField as f, MetadataMultiSelectField as m, MetadataDateField as s, MetadataFloatField as F, MetadataStringField as M } from "@box/metadata-filter";
2
- import { useIntl as o } from "react-intl";
3
- import { MetadataFileField as x } from "../metadata-value/metadata-file-field.js";
4
- import { MetadataLocationField as b } from "../metadata-value/metadata-location-field.js";
5
- import { MetadataRadioField as S } from "../metadata-value/metadata-radio-field.js";
6
- import { MetadataCheckboxField as h } from "../metadata-value/metadata-checkbox-field.js";
7
- import { MetadataSearchField as P } from "../metadata-value/metadata-search-field.js";
8
- import { jsx as a } from "react/jsx-runtime";
9
- const i = (e) => `metadata.fields.${e}`, g = ({
10
- id: e,
11
- name: t,
12
- placeholder: l,
13
- variant: r
14
- }) => r === "search" ? /* @__PURE__ */ a(P, {
15
- id: e,
16
- name: t,
17
- placeholder: l
18
- }) : /* @__PURE__ */ a(M, {
19
- fieldNamePrefix: i(e),
20
- label: t || "",
21
- placeholder: l
22
- }), N = ({
23
- id: e,
24
- name: t,
25
- variant: l,
26
- parentRef: r
27
- }) => {
28
- switch (l) {
29
- case "file":
30
- return /* @__PURE__ */ a(x, {
31
- id: e
32
- });
33
- case "checkbox":
34
- return /* @__PURE__ */ a(h, {
35
- id: e,
36
- name: t
37
- });
38
- default:
39
- return /* @__PURE__ */ a(m, {
40
- fieldNamePrefix: i(e),
41
- label: t || "",
42
- portalElement: r
43
- });
44
- }
45
- }, w = ({
46
- id: e,
47
- name: t,
48
- parentRef: l,
49
- variant: r,
50
- renderer: c,
51
- triggerCallback: n,
52
- placeholder: d
53
- }) => {
54
- const {
55
- locale: u
56
- } = o();
57
- switch (r) {
58
- case "file":
59
- return /* @__PURE__ */ a(b, {
60
- id: e,
61
- renderer: c,
62
- triggerSetValueCallback: n
63
- });
64
- // default case should act same as no variant defined
65
- case "radio":
66
- return /* @__PURE__ */ a(S, {
67
- id: e,
68
- name: t,
69
- placeholder: d
70
- });
71
- default:
72
- return /* @__PURE__ */ a(f, {
73
- fieldNamePrefix: i(e),
74
- label: t || "",
75
- locale: u,
76
- placeholder: d,
77
- portalElement: l
78
- });
79
- }
80
- }, E = ({
81
- id: e,
82
- name: t
83
- }) => /* @__PURE__ */ a(F, {
84
- fieldNamePrefix: i(e),
85
- label: t || ""
86
- }), k = ({
87
- customLabels: e,
88
- canUseRelativeDates: t,
89
- customDateFilterOptions: l,
90
- id: r,
91
- name: c
92
- }) => {
93
- const {
94
- locale: n
95
- } = o();
96
- return /* @__PURE__ */ a(s, {
97
- canUseRelativeDates: t,
98
- customDateFilterOptions: l,
99
- customFieldLabels: e,
100
- direction: "vertical",
101
- fieldNamePrefix: i(r),
102
- label: c || "",
103
- locale: n
104
- });
105
- }, T = ({
106
- ...e
107
- }) => {
108
- const t = e.shouldRenderNameInSidePanel === !1 ? "" : e.name;
109
- switch (e.fieldType) {
110
- case "string":
111
- return /* @__PURE__ */ a(g, {
112
- ...e,
113
- name: t
114
- });
115
- case "float":
116
- return /* @__PURE__ */ a(E, {
117
- ...e,
118
- name: t
119
- });
120
- case "date":
121
- return /* @__PURE__ */ a(k, {
122
- ...e,
123
- name: t
124
- });
125
- case "multiSelect":
126
- return /* @__PURE__ */ a(N, {
127
- ...e,
128
- name: t
129
- });
130
- case "enum":
131
- return /* @__PURE__ */ a(w, {
132
- ...e,
133
- name: t
134
- });
135
- default:
136
- return null;
137
- }
138
- };
139
- export {
140
- T as Filter
1
+ import { MetadataFileField as e } from "../metadata-value/metadata-file-field.js";
2
+ import { t } from "../../../../chunks/metadata-location-field.js";
3
+ import { MetadataRadioField as n } from "../metadata-value/metadata-radio-field.js";
4
+ import { MetadataCheckboxField as r } from "../metadata-value/metadata-checkbox-field.js";
5
+ import { MetadataSearchField as i } from "../metadata-value/metadata-search-field.js";
6
+ import { useIntl as a } from "react-intl";
7
+ import { MetadataDateField as o, MetadataEnumField as s, MetadataFloatField as c, MetadataMultiSelectField as l, MetadataStringField as u } from "@box/metadata-filter";
8
+ import { jsx as d } from "react/jsx-runtime";
9
+ var f = (e) => `metadata.fields.${e}`, p = ({ id: e, name: t, placeholder: n, variant: r }) => {
10
+ switch (r) {
11
+ case "search": return /* @__PURE__ */ d(i, {
12
+ id: e,
13
+ name: t,
14
+ placeholder: n
15
+ });
16
+ default: return /* @__PURE__ */ d(u, {
17
+ fieldNamePrefix: f(e),
18
+ label: t || "",
19
+ placeholder: n
20
+ });
21
+ }
22
+ }, m = ({ id: t, name: n, variant: i, parentRef: a }) => {
23
+ switch (i) {
24
+ case "file": return /* @__PURE__ */ d(e, { id: t });
25
+ case "checkbox": return /* @__PURE__ */ d(r, {
26
+ id: t,
27
+ name: n
28
+ });
29
+ default: return /* @__PURE__ */ d(l, {
30
+ fieldNamePrefix: f(t),
31
+ label: n || "",
32
+ portalElement: a
33
+ });
34
+ }
35
+ }, h = ({ id: e, name: r, parentRef: i, variant: o, renderer: c, triggerCallback: l, placeholder: u }) => {
36
+ let { locale: p } = a();
37
+ switch (o) {
38
+ case "file": return /* @__PURE__ */ d(t, {
39
+ id: e,
40
+ renderer: c,
41
+ triggerSetValueCallback: l
42
+ });
43
+ case "radio": return /* @__PURE__ */ d(n, {
44
+ id: e,
45
+ name: r,
46
+ placeholder: u
47
+ });
48
+ default: return /* @__PURE__ */ d(s, {
49
+ fieldNamePrefix: f(e),
50
+ label: r || "",
51
+ locale: p,
52
+ placeholder: u,
53
+ portalElement: i
54
+ });
55
+ }
56
+ }, g = ({ id: e, name: t }) => /* @__PURE__ */ d(c, {
57
+ fieldNamePrefix: f(e),
58
+ label: t || ""
59
+ }), _ = ({ customLabels: e, canUseRelativeDates: t, customDateFilterOptions: n, id: r, name: i }) => {
60
+ let { locale: s } = a();
61
+ return /* @__PURE__ */ d(o, {
62
+ canUseRelativeDates: t,
63
+ customDateFilterOptions: n,
64
+ customFieldLabels: e,
65
+ direction: "vertical",
66
+ fieldNamePrefix: f(r),
67
+ label: i || "",
68
+ locale: s
69
+ });
70
+ }, v = ({ ...e }) => {
71
+ let t = e.shouldRenderNameInSidePanel === !1 ? "" : e.name;
72
+ switch (e.fieldType) {
73
+ case "string": return /* @__PURE__ */ d(p, {
74
+ ...e,
75
+ name: t
76
+ });
77
+ case "float": return /* @__PURE__ */ d(g, {
78
+ ...e,
79
+ name: t
80
+ });
81
+ case "date": return /* @__PURE__ */ d(_, {
82
+ ...e,
83
+ name: t
84
+ });
85
+ case "multiSelect": return /* @__PURE__ */ d(m, {
86
+ ...e,
87
+ name: t
88
+ });
89
+ case "enum": return /* @__PURE__ */ d(h, {
90
+ ...e,
91
+ name: t
92
+ });
93
+ default: return null;
94
+ }
141
95
  };
96
+ export { v as Filter };
@@ -1,6 +1,3 @@
1
- import { Filter as o } from "./filter.js";
2
- import { FilterSidePanel as i } from "./filter-side-panel.js";
3
- export {
4
- o as Filter,
5
- i as FilterSidePanel
6
- };
1
+ import { Filter as e } from "./filter.js";
2
+ import { t } from "../../../../chunks/filter-side-panel.js";
3
+ export { e as Filter, t as FilterSidePanel };
@@ -1,22 +1,20 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const t = e({
3
- filtersHeader: {
4
- id: "groupSharedFeatures.metadataView.filterSidepanel.filtersHeader",
5
- defaultMessage: "Filters"
6
- },
7
- clearAllButton: {
8
- id: "groupSharedFeatures.metadataView.filterSidepanel.clearAllButton",
9
- defaultMessage: "Clear All"
10
- },
11
- showResultsButton: {
12
- id: "groupSharedFeatures.metadataView.filterSidepanel.showResultsButton",
13
- defaultMessage: "Search"
14
- },
15
- closeAriaLabel: {
16
- id: "groupSharedFeatures.metadataView.filterSidepanel.closeAriaLabel",
17
- defaultMessage: "Close"
18
- }
2
+ var t = e({
3
+ filtersHeader: {
4
+ id: "groupSharedFeatures.metadataView.filterSidepanel.filtersHeader",
5
+ defaultMessage: "Filters"
6
+ },
7
+ clearAllButton: {
8
+ id: "groupSharedFeatures.metadataView.filterSidepanel.clearAllButton",
9
+ defaultMessage: "Clear All"
10
+ },
11
+ showResultsButton: {
12
+ id: "groupSharedFeatures.metadataView.filterSidepanel.showResultsButton",
13
+ defaultMessage: "Search"
14
+ },
15
+ closeAriaLabel: {
16
+ id: "groupSharedFeatures.metadataView.filterSidepanel.closeAriaLabel",
17
+ defaultMessage: "Close"
18
+ }
19
19
  });
20
- export {
21
- t as default
22
- };
20
+ export { t as default };
@@ -1,82 +1,2 @@
1
- import { Text as u, PageHeader as t, IconButton as x, Status as H } from "@box/blueprint-web";
2
- import { XMark as y } from "@box/blueprint-web-assets/icons/Fill";
3
- import { useIntl as b } from "react-intl";
4
- import { SwitchCase as L, Case as h } from "../switch-case/switch-case.js";
5
- import s from "./messages.js";
6
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
7
- import '../../../../styles/header.css';const M = "_viewHeader_11wvf_1", C = "_titleBar_11wvf_5", I = "_clearSelectionButton_11wvf_11", o = {
8
- viewHeader: M,
9
- titleBar: C,
10
- clearSelectionButton: I
11
- };
12
- function A({
13
- title: r,
14
- itemCount: l,
15
- isItemCountVisible: S = !0,
16
- onClearSelection: f,
17
- selectionCount: i = 0,
18
- isSelectionCountVisible: v = !0,
19
- selectedItemName: c,
20
- rightSlot: a
21
- }) {
22
- const {
23
- formatMessage: d
24
- } = b(), m = v && i > 0, w = S && l != null;
25
- if (!(!!r || m || !!a))
26
- return null;
27
- const [B, g] = c ? [s.singleItemSelected, {
28
- name: c
29
- }] : [s.itemsSelected, {
30
- count: i
31
- }], p = d(B, {
32
- ...g,
33
- b: (_) => /* @__PURE__ */ e(u, {
34
- color: "textOnLightDefault",
35
- variant: "bodyLargeBold",
36
- as: "span",
37
- children: _
38
- })
39
- });
40
- return /* @__PURE__ */ n(t.Root, {
41
- variant: "inline",
42
- sticky: !1,
43
- className: o.viewHeader,
44
- children: [/* @__PURE__ */ n(L, {
45
- children: [/* @__PURE__ */ n(h, {
46
- condition: m,
47
- children: [/* @__PURE__ */ e(t.Corner, {
48
- children: /* @__PURE__ */ e(x, {
49
- "aria-label": d(s.clearSelectionAriaLabel),
50
- icon: y,
51
- onClick: f,
52
- size: "small",
53
- variant: "small-utility",
54
- className: o.clearSelectionButton
55
- })
56
- }), /* @__PURE__ */ e(t.StartElements, {
57
- children: /* @__PURE__ */ e(u, {
58
- as: "span",
59
- color: "textOnLightSecondary",
60
- variant: "bodyLarge",
61
- children: p
62
- })
63
- })]
64
- }), /* @__PURE__ */ e(h, {
65
- condition: !!r,
66
- children: /* @__PURE__ */ n("div", {
67
- className: o.titleBar,
68
- children: [r, w && /* @__PURE__ */ e(H, {
69
- className: o.itemCount,
70
- colorIndex: 0,
71
- text: String(l)
72
- })]
73
- })
74
- })]
75
- }), a && /* @__PURE__ */ e(t.EndElements, {
76
- children: a
77
- })]
78
- });
79
- }
80
- export {
81
- A as Header
82
- };
1
+ import { t as e } from "../../../../chunks/header.js";
2
+ export { e as Header };
@@ -1,4 +1,2 @@
1
- import { Header as o } from "./header.js";
2
- export {
3
- o as Header
4
- };
1
+ import { t as e } from "../../../../chunks/header.js";
2
+ export { e as Header };
@@ -1,18 +1,16 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const t = e({
3
- clearSelectionAriaLabel: {
4
- id: "groupSharedFeatures.metadataView.header.clearSelectionAriaLabel",
5
- defaultMessage: "Clear selection"
6
- },
7
- itemsSelected: {
8
- id: "groupSharedFeatures.metadataView.header.itemsSelected",
9
- defaultMessage: "{count, plural, one {<b># item</b> is selected} other {<b># items</b> are selected}}"
10
- },
11
- singleItemSelected: {
12
- id: "groupSharedFeatures.metadataView.header.singleItemSelected",
13
- defaultMessage: "<b>{name}</b> is selected"
14
- }
2
+ var t = e({
3
+ clearSelectionAriaLabel: {
4
+ id: "groupSharedFeatures.metadataView.header.clearSelectionAriaLabel",
5
+ defaultMessage: "Clear selection"
6
+ },
7
+ itemsSelected: {
8
+ id: "groupSharedFeatures.metadataView.header.itemsSelected",
9
+ defaultMessage: "{count, plural, one {<b># item</b> is selected} other {<b># items</b> are selected}}"
10
+ },
11
+ singleItemSelected: {
12
+ id: "groupSharedFeatures.metadataView.header.singleItemSelected",
13
+ defaultMessage: "<b>{name}</b> is selected"
14
+ }
15
15
  });
16
- export {
17
- t as default
18
- };
16
+ export { t as default };
@@ -1,53 +1,26 @@
1
- import { ActionBar as o } from "./action-bar/action-bar.js";
2
- import { Case as a, SwitchCase as i } from "./switch-case/switch-case.js";
3
- import { Filter as f } from "./filter-sidepanel/filter.js";
4
- import { FilterRow as x } from "./filter-row/filter-row.js";
5
- import { FilterSidePanel as l } from "./filter-sidepanel/filter-side-panel.js";
6
- import { FormFilterChip as F } from "./filter-row/form-filter-chip.js";
7
- import { Header as C } from "./header/header.js";
8
- import { InlineEditingCell as h } from "./metadata-table/table-body/inline-editing-cell/inline-editing-cell.js";
9
- import { ItemActionMenu as P } from "./item-action-menu/item-action-menu.js";
10
- import { MarkerBasedPagination as S } from "./pagination/marker-based-pagination.js";
11
- import { MetadataFileChip as B } from "./metadata-value/metadata-file-chip.js";
12
- import { MetadataFileField as b } from "./metadata-value/metadata-file-field.js";
13
- import { MetadataFilterChip as I } from "./filter-row/metadata-filter-chip.js";
14
- import { MetadataGrid as k } from "./metadata-grid/metadata-grid.js";
15
- import { MetadataLocationField as D } from "./metadata-value/metadata-location-field.js";
16
- import { MetadataRadioField as G } from "./metadata-value/metadata-radio-field.js";
17
- import { MetadataSearchField as L } from "./metadata-value/metadata-search-field.js";
18
- import { MetadataTable as O } from "./metadata-table/metadata-table.js";
19
- import { OffsetBasedPagination as q } from "./pagination/offset-based-pagination.js";
20
- import { Pagination as y } from "./pagination/pagination.js";
21
- import { PaginationControls as J } from "./pagination/pagination-controls.js";
22
- import { PredefinedFilterName as Q } from "./filter-row/predefinedFilters/index.js";
23
- import { SelectFilterChip as V } from "./filter-row/select-filter-chip.js";
24
- import { SortDropdown as X } from "./sort-dropdown/sort-dropdown.js";
25
- import { TableRenderer as Z } from "./metadata-table/table-renderer.js";
26
- export {
27
- o as ActionBar,
28
- a as Case,
29
- f as Filter,
30
- x as FilterRow,
31
- l as FilterSidePanel,
32
- F as FormFilterChip,
33
- C as Header,
34
- h as InlineEditingCell,
35
- P as ItemActionMenu,
36
- S as MarkerBasedPagination,
37
- B as MetadataFileChip,
38
- b as MetadataFileField,
39
- I as MetadataFilterChip,
40
- k as MetadataGrid,
41
- D as MetadataLocationField,
42
- G as MetadataRadioField,
43
- L as MetadataSearchField,
44
- O as MetadataTable,
45
- q as OffsetBasedPagination,
46
- y as Pagination,
47
- J as PaginationControls,
48
- Q as PredefinedFilterName,
49
- V as SelectFilterChip,
50
- X as SortDropdown,
51
- i as SwitchCase,
52
- Z as TableRenderer
53
- };
1
+ import { MetadataFileField as e } from "./metadata-value/metadata-file-field.js";
2
+ import { t } from "../../../chunks/metadata-location-field.js";
3
+ import { MetadataRadioField as n } from "./metadata-value/metadata-radio-field.js";
4
+ import { MetadataSearchField as r } from "./metadata-value/metadata-search-field.js";
5
+ import { Filter as i } from "./filter-sidepanel/filter.js";
6
+ import { t as a } from "../../../chunks/filter-side-panel.js";
7
+ import { MetadataFileChip as o } from "./metadata-value/metadata-file-chip.js";
8
+ import { FormFilterChip as s } from "./filter-row/form-filter-chip.js";
9
+ import { SelectFilterChip as c } from "./filter-row/select-filter-chip.js";
10
+ import { MetadataFilterChip as l } from "./filter-row/metadata-filter-chip.js";
11
+ import { t as u } from "../../../chunks/types2.js";
12
+ import { FilterRow as d } from "./filter-row/filter-row.js";
13
+ import { SortDropdown as f } from "./sort-dropdown/sort-dropdown.js";
14
+ import { t as p } from "../../../chunks/action-bar.js";
15
+ import { t as m } from "../../../chunks/item-action-menu.js";
16
+ import { t as h } from "../../../chunks/metadata-grid.js";
17
+ import { t as g } from "../../../chunks/inline-editing-cell.js";
18
+ import { TableRenderer as _ } from "./metadata-table/table-renderer.js";
19
+ import { MetadataTable as v } from "./metadata-table/metadata-table.js";
20
+ import { t as y } from "../../../chunks/pagination-controls.js";
21
+ import { MarkerBasedPagination as b } from "./pagination/marker-based-pagination.js";
22
+ import { OffsetBasedPagination as x } from "./pagination/offset-based-pagination.js";
23
+ import { Pagination as S } from "./pagination/pagination.js";
24
+ import { Case as C, SwitchCase as w } from "./switch-case/switch-case.js";
25
+ import { t as T } from "../../../chunks/header.js";
26
+ export { p as ActionBar, C as Case, i as Filter, d as FilterRow, a as FilterSidePanel, s as FormFilterChip, T as Header, g as InlineEditingCell, m as ItemActionMenu, b as MarkerBasedPagination, o as MetadataFileChip, e as MetadataFileField, l as MetadataFilterChip, h as MetadataGrid, t as MetadataLocationField, n as MetadataRadioField, r as MetadataSearchField, v as MetadataTable, x as OffsetBasedPagination, S as Pagination, y as PaginationControls, u as PredefinedFilterName, c as SelectFilterChip, f as SortDropdown, w as SwitchCase, _ as TableRenderer };
@@ -1,8 +1,5 @@
1
- import a from "lodash/camelCase";
2
- function r(n, e) {
3
- const t = n.displayName || "UnknownComponent", o = a(e);
4
- return `${t}-${o}`;
1
+ import e from "lodash/camelCase";
2
+ function t(t, n) {
3
+ return `${t.displayName || "UnknownComponent"}-${e(n)}`;
5
4
  }
6
- export {
7
- r as getDataTargetId
8
- };
5
+ export { t as getDataTargetId };
@@ -1,4 +1,2 @@
1
- import { ItemActionMenu as t } from "./item-action-menu.js";
2
- export {
3
- t as ItemActionMenu
4
- };
1
+ import { t as e } from "../../../../chunks/item-action-menu.js";
2
+ export { e as ItemActionMenu };
@@ -1,127 +1,2 @@
1
- import x, { useMemo as N } from "react";
2
- import { useIntl as j } from "react-intl";
3
- import { IconButton as p, Tooltip as y, DropdownMenu as e, GridList as I } from "@box/blueprint-web";
4
- import { Ellipsis as T } from "@box/blueprint-web-assets/icons/Fill";
5
- import { V as b } from "../../../../chunks/types.js";
6
- import { getDataTargetId as r } from "./identifier.js";
7
- import _ from "./messages.js";
8
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
9
- import '../../../../styles/item-action-menu.css';const z = "_tableActionBar_akgtp_1", G = "_actionItemIcon_akgtp_6", A = {
10
- tableActionBar: z,
11
- actionItemIcon: G
12
- };
13
- function R(a) {
14
- return (i) => {
15
- i.stopPropagation(), a();
16
- };
17
- }
18
- function L({
19
- item: a,
20
- label: i,
21
- onClick: s,
22
- icon: n,
23
- isDisabled: d
24
- }) {
25
- const u = R(() => {
26
- s(a);
27
- }), m = N(() => d?.(a) ?? !1, [d, a]);
28
- return /* @__PURE__ */ l(e.Item, {
29
- "data-target-id": r(e.Item, i),
30
- disabled: m,
31
- onClick: u,
32
- children: [/* @__PURE__ */ t(n, {
33
- className: A.actionItemIcon
34
- }), i]
35
- }, i);
36
- }
37
- function K({
38
- actions: a,
39
- inlineActions: i,
40
- isDisabled: s,
41
- item: n,
42
- onOpenChange: d,
43
- subMenuActions: u,
44
- subMenuTrigger: m,
45
- viewMode: g = b.LIST
46
- }) {
47
- const {
48
- formatMessage: B
49
- } = j(), {
50
- label: W,
51
- icon: S
52
- } = m || {};
53
- return /* @__PURE__ */ l("div", {
54
- className: A.tableActionBar,
55
- children: [g === b.LIST && i?.map(({
56
- onClick: o,
57
- label: c,
58
- icon: f,
59
- isDisabled: h,
60
- getTooltipContent: $
61
- }) => {
62
- const M = $?.(n), k = `${n.id}-${c}`, C = h?.(n) ?? !1, D = /* @__PURE__ */ t(p, {
63
- accessibleWhenDisabled: C && !!M || void 0,
64
- "aria-label": c,
65
- "data-target-id": r(p, c),
66
- disabled: C,
67
- icon: f,
68
- onClick: R(() => o(n)),
69
- size: "large"
70
- });
71
- return M ? /* @__PURE__ */ t(y, {
72
- content: M,
73
- children: D
74
- }, k) : /* @__PURE__ */ t(x.Fragment, {
75
- children: D
76
- }, k);
77
- }), a ? /* @__PURE__ */ l(e.Root, {
78
- onOpenChange: d,
79
- children: [/* @__PURE__ */ t(e.Trigger, {
80
- children: g === b.LIST ? /* @__PURE__ */ t(p, {
81
- "aria-label": B(_.actionMenu),
82
- "data-target-id": r(p, "openActionMenu"),
83
- disabled: s,
84
- icon: T,
85
- size: "large"
86
- }) : /* @__PURE__ */ t(I.ActionIconButton, {
87
- "aria-label": B(_.actionMenu),
88
- "data-target-id": r(I.ActionIconButton, "openActionMenu"),
89
- disabled: s,
90
- icon: T
91
- })
92
- }), /* @__PURE__ */ l(e.Content, {
93
- align: "start",
94
- children: [a.map((o) => /* @__PURE__ */ t(L, {
95
- item: n,
96
- ...o
97
- }, o.label)), u && m && /* @__PURE__ */ l(e.SubMenuRoot, {
98
- children: [/* @__PURE__ */ l(e.SubMenuTrigger, {
99
- "data-target-id": r(e.SubMenuTrigger, "openActionSubmenu"),
100
- children: [S && /* @__PURE__ */ t(S, {
101
- className: A.actionItemIcon
102
- }), W]
103
- }), /* @__PURE__ */ t(e.SubMenuContent, {
104
- children: u.map((o) => /* @__PURE__ */ t(L, {
105
- item: n,
106
- ...o
107
- }, o.label))
108
- })]
109
- })]
110
- })]
111
- }) : null, g === b.GRID && i?.map(({
112
- onClick: o,
113
- label: c,
114
- icon: f,
115
- isDisabled: h
116
- }) => /* @__PURE__ */ t(I.ActionIconButton, {
117
- "aria-label": c,
118
- "data-target-id": r(I.ActionIconButton, c),
119
- disabled: h?.(n) ?? !1,
120
- icon: f,
121
- onClick: () => o(n)
122
- }, `${n.id}-${c}`))]
123
- });
124
- }
125
- export {
126
- K as ItemActionMenu
127
- };
1
+ import { t as e } from "../../../../chunks/item-action-menu.js";
2
+ export { e as ItemActionMenu };