UBERF-7717: reduce finds on members changed (#6219)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
Kristina
2024-08-06 22:32:39 +07:00
committed by GitHub
parent 4e7700c4f2
commit 4e81624688
48 changed files with 977 additions and 472 deletions
@@ -16,20 +16,22 @@
import { Component } from '@hcengineering/ui'
import { AttributeModel } from '@hcengineering/view'
import { getClient } from '@hcengineering/presentation'
import { DocAttributeUpdates, DocUpdateMessageViewlet } from '@hcengineering/activity'
import { DocAttributeUpdates, DocUpdateMessage, DocUpdateMessageViewlet } from '@hcengineering/activity'
import { Doc, Ref, Space } from '@hcengineering/core'
import activity from '../../plugin'
import AddedAttributesPresenter from './attributes/AddedAttributesPresenter.svelte'
import RemovedAttributesPresenter from './attributes/RemovedAttributesPresenter.svelte'
import SetAttributesPresenter from './attributes/SetAttributesPresenter.svelte'
import { Ref, Space } from '@hcengineering/core'
export let viewlet: DocUpdateMessageViewlet | undefined
export let attributeUpdates: DocAttributeUpdates
export let attributeModel: AttributeModel
export let preview = false
export let space: Ref<Space> | undefined = undefined
export let object: Doc | undefined
export let message: DocUpdateMessage
const client = getClient()
const hierarchy = client.getHierarchy()
@@ -41,7 +43,7 @@
</script>
{#if presenter}
<Component is={presenter} props={{ value: attributeUpdates, space }} />
<Component is={presenter} props={{ value: attributeUpdates, space, object, message }} />
{:else}
{#if attributeUpdates.added.length}
<AddedAttributesPresenter {viewlet} {attributeModel} values={attributeUpdates.added} {preview} />