Fix webpack build conflicts (#985)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2022-02-09 16:08:09 +07:00 committed by GitHub
parent a383b90430
commit 821e9ebece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 50 additions and 137 deletions

View File

@ -87,6 +87,5 @@ export async function configurePlatform() {
addLocation(imageCropperId, () => import(/* webpackChunkName: "image-cropper" */ '@anticrm/image-cropper-resources'))
addLocation(inventoryId, () => import(/* webpackChunkName: "inventory" */ '@anticrm/inventory-resources'))
addLocation(templatesId, () => import(/* webpackChunkName: "templates" */ '@anticrm/templates-resources'))
addLocation(templatesId, () => import(/* webpackChunkName: "templates" */ '@anticrm/templates-resources'))
addLocation(notificationId, () => import(/* webpackChunkName: "notification" */ '@anticrm/notification-resources'))
}

View File

@ -33,7 +33,7 @@
<Loading/>
{:then Ctor}
<ErrorBoundary>
<Ctor {...props} on:change on:close on:open on:click>
<Ctor {...props} on:change on:close on:open on:click on:delete>
<slot />
</Ctor>
</ErrorBoundary>

View File

@ -40,11 +40,9 @@
"@anticrm/contact": "~0.6.2",
"@anticrm/view": "~0.6.0",
"@anticrm/task": "~0.6.0",
"@anticrm/task-resources": "~0.6.0",
"@anticrm/view-resources": "~0.6.0",
"@anticrm/attachment-resources": "~0.6.0",
"@anticrm/contact-resources": "~0.6.0",
"@anticrm/chunter-resources": "~0.6.0",
"@anticrm/workbench-resources": "~0.6.1"
"@anticrm/chunter-resources": "~0.6.0"
}
}

View File

@ -16,11 +16,10 @@
<script lang="ts">
import core, { Ref } from '@anticrm/core'
import { getClient, SpaceCreateCard } from '@anticrm/presentation'
import { EditBox, Grid, IconFolder, ToggleWithLabel } from '@anticrm/ui'
import { Component, EditBox, Grid, IconFolder, ToggleWithLabel } from '@anticrm/ui'
import { createEventDispatcher } from 'svelte'
import lead from '../plugin'
import task, { createKanban, KanbanTemplate } from '@anticrm/task'
import { KanbanTemplateSelector } from '@anticrm/task-resources'
const dispatch = createEventDispatcher()
@ -66,6 +65,13 @@
<Grid column={1} rowGap={1.5}>
<EditBox label={lead.string.FunnelName} icon={IconFolder} bind:value={name} placeholder={'Funnel name'} maxWidth={'16rem'} focus />
<ToggleWithLabel label={lead.string.MakePrivate} description={lead.string.MakePrivateDescription} />
<KanbanTemplateSelector folders={[lead.space.FunnelTemplates]} bind:template={templateId}/>
<Component is={task.component.KanbanTemplateSelector} props={{
folders: [lead.space.FunnelTemplates],
template: templateId
}} on:change={(evt) => {
templateId = evt.detail
}}/>
</Grid>
</SpaceCreateCard>

View File

@ -47,7 +47,6 @@
"@anticrm/attachment": "~0.6.0",
"@anticrm/attachment-resources": "~0.6.0",
"@anticrm/chunter-resources": "~0.6.0",
"@anticrm/setting": "~0.6.0",
"@anticrm/view": "~0.6.0",
"@anticrm/view-resources": "~0.6.0",
"@anticrm/task": "~0.6.0",

View File

@ -14,23 +14,19 @@
-->
<script lang="ts">
import { createEventDispatcher } from 'svelte'
import core, { Ref } from '@anticrm/core'
import { EditBox, Grid, Dropdown } from '@anticrm/ui'
import { getClient, SpaceCreateCard } from '@anticrm/presentation'
import task, { KanbanTemplate, createKanban } from '@anticrm/task'
import { KanbanTemplateSelector } from '@anticrm/task-resources'
import task, { createKanban, KanbanTemplate } from '@anticrm/task'
import { Component, Dropdown, EditBox, Grid } from '@anticrm/ui'
import { createEventDispatcher } from 'svelte'
import recruit from '../plugin'
import Company from './icons/Company.svelte'
import Vacancy from './icons/Vacancy.svelte'
import recruit from '../plugin'
const dispatch = createEventDispatcher()
let name: string = ''
let description: string = ''
const description: string = ''
let templateId: Ref<KanbanTemplate> | undefined
export function canClose (): boolean {
@ -59,12 +55,18 @@
<SpaceCreateCard
label={recruit.string.CreateVacancy}
okAction={createVacancy}
canSave={name ? true : false}
canSave={!!name}
on:close={() => { dispatch('close') }}
>
<Grid column={1} rowGap={1.5}>
<EditBox label={recruit.string.VacancyName} bind:value={name} icon={Vacancy} placeholder="Software Engineer" maxWidth={'16rem'} focus/>
<Dropdown icon={Company} label={recruit.string.Company} placeholder={'Company'} />
<KanbanTemplateSelector folders={[recruit.space.VacancyTemplates]} bind:template={templateId}/>
<Component is={task.component.KanbanTemplateSelector} props={{
folders: [recruit.space.VacancyTemplates],
template: templateId
}} on:change={(evt) => {
templateId = evt.detail
}}/>
</Grid>
</SpaceCreateCard>

View File

@ -43,8 +43,6 @@
"@anticrm/view-resources": "~0.6.0",
"@anticrm/login-resources": "~0.6.2",
"@anticrm/task": "~0.6.0",
"@anticrm/task-resources": "~0.6.0",
"@anticrm/workbench": "~0.6.1",
"@anticrm/contact-resources": "~0.6.0",
"@anticrm/login": "~0.6.1"
}

View File

@ -13,7 +13,7 @@
// limitations under the License.
-->
<script lang="ts">
import { getCurrentAccount, Ref, Space } from '@anticrm/core';
import { getCurrentAccount, Ref, Space } from '@anticrm/core'
import { createQuery } from '@anticrm/presentation'
import setting from '@anticrm/setting'
import type { Integration, IntegrationType } from '@anticrm/setting'

View File

@ -17,9 +17,8 @@
<script lang="ts">
// import type { Ref, Space, Doc, Class } from '@anticrm/core'
import { getClient, MessageBox } from '@anticrm/presentation'
import { Label, Icon, showPopup } from '@anticrm/ui'
import { Label, Icon, showPopup, Component } from '@anticrm/ui'
import type { KanbanTemplate, KanbanTemplateSpace, StateTemplate } from '@anticrm/task'
import { KanbanTemplateEditor } from '@anticrm/task-resources'
import setting from '@anticrm/setting'
import task from '@anticrm/task'
@ -68,7 +67,7 @@
</div>
<div class="ac-column max">
{#if template !== undefined}
<KanbanTemplateEditor kanban={template} on:delete={(e) => deleteState(e.detail)}/>
<Component is={task.component.KanbanTemplateEditor} props={{ kanban: template }} on:delete={(e) => deleteState(e.detail)}/>
{/if}
</div>
</div>

View File

@ -1,94 +0,0 @@
<!--
// Copyright © 2020 Anticrm Platform Contributors.
//
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. You may
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
-->
<script lang="ts">
import type { Ref, Space, Doc, Class, FindOptions } from '@anticrm/core'
import type { Issue } from '@anticrm/task'
import { createQuery } from '@anticrm/presentation'
import { CircleButton, IconAdd, showPopup, Label } from '@anticrm/ui'
import CreateTask from './CreateTask.svelte'
// import FileDuo from "./icons/FileDuo.svelte"
import { Table } from '@anticrm/view-resources'
import core from '@anticrm/core'
import task from '../plugin'
export let objectId: Ref<Doc>
export let space: Ref<Space>
export let _class: Ref<Class<Doc>>
let tasks: Issue[] = []
const query = createQuery()
$: query.query(task.class.Issue, { attachedTo: objectId }, result => { tasks = result })
const createApp = (ev: MouseEvent): void => {
showPopup(CreateTask, { parent: { _id: objectId, _class, space } }, ev.target as HTMLElement, () => {})
}
const options: FindOptions<Issue> = {
lookup: {
state: task.class.State,
space: core.class.Space
}
}
</script>
<div class="applications-container">
<div class="flex-row-center">
<div class="title">Tasks</div>
<CircleButton icon={IconAdd} size={'small'} on:click={createApp} />
</div>
{#if tasks.length > 0}
<Table
_class={task.class.Issue}
config={['', '$lookup.space.name', '$lookup.state']}
{options}
query={ { attachedTo: objectId } }
/>
{:else}
<div class="flex-col-center mt-5 createapp-container">
<!-- <FileDuo size={'large'} /> -->
<div class="text-sm content-dark-color mt-2">
<Label label={task.string.NoTaskForObject} />
</div>
<div class="text-sm">
<div class='over-underline' on:click={createApp}><Label label={task.string.CreateTask} /></div>
</div>
</div>
{/if}
</div>
<style lang="scss">
.applications-container {
display: flex;
flex-direction: column;
.title {
margin-right: .75rem;
font-weight: 500;
font-size: 1.25rem;
color: var(--theme-caption-color);
}
}
.createapp-container {
padding: 1rem;
color: var(--theme-caption-color);
background: var(--theme-bg-accent-color);
border: 1px solid var(--theme-bg-accent-color);
border-radius: .75rem;
}
</style>

View File

@ -15,10 +15,11 @@
<script lang="ts">
import type { Ref } from '@anticrm/core'
import { createQuery } from '@anticrm/presentation'
import { DropdownLabels } from '@anticrm/ui'
import type { DropdownTextItem } from '@anticrm/ui/src/types'
import type { KanbanTemplate, KanbanTemplateSpace } from '@anticrm/task'
import task from '@anticrm/task'
import { DropdownLabels } from '@anticrm/ui'
import type { DropdownTextItem } from '@anticrm/ui/src/types'
import { createEventDispatcher } from 'svelte'
import plugin from '../../plugin'
export let folders: Ref<KanbanTemplateSpace>[]
@ -32,7 +33,12 @@
$: items = templates.map(x => ({ id: x._id, label: x.title }))
let selectedItem: string | undefined
$: template = selectedItem === undefined ? undefined : selectedItem as Ref<KanbanTemplate>
const dispatch = createEventDispatcher()
$: {
template = selectedItem === undefined ? undefined : selectedItem as Ref<KanbanTemplate>
dispatch('change', template)
}
</script>
<DropdownLabels {items} bind:selected={selectedItem} title={plugin.string.States} />

View File

@ -38,9 +38,8 @@ import TodoItemPresenter from './components/todos/TodoItemPresenter.svelte'
import Todos from './components/todos/Todos.svelte'
import TodoStatePresenter from './components/todos/TodoStatePresenter.svelte'
export { default as KanbanTemplateEditor } from './components/kanban/KanbanTemplateEditor.svelte'
export { default as KanbanTemplateSelector } from './components/kanban/KanbanTemplateSelector.svelte'
export { default as Tasks } from './components/Tasks.svelte'
import KanbanTemplateEditor from './components/kanban/KanbanTemplateEditor.svelte'
import KanbanTemplateSelector from './components/kanban/KanbanTemplateSelector.svelte'
async function createTask (object: Doc): Promise<void> {
showPopup(CreateTask, { parent: object._id, space: object.space })
@ -142,7 +141,9 @@ export default async (): Promise<Resources> => ({
TodoStatePresenter,
StatusTableView,
TaskHeader,
DoneStateEditor
DoneStateEditor,
KanbanTemplateEditor,
KanbanTemplateSelector
},
actionImpl: {
CreateTask: createTask,

View File

@ -220,6 +220,10 @@ const task = plugin(taskId, {
space: {
ProjectTemplates: '' as Ref<KanbanTemplateSpace>,
Sequence: '' as Ref<Space>
},
component: {
KanbanTemplateEditor: '' as AnyComponent,
KanbanTemplateSelector: '' as AnyComponent
}
})

View File

@ -37,9 +37,6 @@
"@anticrm/ui": "~0.6.0",
"@anticrm/presentation": "~0.6.2",
"@anticrm/text-editor": "~0.6.0",
"@anticrm/setting": "~0.6.0",
"@anticrm/chunter": "~0.6.0",
"@anticrm/chunter-resources": "~0.6.0",
"@anticrm/core": "~0.6.11",
"@anticrm/view-resources": "~0.6.0"
}

View File

@ -17,9 +17,8 @@
import { createQuery } from '@anticrm/presentation'
import { MessageTemplate } from '@anticrm/templates'
import { TextEditorHandler } from '@anticrm/text-editor'
import { closePopup, EditWithIcon, IconSearch, Label, ScrollBox } from '@anticrm/ui'
import { closePopup, EditWithIcon, IconSearch, Label } from '@anticrm/ui'
import templates from '../plugin'
import TemplateElement from './TemplateElement.svelte'
export let editor: TextEditorHandler
let items: MessageTemplate[] = []

View File

@ -3,7 +3,7 @@
import { getClient, LiveQuery, MessageViewer } from '@anticrm/presentation'
import { MessageTemplate } from '@anticrm/templates'
import { StyledTextEditor } from '@anticrm/text-editor'
import { Button, CircleButton, EditBox, Icon, IconAdd, Label, ScrollBox } from '@anticrm/ui'
import { Button, CircleButton, EditBox, Icon, IconAdd, Label } from '@anticrm/ui'
import templatesPlugin from '../plugin'
import TemplateElement from './TemplateElement.svelte'

View File

@ -28,7 +28,6 @@
"dependencies": {
"@anticrm/platform": "~0.6.5",
"@anticrm/core": "~0.6.11",
"@anticrm/ui": "~0.6.0",
"@anticrm/setting": "~0.6.0"
"@anticrm/ui": "~0.6.0"
}
}