primereact 10.0.0 → 10.0.1

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 (319) hide show
  1. package/README.md +1 -1
  2. package/componentbase/componentbase.cjs.js +12 -7
  3. package/componentbase/componentbase.cjs.min.js +1 -1
  4. package/componentbase/componentbase.esm.min.mjs +1 -1
  5. package/componentbase/componentbase.esm.mjs +12 -7
  6. package/componentbase/componentbase.js +12 -7
  7. package/componentbase/componentbase.min.js +1 -1
  8. package/core/core.js +12 -7
  9. package/core/core.min.js +1 -1
  10. package/package.json +1 -1
  11. package/primereact.all.cjs.js +12 -7
  12. package/primereact.all.cjs.min.js +1 -1
  13. package/primereact.all.esm.min.mjs +1 -1
  14. package/primereact.all.esm.mjs +12 -7
  15. package/primereact.all.js +12 -7
  16. package/primereact.all.min.js +1 -1
  17. package/web-types.json +1 -1
  18. package/accordion/accordion.esm.js +0 -421
  19. package/accordion/accordion.esm.min.js +0 -1
  20. package/api/api.esm.js +0 -944
  21. package/api/api.esm.min.js +0 -1
  22. package/autocomplete/autocomplete.esm.js +0 -1127
  23. package/autocomplete/autocomplete.esm.min.js +0 -1
  24. package/avatar/avatar.esm.js +0 -245
  25. package/avatar/avatar.esm.min.js +0 -1
  26. package/avatargroup/avatargroup.esm.js +0 -55
  27. package/avatargroup/avatargroup.esm.min.js +0 -1
  28. package/badge/badge.esm.js +0 -110
  29. package/badge/badge.esm.min.js +0 -1
  30. package/blockui/blockui.esm.js +0 -265
  31. package/blockui/blockui.esm.min.js +0 -1
  32. package/breadcrumb/breadcrumb.esm.js +0 -351
  33. package/breadcrumb/breadcrumb.esm.min.js +0 -1
  34. package/button/button.esm.js +0 -295
  35. package/button/button.esm.min.js +0 -1
  36. package/calendar/calendar.esm.js +0 -3473
  37. package/calendar/calendar.esm.min.js +0 -1
  38. package/card/card.esm.js +0 -98
  39. package/card/card.esm.min.js +0 -1
  40. package/carousel/carousel.esm.js +0 -801
  41. package/carousel/carousel.esm.min.js +0 -1
  42. package/cascadeselect/cascadeselect.esm.js +0 -819
  43. package/cascadeselect/cascadeselect.esm.min.js +0 -1
  44. package/chart/chart.esm.js +0 -155
  45. package/chart/chart.esm.min.js +0 -1
  46. package/checkbox/checkbox.esm.js +0 -357
  47. package/checkbox/checkbox.esm.min.js +0 -1
  48. package/chip/chip.esm.js +0 -248
  49. package/chip/chip.esm.min.js +0 -1
  50. package/chips/chips.esm.js +0 -501
  51. package/chips/chips.esm.min.js +0 -1
  52. package/colorpicker/colorpicker.esm.js +0 -788
  53. package/colorpicker/colorpicker.esm.min.js +0 -1
  54. package/column/column.esm.js +0 -8
  55. package/column/column.esm.min.js +0 -1
  56. package/columngroup/columngroup.esm.js +0 -6
  57. package/columngroup/columngroup.esm.min.js +0 -1
  58. package/componentbase/componentbase.esm.js +0 -323
  59. package/componentbase/componentbase.esm.min.js +0 -1
  60. package/confirmdialog/confirmdialog.esm.js +0 -376
  61. package/confirmdialog/confirmdialog.esm.min.js +0 -1
  62. package/confirmpopup/confirmpopup.esm.js +0 -610
  63. package/confirmpopup/confirmpopup.esm.min.js +0 -1
  64. package/contextmenu/contextmenu.esm.js +0 -664
  65. package/contextmenu/contextmenu.esm.min.js +0 -1
  66. package/csstransition/csstransition.esm.js +0 -138
  67. package/csstransition/csstransition.esm.min.js +0 -1
  68. package/datascroller/datascroller.esm.js +0 -320
  69. package/datascroller/datascroller.esm.min.js +0 -1
  70. package/datatable/datatable.esm.js +0 -6636
  71. package/datatable/datatable.esm.min.js +0 -1
  72. package/dataview/dataview.esm.js +0 -506
  73. package/dataview/dataview.esm.min.js +0 -1
  74. package/deferredcontent/deferredcontent.esm.js +0 -133
  75. package/deferredcontent/deferredcontent.esm.min.js +0 -1
  76. package/dialog/dialog.esm.js +0 -983
  77. package/dialog/dialog.esm.min.js +0 -1
  78. package/divider/divider.esm.js +0 -79
  79. package/divider/divider.esm.min.js +0 -1
  80. package/dock/dock.esm.js +0 -348
  81. package/dock/dock.esm.min.js +0 -1
  82. package/dropdown/dropdown.esm.js +0 -1380
  83. package/dropdown/dropdown.esm.min.js +0 -1
  84. package/editor/editor.esm.js +0 -338
  85. package/editor/editor.esm.min.js +0 -1
  86. package/fieldset/fieldset.esm.js +0 -270
  87. package/fieldset/fieldset.esm.min.js +0 -1
  88. package/fileupload/fileupload.esm.js +0 -1005
  89. package/fileupload/fileupload.esm.min.js +0 -1
  90. package/galleria/galleria.esm.js +0 -1090
  91. package/galleria/galleria.esm.min.js +0 -1
  92. package/hooks/hooks.esm.js +0 -1042
  93. package/hooks/hooks.esm.min.js +0 -1
  94. package/iconbase/iconbase.esm.js +0 -33
  95. package/iconbase/iconbase.esm.min.js +0 -1
  96. package/icons/angledoubledown/index.esm.js +0 -39
  97. package/icons/angledoubledown/index.esm.min.js +0 -1
  98. package/icons/angledoubleleft/index.esm.js +0 -39
  99. package/icons/angledoubleleft/index.esm.min.js +0 -1
  100. package/icons/angledoubleright/index.esm.js +0 -39
  101. package/icons/angledoubleright/index.esm.min.js +0 -1
  102. package/icons/angledoubleup/index.esm.js +0 -39
  103. package/icons/angledoubleup/index.esm.min.js +0 -1
  104. package/icons/angledown/index.esm.js +0 -37
  105. package/icons/angledown/index.esm.min.js +0 -1
  106. package/icons/angleleft/index.esm.js +0 -37
  107. package/icons/angleleft/index.esm.min.js +0 -1
  108. package/icons/angleright/index.esm.js +0 -37
  109. package/icons/angleright/index.esm.min.js +0 -1
  110. package/icons/angleup/index.esm.js +0 -37
  111. package/icons/angleup/index.esm.min.js +0 -1
  112. package/icons/arrowdown/index.esm.js +0 -661
  113. package/icons/arrowdown/index.esm.min.js +0 -1
  114. package/icons/arrowup/index.esm.js +0 -661
  115. package/icons/arrowup/index.esm.min.js +0 -1
  116. package/icons/ban/index.esm.js +0 -659
  117. package/icons/ban/index.esm.min.js +0 -1
  118. package/icons/bars/index.esm.js +0 -39
  119. package/icons/bars/index.esm.min.js +0 -1
  120. package/icons/calendar/index.esm.js +0 -37
  121. package/icons/calendar/index.esm.min.js +0 -1
  122. package/icons/check/index.esm.js +0 -37
  123. package/icons/check/index.esm.min.js +0 -1
  124. package/icons/chevrondown/index.esm.js +0 -37
  125. package/icons/chevrondown/index.esm.min.js +0 -1
  126. package/icons/chevronleft/index.esm.js +0 -37
  127. package/icons/chevronleft/index.esm.min.js +0 -1
  128. package/icons/chevronright/index.esm.js +0 -37
  129. package/icons/chevronright/index.esm.min.js +0 -1
  130. package/icons/chevronup/index.esm.js +0 -37
  131. package/icons/chevronup/index.esm.min.js +0 -1
  132. package/icons/download/index.esm.js +0 -661
  133. package/icons/download/index.esm.min.js +0 -1
  134. package/icons/exclamationtriangle/index.esm.js +0 -665
  135. package/icons/exclamationtriangle/index.esm.min.js +0 -1
  136. package/icons/eye/index.esm.js +0 -39
  137. package/icons/eye/index.esm.min.js +0 -1
  138. package/icons/eyeslash/index.esm.js +0 -661
  139. package/icons/eyeslash/index.esm.min.js +0 -1
  140. package/icons/filter/index.esm.js +0 -659
  141. package/icons/filter/index.esm.min.js +0 -1
  142. package/icons/filterslash/index.esm.js +0 -661
  143. package/icons/filterslash/index.esm.min.js +0 -1
  144. package/icons/infocircle/index.esm.js +0 -661
  145. package/icons/infocircle/index.esm.min.js +0 -1
  146. package/icons/minus/index.esm.js +0 -37
  147. package/icons/minus/index.esm.min.js +0 -1
  148. package/icons/pencil/index.esm.js +0 -659
  149. package/icons/pencil/index.esm.min.js +0 -1
  150. package/icons/plus/index.esm.js +0 -659
  151. package/icons/plus/index.esm.min.js +0 -1
  152. package/icons/refresh/index.esm.js +0 -661
  153. package/icons/refresh/index.esm.min.js +0 -1
  154. package/icons/search/index.esm.js +0 -661
  155. package/icons/search/index.esm.min.js +0 -1
  156. package/icons/searchminus/index.esm.js +0 -661
  157. package/icons/searchminus/index.esm.min.js +0 -1
  158. package/icons/searchplus/index.esm.js +0 -661
  159. package/icons/searchplus/index.esm.min.js +0 -1
  160. package/icons/sortalt/index.esm.js +0 -668
  161. package/icons/sortalt/index.esm.min.js +0 -1
  162. package/icons/sortamountdown/index.esm.js +0 -674
  163. package/icons/sortamountdown/index.esm.min.js +0 -1
  164. package/icons/sortamountupalt/index.esm.js +0 -674
  165. package/icons/sortamountupalt/index.esm.min.js +0 -1
  166. package/icons/spinner/index.esm.js +0 -659
  167. package/icons/spinner/index.esm.min.js +0 -1
  168. package/icons/star/index.esm.js +0 -659
  169. package/icons/star/index.esm.min.js +0 -1
  170. package/icons/starfill/index.esm.js +0 -659
  171. package/icons/starfill/index.esm.min.js +0 -1
  172. package/icons/thlarge/index.esm.js +0 -661
  173. package/icons/thlarge/index.esm.min.js +0 -1
  174. package/icons/times/index.esm.js +0 -37
  175. package/icons/times/index.esm.min.js +0 -1
  176. package/icons/timescircle/index.esm.js +0 -661
  177. package/icons/timescircle/index.esm.min.js +0 -1
  178. package/icons/trash/index.esm.js +0 -661
  179. package/icons/trash/index.esm.min.js +0 -1
  180. package/icons/undo/index.esm.js +0 -661
  181. package/icons/undo/index.esm.min.js +0 -1
  182. package/icons/upload/index.esm.js +0 -661
  183. package/icons/upload/index.esm.min.js +0 -1
  184. package/icons/windowmaximize/index.esm.js +0 -661
  185. package/icons/windowmaximize/index.esm.min.js +0 -1
  186. package/icons/windowminimize/index.esm.js +0 -661
  187. package/icons/windowminimize/index.esm.min.js +0 -1
  188. package/image/image.esm.js +0 -1162
  189. package/image/image.esm.min.js +0 -1
  190. package/inplace/inplace.esm.js +0 -243
  191. package/inplace/inplace.esm.min.js +0 -1
  192. package/inputmask/inputmask.esm.js +0 -560
  193. package/inputmask/inputmask.esm.min.js +0 -1
  194. package/inputnumber/inputnumber.esm.js +0 -1209
  195. package/inputnumber/inputnumber.esm.min.js +0 -1
  196. package/inputswitch/inputswitch.esm.js +0 -291
  197. package/inputswitch/inputswitch.esm.min.js +0 -1
  198. package/inputtext/inputtext.esm.js +0 -171
  199. package/inputtext/inputtext.esm.min.js +0 -1
  200. package/inputtextarea/inputtextarea.esm.js +0 -220
  201. package/inputtextarea/inputtextarea.esm.min.js +0 -1
  202. package/keyfilter/keyfilter.esm.js +0 -108
  203. package/keyfilter/keyfilter.esm.min.js +0 -1
  204. package/knob/knob.esm.js +0 -318
  205. package/knob/knob.esm.min.js +0 -1
  206. package/listbox/listbox.esm.js +0 -810
  207. package/listbox/listbox.esm.min.js +0 -1
  208. package/megamenu/megamenu.esm.js +0 -716
  209. package/megamenu/megamenu.esm.min.js +0 -1
  210. package/mention/mention.esm.js +0 -771
  211. package/mention/mention.esm.min.js +0 -1
  212. package/menu/menu.esm.js +0 -485
  213. package/menu/menu.esm.min.js +0 -1
  214. package/menubar/menubar.esm.js +0 -584
  215. package/menubar/menubar.esm.min.js +0 -1
  216. package/message/message.esm.js +0 -169
  217. package/message/message.esm.min.js +0 -1
  218. package/messages/messages.esm.js +0 -439
  219. package/messages/messages.esm.min.js +0 -1
  220. package/multiselect/multiselect.esm.js +0 -1724
  221. package/multiselect/multiselect.esm.min.js +0 -1
  222. package/multistatecheckbox/multistatecheckbox.esm.js +0 -352
  223. package/multistatecheckbox/multistatecheckbox.esm.min.js +0 -1
  224. package/orderlist/orderlist.esm.js +0 -816
  225. package/orderlist/orderlist.esm.min.js +0 -1
  226. package/organizationchart/organizationchart.esm.js +0 -480
  227. package/organizationchart/organizationchart.esm.min.js +0 -1
  228. package/overlaypanel/overlaypanel.esm.js +0 -516
  229. package/overlaypanel/overlaypanel.esm.min.js +0 -1
  230. package/overlayservice/overlayservice.esm.js +0 -7
  231. package/overlayservice/overlayservice.esm.min.js +0 -1
  232. package/paginator/paginator.esm.js +0 -933
  233. package/paginator/paginator.esm.min.js +0 -1
  234. package/panel/panel.esm.js +0 -316
  235. package/panel/panel.esm.min.js +0 -1
  236. package/panelmenu/panelmenu.esm.js +0 -645
  237. package/panelmenu/panelmenu.esm.min.js +0 -1
  238. package/passthrough/index.esm.js +0 -71
  239. package/passthrough/index.esm.min.js +0 -1
  240. package/passthrough/tailwind/index.esm.js +0 -3509
  241. package/passthrough/tailwind/index.esm.min.js +0 -1
  242. package/password/password.esm.js +0 -567
  243. package/password/password.esm.min.js +0 -1
  244. package/picklist/picklist.esm.js +0 -1119
  245. package/picklist/picklist.esm.min.js +0 -1
  246. package/portal/portal.esm.js +0 -110
  247. package/portal/portal.esm.min.js +0 -1
  248. package/primereact.all.esm.js +0 -51646
  249. package/primereact.all.esm.min.js +0 -1
  250. package/progressbar/progressbar.esm.js +0 -190
  251. package/progressbar/progressbar.esm.min.js +0 -1
  252. package/progressspinner/progressspinner.esm.js +0 -88
  253. package/progressspinner/progressspinner.esm.min.js +0 -1
  254. package/radiobutton/radiobutton.esm.js +0 -329
  255. package/radiobutton/radiobutton.esm.min.js +0 -1
  256. package/rating/rating.esm.js +0 -273
  257. package/rating/rating.esm.min.js +0 -1
  258. package/ripple/ripple.esm.js +0 -100
  259. package/ripple/ripple.esm.min.js +0 -1
  260. package/row/row.esm.js +0 -36
  261. package/row/row.esm.min.js +0 -1
  262. package/scrollpanel/scrollpanel.esm.js +0 -210
  263. package/scrollpanel/scrollpanel.esm.min.js +0 -1
  264. package/scrolltop/scrolltop.esm.js +0 -269
  265. package/scrolltop/scrolltop.esm.min.js +0 -1
  266. package/selectbutton/selectbutton.esm.js +0 -327
  267. package/selectbutton/selectbutton.esm.min.js +0 -1
  268. package/sidebar/sidebar.esm.js +0 -543
  269. package/sidebar/sidebar.esm.min.js +0 -1
  270. package/skeleton/skeleton.esm.js +0 -125
  271. package/skeleton/skeleton.esm.min.js +0 -1
  272. package/slidemenu/slidemenu.esm.js +0 -689
  273. package/slidemenu/slidemenu.esm.min.js +0 -1
  274. package/slider/slider.esm.js +0 -478
  275. package/slider/slider.esm.min.js +0 -1
  276. package/speeddial/speeddial.esm.js +0 -521
  277. package/speeddial/speeddial.esm.min.js +0 -1
  278. package/splitbutton/splitbutton.esm.js +0 -545
  279. package/splitbutton/splitbutton.esm.min.js +0 -1
  280. package/splitter/splitter.esm.js +0 -466
  281. package/splitter/splitter.esm.min.js +0 -1
  282. package/steps/steps.esm.js +0 -294
  283. package/steps/steps.esm.min.js +0 -1
  284. package/styleclass/styleclass.esm.js +0 -269
  285. package/styleclass/styleclass.esm.min.js +0 -1
  286. package/tabmenu/tabmenu.esm.js +0 -332
  287. package/tabmenu/tabmenu.esm.min.js +0 -1
  288. package/tabview/tabview.esm.js +0 -678
  289. package/tabview/tabview.esm.min.js +0 -1
  290. package/tag/tag.esm.js +0 -117
  291. package/tag/tag.esm.min.js +0 -1
  292. package/terminal/terminal.esm.js +0 -280
  293. package/terminal/terminal.esm.min.js +0 -1
  294. package/terminalservice/terminalservice.esm.js +0 -7
  295. package/terminalservice/terminalservice.esm.min.js +0 -1
  296. package/tieredmenu/tieredmenu.esm.js +0 -699
  297. package/tieredmenu/tieredmenu.esm.min.js +0 -1
  298. package/timeline/timeline.esm.js +0 -164
  299. package/timeline/timeline.esm.min.js +0 -1
  300. package/toast/toast.esm.js +0 -739
  301. package/toast/toast.esm.min.js +0 -1
  302. package/togglebutton/togglebutton.esm.js +0 -217
  303. package/togglebutton/togglebutton.esm.min.js +0 -1
  304. package/toolbar/toolbar.esm.js +0 -79
  305. package/toolbar/toolbar.esm.min.js +0 -1
  306. package/tooltip/tooltip.esm.js +0 -696
  307. package/tooltip/tooltip.esm.min.js +0 -1
  308. package/tree/tree.esm.js +0 -1403
  309. package/tree/tree.esm.min.js +0 -1
  310. package/treeselect/treeselect.esm.js +0 -930
  311. package/treeselect/treeselect.esm.min.js +0 -1
  312. package/treetable/treetable.esm.js +0 -3094
  313. package/treetable/treetable.esm.min.js +0 -1
  314. package/tristatecheckbox/tristatecheckbox.esm.js +0 -292
  315. package/tristatecheckbox/tristatecheckbox.esm.min.js +0 -1
  316. package/utils/utils.esm.js +0 -2383
  317. package/utils/utils.esm.min.js +0 -1
  318. package/virtualscroller/virtualscroller.esm.js +0 -972
  319. package/virtualscroller/virtualscroller.esm.min.js +0 -1
@@ -1,1090 +0,0 @@
1
- 'use client';
2
-
3
- import * as React from 'react';
4
- import PrimeReact, { PrimeReactContext, localeOption } from 'primereact/api';
5
- import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
6
- import { CSSTransition } from 'primereact/csstransition';
7
- import { useMountEffect, usePrevious, useResizeListener, useUpdateEffect, useInterval, useUnmountEffect } from 'primereact/hooks';
8
- import { TimesIcon } from 'primereact/icons/times';
9
- import { Portal } from 'primereact/portal';
10
- import { Ripple } from 'primereact/ripple';
11
- import { classNames, mergeProps, IconUtils, UniqueComponentId, DomHandler, ObjectUtils, ZIndexUtils } from 'primereact/utils';
12
- import { ChevronLeftIcon } from 'primereact/icons/chevronleft';
13
- import { ChevronRightIcon } from 'primereact/icons/chevronright';
14
- import { ChevronDownIcon } from 'primereact/icons/chevrondown';
15
- import { ChevronUpIcon } from 'primereact/icons/chevronup';
16
-
17
- function _extends() {
18
- _extends = Object.assign ? Object.assign.bind() : function (target) {
19
- for (var i = 1; i < arguments.length; i++) {
20
- var source = arguments[i];
21
- for (var key in source) {
22
- if (Object.prototype.hasOwnProperty.call(source, key)) {
23
- target[key] = source[key];
24
- }
25
- }
26
- }
27
- return target;
28
- };
29
- return _extends.apply(this, arguments);
30
- }
31
-
32
- function _typeof(o) {
33
- "@babel/helpers - typeof";
34
-
35
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
36
- return typeof o;
37
- } : function (o) {
38
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
39
- }, _typeof(o);
40
- }
41
-
42
- function _toPrimitive(input, hint) {
43
- if (_typeof(input) !== "object" || input === null) return input;
44
- var prim = input[Symbol.toPrimitive];
45
- if (prim !== undefined) {
46
- var res = prim.call(input, hint || "default");
47
- if (_typeof(res) !== "object") return res;
48
- throw new TypeError("@@toPrimitive must return a primitive value.");
49
- }
50
- return (hint === "string" ? String : Number)(input);
51
- }
52
-
53
- function _toPropertyKey(arg) {
54
- var key = _toPrimitive(arg, "string");
55
- return _typeof(key) === "symbol" ? key : String(key);
56
- }
57
-
58
- function _defineProperty(obj, key, value) {
59
- key = _toPropertyKey(key);
60
- if (key in obj) {
61
- Object.defineProperty(obj, key, {
62
- value: value,
63
- enumerable: true,
64
- configurable: true,
65
- writable: true
66
- });
67
- } else {
68
- obj[key] = value;
69
- }
70
- return obj;
71
- }
72
-
73
- function _arrayWithHoles(arr) {
74
- if (Array.isArray(arr)) return arr;
75
- }
76
-
77
- function _iterableToArrayLimit(r, l) {
78
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
79
- if (null != t) {
80
- var e,
81
- n,
82
- i,
83
- u,
84
- a = [],
85
- f = !0,
86
- o = !1;
87
- try {
88
- if (i = (t = t.call(r)).next, 0 === l) {
89
- if (Object(t) !== t) return;
90
- f = !1;
91
- } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
92
- } catch (r) {
93
- o = !0, n = r;
94
- } finally {
95
- try {
96
- if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
97
- } finally {
98
- if (o) throw n;
99
- }
100
- }
101
- return a;
102
- }
103
- }
104
-
105
- function _arrayLikeToArray(arr, len) {
106
- if (len == null || len > arr.length) len = arr.length;
107
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
108
- return arr2;
109
- }
110
-
111
- function _unsupportedIterableToArray(o, minLen) {
112
- if (!o) return;
113
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
114
- var n = Object.prototype.toString.call(o).slice(8, -1);
115
- if (n === "Object" && o.constructor) n = o.constructor.name;
116
- if (n === "Map" || n === "Set") return Array.from(o);
117
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
118
- }
119
-
120
- function _nonIterableRest() {
121
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
122
- }
123
-
124
- function _slicedToArray(arr, i) {
125
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
126
- }
127
-
128
- var classes = {
129
- header: 'p-galleria-header',
130
- footer: 'p-galleria-footer',
131
- closeIcon: 'p-galleria-close-icon',
132
- closeButton: 'p-galleria-close p-link',
133
- root: function root(_ref) {
134
- var props = _ref.props,
135
- context = _ref.context,
136
- thumbnailsPosClassName = _ref.thumbnailsPosClassName,
137
- indicatorPosClassName = _ref.indicatorPosClassName;
138
- return classNames('p-galleria p-component', {
139
- 'p-galleria-fullscreen': props.fullScreen,
140
- 'p-galleria-indicator-onitem': props.showIndicatorsOnItem,
141
- 'p-galleria-item-nav-onhover': props.showItemNavigatorsOnHover && !props.fullScreen,
142
- 'p-input-filled': context && context.inputStyle === 'filled' || PrimeReact.inputStyle === 'filled',
143
- 'p-ripple-disabled': context && context.ripple === false || PrimeReact.ripple === false
144
- }, thumbnailsPosClassName, indicatorPosClassName);
145
- },
146
- content: 'p-galleria-content',
147
- mask: function mask(_ref2) {
148
- var visibleState = _ref2.visibleState;
149
- return classNames('p-galleria-mask', {
150
- 'p-galleria-visible': visibleState
151
- });
152
- },
153
- thumbnailItem: function thumbnailItem(_ref3) {
154
- var subProps = _ref3.subProps;
155
- return classNames('p-galleria-thumbnail-item', {
156
- 'p-galleria-thumbnail-item-current': subProps.current,
157
- 'p-galleria-thumbnail-item-active': subProps.active,
158
- 'p-galleria-thumbnail-item-start': subProps.start,
159
- 'p-galleria-thumbnail-item-end': subProps.end
160
- });
161
- },
162
- thumbnailItemContent: 'p-galleria-thumbnail-item-content',
163
- previousThumbnailIcon: 'p-galleria-thumbnail-prev-icon',
164
- previousThumbnailButton: function previousThumbnailButton(_ref4) {
165
- var isDisabled = _ref4.isDisabled;
166
- return classNames('p-galleria-thumbnail-prev p-link', {
167
- 'p-disabled': isDisabled
168
- });
169
- },
170
- nextThumbnailIcon: 'p-galleria-thumbnail-next-icon',
171
- nextThumbnailButton: function nextThumbnailButton(_ref5) {
172
- var isDisabled = _ref5.isDisabled;
173
- return classNames('p-galleria-thumbnail-next p-link', {
174
- 'p-disabled': isDisabled
175
- });
176
- },
177
- thumbnailContainer: 'p-galleria-thumbnail-container',
178
- thumbnailItemsContainer: 'p-galleria-thumbnail-items-container',
179
- thumbnailItems: 'p-galleria-thumbnail-items',
180
- thumbnailWrapper: 'p-galleria-thumbnail-wrapper',
181
- previousItemIcon: 'p-galleria-item-prev-icon',
182
- previousItemButton: function previousItemButton(_ref6) {
183
- var isDisabled = _ref6.isDisabled;
184
- return classNames('p-galleria-item-prev p-galleria-item-nav p-link', {
185
- 'p-disabled': isDisabled
186
- });
187
- },
188
- nextItemIcon: 'p-galleria-item-next-icon',
189
- nextItemButton: function nextItemButton(_ref7) {
190
- var isDisabled = _ref7.isDisabled;
191
- return classNames('p-galleria-item-next p-galleria-item-nav p-link', {
192
- 'p-disabled': isDisabled
193
- });
194
- },
195
- caption: 'p-galleria-caption',
196
- indicator: function indicator(_ref8) {
197
- var isActive = _ref8.isActive;
198
- return classNames('p-galleria-indicator', {
199
- 'p-highlight': isActive
200
- });
201
- },
202
- indicators: 'p-galleria-indicators p-reset',
203
- itemWrapper: 'p-galleria-item-wrapper',
204
- itemContainer: 'p-galleria-item-container',
205
- item: 'p-galleria-item',
206
- transition: 'p-galleria'
207
- };
208
- var styles = "\n@layer primereact {\n .p-galleria-content {\n display: flex;\n flex-direction: column;\n }\n \n .p-galleria-item-wrapper {\n display: flex;\n flex-direction: column;\n position: relative;\n }\n \n .p-galleria-item-container {\n position: relative;\n display: flex;\n height: 100%;\n }\n \n .p-galleria-item-nav {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n }\n \n .p-galleria-item-prev {\n left: 0;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n \n .p-galleria-item-next {\n right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n \n .p-galleria-item {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n width: 100%;\n }\n \n .p-galleria-item-nav-onhover .p-galleria-item-nav {\n pointer-events: none;\n opacity: 0;\n transition: opacity .2s ease-in-out;\n }\n \n .p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav {\n pointer-events: all;\n opacity: 1;\n }\n \n .p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav.p-disabled {\n pointer-events: none;\n }\n \n .p-galleria-caption {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n }\n \n /* Thumbnails */\n .p-galleria-thumbnail-wrapper {\n display: flex;\n flex-direction: column;\n overflow: auto;\n flex-shrink: 0;\n }\n \n .p-galleria-thumbnail-prev,\n .p-galleria-thumbnail-next {\n align-self: center;\n flex: 0 0 auto;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n \n .p-galleria-thumbnail-prev span,\n .p-galleria-thumbnail-next span {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n \n .p-galleria-thumbnail-container {\n display: flex;\n flex-direction: row;\n }\n \n .p-galleria-thumbnail-items-container {\n overflow: hidden;\n width: 100%;\n }\n \n .p-galleria-thumbnail-items {\n display: flex;\n }\n \n .p-galleria-thumbnail-item {\n overflow: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n opacity: .5;\n }\n \n .p-galleria-thumbnail-item:hover {\n opacity: 1;\n transition: opacity .3s;\n }\n \n .p-galleria-thumbnail-item-current {\n opacity: 1;\n }\n \n /* Positions */\n /* Thumbnails */\n .p-galleria-thumbnails-left .p-galleria-content,\n .p-galleria-thumbnails-right .p-galleria-content {\n flex-direction: row;\n }\n \n .p-galleria-thumbnails-left .p-galleria-item-wrapper,\n .p-galleria-thumbnails-right .p-galleria-item-wrapper {\n flex-direction: row;\n }\n \n .p-galleria-thumbnails-left .p-galleria-item-wrapper,\n .p-galleria-thumbnails-top .p-galleria-item-wrapper {\n order: 2;\n }\n \n .p-galleria-thumbnails-left .p-galleria-thumbnail-wrapper,\n .p-galleria-thumbnails-top .p-galleria-thumbnail-wrapper {\n order: 1;\n }\n \n .p-galleria-thumbnails-left .p-galleria-thumbnail-container,\n .p-galleria-thumbnails-right .p-galleria-thumbnail-container {\n flex-direction: column;\n flex-grow: 1;\n }\n \n .p-galleria-thumbnails-left .p-galleria-thumbnail-items,\n .p-galleria-thumbnails-right .p-galleria-thumbnail-items {\n flex-direction: column;\n height: 100%;\n }\n \n /* Indicators */\n .p-galleria-indicators {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n \n .p-galleria-indicator > button {\n display: inline-flex;\n align-items: center;\n }\n \n .p-galleria-indicators-left .p-galleria-item-wrapper,\n .p-galleria-indicators-right .p-galleria-item-wrapper {\n flex-direction: row;\n align-items: center;\n }\n \n .p-galleria-indicators-left .p-galleria-item-container,\n .p-galleria-indicators-top .p-galleria-item-container {\n order: 2;\n }\n \n .p-galleria-indicators-left .p-galleria-indicators,\n .p-galleria-indicators-top .p-galleria-indicators {\n order: 1;\n }\n \n .p-galleria-indicators-left .p-galleria-indicators,\n .p-galleria-indicators-right .p-galleria-indicators {\n flex-direction: column;\n }\n \n .p-galleria-indicator-onitem .p-galleria-indicators {\n position: absolute;\n display: flex;\n }\n \n .p-galleria-indicator-onitem.p-galleria-indicators-top .p-galleria-indicators {\n top: 0;\n left: 0;\n width: 100%;\n align-items: flex-start;\n }\n \n .p-galleria-indicator-onitem.p-galleria-indicators-right .p-galleria-indicators {\n right: 0;\n top: 0;\n height: 100%;\n align-items: flex-end;\n }\n \n .p-galleria-indicator-onitem.p-galleria-indicators-bottom .p-galleria-indicators {\n bottom: 0;\n left: 0;\n width: 100%;\n align-items: flex-end;\n }\n \n .p-galleria-indicator-onitem.p-galleria-indicators-left .p-galleria-indicators {\n left: 0;\n top: 0;\n height: 100%;\n align-items: flex-start;\n }\n \n /* FullScreen */\n .p-galleria-mask {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: none;\n }\n \n .p-galleria-mask.p-component-overlay {\n pointer-events: auto;\n }\n \n .p-galleria-close {\n position: absolute;\n top: 0;\n right: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n }\n \n .p-galleria-mask .p-galleria-item-nav {\n position: fixed;\n top: 50%;\n margin-top: -.5rem;\n }\n \n /* Animation */\n .p-galleria-enter {\n opacity: 0;\n transform: scale(0.7);\n }\n \n .p-galleria-enter-active {\n opacity: 1;\n transform: scale(1);\n transition: all 150ms cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-galleria-enter-done {\n transform: none;\n }\n \n .p-galleria-exit {\n opacity: 1;\n }\n \n .p-galleria-exit-active {\n opacity: 0;\n transform: scale(0.7);\n transition: all 150ms cubic-bezier(0.4, 0.0, 0.2, 1);\n }\n \n .p-galleria-enter-active .p-galleria-item-nav {\n opacity: 0;\n }\n \n /* Keyboard Support */\n .p-items-hidden .p-galleria-thumbnail-item {\n visibility: hidden;\n }\n \n .p-items-hidden .p-galleria-thumbnail-item.p-galleria-thumbnail-item-active {\n visibility: visible;\n }\n}\n";
209
- var inlineStyles = {
210
- thumbnailItemsContainer: function thumbnailItemsContainer(_ref9) {
211
- var height = _ref9.height;
212
- return {
213
- height: height
214
- };
215
- }
216
- };
217
- var GalleriaBase = ComponentBase.extend({
218
- defaultProps: {
219
- __TYPE: 'Galleria',
220
- id: null,
221
- value: null,
222
- activeIndex: 0,
223
- fullScreen: false,
224
- item: null,
225
- thumbnail: null,
226
- indicator: null,
227
- caption: null,
228
- className: null,
229
- closeIcon: null,
230
- style: null,
231
- header: null,
232
- footer: null,
233
- numVisible: 3,
234
- responsiveOptions: null,
235
- showItemNavigators: false,
236
- showThumbnailNavigators: true,
237
- showItemNavigatorsOnHover: false,
238
- changeItemOnIndicatorHover: false,
239
- circular: false,
240
- autoPlay: false,
241
- transitionInterval: 4000,
242
- showThumbnails: true,
243
- itemNextIcon: null,
244
- itemPrevIcon: null,
245
- nextThumbnailIcon: null,
246
- prevThumbnailIcon: null,
247
- thumbnailsPosition: 'bottom',
248
- verticalThumbnailViewPortHeight: '300px',
249
- showIndicators: false,
250
- showIndicatorsOnItem: false,
251
- indicatorsPosition: 'bottom',
252
- baseZIndex: 0,
253
- transitionOptions: null,
254
- onItemChange: null,
255
- children: undefined
256
- },
257
- css: {
258
- classes: classes,
259
- styles: styles,
260
- inlineStyles: inlineStyles
261
- }
262
- });
263
-
264
- function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
265
- function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
266
- var GalleriaItem = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (props, ref) {
267
- var ptm = props.ptm,
268
- cx = props.cx;
269
- var getPTOptions = function getPTOptions(key, options) {
270
- return ptm(key, _objectSpread$2({
271
- hostName: props.hostName
272
- }, options));
273
- };
274
- var next = function next() {
275
- var nextItemIndex = props.activeItemIndex + 1;
276
- props.onActiveItemChange({
277
- index: props.circular && props.value.length - 1 === props.activeItemIndex ? 0 : nextItemIndex
278
- });
279
- };
280
- var prev = function prev() {
281
- var prevItemIndex = props.activeItemIndex !== 0 ? props.activeItemIndex - 1 : 0;
282
- props.onActiveItemChange({
283
- index: props.circular && props.activeItemIndex === 0 ? props.value.length - 1 : prevItemIndex
284
- });
285
- };
286
- var stopSlideShow = function stopSlideShow() {
287
- if (props.slideShowActive && props.stopSlideShow) {
288
- props.stopSlideShow();
289
- }
290
- };
291
- var navBackward = function navBackward(e) {
292
- stopSlideShow();
293
- prev();
294
- if (e && e.cancelable) {
295
- e.preventDefault();
296
- }
297
- };
298
- var navForward = function navForward(e) {
299
- stopSlideShow();
300
- next();
301
- if (e && e.cancelable) {
302
- e.preventDefault();
303
- }
304
- };
305
- var onIndicatorClick = function onIndicatorClick(index) {
306
- stopSlideShow();
307
- props.onActiveItemChange({
308
- index: index
309
- });
310
- };
311
- var onIndicatorMouseEnter = function onIndicatorMouseEnter(index) {
312
- if (props.changeItemOnIndicatorHover) {
313
- stopSlideShow();
314
- props.onActiveItemChange({
315
- index: index
316
- });
317
- }
318
- };
319
- var onIndicatorKeyDown = function onIndicatorKeyDown(event, index) {
320
- if (event.which === 13) {
321
- stopSlideShow();
322
- props.onActiveItemChange({
323
- index: index
324
- });
325
- }
326
- };
327
- useMountEffect(function () {
328
- if (props.autoPlay) {
329
- props.startSlideShow();
330
- }
331
- });
332
- var createBackwardNavigator = function createBackwardNavigator() {
333
- if (props.showItemNavigators) {
334
- var isDisabled = !props.circular && props.activeItemIndex === 0;
335
- var previousItemIconProps = mergeProps({
336
- className: cx('previousItemIcon')
337
- }, getPTOptions('previousItemIcon'));
338
- var icon = props.itemPrevIcon || /*#__PURE__*/React.createElement(ChevronLeftIcon, previousItemIconProps);
339
- var itemPrevIcon = IconUtils.getJSXIcon(icon, _objectSpread$2({}, previousItemIconProps), {
340
- props: props
341
- });
342
- var previousItemButtonProps = mergeProps({
343
- type: 'button',
344
- className: cx('previousItemButton', {
345
- isDisabled: isDisabled
346
- }),
347
- onClick: navBackward,
348
- disabled: isDisabled,
349
- 'data-p-disabled': isDisabled
350
- }, getPTOptions('previousItemButton'));
351
- return /*#__PURE__*/React.createElement("button", previousItemButtonProps, itemPrevIcon, /*#__PURE__*/React.createElement(Ripple, null));
352
- }
353
- return null;
354
- };
355
- var createForwardNavigator = function createForwardNavigator() {
356
- if (props.showItemNavigators) {
357
- var isDisabled = !props.circular && props.activeItemIndex === props.value.length - 1;
358
- var nextItemIconProps = mergeProps({
359
- className: cx('nextItemIcon')
360
- }, getPTOptions('nextItemIcon'));
361
- var icon = props.itemNextIcon || /*#__PURE__*/React.createElement(ChevronRightIcon, nextItemIconProps);
362
- var itemNextIcon = IconUtils.getJSXIcon(icon, _objectSpread$2({}, nextItemIconProps), {
363
- props: props
364
- });
365
- var nextItemButtonProps = mergeProps({
366
- type: 'button',
367
- className: cx('nextItemButton', {
368
- isDisabled: isDisabled
369
- }),
370
- onClick: navForward,
371
- disabled: isDisabled,
372
- 'data-p-disabled': isDisabled
373
- }, getPTOptions('nextItemButton'));
374
- return /*#__PURE__*/React.createElement("button", nextItemButtonProps, itemNextIcon, /*#__PURE__*/React.createElement(Ripple, null));
375
- }
376
- return null;
377
- };
378
- var createCaption = function createCaption() {
379
- var captionProps = mergeProps({
380
- className: cx('caption')
381
- }, getPTOptions('caption'));
382
- if (props.caption) {
383
- var _content = props.caption(props.value[props.activeItemIndex]);
384
- return /*#__PURE__*/React.createElement("div", captionProps, _content);
385
- }
386
- return null;
387
- };
388
- var createIndicator = function createIndicator(index) {
389
- var key = 'p-galleria-indicator-' + index;
390
- var isActive = props.activeItemIndex === index;
391
- var indicator = props.indicator && props.indicator(index);
392
- var indicatorProps = mergeProps({
393
- className: cx('indicator', {
394
- isActive: isActive
395
- }),
396
- key: key,
397
- tabIndex: 0,
398
- onClick: function onClick() {
399
- return onIndicatorClick(index);
400
- },
401
- onMouseEnter: function onMouseEnter() {
402
- return onIndicatorMouseEnter(index);
403
- },
404
- onKeyDown: function onKeyDown(e) {
405
- return onIndicatorKeyDown(e, index);
406
- },
407
- 'data-p-highlight': isActive
408
- }, getPTOptions('indicator'));
409
- if (!indicator) {
410
- indicator = /*#__PURE__*/React.createElement("button", {
411
- type: "button",
412
- tabIndex: -1,
413
- className: "p-link"
414
- }, /*#__PURE__*/React.createElement(Ripple, null));
415
- }
416
- return /*#__PURE__*/React.createElement("li", indicatorProps, indicator);
417
- };
418
- var createIndicators = function createIndicators() {
419
- if (props.showIndicators) {
420
- var _indicators = [];
421
- var indicatorsProps = mergeProps({
422
- className: classNames(props.indicatorsContentClassName, cx('indicators'))
423
- }, getPTOptions('indicators'));
424
- for (var i = 0; i < props.value.length; i++) {
425
- _indicators.push(createIndicator(i));
426
- }
427
- return /*#__PURE__*/React.createElement("ul", indicatorsProps, _indicators);
428
- }
429
- return null;
430
- };
431
- var content = props.itemTemplate && props.itemTemplate(props.value[props.activeItemIndex]);
432
- var backwardNavigator = createBackwardNavigator();
433
- var forwardNavigator = createForwardNavigator();
434
- var caption = createCaption();
435
- var indicators = createIndicators();
436
- var itemWrapperProps = mergeProps({
437
- ref: ref,
438
- className: cx('itemWrapper')
439
- }, getPTOptions('itemWrapper'));
440
- var itemContainerProps = mergeProps({
441
- className: cx('itemContainer')
442
- }, getPTOptions('itemContainer'));
443
- var itemProps = mergeProps({
444
- className: cx('item')
445
- }, getPTOptions('item'));
446
- return /*#__PURE__*/React.createElement("div", itemWrapperProps, /*#__PURE__*/React.createElement("div", itemContainerProps, backwardNavigator, /*#__PURE__*/React.createElement("div", itemProps, content), forwardNavigator, caption), indicators);
447
- }));
448
- GalleriaItem.displayName = 'GalleriaItem';
449
-
450
- function _arrayWithoutHoles(arr) {
451
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
452
- }
453
-
454
- function _iterableToArray(iter) {
455
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
456
- }
457
-
458
- function _nonIterableSpread() {
459
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
460
- }
461
-
462
- function _toConsumableArray(arr) {
463
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
464
- }
465
-
466
- function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
467
- function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
468
- var GalleriaThumbnailItem = /*#__PURE__*/React.memo(function (props) {
469
- var ptm = props.ptm,
470
- cx = props.cx;
471
- var getPTOptions = function getPTOptions(key, options) {
472
- return ptm(key, _objectSpread$1({
473
- hostName: props.hostName
474
- }, options));
475
- };
476
- var onItemClick = function onItemClick(event) {
477
- props.onItemClick({
478
- originalEvent: event,
479
- index: props.index
480
- });
481
- };
482
- var onItemKeyDown = function onItemKeyDown(event) {
483
- if (event.which === 13) {
484
- props.onItemClick({
485
- originalEvent: event,
486
- index: props.index
487
- });
488
- }
489
- };
490
- var tabIndex = props.active ? 0 : null;
491
- var content = props.template && props.template(props.item);
492
- var thumbnailItemProps = mergeProps({
493
- className: classNames(props.className, cx('thumbnailItem', {
494
- subProps: props
495
- })),
496
- 'data-p-galleria-thumbnail-item-current': props.current,
497
- 'data-p-galleria-thumbnail-item-active': props.active,
498
- 'data-p-galleria-thumbnail-item-start': props.start,
499
- 'data-p-galleria-thumbnail-item-end': props.end
500
- }, getPTOptions('thumbnailItem'));
501
- var thumbnailItemContentProps = mergeProps({
502
- className: cx('thumbnailItemContent'),
503
- tabIndex: tabIndex,
504
- onClick: onItemClick,
505
- onKeyDown: onItemKeyDown
506
- }, getPTOptions('thumbnailItemContent'));
507
- return /*#__PURE__*/React.createElement("div", thumbnailItemProps, /*#__PURE__*/React.createElement("div", thumbnailItemContentProps, content));
508
- });
509
- var GalleriaThumbnails = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (props, ref) {
510
- var _React$useState = React.useState(props.numVisible),
511
- _React$useState2 = _slicedToArray(_React$useState, 2),
512
- numVisibleState = _React$useState2[0],
513
- setNumVisibleState = _React$useState2[1];
514
- var _React$useState3 = React.useState(0),
515
- _React$useState4 = _slicedToArray(_React$useState3, 2),
516
- totalShiftedItemsState = _React$useState4[0],
517
- setTotalShiftedItemsState = _React$useState4[1];
518
- var itemsContainerRef = React.useRef(null);
519
- var startPos = React.useRef(null);
520
- var attributeSelector = React.useRef('');
521
- var thumbnailsStyle = React.useRef(null);
522
- var responsiveOptions = React.useRef(null);
523
- var prevNumVisible = usePrevious(numVisibleState);
524
- var prevActiveItemIndex = usePrevious(props.activeItemIndex);
525
- var context = React.useContext(PrimeReactContext);
526
- var ptm = props.ptm,
527
- cx = props.cx,
528
- sx = props.sx;
529
- var getPTOptions = function getPTOptions(key, options) {
530
- return ptm(key, _objectSpread$1({
531
- hostName: props.hostName
532
- }, options));
533
- };
534
- var _useResizeListener = useResizeListener({
535
- listener: function listener() {
536
- calculatePosition();
537
- },
538
- when: props.responsiveOptions
539
- }),
540
- _useResizeListener2 = _slicedToArray(_useResizeListener, 1),
541
- bindWindowResizeListener = _useResizeListener2[0];
542
- var step = function step(dir) {
543
- var totalShiftedItems = totalShiftedItemsState + dir;
544
- if (dir < 0 && -1 * totalShiftedItems + numVisibleState > props.value.length - 1) {
545
- totalShiftedItems = numVisibleState - props.value.length;
546
- } else if (dir > 0 && totalShiftedItems > 0) {
547
- totalShiftedItems = 0;
548
- }
549
- if (props.circular) {
550
- if (dir < 0 && props.value.length - 1 === props.activeItemIndex) {
551
- totalShiftedItems = 0;
552
- } else if (dir > 0 && props.activeItemIndex === 0) {
553
- totalShiftedItems = numVisibleState - props.value.length;
554
- }
555
- }
556
- if (itemsContainerRef.current) {
557
- DomHandler.removeClass(itemsContainerRef.current, 'p-items-hidden');
558
- itemsContainerRef.current.style.transform = props.isVertical ? "translate3d(0, ".concat(totalShiftedItems * (100 / numVisibleState), "%, 0)") : "translate3d(".concat(totalShiftedItems * (100 / numVisibleState), "%, 0, 0)");
559
- itemsContainerRef.current.style.transition = 'transform 500ms ease 0s';
560
- }
561
- setTotalShiftedItemsState(totalShiftedItems);
562
- };
563
- var stopSlideShow = function stopSlideShow() {
564
- if (props.slideShowActive && props.stopSlideShow) {
565
- props.stopSlideShow();
566
- }
567
- };
568
- var getMedianItemIndex = function getMedianItemIndex() {
569
- var index = Math.floor(numVisibleState / 2);
570
- return numVisibleState % 2 ? index : index - 1;
571
- };
572
- var navBackward = function navBackward(e) {
573
- stopSlideShow();
574
- var prevItemIndex = props.activeItemIndex !== 0 ? props.activeItemIndex - 1 : 0;
575
- var diff = prevItemIndex + totalShiftedItemsState;
576
- if (numVisibleState - diff - 1 > getMedianItemIndex() && (-1 * totalShiftedItemsState !== 0 || props.circular)) {
577
- step(1);
578
- }
579
- props.onActiveItemChange({
580
- index: props.circular && props.activeItemIndex === 0 ? props.value.length - 1 : prevItemIndex
581
- });
582
- if (e.cancelable) {
583
- e.preventDefault();
584
- }
585
- };
586
- var navForward = function navForward(e) {
587
- stopSlideShow();
588
- var nextItemIndex = props.activeItemIndex + 1;
589
- if (nextItemIndex + totalShiftedItemsState > getMedianItemIndex() && (-1 * totalShiftedItemsState < getTotalPageNumber() - 1 || props.circular)) {
590
- step(-1);
591
- }
592
- props.onActiveItemChange({
593
- index: props.circular && props.value.length - 1 === props.activeItemIndex ? 0 : nextItemIndex
594
- });
595
- if (e.cancelable) {
596
- e.preventDefault();
597
- }
598
- };
599
- var onItemClick = function onItemClick(event) {
600
- stopSlideShow();
601
- var selectedItemIndex = event.index;
602
- if (selectedItemIndex !== props.activeItemIndex) {
603
- var diff = selectedItemIndex + totalShiftedItemsState;
604
- var dir = 0;
605
- if (selectedItemIndex < props.activeItemIndex) {
606
- dir = numVisibleState - diff - 1 - getMedianItemIndex();
607
- if (dir > 0 && -1 * totalShiftedItemsState !== 0) {
608
- step(dir);
609
- }
610
- } else {
611
- dir = getMedianItemIndex() - diff;
612
- if (dir < 0 && -1 * totalShiftedItemsState < getTotalPageNumber() - 1) {
613
- step(dir);
614
- }
615
- }
616
- props.onActiveItemChange({
617
- index: selectedItemIndex
618
- });
619
- }
620
- };
621
- var onTransitionEnd = function onTransitionEnd(e) {
622
- if (itemsContainerRef.current && e.propertyName === 'transform') {
623
- DomHandler.addClass(itemsContainerRef.current, 'p-items-hidden');
624
- itemsContainerRef.current.style.transition = '';
625
- }
626
- };
627
- var onTouchStart = function onTouchStart(e) {
628
- var touchobj = e.changedTouches[0];
629
- startPos.current = {
630
- x: touchobj.pageX,
631
- y: touchobj.pageY
632
- };
633
- };
634
- var onTouchMove = function onTouchMove(e) {
635
- if (e.cancelable) {
636
- e.preventDefault();
637
- }
638
- };
639
- var onTouchEnd = function onTouchEnd(e) {
640
- var touchobj = e.changedTouches[0];
641
- if (props.isVertical) {
642
- changePageOnTouch(e, touchobj.pageY - startPos.current.y);
643
- } else {
644
- changePageOnTouch(e, touchobj.pageX - startPos.current.x);
645
- }
646
- };
647
- var changePageOnTouch = function changePageOnTouch(e, diff) {
648
- if (diff < 0) {
649
- // left
650
- navForward(e);
651
- } else {
652
- // right
653
- navBackward(e);
654
- }
655
- };
656
- var getTotalPageNumber = function getTotalPageNumber() {
657
- return props.value.length > numVisibleState ? props.value.length - numVisibleState + 1 : 0;
658
- };
659
- var createStyle = function createStyle() {
660
- if (!thumbnailsStyle.current) {
661
- thumbnailsStyle.current = DomHandler.createInlineStyle(context && context.nonce || PrimeReact.nonce);
662
- }
663
- var innerHTML = "\n .p-galleria-thumbnail-items[".concat(attributeSelector.current, "] .p-galleria-thumbnail-item {\n flex: 1 0 ").concat(100 / numVisibleState, "%\n }\n ");
664
- if (props.responsiveOptions) {
665
- var comparator = ObjectUtils.localeComparator(context && context.locale || PrimeReact.locale);
666
- responsiveOptions.current = _toConsumableArray(props.responsiveOptions);
667
- responsiveOptions.current.sort(function (data1, data2) {
668
- var value1 = data1.breakpoint;
669
- var value2 = data2.breakpoint;
670
- return ObjectUtils.sort(value1, value2, -1, comparator, context && context.nullSortOrder || PrimeReact.nullSortOrder);
671
- });
672
- for (var i = 0; i < responsiveOptions.current.length; i++) {
673
- var res = responsiveOptions.current[i];
674
- innerHTML += "\n @media screen and (max-width: ".concat(res.breakpoint, ") {\n .p-galleria-thumbnail-items[").concat(attributeSelector.current, "] .p-galleria-thumbnail-item {\n flex: 1 0 ").concat(100 / res.numVisible, "%\n }\n }\n ");
675
- }
676
- }
677
- thumbnailsStyle.current.innerHTML = innerHTML;
678
- };
679
- var calculatePosition = function calculatePosition() {
680
- if (itemsContainerRef.current && responsiveOptions.current) {
681
- var windowWidth = window.innerWidth;
682
- var matchedResponsiveData = {
683
- numVisible: props.numVisible
684
- };
685
- for (var i = 0; i < responsiveOptions.current.length; i++) {
686
- var res = responsiveOptions.current[i];
687
- if (parseInt(res.breakpoint, 10) >= windowWidth) {
688
- matchedResponsiveData = res;
689
- }
690
- }
691
- if (numVisibleState !== matchedResponsiveData.numVisible) {
692
- setNumVisibleState(matchedResponsiveData.numVisible);
693
- }
694
- }
695
- };
696
- useMountEffect(function () {
697
- if (itemsContainerRef.current) {
698
- attributeSelector.current = UniqueComponentId();
699
- itemsContainerRef.current.setAttribute(attributeSelector.current, '');
700
- }
701
- createStyle();
702
- calculatePosition();
703
- bindWindowResizeListener();
704
- });
705
- useUpdateEffect(function () {
706
- var totalShiftedItems = totalShiftedItemsState;
707
- if (prevNumVisible !== numVisibleState || prevActiveItemIndex !== props.activeItemIndex) {
708
- if (props.activeItemIndex <= getMedianItemIndex()) {
709
- totalShiftedItems = 0;
710
- } else if (props.value.length - numVisibleState + getMedianItemIndex() < props.activeItemIndex) {
711
- totalShiftedItems = numVisibleState - props.value.length;
712
- } else if (props.value.length - numVisibleState < props.activeItemIndex && numVisibleState % 2 === 0) {
713
- totalShiftedItems = props.activeItemIndex * -1 + getMedianItemIndex() + 1;
714
- } else {
715
- totalShiftedItems = props.activeItemIndex * -1 + getMedianItemIndex();
716
- }
717
- if (totalShiftedItems !== totalShiftedItemsState) {
718
- setTotalShiftedItemsState(totalShiftedItems);
719
- }
720
- itemsContainerRef.current.style.transform = props.isVertical ? "translate3d(0, ".concat(totalShiftedItems * (100 / numVisibleState), "%, 0)") : "translate3d(".concat(totalShiftedItems * (100 / numVisibleState), "%, 0, 0)");
721
- if (prevActiveItemIndex !== props.activeItemIndex) {
722
- DomHandler.removeClass(itemsContainerRef.current, 'p-items-hidden');
723
- itemsContainerRef.current.style.transition = 'transform 500ms ease 0s';
724
- }
725
- }
726
- });
727
- var createItems = function createItems() {
728
- return props.value.map(function (item, index) {
729
- var firstIndex = totalShiftedItemsState * -1;
730
- var lastIndex = firstIndex + numVisibleState - 1;
731
- var isActive = firstIndex <= index && lastIndex >= index;
732
- var start = firstIndex === index;
733
- var end = lastIndex === index;
734
- var current = props.activeItemIndex === index;
735
- return /*#__PURE__*/React.createElement(GalleriaThumbnailItem, {
736
- key: index,
737
- index: index,
738
- template: props.itemTemplate,
739
- item: item,
740
- active: isActive,
741
- start: start,
742
- end: end,
743
- onItemClick: onItemClick,
744
- current: current,
745
- ptm: ptm,
746
- cx: cx,
747
- sx: sx
748
- });
749
- });
750
- };
751
- var createBackwardNavigator = function createBackwardNavigator() {
752
- if (props.showThumbnailNavigators) {
753
- var isDisabled = !props.circular && props.activeItemIndex === 0 || props.value.length <= numVisibleState;
754
- var previousThumbnailIconProps = mergeProps({
755
- className: cx('previousThumbnailIcon')
756
- }, getPTOptions('previousThumbnailIcon'));
757
- var icon = props.isVertical ? props.prevThumbnailIcon || /*#__PURE__*/React.createElement(ChevronUpIcon, previousThumbnailIconProps) : props.prevThumbnailIcon || /*#__PURE__*/React.createElement(ChevronLeftIcon, previousThumbnailIconProps);
758
- var prevThumbnailIcon = IconUtils.getJSXIcon(icon, _objectSpread$1({}, previousThumbnailIconProps), {
759
- props: props
760
- });
761
- var previousThumbnailButtonProps = mergeProps({
762
- className: cx('previousThumbnailButton', {
763
- isDisabled: isDisabled
764
- }),
765
- onClick: navBackward,
766
- disabled: isDisabled,
767
- 'data-p-disabled': isDisabled
768
- }, getPTOptions('previousThumbnailButton'));
769
- return /*#__PURE__*/React.createElement("button", previousThumbnailButtonProps, prevThumbnailIcon, /*#__PURE__*/React.createElement(Ripple, null));
770
- }
771
- return null;
772
- };
773
- var createForwardNavigator = function createForwardNavigator() {
774
- if (props.showThumbnailNavigators) {
775
- var isDisabled = !props.circular && props.activeItemIndex === props.value.length - 1 || props.value.length <= numVisibleState;
776
- var nextThumbnailIconProps = mergeProps({
777
- className: cx('nextThumbnailIcon')
778
- }, getPTOptions('nextThumbnailIcon'));
779
- var icon = props.isVertical ? props.nextThumbnailIcon || /*#__PURE__*/React.createElement(ChevronDownIcon, nextThumbnailIconProps) : props.nextThumbnailIcon || /*#__PURE__*/React.createElement(ChevronRightIcon, nextThumbnailIconProps);
780
- var nextThumbnailIcon = IconUtils.getJSXIcon(icon, _objectSpread$1({}, nextThumbnailIconProps), {
781
- props: props
782
- });
783
- var nextThumbnailButtonProps = mergeProps({
784
- className: cx('nextThumbnailButton', {
785
- isDisabled: isDisabled
786
- }),
787
- onClick: navForward,
788
- disabled: isDisabled,
789
- 'data-p-disabled': isDisabled
790
- }, getPTOptions('nextThumbnailButton'));
791
- return /*#__PURE__*/React.createElement("button", nextThumbnailButtonProps, nextThumbnailIcon, /*#__PURE__*/React.createElement(Ripple, null));
792
- }
793
- return null;
794
- };
795
- var createContent = function createContent() {
796
- var items = createItems();
797
- var height = props.isVertical ? props.contentHeight : '';
798
- var backwardNavigator = createBackwardNavigator();
799
- var forwardNavigator = createForwardNavigator();
800
- var thumbnailContainerProps = mergeProps({
801
- className: cx('thumbnailContainer')
802
- }, getPTOptions('thumbnailContainer'));
803
- var thumbnailItemsContainerProps = mergeProps({
804
- className: cx('thumbnailItemsContainer'),
805
- style: sx('thumbnailItemsContainer', {
806
- height: height
807
- })
808
- }, getPTOptions('thumbnailItemsContainer'));
809
- var thumbnailItemsProps = mergeProps({
810
- ref: itemsContainerRef,
811
- className: cx('thumbnailItems'),
812
- onTransitionEnd: onTransitionEnd,
813
- onTouchStart: onTouchStart,
814
- onTouchMove: onTouchMove,
815
- onTouchEnd: onTouchEnd
816
- }, getPTOptions('thumbnailItems'));
817
- return /*#__PURE__*/React.createElement("div", thumbnailContainerProps, backwardNavigator, /*#__PURE__*/React.createElement("div", thumbnailItemsContainerProps, /*#__PURE__*/React.createElement("div", thumbnailItemsProps, items)), forwardNavigator);
818
- };
819
- var content = createContent();
820
- var thumbnailWrapperProps = mergeProps({
821
- className: cx('thumbnailWrapper')
822
- }, getPTOptions('thumbnailWrapper'));
823
- return /*#__PURE__*/React.createElement("div", thumbnailWrapperProps, content);
824
- }));
825
- GalleriaThumbnailItem.displayName = 'GalleriaThumbnailItem';
826
- GalleriaThumbnails.displayName = 'GalleriaThumbnails';
827
-
828
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
829
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
830
- var Galleria = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(function (inProps, ref) {
831
- var context = React.useContext(PrimeReactContext);
832
- var props = GalleriaBase.getProps(inProps, context);
833
- var _React$useState = React.useState(false),
834
- _React$useState2 = _slicedToArray(_React$useState, 2),
835
- visibleState = _React$useState2[0],
836
- setVisibleState = _React$useState2[1];
837
- var _React$useState3 = React.useState(props.numVisible),
838
- _React$useState4 = _slicedToArray(_React$useState3, 2),
839
- numVisibleState = _React$useState4[0],
840
- setNumVisibleState = _React$useState4[1];
841
- var _React$useState5 = React.useState(false),
842
- _React$useState6 = _slicedToArray(_React$useState5, 2),
843
- slideShowActiveState = _React$useState6[0],
844
- setSlideShowActiveState = _React$useState6[1];
845
- var _React$useState7 = React.useState(props.activeIndex),
846
- _React$useState8 = _slicedToArray(_React$useState7, 2),
847
- activeIndexState = _React$useState8[0],
848
- setActiveIndexState = _React$useState8[1];
849
- var elementRef = React.useRef(null);
850
- var previewContentRef = React.useRef(null);
851
- var maskRef = React.useRef(null);
852
- var activeItemIndex = props.onItemChange ? props.activeIndex : activeIndexState;
853
- var isVertical = props.thumbnailsPosition === 'left' || props.thumbnailsPosition === 'right';
854
- var _GalleriaBase$setMeta = GalleriaBase.setMetaData({
855
- props: props,
856
- state: {
857
- visible: visibleState,
858
- numVisible: numVisibleState,
859
- slideShowActive: slideShowActiveState,
860
- activeIndex: activeIndexState
861
- }
862
- }),
863
- ptm = _GalleriaBase$setMeta.ptm,
864
- cx = _GalleriaBase$setMeta.cx,
865
- sx = _GalleriaBase$setMeta.sx,
866
- isUnstyled = _GalleriaBase$setMeta.isUnstyled;
867
- useHandleStyle(GalleriaBase.css.styles, isUnstyled, {
868
- name: 'galleria'
869
- });
870
- useInterval(function () {
871
- onActiveItemChange({
872
- index: props.circular && props.value.length - 1 === activeItemIndex ? 0 : activeItemIndex + 1
873
- });
874
- }, props.transitionInterval, slideShowActiveState);
875
- var onActiveItemChange = function onActiveItemChange(event) {
876
- if (event.index >= props.value.length) {
877
- // #3973 AutoPlay without circular should stop the slideshow when it reaches the end
878
- stopSlideShow();
879
- return;
880
- }
881
- if (props.onItemChange) {
882
- props.onItemChange(event);
883
- } else {
884
- setActiveIndexState(event.index);
885
- }
886
- };
887
- var show = function show() {
888
- setVisibleState(true);
889
- };
890
- var hide = function hide() {
891
- setVisibleState(false);
892
- };
893
- var onEnter = function onEnter() {
894
- DomHandler.addClass(document.body, 'p-overflow-hidden');
895
- };
896
- var onEntering = function onEntering() {
897
- ZIndexUtils.set('modal', maskRef.current, context && context.autoZIndex || PrimeReact.autoZIndex, props.baseZIndex || context && context.zIndex['modal'] || PrimeReact.zIndex['modal']);
898
- DomHandler.addMultipleClasses(maskRef.current, 'p-component-overlay p-component-overlay-enter');
899
- };
900
- var onEntered = function onEntered() {
901
- props.onShow && props.onShow();
902
- };
903
- var onExit = function onExit() {
904
- DomHandler.removeClass(document.body, 'p-overflow-hidden');
905
- DomHandler.addClass(maskRef.current, 'p-component-overlay-leave');
906
- };
907
- var onExited = function onExited() {
908
- ZIndexUtils.clear(maskRef.current);
909
- props.onHide && props.onHide();
910
- };
911
- var isAutoPlayActive = function isAutoPlayActive() {
912
- return slideShowActiveState;
913
- };
914
- var startSlideShow = function startSlideShow() {
915
- setSlideShowActiveState(true);
916
- };
917
- var stopSlideShow = function stopSlideShow() {
918
- setSlideShowActiveState(false);
919
- };
920
- var getPositionClassName = function getPositionClassName(preClassName, position) {
921
- var positions = ['top', 'left', 'bottom', 'right'];
922
- var pos = positions.find(function (item) {
923
- return item === position;
924
- });
925
- return pos ? "".concat(preClassName, "-").concat(pos) : '';
926
- };
927
- React.useEffect(function () {
928
- if (props.value && props.value.length < numVisibleState) {
929
- setNumVisibleState(props.value.length);
930
- }
931
- }, [props.value, numVisibleState]);
932
- React.useEffect(function () {
933
- setNumVisibleState(props.numVisible);
934
- }, [props.numVisible]);
935
- useUnmountEffect(function () {
936
- if (slideShowActiveState) {
937
- stopSlideShow();
938
- }
939
- ZIndexUtils.clear(maskRef.current);
940
- });
941
- React.useImperativeHandle(ref, function () {
942
- return {
943
- props: props,
944
- show: show,
945
- hide: hide,
946
- isAutoPlayActive: isAutoPlayActive,
947
- startSlideShow: startSlideShow,
948
- stopSlideShow: stopSlideShow,
949
- getElement: function getElement() {
950
- return elementRef.current;
951
- },
952
- getPreviewContent: function getPreviewContent() {
953
- return previewContentRef.current;
954
- }
955
- };
956
- });
957
- var createHeader = function createHeader() {
958
- var headerProps = mergeProps({
959
- className: cx('header')
960
- }, ptm('header'));
961
- if (props.header) {
962
- return /*#__PURE__*/React.createElement("div", headerProps, props.header);
963
- }
964
- return null;
965
- };
966
- var createFooter = function createFooter() {
967
- var footerProps = mergeProps({
968
- className: cx('footer')
969
- }, ptm('footer'));
970
- if (props.footer) {
971
- return /*#__PURE__*/React.createElement("div", footerProps, props.footer);
972
- }
973
- return null;
974
- };
975
- var createElement = function createElement() {
976
- var thumbnailsPosClassName = props.showThumbnails && getPositionClassName('p-galleria-thumbnails', props.thumbnailsPosition);
977
- var indicatorPosClassName = props.showIndicators && getPositionClassName('p-galleria-indicators', props.indicatorsPosition);
978
- var closeIconProps = mergeProps({
979
- className: cx('closeIcon'),
980
- 'aria-hidden': true
981
- }, ptm('closeIcon'));
982
- var icon = props.closeIcon || /*#__PURE__*/React.createElement(TimesIcon, closeIconProps);
983
- var closeIcon = IconUtils.getJSXIcon(icon, _objectSpread({}, closeIconProps), {
984
- props: props
985
- });
986
- var closeButtonProps = mergeProps({
987
- type: 'button',
988
- className: cx('closeButton'),
989
- 'aria-label': localeOption('close'),
990
- onClick: hide
991
- }, ptm('closeButton'));
992
- var closeButton = props.fullScreen && /*#__PURE__*/React.createElement("button", closeButtonProps, closeIcon, /*#__PURE__*/React.createElement(Ripple, null));
993
- var header = createHeader();
994
- var footer = createFooter();
995
- var rootProps = mergeProps({
996
- ref: elementRef,
997
- id: props.id,
998
- className: classNames(props.className, cx('root', {
999
- context: context,
1000
- thumbnailsPosClassName: thumbnailsPosClassName,
1001
- indicatorPosClassName: indicatorPosClassName
1002
- })),
1003
- style: props.style
1004
- }, GalleriaBase.getOtherProps(props), ptm('root'));
1005
- var contentProps = mergeProps({
1006
- className: cx('content')
1007
- }, ptm('content'));
1008
- var element = /*#__PURE__*/React.createElement("div", rootProps, closeButton, header, /*#__PURE__*/React.createElement("div", contentProps, /*#__PURE__*/React.createElement(GalleriaItem, {
1009
- hostName: "Galleria",
1010
- ref: previewContentRef,
1011
- value: props.value,
1012
- activeItemIndex: activeItemIndex,
1013
- onActiveItemChange: onActiveItemChange,
1014
- itemTemplate: props.item,
1015
- circular: props.circular,
1016
- caption: props.caption,
1017
- showIndicators: props.showIndicators,
1018
- itemPrevIcon: props.itemPrevIcon,
1019
- itemNextIcon: props.itemNextIcon,
1020
- changeItemOnIndicatorHover: props.changeItemOnIndicatorHover,
1021
- indicator: props.indicator,
1022
- showItemNavigators: props.showItemNavigators,
1023
- autoPlay: props.autoPlay,
1024
- slideShowActive: slideShowActiveState,
1025
- startSlideShow: startSlideShow,
1026
- stopSlideShow: stopSlideShow,
1027
- ptm: ptm,
1028
- cx: cx
1029
- }), props.showThumbnails && /*#__PURE__*/React.createElement(GalleriaThumbnails, {
1030
- hostName: "Galleria",
1031
- value: props.value,
1032
- activeItemIndex: activeItemIndex,
1033
- onActiveItemChange: onActiveItemChange,
1034
- itemTemplate: props.thumbnail,
1035
- numVisible: numVisibleState,
1036
- nextThumbnailIcon: props.nextThumbnailIcon,
1037
- prevThumbnailIcon: props.prevThumbnailIcon,
1038
- responsiveOptions: props.responsiveOptions,
1039
- circular: props.circular,
1040
- isVertical: isVertical,
1041
- contentHeight: props.verticalThumbnailViewPortHeight,
1042
- showThumbnailNavigators: props.showThumbnailNavigators,
1043
- autoPlay: props.autoPlay,
1044
- slideShowActive: slideShowActiveState,
1045
- stopSlideShow: stopSlideShow,
1046
- ptm: ptm,
1047
- cx: cx,
1048
- sx: sx
1049
- })), footer);
1050
- return element;
1051
- };
1052
- var createGalleria = function createGalleria() {
1053
- var element = createElement();
1054
- if (props.fullScreen) {
1055
- var maskProps = mergeProps({
1056
- className: cx('mask', {
1057
- visibleState: visibleState
1058
- })
1059
- }, ptm('mask'));
1060
- var transitionProps = mergeProps({
1061
- classNames: cx('transition'),
1062
- "in": visibleState,
1063
- timeout: {
1064
- enter: 150,
1065
- exit: 150
1066
- },
1067
- options: props.transitionOptions,
1068
- unmountOnExit: true,
1069
- onEnter: onEnter,
1070
- onEntering: onEntering,
1071
- onEntered: onEntered,
1072
- onExit: onExit,
1073
- onExited: onExited
1074
- }, ptm('transition'));
1075
- var galleriaWrapper = /*#__PURE__*/React.createElement("div", _extends({
1076
- ref: maskRef
1077
- }, maskProps), /*#__PURE__*/React.createElement(CSSTransition, _extends({
1078
- nodeRef: elementRef
1079
- }, transitionProps), element));
1080
- return /*#__PURE__*/React.createElement(Portal, {
1081
- element: galleriaWrapper
1082
- });
1083
- }
1084
- return element;
1085
- };
1086
- return ObjectUtils.isNotEmpty(props.value) && createGalleria();
1087
- }));
1088
- Galleria.displayName = 'Galleria';
1089
-
1090
- export { Galleria };