ngx-t-forms 0.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/fesm2022/{ngx-t-forms-api-value-access-rules.component-4ZPgovTx.mjs → ngx-t-forms-api-value-access-rules.component-pmyW-mx7.mjs} +11 -11
  2. package/fesm2022/{ngx-t-forms-api-value-access-rules.component-4ZPgovTx.mjs.map → ngx-t-forms-api-value-access-rules.component-pmyW-mx7.mjs.map} +1 -1
  3. package/fesm2022/{ngx-t-forms-calculated-field-rules.component-tCsyuHd3.mjs → ngx-t-forms-calculated-field-rules.component-DP1UlCew.mjs} +6 -6
  4. package/fesm2022/{ngx-t-forms-calculated-field-rules.component-tCsyuHd3.mjs.map → ngx-t-forms-calculated-field-rules.component-DP1UlCew.mjs.map} +1 -1
  5. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-C8jU6DUH.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-CbZRg_zQ.mjs} +6 -6
  6. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-CbZRg_zQ.mjs.map +1 -0
  7. package/fesm2022/{ngx-t-forms-form-input-selector.component-6eGpxdN5.mjs → ngx-t-forms-form-input-selector.component-BJm9gyXk.mjs} +5 -5
  8. package/fesm2022/{ngx-t-forms-form-input-selector.component-6eGpxdN5.mjs.map → ngx-t-forms-form-input-selector.component-BJm9gyXk.mjs.map} +1 -1
  9. package/fesm2022/{ngx-t-forms-form-json-view.component-DwEXL85v.mjs → ngx-t-forms-form-json-view.component-BY1A6dqj.mjs} +5 -5
  10. package/fesm2022/{ngx-t-forms-form-json-view.component-DwEXL85v.mjs.map → ngx-t-forms-form-json-view.component-BY1A6dqj.mjs.map} +1 -1
  11. package/fesm2022/{ngx-t-forms-form-section-stepper.component-B5gtKLLC.mjs → ngx-t-forms-form-section-stepper.component-CYUj3li9.mjs} +5 -5
  12. package/fesm2022/ngx-t-forms-form-section-stepper.component-CYUj3li9.mjs.map +1 -0
  13. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-Bo1CKQsC.mjs → ngx-t-forms-forms-builder-menu.component-DBh2XvMV.mjs} +32 -36
  14. package/fesm2022/ngx-t-forms-forms-builder-menu.component-DBh2XvMV.mjs.map +1 -0
  15. package/fesm2022/ngx-t-forms-input-editor.component-Pv9Ka-hF.mjs +136 -0
  16. package/fesm2022/ngx-t-forms-input-editor.component-Pv9Ka-hF.mjs.map +1 -0
  17. package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-DY7Tsn5l.mjs → ngx-t-forms-mat-chip-list-editor.component-BgfStriH.mjs} +10 -9
  18. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-BgfStriH.mjs.map +1 -0
  19. package/fesm2022/{ngx-t-forms-mat-slider-editor.component-Dgd5gyUu.mjs → ngx-t-forms-mat-slider-editor.component-CYyAcNf2.mjs} +5 -5
  20. package/fesm2022/{ngx-t-forms-mat-slider-editor.component-Dgd5gyUu.mjs.map → ngx-t-forms-mat-slider-editor.component-CYyAcNf2.mjs.map} +1 -1
  21. package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-ClM2gqVq.mjs → ngx-t-forms-mat-slider-toggle-editor.component-DFlNcNXN.mjs} +5 -5
  22. package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-ClM2gqVq.mjs.map → ngx-t-forms-mat-slider-toggle-editor.component-DFlNcNXN.mjs.map} +1 -1
  23. package/fesm2022/{ngx-t-forms-missing-form-configs.component-DubPFwTw.mjs → ngx-t-forms-missing-form-configs.component-C5_wwf2z.mjs} +9 -13
  24. package/fesm2022/ngx-t-forms-missing-form-configs.component-C5_wwf2z.mjs.map +1 -0
  25. package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-DtmVJG6v.mjs → ngx-t-forms-mscoa-segment-config.component-DD9mv-Lb.mjs} +5 -5
  26. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-DD9mv-Lb.mjs.map +1 -0
  27. package/fesm2022/{ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs → ngx-t-forms-ngx-t-forms-BiFqmAIA.mjs} +1349 -251
  28. package/fesm2022/ngx-t-forms-ngx-t-forms-BiFqmAIA.mjs.map +1 -0
  29. package/fesm2022/{ngx-t-forms-pipeline-generator.component-DieETx2I.mjs → ngx-t-forms-pipeline-generator.component-DGEidXgr.mjs} +21 -21
  30. package/fesm2022/ngx-t-forms-pipeline-generator.component-DGEidXgr.mjs.map +1 -0
  31. package/fesm2022/{ngx-t-forms-required-inputs.component-Bi1wJdw3.mjs → ngx-t-forms-required-inputs.component-DS-D1d89.mjs} +5 -5
  32. package/fesm2022/{ngx-t-forms-required-inputs.component-Bi1wJdw3.mjs.map → ngx-t-forms-required-inputs.component-DS-D1d89.mjs.map} +1 -1
  33. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-Cd59pfG7.mjs → ngx-t-forms-rest-api-call-setup.component-BY555_zO.mjs} +8 -8
  34. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-Cd59pfG7.mjs.map → ngx-t-forms-rest-api-call-setup.component-BY555_zO.mjs.map} +1 -1
  35. package/fesm2022/{ngx-t-forms-section-report.component-CBXHr1qQ.mjs → ngx-t-forms-section-report.component-CUNhFUtC.mjs} +5 -5
  36. package/fesm2022/{ngx-t-forms-section-report.component-CBXHr1qQ.mjs.map → ngx-t-forms-section-report.component-CUNhFUtC.mjs.map} +1 -1
  37. package/fesm2022/{ngx-t-forms-selection-options-editor.component-DBlBUGkw.mjs → ngx-t-forms-selection-options-editor.component-zg8iAImG.mjs} +5 -5
  38. package/fesm2022/{ngx-t-forms-selection-options-editor.component-DBlBUGkw.mjs.map → ngx-t-forms-selection-options-editor.component-zg8iAImG.mjs.map} +1 -1
  39. package/fesm2022/{ngx-t-forms-validators-config.component-gtr6Ohn3.mjs → ngx-t-forms-validators-config.component-Dt5oXQcY.mjs} +6 -6
  40. package/fesm2022/{ngx-t-forms-validators-config.component-gtr6Ohn3.mjs.map → ngx-t-forms-validators-config.component-Dt5oXQcY.mjs.map} +1 -1
  41. package/fesm2022/ngx-t-forms.mjs +1 -1
  42. package/lib/components/form-builder/elements/form-section-stepper/form-section-stepper.component.d.ts +2 -92
  43. package/lib/components/form-builder/elements/forms-builder-menu/forms-builder-menu.component.d.ts +30 -12
  44. package/lib/components/form-builder/elements/input-element-editor/input-element-editor.component.d.ts +18 -16
  45. package/lib/components/form-builder/elements/missing-form-configs/missing-form-configs.component.d.ts +2 -2
  46. package/lib/components/forms/store/Forms-selectors.d.ts +2 -23
  47. package/lib/components/forms/store/forms-store.service.d.ts +2 -23
  48. package/lib/components/t-dynamic-data-edit/elements/config-mscoa-additional-inputs/config-mscoa-additional-inputs.component.d.ts +1 -1
  49. package/lib/components/t-dynamic-data-edit/elements/mat-chip-list-editor/mat-chip-list-editor.component.d.ts +2 -1
  50. package/lib/components/t-dynamic-data-edit/elements/mscoa-segment-config/mscoa-segment-config.component.d.ts +4 -4
  51. package/lib/components/t-dynamic-data-edit/elements/pipeline-generator/pipeline-generator.component.d.ts +2 -2
  52. package/lib/components/t-dynamic-data-edit/elements/t-workflow-picker/t-workflow-picker.component.d.ts +1 -1
  53. package/lib/components/t-dynamic-data-edit/t-dynamic-data-edit.component.d.ts +15 -8
  54. package/lib/services/core/t-form-tower-controller/functions/prePoPulateForm.d.ts +1 -84
  55. package/package.json +2 -2
  56. package/testForm.d.ts +797 -0
  57. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-C8jU6DUH.mjs.map +0 -1
  58. package/fesm2022/ngx-t-forms-form-section-stepper.component-B5gtKLLC.mjs.map +0 -1
  59. package/fesm2022/ngx-t-forms-forms-builder-menu.component-Bo1CKQsC.mjs.map +0 -1
  60. package/fesm2022/ngx-t-forms-input-editor.component-C1kH_GDD.mjs +0 -126
  61. package/fesm2022/ngx-t-forms-input-editor.component-C1kH_GDD.mjs.map +0 -1
  62. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-DY7Tsn5l.mjs.map +0 -1
  63. package/fesm2022/ngx-t-forms-missing-form-configs.component-DubPFwTw.mjs.map +0 -1
  64. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-DtmVJG6v.mjs.map +0 -1
  65. package/fesm2022/ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs.map +0 -1
  66. package/fesm2022/ngx-t-forms-pipeline-generator.component-DieETx2I.mjs.map +0 -1
@@ -6,7 +6,7 @@ import * as i1 from '@angular/forms';
6
6
  import { Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
7
7
  import { Subscription, debounceTime, BehaviorSubject, switchMap, map, take, catchError, finalize, throwError, tap, combineLatest, filter, Subject, takeUntil, distinctUntilChanged } from 'rxjs';
8
8
  import PipelineBuilder from 'db-aggregation-pipeline-builder';
9
- import { M as MatModulesModule, N as NGX_T_FORMS_CONFIG_TOKEN, b as TDynamicDataViewComponent, D as DaysAgoPipe } from './ngx-t-forms-ngx-t-forms-B-w5W1gG.mjs';
9
+ import { M as MatModulesModule, N as NGX_T_FORMS_CONFIG_TOKEN, b as TDynamicDataViewComponent, D as DaysAgoPipe } from './ngx-t-forms-ngx-t-forms-BiFqmAIA.mjs';
10
10
  import * as i5 from '@angular/material/icon';
11
11
  import * as i2$1 from '@angular/material/core';
12
12
  import * as i3 from '@angular/material/button';
@@ -21,7 +21,7 @@ import * as i6 from '@angular/material/list';
21
21
  import * as i8$1 from '@angular/material/progress-spinner';
22
22
  import * as i9 from '@angular/material/toolbar';
23
23
  import { HttpClient } from '@angular/common/http';
24
- import * as i3$2 from '@angular/material/expansion';
24
+ import * as i4$2 from '@angular/material/expansion';
25
25
 
26
26
  class JsonEditorComponent {
27
27
  constructor(fb) {
@@ -100,10 +100,10 @@ class JsonEditorComponent {
100
100
  const end = Math.min(value.length, position + excerptLength);
101
101
  return value.substring(start, end);
102
102
  }
103
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: JsonEditorComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
104
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: JsonEditorComponent, isStandalone: true, selector: "app-json-editor", inputs: { value: "value" }, outputs: { valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"json-editor-container\">\n <div *ngIf=\"jsonForm.invalid\" \n style=\"margin-top: 16px;\"\n class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span> Paste or type JSON below. The editor will auto-beautify the text.</span>\n </div>\n\n\n \n <!-- Error message if JSON is invalid -->\n <div *ngIf=\"errorMessage\" \n \n style=\"\" class=\"tree-instructions json-error \">\n <span> {{errorMessage}}</span>\n </div>\n \n <form [formGroup]=\"jsonForm\">\n <textarea\n formControlName=\"jsonText\"\n class=\"json-textarea\"\n [class.error-message]=\"errorMessage\"\n rows=\"15\"\n placeholder=\"Enter your JSON here...\"></textarea>\n </form>\n <!-- JSON Textarea -->\n\n</div>\n", styles: [".json-editor-container{max-width:800px;margin:0 auto;border-radius:5px}.json-editor-container h1{font-size:24px;color:#333}.json-editor-container .lead{font-size:.9 rem;margin-bottom:10px;padding-left:16px}.json-editor-container .json-textarea{width:calc(100% - 24px);padding:12px;font-size:14px;color:#333;background-color:#fff;border:1px solid #ccc;border-radius:5px;font-family:Courier New,Courier,monospace}.json-editor-container .json-textarea:focus{outline:none;border-color:var(--ion-color-primary)}.error-message{border:solid 1px #e74c3c!important}.tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;border-radius:4px;margin-bottom:0;background:azure}.json-error{background:inherit;color:#e74c3c;margin-bottom:4px}.info-icon{width:38px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
103
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: JsonEditorComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
104
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: JsonEditorComponent, isStandalone: true, selector: "app-json-editor", inputs: { value: "value" }, outputs: { valueChange: "valueChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"json-editor-container\">\n <div *ngIf=\"jsonForm.invalid\" \n style=\"margin-top: 16px;\"\n class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span> Paste or type JSON below. The editor will auto-beautify the text.</span>\n </div>\n\n\n \n <!-- Error message if JSON is invalid -->\n <div *ngIf=\"errorMessage\" \n \n style=\"\" class=\"tree-instructions json-error \">\n <span> {{errorMessage}}</span>\n </div>\n \n <form [formGroup]=\"jsonForm\">\n <textarea\n formControlName=\"jsonText\"\n class=\"json-textarea\"\n [class.error-message]=\"errorMessage\"\n rows=\"15\"\n placeholder=\"Enter your JSON here...\"></textarea>\n </form>\n <!-- JSON Textarea -->\n\n</div>\n", styles: [".json-editor-container{max-width:800px;margin:0 auto;border-radius:5px}.json-editor-container h1{font-size:24px;color:#333}.json-editor-container .lead{font-size:.9 rem;margin-bottom:10px;padding-left:16px}.json-editor-container .json-textarea{width:calc(100% - 24px);padding:12px;font-size:14px;color:#333;background-color:#fff;border:1px solid #ccc;border-radius:5px;font-family:Courier New,Courier,monospace}.json-editor-container .json-textarea:focus{outline:none;border-color:var(--ion-color-primary)}.error-message{border:solid 1px #e74c3c!important}.tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;border-radius:4px;margin-bottom:0;background:azure}.json-error{background:inherit;color:#e74c3c;margin-bottom:4px}.info-icon{width:38px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
105
105
  }
106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: JsonEditorComponent, decorators: [{
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: JsonEditorComponent, decorators: [{
107
107
  type: Component,
108
108
  args: [{ selector: 'app-json-editor', standalone: true, imports: [
109
109
  CommonModule,
@@ -210,10 +210,10 @@ class AggregateStageEditorComponent {
210
210
  deleteActive() {
211
211
  this.deleteStage.emit();
212
212
  }
213
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AggregateStageEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
214
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: AggregateStageEditorComponent, isStandalone: true, selector: "app-aggregate-stage-editor", inputs: { selectedStage: "selectedStage", isRunningPipeline: "isRunningPipeline" }, outputs: { saveStage: "saveStage", deleteStage: "deleteStage" }, ngImport: i0, template: "<mat-card style=\"margin-bottom:8px\">\n <mat-card-content>\n\n <h5>\n Aggregate Pipeline Stage Configuration\n </h5>\n\n\n\n <mat-form-field style=\" margin-bottom: 8px;\" appearance=\"outline\">\n <mat-label>Select Aggregate Stage</mat-label>\n <mat-select matNativeControl [value]=\"selectedStage?.name\" (selectionChange)=\"handleChange($event)\"\n placeholder=\"ChooseFunctionToRun\">\n <mat-option *ngFor=\"let stage of allowedStages; trackBy: trackByStage\" [value]=\"stage.stage\">\n {{stage.stage}}</mat-option>\n\n\n\n </mat-select>\n <mat-hint>\n {{activeDescription ?\n 'Hover over the info icon to view stage details .'\n : 'Please select an aggregation function from the list.'}}\n </mat-hint>\n <mat-hint *ngIf=\"activeDescription\" align=\"end\">\n <mat-icon matTooltipHideDelay=\"1000\" [matTooltip]=\"activeDescription\" matSuffix>info</mat-icon>\n </mat-hint>\n </mat-form-field>\n\n\n\n <div class=\"tree-instructions\" style=\"background: cornsilk;\" *ngIf=\"configValidationError\">\n <mat-icon style=\"margin-top: 4px;margin-bottom:auto\" class=\"info-icon\" color=\"warn\">warning</mat-icon>\n <span>{{ configValidationError }}</span>\n </div>\n\n\n\n\n\n <div class=\"config-container\" *ngIf=\"activeStage ||selectedStage?.config\">\n <app-json-editor [value]=\"selectedStage?.config\" (valueChange)=\"handleConfigChange($event)\"></app-json-editor>\n </div>\n\n <br>\n\n\n\n </mat-card-content>\n <mat-divider>\n </mat-divider>\n <mat-card-actions>\n\n <span class=\"spacer\"></span>\n <button color=\"warn\" [disabled]=\"isRunningPipeline\" mat-button (click)=\"deleteActive()\">\n Delete\n <mat-icon >delete</mat-icon>\n </button>\n <button style=\"margin-left:8px;\" color=\"primary\" mat-flat-button (click)=\"saveConfiguration()\"\n [disabled]=\"isRunningPipeline ||!activeStage?.valid \">\n Save\n <mat-icon> save</mat-icon>\n </button>\n </mat-card-actions>\n</mat-card>", styles: [".title-icon{margin-right:8px;vertical-align:middle}.tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;background:var(--mdc-elevated-card-container-color, var(--mat-app-surface-container-low));border-radius:4px;margin-bottom:16px}.info-icon{min-width:38px!important;display:block}mat-form-field{min-width:100%;background:azure}.stageDescription{background:azure}.stage-button-container{display:flex;gap:4px;width:fit-content;align-items:center}.tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;background:azure;border-radius:4px;margin-bottom:16px}.info-icon{min-width:38px;margin:8px auto auto}\n"], dependencies: [{ kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: JsonEditorComponent, selector: "app-json-editor", inputs: ["value"], outputs: ["valueChange"] }] }); }
213
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AggregateStageEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
214
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: AggregateStageEditorComponent, isStandalone: true, selector: "app-aggregate-stage-editor", inputs: { selectedStage: "selectedStage", isRunningPipeline: "isRunningPipeline" }, outputs: { saveStage: "saveStage", deleteStage: "deleteStage" }, ngImport: i0, template: "<mat-card style=\"margin-bottom:8px\">\n <mat-card-content>\n\n <h5>\n Aggregate Pipeline Stage Configuration\n </h5>\n\n\n\n <mat-form-field style=\" margin-bottom: 8px;\" appearance=\"outline\">\n <mat-label>Select Aggregate Stage</mat-label>\n <mat-select matNativeControl [value]=\"selectedStage?.name\" (selectionChange)=\"handleChange($event)\"\n placeholder=\"ChooseFunctionToRun\">\n <mat-option *ngFor=\"let stage of allowedStages; trackBy: trackByStage\" [value]=\"stage.stage\">\n {{stage.stage}}</mat-option>\n\n\n\n </mat-select>\n <mat-hint>\n {{activeDescription ?\n 'Hover over the info icon to view stage details .'\n : 'Please select an aggregation function from the list.'}}\n </mat-hint>\n <mat-hint *ngIf=\"activeDescription\" align=\"end\">\n <mat-icon matTooltipHideDelay=\"1000\" [matTooltip]=\"activeDescription\" matSuffix>info</mat-icon>\n </mat-hint>\n </mat-form-field>\n\n\n\n <div class=\"tree-instructions\" style=\"background: cornsilk;\" *ngIf=\"configValidationError\">\n <mat-icon style=\"margin-top: 4px;margin-bottom:auto\" class=\"info-icon\" color=\"warn\">warning</mat-icon>\n <span>{{ configValidationError }}</span>\n </div>\n\n\n\n\n\n <div class=\"config-container\" *ngIf=\"activeStage ||selectedStage?.config\">\n <app-json-editor [value]=\"selectedStage?.config\" (valueChange)=\"handleConfigChange($event)\"></app-json-editor>\n </div>\n\n <br>\n\n\n\n </mat-card-content>\n <mat-divider>\n </mat-divider>\n <mat-card-actions>\n\n <span class=\"spacer\"></span>\n <button color=\"warn\" [disabled]=\"isRunningPipeline\" mat-button (click)=\"deleteActive()\">\n Delete\n <mat-icon >delete</mat-icon>\n </button>\n <button style=\"margin-left:8px;\" color=\"primary\" mat-flat-button (click)=\"saveConfiguration()\"\n [disabled]=\"isRunningPipeline ||!activeStage?.valid \">\n Save\n <mat-icon> save</mat-icon>\n </button>\n </mat-card-actions>\n</mat-card>", styles: [".title-icon{margin-right:8px;vertical-align:middle}.tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;background:var(--mdc-elevated-card-container-color, var(--mat-app-surface-container-low));border-radius:4px;margin-bottom:16px}.info-icon{min-width:38px!important;display:block}mat-form-field{min-width:100%;background:azure}.stageDescription{background:azure}.stage-button-container{display:flex;gap:4px;width:fit-content;align-items:center}.tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;background:azure;border-radius:4px;margin-bottom:16px}.info-icon{min-width:38px;margin:8px auto auto}\n"], dependencies: [{ kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3$1.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: JsonEditorComponent, selector: "app-json-editor", inputs: ["value"], outputs: ["valueChange"] }] }); }
215
215
  }
216
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: AggregateStageEditorComponent, decorators: [{
216
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AggregateStageEditorComponent, decorators: [{
217
217
  type: Component,
218
218
  args: [{ selector: 'app-aggregate-stage-editor', standalone: true, imports: [
219
219
  MatModulesModule,
@@ -233,7 +233,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
233
233
 
234
234
  class TWorkflowPickerComponent {
235
235
  set getWorkflowOptions(value) {
236
- if (value.length === this._workflowOptions.length && value.every((workflow, index) => workflow.id === this._workflowOptions[index]?.id)) {
236
+ if (value?.length === this._workflowOptions?.length && value?.every((workflow, index) => workflow.id === this._workflowOptions?.[index]?.id)) {
237
237
  return;
238
238
  }
239
239
  this._workflowOptions = value;
@@ -248,7 +248,7 @@ class TWorkflowPickerComponent {
248
248
  ngOnInit() {
249
249
  }
250
250
  get workflowOptions() {
251
- return this._workflowOptions;
251
+ return this._workflowOptions || [];
252
252
  }
253
253
  unbindInput() {
254
254
  this.value = undefined;
@@ -258,12 +258,12 @@ class TWorkflowPickerComponent {
258
258
  this.valueChanged.emit(workflow.id);
259
259
  }
260
260
  get selectedWorkflow() {
261
- return this._workflowOptions.find((workflow) => workflow.id === this.value);
261
+ return this._workflowOptions?.find((workflow) => workflow.id === this.value);
262
262
  }
263
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TWorkflowPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
264
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: TWorkflowPickerComponent, isStandalone: true, selector: "lib-t-workflow-picker", inputs: { getWorkflowOptions: "getWorkflowOptions", value: "value" }, outputs: { valueChanged: "valueChanged" }, ngImport: i0, template: "@if (error) {\r\n<mat-toolbar>\r\n <span>\r\n Failed to load workflow list\r\n </span>\r\n <span class=\"spacer\"></span>\r\n <button color=\"primary\" mat-raised-button>\r\n Retry\r\n\r\n </button>\r\n</mat-toolbar>\r\n}\r\n@if(loading){\r\n<div class=\"loadingContainer\">\r\n <mat-spinner></mat-spinner>\r\n</div>\r\n}\r\n@if(!loading&& !error){\r\n<mat-card>\r\n <mat-nav-list style=\"padding: 0px;\">\r\n @if(!value){\r\n @for (option of workflowOptions; track option.id) {\r\n <mat-list-item (click)=\"bindInput(option)\">\r\n\r\n <mat-chip class=\"docType\" [style.background]=\" option['isDocument'] ? 'lightskyblue' : ''\" matListItemIcon>\r\n <span style=\"font-size: 10px;\">\r\n {{ option[\"isDocument\"] ? \"DOC\" : \"FLOW\" }}\r\n </span>\r\n </mat-chip>\r\n\r\n\r\n <div matListItemTitle>\r\n <div>\r\n {{ option.name }}\r\n </div>\r\n\r\n <div style=\"font-size: 13px; opacity: 0.6;line-height:normal\">\r\n {{ option[\"createdAt\"] | date: \"medium\" }} &nbsp;\r\n {{ option.numberOfSteps }}\r\n </div>\r\n </div>\r\n <button matListItemMeta mat-icon-button>\r\n <mat-icon>\r\n radio_button_unchecked\r\n </mat-icon>\r\n </button>\r\n\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n }\r\n @if(value){\r\n <mat-list-item (click)=\" unbindInput() \">\r\n\r\n <mat-chip class=\"docType\" [style.background]=\"selectedWorkflow?.['isDocument'] ? 'lightskyblue' : ''\" matListItemIcon>\r\n <span style=\"font-size: 10px;\">\r\n {{selectedWorkflow?.[\"isDocument\"] ? \"DOC\" : \"FLOW\" }}\r\n </span>\r\n </mat-chip>\r\n \r\n \r\n <div matListItemTitle>\r\n <div>\r\n {{ selectedWorkflow?.name }}\r\n </div>\r\n \r\n <div style=\"font-size: 13px; opacity: 0.6;line-height:normal\">\r\n {{selectedWorkflow?.[\"createdAt\"] | date: \"medium\" }} &nbsp;\r\n {{ selectedWorkflow?.numberOfSteps }}\r\n </div>\r\n </div>\r\n <button matListItemMeta mat-icon-button>\r\n <mat-icon color=\"primary\">\r\n check_circle\r\n </mat-icon>\r\n </button>\r\n \r\n </mat-list-item>\r\n }\r\n\r\n\r\n </mat-nav-list>\r\n</mat-card>\r\n\r\n}", styles: [".suggestion-container{display:flex;width:100%;gap:14px}.docType{width:min-content;margin-top:auto!important;margin-bottom:auto!important}mat-card{margin-bottom:8px;background:var(--mat-toolbar-container-background-color, var(--mat-app-surface))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i4$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i6.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "component", type: i8$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }] }); }
263
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TWorkflowPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
264
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: TWorkflowPickerComponent, isStandalone: true, selector: "lib-t-workflow-picker", inputs: { getWorkflowOptions: "getWorkflowOptions", value: "value" }, outputs: { valueChanged: "valueChanged" }, ngImport: i0, template: "@if (error) {\r\n<mat-toolbar>\r\n <span>\r\n Failed to load workflow list\r\n </span>\r\n <span class=\"spacer\"></span>\r\n <button color=\"primary\" mat-raised-button>\r\n Retry\r\n\r\n </button>\r\n</mat-toolbar>\r\n}\r\n@if(loading){\r\n<div class=\"loadingContainer\">\r\n <mat-spinner></mat-spinner>\r\n</div>\r\n}\r\n@if(!loading&& !error){\r\n<mat-card>\r\n <mat-nav-list style=\"padding: 0px;\">\r\n @if(!value){\r\n @for (option of workflowOptions; track option.id) {\r\n <mat-list-item (click)=\"bindInput(option)\">\r\n\r\n <mat-chip class=\"docType\" [style.background]=\" option['isDocument'] ? 'lightskyblue' : ''\" matListItemIcon>\r\n <span style=\"font-size: 10px;\">\r\n {{ option[\"isDocument\"] ? \"DOC\" : \"FLOW\" }}\r\n </span>\r\n </mat-chip>\r\n\r\n\r\n <div matListItemTitle>\r\n <div>\r\n {{ option.name }}\r\n </div>\r\n\r\n <div style=\"font-size: 13px; opacity: 0.6;line-height:normal\">\r\n {{ option[\"createdAt\"] | date: \"medium\" }} &nbsp;\r\n {{ option.numberOfSteps }}\r\n </div>\r\n </div>\r\n <button matListItemMeta mat-icon-button>\r\n <mat-icon>\r\n radio_button_unchecked\r\n </mat-icon>\r\n </button>\r\n\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n }\r\n @if(value){\r\n <mat-list-item (click)=\" unbindInput() \">\r\n\r\n <mat-chip class=\"docType\" [style.background]=\"selectedWorkflow?.['isDocument'] ? 'lightskyblue' : ''\" matListItemIcon>\r\n <span style=\"font-size: 10px;\">\r\n {{selectedWorkflow?.[\"isDocument\"] ? \"DOC\" : \"FLOW\" }}\r\n </span>\r\n </mat-chip>\r\n \r\n \r\n <div matListItemTitle>\r\n <div>\r\n {{ selectedWorkflow?.name }}\r\n </div>\r\n \r\n <div style=\"font-size: 13px; opacity: 0.6;line-height:normal\">\r\n {{selectedWorkflow?.[\"createdAt\"] | date: \"medium\" }} &nbsp;\r\n {{ selectedWorkflow?.numberOfSteps }}\r\n </div>\r\n </div>\r\n <button matListItemMeta mat-icon-button>\r\n <mat-icon color=\"primary\">\r\n check_circle\r\n </mat-icon>\r\n </button>\r\n \r\n </mat-list-item>\r\n }\r\n\r\n\r\n </mat-nav-list>\r\n</mat-card>\r\n\r\n}", styles: [".suggestion-container{display:flex;width:100%;gap:14px}.docType{width:min-content;margin-top:auto!important;margin-bottom:auto!important}mat-card{margin-bottom:8px;background:var(--mat-toolbar-container-background-color, var(--mat-app-surface))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i4$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i6.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "component", type: i8$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }] }); }
265
265
  }
266
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: TWorkflowPickerComponent, decorators: [{
266
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TWorkflowPickerComponent, decorators: [{
267
267
  type: Component,
268
268
  args: [{ selector: 'lib-t-workflow-picker', standalone: true, imports: [CommonModule, MatModulesModule], template: "@if (error) {\r\n<mat-toolbar>\r\n <span>\r\n Failed to load workflow list\r\n </span>\r\n <span class=\"spacer\"></span>\r\n <button color=\"primary\" mat-raised-button>\r\n Retry\r\n\r\n </button>\r\n</mat-toolbar>\r\n}\r\n@if(loading){\r\n<div class=\"loadingContainer\">\r\n <mat-spinner></mat-spinner>\r\n</div>\r\n}\r\n@if(!loading&& !error){\r\n<mat-card>\r\n <mat-nav-list style=\"padding: 0px;\">\r\n @if(!value){\r\n @for (option of workflowOptions; track option.id) {\r\n <mat-list-item (click)=\"bindInput(option)\">\r\n\r\n <mat-chip class=\"docType\" [style.background]=\" option['isDocument'] ? 'lightskyblue' : ''\" matListItemIcon>\r\n <span style=\"font-size: 10px;\">\r\n {{ option[\"isDocument\"] ? \"DOC\" : \"FLOW\" }}\r\n </span>\r\n </mat-chip>\r\n\r\n\r\n <div matListItemTitle>\r\n <div>\r\n {{ option.name }}\r\n </div>\r\n\r\n <div style=\"font-size: 13px; opacity: 0.6;line-height:normal\">\r\n {{ option[\"createdAt\"] | date: \"medium\" }} &nbsp;\r\n {{ option.numberOfSteps }}\r\n </div>\r\n </div>\r\n <button matListItemMeta mat-icon-button>\r\n <mat-icon>\r\n radio_button_unchecked\r\n </mat-icon>\r\n </button>\r\n\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n }\r\n @if(value){\r\n <mat-list-item (click)=\" unbindInput() \">\r\n\r\n <mat-chip class=\"docType\" [style.background]=\"selectedWorkflow?.['isDocument'] ? 'lightskyblue' : ''\" matListItemIcon>\r\n <span style=\"font-size: 10px;\">\r\n {{selectedWorkflow?.[\"isDocument\"] ? \"DOC\" : \"FLOW\" }}\r\n </span>\r\n </mat-chip>\r\n \r\n \r\n <div matListItemTitle>\r\n <div>\r\n {{ selectedWorkflow?.name }}\r\n </div>\r\n \r\n <div style=\"font-size: 13px; opacity: 0.6;line-height:normal\">\r\n {{selectedWorkflow?.[\"createdAt\"] | date: \"medium\" }} &nbsp;\r\n {{ selectedWorkflow?.numberOfSteps }}\r\n </div>\r\n </div>\r\n <button matListItemMeta mat-icon-button>\r\n <mat-icon color=\"primary\">\r\n check_circle\r\n </mat-icon>\r\n </button>\r\n \r\n </mat-list-item>\r\n }\r\n\r\n\r\n </mat-nav-list>\r\n</mat-card>\r\n\r\n}", styles: [".suggestion-container{display:flex;width:100%;gap:14px}.docType{width:min-content;margin-top:auto!important;margin-bottom:auto!important}mat-card{margin-bottom:8px;background:var(--mat-toolbar-container-background-color, var(--mat-app-surface))}\n"] }]
269
269
  }], ctorParameters: () => [], propDecorators: { getWorkflowOptions: [{
@@ -518,10 +518,10 @@ class PipelineService {
518
518
  };
519
519
  }));
520
520
  }
521
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: PipelineService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
522
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: PipelineService, providedIn: 'root' }); }
521
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PipelineService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
522
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PipelineService, providedIn: 'root' }); }
523
523
  }
524
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: PipelineService, decorators: [{
524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PipelineService, decorators: [{
525
525
  type: Injectable,
526
526
  args: [{
527
527
  providedIn: 'root'
@@ -737,10 +737,10 @@ class PipelineGeneratorComponent {
737
737
  this.pipeline.saveStage(index, stage);
738
738
  this.setActiveStage(undefined);
739
739
  }
740
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: PipelineGeneratorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
741
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: PipelineGeneratorComponent, isStandalone: true, selector: "app-pipeline-generator", inputs: { value: "value", getWorkflowOptions: "getWorkflowOptions", userName: "userName", errors: "errors" }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: PipelineGeneratorComponent }], viewQueries: [{ propertyName: "textareaElementRef", first: true, predicate: ["textarea"], descendants: true, read: ElementRef }], ngImport: i0, template: "@if(!!loadingWorkflowOptions){\n<div style=\"display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 24px;\">\n <mat-spinner style=\"margin-bottom: 16px;\"></mat-spinner>\n <p>\n Loading workflows...\n </p>\n</div>\n}\n\n@if(!loadingWorkflowOptions){\n<section class=\"ion-margin\">\n <p>MongoDB aggregation pipeline builder for selected workflows. </p>\n</section>\n<lib-t-workflow-picker \n(valueChanged)=\"workflowChanged($event)\" \n[getWorkflowOptions]=\" workflowOptions\"\n [value]=\"workflowId|async\">\n</lib-t-workflow-picker>\n<mat-accordion multi *ngIf=\"workflowId|async\">\n <!-- Pipeline Accordion -->\n <mat-expansion-panel value=\"pipeline\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-spinner color=\"accent\" *ngIf=\"isRunningPipeline\" class=\"header-spinner\"></mat-spinner>\n <mat-icon class=\"title-icon\">\n dynamic_form\n </mat-icon>\n {{isRunningPipeline?'Executing current Data pipeline...':'Data retrieval pipeline'}}\n </mat-panel-title>\n\n </mat-expansion-panel-header>\n <div class=\"content\">\n <!-- Mongodb aggregate pipelione stages management and edit start-->\n <div *ngIf=\"((stages | async)?.length || 0) ===0\" class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>\n Add stages to the pipeline below.<br>\n Each stage processes input documents by filtering, grouping, or calculating values. The output documents from\n one stage are passed to the next stage in the pipeline.\n </span>\n </div>\n\n <mat-nav-list style=\" background: var(--mat-tree-container-background-color);padding:0px;border-radius:8px\">\n\n\n <ng-container *ngFor=\"let stage of stages | async; trackBy: trackById;index as $index;last as isLast\">\n <mat-list-item [style.margin-top]=\"(activeStageIndex|async) ===$index?'4px':'0px'\"\n [class.mat-elevation-z8]=\"(activeStageIndex|async) ===$index\" class=\"stage-item\"\n (click)=\"setActiveStage($index)\" [activated]=\" (activeStageIndex|async) ===$index\">\n <span class=\"stage-index\" matListItemAvatar>{{$index + 1}} </span>\n <div matListItemTitle>\n <div style=\"line-height: normal;\">\n {{ stage.name || 'Stage ' }}\n </div>\n <div class=\"stage-inner-message\" *ngIf=\"!stage.name && (activeStageIndex|async) !==$index \">\n Incomplete , click to edit\n </div>\n\n </div>\n\n <button *ngIf=\"(activeStageIndex|async) ===$index||!stage.valid && (activeStageIndex|async) !==$index\"\n mat-icon-button matListItemMeta>\n <mat-icon color=\"primary\" *ngIf=\"(activeStageIndex|async) ===$index\">check_circle</mat-icon>\n\n <mat-icon color=\"warn\" *ngIf=\"!stage.valid && (activeStageIndex|async) !==$index\">\n warning\n </mat-icon>\n </button>\n </mat-list-item>\n <mat-divider></mat-divider>\n\n <app-aggregate-stage-editor [selectedStage]=\"stage\" [isRunningPipeline]=\"isRunningPipeline\"\n (deleteStage)=\"deleteStage($index)\" (saveStage)=\"saveStage($index,$event)\"\n *ngIf=\"(activeStageIndex|async) ===$index\"></app-aggregate-stage-editor>\n\n\n </ng-container>\n\n <mat-toolbar style=\"padding: 0px;\">\n\n <span class=\"spacer\"></span>\n <button class=\"stage-button\" [disabled]=\"isRunningPipeline\" color=\"primary\" (click)=\"addStage()\"\n mat-raised-button>\n Add\n <mat-icon>add</mat-icon>\n </button>\n </mat-toolbar>\n </mat-nav-list>\n\n <!-- Mongodb aggregate pipelione stages management and edit end -->\n </div>\n </mat-expansion-panel>\n\n <!-- Results Accordion -->\n <mat-expansion-panel value=\"results\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-spinner color=\"accent\" *ngIf=\"isRunningPipeline\" class=\"header-spinner\"></mat-spinner>\n <mat-icon class=\"title-icon\">dataset</mat-icon>\n {{isRunningPipeline?'Running pipeline...':'Data Results'}}\n </mat-panel-title>\n </mat-expansion-panel-header>\n <div class=\"content\">\n <ng-container *ngIf=\"pipeLineResults | async as results; else noResults\">\n\n <lib-t-dynamic-data-view *ngIf=\"results\" [data]=\"results\"></lib-t-dynamic-data-view>\n <p *ngIf=\"!results\" color=\"medium\">\n\n No results available\n\n </p>\n\n </ng-container>\n <ng-template #noResults>\n <p color=\"medium\">No results available</p>\n </ng-template>\n </div>\n </mat-expansion-panel>\n\n <!-- AI Agent Accordion -->\n <mat-expansion-panel value=\"ai\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-spinner *ngIf=\" aiIsGeneratingPipeline \" style=\"position: absolute;\" class=\"header-spinner\"></mat-spinner>\n <mat-icon class=\"title-icon\">tips_and_updates</mat-icon>\n {{ aiIsGeneratingPipeline ? 'Agent busy ...' : 'AI AGENT prompt' }}\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n @if( schemaLoadError$ | async){\n <div class=\"tree-instructions\" style=\"background: antiquewhite !important;\">\n <mat-icon class=\"info-icon\" color=\"warn\">error</mat-icon>\n <span> {{ schemaLoadError$ | async }}</span>\n </div>\n \n }\n <mat-list *ngFor=\"let chat of chatHistory|async;\">\n\n <mat-list-item class=\"chatContent chatItem\">\n <div class=\"chat\" style=\"background:bisque;text-align:end;\n border-radius: 18px 18px 0px 18px;\" matListItemTitle>\n <div>\n {{chat.user}}\n </div>\n <div style=\"opacity:0.6;line-height: normal;display: flex;align-items: center;justify-content: flex-end;\">\n {{chat.date|daysAgo}}\n <mat-icon class=\"sent-icon\">\n done_all\n </mat-icon>\n </div>\n </div>\n </mat-list-item>\n\n <mat-list-item style=\"margin-top: 16px;\" class=\"chatContent chatItem\" color=\"light\" lines=\"full\">\n <mat-icon style=\" margin-left: 0px;\n margin-top: 16px;\n margin-bottom: auto;\" matListItemIcon>smart_toy</mat-icon>\n <div class=\"chat\" style=\"text-align: left; \n padding-left: 16px; \n background: azure;\n border-radius: 0px 18px 18px 18px;\" *ngIf=\"!chat.assistance?.error\" matListItemTitle>\n <pre>\n {{chat. assistance.pipeline |json}}\n </pre>\n </div>\n <div *ngIf=\"chat.assistance?.error\" matListItemTitle>\n {{chat.assistance.error}}\n </div>\n </mat-list-item>\n\n\n </mat-list>\n <mat-list>\n <mat-list-item class=\"chatContent chatItem\">\n <textarea matListItemTitle #textarea style=\" width: calc(100% - 13px);\n border-radius: 14px;\n padding-right: 3px;\n padding-left: 8px;\" class=\"chat\" [value]=\" prompt|async\" (input)=\"onTextChange($event)\"\n placeholder=\"Provide a pipeline generation prompt\"></textarea>\n <button matListItemMeta style=\" margin-left: 4px;\n margin-right: 0px;\" color=\"primary\" mat-mini-fab [disabled]=\"aiIsGeneratingPipeline\" (click)=\"promptSubmit()\">\n\n <mat-icon style=\"margin: 0px !important;color:white\">send</mat-icon>\n <mat-spinner color=\"accent\" *ngIf=\" aiIsGeneratingPipeline \" \n class=\"submit-spinner\" ></mat-spinner>\n </button>\n \n </mat-list-item>\n\n </mat-list>\n\n\n <section *ngIf=\"showSuggestions\" class=\"showSuggestionContainer\">\n <!-- <mat-toolbar class=\"search-container\" style=\"background: inherit;\">\n\n\n <input type=\"search\" placeholder=\"Search options\" class=\"search-field\" (change)=\"onSearchChange($event)\">\n\n <mat-icon>\n search\n </mat-icon>\n </mat-toolbar> -->\n <mat-divider></mat-divider>\n <div style=\"padding: 8px;\">\n <div class=\"suggestion-container\">\n <div class=\"suggestion-column\">\n <h5>Collection document properties</h5>\n <div class=\"button-container\">\n <button *ngFor=\"let method of getSchemaProperties | async;trackBy: trackById\"\n (click)=\"selectSuggestionInput(method.value)\" color=\"accent\" mat-flat-button\n class=\"suggestion-button\">\n {{ method.label | titlecase }}\n </button>\n </div>\n </div>\n\n </div>\n\n\n </div>\n </section>\n\n\n\n\n\n\n\n </div>\n </mat-expansion-panel>\n</mat-accordion>\n\n\n}", styles: ["ion-card{margin:0 auto}.head{font-weight:500;font-size:.9rem;padding-left:8px}.chat{margin-top:0;padding-bottom:8px;padding-top:9px;padding-right:16px;white-space:normal;font-size:.8rem}.icon{margin-top:auto;margin-bottom:auto;margin-right:16px}.container{max-width:600px;margin:0 auto}ion-accordion-group{margin:16px}ion-icon{margin-right:16PX}.suggestion-container{display:flex;width:100%;gap:14px}.suggestion-column{flex:1;min-width:0}.button-container{display:flex;flex-wrap:wrap}.suggestion-button{height:auto;text-transform:capitalize;margin:2px;padding:8px;line-height:normal;text-align:left;font-size:.8em}h5{margin-bottom:8px;font-size:1em}mat-expansion-panel-header{padding-left:16px;padding-right:16px}mat-expansion-panel{background:var(--mat-toolbar-container-background-color, var(--mat-app-surface))}mat-form-field{width:100%;background:azure}.chatItem{padding:0}.chatItem mat-icon{margin-left:16px;margin-right:16px}.chatContent{height:fit-content!important}.stage-button{margin:4px}.stage-index{font-size:14px;display:flex;width:28px;height:28px;justify-content:center;background:azure;align-items:center;border:solid var(--mat-divider-color, var(--mat-app-outline)) 1px}.stage-inner-message{font-size:14px;display:flex;line-height:normal;opacity:.6}.stage-item{height:54px!important}.tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;background:azure;border-radius:4px;margin-bottom:16px}.info-icon{min-width:38px!important;display:block}.title-icon{margin-right:8px;vertical-align:middle}.header-spinner{position:absolute;width:24px!important;height:24px!important}.sent-icon{font-size:14px;height:14px;margin-right:0!important;margin-left:0!important}.submit-spinner{position:absolute;width:40px!important;right:-8px;top:-20px;height:40px!important;--mdc-circular-progress-size: 40px !important;--mdc-circular-progress-active-indicator-width: 40px !important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.JsonPipe, name: "json" }, { kind: "pipe", type: i2.TitleCasePipe, name: "titlecase" }, { kind: "component", type: TWorkflowPickerComponent, selector: "lib-t-workflow-picker", inputs: ["getWorkflowOptions", "value"], outputs: ["valueChanged"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: TDynamicDataViewComponent, selector: "lib-t-dynamic-data-view", inputs: ["data"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i3.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i3$2.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i3$2.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i3$2.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i3$2.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i6.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i6.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i6.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "component", type: i8$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: AggregateStageEditorComponent, selector: "app-aggregate-stage-editor", inputs: ["selectedStage", "isRunningPipeline"], outputs: ["saveStage", "deleteStage"] }, { kind: "pipe", type: DaysAgoPipe, name: "daysAgo" }] }); }
740
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PipelineGeneratorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
741
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: PipelineGeneratorComponent, isStandalone: true, selector: "app-pipeline-generator", inputs: { value: "value", getWorkflowOptions: "getWorkflowOptions", userName: "userName", errors: "errors" }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: PipelineGeneratorComponent }], viewQueries: [{ propertyName: "textareaElementRef", first: true, predicate: ["textarea"], descendants: true, read: ElementRef }], ngImport: i0, template: "@if(!!loadingWorkflowOptions){\n<div style=\"display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 24px;\">\n <mat-spinner style=\"margin-bottom: 16px;\"></mat-spinner>\n <p>\n Loading workflows...\n </p>\n</div>\n}\n\n@if(!loadingWorkflowOptions){\n<section class=\"ion-margin\">\n <p>MongoDB aggregation pipeline builder for selected workflows. </p>\n</section>\n<lib-t-workflow-picker \n(valueChanged)=\"workflowChanged($event)\" \n[getWorkflowOptions]=\" workflowOptions\"\n [value]=\"workflowId|async\">\n</lib-t-workflow-picker>\n<mat-accordion multi *ngIf=\"workflowId|async\">\n <!-- Pipeline Accordion -->\n <mat-expansion-panel value=\"pipeline\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-spinner color=\"accent\" *ngIf=\"isRunningPipeline\" class=\"header-spinner\"></mat-spinner>\n <mat-icon class=\"title-icon\">\n dynamic_form\n </mat-icon>\n {{isRunningPipeline?'Executing current Data pipeline...':'Data retrieval pipeline'}}\n </mat-panel-title>\n\n </mat-expansion-panel-header>\n <div class=\"content\">\n <!-- Mongodb aggregate pipelione stages management and edit start-->\n <div *ngIf=\"((stages | async)?.length || 0) ===0\" class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>\n Add stages to the pipeline below.<br>\n Each stage processes input documents by filtering, grouping, or calculating values. The output documents from\n one stage are passed to the next stage in the pipeline.\n </span>\n </div>\n\n <mat-nav-list style=\" background: var(--mat-tree-container-background-color);padding:0px;border-radius:8px\">\n\n\n <ng-container *ngFor=\"let stage of stages | async; trackBy: trackById;index as $index;last as isLast\">\n <mat-list-item [style.margin-top]=\"(activeStageIndex|async) ===$index?'4px':'0px'\"\n [class.mat-elevation-z8]=\"(activeStageIndex|async) ===$index\" class=\"stage-item\"\n (click)=\"setActiveStage($index)\" [activated]=\" (activeStageIndex|async) ===$index\">\n <span class=\"stage-index\" matListItemAvatar>{{$index + 1}} </span>\n <div matListItemTitle>\n <div style=\"line-height: normal;\">\n {{ stage.name || 'Stage ' }}\n </div>\n <div class=\"stage-inner-message\" *ngIf=\"!stage.name && (activeStageIndex|async) !==$index \">\n Incomplete , click to edit\n </div>\n\n </div>\n\n <button *ngIf=\"(activeStageIndex|async) ===$index||!stage.valid && (activeStageIndex|async) !==$index\"\n mat-icon-button matListItemMeta>\n <mat-icon color=\"primary\" *ngIf=\"(activeStageIndex|async) ===$index\">check_circle</mat-icon>\n\n <mat-icon color=\"warn\" *ngIf=\"!stage.valid && (activeStageIndex|async) !==$index\">\n warning\n </mat-icon>\n </button>\n </mat-list-item>\n <mat-divider></mat-divider>\n\n <app-aggregate-stage-editor [selectedStage]=\"stage\" [isRunningPipeline]=\"isRunningPipeline\"\n (deleteStage)=\"deleteStage($index)\" (saveStage)=\"saveStage($index,$event)\"\n *ngIf=\"(activeStageIndex|async) ===$index\"></app-aggregate-stage-editor>\n\n\n </ng-container>\n\n <mat-toolbar style=\"padding: 0px;\">\n\n <span class=\"spacer\"></span>\n <button class=\"stage-button\" [disabled]=\"isRunningPipeline\" color=\"primary\" (click)=\"addStage()\"\n mat-raised-button>\n Add\n <mat-icon>add</mat-icon>\n </button>\n </mat-toolbar>\n </mat-nav-list>\n\n <!-- Mongodb aggregate pipelione stages management and edit end -->\n </div>\n </mat-expansion-panel>\n\n <!-- Results Accordion -->\n <mat-expansion-panel value=\"results\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-spinner color=\"accent\" *ngIf=\"isRunningPipeline\" class=\"header-spinner\"></mat-spinner>\n <mat-icon class=\"title-icon\">dataset</mat-icon>\n {{isRunningPipeline?'Running pipeline...':'Data Results'}}\n </mat-panel-title>\n </mat-expansion-panel-header>\n <div class=\"content\">\n <ng-container *ngIf=\"pipeLineResults | async as results; else noResults\">\n\n <lib-t-dynamic-data-view *ngIf=\"results\" [data]=\"results\"></lib-t-dynamic-data-view>\n <p *ngIf=\"!results\" color=\"medium\">\n\n No results available\n\n </p>\n\n </ng-container>\n <ng-template #noResults>\n <p color=\"medium\">No results available</p>\n </ng-template>\n </div>\n </mat-expansion-panel>\n\n <!-- AI Agent Accordion -->\n <mat-expansion-panel value=\"ai\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-spinner *ngIf=\" aiIsGeneratingPipeline \" style=\"position: absolute;\" class=\"header-spinner\"></mat-spinner>\n <mat-icon class=\"title-icon\">tips_and_updates</mat-icon>\n {{ aiIsGeneratingPipeline ? 'Agent busy ...' : 'AI AGENT prompt' }}\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n @if( schemaLoadError$ | async){\n <div class=\"tree-instructions\" style=\"background: antiquewhite !important;\">\n <mat-icon class=\"info-icon\" color=\"warn\">error</mat-icon>\n <span> {{ schemaLoadError$ | async }}</span>\n </div>\n \n }\n <mat-list *ngFor=\"let chat of chatHistory|async;\">\n\n <mat-list-item class=\"chatContent chatItem\">\n <div class=\"chat\" style=\"background:bisque;text-align:end;\n border-radius: 18px 18px 0px 18px;\" matListItemTitle>\n <div>\n {{chat.user}}\n </div>\n <div style=\"opacity:0.6;line-height: normal;display: flex;align-items: center;justify-content: flex-end;\">\n {{chat.date|daysAgo}}\n <mat-icon class=\"sent-icon\">\n done_all\n </mat-icon>\n </div>\n </div>\n </mat-list-item>\n\n <mat-list-item style=\"margin-top: 16px;\" class=\"chatContent chatItem\" color=\"light\" lines=\"full\">\n <mat-icon style=\" margin-left: 0px;\n margin-top: 16px;\n margin-bottom: auto;\" matListItemIcon>smart_toy</mat-icon>\n <div class=\"chat\" style=\"text-align: left; \n padding-left: 16px; \n background: azure;\n border-radius: 0px 18px 18px 18px;\" *ngIf=\"!chat.assistance?.error\" matListItemTitle>\n <pre>\n {{chat. assistance.pipeline |json}}\n </pre>\n </div>\n <div *ngIf=\"chat.assistance?.error\" matListItemTitle>\n {{chat.assistance.error}}\n </div>\n </mat-list-item>\n\n\n </mat-list>\n <mat-list>\n <mat-list-item class=\"chatContent chatItem\">\n <textarea matListItemTitle #textarea style=\" width: calc(100% - 13px);\n border-radius: 14px;\n padding-right: 3px;\n padding-left: 8px;\" class=\"chat\" [value]=\" prompt|async\" (input)=\"onTextChange($event)\"\n placeholder=\"Provide a pipeline generation prompt\"></textarea>\n <button matListItemMeta style=\" margin-left: 4px;\n margin-right: 0px;\" color=\"primary\" mat-mini-fab [disabled]=\"aiIsGeneratingPipeline\" (click)=\"promptSubmit()\">\n\n <mat-icon style=\"margin: 0px !important;color:white\">send</mat-icon>\n <mat-spinner color=\"accent\" *ngIf=\" aiIsGeneratingPipeline \" \n class=\"submit-spinner\" ></mat-spinner>\n </button>\n \n </mat-list-item>\n\n </mat-list>\n\n\n <section *ngIf=\"showSuggestions\" class=\"showSuggestionContainer\">\n <!-- <mat-toolbar class=\"search-container\" style=\"background: inherit;\">\n\n\n <input type=\"search\" placeholder=\"Search options\" class=\"search-field\" (change)=\"onSearchChange($event)\">\n\n <mat-icon>\n search\n </mat-icon>\n </mat-toolbar> -->\n <mat-divider></mat-divider>\n <div style=\"padding: 8px;\">\n <div class=\"suggestion-container\">\n <div class=\"suggestion-column\">\n <h5>Collection document properties</h5>\n <div class=\"button-container\">\n <button *ngFor=\"let method of getSchemaProperties | async;trackBy: trackById\"\n (click)=\"selectSuggestionInput(method.value)\" color=\"accent\" mat-flat-button\n class=\"suggestion-button\">\n {{ method.label | titlecase }}\n </button>\n </div>\n </div>\n\n </div>\n\n\n </div>\n </section>\n\n\n\n\n\n\n\n </div>\n </mat-expansion-panel>\n</mat-accordion>\n\n\n}", styles: ["ion-card{margin:0 auto}.head{font-weight:500;font-size:.9rem;padding-left:8px}.chat{margin-top:0;padding-bottom:8px;padding-top:9px;padding-right:16px;white-space:normal;font-size:.8rem}.icon{margin-top:auto;margin-bottom:auto;margin-right:16px}.container{max-width:600px;margin:0 auto}ion-accordion-group{margin:16px}ion-icon{margin-right:16PX}.suggestion-container{display:flex;width:100%;gap:14px}.suggestion-column{flex:1;min-width:0}.button-container{display:flex;flex-wrap:wrap}.suggestion-button{height:auto;text-transform:capitalize;margin:2px;padding:8px;line-height:normal;text-align:left;font-size:.8em}h5{margin-bottom:8px;font-size:1em}mat-expansion-panel-header{padding-left:16px;padding-right:16px}mat-expansion-panel{background:var(--mat-toolbar-container-background-color, var(--mat-app-surface))}mat-form-field{width:100%;background:azure}.chatItem{padding:0}.chatItem mat-icon{margin-left:16px;margin-right:16px}.chatContent{height:fit-content!important}.stage-button{margin:4px}.stage-index{font-size:14px;display:flex;width:28px;height:28px;justify-content:center;background:azure;align-items:center;border:solid var(--mat-divider-color, var(--mat-app-outline)) 1px}.stage-inner-message{font-size:14px;display:flex;line-height:normal;opacity:.6}.stage-item{height:54px!important}.tree-instructions{display:flex;align-items:center;gap:8px;padding:12px;background:azure;border-radius:4px;margin-bottom:16px}.info-icon{min-width:38px!important;display:block}.title-icon{margin-right:8px;vertical-align:middle}.header-spinner{position:absolute;width:24px!important;height:24px!important}.sent-icon{font-size:14px;height:14px;margin-right:0!important;margin-left:0!important}.submit-spinner{position:absolute;width:40px!important;right:-8px;top:-20px;height:40px!important;--mdc-circular-progress-size: 40px !important;--mdc-circular-progress-active-indicator-width: 40px !important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.JsonPipe, name: "json" }, { kind: "pipe", type: i2.TitleCasePipe, name: "titlecase" }, { kind: "component", type: TWorkflowPickerComponent, selector: "lib-t-workflow-picker", inputs: ["getWorkflowOptions", "value"], outputs: ["valueChanged"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: TDynamicDataViewComponent, selector: "lib-t-dynamic-data-view", inputs: ["data"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i3.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i4$2.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i4$2.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i4$2.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i4$2.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i6.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i6.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i6.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "component", type: i8$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: AggregateStageEditorComponent, selector: "app-aggregate-stage-editor", inputs: ["selectedStage", "isRunningPipeline"], outputs: ["saveStage", "deleteStage"] }, { kind: "pipe", type: DaysAgoPipe, name: "daysAgo" }] }); }
742
742
  }
743
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: PipelineGeneratorComponent, decorators: [{
743
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PipelineGeneratorComponent, decorators: [{
744
744
  type: Component,
745
745
  args: [{ selector: 'app-pipeline-generator', standalone: true, imports: [
746
746
  CommonModule,
@@ -773,4 +773,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
773
773
  }] } });
774
774
 
775
775
  export { PipelineGeneratorComponent };
776
- //# sourceMappingURL=ngx-t-forms-pipeline-generator.component-DieETx2I.mjs.map
776
+ //# sourceMappingURL=ngx-t-forms-pipeline-generator.component-DGEidXgr.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-t-forms-pipeline-generator.component-DGEidXgr.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/json-editor/json-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/json-editor/json-editor.component.html","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/pipeline-generator/elements/aggregate-stage-editor/aggregate-stage-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/pipeline-generator/elements/aggregate-stage-editor/aggregate-stage-editor.component.html","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/t-workflow-picker/t-workflow-picker.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/t-workflow-picker/t-workflow-picker.component.html","../../../projects/ngx-t-forms/src/lib/services/hhtpResources/Pipeline/pipeline.service.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/pipeline-generator/pipeline-generator.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/pipeline-generator/pipeline-generator.component.html"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, EventEmitter, Input, OnChanges, OnDestroy, Output, SimpleChanges } from '@angular/core';\nimport { FormBuilder, FormGroup, FormsModule, ReactiveFormsModule, Validators } from '@angular/forms';\n\nimport { debounceTime, Subscription } from 'rxjs';\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\n\n\n@Component({\n selector: 'app-json-editor',\n templateUrl: './json-editor.component.html',\n styleUrls: ['./json-editor.component.scss'],\n standalone: true,\n imports: [\n CommonModule,\n MatModulesModule,\n FormsModule,\n ReactiveFormsModule\n ]\n})\nexport class JsonEditorComponent implements OnChanges ,OnDestroy{\n jsonForm: FormGroup;\n subscriptions = new Subscription();\n constructor(private fb: FormBuilder){\n this.jsonForm = this.fb.group({\n jsonText: ['', Validators.required]\n });\n this.init()\n }\n ngOnDestroy(): void {\n this.subscriptions.unsubscribe()\n }\n private _value:any\n ngOnChanges(changes: SimpleChanges,): void {\n if (changes['value']&& changes['value'].currentValue !==this._value){\n this._value = changes['value'].currentValue\n this.parseAndBeautifyJson(this._value ,true)\n\n }\n }\n@Input() value!:Object \n@Output() valueChange = new EventEmitter<{\n value: Object|Array<any>,\n valid: boolean\n}>()\n jsonText: string = ''; // Placeholder for the JSON text\n errorMessage: string | null = null;\n\n\n init(){\n this.subscriptions.add( this.jsonForm.get('jsonText')!.valueChanges\n .pipe(\n debounceTime(1000)\n )\n .subscribe(value => {\n this.parseAndBeautifyJson(value);\n })) \n \n }\n \n private parseAndBeautifyJson(value: string,hardSet?:boolean): void {\n try {\n\n // Attempt to parse the JSON\n const parsedJson = typeof value === 'object' && value !==null? value: JSON.parse(value);\n \n // If valid, beautify the JSON\n const beautifiedJson = JSON.stringify(parsedJson, null, 4);\n \n // Update form control value with beautified JSON\n const form = this.jsonForm.get('jsonText');\n if (!form) {\n this.errorMessage = 'Form control not found.';\n return;\n }\n \n // Set beautified JSON without emitting another change event\n form.setValue(beautifiedJson, { emitEvent: false });\n this.errorMessage = null;\n this.valueChange.emit({value:parsedJson,valid:true})\n } catch (error) {\n if (error instanceof SyntaxError) {\n // Extract the position of the error from the error message\n const errorMessage = this.getDetailedJsonError(value, error.message);\n this.errorMessage = `JSON Syntax Error: ${errorMessage}`;\n } else {\n this.errorMessage = 'Unexpected error occurred while parsing JSON.';\n }\n if(hardSet){\n console.log('hardset',value)\n this.jsonForm.get('jsonText')?.setValue(value, { emitEvent: false });\n }\n this.valueChange.emit({value:value,valid:false})\n \n }\n }\n\n // Function to give detailed JSON error information\n private getDetailedJsonError(value: string, message: string): string {\n const positionMatch = message.match(/position (\\d+)/);\n if (!!positionMatch?.[1]) {\n const position = parseInt(positionMatch[1], 10);\n const excerpt = this.getErrorExcerpt(value, position);\n return `at position ${position}: near \"${excerpt}\". Check for missing commas, brackets, or quotes.`;\n }\n return message;\n }\n\n // Helper function to extract a portion of the string around the error position\n private getErrorExcerpt(value: string, position: number, excerptLength: number = 20): string {\n const start = Math.max(0, position - excerptLength);\n const end = Math.min(value.length, position + excerptLength);\n return value.substring(start, end);\n }\n\n\n}\n","<div class=\"json-editor-container\">\n <div *ngIf=\"jsonForm.invalid\" \n style=\"margin-top: 16px;\"\n class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span> Paste or type JSON below. The editor will auto-beautify the text.</span>\n </div>\n\n\n \n <!-- Error message if JSON is invalid -->\n <div *ngIf=\"errorMessage\" \n \n style=\"\" class=\"tree-instructions json-error \">\n <span> {{errorMessage}}</span>\n </div>\n \n <form [formGroup]=\"jsonForm\">\n <textarea\n formControlName=\"jsonText\"\n class=\"json-textarea\"\n [class.error-message]=\"errorMessage\"\n rows=\"15\"\n placeholder=\"Enter your JSON here...\"></textarea>\n </form>\n <!-- JSON Textarea -->\n\n</div>\n","import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport PipelineBuilder from \"db-aggregation-pipeline-builder\"\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { JsonEditorComponent } from '../../../json-editor/json-editor.component';\nimport { IAllowedStage } from '../../../../../../services/hhtpResources/Pipeline/pipeline.service';\nimport { MatModulesModule } from '../../../../../../shared/modules/mat-modules.module';\n\nimport { MatSelectChange } from '@angular/material/select';\n\n@Component({\n selector: 'app-aggregate-stage-editor',\n templateUrl: './aggregate-stage-editor.component.html',\n styleUrls: ['./aggregate-stage-editor.component.scss'],\n standalone: true,\n\n imports: [\n MatModulesModule,\n CommonModule,\n FormsModule,\n JsonEditorComponent\n ]\n})\nexport class AggregateStageEditorComponent implements OnInit {\n subscription = new Subscription();\n @Input() selectedStage:any\n @Input() isRunningPipeline: boolean = false\n @Output() saveStage = new EventEmitter<IAllowedStage | undefined>()\n @Output() deleteStage = new EventEmitter<void>()\n ngOnDestroy(): void {\n this.subscription.unsubscribe()\n }\n\n constructor() {\n\n }\n activeStage: IAllowedStage | undefined = undefined; // Define the type appropriately if possible\n allowedStages: { stage: string; description: string; config: any }[] = [];\n configValidationError: string | undefined\n\n\n ngOnInit() {\n // Debounce the config change to optimize performance\n\n this.allowedStages = PipelineBuilder.getViewOnlyStages() as any\n }\n\n handleChange(event: MatSelectChange): void {\n \n const selectedStage = event.value\n if (this.activeStage === undefined) {\n this.activeStage = {\n stage: selectedStage,\n ...this.selectedStage || {},\n\n } as IAllowedStage\n } else {\n this.activeStage = {\n config : this.activeStage?.config|| this.selectedStage ?.config,\n stage: selectedStage\n } as IAllowedStage\n\n }\n { }\n if (this.activeStage?.config as any && !!this.activeStage?.stage) {\n\n this.validateConfig();\n\n }\n }\n\n handleConfigChange(event: any): void {\n if (!this.activeStage) {\n this.activeStage = {\n ...this.selectedStage || {},\n } as IAllowedStage\n }\n this.activeStage = {\n stage:this.activeStage?.stage || this.selectedStage ?.name,\n config: event.value\n } as IAllowedStage\n this.validateConfig();\n\n }\n validateConfig(): void {\n this.configValidationError = undefined\n const { config, stage } = this.activeStage || {} as IAllowedStage;\n\n // Check if config and stage are defined\n if (!config && config !== 0 || !stage) {\n console.error('Config or stage is not defined', config, stage);\n this.activeStage!.valid = false;\n return; // Early exit if validation fails\n }\n\n try {\n const valid = PipelineBuilder.validateStageConfig(stage as any, config);\n this.activeStage!.valid = valid;\n\n // Set error message if config is invalid\n if (!valid) {\n this.configValidationError = undefined\n return;\n }\n } catch (error: any) {\n // Catch and handle errors from validation\n this.configValidationError = error.message || JSON.stringify(error) || 'An unknown error occurred';\n this.activeStage!.valid = false;\n console.error('Validation Error:', this.configValidationError);\n }\n }\n\n canSaveConfig(): boolean {\n return !!this.activeStage && !this.configValidationError;\n }\n\n saveConfiguration(): void {\n // Logic for saving the configuration\n if (this.canSaveConfig()) {\n this.saveStage.emit(this.activeStage as IAllowedStage);\n \n }\n }\n\n trackByStage(index: number, stage: any): string {\n return stage.stage;\n }\n\n get allowedStageNames(): string[] {\n return this.allowedStages.map(stage => stage.stage);\n }\n\n\n get activeDescription() {\n return this.allowedStages.find(stage => stage.stage === this.activeStage?.stage)?.description\n\n\n }\n\n deleteActive() {\n this.deleteStage.emit()\n }\n // close() {\n // this.pipeline.setActiveStage(undefined)\n // }\n\n}\n","<mat-card style=\"margin-bottom:8px\">\n <mat-card-content>\n\n <h5>\n Aggregate Pipeline Stage Configuration\n </h5>\n\n\n\n <mat-form-field style=\" margin-bottom: 8px;\" appearance=\"outline\">\n <mat-label>Select Aggregate Stage</mat-label>\n <mat-select matNativeControl [value]=\"selectedStage?.name\" (selectionChange)=\"handleChange($event)\"\n placeholder=\"ChooseFunctionToRun\">\n <mat-option *ngFor=\"let stage of allowedStages; trackBy: trackByStage\" [value]=\"stage.stage\">\n {{stage.stage}}</mat-option>\n\n\n\n </mat-select>\n <mat-hint>\n {{activeDescription ?\n 'Hover over the info icon to view stage details .'\n : 'Please select an aggregation function from the list.'}}\n </mat-hint>\n <mat-hint *ngIf=\"activeDescription\" align=\"end\">\n <mat-icon matTooltipHideDelay=\"1000\" [matTooltip]=\"activeDescription\" matSuffix>info</mat-icon>\n </mat-hint>\n </mat-form-field>\n\n\n\n <div class=\"tree-instructions\" style=\"background: cornsilk;\" *ngIf=\"configValidationError\">\n <mat-icon style=\"margin-top: 4px;margin-bottom:auto\" class=\"info-icon\" color=\"warn\">warning</mat-icon>\n <span>{{ configValidationError }}</span>\n </div>\n\n\n\n\n\n <div class=\"config-container\" *ngIf=\"activeStage ||selectedStage?.config\">\n <app-json-editor [value]=\"selectedStage?.config\" (valueChange)=\"handleConfigChange($event)\"></app-json-editor>\n </div>\n\n <br>\n\n\n\n </mat-card-content>\n <mat-divider>\n </mat-divider>\n <mat-card-actions>\n\n <span class=\"spacer\"></span>\n <button color=\"warn\" [disabled]=\"isRunningPipeline\" mat-button (click)=\"deleteActive()\">\n Delete\n <mat-icon >delete</mat-icon>\n </button>\n <button style=\"margin-left:8px;\" color=\"primary\" mat-flat-button (click)=\"saveConfiguration()\"\n [disabled]=\"isRunningPipeline ||!activeStage?.valid \">\n Save\n <mat-icon> save</mat-icon>\n </button>\n </mat-card-actions>\n</mat-card>","\r\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\n\r\nimport { IWorkflowOption } from 'ngx-t-forms-types';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\n\r\n@Component({\r\n selector: 'lib-t-workflow-picker',\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule],\r\n templateUrl: './t-workflow-picker.component.html',\r\n styleUrl: './t-workflow-picker.component.css'\r\n})\r\nexport class TWorkflowPickerComponent implements OnInit {\r\n private _workflowOptions: IWorkflowOption[] | undefined = []\r\n @Input() set getWorkflowOptions(value: IWorkflowOption[]|undefined) {\r\n if (value?.length === this._workflowOptions?.length && value?.every((workflow, index) => workflow.id === this._workflowOptions?.[index]?.id)) {\r\n return\r\n }\r\n this._workflowOptions = value\r\n }\r\n @Input() value: string | undefined | null = undefined\r\n @Output() valueChanged = new EventEmitter<string | undefined>()\r\n constructor() { }\r\n error: any = undefined\r\n loading: boolean = false\r\n ngOnInit(): void {\r\n\r\n }\r\n get workflowOptions(): IWorkflowOption[] {\r\n return this._workflowOptions || []\r\n }\r\n\r\n unbindInput() {\r\n this.value = undefined;\r\n\r\n this.valueChanged.emit(this.value);\r\n }\r\n bindInput(workflow: IWorkflowOption) {\r\n this.valueChanged.emit(workflow.id);\r\n }\r\n get selectedWorkflow(): IWorkflowOption | undefined {\r\n return this._workflowOptions?.find((workflow) => workflow.id === this.value)\r\n }\r\n}\r\n","@if (error) {\r\n<mat-toolbar>\r\n <span>\r\n Failed to load workflow list\r\n </span>\r\n <span class=\"spacer\"></span>\r\n <button color=\"primary\" mat-raised-button>\r\n Retry\r\n\r\n </button>\r\n</mat-toolbar>\r\n}\r\n@if(loading){\r\n<div class=\"loadingContainer\">\r\n <mat-spinner></mat-spinner>\r\n</div>\r\n}\r\n@if(!loading&& !error){\r\n<mat-card>\r\n <mat-nav-list style=\"padding: 0px;\">\r\n @if(!value){\r\n @for (option of workflowOptions; track option.id) {\r\n <mat-list-item (click)=\"bindInput(option)\">\r\n\r\n <mat-chip class=\"docType\" [style.background]=\" option['isDocument'] ? 'lightskyblue' : ''\" matListItemIcon>\r\n <span style=\"font-size: 10px;\">\r\n {{ option[\"isDocument\"] ? \"DOC\" : \"FLOW\" }}\r\n </span>\r\n </mat-chip>\r\n\r\n\r\n <div matListItemTitle>\r\n <div>\r\n {{ option.name }}\r\n </div>\r\n\r\n <div style=\"font-size: 13px; opacity: 0.6;line-height:normal\">\r\n {{ option[\"createdAt\"] | date: \"medium\" }} &nbsp;\r\n {{ option.numberOfSteps }}\r\n </div>\r\n </div>\r\n <button matListItemMeta mat-icon-button>\r\n <mat-icon>\r\n radio_button_unchecked\r\n </mat-icon>\r\n </button>\r\n\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n }\r\n @if(value){\r\n <mat-list-item (click)=\" unbindInput() \">\r\n\r\n <mat-chip class=\"docType\" [style.background]=\"selectedWorkflow?.['isDocument'] ? 'lightskyblue' : ''\" matListItemIcon>\r\n <span style=\"font-size: 10px;\">\r\n {{selectedWorkflow?.[\"isDocument\"] ? \"DOC\" : \"FLOW\" }}\r\n </span>\r\n </mat-chip>\r\n \r\n \r\n <div matListItemTitle>\r\n <div>\r\n {{ selectedWorkflow?.name }}\r\n </div>\r\n \r\n <div style=\"font-size: 13px; opacity: 0.6;line-height:normal\">\r\n {{selectedWorkflow?.[\"createdAt\"] | date: \"medium\" }} &nbsp;\r\n {{ selectedWorkflow?.numberOfSteps }}\r\n </div>\r\n </div>\r\n <button matListItemMeta mat-icon-button>\r\n <mat-icon color=\"primary\">\r\n check_circle\r\n </mat-icon>\r\n </button>\r\n \r\n </mat-list-item>\r\n }\r\n\r\n\r\n </mat-nav-list>\r\n</mat-card>\r\n\r\n}","import { HttpClient } from '@angular/common/http';\r\nimport { inject, Injectable } from '@angular/core';\r\nimport { BehaviorSubject, catchError, combineLatest, filter, finalize, map, Observable, switchMap, take, tap, throwError } from 'rxjs';\r\nimport { PipelineStage } from 'mongoose'\r\n\r\nimport PipelineBuilder from \"db-aggregation-pipeline-builder\"\r\nimport { IPipelineGenerationError, IPipelineGenerationResponse, IRunPipelineResponse, PipelineStageEnum } from 'ngx-t-forms-types';\r\nexport interface IAllowedStage {\r\n stage: PipelineStageEnum,\r\n description: string,\r\n config: any,\r\n valid?:boolean\r\n\r\n}\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class PipelineService {\r\n //LOADING INDICATORS\r\n isRunningPipeline: boolean = false\r\n aiIsGeneratingPipeline: boolean = false\r\n isLoadingAllowedStages: boolean = false\r\n isLoadingWorkflowSchema: boolean = false\r\n\r\n //States \r\n workflowId$ = new BehaviorSubject<string|undefined>(undefined)\r\n activeStage$ = new BehaviorSubject<number|undefined>(undefined)\r\n prompt$ = new BehaviorSubject<string|undefined>(undefined)\r\n schemaLoadError$ = new BehaviorSubject<string|undefined>(undefined)\r\n \r\n\r\n pipeline$ = new BehaviorSubject<PipelineStage[]>([])\r\n threadId$ = new BehaviorSubject<string|undefined>(undefined)\r\n schema$ = new BehaviorSubject<Object|undefined>(undefined)\r\n allowedStages$ = new BehaviorSubject<IAllowedStage[]>([])\r\n pipeLineResult$ = new BehaviorSubject<unknown>([])\r\n chatHistory$ = new BehaviorSubject<{\r\n user: string,\r\n assistance:IPipelineGenerationResponse,\r\n date:Date\r\n }[]>([])\r\n http = inject(HttpClient)\r\n constructor() { \r\n //Set local storage threadId\r\n const threadId = localStorage.getItem('threadId')\r\n if(threadId){\r\n this.threadId$.next(threadId)\r\n }\r\n }\r\n\r\n get config$() {\r\n return this.workflowId$.pipe(\r\n switchMap(workflowId => this.pipeline$.pipe(\r\n switchMap(pipeline => this.pipeLineResult$.pipe(\r\n map(responseBody => ({ workflowId, pipeline, responseBody }))\r\n ))\r\n ))\r\n );\r\n }\r\n /**\r\n * Fetch available pipeline stages for the user to select and generate pipelines.\r\n * Ideally, this could be static or fetched from a backend.\r\n */\r\n runPipeLine(pipeline: PipelineStage[],workflowId:string): Observable<IRunPipelineResponse> {\r\n const url = \"http://localhost:5000/api/v1/pipelineBuilder/runPipeline\"\r\n // For now, returning a static list of pipeline stages. In a real application, you can fetch from an API.\r\n\r\n this.isRunningPipeline = true\r\n return this.http.post<IRunPipelineResponse>(\r\n url,\r\n { pipeline,workflowId }\r\n ).pipe(\r\n take(1),\r\n catchError(this.handleError), // Error handling for the HTTP request,\r\n finalize(() => this.isRunningPipeline = false)\r\n );\r\n }\r\n\r\n /**\r\n * Generate a MongoDB pipeline based on the given user prompt.\r\n * \r\n * @param prompt The user's input or description of the desired pipeline.\r\n */\r\n private generatePipeline(query: string, schema: Object | undefined,\r\n threadId:string|undefined, existingPipeline: PipelineStage[],previousError:string): Observable<IPipelineGenerationResponse> {\r\n if (!schema) {\r\n throw new Error(\"Schema is required\")\r\n }\r\n const payload = { query, schema ,threadId, existingPipeline ,previousError};\r\n const url = \"http://localhost:5000/api/v1/pipelineBuilder/generatePipeline\";\r\n this.aiIsGeneratingPipeline = true\r\n return this.http.post<IPipelineGenerationResponse>(`${url}`, payload)\r\n .pipe(\r\n take(1),\r\n catchError(this.handleError),// Error handling for the HTTP request,\r\n finalize(() => this.aiIsGeneratingPipeline = false)\r\n );\r\n }\r\n\r\n /**\r\n * Handle any errors from the HTTP request.\r\n * \r\n * @param error The error response from the HTTP request\r\n */\r\n private handleError(error: any): Observable<never> {\r\n console.error('An error occurred', error);\r\n // Return an observable with a user-facing error message\r\n return throwError(() => new Error('Something went wrong with the pipeline generation; please try again later.'));\r\n\r\n }\r\n\r\n\r\n private getSchema(workflowId: string): Observable<{\r\n schema: object\r\n }> {\r\n if(!workflowId){\r\n throw new Error(\"WorkflowId is required\")\r\n }\r\n const url = \"http://localhost:5000/api/v1/pipelineBuilder/getSchema\";\r\n return this.http.get<{ schema: object }>(`${url}`, { params: { workflowId: workflowId } }).pipe(\r\n take(1),\r\n catchError(this.handleError) // Error handling for the HTTP request\r\n )\r\n }\r\n/** OPERATIONS */\r\nisSchemaEmpty(object:object){\r\n\r\n}\r\n workflowChanged(event: any) {\r\n this.workflowId$.next(event)\r\n if(!event){\r\n return \r\n }\r\n this.getSchema(event).pipe(\r\n take(1),\r\n tap(({ schema }) => {\r\n this.schema$.next(schema)\r\n const isEmptySchema = Object.keys( schema)[0] === \"\" && Object.values(schema)[0] === \"Array<>\"\r\n const error = isEmptySchema \r\n ? \"Document schema is missing. Please ensure at least one document exists for the selected workflow.\" \r\n : undefined\r\n this.schemaLoadError$.next(error)\r\n console.log(\"Workflow schema loaded,run pipeline\")\r\n this.runActivePipeline()\r\n }),\r\n catchError((error) => {\r\n this.schemaLoadError$.next(\"Error loading schema\");\r\n return this.handleError(error);\r\n })\r\n ).subscribe()\r\n }\r\n\r\n \r\n setActiveStage(i:number|undefined){\r\n const index = this.activeStage$.getValue()\r\n if(index === i){\r\n this.activeStage$.next(undefined)\r\n return\r\n }\r\n this.activeStage$.next(i)\r\n\r\n \r\n }\r\n addStage(){\r\n const newPipeline = this.pipeline$.getValue().concat({} as any)\r\n this.pipeline$.next(newPipeline)\r\n }\r\n onTextChange(event: any) {\r\n this.prompt$.next(event)\r\n console.log(event)\r\n }\r\n promptSubmit() {\r\n // Use combineLatest to fetch the latest values from multiple sources\r\n combineLatest([this.schema$, this.threadId$, this.pipeline$,this.prompt$,this.chatHistory$])\r\n .pipe(\r\n take(1),\r\n tap(([schema, threadId, pipeline,prompt,history]) => {\r\n if (!schema || !prompt) {\r\n console.warn(`Missing values: schema ${schema} prompt ${prompt}`);\r\n }\r\n }),\r\n filter(([schema,,,prompt]) => !!schema && !!prompt ),\r\n switchMap(([schema, threadId, pipeline,prompt,history]) => {\r\n // Use a shallow copy of the pipeline\r\n const previousError = (history[history.length-1]?.assistance as any )?.error\r\n const pipelineCopy = pipeline.map(stage => JSON.parse(JSON.stringify(stage))) || [];\r\n console.info('Generating pipeline with prompt:',\r\n prompt, 'schema:', schema, 'threadId:', threadId, 'pipeline:', pipeline)\r\n return this.generatePipeline(prompt!, schema, threadId, pipelineCopy,previousError).pipe(\r\n map((response) => ({ ...response,history,prompt}))\r\n )\r\n }),\r\n tap((response) => {\r\n const { pipeline, threadId,history,prompt } = response;\r\n const historyRecord = {\r\n user: prompt as any,\r\n assistance: response,\r\n date:new Date()\r\n };\r\n \r\n // Use next with a concatenated value for chat history\r\n this.chatHistory$.next([...(history||[]), historyRecord]);\r\n this.pipeline$.next(pipeline);\r\n this.threadId$.next(threadId);\r\n \r\n // Store threadID locally\r\n localStorage.setItem('threadId', threadId);\r\n \r\n // Run the active pipeline after all state updates are complete\r\n console.log(\"prompt submitted run pipeline\")\r\n this.runActivePipeline();\r\n }),\r\n catchError((error:IPipelineGenerationError) => {\r\n \r\n console.error('Error response:', error.message || error);\r\n return this.handleError(error);\r\n })\r\n ).subscribe();\r\n\r\n }\r\n \r\n runActivePipeline() {\r\n const pipeline = [...(this.pipeline$.getValue().map(stage => (JSON.parse(JSON.stringify(stage))))||[])]\r\n const someAreNotValid = pipeline.some(stage=>Object.keys(stage).length ===0)\r\n if(pipeline.length === 0 || someAreNotValid ){\r\n return\r\n }\r\n try {\r\n PipelineBuilder.validatePipeline(pipeline)\r\n } catch (error) {\r\n console.error(error,pipeline)\r\n return\r\n }\r\n const workflowId = this.workflowId$.getValue()\r\n if (!workflowId) {\r\n return\r\n }\r\n \r\n this.runPipeLine(pipeline,workflowId).pipe(\r\n take(1),\r\n tap(({ results }) => {\r\n this.pipeLineResult$.next(results)\r\n }),\r\n catchError((error) => {\r\n console.error('Error response:', error);\r\n const err = JSON.parse(JSON.stringify(error))\r\n const errorMessage = err.error\r\n if(errorMessage){\r\n this.pipelineErrorLogAndRetry(errorMessage)\r\n }\r\n return this.handleError(error);\r\n })\r\n ).subscribe()\r\n }\r\n\r\n pipelineErrorLogAndRetry(message:string){\r\n const history = this.chatHistory$.getValue() \r\n const prompt = this.prompt$.getValue ()\r\n const historyRecord = {\r\n user: prompt as any,\r\n assistance: {\r\n message\r\n } as any,\r\n date:new Date()\r\n };\r\n this.chatHistory$.next([...(history||[]), historyRecord]);\r\n\r\n }\r\n get activeStage():Observable<{name:string,config:PipelineStage}|undefined>{\r\n return this.pipeline$.asObservable().pipe(\r\n switchMap(pipeline=>this.activeStage$.pipe(\r\n map(activeIndex=>activeIndex === undefined ? undefined : {\r\n name:Object.keys(pipeline[activeIndex]||{})[0] || '',\r\n config:(pipeline[activeIndex] as any)[Object.keys(pipeline[activeIndex]||{})?.[0]||'']\r\n })\r\n ))\r\n )\r\n \r\n }\r\n saveStage(index:number,stage: IAllowedStage | undefined) {\r\n const pipeline = this.pipeline$.getValue()\r\n if(index === undefined){\r\n return\r\n }\r\n const newPipeline = pipeline.map((s, i) => {\r\n if (i === index) {\r\n return stage ? {\r\n [stage.stage]: stage.config\r\n } : s;\r\n }\r\n return s;\r\n });\r\n\r\n console.log(\"newPipeline\",newPipeline)\r\n this.pipeline$.next(newPipeline as any)\r\n this.activeStage$.next(undefined)\r\n console.log(\"stage saved run pipeline\")\r\n this.runActivePipeline()\r\n \r\n }\r\n deleteStage(index:number){\r\n const pipeline = this.pipeline$.getValue()\r\n\r\n if(index === undefined){\r\n return\r\n }\r\n const newPipeline = pipeline.filter((s, i) => i !== index);\r\n console.log(\"newPipeline\",newPipeline)\r\n this.pipeline$.next(newPipeline as any)\r\n this.activeStage$.next(undefined)\r\n console.log(\"stage deleted run pipeline\")\r\n this.runActivePipeline()\r\n }\r\n get pipelineGeneralValid(){\r\n return this.pipeline$.asObservable().pipe(\r\n map(pipeline=>{\r\n const allHaveTypes = pipeline.every(stage=>Object.keys(stage).length === 1)\r\n if(!allHaveTypes){\r\n return {\r\n valid:false,\r\n message:\"All stages must be a valid pipeline stage\"\r\n }\r\n }\r\n const AllStagesMustHaveConfig = pipeline.every((stage: { [key: string]: any }) => stage[Object.keys(stage)?.[0]||''] !== undefined)\r\n if(!AllStagesMustHaveConfig){\r\n return {\r\n valid:false,\r\n message:\"All stages must have a configuration\"\r\n }\r\n }\r\n return {\r\n valid:true\r\n }\r\n })\r\n )\r\n }\r\n}","import { CommonModule } from '@angular/common';\r\n\r\nimport { Component, ElementRef, EventEmitter, HostBinding, inject, Input, OnDestroy, OnInit, Optional, Output, Self, ViewChild } from '@angular/core';\r\nimport { FormsModule, NgControl } from '@angular/forms';\r\n\r\n\r\n\r\n\r\nimport { AggregateStageEditorComponent } from './elements/aggregate-stage-editor/aggregate-stage-editor.component';\r\nimport { map, Subject, takeUntil, take, tap, Observable, distinctUntilChanged } from 'rxjs';\r\nimport { MongoDbPipeLineConfigInterface } from \"ngx-t-forms-types\";\r\n\r\nimport { TDynamicDataViewComponent } from '../../../t-dynamic-data-view/t-dynamic-data-view.component';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { TWorkflowPickerComponent } from '../t-workflow-picker/t-workflow-picker.component';\r\nimport { IWorkflowOption } from \"ngx-t-forms-types\";\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { NGX_T_FORMS_CONFIG_TOKEN } from '../../../../../lib/injection-tokens';\r\nimport { PipelineService } from '../../../../../lib/services/hhtpResources/Pipeline/pipeline.service';\r\nimport { DaysAgoPipe } from '../../../../../lib/shared/pipes/date/days-ago.pipe';\r\n\r\n\r\n@Component({\r\n selector: 'app-pipeline-generator',\r\n templateUrl: './pipeline-generator.component.html',\r\n styleUrls: ['./pipeline-generator.component.scss'],\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n TWorkflowPickerComponent,\r\n FormsModule,\r\n TDynamicDataViewComponent,\r\n MatModulesModule,\r\n AggregateStageEditorComponent,\r\n DaysAgoPipe\r\n\r\n ],\r\n providers: [{ provide: MatFormFieldControl, useExisting:PipelineGeneratorComponent}],\r\n})\r\nexport class PipelineGeneratorComponent implements OnInit, OnDestroy,MatFormFieldControl< MongoDbPipeLineConfigInterface> {\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n NGX_T_FORMS_CONFIG = inject(NGX_T_FORMS_CONFIG_TOKEN)\r\n @HostBinding() id = `app-pipeline-generator-${ PipelineGeneratorComponent.nextId++}`;\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,) {\r\n }\r\n placeholder: string = ''\r\n\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\n disabled: boolean = false;\r\nget errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n\r\n return !this.value && !!this.required || hasError\r\n }\r\n\r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.app-pipeline-generator');\r\n // Check if the controlElement exists before attempting to set its attribute\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\r\n }\r\n }\r\n }\r\n onContainerClick(event: MouseEvent): void {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n\r\n touched: boolean = false;\r\n onTouched = () => {};\r\n markAsTouched() {\r\n console.log('markAsTouched') \r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n } \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n //@ViewChild('textarea', { static: false }) textareaRef!: HTMLTextAreaElement\r\n @ViewChild('textarea', { read: ElementRef, static: false }) textareaElementRef!: ElementRef;\r\n @Input() set value(value: MongoDbPipeLineConfigInterface) {\r\n const workflowIdChanged = this._value?.workflowId !== value?.workflowId\r\n const pipelineLengthChanged = this._value?.pipeline?.length !== value?.pipeline?.length\r\n const pipeLineContentChanged = JSON.stringify(this._value?.pipeline) !== JSON.stringify(value?.pipeline)\r\n if (workflowIdChanged ||pipelineLengthChanged || pipeLineContentChanged) {\r\n\r\n this._value = value\r\n if(value?.workflowId){\r\n this.workflowChanged(value?.workflowId)\r\n }\r\n\r\n console.log('Pipeline value changed', value,this.pipeline.pipeline$.value)\r\n if(value?.pipeline){\r\n this.pipeline.pipeline$.next(value?.pipeline || [])\r\n }\r\n\r\n }\r\n\r\n }\r\n workflowOptions: IWorkflowOption[] |undefined= [];\r\n loadingWorkflowOptions: boolean = false;\r\n\r\n workflowsInitialized: boolean = false;\r\n @Input() set getWorkflowOptions(options$: Observable<IWorkflowOption[]|undefined> | undefined) {\r\n if (!this.workflowsInitialized && !!options$) {\r\n this.workflowsInitialized = true;\r\n this.loadingWorkflowOptions = true;\r\n options$.pipe(\r\n take(1),\r\n tap(options => {\r\n this.workflowOptions = options;\r\n this.loadingWorkflowOptions = false;\r\n })\r\n ).subscribe();\r\n \r\n }\r\n }\r\n @Input() userName: string | undefined\r\n _value!: MongoDbPipeLineConfigInterface\r\n @Output() valueChanged = new EventEmitter<MongoDbPipeLineConfigInterface>()\r\n\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\n destroy$ = new Subject<void>()\r\n private pipeline: PipelineService = new PipelineService()\r\n\r\n ngOnInit(): void {\r\n this.initiateSubscription()\r\n\r\n\r\n }\r\n initiated: boolean = false\r\n initiateSubscription = () => {\r\n this.pipeline.config$.pipe(\r\n takeUntil(this.destroy$),\r\n distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr))\r\n ).subscribe(config => {\r\n if (!this.initiated) {\r\n this.initiated = true\r\n return\r\n }\r\n\r\n const newConfig: any = {\r\n ...this._value,\r\n ...config,\r\n \"source\": \"mongoPipeline\",\r\n\r\n }\r\n console.log('Pipeline config changed', newConfig)\r\n this.valueChanged.emit(newConfig)\r\n })\r\n\r\n \r\n }\r\n ngOnDestroy(): void {\r\n this.destroy$.next()\r\n this.destroy$.complete()\r\n }\r\n workflowChanged(event: any) {\r\n this.pipeline.workflowChanged(event)\r\n }\r\n get workflowId() {\r\n return this.pipeline.workflowId$.asObservable()\r\n }\r\n get stages() {\r\n return this.pipeline.pipeline$.asObservable().pipe(\r\n map(stages => stages.map(stage => ({\r\n name: Object.keys(stage)[0],\r\n stage: Object.keys(stage)[0],\r\n config: (stage as any)[Object.keys(stage)?.[0]||''],\r\n valid: !!Object.keys(stage)[0] && !!(stage as any)[Object.keys(stage)?.[0]||'']\r\n })))\r\n )\r\n }\r\n get pipeLineResults() {\r\n return this.pipeline.pipeLineResult$.asObservable()\r\n }\r\n get prompt() {\r\n return this.pipeline.prompt$.asObservable()\r\n }\r\n get aiIsGeneratingPipeline() {\r\n return this.pipeline.aiIsGeneratingPipeline\r\n }\r\n get activeStageIndex() {\r\n return this.pipeline.activeStage$.asObservable()\r\n }\r\n get activeStage() {\r\n console.log(this.pipeline.activeStage)\r\n return this.pipeline.activeStage\r\n }\r\n get isRunningPipeline() {\r\n return this.pipeline.isRunningPipeline\r\n }\r\n get cannotAddStage() {\r\n return this.pipeline.pipelineGeneralValid.pipe(\r\n map(valid => !valid)\r\n )\r\n }\r\nget schemaLoadError$() {\r\n return this.pipeline.schemaLoadError$.asObservable()\r\n}\r\n get chatHistory() {\r\n return this.pipeline.chatHistory$.asObservable()\r\n }\r\n cursorPosition = 0\r\n showSuggestions = false;\r\n onTextChange(event: Event) {\r\n if (!this.textareaElementRef?.nativeElement) {\r\n return;\r\n }\r\n console.log('onTextChange',event)\r\n const newValue =(event.target as HTMLInputElement).value;\r\n const textarea = this.textareaElementRef.nativeElement;\r\n this.cursorPosition = textarea.selectionStart || 0;\r\n\r\n const lastChar = newValue[this.cursorPosition - 1];\r\n const match = newValue.slice(0, this.cursorPosition).match(/\\$(\\w*)$/);\r\n\r\n if (lastChar === '$' || (match && match[1] !== undefined)) {\r\n this.showSuggestions = true;\r\n this.optionsSearch = match ? match?.[1] ||'' : '';\r\n } else {\r\n this.showSuggestions = false;\r\n this.optionsSearch = '';\r\n }\r\n\r\n this.pipeline.onTextChange(newValue);\r\n }\r\n selectSuggestionInput(suggestion: string) {\r\n this.pipeline.prompt$.asObservable().pipe(\r\n take(1),\r\n tap(prompt => {\r\n const match = prompt?.slice(0, this.cursorPosition).match(/\\$(\\w*)$/);\r\n const beforeCursor = prompt?.slice(0, match ? match.index : this.cursorPosition - 1);\r\n const afterCursor = prompt?.slice(this.cursorPosition);\r\n prompt = beforeCursor + suggestion + ' ' + afterCursor;\r\n this.pipeline.prompt$.next(prompt);\r\n this.applyNewValueToPrompt(suggestion);\r\n })\r\n ).subscribe();\r\n }\r\n applyNewValueToPrompt(suggestion: any) {\r\n this.showSuggestions = false;\r\n\r\n const textarea = this.textareaElementRef.nativeElement;\r\n textarea.focus();\r\n const newCursorPosition = this.cursorPosition + suggestion.length;\r\n setTimeout(() => {\r\n textarea.setSelectionRange(newCursorPosition, newCursorPosition);\r\n }, 0);\r\n }\r\n optionsSearch = ''\r\n onSearchChange(event: any) {\r\n this.optionsSearch = event.detail.value\r\n\r\n }\r\n promptSubmit() {\r\n this.pipeline.promptSubmit()\r\n console.log('promptSubmit')\r\n }\r\n trackById = (index: number, stage: any) => index\r\n\r\n setActiveStage(index: number | undefined) {\r\n\r\n this.pipeline.setActiveStage(index)\r\n }\r\n addStage() {\r\n this.pipeline.addStage()\r\n }\r\n get getSchemaProperties() {\r\n return this.pipeline.schema$.asObservable().pipe(\r\n map(schema =>\r\n Object.keys(schema || {}).map(key => ({ label: key, value: key, })).filter(key => this.optionsSearch ? key.label.toLowerCase().includes(this.optionsSearch.toLowerCase()) : true)\r\n )\r\n )\r\n }\r\n deleteStage(index: number) {\r\n this.pipeline.deleteStage(index)\r\n }\r\n saveStage(index: number, stage: any) {\r\n this.pipeline.saveStage(index, stage)\r\n this.setActiveStage(undefined)\r\n }\r\n}\r\n","@if(!!loadingWorkflowOptions){\n<div style=\"display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 24px;\">\n <mat-spinner style=\"margin-bottom: 16px;\"></mat-spinner>\n <p>\n Loading workflows...\n </p>\n</div>\n}\n\n@if(!loadingWorkflowOptions){\n<section class=\"ion-margin\">\n <p>MongoDB aggregation pipeline builder for selected workflows. </p>\n</section>\n<lib-t-workflow-picker \n(valueChanged)=\"workflowChanged($event)\" \n[getWorkflowOptions]=\" workflowOptions\"\n [value]=\"workflowId|async\">\n</lib-t-workflow-picker>\n<mat-accordion multi *ngIf=\"workflowId|async\">\n <!-- Pipeline Accordion -->\n <mat-expansion-panel value=\"pipeline\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-spinner color=\"accent\" *ngIf=\"isRunningPipeline\" class=\"header-spinner\"></mat-spinner>\n <mat-icon class=\"title-icon\">\n dynamic_form\n </mat-icon>\n {{isRunningPipeline?'Executing current Data pipeline...':'Data retrieval pipeline'}}\n </mat-panel-title>\n\n </mat-expansion-panel-header>\n <div class=\"content\">\n <!-- Mongodb aggregate pipelione stages management and edit start-->\n <div *ngIf=\"((stages | async)?.length || 0) ===0\" class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>\n Add stages to the pipeline below.<br>\n Each stage processes input documents by filtering, grouping, or calculating values. The output documents from\n one stage are passed to the next stage in the pipeline.\n </span>\n </div>\n\n <mat-nav-list style=\" background: var(--mat-tree-container-background-color);padding:0px;border-radius:8px\">\n\n\n <ng-container *ngFor=\"let stage of stages | async; trackBy: trackById;index as $index;last as isLast\">\n <mat-list-item [style.margin-top]=\"(activeStageIndex|async) ===$index?'4px':'0px'\"\n [class.mat-elevation-z8]=\"(activeStageIndex|async) ===$index\" class=\"stage-item\"\n (click)=\"setActiveStage($index)\" [activated]=\" (activeStageIndex|async) ===$index\">\n <span class=\"stage-index\" matListItemAvatar>{{$index + 1}} </span>\n <div matListItemTitle>\n <div style=\"line-height: normal;\">\n {{ stage.name || 'Stage ' }}\n </div>\n <div class=\"stage-inner-message\" *ngIf=\"!stage.name && (activeStageIndex|async) !==$index \">\n Incomplete , click to edit\n </div>\n\n </div>\n\n <button *ngIf=\"(activeStageIndex|async) ===$index||!stage.valid && (activeStageIndex|async) !==$index\"\n mat-icon-button matListItemMeta>\n <mat-icon color=\"primary\" *ngIf=\"(activeStageIndex|async) ===$index\">check_circle</mat-icon>\n\n <mat-icon color=\"warn\" *ngIf=\"!stage.valid && (activeStageIndex|async) !==$index\">\n warning\n </mat-icon>\n </button>\n </mat-list-item>\n <mat-divider></mat-divider>\n\n <app-aggregate-stage-editor [selectedStage]=\"stage\" [isRunningPipeline]=\"isRunningPipeline\"\n (deleteStage)=\"deleteStage($index)\" (saveStage)=\"saveStage($index,$event)\"\n *ngIf=\"(activeStageIndex|async) ===$index\"></app-aggregate-stage-editor>\n\n\n </ng-container>\n\n <mat-toolbar style=\"padding: 0px;\">\n\n <span class=\"spacer\"></span>\n <button class=\"stage-button\" [disabled]=\"isRunningPipeline\" color=\"primary\" (click)=\"addStage()\"\n mat-raised-button>\n Add\n <mat-icon>add</mat-icon>\n </button>\n </mat-toolbar>\n </mat-nav-list>\n\n <!-- Mongodb aggregate pipelione stages management and edit end -->\n </div>\n </mat-expansion-panel>\n\n <!-- Results Accordion -->\n <mat-expansion-panel value=\"results\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-spinner color=\"accent\" *ngIf=\"isRunningPipeline\" class=\"header-spinner\"></mat-spinner>\n <mat-icon class=\"title-icon\">dataset</mat-icon>\n {{isRunningPipeline?'Running pipeline...':'Data Results'}}\n </mat-panel-title>\n </mat-expansion-panel-header>\n <div class=\"content\">\n <ng-container *ngIf=\"pipeLineResults | async as results; else noResults\">\n\n <lib-t-dynamic-data-view *ngIf=\"results\" [data]=\"results\"></lib-t-dynamic-data-view>\n <p *ngIf=\"!results\" color=\"medium\">\n\n No results available\n\n </p>\n\n </ng-container>\n <ng-template #noResults>\n <p color=\"medium\">No results available</p>\n </ng-template>\n </div>\n </mat-expansion-panel>\n\n <!-- AI Agent Accordion -->\n <mat-expansion-panel value=\"ai\">\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-spinner *ngIf=\" aiIsGeneratingPipeline \" style=\"position: absolute;\" class=\"header-spinner\"></mat-spinner>\n <mat-icon class=\"title-icon\">tips_and_updates</mat-icon>\n {{ aiIsGeneratingPipeline ? 'Agent busy ...' : 'AI AGENT prompt' }}\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n @if( schemaLoadError$ | async){\n <div class=\"tree-instructions\" style=\"background: antiquewhite !important;\">\n <mat-icon class=\"info-icon\" color=\"warn\">error</mat-icon>\n <span> {{ schemaLoadError$ | async }}</span>\n </div>\n \n }\n <mat-list *ngFor=\"let chat of chatHistory|async;\">\n\n <mat-list-item class=\"chatContent chatItem\">\n <div class=\"chat\" style=\"background:bisque;text-align:end;\n border-radius: 18px 18px 0px 18px;\" matListItemTitle>\n <div>\n {{chat.user}}\n </div>\n <div style=\"opacity:0.6;line-height: normal;display: flex;align-items: center;justify-content: flex-end;\">\n {{chat.date|daysAgo}}\n <mat-icon class=\"sent-icon\">\n done_all\n </mat-icon>\n </div>\n </div>\n </mat-list-item>\n\n <mat-list-item style=\"margin-top: 16px;\" class=\"chatContent chatItem\" color=\"light\" lines=\"full\">\n <mat-icon style=\" margin-left: 0px;\n margin-top: 16px;\n margin-bottom: auto;\" matListItemIcon>smart_toy</mat-icon>\n <div class=\"chat\" style=\"text-align: left; \n padding-left: 16px; \n background: azure;\n border-radius: 0px 18px 18px 18px;\" *ngIf=\"!chat.assistance?.error\" matListItemTitle>\n <pre>\n {{chat. assistance.pipeline |json}}\n </pre>\n </div>\n <div *ngIf=\"chat.assistance?.error\" matListItemTitle>\n {{chat.assistance.error}}\n </div>\n </mat-list-item>\n\n\n </mat-list>\n <mat-list>\n <mat-list-item class=\"chatContent chatItem\">\n <textarea matListItemTitle #textarea style=\" width: calc(100% - 13px);\n border-radius: 14px;\n padding-right: 3px;\n padding-left: 8px;\" class=\"chat\" [value]=\" prompt|async\" (input)=\"onTextChange($event)\"\n placeholder=\"Provide a pipeline generation prompt\"></textarea>\n <button matListItemMeta style=\" margin-left: 4px;\n margin-right: 0px;\" color=\"primary\" mat-mini-fab [disabled]=\"aiIsGeneratingPipeline\" (click)=\"promptSubmit()\">\n\n <mat-icon style=\"margin: 0px !important;color:white\">send</mat-icon>\n <mat-spinner color=\"accent\" *ngIf=\" aiIsGeneratingPipeline \" \n class=\"submit-spinner\" ></mat-spinner>\n </button>\n \n </mat-list-item>\n\n </mat-list>\n\n\n <section *ngIf=\"showSuggestions\" class=\"showSuggestionContainer\">\n <!-- <mat-toolbar class=\"search-container\" style=\"background: inherit;\">\n\n\n <input type=\"search\" placeholder=\"Search options\" class=\"search-field\" (change)=\"onSearchChange($event)\">\n\n <mat-icon>\n search\n </mat-icon>\n </mat-toolbar> -->\n <mat-divider></mat-divider>\n <div style=\"padding: 8px;\">\n <div class=\"suggestion-container\">\n <div class=\"suggestion-column\">\n <h5>Collection document properties</h5>\n <div class=\"button-container\">\n <button *ngFor=\"let method of getSchemaProperties | async;trackBy: trackById\"\n (click)=\"selectSuggestionInput(method.value)\" color=\"accent\" mat-flat-button\n class=\"suggestion-button\">\n {{ method.label | titlecase }}\n </button>\n </div>\n </div>\n\n </div>\n\n\n </div>\n </section>\n\n\n\n\n\n\n\n </div>\n </mat-expansion-panel>\n</mat-accordion>\n\n\n}"],"names":["i3","i9","i2","i4","i5","i6","i7","i8"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;MAoBa,mBAAmB,CAAA;AAG9B,IAAA,WAAA,CAAoB,EAAe,EAAA;QAAf,IAAE,CAAA,EAAA,GAAF,EAAE;AADtB,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAE;AAmB1B,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAGpC;AACF,QAAA,IAAA,CAA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