@tuki-io/tuki-widgets 0.0.177 → 0.0.178

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/contact-center/cc-script-editor/cc-script-editor.component.d.ts +53 -0
  2. package/contact-center/cc-script-editor/cc-script-editor.module.d.ts +20 -0
  3. package/contact-center/cc-script-editor/components/dialogs/add-node-dialog/add-node-dialog.component.d.ts +35 -0
  4. package/contact-center/cc-script-editor/components/dialogs/link-node-dialog/link-node-dialog.component.d.ts +38 -0
  5. package/contact-center/cc-script-editor/components/floating-toolbar/floating-toolbar.component.d.ts +34 -0
  6. package/contact-center/cc-script-editor/components/floating-toolbar/floating-toolbar.module.d.ts +9 -0
  7. package/contact-center/cc-script-editor/components/node-action-toolbar/node-action-toolbar.component.d.ts +27 -0
  8. package/contact-center/cc-script-editor/components/node-details-sidebar/node-details-sidebar.component.d.ts +27 -0
  9. package/contact-center/cc-script-editor/components/node-search-panel/node-search-panel.component.d.ts +14 -0
  10. package/contact-center/cc-script-editor/components/wxcc-actions-bar/wxcc-actions-bar.component.d.ts +11 -0
  11. package/contact-center/cc-script-editor/components/wxcc-file-selection-bar/wxcc-file-selection-bar.component.d.ts +24 -0
  12. package/contact-center/cc-script-editor/components/wxcc-flowchart/wxcc-flowchart.component.d.ts +66 -0
  13. package/contact-center/cc-script-editor/constants/cytoscape.config.d.ts +2 -0
  14. package/contact-center/cc-script-editor/constants/wxcc-api.constants.d.ts +15 -0
  15. package/contact-center/cc-script-editor/services/wxcc-activity-creation.service.d.ts +21 -0
  16. package/contact-center/cc-script-editor/services/wxcc-activity-manage.service.d.ts +8 -0
  17. package/contact-center/cc-script-editor/services/wxcc-flow-api.service.d.ts +43 -0
  18. package/contact-center/cc-script-editor/services/wxcc2graph.service.d.ts +42 -0
  19. package/contact-center/cc-script-editor/types/extended-activity.d.ts +47 -0
  20. package/contact-center/cc-script-editor/types/wxcc-activity.d.ts +96 -0
  21. package/contact-center/cc-script-editor/types/wxcc.d.ts +161 -0
  22. package/contact-center/cc-script-editor/utils/node-html-template.d.ts +3 -0
  23. package/contact-center/cc-script-editor/utils/node-mappings.d.ts +54 -0
  24. package/contact-center/public-api.d.ts +2 -0
  25. package/esm2020/contact-center/cc-script-editor/cc-script-editor.component.mjs +193 -0
  26. package/esm2020/contact-center/cc-script-editor/cc-script-editor.module.mjs +83 -0
  27. package/esm2020/contact-center/cc-script-editor/components/dialogs/add-node-dialog/add-node-dialog.component.mjs +60 -0
  28. package/esm2020/contact-center/cc-script-editor/components/dialogs/link-node-dialog/link-node-dialog.component.mjs +83 -0
  29. package/esm2020/contact-center/cc-script-editor/components/floating-toolbar/floating-toolbar.component.mjs +104 -0
  30. package/esm2020/contact-center/cc-script-editor/components/floating-toolbar/floating-toolbar.module.mjs +28 -0
  31. package/esm2020/contact-center/cc-script-editor/components/node-action-toolbar/node-action-toolbar.component.mjs +65 -0
  32. package/esm2020/contact-center/cc-script-editor/components/node-details-sidebar/node-details-sidebar.component.mjs +97 -0
  33. package/esm2020/contact-center/cc-script-editor/components/node-search-panel/node-search-panel.component.mjs +43 -0
  34. package/esm2020/contact-center/cc-script-editor/components/wxcc-actions-bar/wxcc-actions-bar.component.mjs +27 -0
  35. package/esm2020/contact-center/cc-script-editor/components/wxcc-file-selection-bar/wxcc-file-selection-bar.component.mjs +61 -0
  36. package/esm2020/contact-center/cc-script-editor/components/wxcc-flowchart/wxcc-flowchart.component.mjs +434 -0
  37. package/esm2020/contact-center/cc-script-editor/constants/cytoscape.config.mjs +72 -0
  38. package/esm2020/contact-center/cc-script-editor/constants/wxcc-api.constants.mjs +14 -0
  39. package/esm2020/contact-center/cc-script-editor/mock/data/QWC_ir.json +912 -0
  40. package/esm2020/contact-center/cc-script-editor/services/wxcc-activity-creation.service.mjs +82 -0
  41. package/esm2020/contact-center/cc-script-editor/services/wxcc-activity-manage.service.mjs +162 -0
  42. package/esm2020/contact-center/cc-script-editor/services/wxcc-flow-api.service.mjs +79 -0
  43. package/esm2020/contact-center/cc-script-editor/services/wxcc2graph.service.mjs +144 -0
  44. package/esm2020/contact-center/cc-script-editor/types/extended-activity.mjs +4 -0
  45. package/esm2020/contact-center/cc-script-editor/types/wxcc-activity.mjs +2 -0
  46. package/esm2020/contact-center/cc-script-editor/types/wxcc.mjs +6 -0
  47. package/esm2020/contact-center/cc-script-editor/utils/node-html-template.mjs +76 -0
  48. package/esm2020/contact-center/cc-script-editor/utils/node-mappings.mjs +109 -0
  49. package/esm2020/contact-center/public-api.mjs +3 -1
  50. package/fesm2015/tuki-io-tuki-widgets-contact-center.mjs +2948 -3
  51. package/fesm2015/tuki-io-tuki-widgets-contact-center.mjs.map +1 -1
  52. package/fesm2020/tuki-io-tuki-widgets-contact-center.mjs +2974 -3
  53. package/fesm2020/tuki-io-tuki-widgets-contact-center.mjs.map +1 -1
  54. package/package.json +1 -1
@@ -0,0 +1,53 @@
1
+ import { OnDestroy, OnInit } from "@angular/core";
2
+ import { WxCCAPIService } from "./services/wxcc-flow-api.service";
3
+ import { IWxCCFlowchart, IWxCCJSON, IWxCCNonIRJSON } from "./types/wxcc";
4
+ import { WxCC2GraphService } from "./services/wxcc2graph.service";
5
+ import { FileState } from "./constants/wxcc-api.constants";
6
+ import * as i0 from "@angular/core";
7
+ type WxCCFlowchartState = {
8
+ fileNames: {
9
+ fileName: string;
10
+ host: string;
11
+ }[];
12
+ uccxIp: string;
13
+ selectedFileName: string;
14
+ selectedFileStatus: FileState;
15
+ loading: boolean;
16
+ flowchart: IWxCCFlowchart | null;
17
+ irDoc: IWxCCJSON;
18
+ nonIrDoc: IWxCCNonIRJSON;
19
+ errorMessage: string;
20
+ statuses: any[];
21
+ };
22
+ export declare class WxCCFlowchartPageComponent implements OnInit, OnDestroy {
23
+ private readonly api;
24
+ private readonly wxcc2graph;
25
+ customerId: number;
26
+ host: string;
27
+ token: string;
28
+ private readonly destroy$;
29
+ readonly state: WxCCFlowchartState;
30
+ constructor(api: WxCCAPIService, wxcc2graph: WxCC2GraphService);
31
+ ngOnInit(): void;
32
+ ngOnDestroy(): void;
33
+ private init;
34
+ private subscribeToCustomerChanges;
35
+ private loadMockFlowchart;
36
+ private loadFileNames;
37
+ private loadWxCCFlowData;
38
+ onSave(): void;
39
+ onExportNonIr(): void;
40
+ onReset(): void;
41
+ onComplete(): void;
42
+ onFileNameSelectionChange(item: {
43
+ fileName: string;
44
+ host: string;
45
+ }): void;
46
+ getStatus(fileName: string, uccxIp: string): any;
47
+ setLoading(loading: boolean): void;
48
+ setError(error: string): void;
49
+ private get baseParams();
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<WxCCFlowchartPageComponent, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<WxCCFlowchartPageComponent, "cc-script-editor", never, { "customerId": "customerId"; "host": "host"; "token": "token"; }, {}, never, never, false, never>;
52
+ }
53
+ export {};
@@ -0,0 +1,20 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./cc-script-editor.component";
3
+ import * as i2 from "./components/wxcc-flowchart/wxcc-flowchart.component";
4
+ import * as i3 from "./components/node-details-sidebar/node-details-sidebar.component";
5
+ import * as i4 from "./components/node-action-toolbar/node-action-toolbar.component";
6
+ import * as i5 from "./components/dialogs/link-node-dialog/link-node-dialog.component";
7
+ import * as i6 from "./components/wxcc-file-selection-bar/wxcc-file-selection-bar.component";
8
+ import * as i7 from "./components/dialogs/add-node-dialog/add-node-dialog.component";
9
+ import * as i8 from "./components/wxcc-actions-bar/wxcc-actions-bar.component";
10
+ import * as i9 from "./components/node-search-panel/node-search-panel.component";
11
+ import * as i10 from "@angular/common";
12
+ import * as i11 from "@angular/forms";
13
+ import * as i12 from "../shared/shared.module";
14
+ import * as i13 from "../shared/material.module";
15
+ import * as i14 from "./components/floating-toolbar/floating-toolbar.module";
16
+ export declare class WxCCFlowchartModule {
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<WxCCFlowchartModule, never>;
18
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WxCCFlowchartModule, [typeof i1.WxCCFlowchartPageComponent, typeof i2.WxCCFlowchartComponent, typeof i3.NodeDetailsSidebarComponent, typeof i4.NodeActionToolbarComponent, typeof i5.LinkNodeDialogComponent, typeof i6.WxCCFileSelectionBarComponent, typeof i7.AddNodeDialogComponent, typeof i8.WxCCActionsBarComponent, typeof i9.NodeSearchPanelComponent], [typeof i10.CommonModule, typeof i11.FormsModule, typeof i12.SharedModule, typeof i13.MaterialModule, typeof i14.FloatingToolbarModule], [typeof i1.WxCCFlowchartPageComponent]>;
19
+ static ɵinj: i0.ɵɵInjectorDeclaration<WxCCFlowchartModule>;
20
+ }
@@ -0,0 +1,35 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { CreatableActivityDisplayType } from '../../../utils/node-mappings';
3
+ import { MatDialogRef } from '@angular/material/dialog';
4
+ import { ReadonlyExtendedActivity } from '../../../types/extended-activity';
5
+ import * as i0 from "@angular/core";
6
+ export interface NewNodeData {
7
+ activityTypeName: CreatableActivityDisplayType['activityName'];
8
+ name: string;
9
+ parentNodeIds: string[];
10
+ childNodeIds: string[];
11
+ }
12
+ export declare class AddNodeDialogComponent implements OnInit {
13
+ data: {
14
+ availableNodes: ReadonlyExtendedActivity[];
15
+ };
16
+ private dialogRef;
17
+ readonly activityDisplayTypes: CreatableActivityDisplayType[];
18
+ selectedActivityType: CreatableActivityDisplayType;
19
+ nodeName: string;
20
+ selectedParentIds: string[];
21
+ selectedChildIds: string[];
22
+ availableNodes: ReadonlyExtendedActivity[];
23
+ constructor(data: {
24
+ availableNodes: ReadonlyExtendedActivity[];
25
+ }, dialogRef: MatDialogRef<AddNodeDialogComponent>);
26
+ ngOnInit(): void;
27
+ private resetForm;
28
+ onActivityTypeChange(value: string): void;
29
+ onClose(): void;
30
+ onSubmit(): void;
31
+ trackByValue(index: number, type: CreatableActivityDisplayType): string;
32
+ trackByNodeId(index: number, node: ReadonlyExtendedActivity): string;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<AddNodeDialogComponent, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<AddNodeDialogComponent, "add-node-dialog", never, {}, {}, never, never, false, never>;
35
+ }
@@ -0,0 +1,38 @@
1
+ import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { MatDialogRef } from '@angular/material/dialog';
3
+ import { ReadonlyExtendedActivity } from '../../../types/extended-activity';
4
+ import * as i0 from "@angular/core";
5
+ export interface LinkNodeData {
6
+ sourceNodeId: string;
7
+ targetNodeId: string;
8
+ label?: string;
9
+ }
10
+ export declare class LinkNodeDialogComponent implements OnInit, OnChanges {
11
+ data: {
12
+ sourceNode: ReadonlyExtendedActivity;
13
+ availableNodes: ReadonlyExtendedActivity[];
14
+ };
15
+ private readonly dialogRef;
16
+ availableNodes: ReadonlyExtendedActivity[];
17
+ sourceNode: ReadonlyExtendedActivity;
18
+ close: EventEmitter<void>;
19
+ linkNodes: EventEmitter<LinkNodeData>;
20
+ selectedTargetId: string | null;
21
+ linkLabel: string;
22
+ searchQuery: string;
23
+ constructor(data: {
24
+ sourceNode: ReadonlyExtendedActivity;
25
+ availableNodes: ReadonlyExtendedActivity[];
26
+ }, dialogRef: MatDialogRef<LinkNodeDialogComponent>);
27
+ ngOnInit(): void;
28
+ get filteredNodes(): ReadonlyExtendedActivity[];
29
+ ngOnChanges(changes: SimpleChanges): void;
30
+ private resetForm;
31
+ selectNode(nodeId: string): void;
32
+ isSelected(nodeId: string): boolean;
33
+ onClose(): void;
34
+ onSubmit(): void;
35
+ trackByNodeId(index: number, node: ReadonlyExtendedActivity): string;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<LinkNodeDialogComponent, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<LinkNodeDialogComponent, "link-node-dialog", never, {}, { "close": "close"; "linkNodes": "linkNodes"; }, never, never, false, never>;
38
+ }
@@ -0,0 +1,34 @@
1
+ import { EventEmitter, OnInit } from "@angular/core";
2
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
3
+ import * as i0 from "@angular/core";
4
+ type _ToolbarItem = {
5
+ id: string;
6
+ label: string;
7
+ svg: SafeHtml;
8
+ action: () => void;
9
+ };
10
+ export interface FloatingToolbarVisibility {
11
+ resetView?: boolean;
12
+ zoomIn?: boolean;
13
+ zoomOut?: boolean;
14
+ export?: boolean;
15
+ }
16
+ export declare class FloatingToolBarComponent implements OnInit {
17
+ private sanitizer;
18
+ visibility: FloatingToolbarVisibility;
19
+ toolbarConfig: Readonly<_ToolbarItem>[];
20
+ resetViewChange: EventEmitter<void>;
21
+ zoomInChange: EventEmitter<void>;
22
+ zoomOutChange: EventEmitter<void>;
23
+ exportImageChange: EventEmitter<void>;
24
+ constructor(sanitizer: DomSanitizer);
25
+ ngOnInit(): void;
26
+ resetView(): void;
27
+ zoomIn(): void;
28
+ zoomOut(): void;
29
+ exportImage(): void;
30
+ trackById(index: number, item: _ToolbarItem): string;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<FloatingToolBarComponent, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<FloatingToolBarComponent, "graph-floating-toolbar", never, { "visibility": "visibility"; }, { "resetViewChange": "resetViewChange"; "zoomInChange": "zoomInChange"; "zoomOutChange": "zoomOutChange"; "exportImageChange": "exportImageChange"; }, never, never, false, never>;
33
+ }
34
+ export {};
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./floating-toolbar.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "@angular/material/tooltip";
5
+ export declare class FloatingToolbarModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<FloatingToolbarModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FloatingToolbarModule, [typeof i1.FloatingToolBarComponent], [typeof i2.CommonModule, typeof i3.MatTooltipModule], [typeof i1.FloatingToolBarComponent]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<FloatingToolbarModule>;
9
+ }
@@ -0,0 +1,27 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
3
+ import * as i0 from "@angular/core";
4
+ export interface NodeToolbarPosition {
5
+ x: number;
6
+ y: number;
7
+ }
8
+ export interface NodeActionToolbarAction {
9
+ id: string;
10
+ label: string;
11
+ svg: SafeHtml;
12
+ action: () => void;
13
+ }
14
+ export declare class NodeActionToolbarComponent {
15
+ private sanitizer;
16
+ isVisible: boolean;
17
+ position: NodeToolbarPosition;
18
+ deleteNode: EventEmitter<void>;
19
+ linkNode: EventEmitter<void>;
20
+ toolbarActions: NodeActionToolbarAction[];
21
+ constructor(sanitizer: DomSanitizer);
22
+ onDeleteNode(): void;
23
+ onLinkNode(): void;
24
+ trackById(index: number, item: NodeActionToolbarAction): string;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<NodeActionToolbarComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<NodeActionToolbarComponent, "node-action-toolbar", never, { "isVisible": "isVisible"; "position": "position"; }, { "deleteNode": "deleteNode"; "linkNode": "linkNode"; }, never, never, false, never>;
27
+ }
@@ -0,0 +1,27 @@
1
+ import { EventEmitter, SimpleChanges } from '@angular/core';
2
+ import { ActivityDisplayType } from '../../utils/node-mappings';
3
+ import { ReadonlyExtendedActivity } from '../../types/extended-activity';
4
+ import * as i0 from "@angular/core";
5
+ export declare class NodeDetailsSidebarComponent {
6
+ isOpen: boolean;
7
+ nodeData: ReadonlyExtendedActivity | null;
8
+ close: EventEmitter<void>;
9
+ activityTypeChange: EventEmitter<ActivityDisplayType>;
10
+ descriptionChange: EventEmitter<string>;
11
+ readonly activityDisplayTypes: ActivityDisplayType[];
12
+ transformedActivityName: string;
13
+ selectedActivityType: ActivityDisplayType | null;
14
+ ngOnChanges(changes: SimpleChanges): void;
15
+ private initializeActivityType;
16
+ onDescriptionChange(event: Event): void;
17
+ private onActivityTypeChange;
18
+ onActivityTypeSelectChange(event: Event): void;
19
+ onClose(): void;
20
+ getNodeIcon(): string;
21
+ getNodeColorClass(): string;
22
+ getReviewColor(): string;
23
+ getReviewLabel(): string;
24
+ trackByValue(index: number, type: ActivityDisplayType): string;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<NodeDetailsSidebarComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<NodeDetailsSidebarComponent, "node-details-sidebar", never, { "isOpen": "isOpen"; "nodeData": "nodeData"; }, { "close": "close"; "activityTypeChange": "activityTypeChange"; "descriptionChange": "descriptionChange"; }, never, never, false, never>;
27
+ }
@@ -0,0 +1,14 @@
1
+ import { OnInit } from "@angular/core";
2
+ import { ReadonlyExtendedActivity } from "../../types/extended-activity";
3
+ import * as i0 from "@angular/core";
4
+ export declare class NodeSearchPanelComponent implements OnInit {
5
+ nodes: ReadonlyExtendedActivity[];
6
+ private readonly searchChange;
7
+ private readonly selectNodeChange;
8
+ filteredNodes: ReadonlyExtendedActivity[];
9
+ ngOnInit(): void;
10
+ onSearchChange(event: Event): void;
11
+ onSelectNodeChange(event: Event): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<NodeSearchPanelComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<NodeSearchPanelComponent, "node-search-panel", never, { "nodes": "nodes"; }, { "searchChange": "searchChange"; "selectNodeChange": "selectNodeChange"; }, never, never, false, never>;
14
+ }
@@ -0,0 +1,11 @@
1
+ import { EventEmitter, OnInit } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ export declare class WxCCActionsBarComponent implements OnInit {
4
+ save: EventEmitter<void>;
5
+ reset: EventEmitter<void>;
6
+ complete: EventEmitter<void>;
7
+ exportNonIr: EventEmitter<void>;
8
+ ngOnInit(): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<WxCCActionsBarComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<WxCCActionsBarComponent, "wxcc-actions-bar", never, {}, { "save": "save"; "reset": "reset"; "complete": "complete"; "exportNonIr": "exportNonIr"; }, never, never, false, never>;
11
+ }
@@ -0,0 +1,24 @@
1
+ import { EventEmitter, OnInit } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ export declare class WxCCFileSelectionBarComponent implements OnInit {
4
+ fileNames: {
5
+ fileName: string;
6
+ host: string;
7
+ }[];
8
+ selectedFileName: string;
9
+ selectedHost: string;
10
+ fileNameSelectionChange: EventEmitter<{
11
+ host: string;
12
+ fileName: string;
13
+ }>;
14
+ readonly hostFileNames: Map<string, string[]>;
15
+ ngOnInit(): void;
16
+ get fileNamesByHost(): string[];
17
+ get hosts(): string[] | null;
18
+ onFileSelectionChange(fileName: string): void;
19
+ onHostSelectionChange(host: string): void;
20
+ trackByFileName(_index: number, fileName: string): string;
21
+ trackByHost(_index: number, host: string): string;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<WxCCFileSelectionBarComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<WxCCFileSelectionBarComponent, "wxcc-file-selection-bar", never, { "fileNames": "fileNames"; "selectedFileName": "selectedFileName"; "selectedHost": "selectedHost"; }, { "fileNameSelectionChange": "fileNameSelectionChange"; }, never, never, false, never>;
24
+ }
@@ -0,0 +1,66 @@
1
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, OnChanges, OnDestroy, SimpleChanges } from "@angular/core";
2
+ import { IWxCCFlowchart } from "../../types/wxcc";
3
+ import { ActivityDisplayType } from "../../utils/node-mappings";
4
+ import { WxCC2GraphService } from "../../services/wxcc2graph.service";
5
+ import { NodeToolbarPosition } from "../node-action-toolbar/node-action-toolbar.component";
6
+ import { NewNodeData } from "../dialogs/add-node-dialog/add-node-dialog.component";
7
+ import { LinkNodeData } from "../dialogs/link-node-dialog/link-node-dialog.component";
8
+ import { MatDialog } from "@angular/material/dialog";
9
+ import { ReadonlyExtendedActivity } from "../../types/extended-activity";
10
+ import { WxCCActivityCreationService } from "../../services/wxcc-activity-creation.service";
11
+ import * as i0 from "@angular/core";
12
+ export declare class WxCCFlowchartComponent implements AfterViewInit, OnChanges, OnDestroy {
13
+ private readonly wxcc2graph;
14
+ private readonly dialog;
15
+ private readonly wxccActivityCreationService;
16
+ private cdr;
17
+ flowchart: IWxCCFlowchart;
18
+ flowchartContainer: ElementRef<HTMLElement>;
19
+ private cy?;
20
+ private viewReady;
21
+ private readonly layoutOptions;
22
+ isSidebarOpen: boolean;
23
+ selectedNodeData: ReadonlyExtendedActivity | null;
24
+ isSearchPanelVisible: boolean;
25
+ searchPanelVisible: boolean;
26
+ isNodeToolbarVisible: boolean;
27
+ nodeToolbarPosition: NodeToolbarPosition;
28
+ availableNodes: ReadonlyExtendedActivity[];
29
+ isLinkDialogOpen: boolean;
30
+ selectedEdgeId: string | null;
31
+ selectedEdgeDeleteButtonPosition: {
32
+ x: number;
33
+ y: number;
34
+ } | null;
35
+ constructor(wxcc2graph: WxCC2GraphService, dialog: MatDialog, wxccActivityCreationService: WxCCActivityCreationService, cdr: ChangeDetectorRef);
36
+ ngAfterViewInit(): void;
37
+ ngOnChanges(changes: SimpleChanges): void;
38
+ ngOnDestroy(): void;
39
+ private tryInit;
40
+ private init;
41
+ get activities(): import("../../types/extended-activity").ExtendedActivity[];
42
+ toggleSearchPanel(): void;
43
+ private setupEventListeners;
44
+ private updateToolbarPosition;
45
+ private hideNodeToolbar;
46
+ private getStylesheet;
47
+ onCloseSidebar(): void;
48
+ onDescriptionChange(description: string): void;
49
+ onActivityTypeChange(activityType: ActivityDisplayType): void;
50
+ onDeleteNode(): void;
51
+ onDeleteSelectedEdge(): void;
52
+ onLinkNodeRequest(): void;
53
+ onLinkNodes(linkData: LinkNodeData): void;
54
+ openAddNodeDialog(): void;
55
+ addActivity(newNodeData: NewNodeData): void;
56
+ onNodeSelectChange(id: string): void;
57
+ zoomIn(): void;
58
+ zoomOut(): void;
59
+ resetView(): void;
60
+ private runLayout;
61
+ private canCreateOutgoingLink;
62
+ private clearSelectedEdge;
63
+ private updateSelectedEdgeDeleteButtonPosition;
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<WxCCFlowchartComponent, never>;
65
+ static ɵcmp: i0.ɵɵComponentDeclaration<WxCCFlowchartComponent, "wxcc-flowchart", never, { "flowchart": "flowchart"; }, {}, never, never, false, never>;
66
+ }
@@ -0,0 +1,2 @@
1
+ import { StylesheetStyle } from "cytoscape";
2
+ export declare const StyleConfig: StylesheetStyle[];
@@ -0,0 +1,15 @@
1
+ export type WxCCBaseURLParams = {
2
+ customerId: number;
3
+ uccxIp: string;
4
+ fileName: string;
5
+ };
6
+ export type FileState = 'ORIG' | 'DRAFT' | 'COMPLETED';
7
+ /**
8
+ * Any WxCC flowchart api endpoint should go here
9
+ */
10
+ export declare const WXCC_FLOWCHART_API: {
11
+ GET_DATA: (params: WxCCBaseURLParams, state?: FileState, format?: 'ir') => string;
12
+ SAVE_DRAFT: (params: WxCCBaseURLParams, format?: 'ir') => string;
13
+ RESET_DRAFT: (params: WxCCBaseURLParams, format?: 'ir') => string;
14
+ COMPLETE_FLOW: (params: WxCCBaseURLParams, format?: 'ir') => string;
15
+ };
@@ -0,0 +1,21 @@
1
+ import { WxCC2GraphService } from "./wxcc2graph.service";
2
+ import { WxCCActivityManageService } from "./wxcc-activity-manage.service";
3
+ import { WxCCFlowchartNode } from "../types/wxcc";
4
+ import { WxCCTemplatedActivityType } from "../types/wxcc-activity";
5
+ import * as i0 from "@angular/core";
6
+ export interface CreateActivityRequest {
7
+ activityTypeName: WxCCTemplatedActivityType;
8
+ name: string;
9
+ }
10
+ export declare class WxCCActivityCreationService {
11
+ private readonly wxcc2graph;
12
+ private readonly wxccActivityTemplateService;
13
+ constructor(wxcc2graph: WxCC2GraphService, wxccActivityTemplateService: WxCCActivityManageService);
14
+ createAndSync(request: CreateActivityRequest): WxCCFlowchartNode;
15
+ private buildTemplatedActivity;
16
+ private seedNonIrActivity;
17
+ private getNonIrActivitiesMap;
18
+ private buildExtendedActivity;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<WxCCActivityCreationService, never>;
20
+ static ɵprov: i0.ɵɵInjectableDeclaration<WxCCActivityCreationService>;
21
+ }
@@ -0,0 +1,8 @@
1
+ import { WxCCActivityMap } from "../types/wxcc-activity";
2
+ import * as i0 from "@angular/core";
3
+ export declare class WxCCActivityManageService {
4
+ private readonly ACTIVITY_TEMPLATES;
5
+ create<K extends keyof WxCCActivityMap>(type: K): WxCCActivityMap[K];
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<WxCCActivityManageService, never>;
7
+ static ɵprov: i0.ɵɵInjectableDeclaration<WxCCActivityManageService>;
8
+ }
@@ -0,0 +1,43 @@
1
+ import { Observable } from "rxjs";
2
+ import { IWxCCJSON, IWxCCNonIRJSON } from "../types/wxcc";
3
+ import { WxCCBaseURLParams, FileState } from "../constants/wxcc-api.constants";
4
+ import { APIService } from "../../shared/api.service";
5
+ import * as i0 from "@angular/core";
6
+ export declare class WxCCAPIService {
7
+ private readonly api;
8
+ constructor(api: APIService);
9
+ /**
10
+ * Fetch original WXCC flow data
11
+ */
12
+ fetchWxCCFlowData(params: WxCCBaseURLParams, state?: FileState): Observable<IWxCCNonIRJSON>;
13
+ /**
14
+ * Fetch original WXCC flow data as IR format
15
+ */
16
+ fetchWxCCFlowDataIR(params: WxCCBaseURLParams, state?: FileState): Observable<IWxCCJSON>;
17
+ /**
18
+ * Save WXCC flow data as DRAFT
19
+ */
20
+ saveWxCCFlowData(params: WxCCBaseURLParams, data: IWxCCNonIRJSON): Observable<string>;
21
+ /**
22
+ * Save WXCC flow data as DRAFT in IR format
23
+ */
24
+ saveWxCCFlowDataIR(params: WxCCBaseURLParams, data: IWxCCJSON): Observable<string>;
25
+ /**
26
+ * Reset to original WXCC flow data
27
+ */
28
+ resetWxCCFlowData(params: WxCCBaseURLParams): Observable<IWxCCNonIRJSON>;
29
+ /**
30
+ * Reset to original WXCC flow data in IR format
31
+ */
32
+ resetWxCCFlowDataIR(params: WxCCBaseURLParams): Observable<IWxCCJSON>;
33
+ /**
34
+ * Save WXCC flow data as COMPLETED
35
+ */
36
+ completeWxCCFlowData(params: WxCCBaseURLParams, data: IWxCCNonIRJSON): Observable<string>;
37
+ /**
38
+ * Save WXCC flow data as COMPLETED in IR format
39
+ */
40
+ completeWxCCFlowDataIR(params: WxCCBaseURLParams, data: IWxCCJSON): Observable<string>;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<WxCCAPIService, never>;
42
+ static ɵprov: i0.ɵɵInjectableDeclaration<WxCCAPIService>;
43
+ }
@@ -0,0 +1,42 @@
1
+ import { IWxCCFlowchart, IWxCCJSON, IWxCCNonIRJSON, WxCCFlowchartEdge, WxCCFlowchartNode } from "../types/wxcc";
2
+ import { ExtendedActivity } from "../types/extended-activity";
3
+ import * as i0 from "@angular/core";
4
+ export declare class WxCC2GraphService {
5
+ wxccJSON: IWxCCJSON;
6
+ wxccNonIRJSON: IWxCCNonIRJSON;
7
+ parseWxCC(wxcc: IWxCCJSON, nonIr?: IWxCCNonIRJSON): IWxCCFlowchart;
8
+ setSourceDocuments(ir: IWxCCJSON, nonIr: IWxCCNonIRJSON): void;
9
+ updateActivityData(data: ExtendedActivity): boolean;
10
+ /**
11
+ * Add a new activity to the graph
12
+ */
13
+ addActivity(activity: ExtendedActivity): WxCCFlowchartNode;
14
+ /**
15
+ * Remove an activity and all its connected links
16
+ */
17
+ removeActivity(activityId: string): {
18
+ removedLinkIds: string[];
19
+ };
20
+ /**
21
+ * Add a new link between two activities
22
+ */
23
+ addLink(sourceActivityId: string, targetActivityId: string, label?: string): WxCCFlowchartEdge;
24
+ /**
25
+ * Remove a link by its id
26
+ */
27
+ removeLink(linkId: string): boolean;
28
+ /**
29
+ * Check if a link already exists between two nodes
30
+ */
31
+ linkExists(sourceActivityId: string, targetActivityId: string): boolean;
32
+ /**
33
+ * Get all activities for selection purposes
34
+ */
35
+ getAllActivities(): ExtendedActivity[];
36
+ getActivityById(id: string): ExtendedActivity | undefined;
37
+ generateId(): string;
38
+ private toWxCCNode;
39
+ private toWxCCEdge;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<WxCC2GraphService, never>;
41
+ static ɵprov: i0.ɵɵInjectableDeclaration<WxCC2GraphService>;
42
+ }
@@ -0,0 +1,47 @@
1
+ import { WxCCActivityType } from "./wxcc-activity";
2
+ export type ExtendedActivityType = WxCCActivityType | 'unmapped';
3
+ export type ReviewColorName = 'green' | 'yellow' | 'red';
4
+ export type ReviewLevel = 'confident' | 'low_confidence' | 'must_review';
5
+ export type Review = Readonly<{
6
+ color: ReviewColorName;
7
+ level: ReviewLevel;
8
+ reasons: string[];
9
+ }>;
10
+ export type SuggestedProperties = Readonly<{
11
+ uccxDescription?: string;
12
+ uccxComment?: string;
13
+ closestWxccActivity?: string;
14
+ mappingNotes?: string;
15
+ migrationInstructions?: string;
16
+ allAudioFilesInFlow?: string[];
17
+ uccxKeyFields?: string[];
18
+ uccxKeyFieldExamples?: Record<string, any>;
19
+ [key: string]: any;
20
+ }>;
21
+ export interface ExtendedActivity {
22
+ id: string;
23
+ name?: string;
24
+ review?: Review;
25
+ suggestedProperties?: SuggestedProperties;
26
+ uccxDisplayType?: string;
27
+ uccxTypeName?: string;
28
+ uccxWfId?: number;
29
+ unmappedReason?: string | null;
30
+ wxccActivityId?: string;
31
+ wxccActivityName?: ExtendedActivityType;
32
+ wxccGroup?: string;
33
+ iconUrl?: string;
34
+ }
35
+ export type ReadonlyExtendedActivity = Readonly<ExtendedActivity>;
36
+ export interface ExtendedLink {
37
+ id: string;
38
+ sourceActivityId: string;
39
+ targetActivityId: string;
40
+ conditionExpr?: string;
41
+ review?: Review;
42
+ uccxEdgeIndex?: number;
43
+ uccxFromWfId?: number;
44
+ uccxLabel?: string;
45
+ uccxToWfId?: number;
46
+ }
47
+ export type ReadonlyExtendedLink = Readonly<ExtendedLink>;
@@ -0,0 +1,96 @@
1
+ interface FlowType {
2
+ eventSourceName: string;
3
+ eventSpecificationName: string;
4
+ eventClassificationId: string;
5
+ eventClassificationName: string;
6
+ eventSpecificationId: string;
7
+ eventSourceId: string;
8
+ }
9
+ interface Prompt {
10
+ type: string;
11
+ value: string;
12
+ name: string;
13
+ }
14
+ interface SetVariableArrayItem {
15
+ setTo: string;
16
+ id: string;
17
+ literal_invalid_error: boolean;
18
+ }
19
+ export type WxCCActivityType = 'NewPhoneContact' | 'end' | 'disconnect-contact' | 'queue-contact' | 'play-music' | 'play-message' | 'wait-activity' | 'set-variable' | 'ivr-menu' | 'ivr-collectdigits' | 'condition-activity' | 'business-hours' | 'blind-transfer';
20
+ interface WxCCActivityBase<TProps, TActivity extends WxCCActivityType = WxCCActivityType> {
21
+ id: string;
22
+ name: string;
23
+ type: TActivity;
24
+ group: string;
25
+ properties: TProps;
26
+ }
27
+ interface BaseActivityProperties<TName extends WxCCActivityType> {
28
+ activityName: TName;
29
+ activityId: string;
30
+ _renderRequestTimestamp: number;
31
+ }
32
+ interface MediaBaseProps<TName extends WxCCActivityType> extends BaseActivityProperties<TName> {
33
+ connector_name: string | null;
34
+ name: string;
35
+ toggle: boolean;
36
+ prompts: Prompt[];
37
+ volumeGainDb: number;
38
+ voiceLanguage_name: string | null;
39
+ promptsTts: unknown;
40
+ connector: unknown;
41
+ speakingRate: number;
42
+ toggleLanguage: unknown;
43
+ voiceLanguage: unknown;
44
+ flowDecryptAccess: boolean;
45
+ 'connector:name': string | null;
46
+ 'voiceLanguage:name': unknown;
47
+ }
48
+ type NewPhoneContactProps = BaseActivityProperties<'NewPhoneContact'> & {
49
+ name: string;
50
+ event: string;
51
+ flowType: FlowType;
52
+ };
53
+ type PlayMessageProps = MediaBaseProps<'play-message'>;
54
+ type PlayMusicProps = MediaBaseProps<'play-music'>;
55
+ type IvrMenuProps = MediaBaseProps<'ivr-menu'> & {
56
+ menuLinks: string[];
57
+ 'menuLinks:input': string[];
58
+ menuLinks_input: string[];
59
+ entryTimeout: number;
60
+ interruptible: boolean;
61
+ };
62
+ type SetVariableProps = BaseActivityProperties<'set-variable'> & {
63
+ setTo: string;
64
+ name: string;
65
+ literal_invalid_error: boolean;
66
+ setVariablesArray: SetVariableArrayItem[];
67
+ flowDecryptAccess: boolean;
68
+ };
69
+ type BlindTransferProps = BaseActivityProperties<'blind-transfer'> & {
70
+ name: string;
71
+ transfertodn: string;
72
+ transfertodn_radioName: string;
73
+ 'transfertodn:radioName': string;
74
+ customAttributes: Record<string, unknown>;
75
+ flowDecryptAccess: boolean;
76
+ };
77
+ type BusinessHoursProps = BaseActivityProperties<'business-hours'>;
78
+ type NewPhoneContactActivity = WxCCActivityBase<NewPhoneContactProps, 'NewPhoneContact'>;
79
+ type PlayMessageActivity = WxCCActivityBase<PlayMessageProps, 'play-message'>;
80
+ type PlayMusicActivity = WxCCActivityBase<PlayMusicProps, 'play-music'>;
81
+ type IvrMenuActivity = WxCCActivityBase<IvrMenuProps, 'ivr-menu'>;
82
+ type SetVariableActivity = WxCCActivityBase<SetVariableProps, 'set-variable'>;
83
+ type BlindTransferActivity = WxCCActivityBase<BlindTransferProps, 'blind-transfer'>;
84
+ type BusinessHoursActivity = WxCCActivityBase<BusinessHoursProps, 'business-hours'>;
85
+ export type WxCCActivity = NewPhoneContactActivity | PlayMessageActivity | PlayMusicActivity | IvrMenuActivity | SetVariableActivity | BlindTransferActivity | BusinessHoursActivity;
86
+ export type WxCCActivityMap = {
87
+ NewPhoneContact: NewPhoneContactActivity;
88
+ 'play-message': PlayMessageActivity;
89
+ 'play-music': PlayMusicActivity;
90
+ 'ivr-menu': IvrMenuActivity;
91
+ 'set-variable': SetVariableActivity;
92
+ 'blind-transfer': BlindTransferActivity;
93
+ 'business-hours': BusinessHoursActivity;
94
+ };
95
+ export type WxCCTemplatedActivityType = keyof WxCCActivityMap;
96
+ export {};