@box/metadata-view 1.53.27 → 1.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as e, I as
|
|
2
|
-
import { ActionBar as
|
|
1
|
+
import { V as e, I as U } from "../../chunks/types.js";
|
|
2
|
+
import { ActionBar as b } from "./components/action-bar/action-bar.js";
|
|
3
3
|
import "./components/filter-row/filter-row.js";
|
|
4
4
|
import "./components/filter-row/form-filter-chip.js";
|
|
5
5
|
import "./components/filter-row/metadata-filter-chip.js";
|
|
@@ -8,8 +8,8 @@ import "./components/filter-row/predefinedFilters/index.js";
|
|
|
8
8
|
import "./components/filter-sidepanel/filter.js";
|
|
9
9
|
import "./components/filter-sidepanel/filter-side-panel.js";
|
|
10
10
|
import "./components/item-action-menu/item-action-menu.js";
|
|
11
|
-
import { MetadataGrid as
|
|
12
|
-
import { MetadataTable as
|
|
11
|
+
import { MetadataGrid as q } from "./components/metadata-grid/metadata-grid.js";
|
|
12
|
+
import { MetadataTable as J } from "./components/metadata-table/metadata-table.js";
|
|
13
13
|
import "./components/metadata-table/table-body/inline-editing-cell/inline-editing-cell.js";
|
|
14
14
|
import "./components/metadata-table/table-renderer.js";
|
|
15
15
|
import "./components/metadata-value/metadata-file-chip.js";
|
|
@@ -17,131 +17,135 @@ import "./components/metadata-value/metadata-file-field.js";
|
|
|
17
17
|
import "./components/metadata-value/metadata-location-field.js";
|
|
18
18
|
import "./components/metadata-value/metadata-radio-field.js";
|
|
19
19
|
import "./components/metadata-value/metadata-search-field.js";
|
|
20
|
-
import { Pagination as
|
|
20
|
+
import { Pagination as Q } from "./components/pagination/pagination.js";
|
|
21
21
|
import "./components/pagination/marker-based-pagination.js";
|
|
22
22
|
import "./components/pagination/offset-based-pagination.js";
|
|
23
23
|
import "./components/pagination/pagination-controls.js";
|
|
24
24
|
import "./components/sort-dropdown/sort-dropdown.js";
|
|
25
|
-
import { SwitchCase as
|
|
26
|
-
import { Header as
|
|
27
|
-
import { TooltipProvider as
|
|
28
|
-
import { useState as
|
|
29
|
-
import { useHeader as
|
|
30
|
-
import { jsx as o, jsxs as
|
|
31
|
-
import { ErrorState as
|
|
32
|
-
import
|
|
33
|
-
import '../../styles/metadata-view.css';const
|
|
34
|
-
container:
|
|
35
|
-
contentContainer:
|
|
25
|
+
import { SwitchCase as W, Case as d } from "./components/switch-case/switch-case.js";
|
|
26
|
+
import { Header as X } from "./components/header/header.js";
|
|
27
|
+
import { TooltipProvider as Y } from "@box/blueprint-web";
|
|
28
|
+
import { useState as C, useRef as $, useCallback as B } from "react";
|
|
29
|
+
import { useHeader as K } from "./hooks/use-header.js";
|
|
30
|
+
import { jsx as o, jsxs as L, Fragment as P } from "react/jsx-runtime";
|
|
31
|
+
import { ErrorState as oo } from "./components/error-state/error-state.js";
|
|
32
|
+
import to from "./components/empty-state/empty-state.js";
|
|
33
|
+
import '../../styles/metadata-view.css';const eo = "_container_1o9go_5", no = "_contentContainer_1o9go_15", _ = {
|
|
34
|
+
container: eo,
|
|
35
|
+
contentContainer: no
|
|
36
36
|
};
|
|
37
|
-
function
|
|
37
|
+
function Zo({
|
|
38
38
|
actionBarProps: i,
|
|
39
|
-
columns:
|
|
39
|
+
columns: h,
|
|
40
40
|
tableProps: m,
|
|
41
|
-
hasError:
|
|
41
|
+
hasError: D,
|
|
42
42
|
headerProps: a,
|
|
43
|
-
onRefresh:
|
|
43
|
+
onRefresh: R,
|
|
44
44
|
onSelectionChange: x,
|
|
45
|
+
onViewModeChange: y,
|
|
45
46
|
selectedKeys: c,
|
|
46
47
|
initialViewMode: G = e.LIST,
|
|
47
|
-
paginationProps:
|
|
48
|
-
isLoading:
|
|
48
|
+
paginationProps: f,
|
|
49
|
+
isLoading: S,
|
|
49
50
|
isSelectAllEnabled: N = !0,
|
|
50
51
|
isSelectionEnabled: p,
|
|
51
|
-
areSelectionCheckboxesDisabled:
|
|
52
|
-
...
|
|
52
|
+
areSelectionCheckboxesDisabled: g,
|
|
53
|
+
...r
|
|
53
54
|
}) {
|
|
54
|
-
const [
|
|
55
|
-
headerSelectionProps:
|
|
55
|
+
const [s, j] = C(G), [u, M] = C(void 0), [l, E] = C(0), w = $(null), {
|
|
56
|
+
headerSelectionProps: H,
|
|
56
57
|
handleSelectionChange: I,
|
|
57
|
-
selectionResetKey:
|
|
58
|
-
} =
|
|
58
|
+
selectionResetKey: V
|
|
59
|
+
} = K({
|
|
59
60
|
headerProps: a,
|
|
60
|
-
items:
|
|
61
|
+
items: r.items,
|
|
61
62
|
selectedKeys: c,
|
|
62
63
|
isSelectionEnabled: p,
|
|
63
64
|
onSelectionChange: x
|
|
64
|
-
}),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
}), O = () => {
|
|
66
|
+
j((t) => {
|
|
67
|
+
const n = t === e.LIST ? e.GRID : e.LIST;
|
|
68
|
+
return y?.(n), n;
|
|
69
|
+
});
|
|
70
|
+
}, Z = !S && r.items.length === 0, k = i && i.sortDropdownProps && h.filter((t) => t.type !== "multiSelect" && t.type !== "enum" && t.allowsSorting === !0), {
|
|
71
|
+
iconColumnVariant: v
|
|
72
|
+
} = m || {}, z = v && v === U.COLUMN, T = m?.onSortChange, A = B(({
|
|
69
73
|
column: t,
|
|
70
|
-
direction:
|
|
74
|
+
direction: n
|
|
71
75
|
}) => {
|
|
72
76
|
M({
|
|
73
77
|
column: t,
|
|
74
|
-
direction:
|
|
75
|
-
}),
|
|
78
|
+
direction: n
|
|
79
|
+
}), T?.({
|
|
76
80
|
column: t,
|
|
77
|
-
direction:
|
|
81
|
+
direction: n
|
|
78
82
|
});
|
|
79
|
-
}, [
|
|
83
|
+
}, [T]), F = {
|
|
80
84
|
...m,
|
|
81
85
|
sortDescriptor: u,
|
|
82
|
-
onSortChange:
|
|
86
|
+
onSortChange: A
|
|
83
87
|
};
|
|
84
|
-
return /* @__PURE__ */ o(
|
|
88
|
+
return /* @__PURE__ */ o(Y, {
|
|
85
89
|
children: /* @__PURE__ */ o("div", {
|
|
86
90
|
ref: w,
|
|
87
|
-
className:
|
|
88
|
-
children:
|
|
89
|
-
onRefresh:
|
|
90
|
-
}) : /* @__PURE__ */
|
|
91
|
-
children: [a && /* @__PURE__ */ o(
|
|
91
|
+
className: _.container,
|
|
92
|
+
children: D ? /* @__PURE__ */ o(oo, {
|
|
93
|
+
onRefresh: R
|
|
94
|
+
}) : /* @__PURE__ */ L(P, {
|
|
95
|
+
children: [a && /* @__PURE__ */ o(X, {
|
|
92
96
|
...a,
|
|
93
|
-
...
|
|
94
|
-
}), /* @__PURE__ */ o(
|
|
97
|
+
...H
|
|
98
|
+
}), /* @__PURE__ */ o(b, {
|
|
95
99
|
...i,
|
|
96
100
|
containerRef: w,
|
|
97
|
-
isIconColumnEnabled:
|
|
101
|
+
isIconColumnEnabled: z,
|
|
98
102
|
onSortDescriptorChange: M,
|
|
99
|
-
onViewModeClick:
|
|
100
|
-
onZoomLevelChange:
|
|
101
|
-
sortableColumns:
|
|
103
|
+
onViewModeClick: O,
|
|
104
|
+
onZoomLevelChange: E,
|
|
105
|
+
sortableColumns: k,
|
|
102
106
|
sortDescriptor: u,
|
|
103
|
-
viewMode:
|
|
107
|
+
viewMode: s,
|
|
104
108
|
zoomLevel: l
|
|
105
109
|
}), /* @__PURE__ */ o("div", {
|
|
106
|
-
className:
|
|
107
|
-
children: /* @__PURE__ */
|
|
108
|
-
children: [/* @__PURE__ */ o(
|
|
109
|
-
condition:
|
|
110
|
-
children: /* @__PURE__ */ o(
|
|
111
|
-
}), /* @__PURE__ */ o(
|
|
112
|
-
condition:
|
|
113
|
-
children: /* @__PURE__ */ o(
|
|
114
|
-
areSelectionCheckboxesDisabled:
|
|
115
|
-
columns:
|
|
116
|
-
isLoading:
|
|
110
|
+
className: _.contentContainer,
|
|
111
|
+
children: /* @__PURE__ */ L(W, {
|
|
112
|
+
children: [/* @__PURE__ */ o(d, {
|
|
113
|
+
condition: Z,
|
|
114
|
+
children: /* @__PURE__ */ o(to, {})
|
|
115
|
+
}), /* @__PURE__ */ o(d, {
|
|
116
|
+
condition: s === e.LIST,
|
|
117
|
+
children: /* @__PURE__ */ o(J, {
|
|
118
|
+
areSelectionCheckboxesDisabled: g,
|
|
119
|
+
columns: h,
|
|
120
|
+
isLoading: S,
|
|
117
121
|
isSelectAllEnabled: N,
|
|
118
122
|
onSelectionChange: I,
|
|
119
123
|
selectedKeys: c,
|
|
120
124
|
selectionMode: p ? "multiple" : "none",
|
|
121
125
|
zoomLevel: l,
|
|
122
|
-
...
|
|
123
|
-
...
|
|
124
|
-
},
|
|
125
|
-
}), /* @__PURE__ */ o(
|
|
126
|
-
condition:
|
|
127
|
-
children: /* @__PURE__ */ o(
|
|
128
|
-
areSelectionCheckboxesDisabled:
|
|
126
|
+
...r,
|
|
127
|
+
...F
|
|
128
|
+
}, V)
|
|
129
|
+
}), /* @__PURE__ */ o(d, {
|
|
130
|
+
condition: s === e.GRID,
|
|
131
|
+
children: /* @__PURE__ */ o(q, {
|
|
132
|
+
areSelectionCheckboxesDisabled: g,
|
|
129
133
|
onSelectionChange: I,
|
|
130
134
|
selectedKeys: c,
|
|
131
135
|
selectionMode: p ? "multiple" : "none",
|
|
132
136
|
zoomLevel: l,
|
|
133
|
-
...
|
|
134
|
-
},
|
|
137
|
+
...r
|
|
138
|
+
}, V)
|
|
135
139
|
})]
|
|
136
140
|
})
|
|
137
|
-
}),
|
|
138
|
-
...
|
|
141
|
+
}), f && /* @__PURE__ */ o(Q, {
|
|
142
|
+
...f
|
|
139
143
|
})]
|
|
140
144
|
})
|
|
141
145
|
})
|
|
142
146
|
});
|
|
143
147
|
}
|
|
144
148
|
export {
|
|
145
|
-
|
|
146
|
-
|
|
149
|
+
Zo as MetadataView,
|
|
150
|
+
Zo as default
|
|
147
151
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MetadataViewProps } from './types';
|
|
2
|
-
export declare function MetadataView({ actionBarProps, columns, tableProps, hasError, headerProps, onRefresh, onSelectionChange, selectedKeys, initialViewMode, paginationProps, isLoading, isSelectAllEnabled, isSelectionEnabled, areSelectionCheckboxesDisabled, ...rest }: MetadataViewProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function MetadataView({ actionBarProps, columns, tableProps, hasError, headerProps, onRefresh, onSelectionChange, onViewModeChange, selectedKeys, initialViewMode, paginationProps, isLoading, isSelectAllEnabled, isSelectionEnabled, areSelectionCheckboxesDisabled, ...rest }: MetadataViewProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default MetadataView;
|
|
@@ -66,6 +66,7 @@ export interface MetadataViewProps extends MetadataProps {
|
|
|
66
66
|
initialViewMode?: ViewMode;
|
|
67
67
|
onRefresh?: () => void;
|
|
68
68
|
onSelectionChange?: (keys: Selection) => void;
|
|
69
|
+
onViewModeChange?: (newViewMode: ViewMode) => void;
|
|
69
70
|
selectedKeys?: typeof SELECT_ALL | Iterable<string | number>;
|
|
70
71
|
isSelectAllEnabled?: boolean;
|
|
71
72
|
isSelectionEnabled?: boolean;
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-view",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.54.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@box/blueprint-web": "^14.
|
|
7
|
-
"@box/blueprint-web-assets": "^4.111.
|
|
8
|
-
"@box/box-item-type-selector": "^1.39.
|
|
9
|
-
"@box/item-icon": "^2.32.
|
|
10
|
-
"@box/metadata-filter": "^1.80.
|
|
6
|
+
"@box/blueprint-web": "^14.3.0",
|
|
7
|
+
"@box/blueprint-web-assets": "^4.111.20",
|
|
8
|
+
"@box/box-item-type-selector": "^1.39.24",
|
|
9
|
+
"@box/item-icon": "^2.32.17",
|
|
10
|
+
"@box/metadata-filter": "^1.80.26",
|
|
11
11
|
"@box/types": "2.1.12",
|
|
12
|
-
"@box/content-field": "^1.40.
|
|
12
|
+
"@box/content-field": "^1.40.24",
|
|
13
13
|
"@tanstack/react-virtual": "^3.10.8",
|
|
14
14
|
"formik": "^2.4.5",
|
|
15
15
|
"lodash": "^4.17.15",
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"react-intl": "^6.4.2"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@box/blueprint-web": "^14.
|
|
23
|
-
"@box/blueprint-web-assets": "^4.111.
|
|
24
|
-
"@box/box-item-type-selector": "^1.39.
|
|
22
|
+
"@box/blueprint-web": "^14.3.0",
|
|
23
|
+
"@box/blueprint-web-assets": "^4.111.20",
|
|
24
|
+
"@box/box-item-type-selector": "^1.39.24",
|
|
25
25
|
"@box/eslint-plugin-blueprint": "1.1.9",
|
|
26
|
-
"@box/item-icon": "^2.32.
|
|
27
|
-
"@box/metadata-filter": "^1.80.
|
|
28
|
-
"@box/storybook-utils": "0.17.
|
|
26
|
+
"@box/item-icon": "^2.32.17",
|
|
27
|
+
"@box/metadata-filter": "^1.80.26",
|
|
28
|
+
"@box/storybook-utils": "0.17.20",
|
|
29
29
|
"@box/types": "2.1.12",
|
|
30
|
-
"@box/content-field": "^1.40.
|
|
30
|
+
"@box/content-field": "^1.40.24",
|
|
31
31
|
"@tanstack/react-virtual": "^3.10.8",
|
|
32
32
|
"react-intl": "^6.4.2"
|
|
33
33
|
},
|