@layers-app/shared 0.2.5 → 0.2.7
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/AppSidebarButton.d.ts +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +4 -4
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +22 -22
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +25 -25
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +40 -40
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +1 -1
- 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 +49 -43
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +4 -2
- package/dist/components/AppContainer/types.d.ts +2 -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/components/OneSlideLayput.js +39 -37
- package/dist/components/FormViewer/hooks/useCreateFormContext.d.ts.map +1 -1
- package/dist/components/FormViewer/hooks/useCreateFormContext.js +10 -10
- 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/formStoreApi.js +13 -13
- 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 +358 -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 +44 -31
- package/dist/components/LanguagePicker/LanguagePicker.module.css.js +6 -4
- 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/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +53 -50
- package/dist/components/NavMenu/types.d.ts +1 -0
- package/dist/components/NavMenu/types.d.ts.map +1 -1
- 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 +131 -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 +91 -0
- package/dist/components/UserAvatar/index.d.ts.map +1 -1
- package/dist/components/UserAvatar/index.js +11 -10
- 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/showFeatureFeedback.d.ts +16 -0
- package/dist/helpers/showFeatureFeedback.d.ts.map +1 -0
- package/dist/helpers/showFeatureFeedback.js +109 -0
- package/dist/helpers/showFeatureFeedback.module.css.js +9 -0
- package/dist/helpers/showNotifications.d.ts +14 -3
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +120 -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/useFeatureFeedback.d.ts +23 -0
- package/dist/hooks/useFeatureFeedback.d.ts.map +1 -0
- package/dist/hooks/useFeatureFeedback.js +48 -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 +13 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +461 -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/lib/layersVisitData.d.ts +13 -0
- package/dist/lib/layersVisitData.d.ts.map +1 -0
- package/dist/lib/layersVisitData.js +37 -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,29 @@
|
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { memo as s } from "react";
|
|
3
|
+
import { Box as n, Group as a, Text as t } from "@mantine/core";
|
|
4
|
+
import { formatBytes as c } from "../../helpers/formatBytes.js";
|
|
5
|
+
import { getFileIcons as f } from "../../helpers/getFileIcons.js";
|
|
6
|
+
import { getFileType as p } from "../../helpers/getFileType.js";
|
|
7
|
+
import h from "./MediaLibrary.module.css.js";
|
|
8
|
+
const y = (e) => new Intl.DateTimeFormat("en-GB", {
|
|
9
|
+
day: "2-digit",
|
|
10
|
+
month: "short",
|
|
11
|
+
year: "numeric"
|
|
12
|
+
}).format(new Date(e)), T = s(
|
|
13
|
+
({ item: e, onFolderClick: m, onSelect: d }) => {
|
|
14
|
+
const r = e.type === "FOLDER", l = () => {
|
|
15
|
+
r ? m?.(e) : d?.(e);
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ i(n, { className: h.rowGrid, onClick: l, children: [
|
|
18
|
+
/* @__PURE__ */ i(a, { gap: "xs", wrap: "nowrap", style: { overflow: "hidden", minWidth: 0 }, children: [
|
|
19
|
+
/* @__PURE__ */ o(n, { style: { flexShrink: 0, height: 18 }, children: f(p(e.contentType || "", !0), r, 18) }),
|
|
20
|
+
/* @__PURE__ */ o(t, { fz: "sm", fw: r ? 500 : void 0, truncate: !0, children: e.title })
|
|
21
|
+
] }),
|
|
22
|
+
/* @__PURE__ */ o(t, { fz: "xs", c: "dimmed", children: y(e.updatedAt) }),
|
|
23
|
+
/* @__PURE__ */ o(t, { fz: "xs", c: "dimmed", children: r ? "—" : c(e.fileSize || 0) })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
export {
|
|
28
|
+
T as MediaLibraryRow
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MediaLibrary/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { FloatingPosition, PopoverProps } from '@mantine/core';
|
|
2
|
+
export interface MediaFile {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
type: 'FOLDER' | 'ATTACHMENT';
|
|
6
|
+
contentType: string;
|
|
7
|
+
fileSize: number;
|
|
8
|
+
updatedAt: string;
|
|
9
|
+
}
|
|
10
|
+
export interface BreadcrumbItem {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
}
|
|
14
|
+
export type MediaLibraryTab = 'disk' | 'favorites' | 'shared';
|
|
15
|
+
export interface MediaLibraryProps {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
items: MediaFile[];
|
|
18
|
+
isLoading?: boolean;
|
|
19
|
+
breadcrumbs?: BreadcrumbItem[];
|
|
20
|
+
activeTab?: MediaLibraryTab;
|
|
21
|
+
tabs?: MediaLibraryTab[];
|
|
22
|
+
onTabChange?: (tab: MediaLibraryTab) => void;
|
|
23
|
+
onFolderClick?: (folder: MediaFile) => void;
|
|
24
|
+
onBreadcrumbClick?: (crumb: BreadcrumbItem, index: number) => void;
|
|
25
|
+
onSelect?: (file: MediaFile) => void;
|
|
26
|
+
onOpenedChange?: (opened: boolean) => void;
|
|
27
|
+
width?: number;
|
|
28
|
+
position?: FloatingPosition;
|
|
29
|
+
popoverProps?: PopoverProps;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/MediaLibrary/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAEpE,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,GAAG,YAAY,CAAC;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE9D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;IAC/B,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,IAAI,CAAC,EAAE,eAAe,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;IAC7C,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,CAAC;IAC5C,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavMenuItem.d.ts","sourceRoot":"","sources":["../../../../src/components/NavMenu/components/NavMenuItem.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKhD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,oBAAoB,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,WAAW,8DAAgC,gBAAgB,6CAQtE,CAAC;
|
|
1
|
+
{"version":3,"file":"NavMenuItem.d.ts","sourceRoot":"","sources":["../../../../src/components/NavMenu/components/NavMenuItem.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKhD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,oBAAoB,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,WAAW,8DAAgC,gBAAgB,6CAQtE,CAAC;AAkPH,eAAO,MAAM,eAAe,GAAI,0CAI7B;IACD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,MAAM,CAAC;CAC9B,4CAiCA,CAAC"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as f, useRef as S, useEffect as k, useMemo as v } from "react";
|
|
3
3
|
import { useTranslation as g } from "react-i18next";
|
|
4
|
-
import { NavLink as
|
|
5
|
-
import { MoreHorizontalIcon as
|
|
4
|
+
import { NavLink as O } from "react-router-dom";
|
|
5
|
+
import { MoreHorizontalIcon as E, ArrowRight01Icon as M } from "@hugeicons/core-free-icons";
|
|
6
6
|
import { HugeiconsIcon as C } from "@hugeicons/react";
|
|
7
|
-
import { Flex as h, Loader as N, Text as w, FocusTrap as P, Tooltip as
|
|
7
|
+
import { Flex as h, Loader as N, Text as w, FocusTrap as P, Tooltip as I, Center as R } from "@mantine/core";
|
|
8
8
|
import { useForm as j } from "@mantine/form";
|
|
9
9
|
import { useClickOutside as z } from "@mantine/hooks";
|
|
10
10
|
import { useAsyncStatus as A } from "../../../hooks/useAsyncStatus.js";
|
|
11
11
|
import { useMenu as D } from "../../../hooks/useMenu.js";
|
|
12
12
|
import { appContainerStore as T } from "../../AppContainer/hooks/useAppContainerStore.js";
|
|
13
13
|
import { EmojiPicker as F } from "../../EmojiPicker/EmojiPicker.js";
|
|
14
|
-
import { EntityIcon as
|
|
14
|
+
import { EntityIcon as b } from "../../EntityIcon.js";
|
|
15
15
|
import { NavMenu as L } from "../NavMenu.js";
|
|
16
|
-
import { useNavMenuStore as
|
|
16
|
+
import { useNavMenuStore as m } from "../store.js";
|
|
17
17
|
import { NavMenuActionIcon as B } from "./NavMenuActionIcon.js";
|
|
18
18
|
import s from "../NavMenu.module.css.js";
|
|
19
|
-
const re =
|
|
20
|
-
const { useStore: r } =
|
|
21
|
-
return /* @__PURE__ */ n(
|
|
22
|
-
}), V =
|
|
23
|
-
const { api: a, useStore: r } =
|
|
19
|
+
const re = f(({ item: e, ignoreDepth: a }) => {
|
|
20
|
+
const { useStore: r } = m(), i = r((o) => o.editId === e.id);
|
|
21
|
+
return /* @__PURE__ */ n(x, { depth: a ? void 0 : e.depth, testId: e.testId, children: i ? /* @__PURE__ */ n($, { item: e }) : /* @__PURE__ */ n(V, { item: e }) });
|
|
22
|
+
}), V = f(({ item: e }) => {
|
|
23
|
+
const { api: a, useStore: r } = m(), i = r((t) => t.props.onClick), { isMobile: o } = D(), { t: l } = g("appContainer"), d = () => {
|
|
24
24
|
i ? i(e) : e.hasChildren && a.toggleOpened(e);
|
|
25
25
|
}, c = e.data?.isReadOnly, p = e.href ? /* @__PURE__ */ n(
|
|
26
|
-
|
|
26
|
+
O,
|
|
27
27
|
{
|
|
28
28
|
to: e.href,
|
|
29
29
|
className: s.item,
|
|
@@ -31,9 +31,9 @@ const re = m(({ item: e, ignoreDepth: a }) => {
|
|
|
31
31
|
"data-has-children": e.hasChildren,
|
|
32
32
|
"data-read-only": c,
|
|
33
33
|
onClick: c ? void 0 : () => {
|
|
34
|
-
|
|
34
|
+
o && !e.hasChildren && T.api.closeToolbar();
|
|
35
35
|
},
|
|
36
|
-
children: /* @__PURE__ */ n(
|
|
36
|
+
children: /* @__PURE__ */ n(y, { item: e })
|
|
37
37
|
}
|
|
38
38
|
) : /* @__PURE__ */ n(
|
|
39
39
|
"div",
|
|
@@ -43,14 +43,14 @@ const re = m(({ item: e, ignoreDepth: a }) => {
|
|
|
43
43
|
"data-has-children": e.hasChildren,
|
|
44
44
|
"data-read-only": c,
|
|
45
45
|
onClick: c ? void 0 : d,
|
|
46
|
-
children: /* @__PURE__ */ n(
|
|
46
|
+
children: /* @__PURE__ */ n(y, { item: e })
|
|
47
47
|
}
|
|
48
48
|
);
|
|
49
|
-
return c ? /* @__PURE__ */ n(
|
|
50
|
-
}),
|
|
51
|
-
const { t: a } = g(), { useStore: r, api: i } =
|
|
52
|
-
() => ({ ...e.data, isOpen:
|
|
53
|
-
[
|
|
49
|
+
return c ? /* @__PURE__ */ n(I, { label: l("readOnlyAccess"), position: "right", withArrow: !0, children: p }) : p;
|
|
50
|
+
}), y = f(({ item: e }) => {
|
|
51
|
+
const { t: a } = g(), { useStore: r, api: i } = m(), o = r((t) => t.opened.includes(e.id)), l = r((t) => t.loading[e.id]), d = v(
|
|
52
|
+
() => ({ ...e.data, isOpen: o }),
|
|
53
|
+
[o, e.data]
|
|
54
54
|
), c = e.data?.isReadOnly, p = c ? 0.3 : void 0;
|
|
55
55
|
return /* @__PURE__ */ u(h, { gap: 4, h: "100%", flex: 1, miw: 0, justify: "space-between", children: [
|
|
56
56
|
/* @__PURE__ */ u(h, { gap: 4, miw: 0, flex: 1, children: [
|
|
@@ -58,8 +58,9 @@ const re = m(({ item: e, ignoreDepth: a }) => {
|
|
|
58
58
|
B,
|
|
59
59
|
{
|
|
60
60
|
className: s.chevron,
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
"data-cy": e.testId ? `${e.testId}-expand` : void 0,
|
|
62
|
+
onClick: (t) => {
|
|
63
|
+
t.preventDefault(), t.stopPropagation(), i.toggleOpened(e);
|
|
63
64
|
},
|
|
64
65
|
children: /* @__PURE__ */ n(
|
|
65
66
|
C,
|
|
@@ -67,16 +68,16 @@ const re = m(({ item: e, ignoreDepth: a }) => {
|
|
|
67
68
|
icon: M,
|
|
68
69
|
size: 16,
|
|
69
70
|
style: {
|
|
70
|
-
transform: `rotate(${
|
|
71
|
+
transform: `rotate(${o ? 90 : 0}deg)`,
|
|
71
72
|
transition: "transform 0.1s ease-in-out"
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
)
|
|
75
76
|
}
|
|
76
77
|
),
|
|
77
|
-
/* @__PURE__ */ n("div", { className: s.icon, style: { opacity: p }, children: /* @__PURE__ */ n(
|
|
78
|
+
/* @__PURE__ */ n("div", { className: s.icon, style: { opacity: p }, children: /* @__PURE__ */ n(b, { item: d }) }),
|
|
78
79
|
/* @__PURE__ */ n(
|
|
79
|
-
|
|
80
|
+
I,
|
|
80
81
|
{
|
|
81
82
|
disabled: e.title.length < 25,
|
|
82
83
|
label: e.title || a("noName"),
|
|
@@ -91,8 +92,8 @@ const re = m(({ item: e, ignoreDepth: a }) => {
|
|
|
91
92
|
fw: 500,
|
|
92
93
|
miw: 0,
|
|
93
94
|
c: "var(--mantine-color-text)",
|
|
94
|
-
onDoubleClick: (
|
|
95
|
-
r.getState().props.onEdit && !e?.isDisabledEditByDoubleClick && (
|
|
95
|
+
onDoubleClick: (t) => {
|
|
96
|
+
r.getState().props.onEdit && !e?.isDisabledEditByDoubleClick && (t.preventDefault(), t.stopPropagation(), i.startEditing(e.id));
|
|
96
97
|
},
|
|
97
98
|
children: e.title || a("noName")
|
|
98
99
|
}
|
|
@@ -102,32 +103,32 @@ const re = m(({ item: e, ignoreDepth: a }) => {
|
|
|
102
103
|
] }),
|
|
103
104
|
e.rightSection
|
|
104
105
|
] });
|
|
105
|
-
}),
|
|
106
|
-
const { api: a, useStore: r } =
|
|
106
|
+
}), $ = f(({ item: e }) => {
|
|
107
|
+
const { api: a, useStore: r } = m(), i = S(null), o = j({
|
|
107
108
|
initialValues: {
|
|
108
109
|
name: e.title,
|
|
109
110
|
icon: e.data?.icon || ""
|
|
110
111
|
}
|
|
111
|
-
}), l = (
|
|
112
|
+
}), l = (t) => {
|
|
112
113
|
a.handleEdit({
|
|
113
114
|
id: e.id,
|
|
114
|
-
name:
|
|
115
|
-
icon:
|
|
115
|
+
name: t.name ?? "",
|
|
116
|
+
icon: t.icon ?? ""
|
|
116
117
|
}), a.stopEditing();
|
|
117
118
|
}, d = z(() => {
|
|
118
|
-
l(
|
|
119
|
+
l(o.getValues());
|
|
119
120
|
});
|
|
120
|
-
|
|
121
|
+
k(() => {
|
|
121
122
|
i.current && i.current.select();
|
|
122
123
|
}, []);
|
|
123
|
-
const c =
|
|
124
|
+
const c = v(
|
|
124
125
|
() => ["SPRINT", "PROJECT"].includes(e.data?.type || ""),
|
|
125
126
|
[e.data?.type]
|
|
126
|
-
), p = r((
|
|
127
|
+
), p = r((t) => t.opened.includes(e.id));
|
|
127
128
|
return /* @__PURE__ */ n(
|
|
128
129
|
"form",
|
|
129
130
|
{
|
|
130
|
-
onSubmit:
|
|
131
|
+
onSubmit: o.onSubmit(l),
|
|
131
132
|
className: s.item,
|
|
132
133
|
ref: d,
|
|
133
134
|
"data-editing": !0,
|
|
@@ -141,12 +142,12 @@ const re = m(({ item: e, ignoreDepth: a }) => {
|
|
|
141
142
|
popoverProps: {
|
|
142
143
|
floatingStrategy: "fixed"
|
|
143
144
|
},
|
|
144
|
-
value:
|
|
145
|
-
onChange: (
|
|
145
|
+
value: o.values.icon,
|
|
146
|
+
onChange: (t) => o.setFieldValue("icon", t),
|
|
146
147
|
children: /* @__PURE__ */ n(L.ActionIcon, { disabled: c, children: /* @__PURE__ */ n(
|
|
147
|
-
|
|
148
|
+
b,
|
|
148
149
|
{
|
|
149
|
-
item: { ...e.data, isOpen: p, icon:
|
|
150
|
+
item: { ...e.data, isOpen: p, icon: o.values.icon }
|
|
150
151
|
}
|
|
151
152
|
) })
|
|
152
153
|
}
|
|
@@ -156,24 +157,26 @@ const re = m(({ item: e, ignoreDepth: a }) => {
|
|
|
156
157
|
{
|
|
157
158
|
ref: i,
|
|
158
159
|
className: s.editInput,
|
|
159
|
-
|
|
160
|
+
"data-cy": e.testId ? `${e.testId}-rename-input` : void 0,
|
|
161
|
+
...o.getInputProps("name"),
|
|
160
162
|
maxLength: 255,
|
|
161
|
-
onFocus: (
|
|
163
|
+
onFocus: (t) => t.target.select()
|
|
162
164
|
}
|
|
163
165
|
) })
|
|
164
166
|
] })
|
|
165
167
|
}
|
|
166
168
|
);
|
|
167
|
-
}),
|
|
168
|
-
({ depth: e = 0, children: a }) => /* @__PURE__ */ u(
|
|
169
|
+
}), x = f(
|
|
170
|
+
({ depth: e = 0, children: a, testId: r }) => /* @__PURE__ */ u(
|
|
169
171
|
"div",
|
|
170
172
|
{
|
|
171
173
|
className: s.itemContainer,
|
|
174
|
+
"data-cy": r,
|
|
172
175
|
style: {
|
|
173
176
|
"--depth": e
|
|
174
177
|
},
|
|
175
178
|
children: [
|
|
176
|
-
Array.from({ length: e }).map((
|
|
179
|
+
Array.from({ length: e }).map((i, o) => /* @__PURE__ */ n("div", { className: s.depthBox }, o)),
|
|
177
180
|
a
|
|
178
181
|
]
|
|
179
182
|
}
|
|
@@ -183,14 +186,14 @@ const re = m(({ item: e, ignoreDepth: a }) => {
|
|
|
183
186
|
itemId: a,
|
|
184
187
|
currentChildrenCount: r
|
|
185
188
|
}) => {
|
|
186
|
-
const { t: i } = g("appContainer"), { api:
|
|
187
|
-
return /* @__PURE__ */ n(
|
|
189
|
+
const { t: i } = g("appContainer"), { api: o } = m(), { isLoading: l, onSubmit: d } = A();
|
|
190
|
+
return /* @__PURE__ */ n(x, { depth: e, children: /* @__PURE__ */ n(
|
|
188
191
|
"div",
|
|
189
192
|
{
|
|
190
193
|
className: s.item,
|
|
191
|
-
onClick: () => d(() =>
|
|
194
|
+
onClick: () => d(() => o.loadMore({ itemId: a, currentChildrenCount: r })),
|
|
192
195
|
children: /* @__PURE__ */ n(h, { gap: 4, h: "100%", flex: 1, miw: 0, justify: "space-between", children: /* @__PURE__ */ u(h, { gap: 4, miw: 0, flex: 1, c: "gray", children: [
|
|
193
|
-
/* @__PURE__ */ n("div", { className: s.icon, children: l ? /* @__PURE__ */ n(N, { size: 16 }) : /* @__PURE__ */ n(C, { icon:
|
|
196
|
+
/* @__PURE__ */ n("div", { className: s.icon, children: l ? /* @__PURE__ */ n(N, { size: 16 }) : /* @__PURE__ */ n(C, { icon: E, size: 16 }) }),
|
|
194
197
|
/* @__PURE__ */ n(w, { flex: 1, truncate: !0, size: "sm", fw: 500, miw: 0, children: i("loadMore") })
|
|
195
198
|
] }) })
|
|
196
199
|
}
|
|
@@ -19,6 +19,7 @@ export type NavMenuItemDef<DATA = NavMenuItemData> = {
|
|
|
19
19
|
order?: number;
|
|
20
20
|
data?: DATA;
|
|
21
21
|
isDisabledEditByDoubleClick?: boolean;
|
|
22
|
+
testId?: string;
|
|
22
23
|
};
|
|
23
24
|
export type ExpandNavMenuItemDef<DATA = NavMenuItemData> = NavMenuItemDef<DATA> & {
|
|
24
25
|
depth: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/NavMenu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CAEtB,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,IAAI,GAAG,eAAe,IAAI;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,2BAA2B,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/NavMenu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CAEtB,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,IAAI,GAAG,eAAe,IAAI;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,CAAC,IAAI,GAAG,eAAe,IACrD,cAAc,CAAC,IAAI,CAAC,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEJ,MAAM,MAAM,kBAAkB,CAAC,IAAI,GAAG,eAAe,IAAI,CAAC,CAAC,EAAE;IAC3D,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IACjC,QAAQ,EAAE,0BAA0B,CAAC;CACtC,KAAK,IAAI,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,EAAE;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,MAAM,CAAC;CAC9B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAEpB,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC"}
|
|
@@ -154,16 +154,21 @@ export declare const illustrationMap: {
|
|
|
154
154
|
}>;
|
|
155
155
|
};
|
|
156
156
|
export type IllustrationType = keyof typeof illustrationMap | string | ReactNode;
|
|
157
|
+
interface NoDataButtonProps extends PolymorphicComponentProps<'button', ButtonProps> {
|
|
158
|
+
hidden?: boolean;
|
|
159
|
+
}
|
|
157
160
|
export type NoDataProps = {
|
|
158
161
|
title?: ReactNode;
|
|
159
162
|
titleProps?: TitleProps;
|
|
160
163
|
description?: ReactNode;
|
|
161
164
|
descriptionProps?: TextProps;
|
|
162
|
-
buttons?:
|
|
165
|
+
buttons?: NoDataButtonProps[];
|
|
163
166
|
illustration?: IllustrationType;
|
|
164
167
|
size?: number;
|
|
165
168
|
width?: number | string;
|
|
166
169
|
height?: number | string;
|
|
170
|
+
subStackProps?: StackProps;
|
|
167
171
|
} & StackProps;
|
|
168
172
|
export declare const NoData: FC<NoDataProps>;
|
|
173
|
+
export {};
|
|
169
174
|
//# sourceMappingURL=NoData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoData.d.ts","sourceRoot":"","sources":["../../../src/components/NoData/NoData.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAEL,WAAW,EAGX,yBAAyB,EAEzB,UAAU,EAEV,SAAS,EAET,UAAU,EACX,MAAM,eAAe,CAAC;AAiCvB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B3B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GACxB,MAAM,OAAO,eAAe,GAC5B,MAAM,GACN,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"NoData.d.ts","sourceRoot":"","sources":["../../../src/components/NoData/NoData.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAEL,WAAW,EAGX,yBAAyB,EAEzB,UAAU,EAEV,SAAS,EAET,UAAU,EACX,MAAM,eAAe,CAAC;AAiCvB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B3B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GACxB,MAAM,OAAO,eAAe,GAC5B,MAAM,GACN,SAAS,CAAC;AAEd,UAAU,iBACR,SAAQ,yBAAyB,CAAC,QAAQ,EAAE,WAAW,CAAC;IACxD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,UAAU,CAAC;CAC5B,GAAG,UAAU,CAAC;AAEf,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CA0ElC,CAAC"}
|
|
@@ -1,72 +1,73 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Stack as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
const
|
|
30
|
-
empty:
|
|
31
|
-
noAccess:
|
|
32
|
-
trash:
|
|
33
|
-
noImage:
|
|
34
|
-
noResults:
|
|
35
|
-
noComments:
|
|
36
|
-
noData:
|
|
37
|
-
emptyFolder:
|
|
38
|
-
noTaskResults:
|
|
39
|
-
noSearchResults:
|
|
40
|
-
noMembers:
|
|
41
|
-
noGroups:
|
|
42
|
-
noNotifications:
|
|
43
|
-
noWorkspaces:
|
|
44
|
-
paymentSuccess:
|
|
45
|
-
notSuccessMan:
|
|
46
|
-
noAnswers:
|
|
47
|
-
alertMan:
|
|
48
|
-
noFlows:
|
|
49
|
-
noTasks:
|
|
50
|
-
noCloud:
|
|
51
|
-
noForms:
|
|
52
|
-
users:
|
|
53
|
-
404:
|
|
54
|
-
500:
|
|
55
|
-
},
|
|
56
|
-
title:
|
|
1
|
+
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import N from "react";
|
|
3
|
+
import { Stack as f, Flex as h, Title as j, Text as x, Group as y, Button as F } from "@mantine/core";
|
|
4
|
+
import R from "../../assets/svg/alertMan.svg.js";
|
|
5
|
+
import M from "../../assets/svg/noData/404.svg.js";
|
|
6
|
+
import k from "../../assets/svg/noData/500.svg.js";
|
|
7
|
+
import w from "../../assets/svg/noData/empty.svg.js";
|
|
8
|
+
import E from "../../assets/svg/noData/folder.svg.js";
|
|
9
|
+
import T from "../../assets/svg/noData/noAccess.svg.js";
|
|
10
|
+
import I from "../../assets/svg/noData/noAnswers.svg.js";
|
|
11
|
+
import A from "../../assets/svg/noData/noCloud.svg.js";
|
|
12
|
+
import C from "../../assets/svg/noData/noComments.svg.js";
|
|
13
|
+
import D from "../../assets/svg/noData/noData.svg.js";
|
|
14
|
+
import G from "../../assets/svg/noData/noFlows.svg.js";
|
|
15
|
+
import _ from "../../assets/svg/noData/noForms.svg.js";
|
|
16
|
+
import W from "../../assets/svg/noData/noGroups.svg.js";
|
|
17
|
+
import B from "../../assets/svg/noData/noImage.svg.js";
|
|
18
|
+
import P from "../../assets/svg/noData/noMembers.svg.js";
|
|
19
|
+
import U from "../../assets/svg/noData/noNotifications.svg.js";
|
|
20
|
+
import V from "../../assets/svg/noData/noResults.svg.js";
|
|
21
|
+
import b from "../../assets/svg/noData/noSearchResults.svg.js";
|
|
22
|
+
import q from "../../assets/svg/noData/noTaskResults.svg.js";
|
|
23
|
+
import z from "../../assets/svg/noData/noTasks.svg.js";
|
|
24
|
+
import H from "../../assets/svg/noData/noWorkspaces.svg.js";
|
|
25
|
+
import J from "../../assets/svg/noData/trash.svg.js";
|
|
26
|
+
import K from "../../assets/svg/notSuccessMan.svg.js";
|
|
27
|
+
import L from "../../assets/svg/successMan.svg.js";
|
|
28
|
+
import O from "../../assets/svg/users.svg.js";
|
|
29
|
+
const Q = (e) => new RegExp("(\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F)", "u").test(e), X = {
|
|
30
|
+
empty: w,
|
|
31
|
+
noAccess: T,
|
|
32
|
+
trash: J,
|
|
33
|
+
noImage: B,
|
|
34
|
+
noResults: V,
|
|
35
|
+
noComments: C,
|
|
36
|
+
noData: D,
|
|
37
|
+
emptyFolder: E,
|
|
38
|
+
noTaskResults: q,
|
|
39
|
+
noSearchResults: b,
|
|
40
|
+
noMembers: P,
|
|
41
|
+
noGroups: W,
|
|
42
|
+
noNotifications: U,
|
|
43
|
+
noWorkspaces: H,
|
|
44
|
+
paymentSuccess: L,
|
|
45
|
+
notSuccessMan: K,
|
|
46
|
+
noAnswers: I,
|
|
47
|
+
alertMan: R,
|
|
48
|
+
noFlows: G,
|
|
49
|
+
noTasks: z,
|
|
50
|
+
noCloud: A,
|
|
51
|
+
noForms: _,
|
|
52
|
+
users: O,
|
|
53
|
+
404: M,
|
|
54
|
+
500: k
|
|
55
|
+
}, ko = ({
|
|
56
|
+
title: e,
|
|
57
57
|
titleProps: t,
|
|
58
58
|
description: s,
|
|
59
|
-
descriptionProps:
|
|
59
|
+
descriptionProps: g,
|
|
60
60
|
buttons: n,
|
|
61
61
|
illustration: o,
|
|
62
|
-
size:
|
|
63
|
-
width:
|
|
64
|
-
height:
|
|
65
|
-
|
|
62
|
+
size: m = 145,
|
|
63
|
+
width: S,
|
|
64
|
+
height: l,
|
|
65
|
+
subStackProps: v,
|
|
66
|
+
...u
|
|
66
67
|
}) => {
|
|
67
|
-
const i = o && typeof o == "string" &&
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
-
|
|
68
|
+
const i = o && typeof o == "string" && Q(o) || o && N.isValidElement(o), p = o && !i ? X[o] : null;
|
|
69
|
+
return /* @__PURE__ */ c(
|
|
70
|
+
f,
|
|
70
71
|
{
|
|
71
72
|
gap: "sm",
|
|
72
73
|
justify: "center",
|
|
@@ -76,28 +77,30 @@ const O = (m) => new RegExp("(\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F)", "u").
|
|
|
76
77
|
style: {
|
|
77
78
|
zIndex: 3
|
|
78
79
|
},
|
|
79
|
-
...
|
|
80
|
+
...u,
|
|
80
81
|
children: [
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
82
|
+
/* @__PURE__ */ c(f, { align: "center", gap: "sm", ...v, children: [
|
|
83
|
+
o && /* @__PURE__ */ r(
|
|
84
|
+
h,
|
|
85
|
+
{
|
|
86
|
+
justify: "center",
|
|
87
|
+
style: {
|
|
88
|
+
height: l || m,
|
|
89
|
+
width: S || m,
|
|
90
|
+
fontSize: m
|
|
91
|
+
},
|
|
92
|
+
children: i ? /* @__PURE__ */ r("span", { children: o }) : p && /* @__PURE__ */ r(p, {})
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
e && /* @__PURE__ */ r(j, { order: 2, ta: "center", mt: 0, maw: 450, ...t, children: e }),
|
|
96
|
+
s && /* @__PURE__ */ r(x, { ta: "center", c: "dimmed", maw: 400, ...g, children: s })
|
|
97
|
+
] }),
|
|
98
|
+
n?.length ? /* @__PURE__ */ r(y, { gap: "xs", justify: "center", children: n.map((a, d) => a?.hidden ? null : /* @__PURE__ */ r(F, { variant: "filled", ...a }, d)) }) : null
|
|
96
99
|
]
|
|
97
100
|
}
|
|
98
101
|
);
|
|
99
102
|
};
|
|
100
103
|
export {
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
ko as NoData,
|
|
105
|
+
X as illustrationMap
|
|
103
106
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GroupProps, StackProps } from '@mantine/core';
|
|
2
|
+
interface SettingsSectionProps extends StackProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
subTitle?: string | React.ReactNode;
|
|
5
|
+
description?: string;
|
|
6
|
+
wrapperProps?: GroupProps;
|
|
7
|
+
leftSectionProps?: StackProps;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const SettingsSection: ({ title, subTitle, description, children, wrapperProps, leftSectionProps, ...rest }: SettingsSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SettingsSection/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEV,UAAU,EAGX,MAAM,eAAe,CAAC;AAIvB,UAAU,oBAAqB,SAAQ,UAAU;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAE9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,GAAI,qFAQ7B,oBAAoB,4CAyBtB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Stack as s, Title as m, Group as d, Text as i } from "@mantine/core";
|
|
3
|
+
import g from "./styles.module.css.js";
|
|
4
|
+
const u = ({
|
|
5
|
+
title: t,
|
|
6
|
+
subTitle: n,
|
|
7
|
+
description: a,
|
|
8
|
+
children: c,
|
|
9
|
+
wrapperProps: o,
|
|
10
|
+
leftSectionProps: p,
|
|
11
|
+
...l
|
|
12
|
+
}) => /* @__PURE__ */ e(s, { ...l, w: "100%", gap: 12, children: [
|
|
13
|
+
t && /* @__PURE__ */ r(m, { order: 4, children: t }),
|
|
14
|
+
/* @__PURE__ */ e(
|
|
15
|
+
d,
|
|
16
|
+
{
|
|
17
|
+
justify: "space-between",
|
|
18
|
+
align: "start",
|
|
19
|
+
px: "sm",
|
|
20
|
+
py: "lg",
|
|
21
|
+
className: g.contentWrapper,
|
|
22
|
+
gap: "auto",
|
|
23
|
+
...o,
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ e(s, { maw: 296, gap: 4, ...p, children: [
|
|
26
|
+
/* @__PURE__ */ r(i, { size: "sm", fw: 600, children: n }),
|
|
27
|
+
/* @__PURE__ */ r(i, { size: "xs", c: "gray", children: a })
|
|
28
|
+
] }),
|
|
29
|
+
c
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
] });
|
|
34
|
+
export {
|
|
35
|
+
u as SettingsSection
|
|
36
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface SocialLinkRowProps {
|
|
2
|
+
social: {
|
|
3
|
+
name: string;
|
|
4
|
+
link: string;
|
|
5
|
+
};
|
|
6
|
+
onSave: (link: string) => void;
|
|
7
|
+
onClear: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const SocialLinkRow: ({ social, onSave, onClear, }: SocialLinkRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SocialLinkRow/index.tsx"],"names":[],"mappings":"AAmBA,UAAU,kBAAkB;IAC1B,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,GAAI,8BAI3B,kBAAkB,4CAiIpB,CAAC"}
|