ngx-t-forms 2.0.12 → 2.0.14
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/fesm2022/{ngx-t-forms-api-value-access-rules.component-DyptJ5Lx.mjs → ngx-t-forms-api-value-access-rules.component-CMKTgeD4.mjs} +11 -12
- package/fesm2022/{ngx-t-forms-api-value-access-rules.component-DyptJ5Lx.mjs.map → ngx-t-forms-api-value-access-rules.component-CMKTgeD4.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-D-p_AC92.mjs → ngx-t-forms-calculated-field-rules.component-FkPPTG1s.mjs} +8 -9
- package/fesm2022/{ngx-t-forms-calculated-field-rules.component-D-p_AC92.mjs.map → ngx-t-forms-calculated-field-rules.component-FkPPTG1s.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-CMScZq9C.mjs +189 -0
- package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-CMScZq9C.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CZ_RUvAq.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-CdJ-r4XS.mjs} +7 -8
- package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CZ_RUvAq.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-CdJ-r4XS.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-input-selector.component-DFFfODcQ.mjs → ngx-t-forms-form-input-selector.component-Cmn8r7Ex.mjs} +7 -6
- package/fesm2022/{ngx-t-forms-form-input-selector.component-DFFfODcQ.mjs.map → ngx-t-forms-form-input-selector.component-Cmn8r7Ex.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-json-view.component-DnW2Z2Dx.mjs → ngx-t-forms-form-json-view.component-C1brLmzI.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-form-json-view.component-DnW2Z2Dx.mjs.map → ngx-t-forms-form-json-view.component-C1brLmzI.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-KFY1Ligw.mjs → ngx-t-forms-form-section-stepper.component-CxuWKb7v.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-form-section-stepper.component-KFY1Ligw.mjs.map → ngx-t-forms-form-section-stepper.component-CxuWKb7v.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-oXTutvUh.mjs → ngx-t-forms-forms-builder-menu.component-5v76lDgO.mjs} +12 -12
- package/fesm2022/{ngx-t-forms-forms-builder-menu.component-oXTutvUh.mjs.map → ngx-t-forms-forms-builder-menu.component-5v76lDgO.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-input-editor.component-Bw3MLspq.mjs → ngx-t-forms-input-editor.component-St6l9Hr-.mjs} +12 -12
- package/fesm2022/{ngx-t-forms-input-editor.component-Bw3MLspq.mjs.map → ngx-t-forms-input-editor.component-St6l9Hr-.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-BjgxuRp4.mjs → ngx-t-forms-mat-chip-list-editor.component-BrRevSpQ.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-BjgxuRp4.mjs.map → ngx-t-forms-mat-chip-list-editor.component-BrRevSpQ.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-BH3FudLk.mjs → ngx-t-forms-mat-slider-editor.component-BcgU9NYj.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-mat-slider-editor.component-BH3FudLk.mjs.map → ngx-t-forms-mat-slider-editor.component-BcgU9NYj.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-BiedE32P.mjs → ngx-t-forms-mat-slider-toggle-editor.component-C0bZ6L19.mjs} +7 -7
- package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-BiedE32P.mjs.map → ngx-t-forms-mat-slider-toggle-editor.component-C0bZ6L19.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BCUXbEDz.mjs → ngx-t-forms-missing-form-configs.component-BBsEWu1_.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-missing-form-configs.component-BCUXbEDz.mjs.map → ngx-t-forms-missing-form-configs.component-BBsEWu1_.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-Cx08Sysp.mjs +280 -0
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-Cx08Sysp.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-ngx-t-forms-D4uTTkn-.mjs → ngx-t-forms-ngx-t-forms-DOtego0e.mjs} +379 -297
- package/fesm2022/ngx-t-forms-ngx-t-forms-DOtego0e.mjs.map +1 -0
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-C5qbKts5.mjs → ngx-t-forms-pipeline-generator.component-CuXpNDYZ.mjs} +21 -22
- package/fesm2022/{ngx-t-forms-pipeline-generator.component-C5qbKts5.mjs.map → ngx-t-forms-pipeline-generator.component-CuXpNDYZ.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-required-inputs.component-DBOzCWsw.mjs → ngx-t-forms-required-inputs.component-aoZjTIVr.mjs} +7 -8
- package/fesm2022/{ngx-t-forms-required-inputs.component-DBOzCWsw.mjs.map → ngx-t-forms-required-inputs.component-aoZjTIVr.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-DGxWDFUN.mjs → ngx-t-forms-rest-api-call-setup.component-HDQwuGiu.mjs} +8 -8
- package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-DGxWDFUN.mjs.map → ngx-t-forms-rest-api-call-setup.component-HDQwuGiu.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-section-report.component-DMvHXB1F.mjs → ngx-t-forms-section-report.component-C92mqFtY.mjs} +5 -5
- package/fesm2022/{ngx-t-forms-section-report.component-DMvHXB1F.mjs.map → ngx-t-forms-section-report.component-C92mqFtY.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-B5Sw7_ff.mjs → ngx-t-forms-selection-options-editor.component--TlWm7_4.mjs} +6 -6
- package/fesm2022/{ngx-t-forms-selection-options-editor.component-B5Sw7_ff.mjs.map → ngx-t-forms-selection-options-editor.component--TlWm7_4.mjs.map} +1 -1
- package/fesm2022/{ngx-t-forms-validators-config.component-B8J6K4e5.mjs → ngx-t-forms-validators-config.component-hCT8BAtp.mjs} +10 -10
- package/fesm2022/{ngx-t-forms-validators-config.component-B8J6K4e5.mjs.map → ngx-t-forms-validators-config.component-hCT8BAtp.mjs.map} +1 -1
- package/fesm2022/ngx-t-forms.mjs +1 -1
- package/lib/components/forms/forms.component.d.ts +1 -1
- package/lib/components/index.d.ts +1 -2
- package/lib/components/t-dynamic-data-edit/elements/chip-options-creator-editor/chip-options-creator-editor.component.d.ts +53 -0
- package/lib/components/t-dynamic-data-edit/elements/mscoa-segment-config/mscoa-segment-config.component.d.ts +7 -1
- package/lib/components/t-dynamic-data-edit/t-dynamic-data-edit.component.d.ts +1 -0
- package/lib/components/t-form-input/elements/mscoa-form-input/elements/account-value/account-value.component.d.ts +4 -8
- package/lib/components/t-form-input/elements/mscoa-form-input/elements/mscoa-chart/mscoa-chart.component.d.ts +21 -9
- package/lib/components/t-form-input/elements/mscoa-form-input/elements/scoa-account-table/scoa-account-table.component.d.ts +2 -0
- package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-actions.d.ts +2 -2
- package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-component-store.service.d.ts +13 -6
- package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-selectors.d.ts +11 -4
- package/lib/shared/pipes/date/days-ago.pipe.d.ts +5 -0
- package/package.json +13 -17
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-D7r-z327.mjs +0 -258
- package/fesm2022/ngx-t-forms-mscoa-segment-config.component-D7r-z327.mjs.map +0 -1
- package/fesm2022/ngx-t-forms-ngx-t-forms-D4uTTkn-.mjs.map +0 -1
- package/lib/components/t-form-input/elements/editor-input-element/core/form-input-rich-text-editor/form-input-rich-text-editor.component.d.ts +0 -14
- package/lib/components/t-form-input/elements/editor-input-element/core/form-input-rich-text-editor/sync-editor/sync-editor.component.d.ts +0 -10
|
@@ -4,21 +4,20 @@ import * as i2 from '@angular/common';
|
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { FormsModule } from '@angular/forms';
|
|
7
|
-
import { e as TreeComponent, M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-
|
|
8
|
-
import * as i3 from '@angular/material/
|
|
7
|
+
import { e as TreeComponent, M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-DOtego0e.mjs';
|
|
8
|
+
import * as i3 from '@angular/material/autocomplete';
|
|
9
9
|
import * as i2$1 from '@angular/material/button';
|
|
10
10
|
import * as i3$1 from '@angular/material/checkbox';
|
|
11
11
|
import * as i4 from '@angular/material/divider';
|
|
12
12
|
import * as i5 from '@angular/material/expansion';
|
|
13
13
|
import * as i6 from '@angular/material/icon';
|
|
14
14
|
import * as i6$1 from '@angular/material/list';
|
|
15
|
-
import * as i3$2 from '@angular/material/
|
|
16
|
-
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
17
|
-
import * as i7 from '@angular/material/select';
|
|
15
|
+
import * as i3$2 from '@angular/material/select';
|
|
18
16
|
import * as i9 from '@angular/material/toolbar';
|
|
19
17
|
import * as i8 from '@angular/material/tooltip';
|
|
20
18
|
import * as i3$3 from '@angular/material/tree';
|
|
21
19
|
import * as i12 from '@angular/material/input';
|
|
20
|
+
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
22
21
|
import { Subject, take, tap, catchError, throwError } from 'rxjs';
|
|
23
22
|
import * as i1$1 from '@angular/common/http';
|
|
24
23
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
@@ -259,10 +258,10 @@ class DataTreeComponent {
|
|
|
259
258
|
}));
|
|
260
259
|
this.pathChanged.emit(path);
|
|
261
260
|
}
|
|
262
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
263
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: DataTreeComponent, isStandalone: true, selector: "app-data-tree", inputs: { data: "data", value: "value", formInputs: "formInputs" }, outputs: { pathChanged: "pathChanged" }, viewQueries: [{ propertyName: "textareaElementRef", first: true, predicate: ["textarea"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "<mat-accordion multi>\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">dataset_linked</mat-icon>\n Navigate and select data fields for mapping\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <div class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>Click checkboxes to select fields for mapping. Selected paths will be highlighted.</span>\n </div>\n <mat-divider></mat-divider>\n\n <mat-tree [dataSource]=\"treeClass.dataSource\" \n [treeControl]=\"treeClass.treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <button disabled class=\"node-spacer\" aria-hidden=\"true\" mat-icon-button>\n\n </button>\n <mat-checkbox (change)=\"update(node)\" [checked]=\"nodeIsChecked(node)\" class=\"node-checkbox\"\n [matTooltip]=\"'Map data field: ' + node.key\">\n <span class=\"node-key\" [attr.aria-label]=\"'Field name: ' + node.key\">{{ node.key }}:</span>\n <span [attr.aria-label]=\"'Field value: ' + node.value\" style=\" white-space: nowrap;\" class=\"node-value\"\n [style.color]=\"getNodeValueColor(node.value)\">\n {{ node.value }}\n </span>\n </mat-checkbox>\n </mat-tree-node>\n\n <mat-tree-node *matTreeNodeDef=\"let node; when: treeClass.hasChild\" matTreeNodePadding>\n <button style=\"padding: 0px; \n width: 24px;\" mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'Toggle ' + node.key\">\n <mat-icon>\n {{ treeClass.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <mat-checkbox (change)=\"update(node)\" [checked]=\"nodeIsChecked(node)\" [matTooltip]=\"'Select ' + node.key\">\n <span class=\"node-key\">{{ node.key }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n </div>\n </mat-expansion-panel>\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">rebase_edit</mat-icon>\n Configure and transform your data path\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <div class=\"tree-instructions\" *ngIf=\"treeClass.activePath.length === 0\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>Select a node from the tree above to begin mapping data</span>\n </div>\n <mat-divider></mat-divider>\n <mat-toolbar style=\" height: fit-content; background: inherit;\">\n <div class=\"breadcrumb-container\">\n\n <ng-container *ngFor=\"let path of treeClass.activePath; trackBy: trackByFn; last as isLast; index as i\">\n <button *ngIf=\"!path.inEdit\" matTooltip=\"Click to edit\" (click)=\"setupPath(path)\" mat-button\n [disabled]=\"!path.keyIsArrayIndex\" [color]=\"path.functions.length> 0 ? 'accent' : ''\"\n class=\"breadcrumb-item\">\n <mat-icon>{{ path.keyIsArrayIndex ? 'filter_none' : 'folder' }}</mat-icon>\n <span>{{ path.key }}</span>\n </button>\n\n\n <button *ngIf=\"!!path.inEdit\" matTooltip=\"Currently editing\" (click)=\"removeFunction(path.key)\"\n mat-raised-button color=\"primary\" class=\"breadcrumb-item\">\n <mat-icon>check_circle</mat-icon>\n <span>{{ path.key }}</span>\n </button>\n <mat-icon *ngIf=\"!isLast\" class=\"breadcrumb-separator\">chevron_right</mat-icon>\n </ng-container>\n </div>\n </mat-toolbar>\n <div *ngIf=\"!!hasANodeInEdit()\">\n\n <mat-nav-list>\n\n <ng-container *ngFor=\"let function of this.treeClass.pathInEdit?.functions;index as i\">\n <mat-list-item \n [activated]=\"!!function.inEdit\"\n class=\"functions\" style=\"height: fit-content;\">\n <span matListItemIcon class=\"function-number\" > \n <strong> {{i+1}} </strong>\n </span>\n <a \n\n (click)=\"editFunction(function.id)\"\n \n style=\"font-size: 14px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;\"\n matListItemTitle> {{ (function.function |titlecase) ||\n 'Function configurations required'}}</a>\n <button mat-icon-button \n (click)=\"removeFunction(function.id)\" matListItemMeta>\n\n <mat-icon [color]=\"function.function && function.expression?'':'warn'\">{{!function.inEdit? 'close':'check_circle'}}</mat-icon>\n </button>\n \n \n </mat-list-item>\n \n <div class=\"function-edit-container\" *ngIf=\"function.inEdit\">\n <mat-divider></mat-divider>\n <mat-form-field style=\" margin-bottom: 8px;\" appearance=\"outline\" *ngIf=\"this.treeClass.pathInEdit?.functions\">\n <mat-label>Array function</mat-label>\n <mat-select matNativeControl [value]=\"getFunctionInEdit()?.function\"\n (selectionChange)=\"functionChanged($event)\" placeholder=\"ChooseFunctionToRun\">\n <mat-option value=\"filter\">filter</mat-option>\n <mat-option value=\"find\">find</mat-option>\n <mat-option value=\"map\">map</mat-option>\n </mat-select>\n <mat-hint>\n Choose a function to run on the array\n </mat-hint>\n </mat-form-field>\n <mat-form-field appearance=\"outline\" *ngIf=\"this.treeClass.pathInEdit?.functions\">\n <mat-label >Condition expression</mat-label>\n <textarea matInput #textarea \n [value]=\"getFunctionInEdit()?.expression\"\n (input)=\"onTextChange($event)\" (focus)=\"onFocus($event)\"\n \n placeholder=\"Enter a validation string for the function\"></textarea>\n <mat-hint>\n {{ showSuggestions ? 'Suggestions are enabled' : 'Enter a condition expression to transform the array' }}\n </mat-hint>\n </mat-form-field>\n <section *ngIf=\"showSuggestions\" \n class=\"showSuggestionContainer\">\n <!-- <mat-toolbar class=\"search-container\" style=\"background: inherit;\">\n \n \n <input type=\"search\" \n placeholder=\"Search api\" \n class=\"search-field\"\n (change)=\"onSearchChange($event)\"> \n \n <mat-icon>\n search\n </mat-icon>\n </mat-toolbar> -->\n <mat-divider></mat-divider>\n <div style=\"padding: 8px;\" class=\"\">\n <div class=\"suggestion-container\">\n <div class=\"suggestion-column\">\n <h5>Logical Operators</h5>\n <div class=\"button-container\">\n <button \n color=\"primary\" \n mat-flat-button *ngFor=\"let method of getMethods()\"\n (click)=\"selectSuggestionInput(method.value)\" class=\"suggestion-button\">\n {{ method.label | titlecase }}\n </button>\n </div>\n </div>\n <div class=\"suggestion-column\">\n <h5>Add Input as a Variable</h5>\n <div class=\"button-container\">\n <button *ngFor=\"let input of getAllInputs()\"\n mat-flat-button\n (click)=\"selectSuggestionInput(input.formControlName)\" class=\"suggestion-button\">\n {{ input.label | titlecase }}\n </button>\n </div>\n </div>\n <!-- <div class=\"suggestion-column\">\n <h5>Array path Object </h5>\n <div class=\"button-container\">\n <button *ngFor=\"let input of getValueVariables()\"\n color=\"accent\"\n mat-flat-button\n (click)=\"selectSuggestionInput(input)\" class=\"suggestion-button\">\n {{ input}}\n </button>\n </div>\n </div> -->\n </div>\n <div class=\"suggestion-container\">\n \n </div>\n \n </div>\n </section>\n \n\n <mat-toolbar style=\"background:none\">\n <span class=\"spacer\"></span>\n\n <button (click)=\"reset()\" mat-flat-button>\n reset\n </button>\n <button (click)=\"saveNodeInEdit()\" [disabled]=\"!function.expression && !function.function\" mat-flat-button\n color=\"primary\">\n save\n </button>\n\n </mat-toolbar>\n </div>\n <mat-divider></mat-divider>\n </ng-container>\n\n </mat-nav-list>\n <ol>\n\n </ol>\n <button (click)=\"addNewFunction()\" mat-button>+ Add function </button>\n </div>\n </div>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">dataset</mat-icon>\n Mapped Data Value Based on the Active Path\n </mat-panel-title>\n\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <mat-divider></mat-divider>\n\n <div style=\"padding: 16px;background: black;\n color: cadetblue; border-radius:8px;min-width:fit-content\">\n <pre>{{getValue|json}}</pre>\n </div>\n </div>\n </mat-expansion-panel>\n\n\n</mat-accordion>", styles: ["mat-tree{min-width:fit-content;background:azure}mat-tree-node{min-height:28px!important;height:32px!important}.breadcrumb-container{display:flex;align-items:center;flex-wrap:wrap;padding:8px 0}.breadcrumb-item{display:inline-flex;align-items:center;margin:0;transition:background-color .3s ease}.breadcrumb-separator{margin:0}.breadcrumb-separator .mat-icon{font-size:16px;width:16px;height:16px}.info-icon{width:38px}mat-expansion-panel-header{padding-left:16px;padding-right:16px}mat-expansion-panel{background:var(--mat-toolbar-container-background-color, var(--mat-app-surface))}.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}.node-spacer{width:24px;padding:0}.node-checkbox{width:100%}.node-key{font-weight:500;color:#2c2c2c}.node-value{font-family:monospace;padding:2px 6px;background:#f8f9fa;border-radius:3px;font-size:.9em}.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}.title-icon{margin-right:8px;vertical-align:middle}mat-form-field{width:100%;background:azure}.functions{color:var(--mat-full-pseudo-checkbox-selected-icon-color)}.function-number{font-size:smaller;display:flex;align-items:center;justify-content:center;margin-right:8px;margin-left:8px}.search-field{width:100%;padding:8px;border:1px solid var(--mat-divider-color, var(--mat-app-outline));border-radius:4px;margin-left:0}.search-container{padding-left:8px;padding-right:8px;height:48px;background:inherit;margin-top:0;height:fit-content}.showSuggestionContainer{background:azure}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.JsonPipe, name: "json" }, { kind: "pipe", type: i2.TitleCasePipe, name: "titlecase" }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i2$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { 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: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6$1.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i6$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6$1.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i6$1.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6$1.MatListItemMeta, selector: "[matListItemMeta]" }, { 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: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3$3.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i3$3.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i3$3.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i3$3.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i3$3.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "directive", type: i12.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }] }); }
|
|
261
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DataTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
262
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: DataTreeComponent, isStandalone: true, selector: "app-data-tree", inputs: { data: "data", value: "value", formInputs: "formInputs" }, outputs: { pathChanged: "pathChanged" }, viewQueries: [{ propertyName: "textareaElementRef", first: true, predicate: ["textarea"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "<mat-accordion multi>\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">dataset_linked</mat-icon>\n Navigate and select data fields for mapping\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <div class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>Click checkboxes to select fields for mapping. Selected paths will be highlighted.</span>\n </div>\n <mat-divider></mat-divider>\n\n <mat-tree [dataSource]=\"treeClass.dataSource\" \n [treeControl]=\"treeClass.treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <button disabled class=\"node-spacer\" aria-hidden=\"true\" mat-icon-button>\n\n </button>\n <mat-checkbox (change)=\"update(node)\" [checked]=\"nodeIsChecked(node)\" class=\"node-checkbox\"\n [matTooltip]=\"'Map data field: ' + node.key\">\n <span class=\"node-key\" [attr.aria-label]=\"'Field name: ' + node.key\">{{ node.key }}:</span>\n <span [attr.aria-label]=\"'Field value: ' + node.value\" style=\" white-space: nowrap;\" class=\"node-value\"\n [style.color]=\"getNodeValueColor(node.value)\">\n {{ node.value }}\n </span>\n </mat-checkbox>\n </mat-tree-node>\n\n <mat-tree-node *matTreeNodeDef=\"let node; when: treeClass.hasChild\" matTreeNodePadding>\n <button style=\"padding: 0px; \n width: 24px;\" mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'Toggle ' + node.key\">\n <mat-icon>\n {{ treeClass.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <mat-checkbox (change)=\"update(node)\" [checked]=\"nodeIsChecked(node)\" [matTooltip]=\"'Select ' + node.key\">\n <span class=\"node-key\">{{ node.key }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n </div>\n </mat-expansion-panel>\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">rebase_edit</mat-icon>\n Configure and transform your data path\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <div class=\"tree-instructions\" *ngIf=\"treeClass.activePath.length === 0\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>Select a node from the tree above to begin mapping data</span>\n </div>\n <mat-divider></mat-divider>\n <mat-toolbar style=\" height: fit-content; background: inherit;\">\n <div class=\"breadcrumb-container\">\n\n <ng-container *ngFor=\"let path of treeClass.activePath; trackBy: trackByFn; last as isLast; index as i\">\n <button *ngIf=\"!path.inEdit\" matTooltip=\"Click to edit\" (click)=\"setupPath(path)\" mat-button\n [disabled]=\"!path.keyIsArrayIndex\" [color]=\"path.functions.length> 0 ? 'accent' : ''\"\n class=\"breadcrumb-item\">\n <mat-icon>{{ path.keyIsArrayIndex ? 'filter_none' : 'folder' }}</mat-icon>\n <span>{{ path.key }}</span>\n </button>\n\n\n <button *ngIf=\"!!path.inEdit\" matTooltip=\"Currently editing\" (click)=\"removeFunction(path.key)\"\n mat-raised-button color=\"primary\" class=\"breadcrumb-item\">\n <mat-icon>check_circle</mat-icon>\n <span>{{ path.key }}</span>\n </button>\n <mat-icon *ngIf=\"!isLast\" class=\"breadcrumb-separator\">chevron_right</mat-icon>\n </ng-container>\n </div>\n </mat-toolbar>\n <div *ngIf=\"!!hasANodeInEdit()\">\n\n <mat-nav-list>\n\n <ng-container *ngFor=\"let function of this.treeClass.pathInEdit?.functions;index as i\">\n <mat-list-item \n [activated]=\"!!function.inEdit\"\n class=\"functions\" style=\"height: fit-content;\">\n <span matListItemIcon class=\"function-number\" > \n <strong> {{i+1}} </strong>\n </span>\n <a \n\n (click)=\"editFunction(function.id)\"\n \n style=\"font-size: 14px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;\"\n matListItemTitle> {{ (function.function |titlecase) ||\n 'Function configurations required'}}</a>\n <button mat-icon-button \n (click)=\"removeFunction(function.id)\" matListItemMeta>\n\n <mat-icon [color]=\"function.function && function.expression?'':'warn'\">{{!function.inEdit? 'close':'check_circle'}}</mat-icon>\n </button>\n \n \n </mat-list-item>\n \n <div class=\"function-edit-container\" *ngIf=\"function.inEdit\">\n <mat-divider></mat-divider>\n <mat-form-field style=\" margin-bottom: 8px;\" appearance=\"outline\" *ngIf=\"this.treeClass.pathInEdit?.functions\">\n <mat-label>Array function</mat-label>\n <mat-select matNativeControl [value]=\"getFunctionInEdit()?.function\"\n (selectionChange)=\"functionChanged($event)\" placeholder=\"ChooseFunctionToRun\">\n <mat-option value=\"filter\">filter</mat-option>\n <mat-option value=\"find\">find</mat-option>\n <mat-option value=\"map\">map</mat-option>\n </mat-select>\n <mat-hint>\n Choose a function to run on the array\n </mat-hint>\n </mat-form-field>\n <mat-form-field appearance=\"outline\" *ngIf=\"this.treeClass.pathInEdit?.functions\">\n <mat-label >Condition expression</mat-label>\n <textarea matInput #textarea \n [value]=\"getFunctionInEdit()?.expression\"\n (input)=\"onTextChange($event)\" (focus)=\"onFocus($event)\"\n \n placeholder=\"Enter a validation string for the function\"></textarea>\n <mat-hint>\n {{ showSuggestions ? 'Suggestions are enabled' : 'Enter a condition expression to transform the array' }}\n </mat-hint>\n </mat-form-field>\n <section *ngIf=\"showSuggestions\" \n class=\"showSuggestionContainer\">\n <!-- <mat-toolbar class=\"search-container\" style=\"background: inherit;\">\n \n \n <input type=\"search\" \n placeholder=\"Search api\" \n class=\"search-field\"\n (change)=\"onSearchChange($event)\"> \n \n <mat-icon>\n search\n </mat-icon>\n </mat-toolbar> -->\n <mat-divider></mat-divider>\n <div style=\"padding: 8px;\" class=\"\">\n <div class=\"suggestion-container\">\n <div class=\"suggestion-column\">\n <h5>Logical Operators</h5>\n <div class=\"button-container\">\n <button \n color=\"primary\" \n mat-flat-button *ngFor=\"let method of getMethods()\"\n (click)=\"selectSuggestionInput(method.value)\" class=\"suggestion-button\">\n {{ method.label | titlecase }}\n </button>\n </div>\n </div>\n <div class=\"suggestion-column\">\n <h5>Add Input as a Variable</h5>\n <div class=\"button-container\">\n <button *ngFor=\"let input of getAllInputs()\"\n mat-flat-button\n (click)=\"selectSuggestionInput(input.formControlName)\" class=\"suggestion-button\">\n {{ input.label | titlecase }}\n </button>\n </div>\n </div>\n <!-- <div class=\"suggestion-column\">\n <h5>Array path Object </h5>\n <div class=\"button-container\">\n <button *ngFor=\"let input of getValueVariables()\"\n color=\"accent\"\n mat-flat-button\n (click)=\"selectSuggestionInput(input)\" class=\"suggestion-button\">\n {{ input}}\n </button>\n </div>\n </div> -->\n </div>\n <div class=\"suggestion-container\">\n \n </div>\n \n </div>\n </section>\n \n\n <mat-toolbar style=\"background:none\">\n <span class=\"spacer\"></span>\n\n <button (click)=\"reset()\" mat-flat-button>\n reset\n </button>\n <button (click)=\"saveNodeInEdit()\" [disabled]=\"!function.expression && !function.function\" mat-flat-button\n color=\"primary\">\n save\n </button>\n\n </mat-toolbar>\n </div>\n <mat-divider></mat-divider>\n </ng-container>\n\n </mat-nav-list>\n <ol>\n\n </ol>\n <button (click)=\"addNewFunction()\" mat-button>+ Add function </button>\n </div>\n </div>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">dataset</mat-icon>\n Mapped Data Value Based on the Active Path\n </mat-panel-title>\n\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <mat-divider></mat-divider>\n\n <div style=\"padding: 16px;background: black;\n color: cadetblue; border-radius:8px;min-width:fit-content\">\n <pre>{{getValue|json}}</pre>\n </div>\n </div>\n </mat-expansion-panel>\n\n\n</mat-accordion>", styles: ["mat-tree{min-width:fit-content;background:azure}mat-tree-node{min-height:28px!important;height:32px!important}.breadcrumb-container{display:flex;align-items:center;flex-wrap:wrap;padding:8px 0}.breadcrumb-item{display:inline-flex;align-items:center;margin:0;transition:background-color .3s ease}.breadcrumb-separator{margin:0}.breadcrumb-separator .mat-icon{font-size:16px;width:16px;height:16px}.info-icon{width:38px}mat-expansion-panel-header{padding-left:16px;padding-right:16px}mat-expansion-panel{background:var(--mat-toolbar-container-background-color, var(--mat-app-surface))}.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}.node-spacer{width:24px;padding:0}.node-checkbox{width:100%}.node-key{font-weight:500;color:#2c2c2c}.node-value{font-family:monospace;padding:2px 6px;background:#f8f9fa;border-radius:3px;font-size:.9em}.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}.title-icon{margin-right:8px;vertical-align:middle}mat-form-field{width:100%;background:azure}.functions{color:var(--mat-full-pseudo-checkbox-selected-icon-color)}.function-number{font-size:smaller;display:flex;align-items:center;justify-content:center;margin-right:8px;margin-left:8px}.search-field{width:100%;padding:8px;border:1px solid var(--mat-divider-color, var(--mat-app-outline));border-radius:4px;margin-left:0}.search-container{padding-left:8px;padding-right:8px;height:48px;background:inherit;margin-top:0;height:fit-content}.showSuggestionContainer{background:azure}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.JsonPipe, name: "json" }, { kind: "pipe", type: i2.TitleCasePipe, name: "titlecase" }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i2$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { 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: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6$1.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i6$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6$1.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i6$1.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6$1.MatListItemMeta, selector: "[matListItemMeta]" }, { 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: "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: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3$3.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i3$3.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i3$3.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i3$3.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i3$3.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "directive", type: i12.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }] }); }
|
|
264
263
|
}
|
|
265
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DataTreeComponent, decorators: [{
|
|
266
265
|
type: Component,
|
|
267
266
|
args: [{ selector: 'app-data-tree', standalone: true, imports: [CommonModule, MatModulesModule, FormsModule], template: "<mat-accordion multi>\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">dataset_linked</mat-icon>\n Navigate and select data fields for mapping\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <div class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>Click checkboxes to select fields for mapping. Selected paths will be highlighted.</span>\n </div>\n <mat-divider></mat-divider>\n\n <mat-tree [dataSource]=\"treeClass.dataSource\" \n [treeControl]=\"treeClass.treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <button disabled class=\"node-spacer\" aria-hidden=\"true\" mat-icon-button>\n\n </button>\n <mat-checkbox (change)=\"update(node)\" [checked]=\"nodeIsChecked(node)\" class=\"node-checkbox\"\n [matTooltip]=\"'Map data field: ' + node.key\">\n <span class=\"node-key\" [attr.aria-label]=\"'Field name: ' + node.key\">{{ node.key }}:</span>\n <span [attr.aria-label]=\"'Field value: ' + node.value\" style=\" white-space: nowrap;\" class=\"node-value\"\n [style.color]=\"getNodeValueColor(node.value)\">\n {{ node.value }}\n </span>\n </mat-checkbox>\n </mat-tree-node>\n\n <mat-tree-node *matTreeNodeDef=\"let node; when: treeClass.hasChild\" matTreeNodePadding>\n <button style=\"padding: 0px; \n width: 24px;\" mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'Toggle ' + node.key\">\n <mat-icon>\n {{ treeClass.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <mat-checkbox (change)=\"update(node)\" [checked]=\"nodeIsChecked(node)\" [matTooltip]=\"'Select ' + node.key\">\n <span class=\"node-key\">{{ node.key }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n </div>\n </mat-expansion-panel>\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">rebase_edit</mat-icon>\n Configure and transform your data path\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <div class=\"tree-instructions\" *ngIf=\"treeClass.activePath.length === 0\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>Select a node from the tree above to begin mapping data</span>\n </div>\n <mat-divider></mat-divider>\n <mat-toolbar style=\" height: fit-content; background: inherit;\">\n <div class=\"breadcrumb-container\">\n\n <ng-container *ngFor=\"let path of treeClass.activePath; trackBy: trackByFn; last as isLast; index as i\">\n <button *ngIf=\"!path.inEdit\" matTooltip=\"Click to edit\" (click)=\"setupPath(path)\" mat-button\n [disabled]=\"!path.keyIsArrayIndex\" [color]=\"path.functions.length> 0 ? 'accent' : ''\"\n class=\"breadcrumb-item\">\n <mat-icon>{{ path.keyIsArrayIndex ? 'filter_none' : 'folder' }}</mat-icon>\n <span>{{ path.key }}</span>\n </button>\n\n\n <button *ngIf=\"!!path.inEdit\" matTooltip=\"Currently editing\" (click)=\"removeFunction(path.key)\"\n mat-raised-button color=\"primary\" class=\"breadcrumb-item\">\n <mat-icon>check_circle</mat-icon>\n <span>{{ path.key }}</span>\n </button>\n <mat-icon *ngIf=\"!isLast\" class=\"breadcrumb-separator\">chevron_right</mat-icon>\n </ng-container>\n </div>\n </mat-toolbar>\n <div *ngIf=\"!!hasANodeInEdit()\">\n\n <mat-nav-list>\n\n <ng-container *ngFor=\"let function of this.treeClass.pathInEdit?.functions;index as i\">\n <mat-list-item \n [activated]=\"!!function.inEdit\"\n class=\"functions\" style=\"height: fit-content;\">\n <span matListItemIcon class=\"function-number\" > \n <strong> {{i+1}} </strong>\n </span>\n <a \n\n (click)=\"editFunction(function.id)\"\n \n style=\"font-size: 14px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;\"\n matListItemTitle> {{ (function.function |titlecase) ||\n 'Function configurations required'}}</a>\n <button mat-icon-button \n (click)=\"removeFunction(function.id)\" matListItemMeta>\n\n <mat-icon [color]=\"function.function && function.expression?'':'warn'\">{{!function.inEdit? 'close':'check_circle'}}</mat-icon>\n </button>\n \n \n </mat-list-item>\n \n <div class=\"function-edit-container\" *ngIf=\"function.inEdit\">\n <mat-divider></mat-divider>\n <mat-form-field style=\" margin-bottom: 8px;\" appearance=\"outline\" *ngIf=\"this.treeClass.pathInEdit?.functions\">\n <mat-label>Array function</mat-label>\n <mat-select matNativeControl [value]=\"getFunctionInEdit()?.function\"\n (selectionChange)=\"functionChanged($event)\" placeholder=\"ChooseFunctionToRun\">\n <mat-option value=\"filter\">filter</mat-option>\n <mat-option value=\"find\">find</mat-option>\n <mat-option value=\"map\">map</mat-option>\n </mat-select>\n <mat-hint>\n Choose a function to run on the array\n </mat-hint>\n </mat-form-field>\n <mat-form-field appearance=\"outline\" *ngIf=\"this.treeClass.pathInEdit?.functions\">\n <mat-label >Condition expression</mat-label>\n <textarea matInput #textarea \n [value]=\"getFunctionInEdit()?.expression\"\n (input)=\"onTextChange($event)\" (focus)=\"onFocus($event)\"\n \n placeholder=\"Enter a validation string for the function\"></textarea>\n <mat-hint>\n {{ showSuggestions ? 'Suggestions are enabled' : 'Enter a condition expression to transform the array' }}\n </mat-hint>\n </mat-form-field>\n <section *ngIf=\"showSuggestions\" \n class=\"showSuggestionContainer\">\n <!-- <mat-toolbar class=\"search-container\" style=\"background: inherit;\">\n \n \n <input type=\"search\" \n placeholder=\"Search api\" \n class=\"search-field\"\n (change)=\"onSearchChange($event)\"> \n \n <mat-icon>\n search\n </mat-icon>\n </mat-toolbar> -->\n <mat-divider></mat-divider>\n <div style=\"padding: 8px;\" class=\"\">\n <div class=\"suggestion-container\">\n <div class=\"suggestion-column\">\n <h5>Logical Operators</h5>\n <div class=\"button-container\">\n <button \n color=\"primary\" \n mat-flat-button *ngFor=\"let method of getMethods()\"\n (click)=\"selectSuggestionInput(method.value)\" class=\"suggestion-button\">\n {{ method.label | titlecase }}\n </button>\n </div>\n </div>\n <div class=\"suggestion-column\">\n <h5>Add Input as a Variable</h5>\n <div class=\"button-container\">\n <button *ngFor=\"let input of getAllInputs()\"\n mat-flat-button\n (click)=\"selectSuggestionInput(input.formControlName)\" class=\"suggestion-button\">\n {{ input.label | titlecase }}\n </button>\n </div>\n </div>\n <!-- <div class=\"suggestion-column\">\n <h5>Array path Object </h5>\n <div class=\"button-container\">\n <button *ngFor=\"let input of getValueVariables()\"\n color=\"accent\"\n mat-flat-button\n (click)=\"selectSuggestionInput(input)\" class=\"suggestion-button\">\n {{ input}}\n </button>\n </div>\n </div> -->\n </div>\n <div class=\"suggestion-container\">\n \n </div>\n \n </div>\n </section>\n \n\n <mat-toolbar style=\"background:none\">\n <span class=\"spacer\"></span>\n\n <button (click)=\"reset()\" mat-flat-button>\n reset\n </button>\n <button (click)=\"saveNodeInEdit()\" [disabled]=\"!function.expression && !function.function\" mat-flat-button\n color=\"primary\">\n save\n </button>\n\n </mat-toolbar>\n </div>\n <mat-divider></mat-divider>\n </ng-container>\n\n </mat-nav-list>\n <ol>\n\n </ol>\n <button (click)=\"addNewFunction()\" mat-button>+ Add function </button>\n </div>\n </div>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">dataset</mat-icon>\n Mapped Data Value Based on the Active Path\n </mat-panel-title>\n\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <mat-divider></mat-divider>\n\n <div style=\"padding: 16px;background: black;\n color: cadetblue; border-radius:8px;min-width:fit-content\">\n <pre>{{getValue|json}}</pre>\n </div>\n </div>\n </mat-expansion-panel>\n\n\n</mat-accordion>", styles: ["mat-tree{min-width:fit-content;background:azure}mat-tree-node{min-height:28px!important;height:32px!important}.breadcrumb-container{display:flex;align-items:center;flex-wrap:wrap;padding:8px 0}.breadcrumb-item{display:inline-flex;align-items:center;margin:0;transition:background-color .3s ease}.breadcrumb-separator{margin:0}.breadcrumb-separator .mat-icon{font-size:16px;width:16px;height:16px}.info-icon{width:38px}mat-expansion-panel-header{padding-left:16px;padding-right:16px}mat-expansion-panel{background:var(--mat-toolbar-container-background-color, var(--mat-app-surface))}.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}.node-spacer{width:24px;padding:0}.node-checkbox{width:100%}.node-key{font-weight:500;color:#2c2c2c}.node-value{font-family:monospace;padding:2px 6px;background:#f8f9fa;border-radius:3px;font-size:.9em}.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}.title-icon{margin-right:8px;vertical-align:middle}mat-form-field{width:100%;background:azure}.functions{color:var(--mat-full-pseudo-checkbox-selected-icon-color)}.function-number{font-size:smaller;display:flex;align-items:center;justify-content:center;margin-right:8px;margin-left:8px}.search-field{width:100%;padding:8px;border:1px solid var(--mat-divider-color, var(--mat-app-outline));border-radius:4px;margin-left:0}.search-container{padding-left:8px;padding-right:8px;height:48px;background:inherit;margin-top:0;height:fit-content}.showSuggestionContainer{background:azure}\n"] }]
|
|
268
267
|
}], ctorParameters: () => [], propDecorators: { data: [{
|
|
@@ -402,10 +401,10 @@ class ApiValueAccessRulesComponent {
|
|
|
402
401
|
let responseBody = JSON.parse(response?.[0]?.body || '{}');
|
|
403
402
|
return responseBody;
|
|
404
403
|
}
|
|
405
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
406
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
404
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ApiValueAccessRulesComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }, { token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
405
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ApiValueAccessRulesComponent, isStandalone: true, selector: "app-api-value-access-rules", inputs: { multipleBind: "multipleBind", errors: "errors", value: "value", mapToData: "mapToData", formInputs: "formInputs", postmanCollectionConfig: "postmanCollectionConfig" }, outputs: { valueChanged: "valueChanged", reload: "reload" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: ApiValueAccessRulesComponent }], ngImport: i0, template: "\r\n\r\n\r\n<section *ngFor=\"let controlName of multipleBind||[]\">\r\n <label [for]=\"controlName\">Map <strong>{{controlName}}</strong></label>\r\n <app-data-tree \r\n [formInputs]=\"formInputs\"\r\n (pathChanged)=\"pathChanged($event,controlName)\" \r\n [data]=\"postmanResponseBody\" [value]=\"computedValue[controlName]||''\" ></app-data-tree>\r\n</section>\r\n\r\n\r\n<app-data-tree \r\n*ngIf=\"!multipleBind\"\r\n(pathChanged)=\"pathChanged($event)\" \r\n [formInputs]=\"formInputs\"\r\n[data]=\"postmanResponseBody\" [value]=\"computedValue\"></app-data-tree>\r\n\r\n", styles: [".labelM{font-size:13px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: DataTreeComponent, selector: "app-data-tree", inputs: ["data", "value", "formInputs"], outputs: ["pathChanged"] }] }); }
|
|
407
406
|
}
|
|
408
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ApiValueAccessRulesComponent, decorators: [{
|
|
409
408
|
type: Component,
|
|
410
409
|
args: [{ selector: 'app-api-value-access-rules', standalone: true, imports: [CommonModule, DataTreeComponent], providers: [{ provide: MatFormFieldControl, useExisting: ApiValueAccessRulesComponent }], template: "\r\n\r\n\r\n<section *ngFor=\"let controlName of multipleBind||[]\">\r\n <label [for]=\"controlName\">Map <strong>{{controlName}}</strong></label>\r\n <app-data-tree \r\n [formInputs]=\"formInputs\"\r\n (pathChanged)=\"pathChanged($event,controlName)\" \r\n [data]=\"postmanResponseBody\" [value]=\"computedValue[controlName]||''\" ></app-data-tree>\r\n</section>\r\n\r\n\r\n<app-data-tree \r\n*ngIf=\"!multipleBind\"\r\n(pathChanged)=\"pathChanged($event)\" \r\n [formInputs]=\"formInputs\"\r\n[data]=\"postmanResponseBody\" [value]=\"computedValue\"></app-data-tree>\r\n\r\n", styles: [".labelM{font-size:13px}\n"] }]
|
|
411
410
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
@@ -433,4 +432,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
433
432
|
}] } });
|
|
434
433
|
|
|
435
434
|
export { ApiValueAccessRulesComponent };
|
|
436
|
-
//# sourceMappingURL=ngx-t-forms-api-value-access-rules.component-
|
|
435
|
+
//# sourceMappingURL=ngx-t-forms-api-value-access-rules.component-CMKTgeD4.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-t-forms-api-value-access-rules.component-DyptJ5Lx.mjs","sources":["../../../projects/ngx-t-forms/src/lib/shared/functions/searchArray.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/elements/data-tree/data-tree.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/elements/data-tree/data-tree.component.html","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/api-value-access-rules.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/api-value-access-rules.component.html"],"sourcesContent":["export function searchAndOrderArray(\r\n arr: any[],\r\n searchTerm: string,\r\n filterBy: string\r\n): any[] {\r\n // Filter the array based on the search term\r\n const filteredArr = arr.filter((obj) =>\r\n searchTerm\r\n ? obj[filterBy].toLowerCase().includes(searchTerm.toLowerCase())\r\n : true\r\n );\r\n\r\n // Order the filtered array alphabetically by name\r\n const orderedArr = filteredArr.sort((a, b) =>\r\n a[filterBy].localeCompare(b[filterBy])\r\n );\r\n\r\n return orderedArr;\r\n}\r\n","import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\r\n\r\nimport { CommonModule } from '@angular/common';\r\n\r\n\r\nimport { FormsModule } from '@angular/forms';\r\n\r\n\r\n\r\nimport { TreeComponent } from '../../functions/convertDataToTree';\r\nimport { FlatNode, TreeNode } from 'ngx-t-forms-types';\r\nimport { MatModulesModule } from '../../../../../../shared/modules/mat-modules.module';\r\nimport { searchAndOrderArray } from '../../../../../../shared/functions/searchArray';\r\nimport { FormColumnInputs } from 'ngx-t-forms-types';;\r\nimport { MatSelectChange } from '@angular/material/select';\r\n\r\n\r\n@Component({\r\n selector: 'app-data-tree',\r\n templateUrl: './data-tree.component.html',\r\n styleUrls: ['./data-tree.component.scss'],\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule, FormsModule]\r\n})\r\nexport class DataTreeComponent implements OnInit, OnChanges {\r\n treeClass!: TreeComponent\r\n @Input() data: any;\r\n @Input() value: TreeNode[] | string = [];\r\n @Input() formInputs:FormColumnInputs[] = []\r\n @Output() pathChanged = new EventEmitter<TreeNode[] | string>()\r\n\r\n constructor() {\r\n this.treeClass = new TreeComponent();\r\n }\r\n _data: any\r\n _value: TreeNode[] | string = []\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['data']) {\r\n if (JSON.stringify(this._data) !== JSON.stringify(changes['data'].currentValue)) {\r\n this._data = changes['data'].currentValue\r\n this.treeClass.computeTreeData(changes['data'].currentValue)\r\n \r\n if (this.value && Array.isArray(this.value) && this.value.length > 0 && 'functions' in (this.value?.[0]||{})) {\r\n this.treeClass.updateStateFromPath(this.value as TreeNode[])\r\n }\r\n }\r\n }\r\n if (changes['value']) {\r\n this.valueChangedSetPath(changes['value'].currentValue)\r\n }\r\n }\r\n ngOnInit() {\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\r\n\r\n showSuggestions = false;\r\n suggestions = ['$option1', '$option2', '$option3', '$custom'];\r\n filteredSuggestions: string[] = [];\r\n cursorPosition = 0;\r\n valueChangedSetPath(newPath: TreeNode[] | string) {\r\n const isSameAsNewPath = typeof newPath === typeof this._value && JSON.stringify(newPath) === JSON.stringify(this._value)\r\n if (!isSameAsNewPath && Array.isArray(newPath)) {\r\n this._value = newPath\r\n this.treeClass.updateStateFromPath(newPath as TreeNode[])\r\n }\r\n }\r\n async onTextChange(event: Event) {\r\n const newValue =(event.target as HTMLInputElement).value;\r\n const functions = this.treeClass.pathInEdit!.functions!.find(f => f.inEdit)\r\n functions!.expression = newValue;\r\n this.treeClass.pathInEdit!.functions.map(f => {\r\n if (f.inEdit) {\r\n return functions\r\n }\r\n return f\r\n })\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 if (lastChar === '$') {\r\n this.showSuggestions = true;\r\n this.filteredSuggestions = this.suggestions;\r\n } else {\r\n this.showSuggestions = false;\r\n }\r\n }\r\n functionChanged(event:MatSelectChange) {\r\n this.treeClass.functionChanged(event.value)\r\n }\r\n addNewFunction() {\r\n\r\n this.treeClass.addNewFunction()\r\n\r\n }\r\n editFunction(id: string) {\r\n\r\n\r\n this.treeClass.pathInEdit!.functions = this.treeClass.pathInEdit!.functions?.map(f => {\r\n if (f.id === id) {\r\n return { ...f, inEdit: true }\r\n }\r\n return { ...f, inEdit: false }\r\n\r\n })\r\n\r\n }\r\n selectSuggestionInput(suggestion: string) {\r\n\r\n const functions = this.treeClass.pathInEdit!.functions.find(f => f.inEdit) || {} as any\r\n const value = functions?.expression || ''\r\n const beforeCursor = value.slice(0, this.cursorPosition - 1);\r\n const afterCursor = value.slice(this.cursorPosition);\r\n functions.expression = beforeCursor + suggestion + ' ' + afterCursor;\r\n this.treeClass.pathInEdit!.functions.map(f => {\r\n if (f.inEdit) {\r\n return functions\r\n }\r\n return f\r\n })\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\r\n onFocus(event:FocusEvent) {\r\n const textarea = this.textareaElementRef.nativeElement;\r\n this.cursorPosition = textarea.selectionStart || 0;\r\n }\r\n nodeIsChecked(node: FlatNode) {\r\n return this.treeClass.nodeIsChecked(node)\r\n }\r\n hasANodeInEdit() {\r\n return this.treeClass.hasANodeInEdit()\r\n }\r\n showNode(node: FlatNode) {\r\n return this.treeClass.showNode(node)\r\n }\r\n onSearchChange(event: Event) {\r\n this.optionsSearch = (event.target as HTMLInputElement).value;\r\n\r\n }\r\n\r\n methods = [\r\n // Logical Operators\r\n {\r\n label: 'logical AND (&&)',\r\n value: '&&'\r\n },\r\n {\r\n label: 'logical OR (||)',\r\n value: '||'\r\n },\r\n\r\n // Comparison Operators\r\n {\r\n label: 'strict equality (===)',\r\n value: '==='\r\n },\r\n {\r\n label: 'loose equality (==)',\r\n value: '=='\r\n },\r\n {\r\n label: 'strict inequality (!==)',\r\n value: '!=='\r\n },\r\n {\r\n label: 'loose inequality (!=)',\r\n value: '!='\r\n },\r\n {\r\n label: 'greater than (>)',\r\n value: '>'\r\n },\r\n {\r\n label: 'less than (<)',\r\n value: '<'\r\n },\r\n {\r\n label: 'greater than or equal to (>=)',\r\n value: '>='\r\n },\r\n {\r\n label: 'less than or equal to (<=)',\r\n value: '<='\r\n }\r\n ];\r\n getMethods() {\r\n return searchAndOrderArray(this.methods, this.optionsSearch, 'label');\r\n }\r\n getNodeValueColor(v: any) {\r\n const valueType = typeof v\r\n switch (valueType) {\r\n case 'string':\r\n return '#c56100'\r\n case 'number':\r\n return 'mediumblue'\r\n case 'boolean':\r\n return 'forestgreen'\r\n case 'object':\r\n return '#005959'\r\n default:\r\n return 'currentcolor'\r\n }\r\n }\r\n setupPath(node: TreeNode) {\r\n return this.treeClass.setupPath(node)\r\n }\r\n trackByFn(index: number, node: TreeNode): string {\r\n return node.path.join('.')\r\n }\r\n showValue: boolean = false\r\n optionsSearch!: string\r\n getAllInputs() {\r\n const inputs = this.formInputs\r\n .filter((inp) => !inp.multipleInputInEditId);\r\n return searchAndOrderArray(inputs||[], this.optionsSearch, 'label');\r\n }\r\n getValueVariables(): string[] {\r\n const isObject = typeof this.value === 'object'\r\n if(!this.value){\r\n return []\r\n }\r\n if(!isObject && !!this.value){\r\n return [this.value as any]\r\n }\r\n if(Array.isArray(this.value)){\r\n return this.value.map((v,i) => (i)) as any\r\n }\r\n return Object.keys(this.value)\r\n }\r\n saveNodeInEdit() {\r\n const newP = this.treeClass.saveNodeInEdit()\r\n if(newP){\r\n this.pathChanged.emit(newP)\r\n }\r\n \r\n }\r\n closeEdit() {\r\n this.treeClass.closeEdit()\r\n\r\n\r\n }\r\n reset() {\r\n this.treeClass.resetNode()\r\n }\r\n getFunctionInEdit() {\r\n const node = this.treeClass.pathInEdit\r\n return node?.functions?.find(f => f.inEdit)\r\n }\r\n get getValue (){\r\n return this.treeClass.getValue()\r\n }\r\n removeFunction(id: string) {\r\n this.treeClass.removeFunction(id)\r\n }\r\n update(node: any) {\r\n\r\n const path = this.treeClass.selectNode(node)?.map(p => ({\r\n ...p,\r\n children: undefined,\r\n value: undefined\r\n }))\r\n\r\n\r\n this.pathChanged.emit(path)\r\n }\r\n}\r\n","<mat-accordion multi>\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">dataset_linked</mat-icon>\n Navigate and select data fields for mapping\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <div class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>Click checkboxes to select fields for mapping. Selected paths will be highlighted.</span>\n </div>\n <mat-divider></mat-divider>\n\n <mat-tree [dataSource]=\"treeClass.dataSource\" \n [treeControl]=\"treeClass.treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <button disabled class=\"node-spacer\" aria-hidden=\"true\" mat-icon-button>\n\n </button>\n <mat-checkbox (change)=\"update(node)\" [checked]=\"nodeIsChecked(node)\" class=\"node-checkbox\"\n [matTooltip]=\"'Map data field: ' + node.key\">\n <span class=\"node-key\" [attr.aria-label]=\"'Field name: ' + node.key\">{{ node.key }}:</span>\n <span [attr.aria-label]=\"'Field value: ' + node.value\" style=\" white-space: nowrap;\" class=\"node-value\"\n [style.color]=\"getNodeValueColor(node.value)\">\n {{ node.value }}\n </span>\n </mat-checkbox>\n </mat-tree-node>\n\n <mat-tree-node *matTreeNodeDef=\"let node; when: treeClass.hasChild\" matTreeNodePadding>\n <button style=\"padding: 0px; \n width: 24px;\" mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'Toggle ' + node.key\">\n <mat-icon>\n {{ treeClass.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <mat-checkbox (change)=\"update(node)\" [checked]=\"nodeIsChecked(node)\" [matTooltip]=\"'Select ' + node.key\">\n <span class=\"node-key\">{{ node.key }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n </div>\n </mat-expansion-panel>\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">rebase_edit</mat-icon>\n Configure and transform your data path\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <div class=\"tree-instructions\" *ngIf=\"treeClass.activePath.length === 0\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>Select a node from the tree above to begin mapping data</span>\n </div>\n <mat-divider></mat-divider>\n <mat-toolbar style=\" height: fit-content; background: inherit;\">\n <div class=\"breadcrumb-container\">\n\n <ng-container *ngFor=\"let path of treeClass.activePath; trackBy: trackByFn; last as isLast; index as i\">\n <button *ngIf=\"!path.inEdit\" matTooltip=\"Click to edit\" (click)=\"setupPath(path)\" mat-button\n [disabled]=\"!path.keyIsArrayIndex\" [color]=\"path.functions.length> 0 ? 'accent' : ''\"\n class=\"breadcrumb-item\">\n <mat-icon>{{ path.keyIsArrayIndex ? 'filter_none' : 'folder' }}</mat-icon>\n <span>{{ path.key }}</span>\n </button>\n\n\n <button *ngIf=\"!!path.inEdit\" matTooltip=\"Currently editing\" (click)=\"removeFunction(path.key)\"\n mat-raised-button color=\"primary\" class=\"breadcrumb-item\">\n <mat-icon>check_circle</mat-icon>\n <span>{{ path.key }}</span>\n </button>\n <mat-icon *ngIf=\"!isLast\" class=\"breadcrumb-separator\">chevron_right</mat-icon>\n </ng-container>\n </div>\n </mat-toolbar>\n <div *ngIf=\"!!hasANodeInEdit()\">\n\n <mat-nav-list>\n\n <ng-container *ngFor=\"let function of this.treeClass.pathInEdit?.functions;index as i\">\n <mat-list-item \n [activated]=\"!!function.inEdit\"\n class=\"functions\" style=\"height: fit-content;\">\n <span matListItemIcon class=\"function-number\" > \n <strong> {{i+1}} </strong>\n </span>\n <a \n\n (click)=\"editFunction(function.id)\"\n \n style=\"font-size: 14px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;\"\n matListItemTitle> {{ (function.function |titlecase) ||\n 'Function configurations required'}}</a>\n <button mat-icon-button \n (click)=\"removeFunction(function.id)\" matListItemMeta>\n\n <mat-icon [color]=\"function.function && function.expression?'':'warn'\">{{!function.inEdit? 'close':'check_circle'}}</mat-icon>\n </button>\n \n \n </mat-list-item>\n \n <div class=\"function-edit-container\" *ngIf=\"function.inEdit\">\n <mat-divider></mat-divider>\n <mat-form-field style=\" margin-bottom: 8px;\" appearance=\"outline\" *ngIf=\"this.treeClass.pathInEdit?.functions\">\n <mat-label>Array function</mat-label>\n <mat-select matNativeControl [value]=\"getFunctionInEdit()?.function\"\n (selectionChange)=\"functionChanged($event)\" placeholder=\"ChooseFunctionToRun\">\n <mat-option value=\"filter\">filter</mat-option>\n <mat-option value=\"find\">find</mat-option>\n <mat-option value=\"map\">map</mat-option>\n </mat-select>\n <mat-hint>\n Choose a function to run on the array\n </mat-hint>\n </mat-form-field>\n <mat-form-field appearance=\"outline\" *ngIf=\"this.treeClass.pathInEdit?.functions\">\n <mat-label >Condition expression</mat-label>\n <textarea matInput #textarea \n [value]=\"getFunctionInEdit()?.expression\"\n (input)=\"onTextChange($event)\" (focus)=\"onFocus($event)\"\n \n placeholder=\"Enter a validation string for the function\"></textarea>\n <mat-hint>\n {{ showSuggestions ? 'Suggestions are enabled' : 'Enter a condition expression to transform the array' }}\n </mat-hint>\n </mat-form-field>\n <section *ngIf=\"showSuggestions\" \n class=\"showSuggestionContainer\">\n <!-- <mat-toolbar class=\"search-container\" style=\"background: inherit;\">\n \n \n <input type=\"search\" \n placeholder=\"Search api\" \n class=\"search-field\"\n (change)=\"onSearchChange($event)\"> \n \n <mat-icon>\n search\n </mat-icon>\n </mat-toolbar> -->\n <mat-divider></mat-divider>\n <div style=\"padding: 8px;\" class=\"\">\n <div class=\"suggestion-container\">\n <div class=\"suggestion-column\">\n <h5>Logical Operators</h5>\n <div class=\"button-container\">\n <button \n color=\"primary\" \n mat-flat-button *ngFor=\"let method of getMethods()\"\n (click)=\"selectSuggestionInput(method.value)\" class=\"suggestion-button\">\n {{ method.label | titlecase }}\n </button>\n </div>\n </div>\n <div class=\"suggestion-column\">\n <h5>Add Input as a Variable</h5>\n <div class=\"button-container\">\n <button *ngFor=\"let input of getAllInputs()\"\n mat-flat-button\n (click)=\"selectSuggestionInput(input.formControlName)\" class=\"suggestion-button\">\n {{ input.label | titlecase }}\n </button>\n </div>\n </div>\n <!-- <div class=\"suggestion-column\">\n <h5>Array path Object </h5>\n <div class=\"button-container\">\n <button *ngFor=\"let input of getValueVariables()\"\n color=\"accent\"\n mat-flat-button\n (click)=\"selectSuggestionInput(input)\" class=\"suggestion-button\">\n {{ input}}\n </button>\n </div>\n </div> -->\n </div>\n <div class=\"suggestion-container\">\n \n </div>\n \n </div>\n </section>\n \n\n <mat-toolbar style=\"background:none\">\n <span class=\"spacer\"></span>\n\n <button (click)=\"reset()\" mat-flat-button>\n reset\n </button>\n <button (click)=\"saveNodeInEdit()\" [disabled]=\"!function.expression && !function.function\" mat-flat-button\n color=\"primary\">\n save\n </button>\n\n </mat-toolbar>\n </div>\n <mat-divider></mat-divider>\n </ng-container>\n\n </mat-nav-list>\n <ol>\n\n </ol>\n <button (click)=\"addNewFunction()\" mat-button>+ Add function </button>\n </div>\n </div>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">dataset</mat-icon>\n Mapped Data Value Based on the Active Path\n </mat-panel-title>\n\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <mat-divider></mat-divider>\n\n <div style=\"padding: 16px;background: black;\n color: cadetblue; border-radius:8px;min-width:fit-content\">\n <pre>{{getValue|json}}</pre>\n </div>\n </div>\n </mat-expansion-panel>\n\n\n</mat-accordion>","import {\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n HostBinding,\r\n Input,\r\n\r\n Optional,\r\n\r\n Output,\r\n Self,\r\n} from '@angular/core';\r\nimport { TreeNode } from \"ngx-t-forms-types\";\r\nimport { CommonModule } from '@angular/common';\r\nimport { DataTreeComponent } from './elements/data-tree/data-tree.component';\r\nimport { FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { catchError, Subject, take, tap, throwError } from 'rxjs';\r\nimport { NgControl } from '@angular/forms';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { IFolderItem, IGetPostmanCollections, IPostmanCollectionConfig } from \"ngx-t-forms-types\";\r\nimport { HttpClient, HttpErrorResponse } from '@angular/common/http';\r\nimport _ from 'lodash';\r\nimport { flatApiList } from '../postman-collections/functions/convertPostmanCollectionToTree';\r\n\r\n\r\n\r\n\r\n\r\n@Component({\r\n selector: 'app-api-value-access-rules',\r\n templateUrl: './api-value-access-rules.component.html',\r\n styleUrls: ['./api-value-access-rules.component.scss'],\r\n standalone: true,\r\n imports: [CommonModule, DataTreeComponent ],\r\n providers: [{ provide: MatFormFieldControl, useExisting: ApiValueAccessRulesComponent}],\r\n})\r\nexport class ApiValueAccessRulesComponent implements MatFormFieldControl<TreeNode[] | string | {[key:string]:TreeNode[] | string}> {\r\n\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n\r\n @HostBinding() id = `app-api-value-access-rules-${ApiValueAccessRulesComponent .nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,private readonly httpClient: HttpClient) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\n disabled: boolean = false;\r\nget errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n 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-api-value-access-rules');\r\n // Check if the controlElement exists before attempting to set its attribute\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\r\n }\r\n }\r\n }\r\n onContainerClick(event: MouseEvent): void {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n\r\n touched: boolean = false;\r\n onTouched = () => {};\r\n markAsTouched() {\r\n console.log('markAsTouched') \r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n } \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n // currently mapped value\r\n @Input() multipleBind:string[] | undefined\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\n @Input() value: TreeNode[] | string | {[key:string]:TreeNode[] | string} = [];\r\n @Input() mapToData: any\r\n @Input() formInputs:FormColumnInputs[] = []\r\n @Output() valueChanged = new EventEmitter();\r\n @Output() reload = new EventEmitter();\r\n _postManCollectionConfig: IPostmanCollectionConfig | undefined\r\n @Input() set postmanCollectionConfig(postmanCollectionConfig: IPostmanCollectionConfig | undefined){\r\n if(!_.isEqual(this._postManCollectionConfig,postmanCollectionConfig)){\r\n this._postManCollectionConfig = postmanCollectionConfig\r\n this.initializePostmanService()\r\n }\r\n \r\n }\r\n\r\n get postmanCollectionConfig(): IPostmanCollectionConfig | undefined{\r\n return this._postManCollectionConfig\r\n }\r\n \r\n get computedValue():any{\r\n const invalidType =this.value instanceof Array || typeof this.value === 'string' \r\n if(this.multipleBind && invalidType && !this.value){\r\n return {}\r\n }\r\n return this.value\r\n }\r\n pathChanged(path:TreeNode[]|string,control?:string){\r\n if(!Array.isArray(path)){\r\n return\r\n }\r\n if(!control){\r\n this.valueChanged.emit(path)\r\n return\r\n }\r\n if(this.value instanceof Array || typeof this.value === 'string'){\r\n this.value = {}\r\n }\r\n const newValue = {...this.value }\r\n newValue[control] = path\r\n this.valueChanged.emit(newValue)\r\n }\r\n private isValidConfig(config: IPostmanCollectionConfig | undefined): boolean {\r\n return Boolean(config?.collectionUrl && config?.collectionKey);\r\n }\r\n error: HttpErrorResponse | undefined\r\n loading: boolean = false\r\n postManFolderItems:IFolderItem[] = []\r\n private initializePostmanService(): void {\r\n8\r\n const isValidConfig = this.isValidConfig(this.postmanCollectionConfig)\r\n if (!isValidConfig) {\r\n this.error = new HttpErrorResponse({\r\n error: 'Invalid Postman Collection Config',\r\n })\r\n return\r\n }\r\n const { collectionUrl, collectionKey } = this.postmanCollectionConfig!\r\n \r\n const requestOptions = {\r\n params: {\r\n apikey: collectionKey,\r\n clearSystemHeaders: true\r\n },\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n \r\n }\r\n }\r\n this.loading = true\r\n\r\n this.httpClient.get<IGetPostmanCollections>(\r\n collectionUrl,\r\n requestOptions\r\n ).pipe(\r\n take(1),\r\n tap((data) => {\r\n // To ensure the data can be shown as a tree\r\n this.postManFolderItems= flatApiList(data.collection.item) \r\n \r\n this.error = undefined\r\n this.loading = false\r\n }),\r\n catchError((err: HttpErrorResponse) => {\r\n this.loading = false\r\n this.error = err\r\n console.error(err)\r\n return throwError(err)\r\n })\r\n ).subscribe();\r\n }\r\n \r\n get postmanResponseBody(){\r\n \r\n const {response} = this.postManFolderItems.find((item) => item.id === this.mapToData) ||{}\r\n let responseBody = JSON.parse(response?.[0]?.body || '{}')\r\n return responseBody\r\n }\r\n\r\n}\r\n","\r\n\r\n\r\n<section *ngFor=\"let controlName of multipleBind||[]\">\r\n <label [for]=\"controlName\">Map <strong>{{controlName}}</strong></label>\r\n <app-data-tree \r\n [formInputs]=\"formInputs\"\r\n (pathChanged)=\"pathChanged($event,controlName)\" \r\n [data]=\"postmanResponseBody\" [value]=\"computedValue[controlName]||''\" ></app-data-tree>\r\n</section>\r\n\r\n\r\n<app-data-tree \r\n*ngIf=\"!multipleBind\"\r\n(pathChanged)=\"pathChanged($event)\" \r\n [formInputs]=\"formInputs\"\r\n[data]=\"postmanResponseBody\" [value]=\"computedValue\"></app-data-tree>\r\n\r\n"],"names":["i1","i2","i3","i4","i5","i6","i7","i8","i9","i10","i11","i12","i13","i14"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;SAAgB,mBAAmB,CACjC,GAAU,EACV,UAAkB,EAClB,QAAgB,EAAA;;IAGhB,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,KACjC;AACE,UAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,EAAE;UAC7D,IAAI,CACT;;IAGD,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KACvC,CAAC,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CACvC;AAED,IAAA,OAAO,UAAU;AACnB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lib/shared/functions/searchArray.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/elements/data-tree/data-tree.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/elements/data-tree/data-tree.component.html","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/api-value-access-rules.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/api-value-access-rules/api-value-access-rules.component.html"],"sourcesContent":["export function searchAndOrderArray(\r\n arr: any[],\r\n searchTerm: string,\r\n filterBy: string\r\n): any[] {\r\n // Filter the array based on the search term\r\n const filteredArr = arr.filter((obj) =>\r\n searchTerm\r\n ? obj[filterBy].toLowerCase().includes(searchTerm.toLowerCase())\r\n : true\r\n );\r\n\r\n // Order the filtered array alphabetically by name\r\n const orderedArr = filteredArr.sort((a, b) =>\r\n a[filterBy].localeCompare(b[filterBy])\r\n );\r\n\r\n return orderedArr;\r\n}\r\n","import { Component, ElementRef, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core';\r\n\r\nimport { CommonModule } from '@angular/common';\r\n\r\n\r\nimport { FormsModule } from '@angular/forms';\r\n\r\n\r\n\r\nimport { TreeComponent } from '../../functions/convertDataToTree';\r\nimport { FlatNode, TreeNode } from 'ngx-t-forms-types';\r\nimport { MatModulesModule } from '../../../../../../shared/modules/mat-modules.module';\r\nimport { searchAndOrderArray } from '../../../../../../shared/functions/searchArray';\r\nimport { FormColumnInputs } from 'ngx-t-forms-types';;\r\nimport { MatSelectChange } from '@angular/material/select';\r\n\r\n\r\n@Component({\r\n selector: 'app-data-tree',\r\n templateUrl: './data-tree.component.html',\r\n styleUrls: ['./data-tree.component.scss'],\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule, FormsModule]\r\n})\r\nexport class DataTreeComponent implements OnInit, OnChanges {\r\n treeClass!: TreeComponent\r\n @Input() data: any;\r\n @Input() value: TreeNode[] | string = [];\r\n @Input() formInputs:FormColumnInputs[] = []\r\n @Output() pathChanged = new EventEmitter<TreeNode[] | string>()\r\n\r\n constructor() {\r\n this.treeClass = new TreeComponent();\r\n }\r\n _data: any\r\n _value: TreeNode[] | string = []\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['data']) {\r\n if (JSON.stringify(this._data) !== JSON.stringify(changes['data'].currentValue)) {\r\n this._data = changes['data'].currentValue\r\n this.treeClass.computeTreeData(changes['data'].currentValue)\r\n \r\n if (this.value && Array.isArray(this.value) && this.value.length > 0 && 'functions' in (this.value?.[0]||{})) {\r\n this.treeClass.updateStateFromPath(this.value as TreeNode[])\r\n }\r\n }\r\n }\r\n if (changes['value']) {\r\n this.valueChangedSetPath(changes['value'].currentValue)\r\n }\r\n }\r\n ngOnInit() {\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\r\n\r\n showSuggestions = false;\r\n suggestions = ['$option1', '$option2', '$option3', '$custom'];\r\n filteredSuggestions: string[] = [];\r\n cursorPosition = 0;\r\n valueChangedSetPath(newPath: TreeNode[] | string) {\r\n const isSameAsNewPath = typeof newPath === typeof this._value && JSON.stringify(newPath) === JSON.stringify(this._value)\r\n if (!isSameAsNewPath && Array.isArray(newPath)) {\r\n this._value = newPath\r\n this.treeClass.updateStateFromPath(newPath as TreeNode[])\r\n }\r\n }\r\n async onTextChange(event: Event) {\r\n const newValue =(event.target as HTMLInputElement).value;\r\n const functions = this.treeClass.pathInEdit!.functions!.find(f => f.inEdit)\r\n functions!.expression = newValue;\r\n this.treeClass.pathInEdit!.functions.map(f => {\r\n if (f.inEdit) {\r\n return functions\r\n }\r\n return f\r\n })\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 if (lastChar === '$') {\r\n this.showSuggestions = true;\r\n this.filteredSuggestions = this.suggestions;\r\n } else {\r\n this.showSuggestions = false;\r\n }\r\n }\r\n functionChanged(event:MatSelectChange) {\r\n this.treeClass.functionChanged(event.value)\r\n }\r\n addNewFunction() {\r\n\r\n this.treeClass.addNewFunction()\r\n\r\n }\r\n editFunction(id: string) {\r\n\r\n\r\n this.treeClass.pathInEdit!.functions = this.treeClass.pathInEdit!.functions?.map(f => {\r\n if (f.id === id) {\r\n return { ...f, inEdit: true }\r\n }\r\n return { ...f, inEdit: false }\r\n\r\n })\r\n\r\n }\r\n selectSuggestionInput(suggestion: string) {\r\n\r\n const functions = this.treeClass.pathInEdit!.functions.find(f => f.inEdit) || {} as any\r\n const value = functions?.expression || ''\r\n const beforeCursor = value.slice(0, this.cursorPosition - 1);\r\n const afterCursor = value.slice(this.cursorPosition);\r\n functions.expression = beforeCursor + suggestion + ' ' + afterCursor;\r\n this.treeClass.pathInEdit!.functions.map(f => {\r\n if (f.inEdit) {\r\n return functions\r\n }\r\n return f\r\n })\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\r\n onFocus(event:FocusEvent) {\r\n const textarea = this.textareaElementRef.nativeElement;\r\n this.cursorPosition = textarea.selectionStart || 0;\r\n }\r\n nodeIsChecked(node: FlatNode) {\r\n return this.treeClass.nodeIsChecked(node)\r\n }\r\n hasANodeInEdit() {\r\n return this.treeClass.hasANodeInEdit()\r\n }\r\n showNode(node: FlatNode) {\r\n return this.treeClass.showNode(node)\r\n }\r\n onSearchChange(event: Event) {\r\n this.optionsSearch = (event.target as HTMLInputElement).value;\r\n\r\n }\r\n\r\n methods = [\r\n // Logical Operators\r\n {\r\n label: 'logical AND (&&)',\r\n value: '&&'\r\n },\r\n {\r\n label: 'logical OR (||)',\r\n value: '||'\r\n },\r\n\r\n // Comparison Operators\r\n {\r\n label: 'strict equality (===)',\r\n value: '==='\r\n },\r\n {\r\n label: 'loose equality (==)',\r\n value: '=='\r\n },\r\n {\r\n label: 'strict inequality (!==)',\r\n value: '!=='\r\n },\r\n {\r\n label: 'loose inequality (!=)',\r\n value: '!='\r\n },\r\n {\r\n label: 'greater than (>)',\r\n value: '>'\r\n },\r\n {\r\n label: 'less than (<)',\r\n value: '<'\r\n },\r\n {\r\n label: 'greater than or equal to (>=)',\r\n value: '>='\r\n },\r\n {\r\n label: 'less than or equal to (<=)',\r\n value: '<='\r\n }\r\n ];\r\n getMethods() {\r\n return searchAndOrderArray(this.methods, this.optionsSearch, 'label');\r\n }\r\n getNodeValueColor(v: any) {\r\n const valueType = typeof v\r\n switch (valueType) {\r\n case 'string':\r\n return '#c56100'\r\n case 'number':\r\n return 'mediumblue'\r\n case 'boolean':\r\n return 'forestgreen'\r\n case 'object':\r\n return '#005959'\r\n default:\r\n return 'currentcolor'\r\n }\r\n }\r\n setupPath(node: TreeNode) {\r\n return this.treeClass.setupPath(node)\r\n }\r\n trackByFn(index: number, node: TreeNode): string {\r\n return node.path.join('.')\r\n }\r\n showValue: boolean = false\r\n optionsSearch!: string\r\n getAllInputs() {\r\n const inputs = this.formInputs\r\n .filter((inp) => !inp.multipleInputInEditId);\r\n return searchAndOrderArray(inputs||[], this.optionsSearch, 'label');\r\n }\r\n getValueVariables(): string[] {\r\n const isObject = typeof this.value === 'object'\r\n if(!this.value){\r\n return []\r\n }\r\n if(!isObject && !!this.value){\r\n return [this.value as any]\r\n }\r\n if(Array.isArray(this.value)){\r\n return this.value.map((v,i) => (i)) as any\r\n }\r\n return Object.keys(this.value)\r\n }\r\n saveNodeInEdit() {\r\n const newP = this.treeClass.saveNodeInEdit()\r\n if(newP){\r\n this.pathChanged.emit(newP)\r\n }\r\n \r\n }\r\n closeEdit() {\r\n this.treeClass.closeEdit()\r\n\r\n\r\n }\r\n reset() {\r\n this.treeClass.resetNode()\r\n }\r\n getFunctionInEdit() {\r\n const node = this.treeClass.pathInEdit\r\n return node?.functions?.find(f => f.inEdit)\r\n }\r\n get getValue (){\r\n return this.treeClass.getValue()\r\n }\r\n removeFunction(id: string) {\r\n this.treeClass.removeFunction(id)\r\n }\r\n update(node: any) {\r\n\r\n const path = this.treeClass.selectNode(node)?.map(p => ({\r\n ...p,\r\n children: undefined,\r\n value: undefined\r\n }))\r\n\r\n\r\n this.pathChanged.emit(path)\r\n }\r\n}\r\n","<mat-accordion multi>\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">dataset_linked</mat-icon>\n Navigate and select data fields for mapping\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <div class=\"tree-instructions\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>Click checkboxes to select fields for mapping. Selected paths will be highlighted.</span>\n </div>\n <mat-divider></mat-divider>\n\n <mat-tree [dataSource]=\"treeClass.dataSource\" \n [treeControl]=\"treeClass.treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <button disabled class=\"node-spacer\" aria-hidden=\"true\" mat-icon-button>\n\n </button>\n <mat-checkbox (change)=\"update(node)\" [checked]=\"nodeIsChecked(node)\" class=\"node-checkbox\"\n [matTooltip]=\"'Map data field: ' + node.key\">\n <span class=\"node-key\" [attr.aria-label]=\"'Field name: ' + node.key\">{{ node.key }}:</span>\n <span [attr.aria-label]=\"'Field value: ' + node.value\" style=\" white-space: nowrap;\" class=\"node-value\"\n [style.color]=\"getNodeValueColor(node.value)\">\n {{ node.value }}\n </span>\n </mat-checkbox>\n </mat-tree-node>\n\n <mat-tree-node *matTreeNodeDef=\"let node; when: treeClass.hasChild\" matTreeNodePadding>\n <button style=\"padding: 0px; \n width: 24px;\" mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'Toggle ' + node.key\">\n <mat-icon>\n {{ treeClass.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <mat-checkbox (change)=\"update(node)\" [checked]=\"nodeIsChecked(node)\" [matTooltip]=\"'Select ' + node.key\">\n <span class=\"node-key\">{{ node.key }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n </div>\n </mat-expansion-panel>\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">rebase_edit</mat-icon>\n Configure and transform your data path\n </mat-panel-title>\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <div class=\"tree-instructions\" *ngIf=\"treeClass.activePath.length === 0\">\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\n <span>Select a node from the tree above to begin mapping data</span>\n </div>\n <mat-divider></mat-divider>\n <mat-toolbar style=\" height: fit-content; background: inherit;\">\n <div class=\"breadcrumb-container\">\n\n <ng-container *ngFor=\"let path of treeClass.activePath; trackBy: trackByFn; last as isLast; index as i\">\n <button *ngIf=\"!path.inEdit\" matTooltip=\"Click to edit\" (click)=\"setupPath(path)\" mat-button\n [disabled]=\"!path.keyIsArrayIndex\" [color]=\"path.functions.length> 0 ? 'accent' : ''\"\n class=\"breadcrumb-item\">\n <mat-icon>{{ path.keyIsArrayIndex ? 'filter_none' : 'folder' }}</mat-icon>\n <span>{{ path.key }}</span>\n </button>\n\n\n <button *ngIf=\"!!path.inEdit\" matTooltip=\"Currently editing\" (click)=\"removeFunction(path.key)\"\n mat-raised-button color=\"primary\" class=\"breadcrumb-item\">\n <mat-icon>check_circle</mat-icon>\n <span>{{ path.key }}</span>\n </button>\n <mat-icon *ngIf=\"!isLast\" class=\"breadcrumb-separator\">chevron_right</mat-icon>\n </ng-container>\n </div>\n </mat-toolbar>\n <div *ngIf=\"!!hasANodeInEdit()\">\n\n <mat-nav-list>\n\n <ng-container *ngFor=\"let function of this.treeClass.pathInEdit?.functions;index as i\">\n <mat-list-item \n [activated]=\"!!function.inEdit\"\n class=\"functions\" style=\"height: fit-content;\">\n <span matListItemIcon class=\"function-number\" > \n <strong> {{i+1}} </strong>\n </span>\n <a \n\n (click)=\"editFunction(function.id)\"\n \n style=\"font-size: 14px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;\"\n matListItemTitle> {{ (function.function |titlecase) ||\n 'Function configurations required'}}</a>\n <button mat-icon-button \n (click)=\"removeFunction(function.id)\" matListItemMeta>\n\n <mat-icon [color]=\"function.function && function.expression?'':'warn'\">{{!function.inEdit? 'close':'check_circle'}}</mat-icon>\n </button>\n \n \n </mat-list-item>\n \n <div class=\"function-edit-container\" *ngIf=\"function.inEdit\">\n <mat-divider></mat-divider>\n <mat-form-field style=\" margin-bottom: 8px;\" appearance=\"outline\" *ngIf=\"this.treeClass.pathInEdit?.functions\">\n <mat-label>Array function</mat-label>\n <mat-select matNativeControl [value]=\"getFunctionInEdit()?.function\"\n (selectionChange)=\"functionChanged($event)\" placeholder=\"ChooseFunctionToRun\">\n <mat-option value=\"filter\">filter</mat-option>\n <mat-option value=\"find\">find</mat-option>\n <mat-option value=\"map\">map</mat-option>\n </mat-select>\n <mat-hint>\n Choose a function to run on the array\n </mat-hint>\n </mat-form-field>\n <mat-form-field appearance=\"outline\" *ngIf=\"this.treeClass.pathInEdit?.functions\">\n <mat-label >Condition expression</mat-label>\n <textarea matInput #textarea \n [value]=\"getFunctionInEdit()?.expression\"\n (input)=\"onTextChange($event)\" (focus)=\"onFocus($event)\"\n \n placeholder=\"Enter a validation string for the function\"></textarea>\n <mat-hint>\n {{ showSuggestions ? 'Suggestions are enabled' : 'Enter a condition expression to transform the array' }}\n </mat-hint>\n </mat-form-field>\n <section *ngIf=\"showSuggestions\" \n class=\"showSuggestionContainer\">\n <!-- <mat-toolbar class=\"search-container\" style=\"background: inherit;\">\n \n \n <input type=\"search\" \n placeholder=\"Search api\" \n class=\"search-field\"\n (change)=\"onSearchChange($event)\"> \n \n <mat-icon>\n search\n </mat-icon>\n </mat-toolbar> -->\n <mat-divider></mat-divider>\n <div style=\"padding: 8px;\" class=\"\">\n <div class=\"suggestion-container\">\n <div class=\"suggestion-column\">\n <h5>Logical Operators</h5>\n <div class=\"button-container\">\n <button \n color=\"primary\" \n mat-flat-button *ngFor=\"let method of getMethods()\"\n (click)=\"selectSuggestionInput(method.value)\" class=\"suggestion-button\">\n {{ method.label | titlecase }}\n </button>\n </div>\n </div>\n <div class=\"suggestion-column\">\n <h5>Add Input as a Variable</h5>\n <div class=\"button-container\">\n <button *ngFor=\"let input of getAllInputs()\"\n mat-flat-button\n (click)=\"selectSuggestionInput(input.formControlName)\" class=\"suggestion-button\">\n {{ input.label | titlecase }}\n </button>\n </div>\n </div>\n <!-- <div class=\"suggestion-column\">\n <h5>Array path Object </h5>\n <div class=\"button-container\">\n <button *ngFor=\"let input of getValueVariables()\"\n color=\"accent\"\n mat-flat-button\n (click)=\"selectSuggestionInput(input)\" class=\"suggestion-button\">\n {{ input}}\n </button>\n </div>\n </div> -->\n </div>\n <div class=\"suggestion-container\">\n \n </div>\n \n </div>\n </section>\n \n\n <mat-toolbar style=\"background:none\">\n <span class=\"spacer\"></span>\n\n <button (click)=\"reset()\" mat-flat-button>\n reset\n </button>\n <button (click)=\"saveNodeInEdit()\" [disabled]=\"!function.expression && !function.function\" mat-flat-button\n color=\"primary\">\n save\n </button>\n\n </mat-toolbar>\n </div>\n <mat-divider></mat-divider>\n </ng-container>\n\n </mat-nav-list>\n <ol>\n\n </ol>\n <button (click)=\"addNewFunction()\" mat-button>+ Add function </button>\n </div>\n </div>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n <mat-panel-title>\n <mat-icon class=\"title-icon\">dataset</mat-icon>\n Mapped Data Value Based on the Active Path\n </mat-panel-title>\n\n </mat-expansion-panel-header>\n\n <div class=\"content\">\n <mat-divider></mat-divider>\n\n <div style=\"padding: 16px;background: black;\n color: cadetblue; border-radius:8px;min-width:fit-content\">\n <pre>{{getValue|json}}</pre>\n </div>\n </div>\n </mat-expansion-panel>\n\n\n</mat-accordion>","import {\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n HostBinding,\r\n Input,\r\n\r\n Optional,\r\n\r\n Output,\r\n Self,\r\n} from '@angular/core';\r\nimport { TreeNode } from \"ngx-t-forms-types\";\r\nimport { CommonModule } from '@angular/common';\r\nimport { DataTreeComponent } from './elements/data-tree/data-tree.component';\r\nimport { FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { catchError, Subject, take, tap, throwError } from 'rxjs';\r\nimport { NgControl } from '@angular/forms';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { IFolderItem, IGetPostmanCollections, IPostmanCollectionConfig } from \"ngx-t-forms-types\";\r\nimport { HttpClient, HttpErrorResponse } from '@angular/common/http';\r\nimport _ from 'lodash';\r\nimport { flatApiList } from '../postman-collections/functions/convertPostmanCollectionToTree';\r\n\r\n\r\n\r\n\r\n\r\n@Component({\r\n selector: 'app-api-value-access-rules',\r\n templateUrl: './api-value-access-rules.component.html',\r\n styleUrls: ['./api-value-access-rules.component.scss'],\r\n standalone: true,\r\n imports: [CommonModule, DataTreeComponent ],\r\n providers: [{ provide: MatFormFieldControl, useExisting: ApiValueAccessRulesComponent}],\r\n})\r\nexport class ApiValueAccessRulesComponent implements MatFormFieldControl<TreeNode[] | string | {[key:string]:TreeNode[] | string}> {\r\n\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n\r\n @HostBinding() id = `app-api-value-access-rules-${ApiValueAccessRulesComponent .nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,private readonly httpClient: HttpClient) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\n disabled: boolean = false;\r\nget errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n 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-api-value-access-rules');\r\n // Check if the controlElement exists before attempting to set its attribute\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\r\n }\r\n }\r\n }\r\n onContainerClick(event: MouseEvent): void {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n\r\n touched: boolean = false;\r\n onTouched = () => {};\r\n markAsTouched() {\r\n console.log('markAsTouched') \r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n } \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n // currently mapped value\r\n @Input() multipleBind:string[] | undefined\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\n @Input() value: TreeNode[] | string | {[key:string]:TreeNode[] | string} = [];\r\n @Input() mapToData: any\r\n @Input() formInputs:FormColumnInputs[] = []\r\n @Output() valueChanged = new EventEmitter();\r\n @Output() reload = new EventEmitter();\r\n _postManCollectionConfig: IPostmanCollectionConfig | undefined\r\n @Input() set postmanCollectionConfig(postmanCollectionConfig: IPostmanCollectionConfig | undefined){\r\n if(!_.isEqual(this._postManCollectionConfig,postmanCollectionConfig)){\r\n this._postManCollectionConfig = postmanCollectionConfig\r\n this.initializePostmanService()\r\n }\r\n \r\n }\r\n\r\n get postmanCollectionConfig(): IPostmanCollectionConfig | undefined{\r\n return this._postManCollectionConfig\r\n }\r\n \r\n get computedValue():any{\r\n const invalidType =this.value instanceof Array || typeof this.value === 'string' \r\n if(this.multipleBind && invalidType && !this.value){\r\n return {}\r\n }\r\n return this.value\r\n }\r\n pathChanged(path:TreeNode[]|string,control?:string){\r\n if(!Array.isArray(path)){\r\n return\r\n }\r\n if(!control){\r\n this.valueChanged.emit(path)\r\n return\r\n }\r\n if(this.value instanceof Array || typeof this.value === 'string'){\r\n this.value = {}\r\n }\r\n const newValue = {...this.value }\r\n newValue[control] = path\r\n this.valueChanged.emit(newValue)\r\n }\r\n private isValidConfig(config: IPostmanCollectionConfig | undefined): boolean {\r\n return Boolean(config?.collectionUrl && config?.collectionKey);\r\n }\r\n error: HttpErrorResponse | undefined\r\n loading: boolean = false\r\n postManFolderItems:IFolderItem[] = []\r\n private initializePostmanService(): void {\r\n8\r\n const isValidConfig = this.isValidConfig(this.postmanCollectionConfig)\r\n if (!isValidConfig) {\r\n this.error = new HttpErrorResponse({\r\n error: 'Invalid Postman Collection Config',\r\n })\r\n return\r\n }\r\n const { collectionUrl, collectionKey } = this.postmanCollectionConfig!\r\n \r\n const requestOptions = {\r\n params: {\r\n apikey: collectionKey,\r\n clearSystemHeaders: true\r\n },\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n \r\n }\r\n }\r\n this.loading = true\r\n\r\n this.httpClient.get<IGetPostmanCollections>(\r\n collectionUrl,\r\n requestOptions\r\n ).pipe(\r\n take(1),\r\n tap((data) => {\r\n // To ensure the data can be shown as a tree\r\n this.postManFolderItems= flatApiList(data.collection.item) \r\n \r\n this.error = undefined\r\n this.loading = false\r\n }),\r\n catchError((err: HttpErrorResponse) => {\r\n this.loading = false\r\n this.error = err\r\n console.error(err)\r\n return throwError(err)\r\n })\r\n ).subscribe();\r\n }\r\n \r\n get postmanResponseBody(){\r\n \r\n const {response} = this.postManFolderItems.find((item) => item.id === this.mapToData) ||{}\r\n let responseBody = JSON.parse(response?.[0]?.body || '{}')\r\n return responseBody\r\n }\r\n\r\n}\r\n","\r\n\r\n\r\n<section *ngFor=\"let controlName of multipleBind||[]\">\r\n <label [for]=\"controlName\">Map <strong>{{controlName}}</strong></label>\r\n <app-data-tree \r\n [formInputs]=\"formInputs\"\r\n (pathChanged)=\"pathChanged($event,controlName)\" \r\n [data]=\"postmanResponseBody\" [value]=\"computedValue[controlName]||''\" ></app-data-tree>\r\n</section>\r\n\r\n\r\n<app-data-tree \r\n*ngIf=\"!multipleBind\"\r\n(pathChanged)=\"pathChanged($event)\" \r\n [formInputs]=\"formInputs\"\r\n[data]=\"postmanResponseBody\" [value]=\"computedValue\"></app-data-tree>\r\n\r\n"],"names":["i1","i2","i3","i4","i5","i6","i7","i8","i9","i10","i11","i12","i13"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;SAAgB,mBAAmB,CACjC,GAAU,EACV,UAAkB,EAClB,QAAgB,EAAA;;IAGhB,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,KACjC;AACE,UAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,EAAE;UAC7D,IAAI,CACT;;IAGD,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KACvC,CAAC,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CACvC;AAED,IAAA,OAAO,UAAU;AACnB;;ACLqD;MAWxC,iBAAiB,CAAA;AAO5B,IAAA,WAAA,GAAA;QAJS,IAAK,CAAA,KAAA,GAAwB,EAAE;QAC/B,IAAU,CAAA,UAAA,GAAsB,EAAE;AACjC,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAuB;QAM/D,IAAM,CAAA,MAAA,GAAwB,EAAE;QAwBhC,IAAe,CAAA,eAAA,GAAG,KAAK;QACvB,IAAW,CAAA,WAAA,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC;QAC7D,IAAmB,CAAA,mBAAA,GAAa,EAAE;QAClC,IAAc,CAAA,cAAA,GAAG,CAAC;AA0Fl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EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAG9B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBARxC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,4BAA4B,cAG1B,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,iBAAiB,CAAE,EAAA,SAAA,EAC/B,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,4BAA8B,EAAC,CAAC,EAAA,QAAA,EAAA,qlBAAA,EAAA,MAAA,EAAA,CAAA,2BAAA,CAAA,EAAA;;0BAW3E;;0BAAY;6FAHV,EAAE,EAAA,CAAA;sBAAhB;gBAyDQ,YAAY,EAAA,CAAA;sBAApB;gBACU,MAAM,EAAA,CAAA;sBAAd;gBACM,KAAK,EAAA,CAAA;sBAAb;gBACQ,SAAS,EAAA,CAAA;sBAAjB;gBACQ,UAAU,EAAA,CAAA;sBAAlB;gBACS,YAAY,EAAA,CAAA;sBAArB;gBACS,MAAM,EAAA,CAAA;sBAAf;gBAEY,uBAAuB,EAAA,CAAA;sBAAnC;;;;;"}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { EventEmitter, Output, Input, HostBinding, Optional, Self, Component } from '@angular/core';
|
|
3
3
|
import { v4 } from 'uuid';
|
|
4
|
-
import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-
|
|
4
|
+
import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-DOtego0e.mjs';
|
|
5
5
|
import * as i2$1 from '@angular/common';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
import * as i1 from '@angular/forms';
|
|
8
8
|
import { FormsModule } from '@angular/forms';
|
|
9
|
-
import { FormInputSelectorComponent } from './ngx-t-forms-form-input-selector.component-
|
|
10
|
-
import * as i3$2 from '@angular/material/form-field';
|
|
9
|
+
import { FormInputSelectorComponent } from './ngx-t-forms-form-input-selector.component-Cmn8r7Ex.mjs';
|
|
11
10
|
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
12
11
|
import { Subject } from 'rxjs';
|
|
13
12
|
import { CalculationFunctions } from 'ngx-t-forms-types';
|
|
14
|
-
import * as i3 from '@angular/material/
|
|
13
|
+
import * as i3 from '@angular/material/autocomplete';
|
|
15
14
|
import * as i2 from '@angular/material/button';
|
|
16
15
|
import * as i3$1 from '@angular/material/card';
|
|
17
16
|
import * as i4 from '@angular/material/chips';
|
|
18
17
|
import * as i6 from '@angular/material/icon';
|
|
19
|
-
import * as
|
|
18
|
+
import * as i3$2 from '@angular/material/select';
|
|
20
19
|
import * as i9 from '@angular/material/toolbar';
|
|
21
20
|
import * as i12 from '@angular/material/input';
|
|
22
21
|
|
|
@@ -276,10 +275,10 @@ class CalculatedFieldRulesComponent {
|
|
|
276
275
|
this.activeVariable = {};
|
|
277
276
|
this.showVariableConfig = false;
|
|
278
277
|
}
|
|
279
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
280
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: CalculatedFieldRulesComponent, isStandalone: true, selector: "app-calculated-field-rules", inputs: { mapToData: "mapToData", value: "value", formInputs: "formInputs", errors: "errors" }, outputs: { valueChange2dWithPath: "valueChange2dWithPath", valueChanged: "valueChanged" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CalculatedFieldRulesComponent }], ngImport: i0, template: "\r\n<br>\r\n<div *ngIf=\" !!this.value &&!mapToData?.['id'] && !tableMode\" class=\"tree-instructions\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n Save the input first to enable calculated field configurations\r\n </span>\r\n</div>\r\n\r\n<section >\r\n <mat-form-field [subscriptSizing]=\"'dynamic'\" [floatLabel]=\"'always'\" appearance=\"outline\" >\r\n <mat-label >Equation</mat-label>\r\n <textarea matInput #textarea [(ngModel)]=\"value['formula']\" \r\n (input)=\"formulaChanged($event)\"\r\n placeholder=\"Enter calculation expression\"></textarea>\r\n <mat-hint>\r\n example: ((a+2)/(b-1))*2\r\n </mat-hint>\r\n </mat-form-field>\r\n <mat-form-field [subscriptSizing]=\"'dynamic'\" [floatLabel]=\"'always'\" style=\" margin-bottom: 8px;\" appearance=\"outline\" *ngIf=\"!!value.getFormulaFromAFormInput\">\r\n <mat-label>Equation</mat-label>\r\n <mat-select matNativeControl [value]=\"value.formControlWithFormula\" (selectionChange)=\"linkFormulaSource($event)\"\r\n placeholder=\"select Input with formula\">\r\n @for (input of formInputs; track input.id) {\r\n <mat-option [disabled]=\"\r\n checkIfInputCanBeLinkedToCalVariable(mapToData, input) ||\r\n input.element !== 'select'\" [value]=\"input.formControlName\">{{input.label}}</mat-option>\r\n }\r\n\r\n\r\n </mat-select>\r\n <mat-hint>\r\n Link formula to an input value\r\n </mat-hint>\r\n </mat-form-field>\r\n <mat-chip-listbox #chipList aria-label=\"options\">\r\n\r\n <mat-chip *ngFor=\"let variable of (this.value['variables']||[])\" \r\n (click)=\"value['formula'] = value['formula'] +' '+ variable['variable'] \"\r\n (removed)=\"remove(variable)\">\r\n <div [style.color]=\"\r\n variable['tableCell'] ? 'var(--ion-color-purple)' : ''\r\n \" style=\"font-size: 13px\">\r\n {{ variable[\"variable\"] }}\r\n\r\n - {{ variable[\"label\"] }}\r\n <span style=\"opacity: 0.6; padding-left: 5px\" *ngIf=\"variable['function']\">\r\n {{ variable[\"function\"] }}</span>\r\n </div>\r\n\r\n <button matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip>\r\n <mat-chip *ngIf=\"!showVariableConfig\" highlighted=\"true\" color=\"accent\" (click)=\"showVariableConfig = !showVariableConfig\">\r\n <span> {{showVariableConfig?'close Variable edit':'Add a new Variable'}} </span>\r\n <mat-icon matChipTrailingIcon>{{\r\n showVariableConfig\r\n ? 'close'\r\n : 'add'\r\n }}</mat-icon>\r\n </mat-chip>\r\n </mat-chip-listbox>\r\n\r\n @if( showVariableConfig){\r\n <ng-container *ngTemplateOutlet=\"variableConfiguration\">\r\n\r\n </ng-container>\r\n }\r\n\r\n</section>\r\n<ng-template #variableConfiguration>\r\n <mat-card style=\"background: var(--mat-toolbar-container-background-color, var(--mat-app-surface));\">\r\n <div style=\"padding: 8px;\">\r\n <div class=\"tree-instructions\" style=\"background: azure\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n <strong>Configure variable </strong><br>\r\n Link a form input to a variable to use in the equation\r\n </span>\r\n </div>\r\n\r\n <lib-form-input-selector \r\n [disabled]=\"!!this.activeVariable['formControlName']\"\r\n [formInputs]=\"numberInputs\" [value]=\"this.activeVariable['inputId']\"\r\n (click)=\"$event.stopPropagation()\" (change)=\"bindInput($event)\"></lib-form-input-selector>\r\n\r\n <ng-container *ngIf=\"this.activeVariable ? !!this.activeVariable['formControlName'] : false\">\r\n <mat-form-field [subscriptSizing]=\"'dynamic'\" [floatLabel]=\"'always'\" appearance=\"outline\">\r\n <mat-label >Variable Name</mat-label>\r\n <textarea matInput #textarea (click)=\"$event.stopPropagation()\"\r\n [(ngModel)]=\"this.activeVariable['variable']\"\r\n placeholder=\"enter variable\"></textarea>\r\n <mat-hint>\r\n A variable is an alphabet or term that represents a form input in the equation.\r\n </mat-hint>\r\n </mat-form-field>\r\n @if (activeVariable['parentInputId']) {\r\n <br>\r\n <mat-label > <small>list function ( \u0192 )</small> </mat-label>\r\n <mat-chip-listbox class=\"mat-mdc-chip-set-stacked\" aria-label=\"Calculation function\">\r\n @for (func of allCalculationFunction; track func) {\r\n <mat-chip-option (click)=\"attachFunction($event,func)\" [selected]=\"activeVariable.function === func\">{{func}}</mat-chip-option>\r\n }\r\n </mat-chip-listbox>\r\n \r\n }\r\n \r\n </ng-container>\r\n </div>\r\n\r\n <mat-toolbar class=\"ion-margin-top\" lines=\"none\">\r\n <span class=\"spacer\"></span>\r\n <button mat-flat-button (click)=\"cancelVariableConfig($event)\">\r\n cancel\r\n </button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"\r\n !this.activeVariable['formControlName'] ||\r\n !this.activeVariable['variable']\r\n \" (click)=\"saveNewVariable($event)\">\r\n save variable\r\n </button>\r\n\r\n </mat-toolbar>\r\n </mat-card>\r\n</ng-template>", styles: [".labelM{font-size:13px}.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}mat-form-field{width:100%;background:azure}.endIcons{height:100%;display:flex!important;align-items:center!important;justify-content:center}mat-chip{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i4.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i4.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i4.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "directive", type: i4.MatChipRemove, selector: "[matChipRemove]" }, { kind: "directive", type: i4.MatChipTrailingIcon, selector: "mat-chip-trailing-icon, [matChipTrailingIcon]" }, { kind: "component", type: i6.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: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i12.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FormInputSelectorComponent, selector: "lib-form-input-selector", inputs: ["errors", "value", "formInputs", "disabled"], outputs: ["change"] }] }); }
|
|
278
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CalculatedFieldRulesComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
279
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: CalculatedFieldRulesComponent, isStandalone: true, selector: "app-calculated-field-rules", inputs: { mapToData: "mapToData", value: "value", formInputs: "formInputs", errors: "errors" }, outputs: { valueChange2dWithPath: "valueChange2dWithPath", valueChanged: "valueChanged" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: CalculatedFieldRulesComponent }], ngImport: i0, template: "\r\n<br>\r\n<div *ngIf=\" !!this.value &&!mapToData?.['id'] && !tableMode\" class=\"tree-instructions\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n Save the input first to enable calculated field configurations\r\n </span>\r\n</div>\r\n\r\n<section >\r\n <mat-form-field [subscriptSizing]=\"'dynamic'\" [floatLabel]=\"'always'\" appearance=\"outline\" >\r\n <mat-label >Equation</mat-label>\r\n <textarea matInput #textarea [(ngModel)]=\"value['formula']\" \r\n (input)=\"formulaChanged($event)\"\r\n placeholder=\"Enter calculation expression\"></textarea>\r\n <mat-hint>\r\n example: ((a+2)/(b-1))*2\r\n </mat-hint>\r\n </mat-form-field>\r\n <mat-form-field [subscriptSizing]=\"'dynamic'\" [floatLabel]=\"'always'\" style=\" margin-bottom: 8px;\" appearance=\"outline\" *ngIf=\"!!value.getFormulaFromAFormInput\">\r\n <mat-label>Equation</mat-label>\r\n <mat-select matNativeControl [value]=\"value.formControlWithFormula\" (selectionChange)=\"linkFormulaSource($event)\"\r\n placeholder=\"select Input with formula\">\r\n @for (input of formInputs; track input.id) {\r\n <mat-option [disabled]=\"\r\n checkIfInputCanBeLinkedToCalVariable(mapToData, input) ||\r\n input.element !== 'select'\" [value]=\"input.formControlName\">{{input.label}}</mat-option>\r\n }\r\n\r\n\r\n </mat-select>\r\n <mat-hint>\r\n Link formula to an input value\r\n </mat-hint>\r\n </mat-form-field>\r\n <mat-chip-listbox #chipList aria-label=\"options\">\r\n\r\n <mat-chip *ngFor=\"let variable of (this.value['variables']||[])\" \r\n (click)=\"value['formula'] = value['formula'] +' '+ variable['variable'] \"\r\n (removed)=\"remove(variable)\">\r\n <div [style.color]=\"\r\n variable['tableCell'] ? 'var(--ion-color-purple)' : ''\r\n \" style=\"font-size: 13px\">\r\n {{ variable[\"variable\"] }}\r\n\r\n - {{ variable[\"label\"] }}\r\n <span style=\"opacity: 0.6; padding-left: 5px\" *ngIf=\"variable['function']\">\r\n {{ variable[\"function\"] }}</span>\r\n </div>\r\n\r\n <button matChipRemove>\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip>\r\n <mat-chip *ngIf=\"!showVariableConfig\" highlighted=\"true\" color=\"accent\" (click)=\"showVariableConfig = !showVariableConfig\">\r\n <span> {{showVariableConfig?'close Variable edit':'Add a new Variable'}} </span>\r\n <mat-icon matChipTrailingIcon>{{\r\n showVariableConfig\r\n ? 'close'\r\n : 'add'\r\n }}</mat-icon>\r\n </mat-chip>\r\n </mat-chip-listbox>\r\n\r\n @if( showVariableConfig){\r\n <ng-container *ngTemplateOutlet=\"variableConfiguration\">\r\n\r\n </ng-container>\r\n }\r\n\r\n</section>\r\n<ng-template #variableConfiguration>\r\n <mat-card style=\"background: var(--mat-toolbar-container-background-color, var(--mat-app-surface));\">\r\n <div style=\"padding: 8px;\">\r\n <div class=\"tree-instructions\" style=\"background: azure\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n <strong>Configure variable </strong><br>\r\n Link a form input to a variable to use in the equation\r\n </span>\r\n </div>\r\n\r\n <lib-form-input-selector \r\n [disabled]=\"!!this.activeVariable['formControlName']\"\r\n [formInputs]=\"numberInputs\" [value]=\"this.activeVariable['inputId']\"\r\n (click)=\"$event.stopPropagation()\" (change)=\"bindInput($event)\"></lib-form-input-selector>\r\n\r\n <ng-container *ngIf=\"this.activeVariable ? !!this.activeVariable['formControlName'] : false\">\r\n <mat-form-field [subscriptSizing]=\"'dynamic'\" [floatLabel]=\"'always'\" appearance=\"outline\">\r\n <mat-label >Variable Name</mat-label>\r\n <textarea matInput #textarea (click)=\"$event.stopPropagation()\"\r\n [(ngModel)]=\"this.activeVariable['variable']\"\r\n placeholder=\"enter variable\"></textarea>\r\n <mat-hint>\r\n A variable is an alphabet or term that represents a form input in the equation.\r\n </mat-hint>\r\n </mat-form-field>\r\n @if (activeVariable['parentInputId']) {\r\n <br>\r\n <mat-label > <small>list function ( \u0192 )</small> </mat-label>\r\n <mat-chip-listbox class=\"mat-mdc-chip-set-stacked\" aria-label=\"Calculation function\">\r\n @for (func of allCalculationFunction; track func) {\r\n <mat-chip-option (click)=\"attachFunction($event,func)\" [selected]=\"activeVariable.function === func\">{{func}}</mat-chip-option>\r\n }\r\n </mat-chip-listbox>\r\n \r\n }\r\n \r\n </ng-container>\r\n </div>\r\n\r\n <mat-toolbar class=\"ion-margin-top\" lines=\"none\">\r\n <span class=\"spacer\"></span>\r\n <button mat-flat-button (click)=\"cancelVariableConfig($event)\">\r\n cancel\r\n </button>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"\r\n !this.activeVariable['formControlName'] ||\r\n !this.activeVariable['variable']\r\n \" (click)=\"saveNewVariable($event)\">\r\n save variable\r\n </button>\r\n\r\n </mat-toolbar>\r\n </mat-card>\r\n</ng-template>", styles: [".labelM{font-size:13px}.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}mat-form-field{width:100%;background:azure}.endIcons{height:100%;display:flex!important;align-items:center!important;justify-content:center}mat-chip{cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i4.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i4.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i4.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "directive", type: i4.MatChipRemove, selector: "[matChipRemove]" }, { kind: "directive", type: i4.MatChipTrailingIcon, selector: "mat-chip-trailing-icon, [matChipTrailingIcon]" }, { kind: "component", type: i6.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: "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: "component", type: i9.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i12.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FormInputSelectorComponent, selector: "lib-form-input-selector", inputs: ["errors", "value", "formInputs", "disabled"], outputs: ["change"] }] }); }
|
|
281
280
|
}
|
|
282
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
281
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CalculatedFieldRulesComponent, decorators: [{
|
|
283
282
|
type: Component,
|
|
284
283
|
args: [{ selector: 'app-calculated-field-rules', standalone: true, imports: [
|
|
285
284
|
MatModulesModule,
|
|
@@ -308,4 +307,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
308
307
|
}] } });
|
|
309
308
|
|
|
310
309
|
export { CalculatedFieldRulesComponent };
|
|
311
|
-
//# sourceMappingURL=ngx-t-forms-calculated-field-rules.component-
|
|
310
|
+
//# sourceMappingURL=ngx-t-forms-calculated-field-rules.component-FkPPTG1s.mjs.map
|