@layers-app/shared 0.2.2 → 0.2.4
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/group_default_icon.svg.js +4 -0
- 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 +31 -23
- package/dist/components/AppContainer/hooks/useAppContainerStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerStore.js +30 -20
- package/dist/components/AppContainer/types.d.ts +1 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/CommentComposer/CommentComposer.module.css.js +4 -4
- package/dist/components/CommentComposer/CommentEditorHotkeys.d.ts.map +1 -1
- package/dist/components/CommentComposer/CommentEditorHotkeys.js +25 -22
- package/dist/components/CommentComposer/index.d.ts.map +1 -1
- package/dist/components/CommentComposer/index.js +237 -153
- package/dist/components/CommentComposer/{useFloatingPosition.d.ts → useVirtualAnchor.d.ts} +3 -4
- package/dist/components/CommentComposer/useVirtualAnchor.d.ts.map +1 -0
- package/dist/components/CommentComposer/useVirtualAnchor.js +71 -0
- package/dist/components/EmojiPicker/EmojiPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPanel.js +50 -49
- package/dist/components/EmojiPicker/IconsPanel.d.ts.map +1 -1
- package/dist/components/EmojiPicker/IconsPanel.js +79 -78
- package/dist/components/FilePicker/FilePicker.d.ts +2 -3
- package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePicker.js +88 -122
- package/dist/components/FilePicker/FilePickerGiphy.d.ts +1 -3
- package/dist/components/FilePicker/FilePickerGiphy.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerGiphy.js +43 -44
- package/dist/components/FilePicker/FilePickerLink.d.ts +2 -3
- package/dist/components/FilePicker/FilePickerLink.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerLink.js +21 -21
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts +1 -3
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUnsplash.js +45 -46
- package/dist/components/FilePicker/FilePickerUpload.d.ts +3 -3
- package/dist/components/FilePicker/FilePickerUpload.d.ts.map +1 -1
- package/dist/components/FilePicker/FilePickerUpload.js +49 -43
- package/dist/components/FormViewer/hooks/useFormGlobalTheme.d.ts +5 -5
- package/dist/components/GroupAvatar/index.d.ts +9 -0
- package/dist/components/GroupAvatar/index.d.ts.map +1 -0
- package/dist/components/GroupAvatar/index.js +24 -0
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +6 -5
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts +2 -2
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
- package/dist/components/WorkspaceMenu/WorkspaceMenu.js +100 -103
- package/dist/components/modals/RemoveConfirmModal.d.ts.map +1 -1
- package/dist/components/modals/RemoveConfirmModal.js +22 -21
- package/dist/components/table/FrontTable.d.ts +2 -1
- package/dist/components/table/FrontTable.d.ts.map +1 -1
- package/dist/components/table/components/TableCell.d.ts.map +1 -1
- package/dist/components/table/components/TableCell.js +63 -26
- package/dist/components/table/components/TableMenu.d.ts +2 -1
- package/dist/components/table/components/TableMenu.d.ts.map +1 -1
- package/dist/components/table/components/TableMenu.js +15 -14
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +7 -4
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +390 -384
- package/dist/lang/locales/ui_en.json.js +20 -12
- package/dist/lang/locales/ui_es.json.js +18 -10
- package/dist/lang/locales/ui_ru.json.js +24 -16
- package/dist/store/accessOptionsControl.d.ts +11 -1
- package/dist/store/accessOptionsControl.d.ts.map +1 -1
- package/dist/store/accessOptionsControl.js +15 -7
- package/package.json +1 -1
- package/dist/components/CommentComposer/useFloatingPosition.d.ts.map +0 -1
- package/dist/components/CommentComposer/useFloatingPosition.js +0 -115
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
const e = { searchResults: "Search results", icons: "Icons", searchNoResults: "No results found", chooseColor: "Choose color", categories: { activity: "Activities", custom: "Custom", flags: "Flags", foods: "Food and drinks", frequent: "Recent", nature: "Animals and nature", objects: "Objects", people: "Emotions and people", places: "Travel and places", symbols: "Symbols" } }, o = { label: "Image", change: "Change", description: "You can upload images up to 256×256 and up to 5mb." }, a = { colorGradients: "Colors and gradients", jamesWebbTelescope: "Telescope", nasaArchive: "Planet", theIndianEdition: "Cyberpunk", theMetMuseum: "Museum", theMetMuseumPatterns: "Pattern", theMetMuseumJapanesePrints: "Nature", rijkmuseum: "Black hole" },
|
|
1
|
+
const e = { searchResults: "Search results", icons: "Icons", searchNoResults: "No results found", chooseColor: "Choose color", categories: { activity: "Activities", custom: "Custom", flags: "Flags", foods: "Food and drinks", frequent: "Recent", nature: "Animals and nature", objects: "Objects", people: "Emotions and people", places: "Travel and places", symbols: "Symbols" } }, o = { label: "Image", change: "Change", description: "You can upload images up to 256×256 and up to 5mb." }, a = { colorGradients: "Colors and gradients", jamesWebbTelescope: "Telescope", nasaArchive: "Planet", theIndianEdition: "Cyberpunk", theMetMuseum: "Museum", theMetMuseumPatterns: "Pattern", theMetMuseumJapanesePrints: "Nature", rijkmuseum: "Black hole" }, s = { gallery: "Gallery", upload: "Upload", uploadFile: "Upload file", maxFileSize: "Images wider than 1600px are recommended. Maximum file size: 5MB.", link: "Link", searchImages: "Search Image", pasteLink: "Paste an image link...", submitLink: "Apply", worksWithAnyImage: "Works with any image from the Internet", searchImage: "Search for an image...", noResult: "No image found for your query.", change: "Change cover", invalidLink: "Invalid link", position: "Reposition", dragSave: "Save position", dragCancel: "Cancel" }, r = { color: "Color", background: "Background", colors: { standard: "Standard", gray: "Gray", brown: "Brown", orange: "Orange", yellow: "Yellow", green: "Green", blue: "Blue", purple: "Purple", pink: "Pink", red: "Red" } }, n = { save: "Save" }, i = "Remove", t = "Error", l = "Drag images here or click to select files", c = { dropFileHere: { image: "Drag images here or click to select files", video: "Drag videos here or click to select files", audio: "Drag audio files here or click to select files", file: "Drag files here or click to select files" }, description: { image: "Images wider than 1600px are recommended. Maximum file size: {{maxSize}}MB.", video: "Maximum file size: {{maxSize}}MB.", audio: "Maximum file size: {{maxSize}}MB.", file: "Maximum file size: {{maxSize}}MB." }, errors: { typeIsNotAllowed: "This file type is not supported", shouldNotExceed: "File size should not exceed 5 MB.", doNotUploadMoreThanSingleFile: "Please upload no more than one file." } }, u = { download: "Download", zoomOut: "Zoom out", zoomIn: "Zoom in", close: "Close", fileError: "Upload failed. Please try again." }, d = { day_one: "{{count}} day ago", day_other: "{{count}} days ago", hour_one: "{{count}} hour ago", hour_other: "{{count}} hours ago", minute_one: "{{count}} minute ago", minute_other: "{{count}} minutes ago", second_one: "{{count}} second ago", second_other: "{{count}} seconds ago", justNow: "just now", shortDay: "{{count}}d ago.", shortHour: "{{count}}h ago.", shortMinute: "{{count}}m ago.", shortSecond: "{{count}}s ago.", shortJustNow: "now." }, m = {
|
|
2
2
|
emojiPicker: e,
|
|
3
3
|
uploadImage: o,
|
|
4
4
|
coverGroups: a,
|
|
5
|
-
changeCover:
|
|
6
|
-
colorPicker:
|
|
7
|
-
customDrawer:
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
changeCover: s,
|
|
6
|
+
colorPicker: r,
|
|
7
|
+
customDrawer: n,
|
|
8
|
+
remove: i,
|
|
9
|
+
errorMessage: t,
|
|
10
|
+
dropFileHere: l,
|
|
11
|
+
filePicker: c,
|
|
12
|
+
gallery: u,
|
|
13
|
+
relativeTime: d
|
|
10
14
|
};
|
|
11
15
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
s as changeCover,
|
|
17
|
+
r as colorPicker,
|
|
14
18
|
a as coverGroups,
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
n as customDrawer,
|
|
20
|
+
m as default,
|
|
21
|
+
l as dropFileHere,
|
|
17
22
|
e as emojiPicker,
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
t as errorMessage,
|
|
24
|
+
c as filePicker,
|
|
25
|
+
u as gallery,
|
|
26
|
+
d as relativeTime,
|
|
27
|
+
i as remove,
|
|
20
28
|
o as uploadImage
|
|
21
29
|
};
|
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
const e = { searchResults: "Resultados de búsqueda", icons: "Iconos", searchNoResults: "No se encontraron resultados", chooseColor: "Elegir color", categories: { activity: "Actividades", custom: "Personalizado", flags: "Banderas", foods: "Comida y bebidas", frequent: "Usados frecuentemente", nature: "Animales y naturaleza", objects: "Objetos", people: "Emociones y personas", places: "Viajes y lugares", symbols: "Símbolos" } }, a = { label: "Imagen", change: "Cambiar", description: "Puedes subir imágenes de hasta 256×256 y hasta 5 MB." }, o = { colorGradients: "Colores y degradados", jamesWebbTelescope: "Telescopio", nasaArchive: "Planeta", theIndianEdition: "Cyberpunk", theMetMuseum: "Museo", theMetMuseumPatterns: "Patrón", theMetMuseumJapanesePrints: "Naturaleza", rijkmuseum: "Agujero negro" }, r = { gallery: "Galería", upload: "Subir", uploadFile: "Subir archivo", maxFileSize: "Se recomiendan imágenes de más de 1600px de ancho. Tamaño máximo de archivo: 5MB.", link: "Enlace", searchImages: "Buscar imagen", pasteLink: "Pegar enlace de imagen...", submitLink: "Aplicar", worksWithAnyImage: "Funciona con cualquier imagen de Internet", searchImage: "Buscar imagen...", noResult: "No se encontró ninguna imagen para tu búsqueda.", change: "Cambiar portada", invalidLink: "Enlace inválido", position: "Reposicionar", dragSave: "Guardar posición", dragCancel: "Cancelar" },
|
|
1
|
+
const e = { searchResults: "Resultados de búsqueda", icons: "Iconos", searchNoResults: "No se encontraron resultados", chooseColor: "Elegir color", categories: { activity: "Actividades", custom: "Personalizado", flags: "Banderas", foods: "Comida y bebidas", frequent: "Usados frecuentemente", nature: "Animales y naturaleza", objects: "Objetos", people: "Emociones y personas", places: "Viajes y lugares", symbols: "Símbolos" } }, a = { label: "Imagen", change: "Cambiar", description: "Puedes subir imágenes de hasta 256×256 y hasta 5 MB." }, o = { colorGradients: "Colores y degradados", jamesWebbTelescope: "Telescopio", nasaArchive: "Planeta", theIndianEdition: "Cyberpunk", theMetMuseum: "Museo", theMetMuseumPatterns: "Patrón", theMetMuseumJapanesePrints: "Naturaleza", rijkmuseum: "Agujero negro" }, r = { gallery: "Galería", upload: "Subir", uploadFile: "Subir archivo", maxFileSize: "Se recomiendan imágenes de más de 1600px de ancho. Tamaño máximo de archivo: 5MB.", link: "Enlace", searchImages: "Buscar imagen", pasteLink: "Pegar enlace de imagen...", submitLink: "Aplicar", worksWithAnyImage: "Funciona con cualquier imagen de Internet", searchImage: "Buscar imagen...", noResult: "No se encontró ninguna imagen para tu búsqueda.", change: "Cambiar portada", invalidLink: "Enlace inválido", position: "Reposicionar", dragSave: "Guardar posición", dragCancel: "Cancelar" }, s = { color: "Color", background: "Fondo", colors: { standard: "Estándar", gray: "Gris", brown: "Marrón", orange: "Naranja", yellow: "Amarillo", green: "Verde", blue: "Azul", purple: "Púrpura", pink: "Rosa", red: "Rojo" } }, n = { save: "Guardar" }, c = "Eliminar", i = "Error", t = "Arrastra imágenes aquí o haz clic para seleccionar archivos", l = { dropFileHere: { image: "Arrastra imágenes aquí o haz clic para seleccionar archivos", video: "Arrastra videos aquí o haz clic para seleccionar archivos", audio: "Arrastra archivos de audio aquí o haz clic para seleccionar archivos", file: "Arrastra archivos aquí o haz clic para seleccionar archivos" }, description: { image: "Se recomiendan imágenes de más de 1600px de ancho. Tamaño máximo de archivo: {{maxSize}}MB.", video: "Tamaño máximo de archivo: {{maxSize}}MB.", audio: "Tamaño máximo de archivo: {{maxSize}}MB.", file: "Tamaño máximo de archivo: {{maxSize}}MB." }, errors: { typeIsNotAllowed: "Este tipo de archivo no es compatible", shouldNotExceed: "El tamaño del archivo no debe exceder 5 MB.", doNotUploadMoreThanSingleFile: "Por favor, carga no más de un archivo." } }, d = { download: "Descargar", zoomOut: "Alejar", zoomIn: "Acercar", close: "Cerrar", fileError: "La carga falló. Por favor, inténtalo de nuevo." }, u = { day_one: "hace {{count}} día", day_other: "hace {{count}} días", hour_one: "hace {{count}} hora", hour_other: "hace {{count}} horas", minute_one: "hace {{count}} minuto", minute_other: "hace {{count}} minutos", second_one: "hace {{count}} segundo", second_other: "hace {{count}} segundos", justNow: "ahora mismo", shortDay: "hace {{count}}d.", shortHour: "hace {{count}}h.", shortMinute: "hace {{count}}m.", shortSecond: "hace {{count}}s.", shortJustNow: "ahora." }, m = {
|
|
2
2
|
emojiPicker: e,
|
|
3
3
|
uploadImage: a,
|
|
4
4
|
coverGroups: o,
|
|
5
5
|
changeCover: r,
|
|
6
|
-
colorPicker:
|
|
7
|
-
customDrawer:
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
colorPicker: s,
|
|
7
|
+
customDrawer: n,
|
|
8
|
+
remove: c,
|
|
9
|
+
errorMessage: i,
|
|
10
|
+
dropFileHere: t,
|
|
11
|
+
filePicker: l,
|
|
12
|
+
gallery: d,
|
|
13
|
+
relativeTime: u
|
|
10
14
|
};
|
|
11
15
|
export {
|
|
12
16
|
r as changeCover,
|
|
13
|
-
|
|
17
|
+
s as colorPicker,
|
|
14
18
|
o as coverGroups,
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
n as customDrawer,
|
|
20
|
+
m as default,
|
|
21
|
+
t as dropFileHere,
|
|
17
22
|
e as emojiPicker,
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
i as errorMessage,
|
|
24
|
+
l as filePicker,
|
|
25
|
+
d as gallery,
|
|
26
|
+
u as relativeTime,
|
|
27
|
+
c as remove,
|
|
20
28
|
a as uploadImage
|
|
21
29
|
};
|
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
const
|
|
2
|
-
emojiPicker:
|
|
3
|
-
coverGroups:
|
|
4
|
-
changeCover:
|
|
5
|
-
uploadImage:
|
|
1
|
+
const e = { searchResults: "Результаты поиска", searchNoResults: "Результаты не найдены", icons: "Иконки", chooseColor: "Выбрать цвет", categories: { activity: "Активности", custom: "Свои", flags: "Флаги", foods: "Еда и напитки", frequent: "Часто используемые", nature: "Животные и природа", objects: "Предметы", people: "Эмоции и люди", places: "Путешествия и места", symbols: "Символы" } }, o = { colorGradients: "Цвета и градиенты", jamesWebbTelescope: "Телескоп", nasaArchive: "Планета", theIndianEdition: "Киберпанк", theMetMuseum: "Музей", theMetMuseumPatterns: "Паттерн", theMetMuseumJapanesePrints: "Природа", rijkmuseum: "Черная дыра" }, t = { gallery: "Галерея", upload: "Загрузить", uploadFile: "Загрузить файл", maxFileSize: "Рекомендуются изображения шире 1600px. Максимальный размер файла: 5МБ.", link: "Ссылка", searchImages: "Поиск изображения", pasteLink: "Вставьте ссылку на изображение...", submitLink: "Применить", worksWithAnyImage: "Работает с любыми изображениями из Интернета", searchImage: "Поиск изображения...", noResult: "По вашему запросу изображений не найдено", change: "Изменить обложку", invalidLink: "Неверная ссылка", position: "Изменить Позицию", dragSave: "Сохранить", dragCancel: "Отменить" }, n = { label: "Изображение", change: "Изменить", description: "Вы можете загружать изображения размером до 256×256 и весом до 5 МБ." }, s = { color: "Цвет", background: "Подложка", colors: { standard: "Стандартный", gray: "Серый", brown: "Коричневый", orange: "Оранжевый", yellow: "Желтый", green: "Зеленый", blue: "Синий", purple: "Фиолетовый", pink: "Розовый", red: "Красный" } }, r = { save: "Сохранить" }, c = "Удалить", a = "Ошибка", u = "Перетащите изображения сюда или нажмите, чтобы выбрать файлы", i = { dropFileHere: { image: "Перетащите изображения сюда или нажмите, чтобы выбрать файлы", video: "Перетащите видео сюда или нажмите, чтобы выбрать файлы", audio: "Перетащите аудио файлы сюда или нажмите, чтобы выбрать файлы", file: "Перетащите файлы сюда или нажмите, чтобы выбрать файлы" }, description: { image: "Рекомендуются изображения шире 1600px. Максимальный размер файла: {{maxSize}}МБ.", video: "Максимальный размер файла: {{maxSize}}МБ.", audio: "Максимальный размер файла: {{maxSize}}МБ.", file: "Максимальный размер файла: {{maxSize}}МБ." }, errors: { typeIsNotAllowed: "Этот тип файла не поддерживается", shouldNotExceed: "Размер файла не должен превышать 5 МБ.", doNotUploadMoreThanSingleFile: "Пожалуйста, загрузите не более одного файла." } }, l = { download: "Скачать", zoomOut: "Уменьшить", zoomIn: "Приблизить", close: "Закрыть", fileError: "Загрузка не удалась. Попробуйте снова." }, d = { day_one: "{{count}} день назад", day_few: "{{count}} дня назад", day_many: "{{count}} дней назад", day_other: "{{count}} дней назад", hour_one: "{{count}} час назад", hour_few: "{{count}} часа назад", hour_many: "{{count}} часов назад", hour_other: "{{count}} часов назад", minute_one: "{{count}} минута назад", minute_few: "{{count}} минуты назад", minute_many: "{{count}} минут назад", minute_other: "{{count}} минут назад", second_one: "{{count}} секунда назад", second_few: "{{count}} секунды назад", second_many: "{{count}} секунд назад", second_other: "{{count}} секунд назад", justNow: "только что", shortDay: "{{count}}д назад.", shortHour: "{{count}}ч назад.", shortMinute: "{{count}}м назад.", shortSecond: "{{count}}с назад.", shortJustNow: "сейчас." }, m = {
|
|
2
|
+
emojiPicker: e,
|
|
3
|
+
coverGroups: o,
|
|
4
|
+
changeCover: t,
|
|
5
|
+
uploadImage: n,
|
|
6
6
|
colorPicker: s,
|
|
7
|
-
customDrawer:
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
customDrawer: r,
|
|
8
|
+
remove: c,
|
|
9
|
+
errorMessage: a,
|
|
10
|
+
dropFileHere: u,
|
|
11
|
+
filePicker: i,
|
|
12
|
+
gallery: l,
|
|
13
|
+
relativeTime: d
|
|
10
14
|
};
|
|
11
15
|
export {
|
|
12
|
-
|
|
16
|
+
t as changeCover,
|
|
13
17
|
s as colorPicker,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
o as coverGroups,
|
|
19
|
+
r as customDrawer,
|
|
20
|
+
m as default,
|
|
21
|
+
u as dropFileHere,
|
|
22
|
+
e as emojiPicker,
|
|
23
|
+
a as errorMessage,
|
|
24
|
+
i as filePicker,
|
|
25
|
+
l as gallery,
|
|
26
|
+
d as relativeTime,
|
|
27
|
+
c as remove,
|
|
28
|
+
n as uploadImage
|
|
21
29
|
};
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
export declare enum EntityType {
|
|
2
|
+
None = "none",
|
|
3
|
+
Page = "page",
|
|
4
|
+
Form = "form",
|
|
5
|
+
Flow = "flow",
|
|
6
|
+
Project = "project",
|
|
7
|
+
Sprint = "sprint"
|
|
8
|
+
}
|
|
1
9
|
interface AccessOptionsControl {
|
|
2
10
|
opened: boolean;
|
|
11
|
+
entityId: string | null;
|
|
12
|
+
entityType: EntityType | null;
|
|
3
13
|
}
|
|
4
14
|
export declare const useAccessOptionsControl: import("zustand").UseBoundStore<import("zustand").StoreApi<AccessOptionsControl>>;
|
|
5
|
-
export declare const toggleAccessOptionsControl: (value: boolean) => void;
|
|
15
|
+
export declare const toggleAccessOptionsControl: (value: boolean, entityId?: string, entityType?: EntityType) => void;
|
|
6
16
|
export {};
|
|
7
17
|
//# sourceMappingURL=accessOptionsControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessOptionsControl.d.ts","sourceRoot":"","sources":["../../src/store/accessOptionsControl.ts"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAC5B,MAAM,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"accessOptionsControl.d.ts","sourceRoot":"","sources":["../../src/store/accessOptionsControl.ts"],"names":[],"mappings":"AAEA,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,UAAU,oBAAoB;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;CAC/B;AAED,eAAO,MAAM,uBAAuB,mFAIjC,CAAC;AAEJ,eAAO,MAAM,0BAA0B,GACrC,OAAO,OAAO,EACd,WAAW,MAAM,EACjB,aAAa,UAAU,SAOxB,CAAC"}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import { create as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { create as r } from "zustand";
|
|
2
|
+
var l = /* @__PURE__ */ ((o) => (o.None = "none", o.Page = "page", o.Form = "form", o.Flow = "flow", o.Project = "project", o.Sprint = "sprint", o))(l || {});
|
|
3
|
+
const s = r(() => ({
|
|
4
|
+
opened: !1,
|
|
5
|
+
entityId: null,
|
|
6
|
+
entityType: null
|
|
7
|
+
})), c = (o, e, n) => {
|
|
8
|
+
s.setState({
|
|
9
|
+
opened: o,
|
|
10
|
+
entityId: o && e ? e : null,
|
|
11
|
+
entityType: o && n ? n : null
|
|
12
|
+
});
|
|
6
13
|
};
|
|
7
14
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
l as EntityType,
|
|
16
|
+
c as toggleAccessOptionsControl,
|
|
17
|
+
s as useAccessOptionsControl
|
|
10
18
|
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFloatingPosition.d.ts","sourceRoot":"","sources":["../../../src/components/CommentComposer/useFloatingPosition.ts"],"names":[],"mappings":"AAEA,UAAU,wBAAwB;IAChC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,CACf,OAAO,EAAE,cAAc,EACvB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,EACzC,cAAc,EAAE;QACd,SAAS,EAAE,cAAc,CAAC;QAC1B,QAAQ,EAAE,eAAe,EAAE,CAAC;KAC7B,KACE,IAAI,CAAC;IACV,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,cAAc,EAAE;QACd,SAAS,EAAE,cAAc,CAAC;QAC1B,QAAQ,EAAE,eAAe,EAAE,CAAC;KAC7B,CAAC;CACH;AAED,wBAAgB,mBAAmB,CAAC,EAClC,MAAM,EACN,OAAO,EACP,cAAc,EACd,YAAY,EACZ,cAAc,GACf,EAAE,wBAAwB,QAqR1B"}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { useRef as T, useCallback as C, useLayoutEffect as k, useEffect as g } from "react";
|
|
2
|
-
function _({
|
|
3
|
-
boxRef: n,
|
|
4
|
-
isFloat: s,
|
|
5
|
-
updateLocation: m,
|
|
6
|
-
selectionRef: f,
|
|
7
|
-
selectionState: u
|
|
8
|
-
}) {
|
|
9
|
-
const w = T(null), E = T(!1), d = T({ placement: "bottom", lockedUntil: 0 }), v = 10 * 30 * 0.7, a = C(() => {
|
|
10
|
-
if (!n.current) return;
|
|
11
|
-
const e = n.current, t = e.querySelector(
|
|
12
|
-
'[class*="editorWrapper"]'
|
|
13
|
-
), l = t?.scrollHeight || 0, r = l > v, i = l > 50;
|
|
14
|
-
s && i ? e.setAttribute("data-multiline", "true") : e.removeAttribute("data-multiline"), r && t ? (t.style.maxHeight = `${v}px`, t.style.overflowY = "auto", t.style.scrollbarWidth = "thin", e.setAttribute("data-editor-constrained", "true")) : t && (t.style.maxHeight = "", t.style.overflowY = "", t.style.scrollbarWidth = "", e.removeAttribute("data-editor-constrained"));
|
|
15
|
-
}, [n, s, v]), y = C(() => {
|
|
16
|
-
if (!n.current || !w.current || !s || !E.current)
|
|
17
|
-
return;
|
|
18
|
-
const e = n.current, t = w.current, l = e.offsetHeight, r = 36, i = 10, H = window.innerHeight - t.bottom, b = t.top, M = Date.now(), I = M < d.current.lockedUntil;
|
|
19
|
-
let c, p, A;
|
|
20
|
-
I ? c = d.current.placement : (H >= l + r ? c = "bottom" : b >= l ? c = "top" : c = "bottom", c !== d.current.placement && (d.current = {
|
|
21
|
-
placement: c,
|
|
22
|
-
lockedUntil: M + 500
|
|
23
|
-
})), c === "bottom" && H < l + r ? p = H - r : c === "top" && b < l && (p = b - r);
|
|
24
|
-
const x = window.pageYOffset || document.documentElement.scrollTop;
|
|
25
|
-
if (c === "bottom" ? A = t.bottom + i + x : A = t.top - l - i + x, e.style.top = `${A}px`, a(), p) {
|
|
26
|
-
e.style.maxHeight = `${p}px`, e.setAttribute("data-constrained", "true"), e.style.display = "flex", e.style.flexDirection = "column", e.style.overflow = "hidden";
|
|
27
|
-
const o = e.querySelector(
|
|
28
|
-
'[class*="composerContainer"]'
|
|
29
|
-
);
|
|
30
|
-
o && (o.style.display = "flex", o.style.flexDirection = "column", o.style.flex = "1 1 auto", o.style.minHeight = "0", o.style.overflow = "hidden");
|
|
31
|
-
} else {
|
|
32
|
-
e.style.maxHeight = "", e.removeAttribute("data-constrained"), e.style.display = "", e.style.flexDirection = "", e.style.overflow = "";
|
|
33
|
-
const o = e.querySelector(
|
|
34
|
-
'[class*="composerContainer"]'
|
|
35
|
-
);
|
|
36
|
-
o && (o.style.display = "", o.style.flexDirection = "", o.style.flex = "", o.style.minHeight = "", o.style.overflow = "");
|
|
37
|
-
}
|
|
38
|
-
e.setAttribute("data-placement", c);
|
|
39
|
-
}, [s, n, a]), h = C(
|
|
40
|
-
(e) => {
|
|
41
|
-
if (e.elements.length > 0) {
|
|
42
|
-
const t = e.elements[0], l = e.elements[e.elements.length - 1], r = t.getBoundingClientRect(), i = l.getBoundingClientRect();
|
|
43
|
-
w.current = {
|
|
44
|
-
top: r.top,
|
|
45
|
-
bottom: i.bottom,
|
|
46
|
-
left: Math.min(r.left, i.left),
|
|
47
|
-
right: Math.max(r.right, i.right),
|
|
48
|
-
width: Math.max(r.right, i.right) - Math.min(r.left, i.left),
|
|
49
|
-
height: i.bottom - r.top,
|
|
50
|
-
x: Math.min(r.left, i.left),
|
|
51
|
-
y: r.top
|
|
52
|
-
}, E.current = !0;
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
[]
|
|
56
|
-
);
|
|
57
|
-
k(() => {
|
|
58
|
-
if (!s || !m) return;
|
|
59
|
-
m(n.current, f, u), setTimeout(() => {
|
|
60
|
-
h(u);
|
|
61
|
-
}, 50);
|
|
62
|
-
const e = u.container, t = document.body;
|
|
63
|
-
if (t !== null)
|
|
64
|
-
return t.appendChild(e), () => {
|
|
65
|
-
t.removeChild(e);
|
|
66
|
-
};
|
|
67
|
-
}, [
|
|
68
|
-
s,
|
|
69
|
-
m,
|
|
70
|
-
u,
|
|
71
|
-
h,
|
|
72
|
-
n,
|
|
73
|
-
f
|
|
74
|
-
]), g(() => {
|
|
75
|
-
a();
|
|
76
|
-
}, [a]), g(() => {
|
|
77
|
-
if (!n.current) return;
|
|
78
|
-
const e = new ResizeObserver(() => {
|
|
79
|
-
s ? y() : a();
|
|
80
|
-
});
|
|
81
|
-
return e.observe(n.current), () => {
|
|
82
|
-
e.disconnect();
|
|
83
|
-
};
|
|
84
|
-
}, [s, y, a, n]), g(() => {
|
|
85
|
-
if (!s || !m) return;
|
|
86
|
-
let e;
|
|
87
|
-
const t = () => {
|
|
88
|
-
clearTimeout(e), e = setTimeout(() => {
|
|
89
|
-
E.current = !1, m(n.current, f, u), setTimeout(() => {
|
|
90
|
-
h(u), y(), d.current.lockedUntil = Date.now() + 500;
|
|
91
|
-
}, 50);
|
|
92
|
-
}, 150);
|
|
93
|
-
};
|
|
94
|
-
return window.addEventListener("resize", t), () => {
|
|
95
|
-
clearTimeout(e), window.removeEventListener("resize", t);
|
|
96
|
-
};
|
|
97
|
-
}, [
|
|
98
|
-
s,
|
|
99
|
-
m,
|
|
100
|
-
y,
|
|
101
|
-
u,
|
|
102
|
-
h,
|
|
103
|
-
n,
|
|
104
|
-
f
|
|
105
|
-
]), g(() => {
|
|
106
|
-
const e = document.querySelector("main");
|
|
107
|
-
if (e)
|
|
108
|
-
return s ? e.style.overflow = "hidden" : e.style.overflow = "", () => {
|
|
109
|
-
e.style.overflow = "";
|
|
110
|
-
};
|
|
111
|
-
}, [s]);
|
|
112
|
-
}
|
|
113
|
-
export {
|
|
114
|
-
_ as useFloatingPosition
|
|
115
|
-
};
|