From 668675b080c842b67e74cad6e72ea69bf0af74e9 Mon Sep 17 00:00:00 2001 From: Alexey Zinoviev Date: Sat, 7 Jun 2025 03:07:21 +0400 Subject: [PATCH] uberf-11415: fix formatting Signed-off-by: Alexey Zinoviev --- .../src/activityMessagesUtils.ts | 5 +- .../activity/MembersChangedMessage.svelte | 6 +- .../chat-message/ChatMessagePresenter.svelte | 5 +- .../message/MessagePresenter.svelte | 2 +- plugins/contact-resources/src/cache.ts | 27 +-- .../src/components/AccountArrayEditor.svelte | 4 +- .../src/components/AccountBox.svelte | 4 +- .../src/components/AddMembersPopup.svelte | 5 +- .../src/components/AssigneeBox.svelte | 9 +- .../components/DeleteConfirmationPopup.svelte | 8 +- .../src/components/EmployeePresenter.svelte | 2 +- .../src/components/PersonIdArrayEditor.svelte | 20 +- plugins/contact-resources/src/utils.ts | 188 ++++++++++-------- plugins/contact/src/cache.ts | 4 +- plugins/contact/src/utils.ts | 106 ++++++---- .../document/DocumentSignatories.svelte | 15 +- .../right-panel/DocumentApprovalsTab.svelte | 17 +- .../src/utils.ts | 8 +- .../src/components/Chats.svelte | 14 +- plugins/gmail-resources/src/utils.ts | 6 +- .../components/ReactionNotification.svelte | 2 +- .../preview/NotificationPreview.svelte | 10 +- .../components/preview/PreviewTemplate.svelte | 10 +- .../src/components/RoomConfigure.svelte | 7 +- .../src/components/RoomPreview.svelte | 2 +- .../src/components/RoomSelector.svelte | 7 +- plugins/love-resources/src/utils.ts | 1 - .../components/DocNotifyContextCard.svelte | 2 +- plugins/presence-resources/src/store.ts | 2 +- plugins/presence/src/plugin.ts | 4 +- .../src/components/RequestDetail.svelte | 12 +- .../team/calendar/TeamCalendar.svelte | 17 +- .../components/projects/CreateProject.svelte | 6 +- .../src/components/PersonIdPresenter.svelte | 2 +- 34 files changed, 283 insertions(+), 256 deletions(-) diff --git a/plugins/activity-resources/src/activityMessagesUtils.ts b/plugins/activity-resources/src/activityMessagesUtils.ts index 68fb69f9f1..499558ccee 100644 --- a/plugins/activity-resources/src/activityMessagesUtils.ts +++ b/plugins/activity-resources/src/activityMessagesUtils.ts @@ -256,7 +256,10 @@ export async function combineActivityMessages ( const result: Array = [...uncombined] - const groupedByType: Map = await groupByArrayAsync(docUpdateMessages, getDocUpdateMessageKey) + const groupedByType: Map = await groupByArrayAsync( + docUpdateMessages, + getDocUpdateMessageKey + ) for (const [, groupedMessages] of groupedByType) { const cantMerge = groupedMessages.filter( diff --git a/plugins/chunter-resources/src/components/activity/MembersChangedMessage.svelte b/plugins/chunter-resources/src/components/activity/MembersChangedMessage.svelte index 031201af15..92f9903abd 100644 --- a/plugins/chunter-resources/src/components/activity/MembersChangedMessage.svelte +++ b/plugins/chunter-resources/src/components/activity/MembersChangedMessage.svelte @@ -17,11 +17,7 @@ import { DocAttributeUpdates, DocUpdateMessage } from '@hcengineering/activity' import { Employee, Person } from '@hcengineering/contact' import { AccountUuid, notEmpty, PersonId } from '@hcengineering/core' - import { - PersonPresenter, - employeeByAccountStore, - employeeByPersonIdStore - } from '@hcengineering/contact-resources' + import { PersonPresenter, employeeByAccountStore, employeeByPersonIdStore } from '@hcengineering/contact-resources' import { ChunterSpace } from '@hcengineering/chunter' import { Label } from '@hcengineering/ui' import view from '@hcengineering/view' diff --git a/plugins/chunter-resources/src/components/chat-message/ChatMessagePresenter.svelte b/plugins/chunter-resources/src/components/chat-message/ChatMessagePresenter.svelte index 42acb5dd98..6c7be885fd 100644 --- a/plugins/chunter-resources/src/components/chat-message/ChatMessagePresenter.svelte +++ b/plugins/chunter-resources/src/components/chat-message/ChatMessagePresenter.svelte @@ -19,10 +19,7 @@ import { AttachmentDocList, AttachmentImageSize } from '@hcengineering/attachment-resources' import chunter, { ChatMessage, ChatMessageViewlet } from '@hcengineering/chunter' import contact, { getCurrentEmployee, Person, SocialIdentity } from '@hcengineering/contact' - import { - getPersonByPersonId, - getSocialIdByPersonId - } from '@hcengineering/contact-resources' + import { getPersonByPersonId, getSocialIdByPersonId } from '@hcengineering/contact-resources' import { Class, Doc, Markup, Ref, Space, WithLookup } from '@hcengineering/core' import { getClient, MessageViewer, pendingCreatedDocs } from '@hcengineering/presentation' import { EmptyMarkup } from '@hcengineering/text' diff --git a/plugins/communication-resources/src/components/message/MessagePresenter.svelte b/plugins/communication-resources/src/components/message/MessagePresenter.svelte index 979e495d91..0a63540cd1 100644 --- a/plugins/communication-resources/src/components/message/MessagePresenter.svelte +++ b/plugins/communication-resources/src/components/message/MessagePresenter.svelte @@ -80,7 +80,7 @@ author = $employeeByPersonIdStore.get(socialId) if (author === undefined) { - author = await getPersonByPersonId(socialId) ?? undefined + author = (await getPersonByPersonId(socialId)) ?? undefined } } diff --git a/plugins/contact-resources/src/cache.ts b/plugins/contact-resources/src/cache.ts index f87126bbc5..e62c381a9c 100644 --- a/plugins/contact-resources/src/cache.ts +++ b/plugins/contact-resources/src/cache.ts @@ -43,29 +43,20 @@ export default class ContactCacheStoreManager { } private readonly _personRefByPersonIdStoreBase = writable | null>>(new Map()) - private readonly _personRefByPersonIdStore = derived( - [this._personRefByPersonIdStoreBase], - ([store]) => { - return new Map(Array.from(store.entries()).filter(notEmptyValue)) - } - ) + private readonly _personRefByPersonIdStore = derived([this._personRefByPersonIdStoreBase], ([store]) => { + return new Map(Array.from(store.entries()).filter(notEmptyValue)) + }) private readonly _personByPersonIdStoreBase = writable | null>>(new Map()) - private readonly _personByPersonIdStore = derived( - [this._personByPersonIdStoreBase], - ([store]) => { - return new Map(Array.from(store.entries()).filter(notEmptyValue)) - } - ) + private readonly _personByPersonIdStore = derived([this._personByPersonIdStoreBase], ([store]) => { + return new Map(Array.from(store.entries()).filter(notEmptyValue)) + }) private readonly _personByPersonRefStoreBase = writable, Readonly | null>>(new Map()) - private readonly _personByPersonRefStore = derived( - [this._personByPersonRefStoreBase], - ([store]) => { - return new Map(Array.from(store.entries()).filter(notEmptyValue)) - } - ) + private readonly _personByPersonRefStore = derived([this._personByPersonRefStoreBase], ([store]) => { + return new Map(Array.from(store.entries()).filter(notEmptyValue)) + }) public getPersonRefByPersonIdStore (personIds: PersonId[]): Readable>> { if (personIds.length > 0) { diff --git a/plugins/contact-resources/src/components/AccountArrayEditor.svelte b/plugins/contact-resources/src/components/AccountArrayEditor.svelte index eb80fe8080..802c682e9e 100644 --- a/plugins/contact-resources/src/components/AccountArrayEditor.svelte +++ b/plugins/contact-resources/src/components/AccountArrayEditor.svelte @@ -86,9 +86,7 @@ void update?.() }) - $: employees = (value ?? []) - .map((p) => $employeeRefByAccountUuidStore.get(p)) - .filter(notEmpty) + $: employees = (value ?? []).map((p) => $employeeRefByAccountUuidStore.get(p)).filter(notEmpty) $: docQuery = excludeItems.length === 0 && includeItems.length === 0 ? {} diff --git a/plugins/contact-resources/src/components/AccountBox.svelte b/plugins/contact-resources/src/components/AccountBox.svelte index 01615e7a1d..6af1b1d0b3 100644 --- a/plugins/contact-resources/src/components/AccountBox.svelte +++ b/plugins/contact-resources/src/components/AccountBox.svelte @@ -37,9 +37,7 @@ ? {} : { _id: { - $in: include - .map((personId) => $employeeByPersonIdStore.get(personId)?._id) - .filter(notEmpty) + $in: include.map((personId) => $employeeByPersonIdStore.get(personId)?._id).filter(notEmpty) } } $: selectedEmp = value != null ? $employeeByPersonIdStore.get(value)?._id : value diff --git a/plugins/contact-resources/src/components/AddMembersPopup.svelte b/plugins/contact-resources/src/components/AddMembersPopup.svelte index cd5667be06..b84c37341c 100644 --- a/plugins/contact-resources/src/components/AddMembersPopup.svelte +++ b/plugins/contact-resources/src/components/AddMembersPopup.svelte @@ -88,10 +88,7 @@