nuxeo-development-framework 4.1.0 → 4.1.2

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 (89) hide show
  1. package/bundles/nuxeo-development-framework.umd.js +1025 -607
  2. package/bundles/nuxeo-development-framework.umd.js.map +1 -1
  3. package/esm2015/lib/components/correspondence-relation/components/correspondence-relation-list/correspondence-relation-list.component.js +2 -2
  4. package/esm2015/lib/components/diagrams/components/circle-node/circle-node.component.js +6 -7
  5. package/esm2015/lib/components/diagrams/components/connection-label.component.js +92 -0
  6. package/esm2015/lib/components/diagrams/components/content-node/content-node.component.js +7 -8
  7. package/esm2015/lib/components/diagrams/components/custom-connection.component.js +68 -32
  8. package/esm2015/lib/components/diagrams/components/custom-socket.component.js +22 -19
  9. package/esm2015/lib/components/diagrams/components/gateway-node/gateway-node.component.js +18 -0
  10. package/esm2015/lib/components/diagrams/components/gateway-ports.component.js +118 -0
  11. package/esm2015/lib/components/diagrams/components/index.js +5 -1
  12. package/esm2015/lib/components/diagrams/components/node-inputs.component.js +34 -35
  13. package/esm2015/lib/components/diagrams/components/node-outputs.component.js +30 -31
  14. package/esm2015/lib/components/diagrams/components/node-ports.component.js +98 -0
  15. package/esm2015/lib/components/diagrams/components/remove-button.component.js +46 -43
  16. package/esm2015/lib/components/diagrams/components/template-node/template-node.component.js +6 -7
  17. package/esm2015/lib/components/diagrams/constants/node-type.js +2 -1
  18. package/esm2015/lib/components/diagrams/constants/sizes.js +2 -1
  19. package/esm2015/lib/components/diagrams/constants/status.js +4 -1
  20. package/esm2015/lib/components/diagrams/diagrams.module.js +14 -6
  21. package/esm2015/lib/components/diagrams/directive/diagram.directive.js +9 -6
  22. package/esm2015/lib/components/diagrams/editor/customize.js +16 -12
  23. package/esm2015/lib/components/diagrams/editor/editor.js +21 -19
  24. package/esm2015/lib/components/diagrams/editor/overrides/connection-path.transformers.js +32 -7
  25. package/esm2015/lib/components/diagrams/editor/path-plugin.js +10 -9
  26. package/esm2015/lib/components/diagrams/models/base-node.model.js +3 -2
  27. package/esm2015/lib/components/diagrams/models/connection.model.js +11 -4
  28. package/esm2015/lib/components/diagrams/models/gate-way.model.js +11 -0
  29. package/esm2015/lib/components/diagrams/models/index.js +2 -1
  30. package/esm2015/lib/components/diagrams/models/ports.model.js +14 -0
  31. package/esm2015/lib/components/diagrams/models/socket.model.js +5 -4
  32. package/esm2015/lib/components/diagrams/services/diagram.service.js +77 -29
  33. package/esm2015/lib/components/diagrams/services/workflow.service.js +14 -19
  34. package/esm2015/lib/components/diagrams/types/common.type.js +1 -1
  35. package/esm2015/lib/components/diagrams/types/connection-config.type.js +2 -0
  36. package/esm2015/lib/components/diagrams/types/connection-label.type.js +2 -0
  37. package/esm2015/lib/components/diagrams/types/diagram-config.type.js +1 -1
  38. package/esm2015/lib/components/diagrams/types/diagram-editor.type.js +1 -1
  39. package/esm2015/lib/components/diagrams/types/index.js +6 -2
  40. package/esm2015/lib/components/diagrams/types/node-definition.js +1 -1
  41. package/esm2015/lib/components/diagrams/types/path.type.js +1 -1
  42. package/esm2015/lib/components/diagrams/types/ports-config.type.js +2 -0
  43. package/esm2015/lib/components/diagrams/types/socket.type.js +2 -0
  44. package/esm2015/lib/components/diagrams/utilities/common.js +35 -0
  45. package/esm2015/lib/components/diagrams/utilities/index.js +3 -1
  46. package/esm2015/lib/components/diagrams/utilities/random.js +11 -0
  47. package/esm2015/lib/components/diagrams/utilities/remove.util.js +2 -2
  48. package/esm2015/lib/components/file-manger/components/create-modal/create-modal.component.js +238 -200
  49. package/esm2015/lib/components/file-manger/file-manger.module.js +10 -6
  50. package/esm2015/lib/shared/components/nuxeo-dialog/nuxeo.dialog.js +2 -2
  51. package/fesm2015/nuxeo-development-framework.js +1194 -640
  52. package/fesm2015/nuxeo-development-framework.js.map +1 -1
  53. package/lib/components/diagrams/components/base-node.component.d.ts +1 -0
  54. package/lib/components/diagrams/components/connection-label.component.d.ts +19 -0
  55. package/lib/components/diagrams/components/custom-connection.component.d.ts +5 -0
  56. package/lib/components/diagrams/components/gateway-node/gateway-node.component.d.ts +6 -0
  57. package/lib/components/diagrams/components/gateway-ports.component.d.ts +12 -0
  58. package/lib/components/diagrams/components/index.d.ts +4 -0
  59. package/lib/components/diagrams/components/node-ports.component.d.ts +13 -0
  60. package/lib/components/diagrams/constants/node-type.d.ts +1 -0
  61. package/lib/components/diagrams/constants/sizes.d.ts +1 -0
  62. package/lib/components/diagrams/constants/status.d.ts +3 -0
  63. package/lib/components/diagrams/diagrams.module.d.ts +12 -8
  64. package/lib/components/diagrams/editor/overrides/connection-path.transformers.d.ts +2 -7
  65. package/lib/components/diagrams/models/base-node.model.d.ts +3 -2
  66. package/lib/components/diagrams/models/connection.model.d.ts +9 -1
  67. package/lib/components/diagrams/models/gate-way.model.d.ts +8 -0
  68. package/lib/components/diagrams/models/index.d.ts +1 -0
  69. package/lib/components/diagrams/models/ports.model.d.ts +11 -0
  70. package/lib/components/diagrams/models/socket.model.d.ts +3 -1
  71. package/lib/components/diagrams/services/diagram.service.d.ts +20 -9
  72. package/lib/components/diagrams/services/workflow.service.d.ts +0 -1
  73. package/lib/components/diagrams/types/common.type.d.ts +5 -0
  74. package/lib/components/diagrams/types/connection-config.type.d.ts +11 -0
  75. package/lib/components/diagrams/types/connection-label.type.d.ts +4 -0
  76. package/lib/components/diagrams/types/diagram-config.type.d.ts +6 -0
  77. package/lib/components/diagrams/types/diagram-editor.type.d.ts +3 -2
  78. package/lib/components/diagrams/types/index.d.ts +5 -1
  79. package/lib/components/diagrams/types/node-definition.d.ts +1 -0
  80. package/lib/components/diagrams/types/path.type.d.ts +1 -0
  81. package/lib/components/diagrams/types/ports-config.type.d.ts +11 -0
  82. package/lib/components/diagrams/types/socket.type.d.ts +5 -0
  83. package/lib/components/diagrams/utilities/common.d.ts +19 -0
  84. package/lib/components/diagrams/utilities/index.d.ts +2 -0
  85. package/lib/components/diagrams/utilities/random.d.ts +1 -0
  86. package/lib/components/diagrams/utilities/remove.util.d.ts +1 -1
  87. package/lib/components/file-manger/components/create-modal/create-modal.component.d.ts +13 -19
  88. package/lib/components/file-manger/file-manger.module.d.ts +2 -1
  89. package/package.json +1 -1
@@ -1814,7 +1814,7 @@ class NdfNuxeoDialog extends BaseComponent {
1814
1814
  }
1815
1815
  }
1816
1816
  NdfNuxeoDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfNuxeoDialog, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
1817
- NdfNuxeoDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: { dialogTitle: "dialogTitle", subTitle: "subTitle", loaderMode: "loaderMode" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true }], viewQueries: [{ propertyName: "dialogBody", first: true, predicate: ["dialogBody"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div SetDirRtl class=\"ndf-dialog-wrapper flex flex-col\">\r\n\t<div\r\n\t\tclass=\"dialog-header flex h-20 p-6 justify-between items-center w-full bg-vapor text-blue-munsell text-xl not-italic font-bold leading-7\"\r\n\t>\r\n\t\t<div class=\"flex flex-col\">\r\n\t\t\t<span>{{ data?.dialogConfig?.title || dialogTitle }}</span>\r\n\t\t\t<span class=\"text-base font-normal\"\r\n\t\t\t\t>{{ data?.dialogConfig?.subTitle || subTitle }}</span\r\n\t\t\t>\r\n\t\t</div>\r\n\t\t<button\r\n\t\t\tclass=\"flex items-center justify-center rounded-full bg-anti-flash-white w-10 h-10\"\r\n\t\t\t(click)=\"executeAction()\"\r\n\t\t\tmatTooltip=\"{{'BUTTONS.CLOSE' | translate}}\"\r\n\t\t>\r\n\t\t\t<mat-icon class=\"icon-size-3.5\" [svgIcon]=\"'icons:cancel-icon'\">\r\n\t\t\t</mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<div\r\n\t\t#dialogBody\r\n\t\tclass=\"dialog-body flex flex-col gap-y-4 p-6 overflow-y-auto relative z-99\"\r\n\t\t[ngClass]=\"{'overflow-hidden': loading}\"\r\n\t>\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"data?.dialogConfig?.contentTemplate || contentTemplate\"\r\n\t\t></ng-container>\r\n\t\t<ng-container *ngIf=\"loading\">\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0 bg-gray-300 opacity-40 z-999\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t></div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0 z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'spinner'\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t>\r\n\t\t\t\t<mat-spinner\r\n\t\t\t\t\t[value]=\"90\"\r\n\t\t\t\t\t[strokeWidth]=\"4\"\r\n\t\t\t\t\toverlay=\"true\"\r\n\t\t\t\t\t[diameter]=\"40\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t>\r\n\t\t\t\t</mat-spinner>\r\n\t\t\t</div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"block w-full h-px absolute inset-0 z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'progressBar'\"\r\n\t\t\t>\r\n\t\t\t\t<mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</div>\r\n\t<div class=\"flex w-full justify-end p-6 pt-0 gap-x-4\">\r\n\t\t<button class=\"cancelation-button\" (click)=\"executeAction()\">\r\n\t\t\t{{\"BUTTONS.CANCEL\" | translate}}\r\n\t\t</button>\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"(data?.dialogConfig?.actionsTemplate || actionsTemplate); context: { dialog: this }\"\r\n\t\t></ng-container>\r\n\t</div>\r\n</div>\r\n", styles: ["::ng-deep .ndf-dialog .mat-dialog-container{overflow:hidden!important;border-radius:8px!important}.ndf-dialog-wrapper .dialog-body{height:auto;max-height:calc(100vh - 208px)}\n"], components: [{ type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: SetDirRtlDirective, selector: "[SetDirRtl]" }, { type: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "translate": i1.TranslatePipe } });
1817
+ NdfNuxeoDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: { dialogTitle: "dialogTitle", subTitle: "subTitle", loaderMode: "loaderMode" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true }], viewQueries: [{ propertyName: "dialogBody", first: true, predicate: ["dialogBody"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div SetDirRtl class=\"ndf-dialog-wrapper flex flex-col h-full\">\r\n\t<div\r\n\t\tclass=\"dialog-header flex h-20 p-6 justify-between items-center w-full bg-vapor text-blue-munsell text-xl not-italic font-bold leading-7\"\r\n\t>\r\n\t\t<div class=\"flex flex-col\">\r\n\t\t\t<span>{{ data?.dialogConfig?.title || dialogTitle }}</span>\r\n\t\t\t<span class=\"text-base font-normal\"\r\n\t\t\t\t>{{ data?.dialogConfig?.subTitle || subTitle }}</span\r\n\t\t\t>\r\n\t\t</div>\r\n\t\t<button\r\n\t\t\tclass=\"flex items-center justify-center rounded-full bg-anti-flash-white w-10 h-10\"\r\n\t\t\t(click)=\"executeAction()\"\r\n\t\t\tmatTooltip=\"{{'BUTTONS.CLOSE' | translate}}\"\r\n\t\t>\r\n\t\t\t<mat-icon class=\"icon-size-3.5\" [svgIcon]=\"'icons:cancel-icon'\">\r\n\t\t\t</mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<div\r\n\t\t#dialogBody\r\n\t\tclass=\"dialog-body flex flex-col gap-y-4 p-6 overflow-y-auto relative z-99\"\r\n\t\t[ngClass]=\"{'overflow-hidden': loading}\"\r\n\t>\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"data?.dialogConfig?.contentTemplate || contentTemplate\"\r\n\t\t></ng-container>\r\n\t\t<ng-container *ngIf=\"loading\">\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0 bg-gray-300 opacity-40 z-999\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t></div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0 z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'spinner'\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t>\r\n\t\t\t\t<mat-spinner\r\n\t\t\t\t\t[value]=\"90\"\r\n\t\t\t\t\t[strokeWidth]=\"4\"\r\n\t\t\t\t\toverlay=\"true\"\r\n\t\t\t\t\t[diameter]=\"40\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t>\r\n\t\t\t\t</mat-spinner>\r\n\t\t\t</div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"block w-full h-px absolute inset-0 z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'progressBar'\"\r\n\t\t\t>\r\n\t\t\t\t<mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</div>\r\n\t<div class=\"flex w-full justify-end p-6 pt-0 gap-x-4\">\r\n\t\t<button class=\"cancelation-button\" (click)=\"executeAction()\">\r\n\t\t\t{{\"BUTTONS.CANCEL\" | translate}}\r\n\t\t</button>\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"(data?.dialogConfig?.actionsTemplate || actionsTemplate); context: { dialog: this }\"\r\n\t\t></ng-container>\r\n\t</div>\r\n</div>\r\n", styles: ["::ng-deep .ndf-dialog .mat-dialog-container{overflow:hidden!important;border-radius:8px!important}.ndf-dialog-wrapper .dialog-body{height:100%;max-height:calc(100vh - 208px)}:host{height:100%;display:block}\n"], components: [{ type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: SetDirRtlDirective, selector: "[SetDirRtl]" }, { type: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "translate": i1.TranslatePipe } });
1818
1818
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfNuxeoDialog, decorators: [{
1819
1819
  type: Component,
1820
1820
  args: [{
@@ -5657,7 +5657,7 @@ class CorrespondenceRelationListComponent {
5657
5657
  }
5658
5658
  }
5659
5659
  CorrespondenceRelationListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CorrespondenceRelationListComponent, deps: [{ token: CorrespondenceRelationService }, { token: i1$3.MatDialog }, { token: ViewerFilesService }, { token: DocumentsService }, { token: AdapterService }], target: i0.ɵɵFactoryTarget.Component });
5660
- CorrespondenceRelationListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CorrespondenceRelationListComponent, selector: "cts-correspondence-relation-list", inputs: { correspondence_id: "correspondence_id", reload: "reload" }, ngImport: i0, template: "<div class=\"relations-list\" *ngIf=\"relateddoc.length > 0\">\r\n <ng-container>\r\n <div *ngFor=\"let group of relateddoc; first as isFirst\">\r\n <mat-accordion class=\"example-headers-align\" multi>\r\n <mat-expansion-panel [expanded]=\"isFirst\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{ group[0] }}\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <mat-list>\r\n <div class=\"mat-list-items\" *ngFor=\"let item of group[1]\">\r\n <cts-item-list\r\n [item]=\"item\"\r\n [title]=\"item.title\"\r\n [iconname]=\"'link'\"\r\n [actions]=\"menu_actions\"\r\n (actionclicked)=\"handleMenuItemClicked($event)\"\r\n (itemClicked)=\"showCorrespondenceInViewer(item)\"\r\n [moreclasses]=\"'link-relation'\"\r\n ></cts-item-list>\r\n </div>\r\n </mat-list>\r\n </ng-template>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n </ng-container>\r\n</div>\r\n<div class=\"nocontent\" *ngIf=\"relateddoc.length === 0\">\r\n <p>{{ \"correspondence-relation.nocontent\" | translate }}</p>\r\n</div>\r\n", styles: [".relations-list{border:1px solid #eee}.relations-list .mat-expansion-panel{box-shadow:none!important}.relations-list .mat-expansion-panel-header{border-bottom:1px solid #d9dce2;background-color:#f5f6f8;height:50px!important}.relations-list .mat-expansion-panel-header:hover{background-color:#f5f6f8!important}.relations-list .mat-expansion-panel-header:focus{background-color:#f5f6f8!important}.relations-list .mat-expansion-panel-header-title{font-weight:500}.relations-list .mat-accordion .mat-expansion-panel{border-radius:0!important}.relations-list .mat-expansion-panel-body{padding:0!important}.nocontent{color:gray;padding:10px;font-size:14px;border:1px solid #d9dce2}.nocontent p{margin:0;text-align:center}\n"], components: [{ type: i6$3.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i6$3.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight"] }, { type: i2$4.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: ItemListComponent, selector: "cts-item-list", inputs: ["item", "iconname", "title", "actions", "isselected", "moreclasses"], outputs: ["itemClicked", "actionclicked"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6$3.MatAccordion, selector: "mat-accordion", inputs: ["multi", "displayMode", "togglePosition", "hideToggle"], exportAs: ["matAccordion"] }, { type: i6$3.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i6$3.MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }], pipes: { "translate": i1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
5660
+ CorrespondenceRelationListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CorrespondenceRelationListComponent, selector: "cts-correspondence-relation-list", inputs: { correspondence_id: "correspondence_id", reload: "reload" }, ngImport: i0, template: "<div class=\"relations-list\" *ngIf=\"relateddoc.length > 0\">\r\n <ng-container>\r\n <div *ngFor=\"let group of relateddoc; first as isFirst\">\r\n <mat-accordion class=\"example-headers-align\" multi>\r\n <mat-expansion-panel [expanded]=\"isFirst\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{('vocabulary.VOC_CorrespondenceRelationsNames.' + group[0]) | translate }}\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <mat-list>\r\n <div class=\"mat-list-items\" *ngFor=\"let item of group[1]\">\r\n <cts-item-list\r\n [item]=\"item\"\r\n [title]=\"item.title\"\r\n [iconname]=\"'link'\"\r\n [actions]=\"menu_actions\"\r\n (actionclicked)=\"handleMenuItemClicked($event)\"\r\n (itemClicked)=\"showCorrespondenceInViewer(item)\"\r\n [moreclasses]=\"'link-relation'\"\r\n ></cts-item-list>\r\n </div>\r\n </mat-list>\r\n </ng-template>\r\n </mat-expansion-panel>\r\n </mat-accordion>\r\n </div>\r\n </ng-container>\r\n</div>\r\n<div class=\"nocontent\" *ngIf=\"relateddoc.length === 0\">\r\n <p>{{ \"correspondence-relation.nocontent\" | translate }}</p>\r\n</div>\r\n", styles: [".relations-list{border:1px solid #eee}.relations-list .mat-expansion-panel{box-shadow:none!important}.relations-list .mat-expansion-panel-header{border-bottom:1px solid #d9dce2;background-color:#f5f6f8;height:50px!important}.relations-list .mat-expansion-panel-header:hover{background-color:#f5f6f8!important}.relations-list .mat-expansion-panel-header:focus{background-color:#f5f6f8!important}.relations-list .mat-expansion-panel-header-title{font-weight:500}.relations-list .mat-accordion .mat-expansion-panel{border-radius:0!important}.relations-list .mat-expansion-panel-body{padding:0!important}.nocontent{color:gray;padding:10px;font-size:14px;border:1px solid #d9dce2}.nocontent p{margin:0;text-align:center}\n"], components: [{ type: i6$3.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { type: i6$3.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight"] }, { type: i2$4.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: ItemListComponent, selector: "cts-item-list", inputs: ["item", "iconname", "title", "actions", "isselected", "moreclasses"], outputs: ["itemClicked", "actionclicked"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6$3.MatAccordion, selector: "mat-accordion", inputs: ["multi", "displayMode", "togglePosition", "hideToggle"], exportAs: ["matAccordion"] }, { type: i6$3.MatExpansionPanelTitle, selector: "mat-panel-title" }, { type: i6$3.MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }], pipes: { "translate": i1.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
5661
5661
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CorrespondenceRelationListComponent, decorators: [{
5662
5662
  type: Component,
5663
5663
  args: [{
@@ -20735,10 +20735,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
20735
20735
  args: ['fileInput']
20736
20736
  }] } });
20737
20737
 
20738
- class CreateModalComponent {
20739
- constructor(data, dialogRef, uploadMangmentService, dialogMangmentService, fileMangerService, tosterService, formBuilder, adapeter, fileManagerService, appConfService, dateHelperService, translationService, userService, nuxeoService, environment, dynamicFormService) {
20738
+ class CreateModalComponent extends BaseDialogComponent {
20739
+ constructor(data, uploadMangmentService, dialogMangmentService, fileMangerService, tosterService, formBuilder, adapeter, fileManagerService, appConfService, dateHelperService, userService, environment, injector, dynamicFormService) {
20740
+ super(injector);
20740
20741
  this.data = data;
20741
- this.dialogRef = dialogRef;
20742
20742
  this.uploadMangmentService = uploadMangmentService;
20743
20743
  this.dialogMangmentService = dialogMangmentService;
20744
20744
  this.fileMangerService = fileMangerService;
@@ -20748,9 +20748,7 @@ class CreateModalComponent {
20748
20748
  this.fileManagerService = fileManagerService;
20749
20749
  this.appConfService = appConfService;
20750
20750
  this.dateHelperService = dateHelperService;
20751
- this.translationService = translationService;
20752
20751
  this.userService = userService;
20753
- this.nuxeoService = nuxeoService;
20754
20752
  this.environment = environment;
20755
20753
  this.dynamicFormService = dynamicFormService;
20756
20754
  this.addingProperties = false;
@@ -20759,37 +20757,149 @@ class CreateModalComponent {
20759
20757
  this.showRenderer = false; // used to force renderer to feel changes in forms and value when changing files
20760
20758
  // uploadFinishSubscription: Subscription;
20761
20759
  this.usingExtraFields = false; // flage to switch between static form types
20762
- this.isArabic = false;
20763
20760
  this.showStaticForm = false;
20764
20761
  this.disableCreateWhenFinishBtn = true;
20765
20762
  this.creating = false;
20766
20763
  this.displayNoteMessage = true;
20764
+ this.createWhenFinish = () => {
20765
+ this.createWhenFinishMode = true;
20766
+ return this.minimizDialog();
20767
+ };
20768
+ this.startAddingProperties = () => {
20769
+ //if starting from filemnager then i have fixed file type for all attachmetn and single dynaimc form type
20770
+ if (this.source === 'fileManger') {
20771
+ // this.dynamicFormService.getDynamicForm(this.fileType).subscribe(res => {
20772
+ this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.forEach((file) => {
20773
+ file['fileType'] = this.source === 'fileManger' ? this.fileType : {};
20774
+ file['dynamicForm'] = this.dialogMangmentService.storedDynamicForm;
20775
+ file['dynamicData'] = {};
20776
+ file['staticFormValid'] = this.usingExtraFields ? false : true;
20777
+ file['staticData'] = this.setStaticData(file.title ? file.title : file.name);
20778
+ file['generalValidationValid'] = true;
20779
+ });
20780
+ this.uploadMangmentService.uploadedFilesStatus.allfiles.forEach((file) => {
20781
+ file['fileType'] = this.source === 'fileManger' ? this.fileType : {};
20782
+ file['dynamicForm'] = this.dialogMangmentService.storedDynamicForm;
20783
+ file['dynamicData'] = {};
20784
+ file['staticFormValid'] = this.usingExtraFields ? false : true;
20785
+ file['staticData'] = this.setStaticData(file.title ? file.title : file.name);
20786
+ file['generalValidationValid'] = true;
20787
+ });
20788
+ }
20789
+ this.addingProperties = true;
20790
+ this.uploadMangmentService.addingPropertiesMode = true;
20791
+ };
20792
+ this.createDocument = () => {
20793
+ var _a, _b;
20794
+ this.creating = true;
20795
+ this.uploadMangmentService.failedFiles = [];
20796
+ this.uploadMangmentService.GeneralFormValidation = this.checkValidation();
20797
+ if (this.uploadMangmentService.GeneralFormValidation) {
20798
+ let apiCalls = [];
20799
+ if (((_a = this.data) === null || _a === void 0 ? void 0 : _a.path.includes('/default-domain/workspaces/DMSWorkspaces')) ||
20800
+ ((_b = this.data) === null || _b === void 0 ? void 0 : _b.path.includes('/default-domain/UserWorkspaces/'))) {
20801
+ this.constructPayLoadToWorkSpace(this.uploadMangmentService.uploadedFilesStatus.uploadedFiles);
20802
+ this.payloadList.forEach((payload) => {
20803
+ apiCalls.push(this.fileMangerService.createFile(payload, this.fileManagerService.selectedFolderId, 'DMS.CreateDocumentFromBlob'));
20804
+ });
20805
+ }
20806
+ else {
20807
+ this.constructPayLoad(this.uploadMangmentService.uploadedFilesStatus.uploadedFiles);
20808
+ this.payloadList.forEach((payload) => {
20809
+ apiCalls.push(this.fileMangerService.createFile(payload, this.fileManagerService.selectedFolderId));
20810
+ });
20811
+ }
20812
+ return forkJoin(apiCalls).pipe(tap((response) => {
20813
+ this.creating = false;
20814
+ response.forEach((singleRes) => {
20815
+ if (singleRes['status'] && singleRes['status'] === 'failed') {
20816
+ this.uploadMangmentService.failedFiles.push(singleRes['originFile']);
20817
+ }
20818
+ });
20819
+ if (this.uploadMangmentService.failedFiles.length > 0) {
20820
+ this.tosterService.show('error', 'TOASTER.ERROR', 'TOASTER.UPLOAD_ERROR');
20821
+ this.uploadMangmentService.uploadedFilesStatus.uploadedFiles = [];
20822
+ this.selectedFile = null;
20823
+ this.uploadMangmentService.uploadedFilesStatus.allfiles = [
20824
+ ...this.uploadMangmentService.failedFiles
20825
+ ];
20826
+ }
20827
+ else {
20828
+ this.fileMangerService.onRefreshingFileManger.next();
20829
+ this.tosterService.show('success', 'TOASTER.SUCCESS', 'TOASTER.FILE_CREATED_SUCCE');
20830
+ super.close(false);
20831
+ this.uploadMangmentService.resetStatus();
20832
+ }
20833
+ }, (error) => {
20834
+ this.creating = false;
20835
+ }));
20836
+ }
20837
+ else {
20838
+ this.creating = false;
20839
+ return of(null);
20840
+ }
20841
+ };
20842
+ this.tryAgainCreateDocument = () => {
20843
+ this.uploadMangmentService.uploadFilesMangment(this.uploadMangmentService.failedFiles);
20844
+ return of(null);
20845
+ };
20846
+ this.minimizDialog = () => {
20847
+ super.close(true);
20848
+ return of(null);
20849
+ };
20850
+ this.ApplyChangesToAll = () => {
20851
+ this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.forEach((file) => {
20852
+ let title = file['staticData']
20853
+ ? file['staticData']['title']
20854
+ : file.name;
20855
+ file['fileType'] = this.selectedFile.fileType;
20856
+ file['dynamicForm'] = this.selectedFile.dynamicForm;
20857
+ file['dynamicData'] = this.selectedFile.dynamicData;
20858
+ file['staticFormValid'] = this.selectedFile.staticFormValid;
20859
+ file['staticData'] = Object.assign({}, this.fileForm.value);
20860
+ file['staticData']['title'] = title;
20861
+ });
20862
+ this.uploadMangmentService.uploadedFilesStatus.allfiles.forEach((file) => {
20863
+ let title = file['staticData'] ? file['staticData']['title'] : file.name;
20864
+ file['fileType'] = this.selectedFile.fileType;
20865
+ file['dynamicForm'] = this.selectedFile.dynamicForm;
20866
+ file['dynamicData'] = this.selectedFile.dynamicData;
20867
+ file['staticFormValid'] = this.selectedFile.staticFormValid;
20868
+ file['staticData'] = Object.assign({}, this.fileForm.value);
20869
+ file['staticData']['title'] = title;
20870
+ });
20871
+ return of(null);
20872
+ };
20767
20873
  this.myEnvironment = this.environment;
20768
20874
  this.createWhenFinishMode = false;
20769
20875
  this.addingProperties = this.uploadMangmentService.addingPropertiesMode;
20770
20876
  this.fileType = this.dialogMangmentService.fileType; // object that was constructed inside subtypes service
20771
20877
  this.source = this.dialogMangmentService.addingFrom;
20772
- this.fileManagerService.getFileSchemas(this.fileType.type).subscribe(schemas => {
20773
- schemas.map(item => {
20774
- if (item.name === "generaldocument") {
20878
+ this.fileManagerService
20879
+ .getFileSchemas(this.fileType.type)
20880
+ .subscribe((schemas) => {
20881
+ schemas.map((item) => {
20882
+ if (item.name === 'generaldocument') {
20775
20883
  this.usingExtraFields = true;
20776
20884
  }
20777
20885
  });
20778
20886
  this.initiatfileForm();
20779
20887
  this.uploadMangmentService.gettingPropFromModal({
20780
- 'fileType': this.source === 'fileManger' ? this.fileType : {},
20781
- 'dynamicForm': this.dialogMangmentService.storedDynamicForm,
20782
- 'dynamicData': {},
20783
- 'staticFormValid': this.usingExtraFields ? false : true,
20784
- 'generalValidationValid': true,
20785
- 'usingExtraFields': this.usingExtraFields,
20786
- 'path': this.data.path
20888
+ fileType: this.source === 'fileManger' ? this.fileType : {},
20889
+ dynamicForm: this.dialogMangmentService.storedDynamicForm,
20890
+ dynamicData: {},
20891
+ staticFormValid: this.usingExtraFields ? false : true,
20892
+ generalValidationValid: true,
20893
+ usingExtraFields: this.usingExtraFields,
20894
+ path: this.data.path
20787
20895
  });
20788
20896
  });
20789
20897
  }
20790
20898
  KeyUpEvent(event) {
20791
- if (this.addingProperties && this.uploadMangmentService.failedFiles.length === 0) {
20792
- if (this.uploadMangmentService.uploadedFilesStatus.uploadInProgress && !this.disableCreateWhenFinishBtn) {
20899
+ if (this.addingProperties &&
20900
+ this.uploadMangmentService.failedFiles.length === 0) {
20901
+ if (this.uploadMangmentService.uploadedFilesStatus.uploadInProgress &&
20902
+ !this.disableCreateWhenFinishBtn) {
20793
20903
  this.createWhenFinish();
20794
20904
  }
20795
20905
  else {
@@ -20798,17 +20908,16 @@ class CreateModalComponent {
20798
20908
  }
20799
20909
  }
20800
20910
  ngOnInit() {
20801
- this.langSubscription = this.translationService.isArabic.subscribe(res => {
20802
- this.isArabic = res;
20803
- });
20804
20911
  if (this.uploadMangmentService.uploadFinishSubscription) {
20805
20912
  this.uploadMangmentService.uploadFinishSubscription.unsubscribe();
20806
20913
  }
20807
- this.uploadMangmentService.uploadFinishSubscription = this.uploadMangmentService.onUploadFinish.subscribe(res => {
20808
- if (this.createWhenFinishMode || this.uploadMangmentService.failedFiles.length > 0) {
20809
- this.createDocument();
20810
- }
20811
- });
20914
+ this.uploadMangmentService.uploadFinishSubscription =
20915
+ this.uploadMangmentService.onUploadFinish.subscribe((res) => {
20916
+ if (this.createWhenFinishMode ||
20917
+ this.uploadMangmentService.failedFiles.length > 0) {
20918
+ this.createDocument();
20919
+ }
20920
+ });
20812
20921
  }
20813
20922
  initiatfileForm() {
20814
20923
  if (this.usingExtraFields) {
@@ -20834,43 +20943,16 @@ class CreateModalComponent {
20834
20943
  description: ['']
20835
20944
  });
20836
20945
  }
20837
- this.staticFormFields = this.appConfService.myConfiguration.staticFormFields;
20838
- }
20839
- createWhenFinish() {
20840
- this.createWhenFinishMode = true;
20841
- this.minimizDialog();
20946
+ this.staticFormFields =
20947
+ this.appConfService.myConfiguration.staticFormFields;
20842
20948
  }
20843
- closeDialog() {
20949
+ close() {
20844
20950
  this.uploadMangmentService.GeneralFormValidation = true;
20845
20951
  this.fileFormSubscription ? this.fileFormSubscription.unsubscribe() : '';
20846
20952
  this.addingProperties = false;
20847
20953
  this.uploadMangmentService.resetStatus();
20848
- this.dialogRef.close(false);
20849
- }
20850
- startAddingProperties() {
20851
- //if starting from filemnager then i have fixed file type for all attachmetn and single dynaimc form type
20852
- if (this.source === 'fileManger') {
20853
- // this.dynamicFormService.getDynamicForm(this.fileType).subscribe(res => {
20854
- this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.map(file => {
20855
- file['fileType'] = this.source === 'fileManger' ? this.fileType : {};
20856
- file['dynamicForm'] = this.dialogMangmentService.storedDynamicForm;
20857
- file['dynamicData'] = {};
20858
- file['staticFormValid'] = this.usingExtraFields ? false : true;
20859
- file['staticData'] = this.setStaticData(file.title ? file.title : file.name);
20860
- file['generalValidationValid'] = true;
20861
- });
20862
- this.uploadMangmentService.uploadedFilesStatus.allfiles.map(file => {
20863
- file['fileType'] = this.source === 'fileManger' ? this.fileType : {};
20864
- file['dynamicForm'] = this.dialogMangmentService.storedDynamicForm;
20865
- file['dynamicData'] = {};
20866
- file['staticFormValid'] = this.usingExtraFields ? false : true;
20867
- file['staticData'] = this.setStaticData(file.title ? file.title : file.name);
20868
- file['generalValidationValid'] = true;
20869
- });
20870
- // })
20871
- }
20872
- this.addingProperties = true;
20873
- this.uploadMangmentService.addingPropertiesMode = true;
20954
+ super.close();
20955
+ return of(null);
20874
20956
  }
20875
20957
  setStaticData(title) {
20876
20958
  if (this.usingExtraFields) {
@@ -20897,89 +20979,36 @@ class CreateModalComponent {
20897
20979
  };
20898
20980
  }
20899
20981
  }
20900
- createDocument() {
20901
- var _a, _b;
20902
- this.creating = true;
20903
- this.uploadMangmentService.failedFiles = [];
20904
- this.uploadMangmentService.GeneralFormValidation = this.checkValidation();
20905
- if (this.uploadMangmentService.GeneralFormValidation) {
20906
- let apiCalls = [];
20907
- if (((_a = this.data) === null || _a === void 0 ? void 0 : _a.path.includes('/default-domain/workspaces/DMSWorkspaces')) || ((_b = this.data) === null || _b === void 0 ? void 0 : _b.path.includes('/default-domain/UserWorkspaces/'))) {
20908
- this.constructPayLoadToWorkSpace(this.uploadMangmentService.uploadedFilesStatus.uploadedFiles);
20909
- this.payloadList.map(payload => {
20910
- apiCalls.push(this.fileMangerService.createFile(payload, this.fileManagerService.selectedFolderId, 'DMS.CreateDocumentFromBlob'));
20911
- });
20912
- }
20913
- else {
20914
- this.constructPayLoad(this.uploadMangmentService.uploadedFilesStatus.uploadedFiles);
20915
- this.payloadList.map(payload => {
20916
- apiCalls.push(this.fileMangerService.createFile(payload, this.fileManagerService.selectedFolderId));
20917
- });
20918
- }
20919
- forkJoin(apiCalls).subscribe(response => {
20920
- //console.log(res);
20921
- this.creating = false;
20922
- response.map(singleRes => {
20923
- if (singleRes['status'] && singleRes['status'] === 'failed') {
20924
- this.uploadMangmentService.failedFiles.push(singleRes['originFile']);
20925
- }
20926
- });
20927
- if (this.uploadMangmentService.failedFiles.length > 0) {
20928
- this.tosterService.show('error', 'TOASTER.ERROR', 'TOASTER.UPLOAD_ERROR');
20929
- this.uploadMangmentService.uploadedFilesStatus.uploadedFiles = [];
20930
- this.selectedFile = null;
20931
- this.uploadMangmentService.uploadedFilesStatus.allfiles = [...this.uploadMangmentService.failedFiles];
20932
- }
20933
- else {
20934
- this.fileMangerService.onRefreshingFileManger.next();
20935
- this.tosterService.show('success', 'TOASTER.SUCCESS', "TOASTER.FILE_CREATED_SUCCE");
20936
- this.dialogRef.close(false);
20937
- this.uploadMangmentService.resetStatus();
20938
- }
20939
- }, error => {
20940
- this.creating = false;
20941
- // console.log(error);
20942
- // this.tosterService.show('error' , 'TOASTER.ERROR' , 'TOASTER.UPLOAD_ERROR');
20943
- // this.closeDialog();
20944
- });
20945
- }
20946
- else {
20947
- this.creating = false;
20948
- }
20949
- }
20950
20982
  constructPayLoadToWorkSpace(files) {
20951
20983
  this.payloadList = [];
20952
- files.map(file => {
20984
+ files.map((file) => {
20953
20985
  let param = {
20954
- "fileindex": 0,
20955
- "fileName": file.staticData.title,
20956
- "batchid": file.batch.blob['upload-batch'],
20957
- "description": this.fileForm.controls.description.value
20986
+ fileindex: 0,
20987
+ fileName: file.staticData.title,
20988
+ batchid: file.batch.blob['upload-batch'],
20989
+ description: this.fileForm.controls.description.value
20958
20990
  };
20959
20991
  this.payloadList.push({ params: param, originFile: file });
20960
20992
  });
20961
20993
  }
20962
- tryAgainCreateDocument() {
20963
- this.uploadMangmentService.uploadFilesMangment(this.uploadMangmentService.failedFiles);
20964
- }
20965
20994
  constructPayLoad(files) {
20966
20995
  this.payloadList = [];
20967
- files.map(file => {
20996
+ files.map((file) => {
20968
20997
  let props = this.dynamicFormService.constructDynamicFormPayload(file.dynamicData.data ? file.dynamicData.data : {}, file.dynamicForm);
20969
20998
  let staticFormData = this.mappingStaticData(file.staticData);
20970
20999
  let param = {
20971
- "document": {
20972
- "type": file.fileType.type,
20973
- "name": file.staticData.title,
20974
- "properties": Object.assign(Object.assign(Object.assign({}, props), staticFormData), { "file:content": {
20975
- "upload-batch": file.batch.blob['upload-batch'],
20976
- "upload-fileId": file.batch.blob['upload-fileId'],
20977
- "mime-type": file.type
21000
+ document: {
21001
+ type: file.fileType.type,
21002
+ name: file.staticData.title,
21003
+ properties: Object.assign(Object.assign(Object.assign({}, props), staticFormData), { 'file:content': {
21004
+ 'upload-batch': file.batch.blob['upload-batch'],
21005
+ 'upload-fileId': file.batch.blob['upload-fileId'],
21006
+ 'mime-type': file.type
20978
21007
  } })
20979
21008
  }
20980
21009
  };
20981
21010
  if (file.fileType.documentCode) {
20982
- param["documentTypeCode"] = file.fileType.documentCode;
21011
+ param['documentTypeCode'] = file.fileType.documentCode;
20983
21012
  }
20984
21013
  this.payloadList.push({ params: param, originFile: file });
20985
21014
  });
@@ -20988,12 +21017,13 @@ class CreateModalComponent {
20988
21017
  if (data.gdocumentDate && data.gdocumentDate !== null) {
20989
21018
  moment$4.locale('en');
20990
21019
  data['hdocumentDate'] = this.dateHelperService.gregorianToHijri(data.gdocumentDate, 'iYYYY-iMM-iDD');
20991
- data.gdocumentDate = (moment$4(data.gdocumentDate).format("YYYY-MM-DDT00:00:00.000") + "Z");
21020
+ data.gdocumentDate =
21021
+ moment$4(data.gdocumentDate).format('YYYY-MM-DDT00:00:00.000') + 'Z';
20992
21022
  }
20993
21023
  return this.adapeter.adaptOut(data, this.staticFormFields);
20994
21024
  }
20995
21025
  selectFile(file) {
20996
- console.log("file in select", file);
21026
+ console.log('file in select', file);
20997
21027
  this.showStaticForm = false;
20998
21028
  this.agencyNameFilter = undefined;
20999
21029
  this.countryNameFilter = undefined;
@@ -21005,8 +21035,13 @@ class CreateModalComponent {
21005
21035
  this.showRenderer = false;
21006
21036
  // check if file has properties of adding properties or not then add it to him
21007
21037
  if (!file.hasOwnProperty('fileType')) {
21008
- this.dynamicFormService.getDynamicForm(this.fileType.documentCode ? this.fileType.documentCode : this.fileType.type).subscribe(res => {
21009
- file['fileType'] = this.source === 'fileManger' ? this.fileType : {};
21038
+ this.dynamicFormService
21039
+ .getDynamicForm(this.fileType.documentCode
21040
+ ? this.fileType.documentCode
21041
+ : this.fileType.type)
21042
+ .subscribe((res) => {
21043
+ file['fileType'] =
21044
+ this.source === 'fileManger' ? this.fileType : {};
21010
21045
  file['dynamicForm'] = res;
21011
21046
  file['dynamicData'] = {};
21012
21047
  file['staticFormValid'] = this.usingExtraFields ? false : true;
@@ -21018,7 +21053,8 @@ class CreateModalComponent {
21018
21053
  }
21019
21054
  this.fileForm.patchValue(this.selectedFile['staticData']);
21020
21055
  this.temporaryDyanmicData = {};
21021
- this.temporaryDyanmicData = this.selectedFile.dynamicData.data ? Object.assign({}, this.selectedFile.dynamicData.data) : {};
21056
+ this.temporaryDyanmicData = this.selectedFile.dynamicData.data
21057
+ ? Object.assign({}, this.selectedFile.dynamicData.data) : {};
21022
21058
  setTimeout(() => {
21023
21059
  this.showRenderer = true;
21024
21060
  this.showStaticForm = true;
@@ -21026,12 +21062,19 @@ class CreateModalComponent {
21026
21062
  //console.log(file);
21027
21063
  if (!this.fileFormSubscription) {
21028
21064
  setTimeout(() => {
21029
- this.fileFormSubscription = this.fileForm.valueChanges.subscribe(res => {
21030
- this.selectedFile.staticFormValid = this.fileForm ? this.fileForm.valid : false;
21031
- this.selectedFile.staticData = this.fileForm ? this.fileForm.value : {};
21032
- });
21065
+ this.fileFormSubscription =
21066
+ this.fileForm.valueChanges.subscribe((res) => {
21067
+ this.selectedFile.staticFormValid = this.fileForm
21068
+ ? this.fileForm.valid
21069
+ : false;
21070
+ this.selectedFile.staticData = this.fileForm
21071
+ ? this.fileForm.value
21072
+ : {};
21073
+ });
21033
21074
  if (this.fileForm.get('agencyCategoryCode')) {
21034
- this.agencyCategCodeSubscription = this.fileForm.get('agencyCategoryCode').valueChanges.subscribe(res => {
21075
+ this.agencyCategCodeSubscription = this.fileForm
21076
+ .get('agencyCategoryCode')
21077
+ .valueChanges.subscribe((res) => {
21035
21078
  this.fileForm.get('agencyName').setValue(null);
21036
21079
  this.agencyNameFilter = {
21037
21080
  category: res
@@ -21039,7 +21082,9 @@ class CreateModalComponent {
21039
21082
  });
21040
21083
  }
21041
21084
  if (this.fileForm.get('countryCategoryCode')) {
21042
- this.countryCategCodeSubscription = this.fileForm.get('countryCategoryCode').valueChanges.subscribe(res => {
21085
+ this.countryCategCodeSubscription = this.fileForm
21086
+ .get('countryCategoryCode')
21087
+ .valueChanges.subscribe((res) => {
21043
21088
  this.fileForm.get('countryName').setValue(null);
21044
21089
  this.countryNameFilter = {
21045
21090
  category: res
@@ -21067,19 +21112,27 @@ class CreateModalComponent {
21067
21112
  };
21068
21113
  }
21069
21114
  this.temporaryDyanmicData = {};
21070
- this.temporaryDyanmicData = this.selectedFile.dynamicData.data ? this.selectedFile.dynamicData.data : {};
21115
+ this.temporaryDyanmicData = this.selectedFile.dynamicData.data
21116
+ ? this.selectedFile.dynamicData.data
21117
+ : {};
21071
21118
  setTimeout(() => {
21072
21119
  this.showRenderer = true;
21073
21120
  this.showStaticForm = true;
21074
21121
  }, 200);
21075
21122
  if (!this.fileFormSubscription) {
21076
21123
  setTimeout(() => {
21077
- this.fileFormSubscription = this.fileForm.valueChanges.subscribe(res => {
21078
- this.selectedFile.staticFormValid = this.fileForm ? this.fileForm.valid : false;
21079
- this.selectedFile.staticData = this.fileForm ? this.fileForm.value : {};
21124
+ this.fileFormSubscription = this.fileForm.valueChanges.subscribe((res) => {
21125
+ this.selectedFile.staticFormValid = this.fileForm
21126
+ ? this.fileForm.valid
21127
+ : false;
21128
+ this.selectedFile.staticData = this.fileForm
21129
+ ? this.fileForm.value
21130
+ : {};
21080
21131
  });
21081
21132
  if (this.fileForm.get('agencyCategoryCode')) {
21082
- this.agencyCategCodeSubscription = this.fileForm.get('agencyCategoryCode').valueChanges.subscribe(res => {
21133
+ this.agencyCategCodeSubscription = this.fileForm
21134
+ .get('agencyCategoryCode')
21135
+ .valueChanges.subscribe((res) => {
21083
21136
  this.fileForm.get('agencyName').setValue(null);
21084
21137
  this.agencyNameFilter = {
21085
21138
  category: res
@@ -21087,7 +21140,9 @@ class CreateModalComponent {
21087
21140
  });
21088
21141
  }
21089
21142
  if (this.fileForm.get('countryCategoryCode')) {
21090
- this.countryCategCodeSubscription = this.fileForm.get('countryCategoryCode').valueChanges.subscribe(res => {
21143
+ this.countryCategCodeSubscription = this.fileForm
21144
+ .get('countryCategoryCode')
21145
+ .valueChanges.subscribe((res) => {
21091
21146
  this.fileForm.get('countryName').setValue(null);
21092
21147
  this.countryNameFilter = {
21093
21148
  category: res
@@ -21109,11 +21164,8 @@ class CreateModalComponent {
21109
21164
  this.selectedFile.dynamicData = Object.assign({}, dynamicData);
21110
21165
  }
21111
21166
  }
21112
- minimizDialog() {
21113
- this.dialogRef.close(true);
21114
- }
21115
21167
  removeItem(item, listofFiles) {
21116
- const removeIndex = listofFiles.findIndex(file => file.name === item.name);
21168
+ const removeIndex = listofFiles.findIndex((file) => file.name === item.name);
21117
21169
  listofFiles.splice(removeIndex, 1);
21118
21170
  if (item.name === this.selectedFile.name) {
21119
21171
  if (this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.length > 0) {
@@ -21125,32 +21177,14 @@ class CreateModalComponent {
21125
21177
  // this.selectedFile = null;
21126
21178
  }
21127
21179
  }
21128
- ApplyChangesToAll() {
21129
- this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.map(file => {
21130
- let title = file['staticData'] ? file['staticData']['title'] : file.name;
21131
- file['fileType'] = this.selectedFile.fileType;
21132
- file['dynamicForm'] = this.selectedFile.dynamicForm;
21133
- file['dynamicData'] = this.selectedFile.dynamicData;
21134
- file['staticFormValid'] = this.selectedFile.staticFormValid;
21135
- file['staticData'] = Object.assign({}, this.fileForm.value);
21136
- file['staticData']['title'] = title;
21137
- });
21138
- this.uploadMangmentService.uploadedFilesStatus.allfiles.map(file => {
21139
- let title = file['staticData'] ? file['staticData']['title'] : file.name;
21140
- file['fileType'] = this.selectedFile.fileType;
21141
- file['dynamicForm'] = this.selectedFile.dynamicForm;
21142
- file['dynamicData'] = this.selectedFile.dynamicData;
21143
- file['staticFormValid'] = this.selectedFile.staticFormValid;
21144
- file['staticData'] = Object.assign({}, this.fileForm.value);
21145
- file['staticData']['title'] = title;
21146
- });
21147
- }
21148
21180
  checkValidation() {
21149
21181
  let validation = true;
21150
- this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.map(file => {
21182
+ this.uploadMangmentService.uploadedFilesStatus.uploadedFiles.forEach((file) => {
21151
21183
  var _a, _b;
21152
- console.log("file", file);
21153
- if (!file.hasOwnProperty('fileType') || file['staticFormValid'] === false || ((_b = (_a = file.dynamicData) === null || _a === void 0 ? void 0 : _a.originalEvent) === null || _b === void 0 ? void 0 : _b.isValid) === false) {
21184
+ console.log('file', file);
21185
+ if (!file.hasOwnProperty('fileType') ||
21186
+ file['staticFormValid'] === false ||
21187
+ ((_b = (_a = file.dynamicData) === null || _a === void 0 ? void 0 : _a.originalEvent) === null || _b === void 0 ? void 0 : _b.isValid) === false) {
21154
21188
  file['generalValidationValid'] = false;
21155
21189
  validation = false;
21156
21190
  }
@@ -21158,9 +21192,10 @@ class CreateModalComponent {
21158
21192
  file['generalValidationValid'] = true;
21159
21193
  }
21160
21194
  });
21161
- this.uploadMangmentService.uploadedFilesStatus.allfiles.map(file => {
21195
+ this.uploadMangmentService.uploadedFilesStatus.allfiles.map((file) => {
21162
21196
  var _a, _b;
21163
- if (file['staticFormValid'] === false || ((_b = (_a = file.dynamicData) === null || _a === void 0 ? void 0 : _a.originalEvent) === null || _b === void 0 ? void 0 : _b.isValid) === false) {
21197
+ if (file['staticFormValid'] === false ||
21198
+ ((_b = (_a = file.dynamicData) === null || _a === void 0 ? void 0 : _a.originalEvent) === null || _b === void 0 ? void 0 : _b.isValid) === false) {
21164
21199
  file['generalValidationValid'] = false;
21165
21200
  validation = false;
21166
21201
  }
@@ -21172,13 +21207,16 @@ class CreateModalComponent {
21172
21207
  }
21173
21208
  ngOnDestroy() {
21174
21209
  this.fileFormSubscription ? this.fileFormSubscription.unsubscribe() : '';
21175
- this.langSubscription ? this.langSubscription.unsubscribe() : '';
21176
- this.countryCategCodeSubscription ? this.countryCategCodeSubscription.unsubscribe() : '';
21177
- this.agencyCategCodeSubscription ? this.agencyCategCodeSubscription.unsubscribe() : '';
21210
+ this.countryCategCodeSubscription
21211
+ ? this.countryCategCodeSubscription.unsubscribe()
21212
+ : '';
21213
+ this.agencyCategCodeSubscription
21214
+ ? this.agencyCategCodeSubscription.unsubscribe()
21215
+ : '';
21178
21216
  }
21179
21217
  }
21180
- CreateModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CreateModalComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$3.MatDialogRef }, { token: UploadManagmentService }, { token: DialogMangmentService }, { token: FileManagerService }, { token: CustomToastrService }, { token: i6.FormBuilder }, { token: AdapterService }, { token: FileManagerService }, { token: AppConfigService }, { token: DateHelperService }, { token: TranslationService }, { token: UserService }, { token: NuxeoService }, { token: 'environment' }, { token: DynamicFormService }], target: i0.ɵɵFactoryTarget.Component });
21181
- CreateModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CreateModalComponent, selector: "app-create-modal", host: { listeners: { "document:keyup.enter": "KeyUpEvent($event)" } }, ngImport: i0, template: "<div class=\"relative w-full h-full\">\r\n <div class=\"iner-wrapper\" [ngClass]=\"{ 'd-flex': addingProperties }\">\r\n <div *ngIf=\"addingProperties\" class=\"properties-section p-3 overflow-x-hidden overflow-y-auto\">\r\n <div class=\"\" *ngIf=\"selectedFile && source === 'fileManger' && showStaticForm\">\r\n <div class=\"mb-5\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.FILE_TYPE\" | translate }}\r\n </div>\r\n <div class=\"text-base text-gray-900\">{{ isArabic ? fileType.arabicText : fileType.englishText }}\r\n </div>\r\n </div>\r\n <div class=\"file-fields mt-3\" SetRtl>\r\n <form [formGroup]=\"fileForm\">\r\n <!-- -----------------old static form ---------------------- -->\r\n <div>\r\n <div class=\"single-field mb-3\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.TITLE\" | translate\r\n }}<span class=\"text-red-500\">*</span>\r\n </div>\r\n <input class=\"\r\n field-style\r\n \" formControlName=\"title\" placeholder=\" {{ 'CREATE.TITLE' | translate}}\" />\r\n </div>\r\n <div class=\"single-field mb-3\">\r\n <div class=\"label-style\">\r\n {{ \"CREATE.DESCRIPTION\" | translate }}\r\n </div>\r\n <input class=\"field-style\" formControlName=\"description\"\r\n placeholder=\" {{ 'CREATE.DESCRIPTION' | translate}}\" />\r\n </div>\r\n </div>\r\n <!-- ---------------------------------- -->\r\n\r\n <!------------------ new statis form ---------------------------->\r\n <div *ngIf=\"usingExtraFields\">\r\n <app-dynamic-fields-renderer [form]=\"fileForm\" [agencyNameFilter]=\"agencyNameFilter\"\r\n [countryNameFilter]=\"countryNameFilter\"></app-dynamic-fields-renderer>\r\n </div>\r\n </form>\r\n\r\n <div class=\"dynamic-part\" *ngIf=\"showRenderer\">\r\n <app-dynamic-form [form]=\"selectedFile.dynamicForm\" [data]=\"temporaryDyanmicData\"\r\n (change)=\"ondynamicFormChange($event)\"></app-dynamic-form>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"\r\n w-full\r\n h-full\r\n p-3\r\n flex\r\n justify-center\r\n items-center\r\n text-lg text-gray-900\"\r\n *ngIf=\"!selectedFile\">\r\n {{ \"CREATE.SELECT_TOSTART_ADDING\" | translate }}\r\n </div>\r\n \r\n </div>\r\n <div class=\"attachment-tab-body overflow-hidden\" [ngClass]=\"{ 'attachment-iner-small-body': addingProperties }\">\r\n <app-attachments [multiple]=\"true\" (onSelectingItem)=\"selectFile($event)\"></app-attachments>\r\n </div>\r\n </div>\r\n <div class=\"w-full text-red-500 text-base text-start px-3\" *ngIf=\"!uploadMangmentService.GeneralFormValidation\">\r\n\r\n {{ \"CREATE.FILL_REQUIRED_FIELD\" | translate }}\r\n </div>\r\n <div class=\"actions-iner-wrapper w-full flex justify-between items-center absolute bottom-0\">\r\n <div class=\"flex\">\r\n <button *ngIf=\"\r\n (uploadMangmentService.uploadedFilesStatus\r\n .uploadInProgress ||\r\n uploadMangmentService.uploadedFilesStatus.uploadedFiles\r\n .length > 0) &&\r\n !addingProperties\r\n \" (click)=\"startAddingProperties()\" class=\"submission-button\">\r\n {{ \"BUTTONS.ADD_PROPERTIES\" | translate }}\r\n </button>\r\n <button *ngIf=\"\r\n addingProperties &&\r\n uploadMangmentService.uploadedFilesStatus.uploadedFiles\r\n .length +\r\n uploadMangmentService.uploadedFilesStatus.allfiles\r\n .length >\r\n 1\r\n \" (click)=\"ApplyChangesToAll()\" [disabled]=\"!selectedFile || !selectedFile.staticFormValid\" [ngClass]=\"{\r\n 'opacity-30 cursor-not-allowed':\r\n !selectedFile || !selectedFile.staticFormValid,\r\n 'cursor-pointer hover:text-white hover:bg-gray-900': !(\r\n !selectedFile || !selectedFile.staticFormValid\r\n )\r\n }\" class=\"submission-button mx-2\">\r\n {{ \"BUTTONS.APPLY_TO_ALL\" | translate }}\r\n </button>\r\n\r\n <ng-container *ngIf=\"\r\n addingProperties &&\r\n !uploadMangmentService.uploadedFilesStatus.uploadInProgress &&\r\n uploadMangmentService.failedFiles.length === 0\r\n \">\r\n <button (click)=\"createDocument()\" class=\"submission-button relative\" [disabled]=\"creating\">\r\n <span *ngIf=\"!creating; else loader\">{{ \"BUTTONS.CREATE\" | translate }}</span>\r\n </button>\r\n <ng-template #loader>\r\n <mat-spinner [value]=\"90\" [strokeWidth]=\"3\" overlay=\"true\" [diameter]=\"25\" color=\"warn\">\r\n </mat-spinner>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <button *ngIf=\"\r\n addingProperties &&\r\n !uploadMangmentService.uploadedFilesStatus.uploadInProgress &&\r\n uploadMangmentService.failedFiles.length > 0\r\n \" (click)=\"tryAgainCreateDocument()\" class=\"submission-button\">\r\n {{ \"BUTTONS.TRY_AGAIN\" | translate }}\r\n </button>\r\n\r\n <button [disabled]=\"!fileForm?.valid || disableCreateWhenFinishBtn\" *ngIf=\"\r\n addingProperties &&\r\n uploadMangmentService.uploadedFilesStatus.uploadInProgress\r\n \" (click)=\"createWhenFinish()\" class=\"submission-button w-44\">\r\n {{ \"BUTTONS.CREATE_WHEN_FINSH\" | translate }}\r\n </button>\r\n </div>\r\n <div class=\"flex\">\r\n <button class=\"cancelation-button mx-2\" (click)=\"minimizDialog()\" *ngIf=\"\r\n uploadMangmentService.uploadedFilesStatus\r\n .uploadInProgress ||\r\n uploadMangmentService.uploadedFilesStatus\r\n .numberOfUploadedFiles !== 0 ||\r\n addingProperties\r\n \">\r\n {{ \"BUTTONS.MINIMIZED\" | translate }}\r\n </button>\r\n <button class=\"cancelation-button\" (click)=\"closeDialog()\">\r\n {{ \"BUTTONS.CANCEL\" | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>", styles: [".dynamic-part{margin-left:-15px;margin-right:-15px}.iner-wrapper{height:calc(100% - 70px)}.iner-wrapper .properties-section{width:calc(100% - 270px);height:calc(100% - 15px)}.iner-wrapper .attachment-tab-body{height:calc(100% - -20px);overflow-y:auto;overflow-x:hidden}.iner-wrapper .attachment-iner-small-body{width:350px}.rtl .actions-iner-wrapper{direction:ltr}.actions-iner-wrapper{direction:rtl}\n"], components: [{ type: DynamicFieldsRendererComponent, selector: "app-dynamic-fields-renderer", inputs: ["form", "agencyNameFilter", "countryNameFilter", "mode", "fields"] }, { type: DynamicFormComponent, selector: "app-dynamic-form", inputs: ["form", "data", "readOnly"], outputs: ["change"] }, { type: AttachmentsComponent, selector: "app-attachments", inputs: ["allowedTypes", "params", "path", "maxSize", "docParams", "multiple", "createDocument", "allowedMaxNumberOfFiles", "source"], outputs: ["uploadSuccess", "uploadError", "onSelectingItem", "itemRemoved"] }, { type: i8.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: SetRtlDirective, selector: "[SetRtl]" }, { type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1.TranslatePipe } });
21218
+ CreateModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CreateModalComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: UploadManagmentService }, { token: DialogMangmentService }, { token: FileManagerService }, { token: CustomToastrService }, { token: i6.FormBuilder }, { token: AdapterService }, { token: FileManagerService }, { token: AppConfigService }, { token: DateHelperService }, { token: UserService }, { token: 'environment' }, { token: i0.Injector }, { token: DynamicFormService }], target: i0.ɵɵFactoryTarget.Component });
21219
+ CreateModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CreateModalComponent, selector: "app-create-modal", host: { listeners: { "document:keyup.enter": "KeyUpEvent($event)" } }, usesInheritance: true, ngImport: i0, template: "<ndf-nuxeo-dialog dialogTitle=\"{{ 'CREATE.createFile' | translate }}\">\r\n\t<ng-template #contentTemplate>\r\n\t\t<div class=\"relative w-full h-full\">\r\n\t\t\t<div class=\"iner-wrapper\" [ngClass]=\"{ 'd-flex': addingProperties }\">\r\n\t\t\t\t<div\r\n\t\t\t\t\t*ngIf=\"addingProperties\"\r\n\t\t\t\t\tclass=\"properties-section p-3 overflow-x-hidden overflow-y-auto\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tclass=\"\"\r\n\t\t\t\t\t\t*ngIf=\"selectedFile && source === 'fileManger' && showStaticForm\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<div class=\"mb-5\">\r\n\t\t\t\t\t\t\t<div class=\"label-style\">\r\n\t\t\t\t\t\t\t\t{{ 'CREATE.FILE_TYPE' | translate }}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class=\"text-base text-gray-900\">\r\n\t\t\t\t\t\t\t\t{{ isArabic ? fileType.arabicText : fileType.englishText }}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"file-fields mt-3\" SetRtl>\r\n\t\t\t\t\t\t\t<form [formGroup]=\"fileForm\">\r\n\t\t\t\t\t\t\t\t<!-- -----------------old static form ---------------------- -->\r\n\t\t\t\t\t\t\t\t<div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"single-field mb-3\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"label-style\">\r\n\t\t\t\t\t\t\t\t\t\t\t{{ 'CREATE.TITLE' | translate\r\n\t\t\t\t\t\t\t\t\t\t\t}}<span class=\"text-red-500\">*</span>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"field-style\"\r\n\t\t\t\t\t\t\t\t\t\t\tformControlName=\"title\"\r\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\" {{ 'CREATE.TITLE' | translate }}\"\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"single-field mb-3\">\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"label-style\">\r\n\t\t\t\t\t\t\t\t\t\t\t{{ 'CREATE.DESCRIPTION' | translate }}\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\t\t\t\tclass=\"field-style\"\r\n\t\t\t\t\t\t\t\t\t\t\tformControlName=\"description\"\r\n\t\t\t\t\t\t\t\t\t\t\tplaceholder=\" {{ 'CREATE.DESCRIPTION' | translate }}\"\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t<!-- ---------------------------------- -->\r\n\r\n\t\t\t\t\t\t\t\t<!------------------ new statis form ---------------------------->\r\n\t\t\t\t\t\t\t\t<div *ngIf=\"usingExtraFields\">\r\n\t\t\t\t\t\t\t\t\t<app-dynamic-fields-renderer\r\n\t\t\t\t\t\t\t\t\t\t[form]=\"fileForm\"\r\n\t\t\t\t\t\t\t\t\t\t[agencyNameFilter]=\"agencyNameFilter\"\r\n\t\t\t\t\t\t\t\t\t\t[countryNameFilter]=\"countryNameFilter\"\r\n\t\t\t\t\t\t\t\t\t></app-dynamic-fields-renderer>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</form>\r\n\r\n\t\t\t\t\t\t\t<div class=\"dynamic-part\" *ngIf=\"showRenderer\">\r\n\t\t\t\t\t\t\t\t<app-dynamic-form\r\n\t\t\t\t\t\t\t\t\t[form]=\"selectedFile.dynamicForm\"\r\n\t\t\t\t\t\t\t\t\t[data]=\"temporaryDyanmicData\"\r\n\t\t\t\t\t\t\t\t\t(change)=\"ondynamicFormChange($event)\"\r\n\t\t\t\t\t\t\t\t></app-dynamic-form>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tclass=\"w-full h-full p-3 flex justify-center items-center text-lg text-gray-900\"\r\n\t\t\t\t\t\t*ngIf=\"!selectedFile\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{{ 'CREATE.SELECT_TOSTART_ADDING' | translate }}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"attachment-tab-body overflow-hidden\"\r\n\t\t\t\t\t[ngClass]=\"{ 'attachment-iner-small-body': addingProperties }\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<app-attachments\r\n\t\t\t\t\t\t[multiple]=\"true\"\r\n\t\t\t\t\t\t(onSelectingItem)=\"selectFile($event)\"\r\n\t\t\t\t\t></app-attachments>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"w-full text-red-500 text-base text-start px-3\"\r\n\t\t\t\t*ngIf=\"!uploadMangmentService.GeneralFormValidation\"\r\n\t\t\t>\r\n\t\t\t\t{{ 'CREATE.FILL_REQUIRED_FIELD' | translate }}\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<ng-template #actionsTemplate let-dialog=\"dialog\">\r\n\t\t<!-- WAS_IN_FLEX_DIV -->\r\n\t\t<button\r\n\t\t\t*ngIf=\"\r\n\t\t\t\t(uploadMangmentService.uploadedFilesStatus.uploadInProgress ||\r\n\t\t\t\t\tuploadMangmentService.uploadedFilesStatus.uploadedFiles.length > 0) &&\r\n\t\t\t\t!addingProperties\r\n\t\t\t\"\r\n\t\t\t(click)=\"dialog.executeAction(startAddingProperties)\"\r\n\t\t\tclass=\"submission-button\"\r\n\t\t>\r\n\t\t\t{{ 'BUTTONS.ADD_PROPERTIES' | translate }}\r\n\t\t</button>\r\n\t\t<button\r\n\t\t\t*ngIf=\"\r\n\t\t\t\taddingProperties &&\r\n\t\t\t\tuploadMangmentService.uploadedFilesStatus.uploadedFiles.length +\r\n\t\t\t\t\tuploadMangmentService.uploadedFilesStatus.allfiles.length >\r\n\t\t\t\t\t1\r\n\t\t\t\"\r\n\t\t\t(click)=\"dialog.executeAction(ApplyChangesToAll)\"\r\n\t\t\t[disabled]=\"!selectedFile || !selectedFile.staticFormValid\"\r\n\t\t\t[ngClass]=\"{\r\n\t\t\t\t'opacity-30 cursor-not-allowed':\r\n\t\t\t\t\t!selectedFile || !selectedFile.staticFormValid,\r\n\t\t\t\t'cursor-pointer hover:text-white hover:bg-gray-900': !(\r\n\t\t\t\t\t!selectedFile || !selectedFile.staticFormValid\r\n\t\t\t\t)\r\n\t\t\t}\"\r\n\t\t\tclass=\"submission-button mx-2\"\r\n\t\t>\r\n\t\t\t{{ 'BUTTONS.APPLY_TO_ALL' | translate }}\r\n\t\t</button>\r\n\t\t<!-- WAS_IN_FLEX_DIV -->\r\n\r\n\t\t<ng-container\r\n\t\t\t*ngIf=\"\r\n\t\t\t\taddingProperties &&\r\n\t\t\t\t!uploadMangmentService.uploadedFilesStatus.uploadInProgress &&\r\n\t\t\t\tuploadMangmentService.failedFiles.length === 0\r\n\t\t\t\"\r\n\t\t>\r\n\t\t\t<button\r\n\t\t\t\t(click)=\"dialog.executeAction(createDocument)\"\r\n\t\t\t\tclass=\"submission-button relative\"\r\n\t\t\t\t[disabled]=\"creating\"\r\n\t\t\t>\r\n\t\t\t\t<span *ngIf=\"!creating; else loader\">{{\r\n\t\t\t\t\t'BUTTONS.CREATE' | translate\r\n\t\t\t\t}}</span>\r\n\t\t\t</button>\r\n\t\t\t<ng-template #loader>\r\n\t\t\t\t<mat-spinner\r\n\t\t\t\t\t[value]=\"90\"\r\n\t\t\t\t\t[strokeWidth]=\"3\"\r\n\t\t\t\t\toverlay=\"true\"\r\n\t\t\t\t\t[diameter]=\"25\"\r\n\t\t\t\t\tcolor=\"warn\"\r\n\t\t\t\t>\r\n\t\t\t\t</mat-spinner>\r\n\t\t\t</ng-template>\r\n\t\t</ng-container>\r\n\r\n\t\t<button\r\n\t\t\t*ngIf=\"\r\n\t\t\t\taddingProperties &&\r\n\t\t\t\t!uploadMangmentService.uploadedFilesStatus.uploadInProgress &&\r\n\t\t\t\tuploadMangmentService.failedFiles.length > 0\r\n\t\t\t\"\r\n\t\t\t(click)=\"dialog.executeAction(tryAgainCreateDocument)\"\r\n\t\t\tclass=\"submission-button\"\r\n\t\t>\r\n\t\t\t{{ 'BUTTONS.TRY_AGAIN' | translate }}\r\n\t\t</button>\r\n\r\n\t\t<button\r\n\t\t\t[disabled]=\"!fileForm?.valid || disableCreateWhenFinishBtn\"\r\n\t\t\t*ngIf=\"\r\n\t\t\t\taddingProperties &&\r\n\t\t\t\tuploadMangmentService.uploadedFilesStatus.uploadInProgress\r\n\t\t\t\"\r\n\t\t\t(click)=\"dialog.executeAction(createWhenFinish)\"\r\n\t\t\tclass=\"submission-button w-44\"\r\n\t\t>\r\n\t\t\t{{ 'BUTTONS.CREATE_WHEN_FINSH' | translate }}\r\n\t\t</button>\r\n\r\n\t\t<!-- WAS_IN_FLEX_DIV -->\r\n\t\t<button\r\n\t\t\tclass=\"cancelation-button mx-2\"\r\n\t\t\t(click)=\"dialog.executeAction(minimizDialog)\"\r\n\t\t\t*ngIf=\"\r\n\t\t\t\tuploadMangmentService.uploadedFilesStatus.uploadInProgress ||\r\n\t\t\t\tuploadMangmentService.uploadedFilesStatus.numberOfUploadedFiles !== 0 ||\r\n\t\t\t\taddingProperties\r\n\t\t\t\"\r\n\t\t>\r\n\t\t\t{{ 'BUTTONS.MINIMIZED' | translate }}\r\n\t\t</button>\r\n\t\t<!-- <button class=\"cancelation-button\" (click)=\" dialog.executeAction(closeDialog)\">\r\n{{ 'BUTTONS.CANCEL' | translate }}\r\n</button> -->\r\n\t</ng-template>\r\n</ndf-nuxeo-dialog>\r\n", styles: [".dynamic-part{margin-left:-15px;margin-right:-15px}.iner-wrapper{height:calc(100% - 70px)}.iner-wrapper .properties-section{width:calc(100% - 270px);height:calc(100% - 15px)}.iner-wrapper .attachment-tab-body{height:calc(100% - -20px);overflow-y:auto;overflow-x:hidden}.iner-wrapper .attachment-iner-small-body{width:350px}.rtl .actions-iner-wrapper{direction:ltr}.actions-iner-wrapper{direction:rtl}:host{height:100%;display:block}\n"], components: [{ type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: ["dialogTitle", "subTitle", "loaderMode"] }, { type: DynamicFieldsRendererComponent, selector: "app-dynamic-fields-renderer", inputs: ["form", "agencyNameFilter", "countryNameFilter", "mode", "fields"] }, { type: DynamicFormComponent, selector: "app-dynamic-form", inputs: ["form", "data", "readOnly"], outputs: ["change"] }, { type: AttachmentsComponent, selector: "app-attachments", inputs: ["allowedTypes", "params", "path", "maxSize", "docParams", "multiple", "createDocument", "allowedMaxNumberOfFiles", "source"], outputs: ["uploadSuccess", "uploadError", "onSelectingItem", "itemRemoved"] }, { type: i8.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: SetRtlDirective, selector: "[SetRtl]" }, { type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i6.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1.TranslatePipe } });
21182
21220
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CreateModalComponent, decorators: [{
21183
21221
  type: Component,
21184
21222
  args: [{
@@ -21189,10 +21227,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
21189
21227
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
21190
21228
  type: Inject,
21191
21229
  args: [MAT_DIALOG_DATA]
21192
- }] }, { type: i1$3.MatDialogRef }, { type: UploadManagmentService }, { type: DialogMangmentService }, { type: FileManagerService }, { type: CustomToastrService }, { type: i6.FormBuilder }, { type: AdapterService }, { type: FileManagerService }, { type: AppConfigService }, { type: DateHelperService }, { type: TranslationService }, { type: UserService }, { type: NuxeoService }, { type: undefined, decorators: [{
21230
+ }] }, { type: UploadManagmentService }, { type: DialogMangmentService }, { type: FileManagerService }, { type: CustomToastrService }, { type: i6.FormBuilder }, { type: AdapterService }, { type: FileManagerService }, { type: AppConfigService }, { type: DateHelperService }, { type: UserService }, { type: undefined, decorators: [{
21193
21231
  type: Inject,
21194
21232
  args: ['environment']
21195
- }] }, { type: DynamicFormService }]; }, propDecorators: { KeyUpEvent: [{
21233
+ }] }, { type: i0.Injector }, { type: DynamicFormService }]; }, propDecorators: { KeyUpEvent: [{
21196
21234
  type: HostListener,
21197
21235
  args: ['document:keyup.enter', ['$event']]
21198
21236
  }] } });
@@ -26610,7 +26648,8 @@ FileMangerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
26610
26648
  FormsModule,
26611
26649
  DisplaySuitableIconModule,
26612
26650
  MatProgressBarModule,
26613
- MatCheckboxModule], exports: [SidepanelComponent,
26651
+ MatCheckboxModule,
26652
+ NuxeoDialogModule], exports: [SidepanelComponent,
26614
26653
  CopyComponent,
26615
26654
  DeleteComponent,
26616
26655
  MoveComponent,
@@ -26680,7 +26719,8 @@ FileMangerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
26680
26719
  FormsModule,
26681
26720
  DisplaySuitableIconModule,
26682
26721
  MatProgressBarModule,
26683
- MatCheckboxModule
26722
+ MatCheckboxModule,
26723
+ NuxeoDialogModule
26684
26724
  ], DxPopupModule,
26685
26725
  DxScrollViewModule,
26686
26726
  DxiToolbarItemModule,
@@ -26711,7 +26751,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
26711
26751
  TemplateModalComponent,
26712
26752
  UpdateModalComponent,
26713
26753
  ClipboardComponent,
26714
- FileGridInfiniteScrollDirective,
26754
+ FileGridInfiniteScrollDirective
26715
26755
  ],
26716
26756
  imports: [
26717
26757
  CommonModule,
@@ -26756,7 +26796,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
26756
26796
  FormsModule,
26757
26797
  DisplaySuitableIconModule,
26758
26798
  MatProgressBarModule,
26759
- MatCheckboxModule
26799
+ MatCheckboxModule,
26800
+ NuxeoDialogModule
26760
26801
  ],
26761
26802
  exports: [
26762
26803
  SidepanelComponent,
@@ -26785,7 +26826,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
26785
26826
  DxFormModule,
26786
26827
  DxTreeViewModule,
26787
26828
  ClipboardComponent,
26788
- FileGridInfiniteScrollDirective,
26829
+ FileGridInfiniteScrollDirective
26789
26830
  ]
26790
26831
  }]
26791
26832
  }] });
@@ -28276,6 +28317,7 @@ const NODE_TYPE = {
28276
28317
  start: 'start',
28277
28318
  content: 'content',
28278
28319
  template: 'template',
28320
+ gateway: 'gateway',
28279
28321
  end: 'end',
28280
28322
  };
28281
28323
 
@@ -28287,6 +28329,7 @@ const NODE_MARGIN = 60;
28287
28329
  const NODE_WIDTH = 150;
28288
28330
  const NODE_HEIGHT = 118;
28289
28331
  const NODE_CIRCLE_SIZE = 72;
28332
+ const NODE_GATEWAY_SIZE = 60;
28290
28333
  const DIAGRAM_HEIGHT = 600;
28291
28334
  const SOCKET_WIDTH = 8;
28292
28335
 
@@ -28297,6 +28340,9 @@ const NODE_STATUS = {
28297
28340
  inProgress: 'inProgress',
28298
28341
  upcoming: 'upcoming',
28299
28342
  approved: 'approved',
28343
+ suspended: 'suspended',
28344
+ ready: 'ready',
28345
+ canceled: 'canceled'
28300
28346
  };
28301
28347
 
28302
28348
  class DiagramPluginsService {
@@ -28324,7 +28370,7 @@ class BaseNodeClass extends ClassicPreset.Node {
28324
28370
  this.height = NODE_HEIGHT;
28325
28371
  this.directions = {
28326
28372
  inputs: IN_OUT_DIRECTION.start,
28327
- outputs: IN_OUT_DIRECTION.end,
28373
+ outputs: IN_OUT_DIRECTION.end
28328
28374
  };
28329
28375
  this.name = config === null || config === void 0 ? void 0 : config.name;
28330
28376
  this.directions = (config === null || config === void 0 ? void 0 : config.directions) || this.directions;
@@ -28336,6 +28382,7 @@ class BaseNodeClass extends ClassicPreset.Node {
28336
28382
  this.content = config === null || config === void 0 ? void 0 : config.content;
28337
28383
  this.config = config === null || config === void 0 ? void 0 : config.config;
28338
28384
  this.styleClass = config === null || config === void 0 ? void 0 : config.styleClass;
28385
+ this.options = config === null || config === void 0 ? void 0 : config.options;
28339
28386
  }
28340
28387
  }
28341
28388
 
@@ -28347,110 +28394,325 @@ class CircleNode extends BaseNodeClass {
28347
28394
  }
28348
28395
  }
28349
28396
 
28350
- class Connection extends ClassicPreset.Connection {
28351
- constructor() {
28352
- super(...arguments);
28353
- this.renderType = 'default';
28397
+ class DiagramUtils {
28398
+ static createInputId(id, type = 'primary') {
28399
+ return `${id}-${type}-input`;
28354
28400
  }
28355
- }
28356
-
28357
- class ContentNode extends BaseNodeClass {
28358
- constructor(config) {
28359
- super(config);
28401
+ static createOutputId(id, type = 'primary') {
28402
+ return `${id}-${type}-output`;
28360
28403
  }
28361
- }
28362
-
28363
- class Socket extends ClassicPreset.Socket {
28364
- constructor(name, renderType = 'default') {
28365
- super(name);
28366
- this.renderType = renderType;
28404
+ static createInputClass(type = 'primary') {
28405
+ return `input-${type}-port`;
28406
+ }
28407
+ static createOutputClass(type = 'primary') {
28408
+ return `output-${type}-port`;
28409
+ }
28410
+ static createOutputsConfig(id, types) {
28411
+ return types.map((type) => {
28412
+ return {
28413
+ id: DiagramUtils.createOutputId(id, type),
28414
+ config: {
28415
+ styleClass: DiagramUtils.createOutputClass(type)
28416
+ }
28417
+ };
28418
+ });
28419
+ }
28420
+ static createInputsConfig(id, types) {
28421
+ return types.map((type) => {
28422
+ return {
28423
+ id: DiagramUtils.createInputId(id, type),
28424
+ config: {
28425
+ styleClass: DiagramUtils.createInputClass(type)
28426
+ }
28427
+ };
28428
+ });
28367
28429
  }
28368
28430
  }
28369
28431
 
28370
- class TemplateNode extends BaseNodeClass {
28371
- constructor(config) {
28372
- super(config);
28373
- this.type = NODE_TYPE.template;
28374
- if (config.template) {
28375
- this.template = config.template;
28376
- }
28377
- }
28432
+ function getRandomNumber(x, y, step = 1, min = 0, max = 1000) {
28433
+ // Create a deterministic seed based on x and y
28434
+ const seed = Math.abs(x * 31 + y * 17) % 100000;
28435
+ // Generate a pseudo-random number based on the seed
28436
+ const seededRandom = ((seed * 9301 + 49297) % 233280) / 233280;
28437
+ // Calculate range
28438
+ const range = Math.floor((max - min) / step) + 1;
28439
+ // Return the adjusted number
28440
+ return min + Math.floor(seededRandom * range) * step;
28378
28441
  }
28379
28442
 
28380
28443
  /**
28381
28444
  *
28382
- * @param config
28445
+ * @param node
28383
28446
  * @returns
28384
28447
  */
28385
- const customizeSocket = (config) => (data) => {
28386
- const payload = data.payload;
28387
- if (payload.renderType === 'custom' || config.socketType === 'custom') {
28388
- return CustomSocketComponent;
28448
+ const removeNode = (data, editor) => __awaiter(void 0, void 0, void 0, function* () {
28449
+ if (!data || !editor) {
28450
+ console.log('Node not found.');
28451
+ return;
28452
+ }
28453
+ const nodes = editor.getNodes();
28454
+ const node = editor.getNode(data.nodeId);
28455
+ if (!node) {
28456
+ console.log('Node not found.');
28457
+ return;
28458
+ }
28459
+ if (node.type === NODE_TYPE.start && nodes.length > 1) {
28460
+ return;
28461
+ }
28462
+ const nodeConfig = node.config;
28463
+ return (nodeConfig === null || nodeConfig === void 0 ? void 0 : nodeConfig.isLinked)
28464
+ ? yield removeNodeAndReplaceConnections(node, editor)
28465
+ : yield removeNodeAndConnections(node, editor);
28466
+ });
28467
+ /**
28468
+ *
28469
+ * @param node
28470
+ * @param editor
28471
+ */
28472
+ const removeNodeAndConnections = (node, editor) => __awaiter(void 0, void 0, void 0, function* () {
28473
+ removeConnections(node, editor);
28474
+ yield editor.removeNode(node.id);
28475
+ });
28476
+ /**
28477
+ *
28478
+ * @param node
28479
+ * @param editor
28480
+ */
28481
+ const removeNodeAndReplaceConnections = (node, editor) => __awaiter(void 0, void 0, void 0, function* () {
28482
+ const outputs = getConnections(editor, (connection) => connection.source == node.id);
28483
+ const inputs = getConnections(editor, (connection) => connection.target == node.id);
28484
+ if (!!inputs.length && !!outputs.length) {
28485
+ yield _updateConnections(outputs, inputs, editor);
28486
+ }
28487
+ else {
28488
+ removeConnections(node, editor);
28489
+ }
28490
+ yield editor.removeNode(node.id);
28491
+ });
28492
+ /**
28493
+ *
28494
+ * @param node
28495
+ * @param editor
28496
+ */
28497
+ const removeConnections = (node, editor) => {
28498
+ const connections = getConnections(editor, (connection) => connection.source === node.id || connection.target === node.id);
28499
+ if (connections.length) {
28500
+ connections.forEach((connection) => {
28501
+ editor.removeConnection(connection.id);
28502
+ });
28389
28503
  }
28390
- return SocketComponent;
28391
28504
  };
28392
28505
  /**
28393
28506
  *
28394
- * @param config
28395
28507
  * @param editor
28508
+ * @param predicate
28396
28509
  * @returns
28397
28510
  */
28398
- const customizeNode = (config, editor) => (data) => {
28399
- var _a;
28400
- const node = data.payload;
28401
- (_a = node.config) !== null && _a !== void 0 ? _a : (node.config = config['node']);
28402
- return initAngularComponentByType(node.type);
28511
+ const getConnections = (editor, predicate) => {
28512
+ return editor.getConnections().filter(predicate);
28403
28513
  };
28404
28514
  /**
28405
28515
  *
28406
- * @param config
28407
- * @returns
28516
+ * @param outputs
28517
+ * @param inputs
28518
+ * @param editor
28408
28519
  */
28409
- const customizeConnection = (config) => (data) => {
28410
- const payload = data.payload;
28411
- if (payload.renderType === 'custom' || config.connectionType == 'custom') {
28412
- return CustomConnectionComponent;
28520
+ const _updateConnections = (outputs, inputs, editor) => __awaiter(void 0, void 0, void 0, function* () {
28521
+ const source = inputs[0].source;
28522
+ const target = outputs[0].target;
28523
+ const sourceNode = editor.getNode(source);
28524
+ const targetNode = editor.getNode(target);
28525
+ [...outputs, ...inputs].forEach((connection) => __awaiter(void 0, void 0, void 0, function* () {
28526
+ yield editor.removeConnection(connection.id);
28527
+ }));
28528
+ if (!sourceNode || !targetNode) {
28529
+ return;
28413
28530
  }
28414
- return ConnectionComponent;
28415
- };
28416
- const initNodeByType = (type, config) => {
28417
- const _nodes = {
28418
- start: CircleNode,
28419
- content: ContentNode,
28420
- template: TemplateNode,
28421
- end: CircleNode,
28422
- };
28423
- return new _nodes[type](config) || new ContentNode(config);
28424
- };
28425
- const initAngularComponentByType = (type) => {
28426
- const _components = {
28427
- content: ContentNodeComponent,
28428
- start: CircleNodeComponent,
28429
- end: CircleNodeComponent,
28430
- template: TemplateNodeComponent,
28431
- };
28432
- return _components[type] || NodeComponent;
28433
- };
28531
+ const connection = new Connection(sourceNode, targetNode);
28532
+ yield editor.addConnection(connection);
28533
+ });
28534
+
28535
+ function serializePort(port) {
28536
+ return {
28537
+ id: port.id,
28538
+ label: port.label,
28539
+ socket: {
28540
+ name: port.socket.name,
28541
+ },
28542
+ };
28543
+ }
28544
+ function serializeControl(control) {
28545
+ if (control instanceof ClassicPreset.InputControl) {
28546
+ return {
28547
+ __type: 'ClassicPreset.InputControl',
28548
+ id: control.id,
28549
+ readonly: control.readonly,
28550
+ type: control.type,
28551
+ value: control.value,
28552
+ };
28553
+ }
28554
+ return null;
28555
+ }
28556
+
28557
+ class Connection extends ClassicPreset.Connection {
28558
+ constructor(source, target, config) {
28559
+ super(source, (config === null || config === void 0 ? void 0 : config.sourceOutput) || DiagramUtils.createOutputId(source.id), target, (config === null || config === void 0 ? void 0 : config.targetInput) || DiagramUtils.createInputId(target.id));
28560
+ this.status = (config === null || config === void 0 ? void 0 : config.status) || target.status;
28561
+ this.styleClass = config === null || config === void 0 ? void 0 : config.styleClass;
28562
+ this.label = config === null || config === void 0 ? void 0 : config.label;
28563
+ this.renderType = (config === null || config === void 0 ? void 0 : config.renderType) || 'default';
28564
+ this.sourceNode = source;
28565
+ this.targetNode = target;
28566
+ this.direction = config === null || config === void 0 ? void 0 : config.direction;
28567
+ }
28568
+ }
28569
+
28570
+ class ContentNode extends BaseNodeClass {
28571
+ constructor(config) {
28572
+ super(config);
28573
+ }
28574
+ }
28575
+
28576
+ class OutputPort extends ClassicPreset.Output {
28577
+ constructor(config) {
28578
+ super(config.socket, config === null || config === void 0 ? void 0 : config.label, (config === null || config === void 0 ? void 0 : config.multipleConnections) !== false);
28579
+ this.styleClass = config === null || config === void 0 ? void 0 : config.styleClass;
28580
+ }
28581
+ }
28582
+ class InputPort extends ClassicPreset.Input {
28583
+ constructor(config) {
28584
+ super(config.socket, config === null || config === void 0 ? void 0 : config.label, (config === null || config === void 0 ? void 0 : config.multipleConnections) !== false);
28585
+ this.styleClass = config === null || config === void 0 ? void 0 : config.styleClass;
28586
+ }
28587
+ }
28588
+
28589
+ class Socket extends ClassicPreset.Socket {
28590
+ constructor(config) {
28591
+ super(config.name);
28592
+ this.renderType = (config === null || config === void 0 ? void 0 : config.renderType) || 'default';
28593
+ this.styleClass = config === null || config === void 0 ? void 0 : config.styleClass;
28594
+ }
28595
+ }
28596
+
28597
+ class TemplateNode extends BaseNodeClass {
28598
+ constructor(config) {
28599
+ super(config);
28600
+ this.type = NODE_TYPE.template;
28601
+ if (config.template) {
28602
+ this.template = config.template;
28603
+ }
28604
+ }
28605
+ }
28606
+
28607
+ class GateWayNode extends BaseNodeClass {
28608
+ constructor(config) {
28609
+ super(config);
28610
+ this.type = NODE_TYPE.gateway;
28611
+ this.width = NODE_GATEWAY_SIZE;
28612
+ this.height = NODE_GATEWAY_SIZE;
28613
+ }
28614
+ }
28615
+
28616
+ /**
28617
+ *
28618
+ * @param config
28619
+ * @returns
28620
+ */
28621
+ const customizeSocket = (config) => (data) => {
28622
+ const payload = data.payload;
28623
+ if (payload.renderType === 'custom' || config.socketType === 'custom') {
28624
+ return CustomSocketComponent;
28625
+ }
28626
+ return SocketComponent;
28627
+ };
28628
+ /**
28629
+ *
28630
+ * @param config
28631
+ * @param editor
28632
+ * @returns
28633
+ */
28634
+ const customizeNode = (config, editor) => (data) => {
28635
+ var _a;
28636
+ const node = data.payload;
28637
+ (_a = node.config) !== null && _a !== void 0 ? _a : (node.config = config['node']);
28638
+ return initAngularComponentByType(node.type);
28639
+ };
28640
+ /**
28641
+ *
28642
+ * @param config
28643
+ * @returns
28644
+ */
28645
+ const customizeConnection = (config) => (data) => {
28646
+ const payload = data.payload;
28647
+ if (payload.renderType === 'custom' || config.connectionType == 'custom') {
28648
+ return CustomConnectionComponent;
28649
+ }
28650
+ return ConnectionComponent;
28651
+ };
28652
+ const initNodeByType = (type, config) => {
28653
+ const _nodes = {
28654
+ [NODE_TYPE.start]: CircleNode,
28655
+ [NODE_TYPE.content]: ContentNode,
28656
+ [NODE_TYPE.template]: TemplateNode,
28657
+ [NODE_TYPE.end]: CircleNode,
28658
+ [NODE_TYPE.gateway]: GateWayNode
28659
+ };
28660
+ return new _nodes[type](config) || new ContentNode(config);
28661
+ };
28662
+ const initAngularComponentByType = (type) => {
28663
+ const _components = {
28664
+ [NODE_TYPE.content]: ContentNodeComponent,
28665
+ [NODE_TYPE.start]: CircleNodeComponent,
28666
+ [NODE_TYPE.end]: CircleNodeComponent,
28667
+ [NODE_TYPE.template]: TemplateNodeComponent,
28668
+ [NODE_TYPE.gateway]: GatewayNodeComponent
28669
+ };
28670
+ return _components[type] || NodeComponent;
28671
+ };
28434
28672
 
28435
28673
  const createSegmentedPath = (connection, options) => {
28436
- const { multiPoints = true, offset = 0 } = options || {};
28674
+ var _a;
28675
+ const { multiPoints = true, offset = 0 } = ((_a = options === null || options === void 0 ? void 0 : options.transform) === null || _a === void 0 ? void 0 : _a.options) || {};
28676
+ const isVertical = !!(options === null || options === void 0 ? void 0 : options.vertical);
28677
+ const direction = connection.direction;
28437
28678
  return (points) => {
28438
28679
  if (points.length !== 2) {
28439
28680
  throw new Error('Exactly two points are required to create a linear path.');
28440
28681
  }
28441
28682
  const [start, end] = points;
28683
+ if (!isVertical) {
28684
+ switch (direction) {
28685
+ case 'down': {
28686
+ const offset = getRandomNumber(start.x, start.y, 10, 50, 150);
28687
+ const _points = [
28688
+ { x: start.x, y: start.y + offset },
28689
+ { x: end.x, y: end.y + offset }
28690
+ ];
28691
+ return [start, ..._points, end];
28692
+ }
28693
+ case 'backward': {
28694
+ const _points = [{ x: end.x, y: start.y }];
28695
+ return [start, ..._points, end];
28696
+ }
28697
+ case 'forward': {
28698
+ if (end.y < start.y) {
28699
+ const _points = [{ x: start.x, y: end.y }];
28700
+ return [start, ..._points, end];
28701
+ }
28702
+ break;
28703
+ }
28704
+ }
28705
+ }
28442
28706
  if (multiPoints) {
28443
28707
  const midpointY = (end.y - start.y) / 2 + start.y;
28444
28708
  const intermediatePoints = [
28445
28709
  { x: start.x, y: midpointY - offset },
28446
- { x: end.x, y: midpointY + offset },
28710
+ { x: end.x, y: midpointY + offset }
28447
28711
  ];
28448
- // Use bezier curves between points to smooth corners
28449
28712
  return [
28450
28713
  Object.assign(Object.assign({}, start), { controlOut: { x: start.x, y: midpointY - offset } }),
28451
- intermediatePoints[0],
28452
- intermediatePoints[1],
28453
- Object.assign(Object.assign({}, end), { controlIn: { x: end.x, y: midpointY + offset } }),
28714
+ ...intermediatePoints,
28715
+ Object.assign(Object.assign({}, end), { controlIn: { x: end.x, y: midpointY + offset } })
28454
28716
  ];
28455
28717
  }
28456
28718
  return [start, end];
@@ -28461,14 +28723,15 @@ const initPathPlugin = (config) => new ConnectionPathPlugin({
28461
28723
  curve: (c) => { var _a; return (_a = (c.curve || (config === null || config === void 0 ? void 0 : config.curve))) !== null && _a !== void 0 ? _a : curveLinear; },
28462
28724
  transformer: (c) => {
28463
28725
  var _a, _b, _c;
28464
- return ((_a = config === null || config === void 0 ? void 0 : config.transform) === null || _a === void 0 ? void 0 : _a.active)
28465
- ? createSegmentedPath(c, (_b = config === null || config === void 0 ? void 0 : config.transform) === null || _b === void 0 ? void 0 : _b.options)
28466
- : Transformers.classic({
28467
- vertical: !!(config === null || config === void 0 ? void 0 : config.vertical),
28468
- curvature: (_c = config === null || config === void 0 ? void 0 : config.curvature) !== null && _c !== void 0 ? _c : 0.3,
28469
- });
28726
+ if ((_a = config === null || config === void 0 ? void 0 : config.transform) === null || _a === void 0 ? void 0 : _a.active) {
28727
+ return (((_b = c === null || c === void 0 ? void 0 : c.createSegmentedPath) === null || _b === void 0 ? void 0 : _b.call(c, c, config)) || createSegmentedPath(c, config));
28728
+ }
28729
+ return Transformers.classic({
28730
+ vertical: !!(config === null || config === void 0 ? void 0 : config.vertical),
28731
+ curvature: (_c = config === null || config === void 0 ? void 0 : config.curvature) !== null && _c !== void 0 ? _c : 0.3
28732
+ });
28470
28733
  },
28471
- arrow: (connection) => (!(config === null || config === void 0 ? void 0 : config.arrow) ? false : config === null || config === void 0 ? void 0 : config.arrow),
28734
+ arrow: (connection) => (!(config === null || config === void 0 ? void 0 : config.arrow) ? false : config === null || config === void 0 ? void 0 : config.arrow)
28472
28735
  });
28473
28736
 
28474
28737
  const socketPositionWatcher = (offset = 1, isVertical = false, editor) => getDOMSocketPosition({
@@ -28478,9 +28741,9 @@ const socketPositionWatcher = (offset = 1, isVertical = false, editor) => getDOM
28478
28741
  });
28479
28742
 
28480
28743
  const createDiagramEditor = (container, injector, config) => __awaiter(void 0, void 0, void 0, function* () {
28481
- var _a, _b, _c, _d, _e, _f, _g;
28744
+ var _a, _b, _c, _d, _e, _f, _g, _h;
28482
28745
  //#region PLUGINS
28483
- const socket = new Socket('', config === null || config === void 0 ? void 0 : config.socketType);
28746
+ const socket = new Socket({ name: '', renderType: config === null || config === void 0 ? void 0 : config.socketType });
28484
28747
  const editor = new NodeEditor();
28485
28748
  const area = new AreaPlugin(container);
28486
28749
  const connection = new ConnectionPlugin();
@@ -28498,31 +28761,33 @@ const createDiagramEditor = (container, injector, config) => __awaiter(void 0, v
28498
28761
  RerouteExtensions.selectablePins(reroute, selector, accumulating);
28499
28762
  //#endregion
28500
28763
  //#region PRESETS
28501
- arrange.addPreset(Presets.classic.setup());
28764
+ arrange.addPreset(((_b = config === null || config === void 0 ? void 0 : config.presets) === null || _b === void 0 ? void 0 : _b.arrange)
28765
+ ? config === null || config === void 0 ? void 0 : config.presets.arrange(editor)
28766
+ : Presets.classic.setup());
28502
28767
  angularRender.addPreset(Presets$1.classic.setup({
28503
- socketPositionWatcher: socketPositionWatcher(0, (_b = config === null || config === void 0 ? void 0 : config.path) === null || _b === void 0 ? void 0 : _b.vertical, editor),
28768
+ socketPositionWatcher: socketPositionWatcher(0, (_c = config === null || config === void 0 ? void 0 : config.path) === null || _c === void 0 ? void 0 : _c.vertical, editor),
28504
28769
  customize: {
28505
28770
  node: customizeNode(config, editor),
28506
28771
  connection: customizeConnection(config),
28507
- socket: customizeSocket(config),
28508
- },
28772
+ socket: customizeSocket(config)
28773
+ }
28509
28774
  }));
28510
- angularRender.addPreset(Presets$1.minimap.setup({ size: ((_c = config === null || config === void 0 ? void 0 : config.minimap) === null || _c === void 0 ? void 0 : _c.size) || 150 }));
28775
+ angularRender.addPreset(Presets$1.minimap.setup({ size: ((_d = config === null || config === void 0 ? void 0 : config.minimap) === null || _d === void 0 ? void 0 : _d.size) || 150 }));
28511
28776
  connection.addPreset(Presets$2.classic.setup());
28512
- if ((_d = config === null || config === void 0 ? void 0 : config.area) === null || _d === void 0 ? void 0 : _d.restrict) {
28777
+ if ((_e = config === null || config === void 0 ? void 0 : config.area) === null || _e === void 0 ? void 0 : _e.restrict) {
28513
28778
  const _scaling = (config === null || config === void 0 ? void 0 : config.area.scaling) || { min: 0.5, max: 1.5 };
28514
28779
  AreaExtensions.restrictor(area, {
28515
- scaling: () => _scaling,
28780
+ scaling: () => _scaling
28516
28781
  });
28517
28782
  }
28518
28783
  //#endregion
28519
28784
  //#region USE
28520
- if ((_e = config === null || config === void 0 ? void 0 : config.readonly) === null || _e === void 0 ? void 0 : _e.active) {
28785
+ if ((_f = config === null || config === void 0 ? void 0 : config.readonly) === null || _f === void 0 ? void 0 : _f.active) {
28521
28786
  editor.use(readonly.root);
28522
28787
  area.use(readonly.area);
28523
28788
  }
28524
28789
  editor.use(area);
28525
- if (!((_f = config === null || config === void 0 ? void 0 : config.readonly) === null || _f === void 0 ? void 0 : _f.active)) {
28790
+ if (!((_g = config === null || config === void 0 ? void 0 : config.readonly) === null || _g === void 0 ? void 0 : _g.active)) {
28526
28791
  // Don't use the connection plugin in readonly mode
28527
28792
  area.use(connection);
28528
28793
  }
@@ -28535,7 +28800,7 @@ const createDiagramEditor = (container, injector, config) => __awaiter(void 0, v
28535
28800
  //@ts-ignore
28536
28801
  angularRender.use(reroute);
28537
28802
  }
28538
- if ((_g = config === null || config === void 0 ? void 0 : config.minimap) === null || _g === void 0 ? void 0 : _g.active) {
28803
+ if ((_h = config === null || config === void 0 ? void 0 : config.minimap) === null || _h === void 0 ? void 0 : _h.active) {
28539
28804
  area.use(minimap);
28540
28805
  }
28541
28806
  // Render Diagram
@@ -28549,130 +28814,16 @@ const createDiagramEditor = (container, injector, config) => __awaiter(void 0, v
28549
28814
  connection,
28550
28815
  arrange,
28551
28816
  reroute,
28552
- readonly,
28817
+ readonly
28553
28818
  },
28554
28819
  destroy: () => area.destroy(),
28555
28820
  layout: (props) => arrange.layout(props),
28556
28821
  fitToZoom: () => {
28557
28822
  AreaExtensions.zoomAt(area, editor.getNodes());
28558
- },
28823
+ }
28559
28824
  };
28560
28825
  });
28561
28826
 
28562
- /**
28563
- *
28564
- * @param node
28565
- * @returns
28566
- */
28567
- const removeNode = (data, editor) => __awaiter(void 0, void 0, void 0, function* () {
28568
- if (!data || !editor) {
28569
- console.log('Node not found.');
28570
- return;
28571
- }
28572
- const nodes = editor.getNodes();
28573
- const node = editor.getNode(data.nodeId);
28574
- if (!node) {
28575
- console.log('Node not found.');
28576
- return;
28577
- }
28578
- if (node.type === NODE_TYPE.start && nodes.length > 1) {
28579
- return;
28580
- }
28581
- const nodeConfig = node.config;
28582
- return (nodeConfig === null || nodeConfig === void 0 ? void 0 : nodeConfig.isLinked)
28583
- ? yield removeNodeAndReplaceConnections(node, editor)
28584
- : yield removeNodeAndConnections(node, editor);
28585
- });
28586
- /**
28587
- *
28588
- * @param node
28589
- * @param editor
28590
- */
28591
- const removeNodeAndConnections = (node, editor) => __awaiter(void 0, void 0, void 0, function* () {
28592
- removeConnections(node, editor);
28593
- yield editor.removeNode(node.id);
28594
- });
28595
- /**
28596
- *
28597
- * @param node
28598
- * @param editor
28599
- */
28600
- const removeNodeAndReplaceConnections = (node, editor) => __awaiter(void 0, void 0, void 0, function* () {
28601
- const outputs = getConnections(editor, (connection) => connection.source == node.id);
28602
- const inputs = getConnections(editor, (connection) => connection.target == node.id);
28603
- if (!!inputs.length && !!outputs.length) {
28604
- yield _updateConnections(outputs, inputs, editor);
28605
- }
28606
- else {
28607
- removeConnections(node, editor);
28608
- }
28609
- yield editor.removeNode(node.id);
28610
- });
28611
- /**
28612
- *
28613
- * @param node
28614
- * @param editor
28615
- */
28616
- const removeConnections = (node, editor) => {
28617
- const connections = getConnections(editor, (connection) => connection.source === node.id || connection.target === node.id);
28618
- if (connections.length) {
28619
- connections.forEach((connection) => {
28620
- editor.removeConnection(connection.id);
28621
- });
28622
- }
28623
- };
28624
- /**
28625
- *
28626
- * @param editor
28627
- * @param predicate
28628
- * @returns
28629
- */
28630
- const getConnections = (editor, predicate) => {
28631
- return editor.getConnections().filter(predicate);
28632
- };
28633
- /**
28634
- *
28635
- * @param outputs
28636
- * @param inputs
28637
- * @param editor
28638
- */
28639
- const _updateConnections = (outputs, inputs, editor) => __awaiter(void 0, void 0, void 0, function* () {
28640
- const source = inputs[0].source;
28641
- const target = outputs[0].target;
28642
- const sourceNode = editor.getNode(source);
28643
- const targetNode = editor.getNode(target);
28644
- [...outputs, ...inputs].forEach((connection) => __awaiter(void 0, void 0, void 0, function* () {
28645
- yield editor.removeConnection(connection.id);
28646
- }));
28647
- if (!sourceNode || !targetNode) {
28648
- return;
28649
- }
28650
- const connection = new Connection(sourceNode, `${sourceNode.id}-output`, targetNode, `${targetNode.id}-input`);
28651
- yield editor.addConnection(connection);
28652
- });
28653
-
28654
- function serializePort(port) {
28655
- return {
28656
- id: port.id,
28657
- label: port.label,
28658
- socket: {
28659
- name: port.socket.name,
28660
- },
28661
- };
28662
- }
28663
- function serializeControl(control) {
28664
- if (control instanceof ClassicPreset.InputControl) {
28665
- return {
28666
- __type: 'ClassicPreset.InputControl',
28667
- id: control.id,
28668
- readonly: control.readonly,
28669
- type: control.type,
28670
- value: control.value,
28671
- };
28672
- }
28673
- return null;
28674
- }
28675
-
28676
28827
  class DiagramService {
28677
28828
  /**
28678
28829
  *
@@ -28689,6 +28840,9 @@ class DiagramService {
28689
28840
  this.destroy = editor.destroy;
28690
28841
  this.fitToZoom = editor.fitToZoom;
28691
28842
  }
28843
+ diagramClientRect() {
28844
+ return this.plugins.area.container.getBoundingClientRect();
28845
+ }
28692
28846
  getContentNodes() {
28693
28847
  return this.editor
28694
28848
  .getNodes()
@@ -28713,10 +28867,22 @@ class DiagramService {
28713
28867
  createNode(type = NODE_TYPE.content, config) {
28714
28868
  const _node = initNodeByType(type, config);
28715
28869
  if (config.type !== NODE_TYPE.start) {
28716
- this.createInputs(_node);
28870
+ this.createInput(_node, DiagramUtils.createInputId(_node.id), {
28871
+ styleClass: DiagramUtils.createInputClass()
28872
+ });
28717
28873
  }
28718
28874
  if (config.type !== NODE_TYPE.end) {
28719
- this.createOutputs(_node);
28875
+ this.createOutput(_node, DiagramUtils.createOutputId(_node.id), {
28876
+ styleClass: DiagramUtils.createOutputClass()
28877
+ });
28878
+ }
28879
+ if (config.type === NODE_TYPE.gateway) {
28880
+ this._creteGatewayOutput(_node);
28881
+ }
28882
+ if ([NODE_TYPE.content, NODE_TYPE.template].includes(config.type)) {
28883
+ const contentPorts = ['secondary', 'tertiary', 'quaternary'];
28884
+ DiagramUtils.createInputsConfig(_node.id, contentPorts).forEach(({ id, config }) => this.createInput(_node, id, config));
28885
+ DiagramUtils.createOutputsConfig(_node.id, contentPorts).forEach(({ id, config }) => this.createOutput(_node, id, config));
28720
28886
  }
28721
28887
  _node.notify = this.notifyListener(_node);
28722
28888
  return _node;
@@ -28729,6 +28895,18 @@ class DiagramService {
28729
28895
  const _isExist = _nodes.some((nd) => nd.type === NODE_TYPE.start);
28730
28896
  return !_isExist;
28731
28897
  }
28898
+ getNode(id) {
28899
+ return this.editor.getNode(id);
28900
+ }
28901
+ getNodes() {
28902
+ return this.editor.getNodes();
28903
+ }
28904
+ getConnections() {
28905
+ return this.editor.getConnections();
28906
+ }
28907
+ getConnection(id) {
28908
+ return this.editor.getConnection(id);
28909
+ }
28732
28910
  getLastNode() {
28733
28911
  const nodes = this.editor.getNodes();
28734
28912
  return nodes.length ? nodes[nodes.length - 1] : null;
@@ -28736,27 +28914,35 @@ class DiagramService {
28736
28914
  getNodesByType(type) {
28737
28915
  return this.editor.getNodes().filter((nd) => nd.type === type);
28738
28916
  }
28917
+ getViewNodes() {
28918
+ return Array.from(this.plugins.area.nodeViews.values());
28919
+ }
28739
28920
  getLastViewNode() {
28740
- const nodes = Array.from(this.plugins.area.nodeViews.values());
28921
+ const nodes = this.getViewNodes();
28741
28922
  return nodes.length ? nodes[nodes.length - 1] : null;
28742
28923
  }
28743
- createInputs(node) {
28744
- node.addInput(`${node.id}-input`, new ClassicPreset.Input(this.socket));
28924
+ getViewNode(id) {
28925
+ return this.plugins.area.nodeViews.get(id);
28926
+ }
28927
+ getViewNodePosition(id) {
28928
+ const node = this.getViewNode(id);
28929
+ return node ? node.position : null;
28930
+ }
28931
+ createInput(node, id = `${node.id}-input`, config) {
28932
+ node.addInput(id, new InputPort(Object.assign({ socket: this.socket }, config)));
28745
28933
  return node;
28746
28934
  }
28747
- createOutputs(node) {
28748
- node.addOutput(`${node.id}-output`, new ClassicPreset.Output(this.socket, '', false));
28935
+ createOutput(node, id = `${node.id}-output`, config) {
28936
+ node.addOutput(id, new OutputPort(Object.assign({ socket: this.socket }, config)));
28749
28937
  return node;
28750
28938
  }
28751
- addConnection(sourceNode, targetNode) {
28939
+ addConnection(sourceNode, targetNode, config) {
28752
28940
  return __awaiter(this, void 0, void 0, function* () {
28753
- yield this.editor.addConnection(this.createConnection(sourceNode, targetNode));
28941
+ yield this.editor.addConnection(this.createConnection(sourceNode, targetNode, config));
28754
28942
  });
28755
28943
  }
28756
- createConnection(sourceNode, targetNode) {
28757
- const connection = new Connection(sourceNode, `${sourceNode.id}-output`, targetNode, `${targetNode.id}-input`);
28758
- connection.status = targetNode.status;
28759
- return connection;
28944
+ createConnection(sourceNode, targetNode, config) {
28945
+ return new Connection(sourceNode, targetNode, config);
28760
28946
  }
28761
28947
  appendConnection(connection) {
28762
28948
  return __awaiter(this, void 0, void 0, function* () {
@@ -28777,11 +28963,36 @@ class DiagramService {
28777
28963
  return (eventType, payload) => {
28778
28964
  var _a;
28779
28965
  const _actions = {
28780
- [NOTIFY_EVENT.remove]: this._removeNode.bind(this),
28966
+ [NOTIFY_EVENT.remove]: this._removeNode.bind(this)
28781
28967
  };
28782
28968
  return (_a = _actions[eventType]) === null || _a === void 0 ? void 0 : _a.call(_actions, payload);
28783
28969
  };
28784
28970
  }
28971
+ translateView() {
28972
+ return __awaiter(this, void 0, void 0, function* () {
28973
+ const { container, area } = this.plugins.area;
28974
+ const rect = container.getBoundingClientRect();
28975
+ const k = area.transform.k;
28976
+ const delta = -0.2;
28977
+ const ox = Math.max(0, (rect.left - container.clientWidth / 2) * k);
28978
+ const oy = Math.max(0, (rect.top - container.clientHeight / 2) * k);
28979
+ area.zoom(Math.max(0.1, k * (1 + delta)), ox * delta, oy * delta);
28980
+ });
28981
+ }
28982
+ removeEndNode() {
28983
+ return __awaiter(this, void 0, void 0, function* () {
28984
+ const node = this.getNodesByType(NODE_TYPE.end)[0];
28985
+ if (node) {
28986
+ yield removeNodeAndConnections(node, this.editor);
28987
+ }
28988
+ });
28989
+ }
28990
+ _creteGatewayOutput(_node) {
28991
+ DiagramUtils.createOutputsConfig(_node.id, [
28992
+ 'secondary',
28993
+ 'tertiary'
28994
+ ]).forEach((input) => this.createOutput(_node, input.id, input === null || input === void 0 ? void 0 : input.config));
28995
+ }
28785
28996
  _removeNode(data) {
28786
28997
  return __awaiter(this, void 0, void 0, function* () {
28787
28998
  const node = this.editor.getNode(data.nodeId);
@@ -28819,17 +29030,6 @@ class DiagramService {
28819
29030
  this.plugins.readonly.enable();
28820
29031
  });
28821
29032
  }
28822
- translateView() {
28823
- return __awaiter(this, void 0, void 0, function* () {
28824
- const { container, area } = this.plugins.area;
28825
- const rect = container.getBoundingClientRect();
28826
- const k = area.transform.k;
28827
- const delta = -0.2;
28828
- const ox = Math.max(0, (rect.left - container.clientWidth / 2) * k);
28829
- const oy = Math.max(0, (rect.top - container.clientHeight / 2) * k);
28830
- area.zoom(Math.max(0.1, k * (1 + delta)), ox * delta, oy * delta);
28831
- });
28832
- }
28833
29033
  }
28834
29034
  DiagramService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DiagramService, deps: [{ token: DiagramPluginsService }], target: i0.ɵɵFactoryTarget.Injectable });
28835
29035
  DiagramService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DiagramService });
@@ -28868,9 +29068,6 @@ class WorkflowService {
28868
29068
  this._defaultNodeMargin = NODE_MARGIN;
28869
29069
  this._offset = 60;
28870
29070
  }
28871
- get _diagramClientRect() {
28872
- return this._plugins.area.container.getBoundingClientRect();
28873
- }
28874
29071
  setConfig(_config) {
28875
29072
  this._config = _config;
28876
29073
  this._message.sendMessage(MESSAGE_TYPE.configUpdated, _config);
@@ -28912,10 +29109,7 @@ class WorkflowService {
28912
29109
  }
28913
29110
  removeEndNode() {
28914
29111
  return __awaiter(this, void 0, void 0, function* () {
28915
- const node = this._diagram.getNodesByType(NODE_TYPE.end)[0];
28916
- if (node) {
28917
- yield removeNodeAndConnections(node, this._diagram.editor);
28918
- }
29112
+ yield this._diagram.removeEndNode();
28919
29113
  });
28920
29114
  }
28921
29115
  /**
@@ -28928,7 +29122,7 @@ class WorkflowService {
28928
29122
  const isEndNode = _node.type === NODE_TYPE.end;
28929
29123
  return {
28930
29124
  x: this._calculatePositionX(lastNode.node.type, lastNode.viewNode.position.x),
28931
- y: this._calculatePositionY(isEndNode ? NODE_TYPE.end : lastNode.node.type, lastNode.viewNode.position.y),
29125
+ y: this._calculatePositionY(isEndNode ? NODE_TYPE.end : lastNode.node.type, lastNode.viewNode.position.y)
28932
29126
  };
28933
29127
  }
28934
29128
  _createNode(nodeType, data, config) {
@@ -28946,7 +29140,8 @@ class WorkflowService {
28946
29140
  return this._changeNodeSocketPosition(context);
28947
29141
  }
28948
29142
  }
28949
- if (context.type === 'nodecreated' && context.data.type !== NODE_TYPE.end) {
29143
+ if (context.type === 'nodecreated' &&
29144
+ context.data.type !== NODE_TYPE.end) {
28950
29145
  setTimeout(() => {
28951
29146
  this._updateNodePosition(context);
28952
29147
  });
@@ -28965,12 +29160,12 @@ class WorkflowService {
28965
29160
  }
28966
29161
  return Object.assign({}, context);
28967
29162
  }
28968
- _linkToLastNode(_addedNode) {
29163
+ _linkToLastNode(_addedNode, connectionConfig) {
28969
29164
  return __awaiter(this, void 0, void 0, function* () {
28970
29165
  let node = this._diagram.getLastNode();
28971
29166
  let viewNode = this._diagram.getLastViewNode();
28972
29167
  if (node && viewNode) {
28973
- yield this._diagram.addConnection(node, _addedNode);
29168
+ yield this._diagram.addConnection(node, _addedNode, connectionConfig);
28974
29169
  return { node, viewNode };
28975
29170
  }
28976
29171
  return null;
@@ -28999,7 +29194,7 @@ class WorkflowService {
28999
29194
  const startNode = this._diagram.createNode(NODE_TYPE.start, {
29000
29195
  type: NODE_TYPE.start,
29001
29196
  label: NODE_TYPE.start,
29002
- name: 'start',
29197
+ name: 'start'
29003
29198
  });
29004
29199
  yield this._diagram.addNode(startNode);
29005
29200
  yield this._plugins.area.translate(startNode.id, position);
@@ -29040,7 +29235,7 @@ class WorkflowService {
29040
29235
  */
29041
29236
  _isOverEndBoundary(node, previousNode) {
29042
29237
  var _a;
29043
- const _diagramWidth = Number((_a = this._diagramClientRect) === null || _a === void 0 ? void 0 : _a.width) - this._defaultNodeMargin;
29238
+ const _diagramWidth = Number((_a = this._diagram.diagramClientRect()) === null || _a === void 0 ? void 0 : _a.width) - this._defaultNodeMargin;
29044
29239
  const _width = previousNode.position.x + (node.width + this._defaultNodeMargin) * 2;
29045
29240
  return _width >= _diagramWidth;
29046
29241
  }
@@ -29055,7 +29250,8 @@ class WorkflowService {
29055
29250
  this._defaultNodeWidth +
29056
29251
  this._defaultNodeMargin * 2 +
29057
29252
  this._offset;
29058
- const wrapLine = Number((_a = this._diagramClientRect) === null || _a === void 0 ? void 0 : _a.width) - this._defaultNodeWidth * 2;
29253
+ const wrapLine = Number((_a = this._diagram.diagramClientRect()) === null || _a === void 0 ? void 0 : _a.width) -
29254
+ this._defaultNodeWidth * 2;
29059
29255
  return currentPosition >= wrapLine;
29060
29256
  }
29061
29257
  _updateNodePosition(context) {
@@ -29064,7 +29260,7 @@ class WorkflowService {
29064
29260
  const _previousNode = this._diagram.getLastNode();
29065
29261
  const _nodeViewPosition = (_a = this._plugins.area.nodeViews.get(context.data.id)) === null || _a === void 0 ? void 0 : _a.position;
29066
29262
  if (_previousNode && _nodeViewPosition) {
29067
- const _diagramWidth = Number((_b = this._diagramClientRect) === null || _b === void 0 ? void 0 : _b.width);
29263
+ const _diagramWidth = Number((_b = this._diagram.diagramClientRect()) === null || _b === void 0 ? void 0 : _b.width);
29068
29264
  const _currentX = _nodeViewPosition.x + context.data.width;
29069
29265
  if (_currentX >= _diagramWidth) {
29070
29266
  this._plugins.readonly.disable();
@@ -29078,7 +29274,7 @@ class WorkflowService {
29078
29274
  }
29079
29275
  yield this._plugins.area.translate(context.data.id, {
29080
29276
  x: x,
29081
- y: _nodeViewPosition.y + this._defaultNodeMargin + context.data.height,
29277
+ y: _nodeViewPosition.y + this._defaultNodeMargin + context.data.height
29082
29278
  });
29083
29279
  this._plugins.readonly.enable();
29084
29280
  }
@@ -29127,114 +29323,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
29127
29323
  type: Input
29128
29324
  }] } });
29129
29325
 
29130
- class RemoveButtonComponent {
29131
- constructor() {
29132
- this.remove = new EventEmitter();
29133
- }
29134
- }
29135
- RemoveButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RemoveButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
29136
- RemoveButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RemoveButtonComponent, selector: "node-remove-button", outputs: { remove: "remove" }, ngImport: i0, template: `
29137
- <button
29138
- mat-icon-button
29139
- (click)="remove.emit()"
29140
- (pointerdown)="$event.stopPropagation()"
29141
- (dblclick)="$event.stopPropagation()"
29142
- class="remove-icon"
29143
- >
29144
- <mat-icon>close</mat-icon>
29145
- </button>
29146
- `, isInline: true, styles: ["\n :host {\n --size: var(--remove-icon-size, 30px);\n position: var(--remove-icon-position, absolute);\n inset: var(--remove-icon-inset, 0 0 auto auto);\n opacity: var(--remove-icon-opacity, 0);\n background: var(--remove-icon-background, inherit);\n width: var(--size);\n height: var(--size);\n line-height: var(var(--remove-icon-size), calc(var(--size) - 6));\n border-radius: 50%;\n z-index: 2;\n .remove-icon {\n border: 1px solid currentColor;\n border-radius: 50%;\n width: var(--size);\n height: var(--size);\n line-height: var(--remove-icon-size, 30px);\n background: var(--remove-icon-background, inherit);\n }\n }\n "], components: [{ type: i1$8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
29147
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RemoveButtonComponent, decorators: [{
29148
- type: Component,
29149
- args: [{
29150
- selector: 'node-remove-button',
29151
- template: `
29152
- <button
29153
- mat-icon-button
29154
- (click)="remove.emit()"
29155
- (pointerdown)="$event.stopPropagation()"
29156
- (dblclick)="$event.stopPropagation()"
29157
- class="remove-icon"
29158
- >
29159
- <mat-icon>close</mat-icon>
29160
- </button>
29161
- `,
29162
- styles: [
29163
- `
29164
- :host {
29165
- --size: var(--remove-icon-size, 30px);
29166
- position: var(--remove-icon-position, absolute);
29167
- inset: var(--remove-icon-inset, 0 0 auto auto);
29168
- opacity: var(--remove-icon-opacity, 0);
29169
- background: var(--remove-icon-background, inherit);
29170
- width: var(--size);
29171
- height: var(--size);
29172
- line-height: var(var(--remove-icon-size), calc(var(--size) - 6));
29173
- border-radius: 50%;
29174
- z-index: 2;
29175
- .remove-icon {
29176
- border: 1px solid currentColor;
29177
- border-radius: 50%;
29178
- width: var(--size);
29179
- height: var(--size);
29180
- line-height: var(--remove-icon-size, 30px);
29181
- background: var(--remove-icon-background, inherit);
29182
- }
29183
- }
29184
- `,
29185
- ],
29186
- }]
29187
- }], propDecorators: { remove: [{
29188
- type: Output
29189
- }] } });
29190
-
29191
- class NodeInputsComponent {
29192
- }
29193
- NodeInputsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NodeInputsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
29194
- NodeInputsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NodeInputsComponent, selector: "node-inputs", inputs: { direction: "direction", data: "data", seed: "seed", emit: "emit", sortByIndex: "sortByIndex" }, host: { properties: { "class": " 'da-node__inputs inputs-' + direction" } }, ngImport: i0, template: `
29195
- <div
29196
- *ngFor="let input of data.inputs | keyvalue : sortByIndex"
29197
- class="da-node__inputs__socket"
29198
- style=" height: var(--socket-size, 16px);"
29199
- refComponent
29200
- [data]="{
29201
- type: 'socket',
29202
- side: 'input',
29203
- key: input.key,
29204
- nodeId: data.id,
29205
- payload: input.value?.socket,
29206
- seed: seed
29207
- }"
29208
- [emit]="emit"
29209
- ></div>
29210
- `, isInline: true, directives: [{ type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$8.RefDirective, selector: "[refComponent]", inputs: ["data", "emit"] }], pipes: { "keyvalue": i4$1.KeyValuePipe }, encapsulation: i0.ViewEncapsulation.None });
29211
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NodeInputsComponent, decorators: [{
29326
+ class NodePortsComponent {
29327
+ }
29328
+ NodePortsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NodePortsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
29329
+ NodePortsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NodePortsComponent, selector: "node-ports", inputs: { inputsDirection: "inputsDirection", outputsDirection: "outputsDirection", data: "data", seed: "seed", emit: "emit", sortByIndex: "sortByIndex" }, host: { properties: { "class": "'node-ports--inputs--' + inputsDirection + ' ' + 'node-ports--outputs--' + outputsDirection " }, classAttribute: "node-ports" }, ngImport: i0, template: `
29330
+ <div
29331
+ *ngFor="let input of data.inputs | keyvalue : sortByIndex"
29332
+ class="node-port node-port--input {{ input.value.styleClass }}"
29333
+ refComponent
29334
+ [title]="input.value.styleClass"
29335
+ [data]="{
29336
+ type: 'socket',
29337
+ side: 'input',
29338
+ key: input.key,
29339
+ nodeId: data.id,
29340
+ payload: input.value?.socket,
29341
+ seed: seed
29342
+ }"
29343
+ [emit]="emit"
29344
+ ></div>
29345
+
29346
+ <div
29347
+ *ngFor="let output of data.outputs | keyvalue : sortByIndex"
29348
+ class="node-port node-port--output {{ output.value.styleClass }}"
29349
+ refComponent
29350
+ [title]="output.value.styleClass"
29351
+ [data]="{
29352
+ type: 'socket',
29353
+ side: 'output',
29354
+ key: output.key,
29355
+ nodeId: data.id,
29356
+ payload: output.value?.socket,
29357
+ seed: seed
29358
+ }"
29359
+ [emit]="emit"
29360
+ ></div>
29361
+ `, isInline: true, styles: [".node-ports{--port-size: 16px;position:absolute;width:100%;height:100%}.node-port{position:absolute;inset-inline:var(--port-inset-inline);inset-block:var(--port-inset-block);display:inline-block;width:var(--port-size);height:var(--port-size)}.node-ports--inputs--start .input-primary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--start .input-secondary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: 0 auto}.node-ports--inputs--start .input-tertiary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--start .input-quaternary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: auto 0}.node-ports--inputs--end .input-primary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--end .input-secondary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: auto 0}.node-ports--inputs--end .input-tertiary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--end .input-quaternary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: 0 auto}.node-ports--inputs--top .input-primary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: 0 auto}.node-ports--inputs--top .input-secondary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--top .input-tertiary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: auto 0}.node-ports--inputs--top .input-quaternary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--bottom .input-primary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: auto 0}.node-ports--inputs--bottom .input-secondary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--bottom .input-tertiary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: 0 auto}.node-ports--inputs--bottom .input-quaternary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--outputs--top .output-primary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: 0 auto}.node-ports--outputs--top .output-secondary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--top .output-tertiary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: auto 0}.node-ports--outputs--top .output-quaternary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--bottom .output-primary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: auto 0}.node-ports--outputs--bottom .output-secondary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--bottom .output-tertiary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: 0 auto}.node-ports--outputs--bottom .output-quaternary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--start .output-primary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--start .output-secondary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: 0 auto}.node-ports--outputs--start .output-tertiary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--start .output-quaternary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: auto 0}.node-ports--outputs--end .output-primary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--end .output-secondary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: auto 0}.node-ports--outputs--end .output-tertiary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--end .output-quaternary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: 0 auto}\n"], directives: [{ type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$8.RefDirective, selector: "[refComponent]", inputs: ["data", "emit"] }], pipes: { "keyvalue": i4$1.KeyValuePipe }, encapsulation: i0.ViewEncapsulation.None });
29362
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NodePortsComponent, decorators: [{
29212
29363
  type: Component,
29213
29364
  args: [{
29214
- selector: 'node-inputs',
29365
+ selector: 'node-ports',
29215
29366
  encapsulation: ViewEncapsulation.None,
29367
+ styleUrls: ['../styles/ports.scss'],
29216
29368
  host: {
29217
- '[class]': " 'da-node__inputs inputs-' + direction",
29369
+ class: 'node-ports',
29370
+ '[class]': "'node-ports--inputs--' + inputsDirection + ' ' + 'node-ports--outputs--' + outputsDirection "
29218
29371
  },
29219
29372
  template: `
29220
- <div
29221
- *ngFor="let input of data.inputs | keyvalue : sortByIndex"
29222
- class="da-node__inputs__socket"
29223
- style=" height: var(--socket-size, 16px);"
29224
- refComponent
29225
- [data]="{
29226
- type: 'socket',
29227
- side: 'input',
29228
- key: input.key,
29229
- nodeId: data.id,
29230
- payload: input.value?.socket,
29231
- seed: seed
29232
- }"
29233
- [emit]="emit"
29234
- ></div>
29235
- `,
29236
- }]
29237
- }], propDecorators: { direction: [{
29373
+ <div
29374
+ *ngFor="let input of data.inputs | keyvalue : sortByIndex"
29375
+ class="node-port node-port--input {{ input.value.styleClass }}"
29376
+ refComponent
29377
+ [title]="input.value.styleClass"
29378
+ [data]="{
29379
+ type: 'socket',
29380
+ side: 'input',
29381
+ key: input.key,
29382
+ nodeId: data.id,
29383
+ payload: input.value?.socket,
29384
+ seed: seed
29385
+ }"
29386
+ [emit]="emit"
29387
+ ></div>
29388
+
29389
+ <div
29390
+ *ngFor="let output of data.outputs | keyvalue : sortByIndex"
29391
+ class="node-port node-port--output {{ output.value.styleClass }}"
29392
+ refComponent
29393
+ [title]="output.value.styleClass"
29394
+ [data]="{
29395
+ type: 'socket',
29396
+ side: 'output',
29397
+ key: output.key,
29398
+ nodeId: data.id,
29399
+ payload: output.value?.socket,
29400
+ seed: seed
29401
+ }"
29402
+ [emit]="emit"
29403
+ ></div>
29404
+ `
29405
+ }]
29406
+ }], propDecorators: { inputsDirection: [{
29407
+ type: Input
29408
+ }], outputsDirection: [{
29238
29409
  type: Input
29239
29410
  }], data: [{
29240
29411
  type: Input
@@ -29246,64 +29417,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
29246
29417
  type: Input
29247
29418
  }] } });
29248
29419
 
29249
- class NodeOutputsComponent {
29420
+ class RemoveButtonComponent {
29421
+ constructor() {
29422
+ this.remove = new EventEmitter();
29423
+ }
29250
29424
  }
29251
- NodeOutputsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NodeOutputsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
29252
- NodeOutputsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NodeOutputsComponent, selector: "node-outputs", inputs: { direction: "direction", data: "data", seed: "seed", emit: "emit", sortByIndex: "sortByIndex" }, host: { properties: { "class": " 'da-node__outputs outputs-' + direction" } }, ngImport: i0, template: `<div
29253
- class="da-node__outputs__socket"
29254
- style=" height: var(--socket-size, 16px);"
29255
- *ngFor="let output of data.outputs | keyvalue : sortByIndex"
29256
- refComponent
29257
- [data]="{
29258
- type: 'socket',
29259
- side: 'output',
29260
- key: output.key,
29261
- nodeId: data.id,
29262
- payload: output.value?.socket,
29263
- seed: seed
29264
- }"
29265
- [emit]="emit"
29266
- ></div>`, isInline: true, directives: [{ type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$8.RefDirective, selector: "[refComponent]", inputs: ["data", "emit"] }], pipes: { "keyvalue": i4$1.KeyValuePipe }, encapsulation: i0.ViewEncapsulation.None });
29267
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NodeOutputsComponent, decorators: [{
29425
+ RemoveButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RemoveButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
29426
+ RemoveButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RemoveButtonComponent, selector: "node-remove-button", outputs: { remove: "remove" }, ngImport: i0, template: `
29427
+ <button
29428
+ mat-icon-button
29429
+ (click)="remove.emit()"
29430
+ (pointerdown)="$event.stopPropagation()"
29431
+ (dblclick)="$event.stopPropagation()"
29432
+ class="remove-icon"
29433
+ >
29434
+ <mat-icon>close</mat-icon>
29435
+ </button>
29436
+ `, isInline: true, styles: ["\n\t\t\t:host {\n\t\t\t\t--size: var(--remove-icon-size, 30px);\n\t\t\t\tposition: var(--remove-icon-position, absolute);\n\t\t\t\tinset: var(--remove-icon-inset, 0 0 auto auto);\n\t\t\t\topacity: var(--remove-icon-opacity, 0);\n\t\t\t\tbackground: var(--remove-icon-background, #fff);\n\t\t\t\twidth: var(--size);\n\t\t\t\theight: var(--size);\n\t\t\t\tline-height: var(var(--remove-icon-size), calc(var(--size) - 6));\n\t\t\t\tborder-radius: var(--remove-icon-radius, 50%);\n\t\t\t\tz-index: 2;\n\t\t\t\t.remove-icon {\n\t\t\t\t\tborder: 1px solid currentColor;\n\t\t\t\t\tborder-radius: var(--remove-icon-radius, 50%);\n\t\t\t\t\twidth: var(--size);\n\t\t\t\t\theight: var(--size);\n\t\t\t\t\tline-height: var(--remove-icon-size, 24px);\n\t\t\t\t\tbackground: var(--remove-icon-background, #fff);\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t}\n\t\t\t}\n\t\t"], components: [{ type: i1$8.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
29437
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RemoveButtonComponent, decorators: [{
29268
29438
  type: Component,
29269
29439
  args: [{
29270
- selector: 'node-outputs',
29271
- encapsulation: ViewEncapsulation.None,
29272
- host: {
29273
- '[class]': " 'da-node__outputs outputs-' + direction",
29274
- },
29275
- template: `<div
29276
- class="da-node__outputs__socket"
29277
- style=" height: var(--socket-size, 16px);"
29278
- *ngFor="let output of data.outputs | keyvalue : sortByIndex"
29279
- refComponent
29280
- [data]="{
29281
- type: 'socket',
29282
- side: 'output',
29283
- key: output.key,
29284
- nodeId: data.id,
29285
- payload: output.value?.socket,
29286
- seed: seed
29287
- }"
29288
- [emit]="emit"
29289
- ></div>`,
29440
+ selector: 'node-remove-button',
29441
+ template: `
29442
+ <button
29443
+ mat-icon-button
29444
+ (click)="remove.emit()"
29445
+ (pointerdown)="$event.stopPropagation()"
29446
+ (dblclick)="$event.stopPropagation()"
29447
+ class="remove-icon"
29448
+ >
29449
+ <mat-icon>close</mat-icon>
29450
+ </button>
29451
+ `,
29452
+ styles: [
29453
+ `
29454
+ :host {
29455
+ --size: var(--remove-icon-size, 30px);
29456
+ position: var(--remove-icon-position, absolute);
29457
+ inset: var(--remove-icon-inset, 0 0 auto auto);
29458
+ opacity: var(--remove-icon-opacity, 0);
29459
+ background: var(--remove-icon-background, #fff);
29460
+ width: var(--size);
29461
+ height: var(--size);
29462
+ line-height: var(var(--remove-icon-size), calc(var(--size) - 6));
29463
+ border-radius: var(--remove-icon-radius, 50%);
29464
+ z-index: 2;
29465
+ .remove-icon {
29466
+ border: 1px solid currentColor;
29467
+ border-radius: var(--remove-icon-radius, 50%);
29468
+ width: var(--size);
29469
+ height: var(--size);
29470
+ line-height: var(--remove-icon-size, 24px);
29471
+ background: var(--remove-icon-background, #fff);
29472
+ display: flex;
29473
+ align-items: center;
29474
+ justify-content: center;
29475
+ }
29476
+ }
29477
+ `
29478
+ ]
29290
29479
  }]
29291
- }], propDecorators: { direction: [{
29292
- type: Input
29293
- }], data: [{
29294
- type: Input
29295
- }], seed: [{
29296
- type: Input
29297
- }], emit: [{
29298
- type: Input
29299
- }], sortByIndex: [{
29300
- type: Input
29480
+ }], propDecorators: { remove: [{
29481
+ type: Output
29301
29482
  }] } });
29302
29483
 
29303
29484
  class CircleNodeComponent extends BaseNodeComponent {
29304
29485
  }
29305
29486
  CircleNodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CircleNodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
29306
- CircleNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CircleNodeComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"da-node da-node--{{ data.type }} circle-node circle-node--{{ data.type }} {{\r\n data?.status ? ' da-node--' + data?.status : ''\r\n }} \"\r\n [style.--node-width]=\"data.width + 'px'\"\r\n [style.--node-height]=\"data.width + 'px'\"\r\n>\r\n <node-remove-button\r\n (remove)=\"removeNode()\"\r\n *ngIf=\"data.config?.canRemove\"\r\n ></node-remove-button>\r\n\r\n <div\r\n class=\"da-node__title circle-node__title\"\r\n [attr.tooltip]=\"data.content?.data?.tooltip\"\r\n [class.node-tooltip]=\"!!data.content?.data?.tooltip\"\r\n >\r\n {{ 'diagram.' + data.name | translate }}\r\n </div>\r\n\r\n <node-inputs\r\n [direction]=\"data.directions.inputs\"\r\n [data]=\"data\"\r\n [seed]=\"seed\"\r\n [emit]=\"emit\"\r\n [sortByIndex]=\"sortByIndex\"\r\n ></node-inputs>\r\n\r\n <node-outputs\r\n [direction]=\"data.directions.outputs\"\r\n [data]=\"data\"\r\n [seed]=\"seed\"\r\n [emit]=\"emit\"\r\n [sortByIndex]=\"sortByIndex\"\r\n ></node-outputs>\r\n</div>\r\n", styles: [".da-node{--width: var(--node-width);--height: var(--node-height);--socket-offset-negative: 0;--socket-position-start: var(--socket-offset-negative) auto;--socket-position-end: auto var(--socket-offset-negative);width:var(--width);height:var(--height);display:var(--node-display, flex);justify-content:var(--node-justify, center);align-items:var(--node-items, center);flex-direction:var(--node-direction, column);border:var(--node-border, 1px solid #234990);border-radius:var(--node-radius, 10px);color:var(--node-color, #234990);background:var(--node-background, #fff);box-shadow:var(--node-shadow, unset);cursor:var(--node-cursor, pointer)}.da-node--draft{--node-color: var(--status-draft-color, #555);--node-background: var( --status-draft-background, #f5f5f5 );--node-border: var(--status-draft-border, 1px solid #555);--node-shadow: var(--status-draft-shadow, unset)}.da-node--upcoming{--node-color: var(--status-upcoming-color, var(--Primary-100, #234990));--node-background: var( --status-upcoming-background, #fff );--node-border: var(--status-upcoming-border, 1px solid var(--node-color, #234990));--node-shadow: var(--status-upcoming-shadow, unset)}.da-node--inProgress{--node-color: var(--status-progress-color, var(--orange-color, #f29339));--node-background: var( --status-progress-background, var(--light-orange-color, #fdf4dc) );--node-border: var(--status-progress-border, 1px solid var(--orange-color, #f29339));--node-shadow: var(--status-progress-shadow, var(--node-shadow, inset 0 0 0 2px var(--node-background), inset 0 0 0 3px var(--orange-color, #f29339)))}.da-node--completed{--node-color: var(--status-completed-color, var(--green-color, #05cd99));--node-background: var( --status-completed-background, var(--light-green-color, #f0fff0) );--node-border: var(--status-completed-border, 1px solid var(--green-color, #05cd99));--node-shadow: var(--status-completed-shadow, unset)}.da-node--approved{--node-color: var(--status-completed-color, var(--green-color, #05cd99));--node-background: var( --status-completed-background, var(--light-green-color, #f0fff0) );--node-border: var(--status-completed-border, 1px solid var(--green-color, #05cd99));--node-shadow: var(--status-completed-shadow, unset)}.da-node--rejected{--node-color: var(--status-rejected-color, var(--red-color, #bf0b30));--node-background: var( --status-rejected-background, var(--light-red-color, #ffe0e7) );--node-border: var(--status-rejected-border, 1px solid var(--red-color, #bf0b30));--node-shadow: var(--status-rejected-shadow, unset)}.da-node__check-status{position:absolute;position:var(--check-icon-position, absolute);inset:var(--check-icon-inset, -6px -6px auto auto);color:var(--check-icon-color)}.da-node__check-status--completed{--check-icon-color: var(--status-completed-color)}.da-node__check-status--rejected{--check-icon-color: var(--status-rejected-color)}.da-node__title{text-align:center;font-weight:600}.da-node__description,.da-node__title{color:var(--node-text-color, #28282d);font-size:var(--node-text-font-size, .8rem);text-align:var(--node-text-align, center);padding-inline:var(--node-text-inline, .4rem)}.da-node__icon{position:absolute;inset-inline-start:var(--node-icon-inset-inline, 5px);inset-block-start:var(--node-icon-inset-block, 5px)}.da-node__inputs,.da-node__outputs{position:var(--input-output-position, absolute);inset-inline:var(--in-out-inset-inline);inset-block:var(--in-out-inset-block);height:var(--socket-size, 16px)}.da-node__inputs__socket,.da-node__outputs__socket{height:var(--socket-size, 16px)}.da-node__inputs.inputs-top{--in-out-inset-block: var(--socket-position-start)}.da-node__inputs.inputs-bottom{--in-out-inset-block: var(--socket-position-end)}.da-node__inputs.inputs-start{--in-out-inset-inline: var(--socket-position-start)}.da-node__inputs.inputs-end{--in-out-inset-inline: var(--socket-position-end)}.da-node__outputs.outputs-top{--in-out-inset-block: var(--socket-offset-negative)}.da-node__outputs.outputs-bottom{--in-out-inset-block: var(--socket-position-end)}.da-node__outputs.outputs-start{--in-out-inset-inline: var(--socket-position-start)}.da-node__outputs.outputs-end{--in-out-inset-inline: var(--socket-position-end)}.da-node:hover{--remove-icon-inset: -8px -8px auto auto;--remove-icon-opacity: 1}\n", ".circle-node{--node-radius: 50%}.circle-node__title.node-tooltip:after{content:attr(tooltip);position:absolute;left:50%;top:-6px;transform:translate(-50%) translateY(-100%);background:rgba(0,0,0,.7);text-align:center;color:#fff;padding:4px 2px;font-size:12px;min-width:100px;border-radius:5px;pointer-events:none;display:var(--tooltip-display, none)}.circle-node:hover{--tooltip-display: block}.da-node--end{border-width:3px}\n"], components: [{ type: RemoveButtonComponent, selector: "node-remove-button", outputs: ["remove"] }, { type: NodeInputsComponent, selector: "node-inputs", inputs: ["direction", "data", "seed", "emit", "sortByIndex"] }, { type: NodeOutputsComponent, selector: "node-outputs", inputs: ["direction", "data", "seed", "emit", "sortByIndex"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1.TranslatePipe } });
29487
+ CircleNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CircleNodeComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div\r\n\tclass=\"da-node da-node--{{ data.type }} circle-node circle-node--{{\r\n\t\tdata.type\r\n\t}} {{ data?.status ? ' da-node--' + data?.status : '' }} \"\r\n\t[style.--node-width]=\"data.width + 'px'\"\r\n\t[style.--node-height]=\"data.width + 'px'\"\r\n>\r\n\t<node-ports\r\n\t\t[inputsDirection]=\"data.directions.inputs\"\r\n\t\t[outputsDirection]=\"data.directions.outputs\"\r\n\t\t[data]=\"data\"\r\n\t\t[seed]=\"seed\"\r\n\t\t[emit]=\"emit\"\r\n\t\t[sortByIndex]=\"sortByIndex\"\r\n\t></node-ports>\r\n\r\n\t<div class=\"da-node__content circle-node__content\">\r\n\t\t<node-remove-button\r\n\t\t\t(remove)=\"removeNode()\"\r\n\t\t\t*ngIf=\"data.config?.canRemove\"\r\n\t\t></node-remove-button>\r\n\r\n\t\t<div\r\n\t\t\tclass=\"da-node__title circle-node__title\"\r\n\t\t\t[attr.tooltip]=\"data.content?.data?.tooltip\"\r\n\t\t\t[class.node-tooltip]=\"!!data.content?.data?.tooltip\"\r\n\t\t>\r\n\t\t\t{{ 'diagram.' + data.name | translate }}\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n", styles: [".da-node{--socket-size: 16px;--width: var(--node-width);--height: var(--node-height);width:var(--width);height:var(--height);display:var(--node-display, flex);justify-content:var(--node-justify, center);align-items:var(--node-items, center);flex-direction:var(--node-direction, column);border:var(--node-border, 1px solid #234990);border-radius:var(--node-radius, 10px);color:var(--node-color, #234990);background:var(--node-background, #fff);box-shadow:var(--node-shadow, unset);cursor:var(--node-cursor, pointer);z-index:var(--node-z-index, 1)}.da-node--draft{--node-color: var( --status-draft-color, #555 );--node-background: var( --status-draft-background, #f5f5f5 );--node-border: var( --status-draft-border, 1px solid #555 );--node-shadow: var( --status-draft-shadow, unset )}.da-node--upcoming{--node-color: var( --status-upcoming-color, var(--Primary-100, #234990) );--node-background: var( --status-upcoming-background, #fff );--node-border: var( --status-upcoming-border, 1px solid var(--node-color, #234990) );--node-shadow: var( --status-upcoming-shadow, unset )}.da-node--ready{--node-color: var( --status-ready-color, var(--Primary-100, #234990) );--node-background: var( --status-ready-background, #fff );--node-border: var( --status-ready-border, 1px solid var(--node-color, #234990) );--node-shadow: var( --status-ready-shadow, unset )}.da-node--suspended{--node-color: var( --status-suspended-color, var(--orange-color, #f29339) );--node-background: var( --status-suspended-background, var(--light-orange-color, #fdf4dc) );--node-border: var( --status-suspended-border, 1px solid var(--orange-color, #f29339) );--node-shadow: var( --status-suspended-shadow, var(--node-shadow, inset 0 0 0 2px var(--node-background), inset 0 0 0 3px var(--orange-color, #f29339)) )}.da-node--inProgress{--node-color: var( --status-progress-color, var(--orange-color, #f29339) );--node-background: var( --status-progress-background, var(--light-orange-color, #fdf4dc) );--node-border: var( --status-progress-border, 1px solid var(--orange-color, #f29339) );--node-shadow: var( --status-progress-shadow, var(--node-shadow, inset 0 0 0 2px var(--node-background), inset 0 0 0 3px var(--orange-color, #f29339)) )}.da-node--completed{--node-color: var( --status-completed-color, var(--green-color, #05cd99) );--node-background: var( --status-completed-background, var(--light-green-color, #f0fff0) );--node-border: var( --status-completed-border, 1px solid var(--green-color, #05cd99) );--node-shadow: var( --status-completed-shadow, unset )}.da-node--approved{--node-color: var( --status-completed-color, var(--green-color, #05cd99) );--node-background: var( --status-completed-background, var(--light-green-color, #f0fff0) );--node-border: var( --status-completed-border, 1px solid var(--green-color, #05cd99) );--node-shadow: var( --status-completed-shadow, unset )}.da-node--rejected{--node-color: var( --status-rejected-color, var(--red-color, #bf0b30) );--node-background: var( --status-rejected-background, var(--light-red-color, #ffe0e7) );--node-border: var( --status-rejected-border, 1px solid var(--red-color, #bf0b30) );--node-shadow: var( --status-rejected-shadow, unset )}.da-node--canceled{--node-color: var( --status-canceled-color, var(--red-color, #bf0b30) );--node-background: var( --status-canceled-background, var(--light-red-color, #ffe0e7) );--node-border: var( --status-canceled-border, 1px solid var(--red-color, #bf0b30) );--node-shadow: var( --status-canceled-shadow, unset )}.da-node__check-status{position:absolute;position:var(--check-icon-position, absolute);inset:var(--check-icon-inset, -6px -6px auto auto);color:var(--check-icon-color)}.da-node__check-status--completed{--check-icon-color: var(--status-completed-color)}.da-node__check-status--rejected{--check-icon-color: var(--status-rejected-color)}.da-node__content{width:calc(100% - var(--socket-size));height:calc(100% - var(--socket-size));display:var(--node-display, flex);justify-content:var(--node-justify, center);align-items:var(--node-items, center);flex-direction:var(--node-direction, column);z-index:var(--node-z-index, 1)}.da-node__title{text-align:center;font-weight:600}.da-node__description,.da-node__title{color:var(--node-text-color, #28282d);font-size:var(--node-text-font-size, .8rem);text-align:var(--node-text-align, center);padding-inline:var(--node-text-inline, .4rem)}.da-node__icon{position:absolute;inset-inline-start:var(--node-icon-inset-inline, 5px);inset-block-start:var(--node-icon-inset-block, 5px)}.da-node:hover{--remove-icon-inset: -8px -8px auto auto;--remove-icon-opacity: 1}\n", ".circle-node{--node-radius: 50%}.circle-node__title.node-tooltip:after{content:attr(tooltip);position:absolute;left:50%;top:-6px;transform:translate(-50%) translateY(-100%);background:rgba(0,0,0,.7);text-align:center;color:#fff;padding:4px 2px;font-size:12px;min-width:100px;border-radius:5px;pointer-events:none;display:var(--tooltip-display, none)}.circle-node:hover{--tooltip-display: block}.da-node--end{border-width:3px}\n"], components: [{ type: NodePortsComponent, selector: "node-ports", inputs: ["inputsDirection", "outputsDirection", "data", "seed", "emit", "sortByIndex"] }, { type: RemoveButtonComponent, selector: "node-remove-button", outputs: ["remove"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i1.TranslatePipe } });
29307
29488
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CircleNodeComponent, decorators: [{
29308
29489
  type: Component,
29309
29490
  args: [{
@@ -29312,6 +29493,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
29312
29493
  }]
29313
29494
  }] });
29314
29495
 
29496
+ class ConnectionLabelComponent {
29497
+ constructor(_zone) {
29498
+ this._zone = _zone;
29499
+ this.transformStyle = '';
29500
+ this.observer = new MutationObserver(() => {
29501
+ this.calculatePosition();
29502
+ });
29503
+ }
29504
+ ngAfterViewInit() {
29505
+ if (!this.path) {
29506
+ return;
29507
+ }
29508
+ this._zone.runOutsideAngular(() => {
29509
+ this.observer.observe(this.path, {
29510
+ attributes: true
29511
+ });
29512
+ });
29513
+ }
29514
+ ngOnDestroy() {
29515
+ this.observer.disconnect();
29516
+ }
29517
+ calculatePosition() {
29518
+ const positionPoint = this._getPositionPoint();
29519
+ this.labelContainer.nativeElement.style.transform = `translate(${positionPoint.x}px, ${positionPoint.y}px)`;
29520
+ }
29521
+ _getPositionPoint() {
29522
+ const pathLength = this.path.getTotalLength();
29523
+ const textWidth = 12 * `${this.text}`.length;
29524
+ return this.position === 'center'
29525
+ ? this.path.getPointAtLength(pathLength / 2)
29526
+ : this.path.getPointAtLength((this.position === 'start' ? 0 : pathLength) +
29527
+ (this.position === 'end' ? -1 : 1) * (textWidth / 2 + 20));
29528
+ }
29529
+ }
29530
+ ConnectionLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ConnectionLabelComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
29531
+ ConnectionLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ConnectionLabelComponent, selector: "app-connection-label", inputs: { path: "path", position: "position", text: "text" }, viewQueries: [{ propertyName: "labelContainer", first: true, predicate: ["labelContainer"], descendants: true, static: true }], ngImport: i0, template: ` <div
29532
+ #labelContainer
29533
+ [ngStyle]="{
29534
+ position: 'absolute',
29535
+ top: '0',
29536
+ left: '0',
29537
+ zIndex: ' var(--label-z-index, -1)'
29538
+ }"
29539
+ >
29540
+ <div [ngClass]="{ 'label-text': !!text }">{{ text }}</div>
29541
+ </div>`, isInline: true, styles: ["\n\t\t\t.label-text {\n\t\t\t\tposition: absolute;\n\t\t\t\ttransform: translate(-50%, -50%);\n\t\t\t\tbackground: var(--c-label-background, #fff);\n\t\t\t\tcolor: var(--c-label-color, #333);\n\t\t\t\tborder-radius: var(--c-label-radius, 2em);\n\t\t\t\tpadding: var(--c-label-padding, 0.2em 0.6em);\n\t\t\t\tfont-size: var(--c-label-size, 0.7rem);\n\t\t\t\tborder: var(--c-label-border, 1px solid var(--path-color, #1b3e7f));\n\t\t\t\tz-index: var(--c-label-z-index, 0);\n\t\t\t\twhite-space: pre;\n\t\t\t}\n\t\t"], directives: [{ type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
29542
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ConnectionLabelComponent, decorators: [{
29543
+ type: Component,
29544
+ args: [{
29545
+ selector: 'app-connection-label',
29546
+ template: ` <div
29547
+ #labelContainer
29548
+ [ngStyle]="{
29549
+ position: 'absolute',
29550
+ top: '0',
29551
+ left: '0',
29552
+ zIndex: ' var(--label-z-index, -1)'
29553
+ }"
29554
+ >
29555
+ <div [ngClass]="{ 'label-text': !!text }">{{ text }}</div>
29556
+ </div>`,
29557
+ styles: [
29558
+ `
29559
+ .label-text {
29560
+ position: absolute;
29561
+ transform: translate(-50%, -50%);
29562
+ background: var(--c-label-background, #fff);
29563
+ color: var(--c-label-color, #333);
29564
+ border-radius: var(--c-label-radius, 2em);
29565
+ padding: var(--c-label-padding, 0.2em 0.6em);
29566
+ font-size: var(--c-label-size, 0.7rem);
29567
+ border: var(--c-label-border, 1px solid var(--path-color, #1b3e7f));
29568
+ z-index: var(--c-label-z-index, 0);
29569
+ white-space: pre;
29570
+ }
29571
+ `
29572
+ ]
29573
+ }]
29574
+ }], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { path: [{
29575
+ type: Input
29576
+ }], position: [{
29577
+ type: Input
29578
+ }], text: [{
29579
+ type: Input
29580
+ }], labelContainer: [{
29581
+ type: ViewChild,
29582
+ args: ['labelContainer', { static: true }]
29583
+ }] } });
29584
+
29315
29585
  class StatusIconComponent {
29316
29586
  getIcon() {
29317
29587
  switch (this.status) {
@@ -29379,7 +29649,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
29379
29649
  class ContentNodeComponent extends BaseNodeComponent {
29380
29650
  }
29381
29651
  ContentNodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ContentNodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
29382
- ContentNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ContentNodeComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"da-node da-node--{{ data.type }} {{\r\n data?.status ? ' da-node--' + data?.status : ''\r\n }} {{ data?.styleClass }}\"\r\n [style.--node-width]=\"data.width + 'px'\"\r\n [style.--node-height]=\"data.height + 'px'\"\r\n>\r\n <node-remove-button (remove)=\"removeNode()\" *ngIf=\"data?.config?.canRemove\">\r\n </node-remove-button>\r\n\r\n <status-icon [status]=\"data?.status\" *ngIf=\"data?.status\"></status-icon>\r\n\r\n <node-icon *ngIf=\"data.content?.icon\" [icon]=\"data.content?.icon\"></node-icon>\r\n\r\n <div class=\"da-node__title\">{{ data.name }}</div>\r\n <div class=\"da-node__description\" *ngIf=\"data.description\">\r\n {{ data.description }}\r\n </div>\r\n <node-inputs\r\n [direction]=\"data.directions.inputs\"\r\n [data]=\"data\"\r\n [seed]=\"seed\"\r\n [emit]=\"emit\"\r\n [sortByIndex]=\"sortByIndex\"\r\n ></node-inputs>\r\n\r\n <node-outputs\r\n [direction]=\"data.directions.outputs\"\r\n [data]=\"data\"\r\n [seed]=\"seed\"\r\n [emit]=\"emit\"\r\n [sortByIndex]=\"sortByIndex\"\r\n ></node-outputs>\r\n</div>\r\n", styles: [".da-node{--width: var(--node-width);--height: var(--node-height);--socket-offset-negative: 0;--socket-position-start: var(--socket-offset-negative) auto;--socket-position-end: auto var(--socket-offset-negative);width:var(--width);height:var(--height);display:var(--node-display, flex);justify-content:var(--node-justify, center);align-items:var(--node-items, center);flex-direction:var(--node-direction, column);border:var(--node-border, 1px solid #234990);border-radius:var(--node-radius, 10px);color:var(--node-color, #234990);background:var(--node-background, #fff);box-shadow:var(--node-shadow, unset);cursor:var(--node-cursor, pointer)}.da-node--draft{--node-color: var(--status-draft-color, #555);--node-background: var( --status-draft-background, #f5f5f5 );--node-border: var(--status-draft-border, 1px solid #555);--node-shadow: var(--status-draft-shadow, unset)}.da-node--upcoming{--node-color: var(--status-upcoming-color, var(--Primary-100, #234990));--node-background: var( --status-upcoming-background, #fff );--node-border: var(--status-upcoming-border, 1px solid var(--node-color, #234990));--node-shadow: var(--status-upcoming-shadow, unset)}.da-node--inProgress{--node-color: var(--status-progress-color, var(--orange-color, #f29339));--node-background: var( --status-progress-background, var(--light-orange-color, #fdf4dc) );--node-border: var(--status-progress-border, 1px solid var(--orange-color, #f29339));--node-shadow: var(--status-progress-shadow, var(--node-shadow, inset 0 0 0 2px var(--node-background), inset 0 0 0 3px var(--orange-color, #f29339)))}.da-node--completed{--node-color: var(--status-completed-color, var(--green-color, #05cd99));--node-background: var( --status-completed-background, var(--light-green-color, #f0fff0) );--node-border: var(--status-completed-border, 1px solid var(--green-color, #05cd99));--node-shadow: var(--status-completed-shadow, unset)}.da-node--approved{--node-color: var(--status-completed-color, var(--green-color, #05cd99));--node-background: var( --status-completed-background, var(--light-green-color, #f0fff0) );--node-border: var(--status-completed-border, 1px solid var(--green-color, #05cd99));--node-shadow: var(--status-completed-shadow, unset)}.da-node--rejected{--node-color: var(--status-rejected-color, var(--red-color, #bf0b30));--node-background: var( --status-rejected-background, var(--light-red-color, #ffe0e7) );--node-border: var(--status-rejected-border, 1px solid var(--red-color, #bf0b30));--node-shadow: var(--status-rejected-shadow, unset)}.da-node__check-status{position:absolute;position:var(--check-icon-position, absolute);inset:var(--check-icon-inset, -6px -6px auto auto);color:var(--check-icon-color)}.da-node__check-status--completed{--check-icon-color: var(--status-completed-color)}.da-node__check-status--rejected{--check-icon-color: var(--status-rejected-color)}.da-node__title{text-align:center;font-weight:600}.da-node__description,.da-node__title{color:var(--node-text-color, #28282d);font-size:var(--node-text-font-size, .8rem);text-align:var(--node-text-align, center);padding-inline:var(--node-text-inline, .4rem)}.da-node__icon{position:absolute;inset-inline-start:var(--node-icon-inset-inline, 5px);inset-block-start:var(--node-icon-inset-block, 5px)}.da-node__inputs,.da-node__outputs{position:var(--input-output-position, absolute);inset-inline:var(--in-out-inset-inline);inset-block:var(--in-out-inset-block);height:var(--socket-size, 16px)}.da-node__inputs__socket,.da-node__outputs__socket{height:var(--socket-size, 16px)}.da-node__inputs.inputs-top{--in-out-inset-block: var(--socket-position-start)}.da-node__inputs.inputs-bottom{--in-out-inset-block: var(--socket-position-end)}.da-node__inputs.inputs-start{--in-out-inset-inline: var(--socket-position-start)}.da-node__inputs.inputs-end{--in-out-inset-inline: var(--socket-position-end)}.da-node__outputs.outputs-top{--in-out-inset-block: var(--socket-offset-negative)}.da-node__outputs.outputs-bottom{--in-out-inset-block: var(--socket-position-end)}.da-node__outputs.outputs-start{--in-out-inset-inline: var(--socket-position-start)}.da-node__outputs.outputs-end{--in-out-inset-inline: var(--socket-position-end)}.da-node:hover{--remove-icon-inset: -8px -8px auto auto;--remove-icon-opacity: 1}\n"], components: [{ type: RemoveButtonComponent, selector: "node-remove-button", outputs: ["remove"] }, { type: StatusIconComponent, selector: "status-icon", inputs: ["status"] }, { type: NodeIconComponent, selector: "node-icon", inputs: ["icon"] }, { type: NodeInputsComponent, selector: "node-inputs", inputs: ["direction", "data", "seed", "emit", "sortByIndex"] }, { type: NodeOutputsComponent, selector: "node-outputs", inputs: ["direction", "data", "seed", "emit", "sortByIndex"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
29652
+ ContentNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ContentNodeComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div\r\n\tclass=\"da-node da-node--{{ data.type }} {{\r\n\t\tdata?.status ? ' da-node--' + data?.status : ''\r\n\t}} {{ data?.styleClass }}\"\r\n\t[style.--node-width]=\"data.width + 'px'\"\r\n\t[style.--node-height]=\"data.height + 'px'\"\r\n>\r\n\t<node-ports\r\n\t\t[inputsDirection]=\"data.directions.inputs\"\r\n\t\t[outputsDirection]=\"data.directions.outputs\"\r\n\t\t[data]=\"data\"\r\n\t\t[seed]=\"seed\"\r\n\t\t[emit]=\"emit\"\r\n\t\t[sortByIndex]=\"sortByIndex\"\r\n\t></node-ports>\r\n\r\n\t<div class=\"da-node__content\">\r\n\t\t<node-remove-button (remove)=\"removeNode()\" *ngIf=\"data?.config?.canRemove\">\r\n\t\t</node-remove-button>\r\n\t\t<status-icon [status]=\"data?.status\" *ngIf=\"data?.status\"></status-icon>\r\n\r\n\t\t<node-icon\r\n\t\t\t*ngIf=\"data.content?.icon\"\r\n\t\t\t[icon]=\"data.content?.icon\"\r\n\t\t></node-icon>\r\n\r\n\t\t<div class=\"da-node__title\">{{ data.name }}</div>\r\n\t\t<div class=\"da-node__description\" *ngIf=\"data.description\">\r\n\t\t\t{{ data.description }}\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n", styles: [".da-node{--socket-size: 16px;--width: var(--node-width);--height: var(--node-height);width:var(--width);height:var(--height);display:var(--node-display, flex);justify-content:var(--node-justify, center);align-items:var(--node-items, center);flex-direction:var(--node-direction, column);border:var(--node-border, 1px solid #234990);border-radius:var(--node-radius, 10px);color:var(--node-color, #234990);background:var(--node-background, #fff);box-shadow:var(--node-shadow, unset);cursor:var(--node-cursor, pointer);z-index:var(--node-z-index, 1)}.da-node--draft{--node-color: var( --status-draft-color, #555 );--node-background: var( --status-draft-background, #f5f5f5 );--node-border: var( --status-draft-border, 1px solid #555 );--node-shadow: var( --status-draft-shadow, unset )}.da-node--upcoming{--node-color: var( --status-upcoming-color, var(--Primary-100, #234990) );--node-background: var( --status-upcoming-background, #fff );--node-border: var( --status-upcoming-border, 1px solid var(--node-color, #234990) );--node-shadow: var( --status-upcoming-shadow, unset )}.da-node--ready{--node-color: var( --status-ready-color, var(--Primary-100, #234990) );--node-background: var( --status-ready-background, #fff );--node-border: var( --status-ready-border, 1px solid var(--node-color, #234990) );--node-shadow: var( --status-ready-shadow, unset )}.da-node--suspended{--node-color: var( --status-suspended-color, var(--orange-color, #f29339) );--node-background: var( --status-suspended-background, var(--light-orange-color, #fdf4dc) );--node-border: var( --status-suspended-border, 1px solid var(--orange-color, #f29339) );--node-shadow: var( --status-suspended-shadow, var(--node-shadow, inset 0 0 0 2px var(--node-background), inset 0 0 0 3px var(--orange-color, #f29339)) )}.da-node--inProgress{--node-color: var( --status-progress-color, var(--orange-color, #f29339) );--node-background: var( --status-progress-background, var(--light-orange-color, #fdf4dc) );--node-border: var( --status-progress-border, 1px solid var(--orange-color, #f29339) );--node-shadow: var( --status-progress-shadow, var(--node-shadow, inset 0 0 0 2px var(--node-background), inset 0 0 0 3px var(--orange-color, #f29339)) )}.da-node--completed{--node-color: var( --status-completed-color, var(--green-color, #05cd99) );--node-background: var( --status-completed-background, var(--light-green-color, #f0fff0) );--node-border: var( --status-completed-border, 1px solid var(--green-color, #05cd99) );--node-shadow: var( --status-completed-shadow, unset )}.da-node--approved{--node-color: var( --status-completed-color, var(--green-color, #05cd99) );--node-background: var( --status-completed-background, var(--light-green-color, #f0fff0) );--node-border: var( --status-completed-border, 1px solid var(--green-color, #05cd99) );--node-shadow: var( --status-completed-shadow, unset )}.da-node--rejected{--node-color: var( --status-rejected-color, var(--red-color, #bf0b30) );--node-background: var( --status-rejected-background, var(--light-red-color, #ffe0e7) );--node-border: var( --status-rejected-border, 1px solid var(--red-color, #bf0b30) );--node-shadow: var( --status-rejected-shadow, unset )}.da-node--canceled{--node-color: var( --status-canceled-color, var(--red-color, #bf0b30) );--node-background: var( --status-canceled-background, var(--light-red-color, #ffe0e7) );--node-border: var( --status-canceled-border, 1px solid var(--red-color, #bf0b30) );--node-shadow: var( --status-canceled-shadow, unset )}.da-node__check-status{position:absolute;position:var(--check-icon-position, absolute);inset:var(--check-icon-inset, -6px -6px auto auto);color:var(--check-icon-color)}.da-node__check-status--completed{--check-icon-color: var(--status-completed-color)}.da-node__check-status--rejected{--check-icon-color: var(--status-rejected-color)}.da-node__content{width:calc(100% - var(--socket-size));height:calc(100% - var(--socket-size));display:var(--node-display, flex);justify-content:var(--node-justify, center);align-items:var(--node-items, center);flex-direction:var(--node-direction, column);z-index:var(--node-z-index, 1)}.da-node__title{text-align:center;font-weight:600}.da-node__description,.da-node__title{color:var(--node-text-color, #28282d);font-size:var(--node-text-font-size, .8rem);text-align:var(--node-text-align, center);padding-inline:var(--node-text-inline, .4rem)}.da-node__icon{position:absolute;inset-inline-start:var(--node-icon-inset-inline, 5px);inset-block-start:var(--node-icon-inset-block, 5px)}.da-node:hover{--remove-icon-inset: -8px -8px auto auto;--remove-icon-opacity: 1}\n"], components: [{ type: NodePortsComponent, selector: "node-ports", inputs: ["inputsDirection", "outputsDirection", "data", "seed", "emit", "sortByIndex"] }, { type: RemoveButtonComponent, selector: "node-remove-button", outputs: ["remove"] }, { type: StatusIconComponent, selector: "status-icon", inputs: ["status"] }, { type: NodeIconComponent, selector: "node-icon", inputs: ["icon"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
29383
29653
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ContentNodeComponent, decorators: [{
29384
29654
  type: Component,
29385
29655
  args: [{
@@ -29389,81 +29659,354 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
29389
29659
  }] });
29390
29660
 
29391
29661
  class CustomConnectionComponent extends ConnectionComponent {
29662
+ get pathNative() {
29663
+ var _a;
29664
+ return (_a = this.pathElement) === null || _a === void 0 ? void 0 : _a.nativeElement;
29665
+ }
29666
+ get labelText() {
29667
+ var _a, _b, _c;
29668
+ return typeof ((_a = this.data) === null || _a === void 0 ? void 0 : _a.label) === 'string'
29669
+ ? (_b = this.data) === null || _b === void 0 ? void 0 : _b.label
29670
+ : (_c = this.data) === null || _c === void 0 ? void 0 : _c.label.text;
29671
+ }
29672
+ get labelPosition() {
29673
+ return typeof this.data.label === 'string'
29674
+ ? 'center'
29675
+ : this.data.label.position;
29676
+ }
29392
29677
  }
29393
29678
  CustomConnectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CustomConnectionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
29394
- CustomConnectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomConnectionComponent, selector: "connection", inputs: { data: "data" }, usesInheritance: true, ngImport: i0, template: `
29395
- <svg
29396
- data-testid="connection"
29397
- style="z-index:-1"
29398
- class="{{ data?.status ? 'connection-status-' + data?.status : '' }}"
29399
- >
29400
- <path [attr.d]="path" />
29401
- </svg>
29402
- `, isInline: true, styles: ["\n svg {\n overflow: visible;\n position: absolute;\n pointer-events: none;\n path {\n fill: none;\n stroke-width: 2px;\n stroke: var(--path-color, #1b3e7f);\n pointer-events: auto;\n }\n }\n "] });
29679
+ CustomConnectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomConnectionComponent, selector: "connection", inputs: { data: "data" }, viewQueries: [{ propertyName: "pathElement", first: true, predicate: ["pathElement"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
29680
+ <svg
29681
+ data-testid="connection"
29682
+ style="z-index:-2"
29683
+ class="{{ data?.status ? 'connection-status-' + data?.status : '' }} {{
29684
+ data?.styleClass
29685
+ }}"
29686
+ >
29687
+ <path [attr.d]="path" #pathElement />
29688
+ </svg>
29689
+ <app-connection-label
29690
+ *ngIf="data?.label && pathNative"
29691
+ [path]="pathNative"
29692
+ [text]="labelText"
29693
+ [position]="labelPosition"
29694
+ ></app-connection-label>
29695
+ `, isInline: true, styles: ["\n\t\t\tsvg {\n\t\t\t\toverflow: visible;\n\t\t\t\tposition: absolute;\n\t\t\t\tpointer-events: none;\n\t\t\t\tpath {\n\t\t\t\t\tfill: none;\n\t\t\t\t\tstroke-width: 2px;\n\t\t\t\t\tstroke: var(--path-color, #1b3e7f);\n\t\t\t\t\tpointer-events: auto;\n\t\t\t\t}\n\t\t\t}\n\t\t"], components: [{ type: ConnectionLabelComponent, selector: "app-connection-label", inputs: ["path", "position", "text"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
29403
29696
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CustomConnectionComponent, decorators: [{
29404
29697
  type: Component,
29405
29698
  args: [{
29406
29699
  selector: 'connection',
29407
29700
  styles: [
29408
29701
  `
29409
- svg {
29410
- overflow: visible;
29411
- position: absolute;
29412
- pointer-events: none;
29413
- path {
29414
- fill: none;
29415
- stroke-width: 2px;
29416
- stroke: var(--path-color, #1b3e7f);
29417
- pointer-events: auto;
29418
- }
29419
- }
29420
- `,
29702
+ svg {
29703
+ overflow: visible;
29704
+ position: absolute;
29705
+ pointer-events: none;
29706
+ path {
29707
+ fill: none;
29708
+ stroke-width: 2px;
29709
+ stroke: var(--path-color, #1b3e7f);
29710
+ pointer-events: auto;
29711
+ }
29712
+ }
29713
+ `
29421
29714
  ],
29422
29715
  template: `
29423
- <svg
29424
- data-testid="connection"
29425
- style="z-index:-1"
29426
- class="{{ data?.status ? 'connection-status-' + data?.status : '' }}"
29427
- >
29428
- <path [attr.d]="path" />
29429
- </svg>
29430
- `,
29431
- }]
29432
- }], propDecorators: { data: [{
29716
+ <svg
29717
+ data-testid="connection"
29718
+ style="z-index:-2"
29719
+ class="{{ data?.status ? 'connection-status-' + data?.status : '' }} {{
29720
+ data?.styleClass
29721
+ }}"
29722
+ >
29723
+ <path [attr.d]="path" #pathElement />
29724
+ </svg>
29725
+ <app-connection-label
29726
+ *ngIf="data?.label && pathNative"
29727
+ [path]="pathNative"
29728
+ [text]="labelText"
29729
+ [position]="labelPosition"
29730
+ ></app-connection-label>
29731
+ `
29732
+ }]
29733
+ }], propDecorators: { pathElement: [{
29734
+ type: ViewChild,
29735
+ args: ['pathElement', { static: true }]
29736
+ }], data: [{
29433
29737
  type: Input
29434
29738
  }] } });
29435
29739
 
29436
29740
  class CustomSocketComponent extends SocketComponent {
29437
29741
  }
29438
29742
  CustomSocketComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CustomSocketComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
29439
- CustomSocketComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomSocketComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, styles: ["\n :host {\n display: inline-block;\n cursor: pointer;\n border: 1px solid var(--primary-color, #1b3e7f);\n width: var(--socket-size, 16px);\n height: var(--socket-size, 16px);\n vertical-align: middle;\n background: white;\n z-index: 2;\n box-sizing: border-box;\n opacity: var(--socket-opacity, 0);\n border-radius: var(--socket-radius, 50%);\n &:hover {\n box-shadow: 0 0 0 1px var(--primary-color, #1b3e7f);\n }\n }\n "] });
29743
+ CustomSocketComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CustomSocketComponent, selector: "ng-component", host: { properties: { "class": "data?.styleClass" } }, usesInheritance: true, ngImport: i0, template: ``, isInline: true, styles: ["\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tcursor: pointer;\n\t\t\t\tborder: 1px solid var(--primary-color, #1b3e7f);\n\t\t\t\twidth: var(--socket-size, 16px);\n\t\t\t\theight: var(--socket-size, 16px);\n\t\t\t\tvertical-align: var(--socket-vertical-align, top);\n\t\t\t\tbackground: white;\n\t\t\t\tz-index: 2;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\topacity: var(--socket-opacity, 0);\n\t\t\t\tborder-radius: var(--socket-radius, 0);\n\t\t\t\t&:hover {\n\t\t\t\t\tbox-shadow: 0 0 0 1px var(--primary-color, #1b3e7f);\n\t\t\t\t}\n\t\t\t}\n\t\t"] });
29440
29744
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CustomSocketComponent, decorators: [{
29441
29745
  type: Component,
29442
29746
  args: [{
29443
29747
  template: ``,
29444
29748
  styles: [
29445
29749
  `
29446
- :host {
29447
- display: inline-block;
29448
- cursor: pointer;
29449
- border: 1px solid var(--primary-color, #1b3e7f);
29450
- width: var(--socket-size, 16px);
29451
- height: var(--socket-size, 16px);
29452
- vertical-align: middle;
29453
- background: white;
29454
- z-index: 2;
29455
- box-sizing: border-box;
29456
- opacity: var(--socket-opacity, 0);
29457
- border-radius: var(--socket-radius, 50%);
29458
- &:hover {
29459
- box-shadow: 0 0 0 1px var(--primary-color, #1b3e7f);
29460
- }
29461
- }
29462
- `,
29750
+ :host {
29751
+ display: inline-block;
29752
+ cursor: pointer;
29753
+ border: 1px solid var(--primary-color, #1b3e7f);
29754
+ width: var(--socket-size, 16px);
29755
+ height: var(--socket-size, 16px);
29756
+ vertical-align: var(--socket-vertical-align, top);
29757
+ background: white;
29758
+ z-index: 2;
29759
+ box-sizing: border-box;
29760
+ opacity: var(--socket-opacity, 0);
29761
+ border-radius: var(--socket-radius, 0);
29762
+ &:hover {
29763
+ box-shadow: 0 0 0 1px var(--primary-color, #1b3e7f);
29764
+ }
29765
+ }
29766
+ `
29463
29767
  ],
29768
+ host: {
29769
+ '[class]': 'data?.styleClass'
29770
+ }
29771
+ }]
29772
+ }] });
29773
+
29774
+ class GatewayPortsComponent {
29775
+ }
29776
+ GatewayPortsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: GatewayPortsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
29777
+ GatewayPortsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: GatewayPortsComponent, selector: "gateway-ports", inputs: { direction: "direction", data: "data", seed: "seed", emit: "emit", sortByIndex: "sortByIndex" }, ngImport: i0, template: `
29778
+ <div
29779
+ *ngFor="let input of data.inputs | keyvalue : sortByIndex"
29780
+ class="gateway-port gateway-port--input {{ input.value.styleClass }}"
29781
+ refComponent
29782
+ [data]="{
29783
+ type: 'socket',
29784
+ side: 'input',
29785
+ key: input.key,
29786
+ nodeId: data.id,
29787
+ payload: input.value?.socket,
29788
+ seed: seed
29789
+ }"
29790
+ [emit]="emit"
29791
+ ></div>
29792
+
29793
+ <div
29794
+ *ngFor="let output of data.outputs | keyvalue : sortByIndex"
29795
+ class="gateway-port gateway-port--output {{ output.value.styleClass }}"
29796
+ refComponent
29797
+ [data]="{
29798
+ type: 'socket',
29799
+ side: 'output',
29800
+ key: output.key,
29801
+ nodeId: data.id,
29802
+ payload: output.value?.socket,
29803
+ seed: seed
29804
+ }"
29805
+ [emit]="emit"
29806
+ ></div>
29807
+ `, isInline: true, styles: ["\n\t\t\t.gateway-port {\n\t\t\t\t--socket-vertical-align: top;\n\t\t\t\t--width: var(--port-width, var(--socket-size, 14px));\n\t\t\t\t--height: var(--port-height, var(--socket-size, 14px));\n\t\t\t\tposition: absolute;\n\t\t\t\tinset-inline: var(--port-inset-inline);\n\t\t\t\tinset-block: var(--port-inset-block);\n\t\t\t\tdisplay: inline-block;\n\t\t\t\twidth: var(--width);\n\t\t\t\theight: var(--height);\n\t\t\t\t&.input-primary-port {\n\t\t\t\t\t--port-inset-inline: calc(var(--width) / -2) auto;\n\t\t\t\t\t--port-inset-block: calc(50% - var(--height) / 2) 0;\n\t\t\t\t}\n\t\t\t\t&.output-primary-port {\n\t\t\t\t\t--port-inset-inline: auto calc(var(--width) / -2);\n\t\t\t\t\t--port-inset-block: calc(50% - var(--height) / 2) auto;\n\t\t\t\t}\n\t\t\t\t&.output-secondary-port {\n\t\t\t\t\t--port-inset-inline: calc(50% - var(--width) / 2) auto;\n\t\t\t\t\t--port-inset-block: calc(var(--height) / -2) auto;\n\t\t\t\t}\n\t\t\t\t&.output-tertiary-port {\n\t\t\t\t\t--port-inset-inline: calc(50% - var(--width) / 2) 0;\n\t\t\t\t\t--port-inset-block: auto calc(var(--height) / -2);\n\t\t\t\t}\n\t\t\t}\n\t\t"], directives: [{ type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$8.RefDirective, selector: "[refComponent]", inputs: ["data", "emit"] }], pipes: { "keyvalue": i4$1.KeyValuePipe }, encapsulation: i0.ViewEncapsulation.None });
29808
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: GatewayPortsComponent, decorators: [{
29809
+ type: Component,
29810
+ args: [{
29811
+ selector: 'gateway-ports',
29812
+ encapsulation: ViewEncapsulation.None,
29813
+ template: `
29814
+ <div
29815
+ *ngFor="let input of data.inputs | keyvalue : sortByIndex"
29816
+ class="gateway-port gateway-port--input {{ input.value.styleClass }}"
29817
+ refComponent
29818
+ [data]="{
29819
+ type: 'socket',
29820
+ side: 'input',
29821
+ key: input.key,
29822
+ nodeId: data.id,
29823
+ payload: input.value?.socket,
29824
+ seed: seed
29825
+ }"
29826
+ [emit]="emit"
29827
+ ></div>
29828
+
29829
+ <div
29830
+ *ngFor="let output of data.outputs | keyvalue : sortByIndex"
29831
+ class="gateway-port gateway-port--output {{ output.value.styleClass }}"
29832
+ refComponent
29833
+ [data]="{
29834
+ type: 'socket',
29835
+ side: 'output',
29836
+ key: output.key,
29837
+ nodeId: data.id,
29838
+ payload: output.value?.socket,
29839
+ seed: seed
29840
+ }"
29841
+ [emit]="emit"
29842
+ ></div>
29843
+ `,
29844
+ styles: [
29845
+ `
29846
+ .gateway-port {
29847
+ --socket-vertical-align: top;
29848
+ --width: var(--port-width, var(--socket-size, 14px));
29849
+ --height: var(--port-height, var(--socket-size, 14px));
29850
+ position: absolute;
29851
+ inset-inline: var(--port-inset-inline);
29852
+ inset-block: var(--port-inset-block);
29853
+ display: inline-block;
29854
+ width: var(--width);
29855
+ height: var(--height);
29856
+ &.input-primary-port {
29857
+ --port-inset-inline: calc(var(--width) / -2) auto;
29858
+ --port-inset-block: calc(50% - var(--height) / 2) 0;
29859
+ }
29860
+ &.output-primary-port {
29861
+ --port-inset-inline: auto calc(var(--width) / -2);
29862
+ --port-inset-block: calc(50% - var(--height) / 2) auto;
29863
+ }
29864
+ &.output-secondary-port {
29865
+ --port-inset-inline: calc(50% - var(--width) / 2) auto;
29866
+ --port-inset-block: calc(var(--height) / -2) auto;
29867
+ }
29868
+ &.output-tertiary-port {
29869
+ --port-inset-inline: calc(50% - var(--width) / 2) 0;
29870
+ --port-inset-block: auto calc(var(--height) / -2);
29871
+ }
29872
+ }
29873
+ `
29874
+ ]
29875
+ }]
29876
+ }], propDecorators: { direction: [{
29877
+ type: Input
29878
+ }], data: [{
29879
+ type: Input
29880
+ }], seed: [{
29881
+ type: Input
29882
+ }], emit: [{
29883
+ type: Input
29884
+ }], sortByIndex: [{
29885
+ type: Input
29886
+ }] } });
29887
+
29888
+ class GatewayNodeComponent extends BaseNodeComponent {
29889
+ }
29890
+ GatewayNodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: GatewayNodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
29891
+ GatewayNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: GatewayNodeComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div\r\n\tclass=\"da-node gateway-node--{{ data.type }} gateway-node {{\r\n\t\tdata?.status ? ' da-node--' + data?.status : ''\r\n\t}}\"\r\n\t[style.--node-width]=\"data.width + 'px'\"\r\n\t[style.--node-height]=\"data.width + 'px'\"\r\n>\r\n\t<div class=\"gateway-node__wrapper\">\r\n\t\t<node-remove-button\r\n\t\t\t(remove)=\"removeNode()\"\r\n\t\t\t*ngIf=\"data.config?.canRemove\"\r\n\t\t></node-remove-button>\r\n\t\t<div class=\"gateway-node__content\">\r\n\t\t\t<div\r\n\t\t\t\tclass=\"da-node__title gate-node__title\"\r\n\t\t\t\t[attr.tooltip]=\"data.content?.data?.tooltip\"\r\n\t\t\t\t[class.node-tooltip]=\"!!data.content?.data?.tooltip\"\r\n\t\t\t>\r\n\t\t\t\t{{ data.name }}\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<gateway-ports\r\n\t\tclass=\"gateway-node__ports\"\r\n\t\t[data]=\"data\"\r\n\t\t[seed]=\"seed\"\r\n\t\t[emit]=\"emit\"\r\n\t\t[sortByIndex]=\"sortByIndex\"\r\n\t></gateway-ports>\r\n</div>\r\n", styles: [".da-node{--socket-size: 16px;--width: var(--node-width);--height: var(--node-height);width:var(--width);height:var(--height);display:var(--node-display, flex);justify-content:var(--node-justify, center);align-items:var(--node-items, center);flex-direction:var(--node-direction, column);border:var(--node-border, 1px solid #234990);border-radius:var(--node-radius, 10px);color:var(--node-color, #234990);background:var(--node-background, #fff);box-shadow:var(--node-shadow, unset);cursor:var(--node-cursor, pointer);z-index:var(--node-z-index, 1)}.da-node--draft{--node-color: var( --status-draft-color, #555 );--node-background: var( --status-draft-background, #f5f5f5 );--node-border: var( --status-draft-border, 1px solid #555 );--node-shadow: var( --status-draft-shadow, unset )}.da-node--upcoming{--node-color: var( --status-upcoming-color, var(--Primary-100, #234990) );--node-background: var( --status-upcoming-background, #fff );--node-border: var( --status-upcoming-border, 1px solid var(--node-color, #234990) );--node-shadow: var( --status-upcoming-shadow, unset )}.da-node--ready{--node-color: var( --status-ready-color, var(--Primary-100, #234990) );--node-background: var( --status-ready-background, #fff );--node-border: var( --status-ready-border, 1px solid var(--node-color, #234990) );--node-shadow: var( --status-ready-shadow, unset )}.da-node--suspended{--node-color: var( --status-suspended-color, var(--orange-color, #f29339) );--node-background: var( --status-suspended-background, var(--light-orange-color, #fdf4dc) );--node-border: var( --status-suspended-border, 1px solid var(--orange-color, #f29339) );--node-shadow: var( --status-suspended-shadow, var(--node-shadow, inset 0 0 0 2px var(--node-background), inset 0 0 0 3px var(--orange-color, #f29339)) )}.da-node--inProgress{--node-color: var( --status-progress-color, var(--orange-color, #f29339) );--node-background: var( --status-progress-background, var(--light-orange-color, #fdf4dc) );--node-border: var( --status-progress-border, 1px solid var(--orange-color, #f29339) );--node-shadow: var( --status-progress-shadow, var(--node-shadow, inset 0 0 0 2px var(--node-background), inset 0 0 0 3px var(--orange-color, #f29339)) )}.da-node--completed{--node-color: var( --status-completed-color, var(--green-color, #05cd99) );--node-background: var( --status-completed-background, var(--light-green-color, #f0fff0) );--node-border: var( --status-completed-border, 1px solid var(--green-color, #05cd99) );--node-shadow: var( --status-completed-shadow, unset )}.da-node--approved{--node-color: var( --status-completed-color, var(--green-color, #05cd99) );--node-background: var( --status-completed-background, var(--light-green-color, #f0fff0) );--node-border: var( --status-completed-border, 1px solid var(--green-color, #05cd99) );--node-shadow: var( --status-completed-shadow, unset )}.da-node--rejected{--node-color: var( --status-rejected-color, var(--red-color, #bf0b30) );--node-background: var( --status-rejected-background, var(--light-red-color, #ffe0e7) );--node-border: var( --status-rejected-border, 1px solid var(--red-color, #bf0b30) );--node-shadow: var( --status-rejected-shadow, unset )}.da-node--canceled{--node-color: var( --status-canceled-color, var(--red-color, #bf0b30) );--node-background: var( --status-canceled-background, var(--light-red-color, #ffe0e7) );--node-border: var( --status-canceled-border, 1px solid var(--red-color, #bf0b30) );--node-shadow: var( --status-canceled-shadow, unset )}.da-node__check-status{position:absolute;position:var(--check-icon-position, absolute);inset:var(--check-icon-inset, -6px -6px auto auto);color:var(--check-icon-color)}.da-node__check-status--completed{--check-icon-color: var(--status-completed-color)}.da-node__check-status--rejected{--check-icon-color: var(--status-rejected-color)}.da-node__content{width:calc(100% - var(--socket-size));height:calc(100% - var(--socket-size));display:var(--node-display, flex);justify-content:var(--node-justify, center);align-items:var(--node-items, center);flex-direction:var(--node-direction, column);z-index:var(--node-z-index, 1)}.da-node__title{text-align:center;font-weight:600}.da-node__description,.da-node__title{color:var(--node-text-color, #28282d);font-size:var(--node-text-font-size, .8rem);text-align:var(--node-text-align, center);padding-inline:var(--node-text-inline, .4rem)}.da-node__icon{position:absolute;inset-inline-start:var(--node-icon-inset-inline, 5px);inset-block-start:var(--node-icon-inset-block, 5px)}.da-node:hover{--remove-icon-inset: -8px -8px auto auto;--remove-icon-opacity: 1}\n", ".gateway-node{--node-radius: 0;--angle: 45deg;--socket-radius: 0;border-width:0;background:transparent}.gateway-node__wrapper{width:calc(100% - var(--socket-size, 14px));height:calc(100% - var(--socket-size, 14px));transform:rotate(var(--angle));border:var(--node-border, 1px solid #234990);border-radius:var(--node-radius);background:var(--node-background, #fff)}.gateway-node__content{--rotate: calc(var(--angle) * -1);transform:rotate(var(--rotate));height:100%;width:100%;overflow:hidden;display:flex;justify-content:center;align-items:center}\n"], components: [{ type: RemoveButtonComponent, selector: "node-remove-button", outputs: ["remove"] }, { type: GatewayPortsComponent, selector: "gateway-ports", inputs: ["direction", "data", "seed", "emit", "sortByIndex"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
29892
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: GatewayNodeComponent, decorators: [{
29893
+ type: Component,
29894
+ args: [{
29895
+ templateUrl: './gateway-node.component.html',
29896
+ styleUrls: ['../../styles/node.scss', './gateway-node.component.scss']
29464
29897
  }]
29465
29898
  }] });
29466
29899
 
29900
+ class NodeInputsComponent {
29901
+ }
29902
+ NodeInputsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NodeInputsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
29903
+ NodeInputsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NodeInputsComponent, selector: "node-inputs", inputs: { direction: "direction", data: "data", seed: "seed", emit: "emit", sortByIndex: "sortByIndex" }, host: { properties: { "class": " 'node-ports node-ports--inputs node-ports--' + direction" } }, ngImport: i0, template: `
29904
+ <div
29905
+ *ngFor="let input of data.inputs | keyvalue : sortByIndex"
29906
+ class="node-ports__port {{ input.value.styleClass }}"
29907
+ refComponent
29908
+ [data]="{
29909
+ type: 'socket',
29910
+ side: 'input',
29911
+ key: input.key,
29912
+ nodeId: data.id,
29913
+ payload: input.value?.socket,
29914
+ seed: seed
29915
+ }"
29916
+ [emit]="emit"
29917
+ ></div>
29918
+ `, isInline: true, styles: [".node-ports{--port-size: 16px;position:absolute;width:100%;height:100%}.node-port{position:absolute;inset-inline:var(--port-inset-inline);inset-block:var(--port-inset-block);display:inline-block;width:var(--port-size);height:var(--port-size)}.node-ports--inputs--start .input-primary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--start .input-secondary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: 0 auto}.node-ports--inputs--start .input-tertiary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--start .input-quaternary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: auto 0}.node-ports--inputs--end .input-primary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--end .input-secondary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: auto 0}.node-ports--inputs--end .input-tertiary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--end .input-quaternary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: 0 auto}.node-ports--inputs--top .input-primary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: 0 auto}.node-ports--inputs--top .input-secondary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--top .input-tertiary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: auto 0}.node-ports--inputs--top .input-quaternary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--bottom .input-primary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: auto 0}.node-ports--inputs--bottom .input-secondary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--bottom .input-tertiary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: 0 auto}.node-ports--inputs--bottom .input-quaternary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--outputs--top .output-primary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: 0 auto}.node-ports--outputs--top .output-secondary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--top .output-tertiary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: auto 0}.node-ports--outputs--top .output-quaternary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--bottom .output-primary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: auto 0}.node-ports--outputs--bottom .output-secondary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--bottom .output-tertiary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: 0 auto}.node-ports--outputs--bottom .output-quaternary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--start .output-primary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--start .output-secondary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: 0 auto}.node-ports--outputs--start .output-tertiary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--start .output-quaternary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: auto 0}.node-ports--outputs--end .output-primary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--end .output-secondary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: auto 0}.node-ports--outputs--end .output-tertiary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--end .output-quaternary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: 0 auto}\n"], directives: [{ type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$8.RefDirective, selector: "[refComponent]", inputs: ["data", "emit"] }], pipes: { "keyvalue": i4$1.KeyValuePipe }, encapsulation: i0.ViewEncapsulation.None });
29919
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NodeInputsComponent, decorators: [{
29920
+ type: Component,
29921
+ args: [{
29922
+ selector: 'node-inputs',
29923
+ encapsulation: ViewEncapsulation.None,
29924
+ styleUrls: ['../styles/ports.scss'],
29925
+ host: {
29926
+ '[class]': " 'node-ports node-ports--inputs node-ports--' + direction"
29927
+ },
29928
+ template: `
29929
+ <div
29930
+ *ngFor="let input of data.inputs | keyvalue : sortByIndex"
29931
+ class="node-ports__port {{ input.value.styleClass }}"
29932
+ refComponent
29933
+ [data]="{
29934
+ type: 'socket',
29935
+ side: 'input',
29936
+ key: input.key,
29937
+ nodeId: data.id,
29938
+ payload: input.value?.socket,
29939
+ seed: seed
29940
+ }"
29941
+ [emit]="emit"
29942
+ ></div>
29943
+ `
29944
+ }]
29945
+ }], propDecorators: { direction: [{
29946
+ type: Input
29947
+ }], data: [{
29948
+ type: Input
29949
+ }], seed: [{
29950
+ type: Input
29951
+ }], emit: [{
29952
+ type: Input
29953
+ }], sortByIndex: [{
29954
+ type: Input
29955
+ }] } });
29956
+
29957
+ class NodeOutputsComponent {
29958
+ }
29959
+ NodeOutputsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NodeOutputsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
29960
+ NodeOutputsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NodeOutputsComponent, selector: "node-outputs", inputs: { direction: "direction", data: "data", seed: "seed", emit: "emit", sortByIndex: "sortByIndex" }, host: { properties: { "class": " 'node-ports node-ports--outputs node-ports--' + direction" } }, ngImport: i0, template: `<div
29961
+ class="node-ports__port {{ output.value.styleClass }}"
29962
+ *ngFor="let output of data.outputs | keyvalue : sortByIndex"
29963
+ refComponent
29964
+ [data]="{
29965
+ type: 'socket',
29966
+ side: 'output',
29967
+ key: output.key,
29968
+ nodeId: data.id,
29969
+ payload: output.value?.socket,
29970
+ seed: seed
29971
+ }"
29972
+ [emit]="emit"
29973
+ ></div>`, isInline: true, styles: [".node-ports{--port-size: 16px;position:absolute;width:100%;height:100%}.node-port{position:absolute;inset-inline:var(--port-inset-inline);inset-block:var(--port-inset-block);display:inline-block;width:var(--port-size);height:var(--port-size)}.node-ports--inputs--start .input-primary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--start .input-secondary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: 0 auto}.node-ports--inputs--start .input-tertiary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--start .input-quaternary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: auto 0}.node-ports--inputs--end .input-primary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--end .input-secondary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: auto 0}.node-ports--inputs--end .input-tertiary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--end .input-quaternary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: 0 auto}.node-ports--inputs--top .input-primary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: 0 auto}.node-ports--inputs--top .input-secondary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--top .input-tertiary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: auto 0}.node-ports--inputs--top .input-quaternary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--bottom .input-primary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: auto 0}.node-ports--inputs--bottom .input-secondary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--inputs--bottom .input-tertiary-port{--port-inset-inline: var( --port-offset, calc(50% - var(--port-size)) ) auto;--port-inset-block: 0 auto}.node-ports--inputs--bottom .input-quaternary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, calc(50% - var(--port-size)) ) auto}.node-ports--outputs--top .output-primary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: 0 auto}.node-ports--outputs--top .output-secondary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--top .output-tertiary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: auto 0}.node-ports--outputs--top .output-quaternary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--bottom .output-primary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: auto 0}.node-ports--outputs--bottom .output-secondary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--bottom .output-tertiary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: 0 auto}.node-ports--outputs--bottom .output-quaternary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--start .output-primary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--start .output-secondary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: 0 auto}.node-ports--outputs--start .output-tertiary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--start .output-quaternary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: auto 0}.node-ports--outputs--end .output-primary-port{--port-inset-inline: auto 0;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--end .output-secondary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: auto 0}.node-ports--outputs--end .output-tertiary-port{--port-inset-inline: 0 auto;--port-inset-block: var( --port-offset, 50% ) auto}.node-ports--outputs--end .output-quaternary-port{--port-inset-inline: var( --port-offset, 50% ) auto;--port-inset-block: 0 auto}\n"], directives: [{ type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$8.RefDirective, selector: "[refComponent]", inputs: ["data", "emit"] }], pipes: { "keyvalue": i4$1.KeyValuePipe }, encapsulation: i0.ViewEncapsulation.None });
29974
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NodeOutputsComponent, decorators: [{
29975
+ type: Component,
29976
+ args: [{
29977
+ selector: 'node-outputs',
29978
+ encapsulation: ViewEncapsulation.None,
29979
+ styleUrls: ['../styles/ports.scss'],
29980
+ host: {
29981
+ '[class]': " 'node-ports node-ports--outputs node-ports--' + direction"
29982
+ },
29983
+ template: `<div
29984
+ class="node-ports__port {{ output.value.styleClass }}"
29985
+ *ngFor="let output of data.outputs | keyvalue : sortByIndex"
29986
+ refComponent
29987
+ [data]="{
29988
+ type: 'socket',
29989
+ side: 'output',
29990
+ key: output.key,
29991
+ nodeId: data.id,
29992
+ payload: output.value?.socket,
29993
+ seed: seed
29994
+ }"
29995
+ [emit]="emit"
29996
+ ></div>`
29997
+ }]
29998
+ }], propDecorators: { direction: [{
29999
+ type: Input
30000
+ }], data: [{
30001
+ type: Input
30002
+ }], seed: [{
30003
+ type: Input
30004
+ }], emit: [{
30005
+ type: Input
30006
+ }], sortByIndex: [{
30007
+ type: Input
30008
+ }] } });
30009
+
29467
30010
  class TemplateNodeComponent extends BaseNodeComponent {
29468
30011
  ngOnInit() { }
29469
30012
  get templateOutletContext() {
@@ -29480,7 +30023,7 @@ class TemplateNodeComponent extends BaseNodeComponent {
29480
30023
  }
29481
30024
  }
29482
30025
  TemplateNodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TemplateNodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
29483
- TemplateNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TemplateNodeComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"da-node da-node--{{ data.type }} {{\r\n data?.status ? ' da-node--' + data?.status : ''\r\n }} {{ data?.styleClass }}\"\r\n [style.--node-width]=\"data.width + 'px'\"\r\n [style.--node-height]=\"data.height + 'px'\"\r\n>\r\n <node-remove-button (remove)=\"removeNode()\" *ngIf=\"data?.config?.canRemove\">\r\n </node-remove-button>\r\n\r\n <node-icon\r\n *ngIf=\"data.content?.icon\"\r\n [icon]=\"data.content?.icon\"\r\n class=\"da-node__icon\"\r\n ></node-icon>\r\n\r\n <ng-container\r\n [ngTemplateOutlet]=\"data?.template || defaultTemplate\"\r\n [ngTemplateOutletContext]=\"templateOutletContext\"\r\n ></ng-container>\r\n\r\n <ng-template #defaultTemplate>\r\n <div class=\"da-node__title\">{{ data?.name }}</div>\r\n </ng-template>\r\n\r\n <node-inputs\r\n [direction]=\"data.directions.inputs\"\r\n [data]=\"data\"\r\n [seed]=\"seed\"\r\n [emit]=\"emit\"\r\n [sortByIndex]=\"sortByIndex\"\r\n ></node-inputs>\r\n\r\n <node-outputs\r\n [direction]=\"data.directions.outputs\"\r\n [data]=\"data\"\r\n [seed]=\"seed\"\r\n [emit]=\"emit\"\r\n [sortByIndex]=\"sortByIndex\"\r\n ></node-outputs>\r\n</div>\r\n", styles: [".da-node{--width: var(--node-width);--height: var(--node-height);--socket-offset-negative: 0;--socket-position-start: var(--socket-offset-negative) auto;--socket-position-end: auto var(--socket-offset-negative);width:var(--width);height:var(--height);display:var(--node-display, flex);justify-content:var(--node-justify, center);align-items:var(--node-items, center);flex-direction:var(--node-direction, column);border:var(--node-border, 1px solid #234990);border-radius:var(--node-radius, 10px);color:var(--node-color, #234990);background:var(--node-background, #fff);box-shadow:var(--node-shadow, unset);cursor:var(--node-cursor, pointer)}.da-node--draft{--node-color: var(--status-draft-color, #555);--node-background: var( --status-draft-background, #f5f5f5 );--node-border: var(--status-draft-border, 1px solid #555);--node-shadow: var(--status-draft-shadow, unset)}.da-node--upcoming{--node-color: var(--status-upcoming-color, var(--Primary-100, #234990));--node-background: var( --status-upcoming-background, #fff );--node-border: var(--status-upcoming-border, 1px solid var(--node-color, #234990));--node-shadow: var(--status-upcoming-shadow, unset)}.da-node--inProgress{--node-color: var(--status-progress-color, var(--orange-color, #f29339));--node-background: var( --status-progress-background, var(--light-orange-color, #fdf4dc) );--node-border: var(--status-progress-border, 1px solid var(--orange-color, #f29339));--node-shadow: var(--status-progress-shadow, var(--node-shadow, inset 0 0 0 2px var(--node-background), inset 0 0 0 3px var(--orange-color, #f29339)))}.da-node--completed{--node-color: var(--status-completed-color, var(--green-color, #05cd99));--node-background: var( --status-completed-background, var(--light-green-color, #f0fff0) );--node-border: var(--status-completed-border, 1px solid var(--green-color, #05cd99));--node-shadow: var(--status-completed-shadow, unset)}.da-node--approved{--node-color: var(--status-completed-color, var(--green-color, #05cd99));--node-background: var( --status-completed-background, var(--light-green-color, #f0fff0) );--node-border: var(--status-completed-border, 1px solid var(--green-color, #05cd99));--node-shadow: var(--status-completed-shadow, unset)}.da-node--rejected{--node-color: var(--status-rejected-color, var(--red-color, #bf0b30));--node-background: var( --status-rejected-background, var(--light-red-color, #ffe0e7) );--node-border: var(--status-rejected-border, 1px solid var(--red-color, #bf0b30));--node-shadow: var(--status-rejected-shadow, unset)}.da-node__check-status{position:absolute;position:var(--check-icon-position, absolute);inset:var(--check-icon-inset, -6px -6px auto auto);color:var(--check-icon-color)}.da-node__check-status--completed{--check-icon-color: var(--status-completed-color)}.da-node__check-status--rejected{--check-icon-color: var(--status-rejected-color)}.da-node__title{text-align:center;font-weight:600}.da-node__description,.da-node__title{color:var(--node-text-color, #28282d);font-size:var(--node-text-font-size, .8rem);text-align:var(--node-text-align, center);padding-inline:var(--node-text-inline, .4rem)}.da-node__icon{position:absolute;inset-inline-start:var(--node-icon-inset-inline, 5px);inset-block-start:var(--node-icon-inset-block, 5px)}.da-node__inputs,.da-node__outputs{position:var(--input-output-position, absolute);inset-inline:var(--in-out-inset-inline);inset-block:var(--in-out-inset-block);height:var(--socket-size, 16px)}.da-node__inputs__socket,.da-node__outputs__socket{height:var(--socket-size, 16px)}.da-node__inputs.inputs-top{--in-out-inset-block: var(--socket-position-start)}.da-node__inputs.inputs-bottom{--in-out-inset-block: var(--socket-position-end)}.da-node__inputs.inputs-start{--in-out-inset-inline: var(--socket-position-start)}.da-node__inputs.inputs-end{--in-out-inset-inline: var(--socket-position-end)}.da-node__outputs.outputs-top{--in-out-inset-block: var(--socket-offset-negative)}.da-node__outputs.outputs-bottom{--in-out-inset-block: var(--socket-position-end)}.da-node__outputs.outputs-start{--in-out-inset-inline: var(--socket-position-start)}.da-node__outputs.outputs-end{--in-out-inset-inline: var(--socket-position-end)}.da-node:hover{--remove-icon-inset: -8px -8px auto auto;--remove-icon-opacity: 1}\n", "\n :host {\n display: block;\n }\n "], components: [{ type: RemoveButtonComponent, selector: "node-remove-button", outputs: ["remove"] }, { type: NodeIconComponent, selector: "node-icon", inputs: ["icon"] }, { type: NodeInputsComponent, selector: "node-inputs", inputs: ["direction", "data", "seed", "emit", "sortByIndex"] }, { type: NodeOutputsComponent, selector: "node-outputs", inputs: ["direction", "data", "seed", "emit", "sortByIndex"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
30026
+ TemplateNodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TemplateNodeComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div\r\n\tclass=\"da-node da-node--{{ data.type }} {{\r\n\t\tdata?.status ? ' da-node--' + data?.status : ''\r\n\t}} {{ data?.styleClass }}\"\r\n\t[style.--node-width]=\"data.width + 'px'\"\r\n\t[style.--node-height]=\"data.height + 'px'\"\r\n>\r\n\t<node-ports\r\n\t\t[inputsDirection]=\"data.directions.inputs\"\r\n\t\t[outputsDirection]=\"data.directions.outputs\"\r\n\t\t[data]=\"data\"\r\n\t\t[seed]=\"seed\"\r\n\t\t[emit]=\"emit\"\r\n\t\t[sortByIndex]=\"sortByIndex\"\r\n\t></node-ports>\r\n\t<div class=\"da-node__content\">\r\n\t\t<node-remove-button (remove)=\"removeNode()\" *ngIf=\"data?.config?.canRemove\">\r\n\t\t</node-remove-button>\r\n\r\n\t\t<node-icon\r\n\t\t\t*ngIf=\"data.content?.icon\"\r\n\t\t\t[icon]=\"data.content?.icon\"\r\n\t\t\tclass=\"da-node__icon\"\r\n\t\t></node-icon>\r\n\r\n\t\t<ng-container\r\n\t\t\t[ngTemplateOutlet]=\"data?.template || defaultTemplate\"\r\n\t\t\t[ngTemplateOutletContext]=\"templateOutletContext\"\r\n\t\t></ng-container>\r\n\r\n\t\t<ng-template #defaultTemplate>\r\n\t\t\t<div class=\"da-node__title\">{{ data?.name }}</div>\r\n\t\t</ng-template>\r\n\t</div>\r\n</div>\r\n", styles: [".da-node{--socket-size: 16px;--width: var(--node-width);--height: var(--node-height);width:var(--width);height:var(--height);display:var(--node-display, flex);justify-content:var(--node-justify, center);align-items:var(--node-items, center);flex-direction:var(--node-direction, column);border:var(--node-border, 1px solid #234990);border-radius:var(--node-radius, 10px);color:var(--node-color, #234990);background:var(--node-background, #fff);box-shadow:var(--node-shadow, unset);cursor:var(--node-cursor, pointer);z-index:var(--node-z-index, 1)}.da-node--draft{--node-color: var( --status-draft-color, #555 );--node-background: var( --status-draft-background, #f5f5f5 );--node-border: var( --status-draft-border, 1px solid #555 );--node-shadow: var( --status-draft-shadow, unset )}.da-node--upcoming{--node-color: var( --status-upcoming-color, var(--Primary-100, #234990) );--node-background: var( --status-upcoming-background, #fff );--node-border: var( --status-upcoming-border, 1px solid var(--node-color, #234990) );--node-shadow: var( --status-upcoming-shadow, unset )}.da-node--ready{--node-color: var( --status-ready-color, var(--Primary-100, #234990) );--node-background: var( --status-ready-background, #fff );--node-border: var( --status-ready-border, 1px solid var(--node-color, #234990) );--node-shadow: var( --status-ready-shadow, unset )}.da-node--suspended{--node-color: var( --status-suspended-color, var(--orange-color, #f29339) );--node-background: var( --status-suspended-background, var(--light-orange-color, #fdf4dc) );--node-border: var( --status-suspended-border, 1px solid var(--orange-color, #f29339) );--node-shadow: var( --status-suspended-shadow, var(--node-shadow, inset 0 0 0 2px var(--node-background), inset 0 0 0 3px var(--orange-color, #f29339)) )}.da-node--inProgress{--node-color: var( --status-progress-color, var(--orange-color, #f29339) );--node-background: var( --status-progress-background, var(--light-orange-color, #fdf4dc) );--node-border: var( --status-progress-border, 1px solid var(--orange-color, #f29339) );--node-shadow: var( --status-progress-shadow, var(--node-shadow, inset 0 0 0 2px var(--node-background), inset 0 0 0 3px var(--orange-color, #f29339)) )}.da-node--completed{--node-color: var( --status-completed-color, var(--green-color, #05cd99) );--node-background: var( --status-completed-background, var(--light-green-color, #f0fff0) );--node-border: var( --status-completed-border, 1px solid var(--green-color, #05cd99) );--node-shadow: var( --status-completed-shadow, unset )}.da-node--approved{--node-color: var( --status-completed-color, var(--green-color, #05cd99) );--node-background: var( --status-completed-background, var(--light-green-color, #f0fff0) );--node-border: var( --status-completed-border, 1px solid var(--green-color, #05cd99) );--node-shadow: var( --status-completed-shadow, unset )}.da-node--rejected{--node-color: var( --status-rejected-color, var(--red-color, #bf0b30) );--node-background: var( --status-rejected-background, var(--light-red-color, #ffe0e7) );--node-border: var( --status-rejected-border, 1px solid var(--red-color, #bf0b30) );--node-shadow: var( --status-rejected-shadow, unset )}.da-node--canceled{--node-color: var( --status-canceled-color, var(--red-color, #bf0b30) );--node-background: var( --status-canceled-background, var(--light-red-color, #ffe0e7) );--node-border: var( --status-canceled-border, 1px solid var(--red-color, #bf0b30) );--node-shadow: var( --status-canceled-shadow, unset )}.da-node__check-status{position:absolute;position:var(--check-icon-position, absolute);inset:var(--check-icon-inset, -6px -6px auto auto);color:var(--check-icon-color)}.da-node__check-status--completed{--check-icon-color: var(--status-completed-color)}.da-node__check-status--rejected{--check-icon-color: var(--status-rejected-color)}.da-node__content{width:calc(100% - var(--socket-size));height:calc(100% - var(--socket-size));display:var(--node-display, flex);justify-content:var(--node-justify, center);align-items:var(--node-items, center);flex-direction:var(--node-direction, column);z-index:var(--node-z-index, 1)}.da-node__title{text-align:center;font-weight:600}.da-node__description,.da-node__title{color:var(--node-text-color, #28282d);font-size:var(--node-text-font-size, .8rem);text-align:var(--node-text-align, center);padding-inline:var(--node-text-inline, .4rem)}.da-node__icon{position:absolute;inset-inline-start:var(--node-icon-inset-inline, 5px);inset-block-start:var(--node-icon-inset-block, 5px)}.da-node:hover{--remove-icon-inset: -8px -8px auto auto;--remove-icon-opacity: 1}\n", "\n :host {\n display: block;\n }\n "], components: [{ type: NodePortsComponent, selector: "node-ports", inputs: ["inputsDirection", "outputsDirection", "data", "seed", "emit", "sortByIndex"] }, { type: RemoveButtonComponent, selector: "node-remove-button", outputs: ["remove"] }, { type: NodeIconComponent, selector: "node-icon", inputs: ["icon"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
29484
30027
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TemplateNodeComponent, decorators: [{
29485
30028
  type: Component,
29486
30029
  args: [{
@@ -29586,8 +30129,7 @@ class DiagramDirective {
29586
30129
  return __awaiter(this, void 0, void 0, function* () {
29587
30130
  this._appendZoomComponent();
29588
30131
  try {
29589
- const editor = yield createDiagramEditor(this._elementRef.nativeElement, this._injector, this.config //TODO it's Should be merged with DIAGRAM_DEFAULT_OPTIONS
29590
- );
30132
+ const editor = yield createDiagramEditor(this._elementRef.nativeElement, this._injector, this.config);
29591
30133
  this._pluginsService.setPlugins(editor);
29592
30134
  this._diagramService.setEditor(editor);
29593
30135
  this.diagramEditor = editor;
@@ -29599,12 +30141,16 @@ class DiagramDirective {
29599
30141
  });
29600
30142
  }
29601
30143
  _appendStyles() {
30144
+ var _a, _b;
29602
30145
  const _requiredStyles = {
29603
30146
  position: 'var(--diagram-position, relative)',
29604
30147
  width: `var(--diagram-width, ${this.width})`,
29605
30148
  height: `var(--diagram-height, ${this.height})`,
29606
- direction: 'ltr',
30149
+ direction: 'ltr'
29607
30150
  };
30151
+ if ((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.readonly) === null || _b === void 0 ? void 0 : _b.active) {
30152
+ this._elementRef.nativeElement.style.setProperty('--port-offset', 'var(--custom-diagram-port-offset , calc(50% - 8px))');
30153
+ }
29608
30154
  Object.entries(_requiredStyles).forEach(([key, value]) => {
29609
30155
  this._renderer.setStyle(this._elementRef.nativeElement, key, value);
29610
30156
  });
@@ -29616,7 +30162,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
29616
30162
  type: Directive,
29617
30163
  args: [{
29618
30164
  selector: '[appDiagram]',
29619
- exportAs: 'diagram',
30165
+ exportAs: 'diagram'
29620
30166
  }]
29621
30167
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: DiagramService }, { type: DiagramPluginsService }]; }, propDecorators: { height: [{
29622
30168
  type: Input
@@ -29644,7 +30190,11 @@ DiagramsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
29644
30190
  NodeIconComponent,
29645
30191
  StatusIconComponent,
29646
30192
  NodeInputsComponent,
29647
- NodeOutputsComponent], imports: [CommonModule,
30193
+ NodeOutputsComponent,
30194
+ GatewayNodeComponent,
30195
+ ConnectionLabelComponent,
30196
+ NodePortsComponent,
30197
+ GatewayPortsComponent], imports: [CommonModule,
29648
30198
  ReteModule,
29649
30199
  MatButtonModule,
29650
30200
  MatIconModule,
@@ -29658,7 +30208,7 @@ DiagramsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
29658
30208
  MatIconModule,
29659
30209
  FormsModule,
29660
30210
  TranslateModule,
29661
- MatTooltipModule,
30211
+ MatTooltipModule
29662
30212
  ]] });
29663
30213
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DiagramsModule, decorators: [{
29664
30214
  type: NgModule,
@@ -29676,6 +30226,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
29676
30226
  StatusIconComponent,
29677
30227
  NodeInputsComponent,
29678
30228
  NodeOutputsComponent,
30229
+ GatewayNodeComponent,
30230
+ ConnectionLabelComponent,
30231
+ NodePortsComponent,
30232
+ GatewayPortsComponent
29679
30233
  ],
29680
30234
  imports: [
29681
30235
  CommonModule,
@@ -29684,10 +30238,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
29684
30238
  MatIconModule,
29685
30239
  FormsModule,
29686
30240
  TranslateModule,
29687
- MatTooltipModule,
30241
+ MatTooltipModule
29688
30242
  ],
29689
30243
  exports: [DiagramDirective, ZoomControlComponent],
29690
- providers: [DiagramService, DiagramPluginsService, WorkflowService],
30244
+ providers: [DiagramService, DiagramPluginsService, WorkflowService]
29691
30245
  }]
29692
30246
  }] });
29693
30247
 
@@ -31721,5 +32275,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
31721
32275
  * Generated bundle index. Do not edit.
31722
32276
  */
31723
32277
 
31724
- export { ActivitiesLogComponent, ActivitiesLogModule, ActivityLineComponent, AdapterService, AddPermissionsDialogComponent, AddToCollectionComponent, AppConfigService, AppHasRoleDirective, AttachmentItemComponent, AttachmentItemModule, AttachmentModalModule, AttachmentsComponent, AttachmentsListComponent, AttachmentsPageProviderComponent, AvatarComponent, AvatarModule, BaseColumnComponent, BaseComponent, BaseDialogComponent, BaseNodeClass, BaseSelector, BaseService, BooleanViewerComponent, ButtonComponent, CachingExpiryUnit, CallApiService, CardComponent, CardModule, ChartDataService, CircleNode, CircleNodeComponent, ClickOutsideDirective, ClipboardComponent, CommentApiService, CommentsDashletComponent, CommentsModule, ComponentRegisterService, ComponentTranslationModel, ConfirmCallerDialogComponent, ConfirmCallerModule, ConfirmDialogComponent, ConfirmationDialogComponent, ConfirmationDialogModule, Connection, ContentActionType, ContentNode, ContentNodeComponent, CopyComponent, CorrespondenceRelationComponent, CorrespondenceRelationModule, CorrespondenceRelationService, CorrespondenceTagsComponent, CreateDirectoryComponent, CreateEntityComponent, CreateEntityModule, CreateModalComponent, CreationTypeComponent, CtsTagsModule, CustomConnectionComponent, CustomDocumentViewerComponent, CustomPpViewerComponent, CustomSocketComponent, CustomToastrModule, CustomToastrService, CutomeVocViewerComponent, DIAGRAM_DEFAULT_OPTIONS, DIAGRAM_HEIGHT, DataViewerComponent, DateFormatterService, DateHelperService, DateViewerComponent, DeleteComponent, DepartmentApiService, DepartmentFormComponent, DepartmentManagementService, DepartmentViewerComponent, DestroySubject$1 as DestroySubject, DiagramDirective, DiagramPluginsService, DiagramService, DiagramsModule, DialogMangmentService, DirectiveModule, DisplaySuitableIconComponent, DisplaySuitableIconModule, DocumentScanService, DocumentTemplatesConstants, DocumentTemplatesService, DocumentUploadComponent, DocumentsComponent, DocumentsConstants, DocumentsListComponent, DocumentsModule, DocumentsService, DragAndDropDirective, DropdownViewerComponent, DynamicChartComponent, DynamicChartModule, DynamicColumnComponent, DynamicFieldsRendererComponent, DynamicFieldsRendererModule, DynamicFilterComponent, DynamicFilterModule, DynamicFormBoolItemComponent, DynamicFormBuilderComponent, DynamicFormCheckboxItemComponent, DynamicFormComponent, DynamicFormDateItemComponent, DynamicFormDepartmentComponent, DynamicFormFieldComponent, DynamicFormHijriDateitemComponent, DynamicFormMapItemComponent, DynamicFormModule, DynamicFormOptionsComponent, DynamicFormSelectItemComponent, DynamicFormSelectTagComponent, DynamicFormSelectUserFilterComponent, DynamicFormSelectUsersComponent, DynamicFormService, DynamicFormSlideToggleitemComponent, DynamicFormTextItemComponent, DynamicFormTextareaComponent, DynamicFormViewerComponent, DynamicFormVocabularyItemComponent, DynamicSearchComponent, DynamicSearchModule, DynamicSingleChartComponent, DynamicTableComponent, DynamicTableModule, DynamicTableService, DynamicTabsComponent, DynamicTabsModule, DynamicViewModule, ENTITY_TYPE, EXTENSION_JSONS, EnvManager, EvaluatorsService, ExtensionLoaderService, ExtensionService, FILTER_DATES_TYPE, FileGridInfiniteScrollDirective, FileManagerAbstract, FileManagerAdapter, FileManagerPaginationConfig, FileManagerService, FileMangerModule, FileSizePipe, FilterComponent, FilterModule, FolderModalComponent, FolderishType, FormBuilderService, GlobalAdminService, GlobalPdfTron, GregorianDatepickerComponent, HijriDatePipe, HijriDatepickerComponent, HijriGregorianDatepickerComponent, IN_OUT_DIRECTION, IconService, InitializationService, ItemListComponent, Lang, LatestActivityComponent, LatestActivityModule, LibrarySharedModule, ListViewerComponent, LoanRequestComponent, LocalStoragService, LocalizedDatePipe, MESSAGE_TYPE, MY_MOMENT_FORMATS, MainfolderService, MessageService, MomentDateAdapter, MoveComponent, MultiValuePipe, MultipleDynamicFormViewerComponent, MutipleDynamicFormViewerModule, NODE_CIRCLE_SIZE, NODE_HEIGHT, NODE_MARGIN, NODE_STATUS, NODE_TYPE, NODE_WIDTH, NOTIFICATIONS_LIST_OPTIONS, NOTIFICATION_ICON, NOTIFICATION_ITEM, NOTIFICATION_STATUS, NOTIFY_EVENT, NdfConfirmationDialogComponent, NdfNuxeoDialog, NgxHijriGregorianDatepickerModule, NoDataComponent, NodeIconComponent, NodeInputsComponent, NodeOutputsComponent, NotificationIconDirective, NotificationItemComponent, NotificationItemDirective, NotificationSourceSelectComponent, NotificationStatusToggleComponent, NotificationToastComponent, NotificationsButtonComponent, NotificationsDateSelectComponent, NotificationsListComponent, NotificationsListContainerComponent, NotificationsModule, NotificationsService, NotificationsSettingsContainerComponent, NuxeoCoreModule, NuxeoDevelopmentFrameworkComponent, NuxeoDevelopmentFrameworkModule, NuxeoDevelopmentFrameworkService, NuxeoDialogModule, NuxeoDialogService, NuxeoMapper, NuxeoService, PAGINATION_MODE, PANEL_MODE, PaginationComponent, PaginationModule, PdfTronModule, PdftronComponent, PdftronService, PermissionService, PermissionsComponent, PermissionsDirective, PermissionsModule, PermissionsTemplateComponent, PipesModule, PublishDialogComponent, PublishingDocumentService, ReadMoreComponent, RecentlyViewedService, RemoveButtonComponent, RenameComponent, RolesService, SOCKET_WIDTH, SUBSCRIPTION_STATE, SafeHtmlPipe, ScanComponent, ScanModalComponent, SearchAutocompleteComponent, SecurePipe, SelectComponent, SelectModule, SelectUsersByDepartmentModule, SelectUsersByDepartmentsComponent, SetDirRtlDirective, SetRtlDirective, ShareDialogComponent, SharedDocsService, SharedServicesModule, SidepanelComponent, SingleActivityComponent, Socket, SpinnerComponent, StatusIconComponent, TRANSLATION_PROVIDER, TableComponent, TableModule, TagsApiService, TemplateModalComponent, TemplateNode, TemplateNodeComponent, TimeAgoPipe, ToastsModule, TransferDocComponent, TranslateLoaderService, TranslatedVocabularySelectComponent, TranslationService, TreeviewSelectComponent, UpdateModalComponent, UploadFileService, UploadManagmentService, UserCardComponent, UserComponent, UserModule, UserPreferenceValues, UserPreferencesService, UserService, UsersCardComponent, UsersCardModule, UtilityService, VersionsComponent, ViewerFilesService, ViewerLogComponent, ViewerLogModule, VocabularyApiService, VocabularyComponent, VocabularyModule, WorkflowService, ZoomControlComponent, appInitializer, departmentCacheBuster$, extensionJsonsFactory, filterEnabled, getConnections, getValue, mergeArrays, mergeObjects, minute$1 as minute, provideExtensionConfig, reduceEmptyMenus, reduceSeparators, removeConnections, removeNode, removeNodeAndConnections, serializeControl, serializePort, sortByOrder };
32278
+ export { ActivitiesLogComponent, ActivitiesLogModule, ActivityLineComponent, AdapterService, AddPermissionsDialogComponent, AddToCollectionComponent, AppConfigService, AppHasRoleDirective, AttachmentItemComponent, AttachmentItemModule, AttachmentModalModule, AttachmentsComponent, AttachmentsListComponent, AttachmentsPageProviderComponent, AvatarComponent, AvatarModule, BaseColumnComponent, BaseComponent, BaseDialogComponent, BaseNodeClass, BaseSelector, BaseService, BooleanViewerComponent, ButtonComponent, CachingExpiryUnit, CallApiService, CardComponent, CardModule, ChartDataService, CircleNode, CircleNodeComponent, ClickOutsideDirective, ClipboardComponent, CommentApiService, CommentsDashletComponent, CommentsModule, ComponentRegisterService, ComponentTranslationModel, ConfirmCallerDialogComponent, ConfirmCallerModule, ConfirmDialogComponent, ConfirmationDialogComponent, ConfirmationDialogModule, Connection, ConnectionLabelComponent, ContentActionType, ContentNode, ContentNodeComponent, CopyComponent, CorrespondenceRelationComponent, CorrespondenceRelationModule, CorrespondenceRelationService, CorrespondenceTagsComponent, CreateDirectoryComponent, CreateEntityComponent, CreateEntityModule, CreateModalComponent, CreationTypeComponent, CtsTagsModule, CustomConnectionComponent, CustomDocumentViewerComponent, CustomPpViewerComponent, CustomSocketComponent, CustomToastrModule, CustomToastrService, CutomeVocViewerComponent, DIAGRAM_DEFAULT_OPTIONS, DIAGRAM_HEIGHT, DataViewerComponent, DateFormatterService, DateHelperService, DateViewerComponent, DeleteComponent, DepartmentApiService, DepartmentFormComponent, DepartmentManagementService, DepartmentViewerComponent, DestroySubject$1 as DestroySubject, DiagramDirective, DiagramPluginsService, DiagramService, DiagramUtils, DiagramsModule, DialogMangmentService, DirectiveModule, DisplaySuitableIconComponent, DisplaySuitableIconModule, DocumentScanService, DocumentTemplatesConstants, DocumentTemplatesService, DocumentUploadComponent, DocumentsComponent, DocumentsConstants, DocumentsListComponent, DocumentsModule, DocumentsService, DragAndDropDirective, DropdownViewerComponent, DynamicChartComponent, DynamicChartModule, DynamicColumnComponent, DynamicFieldsRendererComponent, DynamicFieldsRendererModule, DynamicFilterComponent, DynamicFilterModule, DynamicFormBoolItemComponent, DynamicFormBuilderComponent, DynamicFormCheckboxItemComponent, DynamicFormComponent, DynamicFormDateItemComponent, DynamicFormDepartmentComponent, DynamicFormFieldComponent, DynamicFormHijriDateitemComponent, DynamicFormMapItemComponent, DynamicFormModule, DynamicFormOptionsComponent, DynamicFormSelectItemComponent, DynamicFormSelectTagComponent, DynamicFormSelectUserFilterComponent, DynamicFormSelectUsersComponent, DynamicFormService, DynamicFormSlideToggleitemComponent, DynamicFormTextItemComponent, DynamicFormTextareaComponent, DynamicFormViewerComponent, DynamicFormVocabularyItemComponent, DynamicSearchComponent, DynamicSearchModule, DynamicSingleChartComponent, DynamicTableComponent, DynamicTableModule, DynamicTableService, DynamicTabsComponent, DynamicTabsModule, DynamicViewModule, ENTITY_TYPE, EXTENSION_JSONS, EnvManager, EvaluatorsService, ExtensionLoaderService, ExtensionService, FILTER_DATES_TYPE, FileGridInfiniteScrollDirective, FileManagerAbstract, FileManagerAdapter, FileManagerPaginationConfig, FileManagerService, FileMangerModule, FileSizePipe, FilterComponent, FilterModule, FolderModalComponent, FolderishType, FormBuilderService, GatewayNodeComponent, GatewayPortsComponent, GlobalAdminService, GlobalPdfTron, GregorianDatepickerComponent, HijriDatePipe, HijriDatepickerComponent, HijriGregorianDatepickerComponent, IN_OUT_DIRECTION, IconService, InitializationService, InputPort, ItemListComponent, Lang, LatestActivityComponent, LatestActivityModule, LibrarySharedModule, ListViewerComponent, LoanRequestComponent, LocalStoragService, LocalizedDatePipe, MESSAGE_TYPE, MY_MOMENT_FORMATS, MainfolderService, MessageService, MomentDateAdapter, MoveComponent, MultiValuePipe, MultipleDynamicFormViewerComponent, MutipleDynamicFormViewerModule, NODE_CIRCLE_SIZE, NODE_GATEWAY_SIZE, NODE_HEIGHT, NODE_MARGIN, NODE_STATUS, NODE_TYPE, NODE_WIDTH, NOTIFICATIONS_LIST_OPTIONS, NOTIFICATION_ICON, NOTIFICATION_ITEM, NOTIFICATION_STATUS, NOTIFY_EVENT, NdfConfirmationDialogComponent, NdfNuxeoDialog, NgxHijriGregorianDatepickerModule, NoDataComponent, NodeIconComponent, NodeInputsComponent, NodeOutputsComponent, NodePortsComponent, NotificationIconDirective, NotificationItemComponent, NotificationItemDirective, NotificationSourceSelectComponent, NotificationStatusToggleComponent, NotificationToastComponent, NotificationsButtonComponent, NotificationsDateSelectComponent, NotificationsListComponent, NotificationsListContainerComponent, NotificationsModule, NotificationsService, NotificationsSettingsContainerComponent, NuxeoCoreModule, NuxeoDevelopmentFrameworkComponent, NuxeoDevelopmentFrameworkModule, NuxeoDevelopmentFrameworkService, NuxeoDialogModule, NuxeoDialogService, NuxeoMapper, NuxeoService, OutputPort, PAGINATION_MODE, PANEL_MODE, PaginationComponent, PaginationModule, PdfTronModule, PdftronComponent, PdftronService, PermissionService, PermissionsComponent, PermissionsDirective, PermissionsModule, PermissionsTemplateComponent, PipesModule, PublishDialogComponent, PublishingDocumentService, ReadMoreComponent, RecentlyViewedService, RemoveButtonComponent, RenameComponent, RolesService, SOCKET_WIDTH, SUBSCRIPTION_STATE, SafeHtmlPipe, ScanComponent, ScanModalComponent, SearchAutocompleteComponent, SecurePipe, SelectComponent, SelectModule, SelectUsersByDepartmentModule, SelectUsersByDepartmentsComponent, SetDirRtlDirective, SetRtlDirective, ShareDialogComponent, SharedDocsService, SharedServicesModule, SidepanelComponent, SingleActivityComponent, Socket, SpinnerComponent, StatusIconComponent, TRANSLATION_PROVIDER, TableComponent, TableModule, TagsApiService, TemplateModalComponent, TemplateNode, TemplateNodeComponent, TimeAgoPipe, ToastsModule, TransferDocComponent, TranslateLoaderService, TranslatedVocabularySelectComponent, TranslationService, TreeviewSelectComponent, UpdateModalComponent, UploadFileService, UploadManagmentService, UserCardComponent, UserComponent, UserModule, UserPreferenceValues, UserPreferencesService, UserService, UsersCardComponent, UsersCardModule, UtilityService, VersionsComponent, ViewerFilesService, ViewerLogComponent, ViewerLogModule, VocabularyApiService, VocabularyComponent, VocabularyModule, WorkflowService, ZoomControlComponent, appInitializer, departmentCacheBuster$, extensionJsonsFactory, filterEnabled, getConnections, getRandomNumber, getValue, mergeArrays, mergeObjects, minute$1 as minute, provideExtensionConfig, reduceEmptyMenus, reduceSeparators, removeConnections, removeNode, removeNodeAndConnections, serializeControl, serializePort, sortByOrder };
31725
32279
  //# sourceMappingURL=nuxeo-development-framework.js.map