@c10t/nice-component-library 0.0.10-beta → 0.0.12-a

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.
@@ -23,13 +23,14 @@ export declare class CvaCounterInputComponent implements ControlValueAccessor, O
23
23
  alignNumber: AlignEnum;
24
24
  isFormControl: boolean;
25
25
  onChange: EventEmitter<number>;
26
+ onEnter: EventEmitter<void>;
26
27
  formControl: AbstractControl | undefined;
27
- get NsValidator(): typeof ValidatorService;
28
28
  constructor(injector: Injector, ngControl: NgControl);
29
- ngOnChanges(changes: SimpleChanges): void;
30
- ngOnInit(): void;
29
+ get NsValidator(): typeof ValidatorService;
31
30
  get counterValue(): number;
32
31
  set counterValue(val: number);
32
+ ngOnChanges(changes: SimpleChanges): void;
33
+ ngOnInit(): void;
33
34
  getMinNumber(): number;
34
35
  getMaxNumber(): number;
35
36
  callValidator(): void;
@@ -38,5 +39,5 @@ export declare class CvaCounterInputComponent implements ControlValueAccessor, O
38
39
  registerOnChange(fn: any): void;
39
40
  registerOnTouched(): void;
40
41
  static ɵfac: i0.ɵɵFactoryDeclaration<CvaCounterInputComponent, [null, { optional: true; self: true; }]>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<CvaCounterInputComponent, "cva-counter-input", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "suffixText": { "alias": "suffixText"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "error": { "alias": "error"; "required": false; }; "isDecimal": { "alias": "isDecimal"; "required": false; }; "isLabelOutside": { "alias": "isLabelOutside"; "required": false; }; "isFloatLabel": { "alias": "isFloatLabel"; "required": false; }; "percentOfLabelOutside": { "alias": "percentOfLabelOutside"; "required": false; }; "alignNumber": { "alias": "alignNumber"; "required": false; }; "isFormControl": { "alias": "isFormControl"; "required": false; }; }, { "onChange": "onChange"; }, never, never, false, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<CvaCounterInputComponent, "cva-counter-input", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "suffixText": { "alias": "suffixText"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "error": { "alias": "error"; "required": false; }; "isDecimal": { "alias": "isDecimal"; "required": false; }; "isLabelOutside": { "alias": "isLabelOutside"; "required": false; }; "isFloatLabel": { "alias": "isFloatLabel"; "required": false; }; "percentOfLabelOutside": { "alias": "percentOfLabelOutside"; "required": false; }; "alignNumber": { "alias": "alignNumber"; "required": false; }; "isFormControl": { "alias": "isFormControl"; "required": false; }; }, { "onChange": "onChange"; "onEnter": "onEnter"; }, never, never, false, never>;
42
43
  }
@@ -50,10 +50,11 @@ export declare class CvaFlatTreeComponent implements ControlValueAccessor, OnIni
50
50
  selectionChange: EventEmitter<any>;
51
51
  isFormControl: boolean;
52
52
  formControl: AbstractControl | undefined;
53
+ mapIndexes: Map<any, any>;
53
54
  chooseVirtualScroll?: CdkVirtualScrollViewport;
54
55
  selectedVirtualScroll?: CdkVirtualScrollViewport;
55
- get NsValiator(): typeof ValidatorService;
56
56
  constructor(translateService: TranslateService, injector: Injector, cdr: ChangeDetectorRef, ngControl: NgControl);
57
+ get NsValiator(): typeof ValidatorService;
57
58
  setSelectedNode(): void;
58
59
  setDataSourceOrigin(): void;
59
60
  ngOnInit(): void;
@@ -66,9 +67,6 @@ export declare class CvaFlatTreeComponent implements ControlValueAccessor, OnIni
66
67
  checkIsView(isView: boolean | (() => boolean)): boolean;
67
68
  ngOnChanges(simpleChanges: SimpleChanges): void;
68
69
  transformer: (node: FlatTreeNodeModel, level: number) => FlatTreeNodeModel;
69
- private _getLevel;
70
- private _isExpandable;
71
- private _getChildren;
72
70
  propagateChange: (_: any) => void;
73
71
  registerOnChange(fn: any): void;
74
72
  registerOnTouched(fn: any): void;
@@ -91,6 +89,10 @@ export declare class CvaFlatTreeComponent implements ControlValueAccessor, OnIni
91
89
  expandTreeDataSource(treeControl: FlatTreeControl<FlatTreeNodeModel>, expandProperty: 'isExpanded' | 'isFilterExpanded'): void;
92
90
  onLeafNodeClick(node: FlatTreeNodeModel): void;
93
91
  onParentNodeClick(node: FlatTreeNodeModel): void;
92
+ toggleNodeCheck(node: FlatTreeNodeModel, checked: boolean): void;
93
+ private _getLevel;
94
+ private _isExpandable;
95
+ private _getChildren;
94
96
  static ɵfac: i0.ɵɵFactoryDeclaration<CvaFlatTreeComponent, [null, null, null, { optional: true; self: true; }]>;
95
97
  static ɵcmp: i0.ɵɵComponentDeclaration<CvaFlatTreeComponent, "cva-flat-tree", never, { "label": { "alias": "label"; "required": false; }; "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "isView": { "alias": "isView"; "required": false; }; "isDisplayChooseTreeOnly": { "alias": "isDisplayChooseTreeOnly"; "required": false; }; "isHideCheckbox": { "alias": "isHideCheckbox"; "required": false; }; "isCollapseSelected": { "alias": "isCollapseSelected"; "required": false; }; "selectedLabelTitle": { "alias": "selectedLabelTitle"; "required": false; }; "viewHeight": { "alias": "viewHeight"; "required": false; }; "itemSize": { "alias": "itemSize"; "required": false; }; "percentOfLabelOutside": { "alias": "percentOfLabelOutside"; "required": false; }; "treeConfig": { "alias": "treeConfig"; "required": false; }; "isSearchOutSide": { "alias": "isSearchOutSide"; "required": false; }; "searchTextOutSide": { "alias": "searchTextOutSide"; "required": false; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "fullDatasource": { "alias": "fullDatasource"; "required": false; }; "isFormControl": { "alias": "isFormControl"; "required": false; }; }, { "selectionChange": "selectionChange"; }, never, never, false, never>;
96
98
  }
@@ -1838,11 +1838,9 @@ class CvaCounterInputComponent {
1838
1838
  // Chỉ bằng false khi trong NsSmartTable thôi nhé @@
1839
1839
  isFormControl = true;
1840
1840
  onChange = new EventEmitter();
1841
+ onEnter = new EventEmitter();
1841
1842
  // Cái này là để gắn khi nó là FormControl trong 1 FormGroup
1842
1843
  formControl;
1843
- get NsValidator() {
1844
- return ValidatorService;
1845
- }
1846
1844
  constructor(injector, ngControl) {
1847
1845
  this.injector = injector;
1848
1846
  if (ngControl) {
@@ -1852,6 +1850,15 @@ class CvaCounterInputComponent {
1852
1850
  ngControl.valueAccessor = this;
1853
1851
  }
1854
1852
  }
1853
+ get NsValidator() {
1854
+ return ValidatorService;
1855
+ }
1856
+ get counterValue() {
1857
+ return this.value;
1858
+ }
1859
+ set counterValue(val) {
1860
+ this.writeValue(val);
1861
+ }
1855
1862
  ngOnChanges(changes) {
1856
1863
  if ('value' in changes) {
1857
1864
  this.value = changes.value.currentValue;
@@ -1862,12 +1869,6 @@ class CvaCounterInputComponent {
1862
1869
  // console.log('CvaCounterInputComponent - ngOnInit');
1863
1870
  this.callValidator();
1864
1871
  }
1865
- get counterValue() {
1866
- return this.value;
1867
- }
1868
- set counterValue(val) {
1869
- this.writeValue(val);
1870
- }
1871
1872
  getMinNumber() {
1872
1873
  return typeof (this.min) === 'function' ? this.min() : this.min;
1873
1874
  }
@@ -1941,7 +1942,7 @@ class CvaCounterInputComponent {
1941
1942
  /*NON-EMPTY FOR COMPILE*/
1942
1943
  }
1943
1944
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CvaCounterInputComponent, deps: [{ token: i0.Injector }, { token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
1944
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: CvaCounterInputComponent, isStandalone: false, selector: "cva-counter-input", inputs: { label: "label", placeholder: "placeholder", suffixText: "suffixText", hint: "hint", value: "value", disabled: "disabled", required: "required", errorMessages: "errorMessages", min: "min", max: "max", error: "error", isDecimal: "isDecimal", isLabelOutside: "isLabelOutside", isFloatLabel: "isFloatLabel", percentOfLabelOutside: "percentOfLabelOutside", alignNumber: "alignNumber", isFormControl: "isFormControl" }, outputs: { onChange: "onChange" }, usesOnChanges: true, ngImport: i0, template: `
1945
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: CvaCounterInputComponent, isStandalone: false, selector: "cva-counter-input", inputs: { label: "label", placeholder: "placeholder", suffixText: "suffixText", hint: "hint", value: "value", disabled: "disabled", required: "required", errorMessages: "errorMessages", min: "min", max: "max", error: "error", isDecimal: "isDecimal", isLabelOutside: "isLabelOutside", isFloatLabel: "isFloatLabel", percentOfLabelOutside: "percentOfLabelOutside", alignNumber: "alignNumber", isFormControl: "isFormControl" }, outputs: { onChange: "onChange", onEnter: "onEnter" }, usesOnChanges: true, ngImport: i0, template: `
1945
1946
  <!-- css labelOutside trong base.theme-->
1946
1947
  <div class="cva-counter-input"
1947
1948
  [ngClass]="{'labelOutside': !!isLabelOutside, 'float_label': !!isFloatLabel && !isLabelOutside}"
@@ -1963,6 +1964,7 @@ class CvaCounterInputComponent {
1963
1964
  <input matInput type="number" [(ngModel)]="counterValue" #nsCounterInput="ngModel"
1964
1965
  style="text-align:{{alignNumber}}"
1965
1966
  [disabled]="disabled" [required]="required"
1967
+ (keydown.enter)="onEnter.emit()"
1966
1968
  [placeholder]="placeholder|translate"
1967
1969
  autocomplete="off"
1968
1970
  pattern="{{isDecimal ? '^[^-]?[0-9]+[.]?[0-9]*$' : '^[0-9]*$'}}" min="{{min}}" max="{{max}}" />
@@ -2006,6 +2008,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
2006
2008
  <input matInput type="number" [(ngModel)]="counterValue" #nsCounterInput="ngModel"
2007
2009
  style="text-align:{{alignNumber}}"
2008
2010
  [disabled]="disabled" [required]="required"
2011
+ (keydown.enter)="onEnter.emit()"
2009
2012
  [placeholder]="placeholder|translate"
2010
2013
  autocomplete="off"
2011
2014
  pattern="{{isDecimal ? '^[^-]?[0-9]+[.]?[0-9]*$' : '^[0-9]*$'}}" min="{{min}}" max="{{max}}" />
@@ -2062,6 +2065,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
2062
2065
  type: Input
2063
2066
  }], onChange: [{
2064
2067
  type: Output
2068
+ }], onEnter: [{
2069
+ type: Output
2065
2070
  }] } });
2066
2071
 
2067
2072
  class StylePaginatorDirective {
@@ -2711,6 +2716,7 @@ class CvaTableComponent {
2711
2716
  <mat-label>{{ 'common.gotopage' | translate }}</mat-label>
2712
2717
  <cva-counter-input [(ngModel)]="goToPageNumber"
2713
2718
  (ngModelChange)="onChangeGoToPageNumber($event)"
2719
+ (onEnter)="goToPage()"
2714
2720
  [max]="getTotalPage() ? getTotalPage() : 1"
2715
2721
  [min]="1"
2716
2722
  [isFloatLabel]="false"
@@ -2726,7 +2732,7 @@ class CvaTableComponent {
2726
2732
  </div>
2727
2733
  </div>
2728
2734
  </div>
2729
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4$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: i5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "component", type: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i1$5.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: i8$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i1$4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i9.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: CvaCounterInputComponent, selector: "cva-counter-input", inputs: ["label", "placeholder", "suffixText", "hint", "value", "disabled", "required", "errorMessages", "min", "max", "error", "isDecimal", "isLabelOutside", "isFloatLabel", "percentOfLabelOutside", "alignNumber", "isFormControl"], outputs: ["onChange"] }, { kind: "directive", type: StylePaginatorDirective, selector: "[style-paginator]", inputs: ["showTotalPages", "paging"], outputs: ["pagingChangeEvent"] }, { kind: "component", type: CvaHeaderExpandButtonComponent, selector: "cva-header-expand-button", inputs: ["expandHeaderButton", "columns", "moduleName"], outputs: ["onChange"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: SecureImgPipe, name: "secure" }] });
2735
+ `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4$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: i5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "component", type: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i1$5.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "directive", type: i8$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i1$4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i8.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i9.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: CvaCounterInputComponent, selector: "cva-counter-input", inputs: ["label", "placeholder", "suffixText", "hint", "value", "disabled", "required", "errorMessages", "min", "max", "error", "isDecimal", "isLabelOutside", "isFloatLabel", "percentOfLabelOutside", "alignNumber", "isFormControl"], outputs: ["onChange", "onEnter"] }, { kind: "directive", type: StylePaginatorDirective, selector: "[style-paginator]", inputs: ["showTotalPages", "paging"], outputs: ["pagingChangeEvent"] }, { kind: "component", type: CvaHeaderExpandButtonComponent, selector: "cva-header-expand-button", inputs: ["expandHeaderButton", "columns", "moduleName"], outputs: ["onChange"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: SecureImgPipe, name: "secure" }] });
2730
2736
  }
2731
2737
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CvaTableComponent, decorators: [{
2732
2738
  type: Component,
@@ -2909,6 +2915,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
2909
2915
  <mat-label>{{ 'common.gotopage' | translate }}</mat-label>
2910
2916
  <cva-counter-input [(ngModel)]="goToPageNumber"
2911
2917
  (ngModelChange)="onChangeGoToPageNumber($event)"
2918
+ (onEnter)="goToPage()"
2912
2919
  [max]="getTotalPage() ? getTotalPage() : 1"
2913
2920
  [min]="1"
2914
2921
  [isFloatLabel]="false"
@@ -4913,7 +4920,7 @@ class CvaSmartTableComponent {
4913
4920
  </ng-container>
4914
4921
  </table>
4915
4922
  </div>
4916
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4$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: i5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i5.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i5.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i5.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i1$4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i9.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: CvaInputComponent, selector: "cva-input", inputs: ["label", "name", "placeholder", "hint", "required", "disabled", "text", "type", "pattern", "readonly", "errorMessages", "multiline", "isLabelOutside", "isFloatLabel", "minLength", "maxLength", "maxLengthDisplay", "percentOfLabelOutside", "suffixFontAwesomeClass", "patternFilter", "isFormControl", "formatFunc"], outputs: ["onChange"] }, { kind: "component", type: CvaCounterInputComponent, selector: "cva-counter-input", inputs: ["label", "placeholder", "suffixText", "hint", "value", "disabled", "required", "errorMessages", "min", "max", "error", "isDecimal", "isLabelOutside", "isFloatLabel", "percentOfLabelOutside", "alignNumber", "isFormControl"], outputs: ["onChange"] }, { kind: "component", type: CvaDatePickerComponent, selector: "cva-date-picker", inputs: ["label", "placeholder", "value", "disabled", "required", "minDate", "maxDate", "errorMessages", "isLabelOutside", "isFloatLabel", "percentOfLabelOutside", "isFormControl"], outputs: ["onChange"] }, { kind: "component", type: CvaMultiSelectAutocomplete, selector: "cva-multi-select-autocomplete", inputs: ["placeholder", "label", "hint", "value", "options", "disabled", "errorMessages", "multiple", "required", "isTree", "treeSymbol", "sizeOfItemsInListByPixels", "isLabelOutside", "isFloatLabel", "percentOfLabelOutside", "isFormControl"], outputs: ["selectionChange", "selectedOptionDataChange"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: SecureImgPipe, name: "secure" }] });
4923
+ `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i4$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: i5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i5.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i5.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i5.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i5.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i5.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i5.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i5.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i5.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "component", type: i8$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i1$4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i9.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: CvaInputComponent, selector: "cva-input", inputs: ["label", "name", "placeholder", "hint", "required", "disabled", "text", "type", "pattern", "readonly", "errorMessages", "multiline", "isLabelOutside", "isFloatLabel", "minLength", "maxLength", "maxLengthDisplay", "percentOfLabelOutside", "suffixFontAwesomeClass", "patternFilter", "isFormControl", "formatFunc"], outputs: ["onChange"] }, { kind: "component", type: CvaCounterInputComponent, selector: "cva-counter-input", inputs: ["label", "placeholder", "suffixText", "hint", "value", "disabled", "required", "errorMessages", "min", "max", "error", "isDecimal", "isLabelOutside", "isFloatLabel", "percentOfLabelOutside", "alignNumber", "isFormControl"], outputs: ["onChange", "onEnter"] }, { kind: "component", type: CvaDatePickerComponent, selector: "cva-date-picker", inputs: ["label", "placeholder", "value", "disabled", "required", "minDate", "maxDate", "errorMessages", "isLabelOutside", "isFloatLabel", "percentOfLabelOutside", "isFormControl"], outputs: ["onChange"] }, { kind: "component", type: CvaMultiSelectAutocomplete, selector: "cva-multi-select-autocomplete", inputs: ["placeholder", "label", "hint", "value", "options", "disabled", "errorMessages", "multiple", "required", "isTree", "treeSymbol", "sizeOfItemsInListByPixels", "isLabelOutside", "isFloatLabel", "percentOfLabelOutside", "isFormControl"], outputs: ["selectionChange", "selectedOptionDataChange"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }, { kind: "pipe", type: SecureImgPipe, name: "secure" }] });
4917
4924
  }
4918
4925
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CvaSmartTableComponent, decorators: [{
4919
4926
  type: Component,
@@ -7374,11 +7381,9 @@ class CvaFlatTreeComponent {
7374
7381
  isFormControl = true;
7375
7382
  // Cái này là để gắn khi nó là FormControl trong 1 FormGroup
7376
7383
  formControl;
7384
+ mapIndexes = new Map();
7377
7385
  chooseVirtualScroll;
7378
7386
  selectedVirtualScroll;
7379
- get NsValiator() {
7380
- return ValidatorService;
7381
- }
7382
7387
  constructor(translateService, injector, cdr, ngControl) {
7383
7388
  this.translateService = translateService;
7384
7389
  this.injector = injector;
@@ -7399,6 +7404,9 @@ class CvaFlatTreeComponent {
7399
7404
  this.selectedDataSource = new MatTreeFlatDataSource(this.selectedTreeControl, this.selectedTreeFlattener);
7400
7405
  this.setSelectedNode();
7401
7406
  }
7407
+ get NsValiator() {
7408
+ return ValidatorService;
7409
+ }
7402
7410
  setSelectedNode() {
7403
7411
  this.selectedDataSource.data = this.selectedFullDataSource;
7404
7412
  if (this.selectedVirtualScroll) {
@@ -7530,9 +7538,6 @@ class CvaFlatTreeComponent {
7530
7538
  node.checked = !!node.checked;
7531
7539
  return node;
7532
7540
  };
7533
- _getLevel = (node) => node.level;
7534
- _isExpandable = (node) => FlatTreeService.hasChild(node);
7535
- _getChildren = (node) => of(node.children ? node.children : []);
7536
7541
  propagateChange = (_) => {
7537
7542
  /*NON-EMPTY FOR COMPILE*/
7538
7543
  };
@@ -7550,14 +7555,24 @@ class CvaFlatTreeComponent {
7550
7555
  // if (this.multiple) {
7551
7556
  this.value = obj;
7552
7557
  // }
7558
+ console.log('writeValue_0: ', new Date());
7559
+ this.mapIndexes = new Map();
7560
+ for (let i = 0; i < this.fullDataTreeControl.dataNodes.length; i++) {
7561
+ this.mapIndexes.set(this.fullDataTreeControl.dataNodes[i].value, i);
7562
+ }
7563
+ console.log('writeValue_1: ', new Date());
7553
7564
  this.checkedDefaultValue();
7565
+ console.log('writeValue_2: ', new Date());
7554
7566
  this.updateSelectAll();
7567
+ console.log('writeValue_3: ', new Date());
7555
7568
  this.updateSelectedTree();
7569
+ console.log('writeValue_4: ', new Date());
7556
7570
  this.propagateChange(this.value);
7557
7571
  this.callValidator();
7558
7572
  if (this.isView) {
7559
7573
  this.selectedTreeControl.expandAll();
7560
7574
  }
7575
+ console.log('writeValue_5: ', new Date());
7561
7576
  this.selectionChange.emit(Array.from(this.valueObjRef.values()));
7562
7577
  }
7563
7578
  }
@@ -7568,42 +7583,22 @@ class CvaFlatTreeComponent {
7568
7583
  this.expandTreeDataSource(this.selectedTreeControl, 'isExpanded');
7569
7584
  }
7570
7585
  checkedDefaultValue() {
7571
- let allChildNode;
7572
- for (const rootNode of this.fullDataDataSource.data) {
7573
- if (!FlatTreeService.hasChild(rootNode)) {
7574
- if (this.value.includes(rootNode.value)) {
7575
- rootNode.checked = true;
7576
- if (!this.valueObjRef.has(rootNode.value)) {
7577
- this.valueObjRef.set(rootNode.value, rootNode);
7578
- }
7579
- this.selectedTreeChange(rootNode);
7580
- }
7581
- else {
7582
- rootNode.checked = false;
7583
- if (this.valueObjRef.has(rootNode.value)) {
7584
- this.valueObjRef.delete(rootNode.value);
7585
- }
7586
- this.selectedTreeChange(rootNode);
7587
- }
7588
- continue;
7586
+ this.valueObjRef.clear();
7587
+ const valueSet = new Set(this.value);
7588
+ for (const node of this.fullDataTreeControl.dataNodes) {
7589
+ const isLeaf = !FlatTreeService.hasChild(node);
7590
+ node.checked = isLeaf && valueSet.has(node.value);
7591
+ if (isLeaf && node.checked) {
7592
+ this.valueObjRef.set(node.value, node);
7593
+ }
7594
+ const orgNodeIndex = this.mapIndexes.get(node.value);
7595
+ if (orgNodeIndex !== undefined) {
7596
+ this.fullDataTreeControl.dataNodes[orgNodeIndex].checked = node.checked;
7589
7597
  }
7590
- allChildNode = this.getAllChildNode(this.fullDataTreeControl, rootNode);
7591
- allChildNode.forEach(childNode => {
7592
- if (!FlatTreeService.hasChild(childNode)) {
7593
- childNode.checked = this.value.includes(childNode.value);
7594
- if (!this.valueObjRef.has(childNode.value) && childNode.checked) {
7595
- this.valueObjRef.set(childNode.value, childNode);
7596
- }
7597
- else if (this.valueObjRef.has(childNode.value) && !childNode.checked) {
7598
- this.valueObjRef.delete(childNode.value);
7599
- }
7600
- this.selectedTreeChange(childNode);
7601
- }
7602
- });
7603
7598
  }
7604
7599
  }
7605
7600
  getAllChildNode(treeControl, node) {
7606
- const index = treeControl.dataNodes.findIndex(n => node.value === n.value);
7601
+ const index = this.mapIndexes.get(node.value);
7607
7602
  let sameLevelNextIndex = -1;
7608
7603
  for (let i = index + 1; i < treeControl.dataNodes.length; i++) {
7609
7604
  if (node.level >= treeControl.dataNodes[i].level) {
@@ -7628,7 +7623,7 @@ class CvaFlatTreeComponent {
7628
7623
  node.checked = checked;
7629
7624
  let indexLeaf = -1;
7630
7625
  // update origin node
7631
- let orgNodeIndex = this.fullDataTreeControl.dataNodes.findIndex(n => n.value === node.value);
7626
+ let orgNodeIndex = this.mapIndexes.get(node.value);
7632
7627
  /*this.getNodeInFullDataSource(child)*/
7633
7628
  this.fullDataTreeControl.dataNodes[orgNodeIndex].checked = checked;
7634
7629
  if (orgNodeIndex > -1 && !checked) {
@@ -7655,7 +7650,7 @@ class CvaFlatTreeComponent {
7655
7650
  }
7656
7651
  }
7657
7652
  else {
7658
- orgNodeIndex = this.fullDataTreeControl.dataNodes.findIndex(n => n.value === child.value);
7653
+ orgNodeIndex = this.mapIndexes.get(child.value);
7659
7654
  if (orgNodeIndex > -1) {
7660
7655
  this.fullDataTreeControl.dataNodes[orgNodeIndex].isExpanded = false;
7661
7656
  this.fullDataTreeControl.dataNodes[orgNodeIndex].checked = this.fullDataTreeControl.dataNodes[orgNodeIndex].children?.every(n => n.checked);
@@ -7704,7 +7699,7 @@ class CvaFlatTreeComponent {
7704
7699
  if ((node.display && !this.checkDisabledNode(node)) || !!isSelectedChange) {
7705
7700
  node.checked = checked;
7706
7701
  // update origin node
7707
- const orgNodeIndex = this.fullDataTreeControl.dataNodes.findIndex(n => n.value === node.value);
7702
+ const orgNodeIndex = this.mapIndexes.get(node.value);
7708
7703
  this.fullDataTreeControl.dataNodes[orgNodeIndex].checked = checked;
7709
7704
  if (checked) {
7710
7705
  if (this.multiple) {
@@ -7880,6 +7875,53 @@ class CvaFlatTreeComponent {
7880
7875
  this.checkParentNode(true, node);
7881
7876
  }
7882
7877
  }
7878
+ toggleNodeCheck(node, checked) {
7879
+ const isLeaf = !FlatTreeService.hasChild(node);
7880
+ console.log('1: ', new Date());
7881
+ // Gọi 1 lần duy nhất nếu là parent
7882
+ const descendants = isLeaf ? [] : this.fullDataTreeControl.getDescendants(node);
7883
+ const affectedNodes = isLeaf ? [node] : descendants.filter(n => !FlatTreeService.hasChild(n));
7884
+ console.log('2: ', new Date());
7885
+ for (const leaf of affectedNodes) {
7886
+ if (!leaf.display || this.checkDisabledNode(leaf))
7887
+ continue;
7888
+ const index = this.value.indexOf(leaf.value);
7889
+ if (checked && index < 0) {
7890
+ this.value.push(leaf.value);
7891
+ this.valueObjRef.set(leaf.value, leaf);
7892
+ leaf.checked = true;
7893
+ }
7894
+ if (!checked && index >= 0) {
7895
+ this.value.splice(index, 1);
7896
+ this.valueObjRef.delete(leaf.value);
7897
+ leaf.checked = false;
7898
+ }
7899
+ const orgNodeIndex = this.mapIndexes.get(leaf.value);
7900
+ if (orgNodeIndex !== undefined) {
7901
+ this.fullDataTreeControl.dataNodes[orgNodeIndex].checked = leaf.checked;
7902
+ }
7903
+ }
7904
+ console.log('3: ', new Date());
7905
+ // Nếu node là cha → cập nhật isExpanded
7906
+ if (!isLeaf) {
7907
+ node.checked = checked;
7908
+ const orgNodeIndex = this.mapIndexes.get(node.value);
7909
+ if (orgNodeIndex !== undefined) {
7910
+ this.fullDataTreeControl.dataNodes[orgNodeIndex].checked = checked;
7911
+ this.fullDataTreeControl.dataNodes[orgNodeIndex].isExpanded = false;
7912
+ }
7913
+ }
7914
+ else {
7915
+ node.checked = checked;
7916
+ }
7917
+ console.log('4: ', new Date());
7918
+ this.writeValue(this.value);
7919
+ console.log('5: ', new Date());
7920
+ this.cdr.detectChanges();
7921
+ }
7922
+ _getLevel = (node) => node.level;
7923
+ _isExpandable = (node) => FlatTreeService.hasChild(node);
7924
+ _getChildren = (node) => of(node.children ? node.children : []);
7883
7925
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CvaFlatTreeComponent, deps: [{ token: i1.TranslateService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: i1$2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component });
7884
7926
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: CvaFlatTreeComponent, isStandalone: false, selector: "cva-flat-tree", inputs: { label: "label", required: "required", value: "value", multiple: "multiple", disabled: "disabled", isView: "isView", isDisplayChooseTreeOnly: "isDisplayChooseTreeOnly", isHideCheckbox: "isHideCheckbox", isCollapseSelected: "isCollapseSelected", selectedLabelTitle: "selectedLabelTitle", viewHeight: "viewHeight", itemSize: "itemSize", percentOfLabelOutside: "percentOfLabelOutside", treeConfig: "treeConfig", isSearchOutSide: "isSearchOutSide", searchTextOutSide: "searchTextOutSide", errorMessages: "errorMessages", fullDatasource: "fullDatasource", isFormControl: "isFormControl" }, outputs: { selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "chooseVirtualScroll", first: true, predicate: ["chooseAreaScrollViewport"], descendants: true }, { propertyName: "selectedVirtualScroll", first: true, predicate: ["selectedScrollViewport"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
7885
7927
  <div class="cva-flat-tree labelOutside"
@@ -7928,8 +7970,8 @@ class CvaFlatTreeComponent {
7928
7970
  (toggle)="toggleTreeControl(treeControl, node)"
7929
7971
  (onParentNodeClick)="onParentNodeClick(node)"
7930
7972
  (onLeafNodeClick)="onLeafNodeClick(node)"
7931
- (ngModelParentChange)="checkParentNode($event, node)"
7932
- (ngModelLeafChange)="checkLeafNode($event, node)">
7973
+ (ngModelParentChange)="toggleNodeCheck(node, $event)"
7974
+ (ngModelLeafChange)="toggleNodeCheck(node, $event)">
7933
7975
  </cva-flat-tree-node-left>
7934
7976
  </ng-container>
7935
7977
  </cdk-virtual-scroll-viewport>
@@ -8020,8 +8062,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
8020
8062
  (toggle)="toggleTreeControl(treeControl, node)"
8021
8063
  (onParentNodeClick)="onParentNodeClick(node)"
8022
8064
  (onLeafNodeClick)="onLeafNodeClick(node)"
8023
- (ngModelParentChange)="checkParentNode($event, node)"
8024
- (ngModelLeafChange)="checkLeafNode($event, node)">
8065
+ (ngModelParentChange)="toggleNodeCheck(node, $event)"
8066
+ (ngModelLeafChange)="toggleNodeCheck(node, $event)">
8025
8067
  </cva-flat-tree-node-left>
8026
8068
  </ng-container>
8027
8069
  </cdk-virtual-scroll-viewport>