From 152b1edf72760ae20b0ad44a04e81108ab03fc13 Mon Sep 17 00:00:00 2001 From: Jozef Marko Date: Fri, 12 Apr 2024 10:01:52 +0200 Subject: [PATCH] use ... notation 2 --- .../propertiesPanel/bkmPropertiesPanel.ts | 16 ++++++++-------- .../propertiesPanel/decisionPropertiesPanel.ts | 16 ++++++++-------- .../decisionServicePropertiesPanel.ts | 16 ++++++++-------- .../propertiesPanel/diagramPropertiesPanel.ts | 4 ++-- .../propertiesPanel/groupPropertiesPanel.ts | 12 ++++++------ .../propertiesPanel/inputDataPropertiesPanel.ts | 16 ++++++++-------- .../knowledgeSourcePropertiesPanel.ts | 14 +++++++------- .../multipleNodesPropertiesPanel.ts | 4 ++-- .../textAnnotationPropertiesPanel.ts | 10 +++++----- 9 files changed, 54 insertions(+), 54 deletions(-) diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/bkmPropertiesPanel.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/bkmPropertiesPanel.ts index 58b848673b2..f3d5d96fe09 100644 --- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/bkmPropertiesPanel.ts +++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/bkmPropertiesPanel.ts @@ -47,7 +47,7 @@ export class BkmPropertiesPanel extends PropertiesPanelBase { } public async setName(args: { newName: string }) { - await this.nameProperties.setName({ newName: args.newName }); + await this.nameProperties.setName({ ...args }); } public async getName() { @@ -55,11 +55,11 @@ export class BkmPropertiesPanel extends PropertiesPanelBase { } public async setDataType(args: { newDataType: DataType }) { - await this.dataTypeProperties.setDataType({ newDataType: args.newDataType }); + await this.dataTypeProperties.setDataType({ ...args }); } public async setDescription(args: { newDescription: string }) { - await this.descriptionProperties.setDescription({ newDescription: args.newDescription }); + await this.descriptionProperties.setDescription({ ...args }); } public async getDescription() { @@ -67,7 +67,7 @@ export class BkmPropertiesPanel extends PropertiesPanelBase { } public async addDocumentationLink(args: { linkText: string; linkHref: string }) { - await this.documentationProperties.addDocumentationLink({ linkText: args.linkText, linkHref: args.linkHref }); + await this.documentationProperties.addDocumentationLink({ ...args }); } public async getDocumentationLinks() { @@ -95,11 +95,11 @@ export class BkmPropertiesPanel extends PropertiesPanelBase { } public async setShape(args: { width: string; height: string }) { - await this.shapeProperties.setShape({ width: args.width, height: args.height }); + await this.shapeProperties.setShape({ ...args }); } public async setPosition(args: { x: string; y: string }) { - await this.shapeProperties.setPosition({ x: args.x, y: args.y }); + await this.shapeProperties.setPosition({ ...args }); } public async getShape() { @@ -111,10 +111,10 @@ export class BkmPropertiesPanel extends PropertiesPanelBase { } public async setFillColor(args: { color: string }) { - await this.shapeProperties.setFillColor({ color: args.color }); + await this.shapeProperties.setFillColor({ ...args }); } public async setStrokeColor(args: { color: string }) { - await this.shapeProperties.setStrokeColor({ color: args.color }); + await this.shapeProperties.setStrokeColor({ ...args }); } } diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionPropertiesPanel.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionPropertiesPanel.ts index 1cdc587d1ef..eb368cdd967 100644 --- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionPropertiesPanel.ts +++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionPropertiesPanel.ts @@ -47,7 +47,7 @@ export class DecisionPropertiesPanel extends PropertiesPanelBase { } public async setName(args: { newName: string }) { - await this.nameProperties.setName({ newName: args.newName }); + await this.nameProperties.setName({ ...args }); } public async getName() { @@ -55,11 +55,11 @@ export class DecisionPropertiesPanel extends PropertiesPanelBase { } public async setDataType(args: { newDataType: DataType }) { - await this.dataTypeProperties.setDataType({ newDataType: args.newDataType }); + await this.dataTypeProperties.setDataType({ ...args }); } public async setDescription(args: { newDescription: string }) { - await this.descriptionProperties.setDescription({ newDescription: args.newDescription }); + await this.descriptionProperties.setDescription({ ...args }); } public async getDescription() { @@ -67,7 +67,7 @@ export class DecisionPropertiesPanel extends PropertiesPanelBase { } public async addDocumentationLink(args: { linkText: string; linkHref: string }) { - await this.documentationProperties.addDocumentationLink({ linkText: args.linkText, linkHref: args.linkHref }); + await this.documentationProperties.addDocumentationLink({ ...args }); } public async getDocumentationLinks() { @@ -115,11 +115,11 @@ export class DecisionPropertiesPanel extends PropertiesPanelBase { } public async setShape(args: { width: string; height: string }) { - await this.shapeProperties.setShape({ width: args.width, height: args.height }); + await this.shapeProperties.setShape({ ...args }); } public async setPosition(args: { x: string; y: string }) { - await this.shapeProperties.setPosition({ x: args.x, y: args.y }); + await this.shapeProperties.setPosition({ ...args }); } public async getShape() { @@ -131,10 +131,10 @@ export class DecisionPropertiesPanel extends PropertiesPanelBase { } public async setFillColor(args: { color: string }) { - await this.shapeProperties.setFillColor({ color: args.color }); + await this.shapeProperties.setFillColor({ ...args }); } public async setStrokeColor(args: { color: string }) { - await this.shapeProperties.setStrokeColor({ color: args.color }); + await this.shapeProperties.setStrokeColor({ ...args }); } } diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionServicePropertiesPanel.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionServicePropertiesPanel.ts index 6634f53a2db..10664787a70 100644 --- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionServicePropertiesPanel.ts +++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/decisionServicePropertiesPanel.ts @@ -47,7 +47,7 @@ export class DecisionServicePropertiesPanel extends PropertiesPanelBase { } public async setName(args: { newName: string }) { - await this.nameProperties.setName({ newName: args.newName }); + await this.nameProperties.setName({ ...args }); } public async getName() { @@ -55,11 +55,11 @@ export class DecisionServicePropertiesPanel extends PropertiesPanelBase { } public async setDataType(args: { newDataType: DataType }) { - await this.dataTypeProperties.setDataType({ newDataType: args.newDataType }); + await this.dataTypeProperties.setDataType({ ...args }); } public async setDescription(args: { newDescription: string }) { - await this.descriptionProperties.setDescription({ newDescription: args.newDescription }); + await this.descriptionProperties.setDescription({ ...args }); } public async getDescription() { @@ -67,7 +67,7 @@ export class DecisionServicePropertiesPanel extends PropertiesPanelBase { } public async addDocumentationLink(args: { linkText: string; linkHref: string }) { - await this.documentationProperties.addDocumentationLink({ linkText: args.linkText, linkHref: args.linkHref }); + await this.documentationProperties.addDocumentationLink({ ...args }); } public async getDocumentationLinks() { @@ -95,11 +95,11 @@ export class DecisionServicePropertiesPanel extends PropertiesPanelBase { } public async setShape(args: { width: string; height: string }) { - await this.shapeProperties.setShape({ width: args.width, height: args.height }); + await this.shapeProperties.setShape({ ...args }); } public async setPosition(args: { x: string; y: string }) { - await this.shapeProperties.setPosition({ x: args.x, y: args.y }); + await this.shapeProperties.setPosition({ ...args }); } public async getShape() { @@ -111,10 +111,10 @@ export class DecisionServicePropertiesPanel extends PropertiesPanelBase { } public async setFillColor(args: { color: string }) { - await this.shapeProperties.setFillColor({ color: args.color }); + await this.shapeProperties.setFillColor({ ...args }); } public async setStrokeColor(args: { color: string }) { - await this.shapeProperties.setStrokeColor({ color: args.color }); + await this.shapeProperties.setStrokeColor({ ...args }); } } diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/diagramPropertiesPanel.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/diagramPropertiesPanel.ts index eede9e2f643..b7802b000a4 100644 --- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/diagramPropertiesPanel.ts +++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/diagramPropertiesPanel.ts @@ -34,7 +34,7 @@ export class DiagramPropertiesPanel extends PropertiesPanelBase { } public async setDescription(args: { newDescription: string }) { - await this.descriptionProperties.setDescription({ newDescription: args.newDescription }); + await this.descriptionProperties.setDescription({ ...args }); } public async getDescription() { @@ -42,7 +42,7 @@ export class DiagramPropertiesPanel extends PropertiesPanelBase { } public async setName(args: { newName: string }) { - await this.nameProperties.setName({ newName: args.newName }); + await this.nameProperties.setName({ ...args }); } public async getName() { diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/groupPropertiesPanel.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/groupPropertiesPanel.ts index 984525e9cf3..d3e8ee67a88 100644 --- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/groupPropertiesPanel.ts +++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/groupPropertiesPanel.ts @@ -40,7 +40,7 @@ export class GroupPropertiesPanel extends PropertiesPanelBase { } public async setName(args: { newName: string }) { - await this.nameProperties.setName({ newName: args.newName }); + await this.nameProperties.setName({ ...args }); } public async getName() { @@ -48,7 +48,7 @@ export class GroupPropertiesPanel extends PropertiesPanelBase { } public async setDescription(args: { newDescription: string }) { - await this.descriptionProperties.setDescription({ newDescription: args.newDescription }); + await this.descriptionProperties.setDescription({ ...args }); } public async getDescription() { @@ -76,11 +76,11 @@ export class GroupPropertiesPanel extends PropertiesPanelBase { } public async setShape(args: { width: string; height: string }) { - await this.shapeProperties.setShape({ width: args.width, height: args.height }); + await this.shapeProperties.setShape({ ...args }); } public async setPosition(args: { x: string; y: string }) { - await this.shapeProperties.setPosition({ x: args.x, y: args.y }); + await this.shapeProperties.setPosition({ ...args }); } public async getShape() { @@ -92,10 +92,10 @@ export class GroupPropertiesPanel extends PropertiesPanelBase { } public async setFillColor(args: { color: string }) { - await this.shapeProperties.setFillColor({ color: args.color }); + await this.shapeProperties.setFillColor({ ...args }); } public async setStrokeColor(args: { color: string }) { - await this.shapeProperties.setStrokeColor({ color: args.color }); + await this.shapeProperties.setStrokeColor({ ...args }); } } diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/inputDataPropertiesPanel.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/inputDataPropertiesPanel.ts index 4e8758c6f81..c53c3aeb4dd 100644 --- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/inputDataPropertiesPanel.ts +++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/inputDataPropertiesPanel.ts @@ -47,7 +47,7 @@ export class InputDataPropertiesPanel extends PropertiesPanelBase { } public async setName(args: { newName: string }) { - await this.nameProperties.setName({ newName: args.newName }); + await this.nameProperties.setName({ ...args }); } public async getName() { @@ -55,11 +55,11 @@ export class InputDataPropertiesPanel extends PropertiesPanelBase { } public async setDataType(args: { newDataType: DataType }) { - await this.dataTypeProperties.setDataType({ newDataType: args.newDataType }); + await this.dataTypeProperties.setDataType({ ...args }); } public async setDescription(args: { newDescription: string }) { - await this.descriptionProperties.setDescription({ newDescription: args.newDescription }); + await this.descriptionProperties.setDescription({ ...args }); } public async getDescription() { @@ -67,7 +67,7 @@ export class InputDataPropertiesPanel extends PropertiesPanelBase { } public async addDocumentationLink(args: { linkText: string; linkHref: string }) { - await this.documentationProperties.addDocumentationLink({ linkText: args.linkText, linkHref: args.linkHref }); + await this.documentationProperties.addDocumentationLink({ ...args }); } public async getDocumentationLinks() { @@ -95,11 +95,11 @@ export class InputDataPropertiesPanel extends PropertiesPanelBase { } public async setShape(args: { width: string; height: string }) { - await this.shapeProperties.setShape({ width: args.width, height: args.height }); + await this.shapeProperties.setShape({ ...args }); } public async setPosition(args: { x: string; y: string }) { - await this.shapeProperties.setPosition({ x: args.x, y: args.y }); + await this.shapeProperties.setPosition({ ...args }); } public async getShape() { @@ -111,10 +111,10 @@ export class InputDataPropertiesPanel extends PropertiesPanelBase { } public async setFillColor(args: { color: string }) { - await this.shapeProperties.setFillColor({ color: args.color }); + await this.shapeProperties.setFillColor({ ...args }); } public async setStrokeColor(args: { color: string }) { - await this.shapeProperties.setStrokeColor({ color: args.color }); + await this.shapeProperties.setStrokeColor({ ...args }); } } diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/knowledgeSourcePropertiesPanel.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/knowledgeSourcePropertiesPanel.ts index ee62515d8d2..b5d69d47e04 100644 --- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/knowledgeSourcePropertiesPanel.ts +++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/knowledgeSourcePropertiesPanel.ts @@ -44,7 +44,7 @@ export class KnowledgeSourcePropertiesPanel extends PropertiesPanelBase { } public async setName(args: { newName: string }) { - await this.nameProperties.setName({ newName: args.newName }); + await this.nameProperties.setName({ ...args }); } public async getName() { @@ -52,7 +52,7 @@ export class KnowledgeSourcePropertiesPanel extends PropertiesPanelBase { } public async setDescription(args: { newDescription: string }) { - await this.descriptionProperties.setDescription({ newDescription: args.newDescription }); + await this.descriptionProperties.setDescription({ ...args }); } public async getDescription() { @@ -60,7 +60,7 @@ export class KnowledgeSourcePropertiesPanel extends PropertiesPanelBase { } public async addDocumentationLink(args: { linkText: string; linkHref: string }) { - await this.documentationProperties.addDocumentationLink({ linkText: args.linkText, linkHref: args.linkHref }); + await this.documentationProperties.addDocumentationLink({ ...args }); } public async getDocumentationLinks() { @@ -112,11 +112,11 @@ export class KnowledgeSourcePropertiesPanel extends PropertiesPanelBase { } public async setShape(args: { width: string; height: string }) { - await this.shapeProperties.setShape({ width: args.width, height: args.height }); + await this.shapeProperties.setShape({ ...args }); } public async setPosition(args: { x: string; y: string }) { - await this.shapeProperties.setPosition({ x: args.x, y: args.y }); + await this.shapeProperties.setPosition({ ...args }); } public async getShape() { @@ -128,10 +128,10 @@ export class KnowledgeSourcePropertiesPanel extends PropertiesPanelBase { } public async setFillColor(args: { color: string }) { - await this.shapeProperties.setFillColor({ color: args.color }); + await this.shapeProperties.setFillColor({ ...args }); } public async setStrokeColor(args: { color: string }) { - await this.shapeProperties.setStrokeColor({ color: args.color }); + await this.shapeProperties.setStrokeColor({ ...args }); } } diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/multipleNodesPropertiesPanel.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/multipleNodesPropertiesPanel.ts index f49601e7104..abf56f641d4 100644 --- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/multipleNodesPropertiesPanel.ts +++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/multipleNodesPropertiesPanel.ts @@ -58,10 +58,10 @@ export class MultipleNodesPropertiesPanel extends PropertiesPanelBase { } public async setFillColor(args: { color: string }) { - await this.shapeProperties.setFillColor({ color: args.color }); + await this.shapeProperties.setFillColor({ ...args }); } public async setStrokeColor(args: { color: string }) { - await this.shapeProperties.setStrokeColor({ color: args.color }); + await this.shapeProperties.setStrokeColor({ ...args }); } } diff --git a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/textAnnotationPropertiesPanel.ts b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/textAnnotationPropertiesPanel.ts index 327326b45fb..59b34a46993 100644 --- a/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/textAnnotationPropertiesPanel.ts +++ b/packages/dmn-editor/tests/e2e/__fixtures__/propertiesPanel/textAnnotationPropertiesPanel.ts @@ -57,7 +57,7 @@ export class TextAnnotationProperties extends PropertiesPanelBase { } public async setDescription(args: { newDescription: string }) { - await this.descriptionProperties.setDescription({ newDescription: args.newDescription }); + await this.descriptionProperties.setDescription({ ...args }); } public async getDescription() { @@ -85,11 +85,11 @@ export class TextAnnotationProperties extends PropertiesPanelBase { } public async setShape(args: { width: string; height: string }) { - await this.shapeProperties.setShape({ width: args.width, height: args.height }); + await this.shapeProperties.setShape({ ...args }); } public async setPosition(args: { x: string; y: string }) { - await this.shapeProperties.setPosition({ x: args.x, y: args.y }); + await this.shapeProperties.setPosition({ ...args }); } public async getShape() { @@ -101,10 +101,10 @@ export class TextAnnotationProperties extends PropertiesPanelBase { } public async setFillColor(args: { color: string }) { - await this.shapeProperties.setFillColor({ color: args.color }); + await this.shapeProperties.setFillColor({ ...args }); } public async setStrokeColor(args: { color: string }) { - await this.shapeProperties.setStrokeColor({ color: args.color }); + await this.shapeProperties.setStrokeColor({ ...args }); } }