@layers-app/shared 0.4.0 → 0.4.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.
- package/dist/components/AnimatedFigurePage/AnimatedFigurePage.module.css.js +13 -13
- package/dist/components/AnimatedFigurePage/useParallax.d.ts +2 -2
- package/dist/components/AppContainer/AppContainer.d.ts +6 -1
- package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts +4 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +22 -15
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +22 -21
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +48 -91
- package/dist/components/AppContainer/components/ToolbarNewButton.d.ts +7 -2
- package/dist/components/AppContainer/components/ToolbarNewButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/ToolbarNewButton.js +14 -14
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts +3 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +96 -64
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.js +76 -67
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.js +35 -26
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/useShakePlayer.js +43 -36
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.d.ts +7 -0
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.d.ts.map +1 -0
- package/dist/components/AttachmentsGalleryModal/components/UnsupportedSection.js +17 -0
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts +4 -0
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.js +59 -20
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +34 -22
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +22 -18
- package/dist/components/ColorPicker/ColorPicker.d.ts +12 -11
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +109 -83
- package/dist/components/ColorPicker/ColorPickerList.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerList.js +62 -63
- package/dist/components/ColorPicker/ColorPickerToolbar.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPickerToolbar.js +128 -120
- package/dist/components/ColorPicker/icons.js +3 -3
- package/dist/components/ColorPicker/types.d.ts +3 -1
- package/dist/components/ColorPicker/types.d.ts.map +1 -1
- package/dist/components/ColorPicker/types.js +11 -5
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +55 -45
- package/dist/components/CommentComposer/useVirtualAnchor.d.ts +1 -1
- package/dist/components/CommentComposer/useVirtualAnchor.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +43 -33
- package/dist/components/FilePicker/FilePicker.d.ts +3 -1
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +44 -42
- package/dist/components/FilePicker/FilePickerUpload.d.ts +3 -1
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +28 -28
- package/dist/components/FormViewer/helpers/conditions.d.ts +38 -38
- package/dist/components/FormViewer/helpers/helpers.d.ts +38 -38
- package/dist/components/FormViewer/helpers/steps.d.ts +38 -38
- package/dist/components/FormViewer/hooks/useActiveControl.d.ts +19 -19
- package/dist/components/FormViewer/hooks/useActiveStep.d.ts +38 -38
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +6 -0
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts.map +1 -1
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.js +4 -3
- package/dist/components/FormViewer/hooks/useFormMobile.d.ts +1 -1
- package/dist/components/FormViewer/hooks/useFormMobile.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStore.d.ts +248 -248
- package/dist/components/FormViewer/store/formStoreApi.d.ts +124 -124
- package/dist/components/FormViewer/store/selectors.d.ts +11655 -11655
- package/dist/components/FormViewer/types/form.d.ts +1 -1
- package/dist/components/FormViewer/types/form.d.ts.map +1 -1
- package/dist/components/FormViewer/types/schemes.d.ts +381 -6358
- package/dist/components/FormViewer/types/schemes.d.ts.map +1 -1
- package/dist/components/FormViewer/types/schemes.js +1 -1
- package/dist/components/GroupAvatar/index.d.ts +3 -1
- package/dist/components/GroupAvatar/index.d.ts.map +1 -1
- package/dist/components/GroupAvatar/index.js +24 -21
- package/dist/components/LanguagePicker/LanguagePicker.d.ts +13 -3
- package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
- package/dist/components/LanguagePicker/LanguagePicker.js +65 -43
- package/dist/components/MediaLibrary/MediaLibraryRow.js +7 -7
- package/dist/components/NavMenu/NavMenu.d.ts +3 -1
- package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
- package/dist/components/NavMenu/components/DnDProvider.d.ts +1 -1
- package/dist/components/NavMenu/components/DnDProvider.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.d.ts +7 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuActionIcon.js +21 -23
- package/dist/components/NewColorPicker/components/Target.d.ts +3 -1
- package/dist/components/NewColorPicker/components/Target.d.ts.map +1 -1
- package/dist/components/NewColorPicker/components/Target.js +48 -43
- package/dist/components/Notification/Notification.js +3 -1
- package/dist/components/Notification/NotificationCard.d.ts +3 -1
- package/dist/components/Notification/NotificationCard.d.ts.map +1 -1
- package/dist/components/Notification/NotificationCard.js +87 -86
- package/dist/components/OnboardingTour/OnboardingTourFooter.d.ts +6 -1
- package/dist/components/OnboardingTour/OnboardingTourFooter.d.ts.map +1 -1
- package/dist/components/OnboardingTour/OnboardingTourFooter.js +39 -21
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts +4 -5
- package/dist/components/OnboardingTour/OnboardingTourWrapper.d.ts.map +1 -1
- package/dist/components/OnboardingTour/OnboardingTourWrapper.js +83 -119
- package/dist/components/OnboardingTour/index.d.ts +1 -1
- package/dist/components/OnboardingTour/index.d.ts.map +1 -1
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts +4 -0
- package/dist/components/OnboardingTour/useOnboardingTour.d.ts.map +1 -1
- package/dist/components/OnboardingTour/useOnboardingTour.js +65 -36
- package/dist/components/ProjectIcon/ProjectIcon.d.ts +7 -12
- package/dist/components/ProjectIcon/ProjectIcon.d.ts.map +1 -1
- package/dist/components/ProjectIcon/ProjectIcon.js +58 -60
- package/dist/components/UserAvatar/index.d.ts +2 -1
- package/dist/components/UserAvatar/index.d.ts.map +1 -1
- package/dist/components/UserAvatar/index.js +42 -32
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts +3 -3
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts.map +1 -1
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.js +19 -18
- package/dist/components/WorkspaceMenu/WorkspaceItem.js +17 -17
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +7 -7
- package/dist/config/brand.d.ts +2 -0
- package/dist/config/brand.d.ts.map +1 -1
- package/dist/config/brand.js +28 -22
- package/dist/config/envConfig.d.ts +12 -0
- package/dist/config/envConfig.d.ts.map +1 -1
- package/dist/config/envConfig.js +21 -13
- package/dist/helpers/getFileIcons.d.ts.map +1 -1
- package/dist/helpers/getFileIcons.js +63 -45
- package/dist/helpers/getFileType.d.ts +1 -1
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +29 -8
- package/dist/helpers/getPartOfTheDay.d.ts +1 -1
- package/dist/helpers/offlineSuppression.d.ts +3 -0
- package/dist/helpers/offlineSuppression.d.ts.map +1 -0
- package/dist/helpers/offlineSuppression.js +8 -0
- package/dist/helpers/platform.d.ts +1 -1
- package/dist/helpers/platform.d.ts.map +1 -1
- package/dist/helpers/platform.js +5 -4
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +30 -29
- package/dist/hooks/useOutsideClick.d.ts +1 -1
- package/dist/hooks/useOutsideClick.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +462 -451
- package/dist/lang/locales/ui_en.json.js +1 -1
- package/dist/lang/locales/ui_es.json.js +1 -1
- package/dist/lang/locales/ui_ru.json.js +1 -1
- package/dist/node_modules/countries-and-timezones/esm/index.js +281 -4011
- package/dist/store/featureProgress.d.ts +3 -6
- package/dist/store/featureProgress.d.ts.map +1 -1
- package/dist/store/featureProgress.js +56 -22
- package/dist/store/plansModal.d.ts.map +1 -1
- package/dist/store/plansModal.js +10 -10
- package/package.json +13 -13
|
@@ -1,50 +1,79 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
const
|
|
1
|
+
import { useState as O, useEffect as M, useCallback as b } from "react";
|
|
2
|
+
const m = "onboarding-completed", u = "onboarding-step", E = "onboarding-completed", S = "onboarding-reset";
|
|
3
|
+
let o = null;
|
|
4
|
+
const R = (t) => {
|
|
5
|
+
o = t;
|
|
6
|
+
}, d = (t) => {
|
|
3
7
|
try {
|
|
4
|
-
return JSON.parse(localStorage.getItem(
|
|
8
|
+
return JSON.parse(localStorage.getItem(t) || "{}");
|
|
5
9
|
} catch {
|
|
6
10
|
return {};
|
|
7
11
|
}
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
}, g = () => o ? d(m)[o] ?? {} : {}, I = (t) => {
|
|
13
|
+
if (o)
|
|
14
|
+
try {
|
|
15
|
+
const e = d(m);
|
|
16
|
+
e[o] = t, localStorage.setItem(m, JSON.stringify(e));
|
|
17
|
+
} catch {
|
|
18
|
+
}
|
|
19
|
+
}, a = () => o ? d(u)[o] ?? {} : {}, w = (t) => {
|
|
20
|
+
if (o)
|
|
21
|
+
try {
|
|
22
|
+
const e = d(u);
|
|
23
|
+
e[o] = t, localStorage.setItem(u, JSON.stringify(e));
|
|
24
|
+
} catch {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
}, c = (t) => !!g()[t], L = (t) => {
|
|
28
|
+
const e = g();
|
|
29
|
+
delete e[t], I(e);
|
|
30
|
+
const n = a();
|
|
31
|
+
delete n[t], w(n), window.dispatchEvent(
|
|
32
|
+
new CustomEvent(S, { detail: t })
|
|
17
33
|
);
|
|
18
|
-
},
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
34
|
+
}, f = (t) => {
|
|
35
|
+
const n = a()[t];
|
|
36
|
+
return typeof n == "number" ? n : void 0;
|
|
37
|
+
}, A = (t, e) => {
|
|
38
|
+
const n = a();
|
|
39
|
+
n[t] = e, w(n);
|
|
40
|
+
}, _ = (t) => {
|
|
41
|
+
const e = a();
|
|
42
|
+
delete e[t], w(e);
|
|
43
|
+
}, G = (t, e) => {
|
|
44
|
+
const { dependsOn: n } = e ?? {}, [i, v] = O(
|
|
45
|
+
() => c(t)
|
|
46
|
+
), [p, r] = O(
|
|
47
|
+
() => !c(t) && (n ? c(n) : !0)
|
|
23
48
|
);
|
|
24
|
-
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
|
|
49
|
+
M(() => {
|
|
50
|
+
if (i || !n || p) return;
|
|
51
|
+
const s = (l) => {
|
|
52
|
+
l.detail === n && !c(t) && r(!0);
|
|
28
53
|
};
|
|
29
|
-
return window.addEventListener(
|
|
30
|
-
}, [n,
|
|
31
|
-
const
|
|
32
|
-
|
|
54
|
+
return window.addEventListener(E, s), () => window.removeEventListener(E, s);
|
|
55
|
+
}, [n, i, p, t]), M(() => {
|
|
56
|
+
const s = (l) => {
|
|
57
|
+
l.detail === t && (v(!1), r(!0));
|
|
33
58
|
};
|
|
34
|
-
return window.addEventListener(
|
|
59
|
+
return window.addEventListener(S, s), () => window.removeEventListener(S, s);
|
|
35
60
|
}, [t]);
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
new CustomEvent(
|
|
61
|
+
const N = b(() => {
|
|
62
|
+
const s = g();
|
|
63
|
+
s[t] = !0, I(s), _(t), v(!0), r(!1), window.dispatchEvent(
|
|
64
|
+
new CustomEvent(E, { detail: t })
|
|
40
65
|
);
|
|
41
|
-
}, [t]), C =
|
|
42
|
-
|
|
66
|
+
}, [t]), C = b(() => {
|
|
67
|
+
r(!0);
|
|
43
68
|
}, []);
|
|
44
|
-
return { started:
|
|
69
|
+
return { started: p, completed: i, start: C, complete: N };
|
|
45
70
|
};
|
|
46
71
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
72
|
+
_ as clearSavedStep,
|
|
73
|
+
f as getSavedStepIndex,
|
|
74
|
+
c as isOnboardingCompleted,
|
|
75
|
+
L as resetOnboarding,
|
|
76
|
+
A as saveStepIndex,
|
|
77
|
+
R as setOnboardingUserId,
|
|
78
|
+
G as useOnboardingTour
|
|
50
79
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { AvatarProps } from '@mantine/core';
|
|
3
3
|
export type ProjectIconProps = {
|
|
4
4
|
icon?: string | null;
|
|
@@ -22,18 +22,13 @@ export declare namespace IconEntity {
|
|
|
22
22
|
const parse: (value?: string | null) => IconData | null;
|
|
23
23
|
const stringify: (value?: Partial<IconData>) => string;
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
icon?: string | null;
|
|
28
|
-
name?: string | null;
|
|
29
|
-
fallback?: ReactNode;
|
|
30
|
-
fallbackColor?: string;
|
|
31
|
-
fallbackColorById?: string;
|
|
32
|
-
initials?: boolean;
|
|
33
|
-
} & Omit<AvatarProps, "color" | "name"> & {
|
|
25
|
+
type ProjectIconFullProps = ProjectIconProps & {
|
|
26
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
34
27
|
size?: number | string;
|
|
35
28
|
textSize?: number;
|
|
36
|
-
}
|
|
37
|
-
|
|
29
|
+
};
|
|
30
|
+
/** Используется для отображения бокса с иконкой или первой буквы имени */
|
|
31
|
+
export declare const ProjectIcon: ({ icon, name, fallback, size, textSize, fallbackColorById, initials, fallbackColor, ref, ...props }: ProjectIconFullProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
32
|
+
export declare const renderIcon: (data: IconData | null, fallback?: ProjectIconProps["fallback"], initials?: ProjectIconProps["initials"], name?: ProjectIconProps["name"]) => string | number | bigint | true | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null;
|
|
38
33
|
export {};
|
|
39
34
|
//# sourceMappingURL=ProjectIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectIcon.d.ts","sourceRoot":"","sources":["../../../src/components/ProjectIcon/ProjectIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"ProjectIcon.d.ts","sourceRoot":"","sources":["../../../src/components/ProjectIcon/ProjectIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAU,WAAW,EAAQ,MAAM,eAAe,CAAC;AAO1D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;AAExC,oBAAY,QAAQ;IAClB,QAAQ,MAAM;IACd,MAAM,MAAM;CACb;AAED,KAAK,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC;AAE/E,yBAAiB,UAAU,CAAC;IACnB,MAAM,KAAK,GAAI,QAAQ,MAAM,GAAG,IAAI,KAAG,QAAQ,GAAG,IASxD,CAAC;IAEK,MAAM,SAAS,GAAI,QAAQ,OAAO,CAAC,QAAQ,CAAC,KAAG,MAQrD,CAAC;CACH;AAED,KAAK,oBAAoB,GAAG,gBAAgB,GAAG;IAC7C,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,WAAW,GAAI,qGAWzB,oBAAoB,mDAsCtB,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,MAAM,QAAQ,GAAG,IAAI,EACrB,WAAW,gBAAgB,CAAC,UAAU,CAAC,EACvC,WAAW,gBAAgB,CAAC,UAAU,CAAC,EACvC,OAAO,gBAAgB,CAAC,MAAM,CAAC,2SAqBhC,CAAC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import L from "
|
|
6
|
-
import { DEFAULT_VALUES as w } from "../../constants.js";
|
|
2
|
+
import { Avatar as u, Text as y } from "@mantine/core";
|
|
3
|
+
import { omit as d, isString as x, isNil as S } from "lodash-es";
|
|
4
|
+
import j from "query-string";
|
|
5
|
+
import { DEFAULT_VALUES as L } from "../../constants.js";
|
|
7
6
|
import { customIcons as v } from "../EmojiPicker/custom-icons/customIcons.js";
|
|
8
|
-
var
|
|
7
|
+
var w = /* @__PURE__ */ ((r) => (r.OUTLINED = "o", r.FILLED = "f", r))(w || {}), c;
|
|
9
8
|
((r) => {
|
|
10
9
|
r.parse = (t) => {
|
|
11
|
-
if (!
|
|
10
|
+
if (!x(t) || t.trim() === "") return null;
|
|
12
11
|
const e = new URLSearchParams(t);
|
|
13
12
|
return {
|
|
14
13
|
icon: e.get("i") || "",
|
|
@@ -17,7 +16,7 @@ var I = /* @__PURE__ */ ((r) => (r.OUTLINED = "o", r.FILLED = "f", r))(I || {}),
|
|
|
17
16
|
type: e.get("t") || "o"
|
|
18
17
|
/* OUTLINED */
|
|
19
18
|
};
|
|
20
|
-
}, r.stringify = (t) =>
|
|
19
|
+
}, r.stringify = (t) => S(t) ? "" : j.stringify({
|
|
21
20
|
i: t.icon || void 0,
|
|
22
21
|
c: t.color || void 0,
|
|
23
22
|
e: t.emoji || void 0,
|
|
@@ -25,64 +24,63 @@ var I = /* @__PURE__ */ ((r) => (r.OUTLINED = "o", r.FILLED = "f", r))(I || {}),
|
|
|
25
24
|
/* OUTLINED */
|
|
26
25
|
});
|
|
27
26
|
})(c || (c = {}));
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
), A = (r, t, e, i) => {
|
|
27
|
+
const F = ({
|
|
28
|
+
icon: r,
|
|
29
|
+
name: t,
|
|
30
|
+
fallback: e,
|
|
31
|
+
size: i,
|
|
32
|
+
textSize: n,
|
|
33
|
+
fallbackColorById: l,
|
|
34
|
+
initials: f = !0,
|
|
35
|
+
fallbackColor: g,
|
|
36
|
+
ref: h,
|
|
37
|
+
...s
|
|
38
|
+
}) => {
|
|
39
|
+
const m = c.parse(r);
|
|
40
|
+
if (!m && !e) return null;
|
|
41
|
+
const p = m?.color || (l ? "initials" : g) || L.COLORS[0];
|
|
42
|
+
return /* @__PURE__ */ o(
|
|
43
|
+
u,
|
|
44
|
+
{
|
|
45
|
+
ref: h,
|
|
46
|
+
variant: "transparent",
|
|
47
|
+
color: p,
|
|
48
|
+
name: l,
|
|
49
|
+
size: i || 20,
|
|
50
|
+
style: {
|
|
51
|
+
overflow: s.radius ? "hidden" : "visible",
|
|
52
|
+
...s.style
|
|
53
|
+
},
|
|
54
|
+
...d(s, ["style"]),
|
|
55
|
+
children: /* @__PURE__ */ o(
|
|
56
|
+
y,
|
|
57
|
+
{
|
|
58
|
+
fz: `${n || i}px`,
|
|
59
|
+
fw: "bold",
|
|
60
|
+
tt: "uppercase",
|
|
61
|
+
style: {
|
|
62
|
+
display: "flex",
|
|
63
|
+
alignItems: "center",
|
|
64
|
+
justifyContent: "center",
|
|
65
|
+
lineHeight: "normal"
|
|
66
|
+
},
|
|
67
|
+
children: I(m, e, f, t)
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}, I = (r, t, e, i) => {
|
|
75
73
|
const n = v?.[r?.icon || ""];
|
|
76
74
|
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
75
|
"use",
|
|
78
76
|
{
|
|
79
77
|
xlinkHref: `/tabler-sprite${r.type === "f" ? "-filled" : ""}.svg#tabler-${r.type === "f" ? "filled-" : ""}${r.icon}`
|
|
80
78
|
}
|
|
81
|
-
) }) : r?.emoji ? r.emoji : t || (i && e ?
|
|
82
|
-
},
|
|
79
|
+
) }) : r?.emoji ? r.emoji : t || (i && e ? A(i) : null);
|
|
80
|
+
}, A = (r) => String.fromCodePoint(r?.trim()?.codePointAt(0) ?? 1);
|
|
83
81
|
export {
|
|
84
82
|
c as IconEntity,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
w as IconType,
|
|
84
|
+
F as ProjectIcon,
|
|
85
|
+
I as renderIcon
|
|
88
86
|
};
|
|
@@ -2,8 +2,9 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import { AvatarProps } from '@mantine/core';
|
|
3
3
|
import { MenuUser } from '../AppContainer/components/menus/UserMenu/MenuUserDropdown';
|
|
4
4
|
export interface UserAvatarProps extends AvatarProps, Omit<React.ComponentPropsWithoutRef<'div'>, keyof AvatarProps> {
|
|
5
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
5
6
|
user?: Partial<MenuUser> | null;
|
|
6
7
|
emptyIcon?: ReactNode;
|
|
7
8
|
}
|
|
8
|
-
export declare const UserAvatar:
|
|
9
|
+
export declare const UserAvatar: ({ user, size, emptyIcon, ref, ...props }: UserAvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/UserAvatar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/UserAvatar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,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,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAmBD,eAAO,MAAM,UAAU,GAAI,0CAMxB,eAAe,4CAuCjB,CAAC"}
|
|
@@ -1,39 +1,49 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as n, Fragment as o } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar as s } from "@mantine/core";
|
|
3
|
+
import { IconUser as m } from "@tabler/icons-react";
|
|
4
|
+
import { ProjectIcon as d } from "../ProjectIcon/ProjectIcon.js";
|
|
5
|
+
const f = (r) => {
|
|
6
|
+
if (!r) return "";
|
|
7
|
+
const t = r.trim().split(/\s+/).filter(Boolean);
|
|
8
|
+
return t.length === 0 ? "" : t.length >= 2 ? (t[0][0] + t[t.length - 1][0]).toUpperCase() : t[0].slice(0, 2).toUpperCase();
|
|
9
|
+
}, g = ({
|
|
10
|
+
user: r,
|
|
11
|
+
size: t = 24,
|
|
12
|
+
emptyIcon: c,
|
|
13
|
+
ref: e,
|
|
14
|
+
...a
|
|
15
|
+
}) => {
|
|
16
|
+
const i = r?.avatar || r?.avatarUrl;
|
|
17
|
+
if (i && (i.includes("i=") || i.includes("e=")))
|
|
18
|
+
return /* @__PURE__ */ n(
|
|
19
|
+
d,
|
|
11
20
|
{
|
|
12
|
-
icon:
|
|
21
|
+
icon: i,
|
|
13
22
|
name: r?.name,
|
|
14
23
|
fallbackColorById: r?.id,
|
|
15
|
-
size:
|
|
16
|
-
textSize: typeof
|
|
17
|
-
radius:
|
|
18
|
-
...
|
|
19
|
-
ref:
|
|
20
|
-
}
|
|
21
|
-
) : /* @__PURE__ */ t(
|
|
22
|
-
d,
|
|
23
|
-
{
|
|
24
|
-
src: a,
|
|
25
|
-
color: "initials",
|
|
26
|
-
tt: "uppercase",
|
|
27
|
-
size: o,
|
|
28
|
-
variant: "filled",
|
|
29
|
-
name: r?.id ?? "",
|
|
30
|
-
...i,
|
|
31
|
-
ref: n,
|
|
32
|
-
children: r ? /* @__PURE__ */ t(c, { children: r.name?.charAt(0) }) : /* @__PURE__ */ t(c, { children: e ?? /* @__PURE__ */ t(l, { size: "70%" }) })
|
|
24
|
+
size: t,
|
|
25
|
+
textSize: typeof t == "number" ? t * 0.75 : void 0,
|
|
26
|
+
radius: a.radius,
|
|
27
|
+
...a,
|
|
28
|
+
ref: e
|
|
33
29
|
}
|
|
34
30
|
);
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
const l = f(r?.name);
|
|
32
|
+
return /* @__PURE__ */ n(
|
|
33
|
+
s,
|
|
34
|
+
{
|
|
35
|
+
src: i,
|
|
36
|
+
color: "initials",
|
|
37
|
+
tt: "uppercase",
|
|
38
|
+
size: t,
|
|
39
|
+
variant: "filled",
|
|
40
|
+
name: r?.id ?? "",
|
|
41
|
+
...a,
|
|
42
|
+
ref: e,
|
|
43
|
+
children: r ? /* @__PURE__ */ n(o, { children: l }) : /* @__PURE__ */ n(o, { children: c ?? /* @__PURE__ */ n(m, { size: "70%" }) })
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
};
|
|
37
47
|
export {
|
|
38
|
-
|
|
48
|
+
g as UserAvatar
|
|
39
49
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { AvatarProps } from '@mantine/core';
|
|
2
3
|
import { MenuWorkspace } from '../WorkspaceMenu/WorkspaceMenu';
|
|
3
4
|
export type WorkspaceAvatarProps = AvatarProps & {
|
|
5
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
4
6
|
workspace?: MenuWorkspace | null;
|
|
5
7
|
};
|
|
6
|
-
export declare const WorkspaceAvatar: import("react").
|
|
7
|
-
workspace?: MenuWorkspace | null;
|
|
8
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export declare const WorkspaceAvatar: ({ workspace, ref, ...props }: WorkspaceAvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=WorkspaceAvatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/WorkspaceAvatar/WorkspaceAvatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkspaceAvatar.d.ts","sourceRoot":"","sources":["../../../src/components/WorkspaceAvatar/WorkspaceAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAU,WAAW,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG;IAC/C,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,SAAS,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,8BAI7B,oBAAoB,4CAatB,CAAC"}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
import { Avatar as e } from "@mantine/core";
|
|
3
|
+
import i from "../../assets/default-workspace-avatar.jpg.js";
|
|
4
|
+
const p = ({
|
|
5
|
+
workspace: r,
|
|
6
|
+
ref: a,
|
|
7
|
+
...t
|
|
8
|
+
}) => /* @__PURE__ */ o(
|
|
9
|
+
e,
|
|
10
|
+
{
|
|
11
|
+
src: r?.workspaceIcon || i,
|
|
12
|
+
tt: "uppercase",
|
|
13
|
+
color: "initials",
|
|
14
|
+
variant: "filled",
|
|
15
|
+
name: r?.workspaceId,
|
|
16
|
+
radius: "var(--mantine-radius-default)",
|
|
17
|
+
...t,
|
|
18
|
+
ref: a
|
|
19
|
+
}
|
|
19
20
|
);
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
p as WorkspaceAvatar
|
|
22
23
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n, jsxs as t, Fragment as s } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as c } from "react-i18next";
|
|
3
|
-
import { Menu as p, Flex as
|
|
3
|
+
import { Menu as p, Flex as m, Box as a, Text as i } from "@mantine/core";
|
|
4
4
|
import { usePlatform as h } from "../../hooks/usePlatform.js";
|
|
5
|
-
import { WorkspaceAvatar as
|
|
6
|
-
const M = ({ workspace:
|
|
7
|
-
const { t: r } = c("workspaceMenu"),
|
|
8
|
-
return /* @__PURE__ */
|
|
5
|
+
import { WorkspaceAvatar as u } from "../WorkspaceAvatar/WorkspaceAvatar.js";
|
|
6
|
+
const M = ({ workspace: e, onClick: l }) => {
|
|
7
|
+
const { t: r } = c("workspaceMenu"), o = h();
|
|
8
|
+
return /* @__PURE__ */ n(
|
|
9
9
|
p.Item,
|
|
10
10
|
{
|
|
11
11
|
p: 4,
|
|
12
|
-
onClick: () =>
|
|
12
|
+
onClick: () => l?.(e),
|
|
13
13
|
component: "a",
|
|
14
14
|
styles: { itemLabel: { minWidth: 0 } },
|
|
15
|
-
children: /* @__PURE__ */ t(
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */ t(
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
!
|
|
20
|
-
|
|
21
|
-
r("member", { count:
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
|
|
15
|
+
children: /* @__PURE__ */ t(m, { gap: 12, children: [
|
|
16
|
+
/* @__PURE__ */ n(u, { workspace: e, size: 36 }),
|
|
17
|
+
/* @__PURE__ */ t(a, { flex: 1, miw: 0, children: [
|
|
18
|
+
/* @__PURE__ */ n(i, { truncate: !0, size: "sm", fw: 500, c: "var(--mantine-color-bright)", children: e.workspaceName }),
|
|
19
|
+
!e?.invitation && /* @__PURE__ */ n(i, { c: "gray", fw: 500, size: "xs", component: "span", children: /* @__PURE__ */ t(m, { gap: 8, component: "span", children: [
|
|
20
|
+
o.has("memberCount") && e.totalMembers ? /* @__PURE__ */ t(s, { children: [
|
|
21
|
+
r("member", { count: e.totalMembers }),
|
|
22
|
+
/* @__PURE__ */ n(
|
|
23
|
+
a,
|
|
24
24
|
{
|
|
25
25
|
w: 2,
|
|
26
26
|
h: 2,
|
|
@@ -30,7 +30,7 @@ const M = ({ workspace: n, onClick: a }) => {
|
|
|
30
30
|
}
|
|
31
31
|
)
|
|
32
32
|
] }) : null,
|
|
33
|
-
|
|
33
|
+
o.has("planBadges") && r(`plans.${e.plan}`)
|
|
34
34
|
] }) })
|
|
35
35
|
] })
|
|
36
36
|
] })
|
|
@@ -20,11 +20,11 @@ const te = ({
|
|
|
20
20
|
workspaceLink: t,
|
|
21
21
|
settingsLink: p,
|
|
22
22
|
membersLink: y,
|
|
23
|
-
isAnonym:
|
|
24
|
-
publicMode:
|
|
23
|
+
isAnonym: C,
|
|
24
|
+
publicMode: I
|
|
25
25
|
}) => {
|
|
26
|
-
const { t:
|
|
27
|
-
return
|
|
26
|
+
const { t: L } = u("workspaceMenu"), { isMobile: g } = T(), [W, f] = K(!1);
|
|
27
|
+
return C || I ? /* @__PURE__ */ e(l, { w: "100%", justify: g ? "start" : "center", children: /* @__PURE__ */ e("a", { href: "/", children: /* @__PURE__ */ e(
|
|
28
28
|
O,
|
|
29
29
|
{
|
|
30
30
|
minified: !g,
|
|
@@ -34,7 +34,7 @@ const te = ({
|
|
|
34
34
|
) }) }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ o(
|
|
35
35
|
m,
|
|
36
36
|
{
|
|
37
|
-
opened:
|
|
37
|
+
opened: W,
|
|
38
38
|
onChange: f,
|
|
39
39
|
position: "right-start",
|
|
40
40
|
keepMounted: !1,
|
|
@@ -43,7 +43,7 @@ const te = ({
|
|
|
43
43
|
children: [
|
|
44
44
|
/* @__PURE__ */ e(m.Target, { children: r ?? /* @__PURE__ */ o(l, { onClick: () => f((w) => !w), children: [
|
|
45
45
|
/* @__PURE__ */ e(x, { size: 30, workspace: n }),
|
|
46
|
-
/* @__PURE__ */ e(l, { justify: "space-between", align: "center", w: "100%", miw: 0, children: /* @__PURE__ */ e(N, { label: n.workspaceName, children: /* @__PURE__ */ e(d, { size: "md", truncate: !0, children: n?.workspaceName ||
|
|
46
|
+
/* @__PURE__ */ e(l, { justify: "space-between", align: "center", w: "100%", miw: 0, children: /* @__PURE__ */ e(N, { label: n.workspaceName, children: /* @__PURE__ */ e(d, { size: "md", truncate: !0, children: n?.workspaceName || L("noName") }) }) })
|
|
47
47
|
] }) }),
|
|
48
48
|
/* @__PURE__ */ e(m.Dropdown, { w: 338, children: /* @__PURE__ */ o(a, { gap: 6, children: [
|
|
49
49
|
/* @__PURE__ */ e(
|
|
@@ -86,7 +86,7 @@ const te = ({
|
|
|
86
86
|
/* @__PURE__ */ o(a, { gap: 0, miw: 0, children: [
|
|
87
87
|
/* @__PURE__ */ e(d, { truncate: !0, size: "md", fw: 500, c: "var(--mantine-color-bright)", children: r.workspaceName || t("noName") }),
|
|
88
88
|
/* @__PURE__ */ e(d, { c: "gray", size: "sm", fw: 500, component: "span", children: /* @__PURE__ */ o(l, { gap: 6, component: "span", children: [
|
|
89
|
-
r.totalMembers ? /* @__PURE__ */ o(M, { children: [
|
|
89
|
+
p.has("memberCount") && r.totalMembers ? /* @__PURE__ */ o(M, { children: [
|
|
90
90
|
t("member", { count: r.totalMembers }),
|
|
91
91
|
/* @__PURE__ */ e(
|
|
92
92
|
h,
|
package/dist/config/brand.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../src/config/brand.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../src/config/brand.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoEjB,CAAC;AAGF,eAAO,MAAM,kBAAkB;;;;CAU9B,CAAC"}
|