@masterteam/structure-builder 0.0.39 → 0.0.41

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.
package/assets/sb.css CHANGED
@@ -1,2 +1,2 @@
1
- /*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
2
  @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-gray-400:oklch(70.7% .022 261.325);--color-white:#fff;--spacing:.25rem;--container-3xs:16rem;--container-xs:20rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--radius-md:.375rem;--radius-lg:.5rem;--radius-2xl:1rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.start{inset-inline-start:var(--spacing)}.start-4{inset-inline-start:calc(var(--spacing) * 4)}.end{inset-inline-end:var(--spacing)}.top-4{top:calc(var(--spacing) * 4)}.z-0{z-index:0}.z-1{z-index:1}.ms-4{margin-inline-start:calc(var(--spacing) * 4)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.block{display:block}.flex{display:flex}.size-full{width:100%;height:100%}.h-\[calc\(100\%---spacing\(8\)\)\]{height:calc(100% - calc(var(--spacing) * 8))}.h-full{height:100%}.max-h-\[80vh\]{max-height:80vh}.\!w-\[35rem\]{width:35rem!important}.w-1\/5{width:20%}.w-64{width:calc(var(--spacing) * 64)}.min-w-3xs{min-width:var(--container-3xs)}.min-w-xs{min-width:var(--container-xs)}.flex-1{flex:1}.cursor-move{cursor:move}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded-\(--p-button-border-radius\){border-radius:var(--p-button-border-radius)}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-t-2xl{border-top-left-radius:var(--radius-2xl);border-top-right-radius:var(--radius-2xl)}.border-1{border-style:var(--tw-border-style);border-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\(--p-content-border-color\){border-color:var(--p-content-border-color)}.border-surface-300{border-color:var(--p-surface-300)}@supports (color:color-mix(in lab, red, red)){.border-surface-300{border-color:color-mix(in srgb, var(--p-surface-300) calc(100% * 1), transparent)}}.bg-surface-50{background-color:var(--p-surface-50)}@supports (color:color-mix(in lab, red, red)){.bg-surface-50{background-color:color-mix(in srgb, var(--p-surface-50) calc(100% * 1), transparent)}}.bg-surface-200{background-color:var(--p-surface-200)}@supports (color:color-mix(in lab, red, red)){.bg-surface-200{background-color:color-mix(in srgb, var(--p-surface-200) calc(100% * 1), transparent)}}.bg-transparent\!{background-color:#0000!important}.bg-white{background-color:var(--color-white)}.p-0\!{padding:calc(var(--spacing) * 0)!important}.p-1{padding:calc(var(--spacing) * 1)}.p-4{padding:calc(var(--spacing) * 4)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-5{padding-top:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-gray-400{color:var(--color-gray-400)}.text-primary{color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.text-primary{color:color-mix(in srgb, var(--p-primary-color) calc(100% * 1), transparent)}}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.hover\:border-solid:hover{--tw-border-style:solid;border-style:solid}.hover\:bg-emphasis:hover{background:var(--p-content-hover-background);color:var(--p-content-hover-color)}}.dark\:border-surface-500:where(.dark,.dark *){border-color:var(--p-surface-500)}@supports (color:color-mix(in lab, red, red)){.dark\:border-surface-500:where(.dark,.dark *){border-color:color-mix(in srgb, var(--p-surface-500) calc(100% * 1), transparent)}}.dark\:bg-surface-700:where(.dark,.dark *){background-color:var(--p-surface-700)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-surface-700:where(.dark,.dark *){background-color:color-mix(in srgb, var(--p-surface-700) calc(100% * 1), transparent)}}.dark\:bg-surface-800:where(.dark,.dark *){background-color:var(--p-surface-800)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-surface-800:where(.dark,.dark *){background-color:color-mix(in srgb, var(--p-surface-800) calc(100% * 1), transparent)}}.dark\:bg-surface-900:where(.dark,.dark *){background-color:var(--p-surface-900)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-surface-900:where(.dark,.dark *){background-color:color-mix(in srgb, var(--p-surface-900) calc(100% * 1), transparent)}}}@keyframes enter{0%{opacity:var(--p-enter-opacity,1);transform:translate3d(var(--p-enter-translate-x,0), var(--p-enter-translate-y,0), 0) scale3d(var(--p-enter-scale,1), var(--p-enter-scale,1), var(--p-enter-scale,1)) rotate(var(--p-enter-rotate,0))}}@keyframes leave{to{opacity:var(--p-leave-opacity,1);transform:translate3d(var(--p-leave-translate-x,0), var(--p-leave-translate-y,0), 0) scale3d(var(--p-leave-scale,1), var(--p-leave-scale,1), var(--p-leave-scale,1)) rotate(var(--p-leave-rotate,0))}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
@@ -30,12 +30,12 @@ class NodeFormDialogComponent {
30
30
  // DrawerController is optional - only available when opened as drawer
31
31
  drawerController = inject(DrawerController, { optional: true });
32
32
  dynamicFormControl = new FormControl();
33
- nodeData;
33
+ nodeData = {};
34
34
  formSchema;
35
35
  data = input(null, ...(ngDevMode ? [{ debugName: "data" }] : []));
36
36
  ngOnInit() {
37
- this.nodeData = this.data()?.node || {};
38
- this.formSchema = this.data()?.formSchema || [];
37
+ this.nodeData = this.data()?.node ?? {};
38
+ this.formSchema = this.data()?.formSchema ?? [];
39
39
  }
40
40
  ngAfterViewInit() {
41
41
  this.dynamicFormControl.setValue(this.nodeData);
@@ -49,6 +49,13 @@ class NodeFormDialogComponent {
49
49
  drawerController: this.drawerController,
50
50
  };
51
51
  }
52
+ showSaveButton() {
53
+ return this.data()?.footerConfig?.showSaveButton?.() ?? true;
54
+ }
55
+ disableSaveButton() {
56
+ return (this.data()?.footerConfig?.disableSaveButton?.() ??
57
+ !this.dynamicFormControl.valid);
58
+ }
52
59
  onSave(item = {}) {
53
60
  const updatedNode = {
54
61
  ...this.nodeData,
@@ -61,7 +68,7 @@ class NodeFormDialogComponent {
61
68
  this.ref.close();
62
69
  }
63
70
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: NodeFormDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
64
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: NodeFormDialogComponent, isStandalone: true, selector: "mt-node-form-dialog", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"[modalService.contentClass, 'p-4']\">\r\n @if (this.data()?.template) {\r\n <ng-container\r\n *ngTemplateOutlet=\"data().template; context: templateContext\"\r\n ></ng-container>\r\n } @else {\r\n @if (nodeData) {\r\n <mt-dynamic-form\r\n [formConfig]=\"formSchema\"\r\n [formControl]=\"dynamicFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n }\r\n</div>\r\n<div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"'structureBuilder.cancel' | transloco\"\r\n severity=\"secondary\"\r\n (onClick)=\"onCancel()\"\r\n >\r\n </mt-button>\r\n <mt-button\r\n [disabled]=\"!dynamicFormControl.valid\"\r\n [label]=\"'structureBuilder.saveChanges' | transloco\"\r\n severity=\"primary\"\r\n (onClick)=\"onSave()\"\r\n >\r\n </mt-button>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues", "visibleSectionKeys"], outputs: ["runtimeMessagesChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }] });
71
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: NodeFormDialogComponent, isStandalone: true, selector: "mt-node-form-dialog", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"[modalService.contentClass, 'p-4']\">\r\n @if (this.data()?.template) {\r\n <ng-container\r\n *ngTemplateOutlet=\"data().template; context: templateContext\"\r\n ></ng-container>\r\n } @else {\r\n @if (nodeData) {\r\n <mt-dynamic-form\r\n [formConfig]=\"formSchema\"\r\n [formControl]=\"dynamicFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n }\r\n</div>\r\n<div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"'structureBuilder.cancel' | transloco\"\r\n severity=\"secondary\"\r\n (onClick)=\"onCancel()\"\r\n >\r\n </mt-button>\r\n @if (showSaveButton()) {\r\n <mt-button\r\n [disabled]=\"disableSaveButton()\"\r\n [label]=\"'structureBuilder.saveChanges' | transloco\"\r\n severity=\"primary\"\r\n (onClick)=\"onSave()\"\r\n >\r\n </mt-button>\r\n }\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues", "visibleSectionKeys"], outputs: ["runtimeMessagesChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }] });
65
72
  }
66
73
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: NodeFormDialogComponent, decorators: [{
67
74
  type: Component,
@@ -71,22 +78,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
71
78
  Button,
72
79
  ReactiveFormsModule,
73
80
  TranslocoModule,
74
- ], template: "<div [class]=\"[modalService.contentClass, 'p-4']\">\r\n @if (this.data()?.template) {\r\n <ng-container\r\n *ngTemplateOutlet=\"data().template; context: templateContext\"\r\n ></ng-container>\r\n } @else {\r\n @if (nodeData) {\r\n <mt-dynamic-form\r\n [formConfig]=\"formSchema\"\r\n [formControl]=\"dynamicFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n }\r\n</div>\r\n<div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"'structureBuilder.cancel' | transloco\"\r\n severity=\"secondary\"\r\n (onClick)=\"onCancel()\"\r\n >\r\n </mt-button>\r\n <mt-button\r\n [disabled]=\"!dynamicFormControl.valid\"\r\n [label]=\"'structureBuilder.saveChanges' | transloco\"\r\n severity=\"primary\"\r\n (onClick)=\"onSave()\"\r\n >\r\n </mt-button>\r\n</div>\r\n" }]
81
+ ], template: "<div [class]=\"[modalService.contentClass, 'p-4']\">\r\n @if (this.data()?.template) {\r\n <ng-container\r\n *ngTemplateOutlet=\"data().template; context: templateContext\"\r\n ></ng-container>\r\n } @else {\r\n @if (nodeData) {\r\n <mt-dynamic-form\r\n [formConfig]=\"formSchema\"\r\n [formControl]=\"dynamicFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n }\r\n</div>\r\n<div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"'structureBuilder.cancel' | transloco\"\r\n severity=\"secondary\"\r\n (onClick)=\"onCancel()\"\r\n >\r\n </mt-button>\r\n @if (showSaveButton()) {\r\n <mt-button\r\n [disabled]=\"disableSaveButton()\"\r\n [label]=\"'structureBuilder.saveChanges' | transloco\"\r\n severity=\"primary\"\r\n (onClick)=\"onSave()\"\r\n >\r\n </mt-button>\r\n }\r\n</div>\r\n" }]
75
82
  }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
76
83
 
77
84
  class ConnectionFormDialogComponent {
78
85
  modalService = inject(ModalService);
79
86
  ref = inject(ModalRef);
80
87
  data = input(null, ...(ngDevMode ? [{ debugName: "data" }] : []));
88
+ defaultToolbarTabs = [
89
+ 'functions',
90
+ 'properties',
91
+ 'operators',
92
+ ];
81
93
  dynamicFormControl = new FormControl();
82
94
  formulaControl = new FormControl(null);
83
95
  connectionData;
84
96
  formSchema;
85
97
  formulaSchemaId;
98
+ formulaConfig = {};
86
99
  ngOnInit() {
87
100
  this.connectionData = this.data()?.connection || {};
88
101
  this.formSchema = this.data()?.formSchema || [];
89
102
  this.formulaSchemaId = this.data()?.formulaSchemaId;
103
+ this.formulaConfig = this.data()?.formulaConfig ?? {};
90
104
  }
91
105
  ngAfterViewInit() {
92
106
  this.dynamicFormControl.setValue(this.connectionData);
@@ -107,7 +121,7 @@ class ConnectionFormDialogComponent {
107
121
  this.ref.close();
108
122
  }
109
123
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ConnectionFormDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
110
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ConnectionFormDialogComponent, isStandalone: true, selector: "mt-connection-form-dialog", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\r\n [class]=\"\r\n modalService.contentClass +\r\n ' max-h-[80vh] overflow-x-hidden overflow-y-auto p-4'\r\n \"\r\n>\r\n <div class=\"space-y-6\">\r\n @if (formSchema?.sections?.length > 0) {\r\n <mt-dynamic-form\r\n class=\"block\"\r\n [formConfig]=\"formSchema\"\r\n [formControl]=\"dynamicFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n\r\n @if (formulaSchemaId) {\r\n <mt-card [title]=\"'structureBuilder.formula' | transloco\">\r\n <mt-formula-builder\r\n [formControl]=\"formulaControl\"\r\n [levelSchemaId]=\"formulaSchemaId\"\r\n />\r\n </mt-card>\r\n }\r\n </div>\r\n</div>\r\n\r\n<div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"'structureBuilder.cancel' | transloco\"\r\n severity=\"secondary\"\r\n (onClick)=\"onCancel()\"\r\n >\r\n </mt-button>\r\n <mt-button\r\n [disabled]=\"!dynamicFormControl.valid\"\r\n [label]=\"'structureBuilder.saveChanges' | transloco\"\r\n severity=\"primary\"\r\n (onClick)=\"onSave()\"\r\n >\r\n </mt-button>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues", "visibleSectionKeys"], outputs: ["runtimeMessagesChange"] }, { kind: "component", type: FormulaBuilder, selector: "mt-formula-builder", inputs: ["propertiesByPath", "levelSchemaId", "templateId", "placeholder", "hideToolbar", "hideStatusBar"], outputs: ["validationChange", "tokensChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }] });
124
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: ConnectionFormDialogComponent, isStandalone: true, selector: "mt-connection-form-dialog", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div\r\n [class]=\"\r\n modalService.contentClass +\r\n ' max-h-[80vh] overflow-x-hidden overflow-y-auto p-4'\r\n \"\r\n>\r\n <div class=\"space-y-6\">\r\n @if (formSchema?.sections?.length > 0) {\r\n <mt-dynamic-form\r\n class=\"block\"\r\n [formConfig]=\"formSchema\"\r\n [formControl]=\"dynamicFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n\r\n @if (formulaSchemaId) {\r\n <mt-card [title]=\"'structureBuilder.formula' | transloco\">\r\n <mt-formula-builder\r\n [formControl]=\"formulaControl\"\r\n [levelSchemaId]=\"formulaSchemaId\"\r\n [toolbarTabs]=\"formulaConfig.toolbarTabs ?? defaultToolbarTabs\"\r\n [codeOnly]=\"formulaConfig.codeOnly ?? false\"\r\n [hideToolbar]=\"formulaConfig.hideToolbar ?? false\"\r\n [hideStatusBar]=\"formulaConfig.hideStatusBar ?? false\"\r\n [isProcessBuilder]=\"formulaConfig.isProcessBuilder ?? false\"\r\n />\r\n </mt-card>\r\n }\r\n </div>\r\n</div>\r\n\r\n<div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"'structureBuilder.cancel' | transloco\"\r\n severity=\"secondary\"\r\n (onClick)=\"onCancel()\"\r\n >\r\n </mt-button>\r\n <mt-button\r\n [disabled]=\"!dynamicFormControl.valid\"\r\n [label]=\"'structureBuilder.saveChanges' | transloco\"\r\n severity=\"primary\"\r\n (onClick)=\"onSave()\"\r\n >\r\n </mt-button>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues", "visibleSectionKeys"], outputs: ["runtimeMessagesChange"] }, { kind: "component", type: FormulaBuilder, selector: "mt-formula-builder", inputs: ["propertiesByPath", "levelSchemaId", "templateId", "placeholder", "hideToolbar", "hideStatusBar", "toolbarTabs", "codeOnly", "isProcessBuilder"], outputs: ["validationChange", "tokensChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }] });
111
125
  }
112
126
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: ConnectionFormDialogComponent, decorators: [{
113
127
  type: Component,
@@ -119,7 +133,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
119
133
  Button,
120
134
  ReactiveFormsModule,
121
135
  TranslocoModule,
122
- ], template: "<div\r\n [class]=\"\r\n modalService.contentClass +\r\n ' max-h-[80vh] overflow-x-hidden overflow-y-auto p-4'\r\n \"\r\n>\r\n <div class=\"space-y-6\">\r\n @if (formSchema?.sections?.length > 0) {\r\n <mt-dynamic-form\r\n class=\"block\"\r\n [formConfig]=\"formSchema\"\r\n [formControl]=\"dynamicFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n\r\n @if (formulaSchemaId) {\r\n <mt-card [title]=\"'structureBuilder.formula' | transloco\">\r\n <mt-formula-builder\r\n [formControl]=\"formulaControl\"\r\n [levelSchemaId]=\"formulaSchemaId\"\r\n />\r\n </mt-card>\r\n }\r\n </div>\r\n</div>\r\n\r\n<div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"'structureBuilder.cancel' | transloco\"\r\n severity=\"secondary\"\r\n (onClick)=\"onCancel()\"\r\n >\r\n </mt-button>\r\n <mt-button\r\n [disabled]=\"!dynamicFormControl.valid\"\r\n [label]=\"'structureBuilder.saveChanges' | transloco\"\r\n severity=\"primary\"\r\n (onClick)=\"onSave()\"\r\n >\r\n </mt-button>\r\n</div>\r\n" }]
136
+ ], template: "<div\r\n [class]=\"\r\n modalService.contentClass +\r\n ' max-h-[80vh] overflow-x-hidden overflow-y-auto p-4'\r\n \"\r\n>\r\n <div class=\"space-y-6\">\r\n @if (formSchema?.sections?.length > 0) {\r\n <mt-dynamic-form\r\n class=\"block\"\r\n [formConfig]=\"formSchema\"\r\n [formControl]=\"dynamicFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n\r\n @if (formulaSchemaId) {\r\n <mt-card [title]=\"'structureBuilder.formula' | transloco\">\r\n <mt-formula-builder\r\n [formControl]=\"formulaControl\"\r\n [levelSchemaId]=\"formulaSchemaId\"\r\n [toolbarTabs]=\"formulaConfig.toolbarTabs ?? defaultToolbarTabs\"\r\n [codeOnly]=\"formulaConfig.codeOnly ?? false\"\r\n [hideToolbar]=\"formulaConfig.hideToolbar ?? false\"\r\n [hideStatusBar]=\"formulaConfig.hideStatusBar ?? false\"\r\n [isProcessBuilder]=\"formulaConfig.isProcessBuilder ?? false\"\r\n />\r\n </mt-card>\r\n }\r\n </div>\r\n</div>\r\n\r\n<div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"'structureBuilder.cancel' | transloco\"\r\n severity=\"secondary\"\r\n (onClick)=\"onCancel()\"\r\n >\r\n </mt-button>\r\n <mt-button\r\n [disabled]=\"!dynamicFormControl.valid\"\r\n [label]=\"'structureBuilder.saveChanges' | transloco\"\r\n severity=\"primary\"\r\n (onClick)=\"onSave()\"\r\n >\r\n </mt-button>\r\n</div>\r\n" }]
123
137
  }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
124
138
 
125
139
  class Toolbar {
@@ -185,8 +199,10 @@ class StructureBuilder {
185
199
  fCanvasComponent = viewChild(FCanvasComponent, ...(ngDevMode ? [{ debugName: "fCanvasComponent" }] : []));
186
200
  fZoomDirective = viewChild(FZoomDirective, ...(ngDevMode ? [{ debugName: "fZoomDirective" }] : []));
187
201
  nodeForm = input({ sections: [] }, ...(ngDevMode ? [{ debugName: "nodeForm" }] : []));
202
+ nodeDialogFooterConfig = input(null, ...(ngDevMode ? [{ debugName: "nodeDialogFooterConfig" }] : []));
188
203
  connectionForm = input({ sections: [] }, ...(ngDevMode ? [{ debugName: "connectionForm" }] : []));
189
204
  connectionFormulaSchemaId = input(undefined, ...(ngDevMode ? [{ debugName: "connectionFormulaSchemaId" }] : []));
205
+ connectionFormulaConfig = input(null, ...(ngDevMode ? [{ debugName: "connectionFormulaConfig" }] : []));
190
206
  nodeActions = input([], ...(ngDevMode ? [{ debugName: "nodeActions" }] : []));
191
207
  nodeFields = input({
192
208
  id: 'id',
@@ -200,8 +216,8 @@ class StructureBuilder {
200
216
  updateModalType = input('drawer', ...(ngDevMode ? [{ debugName: "updateModalType" }] : []));
201
217
  addModalStyleClass = input('!w-[35rem]', ...(ngDevMode ? [{ debugName: "addModalStyleClass" }] : []));
202
218
  updateModalStyleClass = input('!w-[35rem]', ...(ngDevMode ? [{ debugName: "updateModalStyleClass" }] : []));
203
- addModalHeader = input('Add Node', ...(ngDevMode ? [{ debugName: "addModalHeader" }] : []));
204
- updateModalHeader = input('Edit Node Properties', ...(ngDevMode ? [{ debugName: "updateModalHeader" }] : []));
219
+ addModalHeader = input('', ...(ngDevMode ? [{ debugName: "addModalHeader" }] : []));
220
+ updateModalHeader = input('', ...(ngDevMode ? [{ debugName: "updateModalHeader" }] : []));
205
221
  appendTo = input('', ...(ngDevMode ? [{ debugName: "appendTo" }] : []));
206
222
  availableTabsClass = input('', ...(ngDevMode ? [{ debugName: "availableTabsClass" }] : []));
207
223
  layoutDirection = input(Direction.TOP_TO_BOTTOM, ...(ngDevMode ? [{ debugName: "layoutDirection" }] : []));
@@ -384,7 +400,11 @@ class StructureBuilder {
384
400
  const styleClass = isNewNode
385
401
  ? this.addModalStyleClass()
386
402
  : this.updateModalStyleClass();
387
- const header = isNewNode ? this.addModalHeader() : this.updateModalHeader();
403
+ const header = isNewNode
404
+ ? this.addModalHeader() ||
405
+ this.transloco.translate('structureBuilder.addNode')
406
+ : this.updateModalHeader() ||
407
+ this.transloco.translate('structureBuilder.editNodeProperties');
388
408
  const config = {
389
409
  header: header,
390
410
  styleClass: styleClass,
@@ -398,6 +418,7 @@ class StructureBuilder {
398
418
  node: node,
399
419
  formSchema: this.nodeForm(),
400
420
  template: this.nodeDialogTemplate(),
421
+ footerConfig: this.nodeDialogFooterConfig(),
401
422
  },
402
423
  },
403
424
  };
@@ -428,6 +449,7 @@ class StructureBuilder {
428
449
  connection: connection,
429
450
  formSchema: this.connectionForm(),
430
451
  formulaSchemaId: this.connectionFormulaSchemaId(),
452
+ formulaConfig: this.connectionFormulaConfig(),
431
453
  },
432
454
  },
433
455
  });
@@ -595,7 +617,7 @@ class StructureBuilder {
595
617
  return visited;
596
618
  }
597
619
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: StructureBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });
598
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: StructureBuilder, isStandalone: true, selector: "mt-structure-builder", inputs: { availableNodes: { classPropertyName: "availableNodes", publicName: "availableNodes", isSignal: true, isRequired: false, transformFunction: null }, nodeForm: { classPropertyName: "nodeForm", publicName: "nodeForm", isSignal: true, isRequired: false, transformFunction: null }, connectionForm: { classPropertyName: "connectionForm", publicName: "connectionForm", isSignal: true, isRequired: false, transformFunction: null }, connectionFormulaSchemaId: { classPropertyName: "connectionFormulaSchemaId", publicName: "connectionFormulaSchemaId", isSignal: true, isRequired: false, transformFunction: null }, nodeActions: { classPropertyName: "nodeActions", publicName: "nodeActions", isSignal: true, isRequired: false, transformFunction: null }, nodeFields: { classPropertyName: "nodeFields", publicName: "nodeFields", isSignal: true, isRequired: false, transformFunction: null }, isAutoLayout: { classPropertyName: "isAutoLayout", publicName: "isAutoLayout", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, addModalType: { classPropertyName: "addModalType", publicName: "addModalType", isSignal: true, isRequired: false, transformFunction: null }, updateModalType: { classPropertyName: "updateModalType", publicName: "updateModalType", isSignal: true, isRequired: false, transformFunction: null }, addModalStyleClass: { classPropertyName: "addModalStyleClass", publicName: "addModalStyleClass", isSignal: true, isRequired: false, transformFunction: null }, updateModalStyleClass: { classPropertyName: "updateModalStyleClass", publicName: "updateModalStyleClass", isSignal: true, isRequired: false, transformFunction: null }, addModalHeader: { classPropertyName: "addModalHeader", publicName: "addModalHeader", isSignal: true, isRequired: false, transformFunction: null }, updateModalHeader: { classPropertyName: "updateModalHeader", publicName: "updateModalHeader", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, availableTabsClass: { classPropertyName: "availableTabsClass", publicName: "availableTabsClass", isSignal: true, isRequired: false, transformFunction: null }, layoutDirection: { classPropertyName: "layoutDirection", publicName: "layoutDirection", isSignal: true, isRequired: false, transformFunction: null }, nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null }, connections: { classPropertyName: "connections", publicName: "connections", isSignal: true, isRequired: false, transformFunction: null }, nodeTemplate: { classPropertyName: "nodeTemplate", publicName: "nodeTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodeActionsEvent: "nodeActionsEvent", action: "action", nodes: "nodesChange", connections: "connectionsChange" }, host: { classAttribute: "flex h-full bg-surface-200 dark:bg-surface-700 relative rounded-2xl overflow-hidden" }, providers: [DialogService], queries: [{ propertyName: "nodeDialogTemplate", first: true, predicate: ["nodeDialog"], descendants: true, isSignal: true }, { propertyName: "nodeTemplateContent", first: true, predicate: ["nodeTemplate"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "fCanvas", first: true, predicate: FCanvasComponent, descendants: true, isSignal: true }, { propertyName: "fFlowComponent", first: true, predicate: FFlowComponent, descendants: true, isSignal: true }, { propertyName: "fCanvasComponent", first: true, predicate: FCanvasComponent, descendants: true, isSignal: true }, { propertyName: "fZoomDirective", first: true, predicate: FZoomDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- structure-builder.html -->\r\n@if (!readonly() && availableTabs().length > 0) {\r\n <mt-card\r\n class=\"absolute ms-4 mt-4 z-1 h-[calc(100%---spacing(8))] w-1/5 min-w-xs\"\r\n >\r\n <ng-template #headless>\r\n <!-- Header -->\r\n <div class=\"flex items-center justify-between px-4 pt-5\">\r\n <h3 class=\"text-xl font-semibold\">\r\n {{ \"structureBuilder.levelTemplates\" | transloco }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Tabs using PrimeNG -->\r\n <p-tabs\r\n [(value)]=\"activeTab\"\r\n styleClass=\"structure-tabs \"\r\n class=\"h-full overflow-hidden\"\r\n >\r\n <p-tablist>\r\n @for (tab of availableTabs(); track tab; let i = $index) {\r\n <p-tab [value]=\"i.toString()\">{{ tab | titlecase }}</p-tab>\r\n }\r\n </p-tablist>\r\n <p-tabpanels class=\"bg-transparent! p-0! overflow-auto\">\r\n @for (tab of availableTabs(); track tab; let i = $index) {\r\n <p-tabpanel [value]=\"i.toString()\">\r\n <p class=\"text-xs text-muted py-3 px-4\">\r\n {{ \"structureBuilder.dragToAdd\" | transloco }}\r\n </p>\r\n\r\n <!-- Node List -->\r\n <div class=\"space-y-1 px-4\">\r\n @for (node of currentTabNodes(); track node.id) {\r\n <div\r\n fExternalItem\r\n [fData]=\"node\"\r\n class=\"group select-none relative flex items-center gap-3 py-3 px-4 hover:bg-emphasis hover:border-solid transition-colors rounded-lg border-1 border-dashed border-color border-surface-300 dark:border-surface-500 cursor-move transition-colors\"\r\n >\r\n <!-- Node Icon with color -->\r\n <div class=\"text-primary text-lg\">\r\n <mt-icon [icon]=\"node.icon || 'general.box'\"></mt-icon>\r\n </div>\r\n\r\n <!-- Node Name -->\r\n <span class=\"text-base font-medium flex-1\">{{\r\n node.label\r\n }}</span>\r\n <mt-icon class=\"text-lg\" icon=\"general.menu-05\"></mt-icon>\r\n </div>\r\n }\r\n\r\n @if (currentTabNodes().length === 0) {\r\n <div class=\"text-center py-8 text-gray-400\">\r\n <p class=\"text-sm\">\r\n {{\r\n \"structureBuilder.allItemsInUse\"\r\n | transloco: { tab: tab }\r\n }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </p-tabpanel>\r\n }\r\n </p-tabpanels>\r\n </p-tabs>\r\n </ng-template>\r\n </mt-card>\r\n} @else if (!readonly() && availableNodes().length > 0) {\r\n <div [ngClass]=\"availableTabsClass() || 'absolute top-4 start-4 z-1 w-64'\">\r\n <mt-card [title]=\"'structureBuilder.steps' | transloco\">\r\n <div class=\"flex flex-col gap-2\">\r\n @for (node of availableNodes(); track node.id) {\r\n <div\r\n fExternalItem\r\n [fData]=\"node\"\r\n class=\"group select-none relative flex items-center gap-3 py-3 px-4 hover:bg-emphasis hover:border-solid transition-colors rounded-lg border-1 border-dashed border-color border-surface-300 dark:border-surface-500 cursor-move bg-content\"\r\n >\r\n <!-- Node Icon with color -->\r\n <div class=\"text-primary text-lg\">\r\n <mt-icon [icon]=\"node.icon || 'general.box'\"></mt-icon>\r\n </div>\r\n\r\n <!-- Node Name -->\r\n <span class=\"text-base font-medium flex-1\">{{ node.label }}</span>\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n </div>\r\n}\r\n<!-- Left Sidebar -->\r\n\r\n<!-- Main Canvas Area -->\r\n<div class=\"flex-1 z-0 relative\">\r\n <ng-content select=\"[flowContent]\"></ng-content>\r\n\r\n <f-flow\r\n fDraggable\r\n dir=\"ltr\"\r\n (fLoaded)=\"onLoaded()\"\r\n (fCreateNode)=\"onCreateNode($event)\"\r\n (fCreateConnection)=\"onCreateConnection($event)\"\r\n class=\"size-full\"\r\n >\r\n <f-background>\r\n <f-circle-pattern color=\"#b5b5b5\"></f-circle-pattern>\r\n </f-background>\r\n <f-canvas fZoom [fZoomMinimum]=\"0.1\" [fZoomMaximum]=\"2\">\r\n <f-connection-for-create fBehavior=\"floating\" fType=\"straight\">\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n </f-connection-for-create>\r\n <f-snap-connection\r\n fBehavior=\"fixed\"\r\n fType=\"segment\"\r\n class=\"z-1\"\r\n [fSnapThreshold]=\"100\"\r\n >\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n </f-snap-connection>\r\n\r\n <f-connection-for-create></f-connection-for-create>\r\n\r\n <!-- Enhanced Connections with Edit Button -->\r\n @for (connection of connectionsComputed(); track connection.id) {\r\n <f-connection\r\n [fReassignDisabled]=\"true\"\r\n [fOutputId]=\"connection.from\"\r\n [fInputId]=\"connection.to\"\r\n fBehavior=\"fixed\"\r\n fType=\"segment\"\r\n [ngClass]=\"{ 'connection-loading': connection.loading, 'z-1': true }\"\r\n >\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.SELECTED_START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.SELECTED_END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n @if (!readonly()) {\r\n <div\r\n fConnectionCenter\r\n class=\"flex items-center gap-1 bg-content rounded-md p-1 shadow-sm\"\r\n >\r\n @if (!connection.loading) {\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n [icon]=\"'general.edit-05'\"\r\n (click)=\"openConnectionDialog(connection)\"\r\n >\r\n </mt-button>\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n severity=\"danger\"\r\n [icon]=\"'general.trash-01'\"\r\n (click)=\"removeConnection(connection)\"\r\n >\r\n </mt-button>\r\n } @else {\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n [icon]=\"'general.loading-01'\"\r\n >\r\n </mt-button>\r\n }\r\n </div>\r\n }\r\n </f-connection>\r\n }\r\n\r\n <!-- Enhanced Nodes with Edit Button -->\r\n @for (node of nodesWithComputedProps(); track node._computedId) {\r\n <mt-card\r\n fNode\r\n fDragHandle\r\n [fNodePosition]=\"{\r\n x: node.configuration?.x || 200,\r\n y: node.configuration?.y || 100,\r\n }\"\r\n (fNodePositionChange)=\"onNodePositionChange($event, node._computedId)\"\r\n [style.--node-data-border-color]=\"node._computedColor\"\r\n >\r\n <ng-template #headless>\r\n @if (!node.loading) {\r\n <div [attr.dir]=\"contentDirection()\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"\r\n effectiveNodeTemplate() || defaultNodeTemplate\r\n \"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: node,\r\n node: node,\r\n actions: getFilteredNodeActions(node),\r\n onAction: nodeActionHandler,\r\n dir: contentDirection(),\r\n }\"\r\n >\r\n </ng-container>\r\n </div>\r\n <div\r\n fNodeInput\r\n [fInputId]=\"node._computedId\"\r\n [fInputConnectableSide]=\"configuration().inputSide\"\r\n [fInputMultiple]=\"true\"\r\n [ngClass]=\"configuration().inputSide\"\r\n ></div>\r\n\r\n <div\r\n fNodeOutput\r\n [fOutputId]=\"node._computedId\"\r\n [fOutputConnectableSide]=\"configuration().outputSide\"\r\n [isSelfConnectable]=\"false\"\r\n [fOutputMultiple]=\"true\"\r\n [ngClass]=\"configuration().outputSide\"\r\n class=\"bg-surface-50 dark:bg-surface-900\"\r\n ></div>\r\n } @else {\r\n <p-skeleton height=\"10rem\" width=\"15rem\" />\r\n }\r\n\r\n <!-- Node Header with Edit Button -->\r\n </ng-template>\r\n </mt-card>\r\n }\r\n\r\n <ng-template\r\n #defaultNodeTemplate\r\n let-node\r\n let-actions=\"actions\"\r\n let-onAction=\"onAction\"\r\n >\r\n <div\r\n class=\"flex flex-col items-center min-w-3xs gap-2 px-3 py-4 rounded-t-2xl bg-white dark:bg-surface-800 border-(--p-content-border-color)\"\r\n >\r\n @if (node._computedIcon) {\r\n <mt-icon\r\n class=\"text-2xl text-primary\"\r\n [icon]=\"node._computedIcon\"\r\n />\r\n }\r\n <div>{{ node._computedName }}</div>\r\n </div>\r\n <div\r\n class=\"flex justify-center pt-3 mb-4 gap-2 bg-surface-50 dark:bg-surface-900\"\r\n >\r\n @for (action of actions; track action.key) {\r\n <mt-button\r\n [size]=\"action?.size || 'small'\"\r\n [variant]=\"action?.variant\"\r\n [icon]=\"action?.icon\"\r\n [tooltip]=\"action?.tooltip\"\r\n [severity]=\"action?.severity\"\r\n (onClick)=\"onAction(action, node)\"\r\n >\r\n </mt-button>\r\n }\r\n </div>\r\n </ng-template>\r\n </f-canvas>\r\n </f-flow>\r\n</div>\r\n@if (!readonly()) {\r\n <mt-toolbar />\r\n}\r\n", styles: ["::ng-deep :root{--background-element-color: rgba(0, 0, 0, .1);--selection-area-color: rgba(100, 108, 255, .14);--disabled-color: #e2e2e2;--node-background-color: #ffffff;--node-background-color-inverse: #000000;--node-border-radius: 2px;--node-border-color: rgba(60, 60, 67, .36);--node-selected-border-color: #3451b2;--node-color: rgba(60, 60, 67, .78);--node-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--connection-color: var(--p-text-color);--snap-connection-color: var(--p-text-muted-color);--connection-gradient-1: #b8272c;--connection-gradient-2: #30a46c;--outlet-color: #3451b2;--input-output-color: rgba(60, 60, 67, .78);--minimap-background-color: #ffffff;--minimap-node-color: rgba(60, 60, 67);--minimap-node-selected-color: var(--p-primary-color);--minimap-view-color: rgba(100, 108, 255, .14)}::ng-deep :root.dark{--background-element-color: rgba(255, 255, 255, .1);--selection-area-color: rgba(100, 108, 255, .16);--disabled-color: #2c2c2e;--node-background-color: #000000;--node-background-color-inverse: #ffffff;--node-border-radius: 2px;--node-border-color: rgba(235, 235, 245, .38);--node-selected-border-color: #a8b1ff;--node-color: rgba(235, 235, 245, .6);--node-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--connection-color: rgba(235, 235, 245, 1);--snap-connection-color: rgba(235, 235, 245, .2);--connection-gradient-1: #f66f81;--connection-gradient-2: #298459;--outlet-color: #a8b1ff;--input-output-color: rgba(235, 235, 245, .6);--minimap-background-color: #1b1b1f;--minimap-node-color: rgba(255, 255, 245, .86);--minimap-node-selected-color: #a8b1ff;--minimap-view-color: rgba(100, 108, 255, .16)}::ng-deep :root{--form-field-text-color: var(--node-color);--form-field-background: var(--minimap-view-color);--form-field-panel-shadow: var(--shadow-4);--form-field-panel-background: var(--node-background-color);--form-field-active-color: var(--minimap-node-selected-color)}::ng-deep f-flow .f-connection{cursor:pointer}::ng-deep f-flow .f-connection .f-connection-drag-handle{fill:transparent}::ng-deep f-flow .f-connection .f-connection-selection{fill:none}::ng-deep f-flow .f-connection .f-connection-path{fill:none;stroke:var(--connection-color);stroke-width:2}::ng-deep f-flow .f-connection .f-connection-marker{fill:var(--connection-color)}::ng-deep f-flow .f-connection .f-marker path,::ng-deep f-flow .f-connection .f-marker circle{fill:var(--connection-color)}::ng-deep f-flow .f-connection .f-connection-text,::ng-deep f-flow .f-connection .f-connection-center{fill:var(--connection-color);color:var(--connection-color)}::ng-deep f-flow .f-connection.f-snap-connection .f-connection-path{stroke:var(--snap-connection-color)}::ng-deep f-flow .f-connection .f-connection-center{display:none}::ng-deep f-flow .f-connection.connection-loading .f-connection-center{display:block}::ng-deep f-flow .f-connection.f-selected .f-connection-center{display:block}::ng-deep f-flow .f-connection.f-selected .f-connection-path{stroke:var(--minimap-node-selected-color)}::ng-deep f-flow .f-connection.f-selected .f-marker path,::ng-deep f-flow .f-connection.f-selected .f-marker circle{fill:var(--p-primary-color);stroke:var(--minimap-node-selected-color)}::ng-deep f-flow .f-connection .f-connection-selection{fill:none;stroke:transparent;stroke-width:20;cursor:pointer}::ng-deep f-flow .f-connection:hover .f-connection-selection{stroke:var(--p-primary-color);opacity:.1}::ng-deep f-flow .f-connection.f-snap-connection .f-connection-path{stroke:var(--snap-connection-color);stroke-width:2px}::ng-deep f-flow .f-connection.f-snap-connection .f-marker path,::ng-deep f-flow .f-connection.f-snap-connection .f-marker circle{fill:var(--snap-connection-color)}::ng-deep f-flow .f-connection.f-snap-connection .f-connection-selection{fill:transparent!important;stroke:transparent!important}::ng-deep f-flow .f-connection.f-connection-for-create .f-connection-selection{fill:transparent!important;stroke:transparent!important}::ng-deep f-flow .f-connection-for-create{pointer-events:none}::ng-deep f-flow .f-connection-for-create .f-connection .f-connection-path{stroke:var(--snap-connection-color);stroke-width:3px;stroke-dasharray:8,4;animation:connection-dash 1s linear infinite}::ng-deep f-flow .f-connection-for-create .f-connection .f-marker path,::ng-deep f-flow .f-connection-for-create .f-connection .f-marker circle{fill:var(--snap-connection-color)}@keyframes connection-dash{to{stroke-dashoffset:-12}}::ng-deep f-flow{direction:ltr}.f-node-input:not(.f-node),.f-node-output:not(.f-node){position:absolute;border-radius:0 0 1rem 1rem}.f-node-input:not(.f-node):hover,.f-node-output:not(.f-node):hover{border:.5px dashed var(--p-primary-color)}.f-node-input:not(.f-node).top,.f-node-input:not(.f-node).bottom,.f-node-output:not(.f-node).top,.f-node-output:not(.f-node).bottom{width:100%;height:16px;left:0}.f-node-input:not(.f-node).top,.f-node-output:not(.f-node).top{top:0}.f-node-input:not(.f-node).bottom,.f-node-output:not(.f-node).bottom{bottom:0}.f-node-input:not(.f-node).left,.f-node-input:not(.f-node).right,.f-node-output:not(.f-node).left,.f-node-output:not(.f-node).right{width:16px;height:100%;top:0}.f-node-input:not(.f-node).left,.f-node-output:not(.f-node).left{left:0;border-radius:1rem 0 0 1rem}.f-node-input:not(.f-node).right,.f-node-output:not(.f-node).right{right:0;border-radius:0 1rem 1rem 0}.f-node-input:not(.f-node).f-node-output-not-connectable,.f-node-input:not(.f-node).f-node-input-not-connectable,.f-node-output:not(.f-node).f-node-output-not-connectable,.f-node-output:not(.f-node).f-node-input-not-connectable{background-color:var(--disabled-color)}.f-node-input:not(.f-node){border-radius:4px}.f-node-input,.f-node-output{z-index:10;pointer-events:all}.examples-toolbar{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:8px;position:absolute;right:16px;top:16px}.examples-toolbar button{font-weight:500;border:none;border-radius:2px;padding:4px 8px;line-height:normal}.f-node:before{content:\"\";position:absolute;width:100%;height:4rem;border-radius:var(--radius-2xl);z-index:-1;top:-.25rem;background-color:var(--node-data-border-color)}.connection-center{display:flex;gap:8px;background:var(--node-background-color);border:1px solid var(--node-border-color);border-radius:4px;padding:4px;box-shadow:var(--node-shadow)}.connection-center .connection-edit-btn,.connection-center .connection-delete-btn{background:none;border:none;width:24px;height:24px;border-radius:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.connection-center .connection-edit-btn:hover,.connection-center .connection-delete-btn:hover{background-color:var(--minimap-view-color)}.connection-center .connection-edit-btn{color:var(--minimap-node-selected-color)}.connection-center .connection-delete-btn{color:#ef4444}.node-edit-btn,.node-delete-btn{background:none;border:none;width:32px;height:32px;border-radius:6px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.node-edit-btn:hover,.node-delete-btn:hover{background-color:var(--minimap-view-color)}.node-edit-btn{color:var(--minimap-node-selected-color)}.node-delete-btn{color:#ef4444}.node-properties{max-height:200px;overflow-y:auto}.node-properties .property-item{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid var(--node-border-color);font-size:12px}.node-properties .property-item .property-key{font-weight:600;color:var(--node-color);margin-right:8px}.node-properties .property-item .property-value{color:var(--minimap-node-selected-color);word-break:break-word}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: FFlowModule }, { kind: "component", type: i2$1.FFlowComponent, selector: "f-flow", inputs: ["fFlowId"], outputs: ["fLoaded"] }, { kind: "component", type: i2$1.FCanvasComponent, selector: "f-canvas", inputs: ["position", "scale", "debounceTime"], outputs: ["fCanvasChange"] }, { kind: "component", type: i2$1.FBackgroundComponent, selector: "f-background" }, { kind: "component", type: i2$1.FCirclePatternComponent, selector: "f-circle-pattern", inputs: ["id", "color", "radius"] }, { kind: "directive", type: i2$1.FZoomDirective, selector: "f-canvas[fZoom]", inputs: ["fZoom", "fWheelTrigger", "fDblClickTrigger", "fZoomMinimum", "fZoomMaximum", "fZoomStep", "fZoomDblClickStep"], exportAs: ["fComponent"] }, { kind: "directive", type: i2$1.FExternalItemDirective, selector: "[fExternalItem]", inputs: ["fExternalItemId", "fData", "fDisabled", "fPreview", "fPreviewMatchSize", "fPlaceholder"] }, { kind: "component", type: i2$1.FConnectionComponent, selector: "f-connection", inputs: ["fConnectionId", "fText", "fTextStartOffset", "fOutputId", "fInputId", "fRadius", "fOffset", "fBehavior", "fType", "fSelectionDisabled", "fReassignableStart", "fReassignDisabled", "fInputSide", "fOutputSide"], exportAs: ["fComponent"] }, { kind: "directive", type: i2$1.FConnectionCenterDirective, selector: "[fConnectionCenter]", inputs: ["fConnectionCenter"] }, { kind: "component", type: i2$1.FConnectionForCreateComponent, selector: "f-connection-for-create", inputs: ["fRadius", "fOffset", "fBehavior", "fType", "fInputSide", "fOutputSide"] }, { kind: "directive", type: i2$1.FMarkerDirective, selector: "svg[fMarker]", inputs: ["width", "height", "refX", "refY", "type", "orient", "markerUnits"] }, { kind: "component", type: i2$1.FSnapConnectionComponent, selector: "f-snap-connection", inputs: ["fSnapThreshold", "fRadius", "fOffset", "fBehavior", "fType", "fInputSide", "fOutputSide"] }, { kind: "directive", type: i2$1.FNodeInputDirective, selector: "[fNodeInput]", inputs: ["fInputId", "fInputCategory", "fInputMultiple", "fInputDisabled", "fInputConnectableSide"], exportAs: ["fNodeInput"] }, { kind: "directive", type: i2$1.FNodeOutputDirective, selector: "[fNodeOutput]", inputs: ["fOutputId", "fOutputMultiple", "fOutputDisabled", "fOutputConnectableSide", "isSelfConnectable", "fCanBeConnectedInputs"], exportAs: ["fNodeOutput"] }, { kind: "directive", type: i2$1.FNodeDirective, selector: "[fNode]", inputs: ["fNodeId", "fNodeParentId", "fNodePosition", "fNodeSize", "fNodeRotate", "fConnectOnNode", "fMinimapClass", "fNodeDraggingDisabled", "fNodeSelectionDisabled", "fIncludePadding", "fAutoExpandOnChildHit", "fAutoSizeToFitChildren"], outputs: ["fNodePositionChange", "fNodeSizeChange", "fNodeRotateChange"], exportAs: ["fComponent"] }, { kind: "directive", type: i2$1.FDragHandleDirective, selector: "[fDragHandle]" }, { kind: "directive", type: i2$1.FDraggableDirective, selector: "f-flow[fDraggable]", inputs: ["fDraggableDisabled", "fMultiSelectTrigger", "fReassignConnectionTrigger", "fCreateConnectionTrigger", "fNodeResizeTrigger", "fNodeRotateTrigger", "fNodeMoveTrigger", "fCanvasMoveTrigger", "fExternalItemTrigger", "fEmitOnNodeIntersect", "vCellSize", "hCellSize", "fCellSizeWhileDragging"], outputs: ["fSelectionChange", "fNodeIntersectedWithConnections", "fCreateNode", "fMoveNodes", "fReassignConnection", "fCreateConnection", "fDropToGroup", "fDragStarted", "fDragEnded"], exportAs: ["fDraggable"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i3$1.Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: i3$1.TabPanels, selector: "p-tabpanels" }, { kind: "component", type: i3$1.TabPanel, selector: "p-tabpanel", inputs: ["lazy", "value"], outputs: ["valueChange"] }, { kind: "component", type: i3$1.TabList, selector: "p-tablist" }, { kind: "component", type: i3$1.Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Toolbar, selector: "mt-toolbar", inputs: ["size"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }] });
620
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: StructureBuilder, isStandalone: true, selector: "mt-structure-builder", inputs: { availableNodes: { classPropertyName: "availableNodes", publicName: "availableNodes", isSignal: true, isRequired: false, transformFunction: null }, nodeForm: { classPropertyName: "nodeForm", publicName: "nodeForm", isSignal: true, isRequired: false, transformFunction: null }, nodeDialogFooterConfig: { classPropertyName: "nodeDialogFooterConfig", publicName: "nodeDialogFooterConfig", isSignal: true, isRequired: false, transformFunction: null }, connectionForm: { classPropertyName: "connectionForm", publicName: "connectionForm", isSignal: true, isRequired: false, transformFunction: null }, connectionFormulaSchemaId: { classPropertyName: "connectionFormulaSchemaId", publicName: "connectionFormulaSchemaId", isSignal: true, isRequired: false, transformFunction: null }, connectionFormulaConfig: { classPropertyName: "connectionFormulaConfig", publicName: "connectionFormulaConfig", isSignal: true, isRequired: false, transformFunction: null }, nodeActions: { classPropertyName: "nodeActions", publicName: "nodeActions", isSignal: true, isRequired: false, transformFunction: null }, nodeFields: { classPropertyName: "nodeFields", publicName: "nodeFields", isSignal: true, isRequired: false, transformFunction: null }, isAutoLayout: { classPropertyName: "isAutoLayout", publicName: "isAutoLayout", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, addModalType: { classPropertyName: "addModalType", publicName: "addModalType", isSignal: true, isRequired: false, transformFunction: null }, updateModalType: { classPropertyName: "updateModalType", publicName: "updateModalType", isSignal: true, isRequired: false, transformFunction: null }, addModalStyleClass: { classPropertyName: "addModalStyleClass", publicName: "addModalStyleClass", isSignal: true, isRequired: false, transformFunction: null }, updateModalStyleClass: { classPropertyName: "updateModalStyleClass", publicName: "updateModalStyleClass", isSignal: true, isRequired: false, transformFunction: null }, addModalHeader: { classPropertyName: "addModalHeader", publicName: "addModalHeader", isSignal: true, isRequired: false, transformFunction: null }, updateModalHeader: { classPropertyName: "updateModalHeader", publicName: "updateModalHeader", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, availableTabsClass: { classPropertyName: "availableTabsClass", publicName: "availableTabsClass", isSignal: true, isRequired: false, transformFunction: null }, layoutDirection: { classPropertyName: "layoutDirection", publicName: "layoutDirection", isSignal: true, isRequired: false, transformFunction: null }, nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null }, connections: { classPropertyName: "connections", publicName: "connections", isSignal: true, isRequired: false, transformFunction: null }, nodeTemplate: { classPropertyName: "nodeTemplate", publicName: "nodeTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodeActionsEvent: "nodeActionsEvent", action: "action", nodes: "nodesChange", connections: "connectionsChange" }, host: { classAttribute: "flex h-full bg-surface-200 dark:bg-surface-700 relative rounded-2xl overflow-hidden" }, providers: [DialogService], queries: [{ propertyName: "nodeDialogTemplate", first: true, predicate: ["nodeDialog"], descendants: true, isSignal: true }, { propertyName: "nodeTemplateContent", first: true, predicate: ["nodeTemplate"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "fCanvas", first: true, predicate: FCanvasComponent, descendants: true, isSignal: true }, { propertyName: "fFlowComponent", first: true, predicate: FFlowComponent, descendants: true, isSignal: true }, { propertyName: "fCanvasComponent", first: true, predicate: FCanvasComponent, descendants: true, isSignal: true }, { propertyName: "fZoomDirective", first: true, predicate: FZoomDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- structure-builder.html -->\r\n@if (!readonly() && availableTabs().length > 0) {\r\n <mt-card\r\n class=\"absolute ms-4 mt-4 z-1 h-[calc(100%---spacing(8))] w-1/5 min-w-xs\"\r\n >\r\n <ng-template #headless>\r\n <!-- Header -->\r\n <div class=\"flex items-center justify-between px-4 pt-5\">\r\n <h3 class=\"text-xl font-semibold\">\r\n {{ \"structureBuilder.levelTemplates\" | transloco }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Tabs using PrimeNG -->\r\n <p-tabs\r\n [(value)]=\"activeTab\"\r\n styleClass=\"structure-tabs \"\r\n class=\"h-full overflow-hidden\"\r\n >\r\n <p-tablist>\r\n @for (tab of availableTabs(); track tab; let i = $index) {\r\n <p-tab [value]=\"i.toString()\">{{ tab | titlecase }}</p-tab>\r\n }\r\n </p-tablist>\r\n <p-tabpanels class=\"bg-transparent! p-0! overflow-auto\">\r\n @for (tab of availableTabs(); track tab; let i = $index) {\r\n <p-tabpanel [value]=\"i.toString()\">\r\n <p class=\"text-xs text-muted py-3 px-4\">\r\n {{ \"structureBuilder.dragToAdd\" | transloco }}\r\n </p>\r\n\r\n <!-- Node List -->\r\n <div class=\"space-y-1 px-4\">\r\n @for (node of currentTabNodes(); track node.id) {\r\n <div\r\n fExternalItem\r\n [fData]=\"node\"\r\n class=\"group select-none relative flex items-center gap-3 py-3 px-4 hover:bg-emphasis hover:border-solid transition-colors rounded-lg border-1 border-dashed border-color border-surface-300 dark:border-surface-500 cursor-move transition-colors\"\r\n >\r\n <!-- Node Icon with color -->\r\n <div class=\"text-primary text-lg\">\r\n <mt-icon [icon]=\"node.icon || 'general.box'\"></mt-icon>\r\n </div>\r\n\r\n <!-- Node Name -->\r\n <span class=\"text-base font-medium flex-1\">{{\r\n node.label\r\n }}</span>\r\n <mt-icon class=\"text-lg\" icon=\"general.menu-05\"></mt-icon>\r\n </div>\r\n }\r\n\r\n @if (currentTabNodes().length === 0) {\r\n <div class=\"text-center py-8 text-gray-400\">\r\n <p class=\"text-sm\">\r\n {{\r\n \"structureBuilder.allItemsInUse\"\r\n | transloco: { tab: tab }\r\n }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </p-tabpanel>\r\n }\r\n </p-tabpanels>\r\n </p-tabs>\r\n </ng-template>\r\n </mt-card>\r\n} @else if (!readonly() && availableNodes().length > 0) {\r\n <div [ngClass]=\"availableTabsClass() || 'absolute top-4 start-4 z-1 w-64'\">\r\n <mt-card [title]=\"'structureBuilder.steps' | transloco\">\r\n <div class=\"flex flex-col gap-2\">\r\n @for (node of availableNodes(); track node.id) {\r\n <div\r\n fExternalItem\r\n [fData]=\"node\"\r\n class=\"group select-none relative flex items-center gap-3 py-3 px-4 hover:bg-emphasis hover:border-solid transition-colors rounded-lg border-1 border-dashed border-color border-surface-300 dark:border-surface-500 cursor-move bg-content\"\r\n >\r\n <!-- Node Icon with color -->\r\n <div class=\"text-primary text-lg\">\r\n <mt-icon [icon]=\"node.icon || 'general.box'\"></mt-icon>\r\n </div>\r\n\r\n <!-- Node Name -->\r\n <span class=\"text-base font-medium flex-1\">{{ node.label }}</span>\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n </div>\r\n}\r\n<!-- Left Sidebar -->\r\n\r\n<!-- Main Canvas Area -->\r\n<div class=\"flex-1 z-0 relative\">\r\n <ng-content select=\"[flowContent]\"></ng-content>\r\n\r\n <f-flow\r\n fDraggable\r\n dir=\"ltr\"\r\n (fLoaded)=\"onLoaded()\"\r\n (fCreateNode)=\"onCreateNode($event)\"\r\n (fCreateConnection)=\"onCreateConnection($event)\"\r\n class=\"size-full\"\r\n >\r\n <f-background>\r\n <f-circle-pattern color=\"#b5b5b5\"></f-circle-pattern>\r\n </f-background>\r\n <f-canvas fZoom [fZoomMinimum]=\"0.1\" [fZoomMaximum]=\"2\">\r\n <f-connection-for-create fBehavior=\"floating\" fType=\"straight\">\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n </f-connection-for-create>\r\n <f-snap-connection\r\n fBehavior=\"fixed\"\r\n fType=\"segment\"\r\n class=\"z-1\"\r\n [fSnapThreshold]=\"100\"\r\n >\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n </f-snap-connection>\r\n\r\n <f-connection-for-create></f-connection-for-create>\r\n\r\n <!-- Enhanced Connections with Edit Button -->\r\n @for (connection of connectionsComputed(); track connection.id) {\r\n <f-connection\r\n [fReassignDisabled]=\"true\"\r\n [fOutputId]=\"connection.from\"\r\n [fInputId]=\"connection.to\"\r\n fBehavior=\"fixed\"\r\n fType=\"segment\"\r\n [ngClass]=\"{ 'connection-loading': connection.loading, 'z-1': true }\"\r\n >\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.SELECTED_START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.SELECTED_END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n @if (!readonly()) {\r\n <div\r\n fConnectionCenter\r\n class=\"flex items-center gap-1 bg-content rounded-md p-1 shadow-sm\"\r\n >\r\n @if (!connection.loading) {\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n [icon]=\"'general.edit-05'\"\r\n (click)=\"openConnectionDialog(connection)\"\r\n >\r\n </mt-button>\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n severity=\"danger\"\r\n [icon]=\"'general.trash-01'\"\r\n (click)=\"removeConnection(connection)\"\r\n >\r\n </mt-button>\r\n } @else {\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n [icon]=\"'general.loading-01'\"\r\n >\r\n </mt-button>\r\n }\r\n </div>\r\n }\r\n </f-connection>\r\n }\r\n\r\n <!-- Enhanced Nodes with Edit Button -->\r\n @for (node of nodesWithComputedProps(); track node._computedId) {\r\n <mt-card\r\n fNode\r\n fDragHandle\r\n [fNodePosition]=\"{\r\n x: node.configuration?.x || 200,\r\n y: node.configuration?.y || 100,\r\n }\"\r\n (fNodePositionChange)=\"onNodePositionChange($event, node._computedId)\"\r\n [style.--node-data-border-color]=\"node._computedColor\"\r\n >\r\n <ng-template #headless>\r\n @if (!node.loading) {\r\n <div [attr.dir]=\"contentDirection()\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"\r\n effectiveNodeTemplate() || defaultNodeTemplate\r\n \"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: node,\r\n node: node,\r\n actions: getFilteredNodeActions(node),\r\n onAction: nodeActionHandler,\r\n dir: contentDirection(),\r\n }\"\r\n >\r\n </ng-container>\r\n </div>\r\n <div\r\n fNodeInput\r\n [fInputId]=\"node._computedId\"\r\n [fInputConnectableSide]=\"configuration().inputSide\"\r\n [fInputMultiple]=\"true\"\r\n [ngClass]=\"configuration().inputSide\"\r\n ></div>\r\n\r\n <div\r\n fNodeOutput\r\n [fOutputId]=\"node._computedId\"\r\n [fOutputConnectableSide]=\"configuration().outputSide\"\r\n [isSelfConnectable]=\"false\"\r\n [fOutputMultiple]=\"true\"\r\n [ngClass]=\"configuration().outputSide\"\r\n class=\"bg-surface-50 dark:bg-surface-900\"\r\n ></div>\r\n } @else {\r\n <p-skeleton height=\"10rem\" width=\"15rem\" />\r\n }\r\n\r\n <!-- Node Header with Edit Button -->\r\n </ng-template>\r\n </mt-card>\r\n }\r\n\r\n <ng-template\r\n #defaultNodeTemplate\r\n let-node\r\n let-actions=\"actions\"\r\n let-onAction=\"onAction\"\r\n >\r\n <div\r\n class=\"flex flex-col items-center min-w-3xs gap-2 px-3 py-4 rounded-t-2xl bg-white dark:bg-surface-800 border-(--p-content-border-color)\"\r\n >\r\n @if (node._computedIcon) {\r\n <mt-icon\r\n class=\"text-2xl text-primary\"\r\n [icon]=\"node._computedIcon\"\r\n />\r\n }\r\n <div>{{ node._computedName }}</div>\r\n </div>\r\n <div\r\n class=\"flex justify-center pt-3 mb-4 gap-2 bg-surface-50 dark:bg-surface-900\"\r\n >\r\n @for (action of actions; track action.key) {\r\n <mt-button\r\n [size]=\"action?.size || 'small'\"\r\n [variant]=\"action?.variant\"\r\n [icon]=\"action?.icon\"\r\n [tooltip]=\"action?.tooltip\"\r\n [severity]=\"action?.severity\"\r\n (onClick)=\"onAction(action, node)\"\r\n >\r\n </mt-button>\r\n }\r\n </div>\r\n </ng-template>\r\n </f-canvas>\r\n </f-flow>\r\n</div>\r\n@if (!readonly()) {\r\n <mt-toolbar />\r\n}\r\n", styles: ["::ng-deep :root{--background-element-color: rgba(0, 0, 0, .1);--selection-area-color: rgba(100, 108, 255, .14);--disabled-color: #e2e2e2;--node-background-color: #ffffff;--node-background-color-inverse: #000000;--node-border-radius: 2px;--node-border-color: rgba(60, 60, 67, .36);--node-selected-border-color: #3451b2;--node-color: rgba(60, 60, 67, .78);--node-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--connection-color: var(--p-text-color);--snap-connection-color: var(--p-text-muted-color);--connection-gradient-1: #b8272c;--connection-gradient-2: #30a46c;--outlet-color: #3451b2;--input-output-color: rgba(60, 60, 67, .78);--minimap-background-color: #ffffff;--minimap-node-color: rgba(60, 60, 67);--minimap-node-selected-color: var(--p-primary-color);--minimap-view-color: rgba(100, 108, 255, .14)}::ng-deep :root.dark{--background-element-color: rgba(255, 255, 255, .1);--selection-area-color: rgba(100, 108, 255, .16);--disabled-color: #2c2c2e;--node-background-color: #000000;--node-background-color-inverse: #ffffff;--node-border-radius: 2px;--node-border-color: rgba(235, 235, 245, .38);--node-selected-border-color: #a8b1ff;--node-color: rgba(235, 235, 245, .6);--node-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--connection-color: rgba(235, 235, 245, 1);--snap-connection-color: rgba(235, 235, 245, .2);--connection-gradient-1: #f66f81;--connection-gradient-2: #298459;--outlet-color: #a8b1ff;--input-output-color: rgba(235, 235, 245, .6);--minimap-background-color: #1b1b1f;--minimap-node-color: rgba(255, 255, 245, .86);--minimap-node-selected-color: #a8b1ff;--minimap-view-color: rgba(100, 108, 255, .16)}::ng-deep :root{--form-field-text-color: var(--node-color);--form-field-background: var(--minimap-view-color);--form-field-panel-shadow: var(--shadow-4);--form-field-panel-background: var(--node-background-color);--form-field-active-color: var(--minimap-node-selected-color)}::ng-deep f-flow .f-connection{cursor:pointer}::ng-deep f-flow .f-connection .f-connection-drag-handle{fill:transparent}::ng-deep f-flow .f-connection .f-connection-selection{fill:none}::ng-deep f-flow .f-connection .f-connection-path{fill:none;stroke:var(--connection-color);stroke-width:2}::ng-deep f-flow .f-connection .f-connection-marker{fill:var(--connection-color)}::ng-deep f-flow .f-connection .f-marker path,::ng-deep f-flow .f-connection .f-marker circle{fill:var(--connection-color)}::ng-deep f-flow .f-connection .f-connection-text,::ng-deep f-flow .f-connection .f-connection-center{fill:var(--connection-color);color:var(--connection-color)}::ng-deep f-flow .f-connection.f-snap-connection .f-connection-path{stroke:var(--snap-connection-color)}::ng-deep f-flow .f-connection .f-connection-center{display:none}::ng-deep f-flow .f-connection.connection-loading .f-connection-center{display:block}::ng-deep f-flow .f-connection.f-selected .f-connection-center{display:block}::ng-deep f-flow .f-connection.f-selected .f-connection-path{stroke:var(--minimap-node-selected-color)}::ng-deep f-flow .f-connection.f-selected .f-marker path,::ng-deep f-flow .f-connection.f-selected .f-marker circle{fill:var(--p-primary-color);stroke:var(--minimap-node-selected-color)}::ng-deep f-flow .f-connection .f-connection-selection{fill:none;stroke:transparent;stroke-width:20;cursor:pointer}::ng-deep f-flow .f-connection:hover .f-connection-selection{stroke:var(--p-primary-color);opacity:.1}::ng-deep f-flow .f-connection.f-snap-connection .f-connection-path{stroke:var(--snap-connection-color);stroke-width:2px}::ng-deep f-flow .f-connection.f-snap-connection .f-marker path,::ng-deep f-flow .f-connection.f-snap-connection .f-marker circle{fill:var(--snap-connection-color)}::ng-deep f-flow .f-connection.f-snap-connection .f-connection-selection{fill:transparent!important;stroke:transparent!important}::ng-deep f-flow .f-connection.f-connection-for-create .f-connection-selection{fill:transparent!important;stroke:transparent!important}::ng-deep f-flow .f-connection-for-create{pointer-events:none}::ng-deep f-flow .f-connection-for-create .f-connection .f-connection-path{stroke:var(--snap-connection-color);stroke-width:3px;stroke-dasharray:8,4;animation:connection-dash 1s linear infinite}::ng-deep f-flow .f-connection-for-create .f-connection .f-marker path,::ng-deep f-flow .f-connection-for-create .f-connection .f-marker circle{fill:var(--snap-connection-color)}@keyframes connection-dash{to{stroke-dashoffset:-12}}::ng-deep f-flow{direction:ltr}.f-node-input:not(.f-node),.f-node-output:not(.f-node){position:absolute;border-radius:0 0 1rem 1rem}.f-node-input:not(.f-node):hover,.f-node-output:not(.f-node):hover{border:.5px dashed var(--p-primary-color)}.f-node-input:not(.f-node).top,.f-node-input:not(.f-node).bottom,.f-node-output:not(.f-node).top,.f-node-output:not(.f-node).bottom{width:100%;height:16px;left:0}.f-node-input:not(.f-node).top,.f-node-output:not(.f-node).top{top:0}.f-node-input:not(.f-node).bottom,.f-node-output:not(.f-node).bottom{bottom:0}.f-node-input:not(.f-node).left,.f-node-input:not(.f-node).right,.f-node-output:not(.f-node).left,.f-node-output:not(.f-node).right{width:16px;height:100%;top:0}.f-node-input:not(.f-node).left,.f-node-output:not(.f-node).left{left:0;border-radius:1rem 0 0 1rem}.f-node-input:not(.f-node).right,.f-node-output:not(.f-node).right{right:0;border-radius:0 1rem 1rem 0}.f-node-input:not(.f-node).f-node-output-not-connectable,.f-node-input:not(.f-node).f-node-input-not-connectable,.f-node-output:not(.f-node).f-node-output-not-connectable,.f-node-output:not(.f-node).f-node-input-not-connectable{background-color:var(--disabled-color)}.f-node-input:not(.f-node){border-radius:4px}.f-node-input,.f-node-output{z-index:10;pointer-events:all}.examples-toolbar{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:8px;position:absolute;right:16px;top:16px}.examples-toolbar button{font-weight:500;border:none;border-radius:2px;padding:4px 8px;line-height:normal}.f-node:before{content:\"\";position:absolute;width:100%;height:4rem;border-radius:var(--radius-2xl);z-index:-1;top:-.25rem;background-color:var(--node-data-border-color)}.connection-center{display:flex;gap:8px;background:var(--node-background-color);border:1px solid var(--node-border-color);border-radius:4px;padding:4px;box-shadow:var(--node-shadow)}.connection-center .connection-edit-btn,.connection-center .connection-delete-btn{background:none;border:none;width:24px;height:24px;border-radius:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.connection-center .connection-edit-btn:hover,.connection-center .connection-delete-btn:hover{background-color:var(--minimap-view-color)}.connection-center .connection-edit-btn{color:var(--minimap-node-selected-color)}.connection-center .connection-delete-btn{color:#ef4444}.node-edit-btn,.node-delete-btn{background:none;border:none;width:32px;height:32px;border-radius:6px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.node-edit-btn:hover,.node-delete-btn:hover{background-color:var(--minimap-view-color)}.node-edit-btn{color:var(--minimap-node-selected-color)}.node-delete-btn{color:#ef4444}.node-properties{max-height:200px;overflow-y:auto}.node-properties .property-item{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid var(--node-border-color);font-size:12px}.node-properties .property-item .property-key{font-weight:600;color:var(--node-color);margin-right:8px}.node-properties .property-item .property-value{color:var(--minimap-node-selected-color);word-break:break-word}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: FFlowModule }, { kind: "component", type: i2$1.FFlowComponent, selector: "f-flow", inputs: ["fFlowId"], outputs: ["fLoaded"] }, { kind: "component", type: i2$1.FCanvasComponent, selector: "f-canvas", inputs: ["position", "scale", "debounceTime"], outputs: ["fCanvasChange"] }, { kind: "component", type: i2$1.FBackgroundComponent, selector: "f-background" }, { kind: "component", type: i2$1.FCirclePatternComponent, selector: "f-circle-pattern", inputs: ["id", "color", "radius"] }, { kind: "directive", type: i2$1.FZoomDirective, selector: "f-canvas[fZoom]", inputs: ["fZoom", "fWheelTrigger", "fDblClickTrigger", "fZoomMinimum", "fZoomMaximum", "fZoomStep", "fZoomDblClickStep"], exportAs: ["fComponent"] }, { kind: "directive", type: i2$1.FExternalItemDirective, selector: "[fExternalItem]", inputs: ["fExternalItemId", "fData", "fDisabled", "fPreview", "fPreviewMatchSize", "fPlaceholder"] }, { kind: "component", type: i2$1.FConnectionComponent, selector: "f-connection", inputs: ["fConnectionId", "fText", "fTextStartOffset", "fOutputId", "fInputId", "fRadius", "fOffset", "fBehavior", "fType", "fSelectionDisabled", "fReassignableStart", "fReassignDisabled", "fInputSide", "fOutputSide"], exportAs: ["fComponent"] }, { kind: "directive", type: i2$1.FConnectionCenterDirective, selector: "[fConnectionCenter]", inputs: ["fConnectionCenter"] }, { kind: "component", type: i2$1.FConnectionForCreateComponent, selector: "f-connection-for-create", inputs: ["fRadius", "fOffset", "fBehavior", "fType", "fInputSide", "fOutputSide"] }, { kind: "directive", type: i2$1.FMarkerDirective, selector: "svg[fMarker]", inputs: ["width", "height", "refX", "refY", "type", "orient", "markerUnits"] }, { kind: "component", type: i2$1.FSnapConnectionComponent, selector: "f-snap-connection", inputs: ["fSnapThreshold", "fRadius", "fOffset", "fBehavior", "fType", "fInputSide", "fOutputSide"] }, { kind: "directive", type: i2$1.FNodeInputDirective, selector: "[fNodeInput]", inputs: ["fInputId", "fInputCategory", "fInputMultiple", "fInputDisabled", "fInputConnectableSide"], exportAs: ["fNodeInput"] }, { kind: "directive", type: i2$1.FNodeOutputDirective, selector: "[fNodeOutput]", inputs: ["fOutputId", "fOutputMultiple", "fOutputDisabled", "fOutputConnectableSide", "isSelfConnectable", "fCanBeConnectedInputs"], exportAs: ["fNodeOutput"] }, { kind: "directive", type: i2$1.FNodeDirective, selector: "[fNode]", inputs: ["fNodeId", "fNodeParentId", "fNodePosition", "fNodeSize", "fNodeRotate", "fConnectOnNode", "fMinimapClass", "fNodeDraggingDisabled", "fNodeSelectionDisabled", "fIncludePadding", "fAutoExpandOnChildHit", "fAutoSizeToFitChildren"], outputs: ["fNodePositionChange", "fNodeSizeChange", "fNodeRotateChange"], exportAs: ["fComponent"] }, { kind: "directive", type: i2$1.FDragHandleDirective, selector: "[fDragHandle]" }, { kind: "directive", type: i2$1.FDraggableDirective, selector: "f-flow[fDraggable]", inputs: ["fDraggableDisabled", "fMultiSelectTrigger", "fReassignConnectionTrigger", "fCreateConnectionTrigger", "fNodeResizeTrigger", "fNodeRotateTrigger", "fNodeMoveTrigger", "fCanvasMoveTrigger", "fExternalItemTrigger", "fEmitOnNodeIntersect", "vCellSize", "hCellSize", "fCellSizeWhileDragging"], outputs: ["fSelectionChange", "fNodeIntersectedWithConnections", "fCreateNode", "fMoveNodes", "fReassignConnection", "fCreateConnection", "fDropToGroup", "fDragStarted", "fDragEnded"], exportAs: ["fDraggable"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i3$1.Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: i3$1.TabPanels, selector: "p-tabpanels" }, { kind: "component", type: i3$1.TabPanel, selector: "p-tabpanel", inputs: ["lazy", "value"], outputs: ["valueChange"] }, { kind: "component", type: i3$1.TabList, selector: "p-tablist" }, { kind: "component", type: i3$1.Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Toolbar, selector: "mt-toolbar", inputs: ["size"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i3.TranslocoPipe, name: "transloco" }] });
599
621
  }
600
622
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: StructureBuilder, decorators: [{
601
623
  type: Component,
@@ -613,7 +635,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
613
635
  ], providers: [DialogService], host: {
614
636
  class: 'flex h-full bg-surface-200 dark:bg-surface-700 relative rounded-2xl overflow-hidden',
615
637
  }, template: "<!-- structure-builder.html -->\r\n@if (!readonly() && availableTabs().length > 0) {\r\n <mt-card\r\n class=\"absolute ms-4 mt-4 z-1 h-[calc(100%---spacing(8))] w-1/5 min-w-xs\"\r\n >\r\n <ng-template #headless>\r\n <!-- Header -->\r\n <div class=\"flex items-center justify-between px-4 pt-5\">\r\n <h3 class=\"text-xl font-semibold\">\r\n {{ \"structureBuilder.levelTemplates\" | transloco }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Tabs using PrimeNG -->\r\n <p-tabs\r\n [(value)]=\"activeTab\"\r\n styleClass=\"structure-tabs \"\r\n class=\"h-full overflow-hidden\"\r\n >\r\n <p-tablist>\r\n @for (tab of availableTabs(); track tab; let i = $index) {\r\n <p-tab [value]=\"i.toString()\">{{ tab | titlecase }}</p-tab>\r\n }\r\n </p-tablist>\r\n <p-tabpanels class=\"bg-transparent! p-0! overflow-auto\">\r\n @for (tab of availableTabs(); track tab; let i = $index) {\r\n <p-tabpanel [value]=\"i.toString()\">\r\n <p class=\"text-xs text-muted py-3 px-4\">\r\n {{ \"structureBuilder.dragToAdd\" | transloco }}\r\n </p>\r\n\r\n <!-- Node List -->\r\n <div class=\"space-y-1 px-4\">\r\n @for (node of currentTabNodes(); track node.id) {\r\n <div\r\n fExternalItem\r\n [fData]=\"node\"\r\n class=\"group select-none relative flex items-center gap-3 py-3 px-4 hover:bg-emphasis hover:border-solid transition-colors rounded-lg border-1 border-dashed border-color border-surface-300 dark:border-surface-500 cursor-move transition-colors\"\r\n >\r\n <!-- Node Icon with color -->\r\n <div class=\"text-primary text-lg\">\r\n <mt-icon [icon]=\"node.icon || 'general.box'\"></mt-icon>\r\n </div>\r\n\r\n <!-- Node Name -->\r\n <span class=\"text-base font-medium flex-1\">{{\r\n node.label\r\n }}</span>\r\n <mt-icon class=\"text-lg\" icon=\"general.menu-05\"></mt-icon>\r\n </div>\r\n }\r\n\r\n @if (currentTabNodes().length === 0) {\r\n <div class=\"text-center py-8 text-gray-400\">\r\n <p class=\"text-sm\">\r\n {{\r\n \"structureBuilder.allItemsInUse\"\r\n | transloco: { tab: tab }\r\n }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </p-tabpanel>\r\n }\r\n </p-tabpanels>\r\n </p-tabs>\r\n </ng-template>\r\n </mt-card>\r\n} @else if (!readonly() && availableNodes().length > 0) {\r\n <div [ngClass]=\"availableTabsClass() || 'absolute top-4 start-4 z-1 w-64'\">\r\n <mt-card [title]=\"'structureBuilder.steps' | transloco\">\r\n <div class=\"flex flex-col gap-2\">\r\n @for (node of availableNodes(); track node.id) {\r\n <div\r\n fExternalItem\r\n [fData]=\"node\"\r\n class=\"group select-none relative flex items-center gap-3 py-3 px-4 hover:bg-emphasis hover:border-solid transition-colors rounded-lg border-1 border-dashed border-color border-surface-300 dark:border-surface-500 cursor-move bg-content\"\r\n >\r\n <!-- Node Icon with color -->\r\n <div class=\"text-primary text-lg\">\r\n <mt-icon [icon]=\"node.icon || 'general.box'\"></mt-icon>\r\n </div>\r\n\r\n <!-- Node Name -->\r\n <span class=\"text-base font-medium flex-1\">{{ node.label }}</span>\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n </div>\r\n}\r\n<!-- Left Sidebar -->\r\n\r\n<!-- Main Canvas Area -->\r\n<div class=\"flex-1 z-0 relative\">\r\n <ng-content select=\"[flowContent]\"></ng-content>\r\n\r\n <f-flow\r\n fDraggable\r\n dir=\"ltr\"\r\n (fLoaded)=\"onLoaded()\"\r\n (fCreateNode)=\"onCreateNode($event)\"\r\n (fCreateConnection)=\"onCreateConnection($event)\"\r\n class=\"size-full\"\r\n >\r\n <f-background>\r\n <f-circle-pattern color=\"#b5b5b5\"></f-circle-pattern>\r\n </f-background>\r\n <f-canvas fZoom [fZoomMinimum]=\"0.1\" [fZoomMaximum]=\"2\">\r\n <f-connection-for-create fBehavior=\"floating\" fType=\"straight\">\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n </f-connection-for-create>\r\n <f-snap-connection\r\n fBehavior=\"fixed\"\r\n fType=\"segment\"\r\n class=\"z-1\"\r\n [fSnapThreshold]=\"100\"\r\n >\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n </f-snap-connection>\r\n\r\n <f-connection-for-create></f-connection-for-create>\r\n\r\n <!-- Enhanced Connections with Edit Button -->\r\n @for (connection of connectionsComputed(); track connection.id) {\r\n <f-connection\r\n [fReassignDisabled]=\"true\"\r\n [fOutputId]=\"connection.from\"\r\n [fInputId]=\"connection.to\"\r\n fBehavior=\"fixed\"\r\n fType=\"segment\"\r\n [ngClass]=\"{ 'connection-loading': connection.loading, 'z-1': true }\"\r\n >\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.SELECTED_START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.SELECTED_END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n @if (!readonly()) {\r\n <div\r\n fConnectionCenter\r\n class=\"flex items-center gap-1 bg-content rounded-md p-1 shadow-sm\"\r\n >\r\n @if (!connection.loading) {\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n [icon]=\"'general.edit-05'\"\r\n (click)=\"openConnectionDialog(connection)\"\r\n >\r\n </mt-button>\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n severity=\"danger\"\r\n [icon]=\"'general.trash-01'\"\r\n (click)=\"removeConnection(connection)\"\r\n >\r\n </mt-button>\r\n } @else {\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n [icon]=\"'general.loading-01'\"\r\n >\r\n </mt-button>\r\n }\r\n </div>\r\n }\r\n </f-connection>\r\n }\r\n\r\n <!-- Enhanced Nodes with Edit Button -->\r\n @for (node of nodesWithComputedProps(); track node._computedId) {\r\n <mt-card\r\n fNode\r\n fDragHandle\r\n [fNodePosition]=\"{\r\n x: node.configuration?.x || 200,\r\n y: node.configuration?.y || 100,\r\n }\"\r\n (fNodePositionChange)=\"onNodePositionChange($event, node._computedId)\"\r\n [style.--node-data-border-color]=\"node._computedColor\"\r\n >\r\n <ng-template #headless>\r\n @if (!node.loading) {\r\n <div [attr.dir]=\"contentDirection()\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"\r\n effectiveNodeTemplate() || defaultNodeTemplate\r\n \"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: node,\r\n node: node,\r\n actions: getFilteredNodeActions(node),\r\n onAction: nodeActionHandler,\r\n dir: contentDirection(),\r\n }\"\r\n >\r\n </ng-container>\r\n </div>\r\n <div\r\n fNodeInput\r\n [fInputId]=\"node._computedId\"\r\n [fInputConnectableSide]=\"configuration().inputSide\"\r\n [fInputMultiple]=\"true\"\r\n [ngClass]=\"configuration().inputSide\"\r\n ></div>\r\n\r\n <div\r\n fNodeOutput\r\n [fOutputId]=\"node._computedId\"\r\n [fOutputConnectableSide]=\"configuration().outputSide\"\r\n [isSelfConnectable]=\"false\"\r\n [fOutputMultiple]=\"true\"\r\n [ngClass]=\"configuration().outputSide\"\r\n class=\"bg-surface-50 dark:bg-surface-900\"\r\n ></div>\r\n } @else {\r\n <p-skeleton height=\"10rem\" width=\"15rem\" />\r\n }\r\n\r\n <!-- Node Header with Edit Button -->\r\n </ng-template>\r\n </mt-card>\r\n }\r\n\r\n <ng-template\r\n #defaultNodeTemplate\r\n let-node\r\n let-actions=\"actions\"\r\n let-onAction=\"onAction\"\r\n >\r\n <div\r\n class=\"flex flex-col items-center min-w-3xs gap-2 px-3 py-4 rounded-t-2xl bg-white dark:bg-surface-800 border-(--p-content-border-color)\"\r\n >\r\n @if (node._computedIcon) {\r\n <mt-icon\r\n class=\"text-2xl text-primary\"\r\n [icon]=\"node._computedIcon\"\r\n />\r\n }\r\n <div>{{ node._computedName }}</div>\r\n </div>\r\n <div\r\n class=\"flex justify-center pt-3 mb-4 gap-2 bg-surface-50 dark:bg-surface-900\"\r\n >\r\n @for (action of actions; track action.key) {\r\n <mt-button\r\n [size]=\"action?.size || 'small'\"\r\n [variant]=\"action?.variant\"\r\n [icon]=\"action?.icon\"\r\n [tooltip]=\"action?.tooltip\"\r\n [severity]=\"action?.severity\"\r\n (onClick)=\"onAction(action, node)\"\r\n >\r\n </mt-button>\r\n }\r\n </div>\r\n </ng-template>\r\n </f-canvas>\r\n </f-flow>\r\n</div>\r\n@if (!readonly()) {\r\n <mt-toolbar />\r\n}\r\n", styles: ["::ng-deep :root{--background-element-color: rgba(0, 0, 0, .1);--selection-area-color: rgba(100, 108, 255, .14);--disabled-color: #e2e2e2;--node-background-color: #ffffff;--node-background-color-inverse: #000000;--node-border-radius: 2px;--node-border-color: rgba(60, 60, 67, .36);--node-selected-border-color: #3451b2;--node-color: rgba(60, 60, 67, .78);--node-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--connection-color: var(--p-text-color);--snap-connection-color: var(--p-text-muted-color);--connection-gradient-1: #b8272c;--connection-gradient-2: #30a46c;--outlet-color: #3451b2;--input-output-color: rgba(60, 60, 67, .78);--minimap-background-color: #ffffff;--minimap-node-color: rgba(60, 60, 67);--minimap-node-selected-color: var(--p-primary-color);--minimap-view-color: rgba(100, 108, 255, .14)}::ng-deep :root.dark{--background-element-color: rgba(255, 255, 255, .1);--selection-area-color: rgba(100, 108, 255, .16);--disabled-color: #2c2c2e;--node-background-color: #000000;--node-background-color-inverse: #ffffff;--node-border-radius: 2px;--node-border-color: rgba(235, 235, 245, .38);--node-selected-border-color: #a8b1ff;--node-color: rgba(235, 235, 245, .6);--node-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--connection-color: rgba(235, 235, 245, 1);--snap-connection-color: rgba(235, 235, 245, .2);--connection-gradient-1: #f66f81;--connection-gradient-2: #298459;--outlet-color: #a8b1ff;--input-output-color: rgba(235, 235, 245, .6);--minimap-background-color: #1b1b1f;--minimap-node-color: rgba(255, 255, 245, .86);--minimap-node-selected-color: #a8b1ff;--minimap-view-color: rgba(100, 108, 255, .16)}::ng-deep :root{--form-field-text-color: var(--node-color);--form-field-background: var(--minimap-view-color);--form-field-panel-shadow: var(--shadow-4);--form-field-panel-background: var(--node-background-color);--form-field-active-color: var(--minimap-node-selected-color)}::ng-deep f-flow .f-connection{cursor:pointer}::ng-deep f-flow .f-connection .f-connection-drag-handle{fill:transparent}::ng-deep f-flow .f-connection .f-connection-selection{fill:none}::ng-deep f-flow .f-connection .f-connection-path{fill:none;stroke:var(--connection-color);stroke-width:2}::ng-deep f-flow .f-connection .f-connection-marker{fill:var(--connection-color)}::ng-deep f-flow .f-connection .f-marker path,::ng-deep f-flow .f-connection .f-marker circle{fill:var(--connection-color)}::ng-deep f-flow .f-connection .f-connection-text,::ng-deep f-flow .f-connection .f-connection-center{fill:var(--connection-color);color:var(--connection-color)}::ng-deep f-flow .f-connection.f-snap-connection .f-connection-path{stroke:var(--snap-connection-color)}::ng-deep f-flow .f-connection .f-connection-center{display:none}::ng-deep f-flow .f-connection.connection-loading .f-connection-center{display:block}::ng-deep f-flow .f-connection.f-selected .f-connection-center{display:block}::ng-deep f-flow .f-connection.f-selected .f-connection-path{stroke:var(--minimap-node-selected-color)}::ng-deep f-flow .f-connection.f-selected .f-marker path,::ng-deep f-flow .f-connection.f-selected .f-marker circle{fill:var(--p-primary-color);stroke:var(--minimap-node-selected-color)}::ng-deep f-flow .f-connection .f-connection-selection{fill:none;stroke:transparent;stroke-width:20;cursor:pointer}::ng-deep f-flow .f-connection:hover .f-connection-selection{stroke:var(--p-primary-color);opacity:.1}::ng-deep f-flow .f-connection.f-snap-connection .f-connection-path{stroke:var(--snap-connection-color);stroke-width:2px}::ng-deep f-flow .f-connection.f-snap-connection .f-marker path,::ng-deep f-flow .f-connection.f-snap-connection .f-marker circle{fill:var(--snap-connection-color)}::ng-deep f-flow .f-connection.f-snap-connection .f-connection-selection{fill:transparent!important;stroke:transparent!important}::ng-deep f-flow .f-connection.f-connection-for-create .f-connection-selection{fill:transparent!important;stroke:transparent!important}::ng-deep f-flow .f-connection-for-create{pointer-events:none}::ng-deep f-flow .f-connection-for-create .f-connection .f-connection-path{stroke:var(--snap-connection-color);stroke-width:3px;stroke-dasharray:8,4;animation:connection-dash 1s linear infinite}::ng-deep f-flow .f-connection-for-create .f-connection .f-marker path,::ng-deep f-flow .f-connection-for-create .f-connection .f-marker circle{fill:var(--snap-connection-color)}@keyframes connection-dash{to{stroke-dashoffset:-12}}::ng-deep f-flow{direction:ltr}.f-node-input:not(.f-node),.f-node-output:not(.f-node){position:absolute;border-radius:0 0 1rem 1rem}.f-node-input:not(.f-node):hover,.f-node-output:not(.f-node):hover{border:.5px dashed var(--p-primary-color)}.f-node-input:not(.f-node).top,.f-node-input:not(.f-node).bottom,.f-node-output:not(.f-node).top,.f-node-output:not(.f-node).bottom{width:100%;height:16px;left:0}.f-node-input:not(.f-node).top,.f-node-output:not(.f-node).top{top:0}.f-node-input:not(.f-node).bottom,.f-node-output:not(.f-node).bottom{bottom:0}.f-node-input:not(.f-node).left,.f-node-input:not(.f-node).right,.f-node-output:not(.f-node).left,.f-node-output:not(.f-node).right{width:16px;height:100%;top:0}.f-node-input:not(.f-node).left,.f-node-output:not(.f-node).left{left:0;border-radius:1rem 0 0 1rem}.f-node-input:not(.f-node).right,.f-node-output:not(.f-node).right{right:0;border-radius:0 1rem 1rem 0}.f-node-input:not(.f-node).f-node-output-not-connectable,.f-node-input:not(.f-node).f-node-input-not-connectable,.f-node-output:not(.f-node).f-node-output-not-connectable,.f-node-output:not(.f-node).f-node-input-not-connectable{background-color:var(--disabled-color)}.f-node-input:not(.f-node){border-radius:4px}.f-node-input,.f-node-output{z-index:10;pointer-events:all}.examples-toolbar{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:8px;position:absolute;right:16px;top:16px}.examples-toolbar button{font-weight:500;border:none;border-radius:2px;padding:4px 8px;line-height:normal}.f-node:before{content:\"\";position:absolute;width:100%;height:4rem;border-radius:var(--radius-2xl);z-index:-1;top:-.25rem;background-color:var(--node-data-border-color)}.connection-center{display:flex;gap:8px;background:var(--node-background-color);border:1px solid var(--node-border-color);border-radius:4px;padding:4px;box-shadow:var(--node-shadow)}.connection-center .connection-edit-btn,.connection-center .connection-delete-btn{background:none;border:none;width:24px;height:24px;border-radius:4px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.connection-center .connection-edit-btn:hover,.connection-center .connection-delete-btn:hover{background-color:var(--minimap-view-color)}.connection-center .connection-edit-btn{color:var(--minimap-node-selected-color)}.connection-center .connection-delete-btn{color:#ef4444}.node-edit-btn,.node-delete-btn{background:none;border:none;width:32px;height:32px;border-radius:6px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.node-edit-btn:hover,.node-delete-btn:hover{background-color:var(--minimap-view-color)}.node-edit-btn{color:var(--minimap-node-selected-color)}.node-delete-btn{color:#ef4444}.node-properties{max-height:200px;overflow-y:auto}.node-properties .property-item{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid var(--node-border-color);font-size:12px}.node-properties .property-item .property-key{font-weight:600;color:var(--node-color);margin-right:8px}.node-properties .property-item .property-value{color:var(--minimap-node-selected-color);word-break:break-word}\n"] }]
616
- }], ctorParameters: () => [], propDecorators: { nodeActionsEvent: [{ type: i0.Output, args: ["nodeActionsEvent"] }], action: [{ type: i0.Output, args: ["action"] }], availableNodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "availableNodes", required: false }] }], fCanvas: [{ type: i0.ViewChild, args: [i0.forwardRef(() => FCanvasComponent), { isSignal: true }] }], fFlowComponent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => FFlowComponent), { isSignal: true }] }], fCanvasComponent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => FCanvasComponent), { isSignal: true }] }], fZoomDirective: [{ type: i0.ViewChild, args: [i0.forwardRef(() => FZoomDirective), { isSignal: true }] }], nodeForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeForm", required: false }] }], connectionForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "connectionForm", required: false }] }], connectionFormulaSchemaId: [{ type: i0.Input, args: [{ isSignal: true, alias: "connectionFormulaSchemaId", required: false }] }], nodeActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeActions", required: false }] }], nodeFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeFields", required: false }] }], isAutoLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "isAutoLayout", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], addModalType: [{ type: i0.Input, args: [{ isSignal: true, alias: "addModalType", required: false }] }], updateModalType: [{ type: i0.Input, args: [{ isSignal: true, alias: "updateModalType", required: false }] }], addModalStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "addModalStyleClass", required: false }] }], updateModalStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "updateModalStyleClass", required: false }] }], addModalHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "addModalHeader", required: false }] }], updateModalHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "updateModalHeader", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], availableTabsClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "availableTabsClass", required: false }] }], layoutDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutDirection", required: false }] }], nodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodes", required: false }] }, { type: i0.Output, args: ["nodesChange"] }], connections: [{ type: i0.Input, args: [{ isSignal: true, alias: "connections", required: false }] }, { type: i0.Output, args: ["connectionsChange"] }], nodeDialogTemplate: [{ type: i0.ContentChild, args: ['nodeDialog', { isSignal: true }] }], nodeTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeTemplate", required: false }] }], nodeTemplateContent: [{ type: i0.ContentChild, args: ['nodeTemplate', { isSignal: true }] }] } });
638
+ }], ctorParameters: () => [], propDecorators: { nodeActionsEvent: [{ type: i0.Output, args: ["nodeActionsEvent"] }], action: [{ type: i0.Output, args: ["action"] }], availableNodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "availableNodes", required: false }] }], fCanvas: [{ type: i0.ViewChild, args: [i0.forwardRef(() => FCanvasComponent), { isSignal: true }] }], fFlowComponent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => FFlowComponent), { isSignal: true }] }], fCanvasComponent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => FCanvasComponent), { isSignal: true }] }], fZoomDirective: [{ type: i0.ViewChild, args: [i0.forwardRef(() => FZoomDirective), { isSignal: true }] }], nodeForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeForm", required: false }] }], nodeDialogFooterConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeDialogFooterConfig", required: false }] }], connectionForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "connectionForm", required: false }] }], connectionFormulaSchemaId: [{ type: i0.Input, args: [{ isSignal: true, alias: "connectionFormulaSchemaId", required: false }] }], connectionFormulaConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "connectionFormulaConfig", required: false }] }], nodeActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeActions", required: false }] }], nodeFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeFields", required: false }] }], isAutoLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "isAutoLayout", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], addModalType: [{ type: i0.Input, args: [{ isSignal: true, alias: "addModalType", required: false }] }], updateModalType: [{ type: i0.Input, args: [{ isSignal: true, alias: "updateModalType", required: false }] }], addModalStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "addModalStyleClass", required: false }] }], updateModalStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "updateModalStyleClass", required: false }] }], addModalHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "addModalHeader", required: false }] }], updateModalHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "updateModalHeader", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], availableTabsClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "availableTabsClass", required: false }] }], layoutDirection: [{ type: i0.Input, args: [{ isSignal: true, alias: "layoutDirection", required: false }] }], nodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodes", required: false }] }, { type: i0.Output, args: ["nodesChange"] }], connections: [{ type: i0.Input, args: [{ isSignal: true, alias: "connections", required: false }] }, { type: i0.Output, args: ["connectionsChange"] }], nodeDialogTemplate: [{ type: i0.ContentChild, args: ['nodeDialog', { isSignal: true }] }], nodeTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "nodeTemplate", required: false }] }], nodeTemplateContent: [{ type: i0.ContentChild, args: ['nodeTemplate', { isSignal: true }] }] } });
617
639
 
618
640
  /*
619
641
  * Public API Surface of structure-builder
@@ -1 +1 @@
1
- {"version":3,"file":"masterteam-structure-builder.mjs","sources":["../../../../packages/masterteam/structure-builder/src/lib/node-form-dialog/node-form-dialog.ts","../../../../packages/masterteam/structure-builder/src/lib/node-form-dialog/node-form-dialog.html","../../../../packages/masterteam/structure-builder/src/lib/connection-form-dialog/connection-form-dialog.ts","../../../../packages/masterteam/structure-builder/src/lib/connection-form-dialog/connection-form-dialog.html","../../../../packages/masterteam/structure-builder/src/lib/toolbar/toolbar.ts","../../../../packages/masterteam/structure-builder/src/lib/toolbar/toolbar.html","../../../../packages/masterteam/structure-builder/src/lib/structure-builder.ts","../../../../packages/masterteam/structure-builder/src/lib/structure-builder.html","../../../../packages/masterteam/structure-builder/src/public-api.ts","../../../../packages/masterteam/structure-builder/src/masterteam-structure-builder.ts"],"sourcesContent":["import { Component, inject, AfterViewInit, OnInit, input } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ModalRef } from '@masterteam/components/dialog';\r\nimport { ModalService } from '@masterteam/components/modal';\r\nimport { DrawerController } from '@masterteam/components/dynamic-drawer';\r\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { TranslocoModule } from '@jsverse/transloco';\r\n\r\nexport interface NodeFormData {\r\n id: string;\r\n label: string;\r\n description?: string;\r\n [key: string]: any;\r\n}\r\n\r\n@Component({\r\n selector: 'mt-node-form-dialog',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n DynamicForm,\r\n Button,\r\n ReactiveFormsModule,\r\n TranslocoModule,\r\n ],\r\n templateUrl: './node-form-dialog.html',\r\n styleUrls: ['./node-form-dialog.scss'],\r\n})\r\nexport class NodeFormDialogComponent implements AfterViewInit, OnInit {\r\n readonly modalService: ModalService = inject(ModalService);\r\n ref: ModalRef = inject(ModalRef);\r\n // DrawerController is optional - only available when opened as drawer\r\n readonly drawerController = inject(DrawerController, { optional: true });\r\n dynamicFormControl = new FormControl();\r\n nodeData: NodeFormData;\r\n formSchema: any;\r\n data = input<any>(null);\r\n\r\n ngOnInit() {\r\n this.nodeData = this.data()?.node || {};\r\n this.formSchema = this.data()?.formSchema || [];\r\n }\r\n ngAfterViewInit(): void {\r\n this.dynamicFormControl.setValue(this.nodeData);\r\n }\r\n get templateContext() {\r\n return {\r\n node: this.nodeData,\r\n save: (item: any = {}) => this.onSave(item),\r\n cancel: () => this.onCancel(),\r\n close: () => this.onCancel(),\r\n drawerController: this.drawerController,\r\n };\r\n }\r\n onSave(item: any = {}) {\r\n const updatedNode = {\r\n ...this.nodeData,\r\n ...this.dynamicFormControl.value,\r\n ...item,\r\n };\r\n this.ref.close(updatedNode);\r\n }\r\n\r\n onCancel() {\r\n this.ref.close();\r\n }\r\n}\r\n","<div [class]=\"[modalService.contentClass, 'p-4']\">\r\n @if (this.data()?.template) {\r\n <ng-container\r\n *ngTemplateOutlet=\"data().template; context: templateContext\"\r\n ></ng-container>\r\n } @else {\r\n @if (nodeData) {\r\n <mt-dynamic-form\r\n [formConfig]=\"formSchema\"\r\n [formControl]=\"dynamicFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n }\r\n</div>\r\n<div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"'structureBuilder.cancel' | transloco\"\r\n severity=\"secondary\"\r\n (onClick)=\"onCancel()\"\r\n >\r\n </mt-button>\r\n <mt-button\r\n [disabled]=\"!dynamicFormControl.valid\"\r\n [label]=\"'structureBuilder.saveChanges' | transloco\"\r\n severity=\"primary\"\r\n (onClick)=\"onSave()\"\r\n >\r\n </mt-button>\r\n</div>\r\n","import { ModalService } from '@masterteam/components/modal';\r\nimport { Component, inject, AfterViewInit, input, OnInit } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { ModalRef } from '@masterteam/components/dialog';\r\nimport { TranslocoModule } from '@jsverse/transloco';\r\nimport { Card } from '@masterteam/components/card';\r\nimport {\r\n FormulaBuilder,\r\n type FormulaBuilderValue,\r\n} from '@masterteam/formula-builder';\r\n\r\n@Component({\r\n selector: 'mt-connection-form-dialog',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n Card,\r\n DynamicForm,\r\n FormulaBuilder,\r\n Button,\r\n ReactiveFormsModule,\r\n TranslocoModule,\r\n ],\r\n templateUrl: './connection-form-dialog.html',\r\n styleUrls: ['./connection-form-dialog.scss'],\r\n})\r\nexport class ConnectionFormDialogComponent implements AfterViewInit, OnInit {\r\n readonly modalService: ModalService = inject(ModalService);\r\n private ref: ModalRef = inject(ModalRef);\r\n data = input<any>(null);\r\n dynamicFormControl = new FormControl();\r\n formulaControl = new FormControl<FormulaBuilderValue | null>(null);\r\n connectionData: any;\r\n formSchema: any;\r\n formulaSchemaId?: number;\r\n\r\n ngOnInit() {\r\n this.connectionData = this.data()?.connection || {};\r\n this.formSchema = this.data()?.formSchema || [];\r\n this.formulaSchemaId = this.data()?.formulaSchemaId;\r\n }\r\n ngAfterViewInit(): void {\r\n this.dynamicFormControl.setValue(this.connectionData);\r\n this.formulaControl.setValue(\r\n (this.connectionData?.formula as FormulaBuilderValue | null) ?? null,\r\n {\r\n emitEvent: false,\r\n },\r\n );\r\n }\r\n\r\n onSave(): void {\r\n if (this.dynamicFormControl.valid) {\r\n this.ref.close({\r\n ...this.connectionData,\r\n ...this.dynamicFormControl.value,\r\n formula: this.formulaControl.value,\r\n });\r\n }\r\n }\r\n\r\n onCancel(): void {\r\n this.ref.close();\r\n }\r\n}\r\n","<div\r\n [class]=\"\r\n modalService.contentClass +\r\n ' max-h-[80vh] overflow-x-hidden overflow-y-auto p-4'\r\n \"\r\n>\r\n <div class=\"space-y-6\">\r\n @if (formSchema?.sections?.length > 0) {\r\n <mt-dynamic-form\r\n class=\"block\"\r\n [formConfig]=\"formSchema\"\r\n [formControl]=\"dynamicFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n\r\n @if (formulaSchemaId) {\r\n <mt-card [title]=\"'structureBuilder.formula' | transloco\">\r\n <mt-formula-builder\r\n [formControl]=\"formulaControl\"\r\n [levelSchemaId]=\"formulaSchemaId\"\r\n />\r\n </mt-card>\r\n }\r\n </div>\r\n</div>\r\n\r\n<div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"'structureBuilder.cancel' | transloco\"\r\n severity=\"secondary\"\r\n (onClick)=\"onCancel()\"\r\n >\r\n </mt-button>\r\n <mt-button\r\n [disabled]=\"!dynamicFormControl.valid\"\r\n [label]=\"'structureBuilder.saveChanges' | transloco\"\r\n severity=\"primary\"\r\n (onClick)=\"onSave()\"\r\n >\r\n </mt-button>\r\n</div>\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n inject,\r\n input,\r\n} from '@angular/core';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { ButtonGroup } from '@masterteam/components/button-group';\r\nimport { PointExtensions } from '@foblex/2d';\r\nimport { StructureBuilder } from '../structure-builder';\r\n\r\n@Component({\r\n selector: 'mt-toolbar',\r\n imports: [Button, ButtonGroup],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n templateUrl: './toolbar.html',\r\n styleUrl: './toolbar.css',\r\n})\r\nexport class Toolbar {\r\n readonly size = input<'small' | 'large' | undefined>();\r\n\r\n private builderComponent = inject(StructureBuilder);\r\n\r\n public onZoomIn(): void {\r\n this.builderComponent.fZoomDirective()?.zoomIn();\r\n }\r\n\r\n public onZoomOut(): void {\r\n this.builderComponent.fZoomDirective()?.zoomOut();\r\n }\r\n\r\n public onFitToScreen(): void {\r\n this.builderComponent\r\n .fCanvasComponent()\r\n ?.fitToScreen(PointExtensions.initialize(250, 250), true);\r\n }\r\n\r\n public onOneToOne(): void {\r\n this.builderComponent.fCanvasComponent()?.resetScaleAndCenter();\r\n }\r\n public autoLayout(): void {\r\n this.builderComponent.maybeAutoLayout();\r\n }\r\n}\r\n","<mt-button\r\n (onClick)=\"autoLayout()\"\r\n class=\"bg-content rounded-(--p-button-border-radius)\"\r\n size=\"size()\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n icon=\"arrow.refresh-cw-05\"\r\n></mt-button>\r\n\r\n<mt-buttongroup class=\"bg-content rounded-(--p-button-border-radius)\">\r\n <mt-button\r\n (onClick)=\"onZoomOut()\"\r\n size=\"size()\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n icon=\"general.minus\"\r\n ></mt-button>\r\n <mt-button\r\n (onClick)=\"onZoomIn()\"\r\n size=\"size()\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n icon=\"general.plus\"\r\n ></mt-button>\r\n <mt-button\r\n (onClick)=\"onFitToScreen()\"\r\n size=\"size()\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n icon=\"layout.grid-02\"\r\n ></mt-button>\r\n</mt-buttongroup>\r\n","import {\r\n Component,\r\n input,\r\n model,\r\n signal,\r\n computed,\r\n inject,\r\n contentChild,\r\n TemplateRef,\r\n viewChild,\r\n output,\r\n effect,\r\n} from '@angular/core';\r\nimport { TranslocoService, TranslocoModule } from '@jsverse/transloco';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { DialogService } from '@masterteam/components/dialog';\r\nimport { DrawerService } from '@masterteam/components/dynamic-drawer';\r\nimport { ModalService } from '@masterteam/components/modal';\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { TabsModule } from 'primeng/tabs';\r\nimport {\r\n EFMarkerType,\r\n FCanvasComponent,\r\n FCreateConnectionEvent,\r\n FCreateNodeEvent,\r\n FFlowComponent,\r\n FFlowModule,\r\n FZoomDirective,\r\n} from '@foblex/flow';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { Card } from '@masterteam/components/card';\r\nimport { Icon } from '@masterteam/icons';\r\nimport { NodeFormDialogComponent } from './node-form-dialog/node-form-dialog';\r\nimport { ConnectionFormDialogComponent } from './connection-form-dialog/connection-form-dialog';\r\nimport { DynamicFormConfig } from '@masterteam/components';\r\nimport { Toolbar } from './toolbar/toolbar';\r\n\r\n// 🔁 dagre & helpers – same approach as lib sample\r\nimport * as dagre from 'dagre';\r\nimport { graphlib } from 'dagre';\r\nimport Graph = graphlib.Graph;\r\nimport { IPoint, PointExtensions } from '@foblex/2d';\r\nimport { Skeleton } from 'primeng/skeleton'; // TO DO\r\n\r\nexport interface Node {\r\n configuration?: {\r\n x?: number;\r\n y?: number;\r\n };\r\n [key: string]: any;\r\n loading?: boolean;\r\n}\r\n\r\nexport interface NodeFieldsMapping {\r\n id?: string;\r\n name?: string;\r\n icon?: string;\r\n color?: string;\r\n}\r\n\r\nexport interface AvailableNode {\r\n id: string;\r\n label: string;\r\n icon: string;\r\n color: string;\r\n tab: string[];\r\n [key: string]: any;\r\n}\r\n\r\nexport interface Connection {\r\n id: string;\r\n from: string;\r\n to: string;\r\n [key: string]: any;\r\n}\r\n\r\nexport interface Actions {\r\n key: string;\r\n icon: string;\r\n variant: string;\r\n size: string;\r\n severity?: string;\r\n tooltip?: string;\r\n /**\r\n * Optional condition function to determine if action should be shown\r\n * @param node - The node object to evaluate\r\n * @returns true to show the action, false to hide it\r\n * @example\r\n * // Show delete only if node is not initial\r\n * condition: (node) => !node.isInitial\r\n *\r\n * // Show edit only if node has specific status\r\n * condition: (node) => node.status === 'draft'\r\n */\r\n condition?: (node: any) => boolean;\r\n}\r\n\r\nexport interface NodeActionEvent {\r\n action: Actions;\r\n node: AvailableNode;\r\n}\r\n\r\nexport type LayoutDirection = 'TB' | 'LR';\r\n\r\nexport type SBActionType =\r\n | 'createNode'\r\n | 'updateNode'\r\n | 'deleteNode'\r\n | 'createConnection'\r\n | 'updateConnection'\r\n | 'deleteConnection'\r\n | 'startCreating'\r\n | 'startUpdating';\r\n\r\nexport interface SBAction {\r\n action: SBActionType;\r\n data?: any;\r\n}\r\n\r\n// ✨ Direction & config — mirrors lib sample\r\nenum Direction {\r\n LEFT_TO_RIGHT = 'LR',\r\n RIGHT_TO_LEFT = 'RL',\r\n TOP_TO_BOTTOM = 'TB',\r\n}\r\n\r\nconst CONFIGURATION = {\r\n [Direction.LEFT_TO_RIGHT]: {\r\n outputSide: 'right',\r\n inputSide: 'left',\r\n },\r\n [Direction.RIGHT_TO_LEFT]: {\r\n outputSide: 'left',\r\n inputSide: 'right',\r\n },\r\n [Direction.TOP_TO_BOTTOM]: {\r\n outputSide: 'bottom',\r\n inputSide: 'top',\r\n },\r\n} as const;\r\n\r\n@Component({\r\n selector: 'mt-structure-builder',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n FFlowModule,\r\n TabsModule,\r\n Button,\r\n Icon,\r\n Card,\r\n Toolbar,\r\n Skeleton,\r\n TranslocoModule,\r\n ],\r\n templateUrl: './structure-builder.html',\r\n styleUrl: './structure-builder.scss',\r\n providers: [DialogService],\r\n host: {\r\n class:\r\n 'flex h-full bg-surface-200 dark:bg-surface-700 relative rounded-2xl overflow-hidden',\r\n },\r\n})\r\nexport class StructureBuilder {\r\n readonly dialogService = inject(DialogService);\r\n readonly drawerService = inject(DrawerService);\r\n readonly modal: ModalService = inject(ModalService);\r\n private transloco = inject(TranslocoService);\r\n private dir = inject(Directionality, { optional: true });\r\n nodeActionsEvent = output<NodeActionEvent>();\r\n action = output<SBAction>();\r\n availableNodes = input<AvailableNode[]>([]);\r\n protected fCanvas = viewChild(FCanvasComponent);\r\n public fFlowComponent = viewChild(FFlowComponent);\r\n public fCanvasComponent = viewChild(FCanvasComponent);\r\n public fZoomDirective = viewChild(FZoomDirective);\r\n nodeForm = input<DynamicFormConfig>({ sections: [] });\r\n connectionForm = input<DynamicFormConfig>({ sections: [] });\r\n connectionFormulaSchemaId = input<number | undefined>(undefined);\r\n nodeActions = input<Actions[]>([]);\r\n nodeFields = input<NodeFieldsMapping>({\r\n id: 'id',\r\n name: 'name',\r\n icon: 'icon',\r\n color: 'color',\r\n });\r\n\r\n isAutoLayout = input<boolean>(true);\r\n readonly = input<boolean>(false);\r\n addModalType = input<'drawer' | 'dialog'>('dialog');\r\n updateModalType = input<'drawer' | 'dialog'>('drawer');\r\n addModalStyleClass = input<string>('!w-[35rem]');\r\n updateModalStyleClass = input<string>('!w-[35rem]');\r\n addModalHeader = input<string>('Add Node');\r\n updateModalHeader = input<string>('Edit Node Properties');\r\n appendTo = input<string>('');\r\n availableTabsClass = input<string>('');\r\n layoutDirection = input<LayoutDirection>(Direction.TOP_TO_BOTTOM);\r\n nodes = model<Node[]>([]);\r\n connections = model<Connection[]>([]);\r\n nodeDialogTemplate = contentChild<TemplateRef<any>>('nodeDialog');\r\n nodeTemplate = input<TemplateRef<any> | null>(null);\r\n nodeTemplateContent = contentChild<TemplateRef<any>>('nodeTemplate');\r\n protected readonly effectiveNodeTemplate = computed(\r\n () => this.nodeTemplate() || this.nodeTemplateContent() || null,\r\n );\r\n protected readonly contentDirection = computed(\r\n () => this.dir?.value ?? 'ltr',\r\n );\r\n private collapsedConnectionIds = signal<Set<string>>(new Set());\r\n\r\n activeTab = signal('0');\r\n protected readonly eMarkerType = EFMarkerType;\r\n\r\n protected readonly effectiveDirection = computed(() =>\r\n this.resolveDirection(this.layoutDirection()),\r\n );\r\n protected readonly configuration = computed(\r\n () => CONFIGURATION[this.effectiveDirection()],\r\n );\r\n protected readonly nodeActionHandler = (action: Actions, node: any): void => {\r\n this.buttonAction(action, node);\r\n };\r\n protected readonly getFilteredNodeActions = (\r\n node: AvailableNode,\r\n ): Actions[] =>\r\n this.readonly()\r\n ? []\r\n : this.nodeActions().filter(\r\n (action) => !action.condition || action.condition(node),\r\n );\r\n private positions = signal<Record<string, IPoint>>({});\r\n private dialogRef: any;\r\n protected fields = computed(() => {\r\n const inputFields = this.nodeFields();\r\n return {\r\n id: inputFields.id || 'id',\r\n name: inputFields.name || 'name',\r\n icon: inputFields.icon || 'icon',\r\n color: inputFields.color || 'color',\r\n } as any;\r\n });\r\n\r\n availableTabs = computed(() => {\r\n const tabsSet = new Set<string>();\r\n this.availableNodes().forEach((node) => {\r\n if (node.tab && Array.isArray(node.tab)) {\r\n node.tab.forEach((tab) => tabsSet.add(tab));\r\n }\r\n });\r\n return Array.from(tabsSet).sort();\r\n });\r\n\r\n currentTabNodes = computed(() => {\r\n const tabs = this.availableTabs();\r\n const currentTabIndex = parseInt(this.activeTab());\r\n if (currentTabIndex >= tabs.length) return [];\r\n const currentTab = tabs[currentTabIndex];\r\n return this.availableNodes().filter((node) =>\r\n node.tab.includes(currentTab),\r\n );\r\n });\r\n\r\n nodesWithComputedProps = computed(() => {\r\n const fields = this.fields();\r\n const pos = this.positions();\r\n return this.nodes().map((node) => {\r\n const _computedId = String(this.getNestedValue(node, fields.id));\r\n const _computedName = this.getNestedValue(node, fields.name);\r\n const _computedIcon = this.getNestedValue(node, fields.icon);\r\n const _computedColor = this.getNestedValue(node, fields.color);\r\n const configuration = {\r\n ...(node.configuration ?? {}),\r\n ...(pos[_computedId] ?? {}),\r\n };\r\n return {\r\n ...node,\r\n _computedId,\r\n _computedName,\r\n _computedIcon,\r\n _computedColor,\r\n configuration,\r\n };\r\n });\r\n });\r\n connectionsComputed = computed(() =>\r\n this.connections()?.map((c) => ({\r\n ...c,\r\n from: String(c.from),\r\n to: String(c.to),\r\n })),\r\n );\r\n coreFields = computed(() => {\r\n const fields = this.fields();\r\n return new Set([\r\n ...Object.values(fields),\r\n 'configuration',\r\n '_computedId',\r\n '_computedName',\r\n '_computedIcon',\r\n '_computedColor',\r\n ]);\r\n });\r\n\r\n constructor() {\r\n effect(() => {\r\n const direction = this.effectiveDirection();\r\n this.getData(new dagre.graphlib.Graph(), direction);\r\n });\r\n effect(() => {\r\n const connectionIds = new Set(\r\n this.connectionsComputed().map((connection) => connection.id),\r\n );\r\n this.collapsedConnectionIds.update((current) => {\r\n if (current.size === 0) return current;\r\n let changed = false;\r\n const next = new Set<string>();\r\n current.forEach((id) => {\r\n if (connectionIds.has(id)) {\r\n next.add(id);\r\n } else {\r\n changed = true;\r\n }\r\n });\r\n return changed ? next : current;\r\n });\r\n });\r\n }\r\n\r\n protected onLoaded(): void {\r\n this.fitToScreen();\r\n }\r\n\r\n onCreateNode(event: FCreateNodeEvent): void {\r\n if (this.readonly()) {\r\n return;\r\n }\r\n\r\n const nodeData = event.data as AvailableNode;\r\n if (!nodeData) return;\r\n\r\n const newNode: Node = {\r\n ...nodeData,\r\n configuration: {\r\n x: event.rect.x,\r\n y: event.rect.y,\r\n },\r\n };\r\n\r\n if (this.nodeForm()?.sections.length > 0 || this.nodeDialogTemplate()) {\r\n this.openNodeDialog(newNode, true);\r\n } else {\r\n this.action.emit({ action: 'createNode', data: newNode });\r\n }\r\n }\r\n\r\n onNodePositionChange(event: any, nodeId: string): void {\r\n const position = event;\r\n if (nodeId && position) {\r\n this.positions.update((p) => ({\r\n ...p,\r\n [nodeId]: { x: position.x, y: position.y },\r\n }));\r\n }\r\n }\r\n\r\n onCreateConnection(event: FCreateConnectionEvent): void {\r\n if (this.readonly()) {\r\n return;\r\n }\r\n\r\n const newConnection: Connection = {\r\n id: this.generateConnectionId(),\r\n from: event.fOutputId!,\r\n to: event.fInputId!,\r\n };\r\n if (!event.fInputId! || !event.fOutputId!) {\r\n return;\r\n }\r\n const exists = this.connectionsComputed().some(\r\n (conn) =>\r\n conn.from === newConnection.from && conn.to === newConnection.to,\r\n );\r\n\r\n if (!exists) {\r\n if (\r\n this.connectionForm()?.sections.length > 0 ||\r\n this.connectionFormulaSchemaId()\r\n ) {\r\n this.openConnectionDialog(newConnection, true);\r\n } else {\r\n this.action.emit({ action: 'createConnection', data: newConnection });\r\n }\r\n }\r\n }\r\n\r\n openNodeDialog(node: Node, isNewNode: boolean = false): void {\r\n if (this.readonly()) {\r\n return;\r\n }\r\n\r\n if (this.dialogRef) {\r\n this.dialogRef.close();\r\n }\r\n const modalType = isNewNode ? this.addModalType() : this.updateModalType();\r\n this.action.emit({\r\n action: isNewNode ? 'startCreating' : 'startUpdating',\r\n data: node,\r\n });\r\n\r\n const styleClass = isNewNode\r\n ? this.addModalStyleClass()\r\n : this.updateModalStyleClass();\r\n const header = isNewNode ? this.addModalHeader() : this.updateModalHeader();\r\n\r\n const config = {\r\n header: header,\r\n styleClass: styleClass,\r\n focusOnShow: this.nodeDialogTemplate() ? false : true,\r\n appendTo: this.appendTo(),\r\n position: modalType === 'drawer' ? 'end' : undefined,\r\n dismissible: true,\r\n modal: true,\r\n\r\n inputValues: {\r\n data: {\r\n node: node,\r\n formSchema: this.nodeForm(),\r\n template: this.nodeDialogTemplate(),\r\n },\r\n },\r\n };\r\n this.dialogRef = this.modal.openModal(\r\n NodeFormDialogComponent,\r\n modalType,\r\n config,\r\n );\r\n\r\n this.dialogRef.onClose.subscribe((result: any) => {\r\n if (result) {\r\n if (isNewNode) {\r\n const newNodeWithFormData = { ...node, ...result };\r\n this.action.emit({ action: 'createNode', data: newNodeWithFormData });\r\n } else {\r\n this.onNodeFormSubmit(result);\r\n }\r\n }\r\n });\r\n }\r\n\r\n openConnectionDialog(connection: Connection, isNew: boolean = false): void {\r\n if (this.readonly()) {\r\n return;\r\n }\r\n\r\n const ref = this.modal.openModal(ConnectionFormDialogComponent, 'dialog', {\r\n header: this.transloco.translate(\r\n isNew\r\n ? 'structureBuilder.addConnectionProperties'\r\n : 'structureBuilder.editConnectionProperties',\r\n ),\r\n width: this.connectionFormulaSchemaId() ? '960px' : '600px',\r\n\r\n inputValues: {\r\n data: {\r\n connection: connection,\r\n formSchema: this.connectionForm(),\r\n formulaSchemaId: this.connectionFormulaSchemaId(),\r\n },\r\n },\r\n });\r\n\r\n ref.onClose.subscribe((result: any) => {\r\n if (result) {\r\n this.onConnectionFormSubmit(result, isNew);\r\n }\r\n });\r\n }\r\n\r\n onNodeFormSubmit(formData: any): void {\r\n const nodeId = formData[this.fields().id];\r\n if (nodeId) {\r\n this.action.emit({ action: 'updateNode', data: formData });\r\n }\r\n }\r\n\r\n onConnectionFormSubmit(formData: any, isNew: boolean = false): void {\r\n if (isNew) {\r\n this.action.emit({ action: 'createConnection', data: formData });\r\n return;\r\n }\r\n\r\n const connectionId = formData.id;\r\n if (connectionId) {\r\n this.action.emit({ action: 'updateConnection', data: formData });\r\n }\r\n }\r\n\r\n removeNode(node: any): void {\r\n if (this.readonly()) {\r\n return;\r\n }\r\n\r\n this.action.emit({ action: 'deleteNode', data: node });\r\n }\r\n\r\n removeConnection(connection: any): void {\r\n if (this.readonly()) {\r\n return;\r\n }\r\n\r\n this.action.emit({ action: 'deleteConnection', data: connection });\r\n }\r\n\r\n buttonAction(action: any, node: any) {\r\n if (this.readonly()) {\r\n return;\r\n }\r\n\r\n this.nodeActionsEvent.emit({ action, node });\r\n if (action.key === 'edit') {\r\n this.openNodeDialog(node);\r\n } else if (action.key === 'delete') {\r\n this.removeNode(node);\r\n }\r\n }\r\n\r\n toggleConnectionCollapse(connection: Connection): void {\r\n this.collapsedConnectionIds.update((current) => {\r\n const next = new Set(current);\r\n if (next.has(connection.id)) {\r\n next.delete(connection.id);\r\n } else {\r\n next.add(connection.id);\r\n }\r\n return next;\r\n });\r\n }\r\n\r\n protected fitToScreen(): void {\r\n const area = this.nodes()?.length * 70;\r\n this.fCanvasComponent()?.fitToScreen(\r\n PointExtensions.initialize(area, area),\r\n false,\r\n );\r\n }\r\n\r\n private getData(graph: Graph, direction: Direction): void {\r\n if (this.isAutoLayout()) {\r\n this.fFlowComponent()?.reset();\r\n }\r\n this.updateGraph(graph, direction);\r\n this.applyGraphPositions(graph);\r\n }\r\n\r\n private updateGraph(graph: Graph, direction: Direction): void {\r\n graph.setGraph({ rankdir: direction });\r\n\r\n const SIZE = { width: 300, height: 200 };\r\n const nodeIds = this.nodes()\r\n .map((node) => this.getNestedValue(node, this.fields().id))\r\n .filter(\r\n (nodeId): nodeId is string | number =>\r\n nodeId !== null && nodeId !== undefined && `${nodeId}` !== '',\r\n )\r\n .map(String);\r\n\r\n nodeIds.forEach((nodeId) => {\r\n graph.setNode(nodeId, {\r\n width: SIZE.width,\r\n height: SIZE.height,\r\n });\r\n });\r\n\r\n const validConnections = this.connectionsComputed().filter(\r\n (connection) =>\r\n !!connection.from &&\r\n !!connection.to &&\r\n connection.from !== connection.to,\r\n );\r\n\r\n if (validConnections.length > 0) {\r\n validConnections.forEach((connection) => {\r\n graph.setEdge(connection.from, connection.to, {});\r\n });\r\n } else if (nodeIds.length > 1) {\r\n // Dagre stacks disconnected nodes vertically for LR and horizontally for TB.\r\n // Add a temporary chain so empty flows still follow the requested direction.\r\n for (let index = 0; index < nodeIds.length - 1; index++) {\r\n graph.setEdge(nodeIds[index], nodeIds[index + 1], {});\r\n }\r\n }\r\n\r\n dagre.layout(graph);\r\n }\r\n\r\n private applyGraphPositions(graph: Graph): void {\r\n const positionsById: Record<string, IPoint> = {};\r\n graph.nodes().forEach((key) => {\r\n const gNode = graph.node(key);\r\n positionsById[key] = { x: gNode.x, y: gNode.y };\r\n });\r\n this.positions.update((old) => ({ ...old, ...positionsById }));\r\n }\r\n\r\n private getNestedValue(obj: unknown, path?: string | null): unknown {\r\n if (!path) return undefined;\r\n const keys = path\r\n .replace(/\\[(\\w+)\\]/g, '.$1')\r\n .replace(/^\\./, '')\r\n .split('.')\r\n .filter(Boolean);\r\n\r\n return keys.reduce<unknown>(\r\n (acc, k) => (acc == null ? undefined : (acc as any)[k]),\r\n obj,\r\n );\r\n }\r\n\r\n maybeAutoLayout(): void {\r\n if (!this.isAutoLayout() || this.nodes().length === 0) return;\r\n this.getData(new dagre.graphlib.Graph(), this.effectiveDirection());\r\n }\r\n\r\n private generateConnectionId(): string {\r\n return `conn-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\r\n }\r\n\r\n private extractNodeId(connectionEndId: string): string {\r\n return (connectionEndId || '').replace(/-(in|out)$/, '');\r\n }\r\n\r\n private resolveDirection(layoutDirection: LayoutDirection): Direction {\r\n if (layoutDirection === Direction.LEFT_TO_RIGHT) {\r\n return this.dir?.value === 'rtl'\r\n ? Direction.RIGHT_TO_LEFT\r\n : Direction.LEFT_TO_RIGHT;\r\n }\r\n return Direction.TOP_TO_BOTTOM;\r\n }\r\n\r\n private buildAdjacency(connections: Connection[]): Map<string, string[]> {\r\n const adjacency = new Map<string, string[]>();\r\n connections.forEach((connection) => {\r\n if (!connection.from || !connection.to) return;\r\n const children = adjacency.get(connection.from) ?? [];\r\n children.push(connection.to);\r\n adjacency.set(connection.from, children);\r\n });\r\n return adjacency;\r\n }\r\n\r\n private getDescendants(\r\n startId: string,\r\n adjacency: Map<string, string[]>,\r\n ): Set<string> {\r\n const visited = new Set<string>();\r\n const stack = [startId];\r\n while (stack.length > 0) {\r\n const current = stack.pop();\r\n if (!current || visited.has(current)) {\r\n continue;\r\n }\r\n visited.add(current);\r\n const children = adjacency.get(current);\r\n if (children) {\r\n children.forEach((child) => stack.push(child));\r\n }\r\n }\r\n return visited;\r\n }\r\n}\r\n","<!-- structure-builder.html -->\r\n@if (!readonly() && availableTabs().length > 0) {\r\n <mt-card\r\n class=\"absolute ms-4 mt-4 z-1 h-[calc(100%---spacing(8))] w-1/5 min-w-xs\"\r\n >\r\n <ng-template #headless>\r\n <!-- Header -->\r\n <div class=\"flex items-center justify-between px-4 pt-5\">\r\n <h3 class=\"text-xl font-semibold\">\r\n {{ \"structureBuilder.levelTemplates\" | transloco }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Tabs using PrimeNG -->\r\n <p-tabs\r\n [(value)]=\"activeTab\"\r\n styleClass=\"structure-tabs \"\r\n class=\"h-full overflow-hidden\"\r\n >\r\n <p-tablist>\r\n @for (tab of availableTabs(); track tab; let i = $index) {\r\n <p-tab [value]=\"i.toString()\">{{ tab | titlecase }}</p-tab>\r\n }\r\n </p-tablist>\r\n <p-tabpanels class=\"bg-transparent! p-0! overflow-auto\">\r\n @for (tab of availableTabs(); track tab; let i = $index) {\r\n <p-tabpanel [value]=\"i.toString()\">\r\n <p class=\"text-xs text-muted py-3 px-4\">\r\n {{ \"structureBuilder.dragToAdd\" | transloco }}\r\n </p>\r\n\r\n <!-- Node List -->\r\n <div class=\"space-y-1 px-4\">\r\n @for (node of currentTabNodes(); track node.id) {\r\n <div\r\n fExternalItem\r\n [fData]=\"node\"\r\n class=\"group select-none relative flex items-center gap-3 py-3 px-4 hover:bg-emphasis hover:border-solid transition-colors rounded-lg border-1 border-dashed border-color border-surface-300 dark:border-surface-500 cursor-move transition-colors\"\r\n >\r\n <!-- Node Icon with color -->\r\n <div class=\"text-primary text-lg\">\r\n <mt-icon [icon]=\"node.icon || 'general.box'\"></mt-icon>\r\n </div>\r\n\r\n <!-- Node Name -->\r\n <span class=\"text-base font-medium flex-1\">{{\r\n node.label\r\n }}</span>\r\n <mt-icon class=\"text-lg\" icon=\"general.menu-05\"></mt-icon>\r\n </div>\r\n }\r\n\r\n @if (currentTabNodes().length === 0) {\r\n <div class=\"text-center py-8 text-gray-400\">\r\n <p class=\"text-sm\">\r\n {{\r\n \"structureBuilder.allItemsInUse\"\r\n | transloco: { tab: tab }\r\n }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </p-tabpanel>\r\n }\r\n </p-tabpanels>\r\n </p-tabs>\r\n </ng-template>\r\n </mt-card>\r\n} @else if (!readonly() && availableNodes().length > 0) {\r\n <div [ngClass]=\"availableTabsClass() || 'absolute top-4 start-4 z-1 w-64'\">\r\n <mt-card [title]=\"'structureBuilder.steps' | transloco\">\r\n <div class=\"flex flex-col gap-2\">\r\n @for (node of availableNodes(); track node.id) {\r\n <div\r\n fExternalItem\r\n [fData]=\"node\"\r\n class=\"group select-none relative flex items-center gap-3 py-3 px-4 hover:bg-emphasis hover:border-solid transition-colors rounded-lg border-1 border-dashed border-color border-surface-300 dark:border-surface-500 cursor-move bg-content\"\r\n >\r\n <!-- Node Icon with color -->\r\n <div class=\"text-primary text-lg\">\r\n <mt-icon [icon]=\"node.icon || 'general.box'\"></mt-icon>\r\n </div>\r\n\r\n <!-- Node Name -->\r\n <span class=\"text-base font-medium flex-1\">{{ node.label }}</span>\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n </div>\r\n}\r\n<!-- Left Sidebar -->\r\n\r\n<!-- Main Canvas Area -->\r\n<div class=\"flex-1 z-0 relative\">\r\n <ng-content select=\"[flowContent]\"></ng-content>\r\n\r\n <f-flow\r\n fDraggable\r\n dir=\"ltr\"\r\n (fLoaded)=\"onLoaded()\"\r\n (fCreateNode)=\"onCreateNode($event)\"\r\n (fCreateConnection)=\"onCreateConnection($event)\"\r\n class=\"size-full\"\r\n >\r\n <f-background>\r\n <f-circle-pattern color=\"#b5b5b5\"></f-circle-pattern>\r\n </f-background>\r\n <f-canvas fZoom [fZoomMinimum]=\"0.1\" [fZoomMaximum]=\"2\">\r\n <f-connection-for-create fBehavior=\"floating\" fType=\"straight\">\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n </f-connection-for-create>\r\n <f-snap-connection\r\n fBehavior=\"fixed\"\r\n fType=\"segment\"\r\n class=\"z-1\"\r\n [fSnapThreshold]=\"100\"\r\n >\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n </f-snap-connection>\r\n\r\n <f-connection-for-create></f-connection-for-create>\r\n\r\n <!-- Enhanced Connections with Edit Button -->\r\n @for (connection of connectionsComputed(); track connection.id) {\r\n <f-connection\r\n [fReassignDisabled]=\"true\"\r\n [fOutputId]=\"connection.from\"\r\n [fInputId]=\"connection.to\"\r\n fBehavior=\"fixed\"\r\n fType=\"segment\"\r\n [ngClass]=\"{ 'connection-loading': connection.loading, 'z-1': true }\"\r\n >\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.SELECTED_START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.SELECTED_END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n @if (!readonly()) {\r\n <div\r\n fConnectionCenter\r\n class=\"flex items-center gap-1 bg-content rounded-md p-1 shadow-sm\"\r\n >\r\n @if (!connection.loading) {\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n [icon]=\"'general.edit-05'\"\r\n (click)=\"openConnectionDialog(connection)\"\r\n >\r\n </mt-button>\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n severity=\"danger\"\r\n [icon]=\"'general.trash-01'\"\r\n (click)=\"removeConnection(connection)\"\r\n >\r\n </mt-button>\r\n } @else {\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n [icon]=\"'general.loading-01'\"\r\n >\r\n </mt-button>\r\n }\r\n </div>\r\n }\r\n </f-connection>\r\n }\r\n\r\n <!-- Enhanced Nodes with Edit Button -->\r\n @for (node of nodesWithComputedProps(); track node._computedId) {\r\n <mt-card\r\n fNode\r\n fDragHandle\r\n [fNodePosition]=\"{\r\n x: node.configuration?.x || 200,\r\n y: node.configuration?.y || 100,\r\n }\"\r\n (fNodePositionChange)=\"onNodePositionChange($event, node._computedId)\"\r\n [style.--node-data-border-color]=\"node._computedColor\"\r\n >\r\n <ng-template #headless>\r\n @if (!node.loading) {\r\n <div [attr.dir]=\"contentDirection()\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"\r\n effectiveNodeTemplate() || defaultNodeTemplate\r\n \"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: node,\r\n node: node,\r\n actions: getFilteredNodeActions(node),\r\n onAction: nodeActionHandler,\r\n dir: contentDirection(),\r\n }\"\r\n >\r\n </ng-container>\r\n </div>\r\n <div\r\n fNodeInput\r\n [fInputId]=\"node._computedId\"\r\n [fInputConnectableSide]=\"configuration().inputSide\"\r\n [fInputMultiple]=\"true\"\r\n [ngClass]=\"configuration().inputSide\"\r\n ></div>\r\n\r\n <div\r\n fNodeOutput\r\n [fOutputId]=\"node._computedId\"\r\n [fOutputConnectableSide]=\"configuration().outputSide\"\r\n [isSelfConnectable]=\"false\"\r\n [fOutputMultiple]=\"true\"\r\n [ngClass]=\"configuration().outputSide\"\r\n class=\"bg-surface-50 dark:bg-surface-900\"\r\n ></div>\r\n } @else {\r\n <p-skeleton height=\"10rem\" width=\"15rem\" />\r\n }\r\n\r\n <!-- Node Header with Edit Button -->\r\n </ng-template>\r\n </mt-card>\r\n }\r\n\r\n <ng-template\r\n #defaultNodeTemplate\r\n let-node\r\n let-actions=\"actions\"\r\n let-onAction=\"onAction\"\r\n >\r\n <div\r\n class=\"flex flex-col items-center min-w-3xs gap-2 px-3 py-4 rounded-t-2xl bg-white dark:bg-surface-800 border-(--p-content-border-color)\"\r\n >\r\n @if (node._computedIcon) {\r\n <mt-icon\r\n class=\"text-2xl text-primary\"\r\n [icon]=\"node._computedIcon\"\r\n />\r\n }\r\n <div>{{ node._computedName }}</div>\r\n </div>\r\n <div\r\n class=\"flex justify-center pt-3 mb-4 gap-2 bg-surface-50 dark:bg-surface-900\"\r\n >\r\n @for (action of actions; track action.key) {\r\n <mt-button\r\n [size]=\"action?.size || 'small'\"\r\n [variant]=\"action?.variant\"\r\n [icon]=\"action?.icon\"\r\n [tooltip]=\"action?.tooltip\"\r\n [severity]=\"action?.severity\"\r\n (onClick)=\"onAction(action, node)\"\r\n >\r\n </mt-button>\r\n }\r\n </div>\r\n </ng-template>\r\n </f-canvas>\r\n </f-flow>\r\n</div>\r\n@if (!readonly()) {\r\n <mt-toolbar />\r\n}\r\n","/*\r\n * Public API Surface of structure-builder\r\n */\r\n\r\nexport * from './lib/structure-builder';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;MA8Ba,uBAAuB,CAAA;AACzB,IAAA,YAAY,GAAiB,MAAM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,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,mBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAEX,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE5MrE;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"masterteam-structure-builder.mjs","sources":["../../../../packages/masterteam/structure-builder/src/lib/node-form-dialog/node-form-dialog.ts","../../../../packages/masterteam/structure-builder/src/lib/node-form-dialog/node-form-dialog.html","../../../../packages/masterteam/structure-builder/src/lib/connection-form-dialog/connection-form-dialog.ts","../../../../packages/masterteam/structure-builder/src/lib/connection-form-dialog/connection-form-dialog.html","../../../../packages/masterteam/structure-builder/src/lib/toolbar/toolbar.ts","../../../../packages/masterteam/structure-builder/src/lib/toolbar/toolbar.html","../../../../packages/masterteam/structure-builder/src/lib/structure-builder.ts","../../../../packages/masterteam/structure-builder/src/lib/structure-builder.html","../../../../packages/masterteam/structure-builder/src/public-api.ts","../../../../packages/masterteam/structure-builder/src/masterteam-structure-builder.ts"],"sourcesContent":["import { Component, inject, AfterViewInit, OnInit, input } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ModalRef } from '@masterteam/components/dialog';\r\nimport { ModalService } from '@masterteam/components/modal';\r\nimport { DrawerController } from '@masterteam/components/dynamic-drawer';\r\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { TranslocoModule } from '@jsverse/transloco';\r\n\r\nexport interface NodeFormData {\r\n id?: string;\r\n label?: string;\r\n description?: string;\r\n [key: string]: any;\r\n}\r\n\r\ninterface NodeDialogFooterConfig {\r\n showSaveButton?: () => boolean;\r\n disableSaveButton?: () => boolean;\r\n}\r\n\r\ninterface NodeFormDialogInputData {\r\n node?: NodeFormData;\r\n formSchema?: unknown;\r\n template?: unknown;\r\n footerConfig?: NodeDialogFooterConfig | null;\r\n}\r\n\r\n@Component({\r\n selector: 'mt-node-form-dialog',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n DynamicForm,\r\n Button,\r\n ReactiveFormsModule,\r\n TranslocoModule,\r\n ],\r\n templateUrl: './node-form-dialog.html',\r\n styleUrls: ['./node-form-dialog.scss'],\r\n})\r\nexport class NodeFormDialogComponent implements AfterViewInit, OnInit {\r\n readonly modalService: ModalService = inject(ModalService);\r\n ref: ModalRef = inject(ModalRef);\r\n // DrawerController is optional - only available when opened as drawer\r\n readonly drawerController = inject(DrawerController, { optional: true });\r\n dynamicFormControl = new FormControl();\r\n nodeData: NodeFormData = {};\r\n formSchema: any;\r\n data = input<NodeFormDialogInputData | null>(null);\r\n\r\n ngOnInit() {\r\n this.nodeData = this.data()?.node ?? {};\r\n this.formSchema = this.data()?.formSchema ?? [];\r\n }\r\n ngAfterViewInit(): void {\r\n this.dynamicFormControl.setValue(this.nodeData);\r\n }\r\n get templateContext() {\r\n return {\r\n node: this.nodeData,\r\n save: (item: any = {}) => this.onSave(item),\r\n cancel: () => this.onCancel(),\r\n close: () => this.onCancel(),\r\n drawerController: this.drawerController,\r\n };\r\n }\r\n\r\n showSaveButton(): boolean {\r\n return this.data()?.footerConfig?.showSaveButton?.() ?? true;\r\n }\r\n\r\n disableSaveButton(): boolean {\r\n return (\r\n this.data()?.footerConfig?.disableSaveButton?.() ??\r\n !this.dynamicFormControl.valid\r\n );\r\n }\r\n\r\n onSave(item: any = {}) {\r\n const updatedNode = {\r\n ...this.nodeData,\r\n ...this.dynamicFormControl.value,\r\n ...item,\r\n };\r\n this.ref.close(updatedNode);\r\n }\r\n\r\n onCancel() {\r\n this.ref.close();\r\n }\r\n}\r\n","<div [class]=\"[modalService.contentClass, 'p-4']\">\r\n @if (this.data()?.template) {\r\n <ng-container\r\n *ngTemplateOutlet=\"data().template; context: templateContext\"\r\n ></ng-container>\r\n } @else {\r\n @if (nodeData) {\r\n <mt-dynamic-form\r\n [formConfig]=\"formSchema\"\r\n [formControl]=\"dynamicFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n }\r\n</div>\r\n<div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"'structureBuilder.cancel' | transloco\"\r\n severity=\"secondary\"\r\n (onClick)=\"onCancel()\"\r\n >\r\n </mt-button>\r\n @if (showSaveButton()) {\r\n <mt-button\r\n [disabled]=\"disableSaveButton()\"\r\n [label]=\"'structureBuilder.saveChanges' | transloco\"\r\n severity=\"primary\"\r\n (onClick)=\"onSave()\"\r\n >\r\n </mt-button>\r\n }\r\n</div>\r\n","import { ModalService } from '@masterteam/components/modal';\r\nimport { Component, inject, AfterViewInit, input, OnInit } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { ModalRef } from '@masterteam/components/dialog';\r\nimport { TranslocoModule } from '@jsverse/transloco';\r\nimport { Card } from '@masterteam/components/card';\r\nimport {\r\n FormulaBuilder,\r\n type FormulaBuilderUiConfig,\r\n type FormulaBuilderValue,\r\n} from '@masterteam/formula-builder';\r\n\r\ninterface ConnectionFormDialogData {\r\n connection?: Record<string, unknown>;\r\n formSchema?: unknown;\r\n formulaSchemaId?: number;\r\n formulaConfig?: FormulaBuilderUiConfig | null;\r\n}\r\n\r\n@Component({\r\n selector: 'mt-connection-form-dialog',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n Card,\r\n DynamicForm,\r\n FormulaBuilder,\r\n Button,\r\n ReactiveFormsModule,\r\n TranslocoModule,\r\n ],\r\n templateUrl: './connection-form-dialog.html',\r\n styleUrls: ['./connection-form-dialog.scss'],\r\n})\r\nexport class ConnectionFormDialogComponent implements AfterViewInit, OnInit {\r\n readonly modalService: ModalService = inject(ModalService);\r\n private ref: ModalRef = inject(ModalRef);\r\n data = input<ConnectionFormDialogData | null>(null);\r\n readonly defaultToolbarTabs = [\r\n 'functions',\r\n 'properties',\r\n 'operators',\r\n ] as const;\r\n dynamicFormControl = new FormControl();\r\n formulaControl = new FormControl<FormulaBuilderValue | null>(null);\r\n connectionData: any;\r\n formSchema: any;\r\n formulaSchemaId?: number;\r\n formulaConfig: FormulaBuilderUiConfig = {};\r\n\r\n ngOnInit() {\r\n this.connectionData = this.data()?.connection || {};\r\n this.formSchema = this.data()?.formSchema || [];\r\n this.formulaSchemaId = this.data()?.formulaSchemaId;\r\n this.formulaConfig = this.data()?.formulaConfig ?? {};\r\n }\r\n ngAfterViewInit(): void {\r\n this.dynamicFormControl.setValue(this.connectionData);\r\n this.formulaControl.setValue(\r\n (this.connectionData?.formula as FormulaBuilderValue | null) ?? null,\r\n {\r\n emitEvent: false,\r\n },\r\n );\r\n }\r\n\r\n onSave(): void {\r\n if (this.dynamicFormControl.valid) {\r\n this.ref.close({\r\n ...this.connectionData,\r\n ...this.dynamicFormControl.value,\r\n formula: this.formulaControl.value,\r\n });\r\n }\r\n }\r\n\r\n onCancel(): void {\r\n this.ref.close();\r\n }\r\n}\r\n","<div\r\n [class]=\"\r\n modalService.contentClass +\r\n ' max-h-[80vh] overflow-x-hidden overflow-y-auto p-4'\r\n \"\r\n>\r\n <div class=\"space-y-6\">\r\n @if (formSchema?.sections?.length > 0) {\r\n <mt-dynamic-form\r\n class=\"block\"\r\n [formConfig]=\"formSchema\"\r\n [formControl]=\"dynamicFormControl\"\r\n ></mt-dynamic-form>\r\n }\r\n\r\n @if (formulaSchemaId) {\r\n <mt-card [title]=\"'structureBuilder.formula' | transloco\">\r\n <mt-formula-builder\r\n [formControl]=\"formulaControl\"\r\n [levelSchemaId]=\"formulaSchemaId\"\r\n [toolbarTabs]=\"formulaConfig.toolbarTabs ?? defaultToolbarTabs\"\r\n [codeOnly]=\"formulaConfig.codeOnly ?? false\"\r\n [hideToolbar]=\"formulaConfig.hideToolbar ?? false\"\r\n [hideStatusBar]=\"formulaConfig.hideStatusBar ?? false\"\r\n [isProcessBuilder]=\"formulaConfig.isProcessBuilder ?? false\"\r\n />\r\n </mt-card>\r\n }\r\n </div>\r\n</div>\r\n\r\n<div [class]=\"modalService.footerClass\">\r\n <mt-button\r\n [label]=\"'structureBuilder.cancel' | transloco\"\r\n severity=\"secondary\"\r\n (onClick)=\"onCancel()\"\r\n >\r\n </mt-button>\r\n <mt-button\r\n [disabled]=\"!dynamicFormControl.valid\"\r\n [label]=\"'structureBuilder.saveChanges' | transloco\"\r\n severity=\"primary\"\r\n (onClick)=\"onSave()\"\r\n >\r\n </mt-button>\r\n</div>\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n inject,\r\n input,\r\n} from '@angular/core';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { ButtonGroup } from '@masterteam/components/button-group';\r\nimport { PointExtensions } from '@foblex/2d';\r\nimport { StructureBuilder } from '../structure-builder';\r\n\r\n@Component({\r\n selector: 'mt-toolbar',\r\n imports: [Button, ButtonGroup],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n templateUrl: './toolbar.html',\r\n styleUrl: './toolbar.css',\r\n})\r\nexport class Toolbar {\r\n readonly size = input<'small' | 'large' | undefined>();\r\n\r\n private builderComponent = inject(StructureBuilder);\r\n\r\n public onZoomIn(): void {\r\n this.builderComponent.fZoomDirective()?.zoomIn();\r\n }\r\n\r\n public onZoomOut(): void {\r\n this.builderComponent.fZoomDirective()?.zoomOut();\r\n }\r\n\r\n public onFitToScreen(): void {\r\n this.builderComponent\r\n .fCanvasComponent()\r\n ?.fitToScreen(PointExtensions.initialize(250, 250), true);\r\n }\r\n\r\n public onOneToOne(): void {\r\n this.builderComponent.fCanvasComponent()?.resetScaleAndCenter();\r\n }\r\n public autoLayout(): void {\r\n this.builderComponent.maybeAutoLayout();\r\n }\r\n}\r\n","<mt-button\r\n (onClick)=\"autoLayout()\"\r\n class=\"bg-content rounded-(--p-button-border-radius)\"\r\n size=\"size()\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n icon=\"arrow.refresh-cw-05\"\r\n></mt-button>\r\n\r\n<mt-buttongroup class=\"bg-content rounded-(--p-button-border-radius)\">\r\n <mt-button\r\n (onClick)=\"onZoomOut()\"\r\n size=\"size()\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n icon=\"general.minus\"\r\n ></mt-button>\r\n <mt-button\r\n (onClick)=\"onZoomIn()\"\r\n size=\"size()\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n icon=\"general.plus\"\r\n ></mt-button>\r\n <mt-button\r\n (onClick)=\"onFitToScreen()\"\r\n size=\"size()\"\r\n variant=\"outlined\"\r\n severity=\"secondary\"\r\n icon=\"layout.grid-02\"\r\n ></mt-button>\r\n</mt-buttongroup>\r\n","import {\r\n Component,\r\n input,\r\n model,\r\n signal,\r\n computed,\r\n inject,\r\n contentChild,\r\n TemplateRef,\r\n viewChild,\r\n output,\r\n effect,\r\n} from '@angular/core';\r\nimport { TranslocoService, TranslocoModule } from '@jsverse/transloco';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { DialogService } from '@masterteam/components/dialog';\r\nimport { DrawerService } from '@masterteam/components/dynamic-drawer';\r\nimport { ModalService } from '@masterteam/components/modal';\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { TabsModule } from 'primeng/tabs';\r\nimport {\r\n EFMarkerType,\r\n FCanvasComponent,\r\n FCreateConnectionEvent,\r\n FCreateNodeEvent,\r\n FFlowComponent,\r\n FFlowModule,\r\n FZoomDirective,\r\n} from '@foblex/flow';\r\nimport { Button } from '@masterteam/components/button';\r\nimport { Card } from '@masterteam/components/card';\r\nimport { Icon } from '@masterteam/icons';\r\nimport { NodeFormDialogComponent } from './node-form-dialog/node-form-dialog';\r\nimport { ConnectionFormDialogComponent } from './connection-form-dialog/connection-form-dialog';\r\nimport { DynamicFormConfig } from '@masterteam/components';\r\nimport { Toolbar } from './toolbar/toolbar';\r\nimport type { FormulaBuilderUiConfig } from '@masterteam/formula-builder';\r\n\r\n// 🔁 dagre & helpers – same approach as lib sample\r\nimport * as dagre from 'dagre';\r\nimport { graphlib } from 'dagre';\r\nimport Graph = graphlib.Graph;\r\nimport { IPoint, PointExtensions } from '@foblex/2d';\r\nimport { Skeleton } from 'primeng/skeleton'; // TO DO\r\n\r\nexport interface Node {\r\n configuration?: {\r\n x?: number;\r\n y?: number;\r\n };\r\n [key: string]: any;\r\n loading?: boolean;\r\n}\r\n\r\nexport interface NodeFieldsMapping {\r\n id?: string;\r\n name?: string;\r\n icon?: string;\r\n color?: string;\r\n}\r\n\r\nexport interface AvailableNode {\r\n id: string;\r\n label: string;\r\n icon: string;\r\n color: string;\r\n tab: string[];\r\n [key: string]: any;\r\n}\r\n\r\nexport interface Connection {\r\n id: string;\r\n from: string;\r\n to: string;\r\n [key: string]: any;\r\n}\r\n\r\nexport interface Actions {\r\n key: string;\r\n icon: string;\r\n variant: string;\r\n size: string;\r\n severity?: string;\r\n tooltip?: string;\r\n /**\r\n * Optional condition function to determine if action should be shown\r\n * @param node - The node object to evaluate\r\n * @returns true to show the action, false to hide it\r\n * @example\r\n * // Show delete only if node is not initial\r\n * condition: (node) => !node.isInitial\r\n *\r\n * // Show edit only if node has specific status\r\n * condition: (node) => node.status === 'draft'\r\n */\r\n condition?: (node: any) => boolean;\r\n}\r\n\r\nexport interface NodeActionEvent {\r\n action: Actions;\r\n node: AvailableNode;\r\n}\r\n\r\nexport interface NodeDialogFooterConfig {\r\n showSaveButton?: () => boolean;\r\n disableSaveButton?: () => boolean;\r\n}\r\n\r\nexport type LayoutDirection = 'TB' | 'LR';\r\n\r\nexport type SBActionType =\r\n | 'createNode'\r\n | 'updateNode'\r\n | 'deleteNode'\r\n | 'createConnection'\r\n | 'updateConnection'\r\n | 'deleteConnection'\r\n | 'startCreating'\r\n | 'startUpdating';\r\n\r\nexport interface SBAction {\r\n action: SBActionType;\r\n data?: any;\r\n}\r\n\r\n// ✨ Direction & config — mirrors lib sample\r\nenum Direction {\r\n LEFT_TO_RIGHT = 'LR',\r\n RIGHT_TO_LEFT = 'RL',\r\n TOP_TO_BOTTOM = 'TB',\r\n}\r\n\r\nconst CONFIGURATION = {\r\n [Direction.LEFT_TO_RIGHT]: {\r\n outputSide: 'right',\r\n inputSide: 'left',\r\n },\r\n [Direction.RIGHT_TO_LEFT]: {\r\n outputSide: 'left',\r\n inputSide: 'right',\r\n },\r\n [Direction.TOP_TO_BOTTOM]: {\r\n outputSide: 'bottom',\r\n inputSide: 'top',\r\n },\r\n} as const;\r\n\r\n@Component({\r\n selector: 'mt-structure-builder',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n FFlowModule,\r\n TabsModule,\r\n Button,\r\n Icon,\r\n Card,\r\n Toolbar,\r\n Skeleton,\r\n TranslocoModule,\r\n ],\r\n templateUrl: './structure-builder.html',\r\n styleUrl: './structure-builder.scss',\r\n providers: [DialogService],\r\n host: {\r\n class:\r\n 'flex h-full bg-surface-200 dark:bg-surface-700 relative rounded-2xl overflow-hidden',\r\n },\r\n})\r\nexport class StructureBuilder {\r\n readonly dialogService = inject(DialogService);\r\n readonly drawerService = inject(DrawerService);\r\n readonly modal: ModalService = inject(ModalService);\r\n private transloco = inject(TranslocoService);\r\n private dir = inject(Directionality, { optional: true });\r\n nodeActionsEvent = output<NodeActionEvent>();\r\n action = output<SBAction>();\r\n availableNodes = input<AvailableNode[]>([]);\r\n protected fCanvas = viewChild(FCanvasComponent);\r\n public fFlowComponent = viewChild(FFlowComponent);\r\n public fCanvasComponent = viewChild(FCanvasComponent);\r\n public fZoomDirective = viewChild(FZoomDirective);\r\n nodeForm = input<DynamicFormConfig>({ sections: [] });\r\n nodeDialogFooterConfig = input<NodeDialogFooterConfig | null>(null);\r\n connectionForm = input<DynamicFormConfig>({ sections: [] });\r\n connectionFormulaSchemaId = input<number | undefined>(undefined);\r\n connectionFormulaConfig = input<FormulaBuilderUiConfig | null>(null);\r\n nodeActions = input<Actions[]>([]);\r\n nodeFields = input<NodeFieldsMapping>({\r\n id: 'id',\r\n name: 'name',\r\n icon: 'icon',\r\n color: 'color',\r\n });\r\n\r\n isAutoLayout = input<boolean>(true);\r\n readonly = input<boolean>(false);\r\n addModalType = input<'drawer' | 'dialog'>('dialog');\r\n updateModalType = input<'drawer' | 'dialog'>('drawer');\r\n addModalStyleClass = input<string>('!w-[35rem]');\r\n updateModalStyleClass = input<string>('!w-[35rem]');\r\n addModalHeader = input<string>('');\r\n updateModalHeader = input<string>('');\r\n appendTo = input<string>('');\r\n availableTabsClass = input<string>('');\r\n layoutDirection = input<LayoutDirection>(Direction.TOP_TO_BOTTOM);\r\n nodes = model<Node[]>([]);\r\n connections = model<Connection[]>([]);\r\n nodeDialogTemplate = contentChild<TemplateRef<any>>('nodeDialog');\r\n nodeTemplate = input<TemplateRef<any> | null>(null);\r\n nodeTemplateContent = contentChild<TemplateRef<any>>('nodeTemplate');\r\n protected readonly effectiveNodeTemplate = computed(\r\n () => this.nodeTemplate() || this.nodeTemplateContent() || null,\r\n );\r\n protected readonly contentDirection = computed(\r\n () => this.dir?.value ?? 'ltr',\r\n );\r\n private collapsedConnectionIds = signal<Set<string>>(new Set());\r\n\r\n activeTab = signal('0');\r\n protected readonly eMarkerType = EFMarkerType;\r\n\r\n protected readonly effectiveDirection = computed(() =>\r\n this.resolveDirection(this.layoutDirection()),\r\n );\r\n protected readonly configuration = computed(\r\n () => CONFIGURATION[this.effectiveDirection()],\r\n );\r\n protected readonly nodeActionHandler = (action: Actions, node: any): void => {\r\n this.buttonAction(action, node);\r\n };\r\n protected readonly getFilteredNodeActions = (\r\n node: AvailableNode,\r\n ): Actions[] =>\r\n this.readonly()\r\n ? []\r\n : this.nodeActions().filter(\r\n (action) => !action.condition || action.condition(node),\r\n );\r\n private positions = signal<Record<string, IPoint>>({});\r\n private dialogRef: any;\r\n protected fields = computed(() => {\r\n const inputFields = this.nodeFields();\r\n return {\r\n id: inputFields.id || 'id',\r\n name: inputFields.name || 'name',\r\n icon: inputFields.icon || 'icon',\r\n color: inputFields.color || 'color',\r\n } as any;\r\n });\r\n\r\n availableTabs = computed(() => {\r\n const tabsSet = new Set<string>();\r\n this.availableNodes().forEach((node) => {\r\n if (node.tab && Array.isArray(node.tab)) {\r\n node.tab.forEach((tab) => tabsSet.add(tab));\r\n }\r\n });\r\n return Array.from(tabsSet).sort();\r\n });\r\n\r\n currentTabNodes = computed(() => {\r\n const tabs = this.availableTabs();\r\n const currentTabIndex = parseInt(this.activeTab());\r\n if (currentTabIndex >= tabs.length) return [];\r\n const currentTab = tabs[currentTabIndex];\r\n return this.availableNodes().filter((node) =>\r\n node.tab.includes(currentTab),\r\n );\r\n });\r\n\r\n nodesWithComputedProps = computed(() => {\r\n const fields = this.fields();\r\n const pos = this.positions();\r\n return this.nodes().map((node) => {\r\n const _computedId = String(this.getNestedValue(node, fields.id));\r\n const _computedName = this.getNestedValue(node, fields.name);\r\n const _computedIcon = this.getNestedValue(node, fields.icon);\r\n const _computedColor = this.getNestedValue(node, fields.color);\r\n const configuration = {\r\n ...(node.configuration ?? {}),\r\n ...(pos[_computedId] ?? {}),\r\n };\r\n return {\r\n ...node,\r\n _computedId,\r\n _computedName,\r\n _computedIcon,\r\n _computedColor,\r\n configuration,\r\n };\r\n });\r\n });\r\n connectionsComputed = computed(() =>\r\n this.connections()?.map((c) => ({\r\n ...c,\r\n from: String(c.from),\r\n to: String(c.to),\r\n })),\r\n );\r\n coreFields = computed(() => {\r\n const fields = this.fields();\r\n return new Set([\r\n ...Object.values(fields),\r\n 'configuration',\r\n '_computedId',\r\n '_computedName',\r\n '_computedIcon',\r\n '_computedColor',\r\n ]);\r\n });\r\n\r\n constructor() {\r\n effect(() => {\r\n const direction = this.effectiveDirection();\r\n this.getData(new dagre.graphlib.Graph(), direction);\r\n });\r\n effect(() => {\r\n const connectionIds = new Set(\r\n this.connectionsComputed().map((connection) => connection.id),\r\n );\r\n this.collapsedConnectionIds.update((current) => {\r\n if (current.size === 0) return current;\r\n let changed = false;\r\n const next = new Set<string>();\r\n current.forEach((id) => {\r\n if (connectionIds.has(id)) {\r\n next.add(id);\r\n } else {\r\n changed = true;\r\n }\r\n });\r\n return changed ? next : current;\r\n });\r\n });\r\n }\r\n\r\n protected onLoaded(): void {\r\n this.fitToScreen();\r\n }\r\n\r\n onCreateNode(event: FCreateNodeEvent): void {\r\n if (this.readonly()) {\r\n return;\r\n }\r\n\r\n const nodeData = event.data as AvailableNode;\r\n if (!nodeData) return;\r\n\r\n const newNode: Node = {\r\n ...nodeData,\r\n configuration: {\r\n x: event.rect.x,\r\n y: event.rect.y,\r\n },\r\n };\r\n\r\n if (this.nodeForm()?.sections.length > 0 || this.nodeDialogTemplate()) {\r\n this.openNodeDialog(newNode, true);\r\n } else {\r\n this.action.emit({ action: 'createNode', data: newNode });\r\n }\r\n }\r\n\r\n onNodePositionChange(event: any, nodeId: string): void {\r\n const position = event;\r\n if (nodeId && position) {\r\n this.positions.update((p) => ({\r\n ...p,\r\n [nodeId]: { x: position.x, y: position.y },\r\n }));\r\n }\r\n }\r\n\r\n onCreateConnection(event: FCreateConnectionEvent): void {\r\n if (this.readonly()) {\r\n return;\r\n }\r\n\r\n const newConnection: Connection = {\r\n id: this.generateConnectionId(),\r\n from: event.fOutputId!,\r\n to: event.fInputId!,\r\n };\r\n if (!event.fInputId! || !event.fOutputId!) {\r\n return;\r\n }\r\n const exists = this.connectionsComputed().some(\r\n (conn) =>\r\n conn.from === newConnection.from && conn.to === newConnection.to,\r\n );\r\n\r\n if (!exists) {\r\n if (\r\n this.connectionForm()?.sections.length > 0 ||\r\n this.connectionFormulaSchemaId()\r\n ) {\r\n this.openConnectionDialog(newConnection, true);\r\n } else {\r\n this.action.emit({ action: 'createConnection', data: newConnection });\r\n }\r\n }\r\n }\r\n\r\n openNodeDialog(node: Node, isNewNode: boolean = false): void {\r\n if (this.readonly()) {\r\n return;\r\n }\r\n\r\n if (this.dialogRef) {\r\n this.dialogRef.close();\r\n }\r\n const modalType = isNewNode ? this.addModalType() : this.updateModalType();\r\n this.action.emit({\r\n action: isNewNode ? 'startCreating' : 'startUpdating',\r\n data: node,\r\n });\r\n\r\n const styleClass = isNewNode\r\n ? this.addModalStyleClass()\r\n : this.updateModalStyleClass();\r\n const header = isNewNode\r\n ? this.addModalHeader() ||\r\n this.transloco.translate('structureBuilder.addNode')\r\n : this.updateModalHeader() ||\r\n this.transloco.translate('structureBuilder.editNodeProperties');\r\n\r\n const config = {\r\n header: header,\r\n styleClass: styleClass,\r\n focusOnShow: this.nodeDialogTemplate() ? false : true,\r\n appendTo: this.appendTo(),\r\n position: modalType === 'drawer' ? 'end' : undefined,\r\n dismissible: true,\r\n modal: true,\r\n\r\n inputValues: {\r\n data: {\r\n node: node,\r\n formSchema: this.nodeForm(),\r\n template: this.nodeDialogTemplate(),\r\n footerConfig: this.nodeDialogFooterConfig(),\r\n },\r\n },\r\n };\r\n this.dialogRef = this.modal.openModal(\r\n NodeFormDialogComponent,\r\n modalType,\r\n config,\r\n );\r\n\r\n this.dialogRef.onClose.subscribe((result: any) => {\r\n if (result) {\r\n if (isNewNode) {\r\n const newNodeWithFormData = { ...node, ...result };\r\n this.action.emit({ action: 'createNode', data: newNodeWithFormData });\r\n } else {\r\n this.onNodeFormSubmit(result);\r\n }\r\n }\r\n });\r\n }\r\n\r\n openConnectionDialog(connection: Connection, isNew: boolean = false): void {\r\n if (this.readonly()) {\r\n return;\r\n }\r\n\r\n const ref = this.modal.openModal(ConnectionFormDialogComponent, 'dialog', {\r\n header: this.transloco.translate(\r\n isNew\r\n ? 'structureBuilder.addConnectionProperties'\r\n : 'structureBuilder.editConnectionProperties',\r\n ),\r\n width: this.connectionFormulaSchemaId() ? '960px' : '600px',\r\n\r\n inputValues: {\r\n data: {\r\n connection: connection,\r\n formSchema: this.connectionForm(),\r\n formulaSchemaId: this.connectionFormulaSchemaId(),\r\n formulaConfig: this.connectionFormulaConfig(),\r\n },\r\n },\r\n });\r\n\r\n ref.onClose.subscribe((result: any) => {\r\n if (result) {\r\n this.onConnectionFormSubmit(result, isNew);\r\n }\r\n });\r\n }\r\n\r\n onNodeFormSubmit(formData: any): void {\r\n const nodeId = formData[this.fields().id];\r\n if (nodeId) {\r\n this.action.emit({ action: 'updateNode', data: formData });\r\n }\r\n }\r\n\r\n onConnectionFormSubmit(formData: any, isNew: boolean = false): void {\r\n if (isNew) {\r\n this.action.emit({ action: 'createConnection', data: formData });\r\n return;\r\n }\r\n\r\n const connectionId = formData.id;\r\n if (connectionId) {\r\n this.action.emit({ action: 'updateConnection', data: formData });\r\n }\r\n }\r\n\r\n removeNode(node: any): void {\r\n if (this.readonly()) {\r\n return;\r\n }\r\n\r\n this.action.emit({ action: 'deleteNode', data: node });\r\n }\r\n\r\n removeConnection(connection: any): void {\r\n if (this.readonly()) {\r\n return;\r\n }\r\n\r\n this.action.emit({ action: 'deleteConnection', data: connection });\r\n }\r\n\r\n buttonAction(action: any, node: any) {\r\n if (this.readonly()) {\r\n return;\r\n }\r\n\r\n this.nodeActionsEvent.emit({ action, node });\r\n if (action.key === 'edit') {\r\n this.openNodeDialog(node);\r\n } else if (action.key === 'delete') {\r\n this.removeNode(node);\r\n }\r\n }\r\n\r\n toggleConnectionCollapse(connection: Connection): void {\r\n this.collapsedConnectionIds.update((current) => {\r\n const next = new Set(current);\r\n if (next.has(connection.id)) {\r\n next.delete(connection.id);\r\n } else {\r\n next.add(connection.id);\r\n }\r\n return next;\r\n });\r\n }\r\n\r\n protected fitToScreen(): void {\r\n const area = this.nodes()?.length * 70;\r\n this.fCanvasComponent()?.fitToScreen(\r\n PointExtensions.initialize(area, area),\r\n false,\r\n );\r\n }\r\n\r\n private getData(graph: Graph, direction: Direction): void {\r\n if (this.isAutoLayout()) {\r\n this.fFlowComponent()?.reset();\r\n }\r\n this.updateGraph(graph, direction);\r\n this.applyGraphPositions(graph);\r\n }\r\n\r\n private updateGraph(graph: Graph, direction: Direction): void {\r\n graph.setGraph({ rankdir: direction });\r\n\r\n const SIZE = { width: 300, height: 200 };\r\n const nodeIds = this.nodes()\r\n .map((node) => this.getNestedValue(node, this.fields().id))\r\n .filter(\r\n (nodeId): nodeId is string | number =>\r\n nodeId !== null && nodeId !== undefined && `${nodeId}` !== '',\r\n )\r\n .map(String);\r\n\r\n nodeIds.forEach((nodeId) => {\r\n graph.setNode(nodeId, {\r\n width: SIZE.width,\r\n height: SIZE.height,\r\n });\r\n });\r\n\r\n const validConnections = this.connectionsComputed().filter(\r\n (connection) =>\r\n !!connection.from &&\r\n !!connection.to &&\r\n connection.from !== connection.to,\r\n );\r\n\r\n if (validConnections.length > 0) {\r\n validConnections.forEach((connection) => {\r\n graph.setEdge(connection.from, connection.to, {});\r\n });\r\n } else if (nodeIds.length > 1) {\r\n // Dagre stacks disconnected nodes vertically for LR and horizontally for TB.\r\n // Add a temporary chain so empty flows still follow the requested direction.\r\n for (let index = 0; index < nodeIds.length - 1; index++) {\r\n graph.setEdge(nodeIds[index], nodeIds[index + 1], {});\r\n }\r\n }\r\n\r\n dagre.layout(graph);\r\n }\r\n\r\n private applyGraphPositions(graph: Graph): void {\r\n const positionsById: Record<string, IPoint> = {};\r\n graph.nodes().forEach((key) => {\r\n const gNode = graph.node(key);\r\n positionsById[key] = { x: gNode.x, y: gNode.y };\r\n });\r\n this.positions.update((old) => ({ ...old, ...positionsById }));\r\n }\r\n\r\n private getNestedValue(obj: unknown, path?: string | null): unknown {\r\n if (!path) return undefined;\r\n const keys = path\r\n .replace(/\\[(\\w+)\\]/g, '.$1')\r\n .replace(/^\\./, '')\r\n .split('.')\r\n .filter(Boolean);\r\n\r\n return keys.reduce<unknown>(\r\n (acc, k) => (acc == null ? undefined : (acc as any)[k]),\r\n obj,\r\n );\r\n }\r\n\r\n maybeAutoLayout(): void {\r\n if (!this.isAutoLayout() || this.nodes().length === 0) return;\r\n this.getData(new dagre.graphlib.Graph(), this.effectiveDirection());\r\n }\r\n\r\n private generateConnectionId(): string {\r\n return `conn-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\r\n }\r\n\r\n private extractNodeId(connectionEndId: string): string {\r\n return (connectionEndId || '').replace(/-(in|out)$/, '');\r\n }\r\n\r\n private resolveDirection(layoutDirection: LayoutDirection): Direction {\r\n if (layoutDirection === Direction.LEFT_TO_RIGHT) {\r\n return this.dir?.value === 'rtl'\r\n ? Direction.RIGHT_TO_LEFT\r\n : Direction.LEFT_TO_RIGHT;\r\n }\r\n return Direction.TOP_TO_BOTTOM;\r\n }\r\n\r\n private buildAdjacency(connections: Connection[]): Map<string, string[]> {\r\n const adjacency = new Map<string, string[]>();\r\n connections.forEach((connection) => {\r\n if (!connection.from || !connection.to) return;\r\n const children = adjacency.get(connection.from) ?? [];\r\n children.push(connection.to);\r\n adjacency.set(connection.from, children);\r\n });\r\n return adjacency;\r\n }\r\n\r\n private getDescendants(\r\n startId: string,\r\n adjacency: Map<string, string[]>,\r\n ): Set<string> {\r\n const visited = new Set<string>();\r\n const stack = [startId];\r\n while (stack.length > 0) {\r\n const current = stack.pop();\r\n if (!current || visited.has(current)) {\r\n continue;\r\n }\r\n visited.add(current);\r\n const children = adjacency.get(current);\r\n if (children) {\r\n children.forEach((child) => stack.push(child));\r\n }\r\n }\r\n return visited;\r\n }\r\n}\r\n","<!-- structure-builder.html -->\r\n@if (!readonly() && availableTabs().length > 0) {\r\n <mt-card\r\n class=\"absolute ms-4 mt-4 z-1 h-[calc(100%---spacing(8))] w-1/5 min-w-xs\"\r\n >\r\n <ng-template #headless>\r\n <!-- Header -->\r\n <div class=\"flex items-center justify-between px-4 pt-5\">\r\n <h3 class=\"text-xl font-semibold\">\r\n {{ \"structureBuilder.levelTemplates\" | transloco }}\r\n </h3>\r\n </div>\r\n\r\n <!-- Tabs using PrimeNG -->\r\n <p-tabs\r\n [(value)]=\"activeTab\"\r\n styleClass=\"structure-tabs \"\r\n class=\"h-full overflow-hidden\"\r\n >\r\n <p-tablist>\r\n @for (tab of availableTabs(); track tab; let i = $index) {\r\n <p-tab [value]=\"i.toString()\">{{ tab | titlecase }}</p-tab>\r\n }\r\n </p-tablist>\r\n <p-tabpanels class=\"bg-transparent! p-0! overflow-auto\">\r\n @for (tab of availableTabs(); track tab; let i = $index) {\r\n <p-tabpanel [value]=\"i.toString()\">\r\n <p class=\"text-xs text-muted py-3 px-4\">\r\n {{ \"structureBuilder.dragToAdd\" | transloco }}\r\n </p>\r\n\r\n <!-- Node List -->\r\n <div class=\"space-y-1 px-4\">\r\n @for (node of currentTabNodes(); track node.id) {\r\n <div\r\n fExternalItem\r\n [fData]=\"node\"\r\n class=\"group select-none relative flex items-center gap-3 py-3 px-4 hover:bg-emphasis hover:border-solid transition-colors rounded-lg border-1 border-dashed border-color border-surface-300 dark:border-surface-500 cursor-move transition-colors\"\r\n >\r\n <!-- Node Icon with color -->\r\n <div class=\"text-primary text-lg\">\r\n <mt-icon [icon]=\"node.icon || 'general.box'\"></mt-icon>\r\n </div>\r\n\r\n <!-- Node Name -->\r\n <span class=\"text-base font-medium flex-1\">{{\r\n node.label\r\n }}</span>\r\n <mt-icon class=\"text-lg\" icon=\"general.menu-05\"></mt-icon>\r\n </div>\r\n }\r\n\r\n @if (currentTabNodes().length === 0) {\r\n <div class=\"text-center py-8 text-gray-400\">\r\n <p class=\"text-sm\">\r\n {{\r\n \"structureBuilder.allItemsInUse\"\r\n | transloco: { tab: tab }\r\n }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </p-tabpanel>\r\n }\r\n </p-tabpanels>\r\n </p-tabs>\r\n </ng-template>\r\n </mt-card>\r\n} @else if (!readonly() && availableNodes().length > 0) {\r\n <div [ngClass]=\"availableTabsClass() || 'absolute top-4 start-4 z-1 w-64'\">\r\n <mt-card [title]=\"'structureBuilder.steps' | transloco\">\r\n <div class=\"flex flex-col gap-2\">\r\n @for (node of availableNodes(); track node.id) {\r\n <div\r\n fExternalItem\r\n [fData]=\"node\"\r\n class=\"group select-none relative flex items-center gap-3 py-3 px-4 hover:bg-emphasis hover:border-solid transition-colors rounded-lg border-1 border-dashed border-color border-surface-300 dark:border-surface-500 cursor-move bg-content\"\r\n >\r\n <!-- Node Icon with color -->\r\n <div class=\"text-primary text-lg\">\r\n <mt-icon [icon]=\"node.icon || 'general.box'\"></mt-icon>\r\n </div>\r\n\r\n <!-- Node Name -->\r\n <span class=\"text-base font-medium flex-1\">{{ node.label }}</span>\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n </div>\r\n}\r\n<!-- Left Sidebar -->\r\n\r\n<!-- Main Canvas Area -->\r\n<div class=\"flex-1 z-0 relative\">\r\n <ng-content select=\"[flowContent]\"></ng-content>\r\n\r\n <f-flow\r\n fDraggable\r\n dir=\"ltr\"\r\n (fLoaded)=\"onLoaded()\"\r\n (fCreateNode)=\"onCreateNode($event)\"\r\n (fCreateConnection)=\"onCreateConnection($event)\"\r\n class=\"size-full\"\r\n >\r\n <f-background>\r\n <f-circle-pattern color=\"#b5b5b5\"></f-circle-pattern>\r\n </f-background>\r\n <f-canvas fZoom [fZoomMinimum]=\"0.1\" [fZoomMaximum]=\"2\">\r\n <f-connection-for-create fBehavior=\"floating\" fType=\"straight\">\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n </f-connection-for-create>\r\n <f-snap-connection\r\n fBehavior=\"fixed\"\r\n fType=\"segment\"\r\n class=\"z-1\"\r\n [fSnapThreshold]=\"100\"\r\n >\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n </f-snap-connection>\r\n\r\n <f-connection-for-create></f-connection-for-create>\r\n\r\n <!-- Enhanced Connections with Edit Button -->\r\n @for (connection of connectionsComputed(); track connection.id) {\r\n <f-connection\r\n [fReassignDisabled]=\"true\"\r\n [fOutputId]=\"connection.from\"\r\n [fInputId]=\"connection.to\"\r\n fBehavior=\"fixed\"\r\n fType=\"segment\"\r\n [ngClass]=\"{ 'connection-loading': connection.loading, 'z-1': true }\"\r\n >\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.SELECTED_START\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n <svg\r\n viewBox=\"0 0 12 12\"\r\n fMarker\r\n [type]=\"eMarkerType.SELECTED_END\"\r\n [height]=\"12\"\r\n [width]=\"12\"\r\n [refX]=\"6\"\r\n [refY]=\"6\"\r\n >\r\n <circle\r\n cx=\"6\"\r\n cy=\"6\"\r\n r=\"3\"\r\n stroke=\"none\"\r\n fill=\"currentColor\"\r\n ></circle>\r\n </svg>\r\n @if (!readonly()) {\r\n <div\r\n fConnectionCenter\r\n class=\"flex items-center gap-1 bg-content rounded-md p-1 shadow-sm\"\r\n >\r\n @if (!connection.loading) {\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n [icon]=\"'general.edit-05'\"\r\n (click)=\"openConnectionDialog(connection)\"\r\n >\r\n </mt-button>\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n severity=\"danger\"\r\n [icon]=\"'general.trash-01'\"\r\n (click)=\"removeConnection(connection)\"\r\n >\r\n </mt-button>\r\n } @else {\r\n <mt-button\r\n size=\"small\"\r\n variant=\"text\"\r\n [icon]=\"'general.loading-01'\"\r\n >\r\n </mt-button>\r\n }\r\n </div>\r\n }\r\n </f-connection>\r\n }\r\n\r\n <!-- Enhanced Nodes with Edit Button -->\r\n @for (node of nodesWithComputedProps(); track node._computedId) {\r\n <mt-card\r\n fNode\r\n fDragHandle\r\n [fNodePosition]=\"{\r\n x: node.configuration?.x || 200,\r\n y: node.configuration?.y || 100,\r\n }\"\r\n (fNodePositionChange)=\"onNodePositionChange($event, node._computedId)\"\r\n [style.--node-data-border-color]=\"node._computedColor\"\r\n >\r\n <ng-template #headless>\r\n @if (!node.loading) {\r\n <div [attr.dir]=\"contentDirection()\">\r\n <ng-container\r\n [ngTemplateOutlet]=\"\r\n effectiveNodeTemplate() || defaultNodeTemplate\r\n \"\r\n [ngTemplateOutletContext]=\"{\r\n $implicit: node,\r\n node: node,\r\n actions: getFilteredNodeActions(node),\r\n onAction: nodeActionHandler,\r\n dir: contentDirection(),\r\n }\"\r\n >\r\n </ng-container>\r\n </div>\r\n <div\r\n fNodeInput\r\n [fInputId]=\"node._computedId\"\r\n [fInputConnectableSide]=\"configuration().inputSide\"\r\n [fInputMultiple]=\"true\"\r\n [ngClass]=\"configuration().inputSide\"\r\n ></div>\r\n\r\n <div\r\n fNodeOutput\r\n [fOutputId]=\"node._computedId\"\r\n [fOutputConnectableSide]=\"configuration().outputSide\"\r\n [isSelfConnectable]=\"false\"\r\n [fOutputMultiple]=\"true\"\r\n [ngClass]=\"configuration().outputSide\"\r\n class=\"bg-surface-50 dark:bg-surface-900\"\r\n ></div>\r\n } @else {\r\n <p-skeleton height=\"10rem\" width=\"15rem\" />\r\n }\r\n\r\n <!-- Node Header with Edit Button -->\r\n </ng-template>\r\n </mt-card>\r\n }\r\n\r\n <ng-template\r\n #defaultNodeTemplate\r\n let-node\r\n let-actions=\"actions\"\r\n let-onAction=\"onAction\"\r\n >\r\n <div\r\n class=\"flex flex-col items-center min-w-3xs gap-2 px-3 py-4 rounded-t-2xl bg-white dark:bg-surface-800 border-(--p-content-border-color)\"\r\n >\r\n @if (node._computedIcon) {\r\n <mt-icon\r\n class=\"text-2xl text-primary\"\r\n [icon]=\"node._computedIcon\"\r\n />\r\n }\r\n <div>{{ node._computedName }}</div>\r\n </div>\r\n <div\r\n class=\"flex justify-center pt-3 mb-4 gap-2 bg-surface-50 dark:bg-surface-900\"\r\n >\r\n @for (action of actions; track action.key) {\r\n <mt-button\r\n [size]=\"action?.size || 'small'\"\r\n [variant]=\"action?.variant\"\r\n [icon]=\"action?.icon\"\r\n [tooltip]=\"action?.tooltip\"\r\n [severity]=\"action?.severity\"\r\n (onClick)=\"onAction(action, node)\"\r\n >\r\n </mt-button>\r\n }\r\n </div>\r\n </ng-template>\r\n </f-canvas>\r\n </f-flow>\r\n</div>\r\n@if (!readonly()) {\r\n <mt-toolbar />\r\n}\r\n","/*\r\n * Public API Surface of structure-builder\r\n */\r\n\r\nexport * from './lib/structure-builder';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;MA0Ca,uBAAuB,CAAA;AACzB,IAAA,YAAY,GAAiB,MAAM,CAAC,YAAY,CAAC;AAC1D,IAAA,GAAG,GAAa,MAAM,CAAC,QAAQ,CAAC;;IAEvB,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACxE,IAAA,kBAAkB,GAAG,IAAI,WAAW,EAAE;IACtC,QAAQ,GAAiB,EAAE;AAC3B,IAAA,UAAU;AACV,IAAA,IAAI,GAAG,KAAK,CAAiC,IAAI,gDAAC;IAElD,QAAQ,GAAA;QACN,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,IAAI,EAAE;QACvC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,UAAU,IAAI,EAAE;IACjD;IACA,eAAe,GAAA;QACb,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC;IACjD;AACA,IAAA,IAAI,eAAe,GAAA;QACjB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,QAAQ;AACnB,YAAA,IAAI,EAAE,CAAC,IAAA,GAAY,EAAE,KAAK,IAAI,CA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KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,aAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,CAAA,EAAA,kBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CA2BI,YAAY,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,cAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,mBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAEX,cAAc,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpNrE;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/structure-builder",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/structure-builder",
6
6
  "linkDirectory": false,
@@ -20,9 +20,9 @@
20
20
  "tailwindcss": "^4.1.17",
21
21
  "tailwindcss-primeui": "^0.6.1",
22
22
  "dagre": "^0.8.5",
23
- "@masterteam/components": "^0.0.103",
24
- "@masterteam/forms": "^0.0.49",
25
- "@masterteam/icons": "^0.0.13"
23
+ "@masterteam/components": "^0.0.124",
24
+ "@masterteam/icons": "^0.0.14",
25
+ "@masterteam/forms": "^0.0.59"
26
26
  },
27
27
  "sideEffects": false,
28
28
  "exports": {
@@ -6,6 +6,7 @@ import { DrawerService } from '@masterteam/components/dynamic-drawer';
6
6
  import { ModalService } from '@masterteam/components/modal';
7
7
  import { FCanvasComponent, FFlowComponent, FZoomDirective, EFMarkerType, FCreateNodeEvent, FCreateConnectionEvent } from '@foblex/flow';
8
8
  import { DynamicFormConfig } from '@masterteam/components';
9
+ import { FormulaBuilderUiConfig } from '@masterteam/formula-builder';
9
10
 
10
11
  interface Node {
11
12
  configuration?: {
@@ -59,6 +60,10 @@ interface NodeActionEvent {
59
60
  action: Actions;
60
61
  node: AvailableNode;
61
62
  }
63
+ interface NodeDialogFooterConfig {
64
+ showSaveButton?: () => boolean;
65
+ disableSaveButton?: () => boolean;
66
+ }
62
67
  type LayoutDirection = 'TB' | 'LR';
63
68
  type SBActionType = 'createNode' | 'updateNode' | 'deleteNode' | 'createConnection' | 'updateConnection' | 'deleteConnection' | 'startCreating' | 'startUpdating';
64
69
  interface SBAction {
@@ -84,8 +89,10 @@ declare class StructureBuilder {
84
89
  fCanvasComponent: _angular_core.Signal<FCanvasComponent | undefined>;
85
90
  fZoomDirective: _angular_core.Signal<FZoomDirective | undefined>;
86
91
  nodeForm: _angular_core.InputSignal<DynamicFormConfig>;
92
+ nodeDialogFooterConfig: _angular_core.InputSignal<NodeDialogFooterConfig | null>;
87
93
  connectionForm: _angular_core.InputSignal<DynamicFormConfig>;
88
94
  connectionFormulaSchemaId: _angular_core.InputSignal<number | undefined>;
95
+ connectionFormulaConfig: _angular_core.InputSignal<FormulaBuilderUiConfig | null>;
89
96
  nodeActions: _angular_core.InputSignal<Actions[]>;
90
97
  nodeFields: _angular_core.InputSignal<NodeFieldsMapping>;
91
98
  isAutoLayout: _angular_core.InputSignal<boolean>;
@@ -169,8 +176,8 @@ declare class StructureBuilder {
169
176
  private buildAdjacency;
170
177
  private getDescendants;
171
178
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StructureBuilder, never>;
172
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<StructureBuilder, "mt-structure-builder", never, { "availableNodes": { "alias": "availableNodes"; "required": false; "isSignal": true; }; "nodeForm": { "alias": "nodeForm"; "required": false; "isSignal": true; }; "connectionForm": { "alias": "connectionForm"; "required": false; "isSignal": true; }; "connectionFormulaSchemaId": { "alias": "connectionFormulaSchemaId"; "required": false; "isSignal": true; }; "nodeActions": { "alias": "nodeActions"; "required": false; "isSignal": true; }; "nodeFields": { "alias": "nodeFields"; "required": false; "isSignal": true; }; "isAutoLayout": { "alias": "isAutoLayout"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "addModalType": { "alias": "addModalType"; "required": false; "isSignal": true; }; "updateModalType": { "alias": "updateModalType"; "required": false; "isSignal": true; }; "addModalStyleClass": { "alias": "addModalStyleClass"; "required": false; "isSignal": true; }; "updateModalStyleClass": { "alias": "updateModalStyleClass"; "required": false; "isSignal": true; }; "addModalHeader": { "alias": "addModalHeader"; "required": false; "isSignal": true; }; "updateModalHeader": { "alias": "updateModalHeader"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "availableTabsClass": { "alias": "availableTabsClass"; "required": false; "isSignal": true; }; "layoutDirection": { "alias": "layoutDirection"; "required": false; "isSignal": true; }; "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "connections": { "alias": "connections"; "required": false; "isSignal": true; }; "nodeTemplate": { "alias": "nodeTemplate"; "required": false; "isSignal": true; }; }, { "nodeActionsEvent": "nodeActionsEvent"; "action": "action"; "nodes": "nodesChange"; "connections": "connectionsChange"; }, ["nodeDialogTemplate", "nodeTemplateContent"], ["[flowContent]"], true, never>;
179
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StructureBuilder, "mt-structure-builder", never, { "availableNodes": { "alias": "availableNodes"; "required": false; "isSignal": true; }; "nodeForm": { "alias": "nodeForm"; "required": false; "isSignal": true; }; "nodeDialogFooterConfig": { "alias": "nodeDialogFooterConfig"; "required": false; "isSignal": true; }; "connectionForm": { "alias": "connectionForm"; "required": false; "isSignal": true; }; "connectionFormulaSchemaId": { "alias": "connectionFormulaSchemaId"; "required": false; "isSignal": true; }; "connectionFormulaConfig": { "alias": "connectionFormulaConfig"; "required": false; "isSignal": true; }; "nodeActions": { "alias": "nodeActions"; "required": false; "isSignal": true; }; "nodeFields": { "alias": "nodeFields"; "required": false; "isSignal": true; }; "isAutoLayout": { "alias": "isAutoLayout"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "addModalType": { "alias": "addModalType"; "required": false; "isSignal": true; }; "updateModalType": { "alias": "updateModalType"; "required": false; "isSignal": true; }; "addModalStyleClass": { "alias": "addModalStyleClass"; "required": false; "isSignal": true; }; "updateModalStyleClass": { "alias": "updateModalStyleClass"; "required": false; "isSignal": true; }; "addModalHeader": { "alias": "addModalHeader"; "required": false; "isSignal": true; }; "updateModalHeader": { "alias": "updateModalHeader"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "availableTabsClass": { "alias": "availableTabsClass"; "required": false; "isSignal": true; }; "layoutDirection": { "alias": "layoutDirection"; "required": false; "isSignal": true; }; "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "connections": { "alias": "connections"; "required": false; "isSignal": true; }; "nodeTemplate": { "alias": "nodeTemplate"; "required": false; "isSignal": true; }; }, { "nodeActionsEvent": "nodeActionsEvent"; "action": "action"; "nodes": "nodesChange"; "connections": "connectionsChange"; }, ["nodeDialogTemplate", "nodeTemplateContent"], ["[flowContent]"], true, never>;
173
180
  }
174
181
 
175
182
  export { StructureBuilder };
176
- export type { Actions, AvailableNode, Connection, LayoutDirection, Node, NodeActionEvent, NodeFieldsMapping, SBAction, SBActionType };
183
+ export type { Actions, AvailableNode, Connection, LayoutDirection, Node, NodeActionEvent, NodeDialogFooterConfig, NodeFieldsMapping, SBAction, SBActionType };