@react-spectrum/card 3.0.0-alpha.2 → 3.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +454 -441
- package/dist/main.js.map +1 -1
- package/dist/module.js +450 -437
- package/dist/module.js.map +1 -1
- package/package.json +21 -21
package/dist/module.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import "./main.css";
|
|
2
|
-
import {useStyleProps as $
|
|
3
|
-
import {GridCollection as $
|
|
4
|
-
import {ProgressCircle as $
|
|
5
|
-
import $
|
|
6
|
-
import {useCollator as $
|
|
7
|
-
import {useGrid as $
|
|
8
|
-
import {useListState as $
|
|
9
|
-
import {useProvider as $
|
|
10
|
-
import {VirtualizerItem as $
|
|
11
|
-
import {Checkbox as $
|
|
12
|
-
import {useResizeObserver as $
|
|
13
|
-
import {getFocusableTreeWalker as $
|
|
14
|
-
import {useHover as $
|
|
15
|
-
import {Size as $
|
|
2
|
+
import {useStyleProps as $jxYob$useStyleProps, useDOMRef as $jxYob$useDOMRef, classNames as $jxYob$classNames, useUnwrapDOMRef as $jxYob$useUnwrapDOMRef, useHasChild as $jxYob$useHasChild, SlotProvider as $jxYob$SlotProvider} from "@react-spectrum/utils";
|
|
3
|
+
import {GridCollection as $jxYob$GridCollection, useGridState as $jxYob$useGridState} from "@react-stately/grid";
|
|
4
|
+
import {ProgressCircle as $jxYob$ProgressCircle} from "@react-spectrum/progress";
|
|
5
|
+
import $jxYob$react, {useMemo as $jxYob$useMemo, useCallback as $jxYob$useCallback, useRef as $jxYob$useRef, useState as $jxYob$useState, useContext as $jxYob$useContext, forwardRef as $jxYob$forwardRef} from "react";
|
|
6
|
+
import {useCollator as $jxYob$useCollator, useMessageFormatter as $jxYob$useMessageFormatter, useLocale as $jxYob$useLocale} from "@react-aria/i18n";
|
|
7
|
+
import {useGrid as $jxYob$useGrid, useGridRow as $jxYob$useGridRow, useGridCell as $jxYob$useGridCell} from "@react-aria/grid";
|
|
8
|
+
import {useListState as $jxYob$useListState} from "@react-stately/list";
|
|
9
|
+
import {useProvider as $jxYob$useProvider, useProviderProps as $jxYob$useProviderProps} from "@react-spectrum/provider";
|
|
10
|
+
import {VirtualizerItem as $jxYob$VirtualizerItem, Virtualizer as $jxYob$Virtualizer} from "@react-aria/virtualizer";
|
|
11
|
+
import {Checkbox as $jxYob$Checkbox} from "@react-spectrum/checkbox";
|
|
12
|
+
import {useResizeObserver as $jxYob$useResizeObserver, useLayoutEffect as $jxYob$useLayoutEffect, mergeProps as $jxYob$mergeProps, filterDOMProps as $jxYob$filterDOMProps, useSlotId as $jxYob$useSlotId} from "@react-aria/utils";
|
|
13
|
+
import {getFocusableTreeWalker as $jxYob$getFocusableTreeWalker, FocusRing as $jxYob$FocusRing} from "@react-aria/focus";
|
|
14
|
+
import {useHover as $jxYob$useHover, useFocusWithin as $jxYob$useFocusWithin} from "@react-aria/interactions";
|
|
15
|
+
import {Size as $jxYob$Size, Rect as $jxYob$Rect, LayoutInfo as $jxYob$LayoutInfo, Layout as $jxYob$Layout} from "@react-stately/virtualizer";
|
|
16
16
|
|
|
17
17
|
function $parcel$interopDefault(a) {
|
|
18
18
|
return a && a.__esModule ? a.default : a;
|
|
@@ -20,143 +20,144 @@ function $parcel$interopDefault(a) {
|
|
|
20
20
|
function $parcel$export(e, n, v, s) {
|
|
21
21
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
22
22
|
}
|
|
23
|
-
var $
|
|
24
|
-
|
|
25
|
-
$parcel$export($
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var $
|
|
33
|
-
|
|
34
|
-
$parcel$export($
|
|
35
|
-
$parcel$export($
|
|
36
|
-
$parcel$export($
|
|
37
|
-
$parcel$export($
|
|
38
|
-
$parcel$export($
|
|
39
|
-
$parcel$export($
|
|
40
|
-
$parcel$export($
|
|
41
|
-
$parcel$export($
|
|
42
|
-
$parcel$export($
|
|
43
|
-
$parcel$export($
|
|
44
|
-
$parcel$export($
|
|
45
|
-
$parcel$export($
|
|
46
|
-
$parcel$export($
|
|
47
|
-
$parcel$export($
|
|
48
|
-
$parcel$export($
|
|
49
|
-
$parcel$export($
|
|
50
|
-
$parcel$export($
|
|
51
|
-
$parcel$export($
|
|
52
|
-
$parcel$export($
|
|
53
|
-
$parcel$export($
|
|
54
|
-
$parcel$export($
|
|
55
|
-
$parcel$export($
|
|
56
|
-
$parcel$export($
|
|
57
|
-
$parcel$export($
|
|
58
|
-
$parcel$export($
|
|
59
|
-
$parcel$export($
|
|
60
|
-
$parcel$export($
|
|
61
|
-
var $
|
|
62
|
-
var $
|
|
63
|
-
var $
|
|
64
|
-
var $
|
|
65
|
-
var $
|
|
66
|
-
var $
|
|
67
|
-
var $
|
|
68
|
-
var $
|
|
69
|
-
var $
|
|
70
|
-
var $
|
|
71
|
-
var $
|
|
72
|
-
var $
|
|
73
|
-
var $
|
|
74
|
-
var $
|
|
75
|
-
var $
|
|
76
|
-
var $
|
|
77
|
-
var $
|
|
78
|
-
var $
|
|
79
|
-
var $
|
|
80
|
-
var $
|
|
81
|
-
var $
|
|
82
|
-
var $
|
|
83
|
-
var $
|
|
84
|
-
var $
|
|
85
|
-
var $
|
|
86
|
-
var $
|
|
87
|
-
var $
|
|
88
|
-
$
|
|
89
|
-
$
|
|
90
|
-
$
|
|
91
|
-
$
|
|
92
|
-
$
|
|
93
|
-
$
|
|
94
|
-
$
|
|
95
|
-
$
|
|
96
|
-
$
|
|
97
|
-
$
|
|
98
|
-
$
|
|
99
|
-
$
|
|
100
|
-
$
|
|
101
|
-
$
|
|
102
|
-
$
|
|
103
|
-
$
|
|
104
|
-
$
|
|
105
|
-
$
|
|
106
|
-
$
|
|
107
|
-
$
|
|
108
|
-
$
|
|
109
|
-
$
|
|
110
|
-
$
|
|
111
|
-
$
|
|
112
|
-
$
|
|
113
|
-
$
|
|
114
|
-
$
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const $
|
|
119
|
-
function $
|
|
120
|
-
return $
|
|
23
|
+
var $388bc726678ad587$exports = {};
|
|
24
|
+
|
|
25
|
+
$parcel$export($388bc726678ad587$exports, "CardView", () => $388bc726678ad587$export$7e52c821f7b6f422);
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
var $e5e7805cd2439715$exports = {};
|
|
33
|
+
|
|
34
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card", () => $e5e7805cd2439715$export$4e5e9f191b1edb8, (v) => $e5e7805cd2439715$export$4e5e9f191b1edb8 = v);
|
|
35
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card-heading", () => $e5e7805cd2439715$export$92758a4a0e8d19e4, (v) => $e5e7805cd2439715$export$92758a4a0e8d19e4 = v);
|
|
36
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card-checkboxWrapper", () => $e5e7805cd2439715$export$33977546b63e0df9, (v) => $e5e7805cd2439715$export$33977546b63e0df9 = v);
|
|
37
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card-checkbox", () => $e5e7805cd2439715$export$842da5d48b8f6db2, (v) => $e5e7805cd2439715$export$842da5d48b8f6db2 = v);
|
|
38
|
+
$parcel$export($e5e7805cd2439715$exports, "is-selected", () => $e5e7805cd2439715$export$1e0fb04f31d3c22a, (v) => $e5e7805cd2439715$export$1e0fb04f31d3c22a = v);
|
|
39
|
+
$parcel$export($e5e7805cd2439715$exports, "focus-ring", () => $e5e7805cd2439715$export$f39a09f249340e2a, (v) => $e5e7805cd2439715$export$f39a09f249340e2a = v);
|
|
40
|
+
$parcel$export($e5e7805cd2439715$exports, "is-hovered", () => $e5e7805cd2439715$export$b8813cd5d7824ce7, (v) => $e5e7805cd2439715$export$b8813cd5d7824ce7 = v);
|
|
41
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card-grid", () => $e5e7805cd2439715$export$b3dd760d2dfde29e, (v) => $e5e7805cd2439715$export$b3dd760d2dfde29e = v);
|
|
42
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card-decoration", () => $e5e7805cd2439715$export$48252dc130b62514, (v) => $e5e7805cd2439715$export$48252dc130b62514 = v);
|
|
43
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card-image", () => $e5e7805cd2439715$export$8d5fea71dc66db80, (v) => $e5e7805cd2439715$export$8d5fea71dc66db80 = v);
|
|
44
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card-illustration", () => $e5e7805cd2439715$export$13dd3510ae7a8399, (v) => $e5e7805cd2439715$export$13dd3510ae7a8399 = v);
|
|
45
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card-avatar", () => $e5e7805cd2439715$export$159930c59efb6273, (v) => $e5e7805cd2439715$export$159930c59efb6273 = v);
|
|
46
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card-detail", () => $e5e7805cd2439715$export$16715af38fbd9819, (v) => $e5e7805cd2439715$export$16715af38fbd9819 = v);
|
|
47
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card-content", () => $e5e7805cd2439715$export$d946625b97e8aa17, (v) => $e5e7805cd2439715$export$d946625b97e8aa17 = v);
|
|
48
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card--waterfall", () => $e5e7805cd2439715$export$d9c7209e0e4f7e4d, (v) => $e5e7805cd2439715$export$d9c7209e0e4f7e4d = v);
|
|
49
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card--default", () => $e5e7805cd2439715$export$c7a022df9e10a238, (v) => $e5e7805cd2439715$export$c7a022df9e10a238 = v);
|
|
50
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card--noPreview", () => $e5e7805cd2439715$export$b77922bc0320c9e4, (v) => $e5e7805cd2439715$export$b77922bc0320c9e4 = v);
|
|
51
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card--grid", () => $e5e7805cd2439715$export$59739ab951d2dcc7, (v) => $e5e7805cd2439715$export$59739ab951d2dcc7 = v);
|
|
52
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card--noLayout", () => $e5e7805cd2439715$export$a03d836e6ef3e749, (v) => $e5e7805cd2439715$export$a03d836e6ef3e749 = v);
|
|
53
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card--isQuiet", () => $e5e7805cd2439715$export$92ad04b5ac9296ea, (v) => $e5e7805cd2439715$export$92ad04b5ac9296ea = v);
|
|
54
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card--gallery", () => $e5e7805cd2439715$export$ccd8ffc36bd10cc, (v) => $e5e7805cd2439715$export$ccd8ffc36bd10cc = v);
|
|
55
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-Card--horizontal", () => $e5e7805cd2439715$export$1c52334407225704, (v) => $e5e7805cd2439715$export$1c52334407225704 = v);
|
|
56
|
+
$parcel$export($e5e7805cd2439715$exports, "is-focused", () => $e5e7805cd2439715$export$e7dc768d35940237, (v) => $e5e7805cd2439715$export$e7dc768d35940237 = v);
|
|
57
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-CardView", () => $e5e7805cd2439715$export$2f34e9e3e0b89d95, (v) => $e5e7805cd2439715$export$2f34e9e3e0b89d95 = v);
|
|
58
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-CardView-centeredWrapper", () => $e5e7805cd2439715$export$7fc89689fcfab196, (v) => $e5e7805cd2439715$export$7fc89689fcfab196 = v);
|
|
59
|
+
$parcel$export($e5e7805cd2439715$exports, "spectrum-CardView-row", () => $e5e7805cd2439715$export$4746ac09daa215ae, (v) => $e5e7805cd2439715$export$4746ac09daa215ae = v);
|
|
60
|
+
$parcel$export($e5e7805cd2439715$exports, "is-drop-target", () => $e5e7805cd2439715$export$d8467f38d2d00bd0, (v) => $e5e7805cd2439715$export$d8467f38d2d00bd0 = v);
|
|
61
|
+
var $e5e7805cd2439715$export$4e5e9f191b1edb8;
|
|
62
|
+
var $e5e7805cd2439715$export$92758a4a0e8d19e4;
|
|
63
|
+
var $e5e7805cd2439715$export$33977546b63e0df9;
|
|
64
|
+
var $e5e7805cd2439715$export$842da5d48b8f6db2;
|
|
65
|
+
var $e5e7805cd2439715$export$1e0fb04f31d3c22a;
|
|
66
|
+
var $e5e7805cd2439715$export$f39a09f249340e2a;
|
|
67
|
+
var $e5e7805cd2439715$export$b8813cd5d7824ce7;
|
|
68
|
+
var $e5e7805cd2439715$export$b3dd760d2dfde29e;
|
|
69
|
+
var $e5e7805cd2439715$export$48252dc130b62514;
|
|
70
|
+
var $e5e7805cd2439715$export$8d5fea71dc66db80;
|
|
71
|
+
var $e5e7805cd2439715$export$13dd3510ae7a8399;
|
|
72
|
+
var $e5e7805cd2439715$export$159930c59efb6273;
|
|
73
|
+
var $e5e7805cd2439715$export$16715af38fbd9819;
|
|
74
|
+
var $e5e7805cd2439715$export$d946625b97e8aa17;
|
|
75
|
+
var $e5e7805cd2439715$export$d9c7209e0e4f7e4d;
|
|
76
|
+
var $e5e7805cd2439715$export$c7a022df9e10a238;
|
|
77
|
+
var $e5e7805cd2439715$export$b77922bc0320c9e4;
|
|
78
|
+
var $e5e7805cd2439715$export$59739ab951d2dcc7;
|
|
79
|
+
var $e5e7805cd2439715$export$a03d836e6ef3e749;
|
|
80
|
+
var $e5e7805cd2439715$export$92ad04b5ac9296ea;
|
|
81
|
+
var $e5e7805cd2439715$export$ccd8ffc36bd10cc;
|
|
82
|
+
var $e5e7805cd2439715$export$1c52334407225704;
|
|
83
|
+
var $e5e7805cd2439715$export$e7dc768d35940237;
|
|
84
|
+
var $e5e7805cd2439715$export$2f34e9e3e0b89d95;
|
|
85
|
+
var $e5e7805cd2439715$export$7fc89689fcfab196;
|
|
86
|
+
var $e5e7805cd2439715$export$4746ac09daa215ae;
|
|
87
|
+
var $e5e7805cd2439715$export$d8467f38d2d00bd0;
|
|
88
|
+
$e5e7805cd2439715$export$4e5e9f191b1edb8 = "spectrum-Card_6fdf9f";
|
|
89
|
+
$e5e7805cd2439715$export$92758a4a0e8d19e4 = "spectrum-Card-heading_6fdf9f";
|
|
90
|
+
$e5e7805cd2439715$export$33977546b63e0df9 = "spectrum-Card-checkboxWrapper_6fdf9f";
|
|
91
|
+
$e5e7805cd2439715$export$842da5d48b8f6db2 = "spectrum-Card-checkbox_6fdf9f";
|
|
92
|
+
$e5e7805cd2439715$export$1e0fb04f31d3c22a = "is-selected_6fdf9f";
|
|
93
|
+
$e5e7805cd2439715$export$f39a09f249340e2a = "focus-ring_6fdf9f";
|
|
94
|
+
$e5e7805cd2439715$export$b8813cd5d7824ce7 = "is-hovered_6fdf9f";
|
|
95
|
+
$e5e7805cd2439715$export$b3dd760d2dfde29e = "spectrum-Card-grid_6fdf9f";
|
|
96
|
+
$e5e7805cd2439715$export$48252dc130b62514 = "spectrum-Card-decoration_6fdf9f";
|
|
97
|
+
$e5e7805cd2439715$export$8d5fea71dc66db80 = "spectrum-Card-image_6fdf9f";
|
|
98
|
+
$e5e7805cd2439715$export$13dd3510ae7a8399 = "spectrum-Card-illustration_6fdf9f";
|
|
99
|
+
$e5e7805cd2439715$export$159930c59efb6273 = "spectrum-Card-avatar_6fdf9f";
|
|
100
|
+
$e5e7805cd2439715$export$16715af38fbd9819 = "spectrum-Card-detail_6fdf9f";
|
|
101
|
+
$e5e7805cd2439715$export$d946625b97e8aa17 = "spectrum-Card-content_6fdf9f";
|
|
102
|
+
$e5e7805cd2439715$export$d9c7209e0e4f7e4d = "spectrum-Card--waterfall_6fdf9f";
|
|
103
|
+
$e5e7805cd2439715$export$c7a022df9e10a238 = "spectrum-Card--default_6fdf9f";
|
|
104
|
+
$e5e7805cd2439715$export$b77922bc0320c9e4 = "spectrum-Card--noPreview_6fdf9f";
|
|
105
|
+
$e5e7805cd2439715$export$59739ab951d2dcc7 = "spectrum-Card--grid_6fdf9f";
|
|
106
|
+
$e5e7805cd2439715$export$a03d836e6ef3e749 = "spectrum-Card--noLayout_6fdf9f";
|
|
107
|
+
$e5e7805cd2439715$export$92ad04b5ac9296ea = "spectrum-Card--isQuiet_6fdf9f";
|
|
108
|
+
$e5e7805cd2439715$export$ccd8ffc36bd10cc = "spectrum-Card--gallery_6fdf9f";
|
|
109
|
+
$e5e7805cd2439715$export$1c52334407225704 = "spectrum-Card--horizontal_6fdf9f";
|
|
110
|
+
$e5e7805cd2439715$export$e7dc768d35940237 = "is-focused_6fdf9f";
|
|
111
|
+
$e5e7805cd2439715$export$2f34e9e3e0b89d95 = "spectrum-CardView_6fdf9f";
|
|
112
|
+
$e5e7805cd2439715$export$7fc89689fcfab196 = "spectrum-CardView-centeredWrapper_6fdf9f";
|
|
113
|
+
$e5e7805cd2439715$export$4746ac09daa215ae = "spectrum-CardView-row_6fdf9f";
|
|
114
|
+
$e5e7805cd2439715$export$d8467f38d2d00bd0 = "is-drop-target_6fdf9f";
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
const $1638ba17661c692d$export$64992ac69f286e5c = /*#__PURE__*/ $jxYob$react.createContext(null);
|
|
119
|
+
function $1638ba17661c692d$export$fea0b38586ec8f13() {
|
|
120
|
+
return $jxYob$useContext($1638ba17661c692d$export$64992ac69f286e5c);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
|
|
126
|
-
function $
|
|
127
|
-
props = $
|
|
128
|
-
let context = $
|
|
126
|
+
function $2f067b98508c243e$var$CardBase(props, ref) {
|
|
127
|
+
props = $jxYob$useProviderProps(props);
|
|
128
|
+
let context = $1638ba17661c692d$export$fea0b38586ec8f13() || {
|
|
129
129
|
}; // we can call again here, won't change from Card.tsx
|
|
130
130
|
let { state: state } = context;
|
|
131
|
-
let manager = state
|
|
131
|
+
let manager = state === null || state === void 0 ? void 0 : state.selectionManager;
|
|
132
132
|
let { isQuiet: isQuiet , orientation: orientation = 'vertical' , articleProps: articleProps = {
|
|
133
133
|
} , item: item , layout: layout , children: children } = props;
|
|
134
|
-
let key = item
|
|
135
|
-
let isSelected = manager
|
|
136
|
-
let isDisabled = state
|
|
137
|
-
let onChange = ()=>
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
let {
|
|
141
|
-
let
|
|
142
|
-
let
|
|
143
|
-
let
|
|
134
|
+
let key = item === null || item === void 0 ? void 0 : item.key;
|
|
135
|
+
let isSelected = manager === null || manager === void 0 ? void 0 : manager.isSelected(key);
|
|
136
|
+
let isDisabled = state === null || state === void 0 ? void 0 : state.disabledKeys.has(key);
|
|
137
|
+
let onChange = ()=>{
|
|
138
|
+
return manager === null || manager === void 0 ? void 0 : manager.select(key);
|
|
139
|
+
};
|
|
140
|
+
let { styleProps: styleProps } = $jxYob$useStyleProps(props);
|
|
141
|
+
let { cardProps: cardProps , titleProps: titleProps , contentProps: contentProps } = $2f067b98508c243e$var$useCard(props);
|
|
142
|
+
let domRef = $jxYob$useDOMRef(ref);
|
|
143
|
+
let gridRef = $jxYob$useRef();
|
|
144
|
+
let checkboxRef = $jxYob$useRef(null);
|
|
144
145
|
// cards are only interactive if there is a selection manager and it allows selection
|
|
145
|
-
let { hoverProps: hoverProps , isHovered: isHovered } = $
|
|
146
|
-
isDisabled: manager === undefined || manager
|
|
146
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = $jxYob$useHover({
|
|
147
|
+
isDisabled: manager === undefined || (manager === null || manager === void 0 ? void 0 : manager.selectionMode) === 'none' || isDisabled
|
|
147
148
|
});
|
|
148
|
-
let [isFocused, setIsFocused] = $
|
|
149
|
-
let { focusWithinProps: focusWithinProps } = $
|
|
149
|
+
let [isFocused, setIsFocused] = $jxYob$useState(false);
|
|
150
|
+
let { focusWithinProps: focusWithinProps } = $jxYob$useFocusWithin({
|
|
150
151
|
onFocusWithinChange: setIsFocused,
|
|
151
152
|
isDisabled: isDisabled
|
|
152
153
|
});
|
|
153
154
|
// ToDo: see css for comment about avatar under selector .spectrum-Card--noLayout.spectrum-Card--default
|
|
154
|
-
let hasPreviewImage = $
|
|
155
|
-
let hasPreviewIllustration = $
|
|
155
|
+
let hasPreviewImage = $jxYob$useHasChild(`.${(/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports))['spectrum-Card-image']}`, gridRef);
|
|
156
|
+
let hasPreviewIllustration = $jxYob$useHasChild(`.${(/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports))['spectrum-Card-illustration']}`, gridRef);
|
|
156
157
|
let hasPreview = hasPreviewImage || hasPreviewIllustration;
|
|
157
158
|
// this is for horizontal cards
|
|
158
|
-
let [height, setHeight] = $
|
|
159
|
-
let updateHeight = $
|
|
159
|
+
let [height, setHeight] = $jxYob$useState(NaN);
|
|
160
|
+
let updateHeight = $jxYob$useCallback(()=>{
|
|
160
161
|
if (orientation !== 'horizontal') return;
|
|
161
162
|
let cardHeight = gridRef.current.getBoundingClientRect().height;
|
|
162
163
|
setHeight(cardHeight);
|
|
@@ -165,7 +166,7 @@ function $f5426ba654d120b1$var$CardBase(props, ref) {
|
|
|
165
166
|
gridRef,
|
|
166
167
|
setHeight
|
|
167
168
|
]);
|
|
168
|
-
$
|
|
169
|
+
$jxYob$useResizeObserver({
|
|
169
170
|
ref: gridRef,
|
|
170
171
|
onResize: updateHeight
|
|
171
172
|
});
|
|
@@ -174,31 +175,31 @@ function $f5426ba654d120b1$var$CardBase(props, ref) {
|
|
|
174
175
|
height: `${height}px`,
|
|
175
176
|
width: `${height}px`
|
|
176
177
|
};
|
|
177
|
-
let slots = $
|
|
178
|
+
let slots = $jxYob$useMemo(()=>({
|
|
178
179
|
image: {
|
|
179
|
-
UNSAFE_className: $
|
|
180
|
+
UNSAFE_className: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'spectrum-Card-image'),
|
|
180
181
|
objectFit: orientation === 'horizontal' ? 'cover' : 'contain',
|
|
181
182
|
alt: '',
|
|
182
183
|
...aspectRatioEnforce
|
|
183
184
|
},
|
|
184
185
|
illustration: {
|
|
185
|
-
UNSAFE_className: $
|
|
186
|
+
UNSAFE_className: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'spectrum-Card-illustration'),
|
|
186
187
|
...aspectRatioEnforce
|
|
187
188
|
},
|
|
188
189
|
avatar: {
|
|
189
|
-
UNSAFE_className: $
|
|
190
|
+
UNSAFE_className: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'spectrum-Card-avatar'),
|
|
190
191
|
size: 'avatar-size-400'
|
|
191
192
|
},
|
|
192
193
|
heading: {
|
|
193
|
-
UNSAFE_className: $
|
|
194
|
+
UNSAFE_className: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'spectrum-Card-heading'),
|
|
194
195
|
...titleProps
|
|
195
196
|
},
|
|
196
197
|
content: {
|
|
197
|
-
UNSAFE_className: $
|
|
198
|
+
UNSAFE_className: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'spectrum-Card-content'),
|
|
198
199
|
...contentProps
|
|
199
200
|
},
|
|
200
201
|
detail: {
|
|
201
|
-
UNSAFE_className: $
|
|
202
|
+
UNSAFE_className: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'spectrum-Card-detail')
|
|
202
203
|
}
|
|
203
204
|
})
|
|
204
205
|
, [
|
|
@@ -208,9 +209,9 @@ function $f5426ba654d120b1$var$CardBase(props, ref) {
|
|
|
208
209
|
isQuiet,
|
|
209
210
|
orientation
|
|
210
211
|
]);
|
|
211
|
-
$
|
|
212
|
-
if (gridRef
|
|
213
|
-
let walker = $
|
|
212
|
+
$jxYob$useLayoutEffect(()=>{
|
|
213
|
+
if (gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) {
|
|
214
|
+
let walker = $jxYob$getFocusableTreeWalker(gridRef.current);
|
|
214
215
|
let nextNode = walker.nextNode();
|
|
215
216
|
while(nextNode != null){
|
|
216
217
|
if (checkboxRef.current && !checkboxRef.current.UNSAFE_getDOMNode().contains(nextNode)) {
|
|
@@ -223,13 +224,13 @@ function $f5426ba654d120b1$var$CardBase(props, ref) {
|
|
|
223
224
|
}, [
|
|
224
225
|
children
|
|
225
226
|
]);
|
|
226
|
-
return(/*#__PURE__*/ $
|
|
227
|
-
focusRingClass: $
|
|
228
|
-
}, /*#__PURE__*/ $
|
|
227
|
+
return(/*#__PURE__*/ $jxYob$react.createElement($jxYob$FocusRing, {
|
|
228
|
+
focusRingClass: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'focus-ring')
|
|
229
|
+
}, /*#__PURE__*/ $jxYob$react.createElement("article", {
|
|
229
230
|
...styleProps,
|
|
230
|
-
...$
|
|
231
|
+
...$jxYob$mergeProps(cardProps, focusWithinProps, hoverProps, $jxYob$filterDOMProps(props), articleProps),
|
|
231
232
|
ref: domRef,
|
|
232
|
-
className: $
|
|
233
|
+
className: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'spectrum-Card', {
|
|
233
234
|
'spectrum-Card--default': !isQuiet && orientation !== 'horizontal',
|
|
234
235
|
'spectrum-Card--isQuiet': isQuiet && orientation !== 'horizontal',
|
|
235
236
|
'spectrum-Card--horizontal': orientation === 'horizontal',
|
|
@@ -242,36 +243,36 @@ function $f5426ba654d120b1$var$CardBase(props, ref) {
|
|
|
242
243
|
'spectrum-Card--grid': layout === 'grid',
|
|
243
244
|
'spectrum-Card--noLayout': layout !== 'waterfall' && layout !== 'gallery' && layout !== 'grid'
|
|
244
245
|
}, styleProps.className)
|
|
245
|
-
}, /*#__PURE__*/ $
|
|
246
|
+
}, /*#__PURE__*/ $jxYob$react.createElement("div", {
|
|
246
247
|
ref: gridRef,
|
|
247
|
-
className: $
|
|
248
|
-
}, manager && manager.selectionMode !== 'none' && /*#__PURE__*/ $
|
|
249
|
-
className: $
|
|
250
|
-
}, /*#__PURE__*/ $
|
|
248
|
+
className: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'spectrum-Card-grid')
|
|
249
|
+
}, manager && manager.selectionMode !== 'none' && /*#__PURE__*/ $jxYob$react.createElement("div", {
|
|
250
|
+
className: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'spectrum-Card-checkboxWrapper')
|
|
251
|
+
}, /*#__PURE__*/ $jxYob$react.createElement($jxYob$Checkbox, {
|
|
251
252
|
ref: checkboxRef,
|
|
252
253
|
isDisabled: isDisabled,
|
|
253
254
|
excludeFromTabOrder: true,
|
|
254
255
|
isSelected: isSelected,
|
|
255
256
|
onChange: onChange,
|
|
256
|
-
UNSAFE_className: $
|
|
257
|
+
UNSAFE_className: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'spectrum-Card-checkbox'),
|
|
257
258
|
isEmphasized: true,
|
|
258
259
|
"aria-label": "select"
|
|
259
|
-
})), /*#__PURE__*/ $
|
|
260
|
+
})), /*#__PURE__*/ $jxYob$react.createElement($jxYob$SlotProvider, {
|
|
260
261
|
slots: slots
|
|
261
|
-
}, children), /*#__PURE__*/ $
|
|
262
|
-
className: $
|
|
262
|
+
}, children), /*#__PURE__*/ $jxYob$react.createElement("div", {
|
|
263
|
+
className: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'spectrum-Card-decoration')
|
|
263
264
|
})))));
|
|
264
265
|
}
|
|
265
|
-
function $
|
|
266
|
-
let titleId = $
|
|
267
|
-
let descriptionId = $
|
|
268
|
-
let titleProps = $
|
|
266
|
+
function $2f067b98508c243e$var$useCard(props) {
|
|
267
|
+
let titleId = $jxYob$useSlotId();
|
|
268
|
+
let descriptionId = $jxYob$useSlotId();
|
|
269
|
+
let titleProps = $jxYob$useMemo(()=>({
|
|
269
270
|
id: titleId
|
|
270
271
|
})
|
|
271
272
|
, [
|
|
272
273
|
titleId
|
|
273
274
|
]);
|
|
274
|
-
let contentProps = $
|
|
275
|
+
let contentProps = $jxYob$useMemo(()=>({
|
|
275
276
|
id: descriptionId
|
|
276
277
|
})
|
|
277
278
|
, [
|
|
@@ -279,7 +280,7 @@ function $f5426ba654d120b1$var$useCard(props) {
|
|
|
279
280
|
]);
|
|
280
281
|
return {
|
|
281
282
|
cardProps: {
|
|
282
|
-
...$
|
|
283
|
+
...$jxYob$filterDOMProps(props),
|
|
283
284
|
'aria-labelledby': titleId,
|
|
284
285
|
'aria-describedby': descriptionId,
|
|
285
286
|
tabIndex: 0
|
|
@@ -290,184 +291,184 @@ function $f5426ba654d120b1$var$useCard(props) {
|
|
|
290
291
|
}
|
|
291
292
|
/**
|
|
292
293
|
* TODO: Add description of component here.
|
|
293
|
-
*/ const $
|
|
294
|
+
*/ const $2f067b98508c243e$export$7a6ccaf429ad93a8 = /*#__PURE__*/ $jxYob$react.forwardRef($2f067b98508c243e$var$CardBase);
|
|
294
295
|
|
|
295
296
|
|
|
296
297
|
|
|
297
298
|
|
|
298
299
|
|
|
299
|
-
var $
|
|
300
|
-
var $
|
|
301
|
-
$
|
|
300
|
+
var $236ecb032f346896$exports = {};
|
|
301
|
+
var $60f599d396c2fb9f$exports = {};
|
|
302
|
+
$60f599d396c2fb9f$exports = JSON.parse("{\"loading\":\"جارٍ التحميل...\",\"loadingMore\":\"جارٍ تحميل المزيد...\"}");
|
|
302
303
|
|
|
303
304
|
|
|
304
|
-
var $
|
|
305
|
-
$
|
|
305
|
+
var $474a3374fe4710e1$exports = {};
|
|
306
|
+
$474a3374fe4710e1$exports = JSON.parse("{\"loading\":\"Зареждане...\",\"loadingMore\":\"Зареждане на още...\"}");
|
|
306
307
|
|
|
307
308
|
|
|
308
|
-
var $
|
|
309
|
-
$
|
|
309
|
+
var $2c4f5dbef9a8c92e$exports = {};
|
|
310
|
+
$2c4f5dbef9a8c92e$exports = JSON.parse("{\"loading\":\"Načítání...\",\"loadingMore\":\"Načítání dalších...\"}");
|
|
310
311
|
|
|
311
312
|
|
|
312
|
-
var $
|
|
313
|
-
$
|
|
313
|
+
var $7c163a45a40c4767$exports = {};
|
|
314
|
+
$7c163a45a40c4767$exports = JSON.parse("{\"loading\":\"Indlæser ...\",\"loadingMore\":\"Indlæser flere ...\"}");
|
|
314
315
|
|
|
315
316
|
|
|
316
|
-
var $
|
|
317
|
-
$
|
|
317
|
+
var $e059f58137836759$exports = {};
|
|
318
|
+
$e059f58137836759$exports = JSON.parse("{\"loading\":\"Laden...\",\"loadingMore\":\"Mehr laden ...\"}");
|
|
318
319
|
|
|
319
320
|
|
|
320
|
-
var $
|
|
321
|
-
$
|
|
321
|
+
var $5b540d8139d53283$exports = {};
|
|
322
|
+
$5b540d8139d53283$exports = JSON.parse("{\"loading\":\"Φόρτωση...\",\"loadingMore\":\"Φόρτωση περισσότερων...\"}");
|
|
322
323
|
|
|
323
324
|
|
|
324
|
-
var $
|
|
325
|
-
$
|
|
325
|
+
var $ac4f4c79c539c1c6$exports = {};
|
|
326
|
+
$ac4f4c79c539c1c6$exports = JSON.parse("{\"loading\":\"Loading…\",\"loadingMore\":\"Loading more…\"}");
|
|
326
327
|
|
|
327
328
|
|
|
328
|
-
var $
|
|
329
|
-
$
|
|
329
|
+
var $ab343d77621fa4e6$exports = {};
|
|
330
|
+
$ab343d77621fa4e6$exports = JSON.parse("{\"loading\":\"Cargando…\",\"loadingMore\":\"Cargando más…\"}");
|
|
330
331
|
|
|
331
332
|
|
|
332
|
-
var $
|
|
333
|
-
$
|
|
333
|
+
var $e3495ec5da31254e$exports = {};
|
|
334
|
+
$e3495ec5da31254e$exports = JSON.parse("{\"loading\":\"Laadimine...\",\"loadingMore\":\"Laadi rohkem...\"}");
|
|
334
335
|
|
|
335
336
|
|
|
336
|
-
var $
|
|
337
|
-
$
|
|
337
|
+
var $800de89d3183d03d$exports = {};
|
|
338
|
+
$800de89d3183d03d$exports = JSON.parse("{\"loading\":\"Ladataan…\",\"loadingMore\":\"Ladataan lisää…\"}");
|
|
338
339
|
|
|
339
340
|
|
|
340
|
-
var $
|
|
341
|
-
$
|
|
341
|
+
var $7782966d3d07da70$exports = {};
|
|
342
|
+
$7782966d3d07da70$exports = JSON.parse("{\"loading\":\"Chargement...\",\"loadingMore\":\"Chargement supplémentaire...\"}");
|
|
342
343
|
|
|
343
344
|
|
|
344
|
-
var $
|
|
345
|
-
$
|
|
345
|
+
var $2ba5d1ba8d3b4c8d$exports = {};
|
|
346
|
+
$2ba5d1ba8d3b4c8d$exports = JSON.parse("{\"loading\":\"טוען...\",\"loadingMore\":\"טוען עוד...\"}");
|
|
346
347
|
|
|
347
348
|
|
|
348
|
-
var $
|
|
349
|
-
$
|
|
349
|
+
var $0692734f6d27de46$exports = {};
|
|
350
|
+
$0692734f6d27de46$exports = JSON.parse("{\"loading\":\"Učitavam...\",\"loadingMore\":\"Učitavam još...\"}");
|
|
350
351
|
|
|
351
352
|
|
|
352
|
-
var $
|
|
353
|
-
$
|
|
353
|
+
var $3c359198f221cad3$exports = {};
|
|
354
|
+
$3c359198f221cad3$exports = JSON.parse("{\"loading\":\"Betöltés folyamatban…\",\"loadingMore\":\"Továbbiak betöltése folyamatban…\"}");
|
|
354
355
|
|
|
355
356
|
|
|
356
|
-
var $
|
|
357
|
-
$
|
|
357
|
+
var $689a5ff697d16dc4$exports = {};
|
|
358
|
+
$689a5ff697d16dc4$exports = JSON.parse("{\"loading\":\"Caricamento...\",\"loadingMore\":\"Caricamento altri...\"}");
|
|
358
359
|
|
|
359
360
|
|
|
360
|
-
var $
|
|
361
|
-
$
|
|
361
|
+
var $8ffeaf3707ff31e4$exports = {};
|
|
362
|
+
$8ffeaf3707ff31e4$exports = JSON.parse("{\"loading\":\"読み込み中...\",\"loadingMore\":\"さらに読み込み中...\"}");
|
|
362
363
|
|
|
363
364
|
|
|
364
|
-
var $
|
|
365
|
-
$
|
|
365
|
+
var $e3dd530ff3b0b1e8$exports = {};
|
|
366
|
+
$e3dd530ff3b0b1e8$exports = JSON.parse("{\"loading\":\"로드 중\",\"loadingMore\":\"추가 로드 중\"}");
|
|
366
367
|
|
|
367
368
|
|
|
368
|
-
var $
|
|
369
|
-
$
|
|
369
|
+
var $c99c5a172acb3ec0$exports = {};
|
|
370
|
+
$c99c5a172acb3ec0$exports = JSON.parse("{\"loading\":\"Įkeliama...\",\"loadingMore\":\"Įkeliama daugiau...\"}");
|
|
370
371
|
|
|
371
372
|
|
|
372
|
-
var $
|
|
373
|
-
$
|
|
373
|
+
var $d40dc83361f0ee02$exports = {};
|
|
374
|
+
$d40dc83361f0ee02$exports = JSON.parse("{\"loading\":\"Notiek ielāde...\",\"loadingMore\":\"Tiek ielādēts vēl...\"}");
|
|
374
375
|
|
|
375
376
|
|
|
376
|
-
var $
|
|
377
|
-
$
|
|
377
|
+
var $c3717bf3889eff90$exports = {};
|
|
378
|
+
$c3717bf3889eff90$exports = JSON.parse("{\"loading\":\"Laster inn ...\",\"loadingMore\":\"Laster inn flere ...\"}");
|
|
378
379
|
|
|
379
380
|
|
|
380
|
-
var $
|
|
381
|
-
$
|
|
381
|
+
var $c1757f6b8ffbf245$exports = {};
|
|
382
|
+
$c1757f6b8ffbf245$exports = JSON.parse("{\"loading\":\"Laden...\",\"loadingMore\":\"Meer laden...\"}");
|
|
382
383
|
|
|
383
384
|
|
|
384
|
-
var $
|
|
385
|
-
$
|
|
385
|
+
var $4966e2ae3faf7602$exports = {};
|
|
386
|
+
$4966e2ae3faf7602$exports = JSON.parse("{\"loading\":\"Ładowanie...\",\"loadingMore\":\"Wczytywanie większej liczby...\"}");
|
|
386
387
|
|
|
387
388
|
|
|
388
|
-
var $
|
|
389
|
-
$
|
|
389
|
+
var $2069eca4dd675881$exports = {};
|
|
390
|
+
$2069eca4dd675881$exports = JSON.parse("{\"loading\":\"Carregando...\",\"loadingMore\":\"Carregando mais...\"}");
|
|
390
391
|
|
|
391
392
|
|
|
392
|
-
var $
|
|
393
|
-
$
|
|
393
|
+
var $d3114985de242899$exports = {};
|
|
394
|
+
$d3114985de242899$exports = JSON.parse("{\"loading\":\"A carregar...\",\"loadingMore\":\"A carregar mais...\"}");
|
|
394
395
|
|
|
395
396
|
|
|
396
|
-
var $
|
|
397
|
-
$
|
|
397
|
+
var $5d531ca74b89ae95$exports = {};
|
|
398
|
+
$5d531ca74b89ae95$exports = JSON.parse("{\"loading\":\"Se încarcă...\",\"loadingMore\":\"Se încarcă mai multe...\"}");
|
|
398
399
|
|
|
399
400
|
|
|
400
|
-
var $
|
|
401
|
-
$
|
|
401
|
+
var $b62cde108c24214e$exports = {};
|
|
402
|
+
$b62cde108c24214e$exports = JSON.parse("{\"loading\":\"Загрузка...\",\"loadingMore\":\"Дополнительная загрузка...\"}");
|
|
402
403
|
|
|
403
404
|
|
|
404
|
-
var $
|
|
405
|
-
$
|
|
405
|
+
var $86cc94ab1375ff38$exports = {};
|
|
406
|
+
$86cc94ab1375ff38$exports = JSON.parse("{\"loading\":\"Načítava sa...\",\"loadingMore\":\"Načítava sa viac...\"}");
|
|
406
407
|
|
|
407
408
|
|
|
408
|
-
var $
|
|
409
|
-
$
|
|
409
|
+
var $5ff51992f46d15f6$exports = {};
|
|
410
|
+
$5ff51992f46d15f6$exports = JSON.parse("{\"loading\":\"Nalaganje...\",\"loadingMore\":\"Nalaganje več vsebine...\"}");
|
|
410
411
|
|
|
411
412
|
|
|
412
|
-
var $
|
|
413
|
-
$
|
|
413
|
+
var $cf16938c831e0638$exports = {};
|
|
414
|
+
$cf16938c831e0638$exports = JSON.parse("{\"loading\":\"Učitavam...\",\"loadingMore\":\"Učitavam još...\"}");
|
|
414
415
|
|
|
415
416
|
|
|
416
|
-
var $
|
|
417
|
-
$
|
|
417
|
+
var $1f1c7912dc967826$exports = {};
|
|
418
|
+
$1f1c7912dc967826$exports = JSON.parse("{\"loading\":\"Läser in...\",\"loadingMore\":\"Läser in mer...\"}");
|
|
418
419
|
|
|
419
420
|
|
|
420
|
-
var $
|
|
421
|
-
$
|
|
421
|
+
var $dc4a9d6deeb4f8b1$exports = {};
|
|
422
|
+
$dc4a9d6deeb4f8b1$exports = JSON.parse("{\"loading\":\"Yükleniyor...\",\"loadingMore\":\"Daha fazla yükleniyor...\"}");
|
|
422
423
|
|
|
423
424
|
|
|
424
|
-
var $
|
|
425
|
-
$
|
|
425
|
+
var $c63342cfde3892bf$exports = {};
|
|
426
|
+
$c63342cfde3892bf$exports = JSON.parse("{\"loading\":\"Завантаження…\",\"loadingMore\":\"Завантаження інших об’єктів...\"}");
|
|
426
427
|
|
|
427
428
|
|
|
428
|
-
var $
|
|
429
|
-
$
|
|
429
|
+
var $4a89119b6ebf4a12$exports = {};
|
|
430
|
+
$4a89119b6ebf4a12$exports = JSON.parse("{\"loading\":\"正在加载...\",\"loadingMore\":\"正在加载更多...\"}");
|
|
430
431
|
|
|
431
432
|
|
|
432
|
-
var $
|
|
433
|
-
$
|
|
433
|
+
var $a34ac55ec7732100$exports = {};
|
|
434
|
+
$a34ac55ec7732100$exports = JSON.parse("{\"loading\":\"正在載入\",\"loadingMore\":\"正在載入更多…\"}");
|
|
434
435
|
|
|
435
436
|
|
|
436
|
-
$
|
|
437
|
-
"ar-AE": $
|
|
438
|
-
"bg-BG": $
|
|
439
|
-
"cs-CZ": $
|
|
440
|
-
"da-DK": $
|
|
441
|
-
"de-DE": $
|
|
442
|
-
"el-GR": $
|
|
443
|
-
"en-US": $
|
|
444
|
-
"es-ES": $
|
|
445
|
-
"et-EE": $
|
|
446
|
-
"fi-FI": $
|
|
447
|
-
"fr-FR": $
|
|
448
|
-
"he-IL": $
|
|
449
|
-
"hr-HR": $
|
|
450
|
-
"hu-HU": $
|
|
451
|
-
"it-IT": $
|
|
452
|
-
"ja-JP": $
|
|
453
|
-
"ko-KR": $
|
|
454
|
-
"lt-LT": $
|
|
455
|
-
"lv-LV": $
|
|
456
|
-
"nb-NO": $
|
|
457
|
-
"nl-NL": $
|
|
458
|
-
"pl-PL": $
|
|
459
|
-
"pt-BR": $
|
|
460
|
-
"pt-PT": $
|
|
461
|
-
"ro-RO": $
|
|
462
|
-
"ru-RU": $
|
|
463
|
-
"sk-SK": $
|
|
464
|
-
"sl-SI": $
|
|
465
|
-
"sr-SP": $
|
|
466
|
-
"sv-SE": $
|
|
467
|
-
"tr-TR": $
|
|
468
|
-
"uk-UA": $
|
|
469
|
-
"zh-CN": $
|
|
470
|
-
"zh-TW": $
|
|
437
|
+
$236ecb032f346896$exports = {
|
|
438
|
+
"ar-AE": $60f599d396c2fb9f$exports,
|
|
439
|
+
"bg-BG": $474a3374fe4710e1$exports,
|
|
440
|
+
"cs-CZ": $2c4f5dbef9a8c92e$exports,
|
|
441
|
+
"da-DK": $7c163a45a40c4767$exports,
|
|
442
|
+
"de-DE": $e059f58137836759$exports,
|
|
443
|
+
"el-GR": $5b540d8139d53283$exports,
|
|
444
|
+
"en-US": $ac4f4c79c539c1c6$exports,
|
|
445
|
+
"es-ES": $ab343d77621fa4e6$exports,
|
|
446
|
+
"et-EE": $e3495ec5da31254e$exports,
|
|
447
|
+
"fi-FI": $800de89d3183d03d$exports,
|
|
448
|
+
"fr-FR": $7782966d3d07da70$exports,
|
|
449
|
+
"he-IL": $2ba5d1ba8d3b4c8d$exports,
|
|
450
|
+
"hr-HR": $0692734f6d27de46$exports,
|
|
451
|
+
"hu-HU": $3c359198f221cad3$exports,
|
|
452
|
+
"it-IT": $689a5ff697d16dc4$exports,
|
|
453
|
+
"ja-JP": $8ffeaf3707ff31e4$exports,
|
|
454
|
+
"ko-KR": $e3dd530ff3b0b1e8$exports,
|
|
455
|
+
"lt-LT": $c99c5a172acb3ec0$exports,
|
|
456
|
+
"lv-LV": $d40dc83361f0ee02$exports,
|
|
457
|
+
"nb-NO": $c3717bf3889eff90$exports,
|
|
458
|
+
"nl-NL": $c1757f6b8ffbf245$exports,
|
|
459
|
+
"pl-PL": $4966e2ae3faf7602$exports,
|
|
460
|
+
"pt-BR": $2069eca4dd675881$exports,
|
|
461
|
+
"pt-PT": $d3114985de242899$exports,
|
|
462
|
+
"ro-RO": $5d531ca74b89ae95$exports,
|
|
463
|
+
"ru-RU": $b62cde108c24214e$exports,
|
|
464
|
+
"sk-SK": $86cc94ab1375ff38$exports,
|
|
465
|
+
"sl-SI": $5ff51992f46d15f6$exports,
|
|
466
|
+
"sr-SP": $cf16938c831e0638$exports,
|
|
467
|
+
"sv-SE": $1f1c7912dc967826$exports,
|
|
468
|
+
"tr-TR": $dc4a9d6deeb4f8b1$exports,
|
|
469
|
+
"uk-UA": $c63342cfde3892bf$exports,
|
|
470
|
+
"zh-CN": $4a89119b6ebf4a12$exports,
|
|
471
|
+
"zh-TW": $a34ac55ec7732100$exports
|
|
471
472
|
};
|
|
472
473
|
|
|
473
474
|
|
|
@@ -479,17 +480,17 @@ $a9688f93454e315e$exports = {
|
|
|
479
480
|
|
|
480
481
|
|
|
481
482
|
|
|
482
|
-
function $
|
|
483
|
-
let { scale: scale } = $
|
|
484
|
-
let { styleProps: styleProps } = $
|
|
485
|
-
let domRef = $
|
|
483
|
+
function $388bc726678ad587$var$CardView(props, ref) {
|
|
484
|
+
let { scale: scale } = $jxYob$useProvider();
|
|
485
|
+
let { styleProps: styleProps } = $jxYob$useStyleProps(props);
|
|
486
|
+
let domRef = $jxYob$useDOMRef(ref);
|
|
486
487
|
let { isQuiet: isQuiet , renderEmptyState: renderEmptyState , layout: layout , loadingState: loadingState , onLoadMore: onLoadMore , cardOrientation: cardOrientation = 'vertical' } = props;
|
|
487
|
-
let collator = $
|
|
488
|
+
let collator = $jxYob$useCollator({
|
|
488
489
|
usage: 'search',
|
|
489
490
|
sensitivity: 'base'
|
|
490
491
|
});
|
|
491
492
|
let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';
|
|
492
|
-
let cardViewLayout = $
|
|
493
|
+
let cardViewLayout = $jxYob$useMemo(()=>typeof layout === 'function' ? new layout({
|
|
493
494
|
collator: collator,
|
|
494
495
|
cardOrientation: cardOrientation,
|
|
495
496
|
scale: scale
|
|
@@ -501,10 +502,10 @@ function $c6398e7007a75897$var$CardView(props, ref) {
|
|
|
501
502
|
scale
|
|
502
503
|
]);
|
|
503
504
|
let layoutType = cardViewLayout.layoutType;
|
|
504
|
-
let formatMessage = $
|
|
505
|
-
let { direction: direction } = $
|
|
506
|
-
let { collection: collection } = $
|
|
507
|
-
let gridCollection = $
|
|
505
|
+
let formatMessage = $jxYob$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($236ecb032f346896$exports)));
|
|
506
|
+
let { direction: direction } = $jxYob$useLocale();
|
|
507
|
+
let { collection: collection } = $jxYob$useListState(props);
|
|
508
|
+
let gridCollection = $jxYob$useMemo(()=>new $jxYob$GridCollection({
|
|
508
509
|
columnCount: 1,
|
|
509
510
|
items: [
|
|
510
511
|
...collection
|
|
@@ -530,7 +531,7 @@ function $c6398e7007a75897$var$CardView(props, ref) {
|
|
|
530
531
|
, [
|
|
531
532
|
collection
|
|
532
533
|
]);
|
|
533
|
-
let state = $
|
|
534
|
+
let state = $jxYob$useGridState({
|
|
534
535
|
...props,
|
|
535
536
|
selectionMode: cardOrientation === 'horizontal' && layoutType === 'grid' ? 'none' : props.selectionMode,
|
|
536
537
|
collection: gridCollection,
|
|
@@ -540,12 +541,12 @@ function $c6398e7007a75897$var$CardView(props, ref) {
|
|
|
540
541
|
cardViewLayout.disabledKeys = state.disabledKeys;
|
|
541
542
|
cardViewLayout.isLoading = isLoading;
|
|
542
543
|
cardViewLayout.direction = direction;
|
|
543
|
-
let { gridProps: gridProps } = $
|
|
544
|
+
let { gridProps: gridProps } = $jxYob$useGrid({
|
|
544
545
|
...props,
|
|
545
546
|
isVirtualized: true,
|
|
546
547
|
keyboardDelegate: cardViewLayout
|
|
547
548
|
}, state, domRef);
|
|
548
|
-
let renderWrapper = (parent, reusableView)=>/*#__PURE__*/ $
|
|
549
|
+
let renderWrapper = (parent, reusableView)=>/*#__PURE__*/ $jxYob$react.createElement($jxYob$VirtualizerItem, {
|
|
549
550
|
key: reusableView.key,
|
|
550
551
|
reusableView: reusableView,
|
|
551
552
|
parent: parent
|
|
@@ -553,10 +554,10 @@ function $c6398e7007a75897$var$CardView(props, ref) {
|
|
|
553
554
|
;
|
|
554
555
|
let focusedKey = state.selectionManager.focusedKey;
|
|
555
556
|
let focusedItem = gridCollection.getItem(state.selectionManager.focusedKey);
|
|
556
|
-
if (focusedItem
|
|
557
|
+
if ((focusedItem === null || focusedItem === void 0 ? void 0 : focusedItem.parentKey) != null) focusedKey = focusedItem.parentKey;
|
|
557
558
|
let margin = cardViewLayout.margin || 0;
|
|
558
559
|
let virtualizer = cardViewLayout.virtualizer;
|
|
559
|
-
let scrollToItem = $
|
|
560
|
+
let scrollToItem = $jxYob$useCallback((key)=>{
|
|
560
561
|
virtualizer && virtualizer.scrollToItem(key, {
|
|
561
562
|
duration: 0,
|
|
562
563
|
offsetY: margin
|
|
@@ -566,17 +567,17 @@ function $c6398e7007a75897$var$CardView(props, ref) {
|
|
|
566
567
|
virtualizer
|
|
567
568
|
]);
|
|
568
569
|
// TODO: does aria-row count and aria-col count need to be modified? Perhaps aria-col count needs to be omitted
|
|
569
|
-
return(/*#__PURE__*/ $
|
|
570
|
+
return(/*#__PURE__*/ $jxYob$react.createElement($1638ba17661c692d$export$64992ac69f286e5c.Provider, {
|
|
570
571
|
value: {
|
|
571
572
|
state: state,
|
|
572
573
|
isQuiet: isQuiet,
|
|
573
574
|
layout: cardViewLayout,
|
|
574
575
|
cardOrientation: cardOrientation
|
|
575
576
|
}
|
|
576
|
-
}, /*#__PURE__*/ $
|
|
577
|
+
}, /*#__PURE__*/ $jxYob$react.createElement($jxYob$Virtualizer, {
|
|
577
578
|
...gridProps,
|
|
578
579
|
...styleProps,
|
|
579
|
-
className: $
|
|
580
|
+
className: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'spectrum-CardView'),
|
|
580
581
|
ref: domRef,
|
|
581
582
|
focusedKey: focusedKey,
|
|
582
583
|
scrollDirection: "vertical",
|
|
@@ -588,45 +589,45 @@ function $c6398e7007a75897$var$CardView(props, ref) {
|
|
|
588
589
|
transitionDuration: isLoading ? 160 : 220,
|
|
589
590
|
scrollToItem: scrollToItem
|
|
590
591
|
}, (type, item)=>{
|
|
591
|
-
if (type === 'item') return(/*#__PURE__*/ $
|
|
592
|
+
if (type === 'item') return(/*#__PURE__*/ $jxYob$react.createElement($388bc726678ad587$var$InternalCard, {
|
|
592
593
|
item: item
|
|
593
594
|
}));
|
|
594
|
-
else if (type === 'loader') return(/*#__PURE__*/ $
|
|
595
|
+
else if (type === 'loader') return(/*#__PURE__*/ $jxYob$react.createElement($388bc726678ad587$var$CenteredWrapper, null, /*#__PURE__*/ $jxYob$react.createElement($jxYob$ProgressCircle, {
|
|
595
596
|
isIndeterminate: true,
|
|
596
597
|
"aria-label": state.collection.size > 0 ? formatMessage('loadingMore') : formatMessage('loading')
|
|
597
598
|
})));
|
|
598
599
|
else if (type === 'placeholder') {
|
|
599
600
|
let emptyState = renderEmptyState ? renderEmptyState() : null;
|
|
600
601
|
if (emptyState == null) return null;
|
|
601
|
-
return(/*#__PURE__*/ $
|
|
602
|
+
return(/*#__PURE__*/ $jxYob$react.createElement($388bc726678ad587$var$CenteredWrapper, null, emptyState));
|
|
602
603
|
}
|
|
603
604
|
})));
|
|
604
605
|
}
|
|
605
|
-
function $
|
|
606
|
-
let { state: state } = $
|
|
607
|
-
return(/*#__PURE__*/ $
|
|
606
|
+
function $388bc726678ad587$var$CenteredWrapper({ children: children }) {
|
|
607
|
+
let { state: state } = $1638ba17661c692d$export$fea0b38586ec8f13();
|
|
608
|
+
return(/*#__PURE__*/ $jxYob$react.createElement("div", {
|
|
608
609
|
role: "row",
|
|
609
610
|
"aria-rowindex": state.collection.size + 1,
|
|
610
|
-
className: $
|
|
611
|
-
}, /*#__PURE__*/ $
|
|
611
|
+
className: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'spectrum-CardView-centeredWrapper')
|
|
612
|
+
}, /*#__PURE__*/ $jxYob$react.createElement("div", {
|
|
612
613
|
role: "gridcell"
|
|
613
614
|
}, children)));
|
|
614
615
|
}
|
|
615
|
-
function $
|
|
616
|
+
function $388bc726678ad587$var$InternalCard(props) {
|
|
616
617
|
let { item: item } = props;
|
|
617
618
|
let cellNode = [
|
|
618
619
|
...item.childNodes
|
|
619
620
|
][0];
|
|
620
|
-
let { state: state , cardOrientation: cardOrientation , isQuiet: isQuiet , layout: layout } = $
|
|
621
|
+
let { state: state , cardOrientation: cardOrientation , isQuiet: isQuiet , layout: layout } = $1638ba17661c692d$export$fea0b38586ec8f13();
|
|
621
622
|
let layoutType = layout.layoutType;
|
|
622
|
-
let rowRef = $
|
|
623
|
-
let cellRef = $
|
|
624
|
-
let unwrappedRef = $
|
|
625
|
-
let { rowProps: rowProps } = $
|
|
623
|
+
let rowRef = $jxYob$useRef();
|
|
624
|
+
let cellRef = $jxYob$useRef();
|
|
625
|
+
let unwrappedRef = $jxYob$useUnwrapDOMRef(cellRef);
|
|
626
|
+
let { rowProps: rowProps } = $jxYob$useGridRow({
|
|
626
627
|
node: item,
|
|
627
628
|
isVirtualized: true
|
|
628
629
|
}, state, rowRef);
|
|
629
|
-
let { gridCellProps: gridCellProps } = $
|
|
630
|
+
let { gridCellProps: gridCellProps } = $jxYob$useGridCell({
|
|
630
631
|
node: cellNode,
|
|
631
632
|
focusMode: 'cell'
|
|
632
633
|
}, state, unwrappedRef);
|
|
@@ -636,11 +637,11 @@ function $c6398e7007a75897$var$InternalCard(props) {
|
|
|
636
637
|
// when pressing the arrow keys so we delete the key down handler here. Arrow key navigation between
|
|
637
638
|
// the cards in the CardView is handled by useGrid => useSelectableCollection instead.
|
|
638
639
|
delete gridCellProps.onKeyDownCapture;
|
|
639
|
-
return(/*#__PURE__*/ $
|
|
640
|
+
return(/*#__PURE__*/ $jxYob$react.createElement("div", {
|
|
640
641
|
...rowProps,
|
|
641
642
|
ref: rowRef,
|
|
642
|
-
className: $
|
|
643
|
-
}, /*#__PURE__*/ $
|
|
643
|
+
className: $jxYob$classNames((/*@__PURE__*/$parcel$interopDefault($e5e7805cd2439715$exports)), 'spectrum-CardView-row')
|
|
644
|
+
}, /*#__PURE__*/ $jxYob$react.createElement($2f067b98508c243e$export$7a6ccaf429ad93a8, {
|
|
644
645
|
ref: cellRef,
|
|
645
646
|
articleProps: gridCellProps,
|
|
646
647
|
isQuiet: isQuiet,
|
|
@@ -651,24 +652,14 @@ function $c6398e7007a75897$var$InternalCard(props) {
|
|
|
651
652
|
}
|
|
652
653
|
/**
|
|
653
654
|
* TODO: Add description of component here.
|
|
654
|
-
*/ const $
|
|
655
|
+
*/ const $388bc726678ad587$export$7e52c821f7b6f422 = /*#__PURE__*/ $jxYob$react.forwardRef($388bc726678ad587$var$CardView);
|
|
655
656
|
|
|
656
657
|
|
|
657
|
-
var $
|
|
658
|
+
var $3e8c06a2bf701494$exports = {};
|
|
658
659
|
|
|
659
|
-
$parcel$export($
|
|
660
|
+
$parcel$export($3e8c06a2bf701494$exports, "GalleryLayout", () => $3e8c06a2bf701494$export$8e52095834484b61);
|
|
660
661
|
|
|
661
|
-
class $
|
|
662
|
-
constructor(options = {
|
|
663
|
-
}){
|
|
664
|
-
super();
|
|
665
|
-
this.disabledKeys = new Set();
|
|
666
|
-
this.layoutInfos = new Map();
|
|
667
|
-
this.collator = options.collator;
|
|
668
|
-
this.lastCollection = null;
|
|
669
|
-
this.scale = options.scale || 'medium';
|
|
670
|
-
this.margin = options.margin || 24;
|
|
671
|
-
}
|
|
662
|
+
class $ca0f261acdd7bcf1$export$64943d2e59d72a29 extends $jxYob$Layout {
|
|
672
663
|
validate(invalidationContext) {
|
|
673
664
|
this.collection = this.virtualizer.collection;
|
|
674
665
|
this.buildCollection(invalidationContext);
|
|
@@ -731,20 +722,22 @@ class $5fa895c7c356fbff$export$64943d2e59d72a29 extends $5HlfY$Layout {
|
|
|
731
722
|
return best || null;
|
|
732
723
|
}
|
|
733
724
|
getKeyBelow(key) {
|
|
725
|
+
var ref, ref1;
|
|
734
726
|
// Expected key is the currently focused cell so we need the parent row key
|
|
735
727
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
736
728
|
let layoutInfo = this.getLayoutInfo(parentRowKey);
|
|
737
|
-
let rect = new $
|
|
738
|
-
let closestRow = this.collection.getItem(this._findClosest(layoutInfo.rect, rect)
|
|
739
|
-
return closestRow
|
|
729
|
+
let rect = new $jxYob$Rect(layoutInfo.rect.x, layoutInfo.rect.maxY + 1, layoutInfo.rect.width, this.virtualizer.visibleRect.height);
|
|
730
|
+
let closestRow = this.collection.getItem((ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key);
|
|
731
|
+
return (ref1 = closestRow === null || closestRow === void 0 ? void 0 : closestRow.childNodes[0]) === null || ref1 === void 0 ? void 0 : ref1.key;
|
|
740
732
|
}
|
|
741
733
|
getKeyAbove(key) {
|
|
734
|
+
var ref, ref2;
|
|
742
735
|
// Expected key is the currently focused cell so we need the parent row key
|
|
743
736
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
744
737
|
let layoutInfo = this.getLayoutInfo(parentRowKey);
|
|
745
|
-
let rect = new $
|
|
746
|
-
let closestRow = this.collection.getItem(this._findClosest(layoutInfo.rect, rect)
|
|
747
|
-
return closestRow
|
|
738
|
+
let rect = new $jxYob$Rect(layoutInfo.rect.x, 0, layoutInfo.rect.width, layoutInfo.rect.y - 1);
|
|
739
|
+
let closestRow = this.collection.getItem((ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key);
|
|
740
|
+
return (ref2 = closestRow === null || closestRow === void 0 ? void 0 : closestRow.childNodes[0]) === null || ref2 === void 0 ? void 0 : ref2.key;
|
|
748
741
|
}
|
|
749
742
|
getKeyRightOf(key) {
|
|
750
743
|
// Expected key is the currently focused cell so we need the parent row key
|
|
@@ -783,14 +776,16 @@ class $5fa895c7c356fbff$export$64943d2e59d72a29 extends $5HlfY$Layout {
|
|
|
783
776
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
784
777
|
let layoutInfo = this.getLayoutInfo(parentRowKey);
|
|
785
778
|
if (layoutInfo) {
|
|
779
|
+
var ref;
|
|
786
780
|
let pageY = Math.max(0, layoutInfo.rect.y + layoutInfo.rect.height - this.virtualizer.visibleRect.height);
|
|
787
781
|
// If the node is so large that it spans multiple page heights, return the key of the item immediately above
|
|
788
782
|
// Otherwise keep going up until we exceed a single page height worth of nodes
|
|
789
|
-
let keyAbove = this.collection.getItem(this.getKeyAbove(key))
|
|
783
|
+
let keyAbove = (ref = this.collection.getItem(this.getKeyAbove(key))) === null || ref === void 0 ? void 0 : ref.parentKey;
|
|
790
784
|
layoutInfo = this.getLayoutInfo(keyAbove);
|
|
791
785
|
if (layoutInfo && layoutInfo.rect.y > pageY) while(layoutInfo && layoutInfo.rect.y > pageY){
|
|
786
|
+
var ref3;
|
|
792
787
|
let childKey = this.collection.getItem(layoutInfo.key).childNodes[0].key;
|
|
793
|
-
let keyAbove = this.collection.getItem(this.getKeyAbove(childKey))
|
|
788
|
+
let keyAbove = (ref3 = this.collection.getItem(this.getKeyAbove(childKey))) === null || ref3 === void 0 ? void 0 : ref3.parentKey;
|
|
794
789
|
layoutInfo = this.getLayoutInfo(keyAbove);
|
|
795
790
|
}
|
|
796
791
|
if (layoutInfo) {
|
|
@@ -807,14 +802,16 @@ class $5fa895c7c356fbff$export$64943d2e59d72a29 extends $5HlfY$Layout {
|
|
|
807
802
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
808
803
|
let layoutInfo = this.getLayoutInfo(parentRowKey);
|
|
809
804
|
if (layoutInfo) {
|
|
805
|
+
var ref;
|
|
810
806
|
let pageY = Math.min(this.virtualizer.contentSize.height, layoutInfo.rect.y - layoutInfo.rect.height + this.virtualizer.visibleRect.height);
|
|
811
807
|
// If the node is so large that it spans multiple page heights, return the key of the item immediately below
|
|
812
808
|
// Otherwise keep going up until we exceed a single page height worth of nodes
|
|
813
|
-
let keyBelow = this.collection.getItem(this.getKeyBelow(key))
|
|
809
|
+
let keyBelow = (ref = this.collection.getItem(this.getKeyBelow(key))) === null || ref === void 0 ? void 0 : ref.parentKey;
|
|
814
810
|
layoutInfo = this.getLayoutInfo(keyBelow);
|
|
815
811
|
if (layoutInfo && layoutInfo.rect.y < pageY) while(layoutInfo && layoutInfo.rect.y < pageY){
|
|
812
|
+
var ref4;
|
|
816
813
|
let childKey = this.collection.getItem(layoutInfo.key).childNodes[0].key;
|
|
817
|
-
let keyBelow = this.collection.getItem(this.getKeyBelow(childKey))
|
|
814
|
+
let keyBelow = (ref4 = this.collection.getItem(this.getKeyBelow(childKey))) === null || ref4 === void 0 ? void 0 : ref4.parentKey;
|
|
818
815
|
layoutInfo = this.getLayoutInfo(keyBelow);
|
|
819
816
|
}
|
|
820
817
|
if (layoutInfo) {
|
|
@@ -827,7 +824,7 @@ class $5fa895c7c356fbff$export$64943d2e59d72a29 extends $5HlfY$Layout {
|
|
|
827
824
|
getKeyForSearch(search, fromKey) {
|
|
828
825
|
if (!this.collator) return null;
|
|
829
826
|
let collection = this.collection;
|
|
830
|
-
let key = fromKey
|
|
827
|
+
let key = fromKey !== null && fromKey !== void 0 ? fromKey : this.getFirstKey();
|
|
831
828
|
let startItem = collection.getItem(key);
|
|
832
829
|
key = startItem.parentKey;
|
|
833
830
|
while(key != null){
|
|
@@ -842,23 +839,33 @@ class $5fa895c7c356fbff$export$64943d2e59d72a29 extends $5HlfY$Layout {
|
|
|
842
839
|
}
|
|
843
840
|
return null;
|
|
844
841
|
}
|
|
842
|
+
constructor(options = {
|
|
843
|
+
}){
|
|
844
|
+
super();
|
|
845
|
+
this.disabledKeys = new Set();
|
|
846
|
+
this.layoutInfos = new Map();
|
|
847
|
+
this.collator = options.collator;
|
|
848
|
+
this.lastCollection = null;
|
|
849
|
+
this.scale = options.scale || 'medium';
|
|
850
|
+
this.margin = options.margin || 24;
|
|
851
|
+
}
|
|
845
852
|
}
|
|
846
853
|
|
|
847
854
|
|
|
848
855
|
|
|
849
|
-
const $
|
|
856
|
+
const $3e8c06a2bf701494$var$DEFAULT_OPTIONS = {
|
|
850
857
|
S: {
|
|
851
858
|
idealRowHeight: 112,
|
|
852
|
-
minItemSize: new $
|
|
853
|
-
itemSpacing: new $
|
|
859
|
+
minItemSize: new $jxYob$Size(96, 96),
|
|
860
|
+
itemSpacing: new $jxYob$Size(8, 16),
|
|
854
861
|
itemPadding: 24,
|
|
855
862
|
dropSpacing: 50,
|
|
856
863
|
margin: 8
|
|
857
864
|
},
|
|
858
865
|
L: {
|
|
859
866
|
idealRowHeight: 208,
|
|
860
|
-
minItemSize: new $
|
|
861
|
-
itemSpacing: new $
|
|
867
|
+
minItemSize: new $jxYob$Size(136, 136),
|
|
868
|
+
itemSpacing: new $jxYob$Size(18, 18),
|
|
862
869
|
itemPadding: {
|
|
863
870
|
'medium': 78,
|
|
864
871
|
'large': 99
|
|
@@ -867,18 +874,7 @@ const $a4ebacd960847d9c$var$DEFAULT_OPTIONS = {
|
|
|
867
874
|
margin: 24
|
|
868
875
|
}
|
|
869
876
|
};
|
|
870
|
-
class $
|
|
871
|
-
constructor(options = {
|
|
872
|
-
}){
|
|
873
|
-
super(options);
|
|
874
|
-
let cardSize = 'L';
|
|
875
|
-
this.idealRowHeight = options.idealRowHeight || $a4ebacd960847d9c$var$DEFAULT_OPTIONS[cardSize].idealRowHeight;
|
|
876
|
-
this.itemSpacing = options.itemSpacing || $a4ebacd960847d9c$var$DEFAULT_OPTIONS[cardSize].itemSpacing;
|
|
877
|
-
this.itemPadding = options.itemPadding != null ? options.itemPadding : $a4ebacd960847d9c$var$DEFAULT_OPTIONS[cardSize].itemPadding[this.scale];
|
|
878
|
-
this.minItemSize = options.minItemSize || $a4ebacd960847d9c$var$DEFAULT_OPTIONS[cardSize].minItemSize;
|
|
879
|
-
this.threshold = options.threshold || 1;
|
|
880
|
-
this.margin = options.margin != null ? options.margin : $a4ebacd960847d9c$var$DEFAULT_OPTIONS[cardSize].margin;
|
|
881
|
-
}
|
|
877
|
+
class $3e8c06a2bf701494$export$8e52095834484b61 extends $ca0f261acdd7bcf1$export$64943d2e59d72a29 {
|
|
882
878
|
get layoutType() {
|
|
883
879
|
return 'gallery';
|
|
884
880
|
}
|
|
@@ -946,7 +942,7 @@ class $a4ebacd960847d9c$export$8e52095834484b61 extends $5fa895c7c356fbff$export
|
|
|
946
942
|
if (availableWidth <= this.minItemSize.width * 2 + this.itemPadding * 2) rows = this.collection.size;
|
|
947
943
|
let weightedRatios = ratios.map((ratio)=>ratio < this.threshold ? ratio + 0.5 * (1 / ratio) : ratio
|
|
948
944
|
);
|
|
949
|
-
let partition = $
|
|
945
|
+
let partition = $3e8c06a2bf701494$var$linearPartition(weightedRatios, rows);
|
|
950
946
|
let index = 0;
|
|
951
947
|
for (let row of partition){
|
|
952
948
|
// Compute the total weight for this row
|
|
@@ -974,8 +970,8 @@ class $a4ebacd960847d9c$export$8e52095834484b61 extends $5fa895c7c356fbff$export
|
|
|
974
970
|
for(let j2 = index; j2 < index + row.length; j2++){
|
|
975
971
|
let node = this.collection.rows[j2];
|
|
976
972
|
let itemWidth = Math.max(widths[j2 - index][1], this.minItemSize.width);
|
|
977
|
-
let rect = new $
|
|
978
|
-
let layoutInfo = new $
|
|
973
|
+
let rect = new $jxYob$Rect(x, y, itemWidth, itemHeight);
|
|
974
|
+
let layoutInfo = new $jxYob$LayoutInfo(node.type, node.key, rect);
|
|
979
975
|
layoutInfo.allowOverflow = true;
|
|
980
976
|
this.layoutInfos.set(node.key, layoutInfo);
|
|
981
977
|
x += itemWidth + this.itemSpacing.width;
|
|
@@ -992,23 +988,34 @@ class $a4ebacd960847d9c$export$8e52095834484b61 extends $5fa895c7c356fbff$export
|
|
|
992
988
|
loaderY = 0;
|
|
993
989
|
loaderHeight = visibleHeight || 60;
|
|
994
990
|
}
|
|
995
|
-
let rect = new $
|
|
996
|
-
let loader = new $
|
|
991
|
+
let rect = new $jxYob$Rect(0, loaderY, visibleWidth, loaderHeight);
|
|
992
|
+
let loader = new $jxYob$LayoutInfo('loader', 'loader', rect);
|
|
997
993
|
this.layoutInfos.set('loader', loader);
|
|
998
994
|
y = loader.rect.maxY;
|
|
999
995
|
}
|
|
1000
996
|
if (this.collection.size === 0 && !this.isLoading) {
|
|
1001
|
-
let rect = new $
|
|
1002
|
-
let placeholder = new $
|
|
997
|
+
let rect = new $jxYob$Rect(0, 0, visibleWidth, visibleHeight);
|
|
998
|
+
let placeholder = new $jxYob$LayoutInfo('placeholder', 'placeholder', rect);
|
|
1003
999
|
this.layoutInfos.set('placeholder', placeholder);
|
|
1004
1000
|
y = placeholder.rect.maxY;
|
|
1005
1001
|
}
|
|
1006
1002
|
}
|
|
1007
|
-
this.contentSize = new $
|
|
1003
|
+
this.contentSize = new $jxYob$Size(visibleWidth, y);
|
|
1004
|
+
}
|
|
1005
|
+
constructor(options = {
|
|
1006
|
+
}){
|
|
1007
|
+
super(options);
|
|
1008
|
+
let cardSize = 'L';
|
|
1009
|
+
this.idealRowHeight = options.idealRowHeight || $3e8c06a2bf701494$var$DEFAULT_OPTIONS[cardSize].idealRowHeight;
|
|
1010
|
+
this.itemSpacing = options.itemSpacing || $3e8c06a2bf701494$var$DEFAULT_OPTIONS[cardSize].itemSpacing;
|
|
1011
|
+
this.itemPadding = options.itemPadding != null ? options.itemPadding : $3e8c06a2bf701494$var$DEFAULT_OPTIONS[cardSize].itemPadding[this.scale];
|
|
1012
|
+
this.minItemSize = options.minItemSize || $3e8c06a2bf701494$var$DEFAULT_OPTIONS[cardSize].minItemSize;
|
|
1013
|
+
this.threshold = options.threshold || 1;
|
|
1014
|
+
this.margin = options.margin != null ? options.margin : $3e8c06a2bf701494$var$DEFAULT_OPTIONS[cardSize].margin;
|
|
1008
1015
|
}
|
|
1009
1016
|
}
|
|
1010
1017
|
// https://www8.cs.umu.se/kurser/TDBA77/VT06/algorithms/BOOK/BOOK2/NODE45.HTM
|
|
1011
|
-
function $
|
|
1018
|
+
function $3e8c06a2bf701494$var$linearPartition(seq, k) {
|
|
1012
1019
|
let n = seq.length;
|
|
1013
1020
|
if (k <= 0) return [];
|
|
1014
1021
|
if (k >= n) return seq.map((x)=>[
|
|
@@ -1058,20 +1065,20 @@ function $a4ebacd960847d9c$var$linearPartition(seq, k) {
|
|
|
1058
1065
|
}
|
|
1059
1066
|
|
|
1060
1067
|
|
|
1061
|
-
var $
|
|
1068
|
+
var $bf549ee623ef44de$exports = {};
|
|
1062
1069
|
|
|
1063
|
-
$parcel$export($
|
|
1070
|
+
$parcel$export($bf549ee623ef44de$exports, "GridLayout", () => $bf549ee623ef44de$export$7d2b12578154a735);
|
|
1064
1071
|
|
|
1065
1072
|
|
|
1066
|
-
const $
|
|
1073
|
+
const $bf549ee623ef44de$var$DEFAULT_OPTIONS = {
|
|
1067
1074
|
S: {
|
|
1068
1075
|
itemPadding: 20,
|
|
1069
1076
|
minItemSize: {
|
|
1070
|
-
'vertical': new $
|
|
1077
|
+
'vertical': new $jxYob$Size(96, 96)
|
|
1071
1078
|
},
|
|
1072
|
-
maxItemSize: new $
|
|
1079
|
+
maxItemSize: new $jxYob$Size(Infinity, Infinity),
|
|
1073
1080
|
margin: 8,
|
|
1074
|
-
minSpace: new $
|
|
1081
|
+
minSpace: new $jxYob$Size(6, 6),
|
|
1075
1082
|
maxColumns: Infinity,
|
|
1076
1083
|
dropSpacing: 50
|
|
1077
1084
|
},
|
|
@@ -1087,33 +1094,17 @@ const $518ec229733533c6$var$DEFAULT_OPTIONS = {
|
|
|
1087
1094
|
}
|
|
1088
1095
|
},
|
|
1089
1096
|
minItemSize: {
|
|
1090
|
-
'vertical': new $
|
|
1091
|
-
'horizontal': new $
|
|
1097
|
+
'vertical': new $jxYob$Size(208, 208),
|
|
1098
|
+
'horizontal': new $jxYob$Size(102, 102)
|
|
1092
1099
|
},
|
|
1093
|
-
maxItemSize: new $
|
|
1100
|
+
maxItemSize: new $jxYob$Size(Infinity, Infinity),
|
|
1094
1101
|
margin: 24,
|
|
1095
|
-
minSpace: new $
|
|
1102
|
+
minSpace: new $jxYob$Size(18, 18),
|
|
1096
1103
|
maxColumns: Infinity,
|
|
1097
1104
|
dropSpacing: 100
|
|
1098
1105
|
}
|
|
1099
1106
|
};
|
|
1100
|
-
class $
|
|
1101
|
-
constructor(options = {
|
|
1102
|
-
}){
|
|
1103
|
-
super(options);
|
|
1104
|
-
let cardSize = 'L';
|
|
1105
|
-
this.cardOrientation = options.cardOrientation || 'vertical';
|
|
1106
|
-
this.minItemSize = options.minItemSize || $518ec229733533c6$var$DEFAULT_OPTIONS[cardSize].minItemSize[this.cardOrientation];
|
|
1107
|
-
this.maxItemSize = options.maxItemSize || $518ec229733533c6$var$DEFAULT_OPTIONS[cardSize].maxItemSize;
|
|
1108
|
-
this.margin = options.margin != null ? options.margin : $518ec229733533c6$var$DEFAULT_OPTIONS[cardSize].margin;
|
|
1109
|
-
this.minSpace = options.minSpace || $518ec229733533c6$var$DEFAULT_OPTIONS[cardSize].minSpace;
|
|
1110
|
-
this.maxColumns = options.maxColumns || $518ec229733533c6$var$DEFAULT_OPTIONS[cardSize].maxColumns;
|
|
1111
|
-
this.itemPadding = options.itemPadding != null ? options.itemPadding : $518ec229733533c6$var$DEFAULT_OPTIONS[cardSize].itemPadding[this.cardOrientation][this.scale];
|
|
1112
|
-
this.itemSize = null;
|
|
1113
|
-
this.numColumns = 0;
|
|
1114
|
-
this.numRows = 0;
|
|
1115
|
-
this.horizontalSpacing = 0;
|
|
1116
|
-
}
|
|
1107
|
+
class $bf549ee623ef44de$export$7d2b12578154a735 extends $ca0f261acdd7bcf1$export$64943d2e59d72a29 {
|
|
1117
1108
|
get layoutType() {
|
|
1118
1109
|
return 'grid';
|
|
1119
1110
|
}
|
|
@@ -1166,7 +1157,7 @@ class $518ec229733533c6$export$7d2b12578154a735 extends $5fa895c7c356fbff$export
|
|
|
1166
1157
|
let t = (itemWidth - minCardWidth) / minCardWidth;
|
|
1167
1158
|
let itemHeight = Math.floor(this.minItemSize.height + this.minItemSize.height * t);
|
|
1168
1159
|
itemHeight = Math.max(this.minItemSize.height, Math.min(this.maxItemSize.height, itemHeight)) + verticalItemPadding;
|
|
1169
|
-
this.itemSize = new $
|
|
1160
|
+
this.itemSize = new $jxYob$Size(itemWidth, itemHeight);
|
|
1170
1161
|
// Compute the horizontal spacing and content height
|
|
1171
1162
|
this.horizontalSpacing = this.numColumns < 2 ? 0 : Math.floor((availableWidth - this.numColumns * this.itemSize.width) / (this.numColumns - 1));
|
|
1172
1163
|
let y = this.margin;
|
|
@@ -1185,27 +1176,27 @@ class $518ec229733533c6$export$7d2b12578154a735 extends $5fa895c7c356fbff$export
|
|
|
1185
1176
|
loaderY = 0;
|
|
1186
1177
|
loaderHeight = visibleHeight || 60;
|
|
1187
1178
|
}
|
|
1188
|
-
let rect = new $
|
|
1189
|
-
let loader = new $
|
|
1179
|
+
let rect = new $jxYob$Rect(0, loaderY, visibleWidth, loaderHeight);
|
|
1180
|
+
let loader = new $jxYob$LayoutInfo('loader', 'loader', rect);
|
|
1190
1181
|
this.layoutInfos.set('loader', loader);
|
|
1191
1182
|
y = loader.rect.maxY;
|
|
1192
1183
|
}
|
|
1193
1184
|
if (this.collection.size === 0 && !this.isLoading) {
|
|
1194
|
-
let rect = new $
|
|
1195
|
-
let placeholder = new $
|
|
1185
|
+
let rect = new $jxYob$Rect(0, 0, visibleWidth, visibleHeight);
|
|
1186
|
+
let placeholder = new $jxYob$LayoutInfo('placeholder', 'placeholder', rect);
|
|
1196
1187
|
this.layoutInfos.set('placeholder', placeholder);
|
|
1197
1188
|
y = placeholder.rect.maxY;
|
|
1198
1189
|
}
|
|
1199
|
-
this.contentSize = new $
|
|
1190
|
+
this.contentSize = new $jxYob$Size(visibleWidth, y);
|
|
1200
1191
|
}
|
|
1201
1192
|
buildChild(node, y, index) {
|
|
1202
1193
|
let row = Math.floor(index / this.numColumns);
|
|
1203
1194
|
let column = index % this.numColumns;
|
|
1204
1195
|
let x = this.margin + column * (this.itemSize.width + this.horizontalSpacing);
|
|
1205
1196
|
y = this.margin + row * (this.itemSize.height + this.minSpace.height);
|
|
1206
|
-
let rect = new $
|
|
1197
|
+
let rect = new $jxYob$Rect(x, y, this.itemSize.width, this.itemSize.height);
|
|
1207
1198
|
// TODO: Perhaps have it so that the child key for each row is stored with the layoutInfo?
|
|
1208
|
-
let layoutInfo = new $
|
|
1199
|
+
let layoutInfo = new $jxYob$LayoutInfo(node.type, node.key, rect);
|
|
1209
1200
|
layoutInfo.allowOverflow = true;
|
|
1210
1201
|
this.layoutInfos.set(node.key, layoutInfo);
|
|
1211
1202
|
return layoutInfo;
|
|
@@ -1214,6 +1205,7 @@ class $518ec229733533c6$export$7d2b12578154a735 extends $5fa895c7c356fbff$export
|
|
|
1214
1205
|
// 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
|
|
1215
1206
|
// collection contents by that number (which will give us the row distribution)
|
|
1216
1207
|
getKeyBelow(key) {
|
|
1208
|
+
var ref;
|
|
1217
1209
|
// Expected key is the currently focused cell so we need the parent row key
|
|
1218
1210
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
1219
1211
|
let indexRowBelow;
|
|
@@ -1221,9 +1213,10 @@ class $518ec229733533c6$export$7d2b12578154a735 extends $5fa895c7c356fbff$export
|
|
|
1221
1213
|
);
|
|
1222
1214
|
if (index !== -1) indexRowBelow = index + this.numColumns;
|
|
1223
1215
|
else return null;
|
|
1224
|
-
return this.collection.rows[indexRowBelow]
|
|
1216
|
+
return ((ref = this.collection.rows[indexRowBelow]) === null || ref === void 0 ? void 0 : ref.childNodes[0].key) || null;
|
|
1225
1217
|
}
|
|
1226
1218
|
getKeyAbove(key) {
|
|
1219
|
+
var ref;
|
|
1227
1220
|
// Expected key is the currently focused cell so we need the parent row key
|
|
1228
1221
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
1229
1222
|
let indexRowAbove;
|
|
@@ -1231,32 +1224,33 @@ class $518ec229733533c6$export$7d2b12578154a735 extends $5fa895c7c356fbff$export
|
|
|
1231
1224
|
);
|
|
1232
1225
|
if (index !== -1) indexRowAbove = index - this.numColumns;
|
|
1233
1226
|
else return null;
|
|
1234
|
-
return this.collection.rows[indexRowAbove]
|
|
1227
|
+
return ((ref = this.collection.rows[indexRowAbove]) === null || ref === void 0 ? void 0 : ref.childNodes[0].key) || null;
|
|
1228
|
+
}
|
|
1229
|
+
constructor(options = {
|
|
1230
|
+
}){
|
|
1231
|
+
super(options);
|
|
1232
|
+
let cardSize = 'L';
|
|
1233
|
+
this.cardOrientation = options.cardOrientation || 'vertical';
|
|
1234
|
+
this.minItemSize = options.minItemSize || $bf549ee623ef44de$var$DEFAULT_OPTIONS[cardSize].minItemSize[this.cardOrientation];
|
|
1235
|
+
this.maxItemSize = options.maxItemSize || $bf549ee623ef44de$var$DEFAULT_OPTIONS[cardSize].maxItemSize;
|
|
1236
|
+
this.margin = options.margin != null ? options.margin : $bf549ee623ef44de$var$DEFAULT_OPTIONS[cardSize].margin;
|
|
1237
|
+
this.minSpace = options.minSpace || $bf549ee623ef44de$var$DEFAULT_OPTIONS[cardSize].minSpace;
|
|
1238
|
+
this.maxColumns = options.maxColumns || $bf549ee623ef44de$var$DEFAULT_OPTIONS[cardSize].maxColumns;
|
|
1239
|
+
this.itemPadding = options.itemPadding != null ? options.itemPadding : $bf549ee623ef44de$var$DEFAULT_OPTIONS[cardSize].itemPadding[this.cardOrientation][this.scale];
|
|
1240
|
+
this.itemSize = null;
|
|
1241
|
+
this.numColumns = 0;
|
|
1242
|
+
this.numRows = 0;
|
|
1243
|
+
this.horizontalSpacing = 0;
|
|
1235
1244
|
}
|
|
1236
1245
|
}
|
|
1237
1246
|
|
|
1238
1247
|
|
|
1239
|
-
var $
|
|
1248
|
+
var $e85179af2192bb94$exports = {};
|
|
1240
1249
|
|
|
1241
|
-
$parcel$export($
|
|
1250
|
+
$parcel$export($e85179af2192bb94$exports, "WaterfallLayout", () => $e85179af2192bb94$export$e9f7cda058ba8df8);
|
|
1242
1251
|
|
|
1243
1252
|
|
|
1244
|
-
class $
|
|
1245
|
-
constructor(options = {
|
|
1246
|
-
}){
|
|
1247
|
-
// TODO: WaterfallLayout doesn't use card size in v2, but perhaps it should support it? Perhaps it would modify
|
|
1248
|
-
// minItemSize defaults or other things
|
|
1249
|
-
super(options);
|
|
1250
|
-
this.minItemSize = options.minItemSize || new $5HlfY$Size(240, 136);
|
|
1251
|
-
this.maxItemSize = options.maxItemSize || new $5HlfY$Size(Infinity, Infinity);
|
|
1252
|
-
this.margin = options.margin != null ? options.margin : 24;
|
|
1253
|
-
this.minSpace = options.minSpace || new $5HlfY$Size(18, 18);
|
|
1254
|
-
this.maxColumns = options.maxColumns || Infinity;
|
|
1255
|
-
this.itemWidth = 0;
|
|
1256
|
-
this.numColumns = 0;
|
|
1257
|
-
this.lastCollection = null;
|
|
1258
|
-
this.collator = options.collator;
|
|
1259
|
-
}
|
|
1253
|
+
class $e85179af2192bb94$export$e9f7cda058ba8df8 extends $ca0f261acdd7bcf1$export$64943d2e59d72a29 {
|
|
1260
1254
|
get layoutType() {
|
|
1261
1255
|
return 'waterfall';
|
|
1262
1256
|
}
|
|
@@ -1298,8 +1292,8 @@ class $eb50f2ca3a53d913$export$e9f7cda058ba8df8 extends $5fa895c7c356fbff$export
|
|
|
1298
1292
|
let column = this.getNextColumnIndex(columnHeights);
|
|
1299
1293
|
let x = this.margin + column * (itemWidth + horizontalSpacing);
|
|
1300
1294
|
let y = columnHeights[column];
|
|
1301
|
-
let rect = new $
|
|
1302
|
-
let layoutInfo = new $
|
|
1295
|
+
let rect = new $jxYob$Rect(x, y, itemWidth, height);
|
|
1296
|
+
let layoutInfo = new $jxYob$LayoutInfo(node.type, key, rect);
|
|
1303
1297
|
layoutInfo.estimatedSize = estimatedSize;
|
|
1304
1298
|
layoutInfo.allowOverflow = true;
|
|
1305
1299
|
this.layoutInfos.set(key, layoutInfo);
|
|
@@ -1323,18 +1317,18 @@ class $eb50f2ca3a53d913$export$e9f7cda058ba8df8 extends $5fa895c7c356fbff$export
|
|
|
1323
1317
|
loaderY = 0;
|
|
1324
1318
|
loaderHeight = this.virtualizer.visibleRect.height || 60;
|
|
1325
1319
|
}
|
|
1326
|
-
let rect = new $
|
|
1327
|
-
let loader = new $
|
|
1320
|
+
let rect = new $jxYob$Rect(0, loaderY, this.virtualizer.visibleRect.width, loaderHeight);
|
|
1321
|
+
let loader = new $jxYob$LayoutInfo('loader', 'loader', rect);
|
|
1328
1322
|
this.layoutInfos.set('loader', loader);
|
|
1329
1323
|
y = loader.rect.maxY;
|
|
1330
1324
|
}
|
|
1331
1325
|
if (this.collection.size === 0 && !this.isLoading) {
|
|
1332
|
-
let rect = new $
|
|
1333
|
-
let placeholder = new $
|
|
1326
|
+
let rect = new $jxYob$Rect(0, 0, this.virtualizer.visibleRect.width, this.virtualizer.visibleRect.height);
|
|
1327
|
+
let placeholder = new $jxYob$LayoutInfo('placeholder', 'placeholder', rect);
|
|
1334
1328
|
this.layoutInfos.set('placeholder', placeholder);
|
|
1335
1329
|
y = placeholder.rect.maxY;
|
|
1336
1330
|
}
|
|
1337
|
-
this.contentSize = new $
|
|
1331
|
+
this.contentSize = new $jxYob$Size(this.virtualizer.visibleRect.width, y);
|
|
1338
1332
|
}
|
|
1339
1333
|
updateItemSize(key, size) {
|
|
1340
1334
|
let layoutInfo = this.layoutInfos.get(key);
|
|
@@ -1356,29 +1350,33 @@ class $eb50f2ca3a53d913$export$e9f7cda058ba8df8 extends $5fa895c7c356fbff$export
|
|
|
1356
1350
|
return minIndex;
|
|
1357
1351
|
}
|
|
1358
1352
|
getClosestRight(key) {
|
|
1353
|
+
var ref, ref1, ref2;
|
|
1359
1354
|
let layoutInfo = this.getLayoutInfo(key);
|
|
1360
1355
|
// Refactored from v2. Current strategy is to find the closest card in the adjacent column.
|
|
1361
1356
|
// 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
|
|
1362
1357
|
// and thus the top corner to top corner distance was massive.
|
|
1363
1358
|
// 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
|
|
1364
|
-
let rect = new $
|
|
1365
|
-
key = this._findClosest(layoutInfo.rect, rect)
|
|
1359
|
+
let rect = new $jxYob$Rect(layoutInfo.rect.maxX + 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);
|
|
1360
|
+
key = (ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key;
|
|
1366
1361
|
if (!key) {
|
|
1367
|
-
|
|
1368
|
-
|
|
1362
|
+
var ref3;
|
|
1363
|
+
rect = new $jxYob$Rect(layoutInfo.rect.maxX + 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
|
|
1364
|
+
key = (ref3 = this._findClosest(layoutInfo.rect, rect)) === null || ref3 === void 0 ? void 0 : ref3.key;
|
|
1369
1365
|
}
|
|
1370
|
-
return this.collection.getItem(key)
|
|
1366
|
+
return (ref2 = (ref1 = this.collection.getItem(key)) === null || ref1 === void 0 ? void 0 : ref1.childNodes[0]) === null || ref2 === void 0 ? void 0 : ref2.key;
|
|
1371
1367
|
}
|
|
1372
1368
|
getClosestLeft(key) {
|
|
1369
|
+
var ref, ref4, ref5;
|
|
1373
1370
|
let layoutInfo = this.getLayoutInfo(key);
|
|
1374
1371
|
// 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
|
|
1375
|
-
let rect = new $
|
|
1376
|
-
key = this._findClosest(layoutInfo.rect, rect)
|
|
1372
|
+
let rect = new $jxYob$Rect(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, layoutInfo.rect.y, layoutInfo.rect.width + this.horizontalSpacing, layoutInfo.rect.height);
|
|
1373
|
+
key = (ref = this._findClosest(layoutInfo.rect, rect)) === null || ref === void 0 ? void 0 : ref.key;
|
|
1377
1374
|
if (!key) {
|
|
1378
|
-
|
|
1379
|
-
|
|
1375
|
+
var ref6;
|
|
1376
|
+
rect = new $jxYob$Rect(layoutInfo.rect.x - layoutInfo.rect.width - this.horizontalSpacing - 1, 0, layoutInfo.rect.width + this.horizontalSpacing, this.virtualizer.contentSize.height);
|
|
1377
|
+
key = (ref6 = this._findClosest(layoutInfo.rect, rect)) === null || ref6 === void 0 ? void 0 : ref6.key;
|
|
1380
1378
|
}
|
|
1381
|
-
return this.collection.getItem(key)
|
|
1379
|
+
return (ref5 = (ref4 = this.collection.getItem(key)) === null || ref4 === void 0 ? void 0 : ref4.childNodes[0]) === null || ref5 === void 0 ? void 0 : ref5.key;
|
|
1382
1380
|
}
|
|
1383
1381
|
getKeyRightOf(key) {
|
|
1384
1382
|
// Expected key is the currently focused cell so we need the parent row key
|
|
@@ -1390,25 +1388,40 @@ class $eb50f2ca3a53d913$export$e9f7cda058ba8df8 extends $5fa895c7c356fbff$export
|
|
|
1390
1388
|
let parentRowKey = this.collection.getItem(key).parentKey;
|
|
1391
1389
|
return this.direction === 'rtl' ? this.getClosestRight(parentRowKey) : this.getClosestLeft(parentRowKey);
|
|
1392
1390
|
}
|
|
1391
|
+
constructor(options = {
|
|
1392
|
+
}){
|
|
1393
|
+
// TODO: WaterfallLayout doesn't use card size in v2, but perhaps it should support it? Perhaps it would modify
|
|
1394
|
+
// minItemSize defaults or other things
|
|
1395
|
+
super(options);
|
|
1396
|
+
this.minItemSize = options.minItemSize || new $jxYob$Size(240, 136);
|
|
1397
|
+
this.maxItemSize = options.maxItemSize || new $jxYob$Size(Infinity, Infinity);
|
|
1398
|
+
this.margin = options.margin != null ? options.margin : 24;
|
|
1399
|
+
this.minSpace = options.minSpace || new $jxYob$Size(18, 18);
|
|
1400
|
+
this.maxColumns = options.maxColumns || Infinity;
|
|
1401
|
+
this.itemWidth = 0;
|
|
1402
|
+
this.numColumns = 0;
|
|
1403
|
+
this.lastCollection = null;
|
|
1404
|
+
this.collator = options.collator;
|
|
1405
|
+
}
|
|
1393
1406
|
}
|
|
1394
1407
|
|
|
1395
1408
|
|
|
1396
|
-
var $
|
|
1409
|
+
var $58b03ffaa8d0f32f$exports = {};
|
|
1397
1410
|
|
|
1398
|
-
$parcel$export($
|
|
1411
|
+
$parcel$export($58b03ffaa8d0f32f$exports, "Card", () => $58b03ffaa8d0f32f$export$60332b2344f7fe41);
|
|
1399
1412
|
|
|
1400
1413
|
|
|
1401
1414
|
|
|
1402
|
-
let $
|
|
1403
|
-
let context = $
|
|
1415
|
+
let $58b03ffaa8d0f32f$var$Card = /*#__PURE__*/ $jxYob$forwardRef((props, ref)=>{
|
|
1416
|
+
let context = $1638ba17661c692d$export$fea0b38586ec8f13();
|
|
1404
1417
|
if (context !== null) return null;
|
|
1405
|
-
else return(/*#__PURE__*/ $
|
|
1418
|
+
else return(/*#__PURE__*/ $jxYob$react.createElement($2f067b98508c243e$export$7a6ccaf429ad93a8, {
|
|
1406
1419
|
...props,
|
|
1407
1420
|
ref: ref
|
|
1408
1421
|
}));
|
|
1409
1422
|
});
|
|
1410
1423
|
// @ts-ignore
|
|
1411
|
-
$
|
|
1424
|
+
$58b03ffaa8d0f32f$var$Card.getCollectionNode = function* getCollectionNode(props) {
|
|
1412
1425
|
let { children: children , textValue: textValue } = props;
|
|
1413
1426
|
yield {
|
|
1414
1427
|
type: 'item',
|
|
@@ -1419,10 +1432,10 @@ $a39f0127ee2764b3$var$Card.getCollectionNode = function* getCollectionNode(props
|
|
|
1419
1432
|
textValue: textValue
|
|
1420
1433
|
};
|
|
1421
1434
|
};
|
|
1422
|
-
let $
|
|
1435
|
+
let $58b03ffaa8d0f32f$export$60332b2344f7fe41 = $58b03ffaa8d0f32f$var$Card;
|
|
1423
1436
|
|
|
1424
1437
|
|
|
1425
1438
|
|
|
1426
1439
|
|
|
1427
|
-
export {$
|
|
1440
|
+
export {$388bc726678ad587$export$7e52c821f7b6f422 as CardView, $3e8c06a2bf701494$export$8e52095834484b61 as GalleryLayout, $bf549ee623ef44de$export$7d2b12578154a735 as GridLayout, $e85179af2192bb94$export$e9f7cda058ba8df8 as WaterfallLayout, $58b03ffaa8d0f32f$export$60332b2344f7fe41 as Card};
|
|
1428
1441
|
//# sourceMappingURL=module.js.map
|