@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
|
@@ -1,141 +1,96 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { jsx as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
|
|
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
|
|
2
|
-
import {
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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 {
|
|
2
|
-
|
|
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,18 +1,16 @@
|
|
|
1
1
|
import { defineMessages as e } from "react-intl";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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 {
|
|
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
|
-
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
|
|
2
|
-
function
|
|
3
|
-
|
|
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,127 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
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 };
|