repo_name
string
dataset
string
owner
string
lang
string
func_name
string
code
string
docstring
string
url
string
sha
string
design-studio
github_2023
Tiledesk
typescript
CdsActionReplySettingsComponent.ngOnDestroy
ngOnDestroy() { if (this.subscriptionChangedConnector) { this.subscriptionChangedConnector.unsubscribe(); } }
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-settings/cds-action-reply-settings.component.ts#L73-L77
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplySettingsComponent.initializeConnector
initializeConnector() { this.idIntentSelected = this.idAction.split('/')[0]; this.idConnectorNoInput = this.idAction + '/noInput'; this.idConnectorNoMatch = this.idAction + '/noMatch'; this.listOfIntents = this.intentService.getListOfIntents(); this.checkConnectionStatus(); this.checkButtonsInCo...
// }
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-settings/cds-action-reply-settings.component.ts#L83-L90
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplySettingsComponent.checkButtonsInCommands
private checkButtonsInCommands(){ let commands = this.action.attributes.commands if(commands && commands.length > 0){ let messages = commands.filter(command => command.type === TYPE_COMMAND.MESSAGE) messages.forEach(el => { if(!el || !el.message || !el.message.attributes){ this.isC...
// PRIVATE FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-settings/cds-action-reply-settings.component.ts#L182-L205
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplySettingsComponent.onClickDelayTime
onClickDelayTime(opened: boolean){ // this.canShowFilter = !opened; }
/** onClickDelayTime */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-settings/cds-action-reply-settings.component.ts#L210-L212
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplySettingsComponent.onChangeDelayTime
onChangeDelayTime(value:number){ this.action.noInputTimeout = value*1000; // this.canShowFilter = true; this.changeActionReply.emit(); }
/** onChangeDelayTime */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-settings/cds-action-reply-settings.component.ts#L215-L219
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplySettingsComponent.onChangeTextarea
onChangeTextarea(text:string, key: string) { if(!this.previewMode){ this.action[key] = text; // this.changeActionReply.emit(); } }
/** onChangeTextarea */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-settings/cds-action-reply-settings.component.ts#L222-L227
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplyTextComponent.ngOnInit
ngOnInit(): void { this.subscriptionChangedConnector = this.intentService.isChangedConnector$.subscribe((connector: any) => { this.connector = connector; this.updateConnector(); }); this.initialize(); }
// SYSTEM FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-text/cds-action-reply-text.component.ts#L61-L67
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplyTextComponent.ngOnDestroy
ngOnDestroy() { if (this.subscriptionChangedConnector) { this.subscriptionChangedConnector.unsubscribe(); } }
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-text/cds-action-reply-text.component.ts#L70-L74
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplyTextComponent.initialize
private initialize(){ this.delayTime = (this.wait && this.wait.time || this.wait.time === 0)? (this.wait.time/1000) : 500/1000; this.checkButtons(); this.buttons = this.intentService.patchButtons(this.buttons, this.idAction); this.idIntent = this.idAction.split('/')[0]; if(this.response && this.res...
// PRIVATE FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-text/cds-action-reply-text.component.ts#L82-L90
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplyTextComponent.updateConnector
private updateConnector(){ try { const array = this.connector.fromId.split("/"); const idButton = array[array.length - 1]; const idConnector = this.idAction+'/'+idButton; const buttonChanged = this.buttons.find(obj => obj.uid === idButton); if(idConnector === this.connector.from...
// }
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-text/cds-action-reply-text.component.ts#L124-L162
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplyTextComponent.onClickDelayTime
onClickDelayTime(opened: boolean){ this.canShowFilter = !opened; }
/** onClickDelayTime */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-text/cds-action-reply-text.component.ts#L169-L171
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplyTextComponent.onChangeDelayTime
onChangeDelayTime(value:number){ this.delayTime = value; this.wait.time = value*1000; this.canShowFilter = true; this.changeActionReply.emit(); }
/** onChangeDelayTime */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-text/cds-action-reply-text.component.ts#L174-L179
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplyTextComponent.onChangeExpression
onChangeExpression(expression: Expression){ this.response._tdJSONCondition = expression; this.filterConditionExist = expression && expression.conditions.length > 0? true : false; this.changeActionReply.emit(); }
/** onChangeExpression */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-text/cds-action-reply-text.component.ts#L182-L186
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplyTextComponent.onDeleteActionReply
onDeleteActionReply(){ this.deleteActionReply.emit(this.index); }
/** onDeleteActionReply */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-text/cds-action-reply-text.component.ts#L189-L191
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplyTextComponent.onMoveUpResponse
onMoveUpResponse(){ this.moveUpResponse.emit(this.index); }
/** onMoveUpResponse */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-text/cds-action-reply-text.component.ts#L194-L196
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplyTextComponent.onMoveDownResponse
onMoveDownResponse(){ this.moveDownResponse.emit(this.index); }
/** onMoveDownResponse */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-text/cds-action-reply-text.component.ts#L199-L201
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplyTextComponent.onChangeTextarea
onChangeTextarea(text:string) { if(!this.previewMode){ this.response.text = text; // this.changeActionReply.emit(); } }
/** onChangeTextarea */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-text/cds-action-reply-text.component.ts#L204-L209
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplyTextComponent.onOpenButtonPanel
onOpenButtonPanel(button){ this.logger.log('[ACTION REPLY TEXT] onOpenButtonPanel ', button, this.response.attributes.attachment.buttons); this.openButtonPanel.emit(button); }
/** onOpenButtonPanel */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-text/cds-action-reply-text.component.ts#L222-L225
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplyTextComponent.onButtonControl
onButtonControl(action: string, index: number ){ switch(action){ case 'delete': /** onDeleteButton */ this.deleteButton.emit({index: index, buttons: this.buttons}); break; case 'moveLeft': break; case 'moveRight': break; case 'new': /** onCreateNewButton */ ...
/** onButtonControl */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-text/cds-action-reply-text.component.ts#L228-L241
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionReplyTextComponent.dropButtons
dropButtons(event: CdkDragDrop<string[]>) { moveItemInArray(this.buttons, event.previousIndex, event.currentIndex); this.connectorService.updateConnector(this.idIntent); this.changeActionReply.emit(); }
/** dropButtons */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-reply/elements/cds-action-reply-text/cds-action-reply-text.component.ts#L244-L248
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionSendWhatsappComponent.ngOnDestroy
ngOnDestroy() { if (this.subscriptionChangedConnector) { this.subscriptionChangedConnector.unsubscribe(); } }
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-send-whatsapp/cds-action-send-whatsapp.component.ts#L71-L75
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsWhatsappReceiverComponent.checkParameters
checkParameters() { // let text_header_result = this.header_params.find(p => !p.text || p.text == ''); let media_header_result = this.header_params.find(p => (p.text == '') || (p.image && (!p.image.link || p.image.link == '')) || (p.document && (!p.document.link || p.document.link == '')) || (p.location && (!p...
// evaluate saving partial objects
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-send-whatsapp/whatsapp-receiver/whatsapp-receiver.component.ts#L282-L301
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionWebRequestV2Component.ngOnInit
ngOnInit(): void { this.logger.debug("[ACTION-WEB-REQUEST-v2] action detail: ", this.action); this.subscriptionChangedConnector = this.intentService.isChangedConnector$.subscribe((connector: any) => { this.logger.debug('[ACTION-WEB-REQUEST-v2] isChangedConnector -->', connector); let connectorId = t...
// SYSTEM FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-web-request-v2/cds-action-web-request-v2.component.ts#L76-L87
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionWebRequestV2Component.ngOnDestroy
ngOnDestroy() { if (this.subscriptionChangedConnector) { this.subscriptionChangedConnector.unsubscribe(); } }
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-web-request-v2/cds-action-web-request-v2.component.ts#L90-L94
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionWebRequestV2Component.checkConnectionStatus
private checkConnectionStatus(){ if(this.action.trueIntent){ this.isConnectedTrue = true; const posId = this.action.trueIntent.indexOf("#"); if (posId !== -1) { const toId = this.action.trueIntent.slice(posId+1); this.idConnectionTrue = this.idConnectorTrue+"/"+toId; } } ...
// }
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-web-request-v2/cds-action-web-request-v2.component.ts#L121-L144
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionWebRequestV2Component.initialize
private initialize(){ this.initializeAttributes(); this.methods = Object.keys(TYPE_METHOD_REQUEST).map((key, index) => { return { label: key, value: key } }) this.jsonHeader = this.action.headersString this.bodyOptions.forEach(el => { el.value ===this.action.bodyType? el.checked= true: el.chec...
// CUSTOM FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-web-request-v2/cds-action-web-request-v2.component.ts#L194-L220
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionWebRequestV2Component.onChangeMethodButton
onChangeMethodButton(e: {label: string, value: string}){ this.action.method = e.value; this.updateAndSaveAction.emit({type: TYPE_UPDATE_ACTION.ACTION, element: this.action}); }
// EVENT FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-web-request-v2/cds-action-web-request-v2.component.ts#L265-L268
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionWebRequestComponent.ngOnInit
ngOnInit(): void { // on init }
// SYSTEM FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-web-request/cds-action-web-request.component.ts#L39-L41
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionWebRequestComponent.initialize
private initialize(){ this.methods = Object.keys(TYPE_METHOD_REQUEST).map((key, index) => { return { label: key, value: key } }) this.jsonHeader = this.action.headersString; this.jsonIsValid = this.isValidJson(this.action.jsonBody); if(this.jsonIsValid){ this.jsonBody = this.action.jsonB...
// CUSTOM FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-web-request/cds-action-web-request.component.ts#L53-L64
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionWebRequestComponent.onChangeMethodButton
onChangeMethodButton(e: {label: string, value: string}){ this.action.method = e.value; this.updateAndSaveAction.emit() }
// EVENT FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/cds-action-web-request/cds-action-web-request.component.ts#L98-L101
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsFormComponent.generateJsonIntentForm
generateJsonIntentForm() { this.logger.log('[FORM-COMP] generateJsonIntentForm') if (this.selectedFormId && !this.selectedForm) { this.getFieldFromId(this.selectedFormId); } this.logger.log('[FORM-COMP] selectedForm ', this.selectedForm) if (this.selectedForm) { this.selectedForm.to_JSON...
/** CREATE NEW FORM */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/form/form.component.ts#L165-L192
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsFormComponent.confirmDeleteModal
confirmDeleteModal(index: string) { this.logger.log('[FORM-COMP] confirmDeleteModal index ', index) this.logger.log('[FORM-COMP] confirmDeleteModal this.idForm ', this.idForm) if (index === this.idForm) { // if (index === this.selectedFormId) { this.deleteForm(); } else { this.display...
/** Event modal confirm delete field */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/form/form.component.ts#L326-L346
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsFormComponent.closeDeleteModal
closeDeleteModal(i: number) { this.displayMODAL = false; }
/** Event modal close delete field */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/form/form.component.ts#L396-L398
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsFormComponent.eventAddField
eventAddField() { this.displayEditForm = false; this.selectedField = null; this.displayAddForm = true; this.openAddEditForm(); this.logger.log('[FORM-COMP] eventAddField displayEditForm ', this.displayEditForm) this.logger.log('[FORM-COMP] eventAddField selectedField ', this.selectedField) t...
/** Event add field */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/form/form.component.ts#L401-L409
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsFormComponent.eventEditField
eventEditField(i: number) { this.closeAddEditForm(); setTimeout(() => { this.selectedField = this.fields[i]; this.displayAddForm = false; this.displayEditForm = true; this.openAddEditForm(); }, 300); this.logger.log('[FORM-COMP] eventEditField selectedField ', this.selectedField)...
/** Event edit field */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/form/form.component.ts#L412-L423
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsFormComponent.closeAddEditForm
closeAddEditForm() { this.displayAddForm = false; this.displayEditForm = false; this.displayTilebotAddEditForm = true; this.scrollToTop(); this.logger.log('[FORM-COMP] closeAddEditForm displayAddForm ', this.displayAddForm) this.logger.log('[FORM-COMP] closeAddEditForm displayEditForm ', this.di...
/** Event close add/edit form accordion */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/form/form.component.ts#L436-L444
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsFormComponent.saveAddEditForm
saveAddEditForm(event: any) { const objIndex = this.fields.findIndex(obj => obj.name === event.name); if (objIndex === -1) { this.fields.push(event); } else { this.fields.splice(objIndex, 1, event); } if (this.intentForm) { this.intentForm.fields = this.fields; this.logger.lo...
/** Event SAVE field */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/form/form.component.ts#L447-L462
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsFormComponent.onChangedFormFields
onChangedFormFields(event:any){ try { const objIndex = this.fields.findIndex(obj => obj.name === event.name); if (objIndex === -1) { this.fields.push(event); } else { this.fields.splice(objIndex, 1, event); } if (this.intentForm) { this.intentForm.fields = this....
/** Events of FORM EDIT ADD */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/form/form.component.ts#L491-L509
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
FormEditAddComponent.onChangeParameterName
onChangeParameterName(parameterName) { parameterName.toString(); this.fieldName = parameterName.replace(/[^A-Z0-9_]+/ig, ""); }
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/form/form-edit-add/form-edit-add.component.ts#L198-L201
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
FormEditAddComponent.save
save() { // this.logger.log('[TILEBOT-EDIT-ADD] save ') if (this.checkFields()) { // this.displayInfoMessage = false; this.showForm = false; this.field.name = this.fieldName ? this.fieldName : ''; this.field.type = this.fieldType ? this.fieldType.toUpperCase() : null; this.field.re...
// }
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/form/form-edit-add/form-edit-add.component.ts#L214-L236
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
FormEditAddComponent.onSelectedAttributeParam
onSelectedAttributeParam(variableSelected: {name: string, value: string}){ this.hasSelectedVariable = true; this.fieldName = variableSelected.value; this.field.name = variableSelected.value; if(this.displayAddForm === false){ this.changedFormFields.emit(this.field); this.logger.log('onSelect...
/** START EVENTS */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/form/form-edit-add/form-edit-add.component.ts#L260-L268
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
FormEditAddComponent.onChangeValidationType
onChangeValidationType(event: {label: string, value: string}) { this.field.type = event.value; this.setRegex(); if(this.displayAddForm === false){ this.changedFormFields.emit(this.field); } }
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/form/form-edit-add/form-edit-add.component.ts#L301-L307
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
FormFieldComponent.deleteFieldModal
deleteFieldModal(index:number) { this.openDeleteFieldModal.emit(index); }
/** Event modal open delete field */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/form/form-field/form-field.component.ts#L44-L46
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
FormFieldComponent.editField
editField(index:number){ this.selectedObjectId = index; this.eventEditField.emit(index); }
/** Event edit field */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/form/form-field/form-field.component.ts#L49-L52
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsQuestionComponent.trackByIndex
trackByIndex(index: number, obj: any): any { return index; }
// serve per mantenere il focus nel campo input mentre si edita un valore
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list/question/question.component.ts#L80-L82
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsAddActionMenuComponent.constructor
constructor(public translate: TranslateService) { }
// @Output() clickedOutOfAddActionMenu= new EventEmitter();
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/shared/cds-add-action-menu/cds-add-action-menu.component.ts#L26-L26
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsAddActionMenuComponent.onSearchAction
onSearchAction(searchText) { searchText = searchText.toLocaleLowerCase() if (!searchText) { this.filterMenuItemsList = this.menuItemsList } this.filterMenuItemsList = this._filter(searchText, this.menuItemsList) }
// }
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/shared/cds-add-action-menu/cds-add-action-menu.component.ts#L94-L101
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsAddActionMenuComponent.onAddActionFromActionMenu
onAddActionFromActionMenu(item){ let event = { 'type': item.value.type } this.actionToSearch = undefined; this.filterMenuItemsList = this.menuItemsList; this.addActionFromActionMenu.emit(event); }
// return it.toLocaleLowerCase().includes(searchText);
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/shared/cds-add-action-menu/cds-add-action-menu.component.ts#L110-L117
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSAudioUploadComponent.ngOnInit
ngOnInit(): void { this.initializeApp(); this.user = this.tiledeskAuthService.getCurrentUser(); }
// SYSTEM FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/audio-upload/audio-upload.component.ts#L49-L52
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSAudioUploadComponent.detectFiles
detectFiles(event: any){ this.logger.debug('[IMAGE-UPLOAD] detectFiles: ', event); if (event) { this.selectedFiles = event.target.files; this.logger.debug('[IMAGE-UPLOAD] AppComponent:detectFiles::selectedFiles', this.selectedFiles); // this.onAttachmentButtonClicked.emit(this.selectedFiles) ...
// }
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/audio-upload/audio-upload.component.ts#L132-L206
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSAudioUploadComponent.setImageSize
private setImageSize(uploadedFiles){ let fileReader = new FileReader(); fileReader.readAsDataURL(uploadedFiles) fileReader.onload = () => { // when file has loaded var img = new Image(); img.src = fileReader.result.toString() img.onload = () => { this.logger.log('imageeee', img.w...
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/audio-upload/audio-upload.component.ts#L301-L328
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSAudioUploadComponent.readAsDataURL
readAsDataURL(e: any) { this.logger.log('eventtt', e) let dataFiles = " " if (e.type === 'change') { dataFiles = e.target.files; } else if (e.type === 'drop') { dataFiles = e.dataTransfer.files } else { dataFiles = e.files } // const attributes = { files: dataFiles, enableB...
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/audio-upload/audio-upload.component.ts#L332-L401
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSAudioUploadComponent.drop
drop(ev: any) { ev.preventDefault(); ev.stopPropagation(); const fileList = ev.dataTransfer.files this.isHovering = false if (fileList.length > 0) { const file: File = fileList[0]; var mimeType = fileList[0].type; const canUploadFile = checkAcceptedFile(mimeType, '.wav') if(!...
// DROP (WHEN THE FILE IS RELEASED ON THE DROP ZONE)
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/audio-upload/audio-upload.component.ts#L422-L438
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSAudioUploadComponent.allowDrop
allowDrop(ev: any) { ev.preventDefault() ev.stopPropagation() this.isHovering = true }
// DRAG OVER (WHEN HOVER OVER ON THE "DROP ZONE")
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/audio-upload/audio-upload.component.ts#L446-L450
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSAudioUploadComponent.drag
drag(ev: any) { ev.preventDefault(); ev.stopPropagation() this.isHovering = false }
// DRAG LEAVE (WHEN LEAVE FROM THE DROP ZONE)
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/audio-upload/audio-upload.component.ts#L453-L457
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSDelaySliderComponent.formatLabel
formatLabel(value: number): string { this.delayTime = value; return `${value}`+ 's'; }
// EVENTS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/delay-slider/delay-slider.component.ts#L30-L33
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSDelayTextComponent.formatLabel
formatLabel(value: number): string { this.delayTime = value; const d = secondsToDhms(this.delayTime).getDays(); const h = secondsToDhms(this.delayTime).getHours(); const m = secondsToDhms(this.delayTime).getMinutes(); let number = this.delayTime let unit = 's' if(d > 0){ number = d;...
// EVENTS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/delay-text/delay-text.component.ts#L40-L61
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSElementFromUrlComponent.onCloseImagePanel
onCloseImagePanel(){ // this.showAddImage = false; }
// }
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/element-from-url/element-from-url.component.ts#L53-L55
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSElementFromUrlComponent.onChangeTextArea
onChangeTextArea(text:string) { this.pathElement = text; }
/** onChangeTextarea */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/element-from-url/element-from-url.component.ts#L67-L69
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
HeightSliderComponent.formatLabel
formatLabel(value: number): string { this.heightIframe = value; return `${value}`+ 'px'; }
// EVENTS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/height-slider/height-slider.component.ts#L30-L33
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSImageUploadComponent.ngOnInit
ngOnInit(): void { this.initializeApp(); this.user = this.tiledeskAuthService.getCurrentUser(); this.fileUploadAccept = filterImageMimeTypesAndExtensions(this.appConfigService.getConfig().fileUploadAccept).join(','); }
// SYSTEM FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/image-upload/image-upload.component.ts#L52-L56
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSImageUploadComponent.detectFiles
detectFiles(event: any){ this.logger.debug('[IMAGE-UPLOAD] detectFiles: ', event); if (event) { this.selectedFiles = event.target.files; this.logger.debug('[IMAGE-UPLOAD] AppComponent:detectFiles::selectedFiles', this.selectedFiles); // this.onAttachmentButtonClicked.emit(this.selectedFiles) ...
// }
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/image-upload/image-upload.component.ts#L136-L211
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSImageUploadComponent.setImageSize
private setImageSize(uploadedFiles){ let fileReader = new FileReader(); fileReader.readAsDataURL(uploadedFiles) fileReader.onload = () => { // when file has loaded var img = new Image(); img.src = fileReader.result.toString() img.onload = () => { this.logger.log('imageeee', img.w...
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/image-upload/image-upload.component.ts#L306-L333
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSImageUploadComponent.readAsDataURL
readAsDataURL(e: any) { this.logger.log('eventtt', e) let dataFiles = " " if (e.type === 'change') { dataFiles = e.target.files; } else if (e.type === 'drop') { dataFiles = e.dataTransfer.files } else { dataFiles = e.files } // const attributes = { files: dataFiles, enableB...
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/image-upload/image-upload.component.ts#L337-L406
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSImageUploadComponent.drop
drop(ev: any) { ev.preventDefault(); ev.stopPropagation(); const fileList = ev.dataTransfer.files this.isHovering = false if (fileList.length > 0) { const file: File = fileList[0]; var mimeType = fileList[0].type; // const isAccepted = this.checkAcceptedFile(mimeType); const ...
// DROP (WHEN THE FILE IS RELEASED ON THE DROP ZONE)
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/image-upload/image-upload.component.ts#L427-L444
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSImageUploadComponent.allowDrop
allowDrop(ev: any) { ev.preventDefault() ev.stopPropagation() this.isHovering = true }
// DRAG OVER (WHEN HOVER OVER ON THE "DROP ZONE")
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/image-upload/image-upload.component.ts#L452-L456
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSImageUploadComponent.drag
drag(ev: any) { ev.preventDefault() ev.stopPropagation() this.isHovering = false }
// DRAG LEAVE (WHEN LEAVE FROM THE DROP ZONE)
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/image-upload/image-upload.component.ts#L459-L463
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSTextareaComponent.onClickTextareaOpenSetAttributePopover
onClickTextareaOpenSetAttributePopover(){ this.logger.log('onClickTextareaOpenSetAttributePopover', this.readonly, this.setAttributeBtn); if(this.readonly === true && this.setAttributeBtn == true){ this.addVariable.toggle(); this.openSetAttributePopover(); } }
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/base-elements/textarea/textarea.component.ts#L118-L124
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsIntentComponent.addEventListener
addEventListener() { let that = this; document.addEventListener( "connector-release-on-intent", (e: CustomEvent) => { // this.logger.log('[CDS-INTENT] connector-release-on-intent e ', e) // this.logger.log('[CDS-INTENT] Connector released on intent - id intent', e.detail.toId) // t...
// ---------------------------------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts#L316-L374
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsIntentComponent.setIntentSelected
private setIntentSelected() { this.listOfActions = null; this.formSize = 0; this.questionCount = 0; try { if (this.intent) { this.logger.log("setIntentSelected:: ", this.intent.actions); // this.patchAllActionsId(); this.patchAttributesPosition(); // this.listOfActi...
/** CUSTOM FUNCTIONS */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts#L380-L411
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsIntentComponent.patchAttributesPosition
private patchAttributesPosition() { if (!this.intent.attributes || !this.intent.attributes.position) { this.intent['attributes'] = {}; } if (!this.intent.attributes.position) { this.intent.attributes['position'] = { 'x': 0, 'y': 0 }; } }
/** * patchAttributesPosition * retrocompatibility patch. */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts#L436-L443
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsIntentComponent.getActionParams
getActionParams(action) { const enumKeys = Object.keys(TYPE_ACTION); let keyAction = ''; try { for (const key of enumKeys) { if (TYPE_ACTION[key] === action._tdActionType) { keyAction = key; return ACTIONS_LIST[keyAction]; } } return; } catch (error)...
/** getActionParams * Get action parameters from a map to create the header (title, icon) * */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts#L449-L464
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsIntentComponent.onSelectAction
onSelectAction(action, index: number, idAction) { this.logger.log('[CDS-INTENT] onActionSelected action: ', action); this.logger.log('[CDS-INTENT] onActionSelected index: ', index); this.logger.log('[CDS-INTENT] onActionSelected idAction: ', idAction); this.elementTypeSelected = idAction; // this.in...
/** EVENTS */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts#L479-L487
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsIntentComponent.onSelectQuestion
onSelectQuestion(elementSelected) { this.logger.log('[CDS-INTENT] onSelectQuestion-->', elementSelected, this.intent.question) this.elementTypeSelected = elementSelected; this.intentService.setIntentSelected(this.intent.intent_id) // this.isIntentElementSelected = true; this.questionSelected.emit(th...
// }
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts#L495-L501
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsIntentComponent.onKeydown
onKeydown(event) { // this.logger.log('[CDS-INTENT] onKeydown: ', event); if (event.key === 'Backspace' || event.key === 'Escape' || event.key === 'Canc') { this.intentService.deleteSelectedAction(); } }
/** * onKeydown * delete selected action by keydown backspace * */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts#L531-L536
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsIntentComponent.onDragStarted
onDragStarted(event, previousIntentId, index) { this.controllerService.closeActionDetailPanel(); this.logger.log('[CDS-INTENT] onDragStarted event ', event, 'previousIntentId ', previousIntentId); this.logger.log('[CDS-INTENT] onDragStarted index ', index); this.intentService.setPreviousIntentId(previou...
/** !!! IMPORTANT * when the drag of an action starts, I save the starting intent. * Useful in case I move an action between different intents * */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts#L555-L606
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsIntentComponent.onDragEnded
onDragEnded(event, index) { this.logger.log('[CDS-INTENT] onDragEnded: ', event, this.intent.intent_id); this.isDragging = false; this.connectorService.updateConnector(this.intent.intent_id); // const previousIntentId = this.intentService.previousIntentId; // if(previousIntentId){ // this...
/** onDragEnded * get the action moved and update its connectors */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts#L612-L623
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsIntentComponent.canEnterDropList
canEnterDropList(action: any) { return (item: CdkDrag<any>) => { // this.logger.log('itemmmmmmmm', item.data, action) return true } }
/** Predicate function that only allows type='intent' to be dropped into a list. */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts#L627-L632
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsIntentComponent.onDropAction
async onDropAction(event: CdkDragDrop<string[]>) { this.logger.log('[CDS-INTENT] onDropAction: ', event, this.intent.actions); // this.logger.log('event:', event, 'previousContainer:', event.previousContainer, 'event.container:', event.container); this.controllerService.closeAllPanels(); this.intentServ...
/** on Drop Action check the three possible cases: * chaimata quando muovo la action in un intent * 1 - moving action in the same intent * 2 - moving action from another intent * 3 - moving new action in intent from panel elements */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts#L644-L675
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsIntentComponent.onUpdateAndSaveAction
public async onUpdateAndSaveAction(object) { this.logger.log('[CDS-INTENT] onUpdateAndSaveAction::::', object); let connector = null; // if(object && object.type && object.type === 'connector'){ // connector = object.element; // this.setActionIntent(); // } else if(object && object.type && o...
/** onUpdateAndSaveAction: * function called by all actions in @output whenever they are modified! * called when the connector is created or deleted * OR * called when the action is modified * */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts#L684-L704
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsIntentComponent.openActionMenu
openActionMenu(intent: any, calleBy: string) { this.logger.log('[CDS-INTENT] openActionMenu > intent ', intent) this.logger.log('[CDS-INTENT] openActionMenu > calleBy ', calleBy) const openActionMenuElm = this.openActionMenuBtnRef.nativeElement.getBoundingClientRect() let xOffSet = openActionMenuElm.wid...
// }
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts#L735-L750
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsIntentComponent.onOptionIntentControlClicked
onOptionIntentControlClicked(event: 'webhook' | 'delete' | 'test' | 'copy'){ switch(event){ case 'webhook': this.toggleIntentWebhook(this.intent); break; case 'delete': this.onDeleteIntent(this.intent) break; case 'test': this.openTestSiteInPopupWindow() ...
/** ****************************** * intent controls options: START * ****************************** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/cds-intent.component.ts#L755-L770
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
PanelIntentHeaderComponent.ngOnInit
ngOnInit(): void { this.initialize(); }
// SYSTEM FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/panel-intent-header/panel-intent-header.component.ts#L42-L44
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
PanelIntentHeaderComponent.initialize
private initialize(){ this.listOfIntents = this.intentService.listOfIntents; if (this.intent.intent_display_name === undefined && this.intent.intent_display_name.trim().length === 0) { this.intentService.setDisplayName(); } else { this.intentName = this.intent.intent_display_name; } this...
/** initialize */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/panel-intent-header/panel-intent-header.component.ts#L52-L61
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
PanelIntentHeaderComponent.checkIntentNameMachRegex
private checkIntentNameMachRegex(intentname) { const regex = /^[ _0-9a-zA-Z]+$/ return regex.test(intentname); }
/** checkIntentNameMachRegex */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/panel-intent-header/panel-intent-header.component.ts#L68-L71
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
PanelIntentHeaderComponent.checkIntentName
private checkIntentName(name: string) { this.intentNameResult = true; this.intentNameAlreadyExist = false; if(!this.intentName || this.intentName.trim().length == 0 || this.intentName === preDisplayName) { this.logger.log("[PANEL-INTENT-HEADER] error 1"); this.intentNameResult = false; } ...
/** checkIntentName */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/panel-intent-header/panel-intent-header.component.ts#L74-L94
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
PanelIntentHeaderComponent.onSelectIntent
onSelectIntent(event){ this.logger.log("[PANEL-INTENT-HEADER] onSelectIntent",event, this.intent); // this.intentService.setIntentSelected(this.intent.intent_id); }
/******************* EVENT FUNCTIONS *******************/
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/panel-intent-header/panel-intent-header.component.ts#L100-L103
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
PanelIntentHeaderComponent.onMouseUpInput
onMouseUpInput(event){ this.logger.log("[PANEL-INTENT-HEADER] onMouseUpInput"); this.isFocused = true; this.myInput.nativeElement.focus(); }
/** onMouseUpInput */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/panel-intent-header/panel-intent-header.component.ts#L106-L110
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
PanelIntentHeaderComponent.onChangeIntentName
onChangeIntentName(event) { const result = this.checkIntentName(event); this.intent.intent_display_name = event.trim(); if(result){ this.intentName = event; // this.onSaveIntent(); // this.intentService.setIntentSelected(this.intent.intent_id); } }
/** onChangeIntentName */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/panel-intent-header/panel-intent-header.component.ts#L113-L121
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
PanelIntentHeaderComponent.onEnterButtonPressed
onEnterButtonPressed(event) { this.logger.log('[PANEL-INTENT-HEADER] onEnterButtonPressed Intent name: onEnterButtonPressed event', event) // // this.checkIntentName(this.intentName); // // this.onSaveIntent(); // event.target.blur() this.myInput.nativeElement.blur(); // this.intentService.selec...
/** ENTER KEYBOARD EVENT*/
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/panel-intent-header/panel-intent-header.component.ts#L132-L139
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
PanelIntentHeaderComponent.doubleClickFunction
doubleClickFunction(event){ this.logger.log("[PANEL-INTENT-HEADER] doubleClickFunction"); this.myInput.nativeElement.select(); // this.intentService.selectIntent(this.intent); }
/** doubleClickFunction */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/panel-intent-header/panel-intent-header.component.ts#L142-L146
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
PanelIntentHeaderComponent.onSaveIntent
onSaveIntent() { this.logger.log("[PANEL-INTENT-HEADER] SALVO!!!"); // this.intentService.setIntentSelected(this.intent.intent_id); this.intent.intent_display_name = this.intentName.trim(); this.intentService.changeIntentName(this.intent); }
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-intent/panel-intent-header/panel-intent-header.component.ts#L162-L167
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDetailPanelComponent.addEventListener
addEventListener() { document.addEventListener( "keydown", (e) => { // this.logger.log('[PANEL-INTENT-DETAIL] keydown ', e); var focusedElement = document.activeElement; if (focusedElement.tagName === 'TEXTAREA') { } }, false ); }
// ---------------------------------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-action-detail/cds-panel-action-detail.component.ts#L152-L161
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDetailPanelComponent.onUpdateFormIntentSelected
onUpdateFormIntentSelected($event){ this.elementSelected = $event; this.onSaveIntent() // this.logger.log("onUpdateFormIntentSelected:::: ", $event); }
// EVENT FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-action-detail/cds-panel-action-detail.component.ts#L174-L178
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDetailPanelComponent.onConnectorChange
onConnectorChange(type: 'create' | 'delete', idConnector: string, toIntentId: string){ const fromId = idConnector; let toId = ''; this.connectorService.updateConnectorAttributes(idConnector, null); switch(type){ case 'create': const posId = toIntentId.indexOf("#"); if (posId !== -1...
/** * onConnectorChange * @param type * @param idConnector * @param toIntentId * * IMPORTANTE: questa funzione deve SOLO aggiornare i connettori e NON deve salvare e NON deve aggiungere UNDO. */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-action-detail/cds-panel-action-detail.component.ts#L252-L269
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsPanelButtonConfigurationComponent.ngOnInit
ngOnInit(): void { // this.initialize(); }
// SYSTEM FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-button-configuration/cds-panel-button-configuration.component.ts#L63-L65
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsPanelButtonConfigurationComponent.setAttributesFromAction
private setAttributesFromAction(actionAndParameters) { let intent: any = {}; if (actionAndParameters === null) { return null; // invalid intent } if (actionAndParameters.trim().length === 0) { return null; // invalid intent } let parts = actionAndParameters.split("{"); if (parts....
// PRIVATE FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-button-configuration/cds-panel-button-configuration.component.ts#L116-L144
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsPanelButtonConfigurationComponent.checkButtonLabel
private checkButtonLabel(): boolean { try { if (!this.buttonLabel || this.buttonLabel.length === 0) { this.buttonLabel = ''; } if(this.button){ this.button.value = this.buttonLabel; } } catch (error) { this.logger.error('error: ', error); } return true; }
// }
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-button-configuration/cds-panel-button-configuration.component.ts#L156-L168
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsPanelButtonConfigurationComponent.onCloseButtonPanel
onCloseButtonPanel() { this.logger.log('[CDS-PANEL-BTN-CONFIG] onCloseButtonPanel' ) this.controllerService.closeButtonPanel(); // this.closeButtonPanel.emit(); }
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-button-configuration/cds-panel-button-configuration.component.ts#L216-L220
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsPanelButtonConfigurationComponent.onChangeTitle
onChangeTitle(text: string) { this.buttonLabel = text; this.checkButtonLabel(); this.checkTypeButton(); // this.checkAndSaveButton(); }
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-button-configuration/cds-panel-button-configuration.component.ts#L223-L228
297d30da01d98a1299e7197eb88cff5b2390a386