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