diff --git a/models/chunter/src/actions.ts b/models/chunter/src/actions.ts index cdc971bd19..81b2d8d8af 100644 --- a/models/chunter/src/actions.ts +++ b/models/chunter/src/actions.ts @@ -46,8 +46,8 @@ export function defineActions (builder: Builder): void { createAction(builder, { action: chunter.actionImpl.StartConversation, - label: chunter.string.StartConversation, - icon: chunter.icon.Thread, + label: chunter.string.Message, + icon: view.icon.Bubble, input: 'focus', category: chunter.category.Chunter, target: contact.mixin.Employee, diff --git a/models/chunter/src/index.ts b/models/chunter/src/index.ts index 0c25e70dda..5f13dd5033 100644 --- a/models/chunter/src/index.ts +++ b/models/chunter/src/index.ts @@ -21,6 +21,7 @@ import core from '@hcengineering/model-core' import view from '@hcengineering/model-view' import workbench from '@hcengineering/model-workbench' import { WidgetType } from '@hcengineering/workbench' +import contact from '@hcengineering/contact' import chunter from './plugin' import { defineActions } from './actions' @@ -303,6 +304,16 @@ export function createModel (builder: Builder): void { disabled: [{ _class: 1 }, { space: 1 }, { modifiedBy: 1 }, { createdBy: 1 }, { createdOn: -1 }] }) + // Extensions + builder.createDoc(presentation.class.ComponentPointExtension, core.space.Model, { + extension: contact.extension.EmployeePopupActions, + component: chunter.component.DirectMessageButton + }) + builder.createDoc(presentation.class.ComponentPointExtension, core.space.Model, { + extension: activity.extension.ActivityEmployeePresenter, + component: chunter.component.EmployeePresenter + }) + defineActions(builder) defineNotifications(builder) } diff --git a/models/chunter/src/plugin.ts b/models/chunter/src/plugin.ts index 3ac6ba5dcc..d9033cfd8b 100644 --- a/models/chunter/src/plugin.ts +++ b/models/chunter/src/plugin.ts @@ -35,7 +35,9 @@ export default mergeIds(chunterId, chunter, { ChatMessageNotificationLabel: '' as AnyComponent, ThreadNotificationPresenter: '' as AnyComponent, JoinChannelNotificationPresenter: '' as AnyComponent, - WorkbenchTabExtension: '' as AnyComponent + WorkbenchTabExtension: '' as AnyComponent, + DirectMessageButton: '' as AnyComponent, + EmployeePresenter: '' as AnyComponent }, action: { MarkCommentUnread: '' as Ref, diff --git a/models/love/src/index.ts b/models/love/src/index.ts index 5cacc6fca4..6091ba3816 100644 --- a/models/love/src/index.ts +++ b/models/love/src/index.ts @@ -185,8 +185,7 @@ export function createModel (builder: Builder): void { label: love.string.MeetingRoom, type: WidgetType.Flexible, icon: love.icon.Cam, - component: love.component.VideoWidget, - size: 'medium' + component: love.component.VideoWidget }, love.ids.VideoWidget ) diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index ee7f79a2db..fe33ba5367 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -316,6 +316,7 @@ input.search { border-radius: 50%; } &:not(.small-gap, .large-gap) { margin-right: .375rem; } + &.no-gap { margin-right: 0; } &.small-gap { margin-right: .25rem; } &.large-gap { margin-right: .5rem; } &.flow:last-child { margin-right: 0; } diff --git a/packages/theme/styles/components.scss b/packages/theme/styles/components.scss index d0edf20d4b..8799976415 100644 --- a/packages/theme/styles/components.scss +++ b/packages/theme/styles/components.scss @@ -270,6 +270,9 @@ aspect-ratio: 1; border-radius: 50%; + &.relative { + position: relative; + } &.xx-small, &.inline, &.tiny, diff --git a/packages/ui/src/components/ButtonBase.svelte b/packages/ui/src/components/ButtonBase.svelte index 1acf7c107b..16ea9743d7 100644 --- a/packages/ui/src/components/ButtonBase.svelte +++ b/packages/ui/src/components/ButtonBase.svelte @@ -107,9 +107,9 @@ on:keydown > {#if loading} -
+
{:else if icon} -
+
{/if} {#if label}{/if} {#if title}{title}{/if} diff --git a/packages/ui/src/components/ListView.svelte b/packages/ui/src/components/ListView.svelte index 9eb38abfd2..266e91a88a 100644 --- a/packages/ui/src/components/ListView.svelte +++ b/packages/ui/src/components/ListView.svelte @@ -28,6 +28,7 @@ export let lazy = false export let minHeight: string | null = null export let highlightIndex: number | undefined = undefined + export let items: any[] = [] export let getKey: (index: number) => string = (index) => index.toString() const refs: HTMLElement[] = [] @@ -65,6 +66,8 @@ r?.scrollIntoView({ behavior: 'auto', block: 'nearest' }) } } + + $: array = items.length > 0 ? items : Array(count) {#if count} @@ -75,7 +78,7 @@ dispatch('changeContent') }} > - {#each Array(count) as _, row (getKey(row))} + {#each array as _, row (getKey(row))} {#if lazy}
@@ -145,6 +148,6 @@ .list-container { min-width: 0; // border-radius: 0.25rem; - user-select: none; + //user-select: none; } diff --git a/packages/ui/src/components/ModernTab.svelte b/packages/ui/src/components/ModernTab.svelte index 9ad71d474d..e4949b263d 100644 --- a/packages/ui/src/components/ModernTab.svelte +++ b/packages/ui/src/components/ModernTab.svelte @@ -81,6 +81,7 @@ diff --git a/plugins/contact-resources/src/components/PersonPresenter.svelte b/plugins/contact-resources/src/components/PersonPresenter.svelte index 3674461c1d..72775a7894 100644 --- a/plugins/contact-resources/src/components/PersonPresenter.svelte +++ b/plugins/contact-resources/src/components/PersonPresenter.svelte @@ -34,6 +34,7 @@ export let defaultName: IntlString | undefined = ui.string.NotSelected export let statusLabel: IntlString | undefined = undefined export let tooltipLabels: PersonLabelTooltip | undefined = undefined + export let customTooltip: LabelAndProps | undefined = undefined export let avatarSize: IconSize = 'x-small' export let onEdit: ((event: MouseEvent) => void) | undefined = undefined // export let element: HTMLElement | undefined = undefined @@ -81,7 +82,7 @@ {#if value || shouldShowPlaceholder} { return new Map, Ref>(Array.from(vals.values()).map((it) => [it._id, it.person])) }) +export const personAccountByPersonId = derived(personAccountByIdStore, (vals) => { + return groupByArray(Array.from(vals.values()), (it) => it.person) +}) + export const statusByUserStore = writable, UserStatus>>(new Map()) export const personByIdStore = derived([personAccountPersonByIdStore, employeeByIdStore], (vals) => { diff --git a/plugins/contact/src/index.ts b/plugins/contact/src/index.ts index d3aa52226a..90e490c60a 100644 --- a/plugins/contact/src/index.ts +++ b/plugins/contact/src/index.ts @@ -31,7 +31,7 @@ import { import type { Asset, Metadata, Plugin, Resource } from '@hcengineering/platform' import { IntlString, plugin } from '@hcengineering/platform' import { TemplateField, TemplateFieldCategory } from '@hcengineering/templates' -import type { AnyComponent, ColorDefinition, ResolvedLocation, Location } from '@hcengineering/ui' +import type { AnyComponent, ColorDefinition, ResolvedLocation, Location, ComponentExtensionId } from '@hcengineering/ui' import { Action, FilterMode, Viewlet } from '@hcengineering/view' /** @@ -301,7 +301,8 @@ export const contactPlugin = plugin(contactId, { Members: '' as IntlString, Contacts: '' as IntlString, Employees: '' as IntlString, - Persons: '' as IntlString + Persons: '' as IntlString, + ViewProfile: '' as IntlString }, viewlet: { TableMember: '' as Ref, @@ -332,6 +333,9 @@ export const contactPlugin = plugin(contactId, { }, ids: { MentionCommonNotificationType: '' as Ref + }, + extension: { + EmployeePopupActions: '' as ComponentExtensionId } }) diff --git a/plugins/controlled-documents-resources/src/navigation.ts b/plugins/controlled-documents-resources/src/navigation.ts index 874b3f646a..7be24fd3df 100644 --- a/plugins/controlled-documents-resources/src/navigation.ts +++ b/plugins/controlled-documents-resources/src/navigation.ts @@ -127,7 +127,8 @@ function getDocumentLinkId (doc: Document): string { return `${slug}---${doc._id}` } -function parseDocumentId (shortLink: string): Ref | undefined { +function parseDocumentId (shortLink?: string): Ref | undefined { + if (shortLink === undefined) return undefined const parts = shortLink.split('---') if (parts.length > 1) { return parts[parts.length - 1] as Ref diff --git a/plugins/love-resources/src/components/VideoPopup.svelte b/plugins/love-resources/src/components/VideoPopup.svelte index a2b81a6a17..0395315e0d 100644 --- a/plugins/love-resources/src/components/VideoPopup.svelte +++ b/plugins/love-resources/src/components/VideoPopup.svelte @@ -361,7 +361,8 @@ display: flex; flex-direction: column; align-items: stretch; - width: 15rem; + width: 100%; + max-width: 100%; user-select: none; &:not(.isDock) { diff --git a/plugins/love-resources/src/components/VideoWidget.svelte b/plugins/love-resources/src/components/VideoWidget.svelte index f7eb91e196..4a6016fb62 100644 --- a/plugins/love-resources/src/components/VideoWidget.svelte +++ b/plugins/love-resources/src/components/VideoWidget.svelte @@ -20,12 +20,12 @@ import love from '../plugin' import VideoPopup from './VideoPopup.svelte' - export let widgetState: WidgetState + export let widgetState: WidgetState | undefined let room: Ref | undefined = undefined - $: room = widgetState.data?.room + $: room = widgetState?.data?.room - $: if (widgetState.data?.room === undefined) { + $: if (widgetState?.data?.room === undefined) { closeWidget(love.ids.VideoWidget) } diff --git a/plugins/notification-resources/src/components/NotifyMarker.svelte b/plugins/notification-resources/src/components/NotifyMarker.svelte index e58951db94..b9cf69670a 100644 --- a/plugins/notification-resources/src/components/NotifyMarker.svelte +++ b/plugins/notification-resources/src/components/NotifyMarker.svelte @@ -14,7 +14,7 @@ -->