diff --git a/packages/panel/src/components/Panel.svelte b/packages/panel/src/components/Panel.svelte index 54bd823a4f..cb1ccbde1d 100644 --- a/packages/panel/src/components/Panel.svelte +++ b/packages/panel/src/components/Panel.svelte @@ -27,7 +27,7 @@ import chunter from '@anticrm/chunter' - export let label: IntlString + export let title: string export let icon: Asset | AnySvelteComponent export let fullSize: boolean = false export let object: Doc @@ -62,7 +62,7 @@ {/if} -
+
{title}
{#if $$slots.subtitle}
{/if}
@@ -95,7 +95,7 @@ {/if} -
+
{title}
{#if $$slots.subtitle}
{/if} diff --git a/packages/presentation/src/components/AttributeEditor.svelte b/packages/presentation/src/components/AttributeEditor.svelte index 812906cc19..8518e3b2ed 100644 --- a/packages/presentation/src/components/AttributeEditor.svelte +++ b/packages/presentation/src/components/AttributeEditor.svelte @@ -20,12 +20,11 @@ import type { AnySvelteComponent } from '@anticrm/ui' import { getClient } from '../utils' import view from '@anticrm/view' - import core from '@anticrm/core' export let _class: Ref> export let key: string - export let newValue: any - export let oldValue: any + export let object: any + export let maxWidth: string export let focus: boolean = false const client = getClient() @@ -41,14 +40,18 @@ const editorMixin = hierarchy.as(typeClass, view.mixin.AttributeEditor) editor = getResource(editorMixin.editor) } + + function onChange(value: any) { + const doc = object as Doc + client.updateDoc(_class, doc.space, doc._id, { [key]: value }) + } {#if editor} {#await editor} ... {:then instance} - + {/await} {/if} - diff --git a/packages/ui/src/components/EditBox.svelte b/packages/ui/src/components/EditBox.svelte index 2a258aa768..e283428cba 100644 --- a/packages/ui/src/components/EditBox.svelte +++ b/packages/ui/src/components/EditBox.svelte @@ -55,9 +55,9 @@ {#if label}
{/if}
{#if password} - ev.target && computeSize(ev.target)} /> + ev.target && computeSize(ev.target)} on:change/> {:else} - ev.target && computeSize(ev.target)} /> + ev.target && computeSize(ev.target)} on:change/> {/if}
diff --git a/plugins/recruit-resources/src/components/EditCandidate.svelte b/plugins/recruit-resources/src/components/EditCandidate.svelte index 5c874133d4..7fb3a7bf9e 100644 --- a/plugins/recruit-resources/src/components/EditCandidate.svelte +++ b/plugins/recruit-resources/src/components/EditCandidate.svelte @@ -16,17 +16,19 @@ - { dispatch('close') }}> + { dispatch('close') }}>
- + + showPopup(SocialEditor, { values: object.channels ?? [] }, ev.target, (result) => { saveChannels(result) })} />
@@ -53,10 +61,10 @@
-
-
-
-
+
+
+
+
diff --git a/plugins/view-resources/src/components/StringEditor.svelte b/plugins/view-resources/src/components/StringEditor.svelte index b03b06b574..19ab0b8709 100644 --- a/plugins/view-resources/src/components/StringEditor.svelte +++ b/plugins/view-resources/src/components/StringEditor.svelte @@ -23,7 +23,13 @@ export let label: IntlString export let placeholder: IntlString export let value: any export let focus: boolean +export let maxWidth: string +export let onChange: (value: string) => void + +function _onchange(ev: Event) { + onChange((ev.target as HTMLInputElement).value) +} - +