@react-spectrum/card 3.0.0-alpha.3 → 3.0.0-alpha.30
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/import.mjs +1649 -0
- package/dist/main.css +1 -1
- package/dist/main.js +772 -579
- package/dist/main.js.map +1 -1
- package/dist/module.js +766 -558
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +24 -23
- package/dist/types.d.ts.map +1 -1
- package/package.json +26 -23
- package/src/BaseLayout.tsx +13 -13
- package/src/CardBase.tsx +2 -2
- package/src/CardView.tsx +26 -8
- package/src/GalleryLayout.tsx +1 -0
- package/src/GridLayout.tsx +6 -4
- package/src/WaterfallLayout.tsx +6 -4
- package/src/index.ts +10 -5
package/dist/main.js
CHANGED
|
@@ -1,180 +1,233 @@
|
|
|
1
1
|
require("./main.css");
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
6
|
-
var $
|
|
7
|
-
var $
|
|
8
|
-
var $
|
|
9
|
-
var $
|
|
10
|
-
var $
|
|
11
|
-
var $
|
|
12
|
-
var $
|
|
13
|
-
var $
|
|
14
|
-
var $
|
|
15
|
-
var $
|
|
16
|
-
|
|
17
|
-
function $parcel$exportWildcard(dest, source) {
|
|
18
|
-
Object.keys(source).forEach(function(key) {
|
|
19
|
-
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
2
|
+
var $jpY3B$reactspectrumutils = require("@react-spectrum/utils");
|
|
3
|
+
var $jpY3B$reactstatelygrid = require("@react-stately/grid");
|
|
4
|
+
var $jpY3B$reactariautils = require("@react-aria/utils");
|
|
5
|
+
var $jpY3B$reactspectrumprogress = require("@react-spectrum/progress");
|
|
6
|
+
var $jpY3B$react = require("react");
|
|
7
|
+
var $jpY3B$reactariai18n = require("@react-aria/i18n");
|
|
8
|
+
var $jpY3B$reactariagrid = require("@react-aria/grid");
|
|
9
|
+
var $jpY3B$reactstatelylist = require("@react-stately/list");
|
|
10
|
+
var $jpY3B$reactspectrumprovider = require("@react-spectrum/provider");
|
|
11
|
+
var $jpY3B$reactariavirtualizer = require("@react-aria/virtualizer");
|
|
12
|
+
var $jpY3B$reactspectrumcheckbox = require("@react-spectrum/checkbox");
|
|
13
|
+
var $jpY3B$reactariafocus = require("@react-aria/focus");
|
|
14
|
+
var $jpY3B$reactariainteractions = require("@react-aria/interactions");
|
|
15
|
+
var $jpY3B$reactstatelyvirtualizer = require("@react-stately/virtualizer");
|
|
16
|
+
var $jpY3B$reactstatelycollections = require("@react-stately/collections");
|
|
22
17
|
|
|
23
|
-
Object.defineProperty(dest, key, {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: function get() {
|
|
26
|
-
return source[key];
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
18
|
|
|
31
|
-
|
|
19
|
+
function $parcel$export(e, n, v, s) {
|
|
20
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
32
21
|
}
|
|
22
|
+
|
|
33
23
|
function $parcel$interopDefault(a) {
|
|
34
24
|
return a && a.__esModule ? a.default : a;
|
|
35
25
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
$parcel$export(
|
|
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
|
-
var $
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
$
|
|
105
|
-
$
|
|
106
|
-
$
|
|
107
|
-
$
|
|
108
|
-
$
|
|
109
|
-
$
|
|
110
|
-
$
|
|
111
|
-
$
|
|
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
|
-
|
|
26
|
+
|
|
27
|
+
$parcel$export(module.exports, "CardView", () => $514a55f6d91f25ef$export$7e52c821f7b6f422);
|
|
28
|
+
$parcel$export(module.exports, "GalleryLayout", () => $8019a3d2c7d098ea$export$8e52095834484b61);
|
|
29
|
+
$parcel$export(module.exports, "GridLayout", () => $71b727f94b595b1a$export$7d2b12578154a735);
|
|
30
|
+
$parcel$export(module.exports, "WaterfallLayout", () => $632abf8fbf0ad57b$export$e9f7cda058ba8df8);
|
|
31
|
+
$parcel$export(module.exports, "Card", () => $6b630ac4b78ba7f3$export$60332b2344f7fe41);
|
|
32
|
+
/*
|
|
33
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
34
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
35
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
36
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
37
|
+
*
|
|
38
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
39
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
40
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
41
|
+
* governing permissions and limitations under the License.
|
|
42
|
+
*/ /// <reference types="css-module-types" />
|
|
43
|
+
/*
|
|
44
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
45
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
46
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
47
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
48
|
+
*
|
|
49
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
50
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
51
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
52
|
+
* governing permissions and limitations under the License.
|
|
53
|
+
*/ /*
|
|
54
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
55
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
56
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
57
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
58
|
+
*
|
|
59
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
60
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
61
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
62
|
+
* governing permissions and limitations under the License.
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
var $71570f0038472fa2$exports = {};
|
|
69
|
+
|
|
70
|
+
$parcel$export($71570f0038472fa2$exports, "avatar", () => $71570f0038472fa2$export$345c5736c8054f22, (v) => $71570f0038472fa2$export$345c5736c8054f22 = v);
|
|
71
|
+
$parcel$export($71570f0038472fa2$exports, "content", () => $71570f0038472fa2$export$a7db06668cad9adb, (v) => $71570f0038472fa2$export$a7db06668cad9adb = v);
|
|
72
|
+
$parcel$export($71570f0038472fa2$exports, "detail", () => $71570f0038472fa2$export$13a2d28b88853ef2, (v) => $71570f0038472fa2$export$13a2d28b88853ef2 = v);
|
|
73
|
+
$parcel$export($71570f0038472fa2$exports, "focus-ring", () => $71570f0038472fa2$export$f39a09f249340e2a, (v) => $71570f0038472fa2$export$f39a09f249340e2a = v);
|
|
74
|
+
$parcel$export($71570f0038472fa2$exports, "i18nFontFamily", () => $71570f0038472fa2$export$8c4ee2c50c22c514, (v) => $71570f0038472fa2$export$8c4ee2c50c22c514 = v);
|
|
75
|
+
$parcel$export($71570f0038472fa2$exports, "is-drop-target", () => $71570f0038472fa2$export$d8467f38d2d00bd0, (v) => $71570f0038472fa2$export$d8467f38d2d00bd0 = v);
|
|
76
|
+
$parcel$export($71570f0038472fa2$exports, "is-focused", () => $71570f0038472fa2$export$e7dc768d35940237, (v) => $71570f0038472fa2$export$e7dc768d35940237 = v);
|
|
77
|
+
$parcel$export($71570f0038472fa2$exports, "is-hovered", () => $71570f0038472fa2$export$b8813cd5d7824ce7, (v) => $71570f0038472fa2$export$b8813cd5d7824ce7 = v);
|
|
78
|
+
$parcel$export($71570f0038472fa2$exports, "is-selected", () => $71570f0038472fa2$export$1e0fb04f31d3c22a, (v) => $71570f0038472fa2$export$1e0fb04f31d3c22a = v);
|
|
79
|
+
$parcel$export($71570f0038472fa2$exports, "preview", () => $71570f0038472fa2$export$48c2d0f2f545ac27, (v) => $71570f0038472fa2$export$48c2d0f2f545ac27 = v);
|
|
80
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card", () => $71570f0038472fa2$export$4e5e9f191b1edb8, (v) => $71570f0038472fa2$export$4e5e9f191b1edb8 = v);
|
|
81
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card--default", () => $71570f0038472fa2$export$c7a022df9e10a238, (v) => $71570f0038472fa2$export$c7a022df9e10a238 = v);
|
|
82
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card--gallery", () => $71570f0038472fa2$export$ccd8ffc36bd10cc, (v) => $71570f0038472fa2$export$ccd8ffc36bd10cc = v);
|
|
83
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card--grid", () => $71570f0038472fa2$export$59739ab951d2dcc7, (v) => $71570f0038472fa2$export$59739ab951d2dcc7 = v);
|
|
84
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card--horizontal", () => $71570f0038472fa2$export$1c52334407225704, (v) => $71570f0038472fa2$export$1c52334407225704 = v);
|
|
85
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card--isQuiet", () => $71570f0038472fa2$export$92ad04b5ac9296ea, (v) => $71570f0038472fa2$export$92ad04b5ac9296ea = v);
|
|
86
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card--noLayout", () => $71570f0038472fa2$export$a03d836e6ef3e749, (v) => $71570f0038472fa2$export$a03d836e6ef3e749 = v);
|
|
87
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card--noPreview", () => $71570f0038472fa2$export$b77922bc0320c9e4, (v) => $71570f0038472fa2$export$b77922bc0320c9e4 = v);
|
|
88
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card--waterfall", () => $71570f0038472fa2$export$d9c7209e0e4f7e4d, (v) => $71570f0038472fa2$export$d9c7209e0e4f7e4d = v);
|
|
89
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card-avatar", () => $71570f0038472fa2$export$159930c59efb6273, (v) => $71570f0038472fa2$export$159930c59efb6273 = v);
|
|
90
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card-checkbox", () => $71570f0038472fa2$export$842da5d48b8f6db2, (v) => $71570f0038472fa2$export$842da5d48b8f6db2 = v);
|
|
91
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card-checkboxWrapper", () => $71570f0038472fa2$export$33977546b63e0df9, (v) => $71570f0038472fa2$export$33977546b63e0df9 = v);
|
|
92
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card-content", () => $71570f0038472fa2$export$d946625b97e8aa17, (v) => $71570f0038472fa2$export$d946625b97e8aa17 = v);
|
|
93
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card-decoration", () => $71570f0038472fa2$export$48252dc130b62514, (v) => $71570f0038472fa2$export$48252dc130b62514 = v);
|
|
94
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card-detail", () => $71570f0038472fa2$export$16715af38fbd9819, (v) => $71570f0038472fa2$export$16715af38fbd9819 = v);
|
|
95
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card-grid", () => $71570f0038472fa2$export$b3dd760d2dfde29e, (v) => $71570f0038472fa2$export$b3dd760d2dfde29e = v);
|
|
96
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card-heading", () => $71570f0038472fa2$export$92758a4a0e8d19e4, (v) => $71570f0038472fa2$export$92758a4a0e8d19e4 = v);
|
|
97
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card-illustration", () => $71570f0038472fa2$export$13dd3510ae7a8399, (v) => $71570f0038472fa2$export$13dd3510ae7a8399 = v);
|
|
98
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-Card-image", () => $71570f0038472fa2$export$8d5fea71dc66db80, (v) => $71570f0038472fa2$export$8d5fea71dc66db80 = v);
|
|
99
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-CardView", () => $71570f0038472fa2$export$2f34e9e3e0b89d95, (v) => $71570f0038472fa2$export$2f34e9e3e0b89d95 = v);
|
|
100
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-CardView-centeredWrapper", () => $71570f0038472fa2$export$7fc89689fcfab196, (v) => $71570f0038472fa2$export$7fc89689fcfab196 = v);
|
|
101
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-CardView-row", () => $71570f0038472fa2$export$4746ac09daa215ae, (v) => $71570f0038472fa2$export$4746ac09daa215ae = v);
|
|
102
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-FocusRing-ring", () => $71570f0038472fa2$export$4109102f950813a6, (v) => $71570f0038472fa2$export$4109102f950813a6 = v);
|
|
103
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-FocusRing", () => $71570f0038472fa2$export$24c7f46a6e3605dd, (v) => $71570f0038472fa2$export$24c7f46a6e3605dd = v);
|
|
104
|
+
$parcel$export($71570f0038472fa2$exports, "spectrum-FocusRing--quiet", () => $71570f0038472fa2$export$2927016961429360, (v) => $71570f0038472fa2$export$2927016961429360 = v);
|
|
105
|
+
$parcel$export($71570f0038472fa2$exports, "title", () => $71570f0038472fa2$export$fb184b623420d9be, (v) => $71570f0038472fa2$export$fb184b623420d9be = v);
|
|
106
|
+
var $71570f0038472fa2$export$345c5736c8054f22;
|
|
107
|
+
var $71570f0038472fa2$export$a7db06668cad9adb;
|
|
108
|
+
var $71570f0038472fa2$export$13a2d28b88853ef2;
|
|
109
|
+
var $71570f0038472fa2$export$f39a09f249340e2a;
|
|
110
|
+
var $71570f0038472fa2$export$8c4ee2c50c22c514;
|
|
111
|
+
var $71570f0038472fa2$export$d8467f38d2d00bd0;
|
|
112
|
+
var $71570f0038472fa2$export$e7dc768d35940237;
|
|
113
|
+
var $71570f0038472fa2$export$b8813cd5d7824ce7;
|
|
114
|
+
var $71570f0038472fa2$export$1e0fb04f31d3c22a;
|
|
115
|
+
var $71570f0038472fa2$export$48c2d0f2f545ac27;
|
|
116
|
+
var $71570f0038472fa2$export$4e5e9f191b1edb8;
|
|
117
|
+
var $71570f0038472fa2$export$c7a022df9e10a238;
|
|
118
|
+
var $71570f0038472fa2$export$ccd8ffc36bd10cc;
|
|
119
|
+
var $71570f0038472fa2$export$59739ab951d2dcc7;
|
|
120
|
+
var $71570f0038472fa2$export$1c52334407225704;
|
|
121
|
+
var $71570f0038472fa2$export$92ad04b5ac9296ea;
|
|
122
|
+
var $71570f0038472fa2$export$a03d836e6ef3e749;
|
|
123
|
+
var $71570f0038472fa2$export$b77922bc0320c9e4;
|
|
124
|
+
var $71570f0038472fa2$export$d9c7209e0e4f7e4d;
|
|
125
|
+
var $71570f0038472fa2$export$159930c59efb6273;
|
|
126
|
+
var $71570f0038472fa2$export$842da5d48b8f6db2;
|
|
127
|
+
var $71570f0038472fa2$export$33977546b63e0df9;
|
|
128
|
+
var $71570f0038472fa2$export$d946625b97e8aa17;
|
|
129
|
+
var $71570f0038472fa2$export$48252dc130b62514;
|
|
130
|
+
var $71570f0038472fa2$export$16715af38fbd9819;
|
|
131
|
+
var $71570f0038472fa2$export$b3dd760d2dfde29e;
|
|
132
|
+
var $71570f0038472fa2$export$92758a4a0e8d19e4;
|
|
133
|
+
var $71570f0038472fa2$export$13dd3510ae7a8399;
|
|
134
|
+
var $71570f0038472fa2$export$8d5fea71dc66db80;
|
|
135
|
+
var $71570f0038472fa2$export$2f34e9e3e0b89d95;
|
|
136
|
+
var $71570f0038472fa2$export$7fc89689fcfab196;
|
|
137
|
+
var $71570f0038472fa2$export$4746ac09daa215ae;
|
|
138
|
+
var $71570f0038472fa2$export$4109102f950813a6;
|
|
139
|
+
var $71570f0038472fa2$export$24c7f46a6e3605dd;
|
|
140
|
+
var $71570f0038472fa2$export$2927016961429360;
|
|
141
|
+
var $71570f0038472fa2$export$fb184b623420d9be;
|
|
142
|
+
$71570f0038472fa2$export$345c5736c8054f22 = `dqWSla_avatar`;
|
|
143
|
+
$71570f0038472fa2$export$a7db06668cad9adb = `dqWSla_content`;
|
|
144
|
+
$71570f0038472fa2$export$13a2d28b88853ef2 = `dqWSla_detail`;
|
|
145
|
+
$71570f0038472fa2$export$f39a09f249340e2a = `dqWSla_focus-ring`;
|
|
146
|
+
$71570f0038472fa2$export$8c4ee2c50c22c514 = `dqWSla_i18nFontFamily`;
|
|
147
|
+
$71570f0038472fa2$export$d8467f38d2d00bd0 = `dqWSla_is-drop-target`;
|
|
148
|
+
$71570f0038472fa2$export$e7dc768d35940237 = `dqWSla_is-focused`;
|
|
149
|
+
$71570f0038472fa2$export$b8813cd5d7824ce7 = `dqWSla_is-hovered`;
|
|
150
|
+
$71570f0038472fa2$export$1e0fb04f31d3c22a = `dqWSla_is-selected`;
|
|
151
|
+
$71570f0038472fa2$export$48c2d0f2f545ac27 = `dqWSla_preview`;
|
|
152
|
+
$71570f0038472fa2$export$4e5e9f191b1edb8 = `dqWSla_spectrum-Card`;
|
|
153
|
+
$71570f0038472fa2$export$c7a022df9e10a238 = `dqWSla_spectrum-Card--default`;
|
|
154
|
+
$71570f0038472fa2$export$ccd8ffc36bd10cc = `dqWSla_spectrum-Card--gallery`;
|
|
155
|
+
$71570f0038472fa2$export$59739ab951d2dcc7 = `dqWSla_spectrum-Card--grid`;
|
|
156
|
+
$71570f0038472fa2$export$1c52334407225704 = `dqWSla_spectrum-Card--horizontal`;
|
|
157
|
+
$71570f0038472fa2$export$92ad04b5ac9296ea = `dqWSla_spectrum-Card--isQuiet`;
|
|
158
|
+
$71570f0038472fa2$export$a03d836e6ef3e749 = `dqWSla_spectrum-Card--noLayout`;
|
|
159
|
+
$71570f0038472fa2$export$b77922bc0320c9e4 = `dqWSla_spectrum-Card--noPreview`;
|
|
160
|
+
$71570f0038472fa2$export$d9c7209e0e4f7e4d = `dqWSla_spectrum-Card--waterfall`;
|
|
161
|
+
$71570f0038472fa2$export$159930c59efb6273 = `dqWSla_spectrum-Card-avatar`;
|
|
162
|
+
$71570f0038472fa2$export$842da5d48b8f6db2 = `dqWSla_spectrum-Card-checkbox`;
|
|
163
|
+
$71570f0038472fa2$export$33977546b63e0df9 = `dqWSla_spectrum-Card-checkboxWrapper`;
|
|
164
|
+
$71570f0038472fa2$export$d946625b97e8aa17 = `dqWSla_spectrum-Card-content`;
|
|
165
|
+
$71570f0038472fa2$export$48252dc130b62514 = `dqWSla_spectrum-Card-decoration`;
|
|
166
|
+
$71570f0038472fa2$export$16715af38fbd9819 = `dqWSla_spectrum-Card-detail`;
|
|
167
|
+
$71570f0038472fa2$export$b3dd760d2dfde29e = `dqWSla_spectrum-Card-grid`;
|
|
168
|
+
$71570f0038472fa2$export$92758a4a0e8d19e4 = `dqWSla_spectrum-Card-heading`;
|
|
169
|
+
$71570f0038472fa2$export$13dd3510ae7a8399 = `dqWSla_spectrum-Card-illustration`;
|
|
170
|
+
$71570f0038472fa2$export$8d5fea71dc66db80 = `dqWSla_spectrum-Card-image`;
|
|
171
|
+
$71570f0038472fa2$export$2f34e9e3e0b89d95 = `dqWSla_spectrum-CardView`;
|
|
172
|
+
$71570f0038472fa2$export$7fc89689fcfab196 = `dqWSla_spectrum-CardView-centeredWrapper`;
|
|
173
|
+
$71570f0038472fa2$export$4746ac09daa215ae = `dqWSla_spectrum-CardView-row`;
|
|
174
|
+
$71570f0038472fa2$export$4109102f950813a6 = `dqWSla_spectrum-FocusRing-ring`;
|
|
175
|
+
$71570f0038472fa2$export$24c7f46a6e3605dd = `dqWSla_spectrum-FocusRing ${$71570f0038472fa2$export$4109102f950813a6}`;
|
|
176
|
+
$71570f0038472fa2$export$2927016961429360 = `dqWSla_spectrum-FocusRing--quiet`;
|
|
177
|
+
$71570f0038472fa2$export$fb184b623420d9be = `dqWSla_title`;
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
/*
|
|
181
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
182
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
183
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
184
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
*
|
|
186
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
187
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
188
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
189
|
+
* governing permissions and limitations under the License.
|
|
190
|
+
*/
|
|
191
|
+
const $e57ab98cef2f01a5$export$64992ac69f286e5c = /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createContext(null);
|
|
192
|
+
function $e57ab98cef2f01a5$export$fea0b38586ec8f13() {
|
|
193
|
+
return (0, $jpY3B$react.useContext)($e57ab98cef2f01a5$export$64992ac69f286e5c);
|
|
137
194
|
}
|
|
138
195
|
|
|
139
196
|
|
|
140
197
|
|
|
141
198
|
|
|
142
|
-
function $
|
|
143
|
-
props = $
|
|
144
|
-
let context = $
|
|
145
|
-
|
|
146
|
-
let { state: state } = context;
|
|
199
|
+
function $7888205ff7de382f$var$CardBase(props, ref) {
|
|
200
|
+
props = (0, $jpY3B$reactspectrumprovider.useProviderProps)(props);
|
|
201
|
+
let context = (0, $e57ab98cef2f01a5$export$fea0b38586ec8f13)() || {}; // we can call again here, won't change from Card.tsx
|
|
202
|
+
let { state: state } = context;
|
|
147
203
|
let manager = state === null || state === void 0 ? void 0 : state.selectionManager;
|
|
148
|
-
let { isQuiet: isQuiet
|
|
149
|
-
} , item: item , layout: layout , children: children } = props;
|
|
204
|
+
let { isQuiet: isQuiet, orientation: orientation = "vertical", articleProps: articleProps = {}, item: item, layout: layout, children: children } = props;
|
|
150
205
|
let key = item === null || item === void 0 ? void 0 : item.key;
|
|
151
206
|
let isSelected = manager === null || manager === void 0 ? void 0 : manager.isSelected(key);
|
|
152
207
|
let isDisabled = state === null || state === void 0 ? void 0 : state.disabledKeys.has(key);
|
|
153
|
-
let onChange = ()=>
|
|
154
|
-
|
|
155
|
-
};
|
|
156
|
-
let
|
|
157
|
-
let
|
|
158
|
-
let
|
|
159
|
-
let gridRef = $jT0lq$react.useRef();
|
|
160
|
-
let checkboxRef = $jT0lq$react.useRef(null);
|
|
208
|
+
let onChange = ()=>manager === null || manager === void 0 ? void 0 : manager.select(key);
|
|
209
|
+
let { styleProps: styleProps } = (0, $jpY3B$reactspectrumutils.useStyleProps)(props);
|
|
210
|
+
let { cardProps: cardProps, titleProps: titleProps, contentProps: contentProps } = $7888205ff7de382f$var$useCard(props);
|
|
211
|
+
let domRef = (0, $jpY3B$reactspectrumutils.useDOMRef)(ref);
|
|
212
|
+
let gridRef = (0, $jpY3B$react.useRef)();
|
|
213
|
+
let checkboxRef = (0, $jpY3B$react.useRef)(null);
|
|
161
214
|
// cards are only interactive if there is a selection manager and it allows selection
|
|
162
|
-
let { hoverProps: hoverProps
|
|
163
|
-
isDisabled: manager === undefined || (manager === null || manager === void 0 ? void 0 : manager.selectionMode) ===
|
|
215
|
+
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $jpY3B$reactariainteractions.useHover)({
|
|
216
|
+
isDisabled: manager === undefined || (manager === null || manager === void 0 ? void 0 : manager.selectionMode) === "none" || isDisabled
|
|
164
217
|
});
|
|
165
|
-
let [isFocused, setIsFocused] = $
|
|
166
|
-
let { focusWithinProps: focusWithinProps
|
|
218
|
+
let [isFocused, setIsFocused] = (0, $jpY3B$react.useState)(false);
|
|
219
|
+
let { focusWithinProps: focusWithinProps } = (0, $jpY3B$reactariainteractions.useFocusWithin)({
|
|
167
220
|
onFocusWithinChange: setIsFocused,
|
|
168
221
|
isDisabled: isDisabled
|
|
169
222
|
});
|
|
170
223
|
// ToDo: see css for comment about avatar under selector .spectrum-Card--noLayout.spectrum-Card--default
|
|
171
|
-
let hasPreviewImage = $
|
|
172
|
-
let hasPreviewIllustration = $
|
|
224
|
+
let hasPreviewImage = (0, $jpY3B$reactspectrumutils.useHasChild)(`.${(0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)))["spectrum-Card-image"]}`, gridRef);
|
|
225
|
+
let hasPreviewIllustration = (0, $jpY3B$reactspectrumutils.useHasChild)(`.${(0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports)))["spectrum-Card-illustration"]}`, gridRef);
|
|
173
226
|
let hasPreview = hasPreviewImage || hasPreviewIllustration;
|
|
174
227
|
// this is for horizontal cards
|
|
175
|
-
let [height, setHeight] = $
|
|
176
|
-
let updateHeight = $
|
|
177
|
-
if (orientation !==
|
|
228
|
+
let [height, setHeight] = (0, $jpY3B$react.useState)(NaN);
|
|
229
|
+
let updateHeight = (0, $jpY3B$react.useCallback)(()=>{
|
|
230
|
+
if (orientation !== "horizontal") return;
|
|
178
231
|
let cardHeight = gridRef.current.getBoundingClientRect().height;
|
|
179
232
|
setHeight(cardHeight);
|
|
180
233
|
}, [
|
|
@@ -182,56 +235,55 @@ function $0f0c6c6691aad01b$var$CardBase(props, ref) {
|
|
|
182
235
|
gridRef,
|
|
183
236
|
setHeight
|
|
184
237
|
]);
|
|
185
|
-
$
|
|
238
|
+
(0, $jpY3B$reactariautils.useResizeObserver)({
|
|
186
239
|
ref: gridRef,
|
|
187
240
|
onResize: updateHeight
|
|
188
241
|
});
|
|
189
242
|
let aspectRatioEnforce = undefined;
|
|
190
|
-
if (orientation ===
|
|
243
|
+
if (orientation === "horizontal" && !isNaN(height)) aspectRatioEnforce = {
|
|
191
244
|
height: `${height}px`,
|
|
192
245
|
width: `${height}px`
|
|
193
246
|
};
|
|
194
|
-
let slots = $
|
|
247
|
+
let slots = (0, $jpY3B$react.useMemo)(()=>({
|
|
195
248
|
image: {
|
|
196
|
-
UNSAFE_className: $
|
|
197
|
-
objectFit: orientation ===
|
|
198
|
-
alt:
|
|
249
|
+
UNSAFE_className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-image"),
|
|
250
|
+
objectFit: orientation === "horizontal" ? "cover" : "contain",
|
|
251
|
+
alt: "",
|
|
199
252
|
...aspectRatioEnforce
|
|
200
253
|
},
|
|
201
254
|
illustration: {
|
|
202
|
-
UNSAFE_className: $
|
|
255
|
+
UNSAFE_className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-illustration"),
|
|
203
256
|
...aspectRatioEnforce
|
|
204
257
|
},
|
|
205
258
|
avatar: {
|
|
206
|
-
UNSAFE_className: $
|
|
207
|
-
size:
|
|
259
|
+
UNSAFE_className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-avatar"),
|
|
260
|
+
size: "avatar-size-400"
|
|
208
261
|
},
|
|
209
262
|
heading: {
|
|
210
|
-
UNSAFE_className: $
|
|
263
|
+
UNSAFE_className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-heading"),
|
|
211
264
|
...titleProps
|
|
212
265
|
},
|
|
213
266
|
content: {
|
|
214
|
-
UNSAFE_className: $
|
|
267
|
+
UNSAFE_className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-content"),
|
|
215
268
|
...contentProps
|
|
216
269
|
},
|
|
217
270
|
detail: {
|
|
218
|
-
UNSAFE_className: $
|
|
271
|
+
UNSAFE_className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-detail")
|
|
219
272
|
}
|
|
220
|
-
})
|
|
221
|
-
, [
|
|
273
|
+
}), [
|
|
222
274
|
titleProps,
|
|
223
275
|
contentProps,
|
|
224
276
|
height,
|
|
225
277
|
isQuiet,
|
|
226
278
|
orientation
|
|
227
279
|
]);
|
|
228
|
-
$
|
|
280
|
+
(0, $jpY3B$reactariautils.useLayoutEffect)(()=>{
|
|
229
281
|
if (gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) {
|
|
230
|
-
let walker = $
|
|
282
|
+
let walker = (0, $jpY3B$reactariafocus.getFocusableTreeWalker)(gridRef.current);
|
|
231
283
|
let nextNode = walker.nextNode();
|
|
232
284
|
while(nextNode != null){
|
|
233
285
|
if (checkboxRef.current && !checkboxRef.current.UNSAFE_getDOMNode().contains(nextNode)) {
|
|
234
|
-
console.warn(
|
|
286
|
+
console.warn("Card does not support focusable elements, please contact the team regarding your use case.");
|
|
235
287
|
break;
|
|
236
288
|
}
|
|
237
289
|
nextNode = walker.nextNode();
|
|
@@ -240,65 +292,63 @@ function $0f0c6c6691aad01b$var$CardBase(props, ref) {
|
|
|
240
292
|
}, [
|
|
241
293
|
children
|
|
242
294
|
]);
|
|
243
|
-
return
|
|
244
|
-
focusRingClass: $
|
|
245
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
|
295
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $jpY3B$reactariafocus.FocusRing), {
|
|
296
|
+
focusRingClass: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "focus-ring")
|
|
297
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement("article", {
|
|
246
298
|
...styleProps,
|
|
247
|
-
|
|
299
|
+
...(0, $jpY3B$reactariautils.mergeProps)(cardProps, focusWithinProps, hoverProps, (0, $jpY3B$reactariautils.filterDOMProps)(props), articleProps),
|
|
248
300
|
ref: domRef,
|
|
249
|
-
className: $
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
301
|
+
className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card", {
|
|
302
|
+
"spectrum-Card--default": !isQuiet && orientation !== "horizontal",
|
|
303
|
+
"spectrum-Card--isQuiet": isQuiet && orientation !== "horizontal",
|
|
304
|
+
"spectrum-Card--horizontal": orientation === "horizontal",
|
|
305
|
+
"spectrum-Card--noPreview": !hasPreview,
|
|
306
|
+
"is-hovered": isHovered,
|
|
307
|
+
"is-focused": isFocused,
|
|
308
|
+
"is-selected": isSelected,
|
|
309
|
+
"spectrum-Card--waterfall": layout === "waterfall",
|
|
310
|
+
"spectrum-Card--gallery": layout === "gallery",
|
|
311
|
+
"spectrum-Card--grid": layout === "grid",
|
|
312
|
+
"spectrum-Card--noLayout": layout !== "waterfall" && layout !== "gallery" && layout !== "grid"
|
|
261
313
|
}, styleProps.className)
|
|
262
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
|
314
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement("div", {
|
|
263
315
|
ref: gridRef,
|
|
264
|
-
className: $
|
|
265
|
-
}, manager && manager.selectionMode !==
|
|
266
|
-
className: $
|
|
267
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
|
316
|
+
className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-grid")
|
|
317
|
+
}, manager && manager.selectionMode !== "none" && /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement("div", {
|
|
318
|
+
className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-checkboxWrapper")
|
|
319
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $jpY3B$reactspectrumcheckbox.Checkbox), {
|
|
268
320
|
ref: checkboxRef,
|
|
269
321
|
isDisabled: isDisabled,
|
|
270
322
|
excludeFromTabOrder: true,
|
|
271
323
|
isSelected: isSelected,
|
|
272
324
|
onChange: onChange,
|
|
273
|
-
UNSAFE_className: $
|
|
325
|
+
UNSAFE_className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-checkbox"),
|
|
274
326
|
isEmphasized: true,
|
|
275
327
|
"aria-label": "select"
|
|
276
|
-
})), /*#__PURE__*/ ($parcel$interopDefault($
|
|
328
|
+
})), /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $jpY3B$reactspectrumutils.SlotProvider), {
|
|
277
329
|
slots: slots
|
|
278
|
-
}, children), /*#__PURE__*/ ($parcel$interopDefault($
|
|
279
|
-
className: $
|
|
280
|
-
}))))
|
|
330
|
+
}, children), /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement("div", {
|
|
331
|
+
className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-Card-decoration")
|
|
332
|
+
}))));
|
|
281
333
|
}
|
|
282
|
-
function $
|
|
283
|
-
let titleId = $
|
|
284
|
-
let descriptionId = $
|
|
285
|
-
let titleProps = $
|
|
334
|
+
function $7888205ff7de382f$var$useCard(props) {
|
|
335
|
+
let titleId = (0, $jpY3B$reactariautils.useSlotId)();
|
|
336
|
+
let descriptionId = (0, $jpY3B$reactariautils.useSlotId)();
|
|
337
|
+
let titleProps = (0, $jpY3B$react.useMemo)(()=>({
|
|
286
338
|
id: titleId
|
|
287
|
-
})
|
|
288
|
-
, [
|
|
339
|
+
}), [
|
|
289
340
|
titleId
|
|
290
341
|
]);
|
|
291
|
-
let contentProps = $
|
|
342
|
+
let contentProps = (0, $jpY3B$react.useMemo)(()=>({
|
|
292
343
|
id: descriptionId
|
|
293
|
-
})
|
|
294
|
-
, [
|
|
344
|
+
}), [
|
|
295
345
|
descriptionId
|
|
296
346
|
]);
|
|
297
347
|
return {
|
|
298
348
|
cardProps: {
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
349
|
+
...(0, $jpY3B$reactariautils.filterDOMProps)(props),
|
|
350
|
+
"aria-labelledby": titleId,
|
|
351
|
+
"aria-describedby": descriptionId,
|
|
302
352
|
tabIndex: 0
|
|
303
353
|
},
|
|
304
354
|
titleProps: titleProps,
|
|
@@ -307,184 +357,286 @@ function $0f0c6c6691aad01b$var$useCard(props) {
|
|
|
307
357
|
}
|
|
308
358
|
/**
|
|
309
359
|
* TODO: Add description of component here.
|
|
310
|
-
*/ const $
|
|
360
|
+
*/ const $7888205ff7de382f$export$7a6ccaf429ad93a8 = /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).forwardRef($7888205ff7de382f$var$CardBase);
|
|
311
361
|
|
|
312
362
|
|
|
313
363
|
|
|
314
364
|
|
|
315
365
|
|
|
316
|
-
var $
|
|
317
|
-
var $
|
|
318
|
-
$
|
|
366
|
+
var $85c597beff94758b$exports = {};
|
|
367
|
+
var $b0d49dbc72f937a2$exports = {};
|
|
368
|
+
$b0d49dbc72f937a2$exports = {
|
|
369
|
+
"loading": `\u{62C}\u{627}\u{631}\u{64D} \u{627}\u{644}\u{62A}\u{62D}\u{645}\u{64A}\u{644}...`,
|
|
370
|
+
"loadingMore": `\u{62C}\u{627}\u{631}\u{64D} \u{62A}\u{62D}\u{645}\u{64A}\u{644} \u{627}\u{644}\u{645}\u{632}\u{64A}\u{62F}...`
|
|
371
|
+
};
|
|
319
372
|
|
|
320
373
|
|
|
321
|
-
var $
|
|
322
|
-
$
|
|
374
|
+
var $ce0dd82398fba411$exports = {};
|
|
375
|
+
$ce0dd82398fba411$exports = {
|
|
376
|
+
"loading": `\u{417}\u{430}\u{440}\u{435}\u{436}\u{434}\u{430}\u{43D}\u{435}...`,
|
|
377
|
+
"loadingMore": `\u{417}\u{430}\u{440}\u{435}\u{436}\u{434}\u{430}\u{43D}\u{435} \u{43D}\u{430} \u{43E}\u{449}\u{435}...`
|
|
378
|
+
};
|
|
323
379
|
|
|
324
380
|
|
|
325
|
-
var $
|
|
326
|
-
$
|
|
381
|
+
var $1086444b40892e5d$exports = {};
|
|
382
|
+
$1086444b40892e5d$exports = {
|
|
383
|
+
"loading": `Na\u{10D}\xedt\xe1n\xed...`,
|
|
384
|
+
"loadingMore": `Na\u{10D}\xedt\xe1n\xed dal\u{161}\xedch...`
|
|
385
|
+
};
|
|
327
386
|
|
|
328
387
|
|
|
329
|
-
var $
|
|
330
|
-
$
|
|
388
|
+
var $26f9bd87c0446842$exports = {};
|
|
389
|
+
$26f9bd87c0446842$exports = {
|
|
390
|
+
"loading": `Indl\xe6ser...`,
|
|
391
|
+
"loadingMore": `Indl\xe6ser flere...`
|
|
392
|
+
};
|
|
331
393
|
|
|
332
394
|
|
|
333
|
-
var $
|
|
334
|
-
$
|
|
395
|
+
var $5922ace8d8eedc34$exports = {};
|
|
396
|
+
$5922ace8d8eedc34$exports = {
|
|
397
|
+
"loading": `Wird geladen...`,
|
|
398
|
+
"loadingMore": `Noch mehr wird geladen...`
|
|
399
|
+
};
|
|
335
400
|
|
|
336
401
|
|
|
337
|
-
var $
|
|
338
|
-
$
|
|
402
|
+
var $0dff680a5aaa08a6$exports = {};
|
|
403
|
+
$0dff680a5aaa08a6$exports = {
|
|
404
|
+
"loading": `\u{3A6}\u{3CC}\u{3C1}\u{3C4}\u{3C9}\u{3C3}\u{3B7}...`,
|
|
405
|
+
"loadingMore": `\u{3A6}\u{3CC}\u{3C1}\u{3C4}\u{3C9}\u{3C3}\u{3B7} \u{3C0}\u{3B5}\u{3C1}\u{3B9}\u{3C3}\u{3C3}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3C9}\u{3BD}...`
|
|
406
|
+
};
|
|
339
407
|
|
|
340
408
|
|
|
341
|
-
var $
|
|
342
|
-
$
|
|
409
|
+
var $40f72ebe96160fe5$exports = {};
|
|
410
|
+
$40f72ebe96160fe5$exports = {
|
|
411
|
+
"loading": `Loading\u{2026}`,
|
|
412
|
+
"loadingMore": `Loading more\u{2026}`
|
|
413
|
+
};
|
|
343
414
|
|
|
344
415
|
|
|
345
|
-
var $
|
|
346
|
-
$
|
|
416
|
+
var $fd3d037364cca31d$exports = {};
|
|
417
|
+
$fd3d037364cca31d$exports = {
|
|
418
|
+
"loading": `Cargando\u{2026}`,
|
|
419
|
+
"loadingMore": `Cargando m\xe1s\u{2026}`
|
|
420
|
+
};
|
|
347
421
|
|
|
348
422
|
|
|
349
|
-
var $
|
|
350
|
-
$
|
|
423
|
+
var $aeb59a17c296301b$exports = {};
|
|
424
|
+
$aeb59a17c296301b$exports = {
|
|
425
|
+
"loading": `Laadimine...`,
|
|
426
|
+
"loadingMore": `Laadi rohkem...`
|
|
427
|
+
};
|
|
351
428
|
|
|
352
429
|
|
|
353
|
-
var $
|
|
354
|
-
$
|
|
430
|
+
var $8725562d6e87d608$exports = {};
|
|
431
|
+
$8725562d6e87d608$exports = {
|
|
432
|
+
"loading": `Ladataan\u{2026}`,
|
|
433
|
+
"loadingMore": `Ladataan lis\xe4\xe4\u{2026}`
|
|
434
|
+
};
|
|
355
435
|
|
|
356
436
|
|
|
357
|
-
var $
|
|
358
|
-
$
|
|
437
|
+
var $5b8a7cd61bd67f0d$exports = {};
|
|
438
|
+
$5b8a7cd61bd67f0d$exports = {
|
|
439
|
+
"loading": `Chargement en cours\u{2026}`,
|
|
440
|
+
"loadingMore": `Chargement d\u{2019}autres d\u{2019}\xe9l\xe9ments\u{2026}`
|
|
441
|
+
};
|
|
359
442
|
|
|
360
443
|
|
|
361
|
-
var $
|
|
362
|
-
$
|
|
444
|
+
var $904fdf1c66b8e1ae$exports = {};
|
|
445
|
+
$904fdf1c66b8e1ae$exports = {
|
|
446
|
+
"loading": `\u{5D8}\u{5D5}\u{5E2}\u{5DF}...`,
|
|
447
|
+
"loadingMore": `\u{5D8}\u{5D5}\u{5E2}\u{5DF} \u{5E2}\u{5D5}\u{5D3}...`
|
|
448
|
+
};
|
|
363
449
|
|
|
364
450
|
|
|
365
|
-
var $
|
|
366
|
-
$
|
|
451
|
+
var $e321e496e49645f3$exports = {};
|
|
452
|
+
$e321e496e49645f3$exports = {
|
|
453
|
+
"loading": `U\u{10D}itavam...`,
|
|
454
|
+
"loadingMore": `U\u{10D}itavam jo\u{161}...`
|
|
455
|
+
};
|
|
367
456
|
|
|
368
457
|
|
|
369
|
-
var $
|
|
370
|
-
$
|
|
458
|
+
var $5fb9f79f322fc149$exports = {};
|
|
459
|
+
$5fb9f79f322fc149$exports = {
|
|
460
|
+
"loading": `Bet\xf6lt\xe9s folyamatban\u{2026}`,
|
|
461
|
+
"loadingMore": `Tov\xe1bbiak bet\xf6lt\xe9se folyamatban\u{2026}`
|
|
462
|
+
};
|
|
371
463
|
|
|
372
464
|
|
|
373
|
-
var $
|
|
374
|
-
$
|
|
465
|
+
var $87d8922713b63bdb$exports = {};
|
|
466
|
+
$87d8922713b63bdb$exports = {
|
|
467
|
+
"loading": `Caricamento...`,
|
|
468
|
+
"loadingMore": `Caricamento altri...`
|
|
469
|
+
};
|
|
375
470
|
|
|
376
471
|
|
|
377
|
-
var $
|
|
378
|
-
$
|
|
472
|
+
var $57201e032f548603$exports = {};
|
|
473
|
+
$57201e032f548603$exports = {
|
|
474
|
+
"loading": `\u{8AAD}\u{307F}\u{8FBC}\u{307F}\u{4E2D}...`,
|
|
475
|
+
"loadingMore": `\u{3055}\u{3089}\u{306B}\u{8AAD}\u{307F}\u{8FBC}\u{307F}\u{4E2D}...`
|
|
476
|
+
};
|
|
379
477
|
|
|
380
478
|
|
|
381
|
-
var $
|
|
382
|
-
$
|
|
479
|
+
var $74aa6884e1ef4030$exports = {};
|
|
480
|
+
$74aa6884e1ef4030$exports = {
|
|
481
|
+
"loading": `\u{B85C}\u{B4DC} \u{C911}\u{2026}`,
|
|
482
|
+
"loadingMore": `\u{CD94}\u{AC00} \u{B85C}\u{B4DC} \u{C911}\u{2026}`
|
|
483
|
+
};
|
|
383
484
|
|
|
384
485
|
|
|
385
|
-
var $
|
|
386
|
-
$
|
|
486
|
+
var $50cefda6a03c058b$exports = {};
|
|
487
|
+
$50cefda6a03c058b$exports = {
|
|
488
|
+
"loading": `\u{12E}keliama\u{2026}`,
|
|
489
|
+
"loadingMore": `\u{12E}keliama daugiau\u{2026}`
|
|
490
|
+
};
|
|
387
491
|
|
|
388
492
|
|
|
389
|
-
var $
|
|
390
|
-
$
|
|
493
|
+
var $3d08f75b6bbe5354$exports = {};
|
|
494
|
+
$3d08f75b6bbe5354$exports = {
|
|
495
|
+
"loading": `Notiek iel\u{101}de\u{2026}`,
|
|
496
|
+
"loadingMore": `Tiek iel\u{101}d\u{113}ts v\u{113}l...`
|
|
497
|
+
};
|
|
391
498
|
|
|
392
499
|
|
|
393
|
-
var $
|
|
394
|
-
$
|
|
500
|
+
var $c59f7b2f9755472b$exports = {};
|
|
501
|
+
$c59f7b2f9755472b$exports = {
|
|
502
|
+
"loading": `Laster inn...`,
|
|
503
|
+
"loadingMore": `Laster inn flere...`
|
|
504
|
+
};
|
|
395
505
|
|
|
396
506
|
|
|
397
|
-
var $
|
|
398
|
-
$
|
|
507
|
+
var $d81bf728da4b1c33$exports = {};
|
|
508
|
+
$d81bf728da4b1c33$exports = {
|
|
509
|
+
"loading": `Laden...`,
|
|
510
|
+
"loadingMore": `Meer laden...`
|
|
511
|
+
};
|
|
399
512
|
|
|
400
513
|
|
|
401
|
-
var $
|
|
402
|
-
$
|
|
514
|
+
var $f323a42ea1486c2f$exports = {};
|
|
515
|
+
$f323a42ea1486c2f$exports = {
|
|
516
|
+
"loading": `Wczytywanie...`,
|
|
517
|
+
"loadingMore": `Wczytywanie wi\u{119}kszej liczby...`
|
|
518
|
+
};
|
|
403
519
|
|
|
404
520
|
|
|
405
|
-
var $
|
|
406
|
-
$
|
|
521
|
+
var $2b2937248d390105$exports = {};
|
|
522
|
+
$2b2937248d390105$exports = {
|
|
523
|
+
"loading": `Carregando...`,
|
|
524
|
+
"loadingMore": `Carregando mais...`
|
|
525
|
+
};
|
|
407
526
|
|
|
408
527
|
|
|
409
|
-
var $
|
|
410
|
-
$
|
|
528
|
+
var $156cd72030936350$exports = {};
|
|
529
|
+
$156cd72030936350$exports = {
|
|
530
|
+
"loading": `A carregar...`,
|
|
531
|
+
"loadingMore": `A carregar mais...`
|
|
532
|
+
};
|
|
411
533
|
|
|
412
534
|
|
|
413
|
-
var $
|
|
414
|
-
$
|
|
535
|
+
var $5964cf64325251a3$exports = {};
|
|
536
|
+
$5964cf64325251a3$exports = {
|
|
537
|
+
"loading": `Se \xeencarc\u{103}...`,
|
|
538
|
+
"loadingMore": `Se \xeencarc\u{103} mai multe...`
|
|
539
|
+
};
|
|
415
540
|
|
|
416
541
|
|
|
417
|
-
var $
|
|
418
|
-
$
|
|
542
|
+
var $71b3c908be47dc7e$exports = {};
|
|
543
|
+
$71b3c908be47dc7e$exports = {
|
|
544
|
+
"loading": `\u{417}\u{430}\u{433}\u{440}\u{443}\u{437}\u{43A}\u{430}...`,
|
|
545
|
+
"loadingMore": `\u{414}\u{43E}\u{43F}\u{43E}\u{43B}\u{43D}\u{438}\u{442}\u{435}\u{43B}\u{44C}\u{43D}\u{430}\u{44F} \u{437}\u{430}\u{433}\u{440}\u{443}\u{437}\u{43A}\u{430}...`
|
|
546
|
+
};
|
|
419
547
|
|
|
420
548
|
|
|
421
|
-
var $
|
|
422
|
-
$
|
|
549
|
+
var $815155759d865560$exports = {};
|
|
550
|
+
$815155759d865560$exports = {
|
|
551
|
+
"loading": `Na\u{10D}\xedtava sa...`,
|
|
552
|
+
"loadingMore": `Na\u{10D}\xedtava sa viac...`
|
|
553
|
+
};
|
|
423
554
|
|
|
424
555
|
|
|
425
|
-
var $
|
|
426
|
-
$
|
|
556
|
+
var $d5deb2faae807da5$exports = {};
|
|
557
|
+
$d5deb2faae807da5$exports = {
|
|
558
|
+
"loading": `Nalaganje...`,
|
|
559
|
+
"loadingMore": `Nalaganje dodatne vsebine...`
|
|
560
|
+
};
|
|
427
561
|
|
|
428
562
|
|
|
429
|
-
var $
|
|
430
|
-
$
|
|
563
|
+
var $42e52cb34b81b4af$exports = {};
|
|
564
|
+
$42e52cb34b81b4af$exports = {
|
|
565
|
+
"loading": `U\u{10D}itavam...`,
|
|
566
|
+
"loadingMore": `U\u{10D}itavam jo\u{161}...`
|
|
567
|
+
};
|
|
431
568
|
|
|
432
569
|
|
|
433
|
-
var $
|
|
434
|
-
$
|
|
570
|
+
var $f278e5fd270ba60f$exports = {};
|
|
571
|
+
$f278e5fd270ba60f$exports = {
|
|
572
|
+
"loading": `L\xe4ser in...`,
|
|
573
|
+
"loadingMore": `L\xe4ser in mer...`
|
|
574
|
+
};
|
|
435
575
|
|
|
436
576
|
|
|
437
|
-
var $
|
|
438
|
-
$
|
|
577
|
+
var $523e0ad61eab5c5d$exports = {};
|
|
578
|
+
$523e0ad61eab5c5d$exports = {
|
|
579
|
+
"loading": `Y\xfckleniyor...`,
|
|
580
|
+
"loadingMore": `Daha fazla y\xfckleniyor...`
|
|
581
|
+
};
|
|
439
582
|
|
|
440
583
|
|
|
441
|
-
var $
|
|
442
|
-
$
|
|
584
|
+
var $a58cff5745fe89a6$exports = {};
|
|
585
|
+
$a58cff5745fe89a6$exports = {
|
|
586
|
+
"loading": `\u{417}\u{430}\u{432}\u{430}\u{43D}\u{442}\u{430}\u{436}\u{435}\u{43D}\u{43D}\u{44F}\u{2026}`,
|
|
587
|
+
"loadingMore": `\u{417}\u{430}\u{432}\u{430}\u{43D}\u{442}\u{430}\u{436}\u{435}\u{43D}\u{43D}\u{44F} \u{456}\u{43D}\u{448}\u{438}\u{445} \u{43E}\u{431}\u{2019}\u{454}\u{43A}\u{442}\u{456}\u{432}...`
|
|
588
|
+
};
|
|
443
589
|
|
|
444
590
|
|
|
445
|
-
var $
|
|
446
|
-
$
|
|
591
|
+
var $2c1c50c48e046fcb$exports = {};
|
|
592
|
+
$2c1c50c48e046fcb$exports = {
|
|
593
|
+
"loading": `\u{6B63}\u{5728}\u{52A0}\u{8F7D}...`,
|
|
594
|
+
"loadingMore": `\u{6B63}\u{5728}\u{52A0}\u{8F7D}\u{66F4}\u{591A}...`
|
|
595
|
+
};
|
|
447
596
|
|
|
448
597
|
|
|
449
|
-
var $
|
|
450
|
-
$
|
|
598
|
+
var $d20ec5c21f83badd$exports = {};
|
|
599
|
+
$d20ec5c21f83badd$exports = {
|
|
600
|
+
"loading": `\u{6B63}\u{5728}\u{8F09}\u{5165}\u{2026}`,
|
|
601
|
+
"loadingMore": `\u{6B63}\u{5728}\u{8F09}\u{5165}\u{66F4}\u{591A}\u{2026}`
|
|
602
|
+
};
|
|
451
603
|
|
|
452
604
|
|
|
453
|
-
$
|
|
454
|
-
"ar-AE": $
|
|
455
|
-
"bg-BG": $
|
|
456
|
-
"cs-CZ": $
|
|
457
|
-
"da-DK": $
|
|
458
|
-
"de-DE": $
|
|
459
|
-
"el-GR": $
|
|
460
|
-
"en-US": $
|
|
461
|
-
"es-ES": $
|
|
462
|
-
"et-EE": $
|
|
463
|
-
"fi-FI": $
|
|
464
|
-
"fr-FR": $
|
|
465
|
-
"he-IL": $
|
|
466
|
-
"hr-HR": $
|
|
467
|
-
"hu-HU": $
|
|
468
|
-
"it-IT": $
|
|
469
|
-
"ja-JP": $
|
|
470
|
-
"ko-KR": $
|
|
471
|
-
"lt-LT": $
|
|
472
|
-
"lv-LV": $
|
|
473
|
-
"nb-NO": $
|
|
474
|
-
"nl-NL": $
|
|
475
|
-
"pl-PL": $
|
|
476
|
-
"pt-BR": $
|
|
477
|
-
"pt-PT": $
|
|
478
|
-
"ro-RO": $
|
|
479
|
-
"ru-RU": $
|
|
480
|
-
"sk-SK": $
|
|
481
|
-
"sl-SI": $
|
|
482
|
-
"sr-SP": $
|
|
483
|
-
"sv-SE": $
|
|
484
|
-
"tr-TR": $
|
|
485
|
-
"uk-UA": $
|
|
486
|
-
"zh-CN": $
|
|
487
|
-
"zh-TW": $
|
|
605
|
+
$85c597beff94758b$exports = {
|
|
606
|
+
"ar-AE": $b0d49dbc72f937a2$exports,
|
|
607
|
+
"bg-BG": $ce0dd82398fba411$exports,
|
|
608
|
+
"cs-CZ": $1086444b40892e5d$exports,
|
|
609
|
+
"da-DK": $26f9bd87c0446842$exports,
|
|
610
|
+
"de-DE": $5922ace8d8eedc34$exports,
|
|
611
|
+
"el-GR": $0dff680a5aaa08a6$exports,
|
|
612
|
+
"en-US": $40f72ebe96160fe5$exports,
|
|
613
|
+
"es-ES": $fd3d037364cca31d$exports,
|
|
614
|
+
"et-EE": $aeb59a17c296301b$exports,
|
|
615
|
+
"fi-FI": $8725562d6e87d608$exports,
|
|
616
|
+
"fr-FR": $5b8a7cd61bd67f0d$exports,
|
|
617
|
+
"he-IL": $904fdf1c66b8e1ae$exports,
|
|
618
|
+
"hr-HR": $e321e496e49645f3$exports,
|
|
619
|
+
"hu-HU": $5fb9f79f322fc149$exports,
|
|
620
|
+
"it-IT": $87d8922713b63bdb$exports,
|
|
621
|
+
"ja-JP": $57201e032f548603$exports,
|
|
622
|
+
"ko-KR": $74aa6884e1ef4030$exports,
|
|
623
|
+
"lt-LT": $50cefda6a03c058b$exports,
|
|
624
|
+
"lv-LV": $3d08f75b6bbe5354$exports,
|
|
625
|
+
"nb-NO": $c59f7b2f9755472b$exports,
|
|
626
|
+
"nl-NL": $d81bf728da4b1c33$exports,
|
|
627
|
+
"pl-PL": $f323a42ea1486c2f$exports,
|
|
628
|
+
"pt-BR": $2b2937248d390105$exports,
|
|
629
|
+
"pt-PT": $156cd72030936350$exports,
|
|
630
|
+
"ro-RO": $5964cf64325251a3$exports,
|
|
631
|
+
"ru-RU": $71b3c908be47dc7e$exports,
|
|
632
|
+
"sk-SK": $815155759d865560$exports,
|
|
633
|
+
"sl-SI": $d5deb2faae807da5$exports,
|
|
634
|
+
"sr-SP": $42e52cb34b81b4af$exports,
|
|
635
|
+
"sv-SE": $f278e5fd270ba60f$exports,
|
|
636
|
+
"tr-TR": $523e0ad61eab5c5d$exports,
|
|
637
|
+
"uk-UA": $a58cff5745fe89a6$exports,
|
|
638
|
+
"zh-CN": $2c1c50c48e046fcb$exports,
|
|
639
|
+
"zh-TW": $d20ec5c21f83badd$exports
|
|
488
640
|
};
|
|
489
641
|
|
|
490
642
|
|
|
@@ -496,32 +648,32 @@ $594b89a9c0a26629$exports = {
|
|
|
496
648
|
|
|
497
649
|
|
|
498
650
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
let {
|
|
502
|
-
let
|
|
503
|
-
let
|
|
504
|
-
let
|
|
505
|
-
|
|
506
|
-
|
|
651
|
+
|
|
652
|
+
function $514a55f6d91f25ef$var$CardView(props, ref) {
|
|
653
|
+
let { scale: scale } = (0, $jpY3B$reactspectrumprovider.useProvider)();
|
|
654
|
+
let { styleProps: styleProps } = (0, $jpY3B$reactspectrumutils.useStyleProps)(props);
|
|
655
|
+
let domRef = (0, $jpY3B$reactspectrumutils.useDOMRef)(ref);
|
|
656
|
+
let { isQuiet: isQuiet, renderEmptyState: renderEmptyState, layout: layout, loadingState: loadingState, onLoadMore: onLoadMore, cardOrientation: cardOrientation = "vertical" } = props;
|
|
657
|
+
let collator = (0, $jpY3B$reactariai18n.useCollator)({
|
|
658
|
+
usage: "search",
|
|
659
|
+
sensitivity: "base"
|
|
507
660
|
});
|
|
508
|
-
let isLoading = loadingState ===
|
|
509
|
-
let cardViewLayout = $
|
|
661
|
+
let isLoading = loadingState === "loading" || loadingState === "loadingMore";
|
|
662
|
+
let cardViewLayout = (0, $jpY3B$react.useMemo)(()=>typeof layout === "function" ? new layout({
|
|
510
663
|
collator: collator,
|
|
511
664
|
cardOrientation: cardOrientation,
|
|
512
665
|
scale: scale
|
|
513
|
-
}) : layout
|
|
514
|
-
, [
|
|
666
|
+
}) : layout, [
|
|
515
667
|
layout,
|
|
516
668
|
collator,
|
|
517
669
|
cardOrientation,
|
|
518
670
|
scale
|
|
519
671
|
]);
|
|
520
672
|
let layoutType = cardViewLayout.layoutType;
|
|
521
|
-
let
|
|
522
|
-
let { direction: direction
|
|
523
|
-
let { collection: collection
|
|
524
|
-
let gridCollection = $
|
|
673
|
+
let stringFormatter = (0, $jpY3B$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($85c597beff94758b$exports))), "@react-spectrum/card");
|
|
674
|
+
let { direction: direction } = (0, $jpY3B$reactariai18n.useLocale)();
|
|
675
|
+
let { collection: collection } = (0, $jpY3B$reactstatelylist.useListState)(props);
|
|
676
|
+
let gridCollection = (0, $jpY3B$react.useMemo)(()=>new (0, $jpY3B$reactstatelygrid.GridCollection)({
|
|
525
677
|
columnCount: 1,
|
|
526
678
|
items: [
|
|
527
679
|
...collection
|
|
@@ -532,7 +684,7 @@ function $434cfc518fa31831$var$CardView(props, ref) {
|
|
|
532
684
|
childNodes: [
|
|
533
685
|
{
|
|
534
686
|
key: `cell-${item.key}`,
|
|
535
|
-
type:
|
|
687
|
+
type: "cell",
|
|
536
688
|
value: null,
|
|
537
689
|
level: 0,
|
|
538
690
|
rendered: null,
|
|
@@ -541,39 +693,37 @@ function $434cfc518fa31831$var$CardView(props, ref) {
|
|
|
541
693
|
childNodes: []
|
|
542
694
|
}
|
|
543
695
|
]
|
|
544
|
-
})
|
|
545
|
-
|
|
546
|
-
})
|
|
547
|
-
, [
|
|
696
|
+
}))
|
|
697
|
+
}), [
|
|
548
698
|
collection
|
|
549
699
|
]);
|
|
550
|
-
let state = $
|
|
700
|
+
let state = (0, $jpY3B$reactstatelygrid.useGridState)({
|
|
551
701
|
...props,
|
|
552
|
-
selectionMode: cardOrientation ===
|
|
702
|
+
selectionMode: cardOrientation === "horizontal" && layoutType === "grid" ? "none" : props.selectionMode,
|
|
553
703
|
collection: gridCollection,
|
|
554
|
-
focusMode:
|
|
704
|
+
focusMode: "cell"
|
|
555
705
|
});
|
|
556
706
|
cardViewLayout.collection = gridCollection;
|
|
557
707
|
cardViewLayout.disabledKeys = state.disabledKeys;
|
|
558
708
|
cardViewLayout.isLoading = isLoading;
|
|
559
709
|
cardViewLayout.direction = direction;
|
|
560
|
-
let { gridProps: gridProps
|
|
710
|
+
let { gridProps: gridProps } = (0, $jpY3B$reactariagrid.useGrid)({
|
|
561
711
|
...props,
|
|
562
712
|
isVirtualized: true,
|
|
563
713
|
keyboardDelegate: cardViewLayout
|
|
564
714
|
}, state, domRef);
|
|
565
|
-
let renderWrapper = (parent, reusableView)=>/*#__PURE__*/ ($parcel$interopDefault($
|
|
715
|
+
let renderWrapper = (parent, reusableView)=>/*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $jpY3B$reactariavirtualizer.VirtualizerItem), {
|
|
566
716
|
key: reusableView.key,
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
717
|
+
layoutInfo: reusableView.layoutInfo,
|
|
718
|
+
virtualizer: reusableView.virtualizer,
|
|
719
|
+
parent: parent === null || parent === void 0 ? void 0 : parent.layoutInfo
|
|
720
|
+
}, reusableView.rendered);
|
|
571
721
|
let focusedKey = state.selectionManager.focusedKey;
|
|
572
722
|
let focusedItem = gridCollection.getItem(state.selectionManager.focusedKey);
|
|
573
723
|
if ((focusedItem === null || focusedItem === void 0 ? void 0 : focusedItem.parentKey) != null) focusedKey = focusedItem.parentKey;
|
|
574
724
|
let margin = cardViewLayout.margin || 0;
|
|
575
725
|
let virtualizer = cardViewLayout.virtualizer;
|
|
576
|
-
let scrollToItem = $
|
|
726
|
+
let scrollToItem = (0, $jpY3B$react.useCallback)((key)=>{
|
|
577
727
|
virtualizer && virtualizer.scrollToItem(key, {
|
|
578
728
|
duration: 0,
|
|
579
729
|
offsetY: margin
|
|
@@ -583,17 +733,17 @@ function $434cfc518fa31831$var$CardView(props, ref) {
|
|
|
583
733
|
virtualizer
|
|
584
734
|
]);
|
|
585
735
|
// TODO: does aria-row count and aria-col count need to be modified? Perhaps aria-col count needs to be omitted
|
|
586
|
-
return
|
|
736
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $e57ab98cef2f01a5$export$64992ac69f286e5c).Provider, {
|
|
587
737
|
value: {
|
|
588
738
|
state: state,
|
|
589
739
|
isQuiet: isQuiet,
|
|
590
740
|
layout: cardViewLayout,
|
|
591
741
|
cardOrientation: cardOrientation
|
|
592
742
|
}
|
|
593
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
|
743
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $jpY3B$reactariavirtualizer.Virtualizer), {
|
|
594
744
|
...gridProps,
|
|
595
745
|
...styleProps,
|
|
596
|
-
className: $
|
|
746
|
+
className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-CardView"),
|
|
597
747
|
ref: domRef,
|
|
598
748
|
focusedKey: focusedKey,
|
|
599
749
|
scrollDirection: "vertical",
|
|
@@ -605,91 +755,117 @@ function $434cfc518fa31831$var$CardView(props, ref) {
|
|
|
605
755
|
transitionDuration: isLoading ? 160 : 220,
|
|
606
756
|
scrollToItem: scrollToItem
|
|
607
757
|
}, (type, item)=>{
|
|
608
|
-
if (type ===
|
|
758
|
+
if (type === "item") return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement($514a55f6d91f25ef$var$InternalCard, {
|
|
609
759
|
item: item
|
|
610
|
-
})
|
|
611
|
-
else if (type ===
|
|
760
|
+
});
|
|
761
|
+
else if (type === "loader") return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement($514a55f6d91f25ef$var$CenteredWrapper, null, /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $jpY3B$reactspectrumprogress.ProgressCircle), {
|
|
612
762
|
isIndeterminate: true,
|
|
613
|
-
"aria-label": state.collection.size > 0 ?
|
|
614
|
-
}))
|
|
615
|
-
else if (type ===
|
|
763
|
+
"aria-label": state.collection.size > 0 ? stringFormatter.format("loadingMore") : stringFormatter.format("loading")
|
|
764
|
+
}));
|
|
765
|
+
else if (type === "placeholder") {
|
|
616
766
|
let emptyState = renderEmptyState ? renderEmptyState() : null;
|
|
617
767
|
if (emptyState == null) return null;
|
|
618
|
-
return
|
|
768
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement($514a55f6d91f25ef$var$CenteredWrapper, null, emptyState);
|
|
619
769
|
}
|
|
620
|
-
}))
|
|
770
|
+
}));
|
|
621
771
|
}
|
|
622
|
-
function $
|
|
623
|
-
let { state: state
|
|
624
|
-
return
|
|
772
|
+
function $514a55f6d91f25ef$var$CenteredWrapper({ children: children }) {
|
|
773
|
+
let { state: state } = (0, $e57ab98cef2f01a5$export$fea0b38586ec8f13)();
|
|
774
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement("div", {
|
|
625
775
|
role: "row",
|
|
626
776
|
"aria-rowindex": state.collection.size + 1,
|
|
627
|
-
className: $
|
|
628
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
|
777
|
+
className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-CardView-centeredWrapper")
|
|
778
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement("div", {
|
|
629
779
|
role: "gridcell"
|
|
630
|
-
}, children))
|
|
780
|
+
}, children));
|
|
631
781
|
}
|
|
632
|
-
function $
|
|
633
|
-
let { item: item
|
|
782
|
+
function $514a55f6d91f25ef$var$InternalCard(props) {
|
|
783
|
+
let { item: item } = props;
|
|
634
784
|
let cellNode = [
|
|
635
785
|
...item.childNodes
|
|
636
786
|
][0];
|
|
637
|
-
let { state: state
|
|
787
|
+
let { state: state, cardOrientation: cardOrientation, isQuiet: isQuiet, layout: layout } = (0, $e57ab98cef2f01a5$export$fea0b38586ec8f13)();
|
|
638
788
|
let layoutType = layout.layoutType;
|
|
639
|
-
let rowRef = $
|
|
640
|
-
let cellRef = $
|
|
641
|
-
let unwrappedRef = $
|
|
642
|
-
let { rowProps:
|
|
789
|
+
let rowRef = (0, $jpY3B$react.useRef)();
|
|
790
|
+
let cellRef = (0, $jpY3B$react.useRef)();
|
|
791
|
+
let unwrappedRef = (0, $jpY3B$reactspectrumutils.useUnwrapDOMRef)(cellRef);
|
|
792
|
+
let { rowProps: gridRowProps } = (0, $jpY3B$reactariagrid.useGridRow)({
|
|
643
793
|
node: item,
|
|
644
794
|
isVirtualized: true
|
|
645
795
|
}, state, rowRef);
|
|
646
|
-
let { gridCellProps: gridCellProps
|
|
796
|
+
let { gridCellProps: gridCellProps } = (0, $jpY3B$reactariagrid.useGridCell)({
|
|
647
797
|
node: cellNode,
|
|
648
|
-
focusMode:
|
|
798
|
+
focusMode: "cell"
|
|
649
799
|
}, state, unwrappedRef);
|
|
650
|
-
if
|
|
651
|
-
|
|
800
|
+
// Prevent space key from scrolling the CardView if triggered on a disabled item or on a Card in a selectionMode="none" CardView.
|
|
801
|
+
let allowsInteraction = state.selectionManager.selectionMode !== "none";
|
|
802
|
+
let isDisabled = !allowsInteraction || state.disabledKeys.has(item.key);
|
|
803
|
+
let onKeyDown = (e)=>{
|
|
804
|
+
if (e.key === " " && isDisabled) e.preventDefault();
|
|
805
|
+
};
|
|
806
|
+
let rowProps = (0, $jpY3B$reactariautils.mergeProps)(gridRowProps, {
|
|
807
|
+
onKeyDown: onKeyDown
|
|
808
|
+
});
|
|
809
|
+
if (layoutType === "grid" || layoutType === "gallery") isQuiet = true;
|
|
810
|
+
if (layoutType !== "grid") cardOrientation = "vertical";
|
|
652
811
|
// We don't want to focus the checkbox (or any other focusable elements) within the Card
|
|
653
812
|
// when pressing the arrow keys so we delete the key down handler here. Arrow key navigation between
|
|
654
813
|
// the cards in the CardView is handled by useGrid => useSelectableCollection instead.
|
|
655
814
|
delete gridCellProps.onKeyDownCapture;
|
|
656
|
-
return
|
|
815
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement("div", {
|
|
657
816
|
...rowProps,
|
|
658
817
|
ref: rowRef,
|
|
659
|
-
className: $
|
|
660
|
-
}, /*#__PURE__*/ ($parcel$interopDefault($
|
|
818
|
+
className: (0, $jpY3B$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($71570f0038472fa2$exports))), "spectrum-CardView-row")
|
|
819
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $7888205ff7de382f$export$7a6ccaf429ad93a8), {
|
|
661
820
|
ref: cellRef,
|
|
662
821
|
articleProps: gridCellProps,
|
|
663
822
|
isQuiet: isQuiet,
|
|
664
823
|
orientation: cardOrientation,
|
|
665
824
|
item: item,
|
|
666
825
|
layout: layoutType
|
|
667
|
-
}, item.rendered))
|
|
826
|
+
}, item.rendered));
|
|
668
827
|
}
|
|
669
828
|
/**
|
|
670
829
|
* TODO: Add description of component here.
|
|
671
|
-
*/ const $
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
830
|
+
*/ const $514a55f6d91f25ef$export$7e52c821f7b6f422 = /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).forwardRef($514a55f6d91f25ef$var$CardView);
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
/*
|
|
834
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
835
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
836
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
837
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
838
|
+
*
|
|
839
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
840
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
841
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
842
|
+
* governing permissions and limitations under the License.
|
|
843
|
+
*/ /*
|
|
844
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
845
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
846
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
847
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
848
|
+
*
|
|
849
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
850
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
851
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
852
|
+
* governing permissions and limitations under the License.
|
|
853
|
+
*/
|
|
854
|
+
|
|
855
|
+
class $5ee605f09afaa4de$export$64943d2e59d72a29 extends (0, $jpY3B$reactstatelyvirtualizer.Layout) {
|
|
679
856
|
validate(invalidationContext) {
|
|
680
857
|
this.collection = this.virtualizer.collection;
|
|
681
858
|
this.buildCollection(invalidationContext);
|
|
682
859
|
// Remove layout info that doesn't exist in new collection
|
|
683
860
|
if (this.lastCollection) {
|
|
684
861
|
for (let key of this.lastCollection.getKeys())if (!this.collection.getItem(key)) this.layoutInfos.delete(key);
|
|
685
|
-
if (!this.isLoading) this.layoutInfos.delete(
|
|
686
|
-
if (this.collection.size > 0) this.layoutInfos.delete(
|
|
862
|
+
if (!this.isLoading) this.layoutInfos.delete("loader");
|
|
863
|
+
if (this.collection.size > 0) this.layoutInfos.delete("placeholder");
|
|
687
864
|
}
|
|
688
865
|
this.lastCollection = this.collection;
|
|
689
866
|
}
|
|
690
867
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
691
|
-
buildCollection(invalidationContext) {
|
|
692
|
-
}
|
|
868
|
+
buildCollection(invalidationContext) {}
|
|
693
869
|
getContentSize() {
|
|
694
870
|
return this.contentSize;
|
|
695
871
|
}
|
|
@@ -706,12 +882,12 @@ class $22665c819b87f5f9$export$64943d2e59d72a29 extends $jT0lq$reactstatelyvirtu
|
|
|
706
882
|
}
|
|
707
883
|
getInitialLayoutInfo(layoutInfo) {
|
|
708
884
|
layoutInfo.opacity = 0;
|
|
709
|
-
layoutInfo.transform =
|
|
885
|
+
layoutInfo.transform = "scale3d(0.8, 0.8, 0.8)";
|
|
710
886
|
return layoutInfo;
|
|
711
887
|
}
|
|
712
888
|
getFinalLayoutInfo(layoutInfo) {
|
|
713
889
|
layoutInfo.opacity = 0;
|
|
714
|
-
layoutInfo.transform =
|
|
890
|
+
layoutInfo.transform = "scale3d(0.8, 0.8, 0.8)";
|
|
715
891
|
return layoutInfo;
|
|
716
892
|
}
|
|
717
893
|
_findClosestLayoutInfo(target, rect) {
|
|
@@ -719,7 +895,7 @@ class $22665c819b87f5f9$export$64943d2e59d72a29 extends $jT0lq$reactstatelyvirtu
|
|
|
719
895
|
let best = null;
|
|
720
896
|
let bestDistance = Infinity;
|
|
721
897
|
// Calculates distance as the distance between the center of 2 rects.
|
|
722
|
-
for (let cur of layoutInfos)if (cur.type ===
|
|
898
|
+
for (let cur of layoutInfos)if (cur.type === "item") {
|
|
723
899
|
let curRect = cur.rect;
|
|
724
900
|
let targetMidX = (target.x + target.maxX) / 2;
|
|
725
901
|
let targetMidY = (target.y + target.maxY) / 2;
|
|
@@ -738,52 +914,56 @@ class $22665c819b87f5f9$export$64943d2e59d72a29 extends $jT0lq$reactstatelyvirtu
|
|
|
738
914
|
return best || null;
|
|
739
915
|
}
|
|
740
916
|
getKeyBelow(key) {
|
|
741
|
-
var
|
|
917
|
+
var _this__findClosest, _getFirstItem;
|
|
742
918
|
// Expected key is the currently focused cell so we need the parent row key
|
|
743
919
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
744
920
|
let layoutInfo = this.getLayoutInfo(parentRowKey);
|
|
745
|
-
let rect = new $
|
|
746
|
-
let closestRow = this.collection.getItem((
|
|
747
|
-
return (
|
|
921
|
+
let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.x, layoutInfo.rect.maxY + 1, layoutInfo.rect.width, this.virtualizer.visibleRect.height);
|
|
922
|
+
let closestRow = this.collection.getItem((_this__findClosest = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest === void 0 ? void 0 : _this__findClosest.key);
|
|
923
|
+
return (_getFirstItem = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(closestRow, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
|
|
748
924
|
}
|
|
749
925
|
getKeyAbove(key) {
|
|
750
|
-
var
|
|
926
|
+
var _this__findClosest, _getFirstItem;
|
|
751
927
|
// Expected key is the currently focused cell so we need the parent row key
|
|
752
928
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
753
929
|
let layoutInfo = this.getLayoutInfo(parentRowKey);
|
|
754
|
-
let rect = new $
|
|
755
|
-
let closestRow = this.collection.getItem((
|
|
756
|
-
return (
|
|
930
|
+
let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.x, 0, layoutInfo.rect.width, layoutInfo.rect.y - 1);
|
|
931
|
+
let closestRow = this.collection.getItem((_this__findClosest = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest === void 0 ? void 0 : _this__findClosest.key);
|
|
932
|
+
return (_getFirstItem = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(closestRow, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
|
|
757
933
|
}
|
|
758
934
|
getKeyRightOf(key) {
|
|
759
935
|
// Expected key is the currently focused cell so we need the parent row key
|
|
760
936
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
761
|
-
key = this.direction ===
|
|
937
|
+
key = this.direction === "rtl" ? this.collection.getKeyBefore(parentRowKey) : this.collection.getKeyAfter(parentRowKey);
|
|
762
938
|
while(key != null){
|
|
939
|
+
var _getFirstItem;
|
|
763
940
|
let item = this.collection.getItem(key);
|
|
764
941
|
// Don't check if item is disabled because we want to be able to focus disabled items in a grid (double check this)
|
|
765
|
-
if (item.type ===
|
|
766
|
-
key = this.direction ===
|
|
942
|
+
if (item.type === "item") return (_getFirstItem = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
|
|
943
|
+
key = this.direction === "rtl" ? this.collection.getKeyBefore(key) : this.collection.getKeyAfter(key);
|
|
767
944
|
}
|
|
768
945
|
}
|
|
769
946
|
getKeyLeftOf(key) {
|
|
770
947
|
// Expected key is the currently focused cell so we need the parent row key
|
|
771
948
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
772
|
-
key = this.direction ===
|
|
949
|
+
key = this.direction === "rtl" ? this.collection.getKeyAfter(parentRowKey) : this.collection.getKeyBefore(parentRowKey);
|
|
773
950
|
while(key != null){
|
|
951
|
+
var _getFirstItem;
|
|
774
952
|
let item = this.collection.getItem(key);
|
|
775
953
|
// Don't check if item is disabled because we want to be able to focus disabled items in a grid (double check this)
|
|
776
|
-
if (item.type ===
|
|
777
|
-
key = this.direction ===
|
|
954
|
+
if (item.type === "item") return (_getFirstItem = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
|
|
955
|
+
key = this.direction === "rtl" ? this.collection.getKeyAfter(key) : this.collection.getKeyBefore(key);
|
|
778
956
|
}
|
|
779
957
|
}
|
|
780
958
|
getFirstKey() {
|
|
959
|
+
var _getFirstItem;
|
|
781
960
|
let firstRow = this.collection.getItem(this.collection.getFirstKey());
|
|
782
|
-
return firstRow.
|
|
961
|
+
return (_getFirstItem = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(firstRow, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
|
|
783
962
|
}
|
|
784
963
|
getLastKey() {
|
|
964
|
+
var _getFirstItem;
|
|
785
965
|
let lastRow = this.collection.getItem(this.collection.getLastKey());
|
|
786
|
-
return lastRow.
|
|
966
|
+
return (_getFirstItem = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(lastRow, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
|
|
787
967
|
}
|
|
788
968
|
// TODO: pretty unwieldy because it needs to bounce back and forth between the parent key and the child key
|
|
789
969
|
// Perhaps have layoutInfo store childKey as well so we don't need to do this? Or maybe make the layoutInfos be the cells instead of the rows?
|
|
@@ -792,20 +972,21 @@ class $22665c819b87f5f9$export$64943d2e59d72a29 extends $jT0lq$reactstatelyvirtu
|
|
|
792
972
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
793
973
|
let layoutInfo = this.getLayoutInfo(parentRowKey);
|
|
794
974
|
if (layoutInfo) {
|
|
795
|
-
var
|
|
975
|
+
var _this_collection_getItem;
|
|
796
976
|
let pageY = Math.max(0, layoutInfo.rect.y + layoutInfo.rect.height - this.virtualizer.visibleRect.height);
|
|
797
977
|
// If the node is so large that it spans multiple page heights, return the key of the item immediately above
|
|
798
978
|
// Otherwise keep going up until we exceed a single page height worth of nodes
|
|
799
|
-
let keyAbove = (
|
|
979
|
+
let keyAbove = (_this_collection_getItem = this.collection.getItem(this.getKeyAbove(key))) === null || _this_collection_getItem === void 0 ? void 0 : _this_collection_getItem.parentKey;
|
|
800
980
|
layoutInfo = this.getLayoutInfo(keyAbove);
|
|
801
981
|
if (layoutInfo && layoutInfo.rect.y > pageY) while(layoutInfo && layoutInfo.rect.y > pageY){
|
|
802
|
-
var
|
|
803
|
-
let childKey = this.collection.getItem(layoutInfo.key).
|
|
804
|
-
let keyAbove = (
|
|
982
|
+
var _getFirstItem, _this_collection_getItem1;
|
|
983
|
+
let childKey = (_getFirstItem = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(this.collection.getItem(layoutInfo.key), this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
|
|
984
|
+
let keyAbove = (_this_collection_getItem1 = this.collection.getItem(this.getKeyAbove(childKey))) === null || _this_collection_getItem1 === void 0 ? void 0 : _this_collection_getItem1.parentKey;
|
|
805
985
|
layoutInfo = this.getLayoutInfo(keyAbove);
|
|
806
986
|
}
|
|
807
987
|
if (layoutInfo) {
|
|
808
|
-
|
|
988
|
+
var _getFirstItem1;
|
|
989
|
+
let childKey = (_getFirstItem1 = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(this.collection.getItem(layoutInfo.key), this.collection))) === null || _getFirstItem1 === void 0 ? void 0 : _getFirstItem1.key;
|
|
809
990
|
return childKey;
|
|
810
991
|
}
|
|
811
992
|
}
|
|
@@ -818,20 +999,21 @@ class $22665c819b87f5f9$export$64943d2e59d72a29 extends $jT0lq$reactstatelyvirtu
|
|
|
818
999
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
819
1000
|
let layoutInfo = this.getLayoutInfo(parentRowKey);
|
|
820
1001
|
if (layoutInfo) {
|
|
821
|
-
var
|
|
1002
|
+
var _this_collection_getItem;
|
|
822
1003
|
let pageY = Math.min(this.virtualizer.contentSize.height, layoutInfo.rect.y - layoutInfo.rect.height + this.virtualizer.visibleRect.height);
|
|
823
1004
|
// If the node is so large that it spans multiple page heights, return the key of the item immediately below
|
|
824
1005
|
// Otherwise keep going up until we exceed a single page height worth of nodes
|
|
825
|
-
let keyBelow = (
|
|
1006
|
+
let keyBelow = (_this_collection_getItem = this.collection.getItem(this.getKeyBelow(key))) === null || _this_collection_getItem === void 0 ? void 0 : _this_collection_getItem.parentKey;
|
|
826
1007
|
layoutInfo = this.getLayoutInfo(keyBelow);
|
|
827
1008
|
if (layoutInfo && layoutInfo.rect.y < pageY) while(layoutInfo && layoutInfo.rect.y < pageY){
|
|
828
|
-
var
|
|
829
|
-
let childKey = this.collection.getItem(layoutInfo.key).
|
|
830
|
-
let keyBelow = (
|
|
1009
|
+
var _getFirstItem, _this_collection_getItem1;
|
|
1010
|
+
let childKey = (_getFirstItem = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(this.collection.getItem(layoutInfo.key), this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
|
|
1011
|
+
let keyBelow = (_this_collection_getItem1 = this.collection.getItem(this.getKeyBelow(childKey))) === null || _this_collection_getItem1 === void 0 ? void 0 : _this_collection_getItem1.parentKey;
|
|
831
1012
|
layoutInfo = this.getLayoutInfo(keyBelow);
|
|
832
1013
|
}
|
|
833
1014
|
if (layoutInfo) {
|
|
834
|
-
|
|
1015
|
+
var _getFirstItem1;
|
|
1016
|
+
let childKey = (_getFirstItem1 = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(this.collection.getItem(layoutInfo.key), this.collection))) === null || _getFirstItem1 === void 0 ? void 0 : _getFirstItem1.key;
|
|
835
1017
|
return childKey;
|
|
836
1018
|
}
|
|
837
1019
|
}
|
|
@@ -846,53 +1028,51 @@ class $22665c819b87f5f9$export$64943d2e59d72a29 extends $jT0lq$reactstatelyvirtu
|
|
|
846
1028
|
while(key != null){
|
|
847
1029
|
let item = collection.getItem(key);
|
|
848
1030
|
if (item.textValue) {
|
|
1031
|
+
var _getFirstItem;
|
|
849
1032
|
let substring = item.textValue.slice(0, search.length);
|
|
850
|
-
if (this.collator.compare(substring, search) === 0) return
|
|
851
|
-
...item.childNodes
|
|
852
|
-
][0].key;
|
|
1033
|
+
if (this.collator.compare(substring, search) === 0) return (_getFirstItem = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
|
|
853
1034
|
}
|
|
854
1035
|
key = this.collection.getKeyAfter(key);
|
|
855
1036
|
}
|
|
856
1037
|
return null;
|
|
857
1038
|
}
|
|
858
|
-
constructor(options = {
|
|
859
|
-
}){
|
|
1039
|
+
constructor(options = {}){
|
|
860
1040
|
super();
|
|
861
1041
|
this.disabledKeys = new Set();
|
|
862
1042
|
this.layoutInfos = new Map();
|
|
863
1043
|
this.collator = options.collator;
|
|
864
1044
|
this.lastCollection = null;
|
|
865
|
-
this.scale = options.scale ||
|
|
1045
|
+
this.scale = options.scale || "medium";
|
|
866
1046
|
this.margin = options.margin || 24;
|
|
867
1047
|
}
|
|
868
1048
|
}
|
|
869
1049
|
|
|
870
1050
|
|
|
871
1051
|
|
|
872
|
-
const $
|
|
1052
|
+
const $8019a3d2c7d098ea$var$DEFAULT_OPTIONS = {
|
|
873
1053
|
S: {
|
|
874
1054
|
idealRowHeight: 112,
|
|
875
|
-
minItemSize: new $
|
|
876
|
-
itemSpacing: new $
|
|
1055
|
+
minItemSize: new (0, $jpY3B$reactstatelyvirtualizer.Size)(96, 96),
|
|
1056
|
+
itemSpacing: new (0, $jpY3B$reactstatelyvirtualizer.Size)(8, 16),
|
|
877
1057
|
itemPadding: 24,
|
|
878
1058
|
dropSpacing: 50,
|
|
879
1059
|
margin: 8
|
|
880
1060
|
},
|
|
881
1061
|
L: {
|
|
882
1062
|
idealRowHeight: 208,
|
|
883
|
-
minItemSize: new $
|
|
884
|
-
itemSpacing: new $
|
|
1063
|
+
minItemSize: new (0, $jpY3B$reactstatelyvirtualizer.Size)(136, 136),
|
|
1064
|
+
itemSpacing: new (0, $jpY3B$reactstatelyvirtualizer.Size)(18, 18),
|
|
885
1065
|
itemPadding: {
|
|
886
|
-
|
|
887
|
-
|
|
1066
|
+
"medium": 78,
|
|
1067
|
+
"large": 99
|
|
888
1068
|
},
|
|
889
1069
|
dropSpacing: 100,
|
|
890
1070
|
margin: 24
|
|
891
1071
|
}
|
|
892
1072
|
};
|
|
893
|
-
class $
|
|
1073
|
+
class $8019a3d2c7d098ea$export$8e52095834484b61 extends (0, $5ee605f09afaa4de$export$64943d2e59d72a29) {
|
|
894
1074
|
get layoutType() {
|
|
895
|
-
return
|
|
1075
|
+
return "gallery";
|
|
896
1076
|
}
|
|
897
1077
|
/**
|
|
898
1078
|
* Takes a row of widths and if there are any widths smaller than the min-width, leech width starting from
|
|
@@ -900,8 +1080,7 @@ class $5bf28b6236de0f59$export$8e52095834484b61 extends $22665c819b87f5f9$export
|
|
|
900
1080
|
* Do this until all assets meet the min-width.
|
|
901
1081
|
* */ _distributeWidths(widths) {
|
|
902
1082
|
// create a copy of the widths array and sort it largest to smallest
|
|
903
|
-
let sortedWidths = widths.concat().sort((a, b)=>a[1] > b[1] ? -1 : 1
|
|
904
|
-
);
|
|
1083
|
+
let sortedWidths = widths.concat().sort((a, b)=>a[1] > b[1] ? -1 : 1);
|
|
905
1084
|
for (let width of widths)// for each width, if it's smaller than the min width
|
|
906
1085
|
if (width[1] < this.minItemSize.width) {
|
|
907
1086
|
// then figure out how much smaller
|
|
@@ -911,6 +1090,7 @@ class $5bf28b6236de0f59$export$8e52095834484b61 extends $22665c819b87f5f9$export
|
|
|
911
1090
|
if (widths[item[0]][1] > this.minItemSize.width) {
|
|
912
1091
|
// subtract the delta from the width, if it's still greater than the min width
|
|
913
1092
|
// then we have finished, subtract the delta permanently from that width
|
|
1093
|
+
// eslint-disable-next-line max-depth
|
|
914
1094
|
if (widths[item[0]][1] - delta > this.minItemSize.width) {
|
|
915
1095
|
widths[item[0]][1] -= delta;
|
|
916
1096
|
delta = 0;
|
|
@@ -956,9 +1136,8 @@ class $5bf28b6236de0f59$export$8e52095834484b61 extends $22665c819b87f5f9$export
|
|
|
956
1136
|
// if the available width can't hold two items, then every item will get its own row
|
|
957
1137
|
// this leads to a faster run through linear partition and more dependable output for small row widths
|
|
958
1138
|
if (availableWidth <= this.minItemSize.width * 2 + this.itemPadding * 2) rows = this.collection.size;
|
|
959
|
-
let weightedRatios = ratios.map((ratio)=>ratio < this.threshold ? ratio + 0.5 * (1 / ratio) : ratio
|
|
960
|
-
);
|
|
961
|
-
let partition = $5bf28b6236de0f59$var$linearPartition(weightedRatios, rows);
|
|
1139
|
+
let weightedRatios = ratios.map((ratio)=>ratio < this.threshold ? ratio + 0.5 * (1 / ratio) : ratio);
|
|
1140
|
+
let partition = $8019a3d2c7d098ea$var$linearPartition(weightedRatios, rows);
|
|
962
1141
|
let index = 0;
|
|
963
1142
|
for (let row of partition){
|
|
964
1143
|
// Compute the total weight for this row
|
|
@@ -974,20 +1153,20 @@ class $5bf28b6236de0f59$export$8e52095834484b61 extends $22665c819b87f5f9$export
|
|
|
974
1153
|
let x = this.margin;
|
|
975
1154
|
// if any items are going to end up too small, add a bit of width to them and subtract it from wider objects
|
|
976
1155
|
let widths = [];
|
|
977
|
-
for(let
|
|
978
|
-
let width = Math.round(bestRowHeight * ratios[
|
|
1156
|
+
for(let j = index; j < index + row.length; j++){
|
|
1157
|
+
let width = Math.round(bestRowHeight * ratios[j]);
|
|
979
1158
|
widths.push([
|
|
980
|
-
|
|
1159
|
+
j - index,
|
|
981
1160
|
width
|
|
982
1161
|
]);
|
|
983
1162
|
}
|
|
984
1163
|
this._distributeWidths(widths);
|
|
985
1164
|
// Create items for this row.
|
|
986
|
-
for(let
|
|
987
|
-
let node = this.collection.rows[
|
|
988
|
-
let itemWidth = Math.max(widths[
|
|
989
|
-
let rect = new $
|
|
990
|
-
let layoutInfo = new $
|
|
1165
|
+
for(let j = index; j < index + row.length; j++){
|
|
1166
|
+
let node = this.collection.rows[j];
|
|
1167
|
+
let itemWidth = Math.max(widths[j - index][1], this.minItemSize.width);
|
|
1168
|
+
let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(x, y, itemWidth, itemHeight);
|
|
1169
|
+
let layoutInfo = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)(node.type, node.key, rect);
|
|
991
1170
|
layoutInfo.allowOverflow = true;
|
|
992
1171
|
this.layoutInfos.set(node.key, layoutInfo);
|
|
993
1172
|
x += itemWidth + this.itemSpacing.width;
|
|
@@ -1004,63 +1183,59 @@ class $5bf28b6236de0f59$export$8e52095834484b61 extends $22665c819b87f5f9$export
|
|
|
1004
1183
|
loaderY = 0;
|
|
1005
1184
|
loaderHeight = visibleHeight || 60;
|
|
1006
1185
|
}
|
|
1007
|
-
let rect = new $
|
|
1008
|
-
let loader = new $
|
|
1009
|
-
this.layoutInfos.set(
|
|
1186
|
+
let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(0, loaderY, visibleWidth, loaderHeight);
|
|
1187
|
+
let loader = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)("loader", "loader", rect);
|
|
1188
|
+
this.layoutInfos.set("loader", loader);
|
|
1010
1189
|
y = loader.rect.maxY;
|
|
1011
1190
|
}
|
|
1012
1191
|
if (this.collection.size === 0 && !this.isLoading) {
|
|
1013
|
-
let rect = new $
|
|
1014
|
-
let placeholder = new $
|
|
1015
|
-
this.layoutInfos.set(
|
|
1192
|
+
let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(0, 0, visibleWidth, visibleHeight);
|
|
1193
|
+
let placeholder = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)("placeholder", "placeholder", rect);
|
|
1194
|
+
this.layoutInfos.set("placeholder", placeholder);
|
|
1016
1195
|
y = placeholder.rect.maxY;
|
|
1017
1196
|
}
|
|
1018
1197
|
}
|
|
1019
|
-
this.contentSize = new $
|
|
1198
|
+
this.contentSize = new (0, $jpY3B$reactstatelyvirtualizer.Size)(visibleWidth, y);
|
|
1020
1199
|
}
|
|
1021
|
-
constructor(options = {
|
|
1022
|
-
}){
|
|
1200
|
+
constructor(options = {}){
|
|
1023
1201
|
super(options);
|
|
1024
|
-
let cardSize =
|
|
1025
|
-
this.idealRowHeight = options.idealRowHeight || $
|
|
1026
|
-
this.itemSpacing = options.itemSpacing || $
|
|
1027
|
-
this.itemPadding = options.itemPadding != null ? options.itemPadding : $
|
|
1028
|
-
this.minItemSize = options.minItemSize || $
|
|
1202
|
+
let cardSize = "L";
|
|
1203
|
+
this.idealRowHeight = options.idealRowHeight || $8019a3d2c7d098ea$var$DEFAULT_OPTIONS[cardSize].idealRowHeight;
|
|
1204
|
+
this.itemSpacing = options.itemSpacing || $8019a3d2c7d098ea$var$DEFAULT_OPTIONS[cardSize].itemSpacing;
|
|
1205
|
+
this.itemPadding = options.itemPadding != null ? options.itemPadding : $8019a3d2c7d098ea$var$DEFAULT_OPTIONS[cardSize].itemPadding[this.scale];
|
|
1206
|
+
this.minItemSize = options.minItemSize || $8019a3d2c7d098ea$var$DEFAULT_OPTIONS[cardSize].minItemSize;
|
|
1029
1207
|
this.threshold = options.threshold || 1;
|
|
1030
|
-
this.margin = options.margin != null ? options.margin : $
|
|
1208
|
+
this.margin = options.margin != null ? options.margin : $8019a3d2c7d098ea$var$DEFAULT_OPTIONS[cardSize].margin;
|
|
1031
1209
|
}
|
|
1032
1210
|
}
|
|
1033
1211
|
// https://www8.cs.umu.se/kurser/TDBA77/VT06/algorithms/BOOK/BOOK2/NODE45.HTM
|
|
1034
|
-
function $
|
|
1212
|
+
function $8019a3d2c7d098ea$var$linearPartition(seq, k) {
|
|
1035
1213
|
let n = seq.length;
|
|
1036
1214
|
if (k <= 0) return [];
|
|
1037
1215
|
if (k >= n) return seq.map((x)=>[
|
|
1038
1216
|
x
|
|
1039
|
-
]
|
|
1040
|
-
);
|
|
1217
|
+
]);
|
|
1041
1218
|
if (n === 1) return [
|
|
1042
1219
|
seq
|
|
1043
1220
|
];
|
|
1044
|
-
let table = Array(n).fill(0).map(()=>Array(k).fill(0)
|
|
1045
|
-
);
|
|
1046
|
-
let solution = Array(n - 1).fill(0).map(()=>Array(k - 1).fill(0)
|
|
1047
|
-
);
|
|
1221
|
+
let table = Array(n).fill(0).map(()=>Array(k).fill(0));
|
|
1222
|
+
let solution = Array(n - 1).fill(0).map(()=>Array(k - 1).fill(0));
|
|
1048
1223
|
for(let i = 0; i < n; i++)table[i][0] = seq[i] + (i > 0 ? table[i - 1][0] : 0);
|
|
1049
|
-
for(let
|
|
1050
|
-
for(let
|
|
1224
|
+
for(let i = 0; i < k; i++)table[0][i] = seq[0];
|
|
1225
|
+
for(let i = 1; i < n; i++)for(let j = 1; j < k; j++){
|
|
1051
1226
|
let currentMin = 0;
|
|
1052
1227
|
let minX = Infinity;
|
|
1053
|
-
for(let x = 0; x <
|
|
1228
|
+
for(let x = 0; x < i; x++){
|
|
1054
1229
|
let c1 = table[x][j - 1];
|
|
1055
|
-
let c2 = table[
|
|
1230
|
+
let c2 = table[i][0] - table[x][0];
|
|
1056
1231
|
let cost = Math.max(c1, c2);
|
|
1057
1232
|
if (!x || cost < currentMin) {
|
|
1058
1233
|
currentMin = cost;
|
|
1059
1234
|
minX = x;
|
|
1060
1235
|
}
|
|
1061
1236
|
}
|
|
1062
|
-
table[
|
|
1063
|
-
solution[
|
|
1237
|
+
table[i][j] = currentMin;
|
|
1238
|
+
solution[i - 1][j - 1] = minX;
|
|
1064
1239
|
}
|
|
1065
1240
|
n = n - 1;
|
|
1066
1241
|
k = k - 2;
|
|
@@ -1075,54 +1250,62 @@ function $5bf28b6236de0f59$var$linearPartition(seq, k) {
|
|
|
1075
1250
|
k--;
|
|
1076
1251
|
}
|
|
1077
1252
|
let row = [];
|
|
1078
|
-
for(let
|
|
1253
|
+
for(let i = 0; i < n + 1; i++)row.push(seq[i]);
|
|
1079
1254
|
result.unshift(row);
|
|
1080
1255
|
return result;
|
|
1081
1256
|
}
|
|
1082
1257
|
|
|
1083
1258
|
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1259
|
+
/*
|
|
1260
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
1261
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1262
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1263
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1264
|
+
*
|
|
1265
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1266
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1267
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1268
|
+
* governing permissions and limitations under the License.
|
|
1269
|
+
*/
|
|
1087
1270
|
|
|
1088
1271
|
|
|
1089
|
-
const $
|
|
1272
|
+
const $71b727f94b595b1a$var$DEFAULT_OPTIONS = {
|
|
1090
1273
|
S: {
|
|
1091
1274
|
itemPadding: 20,
|
|
1092
1275
|
minItemSize: {
|
|
1093
|
-
|
|
1276
|
+
"vertical": new (0, $jpY3B$reactstatelyvirtualizer.Size)(96, 96)
|
|
1094
1277
|
},
|
|
1095
|
-
maxItemSize: new $
|
|
1278
|
+
maxItemSize: new (0, $jpY3B$reactstatelyvirtualizer.Size)(Infinity, Infinity),
|
|
1096
1279
|
margin: 8,
|
|
1097
|
-
minSpace: new $
|
|
1280
|
+
minSpace: new (0, $jpY3B$reactstatelyvirtualizer.Size)(6, 6),
|
|
1098
1281
|
maxColumns: Infinity,
|
|
1099
1282
|
dropSpacing: 50
|
|
1100
1283
|
},
|
|
1101
1284
|
L: {
|
|
1102
1285
|
itemPadding: {
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1286
|
+
"vertical": {
|
|
1287
|
+
"medium": 78,
|
|
1288
|
+
"large": 98
|
|
1106
1289
|
},
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1290
|
+
"horizontal": {
|
|
1291
|
+
"medium": 150,
|
|
1292
|
+
"large": 170
|
|
1110
1293
|
}
|
|
1111
1294
|
},
|
|
1112
1295
|
minItemSize: {
|
|
1113
|
-
|
|
1114
|
-
|
|
1296
|
+
"vertical": new (0, $jpY3B$reactstatelyvirtualizer.Size)(208, 208),
|
|
1297
|
+
"horizontal": new (0, $jpY3B$reactstatelyvirtualizer.Size)(102, 102)
|
|
1115
1298
|
},
|
|
1116
|
-
maxItemSize: new $
|
|
1299
|
+
maxItemSize: new (0, $jpY3B$reactstatelyvirtualizer.Size)(Infinity, Infinity),
|
|
1117
1300
|
margin: 24,
|
|
1118
|
-
minSpace: new $
|
|
1301
|
+
minSpace: new (0, $jpY3B$reactstatelyvirtualizer.Size)(18, 18),
|
|
1119
1302
|
maxColumns: Infinity,
|
|
1120
1303
|
dropSpacing: 100
|
|
1121
1304
|
}
|
|
1122
1305
|
};
|
|
1123
|
-
class $
|
|
1306
|
+
class $71b727f94b595b1a$export$7d2b12578154a735 extends (0, $5ee605f09afaa4de$export$64943d2e59d72a29) {
|
|
1124
1307
|
get layoutType() {
|
|
1125
|
-
return
|
|
1308
|
+
return "grid";
|
|
1126
1309
|
}
|
|
1127
1310
|
getIndexAtPoint(x, y, allowInsertingAtEnd = false) {
|
|
1128
1311
|
let itemHeight = this.itemSize.height + this.minSpace.height;
|
|
@@ -1148,7 +1331,7 @@ class $fdeb61baab0a7b8f$export$7d2b12578154a735 extends $22665c819b87f5f9$export
|
|
|
1148
1331
|
if (layoutInfo && this.isVisible(layoutInfo, rect)) res.push(layoutInfo);
|
|
1149
1332
|
}
|
|
1150
1333
|
// Check if loader is in view and add to res if so
|
|
1151
|
-
let loader = this.layoutInfos.get(
|
|
1334
|
+
let loader = this.layoutInfos.get("loader");
|
|
1152
1335
|
if (loader && this.isVisible(loader, rect)) res.push(loader);
|
|
1153
1336
|
}
|
|
1154
1337
|
return res;
|
|
@@ -1156,8 +1339,8 @@ class $fdeb61baab0a7b8f$export$7d2b12578154a735 extends $22665c819b87f5f9$export
|
|
|
1156
1339
|
buildCollection() {
|
|
1157
1340
|
let visibleWidth = this.virtualizer.visibleRect.width;
|
|
1158
1341
|
let visibleHeight = this.virtualizer.visibleRect.height;
|
|
1159
|
-
let horizontalItemPadding = this.cardOrientation ===
|
|
1160
|
-
let verticalItemPadding = this.cardOrientation ===
|
|
1342
|
+
let horizontalItemPadding = this.cardOrientation === "horizontal" ? this.itemPadding : 0;
|
|
1343
|
+
let verticalItemPadding = this.cardOrientation === "vertical" ? this.itemPadding : 0;
|
|
1161
1344
|
let minCardWidth = this.minItemSize.width + horizontalItemPadding;
|
|
1162
1345
|
// Compute the number of rows and columns needed to display the content
|
|
1163
1346
|
let availableWidth = visibleWidth - this.margin * 2;
|
|
@@ -1173,7 +1356,7 @@ class $fdeb61baab0a7b8f$export$7d2b12578154a735 extends $22665c819b87f5f9$export
|
|
|
1173
1356
|
let t = (itemWidth - minCardWidth) / minCardWidth;
|
|
1174
1357
|
let itemHeight = Math.floor(this.minItemSize.height + this.minItemSize.height * t);
|
|
1175
1358
|
itemHeight = Math.max(this.minItemSize.height, Math.min(this.maxItemSize.height, itemHeight)) + verticalItemPadding;
|
|
1176
|
-
this.itemSize = new $
|
|
1359
|
+
this.itemSize = new (0, $jpY3B$reactstatelyvirtualizer.Size)(itemWidth, itemHeight);
|
|
1177
1360
|
// Compute the horizontal spacing and content height
|
|
1178
1361
|
this.horizontalSpacing = this.numColumns < 2 ? 0 : Math.floor((availableWidth - this.numColumns * this.itemSize.width) / (this.numColumns - 1));
|
|
1179
1362
|
let y = this.margin;
|
|
@@ -1192,27 +1375,27 @@ class $fdeb61baab0a7b8f$export$7d2b12578154a735 extends $22665c819b87f5f9$export
|
|
|
1192
1375
|
loaderY = 0;
|
|
1193
1376
|
loaderHeight = visibleHeight || 60;
|
|
1194
1377
|
}
|
|
1195
|
-
let rect = new $
|
|
1196
|
-
let loader = new $
|
|
1197
|
-
this.layoutInfos.set(
|
|
1378
|
+
let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(0, loaderY, visibleWidth, loaderHeight);
|
|
1379
|
+
let loader = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)("loader", "loader", rect);
|
|
1380
|
+
this.layoutInfos.set("loader", loader);
|
|
1198
1381
|
y = loader.rect.maxY;
|
|
1199
1382
|
}
|
|
1200
1383
|
if (this.collection.size === 0 && !this.isLoading) {
|
|
1201
|
-
let rect = new $
|
|
1202
|
-
let placeholder = new $
|
|
1203
|
-
this.layoutInfos.set(
|
|
1384
|
+
let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(0, 0, visibleWidth, visibleHeight);
|
|
1385
|
+
let placeholder = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)("placeholder", "placeholder", rect);
|
|
1386
|
+
this.layoutInfos.set("placeholder", placeholder);
|
|
1204
1387
|
y = placeholder.rect.maxY;
|
|
1205
1388
|
}
|
|
1206
|
-
this.contentSize = new $
|
|
1389
|
+
this.contentSize = new (0, $jpY3B$reactstatelyvirtualizer.Size)(visibleWidth, y);
|
|
1207
1390
|
}
|
|
1208
1391
|
buildChild(node, y, index) {
|
|
1209
1392
|
let row = Math.floor(index / this.numColumns);
|
|
1210
1393
|
let column = index % this.numColumns;
|
|
1211
1394
|
let x = this.margin + column * (this.itemSize.width + this.horizontalSpacing);
|
|
1212
1395
|
y = this.margin + row * (this.itemSize.height + this.minSpace.height);
|
|
1213
|
-
let rect = new $
|
|
1396
|
+
let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(x, y, this.itemSize.width, this.itemSize.height);
|
|
1214
1397
|
// TODO: Perhaps have it so that the child key for each row is stored with the layoutInfo?
|
|
1215
|
-
let layoutInfo = new $
|
|
1398
|
+
let layoutInfo = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)(node.type, node.key, rect);
|
|
1216
1399
|
layoutInfo.allowOverflow = true;
|
|
1217
1400
|
this.layoutInfos.set(node.key, layoutInfo);
|
|
1218
1401
|
return layoutInfo;
|
|
@@ -1221,38 +1404,37 @@ class $fdeb61baab0a7b8f$export$7d2b12578154a735 extends $22665c819b87f5f9$export
|
|
|
1221
1404
|
// then return the key that occupies the row + column below. This can be done by figuring out how many cards exist per column then dividing the
|
|
1222
1405
|
// collection contents by that number (which will give us the row distribution)
|
|
1223
1406
|
getKeyBelow(key) {
|
|
1224
|
-
var
|
|
1407
|
+
var _getFirstItem;
|
|
1225
1408
|
// Expected key is the currently focused cell so we need the parent row key
|
|
1226
1409
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
1227
1410
|
let indexRowBelow;
|
|
1228
|
-
let index = this.collection.rows.findIndex((card)=>card.key === parentRowKey
|
|
1229
|
-
);
|
|
1411
|
+
let index = this.collection.rows.findIndex((card)=>card.key === parentRowKey);
|
|
1230
1412
|
if (index !== -1) indexRowBelow = index + this.numColumns;
|
|
1231
1413
|
else return null;
|
|
1232
|
-
|
|
1414
|
+
let row = this.collection.rows[indexRowBelow];
|
|
1415
|
+
return row ? (_getFirstItem = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(row, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key : null;
|
|
1233
1416
|
}
|
|
1234
1417
|
getKeyAbove(key) {
|
|
1235
|
-
var
|
|
1418
|
+
var _getFirstItem;
|
|
1236
1419
|
// Expected key is the currently focused cell so we need the parent row key
|
|
1237
1420
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
1238
1421
|
let indexRowAbove;
|
|
1239
|
-
let index = this.collection.rows.findIndex((card)=>card.key === parentRowKey
|
|
1240
|
-
);
|
|
1422
|
+
let index = this.collection.rows.findIndex((card)=>card.key === parentRowKey);
|
|
1241
1423
|
if (index !== -1) indexRowAbove = index - this.numColumns;
|
|
1242
1424
|
else return null;
|
|
1243
|
-
|
|
1425
|
+
let row = this.collection.rows[indexRowAbove];
|
|
1426
|
+
return row ? (_getFirstItem = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(row, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key : null;
|
|
1244
1427
|
}
|
|
1245
|
-
constructor(options = {
|
|
1246
|
-
}){
|
|
1428
|
+
constructor(options = {}){
|
|
1247
1429
|
super(options);
|
|
1248
|
-
let cardSize =
|
|
1249
|
-
this.cardOrientation = options.cardOrientation ||
|
|
1250
|
-
this.minItemSize = options.minItemSize || $
|
|
1251
|
-
this.maxItemSize = options.maxItemSize || $
|
|
1252
|
-
this.margin = options.margin != null ? options.margin : $
|
|
1253
|
-
this.minSpace = options.minSpace || $
|
|
1254
|
-
this.maxColumns = options.maxColumns || $
|
|
1255
|
-
this.itemPadding = options.itemPadding != null ? options.itemPadding : $
|
|
1430
|
+
let cardSize = "L";
|
|
1431
|
+
this.cardOrientation = options.cardOrientation || "vertical";
|
|
1432
|
+
this.minItemSize = options.minItemSize || $71b727f94b595b1a$var$DEFAULT_OPTIONS[cardSize].minItemSize[this.cardOrientation];
|
|
1433
|
+
this.maxItemSize = options.maxItemSize || $71b727f94b595b1a$var$DEFAULT_OPTIONS[cardSize].maxItemSize;
|
|
1434
|
+
this.margin = options.margin != null ? options.margin : $71b727f94b595b1a$var$DEFAULT_OPTIONS[cardSize].margin;
|
|
1435
|
+
this.minSpace = options.minSpace || $71b727f94b595b1a$var$DEFAULT_OPTIONS[cardSize].minSpace;
|
|
1436
|
+
this.maxColumns = options.maxColumns || $71b727f94b595b1a$var$DEFAULT_OPTIONS[cardSize].maxColumns;
|
|
1437
|
+
this.itemPadding = options.itemPadding != null ? options.itemPadding : $71b727f94b595b1a$var$DEFAULT_OPTIONS[cardSize].itemPadding[this.cardOrientation][this.scale];
|
|
1256
1438
|
this.itemSize = null;
|
|
1257
1439
|
this.numColumns = 0;
|
|
1258
1440
|
this.numRows = 0;
|
|
@@ -1261,14 +1443,22 @@ class $fdeb61baab0a7b8f$export$7d2b12578154a735 extends $22665c819b87f5f9$export
|
|
|
1261
1443
|
}
|
|
1262
1444
|
|
|
1263
1445
|
|
|
1264
|
-
|
|
1446
|
+
/*
|
|
1447
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
1448
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1449
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1450
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1451
|
+
*
|
|
1452
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1453
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1454
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1455
|
+
* governing permissions and limitations under the License.
|
|
1456
|
+
*/
|
|
1265
1457
|
|
|
1266
|
-
$parcel$export($35615160fbc17b4b$exports, "WaterfallLayout", () => $35615160fbc17b4b$export$e9f7cda058ba8df8);
|
|
1267
1458
|
|
|
1268
|
-
|
|
1269
|
-
class $35615160fbc17b4b$export$e9f7cda058ba8df8 extends $22665c819b87f5f9$export$64943d2e59d72a29 {
|
|
1459
|
+
class $632abf8fbf0ad57b$export$e9f7cda058ba8df8 extends (0, $5ee605f09afaa4de$export$64943d2e59d72a29) {
|
|
1270
1460
|
get layoutType() {
|
|
1271
|
-
return
|
|
1461
|
+
return "waterfall";
|
|
1272
1462
|
}
|
|
1273
1463
|
buildCollection(invalidationContext) {
|
|
1274
1464
|
// Compute the number of columns needed to display the content
|
|
@@ -1308,8 +1498,8 @@ class $35615160fbc17b4b$export$e9f7cda058ba8df8 extends $22665c819b87f5f9$export
|
|
|
1308
1498
|
let column = this.getNextColumnIndex(columnHeights);
|
|
1309
1499
|
let x = this.margin + column * (itemWidth + horizontalSpacing);
|
|
1310
1500
|
let y = columnHeights[column];
|
|
1311
|
-
let rect = new $
|
|
1312
|
-
let layoutInfo = new $
|
|
1501
|
+
let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(x, y, itemWidth, height);
|
|
1502
|
+
let layoutInfo = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)(node.type, key, rect);
|
|
1313
1503
|
layoutInfo.estimatedSize = estimatedSize;
|
|
1314
1504
|
layoutInfo.allowOverflow = true;
|
|
1315
1505
|
this.layoutInfos.set(key, layoutInfo);
|
|
@@ -1333,18 +1523,18 @@ class $35615160fbc17b4b$export$e9f7cda058ba8df8 extends $22665c819b87f5f9$export
|
|
|
1333
1523
|
loaderY = 0;
|
|
1334
1524
|
loaderHeight = this.virtualizer.visibleRect.height || 60;
|
|
1335
1525
|
}
|
|
1336
|
-
let rect = new $
|
|
1337
|
-
let loader = new $
|
|
1338
|
-
this.layoutInfos.set(
|
|
1526
|
+
let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(0, loaderY, this.virtualizer.visibleRect.width, loaderHeight);
|
|
1527
|
+
let loader = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)("loader", "loader", rect);
|
|
1528
|
+
this.layoutInfos.set("loader", loader);
|
|
1339
1529
|
y = loader.rect.maxY;
|
|
1340
1530
|
}
|
|
1341
1531
|
if (this.collection.size === 0 && !this.isLoading) {
|
|
1342
|
-
let rect = new $
|
|
1343
|
-
let placeholder = new $
|
|
1344
|
-
this.layoutInfos.set(
|
|
1532
|
+
let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(0, 0, this.virtualizer.visibleRect.width, this.virtualizer.visibleRect.height);
|
|
1533
|
+
let placeholder = new (0, $jpY3B$reactstatelyvirtualizer.LayoutInfo)("placeholder", "placeholder", rect);
|
|
1534
|
+
this.layoutInfos.set("placeholder", placeholder);
|
|
1345
1535
|
y = placeholder.rect.maxY;
|
|
1346
1536
|
}
|
|
1347
|
-
this.contentSize = new $
|
|
1537
|
+
this.contentSize = new (0, $jpY3B$reactstatelyvirtualizer.Size)(this.virtualizer.visibleRect.width, y);
|
|
1348
1538
|
}
|
|
1349
1539
|
updateItemSize(key, size) {
|
|
1350
1540
|
let layoutInfo = this.layoutInfos.get(key);
|
|
@@ -1366,53 +1556,54 @@ class $35615160fbc17b4b$export$e9f7cda058ba8df8 extends $22665c819b87f5f9$export
|
|
|
1366
1556
|
return minIndex;
|
|
1367
1557
|
}
|
|
1368
1558
|
getClosestRight(key) {
|
|
1369
|
-
var
|
|
1559
|
+
var _this__findClosest, _getFirstItem;
|
|
1370
1560
|
let layoutInfo = this.getLayoutInfo(key);
|
|
1371
1561
|
// Refactored from v2. Current strategy is to find the closest card in the adjacent column.
|
|
1372
1562
|
// This prevent the issue where it was possible that the closest layoutInfo would be two columns over due to the middle card being exceptionally tall
|
|
1373
1563
|
// and thus the top corner to top corner distance was massive.
|
|
1374
1564
|
// First look for a card to the immediate right of the current card. If we can't find any, look for the nearest card in the entire column to the right of the card
|
|
1375
|
-
let rect = new $
|
|
1376
|
-
key = (
|
|
1565
|
+
let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.maxX + 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);
|
|
1566
|
+
key = (_this__findClosest = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest === void 0 ? void 0 : _this__findClosest.key;
|
|
1377
1567
|
if (!key) {
|
|
1378
|
-
var
|
|
1379
|
-
rect = new $
|
|
1380
|
-
key = (
|
|
1568
|
+
var _this__findClosest1;
|
|
1569
|
+
rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.maxX + 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
|
|
1570
|
+
key = (_this__findClosest1 = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest1 === void 0 ? void 0 : _this__findClosest1.key;
|
|
1381
1571
|
}
|
|
1382
|
-
|
|
1572
|
+
let item = this.collection.getItem(key);
|
|
1573
|
+
return (_getFirstItem = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
|
|
1383
1574
|
}
|
|
1384
1575
|
getClosestLeft(key) {
|
|
1385
|
-
var
|
|
1576
|
+
var _this__findClosest, _getFirstItem;
|
|
1386
1577
|
let layoutInfo = this.getLayoutInfo(key);
|
|
1387
1578
|
// First look for a card to the immediate left of the current card. If we can't find any, look for the nearest card in the entire column to the left of the card
|
|
1388
|
-
let rect = new $
|
|
1389
|
-
key = (
|
|
1579
|
+
let rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);
|
|
1580
|
+
key = (_this__findClosest = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest === void 0 ? void 0 : _this__findClosest.key;
|
|
1390
1581
|
if (!key) {
|
|
1391
|
-
var
|
|
1392
|
-
rect = new $
|
|
1393
|
-
key = (
|
|
1582
|
+
var _this__findClosest1;
|
|
1583
|
+
rect = new (0, $jpY3B$reactstatelyvirtualizer.Rect)(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
|
|
1584
|
+
key = (_this__findClosest1 = this._findClosest(layoutInfo.rect, rect)) === null || _this__findClosest1 === void 0 ? void 0 : _this__findClosest1.key;
|
|
1394
1585
|
}
|
|
1395
|
-
|
|
1586
|
+
let item = this.collection.getItem(key);
|
|
1587
|
+
return (_getFirstItem = (0, $jpY3B$reactstatelycollections.getFirstItem)((0, $jpY3B$reactstatelycollections.getChildNodes)(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key;
|
|
1396
1588
|
}
|
|
1397
1589
|
getKeyRightOf(key) {
|
|
1398
1590
|
// Expected key is the currently focused cell so we need the parent row key
|
|
1399
1591
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
1400
|
-
return this.direction ===
|
|
1592
|
+
return this.direction === "rtl" ? this.getClosestLeft(parentRowKey) : this.getClosestRight(parentRowKey);
|
|
1401
1593
|
}
|
|
1402
1594
|
getKeyLeftOf(key) {
|
|
1403
1595
|
// Expected key is the currently focused cell so we need the parent row key
|
|
1404
1596
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
1405
|
-
return this.direction ===
|
|
1597
|
+
return this.direction === "rtl" ? this.getClosestRight(parentRowKey) : this.getClosestLeft(parentRowKey);
|
|
1406
1598
|
}
|
|
1407
|
-
constructor(options = {
|
|
1408
|
-
}){
|
|
1599
|
+
constructor(options = {}){
|
|
1409
1600
|
// TODO: WaterfallLayout doesn't use card size in v2, but perhaps it should support it? Perhaps it would modify
|
|
1410
1601
|
// minItemSize defaults or other things
|
|
1411
1602
|
super(options);
|
|
1412
|
-
this.minItemSize = options.minItemSize || new $
|
|
1413
|
-
this.maxItemSize = options.maxItemSize || new $
|
|
1603
|
+
this.minItemSize = options.minItemSize || new (0, $jpY3B$reactstatelyvirtualizer.Size)(240, 136);
|
|
1604
|
+
this.maxItemSize = options.maxItemSize || new (0, $jpY3B$reactstatelyvirtualizer.Size)(Infinity, Infinity);
|
|
1414
1605
|
this.margin = options.margin != null ? options.margin : 24;
|
|
1415
|
-
this.minSpace = options.minSpace || new $
|
|
1606
|
+
this.minSpace = options.minSpace || new (0, $jpY3B$reactstatelyvirtualizer.Size)(18, 18);
|
|
1416
1607
|
this.maxColumns = options.maxColumns || Infinity;
|
|
1417
1608
|
this.itemWidth = 0;
|
|
1418
1609
|
this.numColumns = 0;
|
|
@@ -1422,40 +1613,42 @@ class $35615160fbc17b4b$export$e9f7cda058ba8df8 extends $22665c819b87f5f9$export
|
|
|
1422
1613
|
}
|
|
1423
1614
|
|
|
1424
1615
|
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1616
|
+
/*
|
|
1617
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
1618
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
1619
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
1620
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
1621
|
+
*
|
|
1622
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
1623
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
1624
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
1625
|
+
* governing permissions and limitations under the License.
|
|
1626
|
+
*/
|
|
1428
1627
|
|
|
1429
1628
|
|
|
1430
|
-
|
|
1431
|
-
let
|
|
1432
|
-
let context = $89771f27f8f654bb$export$fea0b38586ec8f13();
|
|
1629
|
+
let $6b630ac4b78ba7f3$var$Card = /*#__PURE__*/ (0, $jpY3B$react.forwardRef)((props, ref)=>{
|
|
1630
|
+
let context = (0, $e57ab98cef2f01a5$export$fea0b38586ec8f13)();
|
|
1433
1631
|
if (context !== null) return null;
|
|
1434
|
-
else return
|
|
1632
|
+
else return /*#__PURE__*/ (0, ($parcel$interopDefault($jpY3B$react))).createElement((0, $7888205ff7de382f$export$7a6ccaf429ad93a8), {
|
|
1435
1633
|
...props,
|
|
1436
1634
|
ref: ref
|
|
1437
|
-
})
|
|
1635
|
+
});
|
|
1438
1636
|
});
|
|
1439
1637
|
// @ts-ignore
|
|
1440
|
-
$
|
|
1441
|
-
let { children: children
|
|
1638
|
+
$6b630ac4b78ba7f3$var$Card.getCollectionNode = function* getCollectionNode(props) {
|
|
1639
|
+
let { children: children, textValue: textValue } = props;
|
|
1442
1640
|
yield {
|
|
1443
|
-
type:
|
|
1641
|
+
type: "item",
|
|
1444
1642
|
props: props,
|
|
1445
1643
|
rendered: children,
|
|
1446
|
-
|
|
1644
|
+
"aria-label": props["aria-label"],
|
|
1447
1645
|
hasChildNodes: false,
|
|
1448
1646
|
textValue: textValue
|
|
1449
1647
|
};
|
|
1450
1648
|
};
|
|
1451
|
-
let $
|
|
1649
|
+
let $6b630ac4b78ba7f3$export$60332b2344f7fe41 = $6b630ac4b78ba7f3$var$Card;
|
|
1452
1650
|
|
|
1453
1651
|
|
|
1454
|
-
$parcel$exportWildcard(module.exports, $434cfc518fa31831$exports);
|
|
1455
|
-
$parcel$exportWildcard(module.exports, $5bf28b6236de0f59$exports);
|
|
1456
|
-
$parcel$exportWildcard(module.exports, $fdeb61baab0a7b8f$exports);
|
|
1457
|
-
$parcel$exportWildcard(module.exports, $35615160fbc17b4b$exports);
|
|
1458
|
-
$parcel$exportWildcard(module.exports, $0582956eda9cee76$exports);
|
|
1459
1652
|
|
|
1460
1653
|
|
|
1461
1654
|
//# sourceMappingURL=main.js.map
|