@dev-tcloud/tcloud-ui 0.0.39 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.component.mjs +18 -12
- package/esm2020/lib/_modules/tcloud-ui-filters/tcloud-ui-filters.component.mjs +21 -9
- package/fesm2015/dev-tcloud-tcloud-ui.mjs +37 -20
- package/fesm2015/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/fesm2020/dev-tcloud-tcloud-ui.mjs +37 -19
- package/fesm2020/dev-tcloud-tcloud-ui.mjs.map +1 -1
- package/lib/_modules/tcloud-ui-data-list/tcloud-ui-data-list.component.d.ts +2 -0
- package/lib/_modules/tcloud-ui-filters/tcloud-ui-filters.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1166,8 +1166,8 @@ class TCloudUiDataListComponent {
|
|
|
1166
1166
|
this.onChangeCallback = noop$2;
|
|
1167
1167
|
}
|
|
1168
1168
|
set disabled(v) {
|
|
1169
|
-
|
|
1170
|
-
|
|
1169
|
+
if (v) {
|
|
1170
|
+
this._disabled = v;
|
|
1171
1171
|
this.selected_description = '';
|
|
1172
1172
|
this.selected_item = '';
|
|
1173
1173
|
this.toChange();
|
|
@@ -1175,8 +1175,8 @@ class TCloudUiDataListComponent {
|
|
|
1175
1175
|
}
|
|
1176
1176
|
get disabled() { return this._disabled; }
|
|
1177
1177
|
set loading(v) {
|
|
1178
|
-
|
|
1179
|
-
|
|
1178
|
+
if (v) {
|
|
1179
|
+
this._loading = v;
|
|
1180
1180
|
this.selected_description = '';
|
|
1181
1181
|
this.selected_item = '';
|
|
1182
1182
|
this.toChange();
|
|
@@ -1209,16 +1209,22 @@ class TCloudUiDataListComponent {
|
|
|
1209
1209
|
this.toClick();
|
|
1210
1210
|
}
|
|
1211
1211
|
ngAfterViewChecked() {
|
|
1212
|
+
this.t_fc = undefined;
|
|
1213
|
+
this.t_fc = this.get_selected_description();
|
|
1214
|
+
}
|
|
1215
|
+
get_selected_description() {
|
|
1212
1216
|
if (this.list_selected_options && (this.list_selected_options).length > 0) {
|
|
1213
1217
|
for (let i = 0; i < (this.list_selected_options).length; i++) {
|
|
1214
1218
|
const item = this.list_selected_options[i];
|
|
1215
1219
|
if (item.value === this.selected_item) {
|
|
1216
|
-
|
|
1217
|
-
if (
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
+
if (this.selected_description !== item.description) {
|
|
1221
|
+
if (item.description && item.description !== this.selected_description) {
|
|
1222
|
+
setTimeout(() => {
|
|
1223
|
+
this.selected_description = item.description;
|
|
1224
|
+
this.dataListService.setActiveItem(this.selected_item);
|
|
1225
|
+
});
|
|
1220
1226
|
}
|
|
1221
|
-
}
|
|
1227
|
+
}
|
|
1222
1228
|
break;
|
|
1223
1229
|
}
|
|
1224
1230
|
}
|
|
@@ -1372,13 +1378,13 @@ TCloudUiDataListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0"
|
|
|
1372
1378
|
TCloudUiDataListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiDataListComponent, selector: "tcloud-ui-data-list", inputs: { placeholder: "placeholder", disabled: "disabled", loading: "loading", search: "search", ngModel: "ngModel" }, outputs: { onInputChange: "onInputChange", onChange: "onChange", ngModelChange: "ngModelChange" }, providers: [
|
|
1373
1379
|
DataListService,
|
|
1374
1380
|
CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2
|
|
1375
|
-
], ngImport: i0, template: "<div *ngIf=\"formulario\" id=\"area-{{ id }}\" class=\"tc-dropdown\" [class.disabled]=\"disabled || loading\">\r\n <div *ngIf=\"loading\" class=\"loading-area\">\r\n <i class=\"fas fa-spinner fa-spin\"></i>\r\n </div>\r\n <!-- [attr.data-bs-toggle]=\"'dropdown'\" -->\r\n <button \r\n [class.loading-box]=\"loading\"\r\n [disabled]=\"disabled || loading\"\r\n class=\"dropdown-toggle button-select no-margin-bottom\" \r\n type=\"button\" \r\n id=\"{{ id }}\" \r\n \r\n [attr.aria-haspopup]=\"'true'\" \r\n [attr.aria-expanded]=\"'false'\" \r\n (click)=\"toOpen()\" >\r\n\r\n <i *ngIf=\"(selected_description === undefined || selected_description === null || selected_description === '' ) && !loading \">{{ placeholder }}</i>\r\n {{ selected_description }}\r\n <span><i class=\"fas fa-angle-down\"></i></span>\r\n </button>\r\n <div class=\"tc-dropdown-menu {{ menu_on_top }}\" id=\"box-{{ id }}\" [attr.aria-labelledby]=\"id\" [class.to-hide]=\"!menu_show\" [style]=\"box_style\">\r\n\r\n <div class=\"line-search\" *ngIf=\"search\">\r\n <table class=\"box-search\">\r\n <tr>\r\n\r\n <td class=\"area-input\">\r\n <input type=\"text\" class=\"tc-form-control\" [(ngModel)]=\"search_text\" (input)=\"toSearch($event)\" placeholder=\"Buscar...\" > \r\n </td>\r\n\r\n <td class=\"area-icon\">\r\n <i *ngIf=\"search_text === ''\" class=\"fas fa-search icon-search\"></i>\r\n <button type=\"button\" *ngIf=\"search_text !== ''\" (click)=\"clearTextSearch()\"><i class=\"fas fa-times\"></i></button>\r\n </td>\r\n \r\n </tr>\r\n </table>\r\n </div>\r\n \r\n <div class=\"area-options\" id=\"{{ id }}-options\" (click)=\"toClose()\">\r\n <ng-content></ng-content> \r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div *ngIf=\"formulario\">\r\n <form [formGroup]=\"formulario\" style=\"display: none;\" >\r\n <input id=\"{{ id }}-hidden\" formControlName=\"selected_item\" type=\"hidden\">\r\n </form>\r\n</div
|
|
1381
|
+
], ngImport: i0, template: "<div *ngIf=\"formulario\" id=\"area-{{ id }}\" class=\"tc-dropdown\" [class.disabled]=\"disabled || loading\">\r\n <div *ngIf=\"loading\" class=\"loading-area\">\r\n <i class=\"fas fa-spinner fa-spin\"></i>\r\n </div>\r\n <!-- [attr.data-bs-toggle]=\"'dropdown'\" -->\r\n <button \r\n [class.loading-box]=\"loading\"\r\n [disabled]=\"disabled || loading\"\r\n class=\"dropdown-toggle button-select no-margin-bottom\" \r\n type=\"button\" \r\n id=\"{{ id }}\" \r\n \r\n [attr.aria-haspopup]=\"'true'\" \r\n [attr.aria-expanded]=\"'false'\" \r\n (click)=\"toOpen()\" >\r\n\r\n <i *ngIf=\"(selected_description === undefined || selected_description === null || selected_description === '' ) && !loading \">{{ placeholder }}</i>\r\n {{ selected_description }}\r\n <span><i class=\"fas fa-angle-down\"></i></span>\r\n </button>\r\n <div class=\"tc-dropdown-menu {{ menu_on_top }}\" id=\"box-{{ id }}\" [attr.aria-labelledby]=\"id\" [class.to-hide]=\"!menu_show\" [style]=\"box_style\">\r\n\r\n <div class=\"line-search\" *ngIf=\"search\">\r\n <table class=\"box-search\">\r\n <tr>\r\n\r\n <td class=\"area-input\">\r\n <input type=\"text\" class=\"tc-form-control\" [(ngModel)]=\"search_text\" (input)=\"toSearch($event)\" placeholder=\"Buscar...\" > \r\n </td>\r\n\r\n <td class=\"area-icon\">\r\n <i *ngIf=\"search_text === ''\" class=\"fas fa-search icon-search\"></i>\r\n <button type=\"button\" *ngIf=\"search_text !== ''\" (click)=\"clearTextSearch()\"><i class=\"fas fa-times\"></i></button>\r\n </td>\r\n \r\n </tr>\r\n </table>\r\n </div>\r\n \r\n <div class=\"area-options\" id=\"{{ id }}-options\" (click)=\"toClose()\">\r\n <ng-content></ng-content> \r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div *ngIf=\"formulario\">\r\n <form [formGroup]=\"formulario\" style=\"display: none;\" >\r\n <input id=\"{{ id }}-hidden\" formControlName=\"selected_item\" type=\"hidden\">\r\n </form>\r\n</div>\r\n", styles: [".dropdown-toggle:after{display:none!important}.tc-dropdown{position:relative}.tc-dropdown .button-select{width:100%;background-color:#fff;border:1px solid #ccc;height:35px;text-align:left;padding-left:15px;font-size:14px;color:#666}.tc-dropdown .button-select span{position:absolute;right:6px;top:7px}.tc-dropdown .tc-dropdown-menu{width:100%;border:1px solid #ccc;background-color:#fff;position:absolute;z-index:1}.tc-dropdown .area-options{max-height:200px;overflow-y:scroll;overflow-x:hidden}.tc-dropdown .menu-on-top{position:absolute}.line-search{padding:3px}.line-search .box-search{width:100%;border-collapse:collapse}.line-search .box-search td.area-icon{padding:4px 0 2px 8px;width:35px}.line-search .box-search td.area-icon .icon-search{color:#666}.line-search .box-search td.area-icon button{border:none;background-color:transparent;color:#999;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.line-search .box-search td.area-input{border:none}.line-search .box-search td.area-input input{width:100%}.line-search .box-search input{width:100%;font-size:13px;height:33px;border:1px solid #ccc;padding:10px}.loading-area{line-height:0;position:relative;height:0;bottom:-10px;left:10px}button:disabled{background-color:#eee!important;border:1px solid #ececec!important;cursor:not-allowed}.loading-box{cursor:progress!important}.disabled i{color:#999!important}.to-hide{display:none}.no-margin-bottom{margin-bottom:0!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
1376
1382
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiDataListComponent, decorators: [{
|
|
1377
1383
|
type: Component,
|
|
1378
1384
|
args: [{ selector: 'tcloud-ui-data-list', providers: [
|
|
1379
1385
|
DataListService,
|
|
1380
1386
|
CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2
|
|
1381
|
-
], template: "<div *ngIf=\"formulario\" id=\"area-{{ id }}\" class=\"tc-dropdown\" [class.disabled]=\"disabled || loading\">\r\n <div *ngIf=\"loading\" class=\"loading-area\">\r\n <i class=\"fas fa-spinner fa-spin\"></i>\r\n </div>\r\n <!-- [attr.data-bs-toggle]=\"'dropdown'\" -->\r\n <button \r\n [class.loading-box]=\"loading\"\r\n [disabled]=\"disabled || loading\"\r\n class=\"dropdown-toggle button-select no-margin-bottom\" \r\n type=\"button\" \r\n id=\"{{ id }}\" \r\n \r\n [attr.aria-haspopup]=\"'true'\" \r\n [attr.aria-expanded]=\"'false'\" \r\n (click)=\"toOpen()\" >\r\n\r\n <i *ngIf=\"(selected_description === undefined || selected_description === null || selected_description === '' ) && !loading \">{{ placeholder }}</i>\r\n {{ selected_description }}\r\n <span><i class=\"fas fa-angle-down\"></i></span>\r\n </button>\r\n <div class=\"tc-dropdown-menu {{ menu_on_top }}\" id=\"box-{{ id }}\" [attr.aria-labelledby]=\"id\" [class.to-hide]=\"!menu_show\" [style]=\"box_style\">\r\n\r\n <div class=\"line-search\" *ngIf=\"search\">\r\n <table class=\"box-search\">\r\n <tr>\r\n\r\n <td class=\"area-input\">\r\n <input type=\"text\" class=\"tc-form-control\" [(ngModel)]=\"search_text\" (input)=\"toSearch($event)\" placeholder=\"Buscar...\" > \r\n </td>\r\n\r\n <td class=\"area-icon\">\r\n <i *ngIf=\"search_text === ''\" class=\"fas fa-search icon-search\"></i>\r\n <button type=\"button\" *ngIf=\"search_text !== ''\" (click)=\"clearTextSearch()\"><i class=\"fas fa-times\"></i></button>\r\n </td>\r\n \r\n </tr>\r\n </table>\r\n </div>\r\n \r\n <div class=\"area-options\" id=\"{{ id }}-options\" (click)=\"toClose()\">\r\n <ng-content></ng-content> \r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div *ngIf=\"formulario\">\r\n <form [formGroup]=\"formulario\" style=\"display: none;\" >\r\n <input id=\"{{ id }}-hidden\" formControlName=\"selected_item\" type=\"hidden\">\r\n </form>\r\n</div
|
|
1387
|
+
], template: "<div *ngIf=\"formulario\" id=\"area-{{ id }}\" class=\"tc-dropdown\" [class.disabled]=\"disabled || loading\">\r\n <div *ngIf=\"loading\" class=\"loading-area\">\r\n <i class=\"fas fa-spinner fa-spin\"></i>\r\n </div>\r\n <!-- [attr.data-bs-toggle]=\"'dropdown'\" -->\r\n <button \r\n [class.loading-box]=\"loading\"\r\n [disabled]=\"disabled || loading\"\r\n class=\"dropdown-toggle button-select no-margin-bottom\" \r\n type=\"button\" \r\n id=\"{{ id }}\" \r\n \r\n [attr.aria-haspopup]=\"'true'\" \r\n [attr.aria-expanded]=\"'false'\" \r\n (click)=\"toOpen()\" >\r\n\r\n <i *ngIf=\"(selected_description === undefined || selected_description === null || selected_description === '' ) && !loading \">{{ placeholder }}</i>\r\n {{ selected_description }}\r\n <span><i class=\"fas fa-angle-down\"></i></span>\r\n </button>\r\n <div class=\"tc-dropdown-menu {{ menu_on_top }}\" id=\"box-{{ id }}\" [attr.aria-labelledby]=\"id\" [class.to-hide]=\"!menu_show\" [style]=\"box_style\">\r\n\r\n <div class=\"line-search\" *ngIf=\"search\">\r\n <table class=\"box-search\">\r\n <tr>\r\n\r\n <td class=\"area-input\">\r\n <input type=\"text\" class=\"tc-form-control\" [(ngModel)]=\"search_text\" (input)=\"toSearch($event)\" placeholder=\"Buscar...\" > \r\n </td>\r\n\r\n <td class=\"area-icon\">\r\n <i *ngIf=\"search_text === ''\" class=\"fas fa-search icon-search\"></i>\r\n <button type=\"button\" *ngIf=\"search_text !== ''\" (click)=\"clearTextSearch()\"><i class=\"fas fa-times\"></i></button>\r\n </td>\r\n \r\n </tr>\r\n </table>\r\n </div>\r\n \r\n <div class=\"area-options\" id=\"{{ id }}-options\" (click)=\"toClose()\">\r\n <ng-content></ng-content> \r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div *ngIf=\"formulario\">\r\n <form [formGroup]=\"formulario\" style=\"display: none;\" >\r\n <input id=\"{{ id }}-hidden\" formControlName=\"selected_item\" type=\"hidden\">\r\n </form>\r\n</div>\r\n", styles: [".dropdown-toggle:after{display:none!important}.tc-dropdown{position:relative}.tc-dropdown .button-select{width:100%;background-color:#fff;border:1px solid #ccc;height:35px;text-align:left;padding-left:15px;font-size:14px;color:#666}.tc-dropdown .button-select span{position:absolute;right:6px;top:7px}.tc-dropdown .tc-dropdown-menu{width:100%;border:1px solid #ccc;background-color:#fff;position:absolute;z-index:1}.tc-dropdown .area-options{max-height:200px;overflow-y:scroll;overflow-x:hidden}.tc-dropdown .menu-on-top{position:absolute}.line-search{padding:3px}.line-search .box-search{width:100%;border-collapse:collapse}.line-search .box-search td.area-icon{padding:4px 0 2px 8px;width:35px}.line-search .box-search td.area-icon .icon-search{color:#666}.line-search .box-search td.area-icon button{border:none;background-color:transparent;color:#999;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.line-search .box-search td.area-input{border:none}.line-search .box-search td.area-input input{width:100%}.line-search .box-search input{width:100%;font-size:13px;height:33px;border:1px solid #ccc;padding:10px}.loading-area{line-height:0;position:relative;height:0;bottom:-10px;left:10px}button:disabled{background-color:#eee!important;border:1px solid #ececec!important;cursor:not-allowed}.loading-box{cursor:progress!important}.disabled i{color:#999!important}.to-hide{display:none}.no-margin-bottom{margin-bottom:0!important}\n"] }]
|
|
1382
1388
|
}], ctorParameters: function () { return [{ type: DataListService }, { type: i2.FormBuilder }]; }, propDecorators: { placeholder: [{
|
|
1383
1389
|
type: Input
|
|
1384
1390
|
}], disabled: [{
|
|
@@ -2770,7 +2776,7 @@ class TCloudUiFiltersComponent {
|
|
|
2770
2776
|
ngOnChanges(changes) {
|
|
2771
2777
|
if (changes && changes['data']) {
|
|
2772
2778
|
const data = changes['data'].currentValue;
|
|
2773
|
-
console.log('ngOnChanges data', data);
|
|
2779
|
+
//console.log('ngOnChanges data', data);
|
|
2774
2780
|
if (this._data !== data) {
|
|
2775
2781
|
this._data = JSON.parse(JSON.stringify(data));
|
|
2776
2782
|
this.search_data = JSON.parse(JSON.stringify(data));
|
|
@@ -2809,8 +2815,8 @@ class TCloudUiFiltersComponent {
|
|
|
2809
2815
|
const nextKeys = pathArray.slice(i + 1);
|
|
2810
2816
|
const index = key.substring(key.indexOf('[') + 1, key.indexOf(']'));
|
|
2811
2817
|
const arrayKey = key.substring(0, key.indexOf('['));
|
|
2812
|
-
if (current[arrayKey][index]) {
|
|
2813
|
-
console.log('current[arrayKey][index]', current[arrayKey][index]);
|
|
2818
|
+
if (current && current[arrayKey] && current[arrayKey][index]) {
|
|
2819
|
+
//console.log('current[arrayKey][index]', current[arrayKey][index]);
|
|
2814
2820
|
return this.collectionFind(current[arrayKey][index], nextKeys.join("."));
|
|
2815
2821
|
}
|
|
2816
2822
|
}
|
|
@@ -2831,6 +2837,9 @@ class TCloudUiFiltersComponent {
|
|
|
2831
2837
|
return results;
|
|
2832
2838
|
}
|
|
2833
2839
|
else {
|
|
2840
|
+
if (!current || (current && !current[key])) {
|
|
2841
|
+
return undefined;
|
|
2842
|
+
}
|
|
2834
2843
|
current = current[key];
|
|
2835
2844
|
if (current === undefined) {
|
|
2836
2845
|
return undefined;
|
|
@@ -2854,7 +2863,8 @@ class TCloudUiFiltersComponent {
|
|
|
2854
2863
|
}
|
|
2855
2864
|
}
|
|
2856
2865
|
for (let i = 0; i < (this.data).length; i++) {
|
|
2857
|
-
this.data[i]['tc_filter_accept'] = true;
|
|
2866
|
+
// this.data[i]['tc_filter_accept'] = true;
|
|
2867
|
+
this.setDataIndex(i, true);
|
|
2858
2868
|
for (let j = 0; j < (this.filters).length; j++) {
|
|
2859
2869
|
const filter_item = this.filters[j];
|
|
2860
2870
|
if (filter_item.searchText && typeof (filter_item.searchText) === 'string' && filter_item.searchText !== '') {
|
|
@@ -2863,9 +2873,12 @@ class TCloudUiFiltersComponent {
|
|
|
2863
2873
|
if (item_value) {
|
|
2864
2874
|
item_value = this.normalize(item_value);
|
|
2865
2875
|
if (!(item_value.includes(filter_item.searchText) || item_value === filter_item.searchText)) {
|
|
2866
|
-
this.
|
|
2876
|
+
this.setDataIndex(i, false);
|
|
2867
2877
|
}
|
|
2868
2878
|
}
|
|
2879
|
+
else {
|
|
2880
|
+
this.setDataIndex(i, false);
|
|
2881
|
+
}
|
|
2869
2882
|
}
|
|
2870
2883
|
if (typeof (filter_item.searchText) === 'boolean' && filter_item.searchText) {
|
|
2871
2884
|
let item_value = this.collectionFind(this.data[i], filter_item.searchIn);
|
|
@@ -2878,12 +2891,12 @@ class TCloudUiFiltersComponent {
|
|
|
2878
2891
|
}
|
|
2879
2892
|
}
|
|
2880
2893
|
if (qtd_is_true === 0) {
|
|
2881
|
-
this.
|
|
2894
|
+
this.setDataIndex(i, false);
|
|
2882
2895
|
}
|
|
2883
2896
|
}
|
|
2884
2897
|
else {
|
|
2885
2898
|
if (!(item_value === filter_item.searchText)) {
|
|
2886
|
-
this.
|
|
2899
|
+
this.setDataIndex(i, false);
|
|
2887
2900
|
}
|
|
2888
2901
|
}
|
|
2889
2902
|
}
|
|
@@ -2901,7 +2914,7 @@ class TCloudUiFiltersComponent {
|
|
|
2901
2914
|
}
|
|
2902
2915
|
if (is_filter) {
|
|
2903
2916
|
for (let i = 0; i < (this.data).length; i++) {
|
|
2904
|
-
if (this.data[i]
|
|
2917
|
+
if (this.data && this.data[i] && this.data[i]['tc_filter_accept']) {
|
|
2905
2918
|
(search_data).push(this.data[i]);
|
|
2906
2919
|
}
|
|
2907
2920
|
}
|
|
@@ -2910,6 +2923,11 @@ class TCloudUiFiltersComponent {
|
|
|
2910
2923
|
}
|
|
2911
2924
|
this.result.emit(this.data);
|
|
2912
2925
|
}
|
|
2926
|
+
setDataIndex(index, value) {
|
|
2927
|
+
if (this.data && this.data[index]) {
|
|
2928
|
+
this.data[index]['tc_filter_accept'] = value;
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2913
2931
|
}
|
|
2914
2932
|
TCloudUiFiltersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2915
2933
|
TCloudUiFiltersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiFiltersComponent, selector: "tcloud-ui-filters", inputs: { data: "data", filters: "filters" }, outputs: { result: "result" }, usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"show_filters\" class=\"area-filter\">\n <ng-container *ngFor=\"let item of filters; let i = index\">\n\n <ng-container *ngIf=\"!item.type || (item.type && item.type !== 'boolean')\">\n \n <div class=\"box-filter-input\" [style]=\"(item.width !== '') ? 'width:'+item.width : ''\">\n <div class=\"m-description\"><i [class.to-active]=\"_input.value !== ''\" class=\"fas fa-filter icon-filter\"></i> {{ item.description }}</div>\n <div>\n <input \n #_input\n placeholder=\"{{ (item.placeholder !== '') ? item.placeholder : '' }}\"\n name=\"input_{{i+1}}\" \n type=\"text\" \n class=\"form-control tc-form-control\" \n (keyup)=\"searchIn(item, $event)\">\n <button class=\"btn-clear-filter-text\" [class.to-hide]=\"_input.value === ''\" (click)=\"searchIn(item, null); _input.value = ''\">\n <i class=\"fas fa-times\"></i>\n </button>\n </div>\n </div>\n \n </ng-container>\n\n <ng-container *ngIf=\"item.type && item.type === 'boolean'\">\n \n <div class=\"box-filter-input\" [style]=\"(item.width !== '') ? 'width:'+item.width : ''\">\n <div class=\"m-description\"><i [class.to-active]=\"_input.checked === true\" class=\"fas fa-filter icon-filter\"></i> {{ item.description }}</div>\n <div class=\"area-input-checkbox\">\n <div class=\"form-control tc-form-control\">\n <label>\n {{ item.placeholder }}\n <input \n #_input\n placeholder=\"{{ (item.placeholder !== '') ? item.placeholder : '' }}\"\n name=\"input_{{i+1}}\" \n type=\"checkbox\" \n (change)=\"searchIn(item, _input.checked)\"> \n </label>\n </div> \n </div>\n </div>\n\n </ng-container>\n\n\n </ng-container>\n</div>\n\n<!-- <pre>{{ inputs | json }}</pre> -->\n <!-- <pre> {{ data | json }} </pre> -->\n\n<!-- <p>FILTERS</p>\n<pre> {{ filters | json }}</pre> -->", styles: [".box-filter-input{display:inline-block;padding:10px 5px;position:relative}.area-filter{border:1px solid #eeeeee;border-radius:5px;margin-bottom:5px}.btn-clear-filter-text{position:absolute;right:8px;top:38px;background-color:#fff;border:none;cursor:pointer;color:#aaa}.to-hide{display:none}.icon-filter{color:#ccc}.to-active{color:var(--verde)}.area-input-checkbox label{cursor:pointer;margin-bottom:0;color:#9f9f9f}.m-description{margin-bottom:3px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|