@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,92 +1,93 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
{
|
|
34
|
-
size: 20,
|
|
35
|
-
color: "gray",
|
|
36
|
-
style: { alignSelf: "flex-start" }
|
|
37
|
-
}
|
|
38
|
-
),
|
|
39
|
-
/* @__PURE__ */ r(l, { fz: 16, style: { alignSelf: "flex-start" }, children: e.pageIcon === "DefaultIcon" ? /* @__PURE__ */ r(u, { size: 20, color: "gray" }) : e.pageIcon }),
|
|
40
|
-
/* @__PURE__ */ t(a, { direction: "column", gap: 0, w: 200, children: [
|
|
41
|
-
/* @__PURE__ */ r(
|
|
42
|
-
x,
|
|
43
|
-
{
|
|
44
|
-
disabled: e.description.length < 40,
|
|
45
|
-
label: e.description,
|
|
46
|
-
children: /* @__PURE__ */ r(
|
|
47
|
-
l,
|
|
48
|
-
{
|
|
49
|
-
fz: "sm",
|
|
50
|
-
style: {
|
|
51
|
-
alignSelf: "flex-start",
|
|
52
|
-
lineHeight: "16px"
|
|
53
|
-
},
|
|
54
|
-
lineClamp: 2,
|
|
55
|
-
children: e.description
|
|
56
|
-
}
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
),
|
|
60
|
-
/* @__PURE__ */ t(
|
|
61
|
-
l,
|
|
62
|
-
{
|
|
63
|
-
c: "dimmed",
|
|
64
|
-
fz: "sm",
|
|
65
|
-
h: "16",
|
|
66
|
-
style: { alignSelf: "flex-start" },
|
|
67
|
-
children: [
|
|
68
|
-
" ",
|
|
69
|
-
e.pageName
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
] })
|
|
74
|
-
] }),
|
|
75
|
-
/* @__PURE__ */ r(l, { c: "dimmed", fz: "sm", w: 98, style: { alignSelf: "flex-start" }, children: f }),
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as p } from "react-i18next";
|
|
3
|
+
import { Flex as a, Text as t, Tooltip as g } from "@mantine/core";
|
|
4
|
+
import { IconFileText as x, IconCheckbox as h, IconX as u } from "@tabler/icons-react";
|
|
5
|
+
const D = ({
|
|
6
|
+
isFocused: n,
|
|
7
|
+
notification: e,
|
|
8
|
+
ref: s
|
|
9
|
+
}) => {
|
|
10
|
+
const { i18n: o } = p("appContainer"), i = (f) => {
|
|
11
|
+
const m = o.language === "ru" ? "ru-RU" : "en-US";
|
|
12
|
+
return f.toLocaleDateString(m, {
|
|
13
|
+
day: "numeric",
|
|
14
|
+
month: "long",
|
|
15
|
+
year: "numeric"
|
|
16
|
+
});
|
|
17
|
+
}, c = new Date(e.createdAt), d = i(c);
|
|
18
|
+
return /* @__PURE__ */ l(
|
|
19
|
+
a,
|
|
20
|
+
{
|
|
21
|
+
ref: s,
|
|
22
|
+
px: 8,
|
|
23
|
+
w: "100%",
|
|
24
|
+
py: "sm",
|
|
25
|
+
justify: "flex-start",
|
|
26
|
+
style: {
|
|
27
|
+
backgroundColor: n ? "#f0f0f0" : "transparent",
|
|
28
|
+
cursor: "pointer",
|
|
29
|
+
borderRadius: "4px"
|
|
30
|
+
},
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ l(a, { w: 274, justify: "flex-start", children: [
|
|
76
33
|
/* @__PURE__ */ r(
|
|
77
|
-
|
|
34
|
+
x,
|
|
78
35
|
{
|
|
79
|
-
|
|
80
|
-
height: 12,
|
|
36
|
+
size: 20,
|
|
81
37
|
color: "gray",
|
|
82
|
-
style: { alignSelf: "flex-start"
|
|
38
|
+
style: { alignSelf: "flex-start" }
|
|
83
39
|
}
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ r(t, { fz: 16, style: { alignSelf: "flex-start" }, children: e.pageIcon === "DefaultIcon" ? /* @__PURE__ */ r(h, { size: 20, color: "gray" }) : e.pageIcon }),
|
|
42
|
+
/* @__PURE__ */ l(a, { direction: "column", gap: 0, w: 200, children: [
|
|
43
|
+
/* @__PURE__ */ r(
|
|
44
|
+
g,
|
|
45
|
+
{
|
|
46
|
+
disabled: e.description.length < 40,
|
|
47
|
+
label: e.description,
|
|
48
|
+
children: /* @__PURE__ */ r(
|
|
49
|
+
t,
|
|
50
|
+
{
|
|
51
|
+
fz: "sm",
|
|
52
|
+
style: {
|
|
53
|
+
alignSelf: "flex-start",
|
|
54
|
+
lineHeight: "16px"
|
|
55
|
+
},
|
|
56
|
+
lineClamp: 2,
|
|
57
|
+
children: e.description
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ l(
|
|
63
|
+
t,
|
|
64
|
+
{
|
|
65
|
+
c: "dimmed",
|
|
66
|
+
fz: "sm",
|
|
67
|
+
h: "16",
|
|
68
|
+
style: { alignSelf: "flex-start" },
|
|
69
|
+
children: [
|
|
70
|
+
" ",
|
|
71
|
+
e.pageName
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] })
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ r(t, { c: "dimmed", fz: "sm", w: 98, style: { alignSelf: "flex-start" }, children: d }),
|
|
78
|
+
/* @__PURE__ */ r(
|
|
79
|
+
u,
|
|
80
|
+
{
|
|
81
|
+
width: 12,
|
|
82
|
+
height: 12,
|
|
83
|
+
color: "gray",
|
|
84
|
+
style: { alignSelf: "flex-start", marginTop: "5px" }
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
};
|
|
90
91
|
export {
|
|
91
|
-
|
|
92
|
+
D as default
|
|
92
93
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type OnboardingTourController } from '@
|
|
1
|
+
import { type OnboardingTourController } from '@layers-app/onboarding-tour';
|
|
2
2
|
export declare const DefaultSingleFooter: ({ controller, label, }: {
|
|
3
3
|
controller: OnboardingTourController;
|
|
4
4
|
label: string;
|
|
@@ -12,6 +12,11 @@ export declare const DefaultMultiFooter: ({ controller, stepIndex, totalSteps, l
|
|
|
12
12
|
back: string;
|
|
13
13
|
next: string;
|
|
14
14
|
done: string;
|
|
15
|
+
continue?: string;
|
|
15
16
|
};
|
|
16
17
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const DefaultTourHeader: ({ controller, title, }: {
|
|
19
|
+
controller: OnboardingTourController;
|
|
20
|
+
title: React.ReactNode;
|
|
21
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
22
|
//# sourceMappingURL=OnboardingTourFooter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnboardingTourFooter.d.ts","sourceRoot":"","sources":["../../../src/components/OnboardingTour/OnboardingTourFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"OnboardingTourFooter.d.ts","sourceRoot":"","sources":["../../../src/components/OnboardingTour/OnboardingTourFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAI5E,eAAO,MAAM,mBAAmB,GAAI,wBAGjC;IACD,UAAU,EAAE,wBAAwB,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;CACf,4CAMA,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,gDAKhC;IACD,UAAU,EAAE,wBAAwB,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,4CAiCA,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,wBAG/B;IACD,UAAU,EAAE,wBAAwB,CAAC;IACrC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB,4CAaA,CAAC"}
|
|
@@ -1,40 +1,58 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Group as r, Button as s, Text as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { Group as r, Button as s, Text as p, ActionIcon as d } from "@mantine/core";
|
|
3
|
+
import { IconX as f } from "@tabler/icons-react";
|
|
4
|
+
const g = ({
|
|
5
|
+
controller: i,
|
|
6
|
+
label: t
|
|
7
|
+
}) => /* @__PURE__ */ e(r, { justify: "flex-end", children: /* @__PURE__ */ e(s, { size: "sm", onClick: () => i.endTour(), children: t }) }), k = ({
|
|
8
|
+
controller: i,
|
|
9
|
+
stepIndex: t,
|
|
10
|
+
totalSteps: u,
|
|
10
11
|
labels: n
|
|
11
12
|
}) => {
|
|
12
|
-
const
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
!
|
|
13
|
+
const c = t === 0, a = t === u - 1, l = c && n.continue ? n.continue : n.next;
|
|
14
|
+
return /* @__PURE__ */ o(r, { justify: "space-between", children: [
|
|
15
|
+
/* @__PURE__ */ e(p, { size: "sm", c: "gray.5", children: n.stepOf }),
|
|
16
|
+
/* @__PURE__ */ o(r, { gap: "xs", children: [
|
|
17
|
+
!c && /* @__PURE__ */ e(
|
|
17
18
|
s,
|
|
18
19
|
{
|
|
19
20
|
variant: "subtle",
|
|
20
21
|
color: "gray.5",
|
|
21
22
|
size: "sm",
|
|
22
|
-
onClick: () =>
|
|
23
|
+
onClick: () => i.prevStep(),
|
|
23
24
|
children: n.back
|
|
24
25
|
}
|
|
25
26
|
),
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ e(
|
|
27
28
|
s,
|
|
28
29
|
{
|
|
29
30
|
size: "sm",
|
|
30
|
-
onClick: () =>
|
|
31
|
-
children:
|
|
31
|
+
onClick: () => a ? i.endTour() : i.nextStep(),
|
|
32
|
+
children: a ? n.done : l
|
|
32
33
|
}
|
|
33
34
|
)
|
|
34
35
|
] })
|
|
35
36
|
] });
|
|
36
|
-
}
|
|
37
|
+
}, y = ({
|
|
38
|
+
controller: i,
|
|
39
|
+
title: t
|
|
40
|
+
}) => /* @__PURE__ */ o(r, { justify: "space-between", align: "flex-start", gap: "xs", wrap: "nowrap", children: [
|
|
41
|
+
/* @__PURE__ */ e("div", { style: { flex: 1 }, children: t }),
|
|
42
|
+
/* @__PURE__ */ e(
|
|
43
|
+
d,
|
|
44
|
+
{
|
|
45
|
+
variant: "subtle",
|
|
46
|
+
color: "gray",
|
|
47
|
+
size: "sm",
|
|
48
|
+
onClick: () => i.skipTour(),
|
|
49
|
+
"aria-label": "Skip tour",
|
|
50
|
+
children: /* @__PURE__ */ e(f, { size: 16 })
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
] });
|
|
37
54
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
55
|
+
k as DefaultMultiFooter,
|
|
56
|
+
g as DefaultSingleFooter,
|
|
57
|
+
y as DefaultTourHeader
|
|
40
58
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import { type OnboardingTourProps, type OnboardingTourStep } from '@
|
|
3
|
-
import './OnboardingTourWrapper.css';
|
|
1
|
+
import { type MutableRefObject, type ReactNode } from 'react';
|
|
2
|
+
import { type OnboardingTourController, type OnboardingTourProps, type OnboardingTourStep } from '@layers-app/onboarding-tour';
|
|
4
3
|
export interface OnboardingTourWrapperProps extends Partial<Omit<OnboardingTourProps, 'tour' | 'started' | 'children'>> {
|
|
5
4
|
featureKey: string;
|
|
6
5
|
tour: OnboardingTourStep[];
|
|
7
6
|
children: ReactNode;
|
|
8
7
|
onComplete?: () => void;
|
|
9
8
|
dependsOn?: string;
|
|
10
|
-
|
|
9
|
+
controllerRef?: MutableRefObject<OnboardingTourController | null>;
|
|
11
10
|
}
|
|
12
|
-
export declare const OnboardingTourWrapper: ({ featureKey, tour, children, onComplete, dependsOn,
|
|
11
|
+
export declare const OnboardingTourWrapper: ({ featureKey, tour, children, onComplete, dependsOn, controllerRef, classNames, focusRevealProps: externalFocusRevealProps, onOnboardingTourEnd: externalOnEnd, onOnboardingTourSkip: externalOnClose, onOnboardingTourChange: externalOnChange, onOnboardingTourStart: externalOnStart, ...rest }: OnboardingTourWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
//# sourceMappingURL=OnboardingTourWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnboardingTourWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/OnboardingTour/OnboardingTourWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"OnboardingTourWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/OnboardingTour/OnboardingTourWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,6BAA6B,CAAC;AAcrC,MAAM,WAAW,0BACf,SAAQ,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;IAC3E,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,kBAAkB,EAAE,CAAC;IAC3B,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,gBAAgB,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAAC;CACnE;AA4BD,eAAO,MAAM,qBAAqB,GAAI,oSAcnC,0BAA0B,4CA4J5B,CAAC"}
|
|
@@ -1,164 +1,128 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { OnboardingTour as
|
|
5
|
-
import { Text as
|
|
6
|
-
import { DefaultSingleFooter as
|
|
7
|
-
import { useOnboardingTour as
|
|
8
|
-
/*
|
|
9
|
-
|
|
10
|
-
featureKey: n,
|
|
1
|
+
import { jsx as a, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as b, useCallback as m } from "react";
|
|
3
|
+
import { useTranslation as F } from "react-i18next";
|
|
4
|
+
import { OnboardingTour as M } from "@layers-app/onboarding-tour";
|
|
5
|
+
import { Text as v } from "@mantine/core";
|
|
6
|
+
import { DefaultSingleFooter as H, DefaultMultiFooter as N, DefaultTourHeader as W } from "./OnboardingTourFooter.js";
|
|
7
|
+
import { useOnboardingTour as q, getSavedStepIndex as A, saveStepIndex as G } from "./useOnboardingTour.js";
|
|
8
|
+
const J = (o) => typeof o == "string" ? /* @__PURE__ */ a(v, { fw: 500, size: "md", c: "white", mb: 4, children: o }) : o, L = (o) => typeof o == "string" ? /* @__PURE__ */ a(v, { size: "sm", c: "gray.3", children: o }) : o, $ = ({
|
|
9
|
+
featureKey: o,
|
|
11
10
|
tour: d,
|
|
12
|
-
children:
|
|
13
|
-
onComplete:
|
|
11
|
+
children: l,
|
|
12
|
+
onComplete: p,
|
|
14
13
|
dependsOn: k,
|
|
15
|
-
|
|
16
|
-
classNames:
|
|
17
|
-
focusRevealProps:
|
|
18
|
-
onOnboardingTourEnd:
|
|
19
|
-
|
|
20
|
-
onOnboardingTourChange:
|
|
21
|
-
onOnboardingTourStart:
|
|
22
|
-
...
|
|
14
|
+
controllerRef: s,
|
|
15
|
+
classNames: x = {},
|
|
16
|
+
focusRevealProps: c,
|
|
17
|
+
onOnboardingTourEnd: T,
|
|
18
|
+
onOnboardingTourSkip: S,
|
|
19
|
+
onOnboardingTourChange: h,
|
|
20
|
+
onOnboardingTourStart: O,
|
|
21
|
+
...I
|
|
23
22
|
}) => {
|
|
24
|
-
const { t:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
const { t: e } = F("pages"), { started: P, complete: u } = q(o, { dependsOn: k }), y = b(
|
|
24
|
+
() => A(o),
|
|
25
|
+
[o]
|
|
26
|
+
), B = m(
|
|
27
|
+
(n) => {
|
|
28
|
+
const i = d.findIndex((r) => r.id === n.id);
|
|
29
|
+
i >= 0 && G(o, i), h?.(n);
|
|
30
|
+
},
|
|
31
|
+
[o, d, h]
|
|
32
|
+
), C = m(() => {
|
|
33
|
+
u(), p?.(), T?.();
|
|
34
|
+
}, [u, p, T]), D = m(() => {
|
|
35
|
+
u(), p?.(), S?.();
|
|
36
|
+
}, [u, p, S]), j = b(() => {
|
|
37
|
+
const n = d.length, i = n === 1;
|
|
38
|
+
return d.map((r, w) => {
|
|
39
|
+
const g = J(r.title), f = {
|
|
32
40
|
...r,
|
|
33
|
-
title:
|
|
34
|
-
|
|
41
|
+
title: void 0,
|
|
42
|
+
header: (t) => /* @__PURE__ */ a(
|
|
43
|
+
W,
|
|
44
|
+
{
|
|
45
|
+
controller: t,
|
|
46
|
+
title: typeof g == "function" ? g(t) : g
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
content: L(r.content)
|
|
35
50
|
};
|
|
36
|
-
return r.footer === void 0 && (
|
|
37
|
-
|
|
51
|
+
return r.footer === void 0 && (i ? f.footer = (t) => (s && (s.current = t), /* @__PURE__ */ a(
|
|
52
|
+
H,
|
|
38
53
|
{
|
|
39
|
-
controller:
|
|
40
|
-
label:
|
|
54
|
+
controller: t,
|
|
55
|
+
label: e("onboarding.continue")
|
|
41
56
|
}
|
|
42
|
-
) :
|
|
43
|
-
|
|
57
|
+
)) : f.footer = (t) => (s && (s.current = t), /* @__PURE__ */ a(
|
|
58
|
+
N,
|
|
44
59
|
{
|
|
45
|
-
controller:
|
|
46
|
-
stepIndex:
|
|
47
|
-
totalSteps:
|
|
60
|
+
controller: t,
|
|
61
|
+
stepIndex: w,
|
|
62
|
+
totalSteps: n,
|
|
48
63
|
labels: {
|
|
49
|
-
stepOf:
|
|
50
|
-
current:
|
|
51
|
-
total:
|
|
64
|
+
stepOf: e("onboarding.stepOf", {
|
|
65
|
+
current: w + 1,
|
|
66
|
+
total: n
|
|
52
67
|
}),
|
|
53
|
-
back:
|
|
54
|
-
next:
|
|
55
|
-
done:
|
|
68
|
+
back: e("onboarding.back"),
|
|
69
|
+
next: e("onboarding.next"),
|
|
70
|
+
done: e("onboarding.done"),
|
|
71
|
+
continue: e("onboarding.continue")
|
|
56
72
|
}
|
|
57
73
|
}
|
|
58
|
-
)),
|
|
74
|
+
))), f;
|
|
59
75
|
});
|
|
60
|
-
}, [d,
|
|
61
|
-
const
|
|
76
|
+
}, [d, e, s]), z = b(() => {
|
|
77
|
+
const n = typeof c == "object" ? c : void 0, i = n?.popoverProps ?? {}, r = i.styles ?? {};
|
|
62
78
|
return {
|
|
63
|
-
...
|
|
64
|
-
disableTargetInteraction:
|
|
65
|
-
overlayProps: {
|
|
66
|
-
blur: 0,
|
|
67
|
-
...o?.overlayProps
|
|
68
|
-
},
|
|
79
|
+
...n,
|
|
80
|
+
disableTargetInteraction: n?.disableTargetInteraction ?? !0,
|
|
69
81
|
popoverProps: {
|
|
70
82
|
position: "bottom",
|
|
71
83
|
offset: 10,
|
|
72
|
-
|
|
73
|
-
duration: 0,
|
|
74
|
-
...e.transitionProps ?? {}
|
|
75
|
-
},
|
|
76
|
-
...e,
|
|
77
|
-
classNames: {
|
|
78
|
-
...r,
|
|
79
|
-
dropdown: a
|
|
80
|
-
},
|
|
84
|
+
...i,
|
|
81
85
|
styles: {
|
|
82
|
-
...
|
|
86
|
+
...r,
|
|
83
87
|
dropdown: {
|
|
84
88
|
backgroundColor: "var(--mantine-color-dark-7)",
|
|
85
89
|
padding: 16,
|
|
86
90
|
color: "white",
|
|
87
91
|
border: "none",
|
|
88
92
|
width: 300,
|
|
89
|
-
...
|
|
93
|
+
...r.dropdown
|
|
90
94
|
},
|
|
91
95
|
arrow: {
|
|
92
96
|
backgroundColor: "var(--mantine-color-dark-7)",
|
|
93
97
|
border: "none",
|
|
94
|
-
...
|
|
98
|
+
...r.arrow
|
|
95
99
|
}
|
|
96
100
|
}
|
|
97
101
|
}
|
|
98
102
|
};
|
|
99
|
-
}, [
|
|
100
|
-
return
|
|
101
|
-
|
|
102
|
-
let o = 0;
|
|
103
|
-
const e = document.createElement("style");
|
|
104
|
-
e.setAttribute("data-onboarding-tour-popover-animation", "true"), e.textContent = `.${w}:not([${T}]) { opacity: 0 !important; pointer-events: none !important; }`, document.head.appendChild(e);
|
|
105
|
-
const r = (t) => {
|
|
106
|
-
t.removeAttribute(T), t.style.removeProperty("position"), t.style.removeProperty("top"), t.style.removeProperty("left"), t.style.removeProperty("width"), t.style.removeProperty("transform"), t.style.removeProperty("opacity"), t.style.removeProperty("pointer-events"), t.style.removeProperty("will-change"), t.style.removeProperty("transition");
|
|
107
|
-
}, s = (t) => {
|
|
108
|
-
const i = t.getBoundingClientRect();
|
|
109
|
-
if (i.width === 0 || i.height === 0) return;
|
|
110
|
-
const v = i.top, h = i.left, I = b.current?.top ?? v, L = b.current?.left ?? h;
|
|
111
|
-
c.current && c.current !== t && r(c.current), c.current = t, t.setAttribute(T, "true"), Object.assign(t.style, {
|
|
112
|
-
position: "fixed",
|
|
113
|
-
top: `${I}px`,
|
|
114
|
-
left: `${L}px`,
|
|
115
|
-
width: `${i.width}px`,
|
|
116
|
-
transform: "none",
|
|
117
|
-
opacity: "1",
|
|
118
|
-
pointerEvents: "auto",
|
|
119
|
-
willChange: "top, left",
|
|
120
|
-
transition: "top 260ms cubic-bezier(0.2, 0, 0, 1), left 260ms cubic-bezier(0.2, 0, 0, 1)"
|
|
121
|
-
}), requestAnimationFrame(() => {
|
|
122
|
-
t.isConnected && (t.style.top = `${v}px`, t.style.left = `${h}px`);
|
|
123
|
-
}), b.current = { top: v, left: h };
|
|
124
|
-
}, a = () => {
|
|
125
|
-
const t = Array.from(
|
|
126
|
-
document.querySelectorAll(`.${w}`)
|
|
127
|
-
), i = t[t.length - 1];
|
|
128
|
-
i && s(i);
|
|
129
|
-
}, u = new MutationObserver(() => {
|
|
130
|
-
cancelAnimationFrame(o), o = requestAnimationFrame(a);
|
|
131
|
-
});
|
|
132
|
-
return a(), u.observe(document.body, { childList: !0, subtree: !0 }), () => {
|
|
133
|
-
u.disconnect(), cancelAnimationFrame(o), e.remove(), c.current && (r(c.current), c.current = null), b.current = null;
|
|
134
|
-
};
|
|
135
|
-
}, [y, O]), d.length === 0 ? /* @__PURE__ */ p(q, { children: P }) : /* @__PURE__ */ p(
|
|
136
|
-
U,
|
|
103
|
+
}, [c]);
|
|
104
|
+
return d.length === 0 ? /* @__PURE__ */ a(E, { children: l }) : /* @__PURE__ */ a(
|
|
105
|
+
M,
|
|
137
106
|
{
|
|
138
107
|
tour: j,
|
|
139
|
-
started:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
},
|
|
146
|
-
onOnboardingTourEnd: B,
|
|
147
|
-
onOnboardingTourClose: _,
|
|
108
|
+
started: P,
|
|
109
|
+
initialStepIndex: y,
|
|
110
|
+
onOnboardingTourStart: O,
|
|
111
|
+
onOnboardingTourChange: B,
|
|
112
|
+
onOnboardingTourEnd: C,
|
|
113
|
+
onOnboardingTourSkip: D,
|
|
148
114
|
withPrevButton: !1,
|
|
149
115
|
withNextButton: !1,
|
|
150
116
|
withSkipButton: !1,
|
|
151
117
|
withStepper: !1,
|
|
152
118
|
maw: 300,
|
|
153
|
-
classNames:
|
|
154
|
-
...N
|
|
155
|
-
},
|
|
119
|
+
classNames: x,
|
|
156
120
|
focusRevealProps: z,
|
|
157
|
-
...
|
|
158
|
-
children:
|
|
121
|
+
...I,
|
|
122
|
+
children: l
|
|
159
123
|
}
|
|
160
124
|
);
|
|
161
125
|
};
|
|
162
126
|
export {
|
|
163
|
-
|
|
127
|
+
$ as OnboardingTourWrapper
|
|
164
128
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { OnboardingTourWrapper } from './OnboardingTourWrapper';
|
|
2
2
|
export type { OnboardingTourWrapperProps } from './OnboardingTourWrapper';
|
|
3
|
-
export { useOnboardingTour, isOnboardingCompleted, resetOnboarding, } from './useOnboardingTour';
|
|
3
|
+
export { useOnboardingTour, isOnboardingCompleted, resetOnboarding, getSavedStepIndex, saveStepIndex, clearSavedStep, setOnboardingUserId, } from './useOnboardingTour';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/OnboardingTour/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/OnboardingTour/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,mBAAmB,GACpB,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
export declare const setOnboardingUserId: (userId: string | null) => void;
|
|
1
2
|
export declare const isOnboardingCompleted: (featureKey: string) => boolean;
|
|
2
3
|
export declare const resetOnboarding: (featureKey: string) => void;
|
|
4
|
+
export declare const getSavedStepIndex: (featureKey: string) => number | undefined;
|
|
5
|
+
export declare const saveStepIndex: (featureKey: string, stepIndex: number) => void;
|
|
6
|
+
export declare const clearSavedStep: (featureKey: string) => void;
|
|
3
7
|
interface UseOnboardingTourOptions {
|
|
4
8
|
dependsOn?: string;
|
|
5
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOnboardingTour.d.ts","sourceRoot":"","sources":["../../../src/components/OnboardingTour/useOnboardingTour.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useOnboardingTour.d.ts","sourceRoot":"","sources":["../../../src/components/OnboardingTour/useOnboardingTour.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,GAAG,IAAI,KAAG,IAE3D,CAAC;AA4CF,eAAO,MAAM,qBAAqB,GAAI,YAAY,MAAM,KAAG,OAE1D,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,KAAG,IAUpD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,YAAY,MAAM,KAAG,MAAM,GAAG,SAI/D,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,YAAY,MAAM,EAAE,WAAW,MAAM,KAAG,IAIrE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,KAAG,IAInD,CAAC;AAEF,UAAU,wBAAwB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,uBAAuB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,GAC5B,YAAY,MAAM,EAClB,UAAU,wBAAwB,KACjC,uBAyDF,CAAC"}
|