@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.
- package/dist/chunks/action-bar.js +48 -0
- package/dist/chunks/empty-state.js +24 -0
- package/dist/chunks/error-state.js +23 -0
- package/dist/chunks/filter-row.module.js +6 -8
- package/dist/chunks/filter-side-panel.js +65 -0
- package/dist/chunks/header.js +56 -0
- package/dist/chunks/inline-editing-cell.js +34 -0
- package/dist/chunks/item-action-menu.js +86 -0
- package/dist/chunks/metadata-grid.js +44 -0
- package/dist/chunks/metadata-location-field.js +35 -0
- package/dist/chunks/metadata-view.js +102 -0
- package/dist/chunks/pagination-controls.js +40 -0
- package/dist/chunks/table-row.js +72 -0
- package/dist/chunks/types.js +6 -11
- package/dist/chunks/types2.js +4 -0
- package/dist/chunks/zoom-button.js +20 -0
- package/dist/esm/index.js +29 -59
- package/dist/esm/lib/components/action-bar/action-bar.js +2 -62
- package/dist/esm/lib/components/action-bar/index.js +2 -4
- package/dist/esm/lib/components/action-bar/messages.js +22 -24
- package/dist/esm/lib/components/action-bar/zoom-button.js +2 -30
- package/dist/esm/lib/components/constants.js +14 -6
- package/dist/esm/lib/components/empty-state/empty-state.js +2 -30
- package/dist/esm/lib/components/empty-state/index.js +2 -4
- package/dist/esm/lib/components/empty-state/messages.js +10 -12
- package/dist/esm/lib/components/error-state/error-state.js +2 -31
- package/dist/esm/lib/components/error-state/index.js +2 -4
- package/dist/esm/lib/components/error-state/messages.js +10 -12
- package/dist/esm/lib/components/filter-row/advanced-field-content.js +30 -52
- package/dist/esm/lib/components/filter-row/advanced-filter-context.js +3 -6
- package/dist/esm/lib/components/filter-row/all-filters-chip.js +31 -49
- package/dist/esm/lib/components/filter-row/filter-row.js +35 -59
- package/dist/esm/lib/components/filter-row/form-filter-chip.js +84 -113
- package/dist/esm/lib/components/filter-row/index.js +6 -12
- package/dist/esm/lib/components/filter-row/initial-field-values.js +31 -51
- package/dist/esm/lib/components/filter-row/is-blank-or-not-blank-filter.js +2 -4
- package/dist/esm/lib/components/filter-row/is-filter-selected.js +37 -58
- package/dist/esm/lib/components/filter-row/messages.js +38 -40
- package/dist/esm/lib/components/filter-row/metadata-filter-chip.js +74 -103
- package/dist/esm/lib/components/filter-row/predefinedFilters/index.js +2 -6
- package/dist/esm/lib/components/filter-row/predefinedFilters/predefined-filter-options-factory.js +14 -21
- package/dist/esm/lib/components/filter-row/predefinedFilters/use-predefined-filter.js +58 -71
- package/dist/esm/lib/components/filter-row/select-filter-chip.js +41 -58
- package/dist/esm/lib/components/filter-row/use-form-filter-chip.js +36 -40
- package/dist/esm/lib/components/filter-sidepanel/filter-side-panel.js +2 -82
- package/dist/esm/lib/components/filter-sidepanel/filter.js +95 -140
- package/dist/esm/lib/components/filter-sidepanel/index.js +3 -6
- package/dist/esm/lib/components/filter-sidepanel/messages.js +18 -20
- package/dist/esm/lib/components/header/header.js +2 -82
- package/dist/esm/lib/components/header/index.js +2 -4
- package/dist/esm/lib/components/header/messages.js +14 -16
- package/dist/esm/lib/components/index.js +26 -53
- package/dist/esm/lib/components/item-action-menu/identifier.js +4 -7
- package/dist/esm/lib/components/item-action-menu/index.js +2 -4
- package/dist/esm/lib/components/item-action-menu/item-action-menu.js +2 -127
- package/dist/esm/lib/components/item-action-menu/messages.js +5 -9
- package/dist/esm/lib/components/metadata-grid/index.js +2 -4
- package/dist/esm/lib/components/metadata-grid/messages.js +5 -9
- package/dist/esm/lib/components/metadata-grid/metadata-grid.js +2 -62
- package/dist/esm/lib/components/metadata-table/actionColumn.js +3 -5
- package/dist/esm/lib/components/metadata-table/hooks/useInfiniteScrollTableItems.js +24 -29
- package/dist/esm/lib/components/metadata-table/index.js +4 -8
- package/dist/esm/lib/components/metadata-table/messages.js +14 -16
- package/dist/esm/lib/components/metadata-table/metadata-table.js +89 -127
- package/dist/esm/lib/components/metadata-table/table-body/ghost-table-body.js +10 -19
- package/dist/esm/lib/components/metadata-table/table-body/ghost-table-row/ghost-table-row.js +8 -19
- package/dist/esm/lib/components/metadata-table/table-body/ghost-table-row/index.js +2 -4
- package/dist/esm/lib/components/metadata-table/table-body/inline-editing-cell/index.js +2 -4
- package/dist/esm/lib/components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js +2 -56
- package/dist/esm/lib/components/metadata-table/table-body/table-body-with-data.js +135 -209
- package/dist/esm/lib/components/metadata-table/table-body/table-row/index.js +2 -4
- package/dist/esm/lib/components/metadata-table/table-body/table-row/table-row.js +2 -12
- package/dist/esm/lib/components/metadata-table/table-renderer.js +34 -55
- package/dist/esm/lib/components/metadata-value/index.js +6 -12
- package/dist/esm/lib/components/metadata-value/messages.js +15 -17
- package/dist/esm/lib/components/metadata-value/metadata-checkbox-field.js +24 -34
- package/dist/esm/lib/components/metadata-value/metadata-file-chip.js +14 -22
- package/dist/esm/lib/components/metadata-value/metadata-file-field.js +12 -19
- package/dist/esm/lib/components/metadata-value/metadata-location-field.js +2 -48
- package/dist/esm/lib/components/metadata-value/metadata-radio-field.js +26 -37
- package/dist/esm/lib/components/metadata-value/metadata-search-field.js +19 -30
- package/dist/esm/lib/components/pagination/index.js +4 -9
- package/dist/esm/lib/components/pagination/marker-based-pagination.js +12 -19
- package/dist/esm/lib/components/pagination/messages.js +19 -21
- package/dist/esm/lib/components/pagination/offset-based-pagination.js +22 -31
- package/dist/esm/lib/components/pagination/pagination-controls.js +2 -53
- package/dist/esm/lib/components/pagination/pagination.js +20 -35
- package/dist/esm/lib/components/pagination/utils.js +4 -6
- package/dist/esm/lib/components/sort-dropdown/index.js +2 -4
- package/dist/esm/lib/components/sort-dropdown/sort-dropdown.js +37 -56
- package/dist/esm/lib/components/switch-case/index.js +2 -5
- package/dist/esm/lib/components/switch-case/switch-case.js +4 -12
- package/dist/esm/lib/hooks/use-header.js +41 -37
- package/dist/esm/lib/index.js +28 -59
- package/dist/esm/lib/metadata-view.js +2 -151
- package/dist/styles/action-bar.css +1 -1
- package/dist/styles/empty-state.css +1 -1
- package/dist/styles/filter-row.css +1 -1
- package/dist/styles/header.css +1 -1
- package/dist/styles/inline-editing-cell.css +1 -1
- package/dist/styles/item-action-menu.css +1 -1
- package/dist/styles/metadata-grid.css +1 -1
- package/dist/styles/metadata-view.css +1 -1
- package/dist/styles/pagination-controls.css +1 -1
- package/dist/styles/table-row.css +1 -0
- package/dist/styles/zoom-button.css +1 -1
- package/package.json +14 -14
- package/dist/chunks/index.js +0 -105
- package/dist/styles/index.css +0 -1
|
@@ -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 {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
|
|
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 {
|
|
2
|
-
|
|
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,26 +1,24 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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 {
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 {
|
|
2
|
-
|
|
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,14 +1,12 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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 {
|
|
2
|
-
|
|
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,14 +1,12 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
2
|
-
|
|
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 {
|
|
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 {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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 };
|