@layers-app/shared 0.3.0 → 0.3.2

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 (142) hide show
  1. package/dist/assets/default-workspace-avatar.jpg.js +4 -0
  2. package/dist/assets/layers-logo-full.svg.js +2 -3
  3. package/dist/assets/layers-logo-full.svg2.js +3 -2
  4. package/dist/assets/layers-logo-icon.svg.js +2 -3
  5. package/dist/assets/layers-logo-icon.svg2.js +3 -2
  6. package/dist/assets/projects/figureA.svg.js +4 -0
  7. package/dist/assets/projects/figureB.svg.js +4 -0
  8. package/dist/assets/qwebchannel.d.ts +15 -0
  9. package/dist/assets/qwebchannel.d.ts.map +1 -0
  10. package/dist/assets/taskPriorities/high.svg.js +5 -0
  11. package/dist/assets/taskPriorities/low.svg.js +5 -0
  12. package/dist/assets/taskPriorities/none.svg.js +5 -0
  13. package/dist/assets/taskPriorities/normal.svg.js +5 -0
  14. package/dist/assets/taskPriorities/urgent.svg.js +5 -0
  15. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.d.ts +3 -0
  16. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.d.ts.map +1 -0
  17. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.js +69 -0
  18. package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +27 -0
  19. package/dist/components/AnimatedFigurePage/types.d.ts +15 -0
  20. package/dist/components/AnimatedFigurePage/types.d.ts.map +1 -0
  21. package/dist/components/AnimatedFigurePage/useParallax.d.ts +6 -0
  22. package/dist/components/AnimatedFigurePage/useParallax.d.ts.map +1 -0
  23. package/dist/components/AnimatedFigurePage/useParallax.js +29 -0
  24. package/dist/components/AppContainer/AppContainer.d.ts +1 -1
  25. package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
  26. package/dist/components/AppContainer/AppContainer.js +37 -36
  27. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  28. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +80 -45
  29. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
  30. package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +60 -69
  31. package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
  32. package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
  33. package/dist/components/AppContainer/hooks/useAppContainer.js +57 -51
  34. package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
  35. package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +3 -1
  36. package/dist/components/AppContainer/types.d.ts +3 -0
  37. package/dist/components/AppContainer/types.d.ts.map +1 -1
  38. package/dist/components/ColorPicker/ColorPicker.d.ts +9 -1
  39. package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  40. package/dist/components/ColorPicker/ColorPicker.js +88 -74
  41. package/dist/components/ColorPicker/ColorPicker.module.css.js +31 -0
  42. package/dist/components/ColorPicker/ColorPickerList.d.ts +6 -0
  43. package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -0
  44. package/dist/components/ColorPicker/ColorPickerList.js +134 -0
  45. package/dist/components/ColorPicker/ColorPickerPopover.d.ts +6 -6
  46. package/dist/components/ColorPicker/ColorPickerPopover.d.ts.map +1 -1
  47. package/dist/components/ColorPicker/ColorPickerPopover.js +29 -31
  48. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts +13 -0
  49. package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -0
  50. package/dist/components/ColorPicker/ColorPickerToolbar.js +132 -0
  51. package/dist/components/ColorPicker/icons.d.ts +11 -0
  52. package/dist/components/ColorPicker/icons.d.ts.map +1 -0
  53. package/dist/components/ColorPicker/icons.js +71 -0
  54. package/dist/components/ColorPicker/types.d.ts +49 -0
  55. package/dist/components/ColorPicker/types.d.ts.map +1 -0
  56. package/dist/components/ColorPicker/types.js +10 -0
  57. package/dist/components/ColorPicker/useRecentColors.d.ts +13 -0
  58. package/dist/components/ColorPicker/useRecentColors.d.ts.map +1 -0
  59. package/dist/components/ColorPicker/useRecentColors.js +39 -0
  60. package/dist/components/CommentComposer/index.d.ts.map +1 -1
  61. package/dist/components/CommentComposer/index.js +115 -111
  62. package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
  63. package/dist/components/EmojiPicker/EmojiPanel.js +12 -10
  64. package/dist/components/EmojiPicker/EmojiPicker.d.ts +3 -1
  65. package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  66. package/dist/components/EmojiPicker/EmojiPicker.js +49 -46
  67. package/dist/components/EmojiPicker/IconsPanel.d.ts +2 -1
  68. package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
  69. package/dist/components/EmojiPicker/IconsPanel.js +47 -45
  70. package/dist/components/EmojiPicker/custom-icons/customIcons.d.ts.map +1 -1
  71. package/dist/components/EmojiPicker/custom-icons/customIcons.js +66 -31
  72. package/dist/components/EntityIcon.d.ts +3 -3
  73. package/dist/components/EntityIcon.d.ts.map +1 -1
  74. package/dist/components/EntityIcon.js +59 -35
  75. package/dist/components/EntityTitle/EntityTitle.d.ts +1 -1
  76. package/dist/components/EntityTitle/EntityTitle.d.ts.map +1 -1
  77. package/dist/components/EntityTitle/EntityTitle.js +34 -34
  78. package/dist/components/EntityTitle/EntityTitle.module.css.js +1 -1
  79. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  80. package/dist/components/FilePicker/FilePicker.js +111 -123
  81. package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
  82. package/dist/components/FilePicker/FilePickerUpload.js +41 -39
  83. package/dist/components/FormViewer/components/fields/UploadField/UploadField.d.ts.map +1 -1
  84. package/dist/components/FormViewer/components/fields/UploadField/UploadField.js +34 -33
  85. package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +3 -3
  86. package/dist/components/Logotype.d.ts +2 -1
  87. package/dist/components/Logotype.d.ts.map +1 -1
  88. package/dist/components/Logotype.js +58 -49
  89. package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
  90. package/dist/components/NavMenu/components/NavMenuItem.js +122 -107
  91. package/dist/components/NavMenu/types.d.ts +1 -0
  92. package/dist/components/NavMenu/types.d.ts.map +1 -1
  93. package/dist/components/ProjectIcon/ProjectIcon.js +13 -13
  94. package/dist/components/TreeIndent/TreeIndent.d.ts +9 -0
  95. package/dist/components/TreeIndent/TreeIndent.d.ts.map +1 -0
  96. package/dist/components/TreeIndent/TreeIndent.js +15 -0
  97. package/dist/components/TreeIndent/TreeIndent.module.css.js +11 -0
  98. package/dist/components/TreeIndent/index.d.ts +2 -0
  99. package/dist/components/TreeIndent/index.d.ts.map +1 -0
  100. package/dist/components/WorkspaceAvatar/WorkspaceAvatar.js +11 -11
  101. package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
  102. package/dist/components/WorkspaceMenu/WorkspaceMenu.js +97 -101
  103. package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
  104. package/dist/config/brand.d.ts +1 -0
  105. package/dist/config/brand.d.ts.map +1 -1
  106. package/dist/config/brand.js +42 -34
  107. package/dist/config/envConfig.d.ts +40 -0
  108. package/dist/config/envConfig.d.ts.map +1 -1
  109. package/dist/config/envConfig.js +29 -10
  110. package/dist/constants.d.ts.map +1 -1
  111. package/dist/constants.js +15 -4
  112. package/dist/helpers/getFileIcons.d.ts.map +1 -1
  113. package/dist/helpers/getFileIcons.js +34 -29
  114. package/dist/helpers/getFileType.d.ts +1 -1
  115. package/dist/helpers/getFileType.d.ts.map +1 -1
  116. package/dist/helpers/getFileType.js +3 -3
  117. package/dist/helpers/hotjar.d.ts.map +1 -1
  118. package/dist/helpers/hotjar.js +11 -7
  119. package/dist/helpers/platform.js +4 -4
  120. package/dist/helpers/showNotifications.d.ts +3 -0
  121. package/dist/helpers/showNotifications.d.ts.map +1 -1
  122. package/dist/helpers/showNotifications.js +79 -44
  123. package/dist/hooks/useDateFnsLocale.d.ts +2 -0
  124. package/dist/hooks/useDateFnsLocale.d.ts.map +1 -1
  125. package/dist/hooks/useDateFnsLocale.js +9 -8
  126. package/dist/hooks/useDateUtils.d.ts.map +1 -1
  127. package/dist/hooks/useDateUtils.js +19 -19
  128. package/dist/hooks/useFormatDistance.d.ts.map +1 -1
  129. package/dist/hooks/useFormatDistance.js +6 -6
  130. package/dist/hooks/useNumberQueryParam.d.ts +1 -1
  131. package/dist/hooks/useNumberQueryParam.d.ts.map +1 -1
  132. package/dist/index.css +1 -1
  133. package/dist/index.d.ts +8 -0
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +516 -494
  136. package/dist/lang/locales/ui_en.json.js +7 -7
  137. package/dist/lang/locales/ui_es.json.js +1 -1
  138. package/dist/lang/locales/ui_ru.json.js +11 -11
  139. package/dist/utils/formatStorage.d.ts +9 -0
  140. package/dist/utils/formatStorage.d.ts.map +1 -1
  141. package/dist/utils/formatStorage.js +14 -10
  142. package/package.json +1 -1
@@ -16,14 +16,14 @@ export declare const useFormGlobalTheme: ({ innerId }: {
16
16
  grape?: import("@mantine/core").MantineColorsTuple | undefined;
17
17
  green?: import("@mantine/core").MantineColorsTuple | undefined;
18
18
  orange?: import("@mantine/core").MantineColorsTuple | undefined;
19
- gray?: import("@mantine/core").MantineColorsTuple | undefined;
20
- cyan?: import("@mantine/core").MantineColorsTuple | undefined;
19
+ teal?: import("@mantine/core").MantineColorsTuple | undefined;
21
20
  yellow?: import("@mantine/core").MantineColorsTuple | undefined;
22
21
  red?: import("@mantine/core").MantineColorsTuple | undefined;
23
22
  dark?: import("@mantine/core").MantineColorsTuple | undefined;
23
+ gray?: import("@mantine/core").MantineColorsTuple | undefined;
24
24
  pink?: import("@mantine/core").MantineColorsTuple | undefined;
25
+ cyan?: import("@mantine/core").MantineColorsTuple | undefined;
25
26
  lime?: import("@mantine/core").MantineColorsTuple | undefined;
26
- teal?: import("@mantine/core").MantineColorsTuple | undefined;
27
27
  } | undefined;
28
28
  primaryShade?: import("@mantine/core").MantineColorShade | {
29
29
  light?: import("@mantine/core").MantineColorShade | undefined;
@@ -3,11 +3,12 @@ export declare const LayersLogoIcon: ({ color: _color, fontSize: _fontSize, widt
3
3
  alt?: string;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
5
5
  export declare const LayersLogoCopyright: (props: React.SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
6
- export declare const Logotype: ({ minified, isLink, to, variant, isDesktop, ...props }: FlexProps & {
6
+ export declare const Logotype: ({ minified, isLink, to, variant, isDesktop, forceDark, ...props }: FlexProps & {
7
7
  minified?: boolean;
8
8
  isLink?: boolean;
9
9
  to?: string;
10
10
  variant?: "default" | "copyright";
11
11
  isDesktop?: boolean;
12
+ forceDark?: boolean;
12
13
  }) => import("react/jsx-runtime").JSX.Element;
13
14
  //# sourceMappingURL=Logotype.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Logotype.d.ts","sourceRoot":"","sources":["../../src/components/Logotype.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,SAAS,EAAQ,MAAM,eAAe,CAAC;AA4CtD,eAAO,MAAM,cAAc,GAAI,iEAM5B,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,4CAOlD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,OAAO,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,4CAKvE,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,wDAOtB,SAAS,GAAG;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,4CAgDA,CAAC"}
1
+ {"version":3,"file":"Logotype.d.ts","sourceRoot":"","sources":["../../src/components/Logotype.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,SAAS,EAAQ,MAAM,eAAe,CAAC;AAmCtD,eAAO,MAAM,cAAc,GAAI,iEAM5B,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,4CAelD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,OAAO,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,4CAavE,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,mEAQtB,SAAS,GAAG;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,4CAsDA,CAAC"}
@@ -1,64 +1,73 @@
1
- import { jsx as o, jsxs as p } from "react/jsx-runtime";
2
- import { Link as h } from "react-router-dom";
3
- import { Flex as m, Text as y } from "@mantine/core";
4
- import { brand as t } from "../config/brand.js";
1
+ import { jsx as t, jsxs as k } from "react/jsx-runtime";
2
+ import { Link as b } from "react-router-dom";
3
+ import { Flex as g, Text as I } from "@mantine/core";
4
+ import { brand as o } from "../config/brand.js";
5
5
  import { useIsDarkTheme as L } from "../helpers/themeUtils.js";
6
- const f = t.LogoIcon, I = t.LogoCopyright, u = ({
7
- src: r,
8
- alt: s,
9
- size: n,
10
- style: e
11
- }) => /* @__PURE__ */ o(
12
- "img",
13
- {
14
- src: r,
15
- alt: s,
16
- style: {
17
- width: n,
18
- height: n,
19
- objectFit: "contain",
20
- display: "block",
21
- ...e
6
+ const u = o.LogoIcon, w = o.LogoCopyright, h = ({
7
+ size: r = 24,
8
+ isDark: i
9
+ }) => {
10
+ const n = o.customIconDarkUrl, c = o.customIconUrl, e = i && n ? n : c;
11
+ return /* @__PURE__ */ t("span", { style: { display: "block", width: r, height: r, flexShrink: 0 }, children: e ? /* @__PURE__ */ t(
12
+ "img",
13
+ {
14
+ src: e,
15
+ alt: o.name,
16
+ style: { width: "100%", height: "100%", objectFit: "contain", display: "block" }
22
17
  }
23
- }
24
- ), g = ({ size: r = 24, isDark: s }) => {
25
- const n = t.customIconDarkUrl, e = t.customIconUrl, c = s && n ? n : e;
26
- return c ? /* @__PURE__ */ o(u, { src: c, alt: t.name, size: r }) : /* @__PURE__ */ o(f, { width: r, height: r });
27
- }, S = ({
18
+ ) : /* @__PURE__ */ t(u, { width: "100%", height: "100%" }) });
19
+ }, F = ({
28
20
  color: r,
29
- fontSize: s,
21
+ fontSize: i,
30
22
  width: n,
31
- height: e,
32
- ...c
23
+ height: c,
24
+ ...e
33
25
  }) => {
34
- const l = typeof n == "number" ? n : typeof e == "number" ? e : 24;
35
- return t.customIconUrl ? /* @__PURE__ */ o(u, { src: t.customIconUrl, alt: t.name, size: l, style: c.style }) : /* @__PURE__ */ o(f, { width: n, height: e, ...c });
36
- }, j = (r) => t.customIconUrl ? /* @__PURE__ */ o(u, { src: t.customIconUrl, alt: t.name, size: 18 }) : /* @__PURE__ */ o(I, { ...r }), C = ({
26
+ const l = typeof n == "number" ? n : typeof c == "number" ? c : 24;
27
+ return o.customIconUrl ? /* @__PURE__ */ t("span", { style: { display: "block", width: l, height: l, flexShrink: 0, ...e.style }, children: /* @__PURE__ */ t(
28
+ "img",
29
+ {
30
+ src: o.customIconUrl,
31
+ alt: o.name,
32
+ style: { width: "100%", height: "100%", objectFit: "contain", display: "block" }
33
+ }
34
+ ) }) : /* @__PURE__ */ t(u, { width: n, height: c, ...e });
35
+ }, C = (r) => o.customIconUrl ? /* @__PURE__ */ t("span", { style: { display: "block", width: 18, height: 18, flexShrink: 0 }, children: /* @__PURE__ */ t(
36
+ "img",
37
+ {
38
+ src: o.customIconUrl,
39
+ alt: o.name,
40
+ style: { width: "100%", height: "100%", objectFit: "contain", display: "block" }
41
+ }
42
+ ) }) : /* @__PURE__ */ t(w, { ...r }), v = ({
37
43
  minified: r,
38
- isLink: s = !0,
44
+ isLink: i = !0,
39
45
  to: n = "/",
40
- variant: e = "default",
41
- isDesktop: c,
42
- ...l
46
+ variant: c = "default",
47
+ isDesktop: e,
48
+ forceDark: l,
49
+ ...m
43
50
  }) => {
44
- const i = L(), a = /* @__PURE__ */ o(
45
- m,
51
+ const y = L(), s = l ?? y, d = () => r ? /* @__PURE__ */ t(h, { size: e ? "100%" : 40, isDark: s }) : c === "copyright" ? /* @__PURE__ */ t(h, { size: 18, isDark: s }) : /* @__PURE__ */ k(g, { align: "center", gap: 4, children: [
52
+ /* @__PURE__ */ t(h, { size: 24, isDark: s }),
53
+ /* @__PURE__ */ t(I, { fw: 600, fz: 16, lh: 1, style: { whiteSpace: "nowrap" }, children: o.name })
54
+ ] }), p = () => r ? e ? "100%" : 40 : c === "copyright" ? 18 : "auto", f = () => {
55
+ if (r && e) return "100%";
56
+ }, a = /* @__PURE__ */ t(
57
+ g,
46
58
  {
47
- component: "span",
48
- w: r ? c ? 48 : 40 : e === "copyright" ? 18 : "auto",
49
- c: i ? "white" : "black",
59
+ w: p(),
60
+ h: f(),
61
+ c: s ? "white" : "black",
50
62
  align: "center",
51
- ...l,
52
- children: r ? /* @__PURE__ */ o(g, { size: c ? 32 : 24, isDark: i }) : e === "copyright" ? /* @__PURE__ */ o(g, { size: 18, isDark: i }) : /* @__PURE__ */ p(m, { align: "center", gap: 4, children: [
53
- /* @__PURE__ */ o(g, { size: 24, isDark: i }),
54
- /* @__PURE__ */ o(y, { fw: 600, fz: 16, lh: 1, style: { whiteSpace: "nowrap" }, children: t.name })
55
- ] })
63
+ ...m,
64
+ children: d()
56
65
  }
57
66
  );
58
- return s ? /* @__PURE__ */ o(h, { to: n, children: a }) : a;
67
+ return i ? /* @__PURE__ */ t(b, { to: n, children: a }) : a;
59
68
  };
60
69
  export {
61
- j as LayersLogoCopyright,
62
- S as LayersLogoIcon,
63
- C as Logotype
70
+ C as LayersLogoCopyright,
71
+ F as LayersLogoIcon,
72
+ v as Logotype
64
73
  };
@@ -1 +1 @@
1
- {"version":3,"file":"NavMenuItem.d.ts","sourceRoot":"","sources":["../../../../src/components/NavMenu/components/NavMenuItem.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKhD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,oBAAoB,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,WAAW,oFACwB,gBAAgB,6CAgB/D,CAAC;AA0QF,eAAO,MAAM,eAAe,GAAI,0CAI7B;IACD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,MAAM,CAAC;CAC9B,4CAiCA,CAAC"}
1
+ {"version":3,"file":"NavMenuItem.d.ts","sourceRoot":"","sources":["../../../../src/components/NavMenu/components/NavMenuItem.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKhD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,oBAAoB,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,WAAW,oFACwB,gBAAgB,6CAgB/D,CAAC;AA8RF,eAAO,MAAM,eAAe,GAAI,0CAI7B;IACD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,MAAM,CAAC;CAC9B,4CAiCA,CAAC"}
@@ -1,103 +1,105 @@
1
- import { jsx as t, jsxs as u } from "react/jsx-runtime";
2
- import { memo as f, useRef as k, useEffect as O, useMemo as v } from "react";
3
- import { useTranslation as g } from "react-i18next";
4
- import { NavLink as E } from "react-router-dom";
5
- import { MoreHorizontalIcon as M, ArrowRight01Icon as P } from "@hugeicons/core-free-icons";
6
- import { HugeiconsIcon as C } from "@hugeicons/react";
7
- import { Flex as h, Loader as I, Text as N, FocusTrap as R, Tooltip as w, Center as j } from "@mantine/core";
8
- import { useForm as z } from "@mantine/form";
9
- import { useClickOutside as A } from "@mantine/hooks";
10
- import { useAsyncStatus as D } from "../../../hooks/useAsyncStatus.js";
11
- import { useMenu as T } from "../../../hooks/useMenu.js";
12
- import { appContainerStore as F } from "../../AppContainer/hooks/useAppContainerStore.js";
13
- import { EmojiPicker as L } from "../../EmojiPicker/EmojiPicker.js";
14
- import { EntityIcon as b } from "../../EntityIcon.js";
15
- import { NavMenu as $ } from "../NavMenu.js";
16
- import { useNavMenuStore as m } from "../store.js";
17
- import { NavMenuActionIcon as B } from "./NavMenuActionIcon.js";
18
- import s from "../NavMenu.module.css.js";
19
- const se = f(
20
- ({ item: e, ignoreDepth: i, disableToggleOnClick: a }) => {
21
- const { useStore: r } = m(), o = r((c) => c.editId === e.id);
22
- return /* @__PURE__ */ t(
23
- x,
1
+ import { jsx as o, jsxs as h } from "react/jsx-runtime";
2
+ import { memo as m, useRef as k, useEffect as E, useState as M, useMemo as P } from "react";
3
+ import { useTranslation as y } from "react-i18next";
4
+ import { NavLink as A } from "react-router-dom";
5
+ import { MoreHorizontalIcon as D, ArrowRight01Icon as z } from "@hugeicons/core-free-icons";
6
+ import { HugeiconsIcon as N } from "@hugeicons/react";
7
+ import { Flex as f, Loader as x, Text as O, FocusTrap as R, Tooltip as S, Center as j } from "@mantine/core";
8
+ import { useForm as F } from "@mantine/form";
9
+ import { useClickOutside as L } from "@mantine/hooks";
10
+ import { useAsyncStatus as T } from "../../../hooks/useAsyncStatus.js";
11
+ import { useMenu as V } from "../../../hooks/useMenu.js";
12
+ import { appContainerStore as $ } from "../../AppContainer/hooks/useAppContainerStore.js";
13
+ import { ColorPickerPopover as B } from "../../ColorPicker/ColorPickerPopover.js";
14
+ import { EmojiPicker as H } from "../../EmojiPicker/EmojiPicker.js";
15
+ import { EntityIcon as v } from "../../EntityIcon.js";
16
+ import { IconEntity as C } from "../../ProjectIcon/ProjectIcon.js";
17
+ import { NavMenu as I } from "../NavMenu.js";
18
+ import { useNavMenuStore as g } from "../store.js";
19
+ import { NavMenuActionIcon as W } from "./NavMenuActionIcon.js";
20
+ import c from "../NavMenu.module.css.js";
21
+ const ue = m(
22
+ ({ item: e, ignoreDepth: i, disableToggleOnClick: r }) => {
23
+ const { useStore: s } = g(), n = s((l) => l.editId === e.id);
24
+ return /* @__PURE__ */ o(
25
+ b,
24
26
  {
25
27
  depth: i ? void 0 : e.depth,
26
28
  testId: e.testId,
27
- children: o ? /* @__PURE__ */ t(H, { item: e }) : /* @__PURE__ */ t(V, { item: e, disableToggleOnClick: a })
29
+ children: n ? /* @__PURE__ */ o(q, { item: e }) : /* @__PURE__ */ o(_, { item: e, disableToggleOnClick: r })
28
30
  }
29
31
  );
30
32
  }
31
- ), V = f(
33
+ ), _ = m(
32
34
  ({
33
35
  item: e,
34
36
  disableToggleOnClick: i
35
37
  }) => {
36
- const { api: a, useStore: r } = m(), o = r((S) => S.props.onClick), { isMobile: c } = T(), { t: l } = g("appContainer"), p = () => {
37
- i || (o ? o(e) : e.hasChildren && a.toggleOpened(e));
38
- }, d = e.data?.isReadOnly, n = e.href ? /* @__PURE__ */ t(
39
- E,
38
+ const { api: r, useStore: s } = g(), n = s((a) => a.props.onClick), { isMobile: l } = V(), { t: p } = y("appContainer"), u = () => {
39
+ i || (n ? n(e) : e.hasChildren && r.toggleOpened(e));
40
+ }, d = e.data?.isReadOnly, t = e.href ? /* @__PURE__ */ o(
41
+ A,
40
42
  {
41
43
  to: e.href,
42
- className: s.item,
44
+ className: c.item,
43
45
  "data-active": e.active,
44
46
  "data-has-children": e.hasChildren,
45
47
  "data-read-only": d,
46
48
  onClick: d ? void 0 : () => {
47
- c && !e.hasChildren && F.api.closeToolbar();
49
+ l && !e.hasChildren && $.api.closeToolbar();
48
50
  },
49
- children: /* @__PURE__ */ t(y, { item: e })
51
+ children: /* @__PURE__ */ o(w, { item: e })
50
52
  }
51
- ) : /* @__PURE__ */ t(
53
+ ) : /* @__PURE__ */ o(
52
54
  "div",
53
55
  {
54
- className: s.item,
56
+ className: c.item,
55
57
  "data-active": e.active,
56
58
  "data-has-children": e.hasChildren,
57
59
  "data-read-only": d,
58
- onClick: d ? void 0 : p,
59
- children: /* @__PURE__ */ t(y, { item: e })
60
+ onClick: d ? void 0 : u,
61
+ children: /* @__PURE__ */ o(w, { item: e })
60
62
  }
61
63
  );
62
- return d ? /* @__PURE__ */ t(w, { label: l("readOnlyAccess"), position: "right", withArrow: !0, children: n }) : n;
64
+ return d ? /* @__PURE__ */ o(S, { label: p("readOnlyAccess"), position: "right", withArrow: !0, children: t }) : t;
63
65
  }
64
- ), y = f(({ item: e }) => {
65
- const { t: i } = g(), { useStore: a, api: r } = m(), o = a((n) => n.opened.includes(e.id)), c = a((n) => n.loading[e.id]), l = v(
66
- () => ({ ...e.data, isOpen: o }),
67
- [o, e.data]
68
- ), p = e.data?.isReadOnly, d = p ? 0.3 : void 0;
69
- return /* @__PURE__ */ u(h, { gap: 4, h: "100%", flex: 1, miw: 0, justify: "space-between", children: [
70
- /* @__PURE__ */ u(h, { gap: 4, miw: 0, flex: 1, children: [
71
- c ? /* @__PURE__ */ t(j, { w: 20, h: 20, children: /* @__PURE__ */ t(I, { size: 16 }) }) : e.hasChildren && !p && /* @__PURE__ */ t(
72
- B,
66
+ ), w = m(({ item: e }) => {
67
+ const { t: i } = y(), { useStore: r, api: s } = g(), n = r((t) => t.opened.includes(e.id)), l = r((t) => t.loading[e.id]), p = P(
68
+ () => ({ ...e.data, isOpen: n }),
69
+ [n, e.data]
70
+ ), u = e.data?.isReadOnly, d = u ? 0.3 : void 0;
71
+ return /* @__PURE__ */ h(f, { gap: 4, h: "100%", flex: 1, miw: 0, justify: "space-between", children: [
72
+ /* @__PURE__ */ h(f, { gap: 4, miw: 0, flex: 1, children: [
73
+ l ? /* @__PURE__ */ o(j, { w: 20, h: 20, children: /* @__PURE__ */ o(x, { size: 16 }) }) : e.hasChildren && !u && /* @__PURE__ */ o(
74
+ W,
73
75
  {
74
- className: s.chevron,
76
+ className: c.chevron,
75
77
  "data-cy": e.testId ? `${e.testId}-expand` : void 0,
76
- onClick: (n) => {
77
- n.preventDefault(), n.stopPropagation(), r.toggleOpened(e);
78
+ onClick: (t) => {
79
+ t.preventDefault(), t.stopPropagation(), s.toggleOpened(e);
78
80
  },
79
- children: /* @__PURE__ */ t(
80
- C,
81
+ children: /* @__PURE__ */ o(
82
+ N,
81
83
  {
82
- icon: P,
84
+ icon: z,
83
85
  size: 16,
84
86
  style: {
85
- transform: `rotate(${o ? 90 : 0}deg)`,
87
+ transform: `rotate(${n ? 90 : 0}deg)`,
86
88
  transition: "transform 0.1s ease-in-out"
87
89
  }
88
90
  }
89
91
  )
90
92
  }
91
93
  ),
92
- /* @__PURE__ */ t("div", { className: s.icon, style: { opacity: d }, children: /* @__PURE__ */ t(b, { item: l }) }),
93
- /* @__PURE__ */ t(
94
- w,
94
+ /* @__PURE__ */ o("div", { className: c.icon, style: { opacity: d }, children: /* @__PURE__ */ o(v, { item: p }) }),
95
+ /* @__PURE__ */ o(
96
+ S,
95
97
  {
96
98
  disabled: e.title.length < 25,
97
99
  label: e.title || i("noName"),
98
100
  openDelay: 400,
99
- children: /* @__PURE__ */ t(
100
- N,
101
+ children: /* @__PURE__ */ o(
102
+ O,
101
103
  {
102
104
  flex: 1,
103
105
  truncate: !0,
@@ -107,8 +109,8 @@ const se = f(
107
109
  miw: 0,
108
110
  c: "var(--mantine-color-text)",
109
111
  "data-cy": e.testId ? `${e.testId}-title` : void 0,
110
- onDoubleClick: (n) => {
111
- a.getState().props.onEdit && !e?.isDisabledEditByDoubleClick && (n.preventDefault(), n.stopPropagation(), r.startEditing(e.id));
112
+ onDoubleClick: (t) => {
113
+ r.getState().props.onEdit && !e?.isDisabledEditByDoubleClick && (t.preventDefault(), t.stopPropagation(), s.startEditing(e.id));
112
114
  },
113
115
  children: e.title || i("noName")
114
116
  }
@@ -118,38 +120,51 @@ const se = f(
118
120
  ] }),
119
121
  e.rightSection
120
122
  ] });
121
- }), H = f(({ item: e }) => {
122
- const { api: i, useStore: a } = m(), r = k(null), o = z({
123
+ }), q = m(({ item: e }) => {
124
+ const { api: i, useStore: r } = g(), s = k(null), n = F({
123
125
  initialValues: {
124
126
  name: e.title,
125
127
  icon: e.data?.icon || ""
126
128
  }
127
- }), c = (n) => {
129
+ }), l = (a) => {
128
130
  i.handleEdit({
129
131
  id: e.id,
130
- name: n.name ?? "",
131
- icon: n.icon ?? ""
132
+ name: a.name ?? "",
133
+ icon: a.icon ?? ""
132
134
  }), i.stopEditing();
133
- }, l = A(() => {
134
- c(o.getValues());
135
+ }, p = L(() => {
136
+ n.isDirty() ? l(n.getValues()) : i.stopEditing();
135
137
  });
136
- O(() => {
137
- r.current && r.current.select();
138
+ E(() => {
139
+ s.current && s.current.select();
138
140
  }, []);
139
- const p = v(
140
- () => ["SPRINT", "PROJECT"].includes(e.data?.type || ""),
141
- [e.data?.type]
142
- ), d = a((n) => n.opened.includes(e.id));
143
- return /* @__PURE__ */ t(
141
+ const u = r((a) => a.opened.includes(e.id)), [d, t] = M(!1);
142
+ return /* @__PURE__ */ o(
144
143
  "form",
145
144
  {
146
- onSubmit: o.onSubmit(c),
147
- className: s.item,
148
- ref: l,
145
+ onSubmit: n.onSubmit(l),
146
+ className: c.item,
147
+ ref: p,
149
148
  "data-editing": !0,
150
- children: /* @__PURE__ */ u(h, { gap: 4, h: "100%", flex: 1, miw: 0, justify: "space-between", children: [
151
- /* @__PURE__ */ t("div", { className: s.icon, children: /* @__PURE__ */ t(
152
- L,
149
+ children: /* @__PURE__ */ h(f, { gap: 4, h: "100%", flex: 1, miw: 0, justify: "space-between", children: [
150
+ /* @__PURE__ */ o("div", { className: c.icon, children: e.colorPickerOnly ? /* @__PURE__ */ o(
151
+ B,
152
+ {
153
+ value: C.parse(n.values.icon)?.color,
154
+ onChange: (a) => n.setFieldValue("icon", C.stringify({ color: a })),
155
+ withinPortal: !1,
156
+ floatingStrategy: "fixed",
157
+ opened: d,
158
+ setOpened: t,
159
+ children: /* @__PURE__ */ o(I.ActionIcon, { onClick: () => t((a) => !a), children: /* @__PURE__ */ o(
160
+ v,
161
+ {
162
+ item: { ...e.data, isOpen: u, icon: n.values.icon }
163
+ }
164
+ ) })
165
+ }
166
+ ) : /* @__PURE__ */ o(
167
+ H,
153
168
  {
154
169
  showIcons: !0,
155
170
  showColors: !0,
@@ -157,68 +172,68 @@ const se = f(
157
172
  popoverProps: {
158
173
  floatingStrategy: "fixed"
159
174
  },
160
- value: o.values.icon,
161
- onChange: (n) => o.setFieldValue("icon", n),
162
- children: /* @__PURE__ */ t($.ActionIcon, { disabled: p, children: /* @__PURE__ */ t(
163
- b,
175
+ value: n.values.icon,
176
+ onChange: (a) => n.setFieldValue("icon", a),
177
+ children: /* @__PURE__ */ o(I.ActionIcon, { children: /* @__PURE__ */ o(
178
+ v,
164
179
  {
165
- item: { ...e.data, isOpen: d, icon: o.values.icon }
180
+ item: { ...e.data, isOpen: u, icon: n.values.icon }
166
181
  }
167
182
  ) })
168
183
  }
169
184
  ) }),
170
- /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(
185
+ /* @__PURE__ */ o(R, { children: /* @__PURE__ */ o(
171
186
  "input",
172
187
  {
173
- ref: r,
174
- className: s.editInput,
188
+ ref: s,
189
+ className: c.editInput,
175
190
  "data-cy": e.testId ? `${e.testId}-rename-input` : void 0,
176
- ...o.getInputProps("name"),
191
+ ...n.getInputProps("name"),
177
192
  maxLength: 255,
178
- onFocus: (n) => n.target.select()
193
+ onFocus: (a) => a.target.select()
179
194
  }
180
195
  ) })
181
196
  ] })
182
197
  }
183
198
  );
184
- }), x = f(
199
+ }), b = m(
185
200
  ({
186
201
  depth: e = 0,
187
202
  children: i,
188
- testId: a
189
- }) => /* @__PURE__ */ u(
203
+ testId: r
204
+ }) => /* @__PURE__ */ h(
190
205
  "div",
191
206
  {
192
- className: s.itemContainer,
193
- "data-cy": a,
207
+ className: c.itemContainer,
208
+ "data-cy": r,
194
209
  style: {
195
210
  "--depth": e
196
211
  },
197
212
  children: [
198
- Array.from({ length: e }).map((r, o) => /* @__PURE__ */ t("div", { className: s.depthBox }, o)),
213
+ Array.from({ length: e }).map((s, n) => /* @__PURE__ */ o("div", { className: c.depthBox }, n)),
199
214
  i
200
215
  ]
201
216
  }
202
217
  )
203
- ), ce = ({
218
+ ), he = ({
204
219
  depth: e,
205
220
  itemId: i,
206
- currentChildrenCount: a
221
+ currentChildrenCount: r
207
222
  }) => {
208
- const { t: r } = g("appContainer"), { api: o } = m(), { isLoading: c, onSubmit: l } = D();
209
- return /* @__PURE__ */ t(x, { depth: e, children: /* @__PURE__ */ t(
223
+ const { t: s } = y("appContainer"), { api: n } = g(), { isLoading: l, onSubmit: p } = T();
224
+ return /* @__PURE__ */ o(b, { depth: e, children: /* @__PURE__ */ o(
210
225
  "div",
211
226
  {
212
- className: s.item,
213
- onClick: () => l(() => o.loadMore({ itemId: i, currentChildrenCount: a })),
214
- children: /* @__PURE__ */ t(h, { gap: 4, h: "100%", flex: 1, miw: 0, justify: "space-between", children: /* @__PURE__ */ u(h, { gap: 4, miw: 0, flex: 1, c: "gray", children: [
215
- /* @__PURE__ */ t("div", { className: s.icon, children: c ? /* @__PURE__ */ t(I, { size: 16 }) : /* @__PURE__ */ t(C, { icon: M, size: 16 }) }),
216
- /* @__PURE__ */ t(N, { flex: 1, truncate: !0, size: "sm", fw: 500, miw: 0, children: r("loadMore") })
227
+ className: c.item,
228
+ onClick: () => p(() => n.loadMore({ itemId: i, currentChildrenCount: r })),
229
+ children: /* @__PURE__ */ o(f, { gap: 4, h: "100%", flex: 1, miw: 0, justify: "space-between", children: /* @__PURE__ */ h(f, { gap: 4, miw: 0, flex: 1, c: "gray", children: [
230
+ /* @__PURE__ */ o("div", { className: c.icon, children: l ? /* @__PURE__ */ o(x, { size: 16 }) : /* @__PURE__ */ o(N, { icon: D, size: 16 }) }),
231
+ /* @__PURE__ */ o(O, { flex: 1, truncate: !0, size: "sm", fw: 500, miw: 0, children: s("loadMore") })
217
232
  ] }) })
218
233
  }
219
234
  ) });
220
235
  };
221
236
  export {
222
- se as NavMenuItem,
223
- ce as NavMenuLoadMore
237
+ ue as NavMenuItem,
238
+ he as NavMenuLoadMore
224
239
  };
@@ -20,6 +20,7 @@ export type NavMenuItemDef<DATA = NavMenuItemData> = {
20
20
  data?: DATA;
21
21
  isDisabledEditByDoubleClick?: boolean;
22
22
  testId?: string;
23
+ colorPickerOnly?: boolean;
23
24
  };
24
25
  export type ExpandNavMenuItemDef<DATA = NavMenuItemData> = NavMenuItemDef<DATA> & {
25
26
  depth: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/NavMenu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,IAAI,GAAG,eAAe,IAAI;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,IAAI,GAAG,eAAe,IACrD,cAAc,CAAC,IAAI,CAAC,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEJ,MAAM,MAAM,kBAAkB,CAAC,IAAI,GAAG,eAAe,IAAI,CAAC,CAAC,EAAE;IAC3D,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACjC,QAAQ,EAAE,0BAA0B,CAAC;CACtC,KAAK,IAAI,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,MAAM,CAAC;CAC9B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEpB,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/NavMenu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,IAAI,GAAG,eAAe,IAAI;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,IAAI,GAAG,eAAe,IACrD,cAAc,CAAC,IAAI,CAAC,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEJ,MAAM,MAAM,kBAAkB,CAAC,IAAI,GAAG,eAAe,IAAI,CAAC,CAAC,EAAE;IAC3D,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACjC,QAAQ,EAAE,0BAA0B,CAAC;CACtC,KAAK,IAAI,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,MAAM,CAAC;CAC9B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEpB,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC"}
@@ -1,14 +1,14 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as d } from "react";
3
- import { Avatar as h, Text as y } from "@mantine/core";
4
- import { omit as j, isString as L, isNil as w } from "lodash-es";
5
- import x from "query-string";
6
- import { DEFAULT_VALUES as S } from "../../constants.js";
2
+ import { forwardRef as u } from "react";
3
+ import { Avatar as d, Text as y } from "@mantine/core";
4
+ import { omit as x, isString as S, isNil as j } from "lodash-es";
5
+ import L from "query-string";
6
+ import { DEFAULT_VALUES as w } from "../../constants.js";
7
7
  import { customIcons as v } from "../EmojiPicker/custom-icons/customIcons.js";
8
8
  var I = /* @__PURE__ */ ((r) => (r.OUTLINED = "o", r.FILLED = "f", r))(I || {}), c;
9
9
  ((r) => {
10
10
  r.parse = (t) => {
11
- if (!L(t) || t.trim() === "") return null;
11
+ if (!S(t) || t.trim() === "") return null;
12
12
  const e = new URLSearchParams(t);
13
13
  return {
14
14
  icon: e.get("i") || "",
@@ -17,7 +17,7 @@ var I = /* @__PURE__ */ ((r) => (r.OUTLINED = "o", r.FILLED = "f", r))(I || {}),
17
17
  type: e.get("t") || "o"
18
18
  /* OUTLINED */
19
19
  };
20
- }, r.stringify = (t) => w(t) ? "" : x.stringify({
20
+ }, r.stringify = (t) => j(t) ? "" : L.stringify({
21
21
  i: t.icon || void 0,
22
22
  c: t.color || void 0,
23
23
  e: t.emoji || void 0,
@@ -25,7 +25,7 @@ var I = /* @__PURE__ */ ((r) => (r.OUTLINED = "o", r.FILLED = "f", r))(I || {}),
25
25
  /* OUTLINED */
26
26
  });
27
27
  })(c || (c = {}));
28
- const O = d(
28
+ const O = u(
29
29
  ({
30
30
  icon: r,
31
31
  name: t,
@@ -39,20 +39,20 @@ const O = d(
39
39
  }, p) => {
40
40
  const m = c.parse(r);
41
41
  if (!m && !e) return null;
42
- const u = m?.color || (f ? "initials" : g) || S.COLORS[0];
42
+ const h = m?.color || (f ? "initials" : g) || w.COLORS[0];
43
43
  return /* @__PURE__ */ o(
44
- h,
44
+ d,
45
45
  {
46
46
  ref: p,
47
47
  variant: "transparent",
48
- color: u,
48
+ color: h,
49
49
  name: f,
50
50
  size: i || 20,
51
51
  style: {
52
52
  overflow: s.radius ? "hidden" : "visible",
53
53
  ...s.style
54
54
  },
55
- ...j(s, ["style"]),
55
+ ...x(s, ["style"]),
56
56
  children: /* @__PURE__ */ o(
57
57
  y,
58
58
  {
@@ -73,7 +73,7 @@ const O = d(
73
73
  }
74
74
  ), A = (r, t, e, i) => {
75
75
  const n = v?.[r?.icon || ""];
76
- return n ? /* @__PURE__ */ o(n, { width: "1em", height: "1em" }) : r?.icon ? /* @__PURE__ */ o("svg", { width: "1em", height: "1em", children: /* @__PURE__ */ o(
76
+ return n ? /* @__PURE__ */ o(n, { width: "1em", height: "1em", style: { flexShrink: 0 } }) : r?.icon ? /* @__PURE__ */ o("svg", { width: "1em", height: "1em", style: { flexShrink: 0 }, children: /* @__PURE__ */ o(
77
77
  "use",
78
78
  {
79
79
  xlinkHref: `/tabler-sprite${r.type === "f" ? "-filled" : ""}.svg#tabler-${r.type === "f" ? "filled-" : ""}${r.icon}`
@@ -0,0 +1,9 @@
1
+ import { type ReactNode } from 'react';
2
+ export declare const TreeIndentContainer: import("react").MemoExoticComponent<({ children }: {
3
+ children: ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element>;
5
+ export declare const TreeIndentItem: import("react").MemoExoticComponent<({ depth, children }: {
6
+ depth?: number;
7
+ children: ReactNode;
8
+ }) => import("react/jsx-runtime").JSX.Element>;
9
+ //# sourceMappingURL=TreeIndent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeIndent.d.ts","sourceRoot":"","sources":["../../../src/components/TreeIndent/TreeIndent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAQ,MAAM,OAAO,CAAC;AAI7C,eAAO,MAAM,mBAAmB,qDACf;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,6CAGvC,CAAC;AAEF,eAAO,MAAM,cAAc,4DACC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,6CAUlE,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { jsx as t, jsxs as s } from "react/jsx-runtime";
2
+ import { memo as m } from "react";
3
+ import r from "./TreeIndent.module.css.js";
4
+ const l = m(
5
+ ({ children: e }) => /* @__PURE__ */ t("div", { className: r.container, children: e })
6
+ ), p = m(
7
+ ({ depth: e = 0, children: n }) => /* @__PURE__ */ s("div", { className: r.item, children: [
8
+ Array.from({ length: e }).map((a, o) => /* @__PURE__ */ t("div", { className: r.depthBox }, o)),
9
+ n
10
+ ] })
11
+ );
12
+ export {
13
+ l as TreeIndentContainer,
14
+ p as TreeIndentItem
15
+ };