@react-spectrum/card 3.0.0-alpha.30 → 3.0.0-alpha.32

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