@layers-app/shared 0.2.3 → 0.2.5

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 (230) hide show
  1. package/dist/assets/jsons/emoji-categorized-windows.json.js +4 -0
  2. package/dist/assets/jsons/emoji-categorized-windows10.json.js +4 -0
  3. package/dist/assets/svg/users.svg.js +5 -0
  4. package/dist/assets/svg/whatsapp-icon.svg.js +5 -0
  5. package/dist/components/AliasTextInput/AliasTextInput.d.ts +3 -1
  6. package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
  7. package/dist/components/AliasTextInput/AliasTextInput.js +63 -54
  8. package/dist/components/AppContainer/AppContainer.d.ts +1 -1
  9. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  10. package/dist/components/AppContainer/AppContainer.js +54 -43
  11. package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
  12. package/dist/components/AppContainer/components/AppSidebarButton.js +1 -1
  13. package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +5 -5
  14. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  15. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +56 -43
  16. package/dist/components/AppContainer/components/Main.d.ts +5 -1
  17. package/dist/components/AppContainer/components/Main.d.ts.map +1 -1
  18. package/dist/components/AppContainer/components/Main.js +11 -8
  19. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  20. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +34 -19
  21. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
  22. package/dist/components/AppContainer/components/menus/MoreMenu.js +8 -8
  23. package/dist/components/AppContainer/components/menus/UserMenu/MenuUserDropdown.d.ts +1 -0
  24. package/dist/components/AppContainer/components/menus/UserMenu/MenuUserDropdown.d.ts.map +1 -1
  25. package/dist/components/AppContainer/hooks/useAppContainerStore.d.ts.map +1 -1
  26. package/dist/components/AppContainer/hooks/useAppContainerStore.js +12 -9
  27. package/dist/components/AppContainer/types.d.ts +2 -0
  28. package/dist/components/AppContainer/types.d.ts.map +1 -1
  29. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryModal.d.ts +1 -1
  30. package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryModal.d.ts.map +1 -1
  31. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts +1 -1
  32. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
  33. package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +5 -5
  34. package/dist/components/AttachmentsGalleryModal/components/ModalFooter.d.ts +1 -1
  35. package/dist/components/AttachmentsGalleryModal/components/ModalFooter.d.ts.map +1 -1
  36. package/dist/components/AttachmentsGalleryModal/components/ModalFooter.js +4 -4
  37. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts +1 -1
  38. package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
  39. package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts +1 -1
  40. package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts.map +1 -1
  41. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts +1 -1
  42. package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
  43. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +9 -9
  44. package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
  45. package/dist/components/AttachmentsPreview/AttachmentsPreview.js +114 -88
  46. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +9 -9
  47. package/dist/components/BouncingLogo/BouncingLogo.d.ts +6 -2
  48. package/dist/components/BouncingLogo/BouncingLogo.d.ts.map +1 -1
  49. package/dist/components/BouncingLogo/BouncingLogo.js +13 -14
  50. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +12 -10
  51. package/dist/components/ColorPicker/ColorPicker.d.ts +2 -0
  52. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  53. package/dist/components/ColorPicker/ColorPicker.js +66 -59
  54. package/dist/components/CommentComposer/CommentEditorHotkeys.js +1 -1
  55. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  56. package/dist/components/Copyright/index.d.ts.map +1 -1
  57. package/dist/components/Copyright/index.js +6 -6
  58. package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
  59. package/dist/components/EmojiPicker/EmojiPanel.js +47 -46
  60. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  61. package/dist/components/EmojiPicker/EmojiPicker.js +87 -95
  62. package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
  63. package/dist/components/EmojiPicker/IconsPanel.js +72 -72
  64. package/dist/components/EmojiPicker/utils.d.ts +11 -0
  65. package/dist/components/EmojiPicker/utils.d.ts.map +1 -0
  66. package/dist/components/EmojiPicker/utils.js +46 -0
  67. package/dist/components/EntityIcon.d.ts +5 -2
  68. package/dist/components/EntityIcon.d.ts.map +1 -1
  69. package/dist/components/EntityIcon.js +44 -46
  70. package/dist/components/FilePicker/FilePicker.d.ts +2 -3
  71. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  72. package/dist/components/FilePicker/FilePicker.js +95 -130
  73. package/dist/components/FilePicker/FilePickerGiphy.d.ts +1 -3
  74. package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
  75. package/dist/components/FilePicker/FilePickerGiphy.js +43 -44
  76. package/dist/components/FilePicker/FilePickerLink.d.ts +2 -3
  77. package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
  78. package/dist/components/FilePicker/FilePickerLink.js +21 -21
  79. package/dist/components/FilePicker/FilePickerUnsplash.d.ts +1 -3
  80. package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
  81. package/dist/components/FilePicker/FilePickerUnsplash.js +45 -46
  82. package/dist/components/FilePicker/FilePickerUpload.d.ts +3 -3
  83. package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
  84. package/dist/components/FilePicker/FilePickerUpload.js +49 -43
  85. package/dist/components/FilePicker/types.d.ts +1 -1
  86. package/dist/components/FilePicker/types.d.ts.map +1 -1
  87. package/dist/components/FormViewer/FormViewer.module.css.js +18 -18
  88. package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts +4 -2
  89. package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts.map +1 -1
  90. package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.js +51 -26
  91. package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.d.ts.map +1 -1
  92. package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.js +25 -23
  93. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  94. package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts +5 -2
  95. package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts.map +1 -1
  96. package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.js +105 -96
  97. package/dist/components/FormViewer/components/fields/SliderField.d.ts.map +1 -1
  98. package/dist/components/FormViewer/components/fields/SliderField.js +19 -18
  99. package/dist/components/FormViewer/components/fields/UploadField/UploadField.d.ts.map +1 -1
  100. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +1 -1
  101. package/dist/components/FormViewer/helpers/cssScoping.d.ts.map +1 -1
  102. package/dist/components/FormViewer/helpers/staticClasses.d.ts.map +1 -1
  103. package/dist/components/FormViewer/store/formStore.d.ts +10 -3
  104. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  105. package/dist/components/LanguagePicker/LanguagePicker.js +13 -13
  106. package/dist/components/Loaders/styles.module.css.js +1 -1
  107. package/dist/components/NavMenu/NavMenu.d.ts +4 -1
  108. package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
  109. package/dist/components/NavMenu/NavMenu.js +96 -77
  110. package/dist/components/NavMenu/NavMenu.module.css.js +10 -10
  111. package/dist/components/NavMenu/components/DnDItem.d.ts +2 -1
  112. package/dist/components/NavMenu/components/DnDItem.d.ts.map +1 -1
  113. package/dist/components/NavMenu/components/DnDItem.js +32 -30
  114. package/dist/components/NavMenu/components/DnDProvider.d.ts.map +1 -1
  115. package/dist/components/NavMenu/components/DnDProvider.js +28 -26
  116. package/dist/components/NavMenu/components/DraggableOverlay.d.ts.map +1 -1
  117. package/dist/components/NavMenu/components/NavMenuItem.d.ts +1 -1
  118. package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
  119. package/dist/components/NavMenu/components/NavMenuItem.js +109 -94
  120. package/dist/components/NavMenu/store.d.ts +1 -0
  121. package/dist/components/NavMenu/store.d.ts.map +1 -1
  122. package/dist/components/NavMenu/types.d.ts +1 -0
  123. package/dist/components/NavMenu/types.d.ts.map +1 -1
  124. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  125. package/dist/components/NoData/NoData.d.ts +32 -26
  126. package/dist/components/NoData/NoData.d.ts.map +1 -1
  127. package/dist/components/NoData/NoData.js +73 -73
  128. package/dist/components/OnBoarding/ProjectBoard.js +17 -17
  129. package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.js +7 -7
  130. package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.d.ts.map +1 -1
  131. package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.js +9 -9
  132. package/dist/components/OnBoarding/steps/CreateFirstProject.js +5 -5
  133. package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.js +7 -7
  134. package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.js +6 -6
  135. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.d.ts.map +1 -1
  136. package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.js +10 -10
  137. package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.js +5 -5
  138. package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.js +10 -10
  139. package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.d.ts.map +1 -1
  140. package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.d.ts.map +1 -1
  141. package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.js +8 -8
  142. package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.js +5 -5
  143. package/dist/components/OnBoarding/steps/StartedStep.js +5 -5
  144. package/dist/components/PaymentSuccess/PaymentSuccess.d.ts.map +1 -1
  145. package/dist/components/PaymentSuccess/PaymentSuccess.js +9 -9
  146. package/dist/components/SearchFilters/components/DateFilter.js +19 -19
  147. package/dist/components/SearchFilters/components/SearchHelp.d.ts.map +1 -1
  148. package/dist/components/SearchFilters/components/SearchHelp.js +7 -7
  149. package/dist/components/SortableList/SortableList.d.ts.map +1 -1
  150. package/dist/components/SortableList/components/SortableItem/SortableItem.d.ts.map +1 -1
  151. package/dist/components/SortableList/components/SortableItem/SortableItem.js +1 -9
  152. package/dist/components/SortableList/components/SortableItem/index.d.ts +1 -1
  153. package/dist/components/SortableList/components/SortableItem/index.d.ts.map +1 -1
  154. package/dist/components/StorageUsageEntityList/StorageEntityItem.d.ts +2 -6
  155. package/dist/components/StorageUsageEntityList/StorageEntityItem.d.ts.map +1 -1
  156. package/dist/components/StorageUsageEntityList/StorageEntityItem.js +19 -59
  157. package/dist/components/StorageUsageEntityList/StorageUsageEntityList.d.ts +1 -1
  158. package/dist/components/StorageUsageEntityList/StorageUsageEntityList.d.ts.map +1 -1
  159. package/dist/components/StorageUsageEntityList/StorageUsageEntityList.js +6 -24
  160. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +7 -0
  161. package/dist/components/StorageUsageProgress/index.d.ts +2 -2
  162. package/dist/components/StorageUsageProgress/index.d.ts.map +1 -1
  163. package/dist/components/StorageUsageProgress/index.js +73 -40
  164. package/dist/components/ThemeIndicator/index.d.ts.map +1 -1
  165. package/dist/components/ThemeIndicator/index.js +4 -4
  166. package/dist/components/UserAvatar/index.js +14 -14
  167. package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts +2 -2
  168. package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
  169. package/dist/components/WorkspaceMenu/WorkspaceMenu.js +103 -103
  170. package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
  171. package/dist/components/modals/RemoveConfirmModal.js +31 -24
  172. package/dist/components/table/export.d.ts.map +1 -1
  173. package/dist/components/table/hooks/useSaveRowCount.d.ts.map +1 -1
  174. package/dist/components/table/hooks/useSaveRowCount.js +4 -4
  175. package/dist/components/table/hooks/useSorting.d.ts.map +1 -1
  176. package/dist/components/table/hooks/useSorting.js +3 -1
  177. package/dist/constants.d.ts.map +1 -1
  178. package/dist/constants.js +8 -1
  179. package/dist/helpers/getFileIcons.js +12 -12
  180. package/dist/helpers/isAppMode.d.ts +1 -1
  181. package/dist/helpers/isAppMode.d.ts.map +1 -1
  182. package/dist/helpers/validateAliasFormat.d.ts +2 -0
  183. package/dist/helpers/validateAliasFormat.d.ts.map +1 -0
  184. package/dist/helpers/validateAliasFormat.js +4 -0
  185. package/dist/hooks/useOutsideClick.d.ts.map +1 -1
  186. package/dist/index.css +1 -1
  187. package/dist/index.d.ts +3 -4
  188. package/dist/index.d.ts.map +1 -1
  189. package/dist/index.js +328 -329
  190. package/dist/lang/locales/ui_en.json.js +20 -12
  191. package/dist/lang/locales/ui_es.json.js +18 -10
  192. package/dist/lang/locales/ui_ru.json.js +26 -18
  193. package/dist/store/trashModal.d.ts +8 -0
  194. package/dist/store/trashModal.d.ts.map +1 -0
  195. package/dist/store/trashModal.js +13 -0
  196. package/dist/types/storageCategories.d.ts +4 -0
  197. package/dist/types/storageCategories.d.ts.map +1 -0
  198. package/dist/types/storageCategories.js +21 -0
  199. package/dist/utils/formatStorage.d.ts +1 -1
  200. package/dist/utils/formatStorage.d.ts.map +1 -1
  201. package/dist/utils/formatStorage.js +3 -3
  202. package/docs/README.md +17 -4
  203. package/package.json +1 -1
  204. package/dist/assets/fileTypes/archives.svg.js +0 -5
  205. package/dist/assets/fileTypes/audio.svg.js +0 -5
  206. package/dist/assets/fileTypes/code.svg.js +0 -5
  207. package/dist/assets/fileTypes/documentsStorage.svg.js +0 -5
  208. package/dist/assets/fileTypes/images.svg.js +0 -5
  209. package/dist/assets/fileTypes/other.svg.js +0 -5
  210. package/dist/assets/fileTypes/videos.svg.js +0 -5
  211. package/dist/components/AppContainer/hooks/useSetAppContainerLayout.d.ts +0 -3
  212. package/dist/components/AppContainer/hooks/useSetAppContainerLayout.d.ts.map +0 -1
  213. package/dist/components/AppContainer/hooks/useSetAppContainerLayout.js +0 -10
  214. package/dist/components/EmojiPicker/getIconsList.d.ts +0 -8
  215. package/dist/components/EmojiPicker/getIconsList.d.ts.map +0 -1
  216. package/dist/components/EmojiPicker/getIconsList.js +0 -32
  217. package/dist/components/EmojiPicker/getRandomIcon.d.ts +0 -2
  218. package/dist/components/EmojiPicker/getRandomIcon.d.ts.map +0 -1
  219. package/dist/components/EmojiPicker/getRandomIcon.js +0 -10
  220. package/dist/components/NoData/NoData.module.css.js +0 -7
  221. package/dist/components/PaymentCancel/PaymentCancel.d.ts +0 -2
  222. package/dist/components/PaymentCancel/PaymentCancel.d.ts.map +0 -1
  223. package/dist/components/PaymentCancel/PaymentCancel.js +0 -41
  224. package/dist/components/PaymentError/PaymentError.d.ts +0 -2
  225. package/dist/components/PaymentError/PaymentError.d.ts.map +0 -1
  226. package/dist/components/PaymentError/PaymentError.js +0 -41
  227. package/dist/node_modules/@layers-app/layers/src/api/common.js +0 -41
  228. package/dist/store/accessOptionsControl.d.ts +0 -17
  229. package/dist/store/accessOptionsControl.d.ts.map +0 -1
  230. package/dist/store/accessOptionsControl.js +0 -18
@@ -1,91 +1,90 @@
1
1
  import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
- import { useState as m, useMemo as v, useEffect as b, useCallback as P } from "react";
3
- import { useTranslation as w } from "react-i18next";
4
- import { Search01Icon as z } from "@hugeicons/core-free-icons";
5
- import { HugeiconsIcon as L } from "@hugeicons/react";
6
- import { Stack as k, TextInput as T, Loader as j, Box as y, SimpleGrid as D, AspectRatio as G, Button as M } from "@mantine/core";
7
- import { useDebouncedValue as q, useDebouncedCallback as B } from "@mantine/hooks";
8
- import { NoData as F } from "../NoData/NoData.js";
9
- import { FilePickerSkeletonLoader as N } from "./FilePickerSkeletonLoader.js";
10
- import { useGiphyPhotos as Q } from "./api/giphyApi.js";
11
- import A from "./FilePicker.module.css.js";
12
- const C = (i) => (i || []).reduce((r, s) => (r[s.id] = s, r), {}), W = ({
13
- locales: i,
14
- token: r,
15
- onChange: s
2
+ import { useState as m, useMemo as x, useEffect as b, useCallback as S } from "react";
3
+ import { useTranslation as P } from "react-i18next";
4
+ import { Search01Icon as w } from "@hugeicons/core-free-icons";
5
+ import { HugeiconsIcon as z } from "@hugeicons/react";
6
+ import { Stack as C, TextInput as L, Loader as T, Box as k, SimpleGrid as j, AspectRatio as D, Button as G } from "@mantine/core";
7
+ import { useDebouncedValue as M, useDebouncedCallback as q } from "@mantine/hooks";
8
+ import { NoData as B } from "../NoData/NoData.js";
9
+ import { FilePickerSkeletonLoader as F } from "./FilePickerSkeletonLoader.js";
10
+ import { useGiphyPhotos as N } from "./api/giphyApi.js";
11
+ import Q from "./FilePicker.module.css.js";
12
+ const v = (n) => (n || []).reduce((r, o) => (r[o.id] = o, r), {}), U = ({
13
+ token: n,
14
+ onChange: r
16
15
  }) => {
17
- const { t: I } = w(), [l, x] = m(""), [u] = q(l, 800), [d, p] = m(1), [h, g] = m({}), { data: o, isLoading: a } = Q(
16
+ const { t: o } = P("ui"), [l, y] = m(""), [u] = M(l, 800), [d, p] = m(1), [h, g] = m({}), { data: i, isLoading: s } = N(
18
17
  { q: u, limit: 24, offset: (d - 1) * 24 + 1 },
19
18
  d,
20
- r
21
- ), n = v(
22
- () => Object.values({ ...h, ...C(o?.items) }),
23
- [h, o?.items]
24
- ), f = B(() => {
19
+ n
20
+ ), a = x(
21
+ () => Object.values({ ...h, ...v(i?.items) }),
22
+ [h, i?.items]
23
+ ), f = q(() => {
25
24
  setTimeout(() => {
26
- g((e) => ({ ...e, ...C(o?.items) }));
25
+ g((e) => ({ ...e, ...v(i?.items) }));
27
26
  }, 0);
28
27
  }, 100);
29
28
  b(() => {
30
29
  f();
31
- }, [o?.items, f]), b(() => {
30
+ }, [i?.items, f]), b(() => {
32
31
  g({});
33
32
  }, [u]);
34
- const S = P(
33
+ const I = S(
35
34
  (e) => {
36
- x(e.currentTarget.value), p(1);
35
+ y(e.currentTarget.value), p(1);
37
36
  },
38
37
  []
39
38
  );
40
- return /* @__PURE__ */ c(k, { gap: "sm", children: [
39
+ return /* @__PURE__ */ c(C, { gap: "sm", children: [
41
40
  /* @__PURE__ */ t(
42
- T,
41
+ L,
43
42
  {
44
- leftSection: a ? /* @__PURE__ */ t(j, { size: 16 }) : /* @__PURE__ */ t(L, { size: 16, icon: z }),
43
+ leftSection: s ? /* @__PURE__ */ t(T, { size: 16 }) : /* @__PURE__ */ t(z, { size: 16, icon: w }),
45
44
  maxLength: 50,
46
- placeholder: i.search,
45
+ placeholder: o("changeCover.searchImage"),
47
46
  "data-autofocus": !0,
48
47
  value: l,
49
- onChange: S
48
+ onChange: I
50
49
  }
51
50
  ),
52
- /* @__PURE__ */ c(y, { mah: 300, w: "100%", style: { overflowY: "auto" }, children: [
53
- !!n.length && /* @__PURE__ */ c(k, { gap: 8, children: [
54
- /* @__PURE__ */ t(D, { cols: 4, spacing: 10, children: n.map((e) => /* @__PURE__ */ t(
55
- G,
51
+ /* @__PURE__ */ c(k, { mah: 300, w: "100%", style: { overflowY: "auto" }, children: [
52
+ !!a.length && /* @__PURE__ */ c(C, { gap: 8, children: [
53
+ /* @__PURE__ */ t(j, { cols: 4, spacing: 10, children: a.map((e) => /* @__PURE__ */ t(
54
+ D,
56
55
  {
57
- onClick: () => s?.(e.images.original.url),
56
+ onClick: () => r?.(e.images.original.url),
58
57
  ratio: 120 / 65,
59
- className: A.itemImage,
58
+ className: Q.itemImage,
60
59
  style: {
61
60
  backgroundImage: `url(${e.images.preview_webp.url})`
62
61
  }
63
62
  },
64
63
  e.id
65
64
  )) }),
66
- o?.hasMore && /* @__PURE__ */ t(
67
- M,
65
+ i?.hasMore && /* @__PURE__ */ t(
66
+ G,
68
67
  {
69
68
  variant: "subtle",
70
- loading: a,
69
+ loading: s,
71
70
  onClick: () => p((e) => e + 1),
72
- children: I("loadMode")
71
+ children: o("loadMode")
73
72
  }
74
73
  )
75
74
  ] }),
76
- !n.length && !a && /* @__PURE__ */ t(y, { pb: 16, children: /* @__PURE__ */ t(
77
- F,
75
+ !a.length && !s && /* @__PURE__ */ t(k, { pb: 16, children: /* @__PURE__ */ t(
76
+ B,
78
77
  {
79
78
  size: 120,
80
79
  illustration: "noImage",
81
- description: i.noImages,
80
+ description: o("changeCover.noResult"),
82
81
  titleProps: { size: "xs", c: "dimmed" }
83
82
  }
84
83
  ) }),
85
- !n.length && a && /* @__PURE__ */ t(N, {})
84
+ !a.length && s && /* @__PURE__ */ t(F, {})
86
85
  ] })
87
86
  ] });
88
87
  };
89
88
  export {
90
- W as FilePickerGiphy
89
+ U as FilePickerGiphy
91
90
  };
@@ -1,6 +1,5 @@
1
- import { FilePickerLocales, FileType } from './types';
2
- export declare const FilePickerLink: ({ locales, onChange, type, isValidMediaUrl, }: {
3
- locales: FilePickerLocales;
1
+ import { FileType } from './types';
2
+ export declare const FilePickerLink: ({ onChange, type, isValidMediaUrl, }: {
4
3
  onChange?: (v: string) => void;
5
4
  type: FileType;
6
5
  isValidMediaUrl?: (url: string) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"FilePickerLink.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerLink.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAItD,eAAO,MAAM,cAAc,GAAI,+CAK5B;IACD,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CAC5C,4CA6DA,CAAC"}
1
+ {"version":3,"file":"FilePickerLink.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerLink.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAInC,eAAO,MAAM,cAAc,GAAI,sCAI5B;IACD,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CAC5C,4CA+DA,CAAC"}
@@ -1,44 +1,44 @@
1
- import { jsxs as o, jsx as t } from "react/jsx-runtime";
2
- import { Stack as m, FocusTrap as d, TextInput as c, Flex as f, Button as p } from "@mantine/core";
3
- import { useForm as h } from "@mantine/form";
4
- import { isValidUrl as g, isImageUrl as k, isVideoUrl as v, isAudioUrl as x } from "../../helpers/validation.js";
5
- import F from "./FilePicker.module.css.js";
1
+ import { jsxs as u, jsx as t } from "react/jsx-runtime";
2
+ import { useTranslation as c } from "react-i18next";
3
+ import { Stack as m, FocusTrap as d, TextInput as f, Flex as p, Button as h } from "@mantine/core";
4
+ import { useForm as g } from "@mantine/form";
5
+ import { isValidUrl as v, isImageUrl as k, isVideoUrl as x, isAudioUrl as F } from "../../helpers/validation.js";
6
+ import L from "./FilePicker.module.css.js";
6
7
  const U = ({
7
- locales: i,
8
- onChange: u,
9
- type: s,
10
- isValidMediaUrl: a
8
+ onChange: o,
9
+ type: a,
10
+ isValidMediaUrl: s
11
11
  }) => {
12
- const l = h({
12
+ const { t: i } = c("ui"), l = g({
13
13
  initialValues: {
14
14
  url: ""
15
15
  },
16
16
  validate: {
17
- url: (r) => (r || "").trim().length > 0 && g(r) ? null : i.errors.invalidLink
17
+ url: (e) => (e || "").trim().length > 0 && v(e) ? null : i("changeCover.invalidLink")
18
18
  }
19
19
  }), n = async () => {
20
- const { values: r } = l;
21
- let e;
22
- s === "image" ? e = await k(r.url) : s === "video" ? a && a(r.url) ? e = !0 : e = await v(r.url) : s === "audio" ? e = await x(r.url) : e = !0, e ? u?.(r.url) : l.setFieldError("url", i.errors.invalidLink);
20
+ const { values: e } = l;
21
+ let r;
22
+ a === "image" ? r = await k(e.url) : a === "video" ? s && s(e.url) ? r = !0 : r = await x(e.url) : a === "audio" ? r = await F(e.url) : r = !0, r ? o?.(e.url) : l.setFieldError("url", i("changeCover.invalidLink"));
23
23
  };
24
- return /* @__PURE__ */ o(m, { gap: "sm", children: [
24
+ return /* @__PURE__ */ u(m, { gap: "sm", children: [
25
25
  /* @__PURE__ */ t(d, { active: !0, children: /* @__PURE__ */ t(
26
- c,
26
+ f,
27
27
  {
28
28
  maxLength: 500,
29
29
  size: "sm",
30
- placeholder: i.pasteLink,
30
+ placeholder: i("changeCover.pasteLink"),
31
31
  "data-autofocus": !0,
32
32
  ...l.getInputProps("url")
33
33
  }
34
34
  ) }),
35
- /* @__PURE__ */ t(f, { justify: "flex-end", align: "center", children: /* @__PURE__ */ t(
36
- p,
35
+ /* @__PURE__ */ t(p, { justify: "flex-end", align: "center", children: /* @__PURE__ */ t(
36
+ h,
37
37
  {
38
38
  onClick: n,
39
- className: F.button,
39
+ className: L.button,
40
40
  disabled: !l.values.url,
41
- children: i.save
41
+ children: i("customDrawer.save")
42
42
  }
43
43
  ) })
44
44
  ] });
@@ -1,6 +1,4 @@
1
- import { FilePickerLocales } from './types';
2
- export declare const FilePickerUnsplash: ({ locales, onChange, clientId, }: {
3
- locales: FilePickerLocales;
1
+ export declare const FilePickerUnsplash: ({ onChange, clientId, }: {
4
2
  clientId?: string;
5
3
  onChange?: (v: string) => void;
6
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"FilePickerUnsplash.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerUnsplash.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAU5C,eAAO,MAAM,kBAAkB,GAAI,kCAIhC;IACD,OAAO,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,4CAwGA,CAAC"}
1
+ {"version":3,"file":"FilePickerUnsplash.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerUnsplash.tsx"],"names":[],"mappings":"AAmCA,eAAO,MAAM,kBAAkB,GAAI,yBAGhC;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,4CAwGA,CAAC"}
@@ -1,95 +1,94 @@
1
- import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
- import { useState as l, useMemo as v, useEffect as f, useCallback as P } from "react";
3
- import { useTranslation as z } from "react-i18next";
4
- import { Search01Icon as L } from "@hugeicons/core-free-icons";
5
- import { HugeiconsIcon as T } from "@hugeicons/react";
6
- import { Stack as b, TextInput as j, Loader as D, Box as k, SimpleGrid as M, AspectRatio as q, Button as w } from "@mantine/core";
7
- import { useDebouncedValue as B, useDebouncedCallback as F } from "@mantine/hooks";
8
- import { NoData as N } from "../NoData/NoData.js";
9
- import { FilePickerSkeletonLoader as Q } from "./FilePickerSkeletonLoader.js";
10
- import { useUnsplashPhotos as U } from "./api/unsplashApi.js";
11
- import _ from "./FilePicker.module.css.js";
12
- const y = (r) => (r || []).reduce((s, a) => (s[a.id] = a, s), {}), W = ({
13
- locales: r,
14
- onChange: s,
15
- clientId: a
1
+ import { jsxs as c, jsx as o } from "react/jsx-runtime";
2
+ import { useState as l, useMemo as x, useEffect as f, useCallback as S } from "react";
3
+ import { useTranslation as P } from "react-i18next";
4
+ import { Search01Icon as z } from "@hugeicons/core-free-icons";
5
+ import { HugeiconsIcon as L } from "@hugeicons/react";
6
+ import { Stack as b, TextInput as T, Loader as j, Box as C, SimpleGrid as D, AspectRatio as M, Button as q } from "@mantine/core";
7
+ import { useDebouncedValue as w, useDebouncedCallback as B } from "@mantine/hooks";
8
+ import { NoData as F } from "../NoData/NoData.js";
9
+ import { FilePickerSkeletonLoader as N } from "./FilePickerSkeletonLoader.js";
10
+ import { useUnsplashPhotos as Q } from "./api/unsplashApi.js";
11
+ import R from "./FilePicker.module.css.js";
12
+ const k = (n) => (n || []).reduce((s, t) => (s[t.id] = t, s), {}), K = ({
13
+ onChange: n,
14
+ clientId: s
16
15
  }) => {
17
- const { t: C } = z(), [m, I] = l(""), [u] = B(m, 800), [x, p] = l(1), [d, h] = l({}), { data: o, isLoading: i } = U(
16
+ const { t } = P("ui"), [m, y] = l(""), [u] = w(m, 800), [I, p] = l(1), [d, h] = l({}), { data: r, isLoading: a } = Q(
18
17
  {
19
18
  query: u,
20
- page: x,
19
+ page: I,
21
20
  per_page: 24,
22
21
  order_by: "popular"
23
22
  },
24
- a
25
- ), n = v(
26
- () => Object.values({ ...d, ...y(o?.items) }),
27
- [d, o?.items]
28
- ), g = F(() => {
23
+ s
24
+ ), i = x(
25
+ () => Object.values({ ...d, ...k(r?.items) }),
26
+ [d, r?.items]
27
+ ), g = B(() => {
29
28
  setTimeout(() => {
30
- h((e) => ({ ...e, ...y(o?.items) }));
29
+ h((e) => ({ ...e, ...k(r?.items) }));
31
30
  }, 0);
32
31
  }, 100);
33
32
  f(() => {
34
33
  g();
35
- }, [o?.items, g]), f(() => {
34
+ }, [r?.items, g]), f(() => {
36
35
  h({});
37
36
  }, [u]);
38
- const S = P(
37
+ const v = S(
39
38
  (e) => {
40
- I(e.currentTarget.value), p(1);
39
+ y(e.currentTarget.value), p(1);
41
40
  },
42
41
  []
43
42
  );
44
43
  return /* @__PURE__ */ c(b, { gap: "sm", children: [
45
- /* @__PURE__ */ t(
46
- j,
44
+ /* @__PURE__ */ o(
45
+ T,
47
46
  {
48
- leftSection: i ? /* @__PURE__ */ t(D, { size: 16 }) : /* @__PURE__ */ t(T, { size: 16, icon: L }),
47
+ leftSection: a ? /* @__PURE__ */ o(j, { size: 16 }) : /* @__PURE__ */ o(L, { size: 16, icon: z }),
49
48
  maxLength: 50,
50
- placeholder: r.search,
49
+ placeholder: t("changeCover.searchImage"),
51
50
  "data-autofocus": !0,
52
51
  value: m,
53
- onChange: S
52
+ onChange: v
54
53
  }
55
54
  ),
56
- /* @__PURE__ */ c(k, { mah: 300, w: "100%", style: { overflowY: "auto" }, children: [
57
- !!n.length && /* @__PURE__ */ c(b, { gap: 8, children: [
58
- /* @__PURE__ */ t(M, { cols: 4, spacing: 10, children: n.map((e) => /* @__PURE__ */ t(
59
- q,
55
+ /* @__PURE__ */ c(C, { mah: 300, w: "100%", style: { overflowY: "auto" }, children: [
56
+ !!i.length && /* @__PURE__ */ c(b, { gap: 8, children: [
57
+ /* @__PURE__ */ o(D, { cols: 4, spacing: 10, children: i.map((e) => /* @__PURE__ */ o(
58
+ M,
60
59
  {
61
- onClick: () => s?.(e.urls.regular),
60
+ onClick: () => n?.(e.urls.regular),
62
61
  ratio: 120 / 65,
63
- className: _.itemImage,
62
+ className: R.itemImage,
64
63
  style: {
65
64
  backgroundImage: `url(${e.urls.small})`
66
65
  }
67
66
  },
68
67
  e.id
69
68
  )) }),
70
- o?.hasMore && /* @__PURE__ */ t(
71
- w,
69
+ r?.hasMore && /* @__PURE__ */ o(
70
+ q,
72
71
  {
73
72
  variant: "subtle",
74
- loading: i,
73
+ loading: a,
75
74
  onClick: () => p((e) => e + 1),
76
- children: C("loadMore")
75
+ children: t("loadMore")
77
76
  }
78
77
  )
79
78
  ] }),
80
- !n.length && !i && /* @__PURE__ */ t(k, { pb: 16, children: /* @__PURE__ */ t(
81
- N,
79
+ !i.length && !a && /* @__PURE__ */ o(C, { pb: 16, children: /* @__PURE__ */ o(
80
+ F,
82
81
  {
83
82
  size: 120,
84
83
  illustration: "noImage",
85
- description: r.noImages,
84
+ description: t("changeCover.noResult"),
86
85
  titleProps: { size: "xs", c: "dimmed" }
87
86
  }
88
87
  ) }),
89
- !n.length && i && /* @__PURE__ */ t(Q, {})
88
+ !i.length && a && /* @__PURE__ */ o(N, {})
90
89
  ] })
91
90
  ] });
92
91
  };
93
92
  export {
94
- W as FilePickerUnsplash
93
+ K as FilePickerUnsplash
95
94
  };
@@ -1,8 +1,8 @@
1
1
  import { DropzoneProps, FileWithPath } from '@mantine/dropzone';
2
- import { FilePickerLocales } from './types';
2
+ import { FileType } from './types';
3
3
  import '@mantine/dropzone/styles.css';
4
- export declare const FilePickerUpload: ({ locales, uploading, dropZoneProps, onUpload, }: {
5
- locales: FilePickerLocales;
4
+ export declare const FilePickerUpload: ({ type, uploading, dropZoneProps, onUpload, }: {
5
+ type?: FileType;
6
6
  uploading: boolean;
7
7
  dropZoneProps?: Omit<DropzoneProps, "onDrop">;
8
8
  onUpload: (files: FileWithPath[]) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"FilePickerUpload.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerUpload.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,aAAa,EAEb,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,8BAA8B,CAAC;AAEtC,eAAO,MAAM,gBAAgB,GAAI,kDAK9B;IACD,OAAO,EAAE,iBAAiB,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC9C,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;CAC3C,4CA6EA,CAAC"}
1
+ {"version":3,"file":"FilePickerUpload.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/FilePickerUpload.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,aAAa,EAEb,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,OAAO,8BAA8B,CAAC;AAEtC,eAAO,MAAM,gBAAgB,GAAI,+CAK9B;IACD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;IAC9C,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;CAC3C,4CAkGA,CAAC"}
@@ -1,61 +1,67 @@
1
- import { jsx as i, jsxs as m } from "react/jsx-runtime";
2
- import { useCallback as l } from "react";
3
- import { Image02Icon as g } from "@hugeicons/core-free-icons";
4
- import { HugeiconsIcon as x } from "@hugeicons/react";
5
- import { Stack as c, Text as a } from "@mantine/core";
6
- import { Dropzone as u, IMAGE_MIME_TYPE as F } from "@mantine/dropzone";
7
- import { showNotification as f } from "@mantine/notifications";
8
- import { showErrorNotification as y } from "../../helpers/showNotifications.js";
1
+ import { jsx as n, jsxs as m } from "react/jsx-runtime";
2
+ import { useCallback as f } from "react";
3
+ import { useTranslation as M } from "react-i18next";
4
+ import { Image02Icon as k } from "@hugeicons/core-free-icons";
5
+ import { HugeiconsIcon as v } from "@hugeicons/react";
6
+ import { Stack as d, Text as p } from "@mantine/core";
7
+ import { Dropzone as E, IMAGE_MIME_TYPE as I } from "@mantine/dropzone";
8
+ import { showNotification as h } from "@mantine/notifications";
9
+ import { showErrorNotification as S } from "../../helpers/showNotifications.js";
9
10
  import "@mantine/dropzone/styles.css";
10
- const C = ({
11
- locales: e,
12
- uploading: d,
13
- dropZoneProps: n,
11
+ const $ = ({
12
+ type: l = "image",
13
+ uploading: g,
14
+ dropZoneProps: t,
14
15
  onUpload: s
15
16
  }) => {
16
- const p = l(
17
- (t) => {
18
- if (t.filter(
19
- (r) => r.errors.some((o) => o.code === "file-invalid-type")
17
+ const { t: e } = M("ui"), u = t?.maxSize != null ? Math.round(t.maxSize / (1024 * 1024)) : 5, x = `filePicker.dropFileHere.${l}`, c = `filePicker.description.${l}`, F = e(x, {
18
+ defaultValue: e("dropFileHere")
19
+ }), a = (() => {
20
+ const r = e(c, { maxSize: u });
21
+ return r !== c ? r : null;
22
+ })(), y = f(
23
+ (r) => {
24
+ if (r.filter(
25
+ (o) => o.errors.some((i) => i.code === "file-invalid-type")
20
26
  ).length > 0) {
21
- f({
27
+ h({
22
28
  color: "blue",
23
- message: e.errors.typeIsNotAllowed
29
+ message: e("filePicker.errors.typeIsNotAllowed")
24
30
  });
25
31
  return;
26
32
  }
27
- if (t.some((r) => r.errors.some((o) => o.code === "file-too-large"))) {
28
- y({
29
- title: e.error,
30
- message: e.errors.shouldNotExceed
33
+ if (r.some((o) => o.errors.some((i) => i.code === "file-too-large"))) {
34
+ S({
35
+ title: e("errorMessage"),
36
+ message: e("filePicker.errors.shouldNotExceed")
31
37
  });
32
38
  return;
33
39
  }
34
- if (t.filter(
35
- (r) => r.errors.some((o) => o.code === "too-many-files")
40
+ if (r.filter(
41
+ (o) => o.errors.some((i) => i.code === "too-many-files")
36
42
  ).length > 0) {
37
- f({
43
+ h({
38
44
  color: "blue",
39
- message: e.errors.doNotUploadMoreThanSingleFile
45
+ message: e("filePicker.errors.doNotUploadMoreThanSingleFile")
40
46
  });
41
47
  return;
42
48
  }
43
49
  },
44
50
  [e]
45
- ), h = l(s, [s]);
46
- return /* @__PURE__ */ i(
47
- u,
51
+ ), z = f(s, [s]);
52
+ return /* @__PURE__ */ n(
53
+ E,
48
54
  {
49
- loading: d,
50
- onDrop: h,
51
- onReject: p,
52
- maxFiles: n?.maxFiles || 1,
53
- accept: F,
55
+ loading: g,
56
+ onDrop: z,
57
+ onReject: y,
58
+ maxFiles: t?.maxFiles || 1,
59
+ accept: I,
54
60
  px: 60,
55
61
  py: "xl",
56
- ...n || {},
62
+ ...t || {},
57
63
  children: /* @__PURE__ */ m(
58
- c,
64
+ d,
59
65
  {
60
66
  justify: "center",
61
67
  gap: "var(--mantine-font-size-xs",
@@ -63,17 +69,17 @@ const C = ({
63
69
  mih: 89,
64
70
  style: { pointerEvents: "none" },
65
71
  children: [
66
- /* @__PURE__ */ i(
67
- x,
72
+ /* @__PURE__ */ n(
73
+ v,
68
74
  {
69
75
  size: 32,
70
76
  color: "var(--mantine-color-bright)",
71
- icon: g
77
+ icon: k
72
78
  }
73
79
  ),
74
- /* @__PURE__ */ m(c, { gap: 8, align: "center", children: [
75
- /* @__PURE__ */ i(a, { fw: 500, fz: "sm", c: "bright", lh: "sm", ta: "center", children: e.dragOrClickToChoose }),
76
- /* @__PURE__ */ i(a, { fz: "xs", fw: 400, lh: "140%", c: "dimmed", ta: "center", children: e.maxFileSize })
80
+ /* @__PURE__ */ m(d, { gap: 8, align: "center", children: [
81
+ /* @__PURE__ */ n(p, { fw: 500, fz: "sm", c: "bright", lh: "sm", ta: "center", children: F }),
82
+ a && /* @__PURE__ */ n(p, { fz: "xs", fw: 400, lh: "140%", c: "dimmed", ta: "center", children: a })
77
83
  ] })
78
84
  ]
79
85
  }
@@ -82,5 +88,5 @@ const C = ({
82
88
  );
83
89
  };
84
90
  export {
85
- C as FilePickerUpload
91
+ $ as FilePickerUpload
86
92
  };
@@ -29,5 +29,5 @@ export type FilePickerLocales = {
29
29
  invalidLink?: string;
30
30
  };
31
31
  };
32
- export type FileType = 'file' | 'image' | 'audio' | 'video';
32
+ export type FileType = 'file' | 'image' | 'audio' | 'video' | 'avatar';
33
33
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE;QACN,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,6BAA6B,CAAC,EAAE,MAAM,CAAC;QACvC,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/FilePicker/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE;QACN,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,6BAA6B,CAAC,EAAE,MAAM,CAAC;QACvC,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC"}
@@ -1,18 +1,18 @@
1
- const t = "_themeProvider_13pry_1", o = "_root_13pry_7", e = "_container_13pry_36", n = "_media_13pry_42", _ = "_background_13pry_46", r = "_stepRoot_13pry_59", s = "_content_13pry_104", c = "_mediaInner_13pry_169", p = "_stepTitle_13pry_332", i = "_stepDescription_13pry_355", a = "_stepIndicator_13pry_369", d = "_stepIndicatorIcon_13pry_386", l = "_focusBox_13pry_405", y = "_dropzone_13pry_414", u = "_allSlidesLayout_13pry_432", I = "_allSlidesLayoutStep_13pry_438", m = {
1
+ const t = "_themeProvider_1lm79_1", o = "_root_1lm79_7", e = "_container_1lm79_36", n = "_media_1lm79_42", _ = "_background_1lm79_46", s = "_stepRoot_1lm79_59", c = "_content_1lm79_104", l = "_mediaInner_1lm79_169", i = "_stepTitle_1lm79_332", a = "_stepDescription_1lm79_355", r = "_stepIndicator_1lm79_369", d = "_stepIndicatorIcon_1lm79_386", m = "_focusBox_1lm79_405", p = "_dropzone_1lm79_414", u = "_allSlidesLayout_1lm79_432", I = "_allSlidesLayoutStep_1lm79_438", S = {
2
2
  themeProvider: t,
3
3
  root: o,
4
4
  container: e,
5
5
  media: n,
6
6
  background: _,
7
- stepRoot: r,
8
- content: s,
9
- mediaInner: c,
10
- stepTitle: p,
11
- stepDescription: i,
12
- stepIndicator: a,
7
+ stepRoot: s,
8
+ content: c,
9
+ mediaInner: l,
10
+ stepTitle: i,
11
+ stepDescription: a,
12
+ stepIndicator: r,
13
13
  stepIndicatorIcon: d,
14
- focusBox: l,
15
- dropzone: y,
14
+ focusBox: m,
15
+ dropzone: p,
16
16
  allSlidesLayout: u,
17
17
  allSlidesLayoutStep: I
18
18
  };
@@ -21,17 +21,17 @@ export {
21
21
  I as allSlidesLayoutStep,
22
22
  _ as background,
23
23
  e as container,
24
- s as content,
25
- m as default,
26
- y as dropzone,
27
- l as focusBox,
24
+ c as content,
25
+ S as default,
26
+ p as dropzone,
27
+ m as focusBox,
28
28
  n as media,
29
- c as mediaInner,
29
+ l as mediaInner,
30
30
  o as root,
31
- i as stepDescription,
32
- a as stepIndicator,
31
+ a as stepDescription,
32
+ r as stepIndicator,
33
33
  d as stepIndicatorIcon,
34
- r as stepRoot,
35
- p as stepTitle,
34
+ s as stepRoot,
35
+ i as stepTitle,
36
36
  t as themeProvider
37
37
  };
@@ -1,4 +1,4 @@
1
- import { PictureChoiceControlItem, ThemeData } from '../../../types/form';
1
+ import { PictureChoiceControl, PictureChoiceControlItem, ThemeData } from '../../../types/form';
2
2
  export type PictureChoiceCardProps = {
3
3
  label: string;
4
4
  showInput?: boolean;
@@ -8,6 +8,8 @@ export type PictureChoiceCardProps = {
8
8
  controlId: string;
9
9
  id: string;
10
10
  theme?: ThemeData;
11
+ stepId: string;
12
+ options: PictureChoiceControl['options'];
11
13
  };
12
- export declare const PictureChoiceCard: import("react").MemoExoticComponent<({ label, showInput, onUpdate, onRemove, image, controlId, id, theme, }: PictureChoiceCardProps) => import("react/jsx-runtime").JSX.Element>;
14
+ export declare const PictureChoiceCard: import("react").MemoExoticComponent<({ label, showInput, onUpdate, onRemove, image, controlId, id, theme, stepId, options, }: PictureChoiceCardProps) => import("react/jsx-runtime").JSX.Element>;
13
15
  //# sourceMappingURL=PictureChoiceCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PictureChoiceCard.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAG1E,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,KAAK,IAAI,CAAC;IAC1D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,iBAAiB,+GAUzB,sBAAsB,6CAuB1B,CAAC"}
1
+ {"version":3,"file":"PictureChoiceCard.d.ts","sourceRoot":"","sources":["../../../../../../src/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.tsx"],"names":[],"mappings":"AAMA,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,SAAS,EACV,MAAM,qBAAqB,CAAC;AAG7B,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,KAAK,IAAI,CAAC;IAC1D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,iBAAiB,gIAYzB,sBAAsB,6CAkD1B,CAAC"}