@alphakits/ui 1.28.9 → 1.28.11

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 (305) hide show
  1. package/dist/amount/component.js +1 -1
  2. package/dist/amount/index.js +1 -1
  3. package/dist/amount-input/component.js +1 -1
  4. package/dist/amount-input/index.js +1 -1
  5. package/dist/avatar/component.js +1 -1
  6. package/dist/avatar/index.js +1 -1
  7. package/dist/back-button/component.js +1 -1
  8. package/dist/back-button/index.js +1 -1
  9. package/dist/base-card/component.js +1 -1
  10. package/dist/base-card/index.js +1 -1
  11. package/dist/bottom-sheet/component.js +2 -2
  12. package/dist/bottom-sheet/index.js +1 -1
  13. package/dist/button/component.js +1 -1
  14. package/dist/button/index.js +1 -1
  15. package/dist/button-arrow/component.js +1 -1
  16. package/dist/button-arrow/index.js +1 -1
  17. package/dist/calendar/component.js +1 -1
  18. package/dist/calendar/components/days-table/component.js +1 -1
  19. package/dist/calendar/components/days-table/index.js +1 -1
  20. package/dist/calendar/components/header/index.js +1 -1
  21. package/dist/calendar/components/header//321/201omponent.js +1 -1
  22. package/dist/calendar/components/months-table/index.js +1 -1
  23. package/dist/calendar/components/months-table//321/201omponent.js +1 -1
  24. package/dist/calendar/components/select-button/index.js +1 -1
  25. package/dist/calendar/components/select-button//321/201omponent.js +1 -1
  26. package/dist/calendar/components/years-table/index.js +1 -1
  27. package/dist/calendar/components/years-table//321/201omponent.js +1 -1
  28. package/dist/calendar/index.js +1 -1
  29. package/dist/calendar/use-calendar.js +1 -1
  30. package/dist/calendar/use-period.js +1 -1
  31. package/dist/calendar/utils.js +1 -1
  32. package/dist/calendar-input/component.js +1 -1
  33. package/dist/calendar-input/index.js +1 -1
  34. package/dist/calendar-input/utils.js +1 -1
  35. package/dist/{capitalize-62d8851d.js → capitalize-2460194a.js} +1 -1
  36. package/dist/card/component.js +1 -1
  37. package/dist/card/images/index.js +1 -1
  38. package/dist/card/index.js +1 -1
  39. package/dist/cell/base/component.js +1 -1
  40. package/dist/cell/component.js +1 -1
  41. package/dist/cell/index.d.ts +1 -1
  42. package/dist/cell/index.js +1 -1
  43. package/dist/cell/pure/component.js +1 -1
  44. package/dist/checkbox/component.js +1 -1
  45. package/dist/checkbox/index.js +1 -1
  46. package/dist/checkbox-group/component.js +1 -1
  47. package/dist/checkbox-group/index.js +1 -1
  48. package/dist/checkbox-lists/component.js +1 -1
  49. package/dist/checkbox-lists/index.js +1 -1
  50. package/dist/collapsable-row/addons.js +1 -1
  51. package/dist/collapsable-row/component.js +1 -1
  52. package/dist/collapsable-row/index.js +1 -1
  53. package/dist/collapse/component.js +1 -1
  54. package/dist/collapse/index.js +1 -1
  55. package/dist/{component-04d88c92.js → component-37015898.js} +1 -1
  56. package/dist/copy-button/component.js +1 -1
  57. package/dist/copy-button/index.js +1 -1
  58. package/dist/date/component.js +1 -1
  59. package/dist/date/index.js +1 -1
  60. package/dist/date-functions.js +1 -1
  61. package/dist/date-switcher/component.js +1 -1
  62. package/dist/date-switcher/index.js +1 -1
  63. package/dist/empty-page/component.js +1 -1
  64. package/dist/empty-page/index.js +1 -1
  65. package/dist/footer/component.js +1 -1
  66. package/dist/footer/contact-block.js +1 -1
  67. package/dist/footer/index.js +1 -1
  68. package/dist/form/component.js +1 -1
  69. package/dist/form/index.js +1 -1
  70. package/dist/form/templates/base-form/index.js +1 -1
  71. package/dist/form/templates/filters-form/index.js +1 -1
  72. package/dist/form/templates/rest-form/form.js +1 -1
  73. package/dist/form/templates/rest-form/index.d.ts +2 -1
  74. package/dist/form/templates/rest-form/index.js +1 -1
  75. package/dist/form/utils/get-default-values.js +1 -1
  76. package/dist/form-control/component.js +1 -1
  77. package/dist/form-control/index.js +1 -1
  78. package/dist/{formik.esm-e946eecd.js → formik.esm-a2d8f556.js} +1 -1
  79. package/dist/grid/col/component.js +1 -1
  80. package/dist/grid/col/index.js +1 -1
  81. package/dist/grid/component.js +1 -1
  82. package/dist/grid/index.js +1 -1
  83. package/dist/grid/row/component.js +1 -1
  84. package/dist/grid/row/index.js +1 -1
  85. package/dist/header-search/component.js +1 -1
  86. package/dist/header-search/index.js +1 -1
  87. package/dist/hooks/index.js +1 -1
  88. package/dist/hooks/use-crud-form-requests/index.js +1 -1
  89. package/dist/hooks/use-get-one/index.js +1 -1
  90. package/dist/icon-button/component.js +1 -1
  91. package/dist/icon-button/index.js +1 -1
  92. package/dist/image/component.js +1 -1
  93. package/dist/image/image-base.js +1 -1
  94. package/dist/image/index.js +1 -1
  95. package/dist/image/use-image-render-component.js +1 -1
  96. package/dist/image-gallery/component.js +1 -1
  97. package/dist/image-gallery/components/header/index.js +1 -1
  98. package/dist/image-gallery/components/header-info-block/index.js +1 -1
  99. package/dist/image-gallery/components/image-viewer/index.js +1 -1
  100. package/dist/image-gallery/components/image-viewer/slide.js +1 -1
  101. package/dist/image-gallery/components/index.js +1 -1
  102. package/dist/image-gallery/index.js +1 -1
  103. package/dist/image-uploader/component.js +1 -1
  104. package/dist/image-uploader/index.js +1 -1
  105. package/dist/{index-64f52319.js → index-0d66d5b9.js} +2 -2
  106. package/dist/{index-66278b1d.js → index-12cbfbe5.js} +1 -1
  107. package/dist/index-20e48e05.js +1 -0
  108. package/dist/{index-62d4e922.js → index-3a6512c0.js} +1 -1
  109. package/dist/index-9004b1c2.js +1 -0
  110. package/dist/index-a848f879.js +1 -0
  111. package/dist/{index-49952bc5.js → index-af09478e.js} +1 -1
  112. package/dist/index-b240af1b.js +1 -0
  113. package/dist/{index-e16cbf5a.js → index-b5cc8248.js} +1 -1
  114. package/dist/{index-efa5704c.js → index-cc763e53.js} +1 -1
  115. package/dist/{index-04483523.js → index-cdfad272.js} +1 -1
  116. package/dist/{index-9a12a390.js → index-fa0ee499.js} +1 -1
  117. package/dist/index.css +1 -1
  118. package/dist/info-block-header/component.js +1 -1
  119. package/dist/info-block-header/index.js +1 -1
  120. package/dist/info-block-item/component.js +1 -1
  121. package/dist/info-block-item/index.js +1 -1
  122. package/dist/input/component.js +1 -1
  123. package/dist/input/index.js +1 -1
  124. package/dist/input-autocomplete/autocomplete-field/index.js +1 -1
  125. package/dist/input-autocomplete/component.js +1 -1
  126. package/dist/input-autocomplete/index.js +1 -1
  127. package/dist/input-ghost/component.js +1 -1
  128. package/dist/input-ghost/index.js +1 -1
  129. package/dist/{isSymbol-5a29a977.js → isSymbol-cac073fd.js} +1 -1
  130. package/dist/link/component.js +1 -1
  131. package/dist/link/index.js +1 -1
  132. package/dist/list-allert/component.js +1 -1
  133. package/dist/list-allert/index.js +1 -1
  134. package/dist/masked-input/component.js +1 -1
  135. package/dist/masked-input/index.js +1 -1
  136. package/dist/menu/component.js +1 -1
  137. package/dist/menu/components/content-header/index.js +1 -1
  138. package/dist/menu/components/index.js +1 -1
  139. package/dist/menu/components/menu-avatar/index.js +1 -1
  140. package/dist/menu/components/menu-back-button/index.js +1 -1
  141. package/dist/menu/components/menu-button/index.js +1 -1
  142. package/dist/menu/components/menu-buttons-list/index.js +1 -1
  143. package/dist/menu/components/user-button/index.js +1 -1
  144. package/dist/menu/index.js +1 -1
  145. package/dist/message/component.js +1 -1
  146. package/dist/message/index.js +1 -1
  147. package/dist/modal/components/modals/index.js +1 -1
  148. package/dist/modal/components/modals/modal.js +1 -1
  149. package/dist/modal/context.js +1 -1
  150. package/dist/modal/hooks/use-modal.js +1 -1
  151. package/dist/modal/index.js +1 -1
  152. package/dist/modal/utils/delete-property-by-id.js +1 -1
  153. package/dist/notification/component.js +1 -1
  154. package/dist/notification/index.js +1 -1
  155. package/dist/page-with-controls/component.js +1 -1
  156. package/dist/page-with-controls/index.js +1 -1
  157. package/dist/{parse-query-params-99f3f8e6.js → parse-query-params-410644ff.js} +1 -1
  158. package/dist/picker-button/common/index.js +1 -1
  159. package/dist/picker-button/common/labeled-button/index.js +1 -1
  160. package/dist/picker-button/component.js +1 -1
  161. package/dist/picker-button/field/Component.js +1 -1
  162. package/dist/picker-button/field/index.js +1 -1
  163. package/dist/picker-button/index.js +1 -1
  164. package/dist/popover/component.js +1 -1
  165. package/dist/popover/index.js +1 -1
  166. package/dist/progress-bar/component.js +1 -1
  167. package/dist/progress-bar/index.js +1 -1
  168. package/dist/progress-index/component.js +1 -1
  169. package/dist/progress-index/index.js +1 -1
  170. package/dist/radio/component.js +1 -1
  171. package/dist/radio/index.js +1 -1
  172. package/dist/radio-group/component.js +1 -1
  173. package/dist/radio-group/index.js +1 -1
  174. package/dist/radio-groups/component.js +1 -1
  175. package/dist/radio-groups/index.js +1 -1
  176. package/dist/select/component.js +1 -1
  177. package/dist/select/components/base-select/component.js +1 -1
  178. package/dist/select/components/base-select/index.js +1 -1
  179. package/dist/select/components/field/component.js +1 -1
  180. package/dist/select/components/field/index.js +1 -1
  181. package/dist/select/components/index.js +1 -1
  182. package/dist/select/components/native-select/component.js +1 -1
  183. package/dist/select/components/native-select/index.js +1 -1
  184. package/dist/select/components/option/component.js +1 -1
  185. package/dist/select/components/option/index.js +1 -1
  186. package/dist/select/components/options-list/component.js +1 -1
  187. package/dist/select/components/options-list/index.js +1 -1
  188. package/dist/select/components/virtual-options-list/component.js +1 -1
  189. package/dist/select/components/virtual-options-list/index.js +1 -1
  190. package/dist/select/index.js +1 -1
  191. package/dist/select/presets/index.js +1 -1
  192. package/dist/select/presets/use-lazy-loading/index.js +1 -1
  193. package/dist/select/presets/use-select-with-loading/hook.js +1 -1
  194. package/dist/sidepanel/component.d.ts +1 -0
  195. package/dist/sidepanel/component.js +1 -1
  196. package/dist/sidepanel/index.js +1 -1
  197. package/dist/sidepanel-header/component.js +1 -1
  198. package/dist/sidepanel-header/index.js +1 -1
  199. package/dist/space/Item.js +1 -1
  200. package/dist/space/component.js +1 -1
  201. package/dist/space/index.js +1 -1
  202. package/dist/stepped-progress-bar/index.js +1 -1
  203. package/dist/stepped-progress-bar/step-bar.js +1 -1
  204. package/dist/suffix-input/component.js +1 -1
  205. package/dist/suffix-input/index.js +1 -1
  206. package/dist/super-list-header/component.js +1 -1
  207. package/dist/super-list-header/index.js +1 -1
  208. package/dist/super-list-item/component.js +1 -1
  209. package/dist/super-list-item/index.js +1 -1
  210. package/dist/switch/component.js +1 -1
  211. package/dist/switch/index.js +1 -1
  212. package/dist/table/columns.js +1 -1
  213. package/dist/table/component.js +1 -1
  214. package/dist/table/components/cell/component.js +1 -1
  215. package/dist/table/components/cell/index.js +1 -1
  216. package/dist/table/components/cells/index.js +1 -1
  217. package/dist/table/components/empty-list/index.js +1 -1
  218. package/dist/table/components/error/index.js +1 -1
  219. package/dist/table/components/loading/index.js +1 -1
  220. package/dist/table/components/pagination/index.js +1 -1
  221. package/dist/table/components/table-header/index.js +1 -1
  222. package/dist/table/hooks/use-table-data.js +1 -1
  223. package/dist/table/index.d.ts +1 -1
  224. package/dist/table/index.js +1 -1
  225. package/dist/table/table.js +1 -1
  226. package/dist/table/utils/add-query-param.js +1 -1
  227. package/dist/table/utils/get-query-from-url.js +1 -1
  228. package/dist/table/utils/index.d.ts +1 -1
  229. package/dist/table/utils/index.js +1 -1
  230. package/dist/table/utils/parse-query-params.js +1 -1
  231. package/dist/table/utils/prepare-rows.js +1 -1
  232. package/dist/table/utils/query-adapter.js +1 -1
  233. package/dist/table/utils/remove-query-param.js +1 -1
  234. package/dist/table/utils/reset-query-param.js +1 -1
  235. package/dist/table-status/component.js +1 -1
  236. package/dist/table-status/index.js +1 -1
  237. package/dist/tag/component.js +1 -1
  238. package/dist/tag/index.js +1 -1
  239. package/dist/tags-list/component.js +1 -1
  240. package/dist/tags-list/index.js +1 -1
  241. package/dist/textarea/component.js +1 -1
  242. package/dist/textarea/index.js +1 -1
  243. package/dist/toast/component.js +1 -1
  244. package/dist/toast/index.js +1 -1
  245. package/dist/toast-notifier/component.js +1 -1
  246. package/dist/toast-notifier/index.js +1 -1
  247. package/dist/toast-plate/component.js +1 -1
  248. package/dist/toast-plate/index.js +1 -1
  249. package/dist/tooltip/component.js +1 -1
  250. package/dist/tooltip/index.js +1 -1
  251. package/dist/typography/component.js +1 -1
  252. package/dist/typography/index.js +1 -1
  253. package/dist/typography/text/component.js +1 -1
  254. package/dist/typography/text/index.js +1 -1
  255. package/dist/typography/title/component.js +1 -1
  256. package/dist/typography/title/index.js +1 -1
  257. package/dist/{use-image-render-component-a5c3f37c.js → use-image-render-component-fa506c4d.js} +1 -1
  258. package/dist/utils/format-date/index.js +1 -1
  259. package/dist/utils/index.js +1 -1
  260. package/dist/utils/show-toast/index.js +1 -1
  261. package/dist/with-suffix/component.js +1 -1
  262. package/dist/with-suffix/index.js +1 -1
  263. package/package.json +1 -1
  264. package/dist/index-5bb9d5b1.js +0 -1
  265. package/dist/index-621793b3.js +0 -1
  266. package/dist/index-ca63148a.js +0 -1
  267. package/dist/index-e3623be4.js +0 -1
  268. /package/dist/{ActionCopyM-d2beda61.js → ActionCopyM-1c951f34.js} +0 -0
  269. /package/dist/{CancelM-8b428be4.js → CancelM-f0b11a6b.js} +0 -0
  270. /package/dist/{CheckmarkCircleM-ee00496a.js → CheckmarkCircleM-49f3dd6f.js} +0 -0
  271. /package/dist/{ChevronBackM-2ff8228f.js → ChevronBackM-464fcdaa.js} +0 -0
  272. /package/dist/{ChevronBackS-792a3f36.js → ChevronBackS-cdfdacd1.js} +0 -0
  273. /package/dist/{ChevronDownS-067bec14.js → ChevronDownS-bab2f304.js} +0 -0
  274. /package/dist/{ChevronForwardM-90748635.js → ChevronForwardM-b0f4d77f.js} +0 -0
  275. /package/dist/{ChevronForwardS-d8845af4.js → ChevronForwardS-ae9ab413.js} +0 -0
  276. /package/dist/{ClockCircleM-c941b602.js → ClockCircleM-e803405d.js} +0 -0
  277. /package/dist/{CloseS-04477776.js → CloseS-7deb8319.js} +0 -0
  278. /package/dist/{ControllerS-ba0e2979.js → ControllerS-cacb3c53.js} +0 -0
  279. /package/dist/{EditS-5ee2c94a.js → EditS-9597e1ff.js} +0 -0
  280. /package/dist/{MinusM-008322bc.js → MinusM-6639cb76.js} +0 -0
  281. /package/dist/{MoverS-eb23901f.js → MoverS-3ecb3089.js} +0 -0
  282. /package/dist/{NextS-6d4c943a.js → NextS-7c9988f3.js} +0 -0
  283. /package/dist/{PhotoS-5d061bb1.js → PhotoS-31268115.js} +0 -0
  284. /package/dist/{PlusS-026434a2.js → PlusS-1c542bf0.js} +0 -0
  285. /package/dist/{SearchM-67a825f1.js → SearchM-e3284287.js} +0 -0
  286. /package/dist/{TrashM-7a6ec0b8.js → TrashM-bec6d935.js} +0 -0
  287. /package/dist/{YoutubeM-f68bf37b.js → YoutubeM-c829d306.js} +0 -0
  288. /package/dist/{_commonjsHelpers-86b635bf.js → _commonjsHelpers-da874c38.js} +0 -0
  289. /package/dist/{colors.module-d2908d58.js → colors.module-4554e914.js} +0 -0
  290. /package/dist/{component-04d88c92.d.ts → component-37015898.d.ts} +0 -0
  291. /package/dist/{component-c9154263.d.ts → component-8e01c354.d.ts} +0 -0
  292. /package/dist/{component-c9154263.js → component-8e01c354.js} +0 -0
  293. /package/dist/{contact-block-c3ef5640.d.ts → contact-block-ce69b171.d.ts} +0 -0
  294. /package/dist/{contact-block-c3ef5640.js → contact-block-ce69b171.js} +0 -0
  295. /package/dist/{gutters.module-1c0c0be4.js → gutters.module-e3a74c58.js} +0 -0
  296. /package/dist/{index-525f9d01.js → index-33f08202.js} +0 -0
  297. /package/dist/{index-b2feb42d.js → index-509e34ca.js} +0 -0
  298. /package/dist/{intersection-observer-8a772aad.js → intersection-observer-756e8703.js} +0 -0
  299. /package/dist/{parse-query-params-99f3f8e6.d.ts → parse-query-params-410644ff.d.ts} +0 -0
  300. /package/dist/{slide-dbfd4f32.d.ts → slide-28b12bb2.d.ts} +0 -0
  301. /package/dist/{slide-dbfd4f32.js → slide-28b12bb2.js} +0 -0
  302. /package/dist/{step-bar-647e4ebe.d.ts → step-bar-dad256c9.d.ts} +0 -0
  303. /package/dist/{step-bar-647e4ebe.js → step-bar-dad256c9.js} +0 -0
  304. /package/dist/{tslib.es6-2505fb86.js → tslib.es6-c64bd4b7.js} +0 -0
  305. /package/dist/{use-image-render-component-a5c3f37c.d.ts → use-image-render-component-fa506c4d.d.ts} +0 -0
@@ -1 +1 @@
1
- import e,{useState as t,useCallback as r,useEffect as o}from"react";import{NavigationBar as i}from"./components/navigation-bar/index.js";import{Header as n}from"./components/header/index.js";import"classnames";import{GalleryContext as s}from"./context.js";import{ImageViewer as m}from"./components/image-viewer/index.js";import"swiper/swiper.min.css";import"./utils/utils.js";import"./utils/constants.js";import"./components/image-preview/index.js";import"./components/header-info-block/index.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-d2908d58.js";import"../typography/title/index.js";import"../tslib.es6-2505fb86.js";import"../typography/title/component.js";import"./utils/split-filename.js";import"element-closest";import"swiper";import"swiper/react";import"../hooks/useFocus/index.js";import"../utils/get-service-error/index.js";import"../utils/get-service-error/is-axios-error.js";import"../utils/get-service-error/is-network-error.js";import"../toast-notifier/component.js";import"react-dom";import"../toast-plate/component.js";import"../CheckmarkCircleM-ee00496a.js";import"../ClockCircleM-c941b602.js";import"../CloseS-04477776.js";import"../button/component.js";import"react-merge-refs";import"../loader/component.js";import"../toast-notifier/use-timer.js";import"../slide-dbfd4f32.js";var p="index-module_container__t-bnz",l=function(l){var c=l.open,a=l.images,u=l.initialSlide,d=void 0===u?0:u,f=l.loop,g=void 0===f||f,j=l.onClose,v=t(d),h=v[0],x=v[1],w=t(),k=w[0],y=w[1],b=t([]),C=b[0],S=b[1],E=t(!1),I=E[0],M=E[1],L=r((function(e){a[e]&&(x(e),k&&k.slideTo(e))}),[a,k]),_=r((function(){var e=a.length-1,t=h+1;t>=a.length&&(t=g?0:e),L(t)}),[a.length,g,h,L]),A=r((function(){var e=a.length-1,t=h-1;t<0&&(t=g?e:0),L(t)}),[a.length,g,h,L]),F=r((function(e,t){C[t]=e,S(C.slice())}),[C]),N=r((function(){j(),x(d),M(!1)}),[d,j]),P=r((function(e){if(c&&!I)switch(e.key){case"ArrowLeft":A();break;case"ArrowRight":_();break;case"Escape":N()}}),[I,c,_,A,N]);o((function(){return document.addEventListener("keydown",P),function(){document.removeEventListener("keydown",P)}}),[P]);var T=1===a.length,z=!T&&!I,R={singleSlide:T,currentSlideIndex:h,images:a,imagesMeta:C,fullScreen:I,initialSlide:d,setFullScreen:M,setImageMeta:F,slideNext:_,slidePrev:A,slideTo:L,getSwiper:function(){return k},setSwiper:y,onClose:N,setCurrentSlideIndex:x,getCurrentImage:function(){return a[h]},getCurrentImageMeta:function(){return C[h]}};return c?e.createElement(s.Provider,{value:R},e.createElement("div",{className:p},e.createElement(n,null),e.createElement(m,null),z&&e.createElement(i,null))):null};export{l as ImageGallery};
1
+ import e,{useState as t,useCallback as r,useEffect as o}from"react";import{NavigationBar as i}from"./components/navigation-bar/index.js";import{Header as n}from"./components/header/index.js";import"classnames";import{GalleryContext as s}from"./context.js";import{ImageViewer as m}from"./components/image-viewer/index.js";import"swiper/swiper.min.css";import"./utils/utils.js";import"./utils/constants.js";import"./components/image-preview/index.js";import"./components/header-info-block/index.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-4554e914.js";import"../typography/title/index.js";import"../tslib.es6-c64bd4b7.js";import"../typography/title/component.js";import"./utils/split-filename.js";import"element-closest";import"swiper";import"swiper/react";import"../hooks/useFocus/index.js";import"../utils/get-service-error/index.js";import"../utils/get-service-error/is-axios-error.js";import"../utils/get-service-error/is-network-error.js";import"../toast-notifier/component.js";import"react-dom";import"../toast-plate/component.js";import"../CheckmarkCircleM-49f3dd6f.js";import"../ClockCircleM-e803405d.js";import"../CloseS-7deb8319.js";import"../button/component.js";import"react-merge-refs";import"../loader/component.js";import"../toast-notifier/use-timer.js";import"../slide-28b12bb2.js";var p="index-module_container__t-bnz",l=function(l){var c=l.open,a=l.images,u=l.initialSlide,d=void 0===u?0:u,g=l.loop,j=void 0===g||g,f=l.onClose,v=t(d),h=v[0],x=v[1],w=t(),b=w[0],k=w[1],y=t([]),C=y[0],S=y[1],E=t(!1),I=E[0],M=E[1],L=r((function(e){a[e]&&(x(e),b&&b.slideTo(e))}),[a,b]),_=r((function(){var e=a.length-1,t=h+1;t>=a.length&&(t=j?0:e),L(t)}),[a.length,j,h,L]),A=r((function(){var e=a.length-1,t=h-1;t<0&&(t=j?e:0),L(t)}),[a.length,j,h,L]),F=r((function(e,t){C[t]=e,S(C.slice())}),[C]),N=r((function(){f(),x(d),M(!1)}),[d,f]),P=r((function(e){if(c&&!I)switch(e.key){case"ArrowLeft":A();break;case"ArrowRight":_();break;case"Escape":N()}}),[I,c,_,A,N]);o((function(){return document.addEventListener("keydown",P),function(){document.removeEventListener("keydown",P)}}),[P]);var T=1===a.length,z=!T&&!I,R={singleSlide:T,currentSlideIndex:h,images:a,imagesMeta:C,fullScreen:I,initialSlide:d,setFullScreen:M,setImageMeta:F,slideNext:_,slidePrev:A,slideTo:L,getSwiper:function(){return b},setSwiper:k,onClose:N,setCurrentSlideIndex:x,getCurrentImage:function(){return a[h]},getCurrentImageMeta:function(){return C[h]}};return c?e.createElement(s.Provider,{value:R},e.createElement("div",{className:p},e.createElement(n,null),e.createElement(m,null),z&&e.createElement(i,null))):null};export{l as ImageGallery};
@@ -1 +1 @@
1
- import e,{useContext as t,useRef as o,useEffect as r}from"react";import{GalleryContext as n}from"../../context.js";import{HeaderInfoBlock as m}from"../header-info-block/index.js";import"../../../typography/component.js";import"../../../typography/text/component.js";import"classnames";import"../../../colors.module-d2908d58.js";import"../../../typography/title/index.js";import"../../../tslib.es6-2505fb86.js";import"../../../typography/title/component.js";import"../../utils/split-filename.js";var i="index-module_header__597vy",l="index-module_buttons__ILnkB",p=function(){var p=t(n),s=p.fullScreen,a=p.getCurrentImage,c=p.onClose,u=o(null);r((function(){u.current&&u.current.focus()}),[s]);var d=a(),f=(null==d?void 0:d.name)||"";return e.createElement("div",{className:i},e.createElement(m,{filename:f}),e.createElement("div",{className:l},e.createElement("button",{type:"button",onClick:c},"close")))};export{p as Header};
1
+ import e,{useContext as t,useRef as o,useEffect as r}from"react";import{GalleryContext as n}from"../../context.js";import{HeaderInfoBlock as m}from"../header-info-block/index.js";import"../../../typography/component.js";import"../../../typography/text/component.js";import"classnames";import"../../../colors.module-4554e914.js";import"../../../typography/title/index.js";import"../../../tslib.es6-c64bd4b7.js";import"../../../typography/title/component.js";import"../../utils/split-filename.js";var i="index-module_header__597vy",l="index-module_buttons__ILnkB",p=function(){var p=t(n),s=p.fullScreen,a=p.getCurrentImage,c=p.onClose,u=o(null);r((function(){u.current&&u.current.focus()}),[s]);var d=a(),f=(null==d?void 0:d.name)||"";return e.createElement("div",{className:i},e.createElement(m,{filename:f}),e.createElement("div",{className:l},e.createElement("button",{type:"button",onClick:c},"close")))};export{p as Header};
@@ -1 +1 @@
1
- import e from"react";import{Typography as t}from"../../../typography/component.js";import{splitFilename as r}from"../../utils/split-filename.js";import"../../../typography/text/component.js";import"classnames";import"../../../colors.module-d2908d58.js";import"../../../typography/title/index.js";import"../../../tslib.es6-2505fb86.js";import"../../../typography/title/component.js";var o="index-module_info__I8Z23",i="index-module_filenameHead__urP7W",m="index-module_filenameContainer__v5Oht",a=function(a){var l=a.filename,n=r(l),p=n[0],s=n[1];return e.createElement("div",{className:o},e.createElement("div",{className:m},e.createElement(t.Title,{tag:"h1",className:i,view:"xsmall",color:"primary-inverted"},p),e.createElement(t.Title,{tag:"h1",view:"xsmall",color:"primary-inverted"},s)))};export{a as HeaderInfoBlock};
1
+ import e from"react";import{Typography as t}from"../../../typography/component.js";import{splitFilename as r}from"../../utils/split-filename.js";import"../../../typography/text/component.js";import"classnames";import"../../../colors.module-4554e914.js";import"../../../typography/title/index.js";import"../../../tslib.es6-c64bd4b7.js";import"../../../typography/title/component.js";var o="index-module_info__I8Z23",i="index-module_filenameHead__urP7W",m="index-module_filenameContainer__v5Oht",a=function(a){var l=a.filename,n=r(l),p=n[0],s=n[1];return e.createElement("div",{className:o},e.createElement("div",{className:m},e.createElement(t.Title,{tag:"h1",className:i,view:"xsmall",color:"primary-inverted"},p),e.createElement(t.Title,{tag:"h1",view:"xsmall",color:"primary-inverted"},s)))};export{a as HeaderInfoBlock};
@@ -1 +1 @@
1
- import{a as e}from"../../../tslib.es6-2505fb86.js";import t,{useContext as r,useRef as o,useCallback as i,useEffect as n,useMemo as s}from"react";import a from"classnames";import l from"element-closest";import m,{EffectFade as c,A11y as d,Controller as p}from"swiper";import{Swiper as u,SwiperSlide as f}from"swiper/react";import{useFocus as g}from"../../../hooks/useFocus/index.js";import"../../../utils/get-service-error/index.js";import"../../../toast-notifier/component.js";import{GalleryContext as v}from"../../context.js";import{getImageAlt as h,getImageKey as j}from"../../utils/utils.js";import{TestIds as w}from"../../utils/constants.js";import{s as y,S as E}from"../../../slide-dbfd4f32.js";import"swiper/swiper.min.css";import"../../../utils/get-service-error/is-axios-error.js";import"../../../utils/get-service-error/is-network-error.js";import"react-dom";import"../../../toast-plate/component.js";import"../../../CheckmarkCircleM-ee00496a.js";import"../../../ClockCircleM-c941b602.js";import"../../../CloseS-04477776.js";import"../../../button/component.js";import"react-merge-refs";import"../../../loader/component.js";import"../../../toast-notifier/use-timer.js";import"../../../typography/component.js";import"../../../typography/text/component.js";import"../../../colors.module-d2908d58.js";import"../../../typography/title/index.js";import"../../../typography/title/component.js";m.use([c,d,p]);var S=function(){var m,c,d,p=r(v),S=p.singleSlide,b=p.images,k=p.imagesMeta,x=p.fullScreen,C=p.currentSlideIndex,I=p.initialSlide,N=p.onClose,T=p.getCurrentImage,M=p.setImageMeta,A=p.setCurrentSlideIndex,D=p.getSwiper,L=p.setSwiper,P=p.slidePrev,R=p.slideNext,_=o(null),B=o(null),V=g(_,"keyboard")[0],F=g(B,"keyboard")[0],H=D(),K=i((function(){var e;A(null!==(e=null==H?void 0:H.activeIndex)&&void 0!==e?e:I)}),[A,H,I]),O=function(e,t){var r=e.currentTarget,o=r.naturalWidth,i=r.naturalHeight;M({width:o,height:i},t)},U=function(e){M({width:0,height:0,broken:!0},e)},G=i((function(e){var t,r,o=e.target,i=(null===(t=_.current)||void 0===t?void 0:t.contains(o))||(null===(r=B.current)||void 0===r?void 0:r.contains(o)),n=Boolean(o.closest("."+y.placeholder));"IMG"===o.tagName||n||i||N()}),[N]);n((function(){l(window)}),[]);var W=s((function(){var e;return{slidesPerView:1,effect:"fade",fadeEffect:{crossFade:!0},className:a(y.swiper,(e={},e[y.hidden]=x,e)),controller:{control:H},a11y:{slideRole:"img"},initialSlide:I,simulateTouch:!1,onSwiper:L,onSlideChange:K}}),[H,x,I,K,L]),X=!S&&!x,q=(null==H?void 0:H.width)||1,z=(null==H?void 0:H.height)||1,J=q/z,Q=T();return t.createElement("div",{className:a(y.component,(m={},m[y.singleSlide]=S,m)),onClick:G},X&&t.createElement("div",{className:a(y.arrow,(c={},c[y.focused]=V,c)),onClick:function(){P()},role:"button",onKeyDown:function(e){"Enter"===e.key&&P()},tabIndex:0,ref:_,"aria-label":"Предыдущее изображение","data-test-id":w.PREV_SLIDE_BUTTON},">"),x&&t.createElement("img",{src:null==Q?void 0:Q.src,alt:Q?h(Q,C):"",className:y.fullScreenImage}),t.createElement(u,e({},W),b.map((function(e,r){var o=k[r],i=((null==o?void 0:o.width)||1)/((null==o?void 0:o.height)||1),n=r===C;return t.createElement(f,{key:j(e,r),style:{pointerEvents:n?"auto":"none",transitionProperty:"opacity"}},(function(s){var a=s.isActive;return t.createElement(E,{isActive:a,swiperAspectRatio:J,image:e,swiperHeight:z,meta:o,index:r,imageAspectRatio:i,slideVisible:n,handleLoad:O,handleLoadError:U})}))}))),X&&t.createElement("div",{className:a(y.arrow,(d={},d[y.focused]=F,d)),onClick:function(){R()},role:"button",onKeyDown:function(e){"Enter"===e.key&&R()},tabIndex:0,ref:B,"aria-label":"Следующее изображение","data-test-id":w.NEXT_SLIDE_BUTTON},"<"))};export{S as ImageViewer};
1
+ import{a as e}from"../../../tslib.es6-c64bd4b7.js";import t,{useContext as r,useRef as o,useCallback as i,useEffect as n,useMemo as s}from"react";import a from"classnames";import l from"element-closest";import m,{EffectFade as c,A11y as d,Controller as p}from"swiper";import{Swiper as u,SwiperSlide as f}from"swiper/react";import{useFocus as g}from"../../../hooks/useFocus/index.js";import"../../../utils/get-service-error/index.js";import"../../../toast-notifier/component.js";import{GalleryContext as v}from"../../context.js";import{getImageAlt as h,getImageKey as j}from"../../utils/utils.js";import{TestIds as w}from"../../utils/constants.js";import{s as y,S as b}from"../../../slide-28b12bb2.js";import"swiper/swiper.min.css";import"../../../utils/get-service-error/is-axios-error.js";import"../../../utils/get-service-error/is-network-error.js";import"react-dom";import"../../../toast-plate/component.js";import"../../../CheckmarkCircleM-49f3dd6f.js";import"../../../ClockCircleM-e803405d.js";import"../../../CloseS-7deb8319.js";import"../../../button/component.js";import"react-merge-refs";import"../../../loader/component.js";import"../../../toast-notifier/use-timer.js";import"../../../typography/component.js";import"../../../typography/text/component.js";import"../../../colors.module-4554e914.js";import"../../../typography/title/index.js";import"../../../typography/title/component.js";m.use([c,d,p]);var E=function(){var m,c,d,p=r(v),E=p.singleSlide,S=p.images,k=p.imagesMeta,x=p.fullScreen,C=p.currentSlideIndex,I=p.initialSlide,N=p.onClose,T=p.getCurrentImage,M=p.setImageMeta,A=p.setCurrentSlideIndex,D=p.getSwiper,L=p.setSwiper,P=p.slidePrev,R=p.slideNext,_=o(null),B=o(null),V=g(_,"keyboard")[0],F=g(B,"keyboard")[0],H=D(),K=i((function(){var e;A(null!==(e=null==H?void 0:H.activeIndex)&&void 0!==e?e:I)}),[A,H,I]),O=function(e,t){var r=e.currentTarget,o=r.naturalWidth,i=r.naturalHeight;M({width:o,height:i},t)},U=function(e){M({width:0,height:0,broken:!0},e)},G=i((function(e){var t,r,o=e.target,i=(null===(t=_.current)||void 0===t?void 0:t.contains(o))||(null===(r=B.current)||void 0===r?void 0:r.contains(o)),n=Boolean(o.closest("."+y.placeholder));"IMG"===o.tagName||n||i||N()}),[N]);n((function(){l(window)}),[]);var W=s((function(){var e;return{slidesPerView:1,effect:"fade",fadeEffect:{crossFade:!0},className:a(y.swiper,(e={},e[y.hidden]=x,e)),controller:{control:H},a11y:{slideRole:"img"},initialSlide:I,simulateTouch:!1,onSwiper:L,onSlideChange:K}}),[H,x,I,K,L]),X=!E&&!x,q=(null==H?void 0:H.width)||1,z=(null==H?void 0:H.height)||1,J=q/z,Q=T();return t.createElement("div",{className:a(y.component,(m={},m[y.singleSlide]=E,m)),onClick:G},X&&t.createElement("div",{className:a(y.arrow,(c={},c[y.focused]=V,c)),onClick:function(){P()},role:"button",onKeyDown:function(e){"Enter"===e.key&&P()},tabIndex:0,ref:_,"aria-label":"Предыдущее изображение","data-test-id":w.PREV_SLIDE_BUTTON},">"),x&&t.createElement("img",{src:null==Q?void 0:Q.src,alt:Q?h(Q,C):"",className:y.fullScreenImage}),t.createElement(u,e({},W),S.map((function(e,r){var o=k[r],i=((null==o?void 0:o.width)||1)/((null==o?void 0:o.height)||1),n=r===C;return t.createElement(f,{key:j(e,r),style:{pointerEvents:n?"auto":"none",transitionProperty:"opacity"}},(function(s){var a=s.isActive;return t.createElement(b,{isActive:a,swiperAspectRatio:J,image:e,swiperHeight:z,meta:o,index:r,imageAspectRatio:i,slideVisible:n,handleLoad:O,handleLoadError:U})}))}))),X&&t.createElement("div",{className:a(y.arrow,(d={},d[y.focused]=F,d)),onClick:function(){R()},role:"button",onKeyDown:function(e){"Enter"===e.key&&R()},tabIndex:0,ref:B,"aria-label":"Следующее изображение","data-test-id":w.NEXT_SLIDE_BUTTON},"<"))};export{E as ImageViewer};
@@ -1 +1 @@
1
- import"react";import"classnames";import"../../../typography/component.js";import"../../utils/utils.js";import"../../utils/constants.js";export{S as Slide}from"../../../slide-dbfd4f32.js";import"../../../typography/text/component.js";import"../../../colors.module-d2908d58.js";import"../../../typography/title/index.js";import"../../../tslib.es6-2505fb86.js";import"../../../typography/title/component.js";
1
+ import"react";import"classnames";import"../../../typography/component.js";import"../../utils/utils.js";import"../../utils/constants.js";export{S as Slide}from"../../../slide-28b12bb2.js";import"../../../typography/text/component.js";import"../../../colors.module-4554e914.js";import"../../../typography/title/index.js";import"../../../tslib.es6-c64bd4b7.js";import"../../../typography/title/component.js";
@@ -1 +1 @@
1
- export{NavigationBar}from"./navigation-bar/index.js";export{Header}from"./header/index.js";export{ImagePreview}from"./image-preview/index.js";export{ImageViewer}from"./image-viewer/index.js";import"react";import"../context.js";import"../utils/utils.js";import"../utils/constants.js";import"classnames";import"./header-info-block/index.js";import"../../typography/component.js";import"../../typography/text/component.js";import"../../colors.module-d2908d58.js";import"../../typography/title/index.js";import"../../tslib.es6-2505fb86.js";import"../../typography/title/component.js";import"../utils/split-filename.js";import"element-closest";import"swiper";import"swiper/react";import"../../hooks/useFocus/index.js";import"../../utils/get-service-error/index.js";import"../../utils/get-service-error/is-axios-error.js";import"../../utils/get-service-error/is-network-error.js";import"../../toast-notifier/component.js";import"react-dom";import"../../toast-plate/component.js";import"../../CheckmarkCircleM-ee00496a.js";import"../../ClockCircleM-c941b602.js";import"../../CloseS-04477776.js";import"../../button/component.js";import"react-merge-refs";import"../../loader/component.js";import"../../toast-notifier/use-timer.js";import"../../slide-dbfd4f32.js";import"swiper/swiper.min.css";
1
+ export{NavigationBar}from"./navigation-bar/index.js";export{Header}from"./header/index.js";export{ImagePreview}from"./image-preview/index.js";export{ImageViewer}from"./image-viewer/index.js";import"react";import"../context.js";import"../utils/utils.js";import"../utils/constants.js";import"classnames";import"./header-info-block/index.js";import"../../typography/component.js";import"../../typography/text/component.js";import"../../colors.module-4554e914.js";import"../../typography/title/index.js";import"../../tslib.es6-c64bd4b7.js";import"../../typography/title/component.js";import"../utils/split-filename.js";import"element-closest";import"swiper";import"swiper/react";import"../../hooks/useFocus/index.js";import"../../utils/get-service-error/index.js";import"../../utils/get-service-error/is-axios-error.js";import"../../utils/get-service-error/is-network-error.js";import"../../toast-notifier/component.js";import"react-dom";import"../../toast-plate/component.js";import"../../CheckmarkCircleM-49f3dd6f.js";import"../../ClockCircleM-e803405d.js";import"../../CloseS-7deb8319.js";import"../../button/component.js";import"react-merge-refs";import"../../loader/component.js";import"../../toast-notifier/use-timer.js";import"../../slide-28b12bb2.js";import"swiper/swiper.min.css";
@@ -1 +1 @@
1
- export{ImageGallery}from"./component.js";export{splitFilename}from"./utils/split-filename.js";export{PLACEHOLDER_HEIGHT,PLACEHOLDER_WIDTH,getImageAlt,getImageKey,isSmallImage}from"./utils/utils.js";export{TestIds}from"./utils/constants.js";import"react";import"./components/navigation-bar/index.js";import"./context.js";import"./components/image-preview/index.js";import"classnames";import"./components/header/index.js";import"./components/header-info-block/index.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-d2908d58.js";import"../typography/title/index.js";import"../tslib.es6-2505fb86.js";import"../typography/title/component.js";import"./components/image-viewer/index.js";import"element-closest";import"swiper";import"swiper/react";import"../hooks/useFocus/index.js";import"../utils/get-service-error/index.js";import"../utils/get-service-error/is-axios-error.js";import"../utils/get-service-error/is-network-error.js";import"../toast-notifier/component.js";import"react-dom";import"../toast-plate/component.js";import"../CheckmarkCircleM-ee00496a.js";import"../ClockCircleM-c941b602.js";import"../CloseS-04477776.js";import"../button/component.js";import"react-merge-refs";import"../loader/component.js";import"../toast-notifier/use-timer.js";import"../slide-dbfd4f32.js";import"swiper/swiper.min.css";
1
+ export{ImageGallery}from"./component.js";export{splitFilename}from"./utils/split-filename.js";export{PLACEHOLDER_HEIGHT,PLACEHOLDER_WIDTH,getImageAlt,getImageKey,isSmallImage}from"./utils/utils.js";export{TestIds}from"./utils/constants.js";import"react";import"./components/navigation-bar/index.js";import"./context.js";import"./components/image-preview/index.js";import"classnames";import"./components/header/index.js";import"./components/header-info-block/index.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-4554e914.js";import"../typography/title/index.js";import"../tslib.es6-c64bd4b7.js";import"../typography/title/component.js";import"./components/image-viewer/index.js";import"element-closest";import"swiper";import"swiper/react";import"../hooks/useFocus/index.js";import"../utils/get-service-error/index.js";import"../utils/get-service-error/is-axios-error.js";import"../utils/get-service-error/is-network-error.js";import"../toast-notifier/component.js";import"react-dom";import"../toast-plate/component.js";import"../CheckmarkCircleM-49f3dd6f.js";import"../ClockCircleM-e803405d.js";import"../CloseS-7deb8319.js";import"../button/component.js";import"react-merge-refs";import"../loader/component.js";import"../toast-notifier/use-timer.js";import"../slide-28b12bb2.js";import"swiper/swiper.min.css";
@@ -1 +1 @@
1
- import{c as e,d as t,b as r}from"../tslib.es6-2505fb86.js";import o,{forwardRef as i,useState as n,useRef as m}from"react";import{H as s,E as a,T as l}from"../TrashM-7a6ec0b8.js";import{P as c}from"../PlusS-026434a2.js";import{Button as p}from"../button/component.js";import{FlexColumns as u}from"../flex-columns/component.js";import{IconButton as d}from"../icon-button/component.js";import{Image as g}from"../image/component.js";import{ImageGallery as f}from"../image-gallery/component.js";import{Padding as j}from"../padding/component.js";import{SuperListHeader as v}from"../super-list-header/component.js";import{Typography as y}from"../typography/component.js";import{getServiceError as h}from"../utils/get-service-error/index.js";import{showError as x}from"../utils/show-toast/index.js";import"react-merge-refs";import"classnames";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../skeleton/component.js";import"../use-image-render-component-a5c3f37c.js";import"../PhotoS-5d061bb1.js";import"../spinner/component.js";import"../image/types.js";import"../image/utils.js";import"../typography/text/component.js";import"../colors.module-d2908d58.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../image-gallery/components/navigation-bar/index.js";import"../image-gallery/context.js";import"../image-gallery/utils/utils.js";import"../image-gallery/utils/constants.js";import"../image-gallery/components/image-preview/index.js";import"../image-gallery/components/header/index.js";import"../image-gallery/components/header-info-block/index.js";import"../image-gallery/utils/split-filename.js";import"../image-gallery/components/image-viewer/index.js";import"element-closest";import"swiper";import"swiper/react";import"../toast-notifier/component.js";import"react-dom";import"../toast-plate/component.js";import"../CheckmarkCircleM-ee00496a.js";import"../ClockCircleM-c941b602.js";import"../CloseS-04477776.js";import"../toast-notifier/use-timer.js";import"../slide-dbfd4f32.js";import"swiper/swiper.min.css";import"../utils/get-service-error/is-axios-error.js";import"../utils/get-service-error/is-network-error.js";var w="index-module_image__5DvrD",E="index-module_icon__Xtgbu",b="index-module_controls__XUF4X",k="index-module_main__ZMTqM",C=i((function(i,C){var _=i.value,N=void 0===_?[]:_,M=i.title,S=i.subtitle,T=i.columns,z=void 0===T?3:T,F=i.onUpdate,P=i.uploadRequest,A=i.setMain,D=i.type,X=i.main,q=i.multiple,U=i.error,H=i.className,I=i.children,R=n(!1),Z=R[0],B=R[1],G=n(),J=G[0],K=G[1],L=n(!1),O=L[0],Q=L[1],V=m(null),W=function(o){var i=o.target.files;return e(void 0,void 0,void 0,(function(){var e,o,n,m,s;return t(this,(function(t){switch(t.label){case 0:if(!i)return[2];e=Array.from(i).map((function(e){var t=new FormData;return t.append("file",e),t.append("type",D),P({data:t})})),Q(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,Promise.all(e)];case 2:return o=t.sent(),n=o.map((function(e){return e.data.url})),F(q?r(r([],N),n):n),[3,5];case 3:return m=t.sent(),s=h(m).message,x(s),[3,5];case 4:return V.current&&(V.current.value=""),Q(!1),[7];case 5:return[2]}}))}))};return o.createElement("div",{className:H},o.createElement("input",{type:"file",style:{height:0,position:"absolute"},ref:C,onChange:W,multiple:q,accept:"image/*, .heic"}),o.createElement("input",{type:"file",style:{height:0,position:"absolute"},ref:V,onChange:W,multiple:q,accept:"image/*, .heic"}),I?o.createElement(p,{view:"ghost",onClick:function(){var e;return null===(e=V.current)||void 0===e?void 0:e.click()}},I({value:N,loading:O})):o.createElement(o.Fragment,null,o.createElement(v,{text:M,leftAddons:o.createElement(d,{onClick:function(){var e;return null===(e=V.current)||void 0===e?void 0:e.click()},icon:c,loading:O})}),S&&o.createElement(y.Text,{view:"primary-small",color:"secondary",weight:"medium"},S),o.createElement(j,{padding:"4px 0"},U&&o.createElement(y.Text,{view:"caps",color:"negative",weight:"medium"},U)),o.createElement(u,{columns:z},N.map((function(e,t){return o.createElement(g,{key:e,className:w,src:e,size:"xl",view:"default"},o.createElement("div",{className:b},!!A&&X!==e&&o.createElement(d,{onClick:function(){return A(e)},icon:s,size:"m",view:"secondary",className:E}),o.createElement(d,{onClick:function(){K(t),B(!0)},icon:a,size:"m",view:"secondary",className:E}),o.createElement(d,{onClick:function(){return t=e,void F(N.filter((function(e){return e!==t})));var t},icon:l,size:"m",view:"secondary",className:E})),X===e&&o.createElement("div",{className:k},"MAIN"))}))),o.createElement(f,{initialSlide:J,onClose:function(){return B(!1)},open:Z,images:N.map((function(e){return{src:e,previewSrc:e}}))})))}));export{C as ImageUploader};
1
+ import{c as e,d as t,b as r}from"../tslib.es6-c64bd4b7.js";import o,{forwardRef as i,useState as n,useRef as m}from"react";import{H as s,E as a,T as l}from"../TrashM-bec6d935.js";import{P as c}from"../PlusS-1c542bf0.js";import{Button as p}from"../button/component.js";import{FlexColumns as u}from"../flex-columns/component.js";import{IconButton as d}from"../icon-button/component.js";import{Image as g}from"../image/component.js";import{ImageGallery as f}from"../image-gallery/component.js";import{Padding as j}from"../padding/component.js";import{SuperListHeader as v}from"../super-list-header/component.js";import{Typography as y}from"../typography/component.js";import{getServiceError as h}from"../utils/get-service-error/index.js";import{showError as x}from"../utils/show-toast/index.js";import"react-merge-refs";import"classnames";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../skeleton/component.js";import"../use-image-render-component-fa506c4d.js";import"../PhotoS-31268115.js";import"../spinner/component.js";import"../image/types.js";import"../image/utils.js";import"../typography/text/component.js";import"../colors.module-4554e914.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../image-gallery/components/navigation-bar/index.js";import"../image-gallery/context.js";import"../image-gallery/utils/utils.js";import"../image-gallery/utils/constants.js";import"../image-gallery/components/image-preview/index.js";import"../image-gallery/components/header/index.js";import"../image-gallery/components/header-info-block/index.js";import"../image-gallery/utils/split-filename.js";import"../image-gallery/components/image-viewer/index.js";import"element-closest";import"swiper";import"swiper/react";import"../toast-notifier/component.js";import"react-dom";import"../toast-plate/component.js";import"../CheckmarkCircleM-49f3dd6f.js";import"../ClockCircleM-e803405d.js";import"../CloseS-7deb8319.js";import"../toast-notifier/use-timer.js";import"../slide-28b12bb2.js";import"swiper/swiper.min.css";import"../utils/get-service-error/is-axios-error.js";import"../utils/get-service-error/is-network-error.js";var b="index-module_image__5DvrD",w="index-module_icon__Xtgbu",E="index-module_controls__XUF4X",k="index-module_main__ZMTqM",C=i((function(i,C){var _=i.value,N=void 0===_?[]:_,M=i.title,S=i.subtitle,T=i.columns,z=void 0===T?3:T,F=i.onUpdate,P=i.uploadRequest,A=i.setMain,D=i.type,X=i.main,q=i.multiple,U=i.error,H=i.className,I=i.children,R=n(!1),Z=R[0],B=R[1],G=n(),J=G[0],K=G[1],L=n(!1),O=L[0],Q=L[1],V=m(null),W=function(o){var i=o.target.files;return e(void 0,void 0,void 0,(function(){var e,o,n,m,s;return t(this,(function(t){switch(t.label){case 0:if(!i)return[2];e=Array.from(i).map((function(e){var t=new FormData;return t.append("file",e),t.append("type",D),P({data:t})})),Q(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,Promise.all(e)];case 2:return o=t.sent(),n=o.map((function(e){return e.data.url})),F(q?r(r([],N),n):n),[3,5];case 3:return m=t.sent(),s=h(m).message,x(s),[3,5];case 4:return V.current&&(V.current.value=""),Q(!1),[7];case 5:return[2]}}))}))};return o.createElement("div",{className:H},o.createElement("input",{type:"file",style:{height:0,position:"absolute"},ref:C,onChange:W,multiple:q,accept:"image/*, .heic"}),o.createElement("input",{type:"file",style:{height:0,position:"absolute"},ref:V,onChange:W,multiple:q,accept:"image/*, .heic"}),I?o.createElement(p,{view:"ghost",onClick:function(){var e;return null===(e=V.current)||void 0===e?void 0:e.click()}},I({value:N,loading:O})):o.createElement(o.Fragment,null,o.createElement(v,{text:M,leftAddons:o.createElement(d,{onClick:function(){var e;return null===(e=V.current)||void 0===e?void 0:e.click()},icon:c,loading:O})}),S&&o.createElement(y.Text,{view:"primary-small",color:"secondary",weight:"medium"},S),o.createElement(j,{padding:"4px 0"},U&&o.createElement(y.Text,{view:"caps",color:"negative",weight:"medium"},U)),o.createElement(u,{columns:z},N.map((function(e,t){return o.createElement(g,{key:e,className:b,src:e,size:"xl",view:"default"},o.createElement("div",{className:E},!!A&&X!==e&&o.createElement(d,{onClick:function(){return A(e)},icon:s,size:"m",view:"secondary",className:w}),o.createElement(d,{onClick:function(){K(t),B(!0)},icon:a,size:"m",view:"secondary",className:w}),o.createElement(d,{onClick:function(){return t=e,void F(N.filter((function(e){return e!==t})));var t},icon:l,size:"m",view:"secondary",className:w})),X===e&&o.createElement("div",{className:k},"MAIN"))}))),o.createElement(f,{initialSlide:J,onClose:function(){return B(!1)},open:Z,images:N.map((function(e){return{src:e,previewSrc:e}}))})))}));export{C as ImageUploader};
@@ -1 +1 @@
1
- export{ImageUploader}from"./component.js";import"../tslib.es6-2505fb86.js";import"react";import"../TrashM-7a6ec0b8.js";import"../PlusS-026434a2.js";import"../button/component.js";import"react-merge-refs";import"classnames";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../flex-columns/component.js";import"../icon-button/component.js";import"../image/component.js";import"../skeleton/component.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-d2908d58.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../use-image-render-component-a5c3f37c.js";import"../PhotoS-5d061bb1.js";import"../spinner/component.js";import"../image/types.js";import"../image/utils.js";import"../image-gallery/component.js";import"../image-gallery/components/navigation-bar/index.js";import"../image-gallery/context.js";import"../image-gallery/utils/utils.js";import"../image-gallery/utils/constants.js";import"../image-gallery/components/image-preview/index.js";import"../image-gallery/components/header/index.js";import"../image-gallery/components/header-info-block/index.js";import"../image-gallery/utils/split-filename.js";import"../image-gallery/components/image-viewer/index.js";import"element-closest";import"swiper";import"swiper/react";import"../utils/get-service-error/index.js";import"../utils/get-service-error/is-axios-error.js";import"../utils/get-service-error/is-network-error.js";import"../toast-notifier/component.js";import"react-dom";import"../toast-plate/component.js";import"../CheckmarkCircleM-ee00496a.js";import"../ClockCircleM-c941b602.js";import"../CloseS-04477776.js";import"../toast-notifier/use-timer.js";import"../slide-dbfd4f32.js";import"swiper/swiper.min.css";import"../padding/component.js";import"../super-list-header/component.js";import"../utils/show-toast/index.js";
1
+ export{ImageUploader}from"./component.js";import"../tslib.es6-c64bd4b7.js";import"react";import"../TrashM-bec6d935.js";import"../PlusS-1c542bf0.js";import"../button/component.js";import"react-merge-refs";import"classnames";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../flex-columns/component.js";import"../icon-button/component.js";import"../image/component.js";import"../skeleton/component.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-4554e914.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../use-image-render-component-fa506c4d.js";import"../PhotoS-31268115.js";import"../spinner/component.js";import"../image/types.js";import"../image/utils.js";import"../image-gallery/component.js";import"../image-gallery/components/navigation-bar/index.js";import"../image-gallery/context.js";import"../image-gallery/utils/utils.js";import"../image-gallery/utils/constants.js";import"../image-gallery/components/image-preview/index.js";import"../image-gallery/components/header/index.js";import"../image-gallery/components/header-info-block/index.js";import"../image-gallery/utils/split-filename.js";import"../image-gallery/components/image-viewer/index.js";import"element-closest";import"swiper";import"swiper/react";import"../utils/get-service-error/index.js";import"../utils/get-service-error/is-axios-error.js";import"../utils/get-service-error/is-network-error.js";import"../toast-notifier/component.js";import"react-dom";import"../toast-plate/component.js";import"../CheckmarkCircleM-49f3dd6f.js";import"../ClockCircleM-e803405d.js";import"../CloseS-7deb8319.js";import"../toast-notifier/use-timer.js";import"../slide-28b12bb2.js";import"swiper/swiper.min.css";import"../padding/component.js";import"../super-list-header/component.js";import"../utils/show-toast/index.js";
@@ -1,4 +1,4 @@
1
- import{c as e}from"./_commonjsHelpers-86b635bf.js";
1
+ import{c as e}from"./_commonjsHelpers-da874c38.js";
2
2
  /** @license React v16.13.1
3
3
  * react-is.production.min.js
4
4
  *
@@ -6,4 +6,4 @@ import{c as e}from"./_commonjsHelpers-86b635bf.js";
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var o="function"==typeof Symbol&&Symbol.for,r=o?Symbol.for("react.element"):60103,t=o?Symbol.for("react.portal"):60106,n=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,f=o?Symbol.for("react.provider"):60109,a=o?Symbol.for("react.context"):60110,i=o?Symbol.for("react.async_mode"):60111,u=o?Symbol.for("react.concurrent_mode"):60111,y=o?Symbol.for("react.forward_ref"):60112,l=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.suspense_list"):60120,p=o?Symbol.for("react.memo"):60115,d=o?Symbol.for("react.lazy"):60116,b=o?Symbol.for("react.block"):60121,S=o?Symbol.for("react.fundamental"):60117,$=o?Symbol.for("react.responder"):60118,M=o?Symbol.for("react.scope"):60119;function C(e){if("object"==typeof e&&null!==e){var o=e.$$typeof;switch(o){case r:switch(e=e.type){case i:case u:case n:case s:case c:case l:return e;default:switch(e=e&&e.$$typeof){case a:case y:case d:case p:case f:return e;default:return o}}case t:return o}}}function v(e){return C(e)===u}var P={AsyncMode:i,ConcurrentMode:u,ContextConsumer:a,ContextProvider:f,Element:r,ForwardRef:y,Fragment:n,Lazy:d,Memo:p,Portal:t,Profiler:s,StrictMode:c,Suspense:l,isAsyncMode:function(e){return v(e)||C(e)===i},isConcurrentMode:v,isContextConsumer:function(e){return C(e)===a},isContextProvider:function(e){return C(e)===f},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},isForwardRef:function(e){return C(e)===y},isFragment:function(e){return C(e)===n},isLazy:function(e){return C(e)===d},isMemo:function(e){return C(e)===p},isPortal:function(e){return C(e)===t},isProfiler:function(e){return C(e)===s},isStrictMode:function(e){return C(e)===c},isSuspense:function(e){return C(e)===l},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===n||e===u||e===s||e===c||e===l||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===p||e.$$typeof===f||e.$$typeof===a||e.$$typeof===y||e.$$typeof===S||e.$$typeof===$||e.$$typeof===M||e.$$typeof===b)},typeOf:C},x=e((function(e,o){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,c=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,i=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,y=e?Symbol.for("react.forward_ref"):60112,l=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,$=e?Symbol.for("react.responder"):60118,M=e?Symbol.for("react.scope"):60119;function C(e){if("object"==typeof e&&null!==e){var o=e.$$typeof;switch(o){case r:var m=e.type;switch(m){case i:case u:case n:case s:case c:case l:return m;default:var b=m&&m.$$typeof;switch(b){case a:case y:case d:case p:case f:return b;default:return o}}case t:return o}}}var v=i,P=u,x=a,w=f,E=r,_=y,F=n,g=d,h=p,R=t,j=s,z=c,A=l,L=!1;function O(e){return C(e)===u}o.AsyncMode=v,o.ConcurrentMode=P,o.ContextConsumer=x,o.ContextProvider=w,o.Element=E,o.ForwardRef=_,o.Fragment=F,o.Lazy=g,o.Memo=h,o.Portal=R,o.Profiler=j,o.StrictMode=z,o.Suspense=A,o.isAsyncMode=function(e){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(e)||C(e)===i},o.isConcurrentMode=O,o.isContextConsumer=function(e){return C(e)===a},o.isContextProvider=function(e){return C(e)===f},o.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},o.isForwardRef=function(e){return C(e)===y},o.isFragment=function(e){return C(e)===n},o.isLazy=function(e){return C(e)===d},o.isMemo=function(e){return C(e)===p},o.isPortal=function(e){return C(e)===t},o.isProfiler=function(e){return C(e)===s},o.isStrictMode=function(e){return C(e)===c},o.isSuspense=function(e){return C(e)===l},o.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===u||e===s||e===c||e===l||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===p||e.$$typeof===f||e.$$typeof===a||e.$$typeof===y||e.$$typeof===S||e.$$typeof===$||e.$$typeof===M||e.$$typeof===b)},o.typeOf=C}()}));x.AsyncMode,x.ConcurrentMode,x.ContextConsumer,x.ContextProvider,x.Element,x.ForwardRef,x.Fragment,x.Lazy,x.Memo,x.Portal,x.Profiler,x.StrictMode,x.Suspense,x.isAsyncMode,x.isConcurrentMode,x.isContextConsumer,x.isContextProvider,x.isElement,x.isForwardRef,x.isFragment,x.isLazy,x.isMemo,x.isPortal,x.isProfiler,x.isStrictMode,x.isSuspense,x.isValidElementType,x.typeOf;var w=e((function(e){"production"===process.env.NODE_ENV?e.exports=P:e.exports=x}));export{w as r};
9
+ */var o="function"==typeof Symbol&&Symbol.for,r=o?Symbol.for("react.element"):60103,t=o?Symbol.for("react.portal"):60106,n=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,f=o?Symbol.for("react.provider"):60109,a=o?Symbol.for("react.context"):60110,i=o?Symbol.for("react.async_mode"):60111,u=o?Symbol.for("react.concurrent_mode"):60111,y=o?Symbol.for("react.forward_ref"):60112,l=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.suspense_list"):60120,p=o?Symbol.for("react.memo"):60115,d=o?Symbol.for("react.lazy"):60116,S=o?Symbol.for("react.block"):60121,b=o?Symbol.for("react.fundamental"):60117,$=o?Symbol.for("react.responder"):60118,M=o?Symbol.for("react.scope"):60119;function C(e){if("object"==typeof e&&null!==e){var o=e.$$typeof;switch(o){case r:switch(e=e.type){case i:case u:case n:case s:case c:case l:return e;default:switch(e=e&&e.$$typeof){case a:case y:case d:case p:case f:return e;default:return o}}case t:return o}}}function v(e){return C(e)===u}var P={AsyncMode:i,ConcurrentMode:u,ContextConsumer:a,ContextProvider:f,Element:r,ForwardRef:y,Fragment:n,Lazy:d,Memo:p,Portal:t,Profiler:s,StrictMode:c,Suspense:l,isAsyncMode:function(e){return v(e)||C(e)===i},isConcurrentMode:v,isContextConsumer:function(e){return C(e)===a},isContextProvider:function(e){return C(e)===f},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},isForwardRef:function(e){return C(e)===y},isFragment:function(e){return C(e)===n},isLazy:function(e){return C(e)===d},isMemo:function(e){return C(e)===p},isPortal:function(e){return C(e)===t},isProfiler:function(e){return C(e)===s},isStrictMode:function(e){return C(e)===c},isSuspense:function(e){return C(e)===l},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===n||e===u||e===s||e===c||e===l||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===p||e.$$typeof===f||e.$$typeof===a||e.$$typeof===y||e.$$typeof===b||e.$$typeof===$||e.$$typeof===M||e.$$typeof===S)},typeOf:C},x=e((function(e,o){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,r=e?Symbol.for("react.element"):60103,t=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,c=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,f=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,i=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,y=e?Symbol.for("react.forward_ref"):60112,l=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,S=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,$=e?Symbol.for("react.responder"):60118,M=e?Symbol.for("react.scope"):60119;function C(e){if("object"==typeof e&&null!==e){var o=e.$$typeof;switch(o){case r:var m=e.type;switch(m){case i:case u:case n:case s:case c:case l:return m;default:var S=m&&m.$$typeof;switch(S){case a:case y:case d:case p:case f:return S;default:return o}}case t:return o}}}var v=i,P=u,x=a,w=f,E=r,_=y,F=n,g=d,h=p,R=t,j=s,z=c,A=l,L=!1;function O(e){return C(e)===u}o.AsyncMode=v,o.ConcurrentMode=P,o.ContextConsumer=x,o.ContextProvider=w,o.Element=E,o.ForwardRef=_,o.Fragment=F,o.Lazy=g,o.Memo=h,o.Portal=R,o.Profiler=j,o.StrictMode=z,o.Suspense=A,o.isAsyncMode=function(e){return L||(L=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(e)||C(e)===i},o.isConcurrentMode=O,o.isContextConsumer=function(e){return C(e)===a},o.isContextProvider=function(e){return C(e)===f},o.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},o.isForwardRef=function(e){return C(e)===y},o.isFragment=function(e){return C(e)===n},o.isLazy=function(e){return C(e)===d},o.isMemo=function(e){return C(e)===p},o.isPortal=function(e){return C(e)===t},o.isProfiler=function(e){return C(e)===s},o.isStrictMode=function(e){return C(e)===c},o.isSuspense=function(e){return C(e)===l},o.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===u||e===s||e===c||e===l||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===p||e.$$typeof===f||e.$$typeof===a||e.$$typeof===y||e.$$typeof===b||e.$$typeof===$||e.$$typeof===M||e.$$typeof===S)},o.typeOf=C}()}));x.AsyncMode,x.ConcurrentMode,x.ContextConsumer,x.ContextProvider,x.Element,x.ForwardRef,x.Fragment,x.Lazy,x.Memo,x.Portal,x.Profiler,x.StrictMode,x.Suspense,x.isAsyncMode,x.isConcurrentMode,x.isContextConsumer,x.isContextProvider,x.isElement,x.isForwardRef,x.isFragment,x.isLazy,x.isMemo,x.isPortal,x.isProfiler,x.isStrictMode,x.isSuspense,x.isValidElementType,x.typeOf;var w=e((function(e){"production"===process.env.NODE_ENV?e.exports=P:e.exports=x}));export{w as r};