From 8a28be507b3c9d406e1bd89ae5386e07c356b962 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Fri, 16 Jun 2023 08:04:11 +0300 Subject: [PATCH] UBER-450: update MentionList. (#3431) Signed-off-by: Alexander Platov --- models/contact/src/index.ts | 2 +- .../src/components/ObjectSearchPopup.svelte | 108 +++++++----------- .../src/components/MentionList.svelte | 16 +-- packages/theme/styles/_layouts.scss | 6 +- packages/theme/styles/popups.scss | 77 ++++++++++--- plugins/contact-assets/assets/icons.svg | 4 + plugins/contact-assets/src/index.ts | 1 + plugins/contact-resources/src/index.ts | 2 +- plugins/contact/src/index.ts | 1 + plugins/document-assets/assets/icons.svg | 7 +- .../src/components/DocumentItem.svelte | 16 +-- plugins/recruit-assets/assets/icons.svg | 9 +- .../src/components/ApplicationItem.svelte | 16 +-- .../src/components/VacancyItem.svelte | 16 +-- .../src/components/issues/IssueItem.svelte | 12 +- 15 files changed, 158 insertions(+), 135 deletions(-) diff --git a/models/contact/src/index.ts b/models/contact/src/index.ts index b9ffc0852a..19dec532b9 100644 --- a/models/contact/src/index.ts +++ b/models/contact/src/index.ts @@ -705,7 +705,7 @@ export function createModel (builder: Builder): void { presentation.class.ObjectSearchCategory, core.space.Model, { - icon: contact.icon.Person, + icon: contact.icon.Persona, label: contact.string.SearchPerson, query: contact.completion.PersonQuery }, diff --git a/packages/presentation/src/components/ObjectSearchPopup.svelte b/packages/presentation/src/components/ObjectSearchPopup.svelte index 1ad3596fad..9e39a726f7 100644 --- a/packages/presentation/src/components/ObjectSearchPopup.svelte +++ b/packages/presentation/src/components/ObjectSearchPopup.svelte @@ -18,15 +18,16 @@ import { getResource, IntlString } from '@hcengineering/platform' import ui, { - Button, createFocusManager, deviceOptionsStore, - EditBox, FocusHandler, IconSearch, Label, ListView, - resizeObserver + resizeObserver, + Icon, + tooltip, + EditWithIcon } from '@hcengineering/ui' import { createEventDispatcher } from 'svelte' import presentation from '../plugin' @@ -149,85 +150,64 @@ $: updateItems(category, query, relatedDocuments) const manager = createFocusManager() + + const isStatusDisabled = (status: number) => status === 0 -
dispatch('changeSize')} -> -
+ dispatch('changeSize')}> +
{#if label} -
+
{/if} -
+
{#each categories as c, i} {@const status = categoryStatus[c._id] ?? 0} -
-
- +
+ updateItems(category, query, relatedDocuments)} placeholder={category?.label} + on:input={() => updateItems(category, query, relatedDocuments)} /> +
+
+
-
- - - - {@const doc = items[item]} -
dispatchItem(doc)}> - -
-
-
-
- {#if !hideButtons} -