@c10t/nice-component-library 0.0.16 → 0.0.17
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.
|
@@ -11,6 +11,8 @@ export declare class CvaFlatTreeNodeLeftComponent {
|
|
|
11
11
|
onLeafNodeClick: EventEmitter<void>;
|
|
12
12
|
ngModelParentChange: EventEmitter<boolean>;
|
|
13
13
|
ngModelLeafChange: EventEmitter<boolean>;
|
|
14
|
+
nodeClicked: FlatTreeNodeModel | undefined;
|
|
15
|
+
protected readonly menubar: BarProp;
|
|
14
16
|
hasChild: (node: FlatTreeNodeModel) => boolean;
|
|
15
17
|
checkDisabledNode(node: FlatTreeNodeModel): boolean;
|
|
16
18
|
getDisabledInputFunc(node: FlatTreeNodeModel): boolean;
|
|
@@ -18,5 +20,5 @@ export declare class CvaFlatTreeNodeLeftComponent {
|
|
|
18
20
|
descendantsPartiallySelected(node: FlatTreeNodeModel): boolean;
|
|
19
21
|
onDisabledParent(parent: FlatTreeNodeModel): boolean;
|
|
20
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<CvaFlatTreeNodeLeftComponent, never>;
|
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CvaFlatTreeNodeLeftComponent, "cva-flat-tree-node-left", never, { "treeControl": { "alias": "treeControl"; "required": false; }; "isHideCheckbox": { "alias": "isHideCheckbox"; "required": false; }; "node": { "alias": "node"; "required": false; }; }, { "toggle": "toggle"; "onParentNodeClick": "onParentNodeClick"; "onLeafNodeClick": "onLeafNodeClick"; "ngModelParentChange": "ngModelParentChange"; "ngModelLeafChange": "ngModelLeafChange"; }, never, never, false, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CvaFlatTreeNodeLeftComponent, "cva-flat-tree-node-left", never, { "treeControl": { "alias": "treeControl"; "required": false; }; "isHideCheckbox": { "alias": "isHideCheckbox"; "required": false; }; "node": { "alias": "node"; "required": false; }; "nodeClicked": { "alias": "nodeClicked"; "required": false; }; }, { "toggle": "toggle"; "onParentNodeClick": "onParentNodeClick"; "onLeafNodeClick": "onLeafNodeClick"; "ngModelParentChange": "ngModelParentChange"; "ngModelLeafChange": "ngModelLeafChange"; }, never, never, false, never>;
|
|
22
24
|
}
|
|
@@ -48,6 +48,8 @@ export declare class CvaFlatTreeComponent implements ControlValueAccessor, OnIni
|
|
|
48
48
|
selectedFullDataSource: FlatTreeNodeModel[];
|
|
49
49
|
selectedFullValues: Map<any, any>;
|
|
50
50
|
selectionChange: EventEmitter<any>;
|
|
51
|
+
onNodeClick: EventEmitter<FlatTreeNodeModel>;
|
|
52
|
+
nodeClicked: FlatTreeNodeModel | undefined;
|
|
51
53
|
isFormControl: boolean;
|
|
52
54
|
formControl: AbstractControl | undefined;
|
|
53
55
|
mapIndexes: Map<any, any>;
|
|
@@ -94,5 +96,5 @@ export declare class CvaFlatTreeComponent implements ControlValueAccessor, OnIni
|
|
|
94
96
|
private _isExpandable;
|
|
95
97
|
private _getChildren;
|
|
96
98
|
static ɵfac: i0.ɵɵFactoryDeclaration<CvaFlatTreeComponent, [null, null, null, { optional: true; self: true; }]>;
|
|
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>;
|
|
99
|
+
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"; "onNodeClick": "onNodeClick"; }, never, never, false, never>;
|
|
98
100
|
}
|
|
@@ -1422,7 +1422,6 @@ class MultiTranslateHttpLoader {
|
|
|
1422
1422
|
for (const index in responses) {
|
|
1423
1423
|
Object.assign(target, responses[index]);
|
|
1424
1424
|
}
|
|
1425
|
-
console.log(target, responses);
|
|
1426
1425
|
return target;
|
|
1427
1426
|
}));
|
|
1428
1427
|
}
|
|
@@ -1738,7 +1737,6 @@ class ValidatorService {
|
|
|
1738
1737
|
const validator = (control) => {
|
|
1739
1738
|
let errors = null;
|
|
1740
1739
|
if (control) {
|
|
1741
|
-
// console.log('NsSmartTable - validate', control);
|
|
1742
1740
|
const controlValueLength = control.value ? control.value.length : 0;
|
|
1743
1741
|
if (conditions.minRow > controlValueLength) {
|
|
1744
1742
|
return { minRow: { valid: false, min: conditions.minRow, actual: controlValueLength } };
|
|
@@ -1750,7 +1748,6 @@ class ValidatorService {
|
|
|
1750
1748
|
return null;
|
|
1751
1749
|
}
|
|
1752
1750
|
control.value.forEach((row) => {
|
|
1753
|
-
// console.log('NsSmartTable - validate - errors: ', errors);
|
|
1754
1751
|
if (errors || !conditions.columns) {
|
|
1755
1752
|
return;
|
|
1756
1753
|
}
|
|
@@ -1758,7 +1755,6 @@ class ValidatorService {
|
|
|
1758
1755
|
if (errors) {
|
|
1759
1756
|
return;
|
|
1760
1757
|
}
|
|
1761
|
-
// console.log('NsSmartTable - validate - value+columns: ', row, column);
|
|
1762
1758
|
const tempControl = new FormControl();
|
|
1763
1759
|
tempControl.setValue(row[column.columnDef]);
|
|
1764
1760
|
if (TableService.getColumnType(column, row) === ColumnTypeEnum.MULTI_SELECT_AUTOCOMPLETE) {
|
|
@@ -1821,7 +1817,6 @@ class ValidatorService {
|
|
|
1821
1817
|
}
|
|
1822
1818
|
}
|
|
1823
1819
|
tempControl.markAllAsTouched();
|
|
1824
|
-
// console.log('NsSmartTable - validate - tempControl.errors: ', TableService.getColumnType(column,row), row[column.columnDef], tempControl.errors);
|
|
1825
1820
|
errors = tempControl.errors;
|
|
1826
1821
|
});
|
|
1827
1822
|
});
|
|
@@ -1866,7 +1861,6 @@ class CvaCounterInputComponent {
|
|
|
1866
1861
|
constructor(injector, ngControl) {
|
|
1867
1862
|
this.injector = injector;
|
|
1868
1863
|
if (ngControl) {
|
|
1869
|
-
// console.log('nsCounterInput - ngControl: ', ngControl);
|
|
1870
1864
|
// ngControl là parent FormControl
|
|
1871
1865
|
// Hành động này thay cho provide: NG_VALUE_ACCESSOR và gắn ControlValueAccessor này vào parent FormControl
|
|
1872
1866
|
ngControl.valueAccessor = this;
|
|
@@ -1888,7 +1882,6 @@ class CvaCounterInputComponent {
|
|
|
1888
1882
|
}
|
|
1889
1883
|
}
|
|
1890
1884
|
ngOnInit() {
|
|
1891
|
-
// console.log('CvaCounterInputComponent - ngOnInit');
|
|
1892
1885
|
this.callValidator();
|
|
1893
1886
|
}
|
|
1894
1887
|
getMinNumber() {
|
|
@@ -1899,7 +1892,6 @@ class CvaCounterInputComponent {
|
|
|
1899
1892
|
}
|
|
1900
1893
|
callValidator() {
|
|
1901
1894
|
const ngControl = this.injector.get(NgControl);
|
|
1902
|
-
// console.log('CvaCounterInputComponent - callValidator - ngControl: ', ngControl);
|
|
1903
1895
|
// Nếu parent FormControl khởi tạo xong và formControl chưa có giá trị lưu
|
|
1904
1896
|
if (ngControl && !this.formControl) {
|
|
1905
1897
|
// Nếu là NsSmartTable thì phải tự new FormControl còn không thì cứ hóng parent FormControl về ^^
|
|
@@ -1909,7 +1901,6 @@ class CvaCounterInputComponent {
|
|
|
1909
1901
|
else {
|
|
1910
1902
|
this.formControl = new FormControl();
|
|
1911
1903
|
}
|
|
1912
|
-
// console.log('CvaCounterInputComponent - callValidator - this.formControl: ', this.formControl);
|
|
1913
1904
|
// Hành động này gắn validator vào this.formControl
|
|
1914
1905
|
// - Nếu this.formControl là parent FormControl thì sẽ show error lên FormGroup
|
|
1915
1906
|
// - Nếu this.formControl là new FormControl thì sẽ quét QueryList để check {errors}
|
|
@@ -1949,7 +1940,6 @@ class CvaCounterInputComponent {
|
|
|
1949
1940
|
if (value !== undefined) {
|
|
1950
1941
|
this.value = value;
|
|
1951
1942
|
this.propagateChange(this.value);
|
|
1952
|
-
// console.log('CvaCounterInputComponent - writeValue: ', this.value);
|
|
1953
1943
|
this.callValidator();
|
|
1954
1944
|
this.onChange.emit(this.value);
|
|
1955
1945
|
}
|
|
@@ -3016,7 +3006,6 @@ class PatternDirective {
|
|
|
3016
3006
|
}
|
|
3017
3007
|
// @Output() valueChange = new EventEmitter()
|
|
3018
3008
|
// @HostListener('input', ['$event']) onInputChange(event: any) {
|
|
3019
|
-
// console.log('input changeeeeeeeeeeeeeeeeeeeeeee')
|
|
3020
3009
|
// const initalValue = this.el.nativeElement.value;
|
|
3021
3010
|
// const newValue = initalValue.replace(/[^0-9]*/g, '');
|
|
3022
3011
|
// this.el.nativeElement.value = newValue;
|
|
@@ -3044,7 +3033,6 @@ class PatternDirective {
|
|
|
3044
3033
|
// (e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) &&
|
|
3045
3034
|
// (e.keyCode < 96 || e.keyCode > 105)
|
|
3046
3035
|
// ) {
|
|
3047
|
-
// console.log('eeeeeeeeeeeeeeeeeeeee',e)
|
|
3048
3036
|
// e.preventDefault();
|
|
3049
3037
|
// }
|
|
3050
3038
|
if (!e.key.match(this.$regPattern)) {
|
|
@@ -3054,7 +3042,6 @@ class PatternDirective {
|
|
|
3054
3042
|
const current = this.el.nativeElement.value;
|
|
3055
3043
|
// @ts-ignore
|
|
3056
3044
|
const next = current ? current.concat(e.key) : e.key;
|
|
3057
|
-
// console.log('curentttttttttt', current, next, this.el.nativeElement)
|
|
3058
3045
|
// @ts-ignore
|
|
3059
3046
|
if (!next || !next.replaceAll(',', '').match(this.$regPattern)) {
|
|
3060
3047
|
e.preventDefault();
|
|
@@ -3074,7 +3061,6 @@ class PatternDirective {
|
|
|
3074
3061
|
else {
|
|
3075
3062
|
data = pastedInput;
|
|
3076
3063
|
}
|
|
3077
|
-
console.log('dataaaaa', data);
|
|
3078
3064
|
document.execCommand('insertText', false, data);
|
|
3079
3065
|
}
|
|
3080
3066
|
onDrop(event) {
|
|
@@ -3123,7 +3109,6 @@ class FormatInputDirective {
|
|
|
3123
3109
|
this.format(value);
|
|
3124
3110
|
}
|
|
3125
3111
|
input(value) {
|
|
3126
|
-
// console.log(value)
|
|
3127
3112
|
// If decimal separator is last character don't update
|
|
3128
3113
|
// because it will delete . || ,
|
|
3129
3114
|
/*
|
|
@@ -3138,7 +3123,6 @@ class FormatInputDirective {
|
|
|
3138
3123
|
// this.format(this._value);
|
|
3139
3124
|
}
|
|
3140
3125
|
focusout(value) {
|
|
3141
|
-
console.log(value);
|
|
3142
3126
|
// If decimal separator is last character don't update
|
|
3143
3127
|
// because it will delete . || ,
|
|
3144
3128
|
if (this.isLastCharacterDecimalSeparator(value)) {
|
|
@@ -3179,7 +3163,6 @@ class FormatInputDirective {
|
|
|
3179
3163
|
return isNaN(value[value.length - 1]);
|
|
3180
3164
|
}
|
|
3181
3165
|
format(value) {
|
|
3182
|
-
// console.log('at hereeeeeeeeeee', value, this._value)
|
|
3183
3166
|
if (value === null) {
|
|
3184
3167
|
this.element.nativeElement.value = '';
|
|
3185
3168
|
return;
|
|
@@ -3192,11 +3175,9 @@ class FormatInputDirective {
|
|
|
3192
3175
|
const tmp = this.inputDirective.formatValue(value);
|
|
3193
3176
|
value = tmp === null || tmp === undefined ? value : tmp;
|
|
3194
3177
|
}
|
|
3195
|
-
// console.log('at hereeeeeeeeeee', value, this._value)
|
|
3196
3178
|
this.element.nativeElement.value = value ? value : '';
|
|
3197
3179
|
}
|
|
3198
3180
|
unformatValue(value) {
|
|
3199
|
-
// console.log('at hereeeeeeeeeee1111', value, this._value)
|
|
3200
3181
|
if (this.inputDirective && this.inputDirective.unformatValue) {
|
|
3201
3182
|
value = this.inputDirective.unformatValue(value);
|
|
3202
3183
|
}
|
|
@@ -3688,7 +3669,6 @@ class CvaDatePickerComponent {
|
|
|
3688
3669
|
}
|
|
3689
3670
|
callValidator() {
|
|
3690
3671
|
const ngControl = this.injector.get(NgControl);
|
|
3691
|
-
// console.log('CvaCounterInputComponent - callValidator - ngControl: ', ngControl);
|
|
3692
3672
|
// Nếu parent FormControl khởi tạo xong và formControl chưa có giá trị lưu
|
|
3693
3673
|
if (ngControl && !this.formControl) {
|
|
3694
3674
|
// Nếu là NsSmartTable thì phải tự new FormControl còn không thì cứ hóng parent FormControl về ^^
|
|
@@ -3698,7 +3678,6 @@ class CvaDatePickerComponent {
|
|
|
3698
3678
|
else {
|
|
3699
3679
|
this.formControl = new FormControl();
|
|
3700
3680
|
}
|
|
3701
|
-
// console.log('CvaCounterInputComponent - callValidator - this.formControl: ', this.formControl);
|
|
3702
3681
|
// Hành động này gắn validator vào this.formControl
|
|
3703
3682
|
// - Nếu this.formControl là parent FormControl thì sẽ show error lên FormGroup
|
|
3704
3683
|
// - Nếu this.formControl là new FormControl thì sẽ quét QueryList để check {errors}
|
|
@@ -4023,10 +4002,8 @@ class CvaMultiSelectAutocomplete {
|
|
|
4023
4002
|
/*NON-EMPTY FOR COMPILE*/
|
|
4024
4003
|
};
|
|
4025
4004
|
writeValue(obj) {
|
|
4026
|
-
// console.log('CvaMultiSelectAutocomplete - writeValue: ', this.value, obj);
|
|
4027
4005
|
if (obj != null && obj != undefined && this.value !== obj) {
|
|
4028
4006
|
this.value = obj;
|
|
4029
|
-
// console.log('CvaMultiSelectAutocomplete - writeValue: ', this.value);
|
|
4030
4007
|
this.updateSelectAll();
|
|
4031
4008
|
// this.formControl.setValue(this.value);
|
|
4032
4009
|
this.propagateChange(this.value);
|
|
@@ -4144,7 +4121,6 @@ class CvaMultiSelectAutocomplete {
|
|
|
4144
4121
|
* Khi đó khi chọn lại thì những mat-option không còn trong khung nhìn sẽ bị lỗi tick chọn nên ko dùng hàm này nữa
|
|
4145
4122
|
*/
|
|
4146
4123
|
matSelectionChange(val) {
|
|
4147
|
-
// console.log('CvaMultiSelectAutocomplete - onSelectionChange: ', val.value);
|
|
4148
4124
|
// this.writeValue(val.value);
|
|
4149
4125
|
// this.emitSelectedData(val);
|
|
4150
4126
|
}
|
|
@@ -4817,7 +4793,6 @@ class CvaSmartTableComponent {
|
|
|
4817
4793
|
};
|
|
4818
4794
|
writeValue(obj) {
|
|
4819
4795
|
if (obj) {
|
|
4820
|
-
// console.log(obj);
|
|
4821
4796
|
this.value = obj;
|
|
4822
4797
|
if (this.isExpandRowTable && this.datasource.data !== this.value) {
|
|
4823
4798
|
this.datasource = new MatTableDataSource(this.value);
|
|
@@ -4834,7 +4809,6 @@ class CvaSmartTableComponent {
|
|
|
4834
4809
|
this.datasource = new MatTableDataSource(this.value);
|
|
4835
4810
|
}
|
|
4836
4811
|
this.toggleSelect(null);
|
|
4837
|
-
// console.log('NsSmartTable - writeValue', this.value);
|
|
4838
4812
|
this.callValidator();
|
|
4839
4813
|
this.propagateChange(this.isExpandRowTable ? this.getParentRowData() : this.value);
|
|
4840
4814
|
this.onChange.emit();
|
|
@@ -4855,7 +4829,6 @@ class CvaSmartTableComponent {
|
|
|
4855
4829
|
this.writeValue(this.value);
|
|
4856
4830
|
}
|
|
4857
4831
|
ngOnInit() {
|
|
4858
|
-
// console.log('NsSmartTable - ngOnInit');
|
|
4859
4832
|
this.callValidator();
|
|
4860
4833
|
}
|
|
4861
4834
|
ngAfterContentChecked() {
|
|
@@ -5638,7 +5611,6 @@ class CvaRangeDatePickerComponent {
|
|
|
5638
5611
|
}
|
|
5639
5612
|
callValidator() {
|
|
5640
5613
|
const ngControl = this.injector.get(NgControl);
|
|
5641
|
-
// console.log('CvaCounterInputComponent - callValidator - ngControl: ', ngControl);
|
|
5642
5614
|
// Nếu parent FormControl khởi tạo xong và formControl chưa có giá trị lưu
|
|
5643
5615
|
if (ngControl && !this.formControl) {
|
|
5644
5616
|
// Nếu là NsSmartTable thì phải tự new FormControl còn không thì cứ hóng parent FormControl về ^^
|
|
@@ -6257,7 +6229,6 @@ class CvaUploadFileComponent {
|
|
|
6257
6229
|
const blob = new Blob([arrayBuffer]);
|
|
6258
6230
|
// onload needed since Google Chrome doesn't support addEventListener for FileReader
|
|
6259
6231
|
const fileReader = new FileReader();
|
|
6260
|
-
// console.log('reader', file);
|
|
6261
6232
|
const file = new File([blob], fileInfo.name, { type: fileInfo.type });
|
|
6262
6233
|
fileReader.onload = (event) => {
|
|
6263
6234
|
this.writeValue(new UploadModel(fileInfo.name, file, event.target.result));
|
|
@@ -7417,6 +7388,8 @@ class CvaFlatTreeNodeLeftComponent {
|
|
|
7417
7388
|
onLeafNodeClick = new EventEmitter();
|
|
7418
7389
|
ngModelParentChange = new EventEmitter();
|
|
7419
7390
|
ngModelLeafChange = new EventEmitter();
|
|
7391
|
+
nodeClicked;
|
|
7392
|
+
menubar = menubar;
|
|
7420
7393
|
hasChild = (node) => !!node.children && Array.isArray(node.children) && node.children.length > 0;
|
|
7421
7394
|
checkDisabledNode(node) {
|
|
7422
7395
|
return node.disabled || this.getDisabledInputFunc(node);
|
|
@@ -7454,12 +7427,13 @@ class CvaFlatTreeNodeLeftComponent {
|
|
|
7454
7427
|
}
|
|
7455
7428
|
}
|
|
7456
7429
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CvaFlatTreeNodeLeftComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7457
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: CvaFlatTreeNodeLeftComponent, isStandalone: false, selector: "cva-flat-tree-node-left", inputs: { treeControl: "treeControl", isHideCheckbox: "isHideCheckbox", node: "node" }, outputs: { toggle: "toggle", onParentNodeClick: "onParentNodeClick", onLeafNodeClick: "onLeafNodeClick", ngModelParentChange: "ngModelParentChange", ngModelLeafChange: "ngModelLeafChange" }, ngImport: i0, template: `
|
|
7430
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.5", type: CvaFlatTreeNodeLeftComponent, isStandalone: false, selector: "cva-flat-tree-node-left", inputs: { treeControl: "treeControl", isHideCheckbox: "isHideCheckbox", node: "node", nodeClicked: "nodeClicked" }, outputs: { toggle: "toggle", onParentNodeClick: "onParentNodeClick", onLeafNodeClick: "onLeafNodeClick", ngModelParentChange: "ngModelParentChange", ngModelLeafChange: "ngModelLeafChange" }, ngImport: i0, template: `
|
|
7458
7431
|
<ng-container [ngSwitch]="hasChild(node)">
|
|
7459
7432
|
<ng-container *ngSwitchCase="false">
|
|
7460
|
-
<div
|
|
7461
|
-
|
|
7462
|
-
|
|
7433
|
+
<div
|
|
7434
|
+
class="label-area {{isHideCheckbox ? 'isClickDiv' : ''}} {{isHideCheckbox && nodeClicked?.value === node.value ? 'nodeSelected': ''}}"
|
|
7435
|
+
(click)="onLeafNodeClick.emit()"
|
|
7436
|
+
fxLayoutAlign="space-between center">
|
|
7463
7437
|
<button *ngIf="node.level > 0" type="button" mat-icon-button disabled></button>
|
|
7464
7438
|
{{ node.displayValue }}
|
|
7465
7439
|
</div>
|
|
@@ -7471,8 +7445,9 @@ class CvaFlatTreeNodeLeftComponent {
|
|
|
7471
7445
|
</mat-checkbox>
|
|
7472
7446
|
</ng-container>
|
|
7473
7447
|
<ng-container *ngSwitchCase="true">
|
|
7474
|
-
<div
|
|
7475
|
-
|
|
7448
|
+
<div
|
|
7449
|
+
class="label-area {{isHideCheckbox ? 'isClickDiv' : ''}} {{isHideCheckbox && nodeClicked?.value === node.value ? 'nodeSelected': ''}}"
|
|
7450
|
+
fxLayoutAlign="space-between center">
|
|
7476
7451
|
<button type="button" mat-icon-button (click)="toggle.emit()"
|
|
7477
7452
|
[attr.aria-label]="'toggle ' + node.displayValue">
|
|
7478
7453
|
<i class="fas {{treeControl?.isExpanded(node) ? 'fa-chevron-up' : 'fa-chevron-down'}}"></i>
|
|
@@ -7498,9 +7473,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
7498
7473
|
template: `
|
|
7499
7474
|
<ng-container [ngSwitch]="hasChild(node)">
|
|
7500
7475
|
<ng-container *ngSwitchCase="false">
|
|
7501
|
-
<div
|
|
7502
|
-
|
|
7503
|
-
|
|
7476
|
+
<div
|
|
7477
|
+
class="label-area {{isHideCheckbox ? 'isClickDiv' : ''}} {{isHideCheckbox && nodeClicked?.value === node.value ? 'nodeSelected': ''}}"
|
|
7478
|
+
(click)="onLeafNodeClick.emit()"
|
|
7479
|
+
fxLayoutAlign="space-between center">
|
|
7504
7480
|
<button *ngIf="node.level > 0" type="button" mat-icon-button disabled></button>
|
|
7505
7481
|
{{ node.displayValue }}
|
|
7506
7482
|
</div>
|
|
@@ -7512,8 +7488,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
7512
7488
|
</mat-checkbox>
|
|
7513
7489
|
</ng-container>
|
|
7514
7490
|
<ng-container *ngSwitchCase="true">
|
|
7515
|
-
<div
|
|
7516
|
-
|
|
7491
|
+
<div
|
|
7492
|
+
class="label-area {{isHideCheckbox ? 'isClickDiv' : ''}} {{isHideCheckbox && nodeClicked?.value === node.value ? 'nodeSelected': ''}}"
|
|
7493
|
+
fxLayoutAlign="space-between center">
|
|
7517
7494
|
<button type="button" mat-icon-button (click)="toggle.emit()"
|
|
7518
7495
|
[attr.aria-label]="'toggle ' + node.displayValue">
|
|
7519
7496
|
<i class="fas {{treeControl?.isExpanded(node) ? 'fa-chevron-up' : 'fa-chevron-down'}}"></i>
|
|
@@ -7547,6 +7524,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
7547
7524
|
type: Output
|
|
7548
7525
|
}], ngModelLeafChange: [{
|
|
7549
7526
|
type: Output
|
|
7527
|
+
}], nodeClicked: [{
|
|
7528
|
+
type: Input
|
|
7550
7529
|
}] } });
|
|
7551
7530
|
|
|
7552
7531
|
class CvaFlatTreeNodeRightComponent {
|
|
@@ -7711,6 +7690,8 @@ class CvaFlatTreeComponent {
|
|
|
7711
7690
|
selectedFullDataSource = [];
|
|
7712
7691
|
selectedFullValues = new Map();
|
|
7713
7692
|
selectionChange = new EventEmitter();
|
|
7693
|
+
onNodeClick = new EventEmitter();
|
|
7694
|
+
nodeClicked;
|
|
7714
7695
|
// Chỉ bằng false khi trong NsSmartTable thôi nhé @@
|
|
7715
7696
|
isFormControl = true;
|
|
7716
7697
|
// Cái này là để gắn khi nó là FormControl trong 1 FormGroup
|
|
@@ -7889,24 +7870,17 @@ class CvaFlatTreeComponent {
|
|
|
7889
7870
|
// if (this.multiple) {
|
|
7890
7871
|
this.value = obj;
|
|
7891
7872
|
// }
|
|
7892
|
-
console.log('writeValue_0: ', new Date());
|
|
7893
7873
|
this.mapIndexes = new Map();
|
|
7894
7874
|
for (let i = 0; i < this.fullDataTreeControl.dataNodes.length; i++) {
|
|
7895
7875
|
this.mapIndexes.set(this.fullDataTreeControl.dataNodes[i].value, i);
|
|
7896
7876
|
}
|
|
7897
|
-
console.log('writeValue_1: ', new Date());
|
|
7898
7877
|
this.checkedDefaultValue();
|
|
7899
|
-
console.log('writeValue_2: ', new Date());
|
|
7900
7878
|
this.updateSelectAll();
|
|
7901
|
-
console.log('writeValue_3: ', new Date());
|
|
7902
7879
|
this.updateSelectedTree();
|
|
7903
|
-
console.log('writeValue_4: ', new Date());
|
|
7904
|
-
this.propagateChange(this.value);
|
|
7905
7880
|
this.callValidator();
|
|
7906
7881
|
if (this.isView) {
|
|
7907
7882
|
this.selectedTreeControl.expandAll();
|
|
7908
7883
|
}
|
|
7909
|
-
console.log('writeValue_5: ', new Date());
|
|
7910
7884
|
this.selectionChange.emit(Array.from(this.valueObjRef.values()));
|
|
7911
7885
|
}
|
|
7912
7886
|
}
|
|
@@ -8196,6 +8170,8 @@ class CvaFlatTreeComponent {
|
|
|
8196
8170
|
});
|
|
8197
8171
|
}
|
|
8198
8172
|
onLeafNodeClick(node) {
|
|
8173
|
+
this.nodeClicked = node;
|
|
8174
|
+
this.onNodeClick.emit(node);
|
|
8199
8175
|
if (this.isHideCheckbox) {
|
|
8200
8176
|
this.value = [];
|
|
8201
8177
|
this.valueObjRef.clear();
|
|
@@ -8203,6 +8179,8 @@ class CvaFlatTreeComponent {
|
|
|
8203
8179
|
}
|
|
8204
8180
|
}
|
|
8205
8181
|
onParentNodeClick(node) {
|
|
8182
|
+
this.nodeClicked = node;
|
|
8183
|
+
this.onNodeClick.emit(node);
|
|
8206
8184
|
if (this.isHideCheckbox) {
|
|
8207
8185
|
this.value = [];
|
|
8208
8186
|
this.valueObjRef.clear();
|
|
@@ -8211,11 +8189,9 @@ class CvaFlatTreeComponent {
|
|
|
8211
8189
|
}
|
|
8212
8190
|
toggleNodeCheck(node, checked) {
|
|
8213
8191
|
const isLeaf = !FlatTreeService.hasChild(node);
|
|
8214
|
-
console.log('1: ', new Date());
|
|
8215
8192
|
// Gọi 1 lần duy nhất nếu là parent
|
|
8216
8193
|
const descendants = isLeaf ? [] : this.fullDataTreeControl.getDescendants(node);
|
|
8217
8194
|
const affectedNodes = isLeaf ? [node] : descendants.filter(n => !FlatTreeService.hasChild(n));
|
|
8218
|
-
console.log('2: ', new Date());
|
|
8219
8195
|
for (const leaf of affectedNodes) {
|
|
8220
8196
|
if (!leaf.display || this.checkDisabledNode(leaf))
|
|
8221
8197
|
continue;
|
|
@@ -8235,7 +8211,6 @@ class CvaFlatTreeComponent {
|
|
|
8235
8211
|
this.fullDataTreeControl.dataNodes[orgNodeIndex].checked = leaf.checked;
|
|
8236
8212
|
}
|
|
8237
8213
|
}
|
|
8238
|
-
console.log('3: ', new Date());
|
|
8239
8214
|
// Nếu node là cha → cập nhật isExpanded
|
|
8240
8215
|
if (!isLeaf) {
|
|
8241
8216
|
node.checked = checked;
|
|
@@ -8248,16 +8223,14 @@ class CvaFlatTreeComponent {
|
|
|
8248
8223
|
else {
|
|
8249
8224
|
node.checked = checked;
|
|
8250
8225
|
}
|
|
8251
|
-
console.log('4: ', new Date());
|
|
8252
8226
|
this.writeValue(this.value);
|
|
8253
|
-
console.log('5: ', new Date());
|
|
8254
8227
|
this.cdr.detectChanges();
|
|
8255
8228
|
}
|
|
8256
8229
|
_getLevel = (node) => node.level;
|
|
8257
8230
|
_isExpandable = (node) => FlatTreeService.hasChild(node);
|
|
8258
8231
|
_getChildren = (node) => of(node.children ? node.children : []);
|
|
8259
8232
|
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 });
|
|
8260
|
-
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: `
|
|
8233
|
+
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", onNodeClick: "onNodeClick" }, viewQueries: [{ propertyName: "chooseVirtualScroll", first: true, predicate: ["chooseAreaScrollViewport"], descendants: true }, { propertyName: "selectedVirtualScroll", first: true, predicate: ["selectedScrollViewport"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
8261
8234
|
<div class="cva-flat-tree labelOutside"
|
|
8262
8235
|
fxLayout="row" fxLayout.lt-sm="row wrap">
|
|
8263
8236
|
<mat-label *ngIf="label && !isSearchOutSide" class="label_width"
|
|
@@ -8300,6 +8273,7 @@ class CvaFlatTreeComponent {
|
|
|
8300
8273
|
[attr.aria-level]="node.level"
|
|
8301
8274
|
[treeControl]="treeControl"
|
|
8302
8275
|
[isHideCheckbox]="isHideCheckbox"
|
|
8276
|
+
[nodeClicked]="nodeClicked"
|
|
8303
8277
|
[node]="node"
|
|
8304
8278
|
(toggle)="toggleTreeControl(treeControl, node)"
|
|
8305
8279
|
(onParentNodeClick)="onParentNodeClick(node)"
|
|
@@ -8342,7 +8316,7 @@ class CvaFlatTreeComponent {
|
|
|
8342
8316
|
</mat-hint>
|
|
8343
8317
|
</div>
|
|
8344
8318
|
</div>
|
|
8345
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$2.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$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: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.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: "component", type: i6$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i10.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i10.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i10.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { 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.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i9.DefaultStyleDirective, selector: " [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]", inputs: ["ngStyle", "ngStyle.xs", "ngStyle.sm", "ngStyle.md", "ngStyle.lg", "ngStyle.xl", "ngStyle.lt-sm", "ngStyle.lt-md", "ngStyle.lt-lg", "ngStyle.lt-xl", "ngStyle.gt-xs", "ngStyle.gt-sm", "ngStyle.gt-md", "ngStyle.gt-lg"] }, { kind: "component", type: CvaFlatTreeNodeLeftComponent, selector: "cva-flat-tree-node-left", inputs: ["treeControl", "isHideCheckbox", "node"], outputs: ["toggle", "onParentNodeClick", "onLeafNodeClick", "ngModelParentChange", "ngModelLeafChange"] }, { kind: "component", type: CvaFlatTreeNodeRightComponent, selector: "cva-flat-tree-node-right", inputs: ["treeControl", "node", "isView"], outputs: ["toggle", "deSelectLeafNode", "deSelectParentNode"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
8319
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$2.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$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: i6.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6.MatLabel, selector: "mat-label" }, { kind: "directive", type: i6.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.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: "component", type: i6$2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i10.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i10.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i10.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { 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.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i9.DefaultStyleDirective, selector: " [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]", inputs: ["ngStyle", "ngStyle.xs", "ngStyle.sm", "ngStyle.md", "ngStyle.lg", "ngStyle.xl", "ngStyle.lt-sm", "ngStyle.lt-md", "ngStyle.lt-lg", "ngStyle.lt-xl", "ngStyle.gt-xs", "ngStyle.gt-sm", "ngStyle.gt-md", "ngStyle.gt-lg"] }, { kind: "component", type: CvaFlatTreeNodeLeftComponent, selector: "cva-flat-tree-node-left", inputs: ["treeControl", "isHideCheckbox", "node", "nodeClicked"], outputs: ["toggle", "onParentNodeClick", "onLeafNodeClick", "ngModelParentChange", "ngModelLeafChange"] }, { kind: "component", type: CvaFlatTreeNodeRightComponent, selector: "cva-flat-tree-node-right", inputs: ["treeControl", "node", "isView"], outputs: ["toggle", "deSelectLeafNode", "deSelectParentNode"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
8346
8320
|
}
|
|
8347
8321
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: CvaFlatTreeComponent, decorators: [{
|
|
8348
8322
|
type: Component,
|
|
@@ -8392,6 +8366,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
8392
8366
|
[attr.aria-level]="node.level"
|
|
8393
8367
|
[treeControl]="treeControl"
|
|
8394
8368
|
[isHideCheckbox]="isHideCheckbox"
|
|
8369
|
+
[nodeClicked]="nodeClicked"
|
|
8395
8370
|
[node]="node"
|
|
8396
8371
|
(toggle)="toggleTreeControl(treeControl, node)"
|
|
8397
8372
|
(onParentNodeClick)="onParentNodeClick(node)"
|
|
@@ -8478,6 +8453,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImpor
|
|
|
8478
8453
|
type: Input
|
|
8479
8454
|
}], selectionChange: [{
|
|
8480
8455
|
type: Output
|
|
8456
|
+
}], onNodeClick: [{
|
|
8457
|
+
type: Output
|
|
8481
8458
|
}], isFormControl: [{
|
|
8482
8459
|
type: Input
|
|
8483
8460
|
}], chooseVirtualScroll: [{
|
|
@@ -8990,15 +8967,11 @@ class JsogHttpInterceptor {
|
|
|
8990
8967
|
request = request.clone({ body: this.jSog.serialize(request.body) });
|
|
8991
8968
|
}
|
|
8992
8969
|
return next.handle(request).pipe(map((event) => {
|
|
8993
|
-
// console.log(Object.getPrototypeOf(event));
|
|
8994
8970
|
if (!(event instanceof HttpResponse || HttpResponseBase.prototype.isPrototypeOf(event))) {
|
|
8995
|
-
// console.log('event instanceof HttpResponse', event instanceof HttpResponse, HttpResponseBase.prototype.isPrototypeOf(event), event);
|
|
8996
8971
|
return event;
|
|
8997
8972
|
}
|
|
8998
8973
|
let response = event;
|
|
8999
8974
|
if (!response.body || typeof (response.body) !== 'object' || (response.body instanceof Blob)) {
|
|
9000
|
-
// console.log('typeof(event.body !== \'object\')', typeof(response.body) !== 'object',
|
|
9001
|
-
// 'event.body instanceof Blob', response.body instanceof Blob, response.body);
|
|
9002
8975
|
return response;
|
|
9003
8976
|
}
|
|
9004
8977
|
response = response.clone({ body: this.jSog.deserializeArray(response.body, BaseModel) });
|
|
@@ -9029,7 +9002,6 @@ class LoaderInterceptor {
|
|
|
9029
9002
|
intercept(request, next) {
|
|
9030
9003
|
if (!request.headers.get('is_image') && !request.headers.get('is_live_searching')) {
|
|
9031
9004
|
this.requests.push(request);
|
|
9032
|
-
// console.log('LoaderInterceptor: wait for ' + this.requests.length + 'requests');
|
|
9033
9005
|
this.loaderService.isLoading.next(true);
|
|
9034
9006
|
}
|
|
9035
9007
|
else {
|
|
@@ -9038,7 +9010,6 @@ class LoaderInterceptor {
|
|
|
9038
9010
|
});
|
|
9039
9011
|
}
|
|
9040
9012
|
return next.handle(request).pipe(map((event) => {
|
|
9041
|
-
// console.log(event, (event instanceof HttpResponse));
|
|
9042
9013
|
if (event instanceof HttpResponse) {
|
|
9043
9014
|
this.removeRequest(request);
|
|
9044
9015
|
}
|
|
@@ -9048,7 +9019,6 @@ class LoaderInterceptor {
|
|
|
9048
9019
|
this.removeRequest(request);
|
|
9049
9020
|
return throwError(err);
|
|
9050
9021
|
}), finalize(() => {
|
|
9051
|
-
// console.log('OMG!!!');
|
|
9052
9022
|
this.removeRequest(request);
|
|
9053
9023
|
}));
|
|
9054
9024
|
}
|