diff --git a/packages/ui-next/package.json b/packages/ui-next/package.json index 1a44ab6ce2..558e88b067 100644 --- a/packages/ui-next/package.json +++ b/packages/ui-next/package.json @@ -58,6 +58,8 @@ "@hcengineering/view-resources": "^0.6.0", "@hcengineering/presence": "^0.6.0", "@hcengineering/presence-resources": "^0.6.0", + "@hcengineering/emoji": "^0.6.0", + "@hcengineering/emoji-resources": "^0.6.0", "@tiptap/core": "^2.11.7", "@tiptap/pm": "^2.11.7", "fast-equals": "^5.2.2", diff --git a/packages/ui-next/src/components/ReactionsList.svelte b/packages/ui-next/src/components/ReactionsList.svelte index ea4ade7df8..feda466df1 100644 --- a/packages/ui-next/src/components/ReactionsList.svelte +++ b/packages/ui-next/src/components/ReactionsList.svelte @@ -15,9 +15,10 @@ diff --git a/plugins/activity-resources/src/utils.ts b/plugins/activity-resources/src/utils.ts index b685b164b5..53d480128e 100644 --- a/plugins/activity-resources/src/utils.ts +++ b/plugins/activity-resources/src/utils.ts @@ -2,7 +2,6 @@ import type { ActivityMessage, Reaction } from '@hcengineering/activity' import core, { getCurrentAccount, isOtherHour, type Doc, type Ref, type Space } from '@hcengineering/core' import { getClient, isSpace } from '@hcengineering/presentation' import { - EmojiPopup, closePopup, getCurrentResolvedLocation, getEventPositionElement, @@ -11,6 +10,7 @@ import { type EmojiWithGroup, isCustomEmoji } from '@hcengineering/ui' import { type AttributeModel } from '@hcengineering/view' +import emojiPlugin from '@hcengineering/emoji' import { get } from 'svelte/store' import { savedMessagesStore } from './activity' @@ -61,9 +61,8 @@ export async function addReactionAction ( closePopup() - showPopup(EmojiPopup, {}, element, (emoji: EmojiWithGroup) => { - // TODO: add custom emoji - if (!isCustomEmoji(emoji) && emoji?.emoji !== undefined) void updateDocReactions(reactions, message, emoji.emoji) + showPopup(emojiPlugin.component.EmojiPopup, {}, element, (emoji) => { + if (emoji?.text !== undefined) void updateDocReactions(reactions, message, emoji.text) params?.onClose?.() }) params?.onOpen?.() diff --git a/plugins/emoji-resources/src/components/EmojiPopup.svelte b/plugins/emoji-resources/src/components/EmojiPopup.svelte index bd21609041..9c3ab690fd 100644 --- a/plugins/emoji-resources/src/components/EmojiPopup.svelte +++ b/plugins/emoji-resources/src/components/EmojiPopup.svelte @@ -102,6 +102,7 @@ addFrequentlyEmojis(emoji) dispatch('close', { text: selected, + codes: isCustomEmoji(emoji) ? undefined : emoji.hexcode.split('-').map((hc) => parseInt(hc, 16)), url: isCustomEmoji(emoji) ? emoji.url : undefined }) } diff --git a/plugins/task-resources/package.json b/plugins/task-resources/package.json index 9eb01c7576..d3b116fae3 100644 --- a/plugins/task-resources/package.json +++ b/plugins/task-resources/package.json @@ -63,6 +63,8 @@ "@hcengineering/kanban": "^0.6.0", "@hcengineering/contact-resources": "^0.6.0", "@hcengineering/setting": "^0.6.17", - "@hcengineering/setting-resources": "^0.6.0" + "@hcengineering/setting-resources": "^0.6.0", + "@hcengineering/emoji": "^0.6.0", + "@hcengineering/emoji-resources": "^0.6.0" } } diff --git a/plugins/task-resources/src/components/state/CreateStatePopup.svelte b/plugins/task-resources/src/components/state/CreateStatePopup.svelte index a7659eec9d..0a13b0f0c0 100644 --- a/plugins/task-resources/src/components/state/CreateStatePopup.svelte +++ b/plugins/task-resources/src/components/state/CreateStatePopup.svelte @@ -19,9 +19,9 @@ import { clearSettingsStore, settingsStore } from '@hcengineering/setting-resources' import { ProjectType, TaskType, calculateStatuses, createState } from '@hcengineering/task' import { + Component, ButtonIcon, ButtonMenu, - EmojiPopup, IconCopy, IconDelete, IconSettings, @@ -38,6 +38,7 @@ } from '@hcengineering/ui' import { ColorsPopup, statusStore } from '@hcengineering/view-resources' import view from '@hcengineering/view-resources/src/plugin' + import emojiPlugin from '@hcengineering/emoji' import { taskTypeStore, typeStore } from '../..' import task from '../../plugin' import ApproveStatusRenamePopup from './ApproveStatusRenamePopup.svelte' @@ -432,11 +433,12 @@ }} /> {:else} - { if (readonly) return color = evt.detail.codes diff --git a/plugins/view-resources/package.json b/plugins/view-resources/package.json index 613d0755bc..49d9be2492 100644 --- a/plugins/view-resources/package.json +++ b/plugins/view-resources/package.json @@ -58,6 +58,8 @@ "@hcengineering/text-editor-resources": "^0.6.0", "@hcengineering/analytics": "^0.6.0", "@hcengineering/query": "^0.6.12", + "@hcengineering/emoji": "^0.6.0", + "@hcengineering/emoji-resources": "^0.6.0", "fast-equals": "^5.2.2" } } diff --git a/plugins/view-resources/src/components/IconPicker.svelte b/plugins/view-resources/src/components/IconPicker.svelte index ccbf843135..2f45cda0f8 100644 --- a/plugins/view-resources/src/components/IconPicker.svelte +++ b/plugins/view-resources/src/components/IconPicker.svelte @@ -16,15 +16,15 @@ import { Asset, Metadata } from '@hcengineering/platform' import { ButtonIcon, - EmojiPopup, TabsControl, fromCodePoint, Scroller, getPlatformColor, getPlatformColorDef, themeStore, - Label + Label, Component } from '@hcengineering/ui' + import emojiPlugin from '@hcengineering/emoji' import { createEventDispatcher } from 'svelte' import { iconsLibrary } from '../icons' import view from '../plugin' @@ -96,9 +96,10 @@ {/if} {:else} - { dispatch('close', { icon: iconWithEmoji, color: evt.detail.codes }) }}