@react-spectrum/list 3.0.0-alpha.10 → 3.0.0-alpha.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/main.css +1 -1
- package/dist/main.js +530 -338
- package/dist/main.js.map +1 -1
- package/dist/module.js +532 -340
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +3 -31
- package/dist/types.d.ts.map +1 -1
- package/package.json +39 -37
- package/src/DragPreview.tsx +28 -40
- package/src/InsertionIndicator.tsx +42 -0
- package/src/ListView.tsx +170 -120
- package/src/ListViewItem.tsx +129 -65
- package/src/RootDropIndicator.tsx +25 -0
- package/src/{listview.css → styles.css} +264 -33
package/dist/main.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
require("./main.css");
|
|
2
2
|
var $k9Du2$reactstatelycollections = require("@react-stately/collections");
|
|
3
3
|
var $k9Du2$reactspectrumutils = require("@react-spectrum/utils");
|
|
4
|
-
var $k9Du2$
|
|
5
|
-
var $k9Du2$reactariagrid = require("@react-aria/grid");
|
|
4
|
+
var $k9Du2$reactariautils = require("@react-aria/utils");
|
|
6
5
|
var $k9Du2$reactstatelylayout = require("@react-stately/layout");
|
|
7
6
|
var $k9Du2$reactstatelylist = require("@react-stately/list");
|
|
8
7
|
var $k9Du2$reactspectrumprogress = require("@react-spectrum/progress");
|
|
9
8
|
var $k9Du2$react = require("react");
|
|
9
|
+
var $k9Du2$reactstatelyvirtualizer = require("@react-stately/virtualizer");
|
|
10
10
|
var $k9Du2$reactariai18n = require("@react-aria/i18n");
|
|
11
|
+
var $k9Du2$reactarialist = require("@react-aria/list");
|
|
11
12
|
var $k9Du2$reactspectrumprovider = require("@react-spectrum/provider");
|
|
12
13
|
var $k9Du2$reactariavirtualizer = require("@react-aria/virtualizer");
|
|
13
|
-
var $k9Du2$
|
|
14
|
-
var $k9Du2$reactspectrumlayout = require("@react-spectrum/layout");
|
|
14
|
+
var $k9Du2$reactariavisuallyhidden = require("@react-aria/visually-hidden");
|
|
15
15
|
var $k9Du2$reactspectrumcheckbox = require("@react-spectrum/checkbox");
|
|
16
16
|
var $k9Du2$spectrumiconsuiChevronLeftMedium = require("@spectrum-icons/ui/ChevronLeftMedium");
|
|
17
17
|
var $k9Du2$spectrumiconsuiChevronRightMedium = require("@spectrum-icons/ui/ChevronRightMedium");
|
|
18
|
+
var $k9Du2$reacttransitiongroup = require("react-transition-group");
|
|
18
19
|
var $k9Du2$reactariafocus = require("@react-aria/focus");
|
|
20
|
+
var $k9Du2$reactspectrumlayout = require("@react-spectrum/layout");
|
|
21
|
+
var $k9Du2$reactariainteractions = require("@react-aria/interactions");
|
|
19
22
|
var $k9Du2$spectrumiconsuiListGripper = require("@spectrum-icons/ui/ListGripper");
|
|
20
|
-
var $k9Du2$
|
|
23
|
+
var $k9Du2$reactspectrumtext = require("@react-spectrum/text");
|
|
21
24
|
var $k9Du2$reactariabutton = require("@react-aria/button");
|
|
22
|
-
var $k9Du2$reactariainteractions = require("@react-aria/interactions");
|
|
23
|
-
var $k9Du2$reactariavisuallyhidden = require("@react-aria/visually-hidden");
|
|
24
25
|
|
|
25
26
|
function $parcel$export(e, n, v, s) {
|
|
26
27
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
@@ -34,183 +35,197 @@ $parcel$export(module.exports, "Item", () => $k9Du2$reactstatelycollections.Item
|
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
$parcel$export($
|
|
41
|
-
$parcel$export($
|
|
42
|
-
$parcel$export($
|
|
43
|
-
$parcel$export($
|
|
44
|
-
$parcel$export($
|
|
45
|
-
$parcel$export($
|
|
46
|
-
$parcel$export($
|
|
47
|
-
$parcel$export($
|
|
48
|
-
$parcel$export($
|
|
49
|
-
$parcel$export($
|
|
50
|
-
$parcel$export($
|
|
51
|
-
$parcel$export($
|
|
52
|
-
$parcel$export($
|
|
53
|
-
$parcel$export($
|
|
54
|
-
$parcel$export($
|
|
55
|
-
$parcel$export($
|
|
56
|
-
$parcel$export($
|
|
57
|
-
$parcel$export($
|
|
58
|
-
$parcel$export($
|
|
59
|
-
$parcel$export($
|
|
60
|
-
$parcel$export($
|
|
61
|
-
$parcel$export($
|
|
62
|
-
$parcel$export($
|
|
63
|
-
$parcel$export($
|
|
64
|
-
$parcel$export($
|
|
65
|
-
$parcel$export($
|
|
66
|
-
$parcel$export($
|
|
67
|
-
$parcel$export($
|
|
68
|
-
$parcel$export($
|
|
69
|
-
$parcel$export($
|
|
70
|
-
$parcel$export($
|
|
71
|
-
$parcel$export($
|
|
72
|
-
$parcel$export($
|
|
73
|
-
$parcel$export($
|
|
74
|
-
$parcel$export($
|
|
75
|
-
$parcel$export($
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
var $
|
|
93
|
-
var $
|
|
94
|
-
var $
|
|
95
|
-
var $
|
|
96
|
-
var $
|
|
97
|
-
var $
|
|
98
|
-
var $
|
|
99
|
-
var $
|
|
100
|
-
var $
|
|
101
|
-
var $
|
|
102
|
-
var $
|
|
103
|
-
var $
|
|
104
|
-
var $
|
|
105
|
-
var $
|
|
106
|
-
var $
|
|
107
|
-
var $
|
|
108
|
-
var $
|
|
109
|
-
var $
|
|
110
|
-
var $
|
|
111
|
-
var $
|
|
112
|
-
$
|
|
113
|
-
$
|
|
114
|
-
$
|
|
115
|
-
$
|
|
116
|
-
$
|
|
117
|
-
$
|
|
118
|
-
$
|
|
119
|
-
$
|
|
120
|
-
$
|
|
121
|
-
$
|
|
122
|
-
$
|
|
123
|
-
$
|
|
124
|
-
$
|
|
125
|
-
$
|
|
126
|
-
$
|
|
127
|
-
$
|
|
128
|
-
$
|
|
129
|
-
$
|
|
130
|
-
$
|
|
131
|
-
$
|
|
132
|
-
$
|
|
133
|
-
$
|
|
134
|
-
$
|
|
135
|
-
$
|
|
136
|
-
$
|
|
137
|
-
$
|
|
138
|
-
$
|
|
139
|
-
$
|
|
140
|
-
$
|
|
141
|
-
$
|
|
142
|
-
$
|
|
143
|
-
$
|
|
144
|
-
$
|
|
145
|
-
$
|
|
146
|
-
$
|
|
147
|
-
$
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
38
|
+
var $279507a6f189e509$exports = {};
|
|
39
|
+
|
|
40
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView", () => $279507a6f189e509$export$4ad4709e9aee8e02, (v) => $279507a6f189e509$export$4ad4709e9aee8e02 = v);
|
|
41
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView-row", () => $279507a6f189e509$export$f80410436c6352c8, (v) => $279507a6f189e509$export$f80410436c6352c8 = v);
|
|
42
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView--emphasized", () => $279507a6f189e509$export$eb0d5352b2a55473, (v) => $279507a6f189e509$export$eb0d5352b2a55473 = v);
|
|
43
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem", () => $279507a6f189e509$export$ce8c93b50eec2d4f, (v) => $279507a6f189e509$export$ce8c93b50eec2d4f = v);
|
|
44
|
+
$parcel$export($279507a6f189e509$exports, "is-selected", () => $279507a6f189e509$export$1e0fb04f31d3c22a, (v) => $279507a6f189e509$export$1e0fb04f31d3c22a = v);
|
|
45
|
+
$parcel$export($279507a6f189e509$exports, "is-hovered", () => $279507a6f189e509$export$b8813cd5d7824ce7, (v) => $279507a6f189e509$export$b8813cd5d7824ce7 = v);
|
|
46
|
+
$parcel$export($279507a6f189e509$exports, "is-active", () => $279507a6f189e509$export$20fd0f7cd4e6112f, (v) => $279507a6f189e509$export$20fd0f7cd4e6112f = v);
|
|
47
|
+
$parcel$export($279507a6f189e509$exports, "focus-ring", () => $279507a6f189e509$export$f39a09f249340e2a, (v) => $279507a6f189e509$export$f39a09f249340e2a = v);
|
|
48
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem--firstRow", () => $279507a6f189e509$export$60162f05499b7560, (v) => $279507a6f189e509$export$60162f05499b7560 = v);
|
|
49
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView--quiet", () => $279507a6f189e509$export$b01cb9680b0b8d22, (v) => $279507a6f189e509$export$b01cb9680b0b8d22 = v);
|
|
50
|
+
$parcel$export($279507a6f189e509$exports, "is-next-selected", () => $279507a6f189e509$export$53aa811f86efbfad, (v) => $279507a6f189e509$export$53aa811f86efbfad = v);
|
|
51
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem--isFlushBottom", () => $279507a6f189e509$export$f9ed481cac4d935a, (v) => $279507a6f189e509$export$f9ed481cac4d935a = v);
|
|
52
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView--loadingMore", () => $279507a6f189e509$export$5aa06adeaa92dbca, (v) => $279507a6f189e509$export$5aa06adeaa92dbca = v);
|
|
53
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem--lastRow", () => $279507a6f189e509$export$659c081622dc13b0, (v) => $279507a6f189e509$export$659c081622dc13b0 = v);
|
|
54
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView--isVerticalScrollbarVisible", () => $279507a6f189e509$export$1bf50375883926, (v) => $279507a6f189e509$export$1bf50375883926 = v);
|
|
55
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView--isHorizontalScrollbarVisible", () => $279507a6f189e509$export$d9b13621bc5dd4d1, (v) => $279507a6f189e509$export$d9b13621bc5dd4d1 = v);
|
|
56
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView--wrap", () => $279507a6f189e509$export$68b45d42c77fe1cf, (v) => $279507a6f189e509$export$68b45d42c77fe1cf = v);
|
|
57
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-content", () => $279507a6f189e509$export$dc2b0b08d47555, (v) => $279507a6f189e509$export$dc2b0b08d47555 = v);
|
|
58
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-description", () => $279507a6f189e509$export$5d2adfeb248e654a, (v) => $279507a6f189e509$export$5d2adfeb248e654a = v);
|
|
59
|
+
$parcel$export($279507a6f189e509$exports, "round-tops", () => $279507a6f189e509$export$3b4577d06eb82ec0, (v) => $279507a6f189e509$export$3b4577d06eb82ec0 = v);
|
|
60
|
+
$parcel$export($279507a6f189e509$exports, "round-bottoms", () => $279507a6f189e509$export$8a26470723c97997, (v) => $279507a6f189e509$export$8a26470723c97997 = v);
|
|
61
|
+
$parcel$export($279507a6f189e509$exports, "is-focused", () => $279507a6f189e509$export$e7dc768d35940237, (v) => $279507a6f189e509$export$e7dc768d35940237 = v);
|
|
62
|
+
$parcel$export($279507a6f189e509$exports, "is-disabled", () => $279507a6f189e509$export$d35bc1e505d1ebbf, (v) => $279507a6f189e509$export$d35bc1e505d1ebbf = v);
|
|
63
|
+
$parcel$export($279507a6f189e509$exports, "has-checkbox", () => $279507a6f189e509$export$27f4d14f7fc5b94, (v) => $279507a6f189e509$export$27f4d14f7fc5b94 = v);
|
|
64
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-grid", () => $279507a6f189e509$export$aaaf83100348d389, (v) => $279507a6f189e509$export$aaaf83100348d389 = v);
|
|
65
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-draghandle-container", () => $279507a6f189e509$export$f385e7456ddfee84, (v) => $279507a6f189e509$export$f385e7456ddfee84 = v);
|
|
66
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-draghandle-button", () => $279507a6f189e509$export$4784f0c2ec8bbf7b, (v) => $279507a6f189e509$export$4784f0c2ec8bbf7b = v);
|
|
67
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-checkboxWrapper", () => $279507a6f189e509$export$41a33ae9818c51be, (v) => $279507a6f189e509$export$41a33ae9818c51be = v);
|
|
68
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-checkbox", () => $279507a6f189e509$export$f979f76ca45242f2, (v) => $279507a6f189e509$export$f979f76ca45242f2 = v);
|
|
69
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-icon", () => $279507a6f189e509$export$2b56ca744bd31ebd, (v) => $279507a6f189e509$export$2b56ca744bd31ebd = v);
|
|
70
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-image", () => $279507a6f189e509$export$1260770e51d5a8c4, (v) => $279507a6f189e509$export$1260770e51d5a8c4 = v);
|
|
71
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView--hasDescription", () => $279507a6f189e509$export$7c9efe74c4b77579, (v) => $279507a6f189e509$export$7c9efe74c4b77579 = v);
|
|
72
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-actions", () => $279507a6f189e509$export$26480389595d4515, (v) => $279507a6f189e509$export$26480389595d4515 = v);
|
|
73
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-actionmenu", () => $279507a6f189e509$export$58dfda3903289699, (v) => $279507a6f189e509$export$58dfda3903289699 = v);
|
|
74
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-parentIndicator", () => $279507a6f189e509$export$39b42a8a24290c17, (v) => $279507a6f189e509$export$39b42a8a24290c17 = v);
|
|
75
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-dragPreview", () => $279507a6f189e509$export$84286d36e5c00c55, (v) => $279507a6f189e509$export$84286d36e5c00c55 = v);
|
|
76
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-badge", () => $279507a6f189e509$export$6498e436231eea33, (v) => $279507a6f189e509$export$6498e436231eea33 = v);
|
|
77
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-dragPreview--multiple", () => $279507a6f189e509$export$2fb3c7c2d5c0d720, (v) => $279507a6f189e509$export$2fb3c7c2d5c0d720 = v);
|
|
78
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView--hasAnyChildren", () => $279507a6f189e509$export$7150e72e440612bf, (v) => $279507a6f189e509$export$7150e72e440612bf = v);
|
|
79
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-parentIndicator--hasChildItems", () => $279507a6f189e509$export$c29dcfa80dab8c88, (v) => $279507a6f189e509$export$c29dcfa80dab8c88 = v);
|
|
80
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView--compact", () => $279507a6f189e509$export$1f55b27adf96a61e, (v) => $279507a6f189e509$export$1f55b27adf96a61e = v);
|
|
81
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView--spacious", () => $279507a6f189e509$export$cbd30c7809acdd81, (v) => $279507a6f189e509$export$cbd30c7809acdd81 = v);
|
|
82
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView--draggable", () => $279507a6f189e509$export$a2d35348c0cc9bca, (v) => $279507a6f189e509$export$a2d35348c0cc9bca = v);
|
|
83
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem--dropTarget", () => $279507a6f189e509$export$8afa006321ee3a8f, (v) => $279507a6f189e509$export$8afa006321ee3a8f = v);
|
|
84
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView--dropTarget", () => $279507a6f189e509$export$d9ba3f873d0eaec6, (v) => $279507a6f189e509$export$d9ba3f873d0eaec6 = v);
|
|
85
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView-centeredWrapper", () => $279507a6f189e509$export$1b66ee5cd8394caf, (v) => $279507a6f189e509$export$1b66ee5cd8394caf = v);
|
|
86
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListView-centeredWrapper--loadingMore", () => $279507a6f189e509$export$6b3b7792abd9e5f4, (v) => $279507a6f189e509$export$6b3b7792abd9e5f4 = v);
|
|
87
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewInsertionIndicator", () => $279507a6f189e509$export$2a6a235e0baff403, (v) => $279507a6f189e509$export$2a6a235e0baff403 = v);
|
|
88
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewInsertionIndicator--dropTarget", () => $279507a6f189e509$export$927a243805a411ca, (v) => $279507a6f189e509$export$927a243805a411ca = v);
|
|
89
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-checkbox--enter", () => $279507a6f189e509$export$9dc11c0e0825a249, (v) => $279507a6f189e509$export$9dc11c0e0825a249 = v);
|
|
90
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-checkbox--enterActive", () => $279507a6f189e509$export$f89865e352230a35, (v) => $279507a6f189e509$export$f89865e352230a35 = v);
|
|
91
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-checkbox--exit", () => $279507a6f189e509$export$867c05a16e5d2a7c, (v) => $279507a6f189e509$export$867c05a16e5d2a7c = v);
|
|
92
|
+
$parcel$export($279507a6f189e509$exports, "react-spectrum-ListViewItem-checkbox--exitActive", () => $279507a6f189e509$export$61b66671605f1b1a, (v) => $279507a6f189e509$export$61b66671605f1b1a = v);
|
|
93
|
+
var $279507a6f189e509$export$4ad4709e9aee8e02;
|
|
94
|
+
var $279507a6f189e509$export$f80410436c6352c8;
|
|
95
|
+
var $279507a6f189e509$export$eb0d5352b2a55473;
|
|
96
|
+
var $279507a6f189e509$export$ce8c93b50eec2d4f;
|
|
97
|
+
var $279507a6f189e509$export$1e0fb04f31d3c22a;
|
|
98
|
+
var $279507a6f189e509$export$b8813cd5d7824ce7;
|
|
99
|
+
var $279507a6f189e509$export$20fd0f7cd4e6112f;
|
|
100
|
+
var $279507a6f189e509$export$f39a09f249340e2a;
|
|
101
|
+
var $279507a6f189e509$export$60162f05499b7560;
|
|
102
|
+
var $279507a6f189e509$export$b01cb9680b0b8d22;
|
|
103
|
+
var $279507a6f189e509$export$53aa811f86efbfad;
|
|
104
|
+
var $279507a6f189e509$export$f9ed481cac4d935a;
|
|
105
|
+
var $279507a6f189e509$export$5aa06adeaa92dbca;
|
|
106
|
+
var $279507a6f189e509$export$659c081622dc13b0;
|
|
107
|
+
var $279507a6f189e509$export$1bf50375883926;
|
|
108
|
+
var $279507a6f189e509$export$d9b13621bc5dd4d1;
|
|
109
|
+
var $279507a6f189e509$export$68b45d42c77fe1cf;
|
|
110
|
+
var $279507a6f189e509$export$dc2b0b08d47555;
|
|
111
|
+
var $279507a6f189e509$export$5d2adfeb248e654a;
|
|
112
|
+
var $279507a6f189e509$export$3b4577d06eb82ec0;
|
|
113
|
+
var $279507a6f189e509$export$8a26470723c97997;
|
|
114
|
+
var $279507a6f189e509$export$e7dc768d35940237;
|
|
115
|
+
var $279507a6f189e509$export$d35bc1e505d1ebbf;
|
|
116
|
+
var $279507a6f189e509$export$27f4d14f7fc5b94;
|
|
117
|
+
var $279507a6f189e509$export$aaaf83100348d389;
|
|
118
|
+
var $279507a6f189e509$export$f385e7456ddfee84;
|
|
119
|
+
var $279507a6f189e509$export$4784f0c2ec8bbf7b;
|
|
120
|
+
var $279507a6f189e509$export$41a33ae9818c51be;
|
|
121
|
+
var $279507a6f189e509$export$f979f76ca45242f2;
|
|
122
|
+
var $279507a6f189e509$export$2b56ca744bd31ebd;
|
|
123
|
+
var $279507a6f189e509$export$1260770e51d5a8c4;
|
|
124
|
+
var $279507a6f189e509$export$7c9efe74c4b77579;
|
|
125
|
+
var $279507a6f189e509$export$26480389595d4515;
|
|
126
|
+
var $279507a6f189e509$export$58dfda3903289699;
|
|
127
|
+
var $279507a6f189e509$export$39b42a8a24290c17;
|
|
128
|
+
var $279507a6f189e509$export$84286d36e5c00c55;
|
|
129
|
+
var $279507a6f189e509$export$6498e436231eea33;
|
|
130
|
+
var $279507a6f189e509$export$2fb3c7c2d5c0d720;
|
|
131
|
+
var $279507a6f189e509$export$7150e72e440612bf;
|
|
132
|
+
var $279507a6f189e509$export$c29dcfa80dab8c88;
|
|
133
|
+
var $279507a6f189e509$export$1f55b27adf96a61e;
|
|
134
|
+
var $279507a6f189e509$export$cbd30c7809acdd81;
|
|
135
|
+
var $279507a6f189e509$export$a2d35348c0cc9bca;
|
|
136
|
+
var $279507a6f189e509$export$8afa006321ee3a8f;
|
|
137
|
+
var $279507a6f189e509$export$d9ba3f873d0eaec6;
|
|
138
|
+
var $279507a6f189e509$export$1b66ee5cd8394caf;
|
|
139
|
+
var $279507a6f189e509$export$6b3b7792abd9e5f4;
|
|
140
|
+
var $279507a6f189e509$export$2a6a235e0baff403;
|
|
141
|
+
var $279507a6f189e509$export$927a243805a411ca;
|
|
142
|
+
var $279507a6f189e509$export$9dc11c0e0825a249;
|
|
143
|
+
var $279507a6f189e509$export$f89865e352230a35;
|
|
144
|
+
var $279507a6f189e509$export$867c05a16e5d2a7c;
|
|
145
|
+
var $279507a6f189e509$export$61b66671605f1b1a;
|
|
146
|
+
$279507a6f189e509$export$4ad4709e9aee8e02 = "react-spectrum-ListView_dd5487";
|
|
147
|
+
$279507a6f189e509$export$f80410436c6352c8 = "react-spectrum-ListView-row_dd5487";
|
|
148
|
+
$279507a6f189e509$export$eb0d5352b2a55473 = "react-spectrum-ListView--emphasized_dd5487";
|
|
149
|
+
$279507a6f189e509$export$ce8c93b50eec2d4f = "react-spectrum-ListViewItem_dd5487";
|
|
150
|
+
$279507a6f189e509$export$1e0fb04f31d3c22a = "is-selected_dd5487";
|
|
151
|
+
$279507a6f189e509$export$b8813cd5d7824ce7 = "is-hovered_dd5487";
|
|
152
|
+
$279507a6f189e509$export$20fd0f7cd4e6112f = "is-active_dd5487";
|
|
153
|
+
$279507a6f189e509$export$f39a09f249340e2a = "focus-ring_dd5487";
|
|
154
|
+
$279507a6f189e509$export$60162f05499b7560 = "react-spectrum-ListViewItem--firstRow_dd5487";
|
|
155
|
+
$279507a6f189e509$export$b01cb9680b0b8d22 = "react-spectrum-ListView--quiet_dd5487";
|
|
156
|
+
$279507a6f189e509$export$53aa811f86efbfad = "is-next-selected_dd5487";
|
|
157
|
+
$279507a6f189e509$export$f9ed481cac4d935a = "react-spectrum-ListViewItem--isFlushBottom_dd5487";
|
|
158
|
+
$279507a6f189e509$export$5aa06adeaa92dbca = "react-spectrum-ListView--loadingMore_dd5487";
|
|
159
|
+
$279507a6f189e509$export$659c081622dc13b0 = "react-spectrum-ListViewItem--lastRow_dd5487";
|
|
160
|
+
$279507a6f189e509$export$1bf50375883926 = "react-spectrum-ListView--isVerticalScrollbarVisible_dd5487";
|
|
161
|
+
$279507a6f189e509$export$d9b13621bc5dd4d1 = "react-spectrum-ListView--isHorizontalScrollbarVisible_dd5487";
|
|
162
|
+
$279507a6f189e509$export$68b45d42c77fe1cf = "react-spectrum-ListView--wrap_dd5487";
|
|
163
|
+
$279507a6f189e509$export$dc2b0b08d47555 = "react-spectrum-ListViewItem-content_dd5487";
|
|
164
|
+
$279507a6f189e509$export$5d2adfeb248e654a = "react-spectrum-ListViewItem-description_dd5487";
|
|
165
|
+
$279507a6f189e509$export$3b4577d06eb82ec0 = "round-tops_dd5487";
|
|
166
|
+
$279507a6f189e509$export$8a26470723c97997 = "round-bottoms_dd5487";
|
|
167
|
+
$279507a6f189e509$export$e7dc768d35940237 = "is-focused_dd5487";
|
|
168
|
+
$279507a6f189e509$export$d35bc1e505d1ebbf = "is-disabled_dd5487";
|
|
169
|
+
$279507a6f189e509$export$27f4d14f7fc5b94 = "has-checkbox_dd5487";
|
|
170
|
+
$279507a6f189e509$export$aaaf83100348d389 = "react-spectrum-ListViewItem-grid_dd5487";
|
|
171
|
+
$279507a6f189e509$export$f385e7456ddfee84 = "react-spectrum-ListViewItem-draghandle-container_dd5487";
|
|
172
|
+
$279507a6f189e509$export$4784f0c2ec8bbf7b = "react-spectrum-ListViewItem-draghandle-button_dd5487";
|
|
173
|
+
$279507a6f189e509$export$41a33ae9818c51be = "react-spectrum-ListViewItem-checkboxWrapper_dd5487";
|
|
174
|
+
$279507a6f189e509$export$f979f76ca45242f2 = "react-spectrum-ListViewItem-checkbox_dd5487";
|
|
175
|
+
$279507a6f189e509$export$2b56ca744bd31ebd = "react-spectrum-ListViewItem-icon_dd5487";
|
|
176
|
+
$279507a6f189e509$export$1260770e51d5a8c4 = "react-spectrum-ListViewItem-image_dd5487";
|
|
177
|
+
$279507a6f189e509$export$7c9efe74c4b77579 = "react-spectrum-ListView--hasDescription_dd5487";
|
|
178
|
+
$279507a6f189e509$export$26480389595d4515 = "react-spectrum-ListViewItem-actions_dd5487";
|
|
179
|
+
$279507a6f189e509$export$58dfda3903289699 = "react-spectrum-ListViewItem-actionmenu_dd5487";
|
|
180
|
+
$279507a6f189e509$export$39b42a8a24290c17 = "react-spectrum-ListViewItem-parentIndicator_dd5487";
|
|
181
|
+
$279507a6f189e509$export$84286d36e5c00c55 = "react-spectrum-ListViewItem-dragPreview_dd5487";
|
|
182
|
+
$279507a6f189e509$export$6498e436231eea33 = "react-spectrum-ListViewItem-badge_dd5487";
|
|
183
|
+
$279507a6f189e509$export$2fb3c7c2d5c0d720 = "react-spectrum-ListViewItem-dragPreview--multiple_dd5487";
|
|
184
|
+
$279507a6f189e509$export$7150e72e440612bf = "react-spectrum-ListView--hasAnyChildren_dd5487";
|
|
185
|
+
$279507a6f189e509$export$c29dcfa80dab8c88 = "react-spectrum-ListViewItem-parentIndicator--hasChildItems_dd5487";
|
|
186
|
+
$279507a6f189e509$export$1f55b27adf96a61e = "react-spectrum-ListView--compact_dd5487";
|
|
187
|
+
$279507a6f189e509$export$cbd30c7809acdd81 = "react-spectrum-ListView--spacious_dd5487";
|
|
188
|
+
$279507a6f189e509$export$a2d35348c0cc9bca = "react-spectrum-ListView--draggable_dd5487";
|
|
189
|
+
$279507a6f189e509$export$8afa006321ee3a8f = "react-spectrum-ListViewItem--dropTarget_dd5487";
|
|
190
|
+
$279507a6f189e509$export$d9ba3f873d0eaec6 = "react-spectrum-ListView--dropTarget_dd5487";
|
|
191
|
+
$279507a6f189e509$export$1b66ee5cd8394caf = "react-spectrum-ListView-centeredWrapper_dd5487";
|
|
192
|
+
$279507a6f189e509$export$6b3b7792abd9e5f4 = "react-spectrum-ListView-centeredWrapper--loadingMore_dd5487";
|
|
193
|
+
$279507a6f189e509$export$2a6a235e0baff403 = "react-spectrum-ListViewInsertionIndicator_dd5487";
|
|
194
|
+
$279507a6f189e509$export$927a243805a411ca = "react-spectrum-ListViewInsertionIndicator--dropTarget_dd5487";
|
|
195
|
+
$279507a6f189e509$export$9dc11c0e0825a249 = "react-spectrum-ListViewItem-checkbox--enter_dd5487";
|
|
196
|
+
$279507a6f189e509$export$f89865e352230a35 = "react-spectrum-ListViewItem-checkbox--enterActive_dd5487";
|
|
197
|
+
$279507a6f189e509$export$867c05a16e5d2a7c = "react-spectrum-ListViewItem-checkbox--exit_dd5487";
|
|
198
|
+
$279507a6f189e509$export$61b66671605f1b1a = "react-spectrum-ListViewItem-checkbox--exitActive_dd5487";
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
function $fc02fd49ab58c72e$export$2e2bcd8739ae039(props) {
|
|
205
|
+
let { dropState: dropState , dropHooks: dropHooks } = $k9Du2$react.useContext($60684b441be8e84c$export$870039b0abfe3de0);
|
|
206
|
+
const { target: target , isPresentationOnly: isPresentationOnly } = props;
|
|
207
|
+
let ref = $k9Du2$react.useRef();
|
|
208
|
+
let { dropIndicatorProps: dropIndicatorProps } = dropHooks.useDropIndicator(props, dropState, ref);
|
|
209
|
+
let { visuallyHiddenProps: visuallyHiddenProps } = $k9Du2$reactariavisuallyhidden.useVisuallyHidden();
|
|
210
|
+
let isDropTarget = dropState.isDropTarget(target);
|
|
211
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement("div", {
|
|
212
|
+
role: "row",
|
|
213
|
+
"aria-hidden": dropIndicatorProps['aria-hidden']
|
|
161
214
|
}, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement("div", {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
'react-spectrum-ListViewItem-dragPreview--multiple': isDraggingMultiple
|
|
215
|
+
role: "gridcell",
|
|
216
|
+
"aria-selected": "false",
|
|
217
|
+
className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports)), 'react-spectrum-ListViewInsertionIndicator', {
|
|
218
|
+
'react-spectrum-ListViewInsertionIndicator--dropTarget': isDropTarget
|
|
167
219
|
})
|
|
168
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement(
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
},
|
|
175
|
-
text: {
|
|
176
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($a91790a0cbcae398$exports))['react-spectrum-ListViewItem-content']
|
|
177
|
-
},
|
|
178
|
-
description: {
|
|
179
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($a91790a0cbcae398$exports))['react-spectrum-ListViewItem-description']
|
|
180
|
-
},
|
|
181
|
-
icon: {
|
|
182
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($a91790a0cbcae398$exports))['react-spectrum-ListViewItem-icon'],
|
|
183
|
-
size: 'M'
|
|
184
|
-
},
|
|
185
|
-
image: {
|
|
186
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($a91790a0cbcae398$exports))['react-spectrum-ListViewItem-image']
|
|
187
|
-
},
|
|
188
|
-
link: {
|
|
189
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($a91790a0cbcae398$exports))['react-spectrum-ListViewItem-content'],
|
|
190
|
-
isQuiet: true
|
|
191
|
-
},
|
|
192
|
-
actionButton: {
|
|
193
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($a91790a0cbcae398$exports))['react-spectrum-ListViewItem-actions'],
|
|
194
|
-
isQuiet: true
|
|
195
|
-
},
|
|
196
|
-
actionGroup: {
|
|
197
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($a91790a0cbcae398$exports))['react-spectrum-ListViewItem-actions'],
|
|
198
|
-
isQuiet: true,
|
|
199
|
-
density: 'compact'
|
|
200
|
-
},
|
|
201
|
-
actionMenu: {
|
|
202
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($a91790a0cbcae398$exports))['react-spectrum-ListViewItem-actionmenu'],
|
|
203
|
-
isQuiet: true
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}, typeof item.rendered === 'string' ? /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reactspectrumview.Content, null, item.rendered) : item.rendered, isDraggingMultiple && /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement("div", {
|
|
207
|
-
className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($a91790a0cbcae398$exports)), 'react-spectrum-ListViewItem-badge')
|
|
208
|
-
}, itemCount))))));
|
|
220
|
+
}, !isPresentationOnly && /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement("div", {
|
|
221
|
+
...visuallyHiddenProps,
|
|
222
|
+
role: "button",
|
|
223
|
+
...dropIndicatorProps,
|
|
224
|
+
ref: ref
|
|
225
|
+
}))));
|
|
209
226
|
}
|
|
210
227
|
|
|
211
228
|
|
|
212
|
-
|
|
213
|
-
|
|
214
229
|
var $fd0918c0ca138160$exports = {};
|
|
215
230
|
var $1beeff0a5a0ccb2a$exports = {};
|
|
216
231
|
$1beeff0a5a0ccb2a$exports = JSON.parse("{\"loading\":\"جارٍ التحميل...\",\"loadingMore\":\"جارٍ تحميل المزيد...\"}");
|
|
@@ -403,157 +418,264 @@ $fd0918c0ca138160$exports = {
|
|
|
403
418
|
|
|
404
419
|
|
|
405
420
|
|
|
421
|
+
|
|
422
|
+
|
|
406
423
|
|
|
407
424
|
|
|
408
425
|
|
|
409
426
|
function $9eae7a1cb1535a6b$export$c6bde0c04b033c0e(props) {
|
|
410
427
|
var ref, ref1;
|
|
411
|
-
let { item: item , isEmphasized: isEmphasized
|
|
412
|
-
let
|
|
413
|
-
...item.childNodes
|
|
414
|
-
][0];
|
|
415
|
-
let { state: state , dragState: dragState , onAction: onAction , isListDraggable: isListDraggable , layout: layout } = $k9Du2$react.useContext($60684b441be8e84c$export$870039b0abfe3de0);
|
|
428
|
+
let { item: item , isEmphasized: isEmphasized } = props;
|
|
429
|
+
let { state: state , dragState: dragState , dropState: dropState , isListDraggable: isListDraggable , isListDroppable: isListDroppable , layout: layout , dragHooks: dragHooks , dropHooks: dropHooks , loadingState: loadingState } = $k9Du2$react.useContext($60684b441be8e84c$export$870039b0abfe3de0);
|
|
416
430
|
let { direction: direction } = $k9Du2$reactariai18n.useLocale();
|
|
417
431
|
let rowRef = $k9Du2$react.useRef();
|
|
418
|
-
let cellRef = $k9Du2$react.useRef();
|
|
419
432
|
let { isFocusVisible: isFocusVisibleWithin , focusProps: focusWithinProps } = $k9Du2$reactariafocus.useFocusRing({
|
|
420
433
|
within: true
|
|
421
434
|
});
|
|
422
435
|
let { isFocusVisible: isFocusVisible , focusProps: focusProps } = $k9Du2$reactariafocus.useFocusRing();
|
|
423
|
-
let
|
|
424
|
-
let isDisabled = !allowsInteraction || state.disabledKeys.has(item.key);
|
|
425
|
-
let isDraggable = (dragState === null || dragState === void 0 ? void 0 : dragState.isDraggable(item.key)) && !isDisabled;
|
|
426
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $k9Du2$reactariainteractions.useHover({
|
|
427
|
-
isDisabled: isDisabled
|
|
428
|
-
});
|
|
429
|
-
let { pressProps: pressProps , isPressed: isPressed } = $k9Du2$reactariainteractions.usePress({
|
|
430
|
-
isDisabled: isDisabled
|
|
431
|
-
});
|
|
432
|
-
let { rowProps: rowProps } = $k9Du2$reactariagrid.useGridRow({
|
|
436
|
+
let { rowProps: rowProps , gridCellProps: gridCellProps , isPressed: isPressed , isSelected: isSelected , isDisabled: isDisabled , allowsSelection: allowsSelection , hasAction: hasAction } = $k9Du2$reactarialist.useListItem({
|
|
433
437
|
node: item,
|
|
434
438
|
isVirtualized: true,
|
|
435
|
-
onAction: onAction ? ()=>onAction(item.key)
|
|
436
|
-
: undefined,
|
|
437
439
|
shouldSelectOnPressUp: isListDraggable
|
|
438
440
|
}, state, rowRef);
|
|
439
|
-
let
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
}
|
|
443
|
-
let
|
|
444
|
-
if (isListDraggable) // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
445
|
-
draggableItem = dragHooks.useDraggableItem({
|
|
446
|
-
key: item.key
|
|
447
|
-
}, dragState);
|
|
448
|
-
const mergedProps = $k9Du2$reactariautils.mergeProps(gridCellProps, hoverProps, focusWithinProps, focusProps);
|
|
449
|
-
let { checkboxProps: checkboxProps } = $k9Du2$reactariagrid.useGridSelectionCheckbox({
|
|
450
|
-
...props,
|
|
441
|
+
let isDroppable = isListDroppable && !isDisabled;
|
|
442
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = $k9Du2$reactariainteractions.useHover({
|
|
443
|
+
isDisabled: !allowsSelection && !hasAction
|
|
444
|
+
});
|
|
445
|
+
let { checkboxProps: checkboxProps } = $k9Du2$reactarialist.useListSelectionCheckbox({
|
|
451
446
|
key: item.key
|
|
452
447
|
}, state);
|
|
448
|
+
let hasDescription = $k9Du2$reactspectrumutils.useHasChild(`.${(/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-description']}`, rowRef);
|
|
449
|
+
let draggableItem;
|
|
450
|
+
if (isListDraggable) {
|
|
451
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
452
|
+
draggableItem = dragHooks.useDraggableItem({
|
|
453
|
+
key: item.key
|
|
454
|
+
}, dragState);
|
|
455
|
+
if (isDisabled) draggableItem = null;
|
|
456
|
+
}
|
|
457
|
+
let droppableItem;
|
|
458
|
+
let isDropTarget;
|
|
459
|
+
if (isListDroppable) {
|
|
460
|
+
let target = {
|
|
461
|
+
type: 'item',
|
|
462
|
+
key: item.key,
|
|
463
|
+
dropPosition: 'on'
|
|
464
|
+
};
|
|
465
|
+
isDropTarget = dropState.isDropTarget(target);
|
|
466
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
467
|
+
droppableItem = dropHooks.useDroppableItem({
|
|
468
|
+
target: target
|
|
469
|
+
}, dropState, rowRef);
|
|
470
|
+
}
|
|
453
471
|
let dragButtonRef = ($parcel$interopDefault($k9Du2$react)).useRef();
|
|
454
472
|
let { buttonProps: buttonProps } = $k9Du2$reactariabutton.useButton({
|
|
455
473
|
...draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragButtonProps,
|
|
456
474
|
elementType: 'div'
|
|
457
475
|
}, dragButtonRef);
|
|
458
|
-
let chevron =
|
|
459
|
-
if (item.props.hasChildItems) chevron = direction === 'ltr' ? /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement(($parcel$interopDefault($k9Du2$spectrumiconsuiChevronRightMedium)), {
|
|
476
|
+
let chevron = direction === 'ltr' ? /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement(($parcel$interopDefault($k9Du2$spectrumiconsuiChevronRightMedium)), {
|
|
460
477
|
"aria-hidden": "true",
|
|
461
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($
|
|
478
|
+
UNSAFE_className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports)), 'react-spectrum-ListViewItem-parentIndicator', {
|
|
479
|
+
'react-spectrum-ListViewItem-parentIndicator--hasChildItems': item.props.hasChildItems,
|
|
480
|
+
'is-disabled': !hasAction
|
|
481
|
+
})
|
|
462
482
|
}) : /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement(($parcel$interopDefault($k9Du2$spectrumiconsuiChevronLeftMedium)), {
|
|
463
483
|
"aria-hidden": "true",
|
|
464
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($
|
|
484
|
+
UNSAFE_className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports)), 'react-spectrum-ListViewItem-parentIndicator', {
|
|
485
|
+
'react-spectrum-ListViewItem-parentIndicator--hasChildItems': item.props.hasChildItems,
|
|
486
|
+
'is-disabled': !hasAction
|
|
487
|
+
})
|
|
465
488
|
});
|
|
466
489
|
let showCheckbox = state.selectionManager.selectionMode !== 'none' && state.selectionManager.selectionBehavior === 'toggle';
|
|
467
|
-
let isSelected = state.selectionManager.isSelected(item.key);
|
|
468
|
-
let showDragHandle = isDraggable && isFocusVisibleWithin;
|
|
469
490
|
let { visuallyHiddenProps: visuallyHiddenProps } = $k9Du2$reactariavisuallyhidden.useVisuallyHidden();
|
|
491
|
+
const mergedProps = $k9Du2$reactariautils.mergeProps(rowProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps, isDroppable && (droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps), hoverProps, focusWithinProps, focusProps);
|
|
470
492
|
let isFirstRow = item.prevKey == null;
|
|
471
493
|
let isLastRow = item.nextKey == null;
|
|
472
494
|
// Figure out if the ListView content is equal or greater in height to the container. If so, we'll need to round the bottom
|
|
473
495
|
// border corners of the last row when selected and we can get rid of the bottom border if it isn't selected to avoid border overlap
|
|
474
496
|
// with bottom border
|
|
475
497
|
let isFlushWithContainerBottom = false;
|
|
476
|
-
if (isLastRow) {
|
|
498
|
+
if (isLastRow && loadingState !== 'loadingMore') {
|
|
477
499
|
if (((ref = layout.getContentSize()) === null || ref === void 0 ? void 0 : ref.height) >= ((ref1 = layout.virtualizer) === null || ref1 === void 0 ? void 0 : ref1.getVisibleRect().height)) isFlushWithContainerBottom = true;
|
|
478
500
|
}
|
|
501
|
+
// previous item isn't selected
|
|
502
|
+
// and the previous item isn't focused or, if it is focused, then if focus globally isn't visible or just focus isn't in the listview
|
|
503
|
+
let roundTops = !state.selectionManager.isSelected(item.prevKey) && (state.selectionManager.focusedKey !== item.prevKey || !($k9Du2$reactariainteractions.isFocusVisible() && state.selectionManager.isFocused));
|
|
504
|
+
let roundBottoms = !state.selectionManager.isSelected(item.nextKey) && (state.selectionManager.focusedKey !== item.nextKey || !($k9Du2$reactariainteractions.isFocusVisible() && state.selectionManager.isFocused));
|
|
505
|
+
let content = typeof item.rendered === 'string' ? /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reactspectrumtext.Text, null, item.rendered) : item.rendered;
|
|
506
|
+
if (isDisabled) content = /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reactspectrumprovider.Provider, {
|
|
507
|
+
isDisabled: true
|
|
508
|
+
}, content);
|
|
479
509
|
return(/*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement("div", {
|
|
480
|
-
|
|
481
|
-
className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($
|
|
482
|
-
'focus-ring': isFocusVisible
|
|
510
|
+
...mergedProps,
|
|
511
|
+
className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports)), 'react-spectrum-ListView-row', {
|
|
512
|
+
'focus-ring': isFocusVisible,
|
|
513
|
+
'round-tops': roundTops || isHovered && !isSelected && state.selectionManager.focusedKey !== item.key,
|
|
514
|
+
'round-bottoms': roundBottoms || isHovered && !isSelected && state.selectionManager.focusedKey !== item.key
|
|
483
515
|
}),
|
|
484
516
|
ref: rowRef
|
|
485
517
|
}, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement("div", {
|
|
486
|
-
|
|
518
|
+
// TODO: refactor the css here now that we are focusing the row?
|
|
519
|
+
className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports)), 'react-spectrum-ListViewItem', {
|
|
487
520
|
'is-active': isPressed,
|
|
488
521
|
'is-focused': isFocusVisibleWithin,
|
|
489
522
|
'focus-ring': isFocusVisible,
|
|
490
523
|
'is-hovered': isHovered,
|
|
491
524
|
'is-selected': isSelected,
|
|
525
|
+
'is-disabled': isDisabled,
|
|
526
|
+
'is-prev-selected': state.selectionManager.isSelected(item.prevKey),
|
|
492
527
|
'is-next-selected': state.selectionManager.isSelected(item.nextKey),
|
|
493
528
|
'react-spectrum-ListViewItem--highlightSelection': state.selectionManager.selectionBehavior === 'replace' && (isSelected || state.selectionManager.isSelected(item.nextKey)),
|
|
494
|
-
'react-spectrum-ListViewItem--
|
|
529
|
+
'react-spectrum-ListViewItem--dropTarget': !!isDropTarget,
|
|
495
530
|
'react-spectrum-ListViewItem--firstRow': isFirstRow,
|
|
496
531
|
'react-spectrum-ListViewItem--lastRow': isLastRow,
|
|
497
|
-
'react-spectrum-ListViewItem--isFlushBottom': isFlushWithContainerBottom
|
|
532
|
+
'react-spectrum-ListViewItem--isFlushBottom': isFlushWithContainerBottom,
|
|
533
|
+
'react-spectrum-ListViewItem--hasDescription': hasDescription
|
|
498
534
|
}),
|
|
499
|
-
|
|
500
|
-
...mergedProps
|
|
535
|
+
...gridCellProps
|
|
501
536
|
}, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reactspectrumlayout.Grid, {
|
|
502
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($
|
|
537
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-grid']
|
|
503
538
|
}, isListDraggable && /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement("div", {
|
|
504
|
-
className: (/*@__PURE__*/$parcel$interopDefault($
|
|
505
|
-
},
|
|
506
|
-
focusRingClass: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($
|
|
539
|
+
className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-draghandle-container']
|
|
540
|
+
}, !isDisabled && /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reactariafocus.FocusRing, {
|
|
541
|
+
focusRingClass: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports)), 'focus-ring')
|
|
507
542
|
}, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement("div", {
|
|
508
543
|
...buttonProps,
|
|
509
|
-
className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($
|
|
510
|
-
style: !
|
|
544
|
+
className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports)), 'react-spectrum-ListViewItem-draghandle-button'),
|
|
545
|
+
style: !isFocusVisibleWithin ? {
|
|
511
546
|
...visuallyHiddenProps.style
|
|
512
547
|
} : {
|
|
513
548
|
},
|
|
514
549
|
ref: dragButtonRef,
|
|
515
550
|
draggable: "true"
|
|
516
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement(($parcel$interopDefault($k9Du2$spectrumiconsuiListGripper)), null)))),
|
|
517
|
-
|
|
551
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement(($parcel$interopDefault($k9Du2$spectrumiconsuiListGripper)), null)))), /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reacttransitiongroup.CSSTransition, {
|
|
552
|
+
in: showCheckbox,
|
|
553
|
+
unmountOnExit: true,
|
|
554
|
+
classNames: {
|
|
555
|
+
enter: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-checkbox--enter'],
|
|
556
|
+
enterActive: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-checkbox--enterActive'],
|
|
557
|
+
exit: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-checkbox--exit'],
|
|
558
|
+
exitActive: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-checkbox--exitActive']
|
|
559
|
+
},
|
|
560
|
+
timeout: 160
|
|
561
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement("div", {
|
|
562
|
+
className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-checkboxWrapper']
|
|
563
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reactspectrumcheckbox.Checkbox, {
|
|
518
564
|
...checkboxProps,
|
|
565
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-checkbox'],
|
|
519
566
|
isEmphasized: isEmphasized
|
|
520
|
-
}), /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reactspectrumutils.SlotProvider, {
|
|
567
|
+
}))), /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reactspectrumutils.SlotProvider, {
|
|
521
568
|
slots: {
|
|
522
|
-
content: {
|
|
523
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($a91790a0cbcae398$exports))['react-spectrum-ListViewItem-content']
|
|
524
|
-
},
|
|
525
569
|
text: {
|
|
526
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($
|
|
570
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-content']
|
|
527
571
|
},
|
|
528
572
|
description: {
|
|
529
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($
|
|
573
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-description']
|
|
530
574
|
},
|
|
531
575
|
icon: {
|
|
532
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($
|
|
576
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-icon'],
|
|
533
577
|
size: 'M'
|
|
534
578
|
},
|
|
535
579
|
image: {
|
|
536
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($
|
|
580
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-image']
|
|
537
581
|
},
|
|
538
|
-
|
|
539
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($
|
|
582
|
+
actionButton: {
|
|
583
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-actions'],
|
|
540
584
|
isQuiet: true
|
|
541
585
|
},
|
|
586
|
+
actionGroup: {
|
|
587
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-actions'],
|
|
588
|
+
isQuiet: true,
|
|
589
|
+
density: 'compact'
|
|
590
|
+
},
|
|
591
|
+
actionMenu: {
|
|
592
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-actionmenu'],
|
|
593
|
+
isQuiet: true
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}, content, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reactspectrumutils.ClearSlots, null, chevron))))));
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
function $c59d3898f402f50b$export$2e2bcd8739ae039() {
|
|
608
|
+
let { dropState: dropState , dropHooks: dropHooks } = $k9Du2$react.useContext($60684b441be8e84c$export$870039b0abfe3de0);
|
|
609
|
+
let dropRef = $k9Du2$react.useRef();
|
|
610
|
+
let { dropIndicatorProps: dropIndicatorProps } = dropHooks.useDropIndicator({
|
|
611
|
+
target: {
|
|
612
|
+
type: 'root'
|
|
613
|
+
}
|
|
614
|
+
}, dropState, dropRef);
|
|
615
|
+
let { visuallyHiddenProps: visuallyHiddenProps } = $k9Du2$reactariavisuallyhidden.useVisuallyHidden();
|
|
616
|
+
if (dropIndicatorProps['aria-hidden']) return null;
|
|
617
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement("div", {
|
|
618
|
+
role: "option",
|
|
619
|
+
"aria-selected": "false",
|
|
620
|
+
...visuallyHiddenProps,
|
|
621
|
+
...dropIndicatorProps,
|
|
622
|
+
ref: dropRef
|
|
623
|
+
}));
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
function $3d665b19f7865ff9$export$905ab40ac2179daa(props) {
|
|
633
|
+
let { item: item , itemCount: itemCount , itemHeight: itemHeight } = props;
|
|
634
|
+
let isDraggingMultiple = itemCount > 1;
|
|
635
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement("div", {
|
|
636
|
+
style: {
|
|
637
|
+
height: itemHeight
|
|
638
|
+
},
|
|
639
|
+
className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports)), 'react-spectrum-ListViewItem', 'react-spectrum-ListViewItem-dragPreview', {
|
|
640
|
+
'react-spectrum-ListViewItem-dragPreview--multiple': isDraggingMultiple
|
|
641
|
+
})
|
|
642
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reactspectrumlayout.Grid, {
|
|
643
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-grid']
|
|
644
|
+
}, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reactspectrumutils.SlotProvider, {
|
|
645
|
+
slots: {
|
|
646
|
+
content: {
|
|
647
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-content']
|
|
648
|
+
},
|
|
649
|
+
text: {
|
|
650
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-content']
|
|
651
|
+
},
|
|
652
|
+
description: {
|
|
653
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-description']
|
|
654
|
+
},
|
|
655
|
+
icon: {
|
|
656
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-icon'],
|
|
657
|
+
size: 'M'
|
|
658
|
+
},
|
|
659
|
+
image: {
|
|
660
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-image']
|
|
661
|
+
},
|
|
542
662
|
actionButton: {
|
|
543
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($
|
|
663
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-actions'],
|
|
544
664
|
isQuiet: true
|
|
545
665
|
},
|
|
546
666
|
actionGroup: {
|
|
547
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($
|
|
667
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-actions'],
|
|
548
668
|
isQuiet: true,
|
|
549
669
|
density: 'compact'
|
|
550
670
|
},
|
|
551
671
|
actionMenu: {
|
|
552
|
-
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($
|
|
672
|
+
UNSAFE_className: (/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports))['react-spectrum-ListViewItem-actionmenu'],
|
|
553
673
|
isQuiet: true
|
|
554
674
|
}
|
|
555
675
|
}
|
|
556
|
-
}, typeof item.rendered === 'string' ? /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$
|
|
676
|
+
}, typeof item.rendered === 'string' ? /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reactspectrumtext.Text, null, item.rendered) : item.rendered, isDraggingMultiple && /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement("div", {
|
|
677
|
+
className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports)), 'react-spectrum-ListViewItem-badge')
|
|
678
|
+
}, itemCount)))));
|
|
557
679
|
}
|
|
558
680
|
|
|
559
681
|
|
|
@@ -561,7 +683,6 @@ function $9eae7a1cb1535a6b$export$c6bde0c04b033c0e(props) {
|
|
|
561
683
|
|
|
562
684
|
|
|
563
685
|
|
|
564
|
-
|
|
565
686
|
const $60684b441be8e84c$export$870039b0abfe3de0 = /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createContext(null);
|
|
566
687
|
const $60684b441be8e84c$var$ROW_HEIGHTS = {
|
|
567
688
|
compact: {
|
|
@@ -577,7 +698,7 @@ const $60684b441be8e84c$var$ROW_HEIGHTS = {
|
|
|
577
698
|
large: 60
|
|
578
699
|
}
|
|
579
700
|
};
|
|
580
|
-
function $60684b441be8e84c$
|
|
701
|
+
function $60684b441be8e84c$var$useListLayout(state, density, allowDisabledKeyFocus) {
|
|
581
702
|
let { scale: scale } = $k9Du2$reactspectrumprovider.useProvider();
|
|
582
703
|
let collator = $k9Du2$reactariai18n.useCollator({
|
|
583
704
|
usage: 'search',
|
|
@@ -588,120 +709,158 @@ function $60684b441be8e84c$export$bea90da51ec70dea(state, density) {
|
|
|
588
709
|
estimatedRowHeight: $60684b441be8e84c$var$ROW_HEIGHTS[density][scale],
|
|
589
710
|
padding: 0,
|
|
590
711
|
collator: collator,
|
|
591
|
-
loaderHeight: isEmpty ? null : $60684b441be8e84c$var$ROW_HEIGHTS[density][scale]
|
|
712
|
+
loaderHeight: isEmpty ? null : $60684b441be8e84c$var$ROW_HEIGHTS[density][scale],
|
|
713
|
+
allowDisabledKeyFocus: allowDisabledKeyFocus
|
|
592
714
|
})
|
|
593
715
|
, [
|
|
594
716
|
collator,
|
|
595
717
|
scale,
|
|
596
718
|
density,
|
|
597
|
-
isEmpty
|
|
719
|
+
isEmpty,
|
|
720
|
+
allowDisabledKeyFocus
|
|
598
721
|
]);
|
|
599
722
|
layout.collection = state.collection;
|
|
600
723
|
layout.disabledKeys = state.disabledKeys;
|
|
601
724
|
return layout;
|
|
602
725
|
}
|
|
603
726
|
function $60684b441be8e84c$var$ListView(props, ref) {
|
|
604
|
-
|
|
727
|
+
var ref1;
|
|
728
|
+
let { density: density = 'regular' , onLoadMore: onLoadMore , loadingState: loadingState , isQuiet: isQuiet , overflowMode: overflowMode = 'truncate' , onAction: onAction , dragHooks: dragHooks , dropHooks: dropHooks , ...otherProps } = props;
|
|
605
729
|
let isListDraggable = !!dragHooks;
|
|
730
|
+
let isListDroppable = !!dropHooks;
|
|
606
731
|
let dragHooksProvided = $k9Du2$react.useRef(isListDraggable);
|
|
732
|
+
let dropHooksProvided = $k9Du2$react.useRef(isListDroppable);
|
|
607
733
|
if (dragHooksProvided.current !== isListDraggable) console.warn('Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');
|
|
734
|
+
if (dropHooksProvided.current !== isListDroppable) console.warn('Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');
|
|
608
735
|
let domRef = $k9Du2$reactspectrumutils.useDOMRef(ref);
|
|
609
|
-
let
|
|
610
|
-
let formatMessage = $k9Du2$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($fd0918c0ca138160$exports)));
|
|
611
|
-
let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';
|
|
612
|
-
let { styleProps: styleProps } = $k9Du2$reactspectrumutils.useStyleProps(props);
|
|
613
|
-
let { direction: direction , locale: locale } = $k9Du2$reactariai18n.useLocale();
|
|
614
|
-
let collator = $k9Du2$reactariai18n.useCollator({
|
|
615
|
-
usage: 'search',
|
|
616
|
-
sensitivity: 'base'
|
|
617
|
-
});
|
|
618
|
-
let gridCollection = $k9Du2$react.useMemo(()=>new $k9Du2$reactstatelygrid.GridCollection({
|
|
619
|
-
columnCount: 1,
|
|
620
|
-
items: [
|
|
621
|
-
...collection
|
|
622
|
-
].map((item)=>({
|
|
623
|
-
...item,
|
|
624
|
-
hasChildNodes: true,
|
|
625
|
-
childNodes: [
|
|
626
|
-
{
|
|
627
|
-
key: `cell-${item.key}`,
|
|
628
|
-
type: 'cell',
|
|
629
|
-
index: 0,
|
|
630
|
-
value: null,
|
|
631
|
-
level: 0,
|
|
632
|
-
rendered: null,
|
|
633
|
-
textValue: item.textValue,
|
|
634
|
-
hasChildNodes: false,
|
|
635
|
-
childNodes: []
|
|
636
|
-
}
|
|
637
|
-
]
|
|
638
|
-
})
|
|
639
|
-
)
|
|
640
|
-
})
|
|
641
|
-
, [
|
|
642
|
-
collection
|
|
643
|
-
]);
|
|
644
|
-
let state = $k9Du2$reactstatelygrid.useGridState({
|
|
736
|
+
let state = $k9Du2$reactstatelylist.useListState({
|
|
645
737
|
...props,
|
|
646
|
-
collection: gridCollection,
|
|
647
|
-
focusMode: 'cell',
|
|
648
738
|
selectionBehavior: props.selectionStyle === 'highlight' ? 'replace' : 'toggle'
|
|
649
739
|
});
|
|
650
|
-
let
|
|
651
|
-
let
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
direction: direction,
|
|
656
|
-
collator: collator,
|
|
657
|
-
// Focus the ListView cell instead of the row so that focus doesn't change with left/right arrow keys when there aren't any
|
|
658
|
-
// focusable children in the cell.
|
|
659
|
-
focusMode: 'cell'
|
|
660
|
-
})
|
|
661
|
-
, [
|
|
662
|
-
state,
|
|
663
|
-
domRef,
|
|
664
|
-
direction,
|
|
665
|
-
collator
|
|
666
|
-
]);
|
|
667
|
-
let provider = $k9Du2$reactspectrumprovider.useProvider();
|
|
740
|
+
let { collection: collection , selectionManager: selectionManager } = state;
|
|
741
|
+
let formatMessage = $k9Du2$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($fd0918c0ca138160$exports)));
|
|
742
|
+
let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';
|
|
743
|
+
let { styleProps: styleProps } = $k9Du2$reactspectrumutils.useStyleProps(props);
|
|
744
|
+
let layout = $60684b441be8e84c$var$useListLayout(state, props.density || 'regular', state.selectionManager.disabledBehavior === 'selection');
|
|
668
745
|
let dragState;
|
|
746
|
+
let preview = $k9Du2$react.useRef(null);
|
|
669
747
|
if (isListDraggable) dragState = dragHooks.useDraggableCollectionState({
|
|
670
|
-
collection:
|
|
671
|
-
selectionManager:
|
|
672
|
-
|
|
673
|
-
let item = state.collection.getItem(draggedKey);
|
|
674
|
-
let itemCount = draggingKeys.size;
|
|
675
|
-
let itemHeight = layout.getLayoutInfo(draggedKey).rect.height;
|
|
676
|
-
return(/*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($3d665b19f7865ff9$export$905ab40ac2179daa, {
|
|
677
|
-
item: item,
|
|
678
|
-
itemCount: itemCount,
|
|
679
|
-
itemHeight: itemHeight,
|
|
680
|
-
provider: provider,
|
|
681
|
-
locale: locale
|
|
682
|
-
}));
|
|
683
|
-
}
|
|
748
|
+
collection: collection,
|
|
749
|
+
selectionManager: selectionManager,
|
|
750
|
+
preview: preview
|
|
684
751
|
});
|
|
685
|
-
let
|
|
752
|
+
let DragPreview = dragHooks === null || dragHooks === void 0 ? void 0 : dragHooks.DragPreview;
|
|
753
|
+
let dropState;
|
|
754
|
+
let droppableCollection;
|
|
755
|
+
let isRootDropTarget;
|
|
756
|
+
if (isListDroppable) {
|
|
757
|
+
dropState = dropHooks.useDroppableCollectionState({
|
|
758
|
+
collection: collection,
|
|
759
|
+
selectionManager: selectionManager
|
|
760
|
+
});
|
|
761
|
+
droppableCollection = dropHooks.useDroppableCollection({
|
|
762
|
+
keyboardDelegate: layout,
|
|
763
|
+
getDropTargetFromPoint (x, y) {
|
|
764
|
+
let closest = null;
|
|
765
|
+
let closestDistance = Infinity;
|
|
766
|
+
let closestDir = null;
|
|
767
|
+
x += domRef.current.scrollLeft;
|
|
768
|
+
y += domRef.current.scrollTop;
|
|
769
|
+
let visible = layout.getVisibleLayoutInfos(new $k9Du2$reactstatelyvirtualizer.Rect(x - 50, y - 50, x + 50, y + 50));
|
|
770
|
+
for (let layoutInfo of visible){
|
|
771
|
+
let r = layoutInfo.rect;
|
|
772
|
+
let points = [
|
|
773
|
+
[
|
|
774
|
+
r.x,
|
|
775
|
+
r.y + 4,
|
|
776
|
+
'before'
|
|
777
|
+
],
|
|
778
|
+
[
|
|
779
|
+
r.maxX,
|
|
780
|
+
r.y + 4,
|
|
781
|
+
'before'
|
|
782
|
+
],
|
|
783
|
+
[
|
|
784
|
+
r.x,
|
|
785
|
+
r.maxY - 8,
|
|
786
|
+
'after'
|
|
787
|
+
],
|
|
788
|
+
[
|
|
789
|
+
r.maxX,
|
|
790
|
+
r.maxY - 8,
|
|
791
|
+
'after'
|
|
792
|
+
]
|
|
793
|
+
];
|
|
794
|
+
for (let [px, py, dir] of points){
|
|
795
|
+
let dx = px - x;
|
|
796
|
+
let dy = py - y;
|
|
797
|
+
let d = dx * dx + dy * dy;
|
|
798
|
+
if (d < closestDistance) {
|
|
799
|
+
closestDistance = d;
|
|
800
|
+
closest = layoutInfo;
|
|
801
|
+
closestDir = dir;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
// TODO: Best way to implement only for when closest can be dropped on
|
|
805
|
+
// TODO: Figure out the typescript for this
|
|
806
|
+
// @ts-ignore
|
|
807
|
+
if (y >= r.y + 10 && y <= r.maxY - 10 && collection.getItem(closest.key).value.type === 'folder') closestDir = 'on';
|
|
808
|
+
}
|
|
809
|
+
let key = closest === null || closest === void 0 ? void 0 : closest.key;
|
|
810
|
+
if (key) return {
|
|
811
|
+
type: 'item',
|
|
812
|
+
key: key,
|
|
813
|
+
dropPosition: closestDir
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
}, dropState, domRef);
|
|
817
|
+
isRootDropTarget = dropState.isDropTarget({
|
|
818
|
+
type: 'root'
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
let { gridProps: gridProps } = $k9Du2$reactarialist.useList({
|
|
686
822
|
...props,
|
|
687
823
|
isVirtualized: true,
|
|
688
|
-
keyboardDelegate:
|
|
824
|
+
keyboardDelegate: layout,
|
|
825
|
+
onAction: onAction
|
|
689
826
|
}, state, domRef);
|
|
690
827
|
// Sync loading state into the layout.
|
|
691
828
|
layout.isLoading = isLoading;
|
|
692
|
-
let focusedKey =
|
|
693
|
-
|
|
694
|
-
|
|
829
|
+
let focusedKey = selectionManager.focusedKey;
|
|
830
|
+
if ((dropState === null || dropState === void 0 ? void 0 : (ref1 = dropState.target) === null || ref1 === void 0 ? void 0 : ref1.type) === 'item') focusedKey = dropState.target.key;
|
|
831
|
+
// wait for layout to get accurate measurements
|
|
832
|
+
let [isVerticalScrollbarVisible, setVerticalScollbarVisible] = $k9Du2$react.useState(false);
|
|
833
|
+
let [isHorizontalScrollbarVisible, setHorizontalScollbarVisible] = $k9Du2$react.useState(false);
|
|
834
|
+
$k9Du2$reactariautils.useLayoutEffect(()=>{
|
|
835
|
+
if (domRef.current) {
|
|
836
|
+
// 2 is the width of the border which is not part of the box size
|
|
837
|
+
setVerticalScollbarVisible(domRef.current.clientWidth + 2 < domRef.current.offsetWidth);
|
|
838
|
+
setHorizontalScollbarVisible(domRef.current.clientHeight + 2 < domRef.current.offsetHeight);
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
let hasAnyChildren = $k9Du2$react.useMemo(()=>[
|
|
842
|
+
...collection
|
|
843
|
+
].some((item)=>item.hasChildNodes
|
|
844
|
+
)
|
|
845
|
+
, [
|
|
846
|
+
collection
|
|
847
|
+
]);
|
|
695
848
|
return(/*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($60684b441be8e84c$export$870039b0abfe3de0.Provider, {
|
|
696
849
|
value: {
|
|
697
850
|
state: state,
|
|
698
|
-
keyboardDelegate: keyboardDelegate,
|
|
699
851
|
dragState: dragState,
|
|
852
|
+
dropState: dropState,
|
|
853
|
+
dragHooks: dragHooks,
|
|
854
|
+
dropHooks: dropHooks,
|
|
700
855
|
onAction: onAction,
|
|
701
856
|
isListDraggable: isListDraggable,
|
|
702
|
-
|
|
857
|
+
isListDroppable: isListDroppable,
|
|
858
|
+
layout: layout,
|
|
859
|
+
loadingState: loadingState
|
|
703
860
|
}
|
|
704
861
|
}, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reactariavirtualizer.Virtualizer, {
|
|
862
|
+
...$k9Du2$reactariautils.mergeProps(isListDroppable && (droppableCollection === null || droppableCollection === void 0 ? void 0 : droppableCollection.collectionProps), gridProps),
|
|
863
|
+
...$k9Du2$reactariautils.filterDOMProps(otherProps),
|
|
705
864
|
...gridProps,
|
|
706
865
|
...styleProps,
|
|
707
866
|
isLoading: isLoading,
|
|
@@ -709,29 +868,62 @@ function $60684b441be8e84c$var$ListView(props, ref) {
|
|
|
709
868
|
ref: domRef,
|
|
710
869
|
focusedKey: focusedKey,
|
|
711
870
|
scrollDirection: "vertical",
|
|
712
|
-
className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($
|
|
871
|
+
className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports)), 'react-spectrum-ListView', `react-spectrum-ListView--${density}`, 'react-spectrum-ListView--emphasized', {
|
|
713
872
|
'react-spectrum-ListView--quiet': isQuiet,
|
|
714
|
-
'react-spectrum-ListView--
|
|
715
|
-
'react-spectrum-ListView--
|
|
873
|
+
'react-spectrum-ListView--loadingMore': loadingState === 'loadingMore',
|
|
874
|
+
'react-spectrum-ListView--draggable': !!isListDraggable,
|
|
875
|
+
'react-spectrum-ListView--dropTarget': !!isRootDropTarget,
|
|
876
|
+
'react-spectrum-ListView--isVerticalScrollbarVisible': isVerticalScrollbarVisible,
|
|
877
|
+
'react-spectrum-ListView--isHorizontalScrollbarVisible': isHorizontalScrollbarVisible,
|
|
878
|
+
'react-spectrum-ListView--hasAnyChildren': hasAnyChildren,
|
|
879
|
+
'react-spectrum-ListView--wrap': overflowMode === 'wrap'
|
|
716
880
|
}, styleProps.className),
|
|
717
881
|
layout: layout,
|
|
718
|
-
collection:
|
|
719
|
-
transitionDuration:
|
|
882
|
+
collection: collection,
|
|
883
|
+
transitionDuration: isLoading ? 160 : 220
|
|
720
884
|
}, (type, item)=>{
|
|
721
|
-
if (type === 'item') return(/*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($
|
|
885
|
+
if (type === 'item') return(/*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement(($parcel$interopDefault($k9Du2$react)).Fragment, null, isListDroppable && collection.getKeyBefore(item.key) == null && /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($c59d3898f402f50b$export$2e2bcd8739ae039, {
|
|
886
|
+
key: "root"
|
|
887
|
+
}), isListDroppable && /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($fc02fd49ab58c72e$export$2e2bcd8739ae039, {
|
|
888
|
+
key: `${item.key}-before`,
|
|
889
|
+
target: {
|
|
890
|
+
key: item.key,
|
|
891
|
+
type: 'item',
|
|
892
|
+
dropPosition: 'before'
|
|
893
|
+
}
|
|
894
|
+
}), /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($9eae7a1cb1535a6b$export$c6bde0c04b033c0e, {
|
|
722
895
|
item: item,
|
|
723
896
|
isEmphasized: true,
|
|
724
|
-
|
|
725
|
-
}))
|
|
897
|
+
hasActions: !!onAction
|
|
898
|
+
}), isListDroppable && /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($fc02fd49ab58c72e$export$2e2bcd8739ae039, {
|
|
899
|
+
key: `${item.key}-after`,
|
|
900
|
+
target: {
|
|
901
|
+
key: item.key,
|
|
902
|
+
type: 'item',
|
|
903
|
+
dropPosition: 'after'
|
|
904
|
+
},
|
|
905
|
+
isPresentationOnly: collection.getKeyAfter(item.key) !== null
|
|
906
|
+
})));
|
|
726
907
|
else if (type === 'loader') return(/*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($60684b441be8e84c$var$CenteredWrapper, null, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($k9Du2$reactspectrumprogress.ProgressCircle, {
|
|
727
908
|
isIndeterminate: true,
|
|
728
|
-
"aria-label":
|
|
909
|
+
"aria-label": collection.size > 0 ? formatMessage('loadingMore') : formatMessage('loading')
|
|
729
910
|
})));
|
|
730
911
|
else if (type === 'placeholder') {
|
|
731
912
|
let emptyState = props.renderEmptyState ? props.renderEmptyState() : null;
|
|
732
913
|
if (emptyState == null) return null;
|
|
733
914
|
return(/*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($60684b441be8e84c$var$CenteredWrapper, null, emptyState));
|
|
734
915
|
}
|
|
916
|
+
}), DragPreview && isListDraggable && /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement(DragPreview, {
|
|
917
|
+
ref: preview
|
|
918
|
+
}, ()=>{
|
|
919
|
+
let item = state.collection.getItem(dragState.draggedKey);
|
|
920
|
+
let itemCount = dragState.draggingKeys.size;
|
|
921
|
+
let itemHeight = layout.getLayoutInfo(dragState.draggedKey).rect.height;
|
|
922
|
+
return(/*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement($3d665b19f7865ff9$export$905ab40ac2179daa, {
|
|
923
|
+
item: item,
|
|
924
|
+
itemCount: itemCount,
|
|
925
|
+
itemHeight: itemHeight
|
|
926
|
+
}));
|
|
735
927
|
})));
|
|
736
928
|
}
|
|
737
929
|
function $60684b441be8e84c$var$CenteredWrapper({ children: children }) {
|
|
@@ -739,7 +931,7 @@ function $60684b441be8e84c$var$CenteredWrapper({ children: children }) {
|
|
|
739
931
|
return(/*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement("div", {
|
|
740
932
|
role: "row",
|
|
741
933
|
"aria-rowindex": state.collection.size + 1,
|
|
742
|
-
className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($
|
|
934
|
+
className: $k9Du2$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($279507a6f189e509$exports)), 'react-spectrum-ListView-centeredWrapper', {
|
|
743
935
|
'react-spectrum-ListView-centeredWrapper--loadingMore': state.collection.size > 0
|
|
744
936
|
})
|
|
745
937
|
}, /*#__PURE__*/ ($parcel$interopDefault($k9Du2$react)).createElement("div", {
|