repo_name
string
dataset
string
owner
string
lang
string
func_name
string
code
string
docstring
string
url
string
sha
string
rsbuild
github_2023
web-infra-dev
typescript
findRuleId
const findRuleId = (chain: RspackChain, defaultId: string) => { let id = defaultId; let index = 0; while (chain.module.rules.has(id)) { id = `${defaultId}-${++index}`; } return id; };
// Find a unique rule id for the sass rule,
https://github.com/web-infra-dev/rsbuild/blob/eabd31dfe3b5d99dcaae40c825152468798f864f/packages/plugin-sass/src/index.ts#L86-L93
eabd31dfe3b5d99dcaae40c825152468798f864f
rsbuild
github_2023
web-infra-dev
typescript
dedupeSvgoPlugins
const dedupeSvgoPlugins = (config: SvgoConfig): SvgoConfig => { if (!config.plugins) { return config; } let mergedPlugins: SvgoPluginConfig[] = []; for (const plugin of config.plugins) { if (typeof plugin === 'string') { const exist = mergedPlugins.find( (item) => item === plug...
/** * Dedupe SVGO plugins config. * * @example * Input: * { * plugins: [ * { name: 'preset-default', params: { foo: true }], * { name: 'preset-default', params: { bar: true }], * ] * } * Output: * { * plugins: [ * { name: 'preset-default', params: { foo: true, bar: true...
https://github.com/web-infra-dev/rsbuild/blob/eabd31dfe3b5d99dcaae40c825152468798f864f/packages/plugin-svgr/src/index.ts#L81-L128
eabd31dfe3b5d99dcaae40c825152468798f864f
rsbuild
github_2023
web-infra-dev
typescript
matchBundlerPlugin
const matchBundlerPlugin = async (pluginName: string, index?: number) => { const config = await unwrapConfig(index); return matchPlugin(config, pluginName) as BundlerPluginInstance; };
/** Match rspack/webpack plugin by constructor name. */
https://github.com/web-infra-dev/rsbuild/blob/eabd31dfe3b5d99dcaae40c825152468798f864f/scripts/test-helper/src/index.ts#L95-L99
eabd31dfe3b5d99dcaae40c825152468798f864f
weblangchain
github_2023
langchain-ai
typescript
getBaseRetriever
const getBaseRetriever = () => { return new TavilySearchAPIRetriever({ k: 6, includeRawContent: true, includeImages: true, }); };
/** * Override with your own retriever if desired. */
https://github.com/langchain-ai/weblangchain/blob/5812e83cd13efb58a26b05cc150284eddfc20e16/nextjs/app/api/chat/stream_log/route.ts#L79-L85
5812e83cd13efb58a26b05cc150284eddfc20e16
recce
github_2023
DataRecce
typescript
getScales
function getScales( { datasets, min = 0, max = 0, type, binEdges }: HistogramChartProps["data"], hideAxis = false ) { const isDatetime = type === "datetime"; const [base, current] = datasets; const maxCount = Math.max(...current.counts, ...base.counts); const newLabels = binEdges .map((v, i) => formatD...
/** * get x, y scales for histogram (dynamic based on datetime or not) */
https://github.com/DataRecce/recce/blob/ca01a92ba92bb7dcec0d1fe47aeed728024da667/js/src/components/charts/HistogramChart.tsx#L195-L260
ca01a92ba92bb7dcec0d1fe47aeed728024da667
recce
github_2023
DataRecce
typescript
formatDisplayedBinItem
function formatDisplayedBinItem(binEdges: number[], currentIndex: number) { const startEdge = binEdges[currentIndex]; const endEdge = binEdges[currentIndex + 1]; const formattedStart = formatAsAbbreviatedNumber(startEdge); const formattedEnd = formatAsAbbreviatedNumber(endEdge); const result = `${formattedS...
/** * @returns a formatted, abbreviated, histogram bin display text */
https://github.com/DataRecce/recce/blob/ca01a92ba92bb7dcec0d1fe47aeed728024da667/js/src/components/charts/HistogramChart.tsx#L264-L273
ca01a92ba92bb7dcec0d1fe47aeed728024da667
decode-formdata
github_2023
fabian-hiller
typescript
addArrayItemPaths
const addArrayItemPaths = (templateName: string, parentPath?: string) => { // Get präfix path and suffix paths const [präfixPath, ...suffixPaths] = templateName.split('.$.'); // Create path to array value const arrayPath = parentPath ? `${parentPath}.${präfixPath}` : präfixPath; // Get a...
// Create recusive function to add path of each array item
https://github.com/fabian-hiller/decode-formdata/blob/266b067a8b4315d82708cbe7916fb44efb720f8c/src/utils/getValuePaths/getValuePaths.ts#L18-L46
266b067a8b4315d82708cbe7916fb44efb720f8c
design-studio
github_2023
Tiledesk
typescript
AppComponent.signInWithCustomToken
signInWithCustomToken(token) { // this.isOnline = false; this.logger.log('[APP-COMP] SIGNINWITHCUSTOMTOKEN token', token) this.tiledeskAuthService.signInWithCustomToken(token).then((user: any) => { this.logger.log('[APP-COMP] SIGNINWITHCUSTOMTOKEN AUTLOGIN user', user) }).catch(error => { ...
/** NOT IN USE */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/app.component.ts#L121-L130
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
AppComponent.setLanguage
setLanguage(currentUser) { // const currentUser = JSON.parse(this.appStorageService.getItem('currentUser')); this.logger.log('[APP-COMP] - setLanguage current_user uid: ', currentUser); let currentUserId = '' if (currentUser) { currentUserId = currentUser.uid; this.logger.log('[APP-COMP] - ...
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/app.component.ts#L134-L174
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
AppComponent.initAuthentication
initAuthentication() { const tiledeskToken = localStorage.getItem('tiledesk_token') let serverBaseURL = this.appConfigService.getConfig().apiUrl this.logger.log('[APP-COMP] >>> INIT-AUTHENTICATION !!! ') this.logger.log('[APP-COMP] >>> initAuthentication tiledeskToken ', tiledeskToken) // const cu...
/**------- AUTHENTICATION FUNCTIONS --> START <--- +*/
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/app.component.ts#L267-L299
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
TextEditableDivComponent.ngAfterViewInit
ngAfterViewInit() { this.getTextArea(); }
// ---------------------------------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-base-element/text-editable-div/text-editable-div.component.ts#L69-L71
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
TextEditableDivComponent.openSetattributePopover
openSetattributePopover() { // this.logger.log('openSetattributePopover setattributepopover ', this.setattributepopover) this.logger.log('openSetattributePopover setattributepopover is Open ', this.setattributepopover.isOpen()) this.setattributepopover.open() // this.seCursorAtEnd() const position ...
// -------------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-base-element/text-editable-div/text-editable-div.component.ts#L80-L87
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
TextEditableDivComponent.calculatingRemainingCharacters
private calculatingRemainingCharacters() { if (this.textLimitBtn) { this.leftCharsText = calculatingRemainingCharacters(this.text, this.textLimit); this.logger.log('this.leftCharsText::: ', this.textLimit, this.leftCharsText, (this.textLimit / 10)); if (this.leftCharsText < (this.textLimit / 10)) ...
// ---------------------------------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-base-element/text-editable-div/text-editable-div.component.ts#L177-L187
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
TextEditableDivComponent.onAddCustomAttribute
onAddCustomAttribute() { }
// }
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-base-element/text-editable-div/text-editable-div.component.ts#L328-L328
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
TextEditableDivComponent._setCaret
_setCaret(imputEle, timestamp, length) { // var el = document.getElementById("editable") this.logger.log('setCaret length ', length) let el = imputEle let range = document.createRange() let sel = window.getSelection() // this.logger.log('setCaret el.childNodes[2]', el.childNodes[2]) this....
// background: #ffdc66;
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-base-element/text-editable-div/text-editable-div.component.ts#L334-L365
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
TextEditableDivComponent.onInput
onInput(calledBy) { this.logger.log('[TEXT-EDITABLE-DIV] onInput calledBy ', calledBy); let imputEle = this.elementRef.nativeElement.querySelector('#content-editable') //document.querySelector('[contenteditable]'), //document.querySelector('[contenteditable]'), // text = contenteditable.textContent; ...
//
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-base-element/text-editable-div/text-editable-div.component.ts#L420-L453
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsChatbotDetailsComponent.getTranslations
getTranslations() { let keys = [ 'CDSSetting.UpdateBotError', 'CDSSetting.UpdateBotSuccess', 'CDSSetting.NotAValidJSON', 'CDSSetting.AnErrorOccurredWhilDeletingTheAnswer', 'CDSSetting.AnswerSuccessfullyDeleted', 'Done', 'CDSSetting.ThereHasBeenAnErrorProcessing', 'CD...
// ------------------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-chatbot-details/cds-chatbot-details.component.ts#L85-L117
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSDetailCommunityComponent.createNewTag
createNewTag = (newTag: string) => { this.logger.log("Create New TAG Clicked -> newTag: " + newTag) var index = this.tagsList.findIndex(t => t.tag === newTag); if (index === -1) { this.logger.log("Create New TAG Clicked - Tag NOT exist") this.tagsList.push(newTag) this.logger.log("Create N...
// --------------------------------------------------------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-chatbot-details/community/community.component.ts#L135-L157
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSDetailCommunityComponent.publishOnCommunity
publishOnCommunity() { this.logger.log('[CDS-DETAIL-COMMUNITY] hasPersonalCmntyInfo (2)' , this.hasPersonalCmntyInfo) this.logger.log('openDialog') const dialogRef = this.dialog.open(CdsPublishOnCommunityModalComponent, { data: { chatbot: this.selectedChatbot, projectId: this.project....
// are you sure to publish on the community without your Personal information
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-chatbot-details/community/community.component.ts#L173-L210
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSDetailCommunityComponent.onChangeUserWebsite
onChangeUserWebsite(event) { this.logger.log('[CDS-DETAIL-COMMUNITY] onChangeUserWebsite > event', event) }
// -----------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-chatbot-details/community/community.component.ts#L367-L369
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSDetailBotDetailComponent.checkImageExists
checkImageExists(image_url, callBack) { const img = new Image(); img.src = image_url; img.onload = function () { callBack(true); }; img.onerror = function () { callBack(false); }; }
// }
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-chatbot-details/detail/detail.component.ts#L348-L357
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSDetailBotDetailComponent.upload
upload(event) { this.logger.log('[CDS-CHATBOT-DTLS] BOT PROFILE IMAGE upload') 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-chatbot-details/detail/detail.component.ts#L417-L477
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSDetailBotDetailComponent.deleteBotProfileImage
deleteBotProfileImage() { // const file = event.target.files[0] this.logger.log('[CDS-CHATBOT-DTLS] BOT PROFILE IMAGE (FAQ-COMP) deleteBotProfileImage') this.uploadService.deleteProfile(this.selectedChatbot._id, this.selectedChatbot.imageURL).then((result)=>{ // this.botProfileImageExist = false; ...
// ---------------------------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-chatbot-details/detail/detail.component.ts#L512-L524
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSDetailDeveloperComponent.onChangeWebhookUrl
onChangeWebhookUrl(event) { this.logger.log('onChangeWebhookUrl ', event); this.validateUrl(event) }
//FULFILMENT section: start
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-chatbot-details/developer/developer.component.ts#L68-L71
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSDetailImportExportComponent.exportChatbotToJSON
exportChatbotToJSON() { // const exportFaqToJsonBtnEl = <HTMLElement>document.querySelector('.export-chatbot-to-json-btn'); // exportFaqToJsonBtnEl.blur(); this.faqService.exportChatbotToJSON(this.id_faq_kb).subscribe((faq: any) => { // this.logger.log('[TILEBOT] - EXPORT CHATBOT TO JSON - FAQS', faq)...
// --------------------------------------------------------------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-chatbot-details/import-export/import-export.component.ts#L42-L56
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSDetailImportExportComponent.fileChangeUploadChatbotFromJSON
fileChangeUploadChatbotFromJSON(event) { this.logger.log('[TILEBOT] - fileChangeUploadChatbotFromJSON $event ', event); let fileJsonToUpload = '' // this.logger.log('[TILEBOT] - fileChangeUploadChatbotFromJSON $event target', event.target); const selectedFile = event.target.files[0]; const fileRea...
// --------------------------------------------------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-chatbot-details/import-export/import-export.component.ts#L65-L91
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSDetailImportExportComponent.presentModalImportIntentsFromJson
presentModalImportIntentsFromJson() { this.displayImportJSONModal = "block" }
// --------------------------------------------------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-chatbot-details/import-export/import-export.component.ts#L97-L99
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CDSDetailImportExportComponent.onCloseModal
onCloseModal() { this.displayDeleteFaqModal = 'none'; this.displayInfoModal = 'none'; }
// CLOSE MODAL WITHOUT SAVE THE UPDATES OR WITHOUT CONFIRM THE DELETION
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-chatbot-details/import-export/import-export.component.ts#L167-L170
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsDashboardComponent.executeAsyncFunctionsInSequence
async executeAsyncFunctionsInSequence() { this.logger.log('[CDS DSHBRD] executeAsyncFunctionsInSequence -------------> '); try { const getTranslations = await this.getTranslations(); this.logger.log('[CDS DSHBRD] Risultato 1:', getTranslations); const getUrlParams = await this.getUrlParams...
/** * execute Async Functions In Sequence * Le funzioni async sono gestite in maniera sincrona ed eseguite in coda * da aggiungere un loader durante il processo e se tutte vanno a buon fine * possiamo visualizzare lo stage completo */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-dashboard.component.ts#L136-L159
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsDashboardComponent.getTranslations
private async getTranslations(): Promise<boolean> { return new Promise((resolve, reject) => { // this.translateCreateFaqSuccessMsg(); // this.translateCreateFaqErrorMsg(); // this.translateUpdateFaqSuccessMsg(); // this.translateUpdateFaqErrorMsg(); // this.translateWarningMsg(); ...
/** GET TRANSLATIONS */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-dashboard.component.ts#L162-L176
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsDashboardComponent.hideShowWidget
private hideShowWidget(status: "hide" | "show") { try { if (window && window['tiledesk']) { this.logger.log('[CDS DSHBRD] HIDE WIDGET ', window['tiledesk']) if (status === 'hide') { window['tiledesk'].hide(); } else if (status === 'show') { window['tiledesk'].show()...
/** hideShowWidget */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-dashboard.component.ts#L194-L207
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsDashboardComponent.onToggleSidebarWith
onToggleSidebarWith(IS_OPEN) { this.IS_OPEN_SIDEBAR = IS_OPEN; }
/** onToggleSidebarWith */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-dashboard.component.ts#L213-L215
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsDashboardComponent.goBack
goBack() { let dashbordBaseUrl = this.appConfigService.getConfig().dashboardBaseUrl + '#/project/'+ this.dashboardService.projectID + '/bots/my-chatbots/all' window.open(dashbordBaseUrl, '_self') // this.location.back() // this.router.navigate(['project/' + this.project._id + '/bots/my-chatbots/all']); ...
/** Go back to previous page */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-dashboard.component.ts#L218-L224
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsDashboardComponent.onClickItemList
onClickItemList(event: SIDEBAR_PAGES) { this.logger.log('[CDS DSHBRD] active section-->', event); if(event !== SIDEBAR_PAGES.INTENTS){ // this.connectorService.initializeConnectors(); // this.eventTestItOutHeader.next(null); } this.activeSidebarSection = event; }
/** SIDEBAR OUTPUT EVENTS */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-dashboard.component.ts#L230-L237
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.ngOnDestroy
ngOnDestroy() { if (this.subscriptionListOfIntents) { this.subscriptionListOfIntents.unsubscribe(); } if (this.subscriptionOpenDetailPanel) { this.subscriptionOpenDetailPanel.unsubscribe(); } if (this.subscriptionOpenAddActionMenu) { this.subscriptionOpenAddActionMenu.unsubscribe()...
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L146-L179
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.ngAfterViewInit
ngAfterViewInit() { this.logger.log("[CDS-CANVAS] •••• ngAfterViewInit ••••"); //this.addEventListener(); this.stageService.initializeStage(); this.stageService.setDrawer(); this.connectorService.initializeConnectors(); this.changeDetectorRef.detectChanges(); setTimeout(() => { this.s...
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L182-L192
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.getParamsFromURL
private getParamsFromURL(){ this.route.queryParams.subscribe(params => { console.log('[CDS-CANVAS] Block params:', params); this.blockId = params['blockid']; if (this.blockId) { console.log('[CDS-CANVAS] Block ID:', this.blockId); } this.blockName = params['blockname']; i...
/** * getParamsFromURL */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L197-L209
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.initLoadingStage
initLoadingStage(){ this.stageService.loaded = false; this.totElementsOnTheStage = 0; this.countRenderedElements = 0; this.renderedAllIntents = false; this.renderedAllElements = false; this.loadingProgress = 0; this.mapOfConnectors = []; this.mapOfIntents = []; this.labelInfoLoading ...
/** * initLoadingStage */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L214-L225
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onIntentRendered
onIntentRendered(intentID) { if(this.stageService.loaded === false && this.renderedAllElements === false){ // this.logger.log("[CDS-CANVAS3] ••••onIntentRendered ••••", this.stageService.loaded); this.labelInfoLoading = 'CDSCanvas.intentsProgress'; if(this.mapOfIntents[intentID] && this.mapOfInt...
/** * * @param intentID */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L232-L247
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.setSubscriptions
private setSubscriptions(){ this.subscriptionUndoRedo = this.intentService.behaviorUndoRedo.subscribe((undoRedo: any) => { this.logger.log('[cds-panel-intent-list] --- AGGIORNATO undoRedo ',undoRedo); if (undoRedo) { this.stateUndoRedo = undoRedo; } }); /** SUBSCRIBE TO THE LIST ...
// --------------------------------------------------------- //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L331-L408
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.initialize
private async initialize(){ this.id_faq_kb = this.dashboardService.id_faq_kb; this.listOfIntents = []; const getAllIntents = await this.intentService.getAllIntents(this.id_faq_kb); if (getAllIntents) { this.listOfIntents = this.intentService.listOfIntents; this.initListOfIntents(); thi...
/** initialize */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L411-L438
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.closeAllPanels
private closeAllPanels(){ this.IS_OPEN_PANEL_WIDGET = false; // this.IS_OPEN_PANEL_ACTION_DETAIL = false; this.IS_OPEN_PANEL_INTENT_DETAIL = false; this.IS_OPEN_PANEL_BUTTON_CONFIG = false; this.IS_OPEN_PANEL_CONNECTOR_MENU = false; this.IS_OPEN_CONTEXT_MENU = false; this.intentService.inact...
/** closeAllPanels */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L442-L450
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.getIntentPosition
getIntentPosition(intentId: string) { return this.intentService.getIntentPosition(intentId); }
/** getIntentPosition: call from html */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L456-L458
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.initListOfIntents
private initListOfIntents() { this.listOfIntents.forEach(intent => { if (intent.actions) { intent.actions = intent.actions.filter(obj => obj !== null); } }); this.refreshIntents(); }
/** initListOfIntents */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L461-L468
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.refreshIntents
private refreshIntents() { this.setDragAndListnerEventToElements(); if(this.renderedAllIntents === true){ this.connectorService.createConnectors(this.listOfIntents); } }
/** SET DRAG STAGE AND CREATE CONNECTORS * * set drag and listner on intents, * create connectors */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L474-L479
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.setListnerEvents
setListnerEvents(){ /** LISTENER OF TILEDESK STAGE */ /** triggers when a connector is drawn on the stage */ this.listenerConnectorDrawn = (e: CustomEvent) => { const connector = e.detail.connector; this.checkAllConnectors(connector); }; document.addEventListener("connector-drawn", thi...
// ---------------------------------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L484-L662
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.openFloatMenuOnConnectorDraftReleased
private openFloatMenuOnConnectorDraftReleased(detail){ this.logger.log("[CDS CANVAS] ho rilasciato in un punto qualsiasi dello stage e quindi apro il float menu", detail); this.positionFloatMenu = this.stageService.physicPointCorrector(detail.menuPoint); let marginLeft = this.IS_OPEN_INTENTS_LIST?290:60; ...
/** openFloatMenuOnConnectorDraftReleased */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L731-L745
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.setDragAndListnerEventToElements
private setDragAndListnerEventToElements() { this.logger.log("[CDS CANVAS] AGGIORNO ELENCO LISTNER"); this.listOfIntents.forEach(intent => { this.intentService.setDragAndListnerEventToElement(intent.intent_id); }); }
/** setDragAndListnerEventToElements */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L748-L753
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.removeConnectorDraftAndCloseFloatMenu
private removeConnectorDraftAndCloseFloatMenu() { this.connectorService.removeConnectorDraft(); this.IS_OPEN_ADD_ACTIONS_MENU = false; this.IS_OPEN_CONTEXT_MENU = false; }
/** removeConnectorDraftAndCloseFloatMenu */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L780-L784
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.posCenterIntentSelected
private posCenterIntentSelected(intent) { if(intent && intent.intent_id){ var stageElement = document.getElementById(intent.intent_id); this.stageService.centerStageOnPosition(stageElement); } }
/** posCenterIntentSelected */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L787-L792
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.deleteIntent
private async deleteIntent(intent) { this.logger.log('[CDS-CANVAS] deleteIntent', intent); // this.intentSelected = null; this.intentService.setIntentSelectedById(); this.intentService.deleteIntentNew(intent); // return // this.intentService.deleteIntentToListOfIntents(intent.intent_id); //...
/** Delete Intent ** * deleteIntentToListOfIntents: per cancellare l'intent dalla lista degli intents (listOfIntents), quindi in automatico per rimuovere l'intent dallo stage * refreshIntents: fa scattare l'evento e aggiorna l'elenco degli intents (listOfIntents) in tutti i componenti sottoscritti, come cds-panel...
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L819-L830
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onToogleSidebarIntentsList
onToogleSidebarIntentsList() { this.logger.log('[CDS-CANVAS] onToogleSidebarIntentsList ') this.IS_OPEN_INTENTS_LIST = !this.IS_OPEN_INTENTS_LIST; this.removeConnectorDraftAndCloseFloatMenu(); this.logger.log('[CDS-CANVAS] onToogleSidebarIntentsList this.IS_OPEN_INTENTS_LIST ', this.IS_OPEN_INTENTS_...
/** onToogleSidebarIntentsList */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L839-L844
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onDroppedElementToStage
async onDroppedElementToStage(event: CdkDragDrop<string[]>) { this.logger.log('[CDS-CANVAS] droppedElementOnStage:: ', event); let pos = this.connectorService.tiledeskConnectors.logicPoint(event.dropPoint); pos.x = pos.x - 132; let action: any = event.previousContainer.data[event.previousIndex]; if ...
/** onDroppedElementToStage ** * chiamata quando aggiungo (droppandola) una action sullo stage da panel element * oppure * chiamata quando aggiungo (droppandola) una action sullo stage spostandola da un altro intent * */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L851-L874
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.createNewIntentFromConnectorDraft
async createNewIntentFromConnectorDraft(typeAction, connectorDraft){ const toPoint = connectorDraft.toPoint; const newAction = this.intentService.createNewAction(typeAction); let intent = this.intentService.createNewIntent(this.id_faq_kb, newAction, toPoint); this.intentService.addNewIntentToListOfInten...
/** * createNewIntentFromConnectorDraft * @param typeAction * @param connectorDraft * chiamata quando trascino un connettore sullo stage e creo un intent al volo * createNewAction: creo una action a partire dal tipo di action selezionata * createNewIntent: creo un intent dalla action creata in pre...
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L891-L913
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.createNewIntentFromPanelElement
async createNewIntentFromPanelElement(pos, typeAction){ const newAction = this.intentService.createNewAction(typeAction); let intent = this.intentService.createNewIntent(this.id_faq_kb, newAction, pos); this.intentService.addNewIntentToListOfIntents(intent); const newIntent = await this.settingAndSaveNe...
/** * createNewIntentFromPanelElement * @param pos * @param typeAction * chiamata quando trascino un'azione sullo stage dal menu * createNewAction: creo una action a partire dal tipo di action selezionata * createNewIntent: creo un intent dalla action creata in precedenza * addNewIntentToListOf...
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L927-L932
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.createNewIntentDraggingActionFromAnotherIntent
async createNewIntentDraggingActionFromAnotherIntent(pos, action){ // let nowIntent = this.listOfIntents.find((intent) => intent.actions.some((act) => act._tdActionId === action._tdActionId)); let prevIntent = this.intentService.prevListOfIntent.find((intent) => intent.actions.some((act) => act._tdActionId === ...
/** * createNewIntentDraggingActionFromAnotherIntent * @param pos * @param action */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L941-L957
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.settingAndSaveNewIntent
private async settingAndSaveNewIntent(pos, intent, nowIntent, prevIntent) { this.logger.log('[CDS-CANVAS] sto per configurare il nuovo intent creato con pos e action ::: ', pos, intent, nowIntent, prevIntent); intent.id = INTENT_TEMP_ID; this.intentService.setDragAndListnerEventToElement(intent.intent_id); ...
/** createNewIntentWithNewAction * chiamata quando trascino un connettore sullo stage e creo un intent al volo * oppure * chiamata quando aggiungo (droppandola) una action sullo stage da panel element * oppure * chiamata quando aggiungo (droppandola) una action sullo stage spostandola da un altro intent */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L970-L977
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onMouseOverActionMenuSx
onMouseOverActionMenuSx(event: boolean) { this.logger.log('[CDS-CANVAS] onMouseOverActionMenuSx ', event) // if (event === true) { // this.IS_OPEN_PANEL_WIDGET = false; // // this.isOpenAddActionsMenu = false // // @ Remove connectors of the float context menu // if (!this.hasClickedAddA...
/** Close WHEN THE ACTION LEFT MENU IS CLICKED ** * - actions context menu (static & float) * - test widget */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L991-L1001
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onHideActionPlaceholderOfActionPanel
onHideActionPlaceholderOfActionPanel(event){ this.logger.log('[CDS-CANVAS] onHideActionPlaceholderOfActionPanel event : ', event); // this.hideActionPlaceholderOfActionPanel = event }
/** onHideActionPlaceholderOfActionPanel */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1004-L1007
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onSelectIntent
onSelectIntent(intent: Intent) { this.logger.log('[CDS-CANVAS] onSelectIntent::: ', intent); if (!this.hasClickedAddAction) { this.removeConnectorDraftAndCloseFloatMenu(); } this.intentService.setIntentSelected(intent.intent_id); this.posCenterIntentSelected(intent); this.closeAllPanels();...
/** onSelectIntent */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1016-L1025
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onDeleteIntent
onDeleteIntent(intent: Intent) { // this.intentService.setIntentSelected(intent.intent_id); if (!this.hasClickedAddAction) { this.removeConnectorDraftAndCloseFloatMenu(); } this.closeAllPanels(); this.closeActionDetailPanel(); this.deleteIntent(intent); // swal({ // title: this.t...
/** onDeleteIntent */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1028-L1048
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onIntentSelected
onIntentSelected(intent){ if (intent.intent_display_name === 'start' || intent.intent_display_name === 'defaultFallback') { return; } this.logger.log('[CDS-CANVAS] onIntentSelected ', intent.intent_id); this.closeAllPanels(); this.removeConnectorDraftAndCloseFloatMenu(); this.intentServ...
// --------------------------------------------------------- //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1058-L1074
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onActionSelected
onActionSelected(event) { this.logger.log('[CDS-CANVAS] onActionSelected from PANEL INTENT - action ', event.action, ' - index ', event.index); // CHIUDI TUTTI I PANNELLI APERTI if (!this.hasClickedAddAction) { this.removeConnectorDraftAndCloseFloatMenu(); } //this.intentService.setIntentSelec...
/** onActionSelected ** * @ Close WHEN AN ACTION IS SELECTED FROM AN INTENT * - actions context menu (static & float) * - button configuration panel * - test widget */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1082-L1091
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onQuestionSelected
onQuestionSelected(question: string) { this.logger.log('[CDS-CANVAS] onQuestionSelected from PANEL INTENT - question ', question); // CHIUDI TUTTI I PANNELLI APERTI if (!this.hasClickedAddAction) { this.removeConnectorDraftAndCloseFloatMenu(); } //this.intentService.setIntentSelectedById(inten...
/** onQuestionSelected ** * @ Close WHEN THE QUESTION DETAIL PANEL IS OPENED * - actions context menu (static & float) * - button configuration panel * - test widget */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1099-L1108
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onIntentFormSelected
onIntentFormSelected(intentform: Form) { // CHIUDI TUTTI I PANNELLI APERTI if (!this.hasClickedAddAction) { this.removeConnectorDraftAndCloseFloatMenu(); } //this.intentService.setIntentSelectedById(intent_id); // this.intentSelected = this.listOfIntents.find(el => el.intent_id === this.intent...
/** onIntentFormSelected ** * @ Close WHEN THE FORM DETAIL PANEL IS OPENED * - actions context menu (static & float) * - button configuration panel * - test widget */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1116-L1124
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onShowPanelActions
onShowPanelActions(event) { this.logger.log('[CDS-CANVAS] showPanelActions event:: ', event); this.closeAllPanels(); this.closeActionDetailPanel(); // this.controllerService.closeActionDetailPanel(); // this.controllerService.closeButtonPanel(); this.hasClickedAddAction = event.addAction; th...
// -------------------------------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1134-L1149
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onTestItOut
onTestItOut(intent: Intent) { // this.testItOut.emit(true); this.testitOutFirstClick = true; this.logger.log('[CDS-CANVAS] onTestItOut intent ', intent); this.IS_OPEN_PANEL_WIDGET = true this.intentService.startTestWithIntent(intent) // if(typeof event === "boolean"){ // this.IS_OPEN_PANEL...
// -------------------------------------------------------
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1159-L1183
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onActionDeleted
onActionDeleted(event){ // onActionDeleted }
/** onActionDeleted */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1186-L1188
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onOptionClicked
async onOptionClicked(option: OPTIONS){ switch(option){ case OPTIONS.ZOOM_IN: { const result = await this.stageService.zoom('in'); if (result) { this.connectorService.tiledeskConnectors.scale = this.stageService.getScale(); } break; } case OPTIONS.ZOOM_OU...
// --------------------------------------------------------- //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1195-L1227
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onSaveButton
onSaveButton(button: Button) { this.logger.log('onSaveButton: ', this.intentService.intentSelected); // this.intentService.onUpdateIntentFromActionPanel(this.intentService.intentSelected); this.intentService.updateIntent(this.intentService.intentSelected); // const arrayId = button.__idConnector.split(...
/** onSaveButton */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1234-L1248
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onSavePanelIntentDetail
onSavePanelIntentDetail(intentSelected: any) { this.logger.log('[CDS-CANVAS] onSavePanelIntentDetail intentSelected ', intentSelected) if (intentSelected && intentSelected != null) { // this.intentSelected = intentSelected; this.intentService.setIntentSelectedByIntent(intentSelected); // this....
/** onSavePanelIntentDetail */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1256-L1267
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onAddActionFromActionMenu
async onAddActionFromActionMenu(event) { this.logger.log('[CDS-CANVAS] onAddActionFromActionMenu:: ', event); this.IS_OPEN_ADD_ACTIONS_MENU = true; const connectorDraft = this.connectorService.connectorDraft; if (connectorDraft && connectorDraft.toPoint && !this.hasClickedAddAction) { this.logger...
/** chiamata quando premo + sull'intent per aggiungere una nuova action */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1279-L1299
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.setConnectorSelected
setConnectorSelected(idConnector){ this.connectorSelected = {}; const intentId = idConnector.split('/')[0]; let intent = this.intentService.getIntentFromId(intentId); this.connectorSelected = { id: idConnector } try { if(intent.attributes.connectors && intent.attributes.connectors[id...
/** * setConnectorSelected * @param idConnector */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1307-L1321
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onAddActionFromConnectorMenu
async onAddActionFromConnectorMenu(event) { if(event.type === "delete"){ const intentId = this.connectorSelected.id.split('/')[0]; let intent = this.intentService.getIntentFromId(intentId); if(intent.attributes && intent.attributes.connectors && intent.attributes.connectors[this.connectorSelected....
/** * onAddActionFromConnectorMenu * @param event */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1328-L1358
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsCanvasComponent.onShowContextMenu
public onShowContextMenu(event: MouseEvent): void { event.preventDefault(); this.logger.log('[CDS-CANVAS] onShowContextMenu:: ', event); // this.showCustomMenu(x, y); // Recupera l'elemento che ha scatenato l'evento const targetElement = event.target as HTMLElement; const customAttr...
// --------------------------------------------------------- //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-canvas.component.ts#L1362-L1378
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.ngOnInit
ngOnInit(): void { this.logger.log('ActionDTMFFormComponent ngOnInit', this.action, this.intentSelected); // // this.logger.log('ngOnInit panel-response::: ', this.typeAction); this.typeAction = (this.action._tdActionType === TYPE_ACTION.RANDOM_REPLY ? TYPE_ACTION.RANDOM_REPLY : TYPE_ACTION.REPLY); try ...
// SYSTEM FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L71-L89
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.ngOnChanges
ngOnChanges(changes: SimpleChanges): void { if(this.action && this.intentSelected) this.initialize(); }
/** * * @param changes * IMPORTANT! serve per aggiornare il dettaglio della action nel pannello */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L98-L100
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.initialize
private initialize() { this.openCardButton = false; this.arrayResponses = []; this.intentName = ''; this.intentNameResult = true; this.textGrabbing = false; if (this.action) { try { this.arrayResponses = this.action.attributes.commands; } catch (error) { this.logger.l...
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L109-L123
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.scrollToBottom
scrollToBottom(): void { setTimeout(() => { try { this.scrollContainer.nativeElement.scrollTop = this.scrollContainer.nativeElement.scrollHeight; this.scrollContainer.nativeElement.animate({ scrollTop: 0 }, '500'); } catch (error) { this.logger.log('scrollToBottom ERROR: ', error...
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L127-L136
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.mouseDown
mouseDown() { this.textGrabbing = true; }
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L144-L146
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.mouseUp
mouseUp() { this.textGrabbing = false; }
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L149-L151
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.drop
drop(event: CdkDragDrop<string[]>) { // this.logger.log( 'DROP REPLY ---> ',event, this.arrayResponses); this.textGrabbing = false; try { let currentPos = event.currentIndex*2+1; let previousPos = event.previousIndex*2+1; const waitCur = this.arrayResponses[currentPos-1]; const msgCu...
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L154-L175
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onMoveUpResponse
onMoveUpResponse(index: number) { if(index<2)return; try { let from = index - 1; let to = from - 2; this.arrayResponses.splice(to, 0, this.arrayResponses.splice(from, 1)[0]); from = index; to = from - 2; this.arrayResponses.splice(to, 0, this.arrayResponses.splice(from, 1)[0...
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L180-L196
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onMoveDownResponse
onMoveDownResponse(index: number) { if(index === this.arrayResponses.length-1)return; try { let from = index; let to = from + 2; this.arrayResponses.splice(to, 0, this.arrayResponses.splice(from, 1)[0]); from = index - 1; to = from + 2; this.arrayResponses.splice(to, 0, this...
/** */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L199-L215
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onAddNewActionReply
onAddNewActionReply(ele) { this.logger.log('onAddNewActionReply: ', ele); try { let message = new Message(ele.message.type, ele.message.text); if (ele.message.attributes) { message.attributes = ele.message.attributes; } if (ele.message.metadata) { message.metadata = ele.m...
/** onAddNewActionReply */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L219-L241
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onDeleteActionReply
onDeleteActionReply(index: number) { this.logger.log('onDeleteActionReply: ', this.arrayResponses[index]); // !!! cancello tutti i connettori di una action var intentId = this.idAction.substring(0, this.idAction.indexOf('/')); try { let buttons = this.arrayResponses[index].message.attributes.attac...
/** onDeleteActionReply */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L245-L273
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onChangeActionReply
onChangeActionReply(event) { const element = {type: TYPE_UPDATE_ACTION.ACTION, element: this.action}; this.logger.log('onChangeActionReply ************', element); this.onUpdateAndSaveAction(element); }
/** onChangingReplyAction */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L276-L280
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onConnectorChangeReply
onConnectorChangeReply(event){ this.logger.log('onConnectorChangeReply ************', event); this.updateAndSaveAction.emit({type: TYPE_UPDATE_ACTION.ACTION, element: this.action}); this.onConnectorChange.emit(event) }
/** onConnectorChangeReply */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L283-L287
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onCreateNewButton
onCreateNewButton(index){ this.logger.log('[ActionDTMFForm] onCreateNewButton: ', index); try { if(!this.arrayResponses[index].message.attributes || !this.arrayResponses[index].message.attributes.attachment){ this.arrayResponses[index].message.attributes = new MessageAttributes(); } } ca...
/** onCreateNewButton */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L294-L312
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onDeleteButton
onDeleteButton(event){ let button = event.buttons[event.index]; event.buttons.splice(event.index, 1); var intentId = this.idAction.substring(0, this.idAction.indexOf('/')); this.connectorService.deleteConnectorFromAction(intentId, button.__idConnector); this.updateAndSaveAction.emit({type: TYPE_UPDA...
/** onDeleteButton */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L338-L344
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onUpdateAndSaveAction
public async onUpdateAndSaveAction(element) { this.logger.log('[ActionDTMFForm] onUpdateAndSaveAction:::: ', this.action, element); // this.connectorService.updateConnector(this.intentSelected.intent_id); this.updateAndSaveAction.emit(this.action); }
/** onUpdateAndSaveAction: * function called by all actions in @output whenever they are modified! * 1 - update connectors * 2 - update intent * */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L352-L356
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onChangeIntentName
onChangeIntentName(name: string) { name.toString(); try { this.intentName = name.replace(/[^A-Z0-9_]+/ig, ""); } catch (error) { this.logger.log('name is not a string', error) } }
/** onChangeIntentName */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L361-L368
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onBlurIntentName
onBlurIntentName(name: string) { this.intentNameResult = true; }
/** onBlurIntentName */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L371-L373
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onDisableInputMessage
onDisableInputMessage() { try { this.action.attributes.disableInputMessage = !this.action.attributes.disableInputMessage; this.updateAndSaveAction.emit({type: TYPE_UPDATE_ACTION.ACTION, element: this.action}); } catch (error) { this.logger.log("Error: ", error); } }
/** onDisableInputMessage */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L376-L383
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onOpenButtonPanel
onOpenButtonPanel(buttonSelected) { this.logger.log('onOpenButtonPanel 2 :: ', buttonSelected); // this.intentService.setIntentSelected(this.intentSelected.intent_id); this.intentService.selectAction(this.intentSelected.intent_id, this.action._tdActionId); this.controllerService.openButtonPanel(buttonSe...
/** appdashboard-button-configuration-panel: onOpenButtonPanel */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L387-L392
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onSaveButton
onSaveButton(button) { // this.logger.log('onSaveButton :: ', button, this.response); // this.generateCommandsWithWaitOfElements(); }
/** appdashboard-button-configuration-panel: Save button */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L405-L408
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDTMFFormComponent.onCloseButtonPanel
onCloseButtonPanel() { this.logger.log('onCloseButtonPanel :: '); this.openCardButton = false; }
/** appdashboard-button-configuration-panel: Close button panel */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-form/cds-action-dtmf-form.component.ts#L413-L416
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionDtmfMenuComponent.onCreateNewButton
public override async onCreateNewButton(event){ let index = event.index; let buttonValue = event.option this.logger.log('[ActionDTMFForm] onCreateNewButton: ', index); try { if(!this.arrayResponses[index].message.attributes || !this.arrayResponses[index].message.attributes.attachment){ thi...
/** onCreateNewButton */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-dtmf-menu/cds-action-dtmf-menu.component.ts#L44-L64
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionVoiceComponent.ngOnInit
ngOnInit(): void { this.logger.log('ActionDTMFFormComponent ngOnInit', this.action, this.intentSelected); // // this.logger.log('ngOnInit panel-response::: ', this.typeAction); this.typeAction = (this.action._tdActionType === TYPE_ACTION.RANDOM_REPLY ? TYPE_ACTION.RANDOM_REPLY : TYPE_ACTION.REPLY); try ...
// SYSTEM FUNCTIONS //
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-voice-base/cds-action-voice.component.ts#L71-L89
297d30da01d98a1299e7197eb88cff5b2390a386
design-studio
github_2023
Tiledesk
typescript
CdsActionVoiceComponent.ngOnChanges
ngOnChanges(changes: SimpleChanges): void { if(this.action && this.intentSelected) this.initialize(); }
/** * * @param changes * IMPORTANT! serve per aggiornare il dettaglio della action nel pannello */
https://github.com/Tiledesk/design-studio/blob/297d30da01d98a1299e7197eb88cff5b2390a386/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/actions/list-voice/cds-action-voice-base/cds-action-voice.component.ts#L98-L100
297d30da01d98a1299e7197eb88cff5b2390a386