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