@layers-app/shared 0.2.4 → 0.2.5
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/jsons/emoji-categorized-windows.json.js +4 -0
- package/dist/assets/jsons/emoji-categorized-windows10.json.js +4 -0
- package/dist/assets/svg/users.svg.js +5 -0
- package/dist/assets/svg/whatsapp-icon.svg.js +5 -0
- package/dist/components/AliasTextInput/AliasTextInput.d.ts +3 -1
- package/dist/components/AliasTextInput/AliasTextInput.d.ts.map +1 -1
- package/dist/components/AliasTextInput/AliasTextInput.js +63 -54
- package/dist/components/AppContainer/AppContainer.d.ts +1 -1
- package/dist/components/AppContainer/AppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/AppContainer.js +48 -45
- package/dist/components/AppContainer/AppContainer.module.css.js +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +5 -5
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +56 -43
- package/dist/components/AppContainer/components/Main.d.ts +5 -1
- package/dist/components/AppContainer/components/Main.d.ts.map +1 -1
- package/dist/components/AppContainer/components/Main.js +11 -8
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.d.ts.map +1 -1
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +34 -19
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.module.css.js +1 -1
- package/dist/components/AppContainer/components/menus/MoreMenu.js +8 -8
- package/dist/components/AppContainer/components/menus/UserMenu/MenuUserDropdown.d.ts +1 -0
- package/dist/components/AppContainer/components/menus/UserMenu/MenuUserDropdown.d.ts.map +1 -1
- package/dist/components/AppContainer/types.d.ts +1 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryModal.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/AttachmentsGalleryModal.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/GallerySlide.js +5 -5
- package/dist/components/AttachmentsGalleryModal/components/ModalFooter.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalFooter.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalFooter.js +4 -4
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/components/ModalHeader.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useDownloadFile.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts +1 -1
- package/dist/components/AttachmentsGalleryModal/hooks/useGetPreviewUrl.d.ts.map +1 -1
- package/dist/components/AttachmentsGalleryModal/styles.module.css.js +9 -9
- package/dist/components/AttachmentsPreview/AttachmentsPreview.d.ts.map +1 -1
- package/dist/components/AttachmentsPreview/AttachmentsPreview.js +114 -88
- package/dist/components/AttachmentsPreview/AttachmentsPreview.module.css.js +9 -9
- package/dist/components/BouncingLogo/BouncingLogo.d.ts +6 -2
- package/dist/components/BouncingLogo/BouncingLogo.d.ts.map +1 -1
- package/dist/components/BouncingLogo/BouncingLogo.js +13 -14
- package/dist/components/BouncingLogo/BouncingLogo.module.css.js +12 -10
- package/dist/components/ColorPicker/ColorPicker.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +66 -59
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +1 -1
- package/dist/components/CommunitiesDialog/styles.module.css.js +1 -1
- package/dist/components/Copyright/index.d.ts.map +1 -1
- package/dist/components/Copyright/index.js +6 -6
- package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.js +14 -14
- package/dist/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.js +87 -95
- package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/IconsPanel.js +37 -38
- package/dist/components/EmojiPicker/utils.d.ts +11 -0
- package/dist/components/EmojiPicker/utils.d.ts.map +1 -0
- package/dist/components/EmojiPicker/utils.js +46 -0
- package/dist/components/EntityIcon.d.ts +5 -2
- package/dist/components/EntityIcon.d.ts.map +1 -1
- package/dist/components/EntityIcon.js +44 -46
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +58 -59
- package/dist/components/FilePicker/types.d.ts +1 -1
- package/dist/components/FilePicker/types.d.ts.map +1 -1
- package/dist/components/FormViewer/FormViewer.module.css.js +18 -18
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts +4 -2
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceCard.js +51 -26
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/ChoiceField/PictureChoiceField.js +25 -23
- package/dist/components/FormViewer/components/fields/DragOptions/DragOptions.module.css.js +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts +5 -2
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/SelectableCard/PictureSelectableCard.js +105 -96
- package/dist/components/FormViewer/components/fields/SliderField.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/SliderField.js +19 -18
- package/dist/components/FormViewer/components/fields/UploadField/UploadField.d.ts.map +1 -1
- package/dist/components/FormViewer/components/fields/UploadField/UploadFile/UploadFile.module.css.js +1 -1
- package/dist/components/FormViewer/helpers/cssScoping.d.ts.map +1 -1
- package/dist/components/FormViewer/helpers/staticClasses.d.ts.map +1 -1
- package/dist/components/FormViewer/store/formStore.d.ts +10 -3
- package/dist/components/FormViewer/store/formStore.d.ts.map +1 -1
- package/dist/components/LanguagePicker/LanguagePicker.js +13 -13
- package/dist/components/Loaders/styles.module.css.js +1 -1
- package/dist/components/NavMenu/NavMenu.d.ts +4 -1
- package/dist/components/NavMenu/NavMenu.d.ts.map +1 -1
- package/dist/components/NavMenu/NavMenu.js +96 -77
- package/dist/components/NavMenu/NavMenu.module.css.js +10 -10
- package/dist/components/NavMenu/components/DnDItem.d.ts +2 -1
- package/dist/components/NavMenu/components/DnDItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/DnDItem.js +32 -30
- package/dist/components/NavMenu/components/DnDProvider.d.ts.map +1 -1
- package/dist/components/NavMenu/components/DnDProvider.js +28 -26
- package/dist/components/NavMenu/components/DraggableOverlay.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.d.ts +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +108 -94
- package/dist/components/NavMenu/store.d.ts +1 -0
- package/dist/components/NavMenu/store.d.ts.map +1 -1
- package/dist/components/NavMenu/types.d.ts +1 -0
- package/dist/components/NavMenu/types.d.ts.map +1 -1
- package/dist/components/NavbarResizer/NavbarResizer.module.css.js +2 -2
- package/dist/components/NoData/NoData.d.ts +32 -26
- package/dist/components/NoData/NoData.d.ts.map +1 -1
- package/dist/components/NoData/NoData.js +73 -73
- package/dist/components/OnBoarding/ProjectBoard.js +17 -17
- package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.js +7 -7
- package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.js +9 -9
- package/dist/components/OnBoarding/steps/CreateFirstProject.js +5 -5
- package/dist/components/OnBoarding/steps/DefineStatuses/DefineStatusesNav.js +7 -7
- package/dist/components/OnBoarding/steps/DefineStatuses/StatusesListBoard.js +6 -6
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsBoard.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/DifferentLayouts/DifferentLayoutsNav.js +10 -10
- package/dist/components/OnBoarding/steps/DifferentLayouts/KanbanLayout.js +5 -5
- package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.js +10 -10
- package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.d.ts.map +1 -1
- package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.js +8 -8
- package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.js +5 -5
- package/dist/components/OnBoarding/steps/StartedStep.js +5 -5
- package/dist/components/PaymentSuccess/PaymentSuccess.d.ts.map +1 -1
- package/dist/components/PaymentSuccess/PaymentSuccess.js +9 -9
- package/dist/components/SearchFilters/components/DateFilter.js +19 -19
- package/dist/components/SearchFilters/components/SearchHelp.d.ts.map +1 -1
- package/dist/components/SearchFilters/components/SearchHelp.js +7 -7
- package/dist/components/SortableList/SortableList.d.ts.map +1 -1
- package/dist/components/SortableList/components/SortableItem/SortableItem.d.ts.map +1 -1
- package/dist/components/SortableList/components/SortableItem/SortableItem.js +1 -9
- package/dist/components/SortableList/components/SortableItem/index.d.ts +1 -1
- package/dist/components/SortableList/components/SortableItem/index.d.ts.map +1 -1
- package/dist/components/StorageUsageEntityList/StorageEntityItem.d.ts +2 -6
- package/dist/components/StorageUsageEntityList/StorageEntityItem.d.ts.map +1 -1
- package/dist/components/StorageUsageEntityList/StorageEntityItem.js +19 -59
- package/dist/components/StorageUsageEntityList/StorageUsageEntityList.d.ts +1 -1
- package/dist/components/StorageUsageEntityList/StorageUsageEntityList.d.ts.map +1 -1
- package/dist/components/StorageUsageEntityList/StorageUsageEntityList.js +6 -24
- package/dist/components/StorageUsageProgress/StorageUsageProgress.module.css.js +7 -0
- package/dist/components/StorageUsageProgress/index.d.ts +2 -2
- package/dist/components/StorageUsageProgress/index.d.ts.map +1 -1
- package/dist/components/StorageUsageProgress/index.js +73 -40
- package/dist/components/ThemeIndicator/index.d.ts.map +1 -1
- package/dist/components/ThemeIndicator/index.js +4 -4
- package/dist/components/UserAvatar/index.js +14 -14
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +40 -37
- package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
- package/dist/components/modals/RemoveConfirmModal.js +31 -24
- package/dist/components/table/export.d.ts.map +1 -1
- package/dist/components/table/hooks/useSaveRowCount.d.ts.map +1 -1
- package/dist/components/table/hooks/useSaveRowCount.js +4 -4
- package/dist/components/table/hooks/useSorting.d.ts.map +1 -1
- package/dist/components/table/hooks/useSorting.js +3 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +8 -1
- package/dist/helpers/getFileIcons.js +12 -12
- package/dist/helpers/isAppMode.d.ts +1 -1
- package/dist/helpers/isAppMode.d.ts.map +1 -1
- package/dist/helpers/validateAliasFormat.d.ts +2 -0
- package/dist/helpers/validateAliasFormat.d.ts.map +1 -0
- package/dist/helpers/validateAliasFormat.js +4 -0
- package/dist/hooks/useOutsideClick.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +328 -329
- package/dist/lang/locales/ui_en.json.js +1 -1
- package/dist/lang/locales/ui_es.json.js +9 -9
- package/dist/lang/locales/ui_ru.json.js +9 -9
- package/dist/store/trashModal.d.ts +8 -0
- package/dist/store/trashModal.d.ts.map +1 -0
- package/dist/store/trashModal.js +13 -0
- package/dist/types/storageCategories.d.ts +4 -0
- package/dist/types/storageCategories.d.ts.map +1 -0
- package/dist/types/storageCategories.js +21 -0
- package/dist/utils/formatStorage.d.ts +1 -1
- package/dist/utils/formatStorage.d.ts.map +1 -1
- package/dist/utils/formatStorage.js +3 -3
- package/docs/README.md +17 -4
- package/package.json +1 -1
- package/dist/assets/fileTypes/archives.svg.js +0 -5
- package/dist/assets/fileTypes/audio.svg.js +0 -5
- package/dist/assets/fileTypes/code.svg.js +0 -5
- package/dist/assets/fileTypes/documentsStorage.svg.js +0 -5
- package/dist/assets/fileTypes/images.svg.js +0 -5
- package/dist/assets/fileTypes/other.svg.js +0 -5
- package/dist/assets/fileTypes/videos.svg.js +0 -5
- package/dist/components/AppContainer/hooks/useSetAppContainerLayout.d.ts +0 -3
- package/dist/components/AppContainer/hooks/useSetAppContainerLayout.d.ts.map +0 -1
- package/dist/components/AppContainer/hooks/useSetAppContainerLayout.js +0 -10
- package/dist/components/EmojiPicker/getIconsList.d.ts +0 -8
- package/dist/components/EmojiPicker/getIconsList.d.ts.map +0 -1
- package/dist/components/EmojiPicker/getIconsList.js +0 -32
- package/dist/components/EmojiPicker/getRandomIcon.d.ts +0 -2
- package/dist/components/EmojiPicker/getRandomIcon.d.ts.map +0 -1
- package/dist/components/EmojiPicker/getRandomIcon.js +0 -10
- package/dist/components/NoData/NoData.module.css.js +0 -7
- package/dist/components/PaymentCancel/PaymentCancel.d.ts +0 -2
- package/dist/components/PaymentCancel/PaymentCancel.d.ts.map +0 -1
- package/dist/components/PaymentCancel/PaymentCancel.js +0 -41
- package/dist/components/PaymentError/PaymentError.d.ts +0 -2
- package/dist/components/PaymentError/PaymentError.d.ts.map +0 -1
- package/dist/components/PaymentError/PaymentError.js +0 -41
- package/dist/node_modules/@layers-app/layers/src/api/common.js +0 -41
- package/dist/store/accessOptionsControl.d.ts +0 -17
- package/dist/store/accessOptionsControl.d.ts.map +0 -1
- package/dist/store/accessOptionsControl.js +0 -18
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
popoverProps: y,
|
|
1
|
+
import { jsxs as j, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d, useMemo as Q, useEffect as v } from "react";
|
|
3
|
+
import { useTranslation as $ } from "react-i18next";
|
|
4
|
+
import { Popover as k, Center as A, Tabs as t, Flex as T, Button as E } from "@mantine/core";
|
|
5
|
+
import { IconEntity as G } from "../ProjectIcon/ProjectIcon.js";
|
|
6
|
+
import { EmojiPanel as J } from "./EmojiPanel.js";
|
|
7
|
+
import { IconsPanel as K } from "./IconsPanel.js";
|
|
8
|
+
import p from "./EmojiPicker.module.css.js";
|
|
9
|
+
const _ = ({
|
|
10
|
+
project: C,
|
|
11
|
+
value: i,
|
|
12
|
+
querySearch: a,
|
|
13
|
+
children: N,
|
|
14
|
+
onChange: f,
|
|
15
|
+
position: R = "bottom-start",
|
|
16
|
+
popoverProps: b,
|
|
18
17
|
showIcons: u,
|
|
19
|
-
showColors:
|
|
20
|
-
defaultActiveTab:
|
|
21
|
-
showEmojis:
|
|
22
|
-
withinPortal:
|
|
18
|
+
showColors: D,
|
|
19
|
+
defaultActiveTab: I = null,
|
|
20
|
+
showEmojis: s = !0,
|
|
21
|
+
withinPortal: w = !1,
|
|
23
22
|
locales: h,
|
|
24
23
|
openWhen: g = "click",
|
|
25
24
|
triggerRegex: P = /(^|\s):([^\s:]{1,})$/,
|
|
26
|
-
typingSeq:
|
|
27
|
-
showRemoveButton:
|
|
25
|
+
typingSeq: c,
|
|
26
|
+
showRemoveButton: L = !0
|
|
28
27
|
}) => {
|
|
29
|
-
const { t: e } =
|
|
28
|
+
const { t: e } = $("ui"), [n, r] = d(!1), [M, x] = d(I), [O, z] = d(i || null), [y, B] = d(null), l = Q(() => ({
|
|
30
29
|
emojis: e("emojis"),
|
|
31
30
|
remove: e("remove"),
|
|
32
31
|
search: e("search"),
|
|
@@ -48,30 +47,30 @@ const re = ({
|
|
|
48
47
|
},
|
|
49
48
|
...h
|
|
50
49
|
}), [e, h]);
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
!
|
|
54
|
-
}, [
|
|
55
|
-
if (g !== "realtime" || typeof
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
|
|
50
|
+
v(() => {
|
|
51
|
+
const m = u && G.parse(i)?.icon ? "icons" : s ? "emojis" : null;
|
|
52
|
+
!n && m && x(m);
|
|
53
|
+
}, [n, s, u, i]), v(() => {
|
|
54
|
+
if (g !== "realtime" || typeof c != "number" || y === c) return;
|
|
55
|
+
B(c);
|
|
56
|
+
const m = a ?? "", H = !!s && P.test(m);
|
|
57
|
+
r(H);
|
|
59
58
|
}, [
|
|
60
59
|
g,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
c,
|
|
61
|
+
y,
|
|
62
|
+
a,
|
|
64
63
|
P,
|
|
65
|
-
|
|
64
|
+
s
|
|
66
65
|
]);
|
|
67
|
-
const
|
|
68
|
-
return /* @__PURE__ */
|
|
66
|
+
const F = typeof a == "string";
|
|
67
|
+
return /* @__PURE__ */ j(
|
|
69
68
|
k,
|
|
70
69
|
{
|
|
71
|
-
withinPortal:
|
|
72
|
-
opened:
|
|
73
|
-
onChange:
|
|
74
|
-
position:
|
|
70
|
+
withinPortal: w,
|
|
71
|
+
opened: n,
|
|
72
|
+
onChange: r,
|
|
73
|
+
position: R,
|
|
75
74
|
radius: "var(--mantine-spacing-sm)",
|
|
76
75
|
styles: {
|
|
77
76
|
dropdown: {
|
|
@@ -84,31 +83,31 @@ const re = ({
|
|
|
84
83
|
}
|
|
85
84
|
},
|
|
86
85
|
middlewares: {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
86
|
+
flip: {
|
|
87
|
+
fallbackPlacements: [
|
|
88
|
+
"right-start",
|
|
89
|
+
"right-end",
|
|
90
|
+
"left-start",
|
|
91
|
+
"left-end",
|
|
92
|
+
"top-start",
|
|
93
|
+
"top-end"
|
|
94
|
+
]
|
|
96
95
|
}
|
|
97
96
|
},
|
|
98
|
-
...
|
|
97
|
+
...b || {},
|
|
99
98
|
children: [
|
|
100
99
|
/* @__PURE__ */ o(k.Target, { children: /* @__PURE__ */ o(
|
|
101
|
-
|
|
100
|
+
A,
|
|
102
101
|
{
|
|
103
|
-
onClick: g === "click" && !
|
|
104
|
-
children:
|
|
102
|
+
onClick: g === "click" && !b?.disabled ? () => r(!n) : void 0,
|
|
103
|
+
children: N ?? O
|
|
105
104
|
}
|
|
106
105
|
) }),
|
|
107
|
-
/* @__PURE__ */ o(k.Dropdown, { w: "380px", h: "404px", children: /* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ o(k.Dropdown, { w: "380px", h: "404px", children: /* @__PURE__ */ j(
|
|
108
107
|
t,
|
|
109
108
|
{
|
|
110
|
-
value:
|
|
111
|
-
onChange:
|
|
109
|
+
value: M,
|
|
110
|
+
onChange: x,
|
|
112
111
|
keepMounted: !1,
|
|
113
112
|
h: "100%",
|
|
114
113
|
styles: {
|
|
@@ -125,7 +124,7 @@ const re = ({
|
|
|
125
124
|
}
|
|
126
125
|
},
|
|
127
126
|
children: [
|
|
128
|
-
!
|
|
127
|
+
!F && /* @__PURE__ */ j(
|
|
129
128
|
t.List,
|
|
130
129
|
{
|
|
131
130
|
style: {
|
|
@@ -134,78 +133,71 @@ const re = ({
|
|
|
134
133
|
h: 54,
|
|
135
134
|
px: 8,
|
|
136
135
|
children: [
|
|
137
|
-
|
|
136
|
+
s && /* @__PURE__ */ o(
|
|
138
137
|
t.Tab,
|
|
139
138
|
{
|
|
140
|
-
className:
|
|
139
|
+
className: p.originalTab,
|
|
141
140
|
h: "100%",
|
|
142
141
|
p: 0,
|
|
143
142
|
value: "emojis",
|
|
144
|
-
children: /* @__PURE__ */ o(
|
|
143
|
+
children: /* @__PURE__ */ o(T, { className: p.customTab, px: "sm", h: 36, children: l.emojis })
|
|
145
144
|
}
|
|
146
145
|
),
|
|
147
146
|
u && /* @__PURE__ */ o(
|
|
148
147
|
t.Tab,
|
|
149
148
|
{
|
|
150
|
-
className:
|
|
149
|
+
className: p.originalTab,
|
|
151
150
|
h: "100%",
|
|
152
151
|
p: 0,
|
|
153
152
|
value: "icons",
|
|
154
|
-
children: /* @__PURE__ */ o(
|
|
153
|
+
children: /* @__PURE__ */ o(T, { className: p.customTab, px: "sm", h: 36, children: l.icons })
|
|
155
154
|
}
|
|
156
155
|
),
|
|
157
|
-
!!String(
|
|
158
|
-
|
|
156
|
+
!!String(i) && L && /* @__PURE__ */ o(
|
|
157
|
+
E,
|
|
159
158
|
{
|
|
160
159
|
variant: "subtle",
|
|
161
160
|
fz: "sm",
|
|
162
161
|
lh: "sm",
|
|
163
162
|
fw: 500,
|
|
164
163
|
px: 7,
|
|
165
|
-
h:
|
|
164
|
+
h: 36,
|
|
166
165
|
color: "var(--mantine-color-gray-light-color)",
|
|
167
|
-
onClick: () =>
|
|
166
|
+
onClick: () => f?.(""),
|
|
168
167
|
style: { marginLeft: "auto" },
|
|
169
|
-
children:
|
|
168
|
+
children: l.remove
|
|
170
169
|
}
|
|
171
170
|
)
|
|
172
171
|
]
|
|
173
172
|
}
|
|
174
173
|
),
|
|
175
|
-
/* @__PURE__ */ o(
|
|
176
|
-
|
|
174
|
+
/* @__PURE__ */ o(t.Panel, { mah: 470, style: { overflow: "auto" }, value: "emojis", children: /* @__PURE__ */ o(
|
|
175
|
+
J,
|
|
177
176
|
{
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
onChange: d,
|
|
185
|
-
value: s,
|
|
186
|
-
querySearch: l,
|
|
187
|
-
locales: c,
|
|
188
|
-
setRandomIcon: B,
|
|
189
|
-
onClose: () => n(!1)
|
|
190
|
-
}
|
|
191
|
-
)
|
|
177
|
+
onChange: f,
|
|
178
|
+
value: i,
|
|
179
|
+
querySearch: a,
|
|
180
|
+
locales: l,
|
|
181
|
+
setRandomIcon: z,
|
|
182
|
+
onClose: () => r(!1)
|
|
192
183
|
}
|
|
193
|
-
),
|
|
184
|
+
) }),
|
|
194
185
|
/* @__PURE__ */ o(
|
|
195
186
|
t.Panel,
|
|
196
187
|
{
|
|
197
|
-
mah:
|
|
188
|
+
mah: 470,
|
|
189
|
+
h: "100%",
|
|
198
190
|
style: { overflow: "auto" },
|
|
199
191
|
value: "icons",
|
|
200
192
|
children: /* @__PURE__ */ o(
|
|
201
|
-
|
|
193
|
+
K,
|
|
202
194
|
{
|
|
203
|
-
project:
|
|
204
|
-
onChange:
|
|
205
|
-
value:
|
|
206
|
-
locales:
|
|
207
|
-
showColors:
|
|
208
|
-
onClose: () =>
|
|
195
|
+
project: C,
|
|
196
|
+
onChange: f,
|
|
197
|
+
value: i,
|
|
198
|
+
locales: l,
|
|
199
|
+
showColors: D,
|
|
200
|
+
onClose: () => r(!1)
|
|
209
201
|
}
|
|
210
202
|
)
|
|
211
203
|
}
|
|
@@ -218,5 +210,5 @@ const re = ({
|
|
|
218
210
|
);
|
|
219
211
|
};
|
|
220
212
|
export {
|
|
221
|
-
|
|
213
|
+
_ as EmojiPicker
|
|
222
214
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/IconsPanel.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"IconsPanel.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/IconsPanel.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AA0BjD,eAAO,MAAM,UAAU,oGAQlB,IAAI,CACL,gBAAgB,EAChB,SAAS,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAC5D,GAAG;IACF,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,6CAuSF,CAAC"}
|
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useTranslation as
|
|
2
|
+
import { memo as B, useState as x, useEffect as M, useCallback as U, useMemo as V } from "react";
|
|
3
|
+
import { useTranslation as j } from "react-i18next";
|
|
4
4
|
import { Search01Icon as G, ShuffleIcon as Q } from "@hugeicons/core-free-icons";
|
|
5
5
|
import { HugeiconsIcon as L } from "@hugeicons/react";
|
|
6
|
-
import { useMantineTheme as Y, parseThemeColor as _, darken as J, Stack as y, Text as b, Flex as z, FocusTrap as K, TextInput as W, Tooltip as X, ActionIcon as Z, Box as ee, Paper as
|
|
6
|
+
import { useMantineTheme as Y, parseThemeColor as _, darken as J, Stack as y, Text as b, Flex as z, FocusTrap as K, TextInput as W, Tooltip as X, ActionIcon as Z, Box as ee, Paper as E, SimpleGrid as N } from "@mantine/core";
|
|
7
7
|
import { useEvent as oe } from "draggable-ui";
|
|
8
8
|
import { groupBy as te } from "lodash-es";
|
|
9
9
|
import { DEFAULT_VALUES as re } from "../../constants.js";
|
|
10
10
|
import { ColorPicker as ie } from "../ColorPicker/ColorPicker.js";
|
|
11
11
|
import { NoData as ne } from "../NoData/NoData.js";
|
|
12
|
-
import { IconEntity as
|
|
13
|
-
import { customIcons as
|
|
14
|
-
import { getIconsList as F } from "./
|
|
15
|
-
import { getRandomIcon as ce } from "./getRandomIcon.js";
|
|
12
|
+
import { IconEntity as I, IconType as A } from "../ProjectIcon/ProjectIcon.js";
|
|
13
|
+
import { customIcons as D } from "./custom-icons/customIcons.js";
|
|
14
|
+
import { getIconsList as F, getRandomIcon as ce } from "./utils.js";
|
|
16
15
|
import h from "./EmojiPicker.module.css.js";
|
|
17
16
|
async function ae(c, a, l = 500) {
|
|
18
|
-
const u = [],
|
|
19
|
-
for (let r = 0; r <
|
|
20
|
-
const
|
|
21
|
-
u.push(...
|
|
17
|
+
const u = [], p = c.length;
|
|
18
|
+
for (let r = 0; r < p; r += l) {
|
|
19
|
+
const f = c.slice(r, r + l).filter(a);
|
|
20
|
+
u.push(...f), await new Promise((w) => setTimeout(w, 0));
|
|
22
21
|
}
|
|
23
22
|
return u;
|
|
24
23
|
}
|
|
25
|
-
const
|
|
24
|
+
const be = B(
|
|
26
25
|
({
|
|
27
26
|
showColors: c,
|
|
28
27
|
locales: a,
|
|
29
28
|
onChange: l,
|
|
30
29
|
value: u,
|
|
31
|
-
onClose:
|
|
30
|
+
onClose: p,
|
|
32
31
|
project: r
|
|
33
32
|
}) => {
|
|
34
|
-
const C = Y(), [
|
|
33
|
+
const C = Y(), [f, w] = x(""), { t: k } = j("ui"), [R, P] = x(
|
|
35
34
|
[]
|
|
36
35
|
);
|
|
37
|
-
|
|
36
|
+
M(() => {
|
|
38
37
|
(async () => {
|
|
39
38
|
const t = await F(r), s = te(t, "c");
|
|
40
39
|
P(
|
|
@@ -45,31 +44,31 @@ const Ce = q(
|
|
|
45
44
|
);
|
|
46
45
|
})();
|
|
47
46
|
}, [r]);
|
|
48
|
-
const [T, S] = x([]), $ =
|
|
47
|
+
const [T, S] = x([]), $ = U(
|
|
49
48
|
async (o) => {
|
|
50
49
|
const t = o.currentTarget.value;
|
|
51
|
-
|
|
50
|
+
w(t);
|
|
52
51
|
const s = await F(r), v = await ae(
|
|
53
52
|
s,
|
|
54
|
-
(d) => d.t.split(",").some((
|
|
53
|
+
(d) => d.t.split(",").some((q) => t.includes(String(q))) || d.n.includes(t),
|
|
55
54
|
500
|
|
56
55
|
);
|
|
57
56
|
S(v.map((d) => d.n));
|
|
58
57
|
},
|
|
59
58
|
[r]
|
|
60
|
-
), i =
|
|
59
|
+
), i = I.parse(u), g = oe((o) => {
|
|
61
60
|
const t = o.currentTarget.getAttribute("data-icon");
|
|
62
61
|
t && (l?.(
|
|
63
|
-
|
|
62
|
+
I.stringify({
|
|
64
63
|
icon: t.replace("i:", ""),
|
|
65
64
|
color: i?.color,
|
|
66
|
-
type:
|
|
65
|
+
type: i?.type || A.FILLED
|
|
67
66
|
})
|
|
68
|
-
), c ||
|
|
67
|
+
), c || p());
|
|
69
68
|
}), n = _({
|
|
70
69
|
color: i?.color || re.COLORS[0],
|
|
71
70
|
theme: C
|
|
72
|
-
}), H =
|
|
71
|
+
}), H = V(() => n.isThemeColor ? {
|
|
73
72
|
"--icon-color": `var(--mantine-color-${n.color}-filled)`,
|
|
74
73
|
"--icon-color-hover": `var(--mantine-color-${n.color}-filled-hover)`
|
|
75
74
|
} : {
|
|
@@ -77,7 +76,7 @@ const Ce = q(
|
|
|
77
76
|
"--icon-color-hover": J(n.value, 0.2)
|
|
78
77
|
}, [n]), O = async () => {
|
|
79
78
|
const o = await ce(r);
|
|
80
|
-
S([]), l?.(
|
|
79
|
+
S([]), l?.(I.stringify({ icon: o, color: i?.color })), c || p();
|
|
81
80
|
};
|
|
82
81
|
return /* @__PURE__ */ m(y, { w: "100%", gap: "sm", pt: 12, pb: 8, h: "100%", children: [
|
|
83
82
|
c && /* @__PURE__ */ m(y, { gap: 4, px: 8, w: "100%", children: [
|
|
@@ -89,10 +88,10 @@ const Ce = q(
|
|
|
89
88
|
gap: 4,
|
|
90
89
|
value: n.color,
|
|
91
90
|
onChange: (o) => l?.(
|
|
92
|
-
|
|
91
|
+
I.stringify({
|
|
93
92
|
color: o,
|
|
94
93
|
icon: i?.icon,
|
|
95
|
-
type:
|
|
94
|
+
type: i?.type || A.FILLED
|
|
96
95
|
})
|
|
97
96
|
),
|
|
98
97
|
colors: [
|
|
@@ -116,7 +115,7 @@ const Ce = q(
|
|
|
116
115
|
W,
|
|
117
116
|
{
|
|
118
117
|
leftSection: /* @__PURE__ */ e(L, { size: 16, icon: G }),
|
|
119
|
-
value:
|
|
118
|
+
value: f,
|
|
120
119
|
placeholder: `${a?.search}...`,
|
|
121
120
|
"data-autofocus": !0,
|
|
122
121
|
styles: {
|
|
@@ -150,17 +149,18 @@ const Ce = q(
|
|
|
150
149
|
}
|
|
151
150
|
) })
|
|
152
151
|
] }),
|
|
153
|
-
/* @__PURE__ */ e(ee, { pl: 8, style: H, children: /* @__PURE__ */ e(
|
|
152
|
+
/* @__PURE__ */ e(ee, { h: "100%", pl: 8, style: H, children: /* @__PURE__ */ e(
|
|
154
153
|
y,
|
|
155
154
|
{
|
|
156
|
-
|
|
155
|
+
mah: "210px",
|
|
156
|
+
h: "100%",
|
|
157
157
|
style: {
|
|
158
158
|
overflowY: "auto"
|
|
159
159
|
},
|
|
160
160
|
gap: 16,
|
|
161
|
-
children:
|
|
161
|
+
children: f ? /* @__PURE__ */ m(y, { flex: 1, align: "stretch", children: [
|
|
162
162
|
/* @__PURE__ */ e(
|
|
163
|
-
|
|
163
|
+
E,
|
|
164
164
|
{
|
|
165
165
|
py: 6,
|
|
166
166
|
pos: "sticky",
|
|
@@ -170,8 +170,8 @@ const Ce = q(
|
|
|
170
170
|
children: /* @__PURE__ */ e(b, { fz: "xs", fw: 500, lh: "140%", c: "dimmed", children: a?.searchResults })
|
|
171
171
|
}
|
|
172
172
|
),
|
|
173
|
-
T.length ? /* @__PURE__ */ e(
|
|
174
|
-
const t =
|
|
173
|
+
T.length ? /* @__PURE__ */ e(N, { cols: 8, spacing: 0, children: T.map((o) => {
|
|
174
|
+
const t = D[o];
|
|
175
175
|
return t ? /* @__PURE__ */ e(
|
|
176
176
|
"div",
|
|
177
177
|
{
|
|
@@ -201,7 +201,6 @@ const Ce = q(
|
|
|
201
201
|
}) }) : /* @__PURE__ */ e(z, { flex: 1, justify: "center", align: "stretch", children: /* @__PURE__ */ e(
|
|
202
202
|
ne,
|
|
203
203
|
{
|
|
204
|
-
showDots: !1,
|
|
205
204
|
size: 100,
|
|
206
205
|
description: a?.searchNoResults,
|
|
207
206
|
descriptionProps: {
|
|
@@ -211,7 +210,7 @@ const Ce = q(
|
|
|
211
210
|
) })
|
|
212
211
|
] }) : R.map((o) => /* @__PURE__ */ m("div", { children: [
|
|
213
212
|
/* @__PURE__ */ e(
|
|
214
|
-
|
|
213
|
+
E,
|
|
215
214
|
{
|
|
216
215
|
bg: "light-dark(var(--mantine-color-white), var(--mantine-color-dark-6))",
|
|
217
216
|
py: 6,
|
|
@@ -221,8 +220,8 @@ const Ce = q(
|
|
|
221
220
|
children: /* @__PURE__ */ e(b, { fz: "xs", fw: 500, lh: "140%", c: "dimmed", children: o.id || k("noCat") })
|
|
222
221
|
}
|
|
223
222
|
),
|
|
224
|
-
/* @__PURE__ */ e(
|
|
225
|
-
const s =
|
|
223
|
+
/* @__PURE__ */ e(N, { cols: 10, spacing: 0, children: o.icons.map((t) => {
|
|
224
|
+
const s = D[t];
|
|
226
225
|
return s ? /* @__PURE__ */ e(
|
|
227
226
|
"div",
|
|
228
227
|
{
|
|
@@ -264,5 +263,5 @@ const Ce = q(
|
|
|
264
263
|
}
|
|
265
264
|
);
|
|
266
265
|
export {
|
|
267
|
-
|
|
266
|
+
be as IconsPanel
|
|
268
267
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IEmojiItem } from './types';
|
|
2
|
+
export type IconMinified = {
|
|
3
|
+
n: string;
|
|
4
|
+
c: string;
|
|
5
|
+
t: string;
|
|
6
|
+
s: 'outline' | 'filled' | 'unknown';
|
|
7
|
+
}[];
|
|
8
|
+
export declare const getIconsList: (project?: string) => Promise<IconMinified>;
|
|
9
|
+
export declare function getRandomIcon(project?: string): Promise<string | undefined>;
|
|
10
|
+
export declare const getEmojis: () => Promise<IEmojiItem[]>;
|
|
11
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGrC,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CACrC,EAAE,CAAC;AAIJ,eAAO,MAAM,YAAY,GAAU,UAAU,MAAM,0BAqElD,CAAC;AAEF,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE,MAAM,+BAKnD;AAED,eAAO,MAAM,SAAS,6BAqBrB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { excludeCategories as f } from "./constants.js";
|
|
2
|
+
let r = null;
|
|
3
|
+
const u = async (a) => {
|
|
4
|
+
if (r) return r;
|
|
5
|
+
const n = (await import("../../assets/jsons/icons.min.json.js")).default.filter(
|
|
6
|
+
(e) => e.s === "filled" && !f.includes(e.c)
|
|
7
|
+
), i = n.find((e) => e.n === "tool"), c = n.find((e) => e.n === "check");
|
|
8
|
+
let l;
|
|
9
|
+
if (a === "PROJECT") {
|
|
10
|
+
const e = [
|
|
11
|
+
"check",
|
|
12
|
+
"bug",
|
|
13
|
+
"heart-handshake",
|
|
14
|
+
"square-rotated",
|
|
15
|
+
"circle-dashed"
|
|
16
|
+
], s = n.filter(
|
|
17
|
+
(t) => t.n.startsWith("antenna-bars-") || e.includes(t.n)
|
|
18
|
+
);
|
|
19
|
+
s.forEach((t) => {
|
|
20
|
+
t.c = "Additional";
|
|
21
|
+
});
|
|
22
|
+
const d = n.filter(
|
|
23
|
+
(t) => !t.n.startsWith("antenna-bars-") && !e.includes(t.n)
|
|
24
|
+
);
|
|
25
|
+
i && (i.c = "Additional", s.some((t) => t.n === "tool") || s.push(i)), c && (c.c = "Additional", s.some((t) => t.n === "check") || s.push(c)), l = [...s, ...d];
|
|
26
|
+
} else
|
|
27
|
+
l = n;
|
|
28
|
+
return r = l, r;
|
|
29
|
+
};
|
|
30
|
+
async function m(a) {
|
|
31
|
+
const o = await u(a);
|
|
32
|
+
if (!o || o.length === 0) return;
|
|
33
|
+
const n = Math.floor(Math.random() * o.length);
|
|
34
|
+
return o[n].n;
|
|
35
|
+
}
|
|
36
|
+
const p = async () => {
|
|
37
|
+
const a = navigator.userAgent, o = await navigator.userAgentData?.getHighEntropyValues([
|
|
38
|
+
"platformVersion"
|
|
39
|
+
]), n = o?.platform === "Windows" && Number(o?.platformVersion?.split(".")[0]) >= 13, i = /Windows NT 10\.0/.test(a);
|
|
40
|
+
return n ? (await import("../../assets/jsons/emoji-categorized-windows.json.js")).default : i ? (await import("../../assets/jsons/emoji-categorized-windows10.json.js")).default : (await import("../../assets/jsons/emoji-categorized.json.js")).default;
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
p as getEmojis,
|
|
44
|
+
u as getIconsList,
|
|
45
|
+
m as getRandomIcon
|
|
46
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
interface IProps {
|
|
2
2
|
type?: string | null;
|
|
3
3
|
icon?: string | null;
|
|
4
4
|
title?: string | null;
|
|
@@ -7,7 +7,10 @@ export declare const EntityIcon: <T extends {
|
|
|
7
7
|
parentId?: string | null;
|
|
8
8
|
isFolder?: boolean;
|
|
9
9
|
pathById?: string[];
|
|
10
|
-
|
|
10
|
+
isOpen?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const EntityIcon: <T extends IProps>({ item }: {
|
|
11
13
|
item?: T;
|
|
12
14
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export {};
|
|
13
16
|
//# sourceMappingURL=EntityIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityIcon.d.ts","sourceRoot":"","sources":["../../src/components/EntityIcon.tsx"],"names":[],"mappings":"AAYA,
|
|
1
|
+
{"version":3,"file":"EntityIcon.d.ts","sourceRoot":"","sources":["../../src/components/EntityIcon.tsx"],"names":[],"mappings":"AAYA,UAAU,MAAM;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAOD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,EAAE,UAAU;IAAE,IAAI,CAAC,EAAE,CAAC,CAAA;CAAE,mDAwHlE,CAAC"}
|