From eeb0e9a191b85e6caaf4a0df0993d927374f67f7 Mon Sep 17 00:00:00 2001 From: Dario De Pascalis Date: Thu, 9 Nov 2023 12:21:55 +0100 Subject: [PATCH 1/4] fix grafici --- .../cds-intent/cds-intent.component.ts | 5 +++++ ...ds-panel-button-configuration.component.ts | 3 +++ src/styles.scss | 19 +++++++++++++++---- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts index 533b6817..79fd6db6 100644 --- a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts +++ b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts @@ -674,6 +674,7 @@ export class CdsIntentComponent implements OnInit, OnDestroy, OnChanges { * called when the action is modified * */ public async onUpdateAndSaveAction(object) { + console.log('[CDS-INTENT] onUpdateAndSaveAction::::', object); let connector = null; if(object && object.type && object.type === 'connector'){ connector = object.element; @@ -682,6 +683,10 @@ export class CdsIntentComponent implements OnInit, OnDestroy, OnChanges { if(action && action._tdActionId){ replaceItemInArrayForKey('_tdActionId', this.intent.actions, action); } + setTimeout(()=> { + // ATTENZIONE!!! trovare il modo di refreshare i connettori SOLO quando la action viene eliminata fisicamente dallo stage!!! + this.connectorService.updateConnector(this.intent.intent_id); + }, 0); } this.setActionIntentInListOfActions(); // console.log('[CDS-INTENT] onUpdateAndSaveAction:::: ', object, this.intent, this.intent.actions); diff --git a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-button-configuration/cds-panel-button-configuration.component.ts b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-button-configuration/cds-panel-button-configuration.component.ts index b296fd49..92b4349e 100644 --- a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-button-configuration/cds-panel-button-configuration.component.ts +++ b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-button-configuration/cds-panel-button-configuration.component.ts @@ -207,6 +207,7 @@ export class CdsPanelButtonConfigurationComponent implements OnInit { let checkLabel = this.checkButtonLabel(); let checkType = this.checkTypeButton(); console.log('checkAndSaveButton: ', checkLabel, checkType); + if (checkLabel && checkType) { this.saveButton.emit(this.button); } @@ -224,6 +225,8 @@ export class CdsPanelButtonConfigurationComponent implements OnInit { /** */ onChangeTitle(text: string) { this.buttonLabel = text; + this.checkButtonLabel(); + this.checkTypeButton(); // this.checkAndSaveButton(); } diff --git a/src/styles.scss b/src/styles.scss index 049d851d..785ed24c 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -3,15 +3,26 @@ .isLast{ - + .connector { + right: -32px; + top: calc(50% - 10px); + } + .connector .point-connector { + width: 10px; + height: 10px; + border: 0; + } .connector .point-connector-empty { border: 1px solid; - border-color: rgba(0, 0, 0, 0.5); - width: 12px; - height: 12px; + border-color: #d2d2d2; background: #ffffff; + width: 10px; + height: 10px; } .connector .point-connector-empty::before { border: 0px; } + .connector .point-connector::before { + border: 0px; + } } \ No newline at end of file From 6724e2f24d4710f216f8dc6dbe6ea159bf3eeac7 Mon Sep 17 00:00:00 2001 From: Dario De Pascalis Date: Thu, 9 Nov 2023 15:46:53 +0100 Subject: [PATCH 2/4] fixed graphics on the intent connector --- .../cds-dashboard/cds-canvas/cds-canvas.component.scss | 6 ++++-- .../cds-canvas/cds-intent/cds-intent.component.html | 2 +- .../cds-canvas/cds-intent/cds-intent.component.scss | 6 ++++-- src/assets/js/tiledesk-connectors.js | 6 +++--- src/styles.scss | 9 ++++++--- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.scss b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.scss index 91719911..1415718f 100644 --- a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.scss +++ b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.scss @@ -50,8 +50,10 @@ $toogle-sidebar-width: 22px; } .tds_connector { - stroke: black; - stroke-width: 2px; + // stroke: black; + // stroke-width: 2px; + stroke: #b1b1b7; + stroke-width: 3px; } .tds_connector_over { diff --git a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.html b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.html index 5a8530ca..a7c3a5c3 100644 --- a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.html +++ b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.html @@ -248,7 +248,7 @@ - diff --git a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.scss b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.scss index 6ded66b4..b9573512 100644 --- a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.scss +++ b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.scss @@ -307,8 +307,10 @@ .last-action-intent { display: block; float: inline-end; - margin: 6px -12px 0 0; - padding: 0 24px 0 0; + // margin: 6px -12px 0 0; + // padding: 0 24px 0 0; + margin: 6px 0 0 0; + padding: 0; } /* Btn add action /* --------------------------------- */ diff --git a/src/assets/js/tiledesk-connectors.js b/src/assets/js/tiledesk-connectors.js index 87cd0c59..692b8166 100644 --- a/src/assets/js/tiledesk-connectors.js +++ b/src/assets/js/tiledesk-connectors.js @@ -20,7 +20,7 @@ export class TiledeskConnectors { "connector_draft": "tds_connector_draft", } this.colors = { - "black": "black", + "black": "#b1b1b7", "gray": "gray", "blue": "#3ea9f5" } @@ -497,8 +497,8 @@ export class TiledeskConnectors { const gElement = document.createElementNS("http://www.w3.org/2000/svg", "g"); gElement.id = this.svgConnectorsId; gElement.setAttribute("fill", "white"); - gElement.setAttribute("stroke", "black"); - gElement.setAttribute("stroke-width", "2"); + gElement.setAttribute("stroke", this.colors['black']); + gElement.setAttribute("stroke-width", "3"); svgContainer.appendChild(gElement); // Add the `` come figlio di diff --git a/src/styles.scss b/src/styles.scss index 785ed24c..7ca80b8d 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -4,17 +4,20 @@ .isLast{ .connector { - right: -32px; + right: -22px; top: calc(50% - 10px); } .connector .point-connector { + // background: #e4e4e7; + border: 0px solid; + // border-color: rgba(0,0,0,.12); + // background: #b1b1b7; width: 10px; height: 10px; - border: 0; } .connector .point-connector-empty { border: 1px solid; - border-color: #d2d2d2; + border-color: #00000061; background: #ffffff; width: 10px; height: 10px; From e55689e69e35447534d9dd5ca9f56e8ac34e74e8 Mon Sep 17 00:00:00 2001 From: Dario De Pascalis Date: Thu, 9 Nov 2023 16:10:40 +0100 Subject: [PATCH 3/4] deleted connector in cds-action-capture-user-reply --- .../cds-action-capture-user-reply.component.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-capture-user-reply/cds-action-capture-user-reply.component.html b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-capture-user-reply/cds-action-capture-user-reply.component.html index 2c4a836f..db836ee9 100644 --- a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-capture-user-reply/cds-action-capture-user-reply.component.html +++ b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-capture-user-reply/cds-action-capture-user-reply.component.html @@ -27,8 +27,8 @@ {{ action?.assignResultTo }} - - @@ -58,7 +58,7 @@ -
+
From 6942196dcaa58540bdc466a97677e1ce799db449 Mon Sep 17 00:00:00 2001 From: Dario De Pascalis Date: Thu, 9 Nov 2023 16:43:02 +0100 Subject: [PATCH 4/4] fix css --- .../cds-action-intent.component.scss | 4 ++-- .../cds-canvas/cds-canvas.component.ts | 4 ++-- .../cds-canvas/cds-intent/cds-intent.component.scss | 2 +- src/styles.scss | 13 +++++++++++-- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-intent/cds-action-intent.component.scss b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-intent/cds-action-intent.component.scss index a0962259..8f9d5910 100644 --- a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-intent/cds-action-intent.component.scss +++ b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-intent/cds-action-intent.component.scss @@ -30,8 +30,8 @@ padding: 0px; min-height: 20px; .connector { - right: -22px; - top: calc(50% - 10px); + right: -24px; + top: calc(50% - 18px); } } &.isStart{ diff --git a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts index eb73d4c5..7ec50431 100644 --- a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts +++ b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts @@ -430,8 +430,8 @@ export class CdsCanvasComponent implements OnInit { // console.log("[CDS-CANVAS] connector-selected:", e, e.detail.mouse_pos); this.IS_OPEN_PANEL_CONNECTOR_MENU = true; this.mousePosition = e.detail.mouse_pos; - this.mousePosition.x -= 15; - this.mousePosition.y -= 15; + this.mousePosition.x -= -10; + this.mousePosition.y -= 25; this.connectorSelected = e.detail.connector; // this.IS_OPEN_ADD_ACTIONS_MENU = true; // this.positionFloatMenu = e.detail.mouse_pos; diff --git a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.scss b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.scss index b9573512..eb628ba4 100644 --- a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.scss +++ b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.scss @@ -301,7 +301,7 @@ .footer-intent { cursor: pointer; margin-bottom: -10px; - min-height: 30px; + min-height: 18px; } .last-action-intent { diff --git a/src/styles.scss b/src/styles.scss index 7ca80b8d..87477eec 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -4,8 +4,16 @@ .isLast{ .connector { - right: -22px; - top: calc(50% - 10px); + right: -24px; + top: calc(50% - 18px); + &:hover{ + cursor: default; + .point-connector-empty { + background: #506493; + border: 0px; + cursor: copy; + } + } } .connector .point-connector { // background: #e4e4e7; @@ -22,6 +30,7 @@ width: 10px; height: 10px; } + .connector .point-connector-empty::before { border: 0px; }