@dev-tcloud/tcloud-ui 0.0.42 → 0.0.44

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.
@@ -407,10 +407,10 @@ class TCloudUiTabHeadComponent {
407
407
  }
408
408
  }
409
409
  TCloudUiTabHeadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabHeadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
410
- TCloudUiTabHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiTabHeadComponent, selector: "tcloud-ui-tab-head", inputs: { background: "background" }, ngImport: i0, template: "\r\n\r\n<table class=\"area-navigation\">\r\n <tr>\r\n <td>\r\n <button (click)=\"to_scroll('prev')\"> <i class=\"fas fa-chevron-left\"></i> </button>\r\n </td>\r\n\r\n <td>\r\n \r\n </td>\r\n\r\n <td>\r\n <button (click)=\"to_scroll('next')\"> <i class=\"fas fa-chevron-right\"></i> </button>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<div class=\"tc-menu {{ ID }}\" [attr.style]=\"'background: ' + background_color + ';'\" >\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n\r\n\r\n", styles: [".area-navigation{display:none;width:100%;line-height:0}.area-navigation button{padding:0!important}.area-navigation td{width:100%;height:0;line-height:0}.area-navigation td:first-child{width:10px!important;text-align:left}.area-navigation td:first-child button{color:var(--verde);cursor:pointer;position:relative;top:15px;right:6px;border:none;background-color:transparent;font-size:15px;height:30px}.area-navigation td:last-child{width:10px!important;text-align:right}.area-navigation td:last-child button{color:var(--verde);cursor:pointer;position:relative;top:15px;left:6px;border:none;background-color:transparent;font-size:15px;height:30px}.tc-menu{display:flex;align-items:center;border-radius:10px;overflow:hidden;margin-bottom:5px;z-index:1;position:relative}@media (max-width: 1440px){.area-navigation{display:block!important;position:relative;top:0;height:2px}.tc-menu{margin-left:15px;margin-right:15px}}\n"] });
410
+ TCloudUiTabHeadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiTabHeadComponent, selector: "tcloud-ui-tab-head", inputs: { background: "background" }, ngImport: i0, template: "\r\n\r\n<table class=\"area-navigation\">\r\n <tr>\r\n <td>\r\n <button (click)=\"to_scroll('prev')\"> <i class=\"fas fa-chevron-left\"></i> </button>\r\n </td>\r\n\r\n <td>\r\n \r\n </td>\r\n\r\n <td>\r\n <button (click)=\"to_scroll('next')\"> <i class=\"fas fa-chevron-right\"></i> </button>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<div class=\"tc-menu {{ ID }}\" [attr.style]=\"'background: ' + background_color + ';'\" >\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n\r\n\r\n", styles: [".area-navigation{display:none;width:100%;line-height:0}.area-navigation button{padding:0!important}.area-navigation td{width:100%;height:0;line-height:0}.area-navigation td:first-child{width:10px!important;text-align:left}.area-navigation td:first-child button{color:var(--verde);cursor:pointer;position:relative;top:15px;right:0;border:none;background-color:transparent;font-size:15px;height:30px}.area-navigation td:last-child{width:10px!important;text-align:right}.area-navigation td:last-child button{color:var(--verde);cursor:pointer;position:relative;top:15px;left:0;border:none;background-color:transparent;font-size:15px;height:30px}.tc-menu{display:flex;align-items:center;border-radius:10px;overflow:hidden;margin-bottom:5px;z-index:1;position:relative}@media (max-width: 1440px){.area-navigation{display:block!important;position:relative;top:0;height:2px}.tc-menu{margin-left:15px;margin-right:15px}}\n"] });
411
411
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiTabHeadComponent, decorators: [{
412
412
  type: Component,
413
- args: [{ selector: 'tcloud-ui-tab-head', template: "\r\n\r\n<table class=\"area-navigation\">\r\n <tr>\r\n <td>\r\n <button (click)=\"to_scroll('prev')\"> <i class=\"fas fa-chevron-left\"></i> </button>\r\n </td>\r\n\r\n <td>\r\n \r\n </td>\r\n\r\n <td>\r\n <button (click)=\"to_scroll('next')\"> <i class=\"fas fa-chevron-right\"></i> </button>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<div class=\"tc-menu {{ ID }}\" [attr.style]=\"'background: ' + background_color + ';'\" >\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n\r\n\r\n", styles: [".area-navigation{display:none;width:100%;line-height:0}.area-navigation button{padding:0!important}.area-navigation td{width:100%;height:0;line-height:0}.area-navigation td:first-child{width:10px!important;text-align:left}.area-navigation td:first-child button{color:var(--verde);cursor:pointer;position:relative;top:15px;right:6px;border:none;background-color:transparent;font-size:15px;height:30px}.area-navigation td:last-child{width:10px!important;text-align:right}.area-navigation td:last-child button{color:var(--verde);cursor:pointer;position:relative;top:15px;left:6px;border:none;background-color:transparent;font-size:15px;height:30px}.tc-menu{display:flex;align-items:center;border-radius:10px;overflow:hidden;margin-bottom:5px;z-index:1;position:relative}@media (max-width: 1440px){.area-navigation{display:block!important;position:relative;top:0;height:2px}.tc-menu{margin-left:15px;margin-right:15px}}\n"] }]
413
+ args: [{ selector: 'tcloud-ui-tab-head', template: "\r\n\r\n<table class=\"area-navigation\">\r\n <tr>\r\n <td>\r\n <button (click)=\"to_scroll('prev')\"> <i class=\"fas fa-chevron-left\"></i> </button>\r\n </td>\r\n\r\n <td>\r\n \r\n </td>\r\n\r\n <td>\r\n <button (click)=\"to_scroll('next')\"> <i class=\"fas fa-chevron-right\"></i> </button>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<div class=\"tc-menu {{ ID }}\" [attr.style]=\"'background: ' + background_color + ';'\" >\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n\r\n\r\n", styles: [".area-navigation{display:none;width:100%;line-height:0}.area-navigation button{padding:0!important}.area-navigation td{width:100%;height:0;line-height:0}.area-navigation td:first-child{width:10px!important;text-align:left}.area-navigation td:first-child button{color:var(--verde);cursor:pointer;position:relative;top:15px;right:0;border:none;background-color:transparent;font-size:15px;height:30px}.area-navigation td:last-child{width:10px!important;text-align:right}.area-navigation td:last-child button{color:var(--verde);cursor:pointer;position:relative;top:15px;left:0;border:none;background-color:transparent;font-size:15px;height:30px}.tc-menu{display:flex;align-items:center;border-radius:10px;overflow:hidden;margin-bottom:5px;z-index:1;position:relative}@media (max-width: 1440px){.area-navigation{display:block!important;position:relative;top:0;height:2px}.tc-menu{margin-left:15px;margin-right:15px}}\n"] }]
414
414
  }], ctorParameters: function () { return []; }, propDecorators: { background: [{
415
415
  type: Input
416
416
  }] } });
@@ -2757,11 +2757,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
2757
2757
  }]
2758
2758
  }], ctorParameters: function () { return []; } });
2759
2759
 
2760
+ var TCFiltersType;
2761
+ (function (TCFiltersType) {
2762
+ TCFiltersType["text"] = "text";
2763
+ TCFiltersType["number"] = "number";
2764
+ TCFiltersType["select"] = "select";
2765
+ TCFiltersType["boolean"] = "boolean";
2766
+ TCFiltersType["datetime"] = "datetime-local";
2767
+ })(TCFiltersType || (TCFiltersType = {}));
2768
+ var TCCondition;
2769
+ (function (TCCondition) {
2770
+ TCCondition["equal"] = "equal";
2771
+ TCCondition["gte"] = "gte";
2772
+ TCCondition["lte"] = "lte";
2773
+ TCCondition["lt"] = "lt";
2774
+ TCCondition["gt"] = "gt";
2775
+ })(TCCondition || (TCCondition = {}));
2776
+
2760
2777
  class TCloudUiFiltersComponent {
2761
- constructor() {
2778
+ constructor(datepipe) {
2779
+ this.datepipe = datepipe;
2762
2780
  this.inputs = [];
2763
2781
  this.show_filters = false;
2764
2782
  this.result = new EventEmitter();
2783
+ this.onFilter = new EventEmitter();
2784
+ this.onChange = new EventEmitter();
2765
2785
  }
2766
2786
  set data(data) {
2767
2787
  // this._data = JSON.parse(JSON.stringify(data));
@@ -2848,17 +2868,29 @@ class TCloudUiFiltersComponent {
2848
2868
  }
2849
2869
  return current;
2850
2870
  }
2871
+ addHours(date, h) {
2872
+ date.setTime(date.getTime() + (h * 60 * 60 * 1000));
2873
+ return date;
2874
+ }
2851
2875
  searchIn(item, event) {
2876
+ console.log('searchIn event', event?.target?.valueAsDate);
2852
2877
  if (event !== undefined) {
2853
2878
  if (typeof event === 'boolean') {
2854
2879
  item.searchText = event;
2880
+ this.onChange.emit(true);
2855
2881
  }
2856
2882
  else {
2857
2883
  if (event === null) {
2858
2884
  item.searchText = '';
2859
2885
  }
2860
2886
  else {
2861
- item.searchText = (event.target.value).toUpperCase();
2887
+ if (event?.target?.valueAsDate) {
2888
+ item.searchText = event?.target?.valueAsDate;
2889
+ }
2890
+ else {
2891
+ item.searchText = (event.target.value).toUpperCase();
2892
+ }
2893
+ this.onChange.emit(true);
2862
2894
  }
2863
2895
  }
2864
2896
  }
@@ -2867,7 +2899,7 @@ class TCloudUiFiltersComponent {
2867
2899
  this.setDataIndex(i, true);
2868
2900
  for (let j = 0; j < (this.filters).length; j++) {
2869
2901
  const filter_item = this.filters[j];
2870
- if (filter_item.searchText && typeof (filter_item.searchText) === 'string' && filter_item.searchText !== '') {
2902
+ if (filter_item.searchText && typeof (filter_item.searchText) === 'string' && filter_item.searchText !== '' && filter_item.type !== TCFiltersType.number) {
2871
2903
  filter_item.searchText = this.normalize(filter_item.searchText);
2872
2904
  let item_value = this.collectionFind(this.data[i], filter_item.searchIn);
2873
2905
  if (item_value) {
@@ -2880,6 +2912,79 @@ class TCloudUiFiltersComponent {
2880
2912
  this.setDataIndex(i, false);
2881
2913
  }
2882
2914
  }
2915
+ if (filter_item.searchText && filter_item.searchText instanceof Date && !isNaN(filter_item.searchText.valueOf()) && filter_item.type === TCFiltersType.datetime) {
2916
+ let item_value = this.collectionFind(this.data[i], filter_item.searchIn);
2917
+ try {
2918
+ item_value = new Date(item_value);
2919
+ }
2920
+ catch (error) { }
2921
+ if (item_value && item_value instanceof Date && !isNaN(item_value.valueOf())) {
2922
+ let is_accept = false;
2923
+ const dt_target = (filter_item.searchText).getTime() + (3 * 60 * 60 * 1000);
2924
+ const dt_current = (item_value).getTime();
2925
+ if (filter_item.condition) {
2926
+ switch (filter_item.condition) {
2927
+ case TCCondition.gt:
2928
+ is_accept = !(+(dt_target) > +(dt_current));
2929
+ break;
2930
+ case TCCondition.lt:
2931
+ is_accept = !(+(dt_target) < +(dt_current));
2932
+ break;
2933
+ case TCCondition.gte:
2934
+ is_accept = !(+(dt_target) >= +(dt_current));
2935
+ break;
2936
+ case TCCondition.lte:
2937
+ is_accept = !(+(dt_target) <= +(dt_current));
2938
+ break;
2939
+ case TCCondition.equal:
2940
+ is_accept = !(+(dt_target) === +(dt_current));
2941
+ break;
2942
+ default: is_accept = !(+(dt_target) == +(dt_current));
2943
+ }
2944
+ }
2945
+ else {
2946
+ is_accept = !(+(filter_item.searchText) === +(item_value));
2947
+ }
2948
+ if (!is_accept) {
2949
+ this.setDataIndex(i, false);
2950
+ }
2951
+ }
2952
+ }
2953
+ if (filter_item.searchText && typeof +(filter_item.searchText) === 'number' && filter_item.type === TCFiltersType.number) {
2954
+ let item_value = this.collectionFind(this.data[i], filter_item.searchIn);
2955
+ if (typeof +(item_value) === 'number') {
2956
+ let is_accept = false;
2957
+ if (filter_item.condition) {
2958
+ console.log('filter_item.condition', filter_item.condition);
2959
+ console.log('filter_item.searchText', +(filter_item.searchText));
2960
+ console.log('item_value', +(item_value));
2961
+ switch (filter_item.condition) {
2962
+ case TCCondition.gt:
2963
+ is_accept = !(+(filter_item.searchText) > +(item_value));
2964
+ break;
2965
+ case TCCondition.lt:
2966
+ is_accept = !(+(filter_item.searchText) < +(item_value));
2967
+ break;
2968
+ case TCCondition.gte:
2969
+ is_accept = !(+(filter_item.searchText) - 0.1 >= +(item_value));
2970
+ break;
2971
+ case TCCondition.lte:
2972
+ is_accept = !(+(filter_item.searchText) + 0.1 <= +(item_value));
2973
+ break;
2974
+ case TCCondition.equal:
2975
+ is_accept = !(+(filter_item.searchText) === +(item_value));
2976
+ break;
2977
+ default: is_accept = !(+(filter_item.searchText) == +(item_value));
2978
+ }
2979
+ }
2980
+ else {
2981
+ is_accept = !(+(filter_item.searchText) === +(item_value));
2982
+ }
2983
+ if (!is_accept) {
2984
+ this.setDataIndex(i, false);
2985
+ }
2986
+ }
2987
+ }
2883
2988
  if (typeof (filter_item.searchText) === 'boolean' && filter_item.searchText) {
2884
2989
  let item_value = this.collectionFind(this.data[i], filter_item.searchIn);
2885
2990
  if (item_value && (item_value).length > 0) {
@@ -2901,7 +3006,7 @@ class TCloudUiFiltersComponent {
2901
3006
  }
2902
3007
  }
2903
3008
  }
2904
- }
3009
+ } // end for
2905
3010
  this.toResult();
2906
3011
  }
2907
3012
  toResult() {
@@ -2919,9 +3024,11 @@ class TCloudUiFiltersComponent {
2919
3024
  }
2920
3025
  }
2921
3026
  this.result.emit(search_data);
3027
+ this.onFilter.emit({ ...this.filters });
2922
3028
  return;
2923
3029
  }
2924
3030
  this.result.emit(this.data);
3031
+ this.onFilter.emit({ ...this.filters });
2925
3032
  }
2926
3033
  setDataIndex(index, value) {
2927
3034
  if (this.data && this.data[index]) {
@@ -2929,17 +3036,21 @@ class TCloudUiFiltersComponent {
2929
3036
  }
2930
3037
  }
2931
3038
  }
2932
- TCloudUiFiltersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
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 \n <ng-container *ngIf=\"item.type !== 'select'\">\n <div class=\"m-description\"><i [class.to-active]=\"_input.value !== ''\" class=\"fas fa-filter icon-filter\"></i>&nbsp;{{ item.description }}</div>\n <div>\n <input \n #_input\n placeholder=\"{{ (item.placeholder !== '') ? item.placeholder : '' }}\"\n name=\"input_{{i+1}}\" \n type=\"{{ item.type }}\" \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 </ng-container>\n\n <ng-container *ngIf=\"item.type === 'select' && item.data && (item.data).length > 0\" >\n <div class=\"m-description\"><i [class.to-active]=\"_input.value !== ''\" class=\"fas fa-filter icon-filter\"></i>&nbsp;{{ item.description }}</div>\n <div>\n <select \n #_input\n name=\"input_{{i+1}}\" \n class=\"form-control tc-form-control\" \n (change)=\"searchIn(item, $event)\">\n <option [ngValue]=\"\"></option>\n <ng-container *ngFor=\"let v of item.data\">\n <option [ngValue]=\"v.value\">{{ v.description }}</option>\n </ng-container>\n </select>\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 </ng-container>\n\n </div>\n\n\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>&nbsp;{{ 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"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] });
3039
+ TCloudUiFiltersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiFiltersComponent, deps: [{ token: i1.DatePipe }], target: i0.ɵɵFactoryTarget.Component });
3040
+ 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", onFilter: "onFilter", onChange: "onChange" }, 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 \n <ng-container *ngIf=\"item.type !== 'select'\">\n <div class=\"m-description\"><i [class.to-active]=\"_input.value !== ''\" class=\"fas fa-filter icon-filter\"></i>&nbsp;{{ item.description }}</div>\n <div>\n <input \n [attr.data-date-format]=\"( item.type === 'datetime-local' ) ? 'MM-DD-YYYY HH:mm' : null \"\n #_input\n placeholder=\"{{ (item.placeholder !== '') ? item.placeholder : '' }}\"\n name=\"input_{{i+1}}\" \n type=\"{{ (item.type === 'number') ? 'text' : item.type }}\" \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 </ng-container>\n\n <ng-container *ngIf=\"item.type === 'select' && item.data && (item.data).length > 0\" >\n <div class=\"m-description\"><i [class.to-active]=\"_input.value !== ''\" class=\"fas fa-filter icon-filter\"></i>&nbsp;{{ item.description }}</div>\n <div>\n <select \n #_input\n name=\"input_{{i+1}}\" \n class=\"form-control tc-form-control\" \n (change)=\"searchIn(item, $event)\">\n <option [ngValue]=\"\"></option>\n <ng-container *ngFor=\"let v of item.data\">\n <option [ngValue]=\"v.value\">{{ v.description }}</option>\n </ng-container>\n </select>\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 </ng-container>\n\n </div>\n\n\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>&nbsp;{{ 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}input{color:#535353}\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"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] });
2934
3041
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiFiltersComponent, decorators: [{
2935
3042
  type: Component,
2936
- args: [{ selector: 'tcloud-ui-filters', 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 \n <ng-container *ngIf=\"item.type !== 'select'\">\n <div class=\"m-description\"><i [class.to-active]=\"_input.value !== ''\" class=\"fas fa-filter icon-filter\"></i>&nbsp;{{ item.description }}</div>\n <div>\n <input \n #_input\n placeholder=\"{{ (item.placeholder !== '') ? item.placeholder : '' }}\"\n name=\"input_{{i+1}}\" \n type=\"{{ item.type }}\" \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 </ng-container>\n\n <ng-container *ngIf=\"item.type === 'select' && item.data && (item.data).length > 0\" >\n <div class=\"m-description\"><i [class.to-active]=\"_input.value !== ''\" class=\"fas fa-filter icon-filter\"></i>&nbsp;{{ item.description }}</div>\n <div>\n <select \n #_input\n name=\"input_{{i+1}}\" \n class=\"form-control tc-form-control\" \n (change)=\"searchIn(item, $event)\">\n <option [ngValue]=\"\"></option>\n <ng-container *ngFor=\"let v of item.data\">\n <option [ngValue]=\"v.value\">{{ v.description }}</option>\n </ng-container>\n </select>\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 </ng-container>\n\n </div>\n\n\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>&nbsp;{{ 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"] }]
2937
- }], ctorParameters: function () { return []; }, propDecorators: { data: [{
3043
+ args: [{ selector: 'tcloud-ui-filters', 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 \n <ng-container *ngIf=\"item.type !== 'select'\">\n <div class=\"m-description\"><i [class.to-active]=\"_input.value !== ''\" class=\"fas fa-filter icon-filter\"></i>&nbsp;{{ item.description }}</div>\n <div>\n <input \n [attr.data-date-format]=\"( item.type === 'datetime-local' ) ? 'MM-DD-YYYY HH:mm' : null \"\n #_input\n placeholder=\"{{ (item.placeholder !== '') ? item.placeholder : '' }}\"\n name=\"input_{{i+1}}\" \n type=\"{{ (item.type === 'number') ? 'text' : item.type }}\" \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 </ng-container>\n\n <ng-container *ngIf=\"item.type === 'select' && item.data && (item.data).length > 0\" >\n <div class=\"m-description\"><i [class.to-active]=\"_input.value !== ''\" class=\"fas fa-filter icon-filter\"></i>&nbsp;{{ item.description }}</div>\n <div>\n <select \n #_input\n name=\"input_{{i+1}}\" \n class=\"form-control tc-form-control\" \n (change)=\"searchIn(item, $event)\">\n <option [ngValue]=\"\"></option>\n <ng-container *ngFor=\"let v of item.data\">\n <option [ngValue]=\"v.value\">{{ v.description }}</option>\n </ng-container>\n </select>\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 </ng-container>\n\n </div>\n\n\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>&nbsp;{{ 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}input{color:#535353}\n"] }]
3044
+ }], ctorParameters: function () { return [{ type: i1.DatePipe }]; }, propDecorators: { data: [{
2938
3045
  type: Input
2939
3046
  }], filters: [{
2940
3047
  type: Input
2941
3048
  }], result: [{
2942
3049
  type: Output
3050
+ }], onFilter: [{
3051
+ type: Output
3052
+ }], onChange: [{
3053
+ type: Output
2943
3054
  }] } });
2944
3055
 
2945
3056
  class TCloudUiFiltersModule {
@@ -3036,13 +3147,21 @@ class TCloudUiAccordionComponent {
3036
3147
  }
3037
3148
  get loading() { return this._loading; }
3038
3149
  ngOnInit() {
3039
- this._tCloudUiAccordionService.stateLoading$.subscribe((loading) => {
3150
+ this.subscription_01 = this._tCloudUiAccordionService.stateLoading$.subscribe((loading) => {
3040
3151
  this.loading = loading;
3041
3152
  });
3042
- this._tCloudUiAccordionService.stateToggle$.subscribe((show) => {
3153
+ this.subscription_02 = this._tCloudUiAccordionService.stateToggle$.subscribe((show) => {
3043
3154
  this.onAction.emit((show === true) ? 'open' : 'close');
3044
3155
  });
3045
3156
  }
3157
+ ngOnDestroy() {
3158
+ if (this.subscription_01) {
3159
+ this.subscription_01.unsubscribe();
3160
+ }
3161
+ if (this.subscription_02) {
3162
+ this.subscription_02.unsubscribe();
3163
+ }
3164
+ }
3046
3165
  }
3047
3166
  TCloudUiAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiAccordionComponent, deps: [{ token: TCloudUiAccordionService }], target: i0.ɵɵFactoryTarget.Component });
3048
3167
  TCloudUiAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiAccordionComponent, selector: "tcloud-ui-accordion", inputs: { disabled: "disabled", show: "show", loading: "loading" }, outputs: { onAction: "onAction" }, providers: [
@@ -3072,32 +3191,45 @@ class TCloudUiAccordionTitleComponent {
3072
3191
  }
3073
3192
  ngOnInit() {
3074
3193
  this.loading = this._tCloudUiAccordionService.getLoading() || false;
3075
- this._tCloudUiAccordionService.stateLoading$.subscribe((loading) => {
3194
+ this.subscription_01 = this._tCloudUiAccordionService.stateLoading$.subscribe((loading) => {
3076
3195
  this.loading = loading;
3077
3196
  });
3078
3197
  this.show = this._tCloudUiAccordionService.getShow() || false;
3079
- this._tCloudUiAccordionService.stateToggle$.subscribe((show) => {
3198
+ this.subscription_02 = this._tCloudUiAccordionService.stateToggle$.subscribe((show) => {
3080
3199
  this.show = show;
3081
3200
  });
3082
3201
  this.disabled = this._tCloudUiAccordionService.getDisabled() || false;
3083
- this._tCloudUiAccordionService.stateDisabled$.subscribe((disabled) => {
3202
+ this.subscription_03 = this._tCloudUiAccordionService.stateDisabled$.subscribe((disabled) => {
3084
3203
  this.disabled = disabled;
3085
3204
  });
3086
3205
  }
3087
3206
  toggle() {
3088
- console.log('this.disabled', this.disabled);
3089
3207
  if (this.disabled) {
3090
3208
  return;
3091
3209
  }
3092
3210
  this.show = !this.show;
3093
3211
  this._tCloudUiAccordionService.toggle(this.show);
3094
3212
  }
3213
+ toggle_title() {
3214
+ this.toggle();
3215
+ }
3216
+ ngOnDestroy() {
3217
+ if (this.subscription_01) {
3218
+ this.subscription_01.unsubscribe();
3219
+ }
3220
+ if (this.subscription_02) {
3221
+ this.subscription_02.unsubscribe();
3222
+ }
3223
+ if (this.subscription_03) {
3224
+ this.subscription_03.unsubscribe();
3225
+ }
3226
+ }
3095
3227
  }
3096
3228
  TCloudUiAccordionTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiAccordionTitleComponent, deps: [{ token: TCloudUiAccordionService }], target: i0.ɵɵFactoryTarget.Component });
3097
- TCloudUiAccordionTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiAccordionTitleComponent, selector: "tcloud-ui-accordion-title", ngImport: i0, template: "<div class=\"tc-accordion-title\">\n <table class=\"tc-accordion-table\">\n <tr>\n <td style=\"width: 100;\">\n <ng-content></ng-content>\n </td>\n <td class=\"tc-accordion-actions\">\n <button type=\"button\" class=\"tc-btn-accordion-toggle\" [disabled]=\"disabled\" (click)=\"toggle()\" >\n\n <i class=\"fas fa-chevron-right icon-toggle\" *ngIf=\"!show\"></i>\n <i class=\"fas fa-chevron-down icon-toggle\" *ngIf=\"show\"></i>\n\n </button>\n </td>\n </tr>\n </table>\n</div>", styles: [".tc-accordion-table{width:100%}.tc-accordion-actions{width:15px}.tc-btn-accordion-toggle{font-size:20px;border:none;background-color:transparent;background:none;cursor:pointer;margin:auto}.tc-btn-accordion-toggle:disabled{cursor:not-allowed!important;opacity:.6}.icon-toggle{color:var(--verde)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3229
+ TCloudUiAccordionTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TCloudUiAccordionTitleComponent, selector: "tcloud-ui-accordion-title", ngImport: i0, template: "<div class=\"tc-accordion-title\">\n <table class=\"tc-accordion-table\">\n <tr>\n <td class=\"area-title\" (click)=\"toggle_title()\" >\n <ng-content></ng-content>\n </td>\n <td class=\"tc-accordion-actions\">\n <button type=\"button\" class=\"tc-btn-accordion-toggle\" [disabled]=\"disabled\" (click)=\"toggle()\" >\n\n <i class=\"fas fa-chevron-right icon-toggle\" *ngIf=\"!show\"></i>\n <i class=\"fas fa-chevron-down icon-toggle\" *ngIf=\"show\"></i>\n\n </button>\n </td>\n </tr>\n </table>\n</div>", styles: [".tc-accordion-table{width:100%}.tc-accordion-actions{width:15px}.tc-btn-accordion-toggle{font-size:20px;border:none;background-color:transparent;background:none;cursor:pointer;margin:auto}.tc-btn-accordion-toggle:disabled{cursor:not-allowed!important;opacity:.6}.icon-toggle{color:var(--verde)}.area-title{width:100;cursor:pointer;color:var(--verde)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
3098
3230
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TCloudUiAccordionTitleComponent, decorators: [{
3099
3231
  type: Component,
3100
- args: [{ selector: 'tcloud-ui-accordion-title', template: "<div class=\"tc-accordion-title\">\n <table class=\"tc-accordion-table\">\n <tr>\n <td style=\"width: 100;\">\n <ng-content></ng-content>\n </td>\n <td class=\"tc-accordion-actions\">\n <button type=\"button\" class=\"tc-btn-accordion-toggle\" [disabled]=\"disabled\" (click)=\"toggle()\" >\n\n <i class=\"fas fa-chevron-right icon-toggle\" *ngIf=\"!show\"></i>\n <i class=\"fas fa-chevron-down icon-toggle\" *ngIf=\"show\"></i>\n\n </button>\n </td>\n </tr>\n </table>\n</div>", styles: [".tc-accordion-table{width:100%}.tc-accordion-actions{width:15px}.tc-btn-accordion-toggle{font-size:20px;border:none;background-color:transparent;background:none;cursor:pointer;margin:auto}.tc-btn-accordion-toggle:disabled{cursor:not-allowed!important;opacity:.6}.icon-toggle{color:var(--verde)}\n"] }]
3232
+ args: [{ selector: 'tcloud-ui-accordion-title', template: "<div class=\"tc-accordion-title\">\n <table class=\"tc-accordion-table\">\n <tr>\n <td class=\"area-title\" (click)=\"toggle_title()\" >\n <ng-content></ng-content>\n </td>\n <td class=\"tc-accordion-actions\">\n <button type=\"button\" class=\"tc-btn-accordion-toggle\" [disabled]=\"disabled\" (click)=\"toggle()\" >\n\n <i class=\"fas fa-chevron-right icon-toggle\" *ngIf=\"!show\"></i>\n <i class=\"fas fa-chevron-down icon-toggle\" *ngIf=\"show\"></i>\n\n </button>\n </td>\n </tr>\n </table>\n</div>", styles: [".tc-accordion-table{width:100%}.tc-accordion-actions{width:15px}.tc-btn-accordion-toggle{font-size:20px;border:none;background-color:transparent;background:none;cursor:pointer;margin:auto}.tc-btn-accordion-toggle:disabled{cursor:not-allowed!important;opacity:.6}.icon-toggle{color:var(--verde)}.area-title{width:100;cursor:pointer;color:var(--verde)}\n"] }]
3101
3233
  }], ctorParameters: function () { return [{ type: TCloudUiAccordionService }]; } });
3102
3234
 
3103
3235
  class TCloudUiAccordionBodyComponent {
@@ -3279,14 +3411,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
3279
3411
  }]
3280
3412
  }] });
3281
3413
 
3282
- var TCFiltersType;
3283
- (function (TCFiltersType) {
3284
- TCFiltersType["text"] = "text";
3285
- TCFiltersType["number"] = "number";
3286
- TCFiltersType["select"] = "select";
3287
- TCFiltersType["boolean"] = "boolean";
3288
- })(TCFiltersType || (TCFiltersType = {}));
3289
-
3290
3414
  /*
3291
3415
  * Public API Surface of tcloud-ui
3292
3416
  */
@@ -3295,5 +3419,5 @@ var TCFiltersType;
3295
3419
  * Generated bundle index. Do not edit.
3296
3420
  */
3297
3421
 
3298
- export { BytesPipe, CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, MonthNamePipe, RespectivePipe, StatusInfoPipe, TCFiltersType, TCloudUiAccordionBodyComponent, TCloudUiAccordionComponent, TCloudUiAccordionModule, TCloudUiAccordionTitleComponent, TCloudUiAlignDirective, TCloudUiChoiceIssuesComponent, TCloudUiChoiceIssuesModule, TCloudUiDataListComponent, TCloudUiDataListModule, TCloudUiDataListOptionComponent, TCloudUiDirectiveModule, TCloudUiFiltersComponent, TCloudUiFiltersModule, TCloudUiInputSearchComponent, TCloudUiInputSearchModule, TCloudUiLineStepCircleComponent, TCloudUiLineStepCircleModule, TCloudUiLinhaLogoComponent, TCloudUiLinhaLogoModule, TCloudUiLoadingTransitionsService, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModalModule, TCloudUiModule, TCloudUiMultiInputComponent, TCloudUiMultiInputModule, TCloudUiMultiSelectComponent, TCloudUiMultiSelectModule, TCloudUiNotFoundComponent, TCloudUiNotFoundModule, TCloudUiNumberStepComponent, TCloudUiNumberStepModule, TCloudUiPipesModule, TCloudUiScrollBoxComponent, TCloudUiScrollBoxModule, TCloudUiSearchInObjectService, TCloudUiTabContentComponent, TCloudUiTabHeadComponent, TCloudUiTabMenuComponent, TCloudUiTabMenuModule, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTableComponent, TCloudUiTableModule, TCloudUiTooltipDirective };
3422
+ export { BytesPipe, CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$2 as CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, MonthNamePipe, RespectivePipe, StatusInfoPipe, TCCondition, TCFiltersType, TCloudUiAccordionBodyComponent, TCloudUiAccordionComponent, TCloudUiAccordionModule, TCloudUiAccordionTitleComponent, TCloudUiAlignDirective, TCloudUiChoiceIssuesComponent, TCloudUiChoiceIssuesModule, TCloudUiDataListComponent, TCloudUiDataListModule, TCloudUiDataListOptionComponent, TCloudUiDirectiveModule, TCloudUiFiltersComponent, TCloudUiFiltersModule, TCloudUiInputSearchComponent, TCloudUiInputSearchModule, TCloudUiLineStepCircleComponent, TCloudUiLineStepCircleModule, TCloudUiLinhaLogoComponent, TCloudUiLinhaLogoModule, TCloudUiLoadingTransitionsService, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModalModule, TCloudUiModule, TCloudUiMultiInputComponent, TCloudUiMultiInputModule, TCloudUiMultiSelectComponent, TCloudUiMultiSelectModule, TCloudUiNotFoundComponent, TCloudUiNotFoundModule, TCloudUiNumberStepComponent, TCloudUiNumberStepModule, TCloudUiPipesModule, TCloudUiScrollBoxComponent, TCloudUiScrollBoxModule, TCloudUiSearchInObjectService, TCloudUiTabContentComponent, TCloudUiTabHeadComponent, TCloudUiTabMenuComponent, TCloudUiTabMenuModule, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTableComponent, TCloudUiTableModule, TCloudUiTooltipDirective };
3299
3423
  //# sourceMappingURL=dev-tcloud-tcloud-ui.mjs.map