mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-25 19:58:30 +03:00
Support new Svelte & Allow to configure space component (#1291)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
83b28a61e6
commit
bd24023fd6
File diff suppressed because it is too large
Load Diff
@ -69,9 +69,9 @@ export function createModel (builder: Builder): void {
|
||||
|
||||
builder.mixin(board.class.Board, core.class.Class, workbench.mixin.SpaceView, {
|
||||
view: {
|
||||
class: board.class.Card,
|
||||
createItemDialog: board.component.CreateCard,
|
||||
createItemLabel: board.string.CardCreateLabel
|
||||
class: board.class.Card
|
||||
// createItemDialog: board.component.CreateCard,
|
||||
// createItemLabel: board.string.CardCreateLabel
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"svelte-check": "^2.2.10",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
@ -33,7 +33,7 @@
|
||||
"dependencies": {
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/text-editor": "~0.6.0",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"@anticrm/core": "~0.6.16",
|
||||
"@anticrm/chunter": "~0.6.1",
|
||||
|
@ -15,7 +15,7 @@
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -36,7 +36,7 @@
|
||||
"@anticrm/query": "~0.6.1",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/view": "~0.6.0",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/contact": "~0.6.5",
|
||||
"@anticrm/login": "~0.6.1",
|
||||
"@anticrm/image-cropper": "~0.6.0",
|
||||
|
@ -7,14 +7,14 @@
|
||||
"scripts": {
|
||||
"build": "echo 'no build for ui'",
|
||||
"build:docs": "api-extractor run --local",
|
||||
"lint": "eslint",
|
||||
"lint": "svelte-check && eslint",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"format": "prettier --write --plugin-search-dir=. src && eslint --fix src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -31,7 +31,7 @@
|
||||
"@types/prosemirror-model": "~1.16.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
"@anticrm/contact": "~0.6.5",
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
|
@ -168,7 +168,7 @@
|
||||
} extensions={editorExtensions} />
|
||||
</div>
|
||||
{#if showSend}
|
||||
<button class="sendButton" on:click={submit}><div class="icon"><Send/></div></button>
|
||||
<button class="sendButton" on:click={submit}><div class="icon"><Send size={'medium'}/></div></button>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="buttons">
|
||||
|
@ -14,7 +14,7 @@
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -30,7 +30,7 @@
|
||||
"typescript": "^4.3.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/platform": "~0.6.5"
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"svelte-check": "^2.2.10",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
@ -33,6 +33,6 @@
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"@anticrm/theme": "~0.6.0",
|
||||
"svelte": "^3.37.0"
|
||||
"svelte": "^3.46"
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -35,7 +35,7 @@
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
"@anticrm/activity": "~0.6.0",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/chunter": "~0.6.1",
|
||||
"@anticrm/text-editor": "~0.6.0",
|
||||
"@anticrm/contact": "~0.6.5",
|
||||
|
@ -15,7 +15,7 @@
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -32,7 +32,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
"@anticrm/attachment": "~0.6.1",
|
||||
|
@ -7,14 +7,14 @@
|
||||
"scripts": {
|
||||
"build": "echo 'no build for ui'",
|
||||
"build:docs": "api-extractor run --local",
|
||||
"lint": "eslint",
|
||||
"lint": "svelte-check && eslint",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"format": "prettier --write --plugin-search-dir=. src && eslint --fix src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -31,7 +31,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/board": "~0.6.0",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
|
@ -35,7 +35,7 @@
|
||||
on:click={show}
|
||||
>
|
||||
<div class="icon">
|
||||
<Icon icon={lead.icon.Lead} size={'small'} />
|
||||
<Icon icon={lead.icon.Board} size={'small'} />
|
||||
</div>
|
||||
<span class="label">{value.title}</span>
|
||||
</a>
|
||||
|
@ -16,10 +16,10 @@
|
||||
<script lang="ts">
|
||||
import core, { Ref } from '@anticrm/core'
|
||||
import { getClient, SpaceCreateCard } from '@anticrm/presentation'
|
||||
import { Component, EditBox, Grid, IconFolder, ToggleWithLabel } from '@anticrm/ui'
|
||||
import task, { createKanban, KanbanTemplate } from '@anticrm/task'
|
||||
import { Component, EditBox, Grid, IconFolder } from '@anticrm/ui'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import board from '../plugin'
|
||||
import task, { createKanban, KanbanTemplate } from '@anticrm/task'
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
placeholder={board.string.CardPlaceholder}
|
||||
maxWidth="39rem"
|
||||
focus
|
||||
on:change={(evt) => change('title', object.title)}
|
||||
on:change={() => change('title', object.title)}
|
||||
/>
|
||||
</Grid>
|
||||
{/if}
|
||||
|
@ -15,7 +15,7 @@
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -36,7 +36,7 @@
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
"@anticrm/calendar": "~0.6.0",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/text-editor": "~0.6.0",
|
||||
"@anticrm/contact": "~0.6.2",
|
||||
"@anticrm/contact-resources": "~0.6.0",
|
||||
|
@ -15,7 +15,7 @@
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -37,7 +37,7 @@
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
"@anticrm/chunter": "~0.6.1",
|
||||
"@anticrm/login": "~0.6.1",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/text-editor": "~0.6.0",
|
||||
"@anticrm/contact": "~0.6.5",
|
||||
"@anticrm/contact-resources": "~0.6.0",
|
||||
|
@ -15,7 +15,7 @@
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -32,7 +32,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/contact": "~0.6.5",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/setting": "~0.6.0",
|
||||
|
@ -14,7 +14,7 @@
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -34,7 +34,7 @@
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
"@anticrm/activity": "~0.6.0",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/chunter": "~0.6.1",
|
||||
"@anticrm/text-editor": "~0.6.0",
|
||||
"@anticrm/contact": "~0.6.5",
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-promise": "^5.1.1",
|
||||
@ -32,7 +32,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/gmail": "~0.6.0",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-promise": "^5.1.1",
|
||||
@ -31,7 +31,7 @@
|
||||
"typescript": "^4.3.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"cropperjs": "~1.5.12",
|
||||
"smartcrop": "~2.0.5"
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-promise": "^5.1.1",
|
||||
@ -32,7 +32,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/inventory": "~0.6.0",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/panel": "~0.6.0",
|
||||
|
@ -7,14 +7,14 @@
|
||||
"scripts": {
|
||||
"build": "echo 'no build for ui'",
|
||||
"build:docs": "api-extractor run --local",
|
||||
"lint": "eslint",
|
||||
"lint": "svelte-check && eslint",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"format": "prettier --write --plugin-search-dir=. src && eslint --fix src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -31,7 +31,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/lead": "~0.6.0",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
|
@ -16,10 +16,10 @@
|
||||
<script lang="ts">
|
||||
import core, { Ref } from '@anticrm/core'
|
||||
import { getClient, SpaceCreateCard } from '@anticrm/presentation'
|
||||
import task, { createKanban, KanbanTemplate } from '@anticrm/task'
|
||||
import { Component, EditBox, Grid, IconFolder, ToggleWithLabel } from '@anticrm/ui'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import lead from '../plugin'
|
||||
import task, { createKanban, KanbanTemplate } from '@anticrm/task'
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
}}
|
||||
>
|
||||
<Grid column={1} rowGap={1.5}>
|
||||
<EditBox label={lead.string.FunnelName} icon={IconFolder} bind:value={name} placeholder={'Funnel name'} maxWidth={'16rem'} focus />
|
||||
<EditBox label={lead.string.FunnelName} icon={IconFolder} bind:value={name} placeholder={lead.string.FunnelName} maxWidth={'16rem'} focus />
|
||||
<ToggleWithLabel label={lead.string.MakePrivate} description={lead.string.MakePrivateDescription} />
|
||||
|
||||
<Component is={task.component.KanbanTemplateSelector} props={{
|
||||
|
@ -72,7 +72,13 @@
|
||||
throw new Error('contact not found')
|
||||
}
|
||||
if (!client.getHierarchy().hasMixin(customerInstance, lead.mixin.Customer)) {
|
||||
await client.createMixin<Contact, Customer>(customerInstance._id, customerInstance._class, customerInstance.space, lead.mixin.Customer, {})
|
||||
await client.createMixin<Contact, Customer>(
|
||||
customerInstance._id,
|
||||
customerInstance._class,
|
||||
customerInstance.space,
|
||||
lead.mixin.Customer,
|
||||
{ description: '' }
|
||||
)
|
||||
}
|
||||
|
||||
await client.addCollection(lead.class.Lead, _space, customer!, lead.mixin.Customer, 'leads', value, leadId)
|
||||
@ -102,6 +108,11 @@
|
||||
maxWidth={'16rem'}
|
||||
focus
|
||||
/>
|
||||
<UserBox _class={contact.class.Contact} title={lead.string.Customer} caption={lead.string.SelectCustomer} bind:value={customer} />
|
||||
<UserBox
|
||||
_class={contact.class.Contact}
|
||||
title={lead.string.Customer}
|
||||
caption={lead.string.SelectCustomer}
|
||||
bind:value={customer}
|
||||
/>
|
||||
</Grid>
|
||||
</Card>
|
||||
|
@ -44,7 +44,7 @@
|
||||
placeholder={lead.string.LeadPlaceholder}
|
||||
maxWidth="39rem"
|
||||
focus
|
||||
on:change={(evt) => change('title', object.title)}
|
||||
on:change={() => change('title', object.title)}
|
||||
/>
|
||||
<UserBox
|
||||
_class={contact.class.Contact}
|
||||
|
@ -14,8 +14,8 @@
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { Ref } from '@anticrm/core'
|
||||
import type { Customer } from '@anticrm/lead'
|
||||
import type { FindOptions, Ref } from '@anticrm/core'
|
||||
import type { Customer, Lead } from '@anticrm/lead'
|
||||
import task from '@anticrm/task'
|
||||
import { CircleButton, IconAdd, Label, showPopup } from '@anticrm/ui'
|
||||
import { Table } from '@anticrm/view-resources'
|
||||
@ -26,8 +26,15 @@
|
||||
export let leads: number | undefined = undefined
|
||||
$: loadingProps = leads !== undefined ? { length: leads } : undefined
|
||||
|
||||
const createLead = (ev: MouseEvent): void =>
|
||||
const createLead = (ev: MouseEvent): void => {
|
||||
showPopup(CreateLead, { candidate: objectId, preserveCandidate: true }, ev.target as HTMLElement)
|
||||
}
|
||||
|
||||
const options: FindOptions<Lead> = {
|
||||
lookup: {
|
||||
state: task.class.State
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="applications-container">
|
||||
@ -39,13 +46,7 @@
|
||||
<Table
|
||||
_class={lead.class.Lead}
|
||||
config={['', '$lookup.state']}
|
||||
options={
|
||||
{
|
||||
lookup: {
|
||||
state: task.class.State
|
||||
}
|
||||
}
|
||||
}
|
||||
options={options}
|
||||
query={ { attachedTo: objectId } }
|
||||
{loadingProps}
|
||||
/>
|
||||
|
@ -7,14 +7,14 @@
|
||||
"scripts": {
|
||||
"build": "echo 'no build for ui'",
|
||||
"build:docs": "api-extractor run --local",
|
||||
"lint": "eslint",
|
||||
"lint": "svelte-check && eslint",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"format": "prettier --write --plugin-search-dir=. src && eslint --fix src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -31,7 +31,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/login": "~0.6.1",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/workbench": "~0.6.1"
|
||||
|
@ -14,7 +14,7 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { Status, Severity } from '@anticrm/platform'
|
||||
import { Status, Severity, OK } from '@anticrm/platform'
|
||||
|
||||
import Form from './Form.svelte'
|
||||
import { createWorkspace } from '../utils'
|
||||
@ -29,7 +29,7 @@
|
||||
workspace: ''
|
||||
}
|
||||
|
||||
let status = new Status(Severity.OK, 0, '')
|
||||
let status: Status<any> = OK
|
||||
|
||||
const action = {
|
||||
i18n: login.string.CreateWorkspace,
|
||||
|
@ -67,7 +67,7 @@
|
||||
</div>
|
||||
{#await getWorkspaces() then workspaces}
|
||||
<div class="form">
|
||||
{#each workspaces as workspace (workspace._id)}
|
||||
{#each workspaces as workspace}
|
||||
<div
|
||||
class="workspace flex-center fs-title cursor-pointer focused-button form-row"
|
||||
on:click={() => select(workspace.workspace)}
|
||||
|
@ -14,7 +14,7 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { Status, Severity } from '@anticrm/platform'
|
||||
import { Status, Severity, OK } from '@anticrm/platform'
|
||||
|
||||
import Form from './Form.svelte'
|
||||
import { signUp } from '../utils'
|
||||
@ -37,7 +37,7 @@
|
||||
password2: ''
|
||||
}
|
||||
|
||||
let status = new Status(Severity.OK, 0, '')
|
||||
let status: Status<any> = OK
|
||||
|
||||
const action = {
|
||||
i18n: login.string.SignUp,
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-promise": "^5.1.1",
|
||||
@ -32,7 +32,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/notification": "~0.6.0",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
|
@ -7,14 +7,14 @@
|
||||
"scripts": {
|
||||
"build": "echo 'no build for ui'",
|
||||
"build:docs": "api-extractor run --local",
|
||||
"lint": "eslint",
|
||||
"lint": "svelte-check && eslint",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"format": "prettier --write --plugin-search-dir=. src && eslint --fix src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -33,7 +33,7 @@
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"@anticrm/core": "~0.6.16",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/recruit": "~0.6.3",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
|
@ -14,7 +14,7 @@
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { Doc, Ref } from '@anticrm/core'
|
||||
import type { Doc, FindOptions, Ref } from '@anticrm/core'
|
||||
import core from '@anticrm/core'
|
||||
import task from '@anticrm/task'
|
||||
import { CircleButton, IconAdd, Label, showPopup } from '@anticrm/ui'
|
||||
@ -24,6 +24,8 @@
|
||||
import FileDuo from './icons/FileDuo.svelte'
|
||||
import chunter from '@anticrm/chunter'
|
||||
import attachment from '@anticrm/attachment'
|
||||
import { Applicant } from '@anticrm/recruit'
|
||||
import { BuildModelKey } from '@anticrm/view'
|
||||
|
||||
export let objectId: Ref<Doc>
|
||||
// export let space: Ref<Space>
|
||||
@ -34,6 +36,21 @@
|
||||
const createApp = (ev: MouseEvent): void => {
|
||||
showPopup(CreateApplication, { candidate: objectId, preserveCandidate: true }, ev.target as HTMLElement)
|
||||
}
|
||||
const options: FindOptions<Applicant> = {
|
||||
lookup: {
|
||||
state: task.class.State,
|
||||
space: core.class.Space,
|
||||
doneState: task.class.DoneState
|
||||
}
|
||||
}
|
||||
const config: (BuildModelKey | string)[] = [
|
||||
'',
|
||||
'$lookup.space.name',
|
||||
{ key: '', presenter: chunter.component.CommentsPresenter, label: chunter.string.Comments, sortingKey: 'comments' },
|
||||
{ key: '', presenter: attachment.component.AttachmentsPresenter, label: attachment.string.Files, sortingKey: 'attachments' },
|
||||
'$lookup.state',
|
||||
'$lookup.doneState'
|
||||
]
|
||||
</script>
|
||||
|
||||
<div class="applications-container">
|
||||
@ -44,23 +61,8 @@
|
||||
{#if applications > 0}
|
||||
<Table
|
||||
_class={recruit.class.Applicant}
|
||||
config={[
|
||||
'',
|
||||
'$lookup.space.name',
|
||||
{ key: '', presenter: chunter.component.CommentsPresenter, label: chunter.string.Comments, sortingKey: 'comments' },
|
||||
{ key: '', presenter: attachment.component.AttachmentsPresenter, label: attachment.string.Files, sortingKey: 'attachments' },
|
||||
'$lookup.state',
|
||||
'$lookup.doneState'
|
||||
]}
|
||||
options={
|
||||
{
|
||||
lookup: {
|
||||
state: task.class.State,
|
||||
space: core.class.Space,
|
||||
doneState: task.class.DoneState
|
||||
}
|
||||
}
|
||||
}
|
||||
config={config}
|
||||
options={options}
|
||||
query={ { attachedTo: objectId } }
|
||||
loadingProps={ { length: applications } }
|
||||
/>
|
||||
|
@ -16,28 +16,26 @@
|
||||
|
||||
<script lang="ts">
|
||||
|
||||
import core from '@anticrm/core'
|
||||
import type { Candidate } from '@anticrm/recruit'
|
||||
import core, { FindOptions } from '@anticrm/core'
|
||||
import type { Applicant, Candidate } from '@anticrm/recruit'
|
||||
import recruit from '@anticrm/recruit'
|
||||
import task from '@anticrm/task'
|
||||
import { Table } from '@anticrm/view-resources'
|
||||
|
||||
export let value: Candidate
|
||||
|
||||
</script>
|
||||
|
||||
<Table
|
||||
_class={recruit.class.Applicant}
|
||||
config={['', '$lookup.space.name', '$lookup.state', '$lookup.doneState']}
|
||||
options={
|
||||
{
|
||||
const options: FindOptions<Applicant> = {
|
||||
lookup: {
|
||||
state: task.class.State,
|
||||
space: core.class.Space,
|
||||
doneState: task.class.DoneState
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<Table
|
||||
_class={recruit.class.Applicant}
|
||||
config={['', '$lookup.space.name', '$lookup.state', '$lookup.doneState']}
|
||||
options={options}
|
||||
query={ { attachedTo: value._id } }
|
||||
loadingProps={{ length: value.applications ?? 0 }}
|
||||
/>
|
||||
|
@ -18,10 +18,10 @@
|
||||
import attachment from '@anticrm/attachment'
|
||||
import chunter from '@anticrm/chunter'
|
||||
import contact from '@anticrm/contact'
|
||||
import core,{ Doc,DocumentQuery,FindOptions } from '@anticrm/core'
|
||||
import { Doc, DocumentQuery, FindOptions } from '@anticrm/core'
|
||||
import { Applicant } from '@anticrm/recruit'
|
||||
import task from '@anticrm/task'
|
||||
import { Button,Icon,IconAdd,Label,Scroller,SearchEdit,showPopup } from '@anticrm/ui'
|
||||
import { Button, Icon, IconAdd, Label, Scroller, SearchEdit, showPopup } from '@anticrm/ui'
|
||||
import { BuildModelKey } from '@anticrm/view'
|
||||
import { Table } from '@anticrm/view-resources'
|
||||
import recruit from '../plugin'
|
||||
@ -64,7 +64,7 @@
|
||||
}
|
||||
|
||||
function updateResultQuery (search: string): void {
|
||||
resultQuery = (search === '') ? baseQuery : { ...baseQuery,$search: search }
|
||||
resultQuery = (search === '') ? baseQuery : { ...baseQuery, $search: search }
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -217,7 +217,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function recognize (name: string): Promise<void> {
|
||||
async function recognize (): Promise<void> {
|
||||
const token = getMetadata(login.metadata.LoginToken) ?? ''
|
||||
const fileUrl = window.location.origin + getFileUrl(resume.uuid)
|
||||
|
||||
@ -241,7 +241,7 @@
|
||||
object.city = doc.city
|
||||
}
|
||||
|
||||
if (isUndef(object.avatar) && doc.avatar !== undefined) {
|
||||
if (isUndef(object.avatar ?? undefined) && doc.avatar !== undefined) {
|
||||
// We had avatar, let's try to upload it.
|
||||
const data = atob(doc.avatar)
|
||||
let n = data.length
|
||||
@ -326,7 +326,7 @@
|
||||
resume.lastModified = file.lastModified
|
||||
|
||||
if (file.type.includes('application/pdf')) {
|
||||
await recognize(resume.uuid)
|
||||
await recognize()
|
||||
}
|
||||
|
||||
console.log('uploaded file uuid', resume.uuid)
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
export let _id: Ref<Vacancy>
|
||||
|
||||
let object: Vacancy
|
||||
let object: Required<Vacancy>
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
@ -37,9 +37,9 @@
|
||||
const query = createQuery()
|
||||
const clazz = client.getHierarchy().getClass(recruit.class.Vacancy)
|
||||
|
||||
async function updateObject (_id: Ref<Vacancy>): Promise<void> {
|
||||
await query.query(recruit.class.Vacancy, { _id }, result => {
|
||||
object = result[0]
|
||||
function updateObject (_id: Ref<Vacancy>): void {
|
||||
query.query(recruit.class.Vacancy, { _id }, result => {
|
||||
object = result[0] as Required<Vacancy>
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -15,22 +15,15 @@
|
||||
|
||||
<script lang="ts">
|
||||
|
||||
import core, { Doc, DocumentQuery, Ref, Space } from '@anticrm/core'
|
||||
import recruit from '@anticrm/recruit'
|
||||
import core, { Doc, DocumentQuery, FindOptions, Ref, Space } from '@anticrm/core'
|
||||
import recruit, { Applicant } from '@anticrm/recruit'
|
||||
import task from '@anticrm/task'
|
||||
import { Table } from '@anticrm/view-resources'
|
||||
|
||||
export let value: Ref<Space>
|
||||
export let resultQuery: DocumentQuery<Doc>
|
||||
|
||||
</script>
|
||||
|
||||
<div class='popup-table'>
|
||||
<Table
|
||||
_class={recruit.class.Applicant}
|
||||
config={['', '$lookup.attachedTo', '$lookup.state', '$lookup.doneState', 'modifiedOn']}
|
||||
options={
|
||||
{
|
||||
const options: FindOptions<Applicant> = {
|
||||
lookup: {
|
||||
state: task.class.State,
|
||||
space: core.class.Space,
|
||||
@ -39,7 +32,13 @@
|
||||
},
|
||||
limit: 10
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class='popup-table'>
|
||||
<Table
|
||||
_class={recruit.class.Applicant}
|
||||
config={['', '$lookup.attachedTo', '$lookup.state', '$lookup.doneState', 'modifiedOn']}
|
||||
options={options}
|
||||
query={ { ...(resultQuery ?? {}), space: value } }
|
||||
loadingProps={{ length: 0 }}
|
||||
/>
|
||||
|
@ -22,7 +22,7 @@
|
||||
import type { Candidate, Review } from '@anticrm/recruit'
|
||||
import task, { SpaceWithStates } from '@anticrm/task'
|
||||
import { StyledTextBox } from '@anticrm/text-editor'
|
||||
import { DatePicker, Grid, Status as StatusControl, StylishEdit, EditBox, Row } from '@anticrm/ui'
|
||||
import { DatePicker, EditBox, Grid, Row, Status as StatusControl } from '@anticrm/ui'
|
||||
import view from '@anticrm/view'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import recruit from '../../plugin'
|
||||
|
@ -16,7 +16,6 @@
|
||||
<script lang="ts">
|
||||
import calendar from '@anticrm/calendar'
|
||||
import contact, { Contact } from '@anticrm/contact'
|
||||
import { OrganizationSelector } from '@anticrm/contact-resources'
|
||||
import { getClient, UserBox, UserBoxList } from '@anticrm/presentation'
|
||||
import type { Review } from '@anticrm/recruit'
|
||||
import { StyledTextBox } from '@anticrm/text-editor'
|
||||
|
@ -14,10 +14,10 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import calendar from '@anticrm/calendar'
|
||||
import { formatName, Person } from '@anticrm/contact'
|
||||
import { Hierarchy } from '@anticrm/core'
|
||||
import { Avatar } from '@anticrm/presentation'
|
||||
import recruit from '../../plugin'
|
||||
import { showPanel, Tooltip } from '@anticrm/ui'
|
||||
import view from '@anticrm/view'
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
{#if value}
|
||||
<div class='flex persons'>
|
||||
{#each persons as p}
|
||||
<Tooltip label={recruit.string.PersonsLabel} props={{ name: formatName(p.name) }}>
|
||||
<Tooltip label={calendar.string.PersonsLabel} props={{ name: formatName(p.name) }}>
|
||||
<div class="flex-presenter" class:inline-presenter={inline} on:click={() => onClick(p)}>
|
||||
<div class="icon">
|
||||
<Avatar size={'x-small'} avatar={p.avatar} />
|
||||
|
@ -15,7 +15,7 @@
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -33,7 +33,7 @@
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"@anticrm/core": "~0.6.16",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/setting": "~0.6.0",
|
||||
"@anticrm/contact": "~0.6.5",
|
||||
"@anticrm/attachment": "~0.6.1",
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-promise": "^5.1.1",
|
||||
@ -32,7 +32,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/tags": "~0.6.0",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
|
@ -15,7 +15,7 @@
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -31,7 +31,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/task": "~0.6.0",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
|
@ -15,7 +15,7 @@
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-promise": "^5.1.1",
|
||||
@ -31,7 +31,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/telegram": "~0.6.2",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
|
@ -16,7 +16,7 @@
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-promise": "^5.1.1",
|
||||
@ -32,7 +32,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/templates": "~0.6.0",
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/presentation": "~0.6.2",
|
||||
|
@ -7,14 +7,14 @@
|
||||
"scripts": {
|
||||
"build": "echo 'no build for ui'",
|
||||
"build:docs": "api-extractor run --local",
|
||||
"lint": "eslint",
|
||||
"lint": "svelte-check && eslint",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"format": "prettier --write --plugin-search-dir=. src && eslint --fix src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -30,7 +30,7 @@
|
||||
"typescript": "^4.3.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"@anticrm/core": "~0.6.16",
|
||||
"@anticrm/client": "~0.6.1",
|
||||
|
@ -63,7 +63,6 @@
|
||||
{#if object !== undefined}
|
||||
<Panel
|
||||
reverseCommands={true}
|
||||
useOverlay={false}
|
||||
rightSection={rightSection !== undefined}
|
||||
on:close={() => {
|
||||
dispatch('close')
|
||||
|
@ -26,7 +26,7 @@
|
||||
const client = getClient()
|
||||
const shortLabel = client.getHierarchy().getClass(value._class).shortLabel
|
||||
|
||||
function show (evt: Event) {
|
||||
function show () {
|
||||
showPanel(tracker.component.EditIssue, value._id, value._class, 'content')
|
||||
}
|
||||
</script>
|
||||
|
@ -7,14 +7,14 @@
|
||||
"scripts": {
|
||||
"build": "echo 'no build for ui'",
|
||||
"build:docs": "api-extractor run --local",
|
||||
"lint": "eslint",
|
||||
"lint": "svelte-check && eslint",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"format": "prettier --write --plugin-search-dir=. src && eslint --fix src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -30,7 +30,7 @@
|
||||
"typescript": "^4.3.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"@anticrm/contact": "~0.6.5",
|
||||
"@anticrm/panel": "~0.6.0",
|
||||
|
@ -26,7 +26,7 @@
|
||||
getClient,
|
||||
KeyedAttribute
|
||||
} from '@anticrm/presentation'
|
||||
import { AnyComponent, Component, Label } from '@anticrm/ui'
|
||||
import { AnyComponent, Component, Label, PopupAlignment } from '@anticrm/ui'
|
||||
import view from '@anticrm/view'
|
||||
import { createEventDispatcher, onDestroy } from 'svelte'
|
||||
import { getCollectionCounter, getMixinStyle } from '../utils'
|
||||
|
@ -105,8 +105,8 @@
|
||||
</div>
|
||||
<div class="spaceSelect">
|
||||
{#await getSpace() then}
|
||||
{#if currentSpace}
|
||||
<SpaceSelect _class={currentSpace._class} label={_class ?? ''} bind:value={object.space} />
|
||||
{#if currentSpace && _class}
|
||||
<SpaceSelect _class={currentSpace._class} label={_class} placeholder={_class} bind:value={object.space} />
|
||||
{/if}
|
||||
{/await}
|
||||
</div>
|
||||
|
@ -15,12 +15,10 @@
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import type { Type } from '@anticrm/core'
|
||||
|
||||
export let value: string
|
||||
|
||||
// eslint-disable-next-line
|
||||
export let attributeType: Type<any>
|
||||
// export let attributeType: Type<any>
|
||||
</script>
|
||||
|
||||
<span class="lines-limit-2">{value}</span>
|
||||
|
@ -23,7 +23,7 @@
|
||||
import MoreV from './icons/MoreV.svelte'
|
||||
import Menu from './Menu.svelte'
|
||||
import notification from '@anticrm/notification'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
|
||||
export let _class: Ref<Class<Doc>>
|
||||
export let query: DocumentQuery<Doc>
|
||||
@ -255,7 +255,7 @@ import { createEventDispatcher } from 'svelte'
|
||||
</div>
|
||||
</td>
|
||||
{/if}
|
||||
<td>
|
||||
<td id={`loader-${i}-${attribute.key}`}>
|
||||
<Spinner size="small" />
|
||||
</td>
|
||||
{/if}
|
||||
|
@ -7,14 +7,14 @@
|
||||
"scripts": {
|
||||
"build": "echo 'no build for ui'",
|
||||
"build:docs": "api-extractor run --local",
|
||||
"lint": "eslint",
|
||||
"lint": "svelte-check && eslint",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"format": "prettier --write --plugin-search-dir=. src && eslint --fix src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte-loader": "^3.1.2",
|
||||
"sass": "^1.37.5",
|
||||
"svelte-preprocess": "^4.10.3",
|
||||
"svelte-preprocess": "^4.10.5",
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
@ -30,7 +30,7 @@
|
||||
"typescript": "^4.3.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"svelte": "^3.37.0",
|
||||
"svelte": "^3.46",
|
||||
"@anticrm/platform": "~0.6.5",
|
||||
"@anticrm/core": "~0.6.16",
|
||||
"@anticrm/client": "~0.6.1",
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
{#if viewlet}
|
||||
{#key space}
|
||||
{#if viewlet.$lookup?.descriptor?.component}
|
||||
<Component is={viewlet.$lookup?.descriptor?.component} props={ {
|
||||
_class,
|
||||
space,
|
||||
@ -34,5 +35,6 @@
|
||||
config: viewlet.config,
|
||||
search
|
||||
} } />
|
||||
{/if}
|
||||
{/key}
|
||||
{/if}
|
||||
|
@ -30,17 +30,15 @@
|
||||
location,
|
||||
Location,
|
||||
navigate,
|
||||
PanelInstance,
|
||||
panelstore,
|
||||
Popup,
|
||||
PanelInstance, Popup,
|
||||
showPopup,
|
||||
TooltipInstance
|
||||
} from '@anticrm/ui'
|
||||
import HtmlPresenter from '@anticrm/view-resources/src/components/HTMLPresenter.svelte'
|
||||
import type { Application, NavigatorModel, SpecialNavModel, ViewConfiguration } from '@anticrm/workbench'
|
||||
import { onDestroy } from 'svelte'
|
||||
import workbench from '../plugin'
|
||||
import AccountPopup from './AccountPopup.svelte'
|
||||
import ActivityStatus from './ActivityStatus.svelte'
|
||||
import AppItem from './AppItem.svelte'
|
||||
import Applications from './Applications.svelte'
|
||||
import TopMenu from './icons/TopMenu.svelte'
|
||||
@ -226,9 +224,6 @@
|
||||
{ limit: 1 }
|
||||
)
|
||||
|
||||
let isNavigate: boolean = false
|
||||
$: isNavigate = !!navigatorModel
|
||||
|
||||
function navigateApp (app: Application): void {
|
||||
if (currentApp === app._id) {
|
||||
// Nothing to do.
|
||||
@ -346,7 +341,7 @@
|
||||
<div
|
||||
id="profile-button"
|
||||
class="cursor-pointer"
|
||||
on:click|stopPropagation={(el) => {
|
||||
on:click|stopPropagation={() => {
|
||||
showPopup(AccountPopup, {}, 'account')
|
||||
}}
|
||||
>
|
||||
@ -371,7 +366,7 @@
|
||||
model={navigatorModel}
|
||||
on:special={(evt) => selectSpecial(evt.detail)}
|
||||
on:space={(evt) => updateSpace(evt.detail.space, evt.detail.spaceSpecial)}
|
||||
on:archive={(evt) => selectArchive()}
|
||||
on:archive={() => selectArchive()}
|
||||
/>
|
||||
{#if currentApplication.navFooterComponent}
|
||||
<Component is={currentApplication.navFooterComponent} props={{ currentSpace }} />
|
||||
@ -386,6 +381,11 @@
|
||||
is={specialComponent.component}
|
||||
props={{ model: navigatorModel, ...specialComponent.componentProps, currentSpace }}
|
||||
/>
|
||||
{:else if currentView?.component !== undefined}
|
||||
<Component
|
||||
is={currentView.component}
|
||||
props={{ ...currentView.componentProps, currentView }}
|
||||
/>
|
||||
{:else}
|
||||
<SpaceView {currentSpace} {currentView} {createItemDialog} {createItemLabel} />
|
||||
{/if}
|
||||
|
@ -19,8 +19,7 @@
|
||||
import core from '@anticrm/core'
|
||||
import type { IntlString } from '@anticrm/platform'
|
||||
import { createQuery, getClient } from '@anticrm/presentation'
|
||||
import { EditBox, Grid, Icon, IconClose, Label, ActionIcon, Scroller } from '@anticrm/ui'
|
||||
import LangPopup from '@anticrm/ui/src/components/internal/LangPopup.svelte'
|
||||
import { ActionIcon, EditBox, Grid, Icon, IconClose, Label, Scroller } from '@anticrm/ui'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import workbench from '../../plugin'
|
||||
|
||||
@ -59,7 +58,9 @@ import LangPopup from '@anticrm/ui/src/components/internal/LangPopup.svelte'
|
||||
<div class="antiDialogs antiComponent">
|
||||
<div class="ac-header short mirror divide">
|
||||
<div class="ac-header__wrap-title">
|
||||
{#if clazz.icon}
|
||||
<div class="ac-header__icon"><Icon icon={clazz.icon} size={'medium'} /></div>
|
||||
{/if}
|
||||
<div class="ac-header__title"><Label label={clazz.label} /></div>
|
||||
</div>
|
||||
<div class="tool"><ActionIcon icon={IconClose} size={'small'} action={() => { dispatch('close') }} /></div>
|
||||
|
@ -13,10 +13,10 @@
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import type { Ref, Space } from '@anticrm/core'
|
||||
import type { Asset, IntlString } from '@anticrm/platform'
|
||||
import type { Action } from '@anticrm/ui'
|
||||
import type { Ref, Space } from '@anticrm/core'
|
||||
import { Icon, Label, ActionIcon, Menu, showPopup, IconMoreH, IconMoreV } from '@anticrm/ui'
|
||||
import { ActionIcon, Icon, IconMoreV, Label, Menu, showPopup } from '@anticrm/ui'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
|
||||
export let _id: Ref<Space> | undefined = undefined
|
||||
@ -35,7 +35,7 @@
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
let hovered = false
|
||||
async function onMenuClick(ev: MouseEvent) {
|
||||
async function onMenuClick (ev: MouseEvent) {
|
||||
showPopup(Menu, { actions: await actions(), ctx: _id }, ev.target as HTMLElement, () => {
|
||||
hovered = false
|
||||
})
|
||||
|
@ -79,6 +79,10 @@ export interface ViewConfiguration {
|
||||
class: Ref<Class<Doc>> // show object of this class
|
||||
createItemDialog?: AnyComponent
|
||||
createItemLabel?: IntlString
|
||||
|
||||
// If defined component will be used to render content for selected space.
|
||||
component?: AnyComponent
|
||||
componentProps?: Record<string, any>
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,7 +11,7 @@
|
||||
"@anticrm/platform-rig": "~0.6.0",
|
||||
"svelte-loader":"^3.1.2",
|
||||
"sass":"^1.37.5",
|
||||
"svelte-preprocess":"^4.10.3",
|
||||
"svelte-preprocess":"^4.10.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
||||
"@typescript-eslint/parser": "^5.4.0",
|
||||
"eslint-config-standard-with-typescript": "^21.0.1",
|
||||
@ -28,7 +28,7 @@
|
||||
"svelte": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
"svelte": "^3.37.0"
|
||||
"svelte": "^3.46"
|
||||
},
|
||||
"#replaces": [
|
||||
".eslintrc.js",
|
||||
|
Loading…
Reference in New Issue
Block a user