@box/metadata-view 1.54.9 → 1.54.10

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
@@ -0,0 +1,4 @@
1
+ var e = /* @__PURE__ */ function(e) {
2
+ return e.KeywordSearchFilterGroup = "KeywordSearchFilterGroup", e.FileTypeFilterGroup = "FileTypeFilterGroup", e.LocationFilterGroup = "LocationFilterGroup", e;
3
+ }({});
4
+ export { e as t };
@@ -0,0 +1,20 @@
1
+ import e from "../esm/lib/components/action-bar/messages.js";
2
+ import { Slider as t } from "@box/blueprint-web";
3
+ import { useIntl as n } from "react-intl";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ import '../styles/zoom-button.css';var i = { sliderContainer: "_sliderContainer_1entc_1" }, a = ({ onZoomLevelChange: a, zoomLevel: o }) => {
6
+ let { formatMessage: s } = n();
7
+ return /* @__PURE__ */ r("div", {
8
+ className: i.sliderContainer,
9
+ children: /* @__PURE__ */ r(t, {
10
+ max: 2,
11
+ min: 0,
12
+ minusButtonLabel: s(e.sliderDecreaseSize),
13
+ onValueChange: a,
14
+ plusButtonLabel: s(e.sliderIncreaseSize),
15
+ sliderLabel: s(e.sliderLabel),
16
+ value: o
17
+ })
18
+ });
19
+ };
20
+ export { a as t };
package/dist/esm/index.js CHANGED
@@ -1,59 +1,29 @@
1
- import { ActionBar as o } from "./lib/components/action-bar/action-bar.js";
2
- import { Case as a, SwitchCase as i } from "./lib/components/switch-case/switch-case.js";
3
- import { Filter as m } from "./lib/components/filter-sidepanel/filter.js";
4
- import { FilterRow as x } from "./lib/components/filter-row/filter-row.js";
5
- import { FilterSidePanel as n } from "./lib/components/filter-sidepanel/filter-side-panel.js";
6
- import { FormFilterChip as F } from "./lib/components/filter-row/form-filter-chip.js";
7
- import { Header as C } from "./lib/components/header/header.js";
8
- import { I as c, S, V as h } from "../chunks/types.js";
9
- import { InlineEditingCell as g } from "./lib/components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js";
10
- import { ItemActionMenu as I } from "./lib/components/item-action-menu/item-action-menu.js";
11
- import { MarkerBasedPagination as V } from "./lib/components/pagination/marker-based-pagination.js";
12
- import { MetadataFileChip as B } from "./lib/components/metadata-value/metadata-file-chip.js";
13
- import { MetadataFileField as R } from "./lib/components/metadata-value/metadata-file-field.js";
14
- import { MetadataFilterChip as b } from "./lib/components/filter-row/metadata-filter-chip.js";
15
- import { MetadataGrid as k } from "./lib/components/metadata-grid/metadata-grid.js";
16
- import { MetadataLocationField as G } from "./lib/components/metadata-value/metadata-location-field.js";
17
- import { MetadataRadioField as N } from "./lib/components/metadata-value/metadata-radio-field.js";
18
- import { MetadataSearchField as _ } from "./lib/components/metadata-value/metadata-search-field.js";
19
- import { MetadataTable as q } from "./lib/components/metadata-table/metadata-table.js";
20
- import { MetadataView as y } from "./lib/metadata-view.js";
21
- import { OffsetBasedPagination as J } from "./lib/components/pagination/offset-based-pagination.js";
22
- import { Pagination as Q } from "./lib/components/pagination/pagination.js";
23
- import { PaginationControls as W } from "./lib/components/pagination/pagination-controls.js";
24
- import { PredefinedFilterName as Y } from "./lib/components/filter-row/predefinedFilters/index.js";
25
- import { SelectFilterChip as $ } from "./lib/components/filter-row/select-filter-chip.js";
26
- import { SortDropdown as re } from "./lib/components/sort-dropdown/sort-dropdown.js";
27
- import { TableRenderer as te } from "./lib/components/metadata-table/table-renderer.js";
28
- export {
29
- o as ActionBar,
30
- a as Case,
31
- m as Filter,
32
- x as FilterRow,
33
- n as FilterSidePanel,
34
- F as FormFilterChip,
35
- C as Header,
36
- c as IconColumnVariant,
37
- g as InlineEditingCell,
38
- I as ItemActionMenu,
39
- V as MarkerBasedPagination,
40
- B as MetadataFileChip,
41
- R as MetadataFileField,
42
- b as MetadataFilterChip,
43
- k as MetadataGrid,
44
- G as MetadataLocationField,
45
- N as MetadataRadioField,
46
- _ as MetadataSearchField,
47
- q as MetadataTable,
48
- y as MetadataView,
49
- J as OffsetBasedPagination,
50
- Q as Pagination,
51
- W as PaginationControls,
52
- Y as PredefinedFilterName,
53
- S as SELECT_ALL,
54
- $ as SelectFilterChip,
55
- re as SortDropdown,
56
- i as SwitchCase,
57
- te as TableRenderer,
58
- h as ViewMode
59
- };
1
+ import { n as e, r as t, t as n } from "../chunks/types.js";
2
+ import { MetadataFileField as r } from "./lib/components/metadata-value/metadata-file-field.js";
3
+ import { t as i } from "../chunks/metadata-location-field.js";
4
+ import { MetadataRadioField as a } from "./lib/components/metadata-value/metadata-radio-field.js";
5
+ import { MetadataSearchField as o } from "./lib/components/metadata-value/metadata-search-field.js";
6
+ import { Filter as s } from "./lib/components/filter-sidepanel/filter.js";
7
+ import { t as c } from "../chunks/filter-side-panel.js";
8
+ import { MetadataFileChip as l } from "./lib/components/metadata-value/metadata-file-chip.js";
9
+ import { FormFilterChip as u } from "./lib/components/filter-row/form-filter-chip.js";
10
+ import { SelectFilterChip as d } from "./lib/components/filter-row/select-filter-chip.js";
11
+ import { MetadataFilterChip as f } from "./lib/components/filter-row/metadata-filter-chip.js";
12
+ import { t as p } from "../chunks/types2.js";
13
+ import { FilterRow as m } from "./lib/components/filter-row/filter-row.js";
14
+ import { SortDropdown as h } from "./lib/components/sort-dropdown/sort-dropdown.js";
15
+ import { t as g } from "../chunks/action-bar.js";
16
+ import { t as _ } from "../chunks/item-action-menu.js";
17
+ import { t as v } from "../chunks/metadata-grid.js";
18
+ import { t as y } from "../chunks/inline-editing-cell.js";
19
+ import { TableRenderer as b } from "./lib/components/metadata-table/table-renderer.js";
20
+ import { MetadataTable as x } from "./lib/components/metadata-table/metadata-table.js";
21
+ import { t as S } from "../chunks/pagination-controls.js";
22
+ import { MarkerBasedPagination as C } from "./lib/components/pagination/marker-based-pagination.js";
23
+ import { OffsetBasedPagination as w } from "./lib/components/pagination/offset-based-pagination.js";
24
+ import { Pagination as T } from "./lib/components/pagination/pagination.js";
25
+ import { Case as E, SwitchCase as D } from "./lib/components/switch-case/switch-case.js";
26
+ import { t as O } from "../chunks/header.js";
27
+ import { t as k } from "../chunks/metadata-view.js";
28
+ import "./lib/index.js";
29
+ export { g as ActionBar, E as Case, s as Filter, m as FilterRow, c as FilterSidePanel, u as FormFilterChip, O as Header, n as IconColumnVariant, y as InlineEditingCell, _ as ItemActionMenu, C as MarkerBasedPagination, l as MetadataFileChip, r as MetadataFileField, f as MetadataFilterChip, v as MetadataGrid, i as MetadataLocationField, a as MetadataRadioField, o as MetadataSearchField, x as MetadataTable, k as MetadataView, w as OffsetBasedPagination, T as Pagination, S as PaginationControls, p as PredefinedFilterName, e as SELECT_ALL, d as SelectFilterChip, h as SortDropdown, D as SwitchCase, b as TableRenderer, t as ViewMode };
@@ -1,62 +1,2 @@
1
- import { Button as p } from "@box/blueprint-web";
2
- import { Grid as b } from "@box/blueprint-web-assets/icons/Fill";
3
- import { useIntl as u } from "react-intl";
4
- import { V as r } from "../../../../chunks/types.js";
5
- import { ZoomButton as R } from "./zoom-button.js";
6
- import e from "./messages.js";
7
- import { jsxs as s, jsx as o } from "react/jsx-runtime";
8
- import { FilterRow as x } from "../filter-row/filter-row.js";
9
- import { SortDropdown as h } from "../sort-dropdown/sort-dropdown.js";
10
- import '../../../../styles/action-bar.css';const A = "_actionBar_bbxsv_1", C = "_filterRow_bbxsv_8", G = "_additionalActions_bbxsv_13", I = "_viewModeButtonContainer_bbxsv_24", t = {
11
- actionBar: A,
12
- filterRow: C,
13
- additionalActions: G,
14
- viewModeButtonContainer: I
15
- }, F = ({
16
- isIconColumnEnabled: c,
17
- isViewModeButtonDisabled: m,
18
- onSortDescriptorChange: d,
19
- onViewModeClick: l,
20
- onZoomLevelChange: f,
21
- sortableColumns: w,
22
- sortDescriptor: _,
23
- sortDropdownProps: n,
24
- viewMode: i,
25
- zoomLevel: v,
26
- ...B
27
- }) => {
28
- const {
29
- formatMessage: a
30
- } = u();
31
- return /* @__PURE__ */ s("div", {
32
- className: t.actionBar,
33
- children: [/* @__PURE__ */ o("div", {
34
- className: t.filterRow,
35
- children: /* @__PURE__ */ o(x, {
36
- ...B
37
- })
38
- }), /* @__PURE__ */ s("div", {
39
- className: t.additionalActions,
40
- children: [n && /* @__PURE__ */ o(h, {
41
- ...n,
42
- onSortDescriptorChange: d,
43
- sortableColumns: w,
44
- sortDescriptor: _
45
- }), (c || i === r.GRID) && /* @__PURE__ */ o(R, {
46
- onZoomLevelChange: f,
47
- zoomLevel: v
48
- }), !m && /* @__PURE__ */ o("div", {
49
- className: t.viewModeButtonContainer,
50
- children: /* @__PURE__ */ o(p, {
51
- "aria-label": i === r.GRID ? a(e.switchToListView) : a(e.switchToGridView),
52
- endIcon: b,
53
- onClick: l,
54
- variant: i === r.GRID ? "primary" : "tertiary"
55
- })
56
- })]
57
- })]
58
- });
59
- };
60
- export {
61
- F as ActionBar
62
- };
1
+ import { t as e } from "../../../../chunks/action-bar.js";
2
+ export { e as ActionBar };
@@ -1,4 +1,2 @@
1
- import { ActionBar as t } from "./action-bar.js";
2
- export {
3
- t as ActionBar
4
- };
1
+ import { t as e } from "../../../../chunks/action-bar.js";
2
+ export { e as ActionBar };
@@ -1,26 +1,24 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const i = e({
3
- switchToGridView: {
4
- id: "groupSharedFeatures.metadataView.actionBar.switchToGridView",
5
- defaultMessage: "Switch to Grid View"
6
- },
7
- switchToListView: {
8
- id: "groupSharedFeatures.metadataView.actionBar.switchToListView",
9
- defaultMessage: "Switch to List View"
10
- },
11
- sliderDecreaseSize: {
12
- id: "groupSharedFeatures.metadataView.actionBar.sliderDecreaseSize",
13
- defaultMessage: "Decrease"
14
- },
15
- sliderIncreaseSize: {
16
- id: "groupSharedFeatures.metadataView.actionBar.sliderIncreaseSize",
17
- defaultMessage: "Increase"
18
- },
19
- sliderLabel: {
20
- id: "groupSharedFeatures.metadataView.actionBar.sliderLabel",
21
- defaultMessage: "Slider"
22
- }
2
+ var t = e({
3
+ switchToGridView: {
4
+ id: "groupSharedFeatures.metadataView.actionBar.switchToGridView",
5
+ defaultMessage: "Switch to Grid View"
6
+ },
7
+ switchToListView: {
8
+ id: "groupSharedFeatures.metadataView.actionBar.switchToListView",
9
+ defaultMessage: "Switch to List View"
10
+ },
11
+ sliderDecreaseSize: {
12
+ id: "groupSharedFeatures.metadataView.actionBar.sliderDecreaseSize",
13
+ defaultMessage: "Decrease"
14
+ },
15
+ sliderIncreaseSize: {
16
+ id: "groupSharedFeatures.metadataView.actionBar.sliderIncreaseSize",
17
+ defaultMessage: "Increase"
18
+ },
19
+ sliderLabel: {
20
+ id: "groupSharedFeatures.metadataView.actionBar.sliderLabel",
21
+ defaultMessage: "Slider"
22
+ }
23
23
  });
24
- export {
25
- i as default
26
- };
24
+ export { t as default };
@@ -1,30 +1,2 @@
1
- import { useIntl as o } from "react-intl";
2
- import { Slider as i } from "@box/blueprint-web";
3
- import r from "./messages.js";
4
- import { jsx as s } from "react/jsx-runtime";
5
- import '../../../../styles/zoom-button.css';const a = "_sliderContainer_1entc_1", l = {
6
- sliderContainer: a
7
- }, f = ({
8
- onZoomLevelChange: t,
9
- zoomLevel: n
10
- }) => {
11
- const {
12
- formatMessage: e
13
- } = o();
14
- return /* @__PURE__ */ s("div", {
15
- className: l.sliderContainer,
16
- children: /* @__PURE__ */ s(i, {
17
- max: 2,
18
- min: 0,
19
- minusButtonLabel: e(r.sliderDecreaseSize),
20
- onValueChange: t,
21
- plusButtonLabel: e(r.sliderIncreaseSize),
22
- sliderLabel: e(r.sliderLabel),
23
- value: n
24
- })
25
- });
26
- };
27
- export {
28
- f as ZoomButton,
29
- f as default
30
- };
1
+ import { t as e } from "../../../../chunks/zoom-button.js";
2
+ export { e as ZoomButton, e as default };
@@ -1,6 +1,14 @@
1
- const I = [8, 5, 3], p = ["36px", "84px", "111px"], x = ["36px", "111px", "147px"];
2
- export {
3
- I as THUMBNAIL_GRID_VIEW_SIZES,
4
- p as THUMBNAIL_LIST_VIEW_HEIGHTS,
5
- x as THUMBNAIL_WIDTHS
6
- };
1
+ var e = [
2
+ 8,
3
+ 5,
4
+ 3
5
+ ], t = [
6
+ "36px",
7
+ "84px",
8
+ "111px"
9
+ ], n = [
10
+ "36px",
11
+ "111px",
12
+ "147px"
13
+ ];
14
+ export { e as THUMBNAIL_GRID_VIEW_SIZES, t as THUMBNAIL_LIST_VIEW_HEIGHTS, n as THUMBNAIL_WIDTHS };
@@ -1,30 +1,2 @@
1
- import { EmptyState as m, Text as o } from "@box/blueprint-web";
2
- import { OpenBook as n } from "@box/blueprint-web-assets/illustrations/Medium";
3
- import { useIntl as r } from "react-intl";
4
- import a from "./messages.js";
5
- import { jsx as t } from "react/jsx-runtime";
6
- import '../../../../styles/empty-state.css';const i = "_emptyStateContainer_10mhj_1", s = {
7
- emptyStateContainer: i
8
- }, S = () => {
9
- const {
10
- formatMessage: e
11
- } = r();
12
- return /* @__PURE__ */ t("div", {
13
- className: s.emptyStateContainer,
14
- children: /* @__PURE__ */ t(m, {
15
- body: /* @__PURE__ */ t(o, {
16
- as: "p",
17
- children: e(a.emptyStateBody)
18
- }),
19
- heading: /* @__PURE__ */ t(o, {
20
- as: "h2",
21
- variant: "titleMedium",
22
- children: e(a.emptyStateHeading)
23
- }),
24
- illustration: n
25
- })
26
- });
27
- };
28
- export {
29
- S as default
30
- };
1
+ import { t as e } from "../../../../chunks/empty-state.js";
2
+ export { e as default };
@@ -1,4 +1,2 @@
1
- import { default as o } from "./empty-state.js";
2
- export {
3
- o as default
4
- };
1
+ import { t as e } from "../../../../chunks/empty-state.js";
2
+ export { e as default };
@@ -1,14 +1,12 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const a = e({
3
- emptyStateHeading: {
4
- id: "groupSharedFeatures.emptyState.heading",
5
- defaultMessage: "Sorry, we couldn't find what you're looking for."
6
- },
7
- emptyStateBody: {
8
- id: "groupSharedFeatures.emptyState.body",
9
- defaultMessage: "Try adjusting your filters or keywords."
10
- }
2
+ var t = e({
3
+ emptyStateHeading: {
4
+ id: "groupSharedFeatures.emptyState.heading",
5
+ defaultMessage: "Sorry, we couldn't find what you're looking for."
6
+ },
7
+ emptyStateBody: {
8
+ id: "groupSharedFeatures.emptyState.body",
9
+ defaultMessage: "Try adjusting your filters or keywords."
10
+ }
11
11
  });
12
- export {
13
- a as default
14
- };
12
+ export { t as default };
@@ -1,31 +1,2 @@
1
- import { EmptyState as r, Text as s } from "@box/blueprint-web";
2
- import { Unplugged as a } from "@box/blueprint-web-assets/illustrations/Medium";
3
- import { useIntl as i } from "react-intl";
4
- import o from "./messages.js";
5
- import { jsx as t } from "react/jsx-runtime";
6
- import '../../../../styles/error-state.css';const m = "_emptyStateContainer_qf21p_1", p = {
7
- emptyStateContainer: m
8
- }, S = ({
9
- onRefresh: n
10
- }) => {
11
- const {
12
- formatMessage: e
13
- } = i();
14
- return /* @__PURE__ */ t("div", {
15
- className: p.emptyStateContainer,
16
- children: /* @__PURE__ */ t(r, {
17
- body: /* @__PURE__ */ t(s, {
18
- as: "p",
19
- children: e(o.errorMessage)
20
- }),
21
- illustration: a,
22
- children: /* @__PURE__ */ t(r.PrimaryAction, {
23
- onClick: n,
24
- children: e(o.refreshButton)
25
- })
26
- })
27
- });
28
- };
29
- export {
30
- S as ErrorState
31
- };
1
+ import { t as e } from "../../../../chunks/error-state.js";
2
+ export { e as ErrorState };
@@ -1,4 +1,2 @@
1
- import { ErrorState as t } from "./error-state.js";
2
- export {
3
- t as ErrorState
4
- };
1
+ import { t as e } from "../../../../chunks/error-state.js";
2
+ export { e as ErrorState };
@@ -1,14 +1,12 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const r = e({
3
- errorMessage: {
4
- id: "groupSharedFeatures.metadataView.itemList.errorMessage",
5
- defaultMessage: "Something went wrong. Please refresh this page."
6
- },
7
- refreshButton: {
8
- id: "groupSharedFeatures.metadataView.itemList.refreshButton",
9
- defaultMessage: "Refresh"
10
- }
2
+ var t = e({
3
+ errorMessage: {
4
+ id: "groupSharedFeatures.metadataView.itemList.errorMessage",
5
+ defaultMessage: "Something went wrong. Please refresh this page."
6
+ },
7
+ refreshButton: {
8
+ id: "groupSharedFeatures.metadataView.itemList.refreshButton",
9
+ defaultMessage: "Refresh"
10
+ }
11
11
  });
12
- export {
13
- r as default
14
- };
12
+ export { t as default };
@@ -1,53 +1,31 @@
1
- import { MetadataMultiSelectField as o, MetadataStringField as l, MetadataFloatField as c, MetadataDateField as s } from "@box/metadata-filter";
2
- import { useAdvancedFilterContext as F } from "./advanced-filter-context.js";
3
- import { jsx as n } from "react/jsx-runtime";
4
- const u = ({
5
- fieldNamePrefix: a,
6
- filterOptionsMap: d,
7
- label: r
8
- }) => {
9
- const e = F();
10
- return {
11
- key: e?.resetKey,
12
- fieldAdvancedFilterOptions: e?.currentOption,
13
- fieldNamePrefix: a,
14
- filterOptionsMap: d,
15
- isAdvancedFilterEnabled: !0,
16
- label: r,
17
- onAdvancedFilterOptionChange: e ? (i, t) => e.onOptionChange(t) : void 0
18
- };
19
- }, f = ({
20
- fieldType: a,
21
- fieldNamePrefix: d,
22
- filterOptionsMap: r,
23
- label: e,
24
- locale: i
25
- }) => {
26
- const t = u({
27
- fieldNamePrefix: d,
28
- filterOptionsMap: r,
29
- label: e
30
- });
31
- switch (a) {
32
- case "date":
33
- return /* @__PURE__ */ n(s, {
34
- ...t,
35
- locale: i
36
- });
37
- case "float":
38
- return /* @__PURE__ */ n(c, {
39
- ...t
40
- });
41
- case "string":
42
- return /* @__PURE__ */ n(l, {
43
- ...t
44
- });
45
- default:
46
- return /* @__PURE__ */ n(o, {
47
- ...t
48
- });
49
- }
50
- };
51
- export {
52
- f as AdvancedFieldContent
1
+ import { useAdvancedFilterContext as e } from "./advanced-filter-context.js";
2
+ import { MetadataDateField as t, MetadataFloatField as n, MetadataMultiSelectField as r, MetadataStringField as i } from "@box/metadata-filter";
3
+ import { jsx as a } from "react/jsx-runtime";
4
+ var o = ({ fieldNamePrefix: t, filterOptionsMap: n, label: r }) => {
5
+ let i = e();
6
+ return {
7
+ key: i?.resetKey,
8
+ fieldAdvancedFilterOptions: i?.currentOption,
9
+ fieldNamePrefix: t,
10
+ filterOptionsMap: n,
11
+ isAdvancedFilterEnabled: !0,
12
+ label: r,
13
+ onAdvancedFilterOptionChange: i ? (e, t) => i.onOptionChange(t) : void 0
14
+ };
15
+ }, s = ({ fieldType: e, fieldNamePrefix: s, filterOptionsMap: c, label: l, locale: u }) => {
16
+ let d = o({
17
+ fieldNamePrefix: s,
18
+ filterOptionsMap: c,
19
+ label: l
20
+ });
21
+ switch (e) {
22
+ case "date": return /* @__PURE__ */ a(t, {
23
+ ...d,
24
+ locale: u
25
+ });
26
+ case "float": return /* @__PURE__ */ a(n, { ...d });
27
+ case "string": return /* @__PURE__ */ a(i, { ...d });
28
+ default: return /* @__PURE__ */ a(r, { ...d });
29
+ }
53
30
  };
31
+ export { s as AdvancedFieldContent };
@@ -1,6 +1,3 @@
1
- import { createContext as t, useContext as e } from "react";
2
- const n = /* @__PURE__ */ t(null), r = () => e(n);
3
- export {
4
- n as AdvancedFilterContext,
5
- r as useAdvancedFilterContext
6
- };
1
+ import { createContext as e, useContext as t } from "react";
2
+ var n = /* @__PURE__ */ e(null), r = () => t(n);
3
+ export { n as AdvancedFilterContext, r as useAdvancedFilterContext };
@@ -1,51 +1,33 @@
1
- import { FilterChip as e } from "@box/blueprint-web";
1
+ import { t as e } from "../../../../chunks/filter-side-panel.js";
2
+ import { getInitialFieldValues as t } from "./initial-field-values.js";
3
+ import { isFilterSelected as n } from "./is-filter-selected.js";
4
+ import r from "./messages.js";
5
+ import { t as i } from "../../../../chunks/filter-row.module.js";
6
+ import { FilterChip as a } from "@box/blueprint-web";
7
+ import { useMemo as o, useState as s } from "react";
8
+ import { useIntl as c } from "react-intl";
9
+ import { useFormikContext as l } from "formik";
2
10
  import { Filter as u } from "@box/blueprint-web-assets/icons/Line";
3
- import { useFormikContext as d } from "formik";
4
- import { useState as h, useMemo as F } from "react";
5
- import { useIntl as g } from "react-intl";
6
- import { getInitialFieldValues as C } from "./initial-field-values.js";
7
- import { isFilterSelected as I } from "./is-filter-selected.js";
8
- import S from "./messages.js";
9
- import { s as v } from "../../../../chunks/filter-row.module.js";
10
- import { jsxs as m, Fragment as O, jsx as t } from "react/jsx-runtime";
11
- import { FilterSidePanel as x } from "../filter-sidepanel/filter-side-panel.js";
12
- const q = ({
13
- containerRef: p,
14
- filterGroups: l,
15
- onAllFiltersClick: r
16
- }) => {
17
- const {
18
- formatMessage: c
19
- } = g(), {
20
- values: o
21
- } = d(), [s, a] = h(!1), f = () => r ? r() : a(!0), n = F(() => Object.values(o.metadata.fields).filter((i) => I(i.value)).length, [o.metadata.fields]);
22
- return /* @__PURE__ */ m(O, {
23
- children: [
24
- // We need to initialize the sidepanel state at the moment it is opened
25
- s && /* @__PURE__ */ t(x, {
26
- containerRef: p,
27
- filterGroups: l,
28
- getInitialFormValues: () => C(l.flatMap(({
29
- filters: i
30
- }) => i)),
31
- isOpen: s,
32
- onIsOpenChange: a
33
- }),
34
- /* @__PURE__ */ m(e.ChipButton, {
35
- onClick: f,
36
- value: "all-filters-chip-btn",
37
- children: [/* @__PURE__ */ t(e.Icon, {
38
- className: v.filterChipIcon,
39
- icon: u
40
- }), /* @__PURE__ */ t(e.Label, {
41
- children: c(S.allFilters)
42
- }), n > 0 ? /* @__PURE__ */ t(e.Status, {
43
- children: n.toString()
44
- }) : null]
45
- })
46
- ]
47
- });
48
- };
49
- export {
50
- q as default
11
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
12
+ var m = ({ containerRef: m, filterGroups: h, onAllFiltersClick: g }) => {
13
+ let { formatMessage: _ } = c(), { values: v } = l(), [y, b] = s(!1), x = () => g ? g() : b(!0), S = o(() => Object.values(v.metadata.fields).filter((e) => n(e.value)).length, [v.metadata.fields]);
14
+ return /* @__PURE__ */ p(d, { children: [y && /* @__PURE__ */ f(e, {
15
+ containerRef: m,
16
+ filterGroups: h,
17
+ getInitialFormValues: () => t(h.flatMap(({ filters: e }) => e)),
18
+ isOpen: y,
19
+ onIsOpenChange: b
20
+ }), /* @__PURE__ */ p(a.ChipButton, {
21
+ onClick: x,
22
+ value: "all-filters-chip-btn",
23
+ children: [
24
+ /* @__PURE__ */ f(a.Icon, {
25
+ className: i.filterChipIcon,
26
+ icon: u
27
+ }),
28
+ /* @__PURE__ */ f(a.Label, { children: _(r.allFilters) }),
29
+ S > 0 ? /* @__PURE__ */ f(a.Status, { children: S.toString() }) : null
30
+ ]
31
+ })] });
51
32
  };
33
+ export { m as default };