Skip to content

Commit 29257e9

Browse files
authored
Improve process ui (#9645)
1 parent 2021e27 commit 29257e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+734
-1299
lines changed

models/process/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,7 @@ export function createModel (builder: Builder): void {
10211021
label: process.string.OnToDoDone,
10221022
icon: process.icon.ToDo,
10231023
editor: process.component.ToDoCloseEditor,
1024+
presenter: process.component.ToDoSettingPresenter,
10241025
requiredParams: ['_id'],
10251026
checkFunction: process.triggerCheck.ToDo,
10261027
init: false
@@ -1035,6 +1036,7 @@ export function createModel (builder: Builder): void {
10351036
label: process.string.OnToDoCancelled,
10361037
icon: process.icon.ToDoRemove,
10371038
editor: process.component.ToDoRemoveEditor,
1039+
presenter: process.component.ToDoSettingPresenter,
10381040
requiredParams: ['_id'],
10391041
checkFunction: process.triggerCheck.ToDo,
10401042
init: false

models/process/src/plugin.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export default mergeIds(processId, process, {
4040
ContinueExecution: '' as Ref<Action<Doc, any>>
4141
},
4242
string: {
43-
Done: '' as IntlString,
4443
ConfigLabel: '' as IntlString,
4544
ConfigDescription: '' as IntlString,
4645
LogAction: '' as IntlString

packages/ui/src/components/Component.svelte

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import ErrorPresenter from './ErrorPresenter.svelte'
2121
import Loading from './Loading.svelte'
2222
import ErrorBoundary from './internal/ErrorBoundary'
23+
import { clone } from '@hcengineering/core'
2324
2425
// Reference to rendered component instance
2526
export let innerRef: SvelteComponent | undefined = undefined
@@ -31,17 +32,18 @@
3132
export let disabled: boolean = false
3233
3334
let _is: AnyComponent | AnySvelteComponent = is
34-
let _props: any = props
3535
3636
// See https://github.com/sveltejs/svelte/issues/4068
3737
// When passing undefined prop value, then Svelte uses default value only first time when
3838
// component is instantiated. On the next update the value will be set to undefined.
3939
// Here we filter out undefined values from props on updates to ensure we don't overwrite them.
4040
const filterDefaultUndefined = (pnew: any, pold: any): any =>
4141
pnew != null
42-
? Object.fromEntries(Object.entries(pnew).filter(([k, v]) => v !== undefined || pold?.[k] !== undefined))
42+
? Object.fromEntries(Object.entries(clone(pnew)).filter(([k, v]) => v !== undefined || pold?.[k] !== undefined))
4343
: pnew
4444
45+
let _props: any = filterDefaultUndefined(props, props)
46+
4547
$: if (!deepEqual(_is, is)) {
4648
_is = is
4749
}

plugins/process-assets/lang/cs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@
9595
"Insert": "Vložit",
9696
"Remove": "Odstranit",
9797
"RemoveFirst": "Odstranit první",
98-
"RemoveLast": "Odstranit poslední"
98+
"RemoveLast": "Odstranit poslední",
99+
"Cancelled": "Zrušeno"
99100
},
100101
"error": {
101102
"MethodNotFound": "Metoda nenalezena: {methodId}",

plugins/process-assets/lang/de.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@
9595
"Insert": "Einfügen",
9696
"Remove": "Entfernen",
9797
"RemoveFirst": "Erstes entfernen",
98-
"RemoveLast": "Letztes entfernen"
98+
"RemoveLast": "Letztes entfernen",
99+
"Cancelled": "Abgebrochen"
99100
},
100101
"error": {
101102
"MethodNotFound": "Methode nicht gefunden: {methodId}",

plugins/process-assets/lang/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@
100100
"Insert": "Insert",
101101
"Remove": "Remove",
102102
"RemoveFirst": "Remove first",
103-
"RemoveLast": "Remove last"
103+
"RemoveLast": "Remove last",
104+
"Cancelled": "Cancelled"
104105
},
105106
"error": {
106107
"MethodNotFound": "Method not found: {methodId}",

plugins/process-assets/lang/es.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@
100100
"ArraySizeGt": "Tamaño mayor que",
101101
"ArraySizeGte": "Tamaño mayor o igual que",
102102
"ArraySizeLt": "Tamaño menor que",
103-
"ArraySizeLte": "Tamaño menor o igual que"
103+
"ArraySizeLte": "Tamaño menor o igual que",
104+
"Cancelled": "Cancelado"
104105
},
105106
"error": {
106107
"MethodNotFound": "Método no encontrado: {methodId}",

plugins/process-assets/lang/fr.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@
100100
"ArraySizeGt": "Taille supérieure à",
101101
"ArraySizeGte": "Taille supérieure ou égale à",
102102
"ArraySizeLt": "Taille inférieure à",
103-
"ArraySizeLte": "Taille inférieure ou égale à"
103+
"ArraySizeLte": "Taille inférieure ou égale à",
104+
"Cancelled": "Annulé"
104105
},
105106
"error": {
106107
"MethodNotFound": "Méthode introuvable : {methodId}",

plugins/process-assets/lang/it.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@
100100
"ArraySizeGt": "Dimensione maggiore di",
101101
"ArraySizeGte": "Dimensione maggiore o uguale a",
102102
"ArraySizeLt": "Dimensione minore di",
103-
"ArraySizeLte": "Dimensione minore o uguale a"
103+
"ArraySizeLte": "Dimensione minore o uguale a",
104+
"Cancelled": "Annullato"
104105
},
105106
"error": {
106107
"MethodNotFound": "Metodo non trovato: {methodId}",

plugins/process-assets/lang/ja.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@
9999
"ArraySizeGt": "サイズがより大きい",
100100
"ArraySizeGte": "サイズが以上",
101101
"ArraySizeLt": "サイズがより小さい",
102-
"ArraySizeLte": "サイズが以下"
102+
"ArraySizeLte": "サイズが以下",
103+
"Cancelled": "キャンセル済み"
103104
},
104105
"error": {
105106
"MethodNotFound": "メソッドが見つかりません: {methodId}",

0 commit comments

Comments
 (0)