@layers-app/shared 0.2.5 → 0.2.7

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 (183) hide show
  1. package/dist/assets/svg/flags/es.svg.js +4 -0
  2. package/dist/assets/svg/flags/ru.svg.js +4 -0
  3. package/dist/assets/svg/flags/us.svg.js +4 -0
  4. package/dist/assets/svg/globeIcon.svg.js +5 -0
  5. package/dist/assets/svg/socials/github.svg.js +5 -0
  6. package/dist/assets/svg/socials/instagram.svg.js +5 -0
  7. package/dist/assets/svg/socials/x.svg.js +5 -0
  8. package/dist/assets/svg/socials/youtube.svg.js +5 -0
  9. package/dist/components/AppContainer/components/AppSidebarButton.d.ts +1 -1
  10. package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
  11. package/dist/components/AppContainer/components/AppSidebarButton.js +4 -4
  12. package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +22 -22
  13. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
  14. package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +25 -25
  15. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  16. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +40 -40
  17. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +1 -1
  18. package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
  19. package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
  20. package/dist/components/AppContainer/hooks/useAppContainer.js +49 -43
  21. package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
  22. package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +4 -2
  23. package/dist/components/AppContainer/types.d.ts +2 -0
  24. package/dist/components/AppContainer/types.d.ts.map +1 -1
  25. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
  26. package/dist/components/FilePicker/FilePicker.d.ts +33 -2
  27. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  28. package/dist/components/FilePicker/FilePicker.js +161 -110
  29. package/dist/components/FilePicker/FilePicker.module.css.js +9 -7
  30. package/dist/components/FilePicker/FilePickerGoogleDrive.d.ts +22 -0
  31. package/dist/components/FilePicker/FilePickerGoogleDrive.d.ts.map +1 -0
  32. package/dist/components/FilePicker/FilePickerGoogleDrive.js +86 -0
  33. package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
  34. package/dist/components/FilePicker/FilePickerUnsplash.js +69 -52
  35. package/dist/components/FormViewer/components/OneSlideLayput.js +39 -37
  36. package/dist/components/FormViewer/hooks/useCreateFormContext.d.ts.map +1 -1
  37. package/dist/components/FormViewer/hooks/useCreateFormContext.js +10 -10
  38. package/dist/components/FormViewer/hooks/useFormGlobalTheme.js +15 -15
  39. package/dist/components/FormViewer/hooks/useInterpolateText.js +3 -3
  40. package/dist/components/FormViewer/store/formStore.js +3 -3
  41. package/dist/components/FormViewer/store/formStoreApi.js +13 -13
  42. package/dist/components/FormViewer/store/selectors.js +1 -1
  43. package/dist/components/GroupAvatar/index.d.ts +1 -0
  44. package/dist/components/GroupAvatar/index.d.ts.map +1 -1
  45. package/dist/components/GroupAvatar/index.js +9 -8
  46. package/dist/components/ImageCropper/ImageCropper.d.ts +19 -0
  47. package/dist/components/ImageCropper/ImageCropper.d.ts.map +1 -0
  48. package/dist/components/ImageCropper/ImageCropper.js +358 -0
  49. package/dist/components/ImageCropper/ImageCropper.module.css.js +51 -0
  50. package/dist/components/ImageCropper/cropUtils.d.ts +22 -0
  51. package/dist/components/ImageCropper/cropUtils.d.ts.map +1 -0
  52. package/dist/components/ImageCropper/cropUtils.js +42 -0
  53. package/dist/components/ImageCropper/index.d.ts +4 -0
  54. package/dist/components/ImageCropper/index.d.ts.map +1 -0
  55. package/dist/components/ImageCropper/useCropInteraction.d.ts +28 -0
  56. package/dist/components/ImageCropper/useCropInteraction.d.ts.map +1 -0
  57. package/dist/components/ImageCropper/useCropInteraction.js +76 -0
  58. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts +21 -0
  59. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -0
  60. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.js +73 -0
  61. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +19 -0
  62. package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts +6 -0
  63. package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts.map +1 -0
  64. package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.js +60 -0
  65. package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts +6 -0
  66. package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts.map +1 -0
  67. package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.js +21 -0
  68. package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.d.ts +6 -0
  69. package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.d.ts.map +1 -0
  70. package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.js +35 -0
  71. package/dist/components/IntegrationFlowAnimation/icons/index.d.ts +4 -0
  72. package/dist/components/IntegrationFlowAnimation/icons/index.d.ts.map +1 -0
  73. package/dist/components/IntegrationFlowAnimation/index.d.ts +5 -0
  74. package/dist/components/IntegrationFlowAnimation/index.d.ts.map +1 -0
  75. package/dist/components/LanguagePicker/LanguagePicker.d.ts +2 -1
  76. package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
  77. package/dist/components/LanguagePicker/LanguagePicker.js +44 -31
  78. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +6 -4
  79. package/dist/components/MediaLibrary/MediaLibrary.d.ts +3 -0
  80. package/dist/components/MediaLibrary/MediaLibrary.d.ts.map +1 -0
  81. package/dist/components/MediaLibrary/MediaLibrary.js +93 -0
  82. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +17 -0
  83. package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.d.ts +8 -0
  84. package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.d.ts.map +1 -0
  85. package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.js +22 -0
  86. package/dist/components/MediaLibrary/MediaLibraryBrowser.d.ts +12 -0
  87. package/dist/components/MediaLibrary/MediaLibraryBrowser.d.ts.map +1 -0
  88. package/dist/components/MediaLibrary/MediaLibraryBrowser.js +52 -0
  89. package/dist/components/MediaLibrary/MediaLibraryRow.d.ts +9 -0
  90. package/dist/components/MediaLibrary/MediaLibraryRow.d.ts.map +1 -0
  91. package/dist/components/MediaLibrary/MediaLibraryRow.js +29 -0
  92. package/dist/components/MediaLibrary/index.d.ts +4 -0
  93. package/dist/components/MediaLibrary/index.d.ts.map +1 -0
  94. package/dist/components/MediaLibrary/types.d.ts +31 -0
  95. package/dist/components/MediaLibrary/types.d.ts.map +1 -0
  96. package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
  97. package/dist/components/NavMenu/components/NavMenuItem.js +53 -50
  98. package/dist/components/NavMenu/types.d.ts +1 -0
  99. package/dist/components/NavMenu/types.d.ts.map +1 -1
  100. package/dist/components/NoData/NoData.d.ts +6 -1
  101. package/dist/components/NoData/NoData.d.ts.map +1 -1
  102. package/dist/components/NoData/NoData.js +85 -82
  103. package/dist/components/SettingsSection/index.d.ts +12 -0
  104. package/dist/components/SettingsSection/index.d.ts.map +1 -0
  105. package/dist/components/SettingsSection/index.js +36 -0
  106. package/dist/components/SettingsSection/styles.module.css.js +7 -0
  107. package/dist/components/SocialLinkRow/index.d.ts +11 -0
  108. package/dist/components/SocialLinkRow/index.d.ts.map +1 -0
  109. package/dist/components/SocialLinkRow/index.js +131 -0
  110. package/dist/components/SortableList/components/SortableItem/SortableItem.js +3 -3
  111. package/dist/components/StorageUsageProgress/index.js +26 -24
  112. package/dist/components/TimezonePicker/index.d.ts +9 -0
  113. package/dist/components/TimezonePicker/index.d.ts.map +1 -0
  114. package/dist/components/TimezonePicker/index.js +91 -0
  115. package/dist/components/UserAvatar/index.d.ts.map +1 -1
  116. package/dist/components/UserAvatar/index.js +11 -10
  117. package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
  118. package/dist/components/WorkspaceMenu/WorkspaceItem.js +18 -17
  119. package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
  120. package/dist/components/WorkspaceMenu/WorkspaceMenu.js +70 -69
  121. package/dist/components/modals/RemoveConfirmModal.js +1 -1
  122. package/dist/components/table/components/TableHeaders.js +3 -3
  123. package/dist/components/table/components/TablePanel.js +1 -1
  124. package/dist/components/table/helpers/columns.js +3 -3
  125. package/dist/components/table/hooks/TableProvider.js +3 -3
  126. package/dist/components/table/selectors.js +6 -6
  127. package/dist/helpers/getFileType.d.ts +1 -2
  128. package/dist/helpers/getFileType.d.ts.map +1 -1
  129. package/dist/helpers/getFileType.js +5 -6
  130. package/dist/helpers/showFeatureFeedback.d.ts +16 -0
  131. package/dist/helpers/showFeatureFeedback.d.ts.map +1 -0
  132. package/dist/helpers/showFeatureFeedback.js +109 -0
  133. package/dist/helpers/showFeatureFeedback.module.css.js +9 -0
  134. package/dist/helpers/showNotifications.d.ts +14 -3
  135. package/dist/helpers/showNotifications.d.ts.map +1 -1
  136. package/dist/helpers/showNotifications.js +120 -61
  137. package/dist/helpers/showNotifications.module.css.js +29 -0
  138. package/dist/helpers/timezones.d.ts +12 -0
  139. package/dist/helpers/timezones.d.ts.map +1 -0
  140. package/dist/helpers/timezones.js +59 -0
  141. package/dist/hooks/useFeatureFeedback.d.ts +23 -0
  142. package/dist/hooks/useFeatureFeedback.d.ts.map +1 -0
  143. package/dist/hooks/useFeatureFeedback.js +48 -0
  144. package/dist/hooks/useNumberQueryParam.js +3 -3
  145. package/dist/hooks/useVideoUploadGuard.d.ts +2 -0
  146. package/dist/hooks/useVideoUploadGuard.d.ts.map +1 -0
  147. package/dist/hooks/useVideoUploadGuard.js +24 -0
  148. package/dist/index.css +1 -1
  149. package/dist/index.d.ts +13 -1
  150. package/dist/index.d.ts.map +1 -1
  151. package/dist/index.js +461 -406
  152. package/dist/lang/locales/ui_en.json.js +24 -22
  153. package/dist/lang/locales/ui_es.json.js +20 -18
  154. package/dist/lang/locales/ui_ru.json.js +20 -18
  155. package/dist/lib/contentImport/index.d.ts +4 -0
  156. package/dist/lib/contentImport/index.d.ts.map +1 -0
  157. package/dist/lib/contentImport/lexicalSerializer.d.ts +19 -0
  158. package/dist/lib/contentImport/lexicalSerializer.d.ts.map +1 -0
  159. package/dist/lib/contentImport/lexicalSerializer.js +215 -0
  160. package/dist/lib/contentImport/types.d.ts +161 -0
  161. package/dist/lib/contentImport/types.d.ts.map +1 -0
  162. package/dist/lib/contentImport/utils.d.ts +35 -0
  163. package/dist/lib/contentImport/utils.d.ts.map +1 -0
  164. package/dist/lib/contentImport/utils.js +145 -0
  165. package/dist/lib/layersVisitData.d.ts +13 -0
  166. package/dist/lib/layersVisitData.d.ts.map +1 -0
  167. package/dist/lib/layersVisitData.js +37 -0
  168. package/dist/node_modules/countries-and-timezones/esm/index.js +4031 -0
  169. package/dist/store/plansModal.d.ts.map +1 -1
  170. package/dist/store/plansModal.js +8 -7
  171. package/dist/utils/formatStorage.d.ts +7 -1
  172. package/dist/utils/formatStorage.d.ts.map +1 -1
  173. package/dist/utils/formatStorage.js +10 -5
  174. package/dist/utils/getCroppedBlob.d.ts +3 -0
  175. package/dist/utils/getCroppedBlob.d.ts.map +1 -0
  176. package/dist/utils/getCroppedBlob.js +21 -0
  177. package/package.json +1 -1
  178. package/dist/assets/images/flags/es.svg.js +0 -4
  179. package/dist/assets/images/flags/ru.svg.js +0 -4
  180. package/dist/assets/images/flags/us.svg.js +0 -4
  181. package/dist/components/PaymentSuccess/PaymentSuccess.d.ts +0 -2
  182. package/dist/components/PaymentSuccess/PaymentSuccess.d.ts.map +0 -1
  183. package/dist/components/PaymentSuccess/PaymentSuccess.js +0 -41
@@ -0,0 +1,131 @@
1
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
+ import a from "react";
3
+ import { useTranslation as E } from "react-i18next";
4
+ import { Cancel01Icon as h } from "@hugeicons/core-free-icons";
5
+ import { HugeiconsIcon as p } from "@hugeicons/react";
6
+ import { Flex as o, Text as d, ActionIcon as g, Button as x, TextInput as S } from "@mantine/core";
7
+ import b from "../../assets/svg/socials/github.svg.js";
8
+ import z from "../../assets/svg/socials/instagram.svg.js";
9
+ import T from "../../assets/svg/socials/x.svg.js";
10
+ import L from "../../assets/svg/socials/youtube.svg.js";
11
+ const _ = {
12
+ Instagram: z,
13
+ "X (Twitter)": T,
14
+ Youtube: L,
15
+ GitHub: b
16
+ }, N = ({
17
+ social: n,
18
+ onSave: v,
19
+ onClear: w
20
+ }) => {
21
+ const { t: r } = E(), [I, l] = a.useState(!1), [s, c] = a.useState(n.link || ""), [k, m] = a.useState(null), u = (e) => e.length > 30 ? r("MAX_LENGTH_EXCEEDED", { max: 30, ns: "errors" }) : /[\u0400-\u04FF]/.test(e) ? r("CYRILLIC_NOT_ALLOWED", { ns: "errors" }) : null, C = (e) => {
22
+ c(e), m(u(e));
23
+ }, f = () => {
24
+ const e = u(s);
25
+ if (e) {
26
+ m(e);
27
+ return;
28
+ }
29
+ v(s), l(!1);
30
+ };
31
+ return /* @__PURE__ */ i(o, { justify: "space-between", children: [
32
+ /* @__PURE__ */ i(o, { maw: 343, gap: 8, children: [
33
+ a.createElement(_[n.name], {
34
+ height: 16,
35
+ width: 16
36
+ }),
37
+ /* @__PURE__ */ t(d, { fw: 500, size: "sm", children: n.name })
38
+ ] }),
39
+ n.link ? /* @__PURE__ */ i(o, { align: "center", gap: 16, children: [
40
+ /* @__PURE__ */ t(d, { size: "sm", c: "var(--mantine-color-text)", children: n.link }),
41
+ /* @__PURE__ */ t(
42
+ g,
43
+ {
44
+ color: "var(--mantine-color-text)",
45
+ variant: "subtle",
46
+ size: "xs",
47
+ children: /* @__PURE__ */ t(
48
+ p,
49
+ {
50
+ onClick: () => {
51
+ w(), c("");
52
+ },
53
+ icon: h
54
+ }
55
+ )
56
+ }
57
+ )
58
+ ] }) : !n.link && !I ? /* @__PURE__ */ t(o, { children: /* @__PURE__ */ t(
59
+ x,
60
+ {
61
+ c: "var(--mantine-color-text)",
62
+ size: "xs",
63
+ variant: "light",
64
+ color: "gray",
65
+ onClick: () => {
66
+ l(!0);
67
+ },
68
+ children: r("addUsername")
69
+ }
70
+ ) }) : /* @__PURE__ */ i(
71
+ o,
72
+ {
73
+ align: "center",
74
+ justify: "end",
75
+ w: "100%",
76
+ maw: 335,
77
+ miw: 0,
78
+ gap: 16,
79
+ children: [
80
+ /* @__PURE__ */ t(
81
+ S,
82
+ {
83
+ flex: 1,
84
+ miw: 50,
85
+ placeholder: r("username"),
86
+ variant: "default",
87
+ size: "xs",
88
+ value: s,
89
+ onChange: (e) => C(e.currentTarget.value),
90
+ onKeyDown: (e) => {
91
+ e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), f());
92
+ },
93
+ error: k
94
+ }
95
+ ),
96
+ /* @__PURE__ */ t(
97
+ x,
98
+ {
99
+ w: 34,
100
+ onClick: f,
101
+ variant: "transparent",
102
+ px: 0,
103
+ size: "xs",
104
+ children: r("send")
105
+ }
106
+ ),
107
+ /* @__PURE__ */ t(
108
+ g,
109
+ {
110
+ color: "var(--mantine-color-text)",
111
+ variant: "subtle",
112
+ size: "xs",
113
+ children: /* @__PURE__ */ t(
114
+ p,
115
+ {
116
+ onClick: () => {
117
+ c(""), l(!1), m(null);
118
+ },
119
+ icon: h
120
+ }
121
+ )
122
+ }
123
+ )
124
+ ]
125
+ }
126
+ )
127
+ ] });
128
+ };
129
+ export {
130
+ N as SocialLinkRow
131
+ };
@@ -1,11 +1,11 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { useMemo as d, createContext as p, useContext as b } from "react";
2
+ import { useMemo as d, useContext as p, createContext as b } from "react";
3
3
  import { useSortable as S } from "@dnd-kit/sortable";
4
4
  import { CSS as v } from "@dnd-kit/utilities";
5
5
  import { ActionIcon as x } from "@mantine/core";
6
6
  import { IconGripVertical as g } from "@tabler/icons-react";
7
7
  /* empty css */
8
- const a = p({
8
+ const a = b({
9
9
  attributes: {},
10
10
  listeners: void 0,
11
11
  ref() {
@@ -41,7 +41,7 @@ function D({
41
41
  iconProps: o,
42
42
  actionIconProps: n
43
43
  }) {
44
- const { attributes: t, listeners: e, ref: i } = b(a);
44
+ const { attributes: t, listeners: e, ref: i } = p(a);
45
45
  return /* @__PURE__ */ r(
46
46
  x,
47
47
  {
@@ -1,17 +1,17 @@
1
- import { jsx as o, jsxs as i } from "react/jsx-runtime";
2
- import { useTranslation as h } from "react-i18next";
3
- import { Box as f, Progress as p, Tooltip as x, Stack as u, Text as n, Flex as T } from "@mantine/core";
4
- import { storageCategoryColors as b } from "../../types/storageCategories.js";
5
- import { formatStorage as z } from "../../utils/formatStorage.js";
6
- import S from "./StorageUsageProgress.module.css.js";
7
- const v = ({
1
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
+ import { useTranslation as f } from "react-i18next";
3
+ import { Box as h, Progress as p, Tooltip as u, Stack as x, Text as n, Flex as S } from "@mantine/core";
4
+ import { storageCategoryColors as T } from "../../types/storageCategories.js";
5
+ import { formatStoragePercent as b, formatStorage as z } from "../../utils/formatStorage.js";
6
+ import v from "./StorageUsageProgress.module.css.js";
7
+ const w = ({
8
8
  type: c,
9
- description: r,
9
+ description: o,
10
10
  usedKb: a,
11
11
  percentage: t
12
- }) => /* @__PURE__ */ i(u, { gap: 2, align: "center", children: [
13
- /* @__PURE__ */ o(n, { size: "sm", children: c }),
14
- /* @__PURE__ */ i(T, { gap: 5, children: [
12
+ }) => /* @__PURE__ */ i(x, { gap: 2, align: "center", children: [
13
+ /* @__PURE__ */ r(n, { size: "sm", children: c }),
14
+ /* @__PURE__ */ i(S, { gap: 5, children: [
15
15
  /* @__PURE__ */ i(n, { size: "xl", children: [
16
16
  t,
17
17
  " %"
@@ -22,20 +22,20 @@ const v = ({
22
22
  ")"
23
23
  ] })
24
24
  ] }),
25
- /* @__PURE__ */ o(n, { size: "sm", c: "var(--mantine-color-gray-6)", children: r })
25
+ /* @__PURE__ */ r(n, { size: "sm", c: "var(--mantine-color-gray-6)", children: o })
26
26
  ] }), N = ({
27
27
  storageByCategory: c,
28
- totalStorageKb: r,
28
+ totalStorageKb: o,
29
29
  size: a = 30
30
30
  }) => {
31
- const { t } = h("settingsPage"), g = 24, l = c.filter(({ usedKb: e }) => e > 0).map((e) => {
32
- const s = e.usedKb / r * 100;
31
+ const { t } = f("settingsPage"), g = 24, l = c.filter(({ usedKb: e }) => e > 0).map((e) => {
32
+ const s = e.usedKb / o * 100;
33
33
  return {
34
34
  ...e,
35
35
  percentage: parseFloat(s.toFixed(4))
36
36
  };
37
37
  });
38
- return /* @__PURE__ */ o(f, { w: "100%", children: /* @__PURE__ */ o(
38
+ return /* @__PURE__ */ r(h, { w: "100%", children: /* @__PURE__ */ r(
39
39
  p.Root,
40
40
  {
41
41
  radius: "lg",
@@ -43,25 +43,27 @@ const v = ({
43
43
  styles: {
44
44
  root: { overflow: "visible" }
45
45
  },
46
- children: l.map(({ type: e, usedKb: s, percentage: d }, m) => /* @__PURE__ */ o(
47
- x,
46
+ children: l.map(({ type: e, usedKb: s, percentage: d }, m) => /* @__PURE__ */ r(
47
+ u,
48
48
  {
49
49
  position: "bottom",
50
- label: /* @__PURE__ */ o(
51
- v,
50
+ label: /* @__PURE__ */ r(
51
+ w,
52
52
  {
53
53
  type: t(`workspace.categories.${e}`),
54
54
  usedKb: z(s),
55
- percentage: (Math.ceil(s / r * 100 * 10) / 10).toFixed(1),
55
+ percentage: b(
56
+ s / o * 100
57
+ ),
56
58
  description: t(`workspace.catDescriptions.${e}`)
57
59
  }
58
60
  ),
59
- children: /* @__PURE__ */ o(
61
+ children: /* @__PURE__ */ r(
60
62
  p.Section,
61
63
  {
62
64
  value: d,
63
- color: b[e],
64
- className: S.section,
65
+ color: T[e],
66
+ className: v.section,
65
67
  styles: {
66
68
  section: {
67
69
  borderRadius: 999,
@@ -0,0 +1,9 @@
1
+ import { ComboboxProps } from '@mantine/core';
2
+ interface TimezonePickerProps extends ComboboxProps {
3
+ timezone: string | null;
4
+ label?: string;
5
+ onChange: (value: string) => void;
6
+ }
7
+ export declare const TimezonePicker: ({ label, timezone, onChange, ...rest }: TimezonePickerProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TimezonePicker/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,aAAa,EAQd,MAAM,eAAe,CAAC;AAIvB,UAAU,mBAAoB,SAAQ,aAAa;IACjD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,cAAc,GAAI,wCAK5B,mBAAmB,4CA+FrB,CAAC"}
@@ -0,0 +1,91 @@
1
+ import { jsx as o, jsxs as l } from "react/jsx-runtime";
2
+ import { useState as f, useMemo as g } from "react";
3
+ import { useTranslation as b } from "react-i18next";
4
+ import { Tick02Icon as v, Search01Icon as S } from "@hugeicons/core-free-icons";
5
+ import { HugeiconsIcon as p } from "@hugeicons/react";
6
+ import x from "../../assets/svg/globeIcon.svg.js";
7
+ import { useCombobox as w, Combobox as t, Flex as C, InputBase as I, Input as T, Stack as D, TextInput as k, ScrollArea as y } from "@mantine/core";
8
+ import { getTimeZones as O } from "../../helpers/timezones.js";
9
+ const F = ({
10
+ label: u,
11
+ timezone: r,
12
+ onChange: h,
13
+ ...m
14
+ }) => {
15
+ const [c, a] = f(""), d = g(() => O(), []), { t: i } = b(), n = w({
16
+ onDropdownClose: () => {
17
+ n.resetSelectedOption(), n.focusTarget(), a("");
18
+ },
19
+ onDropdownOpen: () => {
20
+ n.focusSearchInput();
21
+ }
22
+ }), s = d.filter(
23
+ (e) => e.label.toLowerCase().includes(c.toLowerCase().trim())
24
+ ).map((e) => /* @__PURE__ */ o(
25
+ t.Option,
26
+ {
27
+ active: r === e.value,
28
+ value: e.value,
29
+ px: "xs",
30
+ children: /* @__PURE__ */ l(C, { justify: "space-between", align: "center", children: [
31
+ e.label,
32
+ r === e.value ? /* @__PURE__ */ o(
33
+ p,
34
+ {
35
+ color: "var(--mantine-primary-color-filled)",
36
+ size: 16,
37
+ icon: v
38
+ }
39
+ ) : null
40
+ ] })
41
+ },
42
+ e.value
43
+ ));
44
+ return /* @__PURE__ */ l(
45
+ t,
46
+ {
47
+ position: "bottom",
48
+ store: n,
49
+ withinPortal: !1,
50
+ onOptionSubmit: (e) => {
51
+ h(e), n.closeDropdown();
52
+ },
53
+ ...m,
54
+ children: [
55
+ /* @__PURE__ */ o(t.Target, { children: /* @__PURE__ */ o(
56
+ I,
57
+ {
58
+ label: u,
59
+ value: r || "",
60
+ component: "button",
61
+ type: "button",
62
+ leftSection: /* @__PURE__ */ o(x, { width: 16, height: 16 }),
63
+ flex: 1,
64
+ pointer: !0,
65
+ rightSection: /* @__PURE__ */ o(t.Chevron, {}),
66
+ onClick: () => n.toggleDropdown(),
67
+ rightSectionPointerEvents: "none",
68
+ children: r || /* @__PURE__ */ o(T.Placeholder, { children: i("pickValue") })
69
+ }
70
+ ) }),
71
+ /* @__PURE__ */ o(t.Dropdown, { children: /* @__PURE__ */ l(D, { gap: 12, children: [
72
+ /* @__PURE__ */ o(
73
+ k,
74
+ {
75
+ variant: "filled",
76
+ size: "sm",
77
+ placeholder: `${i("search")}...`,
78
+ value: c,
79
+ onChange: (e) => a(e.currentTarget.value),
80
+ leftSection: /* @__PURE__ */ o(p, { color: "dimmed", size: 16, icon: S })
81
+ }
82
+ ),
83
+ /* @__PURE__ */ o(t.Options, { children: /* @__PURE__ */ o(y.Autosize, { mah: 200, type: "scroll", children: s.length > 0 ? s : /* @__PURE__ */ o(t.Empty, { children: i("nothingData") }) }) })
84
+ ] }) })
85
+ ]
86
+ }
87
+ );
88
+ };
89
+ export {
90
+ F as TimezonePicker
91
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/UserAvatar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAErD,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,MAAM,WAAW,eACf,SAAQ,WAAW,EACjB,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,WAAW,CAAC;IAChE,IAAI,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,eAAO,MAAM,UAAU,wFAsCtB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/UserAvatar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAErD,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,MAAM,WAAW,eACf,SAAQ,WAAW,EACjB,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,WAAW,CAAC;IAChE,IAAI,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,eAAO,MAAM,UAAU,wFAuCtB,CAAC"}
@@ -1,34 +1,35 @@
1
- import { jsx as o, Fragment as c } from "react/jsx-runtime";
2
- import { forwardRef as e } from "react";
1
+ import { jsx as t, Fragment as c } from "react/jsx-runtime";
2
+ import { forwardRef as m } from "react";
3
3
  import { Avatar as d } from "@mantine/core";
4
4
  import { IconUser as l } from "@tabler/icons-react";
5
5
  import { ProjectIcon as f } from "../ProjectIcon/ProjectIcon.js";
6
- const A = e(
7
- ({ user: r, size: t = 24, emptyIcon: m, ...i }, n) => {
6
+ const A = m(
7
+ ({ user: r, size: o = 24, emptyIcon: e, ...i }, n) => {
8
8
  const a = r?.avatar || r?.avatarUrl;
9
- return a && (a.includes("i=") || a.includes("e=")) ? /* @__PURE__ */ o(
9
+ return a && (a.includes("i=") || a.includes("e=")) ? /* @__PURE__ */ t(
10
10
  f,
11
11
  {
12
12
  icon: a,
13
13
  name: r?.name,
14
14
  fallbackColorById: r?.id,
15
- size: t,
16
- textSize: typeof t == "number" ? t * 0.75 : void 0,
15
+ size: o,
16
+ textSize: typeof o == "number" ? o * 0.75 : void 0,
17
17
  radius: i.radius,
18
18
  ...i,
19
19
  ref: n
20
20
  }
21
- ) : /* @__PURE__ */ o(
21
+ ) : /* @__PURE__ */ t(
22
22
  d,
23
23
  {
24
24
  src: a,
25
25
  color: "initials",
26
26
  tt: "uppercase",
27
- size: t,
27
+ size: o,
28
+ variant: "filled",
28
29
  name: r?.id ?? "",
29
30
  ...i,
30
31
  ref: n,
31
- children: r ? /* @__PURE__ */ o(c, { children: r.name?.charAt(0) }) : /* @__PURE__ */ o(c, { children: m ?? /* @__PURE__ */ o(l, { size: "70%" }) })
32
+ children: r ? /* @__PURE__ */ t(c, { children: r.name?.charAt(0) }) : /* @__PURE__ */ t(c, { children: e ?? /* @__PURE__ */ t(l, { size: "70%" }) })
32
33
  }
33
34
  );
34
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceItem.d.ts","sourceRoot":"","sources":["../../../src/components/WorkspaceMenu/WorkspaceItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,UAAU,kBAAkB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa;IAClE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;IACzB,SAAS,EAAE,CAAC,CAAC;CACd;AAED,eAAO,MAAM,aAAa,GAAI,wBAAwB,kBAAkB,4CAuCvE,CAAC"}
1
+ {"version":3,"file":"WorkspaceItem.d.ts","sourceRoot":"","sources":["../../../src/components/WorkspaceMenu/WorkspaceItem.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,UAAU,kBAAkB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa;IAClE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;IACzB,SAAS,EAAE,CAAC,CAAC;CACd;AAED,eAAO,MAAM,aAAa,GAAI,wBAAwB,kBAAkB,4CAuCvE,CAAC"}
@@ -1,24 +1,25 @@
1
- import { jsx as e, jsxs as t, Fragment as a } from "react/jsx-runtime";
2
- import { useTranslation as s } from "react-i18next";
1
+ import { jsx as t, jsxs as n, Fragment as s } from "react/jsx-runtime";
2
+ import { useTranslation as l } from "react-i18next";
3
3
  import { Menu as c, Flex as o, Box as i, Text as m } from "@mantine/core";
4
- import { WorkspaceAvatar as p } from "../WorkspaceAvatar/WorkspaceAvatar.js";
5
- const b = ({ workspace: n, onClick: l }) => {
6
- const { t: r } = s("workspaceMenu");
7
- return /* @__PURE__ */ e(
4
+ import { useAppContainerDataStore as p } from "../AppContainer/hooks/useAppContainerDataStore.js";
5
+ import { WorkspaceAvatar as h } from "../WorkspaceAvatar/WorkspaceAvatar.js";
6
+ const g = ({ workspace: e, onClick: a }) => {
7
+ const { t: r } = l("workspaceMenu");
8
+ return /* @__PURE__ */ t(
8
9
  c.Item,
9
10
  {
10
11
  p: 4,
11
- onClick: () => l?.(n),
12
+ onClick: () => a?.(e),
12
13
  component: "a",
13
14
  styles: { itemLabel: { minWidth: 0 } },
14
- children: /* @__PURE__ */ t(o, { gap: 12, children: [
15
- /* @__PURE__ */ e(p, { workspace: n, size: 36 }),
16
- /* @__PURE__ */ t(i, { flex: 1, miw: 0, children: [
17
- /* @__PURE__ */ e(m, { truncate: !0, size: "sm", fw: 500, c: "var(--mantine-color-bright", children: n.workspaceName }),
18
- !n?.invitation && /* @__PURE__ */ e(m, { c: "gray", fw: 500, size: "xs", component: "span", children: /* @__PURE__ */ t(o, { gap: 8, component: "span", children: [
19
- n.totalMembers ? /* @__PURE__ */ t(a, { children: [
20
- r("member", { count: n.totalMembers }),
21
- /* @__PURE__ */ e(
15
+ children: /* @__PURE__ */ n(o, { gap: 12, children: [
16
+ /* @__PURE__ */ t(h, { workspace: e, size: 36 }),
17
+ /* @__PURE__ */ n(i, { flex: 1, miw: 0, children: [
18
+ /* @__PURE__ */ t(m, { truncate: !0, size: "sm", fw: 500, c: "var(--mantine-color-bright)", children: e.workspaceName }),
19
+ !e?.invitation && /* @__PURE__ */ t(m, { c: "gray", fw: 500, size: "xs", component: "span", children: /* @__PURE__ */ n(o, { gap: 8, component: "span", children: [
20
+ e.totalMembers ? /* @__PURE__ */ n(s, { children: [
21
+ r("member", { count: e.totalMembers }),
22
+ /* @__PURE__ */ t(
22
23
  i,
23
24
  {
24
25
  w: 2,
@@ -29,7 +30,7 @@ const b = ({ workspace: n, onClick: l }) => {
29
30
  }
30
31
  )
31
32
  ] }) : null,
32
- r(`plans.${n.plan}`)
33
+ p.getState().isSaas && r(`plans.${e.plan}`)
33
34
  ] }) })
34
35
  ] })
35
36
  ] })
@@ -37,5 +38,5 @@ const b = ({ workspace: n, onClick: l }) => {
37
38
  );
38
39
  };
39
40
  export {
40
- b as WorkspaceItem
41
+ g as WorkspaceItem
41
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceMenu.d.ts","sourceRoot":"","sources":["../../../src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