@layers-app/shared 0.2.5 → 0.2.6
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/assets/svg/flags/es.svg.js +4 -0
- package/dist/assets/svg/flags/ru.svg.js +4 -0
- package/dist/assets/svg/flags/us.svg.js +4 -0
- package/dist/assets/svg/globeIcon.svg.js +5 -0
- package/dist/assets/svg/socials/github.svg.js +5 -0
- package/dist/assets/svg/socials/instagram.svg.js +5 -0
- package/dist/assets/svg/socials/x.svg.js +5 -0
- package/dist/assets/svg/socials/youtube.svg.js +5 -0
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +30 -30
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.js +45 -42
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +1 -0
- package/dist/components/AppContainer/types.d.ts +1 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.d.ts +33 -2
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +161 -110
- package/dist/components/FilePicker/FilePicker.module.css.js +9 -7
- package/dist/components/FilePicker/FilePickerGoogleDrive.d.ts +22 -0
- package/dist/components/FilePicker/FilePickerGoogleDrive.d.ts.map +1 -0
- package/dist/components/FilePicker/FilePickerGoogleDrive.js +86 -0
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +69 -52
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.js +15 -15
- package/dist/components/FormViewer/hooks/useInterpolateText.js +3 -3
- package/dist/components/FormViewer/store/formStore.js +3 -3
- package/dist/components/FormViewer/store/selectors.js +1 -1
- package/dist/components/GroupAvatar/index.d.ts +1 -0
- package/dist/components/GroupAvatar/index.d.ts.map +1 -1
- package/dist/components/GroupAvatar/index.js +9 -8
- package/dist/components/ImageCropper/ImageCropper.d.ts +19 -0
- package/dist/components/ImageCropper/ImageCropper.d.ts.map +1 -0
- package/dist/components/ImageCropper/ImageCropper.js +356 -0
- package/dist/components/ImageCropper/ImageCropper.module.css.js +51 -0
- package/dist/components/ImageCropper/cropUtils.d.ts +22 -0
- package/dist/components/ImageCropper/cropUtils.d.ts.map +1 -0
- package/dist/components/ImageCropper/cropUtils.js +42 -0
- package/dist/components/ImageCropper/index.d.ts +4 -0
- package/dist/components/ImageCropper/index.d.ts.map +1 -0
- package/dist/components/ImageCropper/useCropInteraction.d.ts +28 -0
- package/dist/components/ImageCropper/useCropInteraction.d.ts.map +1 -0
- package/dist/components/ImageCropper/useCropInteraction.js +76 -0
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts +21 -0
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.js +73 -0
- package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +19 -0
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts +6 -0
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.js +60 -0
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts +6 -0
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.js +21 -0
- package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.d.ts +6 -0
- package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.js +35 -0
- package/dist/components/IntegrationFlowAnimation/icons/index.d.ts +4 -0
- package/dist/components/IntegrationFlowAnimation/icons/index.d.ts.map +1 -0
- package/dist/components/IntegrationFlowAnimation/index.d.ts +5 -0
- package/dist/components/IntegrationFlowAnimation/index.d.ts.map +1 -0
- package/dist/components/LanguagePicker/LanguagePicker.d.ts +2 -1
- package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
- package/dist/components/LanguagePicker/LanguagePicker.js +26 -22
- package/dist/components/MediaLibrary/MediaLibrary.d.ts +3 -0
- package/dist/components/MediaLibrary/MediaLibrary.d.ts.map +1 -0
- package/dist/components/MediaLibrary/MediaLibrary.js +93 -0
- package/dist/components/MediaLibrary/MediaLibrary.module.css.js +17 -0
- package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.d.ts +8 -0
- package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.d.ts.map +1 -0
- package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.js +22 -0
- package/dist/components/MediaLibrary/MediaLibraryBrowser.d.ts +12 -0
- package/dist/components/MediaLibrary/MediaLibraryBrowser.d.ts.map +1 -0
- package/dist/components/MediaLibrary/MediaLibraryBrowser.js +52 -0
- package/dist/components/MediaLibrary/MediaLibraryRow.d.ts +9 -0
- package/dist/components/MediaLibrary/MediaLibraryRow.d.ts.map +1 -0
- package/dist/components/MediaLibrary/MediaLibraryRow.js +29 -0
- package/dist/components/MediaLibrary/index.d.ts +4 -0
- package/dist/components/MediaLibrary/index.d.ts.map +1 -0
- package/dist/components/MediaLibrary/types.d.ts +31 -0
- package/dist/components/MediaLibrary/types.d.ts.map +1 -0
- package/dist/components/NoData/NoData.d.ts +6 -1
- package/dist/components/NoData/NoData.d.ts.map +1 -1
- package/dist/components/NoData/NoData.js +85 -82
- package/dist/components/SettingsSection/index.d.ts +12 -0
- package/dist/components/SettingsSection/index.d.ts.map +1 -0
- package/dist/components/SettingsSection/index.js +36 -0
- package/dist/components/SettingsSection/styles.module.css.js +7 -0
- package/dist/components/SocialLinkRow/index.d.ts +11 -0
- package/dist/components/SocialLinkRow/index.d.ts.map +1 -0
- package/dist/components/SocialLinkRow/index.js +109 -0
- package/dist/components/SortableList/components/SortableItem/SortableItem.js +3 -3
- package/dist/components/StorageUsageProgress/index.js +26 -24
- package/dist/components/TimezonePicker/index.d.ts +9 -0
- package/dist/components/TimezonePicker/index.d.ts.map +1 -0
- package/dist/components/TimezonePicker/index.js +90 -0
- package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceItem.js +18 -17
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +70 -69
- package/dist/components/modals/RemoveConfirmModal.js +1 -1
- package/dist/components/table/components/TableHeaders.js +3 -3
- package/dist/components/table/components/TablePanel.js +1 -1
- package/dist/components/table/helpers/columns.js +3 -3
- package/dist/components/table/hooks/TableProvider.js +3 -3
- package/dist/components/table/selectors.js +6 -6
- package/dist/helpers/getFileType.d.ts +1 -2
- package/dist/helpers/getFileType.d.ts.map +1 -1
- package/dist/helpers/getFileType.js +5 -6
- package/dist/helpers/showNotifications.d.ts +14 -3
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +152 -61
- package/dist/helpers/showNotifications.module.css.js +29 -0
- package/dist/helpers/timezones.d.ts +12 -0
- package/dist/helpers/timezones.d.ts.map +1 -0
- package/dist/helpers/timezones.js +59 -0
- package/dist/hooks/useNumberQueryParam.js +3 -3
- package/dist/hooks/useVideoUploadGuard.d.ts +2 -0
- package/dist/hooks/useVideoUploadGuard.d.ts.map +1 -0
- package/dist/hooks/useVideoUploadGuard.js +24 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +449 -406
- package/dist/lang/locales/ui_en.json.js +24 -22
- package/dist/lang/locales/ui_es.json.js +20 -18
- package/dist/lang/locales/ui_ru.json.js +20 -18
- package/dist/lib/contentImport/index.d.ts +4 -0
- package/dist/lib/contentImport/index.d.ts.map +1 -0
- package/dist/lib/contentImport/lexicalSerializer.d.ts +19 -0
- package/dist/lib/contentImport/lexicalSerializer.d.ts.map +1 -0
- package/dist/lib/contentImport/lexicalSerializer.js +215 -0
- package/dist/lib/contentImport/types.d.ts +161 -0
- package/dist/lib/contentImport/types.d.ts.map +1 -0
- package/dist/lib/contentImport/utils.d.ts +35 -0
- package/dist/lib/contentImport/utils.d.ts.map +1 -0
- package/dist/lib/contentImport/utils.js +145 -0
- package/dist/node_modules/countries-and-timezones/esm/index.js +4031 -0
- package/dist/store/plansModal.d.ts.map +1 -1
- package/dist/store/plansModal.js +8 -7
- package/dist/utils/formatStorage.d.ts +7 -1
- package/dist/utils/formatStorage.d.ts.map +1 -1
- package/dist/utils/formatStorage.js +10 -5
- package/dist/utils/getCroppedBlob.d.ts +3 -0
- package/dist/utils/getCroppedBlob.d.ts.map +1 -0
- package/dist/utils/getCroppedBlob.js +21 -0
- package/package.json +1 -1
- package/dist/assets/images/flags/es.svg.js +0 -4
- package/dist/assets/images/flags/ru.svg.js +0 -4
- package/dist/assets/images/flags/us.svg.js +0 -4
- package/dist/components/PaymentSuccess/PaymentSuccess.d.ts +0 -2
- package/dist/components/PaymentSuccess/PaymentSuccess.d.ts.map +0 -1
- package/dist/components/PaymentSuccess/PaymentSuccess.js +0 -41
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, useMemo as v } from "react";
|
|
3
|
+
import { useTranslation as S } from "react-i18next";
|
|
4
|
+
import { Tick02Icon as w, Search01Icon as x } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon as u } from "@hugeicons/react";
|
|
6
|
+
import C from "../../assets/svg/globeIcon.svg.js";
|
|
7
|
+
import { useCombobox as I, Combobox as t, Flex as T, InputBase as D, Input as k, Stack as y, TextInput as z, ScrollArea as O } from "@mantine/core";
|
|
8
|
+
import { getTimeZones as P } from "../../helpers/timezones.js";
|
|
9
|
+
const G = ({
|
|
10
|
+
label: m,
|
|
11
|
+
timezone: h,
|
|
12
|
+
onChange: d,
|
|
13
|
+
...f
|
|
14
|
+
}) => {
|
|
15
|
+
const [c, a] = p(""), g = v(() => P(), []), { t: i } = S(), n = I({
|
|
16
|
+
onDropdownClose: () => {
|
|
17
|
+
n.resetSelectedOption(), n.focusTarget(), a("");
|
|
18
|
+
},
|
|
19
|
+
onDropdownOpen: () => {
|
|
20
|
+
n.focusSearchInput();
|
|
21
|
+
}
|
|
22
|
+
}), [r, b] = p(h), s = g.filter(
|
|
23
|
+
(o) => o.label.toLowerCase().includes(c.toLowerCase().trim())
|
|
24
|
+
).map((o) => /* @__PURE__ */ e(
|
|
25
|
+
t.Option,
|
|
26
|
+
{
|
|
27
|
+
active: r === o.value,
|
|
28
|
+
value: o.value,
|
|
29
|
+
children: /* @__PURE__ */ l(T, { justify: "space-between", align: "center", children: [
|
|
30
|
+
o.label,
|
|
31
|
+
r === o.value ? /* @__PURE__ */ e(
|
|
32
|
+
u,
|
|
33
|
+
{
|
|
34
|
+
color: "var(--mantine-primary-color-filled)",
|
|
35
|
+
size: 16,
|
|
36
|
+
icon: w
|
|
37
|
+
}
|
|
38
|
+
) : null
|
|
39
|
+
] })
|
|
40
|
+
},
|
|
41
|
+
o.value
|
|
42
|
+
));
|
|
43
|
+
return /* @__PURE__ */ l(
|
|
44
|
+
t,
|
|
45
|
+
{
|
|
46
|
+
position: "bottom",
|
|
47
|
+
store: n,
|
|
48
|
+
withinPortal: !1,
|
|
49
|
+
onOptionSubmit: (o) => {
|
|
50
|
+
b(o), d(o), n.closeDropdown();
|
|
51
|
+
},
|
|
52
|
+
...f,
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ e(t.Target, { children: /* @__PURE__ */ e(
|
|
55
|
+
D,
|
|
56
|
+
{
|
|
57
|
+
label: m,
|
|
58
|
+
value: r || "",
|
|
59
|
+
component: "button",
|
|
60
|
+
type: "button",
|
|
61
|
+
leftSection: /* @__PURE__ */ e(C, { width: 16, height: 16 }),
|
|
62
|
+
flex: 1,
|
|
63
|
+
pointer: !0,
|
|
64
|
+
rightSection: /* @__PURE__ */ e(t.Chevron, {}),
|
|
65
|
+
onClick: () => n.toggleDropdown(),
|
|
66
|
+
rightSectionPointerEvents: "none",
|
|
67
|
+
children: r || /* @__PURE__ */ e(k.Placeholder, { children: i("pickValue") })
|
|
68
|
+
}
|
|
69
|
+
) }),
|
|
70
|
+
/* @__PURE__ */ e(t.Dropdown, { children: /* @__PURE__ */ l(y, { gap: 12, children: [
|
|
71
|
+
/* @__PURE__ */ e(
|
|
72
|
+
z,
|
|
73
|
+
{
|
|
74
|
+
variant: "filled",
|
|
75
|
+
size: "sm",
|
|
76
|
+
placeholder: `${i("search")}...`,
|
|
77
|
+
value: c,
|
|
78
|
+
onChange: (o) => a(o.currentTarget.value),
|
|
79
|
+
leftSection: /* @__PURE__ */ e(u, { color: "dimmed", size: 16, icon: x })
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ e(t.Options, { children: /* @__PURE__ */ e(O.Autosize, { mah: 200, type: "scroll", children: s.length > 0 ? s : /* @__PURE__ */ e(t.Empty, { children: i("nothingData") }) }) })
|
|
83
|
+
] }) })
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
export {
|
|
89
|
+
G as TimezonePicker
|
|
90
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceItem.d.ts","sourceRoot":"","sources":["../../../src/components/WorkspaceMenu/WorkspaceItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkspaceItem.d.ts","sourceRoot":"","sources":["../../../src/components/WorkspaceMenu/WorkspaceItem.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,UAAU,kBAAkB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa;IAClE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;IACzB,SAAS,EAAE,CAAC,CAAC;CACd;AAED,eAAO,MAAM,aAAa,GAAI,wBAAwB,kBAAkB,4CAuCvE,CAAC"}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTranslation as
|
|
1
|
+
import { jsx as t, jsxs as n, Fragment as s } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as l } from "react-i18next";
|
|
3
3
|
import { Menu as c, Flex as o, Box as i, Text as m } from "@mantine/core";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { useAppContainerDataStore as p } from "../AppContainer/hooks/useAppContainerDataStore.js";
|
|
5
|
+
import { WorkspaceAvatar as h } from "../WorkspaceAvatar/WorkspaceAvatar.js";
|
|
6
|
+
const g = ({ workspace: e, onClick: a }) => {
|
|
7
|
+
const { t: r } = l("workspaceMenu");
|
|
8
|
+
return /* @__PURE__ */ t(
|
|
8
9
|
c.Item,
|
|
9
10
|
{
|
|
10
11
|
p: 4,
|
|
11
|
-
onClick: () =>
|
|
12
|
+
onClick: () => a?.(e),
|
|
12
13
|
component: "a",
|
|
13
14
|
styles: { itemLabel: { minWidth: 0 } },
|
|
14
|
-
children: /* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
!
|
|
19
|
-
|
|
20
|
-
r("member", { count:
|
|
21
|
-
/* @__PURE__ */
|
|
15
|
+
children: /* @__PURE__ */ n(o, { gap: 12, children: [
|
|
16
|
+
/* @__PURE__ */ t(h, { workspace: e, size: 36 }),
|
|
17
|
+
/* @__PURE__ */ n(i, { flex: 1, miw: 0, children: [
|
|
18
|
+
/* @__PURE__ */ t(m, { truncate: !0, size: "sm", fw: 500, c: "var(--mantine-color-bright", children: e.workspaceName }),
|
|
19
|
+
!e?.invitation && /* @__PURE__ */ t(m, { c: "gray", fw: 500, size: "xs", component: "span", children: /* @__PURE__ */ n(o, { gap: 8, component: "span", children: [
|
|
20
|
+
e.totalMembers ? /* @__PURE__ */ n(s, { children: [
|
|
21
|
+
r("member", { count: e.totalMembers }),
|
|
22
|
+
/* @__PURE__ */ t(
|
|
22
23
|
i,
|
|
23
24
|
{
|
|
24
25
|
w: 2,
|
|
@@ -29,7 +30,7 @@ const b = ({ workspace: n, onClick: l }) => {
|
|
|
29
30
|
}
|
|
30
31
|
)
|
|
31
32
|
] }) : null,
|
|
32
|
-
r(`plans.${
|
|
33
|
+
p.getState().isSaas && r(`plans.${e.plan}`)
|
|
33
34
|
] }) })
|
|
34
35
|
] })
|
|
35
36
|
] })
|
|
@@ -37,5 +38,5 @@ const b = ({ workspace: n, onClick: l }) => {
|
|
|
37
38
|
);
|
|
38
39
|
};
|
|
39
40
|
export {
|
|
40
|
-
|
|
41
|
+
g as WorkspaceItem
|
|
41
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceMenu.d.ts","sourceRoot":"","sources":["../../../src/components/WorkspaceMenu/WorkspaceMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AA6BpD,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,C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ACtB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,MAAM,EAAE,CAAC,CAAC;IACV,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,aAAa,EAAE,iHAWpD,iBAAiB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,4CAwE1C,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,aAAa,EAAE,gEAMtD,IAAI,CACL,kBAAkB,CAAC,CAAC,CAAC,EACrB,QAAQ,GAAG,eAAe,GAAG,cAAc,GAAG,aAAa,GAAG,SAAS,CACxE,4CA+DA,CAAC"}
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as t, jsx as e, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import { useState as L } from "react";
|
|
3
3
|
import { useTranslation as h } from "react-i18next";
|
|
4
4
|
import { Link as b } from "react-router-dom";
|
|
5
|
-
import { Setting07Icon as
|
|
6
|
-
import { HugeiconsIcon as
|
|
7
|
-
import {
|
|
5
|
+
import { Setting07Icon as N, UserMultiple02Icon as K, Add01Icon as T } from "@hugeicons/core-free-icons";
|
|
6
|
+
import { HugeiconsIcon as k } from "@hugeicons/react";
|
|
7
|
+
import { Stack as a, Flex as l, Text as m, Box as f, Button as S, Menu as p, Tooltip as D, Progress as P, ScrollArea as U } from "@mantine/core";
|
|
8
|
+
import { useAppContainerDataStore as w } from "../AppContainer/hooks/useAppContainerDataStore.js";
|
|
8
9
|
import { useMenu as B } from "../../hooks/useMenu.js";
|
|
9
|
-
import { formatStorage as z } from "../../utils/formatStorage.js";
|
|
10
|
-
import { Logotype as
|
|
11
|
-
import { WorkspaceAvatar as
|
|
12
|
-
import {
|
|
13
|
-
import { WorkspaceItem as O } from "./WorkspaceItem.js";
|
|
10
|
+
import { formatStoragePercent as F, formatStorage as z } from "../../utils/formatStorage.js";
|
|
11
|
+
import { Logotype as O } from "../Logotype.js";
|
|
12
|
+
import { WorkspaceAvatar as x } from "../WorkspaceAvatar/WorkspaceAvatar.js";
|
|
13
|
+
import { WorkspaceItem as E } from "./WorkspaceItem.js";
|
|
14
14
|
const ne = ({
|
|
15
15
|
children: r,
|
|
16
16
|
onCreate: i,
|
|
17
|
-
onClick:
|
|
18
|
-
active:
|
|
17
|
+
onClick: o,
|
|
18
|
+
active: n,
|
|
19
19
|
items: c,
|
|
20
20
|
workspaceLink: s,
|
|
21
|
-
settingsLink:
|
|
22
|
-
membersLink:
|
|
21
|
+
settingsLink: y,
|
|
22
|
+
membersLink: C,
|
|
23
23
|
isAnonym: I,
|
|
24
24
|
publicMode: W
|
|
25
25
|
}) => {
|
|
26
|
-
const { t:
|
|
26
|
+
const { t: A } = h("workspaceMenu"), { isMobile: u } = B(), [j, d] = L(!1);
|
|
27
27
|
return I || W ? /* @__PURE__ */ e(l, { w: "100%", justify: u ? "start" : "center", children: /* @__PURE__ */ e("a", { href: "/", children: /* @__PURE__ */ e(
|
|
28
|
-
|
|
28
|
+
O,
|
|
29
29
|
{
|
|
30
30
|
minified: !u,
|
|
31
31
|
w: u ? 65 : 24,
|
|
32
32
|
isLink: !1
|
|
33
33
|
}
|
|
34
|
-
) }) }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */
|
|
34
|
+
) }) }) : /* @__PURE__ */ e(M, { children: /* @__PURE__ */ t(
|
|
35
35
|
p,
|
|
36
36
|
{
|
|
37
|
-
opened:
|
|
37
|
+
opened: j,
|
|
38
38
|
onChange: d,
|
|
39
39
|
position: "right-start",
|
|
40
40
|
keepMounted: !1,
|
|
41
41
|
clickOutsideEvents: ["mousedown", "click"],
|
|
42
42
|
offset: 17,
|
|
43
43
|
children: [
|
|
44
|
-
/* @__PURE__ */ e(p.Target, { children: r ?? /* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */ e(
|
|
46
|
-
/* @__PURE__ */ e(l, { justify: "space-between", align: "center", w: "100%", miw: 0, children: /* @__PURE__ */ e(
|
|
44
|
+
/* @__PURE__ */ e(p.Target, { children: r ?? /* @__PURE__ */ t(l, { onClick: () => d((g) => !g), children: [
|
|
45
|
+
/* @__PURE__ */ e(x, { size: 30, workspace: n }),
|
|
46
|
+
/* @__PURE__ */ e(l, { justify: "space-between", align: "center", w: "100%", miw: 0, children: /* @__PURE__ */ e(D, { label: n.workspaceName, children: /* @__PURE__ */ e(m, { size: "md", truncate: !0, children: n?.workspaceName || A("noName") }) }) })
|
|
47
47
|
] }) }),
|
|
48
|
-
/* @__PURE__ */ e(p.Dropdown, { w: 338, children: /* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ e(p.Dropdown, { w: 338, children: /* @__PURE__ */ t(a, { gap: 6, children: [
|
|
49
49
|
/* @__PURE__ */ e(
|
|
50
|
-
|
|
50
|
+
H,
|
|
51
51
|
{
|
|
52
|
-
active:
|
|
52
|
+
active: n,
|
|
53
53
|
workspaceLink: s,
|
|
54
|
-
settingsLink:
|
|
55
|
-
membersLink:
|
|
54
|
+
settingsLink: y,
|
|
55
|
+
membersLink: C,
|
|
56
56
|
onClose: () => d(!1)
|
|
57
57
|
}
|
|
58
58
|
),
|
|
59
59
|
/* @__PURE__ */ e(f, { px: 4, children: /* @__PURE__ */ e(p.Divider, {}) }),
|
|
60
60
|
/* @__PURE__ */ e(
|
|
61
|
-
|
|
61
|
+
$,
|
|
62
62
|
{
|
|
63
63
|
onCreate: i,
|
|
64
|
-
onClick:
|
|
64
|
+
onClick: o,
|
|
65
65
|
items: c.filter(
|
|
66
|
-
(
|
|
66
|
+
(g) => g.workspaceId !== n?.workspaceId
|
|
67
67
|
),
|
|
68
68
|
onClose: () => d(!1)
|
|
69
69
|
}
|
|
@@ -72,21 +72,21 @@ const ne = ({
|
|
|
72
72
|
]
|
|
73
73
|
}
|
|
74
74
|
) });
|
|
75
|
-
},
|
|
75
|
+
}, H = ({
|
|
76
76
|
active: r,
|
|
77
77
|
workspaceLink: i,
|
|
78
|
-
settingsLink:
|
|
79
|
-
membersLink:
|
|
78
|
+
settingsLink: o,
|
|
79
|
+
membersLink: n,
|
|
80
80
|
onClose: c
|
|
81
81
|
}) => {
|
|
82
82
|
const { t: s } = h("workspaceMenu");
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
/* @__PURE__ */ e(
|
|
86
|
-
/* @__PURE__ */
|
|
83
|
+
return /* @__PURE__ */ t(a, { p: 4, pb: 5, gap: 12, children: [
|
|
84
|
+
/* @__PURE__ */ t(l, { gap: 10, children: [
|
|
85
|
+
/* @__PURE__ */ e(x, { size: 48, workspace: r }),
|
|
86
|
+
/* @__PURE__ */ t(a, { gap: 0, miw: 0, children: [
|
|
87
87
|
/* @__PURE__ */ e(m, { truncate: !0, size: "md", fw: 500, c: "var(--mantine-color-bright)", children: r.workspaceName || s("noName") }),
|
|
88
|
-
/* @__PURE__ */ e(m, { c: "gray", size: "sm", fw: 500, component: "span", children: /* @__PURE__ */
|
|
89
|
-
r.totalMembers ? /* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ e(m, { c: "gray", size: "sm", fw: 500, component: "span", children: /* @__PURE__ */ t(l, { gap: 6, component: "span", children: [
|
|
89
|
+
r.totalMembers ? /* @__PURE__ */ t(M, { children: [
|
|
90
90
|
s("member", { count: r.totalMembers }),
|
|
91
91
|
/* @__PURE__ */ e(
|
|
92
92
|
f,
|
|
@@ -99,52 +99,53 @@ const ne = ({
|
|
|
99
99
|
}
|
|
100
100
|
)
|
|
101
101
|
] }) : null,
|
|
102
|
-
s(`plans.${r.plan}`)
|
|
102
|
+
w.getState().isSaas && s(`plans.${r.plan}`)
|
|
103
103
|
] }) })
|
|
104
104
|
] })
|
|
105
105
|
] }),
|
|
106
|
-
/* @__PURE__ */ e(
|
|
107
|
-
/* @__PURE__ */
|
|
106
|
+
w.getState().isSaas && /* @__PURE__ */ e(R, { active: r }),
|
|
107
|
+
/* @__PURE__ */ t(l, { children: [
|
|
108
108
|
/* @__PURE__ */ e(
|
|
109
|
-
|
|
109
|
+
S,
|
|
110
110
|
{
|
|
111
111
|
flex: 1,
|
|
112
112
|
component: b,
|
|
113
113
|
variant: "default",
|
|
114
114
|
size: "sm",
|
|
115
|
-
leftSection: /* @__PURE__ */ e(
|
|
116
|
-
to: i ??
|
|
115
|
+
leftSection: /* @__PURE__ */ e(k, { size: 16, icon: N }),
|
|
116
|
+
to: i ?? o ?? "",
|
|
117
117
|
onClick: c,
|
|
118
118
|
children: s("settings")
|
|
119
119
|
}
|
|
120
120
|
),
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
n && w.getState().isSaas && /* @__PURE__ */ e(
|
|
122
|
+
S,
|
|
123
123
|
{
|
|
124
124
|
flex: 1,
|
|
125
125
|
component: b,
|
|
126
126
|
variant: "default",
|
|
127
127
|
size: "sm",
|
|
128
|
-
leftSection: /* @__PURE__ */ e(
|
|
129
|
-
to:
|
|
128
|
+
leftSection: /* @__PURE__ */ e(k, { size: 16, icon: K }),
|
|
129
|
+
to: n,
|
|
130
130
|
onClick: c,
|
|
131
131
|
children: s("members")
|
|
132
132
|
}
|
|
133
133
|
)
|
|
134
134
|
] })
|
|
135
135
|
] });
|
|
136
|
-
},
|
|
136
|
+
}, R = ({
|
|
137
137
|
active: r
|
|
138
138
|
}) => {
|
|
139
|
-
const { t: i } = h("workspaceMenu"),
|
|
140
|
-
return /* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
/* @__PURE__ */
|
|
139
|
+
const { t: i } = h("workspaceMenu"), o = (r?.storageUsedKb || 0) / (r?.storageLimitKb || 1), n = F(o * 100);
|
|
140
|
+
return /* @__PURE__ */ t(a, { gap: 4, w: "100%", children: [
|
|
141
|
+
/* @__PURE__ */ t(l, { justify: "space-between", children: [
|
|
142
|
+
/* @__PURE__ */ t(m, { size: "sm", fw: 500, children: [
|
|
143
143
|
i("usedStorage"),
|
|
144
144
|
": ",
|
|
145
|
-
|
|
145
|
+
n,
|
|
146
|
+
"%"
|
|
146
147
|
] }),
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ t(m, { size: "sm", fw: 500, c: "gray", children: [
|
|
148
149
|
z(r?.storageUsedKb),
|
|
149
150
|
" ",
|
|
150
151
|
i("of"),
|
|
@@ -152,20 +153,20 @@ const ne = ({
|
|
|
152
153
|
z(r?.storageLimitKb)
|
|
153
154
|
] })
|
|
154
155
|
] }),
|
|
155
|
-
/* @__PURE__ */ e(
|
|
156
|
+
/* @__PURE__ */ e(P, { h: 4, value: o * 100 })
|
|
156
157
|
] });
|
|
157
|
-
},
|
|
158
|
+
}, $ = ({
|
|
158
159
|
onCreate: r,
|
|
159
160
|
onClick: i,
|
|
160
|
-
items:
|
|
161
|
-
onClose:
|
|
161
|
+
items: o,
|
|
162
|
+
onClose: n
|
|
162
163
|
}) => {
|
|
163
164
|
const { t: c } = h("workspaceMenu");
|
|
164
|
-
return /* @__PURE__ */
|
|
165
|
-
|
|
165
|
+
return /* @__PURE__ */ t(a, { gap: 12, children: [
|
|
166
|
+
o?.length > 0 && /* @__PURE__ */ t(a, { gap: 0, children: [
|
|
166
167
|
/* @__PURE__ */ e(p.Label, { fw: 600, px: 4, py: 5, fz: "sm", children: c("switchWorkspace") }),
|
|
167
168
|
/* @__PURE__ */ e(f, { w: "100%", px: 4, children: /* @__PURE__ */ e(
|
|
168
|
-
|
|
169
|
+
U.Autosize,
|
|
169
170
|
{
|
|
170
171
|
mah: 200,
|
|
171
172
|
w: "100%",
|
|
@@ -174,14 +175,14 @@ const ne = ({
|
|
|
174
175
|
type: "always",
|
|
175
176
|
styles: {
|
|
176
177
|
viewport: {
|
|
177
|
-
paddingRight:
|
|
178
|
+
paddingRight: o.length > 4 ? 12 : 0
|
|
178
179
|
},
|
|
179
180
|
content: {
|
|
180
181
|
minWidth: 0
|
|
181
182
|
}
|
|
182
183
|
},
|
|
183
|
-
children: /* @__PURE__ */ e(a, { gap: 6, miw: 0, children:
|
|
184
|
-
|
|
184
|
+
children: /* @__PURE__ */ e(a, { gap: 6, miw: 0, children: o.map((s) => /* @__PURE__ */ e(
|
|
185
|
+
E,
|
|
185
186
|
{
|
|
186
187
|
workspace: s,
|
|
187
188
|
onClick: i
|
|
@@ -192,21 +193,21 @@ const ne = ({
|
|
|
192
193
|
) })
|
|
193
194
|
] }),
|
|
194
195
|
/* @__PURE__ */ e(f, { p: 4, pt: 0, children: /* @__PURE__ */ e(
|
|
195
|
-
|
|
196
|
+
S,
|
|
196
197
|
{
|
|
197
198
|
fullWidth: !0,
|
|
198
199
|
variant: "default",
|
|
199
200
|
size: "sm",
|
|
200
201
|
onClick: () => {
|
|
201
|
-
r?.(),
|
|
202
|
+
r?.(), n?.();
|
|
202
203
|
},
|
|
203
|
-
leftSection: /* @__PURE__ */ e(
|
|
204
|
+
leftSection: /* @__PURE__ */ e(k, { icon: T, size: 16 }),
|
|
204
205
|
children: c("newWorkspace")
|
|
205
206
|
}
|
|
206
207
|
) })
|
|
207
208
|
] });
|
|
208
209
|
};
|
|
209
210
|
export {
|
|
210
|
-
|
|
211
|
+
H as ActiveWorkspace,
|
|
211
212
|
ne as WorkspaceMenu
|
|
212
213
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as g, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Unlink03Icon as v } from "@hugeicons/core-free-icons";
|
|
3
3
|
import { HugeiconsIcon as y } from "@hugeicons/react";
|
|
4
4
|
import { Stack as C, Text as c } from "@mantine/core";
|
|
5
5
|
import { modals as a } from "@mantine/modals";
|
|
@@ -5,7 +5,7 @@ import { TABLE_ATTRIBUTES as t } from "../constants.js";
|
|
|
5
5
|
import { useTableStore as d } from "../hooks/useTableStore.js";
|
|
6
6
|
import { visibleColumnsBySideReselect as p } from "../selectors.js";
|
|
7
7
|
import { TableHeaderCell as g } from "./TableHeaderCell.js";
|
|
8
|
-
import {
|
|
8
|
+
import { getColumnId as E, getHeaderStyles as b } from "../helpers/columns.js";
|
|
9
9
|
const D = h(() => {
|
|
10
10
|
const { useStore: e } = d(), { left: i, base: n, right: r } = e(p);
|
|
11
11
|
return /* @__PURE__ */ c(x, { [t.HEADERS]: "", children: [
|
|
@@ -18,7 +18,7 @@ const D = h(() => {
|
|
|
18
18
|
return /* @__PURE__ */ o(
|
|
19
19
|
m,
|
|
20
20
|
{
|
|
21
|
-
style:
|
|
21
|
+
style: b(e),
|
|
22
22
|
[t.HEADER_GRID]: "",
|
|
23
23
|
children: e.map((r) => /* @__PURE__ */ o(
|
|
24
24
|
g,
|
|
@@ -26,7 +26,7 @@ const D = h(() => {
|
|
|
26
26
|
column: r,
|
|
27
27
|
sort: n
|
|
28
28
|
},
|
|
29
|
-
|
|
29
|
+
E(r.field)
|
|
30
30
|
))
|
|
31
31
|
}
|
|
32
32
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as p,
|
|
1
|
+
import { jsxs as p, Fragment as u, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { memo as g } from "react";
|
|
3
3
|
import { useTableStore as b } from "../hooks/useTableStore.js";
|
|
4
4
|
import { visibleRowsReselect as f, visibleColumnsBySideReselect as d, metaReselect as v } from "../selectors.js";
|
|
@@ -3,7 +3,7 @@ import E from "@emotion/styled";
|
|
|
3
3
|
import { ActionIcon as N, Checkbox as v } from "@mantine/core";
|
|
4
4
|
import { IconChevronDown as W, IconChevronRight as A } from "@tabler/icons-react";
|
|
5
5
|
import { isValid as h, format as p } from "date-fns";
|
|
6
|
-
import {
|
|
6
|
+
import { get as c, isNil as D, round as a, assignWith as R } from "lodash-es";
|
|
7
7
|
import { EXPAND_COLUMN_FIELD as g, SELECT_COLUMN_FIELD as m } from "../constants.js";
|
|
8
8
|
import { useTableStore as I } from "../hooks/useTableStore.js";
|
|
9
9
|
import { selectionReselect as T } from "../selectors.js";
|
|
@@ -65,7 +65,7 @@ const L = {
|
|
|
65
65
|
}, K = (e, t) => ({
|
|
66
66
|
...L,
|
|
67
67
|
...w(t?.type ?? e.type),
|
|
68
|
-
...
|
|
68
|
+
...R(
|
|
69
69
|
{},
|
|
70
70
|
e,
|
|
71
71
|
t,
|
|
@@ -177,7 +177,7 @@ const L = {
|
|
|
177
177
|
const r = e.aggregation;
|
|
178
178
|
if (!r || r.render) return null;
|
|
179
179
|
const n = t.map((i) => c(i, e.field)).map(s.parse).filter((i) => !isNaN(i));
|
|
180
|
-
return r.type === "sum" ? n.reduce((i, l) => i + l, 0) : r.type === "avg" ? n.reduce((i, l) => i + l, 0) / n.length : r.type === "min" ? Math.min(...n) : r.type === "max" ? Math.max(...n) : r.type === "count" ? t.map((l) => c(l, e.field)).filter((l) => !
|
|
180
|
+
return r.type === "sum" ? n.reduce((i, l) => i + l, 0) : r.type === "avg" ? n.reduce((i, l) => i + l, 0) / n.length : r.type === "min" ? Math.min(...n) : r.type === "max" ? Math.max(...n) : r.type === "count" ? t.map((l) => c(l, e.field)).filter((l) => !D(l)).length : null;
|
|
181
181
|
}, u = E.div``;
|
|
182
182
|
export {
|
|
183
183
|
J as filterPinnedColumns,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
const b =
|
|
2
|
+
import { useLayoutEffect as S, createContext as C } from "react";
|
|
3
|
+
const b = C(
|
|
4
4
|
null
|
|
5
5
|
), P = ({
|
|
6
6
|
children: h,
|
|
@@ -19,7 +19,7 @@ const b = S(
|
|
|
19
19
|
selection: c,
|
|
20
20
|
sorting: d,
|
|
21
21
|
expanding: f
|
|
22
|
-
}) => (
|
|
22
|
+
}) => (S(() => {
|
|
23
23
|
t.useStore.setState((o) => ({
|
|
24
24
|
...o,
|
|
25
25
|
props: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { set as h, get as w, chunk as A } from "lodash-es";
|
|
2
2
|
import { createSelector as a } from "reselect";
|
|
3
3
|
import { TABLE_AGGREGATION_ROW_ID as O } from "./constants.js";
|
|
4
|
-
import {
|
|
4
|
+
import { getAggregateValue as R, getAggregationColumns as b, getColumnId as T, isTechnicalColumn as x, mergeColumn as $, getSelectionColumn as N, getExpandingColumn as W } from "./helpers/columns.js";
|
|
5
5
|
const E = [], M = a(
|
|
6
6
|
[
|
|
7
7
|
(e) => e.props.rows,
|
|
@@ -102,11 +102,11 @@ const E = [], M = a(
|
|
|
102
102
|
(p) => !d.find((g) => g.field === p.field)
|
|
103
103
|
);
|
|
104
104
|
return [
|
|
105
|
-
...e ? [
|
|
106
|
-
...n ? [
|
|
105
|
+
...e ? [N({ selected: r, pinned: c, api: o })] : [],
|
|
106
|
+
...n ? [W({ expanded: l, pinned: c, api: o })] : [],
|
|
107
107
|
...d,
|
|
108
108
|
...f
|
|
109
|
-
].map((p) =>
|
|
109
|
+
].map((p) => $(p, t[p.field]));
|
|
110
110
|
}
|
|
111
111
|
), C = a(
|
|
112
112
|
[v],
|
|
@@ -123,7 +123,7 @@ const E = [], M = a(
|
|
|
123
123
|
})
|
|
124
124
|
), G = a(
|
|
125
125
|
[v],
|
|
126
|
-
(e) => e.reduce((r, n) => (r[n.field] = n, r[
|
|
126
|
+
(e) => e.reduce((r, n) => (r[n.field] = n, r[T(n.field)] = n, r), {})
|
|
127
127
|
), I = a(
|
|
128
128
|
[
|
|
129
129
|
C,
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const getFileType: (mimeType: string, mode?: appMode) => "other" | "presentation" | "documents" | "folder" | "media" | "xlsx" | "docx" | "pptx" | "diagram" | "archieve";
|
|
1
|
+
export declare const getFileType: (mimeType: string, isSaas?: boolean) => "other" | "presentation" | "documents" | "folder" | "media" | "xlsx" | "docx" | "pptx" | "diagram" | "archieve";
|
|
3
2
|
//# sourceMappingURL=getFileType.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFileType.d.ts","sourceRoot":"","sources":["../../src/helpers/getFileType.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"getFileType.d.ts","sourceRoot":"","sources":["../../src/helpers/getFileType.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,EAAE,SAAQ,OAAc,oHAqCnE,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
const a = (e, t = "SAAS") => {
|
|
1
|
+
const n = (e, t = !0) => {
|
|
3
2
|
if (e.includes("text"))
|
|
4
3
|
return "documents";
|
|
5
4
|
if (e.includes("image") || e.includes("video"))
|
|
@@ -14,11 +13,11 @@ const a = (e, t = "SAAS") => {
|
|
|
14
13
|
case "application/excel":
|
|
15
14
|
return "documents";
|
|
16
15
|
case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":
|
|
17
|
-
return
|
|
16
|
+
return t ? "documents" : "xlsx";
|
|
18
17
|
case "application/vnd.openxmlformats-officedocument.wordprocessingml.document":
|
|
19
|
-
return
|
|
18
|
+
return t ? "documents" : "docx";
|
|
20
19
|
case "application/vnd.openxmlformats-officedocument.presentationml.presentation":
|
|
21
|
-
return
|
|
20
|
+
return t ? "presentation" : "pptx";
|
|
22
21
|
case "application/slides":
|
|
23
22
|
return "media";
|
|
24
23
|
case "audio/mpeg":
|
|
@@ -36,5 +35,5 @@ const a = (e, t = "SAAS") => {
|
|
|
36
35
|
}
|
|
37
36
|
};
|
|
38
37
|
export {
|
|
39
|
-
|
|
38
|
+
n as getFileType
|
|
40
39
|
};
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { NotificationData } from '@mantine/notifications';
|
|
2
3
|
type MessageType = string | number | NotificationData;
|
|
4
|
+
export interface NotificationAction {
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
variant?: 'filled' | 'default';
|
|
8
|
+
}
|
|
9
|
+
export type ExtendedNotificationData = Omit<NotificationData, 'message'> & {
|
|
10
|
+
message?: ReactNode;
|
|
11
|
+
actions?: NotificationAction[];
|
|
12
|
+
};
|
|
3
13
|
export declare const showRequestNotifications: <Response, Request extends Promise<Response> = Promise<Response>>(request: Request, options?: {
|
|
4
14
|
notifyId?: string;
|
|
5
15
|
successMsg?: ((res: Response) => MessageType) | MessageType;
|
|
6
16
|
errorMsg?: ((err: any) => MessageType) | MessageType;
|
|
7
17
|
}) => Promise<any>;
|
|
8
|
-
export declare const showMessageNotification: (props:
|
|
9
|
-
export declare const showSuccessNotification: (props:
|
|
10
|
-
export declare const
|
|
18
|
+
export declare const showMessageNotification: (props: ExtendedNotificationData) => void;
|
|
19
|
+
export declare const showSuccessNotification: (props: ExtendedNotificationData) => void;
|
|
20
|
+
export declare const showWarningNotification: (props: ExtendedNotificationData) => void;
|
|
21
|
+
export declare const showErrorNotification: (props: ExtendedNotificationData) => void;
|
|
11
22
|
export {};
|
|
12
23
|
//# sourceMappingURL=showNotifications.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"showNotifications.d.ts","sourceRoot":"","sources":["../../src/helpers/showNotifications.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"showNotifications.d.ts","sourceRoot":"","sources":["../../src/helpers/showNotifications.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAUvD,OAAO,EACL,gBAAgB,EAGjB,MAAM,wBAAwB,CAAC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