ngx-t-forms 2.0.28 → 2.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-DqEcErNO.mjs → ngx-t-forms-calculated-field-rules.component-Ct6_c_Lj.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-DqEcErNO.mjs.map → ngx-t-forms-calculated-field-rules.component-Ct6_c_Lj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-ItZ2K6AS.mjs → ngx-t-forms-chip-options-creator-editor.component-yuM1KHho.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-ItZ2K6AS.mjs.map → ngx-t-forms-chip-options-creator-editor.component-yuM1KHho.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-cGgQrGlZ.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-BptpYSe-.mjs} +6 -8
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-BptpYSe-.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-data-source-picker.component-cxjBReMg.mjs → ngx-t-forms-data-source-picker.component-Badna1Rl.mjs} +8 -9
- package/fesm2022/ngx-t-forms-data-source-picker.component-Badna1Rl.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-Dr-w1JzX.mjs → ngx-t-forms-document-list-label-config-editor.component-2_8XzUgD.mjs} +7 -9
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-2_8XzUgD.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-form-input-selector.component-DV4Sts9F.mjs +134 -0
- package/fesm2022/ngx-t-forms-form-input-selector.component-DV4Sts9F.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-form-json-view.component-00g2e0dT.mjs → ngx-t-forms-form-json-view.component-B8seYzMQ.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-form-json-view.component-00g2e0dT.mjs.map → ngx-t-forms-form-json-view.component-B8seYzMQ.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-form-section-stepper.component-x_83iAWA.mjs +281 -0
- package/fesm2022/ngx-t-forms-form-section-stepper.component-x_83iAWA.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-DKybEMbx.mjs → ngx-t-forms-forms-builder-menu.component-UWo_dyVt.mjs} +14 -18
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-UWo_dyVt.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-input-editor.component-otrfAVh7.mjs → ngx-t-forms-input-editor.component-B_kkOoEO.mjs} +10 -10
- package/fesm2022/ngx-t-forms-input-editor.component-B_kkOoEO.mjs.map +1 -0
- package/fesm2022/ngx-t-forms-map-mat-options-keys-SM5XM9uy.mjs +124 -0
- package/fesm2022/ngx-t-forms-map-mat-options-keys-SM5XM9uy.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-Bj0vLXbO.mjs → ngx-t-forms-mat-chip-list-editor.component-C41AL9Et.mjs} +5 -6
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-C41AL9Et.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-FJV0cwS2.mjs → ngx-t-forms-mat-slider-editor.component-BWe8U-sI.mjs} +2 -3
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-BWe8U-sI.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-BFZ0NqQb.mjs → ngx-t-forms-mat-slider-toggle-editor.component-B_XlkHuK.mjs} +2 -2
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-BFZ0NqQb.mjs.map → ngx-t-forms-mat-slider-toggle-editor.component-B_XlkHuK.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-CTEQEHFc.mjs → ngx-t-forms-missing-form-configs.component-DPNNyKkt.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-CTEQEHFc.mjs.map → ngx-t-forms-missing-form-configs.component-DPNNyKkt.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-DS_AVAsh.mjs → ngx-t-forms-mscoa-chart-toolbar.component-DY1QnG08.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-DS_AVAsh.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-DY1QnG08.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-error-display.component-CEO9xouF.mjs → ngx-t-forms-mscoa-error-display.component-CRc_4l3l.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-mscoa-error-display.component-CEO9xouF.mjs.map → ngx-t-forms-mscoa-error-display.component-CRc_4l3l.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-C7pdGHqP.mjs → ngx-t-forms-mscoa-segment-config.component-Ckr_nuZF.mjs} +7 -10
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-Ckr_nuZF.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-Ct1Mb2x-.mjs → ngx-t-forms-mscoa-temporary-hint.component-GYxT-56Y.mjs} +4 -4
- package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-Ct1Mb2x-.mjs.map → ngx-t-forms-mscoa-temporary-hint.component-GYxT-56Y.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-ngx-t-forms-mfuTrkmM.mjs → ngx-t-forms-ngx-t-forms-DP2koSL5.mjs} +2153 -587
- package/fesm2022/ngx-t-forms-ngx-t-forms-DP2koSL5.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-CgpB8grY.mjs → ngx-t-forms-pipeline-generator.component-BxHetD_Q.mjs} +11 -35
- package/fesm2022/ngx-t-forms-pipeline-generator.component-BxHetD_Q.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-record-list-manager.component-CzZ0oofH.mjs → ngx-t-forms-record-list-manager.component-BQuMkoXo.mjs} +5 -6
- package/fesm2022/ngx-t-forms-record-list-manager.component-BQuMkoXo.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-required-inputs.component-BKWaKqO6.mjs → ngx-t-forms-required-inputs.component-CLyq9dIR.mjs} +5 -7
- package/fesm2022/ngx-t-forms-required-inputs.component-CLyq9dIR.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-DqGJ_q5y.mjs → ngx-t-forms-rest-api-call-setup.component-CWeIUKLz.mjs} +7 -11
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-CWeIUKLz.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-section-report.component-Z0hcYnrT.mjs → ngx-t-forms-section-report.component-BtaF39WD.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-section-report.component-Z0hcYnrT.mjs.map → ngx-t-forms-section-report.component-BtaF39WD.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-DKfWcIYB.mjs → ngx-t-forms-selection-options-editor.component-B4cEGWrK.mjs} +7 -8
- package/fesm2022/ngx-t-forms-selection-options-editor.component-B4cEGWrK.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-CUX4KlZd.mjs → ngx-t-forms-t-workflow-picker.component-BkVN4Wdk.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-t-workflow-picker.component-CUX4KlZd.mjs.map → ngx-t-forms-t-workflow-picker.component-BkVN4Wdk.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-D5lUrnLK.mjs → ngx-t-forms-validators-config.component-Cq07Er-G.mjs} +8 -10
- package/fesm2022/ngx-t-forms-validators-config.component-Cq07Er-G.mjs.map +1 -0
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/package.json +2 -2
- package/types/ngx-t-forms.d.ts +172 -7
- package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-cGgQrGlZ.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-data-source-picker.component-cxjBReMg.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-Dr-w1JzX.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-input-selector.component-9kIiAxlg.mjs +0 -132
- package/fesm2022/ngx-t-forms-form-input-selector.component-9kIiAxlg.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-form-section-stepper.component-BaT3CcFj.mjs +0 -264
- package/fesm2022/ngx-t-forms-form-section-stepper.component-BaT3CcFj.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-forms-builder-menu.component-DKybEMbx.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-input-editor.component-otrfAVh7.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-Bj0vLXbO.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mat-slider-editor.component-FJV0cwS2.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-C7pdGHqP.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-mfuTrkmM.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-pipeline-generator.component-CgpB8grY.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-record-list-manager.component-CzZ0oofH.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-required-inputs.component-BKWaKqO6.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-rest-api-call-setup.component-DqGJ_q5y.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-selection-options-editor.component-DKfWcIYB.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-validators-config.component-D5lUrnLK.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as i2$
|
|
1
|
+
import * as i2$2 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { EventEmitter, Output, Input, Component, inject, Injectable, ElementRef, ViewChild, HostBinding, Optional, Self } from '@angular/core';
|
|
@@ -6,15 +6,15 @@ import * as i1 from '@angular/forms';
|
|
|
6
6
|
import { FormsModule } from '@angular/forms';
|
|
7
7
|
import { Subscription, 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, J as JsonEditorComponent, N as NGX_T_FORMS_CONFIG_TOKEN, b as TDynamicDataViewComponent, D as DaysAgoPipe } from './ngx-t-forms-ngx-t-forms-
|
|
9
|
+
import { M as MatModulesModule, J as JsonEditorComponent, N as NGX_T_FORMS_CONFIG_TOKEN, b as TDynamicDataViewComponent, D as DaysAgoPipe } from './ngx-t-forms-ngx-t-forms-DP2koSL5.mjs';
|
|
10
10
|
import * as i2 from '@angular/material/autocomplete';
|
|
11
11
|
import * as i2$1 from '@angular/material/button';
|
|
12
12
|
import * as i3 from '@angular/material/card';
|
|
13
13
|
import * as i4 from '@angular/material/divider';
|
|
14
|
-
import * as
|
|
15
|
-
import * as
|
|
16
|
-
import * as
|
|
17
|
-
import { TWorkflowPickerComponent } from './ngx-t-forms-t-workflow-picker.component-
|
|
14
|
+
import * as i3$1 from '@angular/material/icon';
|
|
15
|
+
import * as i3$2 from '@angular/material/select';
|
|
16
|
+
import * as i4$1 from '@angular/material/tooltip';
|
|
17
|
+
import { TWorkflowPickerComponent } from './ngx-t-forms-t-workflow-picker.component-BkVN4Wdk.mjs';
|
|
18
18
|
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
19
19
|
import { HttpClient } from '@angular/common/http';
|
|
20
20
|
import * as i10 from '@angular/cdk/overlay';
|
|
@@ -76,7 +76,6 @@ class AggregateStageEditorComponent {
|
|
|
76
76
|
const { config, stage } = this.activeStage || {};
|
|
77
77
|
// Check if config and stage are defined
|
|
78
78
|
if (!config && config !== 0 || !stage) {
|
|
79
|
-
console.error('Config or stage is not defined', config, stage);
|
|
80
79
|
this.activeStage.valid = false;
|
|
81
80
|
return; // Early exit if validation fails
|
|
82
81
|
}
|
|
@@ -93,7 +92,6 @@ class AggregateStageEditorComponent {
|
|
|
93
92
|
// Catch and handle errors from validation
|
|
94
93
|
this.configValidationError = error.message || JSON.stringify(error) || 'An unknown error occurred';
|
|
95
94
|
this.activeStage.valid = false;
|
|
96
|
-
console.error('Validation Error:', this.configValidationError);
|
|
97
95
|
}
|
|
98
96
|
}
|
|
99
97
|
canSaveConfig() {
|
|
@@ -118,7 +116,7 @@ class AggregateStageEditorComponent {
|
|
|
118
116
|
this.deleteStage.emit();
|
|
119
117
|
}
|
|
120
118
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: AggregateStageEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
121
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.5", 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\" subscriptSizing=\"dynamic\" >\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.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i2$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type:
|
|
119
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.5", 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\" subscriptSizing=\"dynamic\" >\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.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i2$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i3$2.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: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: JsonEditorComponent, selector: "app-json-editor", inputs: ["value"], outputs: ["valueChange"] }] }); }
|
|
122
120
|
}
|
|
123
121
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: AggregateStageEditorComponent, decorators: [{
|
|
124
122
|
type: Component,
|
|
@@ -199,7 +197,6 @@ class PipelineService {
|
|
|
199
197
|
* @param error The error response from the HTTP request
|
|
200
198
|
*/
|
|
201
199
|
handleError(error) {
|
|
202
|
-
console.error('An error occurred', error);
|
|
203
200
|
// Return an observable with a user-facing error message
|
|
204
201
|
return throwError(() => new Error('Something went wrong with the pipeline generation; please try again later.'));
|
|
205
202
|
}
|
|
@@ -226,7 +223,6 @@ class PipelineService {
|
|
|
226
223
|
? "Document schema is missing. Please ensure at least one document exists for the selected workflow."
|
|
227
224
|
: undefined;
|
|
228
225
|
this.schemaLoadError$.next(error);
|
|
229
|
-
console.log("Workflow schema loaded,run pipeline");
|
|
230
226
|
this.runActivePipeline();
|
|
231
227
|
}), catchError((error) => {
|
|
232
228
|
this.schemaLoadError$.next("Error loading schema");
|
|
@@ -247,20 +243,14 @@ class PipelineService {
|
|
|
247
243
|
}
|
|
248
244
|
onTextChange(event) {
|
|
249
245
|
this.prompt$.next(event);
|
|
250
|
-
console.log(event);
|
|
251
246
|
}
|
|
252
247
|
promptSubmit() {
|
|
253
248
|
// Use combineLatest to fetch the latest values from multiple sources
|
|
254
249
|
combineLatest([this.schema$, this.threadId$, this.pipeline$, this.prompt$, this.chatHistory$])
|
|
255
|
-
.pipe(take(1), tap(([schema, threadId, pipeline, prompt, history]) => {
|
|
256
|
-
if (!schema || !prompt) {
|
|
257
|
-
console.warn(`Missing values: schema ${schema} prompt ${prompt}`);
|
|
258
|
-
}
|
|
259
|
-
}), filter(([schema, , , prompt]) => !!schema && !!prompt), switchMap(([schema, threadId, pipeline, prompt, history]) => {
|
|
250
|
+
.pipe(take(1), tap(() => { }), filter(([schema, , , prompt]) => !!schema && !!prompt), switchMap(([schema, threadId, pipeline, prompt, history]) => {
|
|
260
251
|
// Use a shallow copy of the pipeline
|
|
261
252
|
const previousError = history[history.length - 1]?.assistance?.error;
|
|
262
253
|
const pipelineCopy = pipeline.map(stage => JSON.parse(JSON.stringify(stage))) || [];
|
|
263
|
-
console.info('Generating pipeline with prompt:', prompt, 'schema:', schema, 'threadId:', threadId, 'pipeline:', pipeline);
|
|
264
254
|
return this.generatePipeline(prompt, schema, threadId, pipelineCopy, previousError).pipe(map((response) => ({ ...response, history, prompt })));
|
|
265
255
|
}), tap((response) => {
|
|
266
256
|
const { pipeline, threadId, history, prompt } = response;
|
|
@@ -276,10 +266,8 @@ class PipelineService {
|
|
|
276
266
|
// Store threadID locally
|
|
277
267
|
localStorage.setItem('threadId', threadId);
|
|
278
268
|
// Run the active pipeline after all state updates are complete
|
|
279
|
-
console.log("prompt submitted run pipeline");
|
|
280
269
|
this.runActivePipeline();
|
|
281
270
|
}), catchError((error) => {
|
|
282
|
-
console.error('Error response:', error.message || error);
|
|
283
271
|
return this.handleError(error);
|
|
284
272
|
})).subscribe();
|
|
285
273
|
}
|
|
@@ -292,8 +280,7 @@ class PipelineService {
|
|
|
292
280
|
try {
|
|
293
281
|
PipelineBuilder.validatePipeline(pipeline);
|
|
294
282
|
}
|
|
295
|
-
catch
|
|
296
|
-
console.error(error, pipeline);
|
|
283
|
+
catch {
|
|
297
284
|
return;
|
|
298
285
|
}
|
|
299
286
|
const workflowId = this.workflowId$.getValue();
|
|
@@ -303,7 +290,6 @@ class PipelineService {
|
|
|
303
290
|
this.runPipeLine(pipeline, workflowId).pipe(take(1), tap(({ results }) => {
|
|
304
291
|
this.pipeLineResult$.next(results);
|
|
305
292
|
}), catchError((error) => {
|
|
306
|
-
console.error('Error response:', error);
|
|
307
293
|
const err = JSON.parse(JSON.stringify(error));
|
|
308
294
|
const errorMessage = err.error;
|
|
309
295
|
if (errorMessage) {
|
|
@@ -343,10 +329,8 @@ class PipelineService {
|
|
|
343
329
|
}
|
|
344
330
|
return s;
|
|
345
331
|
});
|
|
346
|
-
console.log("newPipeline", newPipeline);
|
|
347
332
|
this.pipeline$.next(newPipeline);
|
|
348
333
|
this.activeStage$.next(undefined);
|
|
349
|
-
console.log("stage saved run pipeline");
|
|
350
334
|
this.runActivePipeline();
|
|
351
335
|
}
|
|
352
336
|
deleteStage(index) {
|
|
@@ -355,10 +339,8 @@ class PipelineService {
|
|
|
355
339
|
return;
|
|
356
340
|
}
|
|
357
341
|
const newPipeline = pipeline.filter((s, i) => i !== index);
|
|
358
|
-
console.log("newPipeline", newPipeline);
|
|
359
342
|
this.pipeline$.next(newPipeline);
|
|
360
343
|
this.activeStage$.next(undefined);
|
|
361
|
-
console.log("stage deleted run pipeline");
|
|
362
344
|
this.runActivePipeline();
|
|
363
345
|
}
|
|
364
346
|
get pipelineGeneralValid() {
|
|
@@ -423,7 +405,6 @@ class PipelineGeneratorComponent {
|
|
|
423
405
|
name: this._workflowName || 'Unnamed Pipeline',
|
|
424
406
|
"source": "mongoPipeline",
|
|
425
407
|
};
|
|
426
|
-
console.log('Pipeline config changed', newConfig);
|
|
427
408
|
this.valueChanged.emit(newConfig);
|
|
428
409
|
});
|
|
429
410
|
};
|
|
@@ -457,7 +438,6 @@ class PipelineGeneratorComponent {
|
|
|
457
438
|
this.stateChanges.next();
|
|
458
439
|
}
|
|
459
440
|
markAsTouched() {
|
|
460
|
-
console.log('markAsTouched');
|
|
461
441
|
if (!this.touched) {
|
|
462
442
|
this.onTouched();
|
|
463
443
|
this.touched = true;
|
|
@@ -472,7 +452,6 @@ class PipelineGeneratorComponent {
|
|
|
472
452
|
if (value?.workflowId) {
|
|
473
453
|
this.workflowChanged(value?.workflowId);
|
|
474
454
|
}
|
|
475
|
-
console.log('Pipeline value changed', value, this.pipeline.pipeline$.value);
|
|
476
455
|
if (value?.pipeline) {
|
|
477
456
|
this.pipeline.pipeline$.next(value?.pipeline || []);
|
|
478
457
|
}
|
|
@@ -518,7 +497,6 @@ class PipelineGeneratorComponent {
|
|
|
518
497
|
return this.pipeline.activeStage$.asObservable();
|
|
519
498
|
}
|
|
520
499
|
get activeStage() {
|
|
521
|
-
console.log(this.pipeline.activeStage);
|
|
522
500
|
return this.pipeline.activeStage;
|
|
523
501
|
}
|
|
524
502
|
get isRunningPipeline() {
|
|
@@ -537,7 +515,6 @@ class PipelineGeneratorComponent {
|
|
|
537
515
|
if (!this.textareaElementRef?.nativeElement) {
|
|
538
516
|
return;
|
|
539
517
|
}
|
|
540
|
-
console.log('onTextChange', event);
|
|
541
518
|
const newValue = event.target.value;
|
|
542
519
|
const textarea = this.textareaElementRef.nativeElement;
|
|
543
520
|
this.cursorPosition = textarea.selectionStart || 0;
|
|
@@ -577,7 +554,6 @@ class PipelineGeneratorComponent {
|
|
|
577
554
|
}
|
|
578
555
|
promptSubmit() {
|
|
579
556
|
this.pipeline.promptSubmit();
|
|
580
|
-
console.log('promptSubmit');
|
|
581
557
|
}
|
|
582
558
|
setActiveStage(index) {
|
|
583
559
|
this.pipeline.setActiveStage(index);
|
|
@@ -596,7 +572,7 @@ class PipelineGeneratorComponent {
|
|
|
596
572
|
this.setActiveStage(undefined);
|
|
597
573
|
}
|
|
598
574
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: PipelineGeneratorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
599
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: PipelineGeneratorComponent, isStandalone: true, selector: "app-pipeline-generator", inputs: { disabled: "disabled", 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: "\r\n\r\n\r\n<section class=\"ion-margin\">\r\n <p>MongoDB aggregation pipeline builder for selected workflows. </p>\r\n</section>\r\n<lib-t-workflow-picker \r\n(valueChanged)=\"workflowChanged($event)\"\r\n(workflowNameChanged)=\"workflowNameChanged($event)\" \r\n[getWorkflowOptions]=\" workflows$\"\r\n [value]=\"(workflowId|async)||undefined\">\r\n</lib-t-workflow-picker>\r\n<mat-accordion multi *ngIf=\"workflowId|async\">\r\n <!-- Pipeline Accordion -->\r\n <mat-expansion-panel value=\"pipeline\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <mat-spinner color=\"accent\" *ngIf=\"isRunningPipeline\" class=\"header-spinner\"></mat-spinner>\r\n <mat-icon class=\"title-icon\">\r\n dynamic_form\r\n </mat-icon>\r\n {{isRunningPipeline?'Executing current Data pipeline...':'Data retrieval pipeline'}}\r\n </mat-panel-title>\r\n\r\n </mat-expansion-panel-header>\r\n <div class=\"content\">\r\n <!-- Mongodb aggregate pipelione stages management and edit start-->\r\n <div *ngIf=\"((stages | async)?.length || 0) ===0\" class=\"tree-instructions\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n Add stages to the pipeline below.<br>\r\n Each stage processes input documents by filtering, grouping, or calculating values. The output documents from\r\n one stage are passed to the next stage in the pipeline.\r\n </span>\r\n </div>\r\n\r\n <mat-nav-list style=\" background: var(--mat-tree-container-background-color);padding:0px;border-radius:8px\">\r\n\r\n\r\n <ng-container *ngFor=\"let stage of stages | async; trackBy: trackById;index as $index;last as isLast\">\r\n <mat-list-item [style.margin-top]=\"(activeStageIndex|async) ===$index?'4px':'0px'\"\r\n [class.mat-elevation-z8]=\"(activeStageIndex|async) ===$index\" class=\"stage-item\"\r\n (click)=\"setActiveStage($index)\" [activated]=\" (activeStageIndex|async) ===$index\">\r\n <span class=\"stage-index\" matListItemAvatar>{{$index + 1}} </span>\r\n <div matListItemTitle>\r\n <div style=\"line-height: normal;\">\r\n {{ stage.name || 'Stage ' }}\r\n </div>\r\n <div class=\"stage-inner-message\" *ngIf=\"!stage.name && (activeStageIndex|async) !==$index \">\r\n Incomplete , click to edit\r\n </div>\r\n\r\n </div>\r\n\r\n <button *ngIf=\"(activeStageIndex|async) ===$index||!stage.valid && (activeStageIndex|async) !==$index\"\r\n mat-icon-button matListItemMeta>\r\n <mat-icon color=\"primary\" *ngIf=\"(activeStageIndex|async) ===$index\">check_circle</mat-icon>\r\n\r\n <mat-icon color=\"warn\" *ngIf=\"!stage.valid && (activeStageIndex|async) !==$index\">\r\n warning\r\n </mat-icon>\r\n </button>\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n\r\n <app-aggregate-stage-editor [selectedStage]=\"stage\" [isRunningPipeline]=\"isRunningPipeline\"\r\n (deleteStage)=\"deleteStage($index)\" (saveStage)=\"saveStage($index,$event)\"\r\n *ngIf=\"(activeStageIndex|async) ===$index\"></app-aggregate-stage-editor>\r\n\r\n\r\n </ng-container>\r\n\r\n <mat-toolbar style=\"padding: 0px;\">\r\n\r\n <span class=\"spacer\"></span>\r\n <button class=\"stage-button\" [disabled]=\"isRunningPipeline\" color=\"primary\" (click)=\"addStage()\"\r\n mat-raised-button>\r\n Add\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n </mat-nav-list>\r\n\r\n <!-- Mongodb aggregate pipelione stages management and edit end -->\r\n </div>\r\n </mat-expansion-panel>\r\n\r\n <!-- Results Accordion -->\r\n <mat-expansion-panel value=\"results\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <mat-spinner color=\"accent\" *ngIf=\"isRunningPipeline\" class=\"header-spinner\"></mat-spinner>\r\n <mat-icon class=\"title-icon\">dataset</mat-icon>\r\n {{isRunningPipeline?'Running pipeline...':'Data Results'}}\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div class=\"content\">\r\n <ng-container *ngIf=\"pipeLineResults | async as results; else noResults\">\r\n\r\n <lib-t-dynamic-data-view *ngIf=\"results\" [data]=\"results\"></lib-t-dynamic-data-view>\r\n <p *ngIf=\"!results\" color=\"medium\">\r\n\r\n No results available\r\n\r\n </p>\r\n\r\n </ng-container>\r\n <ng-template #noResults>\r\n <p color=\"medium\">No results available</p>\r\n </ng-template>\r\n </div>\r\n </mat-expansion-panel>\r\n\r\n <!-- AI Agent Accordion -->\r\n <mat-expansion-panel value=\"ai\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <mat-spinner *ngIf=\" aiIsGeneratingPipeline \" style=\"position: absolute;\" class=\"header-spinner\"></mat-spinner>\r\n <mat-icon class=\"title-icon\">tips_and_updates</mat-icon>\r\n {{ aiIsGeneratingPipeline ? 'Agent busy ...' : 'AI AGENT prompt' }}\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <div class=\"content\">\r\n @if( schemaLoadError$ | async){\r\n <div class=\"tree-instructions\" style=\"background: antiquewhite !important;\">\r\n <mat-icon class=\"info-icon\" color=\"warn\">error</mat-icon>\r\n <span> {{ schemaLoadError$ | async }}</span>\r\n </div>\r\n \r\n }\r\n <mat-list *ngFor=\"let chat of chatHistory|async;\">\r\n\r\n <mat-list-item class=\"chatContent chatItem\">\r\n <div class=\"chat\" style=\"background:bisque;text-align:end;\r\n border-radius: 18px 18px 0px 18px;\" matListItemTitle>\r\n <div>\r\n {{chat.user}}\r\n </div>\r\n <div style=\"opacity:0.6;line-height: normal;display: flex;align-items: center;justify-content: flex-end;\">\r\n {{chat.date|daysAgo}}\r\n <mat-icon class=\"sent-icon\">\r\n done_all\r\n </mat-icon>\r\n </div>\r\n </div>\r\n </mat-list-item>\r\n\r\n <mat-list-item style=\"margin-top: 16px;\" class=\"chatContent chatItem\" color=\"light\" lines=\"full\">\r\n <mat-icon style=\" margin-left: 0px;\r\n margin-top: 16px;\r\n margin-bottom: auto;\" matListItemIcon>smart_toy</mat-icon>\r\n <div class=\"chat\" style=\"text-align: left; \r\n padding-left: 16px; \r\n background: azure;\r\n border-radius: 0px 18px 18px 18px;\" *ngIf=\"!chat.assistance?.error\" matListItemTitle>\r\n <pre>\r\n {{chat. assistance.pipeline |json}}\r\n </pre>\r\n </div>\r\n <div *ngIf=\"chat.assistance?.error\" matListItemTitle>\r\n {{chat.assistance.error}}\r\n </div>\r\n </mat-list-item>\r\n\r\n\r\n </mat-list>\r\n <mat-list>\r\n <mat-list-item class=\"chatContent chatItem\">\r\n <textarea matListItemTitle #textarea style=\" width: calc(100% - 13px);\r\n border-radius: 14px;\r\n padding-right: 3px;\r\n padding-left: 8px;\" class=\"chat\" [value]=\" prompt|async\" (input)=\"onTextChange($event)\"\r\n placeholder=\"Provide a pipeline generation prompt\"></textarea>\r\n <button matListItemMeta style=\" margin-left: 4px;\r\n margin-right: 0px;\" color=\"primary\" mat-mini-fab [disabled]=\"aiIsGeneratingPipeline\" (click)=\"promptSubmit()\">\r\n\r\n <mat-icon style=\"margin: 0px !important;color:white\">send</mat-icon>\r\n <mat-spinner color=\"accent\" *ngIf=\" aiIsGeneratingPipeline \" \r\n class=\"submit-spinner\" ></mat-spinner>\r\n </button>\r\n \r\n </mat-list-item>\r\n\r\n </mat-list>\r\n\r\n\r\n <section *ngIf=\"showSuggestions\" class=\"showSuggestionContainer\">\r\n <!-- <mat-toolbar class=\"search-container\" style=\"background: inherit;\">\r\n\r\n\r\n <input type=\"search\" placeholder=\"Search options\" class=\"search-field\" (change)=\"onSearchChange($event)\">\r\n\r\n <mat-icon>\r\n search\r\n </mat-icon>\r\n </mat-toolbar> -->\r\n <mat-divider></mat-divider>\r\n <div style=\"padding: 8px;\">\r\n <div class=\"suggestion-container\">\r\n <div class=\"suggestion-column\">\r\n <h5>Collection document properties</h5>\r\n <div class=\"button-container\">\r\n <button *ngFor=\"let method of getSchemaProperties | async;trackBy: trackById\"\r\n (click)=\"selectSuggestionInput(method.value)\" color=\"accent\" mat-flat-button\r\n class=\"suggestion-button\">\r\n {{ method.label | titlecase }}\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n </section>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n </mat-expansion-panel>\r\n</mat-accordion>\r\n\r\n\r\n\r\n\r\n<ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayOpen]=\"disabled\"\r\n>\r\n<div style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5);\">\r\n\r\n\r\n</div>\r\n</ng-template>\r\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-sys-surface-container, 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:.875em;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:.875em;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:.875em;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$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TWorkflowPickerComponent, selector: "lib-t-workflow-picker", inputs: ["disabled", "errors", "required", "value", "placeholder", "getWorkflowOptions"], outputs: ["valueChange", "valueChanged", "workflowNameChanged"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: TDynamicDataViewComponent, selector: "lib-t-dynamic-data-view", inputs: ["data"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i5.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i5.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i5.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i5.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i7.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i7.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i7.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i7.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i7.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i7.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "component", type: i7$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i5$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i10.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: AggregateStageEditorComponent, selector: "app-aggregate-stage-editor", inputs: ["selectedStage", "isRunningPipeline"], outputs: ["saveStage", "deleteStage"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "pipe", type: i2$4.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$4.JsonPipe, name: "json" }, { kind: "pipe", type: i2$4.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: DaysAgoPipe, name: "daysAgo" }] }); }
|
|
575
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: PipelineGeneratorComponent, isStandalone: true, selector: "app-pipeline-generator", inputs: { disabled: "disabled", 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: "\r\n\r\n\r\n<section class=\"ion-margin\">\r\n <p>MongoDB aggregation pipeline builder for selected workflows. </p>\r\n</section>\r\n<lib-t-workflow-picker \r\n(valueChanged)=\"workflowChanged($event)\"\r\n(workflowNameChanged)=\"workflowNameChanged($event)\" \r\n[getWorkflowOptions]=\" workflows$\"\r\n [value]=\"(workflowId|async)||undefined\">\r\n</lib-t-workflow-picker>\r\n<mat-accordion multi *ngIf=\"workflowId|async\">\r\n <!-- Pipeline Accordion -->\r\n <mat-expansion-panel value=\"pipeline\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <mat-spinner color=\"accent\" *ngIf=\"isRunningPipeline\" class=\"header-spinner\"></mat-spinner>\r\n <mat-icon class=\"title-icon\">\r\n dynamic_form\r\n </mat-icon>\r\n {{isRunningPipeline?'Executing current Data pipeline...':'Data retrieval pipeline'}}\r\n </mat-panel-title>\r\n\r\n </mat-expansion-panel-header>\r\n <div class=\"content\">\r\n <!-- Mongodb aggregate pipelione stages management and edit start-->\r\n <div *ngIf=\"((stages | async)?.length || 0) ===0\" class=\"tree-instructions\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n Add stages to the pipeline below.<br>\r\n Each stage processes input documents by filtering, grouping, or calculating values. The output documents from\r\n one stage are passed to the next stage in the pipeline.\r\n </span>\r\n </div>\r\n\r\n <mat-nav-list style=\" background: var(--mat-tree-container-background-color);padding:0px;border-radius:8px\">\r\n\r\n\r\n <ng-container *ngFor=\"let stage of stages | async; trackBy: trackById;index as $index;last as isLast\">\r\n <mat-list-item [style.margin-top]=\"(activeStageIndex|async) ===$index?'4px':'0px'\"\r\n [class.mat-elevation-z8]=\"(activeStageIndex|async) ===$index\" class=\"stage-item\"\r\n (click)=\"setActiveStage($index)\" [activated]=\" (activeStageIndex|async) ===$index\">\r\n <span class=\"stage-index\" matListItemAvatar>{{$index + 1}} </span>\r\n <div matListItemTitle>\r\n <div style=\"line-height: normal;\">\r\n {{ stage.name || 'Stage ' }}\r\n </div>\r\n <div class=\"stage-inner-message\" *ngIf=\"!stage.name && (activeStageIndex|async) !==$index \">\r\n Incomplete , click to edit\r\n </div>\r\n\r\n </div>\r\n\r\n <button *ngIf=\"(activeStageIndex|async) ===$index||!stage.valid && (activeStageIndex|async) !==$index\"\r\n mat-icon-button matListItemMeta>\r\n <mat-icon color=\"primary\" *ngIf=\"(activeStageIndex|async) ===$index\">check_circle</mat-icon>\r\n\r\n <mat-icon color=\"warn\" *ngIf=\"!stage.valid && (activeStageIndex|async) !==$index\">\r\n warning\r\n </mat-icon>\r\n </button>\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n\r\n <app-aggregate-stage-editor [selectedStage]=\"stage\" [isRunningPipeline]=\"isRunningPipeline\"\r\n (deleteStage)=\"deleteStage($index)\" (saveStage)=\"saveStage($index,$event)\"\r\n *ngIf=\"(activeStageIndex|async) ===$index\"></app-aggregate-stage-editor>\r\n\r\n\r\n </ng-container>\r\n\r\n <mat-toolbar style=\"padding: 0px;\">\r\n\r\n <span class=\"spacer\"></span>\r\n <button class=\"stage-button\" [disabled]=\"isRunningPipeline\" color=\"primary\" (click)=\"addStage()\"\r\n mat-raised-button>\r\n Add\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n </mat-nav-list>\r\n\r\n <!-- Mongodb aggregate pipelione stages management and edit end -->\r\n </div>\r\n </mat-expansion-panel>\r\n\r\n <!-- Results Accordion -->\r\n <mat-expansion-panel value=\"results\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <mat-spinner color=\"accent\" *ngIf=\"isRunningPipeline\" class=\"header-spinner\"></mat-spinner>\r\n <mat-icon class=\"title-icon\">dataset</mat-icon>\r\n {{isRunningPipeline?'Running pipeline...':'Data Results'}}\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div class=\"content\">\r\n <ng-container *ngIf=\"pipeLineResults | async as results; else noResults\">\r\n\r\n <lib-t-dynamic-data-view *ngIf=\"results\" [data]=\"results\"></lib-t-dynamic-data-view>\r\n <p *ngIf=\"!results\" color=\"medium\">\r\n\r\n No results available\r\n\r\n </p>\r\n\r\n </ng-container>\r\n <ng-template #noResults>\r\n <p color=\"medium\">No results available</p>\r\n </ng-template>\r\n </div>\r\n </mat-expansion-panel>\r\n\r\n <!-- AI Agent Accordion -->\r\n <mat-expansion-panel value=\"ai\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <mat-spinner *ngIf=\" aiIsGeneratingPipeline \" style=\"position: absolute;\" class=\"header-spinner\"></mat-spinner>\r\n <mat-icon class=\"title-icon\">tips_and_updates</mat-icon>\r\n {{ aiIsGeneratingPipeline ? 'Agent busy ...' : 'AI AGENT prompt' }}\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <div class=\"content\">\r\n @if( schemaLoadError$ | async){\r\n <div class=\"tree-instructions\" style=\"background: antiquewhite !important;\">\r\n <mat-icon class=\"info-icon\" color=\"warn\">error</mat-icon>\r\n <span> {{ schemaLoadError$ | async }}</span>\r\n </div>\r\n \r\n }\r\n <mat-list *ngFor=\"let chat of chatHistory|async;\">\r\n\r\n <mat-list-item class=\"chatContent chatItem\">\r\n <div class=\"chat\" style=\"background:bisque;text-align:end;\r\n border-radius: 18px 18px 0px 18px;\" matListItemTitle>\r\n <div>\r\n {{chat.user}}\r\n </div>\r\n <div style=\"opacity:0.6;line-height: normal;display: flex;align-items: center;justify-content: flex-end;\">\r\n {{chat.date|daysAgo}}\r\n <mat-icon class=\"sent-icon\">\r\n done_all\r\n </mat-icon>\r\n </div>\r\n </div>\r\n </mat-list-item>\r\n\r\n <mat-list-item style=\"margin-top: 16px;\" class=\"chatContent chatItem\" color=\"light\" lines=\"full\">\r\n <mat-icon style=\" margin-left: 0px;\r\n margin-top: 16px;\r\n margin-bottom: auto;\" matListItemIcon>smart_toy</mat-icon>\r\n <div class=\"chat\" style=\"text-align: left; \r\n padding-left: 16px; \r\n background: azure;\r\n border-radius: 0px 18px 18px 18px;\" *ngIf=\"!chat.assistance?.error\" matListItemTitle>\r\n <pre>\r\n {{chat. assistance.pipeline |json}}\r\n </pre>\r\n </div>\r\n <div *ngIf=\"chat.assistance?.error\" matListItemTitle>\r\n {{chat.assistance.error}}\r\n </div>\r\n </mat-list-item>\r\n\r\n\r\n </mat-list>\r\n <mat-list>\r\n <mat-list-item class=\"chatContent chatItem\">\r\n <textarea matListItemTitle #textarea style=\" width: calc(100% - 13px);\r\n border-radius: 14px;\r\n padding-right: 3px;\r\n padding-left: 8px;\" class=\"chat\" [value]=\" prompt|async\" (input)=\"onTextChange($event)\"\r\n placeholder=\"Provide a pipeline generation prompt\"></textarea>\r\n <button matListItemMeta style=\" margin-left: 4px;\r\n margin-right: 0px;\" color=\"primary\" mat-mini-fab [disabled]=\"aiIsGeneratingPipeline\" (click)=\"promptSubmit()\">\r\n\r\n <mat-icon style=\"margin: 0px !important;color:white\">send</mat-icon>\r\n <mat-spinner color=\"accent\" *ngIf=\" aiIsGeneratingPipeline \" \r\n class=\"submit-spinner\" ></mat-spinner>\r\n </button>\r\n \r\n </mat-list-item>\r\n\r\n </mat-list>\r\n\r\n\r\n <section *ngIf=\"showSuggestions\" class=\"showSuggestionContainer\">\r\n <!-- <mat-toolbar class=\"search-container\" style=\"background: inherit;\">\r\n\r\n\r\n <input type=\"search\" placeholder=\"Search options\" class=\"search-field\" (change)=\"onSearchChange($event)\">\r\n\r\n <mat-icon>\r\n search\r\n </mat-icon>\r\n </mat-toolbar> -->\r\n <mat-divider></mat-divider>\r\n <div style=\"padding: 8px;\">\r\n <div class=\"suggestion-container\">\r\n <div class=\"suggestion-column\">\r\n <h5>Collection document properties</h5>\r\n <div class=\"button-container\">\r\n <button *ngFor=\"let method of getSchemaProperties | async;trackBy: trackById\"\r\n (click)=\"selectSuggestionInput(method.value)\" color=\"accent\" mat-flat-button\r\n class=\"suggestion-button\">\r\n {{ method.label | titlecase }}\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n </section>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n </mat-expansion-panel>\r\n</mat-accordion>\r\n\r\n\r\n\r\n\r\n<ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayOpen]=\"disabled\"\r\n>\r\n<div style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5);\">\r\n\r\n\r\n</div>\r\n</ng-template>\r\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-sys-surface-container, 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:.875em;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:.875em;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:.875em;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$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TWorkflowPickerComponent, selector: "lib-t-workflow-picker", inputs: ["disabled", "errors", "required", "value", "placeholder", "getWorkflowOptions"], outputs: ["valueChange", "valueChanged", "workflowNameChanged"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: TDynamicDataViewComponent, selector: "lib-t-dynamic-data-view", inputs: ["data"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i5.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i5.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i5.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i5.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatList, selector: "mat-list", exportAs: ["matList"] }, { kind: "component", type: i7.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i7.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i7.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i7.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i7.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i7.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "component", type: i7$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i5$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i10.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "component", type: AggregateStageEditorComponent, selector: "app-aggregate-stage-editor", inputs: ["selectedStage", "isRunningPipeline"], outputs: ["saveStage", "deleteStage"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "pipe", type: i2$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$2.JsonPipe, name: "json" }, { kind: "pipe", type: i2$2.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: DaysAgoPipe, name: "daysAgo" }] }); }
|
|
600
576
|
}
|
|
601
577
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: PipelineGeneratorComponent, decorators: [{
|
|
602
578
|
type: Component,
|
|
@@ -634,4 +610,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
634
610
|
}] } });
|
|
635
611
|
|
|
636
612
|
export { PipelineGeneratorComponent };
|
|
637
|
-
//# sourceMappingURL=ngx-t-forms-pipeline-generator.component-
|
|
613
|
+
//# sourceMappingURL=ngx-t-forms-pipeline-generator.component-BxHetD_Q.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-t-forms-pipeline-generator.component-BxHetD_Q.mjs","sources":["../../../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/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 { 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 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 }\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\" subscriptSizing=\"dynamic\" >\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>","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 // 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 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 }\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(() => {}),\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 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 this.runActivePipeline();\r\n }),\r\n catchError((error:IPipelineGenerationError) => {\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 {\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 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 this.pipeline$.next(newPipeline as any)\r\n this.activeStage$.next(undefined)\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 this.pipeline$.next(newPipeline as any)\r\n this.activeStage$.next(undefined)\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\nimport { OverlayModule } from '@angular/cdk/overlay';\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 OverlayModule\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 @Input() disabled: boolean = false;\r\n get 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 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 if (value?.pipeline) {\r\n this.pipeline.pipeline$.next(value?.pipeline || [])\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n workflows$: Observable<IWorkflowOption[] | undefined> | undefined\r\n @Input() set getWorkflowOptions(options$: Observable<IWorkflowOption[] | undefined> | undefined) {\r\n this.workflows$ = options$\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 name: this._workflowName || 'Unnamed Pipeline',\r\n \"source\": \"mongoPipeline\",\r\n\r\n }\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 _workflowName: string | undefined\r\n workflowNameChanged(event: string | undefined) {\r\n this._workflowName = event\r\n\r\n }\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 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\n get 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 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 }\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","\r\n\r\n\r\n<section class=\"ion-margin\">\r\n <p>MongoDB aggregation pipeline builder for selected workflows. </p>\r\n</section>\r\n<lib-t-workflow-picker \r\n(valueChanged)=\"workflowChanged($event)\"\r\n(workflowNameChanged)=\"workflowNameChanged($event)\" \r\n[getWorkflowOptions]=\" workflows$\"\r\n [value]=\"(workflowId|async)||undefined\">\r\n</lib-t-workflow-picker>\r\n<mat-accordion multi *ngIf=\"workflowId|async\">\r\n <!-- Pipeline Accordion -->\r\n <mat-expansion-panel value=\"pipeline\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <mat-spinner color=\"accent\" *ngIf=\"isRunningPipeline\" class=\"header-spinner\"></mat-spinner>\r\n <mat-icon class=\"title-icon\">\r\n dynamic_form\r\n </mat-icon>\r\n {{isRunningPipeline?'Executing current Data pipeline...':'Data retrieval pipeline'}}\r\n </mat-panel-title>\r\n\r\n </mat-expansion-panel-header>\r\n <div class=\"content\">\r\n <!-- Mongodb aggregate pipelione stages management and edit start-->\r\n <div *ngIf=\"((stages | async)?.length || 0) ===0\" class=\"tree-instructions\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n Add stages to the pipeline below.<br>\r\n Each stage processes input documents by filtering, grouping, or calculating values. The output documents from\r\n one stage are passed to the next stage in the pipeline.\r\n </span>\r\n </div>\r\n\r\n <mat-nav-list style=\" background: var(--mat-tree-container-background-color);padding:0px;border-radius:8px\">\r\n\r\n\r\n <ng-container *ngFor=\"let stage of stages | async; trackBy: trackById;index as $index;last as isLast\">\r\n <mat-list-item [style.margin-top]=\"(activeStageIndex|async) ===$index?'4px':'0px'\"\r\n [class.mat-elevation-z8]=\"(activeStageIndex|async) ===$index\" class=\"stage-item\"\r\n (click)=\"setActiveStage($index)\" [activated]=\" (activeStageIndex|async) ===$index\">\r\n <span class=\"stage-index\" matListItemAvatar>{{$index + 1}} </span>\r\n <div matListItemTitle>\r\n <div style=\"line-height: normal;\">\r\n {{ stage.name || 'Stage ' }}\r\n </div>\r\n <div class=\"stage-inner-message\" *ngIf=\"!stage.name && (activeStageIndex|async) !==$index \">\r\n Incomplete , click to edit\r\n </div>\r\n\r\n </div>\r\n\r\n <button *ngIf=\"(activeStageIndex|async) ===$index||!stage.valid && (activeStageIndex|async) !==$index\"\r\n mat-icon-button matListItemMeta>\r\n <mat-icon color=\"primary\" *ngIf=\"(activeStageIndex|async) ===$index\">check_circle</mat-icon>\r\n\r\n <mat-icon color=\"warn\" *ngIf=\"!stage.valid && (activeStageIndex|async) !==$index\">\r\n warning\r\n </mat-icon>\r\n </button>\r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n\r\n <app-aggregate-stage-editor [selectedStage]=\"stage\" [isRunningPipeline]=\"isRunningPipeline\"\r\n (deleteStage)=\"deleteStage($index)\" (saveStage)=\"saveStage($index,$event)\"\r\n *ngIf=\"(activeStageIndex|async) ===$index\"></app-aggregate-stage-editor>\r\n\r\n\r\n </ng-container>\r\n\r\n <mat-toolbar style=\"padding: 0px;\">\r\n\r\n <span class=\"spacer\"></span>\r\n <button class=\"stage-button\" [disabled]=\"isRunningPipeline\" color=\"primary\" (click)=\"addStage()\"\r\n mat-raised-button>\r\n Add\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n </mat-nav-list>\r\n\r\n <!-- Mongodb aggregate pipelione stages management and edit end -->\r\n </div>\r\n </mat-expansion-panel>\r\n\r\n <!-- Results Accordion -->\r\n <mat-expansion-panel value=\"results\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <mat-spinner color=\"accent\" *ngIf=\"isRunningPipeline\" class=\"header-spinner\"></mat-spinner>\r\n <mat-icon class=\"title-icon\">dataset</mat-icon>\r\n {{isRunningPipeline?'Running pipeline...':'Data Results'}}\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div class=\"content\">\r\n <ng-container *ngIf=\"pipeLineResults | async as results; else noResults\">\r\n\r\n <lib-t-dynamic-data-view *ngIf=\"results\" [data]=\"results\"></lib-t-dynamic-data-view>\r\n <p *ngIf=\"!results\" color=\"medium\">\r\n\r\n No results available\r\n\r\n </p>\r\n\r\n </ng-container>\r\n <ng-template #noResults>\r\n <p color=\"medium\">No results available</p>\r\n </ng-template>\r\n </div>\r\n </mat-expansion-panel>\r\n\r\n <!-- AI Agent Accordion -->\r\n <mat-expansion-panel value=\"ai\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <mat-spinner *ngIf=\" aiIsGeneratingPipeline \" style=\"position: absolute;\" class=\"header-spinner\"></mat-spinner>\r\n <mat-icon class=\"title-icon\">tips_and_updates</mat-icon>\r\n {{ aiIsGeneratingPipeline ? 'Agent busy ...' : 'AI AGENT prompt' }}\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n <div class=\"content\">\r\n @if( schemaLoadError$ | async){\r\n <div class=\"tree-instructions\" style=\"background: antiquewhite !important;\">\r\n <mat-icon class=\"info-icon\" color=\"warn\">error</mat-icon>\r\n <span> {{ schemaLoadError$ | async }}</span>\r\n </div>\r\n \r\n }\r\n <mat-list *ngFor=\"let chat of chatHistory|async;\">\r\n\r\n <mat-list-item class=\"chatContent chatItem\">\r\n <div class=\"chat\" style=\"background:bisque;text-align:end;\r\n border-radius: 18px 18px 0px 18px;\" matListItemTitle>\r\n <div>\r\n {{chat.user}}\r\n </div>\r\n <div style=\"opacity:0.6;line-height: normal;display: flex;align-items: center;justify-content: flex-end;\">\r\n {{chat.date|daysAgo}}\r\n <mat-icon class=\"sent-icon\">\r\n done_all\r\n </mat-icon>\r\n </div>\r\n </div>\r\n </mat-list-item>\r\n\r\n <mat-list-item style=\"margin-top: 16px;\" class=\"chatContent chatItem\" color=\"light\" lines=\"full\">\r\n <mat-icon style=\" margin-left: 0px;\r\n margin-top: 16px;\r\n margin-bottom: auto;\" matListItemIcon>smart_toy</mat-icon>\r\n <div class=\"chat\" style=\"text-align: left; \r\n padding-left: 16px; \r\n background: azure;\r\n border-radius: 0px 18px 18px 18px;\" *ngIf=\"!chat.assistance?.error\" matListItemTitle>\r\n <pre>\r\n {{chat. assistance.pipeline |json}}\r\n </pre>\r\n </div>\r\n <div *ngIf=\"chat.assistance?.error\" matListItemTitle>\r\n {{chat.assistance.error}}\r\n </div>\r\n </mat-list-item>\r\n\r\n\r\n </mat-list>\r\n <mat-list>\r\n <mat-list-item class=\"chatContent chatItem\">\r\n <textarea matListItemTitle #textarea style=\" width: calc(100% - 13px);\r\n border-radius: 14px;\r\n padding-right: 3px;\r\n padding-left: 8px;\" class=\"chat\" [value]=\" prompt|async\" (input)=\"onTextChange($event)\"\r\n placeholder=\"Provide a pipeline generation prompt\"></textarea>\r\n <button matListItemMeta style=\" margin-left: 4px;\r\n margin-right: 0px;\" color=\"primary\" mat-mini-fab [disabled]=\"aiIsGeneratingPipeline\" (click)=\"promptSubmit()\">\r\n\r\n <mat-icon style=\"margin: 0px !important;color:white\">send</mat-icon>\r\n <mat-spinner color=\"accent\" *ngIf=\" aiIsGeneratingPipeline \" \r\n class=\"submit-spinner\" ></mat-spinner>\r\n </button>\r\n \r\n </mat-list-item>\r\n\r\n </mat-list>\r\n\r\n\r\n <section *ngIf=\"showSuggestions\" class=\"showSuggestionContainer\">\r\n <!-- <mat-toolbar class=\"search-container\" style=\"background: inherit;\">\r\n\r\n\r\n <input type=\"search\" placeholder=\"Search options\" class=\"search-field\" (change)=\"onSearchChange($event)\">\r\n\r\n <mat-icon>\r\n search\r\n </mat-icon>\r\n </mat-toolbar> -->\r\n <mat-divider></mat-divider>\r\n <div style=\"padding: 8px;\">\r\n <div class=\"suggestion-container\">\r\n <div class=\"suggestion-column\">\r\n <h5>Collection document properties</h5>\r\n <div class=\"button-container\">\r\n <button *ngFor=\"let method of getSchemaProperties | async;trackBy: trackById\"\r\n (click)=\"selectSuggestionInput(method.value)\" color=\"accent\" mat-flat-button\r\n class=\"suggestion-button\">\r\n {{ method.label | titlecase }}\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n\r\n </div>\r\n </section>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n </div>\r\n </mat-expansion-panel>\r\n</mat-accordion>\r\n\r\n\r\n\r\n\r\n<ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayOpen]=\"disabled\"\r\n>\r\n<div style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5);\">\r\n\r\n\r\n</div>\r\n</ng-template>\r\n"],"names":["i8","i2","i3","i6","i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;MAwBa,6BAA6B,CAAA;IAMxC,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE;IACjC;AAEA,IAAA,WAAA,GAAA;AATA,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,YAAY,EAAE;QAExB,IAAA,CAAA,iBAAiB,GAAY,KAAK;AACjC,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAA6B;AACzD,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAQ;AAQhD,QAAA,IAAA,CAAA,WAAW,GAA8B,SAAS,CAAC;QACnD,IAAA,CAAA,aAAa,GAA0D,EAAE;IAFzE;IAMA,QAAQ,GAAA;;AAGN,QAAA,IAAI,CAAC,aAAa,GAAG,eAAe,CAAC,iBAAiB,EAAS;IACjE;AAEA,IAAA,YAAY,CAAC,KAAsB,EAAA;AAE/B,QAAA,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK;AACjC,QAAA,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE;YAClC,IAAI,CAAC,WAAW,GAAG;AACjB,gBAAA,KAAK,EAAE,aAAa;AACpB,gBAAA,GAAG,IAAI,CAAC,aAAa,IAAI,EAAE;aAEX;QACpB;aAAO;YACL,IAAI,CAAC,WAAW,GAAG;gBACjB,MAAM,EAAG,IAAI,CAAC,WAAW,EAAE,MAAM,IAAG,IAAI,CAAC,aAAc,EAAE,MAAM;AAC/D,gBAAA,KAAK,EAAE;aACS;QAEpB;AACA,QAAA,EAAE;AACF,QAAA,IAAI,IAAI,CAAC,WAAW,EAAE,MAAa,IAAI,CAAC,CAAC,IAAI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AAY;;sBADxB;;sBAaA;;sBA0CA,SAAS;uBAAC,UAAU,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE;;sBACzD;;sBAsBA;;sBAIA;;sBAEA;;sBAEA;;;;;"}
|
|
@@ -3,7 +3,7 @@ import { CommonModule } from '@angular/common';
|
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { EventEmitter, Output, Input, HostBinding, Optional, Self, Component } from '@angular/core';
|
|
5
5
|
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
6
|
-
import { _ as _isEqual, T as TDynamicDataEditComponent, a as assignDeepPropertyToObject, s as safeReturnDeepProperty, M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-
|
|
6
|
+
import { _ as _isEqual, T as TDynamicDataEditComponent, a as assignDeepPropertyToObject, s as safeReturnDeepProperty, M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-DP2koSL5.mjs';
|
|
7
7
|
import { Subject } from 'rxjs';
|
|
8
8
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
9
9
|
import * as i9 from '@angular/cdk/portal';
|
|
@@ -15,9 +15,9 @@ import * as i2$1 from '@angular/material/button';
|
|
|
15
15
|
import * as i3 from '@angular/material/card';
|
|
16
16
|
import * as i4 from '@angular/material/divider';
|
|
17
17
|
import * as i5 from '@angular/material/expansion';
|
|
18
|
-
import * as
|
|
18
|
+
import * as i3$1 from '@angular/material/icon';
|
|
19
19
|
import * as i7 from '@angular/material/progress-spinner';
|
|
20
|
-
import * as
|
|
20
|
+
import * as i4$1 from '@angular/material/tooltip';
|
|
21
21
|
|
|
22
22
|
class RecordListManagerComponent {
|
|
23
23
|
static { this.nextId = 0; }
|
|
@@ -195,7 +195,6 @@ class RecordListManagerComponent {
|
|
|
195
195
|
componentRef.instance.data = this.inEdit;
|
|
196
196
|
//mark for check
|
|
197
197
|
componentRef.changeDetectorRef.markForCheck();
|
|
198
|
-
console.error('inEdit updated:', this.inEdit, event);
|
|
199
198
|
});
|
|
200
199
|
// 3. Store subscription for cleanup in ngOnDestroy
|
|
201
200
|
this.portalSubscriptions.set(element.id, sub);
|
|
@@ -229,7 +228,7 @@ class RecordListManagerComponent {
|
|
|
229
228
|
return true;
|
|
230
229
|
}
|
|
231
230
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: RecordListManagerComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
232
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: RecordListManagerComponent, isStandalone: true, selector: "lib-record-list-manager", inputs: { mapToData: "mapToData", disabled: "disabled", errors: "errors", required: "required", value: "value", placeholder: "placeholder", formInputs: "formInputs", editorConfig: "editorConfig" }, outputs: { valueChange: "valueChange" }, host: { properties: { "id": "this.id", "attr.aria-describedby": "this.describedBy", "class.floating": "this.shouldLabelFloat" } }, providers: [{ provide: MatFormFieldControl, useExisting: RecordListManagerComponent, }], ngImport: i0, template: "<!--- Secondary config -->\r\n\r\n<mat-card>\r\n <div class=\"table-container\">\r\n <table mat-table [dataSource]=\"dataSource\" class=\"example-table \">\r\n <!-- Number Column -->\r\n @for (col of tableColsConfig; track col.value) {\r\n <ng-container [matColumnDef]=\"col.value\">\r\n <th mat-header-cell *matHeaderCellDef>{{col.label}}</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n @if(col.value === 'actions') {\r\n <button\r\n (click)=\"inEdit = row\"\r\n mat-icon-button matTooltip=\"Edit\" aria-label=\"edit record\">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button (click)=\"removeItem(row)\" mat-icon-button color=\"warn\" matTooltip=\"Delete\"\r\n aria-label=\"Delete record\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n }@else {\r\n {{row[col.value]}}\r\n }\r\n\r\n </td>\r\n </ng-container>\r\n }\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n </table>\r\n @if(value.length === 0 ){\r\n <div style=\" display: flex;align-items: center;gap: 8px;padding: 16px;\" class=\"empty-message\">\r\n <mat-icon style=\"min-width: 24px;\">\r\n info</mat-icon>\r\n <span>\r\n No records found. Click the <strong>Add</strong> button to get started.\r\n\r\n </span>\r\n </div>\r\n }\r\n </div>\r\n\r\n\r\n\r\n @if(inEdit){\r\n <div class=\"table-container\">\r\n <ng-container *ngTemplateOutlet=\"itemEdit\">\r\n </ng-container>\r\n </div>\r\n\r\n <mat-card-actions align=\"end\">\r\n <button (click)=\"inEdit=null\" mat-button color=\"primary\">\r\n Cancel\r\n </button>\r\n <button (click)=\"saveRecord()\" [disabled]=\"canSaveRecord === false\" mat-stroked-button color=\"primary\">\r\n {{inEdit.id? 'Update':'Save new'}} Record \r\n <mat-icon>\r\n save\r\n </mat-icon>\r\n </button>\r\n </mat-card-actions>\r\n }@else{\r\n <mat-card-actions>\r\n <span class=\"spacer\"></span>\r\n <span style=\"font-size: small;\r\n opacity: 0.6; margin-right: 16px;\">\r\n Records ({{ (value || []).length }}):\r\n </span>\r\n \r\n <button (click)=\"addNewItem()\" mat-stroked-button color=\"primary\" matTooltip=\"Add a new record\"\r\n aria-label=\"Add a new record\">\r\n <mat-icon>add</mat-icon>\r\n Add Record\r\n </button>\r\n </mat-card-actions>\r\n }\r\n\r\n</mat-card>\r\n\r\n\r\n<ng-template #itemEdit>\r\n\r\n <mat-accordion class=\"record-editor\" togglePosition=\"after\">\r\n @for(section of (secondaryElementEditorConfig||[]); track section.id) {\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{section.label}}\r\n <span class=\"spacer\"></span>\r\n\r\n <span class=\"showItemValue\" *ngIf=\"section.showItemValue && !!(inEdit)\">\r\n {{inEdit[section.showItemValue]}}\r\n </span>\r\n <mat-divider style=\"position: absolute; left:0px; width:100%; bottom:0px;\"></mat-divider>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n\r\n <!-- Element type selector (only in first section) -->\r\n @for(element of section.elements; track element.id) {\r\n <p style=\"margin-bottom: 16px; margin-top: 8px;\">\r\n\r\n @defer (on viewport) {\r\n <ng-template (attached)=\"onPortalAttached($event, element)\"\r\n [cdkPortalOutlet]=\"dynamicEditorPortals[element.id]\"></ng-template>\r\n\r\n\r\n } @placeholder {\r\n <div style=\"padding: 50px; display:flex; justify-content:center; align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"18\"></mat-spinner>\r\n </div>\r\n }\r\n </p>\r\n }\r\n </mat-expansion-panel>\r\n }\r\n </mat-accordion>\r\n\r\n\r\n</ng-template>", styles: [".record-list-item{height:38px;padding-left:4px}.remove-button{visibility:hidden}.record-list-item:hover .remove-button{visibility:visible}.item-edit-container{padding-left:8px;width:100%;display:flex;flex-direction:column}.table-container{padding:8px}.mat-column-actions{max-width:52px;padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i5.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i5.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i5.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i5.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "component", type:
|
|
231
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.5", type: RecordListManagerComponent, isStandalone: true, selector: "lib-record-list-manager", inputs: { mapToData: "mapToData", disabled: "disabled", errors: "errors", required: "required", value: "value", placeholder: "placeholder", formInputs: "formInputs", editorConfig: "editorConfig" }, outputs: { valueChange: "valueChange" }, host: { properties: { "id": "this.id", "attr.aria-describedby": "this.describedBy", "class.floating": "this.shouldLabelFloat" } }, providers: [{ provide: MatFormFieldControl, useExisting: RecordListManagerComponent, }], ngImport: i0, template: "<!--- Secondary config -->\r\n\r\n<mat-card>\r\n <div class=\"table-container\">\r\n <table mat-table [dataSource]=\"dataSource\" class=\"example-table \">\r\n <!-- Number Column -->\r\n @for (col of tableColsConfig; track col.value) {\r\n <ng-container [matColumnDef]=\"col.value\">\r\n <th mat-header-cell *matHeaderCellDef>{{col.label}}</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n @if(col.value === 'actions') {\r\n <button\r\n (click)=\"inEdit = row\"\r\n mat-icon-button matTooltip=\"Edit\" aria-label=\"edit record\">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button (click)=\"removeItem(row)\" mat-icon-button color=\"warn\" matTooltip=\"Delete\"\r\n aria-label=\"Delete record\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n }@else {\r\n {{row[col.value]}}\r\n }\r\n\r\n </td>\r\n </ng-container>\r\n }\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n </table>\r\n @if(value.length === 0 ){\r\n <div style=\" display: flex;align-items: center;gap: 8px;padding: 16px;\" class=\"empty-message\">\r\n <mat-icon style=\"min-width: 24px;\">\r\n info</mat-icon>\r\n <span>\r\n No records found. Click the <strong>Add</strong> button to get started.\r\n\r\n </span>\r\n </div>\r\n }\r\n </div>\r\n\r\n\r\n\r\n @if(inEdit){\r\n <div class=\"table-container\">\r\n <ng-container *ngTemplateOutlet=\"itemEdit\">\r\n </ng-container>\r\n </div>\r\n\r\n <mat-card-actions align=\"end\">\r\n <button (click)=\"inEdit=null\" mat-button color=\"primary\">\r\n Cancel\r\n </button>\r\n <button (click)=\"saveRecord()\" [disabled]=\"canSaveRecord === false\" mat-stroked-button color=\"primary\">\r\n {{inEdit.id? 'Update':'Save new'}} Record \r\n <mat-icon>\r\n save\r\n </mat-icon>\r\n </button>\r\n </mat-card-actions>\r\n }@else{\r\n <mat-card-actions>\r\n <span class=\"spacer\"></span>\r\n <span style=\"font-size: small;\r\n opacity: 0.6; margin-right: 16px;\">\r\n Records ({{ (value || []).length }}):\r\n </span>\r\n \r\n <button (click)=\"addNewItem()\" mat-stroked-button color=\"primary\" matTooltip=\"Add a new record\"\r\n aria-label=\"Add a new record\">\r\n <mat-icon>add</mat-icon>\r\n Add Record\r\n </button>\r\n </mat-card-actions>\r\n }\r\n\r\n</mat-card>\r\n\r\n\r\n<ng-template #itemEdit>\r\n\r\n <mat-accordion class=\"record-editor\" togglePosition=\"after\">\r\n @for(section of (secondaryElementEditorConfig||[]); track section.id) {\r\n <mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n {{section.label}}\r\n <span class=\"spacer\"></span>\r\n\r\n <span class=\"showItemValue\" *ngIf=\"section.showItemValue && !!(inEdit)\">\r\n {{inEdit[section.showItemValue]}}\r\n </span>\r\n <mat-divider style=\"position: absolute; left:0px; width:100%; bottom:0px;\"></mat-divider>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n\r\n <!-- Element type selector (only in first section) -->\r\n @for(element of section.elements; track element.id) {\r\n <p style=\"margin-bottom: 16px; margin-top: 8px;\">\r\n\r\n @defer (on viewport) {\r\n <ng-template (attached)=\"onPortalAttached($event, element)\"\r\n [cdkPortalOutlet]=\"dynamicEditorPortals[element.id]\"></ng-template>\r\n\r\n\r\n } @placeholder {\r\n <div style=\"padding: 50px; display:flex; justify-content:center; align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"18\"></mat-spinner>\r\n </div>\r\n }\r\n </p>\r\n }\r\n </mat-expansion-panel>\r\n }\r\n </mat-accordion>\r\n\r\n\r\n</ng-template>", styles: [".record-list-item{height:38px;padding-left:4px}.remove-button{visibility:hidden}.record-list-item:hover .remove-button{visibility:visible}.item-edit-container{padding-left:8px;width:100%;display:flex;flex-direction:column}.table-container{padding:8px}.mat-column-actions{max-width:52px;padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i2$1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i5.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i5.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i5.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i5.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i9$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i9$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i9$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i9$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i9$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i9$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i9$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i9$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i9$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i9$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i4$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], deferBlockDependencies: [() => [i9.CdkPortalOutlet]] }); }
|
|
233
232
|
}
|
|
234
233
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImport: i0, type: RecordListManagerComponent, decorators: [{
|
|
235
234
|
type: Component,
|
|
@@ -267,4 +266,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
267
266
|
}] } });
|
|
268
267
|
|
|
269
268
|
export { RecordListManagerComponent };
|
|
270
|
-
//# sourceMappingURL=ngx-t-forms-record-list-manager.component-
|
|
269
|
+
//# sourceMappingURL=ngx-t-forms-record-list-manager.component-BQuMkoXo.mjs.map
|