@layers-app/shared 0.2.6 → 0.2.8-test

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 (186) hide show
  1. package/dist/assets/svg/socials/instagram.svg.js +3 -3
  2. package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
  3. package/dist/components/AliasTextInput/AliasTextInput.js +21 -20
  4. package/dist/components/AppContainer/AppContainer.js +3 -3
  5. package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
  6. package/dist/components/AppContainer/components/AppSidebarButton.d.ts +1 -1
  7. package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
  8. package/dist/components/AppContainer/components/AppSidebarButton.js +4 -4
  9. package/dist/components/AppContainer/components/AppsSidebar/AppsSection.d.ts.map +1 -1
  10. package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +40 -32
  11. package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
  12. package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +41 -33
  13. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  14. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +58 -49
  15. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  16. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +151 -51
  17. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.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 +46 -43
  21. package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
  22. package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +4 -3
  23. package/dist/components/AppContainer/types.d.ts +2 -1
  24. package/dist/components/AppContainer/types.d.ts.map +1 -1
  25. package/dist/components/AppShell/AppShell.module.css.js +5 -5
  26. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.module.css.js +4 -4
  27. package/dist/components/AttachmentsGalleryModal/styles.module.css.js +14 -14
  28. package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +1 -1
  29. package/dist/components/BouncingLogo/BouncingLogo.module.css.js +8 -8
  30. package/dist/components/CollapsibleContainer/CollapsibleContainer.module.css.js +1 -1
  31. package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
  32. package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
  33. package/dist/components/Copyright/Copyright.module.css.js +1 -1
  34. package/dist/components/CustomKBD/CustomKBD.module.css.js +1 -1
  35. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  36. package/dist/components/EmojiPicker/EmojiPicker.js +28 -29
  37. package/dist/components/EmojiPicker/EmojiPicker.module.css.js +8 -8
  38. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  39. package/dist/components/ErrorPage/components/Error404.d.ts.map +1 -1
  40. package/dist/components/FeatureProgress/FeatureProgress.d.ts +11 -0
  41. package/dist/components/FeatureProgress/FeatureProgress.d.ts.map +1 -0
  42. package/dist/components/FeatureProgress/FeatureProgress.js +148 -0
  43. package/dist/components/FeatureProgress/FeatureProgress.module.css.js +81 -0
  44. package/dist/components/FeatureProgress/FeatureProgressCelebrationIcon.d.ts +2 -0
  45. package/dist/components/FeatureProgress/FeatureProgressCelebrationIcon.d.ts.map +1 -0
  46. package/dist/components/FeatureProgress/FeatureProgressCelebrationIcon.js +88 -0
  47. package/dist/components/FeatureProgress/FeatureProgressCompleteModal.d.ts +9 -0
  48. package/dist/components/FeatureProgress/FeatureProgressCompleteModal.d.ts.map +1 -0
  49. package/dist/components/FeatureProgress/FeatureProgressCompleteModal.js +35 -0
  50. package/dist/components/FeatureProgress/constants.d.ts +4 -0
  51. package/dist/components/FeatureProgress/constants.d.ts.map +1 -0
  52. package/dist/components/FeatureProgress/constants.js +4 -0
  53. package/dist/components/FeatureProgress/index.d.ts +3 -0
  54. package/dist/components/FeatureProgress/index.d.ts.map +1 -0
  55. package/dist/components/FilePicker/FilePicker.d.ts +4 -2
  56. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  57. package/dist/components/FilePicker/FilePicker.js +247 -229
  58. package/dist/components/FilePicker/FilePicker.module.css.js +12 -10
  59. package/dist/components/FilePicker/FilePickerGallery.d.ts.map +1 -1
  60. package/dist/components/FilePicker/FilePickerGallery.js +59 -33
  61. package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
  62. package/dist/components/FilePicker/FilePickerGiphy.js +38 -38
  63. package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
  64. package/dist/components/FilePicker/FilePickerLink.js +18 -15
  65. package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
  66. package/dist/components/FilePicker/FilePickerUnsplash.js +39 -39
  67. package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
  68. package/dist/components/FilePicker/FilePickerUpload.js +51 -35
  69. package/dist/components/FilePicker/api/giphyApi.js +10 -10
  70. package/dist/components/FilePicker/coverCollections.d.ts +4 -0
  71. package/dist/components/FilePicker/coverCollections.d.ts.map +1 -0
  72. package/dist/components/FilePicker/coverCollections.js +164 -0
  73. package/dist/components/FilePicker/index.d.ts +1 -0
  74. package/dist/components/FilePicker/index.d.ts.map +1 -1
  75. package/dist/components/FormViewer/FormViewer.module.css.js +20 -20
  76. package/dist/components/FormViewer/components/OneSlideLayput.js +39 -37
  77. package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
  78. package/dist/components/FormViewer/components/fields/DropdownField/DropdownField.module.css.js +1 -1
  79. package/dist/components/FormViewer/components/fields/EditableContent/EditableContent.module.css.js +1 -1
  80. package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.js +42 -42
  81. package/dist/components/FormViewer/components/fields/SelectableCard/SelectableCard.module.css.js +8 -8
  82. package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +4 -4
  83. package/dist/components/FormViewer/hooks/useCreateFormContext.d.ts.map +1 -1
  84. package/dist/components/FormViewer/hooks/useCreateFormContext.js +10 -10
  85. package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
  86. package/dist/components/FormViewer/store/formStoreApi.js +13 -13
  87. package/dist/components/ImageCropper/ImageCropper.d.ts.map +1 -1
  88. package/dist/components/ImageCropper/ImageCropper.js +185 -183
  89. package/dist/components/ImageCropper/ImageCropper.module.css.js +38 -38
  90. package/dist/components/ImageCropper/index.d.ts +1 -1
  91. package/dist/components/ImageCropper/index.d.ts.map +1 -1
  92. package/dist/components/ImageCropper/useCropInteraction.d.ts.map +1 -1
  93. package/dist/components/ImageCropper/useCropInteraction.js +13 -2
  94. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -1
  95. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +7 -7
  96. package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts +1 -1
  97. package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts.map +1 -1
  98. package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.js +3 -1
  99. package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts +1 -1
  100. package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts.map +1 -1
  101. package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.js +3 -1
  102. package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
  103. package/dist/components/LanguagePicker/LanguagePicker.js +45 -35
  104. package/dist/components/LanguagePicker/LanguagePicker.module.css.js +6 -4
  105. package/dist/components/Loaders/styles.module.css.js +6 -6
  106. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +2 -2
  107. package/dist/components/MediaLibrary/MediaLibraryRow.d.ts.map +1 -1
  108. package/dist/components/MediaLibrary/MediaLibraryRow.js +16 -4
  109. package/dist/components/NavMenu/NavMenu.d.ts +2 -1
  110. package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
  111. package/dist/components/NavMenu/NavMenu.module.css.js +16 -16
  112. package/dist/components/NavMenu/components/NavMenuItem.d.ts +2 -1
  113. package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
  114. package/dist/components/NavMenu/components/NavMenuItem.js +128 -106
  115. package/dist/components/NavMenu/types.d.ts +1 -0
  116. package/dist/components/NavMenu/types.d.ts.map +1 -1
  117. package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
  118. package/dist/components/NotPublicPanel/NotPublicPanel.module.css.js +11 -11
  119. package/dist/components/Notification/Notification.module.css.js +1 -1
  120. package/dist/components/OnBoarding/steps/DifferentLayouts/styles.module.css.js +3 -3
  121. package/dist/components/OnBoarding/steps/styles.module.css.js +9 -9
  122. package/dist/components/OnBoarding/styles.module.css.js +7 -7
  123. package/dist/components/OnboardingTour/OnboardingTourFooter.d.ts +17 -0
  124. package/dist/components/OnboardingTour/OnboardingTourFooter.d.ts.map +1 -0
  125. package/dist/components/OnboardingTour/OnboardingTourFooter.js +40 -0
  126. package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts +13 -0
  127. package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts.map +1 -0
  128. package/dist/components/OnboardingTour/OnboardingTourWrapper.js +164 -0
  129. package/dist/components/OnboardingTour/index.d.ts +4 -0
  130. package/dist/components/OnboardingTour/index.d.ts.map +1 -0
  131. package/dist/components/OnboardingTour/useOnboardingTour.d.ts +14 -0
  132. package/dist/components/OnboardingTour/useOnboardingTour.d.ts.map +1 -0
  133. package/dist/components/OnboardingTour/useOnboardingTour.js +50 -0
  134. package/dist/components/SearchFilters/SearchFilters.module.css.js +1 -1
  135. package/dist/components/SettingsSection/styles.module.css.js +1 -1
  136. package/dist/components/SocialLinkRow/index.d.ts.map +1 -1
  137. package/dist/components/SocialLinkRow/index.js +80 -58
  138. package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +1 -1
  139. package/dist/components/TimezonePicker/index.d.ts.map +1 -1
  140. package/dist/components/TimezonePicker/index.js +42 -41
  141. package/dist/components/UserAvatar/index.d.ts.map +1 -1
  142. package/dist/components/UserAvatar/index.js +11 -10
  143. package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
  144. package/dist/components/WorkspaceMenu/WorkspaceItem.js +21 -21
  145. package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
  146. package/dist/components/WorkspaceMenu/WorkspaceMenu.js +74 -74
  147. package/dist/components/table/FrontTable.d.ts.map +1 -1
  148. package/dist/components/table/hooks/useColumnsResizing.d.ts.map +1 -1
  149. package/dist/helpers/getFileIcons.js +1 -1
  150. package/dist/helpers/getFileType.d.ts +1 -1
  151. package/dist/helpers/getFileType.d.ts.map +1 -1
  152. package/dist/helpers/platform.d.ts +14 -0
  153. package/dist/helpers/platform.d.ts.map +1 -0
  154. package/dist/helpers/platform.js +33 -0
  155. package/dist/helpers/showFeatureFeedback.d.ts +16 -0
  156. package/dist/helpers/showFeatureFeedback.d.ts.map +1 -0
  157. package/dist/helpers/showFeatureFeedback.js +109 -0
  158. package/dist/helpers/showFeatureFeedback.module.css.js +9 -0
  159. package/dist/helpers/showNotifications.d.ts.map +1 -1
  160. package/dist/helpers/showNotifications.js +81 -113
  161. package/dist/helpers/showNotifications.module.css.js +10 -10
  162. package/dist/hooks/useFeatureFeedback.d.ts +23 -0
  163. package/dist/hooks/useFeatureFeedback.d.ts.map +1 -0
  164. package/dist/hooks/useFeatureFeedback.js +45 -0
  165. package/dist/hooks/usePlatform.d.ts +3 -0
  166. package/dist/hooks/usePlatform.d.ts.map +1 -0
  167. package/dist/hooks/usePlatform.js +10 -0
  168. package/dist/index.css +1 -1
  169. package/dist/index.d.ts +8 -0
  170. package/dist/index.d.ts.map +1 -1
  171. package/dist/index.js +373 -334
  172. package/dist/lang/locales/ui_en.json.js +15 -15
  173. package/dist/lang/locales/ui_es.json.js +13 -13
  174. package/dist/lang/locales/ui_ru.json.js +12 -12
  175. package/dist/lib/contentImport/lexicalSerializer.js +59 -47
  176. package/dist/lib/contentImport/utils.d.ts.map +1 -1
  177. package/dist/lib/layersVisitData.d.ts +13 -0
  178. package/dist/lib/layersVisitData.d.ts.map +1 -0
  179. package/dist/lib/layersVisitData.js +37 -0
  180. package/dist/store/featureProgress.d.ts +39 -0
  181. package/dist/store/featureProgress.d.ts.map +1 -0
  182. package/dist/store/featureProgress.js +68 -0
  183. package/dist/store/plansModal.d.ts.map +1 -1
  184. package/dist/store/plansModal.js +8 -6
  185. package/docs/README.md +499 -499
  186. package/package.json +75 -74
@@ -1,26 +1,26 @@
1
- import { jsx as t, jsxs as n, Fragment as s } from "react/jsx-runtime";
2
- import { useTranslation as l } from "react-i18next";
3
- import { Menu as c, Flex as o, Box as i, Text as m } from "@mantine/core";
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(
9
- c.Item,
1
+ import { jsx as e, jsxs as t, Fragment as s } from "react/jsx-runtime";
2
+ import { useTranslation as c } from "react-i18next";
3
+ import { Menu as p, Flex as o, Box as m, Text as i } from "@mantine/core";
4
+ import { usePlatform as h } from "../../hooks/usePlatform.js";
5
+ import { WorkspaceAvatar as d } from "../WorkspaceAvatar/WorkspaceAvatar.js";
6
+ const M = ({ workspace: n, onClick: a }) => {
7
+ const { t: r } = c("workspaceMenu"), l = h();
8
+ return /* @__PURE__ */ e(
9
+ p.Item,
10
10
  {
11
11
  p: 4,
12
- onClick: () => a?.(e),
12
+ onClick: () => a?.(n),
13
13
  component: "a",
14
14
  styles: { itemLabel: { minWidth: 0 } },
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(
23
- i,
15
+ children: /* @__PURE__ */ t(o, { gap: 12, children: [
16
+ /* @__PURE__ */ e(d, { workspace: n, size: 36 }),
17
+ /* @__PURE__ */ t(m, { flex: 1, miw: 0, children: [
18
+ /* @__PURE__ */ e(i, { truncate: !0, size: "sm", fw: 500, c: "var(--mantine-color-bright)", children: n.workspaceName }),
19
+ !n?.invitation && /* @__PURE__ */ e(i, { c: "gray", fw: 500, size: "xs", component: "span", children: /* @__PURE__ */ t(o, { gap: 8, component: "span", children: [
20
+ n.totalMembers ? /* @__PURE__ */ t(s, { children: [
21
+ r("member", { count: n.totalMembers }),
22
+ /* @__PURE__ */ e(
23
+ m,
24
24
  {
25
25
  w: 2,
26
26
  h: 2,
@@ -30,7 +30,7 @@ const g = ({ workspace: e, onClick: a }) => {
30
30
  }
31
31
  )
32
32
  ] }) : null,
33
- p.getState().isSaas && r(`plans.${e.plan}`)
33
+ l.has("planBadges") && r(`plans.${n.plan}`)
34
34
  ] }) })
35
35
  ] })
36
36
  ] })
@@ -38,5 +38,5 @@ const g = ({ workspace: e, onClick: a }) => {
38
38
  );
39
39
  };
40
40
  export {
41
- g as WorkspaceItem
41
+ M as WorkspaceItem
42
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceMenu.d.ts","sourceRoot":"","sources":["../../../src/components/WorkspaceMenu/WorkspaceMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,MA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AAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uBAAuB,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAAI;IACxE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,MAAM,EAAE,CAAC,CAAC;IACV,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,aAAa,EAAE,iHAWpD,iBAAiB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,4CAwE1C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,aAAa,EAAE,gEAMtD,IAAI,CACL,kBAAkB,CAAC,CAAC,CAAC,EACrB,QAAQ,GAAG,eAAe,GAAG,cAAc,GAAG,aAAa,GAAG,SAAS,CACxE,4CA8DA,CAAC"}
@@ -1,71 +1,71 @@
1
- import { jsxs as t, jsx as e, Fragment as M } from "react/jsx-runtime";
2
- import { useState as L } from "react";
3
- import { useTranslation as h } from "react-i18next";
4
- import { Link as b } from "react-router-dom";
5
- import { Setting07Icon as N, UserMultiple02Icon as K, Add01Icon as T } from "@hugeicons/core-free-icons";
1
+ import { jsxs as n, jsx as e, Fragment as M } from "react/jsx-runtime";
2
+ import { useState as A } from "react";
3
+ import { useTranslation as u } from "react-i18next";
4
+ import { Link as z } from "react-router-dom";
5
+ import { Setting07Icon as L, UserMultiple02Icon as N, Add01Icon as K } from "@hugeicons/core-free-icons";
6
6
  import { HugeiconsIcon as k } from "@hugeicons/react";
7
- import { Stack as a, Flex as l, Text as m, Box as f, Button as S, Menu as p, Tooltip as D, Progress as P, ScrollArea as U } from "@mantine/core";
8
- import { useAppContainerDataStore as w } from "../AppContainer/hooks/useAppContainerDataStore.js";
7
+ import { Stack as a, Flex as l, Text as d, Box as f, Button as b, Menu as m, Tooltip as P, Progress as T, ScrollArea as U } from "@mantine/core";
9
8
  import { useMenu as B } from "../../hooks/useMenu.js";
10
- import { formatStoragePercent as F, formatStorage as z } from "../../utils/formatStorage.js";
9
+ import { usePlatform as D } from "../../hooks/usePlatform.js";
10
+ import { formatStoragePercent as F, formatStorage as S } from "../../utils/formatStorage.js";
11
11
  import { Logotype as O } from "../Logotype.js";
12
12
  import { WorkspaceAvatar as x } from "../WorkspaceAvatar/WorkspaceAvatar.js";
13
13
  import { WorkspaceItem as E } from "./WorkspaceItem.js";
14
- const ne = ({
14
+ const oe = ({
15
15
  children: r,
16
16
  onCreate: i,
17
- onClick: o,
18
- active: n,
17
+ onClick: t,
18
+ active: o,
19
19
  items: c,
20
20
  workspaceLink: s,
21
- settingsLink: y,
22
- membersLink: C,
21
+ settingsLink: p,
22
+ membersLink: y,
23
23
  isAnonym: I,
24
24
  publicMode: W
25
25
  }) => {
26
- const { t: A } = h("workspaceMenu"), { isMobile: u } = B(), [j, d] = L(!1);
27
- return I || W ? /* @__PURE__ */ e(l, { w: "100%", justify: u ? "start" : "center", children: /* @__PURE__ */ e("a", { href: "/", children: /* @__PURE__ */ e(
26
+ const { t: C } = u("workspaceMenu"), { isMobile: w } = B(), [j, h] = A(!1);
27
+ return I || W ? /* @__PURE__ */ e(l, { w: "100%", justify: w ? "start" : "center", children: /* @__PURE__ */ e("a", { href: "/", children: /* @__PURE__ */ e(
28
28
  O,
29
29
  {
30
- minified: !u,
31
- w: u ? 65 : 24,
30
+ minified: !w,
31
+ w: w ? 65 : 24,
32
32
  isLink: !1
33
33
  }
34
- ) }) }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ t(
35
- p,
34
+ ) }) }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ n(
35
+ m,
36
36
  {
37
37
  opened: j,
38
- onChange: d,
38
+ onChange: h,
39
39
  position: "right-start",
40
40
  keepMounted: !1,
41
41
  clickOutsideEvents: ["mousedown", "click"],
42
42
  offset: 17,
43
43
  children: [
44
- /* @__PURE__ */ e(p.Target, { children: r ?? /* @__PURE__ */ t(l, { onClick: () => d((g) => !g), children: [
45
- /* @__PURE__ */ e(x, { size: 30, workspace: n }),
46
- /* @__PURE__ */ e(l, { justify: "space-between", align: "center", w: "100%", miw: 0, children: /* @__PURE__ */ e(D, { label: n.workspaceName, children: /* @__PURE__ */ e(m, { size: "md", truncate: !0, children: n?.workspaceName || A("noName") }) }) })
44
+ /* @__PURE__ */ e(m.Target, { children: r ?? /* @__PURE__ */ n(l, { onClick: () => h((g) => !g), children: [
45
+ /* @__PURE__ */ e(x, { size: 30, workspace: o }),
46
+ /* @__PURE__ */ e(l, { justify: "space-between", align: "center", w: "100%", miw: 0, children: /* @__PURE__ */ e(P, { label: o.workspaceName, children: /* @__PURE__ */ e(d, { size: "md", truncate: !0, children: o?.workspaceName || C("noName") }) }) })
47
47
  ] }) }),
48
- /* @__PURE__ */ e(p.Dropdown, { w: 338, children: /* @__PURE__ */ t(a, { gap: 6, children: [
48
+ /* @__PURE__ */ e(m.Dropdown, { w: 338, children: /* @__PURE__ */ n(a, { gap: 6, children: [
49
49
  /* @__PURE__ */ e(
50
50
  H,
51
51
  {
52
- active: n,
52
+ active: o,
53
53
  workspaceLink: s,
54
- settingsLink: y,
55
- membersLink: C,
56
- onClose: () => d(!1)
54
+ settingsLink: p,
55
+ membersLink: y,
56
+ onClose: () => h(!1)
57
57
  }
58
58
  ),
59
- /* @__PURE__ */ e(f, { px: 4, children: /* @__PURE__ */ e(p.Divider, {}) }),
59
+ /* @__PURE__ */ e(f, { px: 4, children: /* @__PURE__ */ e(m.Divider, {}) }),
60
60
  /* @__PURE__ */ e(
61
61
  $,
62
62
  {
63
63
  onCreate: i,
64
- onClick: o,
64
+ onClick: t,
65
65
  items: c.filter(
66
- (g) => g.workspaceId !== n?.workspaceId
66
+ (g) => g.workspaceId !== o?.workspaceId
67
67
  ),
68
- onClose: () => d(!1)
68
+ onClose: () => h(!1)
69
69
  }
70
70
  )
71
71
  ] }) })
@@ -75,18 +75,18 @@ const ne = ({
75
75
  }, H = ({
76
76
  active: r,
77
77
  workspaceLink: i,
78
- settingsLink: o,
79
- membersLink: n,
78
+ settingsLink: t,
79
+ membersLink: o,
80
80
  onClose: c
81
81
  }) => {
82
- const { t: s } = h("workspaceMenu");
83
- return /* @__PURE__ */ t(a, { p: 4, pb: 5, gap: 12, children: [
84
- /* @__PURE__ */ t(l, { gap: 10, children: [
82
+ const { t: s } = u("workspaceMenu"), p = D();
83
+ return /* @__PURE__ */ n(a, { p: 4, pb: 5, gap: 12, children: [
84
+ /* @__PURE__ */ n(l, { gap: 10, children: [
85
85
  /* @__PURE__ */ e(x, { size: 48, workspace: r }),
86
- /* @__PURE__ */ t(a, { gap: 0, miw: 0, children: [
87
- /* @__PURE__ */ e(m, { truncate: !0, size: "md", fw: 500, c: "var(--mantine-color-bright)", children: r.workspaceName || s("noName") }),
88
- /* @__PURE__ */ e(m, { c: "gray", size: "sm", fw: 500, component: "span", children: /* @__PURE__ */ t(l, { gap: 6, component: "span", children: [
89
- r.totalMembers ? /* @__PURE__ */ t(M, { children: [
86
+ /* @__PURE__ */ n(a, { gap: 0, miw: 0, children: [
87
+ /* @__PURE__ */ e(d, { truncate: !0, size: "md", fw: 500, c: "var(--mantine-color-bright)", children: r.workspaceName || s("noName") }),
88
+ /* @__PURE__ */ e(d, { c: "gray", size: "sm", fw: 500, component: "span", children: /* @__PURE__ */ n(l, { gap: 6, component: "span", children: [
89
+ r.totalMembers ? /* @__PURE__ */ n(M, { children: [
90
90
  s("member", { count: r.totalMembers }),
91
91
  /* @__PURE__ */ e(
92
92
  f,
@@ -99,34 +99,34 @@ const ne = ({
99
99
  }
100
100
  )
101
101
  ] }) : null,
102
- w.getState().isSaas && s(`plans.${r.plan}`)
102
+ p.has("planBadges") && s(`plans.${r.plan}`)
103
103
  ] }) })
104
104
  ] })
105
105
  ] }),
106
- w.getState().isSaas && /* @__PURE__ */ e(R, { active: r }),
107
- /* @__PURE__ */ t(l, { children: [
106
+ p.has("plans") && /* @__PURE__ */ e(R, { active: r }),
107
+ /* @__PURE__ */ n(l, { children: [
108
108
  /* @__PURE__ */ e(
109
- S,
109
+ b,
110
110
  {
111
111
  flex: 1,
112
- component: b,
112
+ component: z,
113
113
  variant: "default",
114
114
  size: "sm",
115
- leftSection: /* @__PURE__ */ e(k, { size: 16, icon: N }),
116
- to: i ?? o ?? "",
115
+ leftSection: /* @__PURE__ */ e(k, { size: 16, icon: L }),
116
+ to: i ?? t ?? "",
117
117
  onClick: c,
118
118
  children: s("settings")
119
119
  }
120
120
  ),
121
- n && w.getState().isSaas && /* @__PURE__ */ e(
122
- S,
121
+ o && p.has("inviteUsers") && /* @__PURE__ */ e(
122
+ b,
123
123
  {
124
124
  flex: 1,
125
- component: b,
125
+ component: z,
126
126
  variant: "default",
127
127
  size: "sm",
128
- leftSection: /* @__PURE__ */ e(k, { size: 16, icon: K }),
129
- to: n,
128
+ leftSection: /* @__PURE__ */ e(k, { size: 16, icon: N }),
129
+ to: o,
130
130
  onClick: c,
131
131
  children: s("members")
132
132
  }
@@ -136,35 +136,35 @@ const ne = ({
136
136
  }, R = ({
137
137
  active: r
138
138
  }) => {
139
- const { t: i } = h("workspaceMenu"), o = (r?.storageUsedKb || 0) / (r?.storageLimitKb || 1), n = F(o * 100);
140
- return /* @__PURE__ */ t(a, { gap: 4, w: "100%", children: [
141
- /* @__PURE__ */ t(l, { justify: "space-between", children: [
142
- /* @__PURE__ */ t(m, { size: "sm", fw: 500, children: [
139
+ const { t: i } = u("workspaceMenu"), t = (r?.storageUsedKb || 0) / (r?.storageLimitKb || 1), o = F(t * 100);
140
+ return /* @__PURE__ */ n(a, { gap: 4, w: "100%", children: [
141
+ /* @__PURE__ */ n(l, { justify: "space-between", children: [
142
+ /* @__PURE__ */ n(d, { size: "sm", fw: 500, children: [
143
143
  i("usedStorage"),
144
144
  ": ",
145
- n,
145
+ o,
146
146
  "%"
147
147
  ] }),
148
- /* @__PURE__ */ t(m, { size: "sm", fw: 500, c: "gray", children: [
149
- z(r?.storageUsedKb),
148
+ /* @__PURE__ */ n(d, { size: "sm", fw: 500, c: "gray", children: [
149
+ S(r?.storageUsedKb),
150
150
  " ",
151
151
  i("of"),
152
152
  " ",
153
- z(r?.storageLimitKb)
153
+ S(r?.storageLimitKb)
154
154
  ] })
155
155
  ] }),
156
- /* @__PURE__ */ e(P, { h: 4, value: o * 100 })
156
+ /* @__PURE__ */ e(T, { h: 4, value: t * 100 })
157
157
  ] });
158
158
  }, $ = ({
159
159
  onCreate: r,
160
160
  onClick: i,
161
- items: o,
162
- onClose: n
161
+ items: t,
162
+ onClose: o
163
163
  }) => {
164
- const { t: c } = h("workspaceMenu");
165
- return /* @__PURE__ */ t(a, { gap: 12, children: [
166
- o?.length > 0 && /* @__PURE__ */ t(a, { gap: 0, children: [
167
- /* @__PURE__ */ e(p.Label, { fw: 600, px: 4, py: 5, fz: "sm", children: c("switchWorkspace") }),
164
+ const { t: c } = u("workspaceMenu");
165
+ return /* @__PURE__ */ n(a, { gap: 12, children: [
166
+ t?.length > 0 && /* @__PURE__ */ n(a, { gap: 0, children: [
167
+ /* @__PURE__ */ e(m.Label, { fw: 600, px: 4, py: 5, fz: "sm", children: c("switchWorkspace") }),
168
168
  /* @__PURE__ */ e(f, { w: "100%", px: 4, children: /* @__PURE__ */ e(
169
169
  U.Autosize,
170
170
  {
@@ -175,13 +175,13 @@ const ne = ({
175
175
  type: "always",
176
176
  styles: {
177
177
  viewport: {
178
- paddingRight: o.length > 4 ? 12 : 0
178
+ paddingRight: t.length > 4 ? 12 : 0
179
179
  },
180
180
  content: {
181
181
  minWidth: 0
182
182
  }
183
183
  },
184
- children: /* @__PURE__ */ e(a, { gap: 6, miw: 0, children: o.map((s) => /* @__PURE__ */ e(
184
+ children: /* @__PURE__ */ e(a, { gap: 6, miw: 0, children: t.map((s) => /* @__PURE__ */ e(
185
185
  E,
186
186
  {
187
187
  workspace: s,
@@ -193,15 +193,15 @@ const ne = ({
193
193
  ) })
194
194
  ] }),
195
195
  /* @__PURE__ */ e(f, { p: 4, pt: 0, children: /* @__PURE__ */ e(
196
- S,
196
+ b,
197
197
  {
198
198
  fullWidth: !0,
199
199
  variant: "default",
200
200
  size: "sm",
201
201
  onClick: () => {
202
- r?.(), n?.();
202
+ r?.(), o?.();
203
203
  },
204
- leftSection: /* @__PURE__ */ e(k, { icon: T, size: 16 }),
204
+ leftSection: /* @__PURE__ */ e(k, { icon: K, size: 16 }),
205
205
  children: c("newWorkspace")
206
206
  }
207
207
  ) })
@@ -209,5 +209,5 @@ const ne = ({
209
209
  };
210
210
  export {
211
211
  H as ActiveWorkspace,
212
- ne as WorkspaceMenu
212
+ oe as WorkspaceMenu
213
213
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FrontTable.d.ts","sourceRoot":"","sources":["../../../src/components/table/FrontTable.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;gBAAhB,CAAA;iBACA,CAAC;gBACC,CAAA;;CAOP,CAAC;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"FrontTable.d.ts","sourceRoot":"","sources":["../../../src/components/table/FrontTable.tsx"],"names":[],"mappings":"AAYA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;gBAAV,CAAA;iBACA,CAAC;gBACA,CAAC;;CAOb,CAAC;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC;AACxB,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useColumnsResizing.d.ts","sourceRoot":"","sources":["../../../../src/components/table/hooks/useColumnsResizing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAW9C,eAAO,MAAM,kBAAkB,GAAI,UAAU,gBAAgB,CAAC,OAAO,CAAC;oBAchC,GAAG;;CAqExC,CAAC"}
1
+ {"version":3,"file":"useColumnsResizing.d.ts","sourceRoot":"","sources":["../../../../src/components/table/hooks/useColumnsResizing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAW9C,eAAO,MAAM,kBAAkB,GAAI,UAAU,gBAAgB,CAAC,OAAO,CAAC;oBAczD,GAAG;;CAqEf,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { AlertCircleIcon as d, File01Icon as s, Xls01Icon as a, HtmlFile01Icon as m, Doc01Icon as e, Pdf01Icon as u, Mp401Icon as p, Zip01Icon as h, Rar01Icon as g } from "@hugeicons/core-free-icons";
2
+ import { AlertCircleIcon as d, File01Icon as s, Xls01Icon as a, HtmlFile01Icon as m, Doc01Icon as e, Pdf01Icon as u, MpFour01Icon as p, Zip01Icon as h, Rar01Icon as g } from "@hugeicons/core-free-icons";
3
3
  import { HugeiconsIcon as E } from "@hugeicons/react";
4
4
  import { ThemeIcon as F, Loader as B } from "@mantine/core";
5
5
  const M = (f, C, c = 16) => {
@@ -1,2 +1,2 @@
1
- export declare const getFileType: (mimeType: string, isSaas?: boolean) => "other" | "presentation" | "documents" | "folder" | "media" | "xlsx" | "docx" | "pptx" | "diagram" | "archieve";
1
+ export declare const getFileType: (mimeType: string, groupByCategory?: boolean) => "other" | "presentation" | "documents" | "folder" | "media" | "xlsx" | "docx" | "pptx" | "diagram" | "archieve";
2
2
  //# sourceMappingURL=getFileType.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFileType.d.ts","sourceRoot":"","sources":["../../src/helpers/getFileType.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,EAAE,SAAQ,OAAc,oHAqCnE,CAAC"}
1
+ {"version":3,"file":"getFileType.d.ts","sourceRoot":"","sources":["../../src/helpers/getFileType.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GACtB,UAAU,MAAM,EAChB,kBAAiB,OAAc,oHAsChC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { appMode } from './isAppMode';
2
+ declare const ALL_CAPABILITIES: readonly ["socialAuth", "forgotPassword", "inviteUsers", "exportPdf", "giphy", "comments", "plans", "shareAccess", "planBadges", "alias"];
3
+ export type PlatformCapability = (typeof ALL_CAPABILITIES)[number];
4
+ export type PlatformInfo = {
5
+ mode: appMode;
6
+ has: (capability: PlatformCapability) => boolean;
7
+ isDesktop: boolean;
8
+ };
9
+ export declare const getPlatformInfo: (mode: appMode) => PlatformInfo;
10
+ export declare const DEFAULT_MODE: appMode;
11
+ export declare const appDesktop: (value: string | boolean) => void;
12
+ export declare const appServer: (value: string | boolean) => void;
13
+ export {};
14
+ //# sourceMappingURL=platform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/helpers/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAQtC,QAAA,MAAM,gBAAgB,2IAWZ,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAQnE,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAK,OAAO,CAAC;IACjD,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,MAAM,OAAO,KAAG,YAO/C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAAgB,CAAC;AAI5C,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,GAAG,OAAO,SAOjD,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,GAAG,OAAO,SAOhD,CAAC"}
@@ -0,0 +1,33 @@
1
+ const t = [
2
+ "socialAuth",
3
+ "forgotPassword",
4
+ "inviteUsers",
5
+ "exportPdf",
6
+ "giphy",
7
+ "comments",
8
+ "plans",
9
+ "shareAccess",
10
+ "planBadges",
11
+ "alias"
12
+ ], a = {
13
+ SAAS: t,
14
+ DESKTOP: [],
15
+ SERVER: t
16
+ }, c = (e) => {
17
+ const s = a[e] ?? [];
18
+ return {
19
+ mode: e,
20
+ has: (r) => s.includes(r),
21
+ isDesktop: e === "DESKTOP"
22
+ };
23
+ }, l = "SAAS", o = "platformModeOverride", n = (e) => {
24
+ e === !0 || e === "true" ? localStorage.setItem(o, "DESKTOP") : localStorage.removeItem(o), window.location.reload();
25
+ }, i = (e) => {
26
+ e === !0 || e === "true" ? localStorage.setItem(o, "SERVER") : localStorage.removeItem(o), window.location.reload();
27
+ };
28
+ export {
29
+ l as DEFAULT_MODE,
30
+ n as appDesktop,
31
+ i as appServer,
32
+ c as getPlatformInfo
33
+ };
@@ -0,0 +1,16 @@
1
+ import type { createBrowserRouter } from 'react-router-dom';
2
+ import { NotificationData } from '@mantine/notifications';
3
+ import { FeatureRating } from '../hooks/useFeatureFeedback';
4
+ declare global {
5
+ interface Window {
6
+ appRoute: ReturnType<typeof createBrowserRouter>;
7
+ }
8
+ }
9
+ export type ShowFeatureFeedbackOptions = Omit<Partial<NotificationData>, 'message' | 'onClose'> & {
10
+ feature: string;
11
+ delay?: number;
12
+ onRate?: (rating: FeatureRating) => void;
13
+ onClose?: () => void;
14
+ };
15
+ export declare function showFeatureFeedback({ feature, title, delay, onRate, onClose, ...notificationProps }: ShowFeatureFeedbackOptions): void;
16
+ //# sourceMappingURL=showFeatureFeedback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showFeatureFeedback.d.ts","sourceRoot":"","sources":["../../src/helpers/showFeatureFeedback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG5D,OAAO,EAAE,gBAAgB,EAAiB,MAAM,wBAAwB,CAAC;AAEzE,OAAO,EACL,aAAa,EAEd,MAAM,6BAA6B,CAAC;AAKrC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,QAAQ,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;KAClD;CACF;AA2DD,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAC3C,OAAO,CAAC,gBAAgB,CAAC,EACzB,SAAS,GAAG,SAAS,CACtB,GAAG;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAClC,OAAO,EACP,KAAK,EACL,KAAK,EACL,MAAM,EACN,OAAO,EACP,GAAG,iBAAiB,EACrB,EAAE,0BAA0B,QA2F5B"}
@@ -0,0 +1,109 @@
1
+ import { jsx as h } from "react/jsx-runtime";
2
+ import { Rating as F } from "@mantine/core";
3
+ import { notifications as d } from "@mantine/notifications";
4
+ import { trackFeatureFeedback as p } from "../hooks/useFeatureFeedback.js";
5
+ import { setFeatureRating as v } from "../lib/layersVisitData.js";
6
+ import O from "./showFeatureFeedback.module.css.js";
7
+ const _ = "feature-feedback-", k = 2e3, M = 12e3;
8
+ function C(e) {
9
+ const t = new MutationObserver(() => {
10
+ document.querySelector('[role="dialog"]') && e();
11
+ });
12
+ return t.observe(document.body, { childList: !0, subtree: !0 }), () => t.disconnect();
13
+ }
14
+ function y(e) {
15
+ const t = window.appRoute;
16
+ if (!t) return null;
17
+ const o = t.state.location.pathname;
18
+ return t.subscribe((s) => {
19
+ s.location.pathname !== o && e();
20
+ });
21
+ }
22
+ const x = [
23
+ "😠",
24
+ // 😠 1 = terrible
25
+ "😟",
26
+ // 😟 2 = bad
27
+ "😐",
28
+ // 😐 3 = okay
29
+ "🙂",
30
+ // 🙂 4 = good
31
+ "🥰"
32
+ // 🥰 5 = great
33
+ ], N = [
34
+ "var(--mantine-color-red-light-hover)",
35
+ "var(--mantine-color-orange-light-hover)",
36
+ "var(--mantine-color-orange-light-hover)",
37
+ "var(--mantine-color-orange-light-hover)",
38
+ "var(--mantine-color-green-light-hover)"
39
+ ], A = {
40
+ width: 40,
41
+ height: 40,
42
+ borderRadius: 100,
43
+ display: "flex",
44
+ alignItems: "center",
45
+ justifyContent: "center",
46
+ fontSize: 24,
47
+ lineHeight: 1
48
+ }, S = (e) => {
49
+ const t = x[e - 1], o = N[e - 1];
50
+ return !t || !o ? null : /* @__PURE__ */ h("div", { style: { ...A, background: o }, children: t });
51
+ };
52
+ function H({
53
+ feature: e,
54
+ title: t,
55
+ delay: o,
56
+ onRate: s,
57
+ onClose: w,
58
+ ...R
59
+ }) {
60
+ const a = `${_}${e}`;
61
+ let c = !1, u = !1, r = null, i = null, l = null;
62
+ const n = () => {
63
+ r && clearTimeout(r), r = null, i?.(), i = null, l?.(), l = null;
64
+ }, g = () => {
65
+ c || (c = !0, u = !0, n(), d.hide(a));
66
+ }, f = () => {
67
+ n(), c = !1, u = !1;
68
+ let b = !1;
69
+ const I = (T) => {
70
+ const m = T;
71
+ b = !0, n(), p(e, m), v(e, m), s?.(m), d.update({
72
+ id: a,
73
+ title: "Thanks!",
74
+ message: "",
75
+ icon: null,
76
+ autoClose: k,
77
+ withCloseButton: !0
78
+ });
79
+ };
80
+ d.show({
81
+ icon: null,
82
+ autoClose: M,
83
+ withCloseButton: !0,
84
+ withBorder: !0,
85
+ ...R,
86
+ title: t,
87
+ classNames: O,
88
+ id: a,
89
+ message: /* @__PURE__ */ h("div", { className: O.rating, children: /* @__PURE__ */ h(
90
+ F,
91
+ {
92
+ emptySymbol: S,
93
+ fullSymbol: S,
94
+ highlightSelectedOnly: !0,
95
+ size: "xl",
96
+ onChange: I,
97
+ styles: { root: { gap: 10, margin: "8px" } }
98
+ }
99
+ ) }),
100
+ onClose: () => {
101
+ n(), !(b || u) && (p(e, 0), v(e, 0), w?.());
102
+ }
103
+ }), i = C(g), l = y(g) ?? null;
104
+ };
105
+ o && o > 0 ? (r = setTimeout(f, o * 1e3), l = y(() => n()) ?? null, i = C(() => n())) : f();
106
+ }
107
+ export {
108
+ H as showFeatureFeedback
109
+ };
@@ -0,0 +1,9 @@
1
+ const o = "_root_1rr11_1", r = "_body_1rr11_13", t = {
2
+ root: o,
3
+ body: r
4
+ };
5
+ export {
6
+ r as body,
7
+ t as default,
8
+ o as root
9
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"showNotifications.d.ts","sourceRoot":"","sources":["../../src/helpers/showNotifications.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAUvD,OAAO,EACL,gBAAgB,EAGjB,MAAM,wBAAwB,CAAC;AAMhC,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,gBAAgB,CAAC;AAiBtD,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CA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