@wizishop/angular-components 0.0.88 → 0.0.99

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.
@@ -698,8 +698,6 @@
698
698
  currentPage: 0
699
699
  };
700
700
  var filterGroup = this.filterRoutingBuilder.group(dataTableFilters, dataTableName);
701
- filterGroup.tableFiltersValuesChange$ = new rxjs.ReplaySubject(1);
702
- filterGroup.tableFiltersValuesDebouncedChange$ = filterGroup.tableFiltersValuesChange$.pipe(operators.debounceTime(300));
703
701
  this.filterGroups.set(dataTableName, filterGroup);
704
702
  return filterGroup;
705
703
  };
@@ -764,14 +762,12 @@
764
762
  this.headerCheckBoxId = uuid.v4(); // Create checkbox unique id
765
763
  /* Handle routing filters */
766
764
  if (this.tableRoutingName) {
767
- console.log('ngOnInit TableComponent');
768
- this._tableFiltersGroup = this.filtersTableService.getTableFilterGroup(this.tableRoutingName);
769
- this.setTablesFilters();
765
+ this._filterGroup = this.filtersTableService.getTableFilterGroup(this.tableRoutingName);
770
766
  // Performe initial fetch data
771
- //this._tableFiltersGroup.valuesChange$.next([]);
767
+ this._filterGroup.valuesChange$.next([]);
768
+ this.setTablesFilters();
772
769
  // Listen to filters changes with debounced time to limit multiple api calls
773
- this.filterGroupChangeSub = this._tableFiltersGroup.valuesChange$.subscribe(function (filters) {
774
- console.log('valuesChange', filters);
770
+ this.filterGroupChangeSub = this._filterGroup.valuesChange$.subscribe(function (filters) {
775
771
  _this.setTablesFilters();
776
772
  });
777
773
  }
@@ -786,8 +782,8 @@
786
782
  this.tableFilters.currentPage = 1;
787
783
  this.tableFiltersChange.emit(this.tableFilters);
788
784
  // Reset routing filters
789
- if (this._tableFiltersGroup) {
790
- this._tableFiltersGroup.setValues({
785
+ if (this._filterGroup) {
786
+ this._filterGroup.setValues({
791
787
  searchValue: this.tableFilters.searchValue,
792
788
  sort: undefined,
793
789
  order: undefined,
@@ -797,8 +793,8 @@
797
793
  };
798
794
  TableComponent.prototype.pageChange = function () {
799
795
  this.tableFiltersChange.emit(this.tableFilters);
800
- if (this._tableFiltersGroup) {
801
- this._tableFiltersGroup.setValues({
796
+ if (this._filterGroup) {
797
+ this._filterGroup.setValues({
802
798
  itemsPerPage: this.tableFilters.itemsPerPage,
803
799
  currentPage: this.tableFilters.currentPage
804
800
  });
@@ -809,16 +805,14 @@
809
805
  * */
810
806
  TableComponent.prototype.setTablesFilters = function () {
811
807
  this.tableFilters = {
812
- sort: this._tableFiltersGroup.get('sort'),
813
- order: this._tableFiltersGroup.get('order'),
814
- searchValue: this._tableFiltersGroup.get('searchValue'),
815
- itemsPerPage: this._tableFiltersGroup.get('itemsPerPage') ? parseInt(this._tableFiltersGroup.get('itemsPerPage')) : 0,
816
- currentPage: this._tableFiltersGroup.get('currentPage') ? parseInt(this._tableFiltersGroup.get('currentPage')) : 0,
808
+ sort: this._filterGroup.get('sort'),
809
+ order: this._filterGroup.get('order'),
810
+ searchValue: this._filterGroup.get('searchValue'),
811
+ itemsPerPage: this._filterGroup.get('itemsPerPage') ? parseInt(this._filterGroup.get('itemsPerPage')) : 0,
812
+ currentPage: this._filterGroup.get('currentPage') ? parseInt(this._filterGroup.get('currentPage')) : 0,
817
813
  totalItems: this.tableFilters.totalItems
818
814
  };
819
815
  this.tableFiltersChange.emit(this.tableFilters);
820
- console.log('tableFiltersValuesChange$.next');
821
- this._tableFiltersGroup.tableFiltersValuesChange$.next(this.tableFilters);
822
816
  };
823
817
  TableComponent.prototype.ngDestroy = function () {
824
818
  if (this.filterGroupChangeSub) {
@@ -1818,6 +1812,7 @@
1818
1812
  this.disabled = false;
1819
1813
  this.indication = false;
1820
1814
  this.success = false;
1815
+ this.indicationLeft = false;
1821
1816
  this.keypressEnter = new i0.EventEmitter();
1822
1817
  this.KEYPRESS_ENTER = "Enter";
1823
1818
  this.id = 'wz-input_' +
@@ -1873,7 +1868,7 @@
1873
1868
  InputComponent.decorators = [
1874
1869
  { type: i0.Component, args: [{
1875
1870
  selector: 'wac-input',
1876
- template: "<div\n class=\"field wac-input\"\n [ngClass]=\"{ 'has-no-block': withoutBlock, 'is-big': big, 'is-medium': medium, 'with-padding': padding, 'with-progress-bar': progressBar }\"\n>\n <div class=\"field-label is-normal has-text-left\" *ngIf=\"!withoutBlock\">\n <label\n [ngClass]=\"[boldLabel == 'true' ? 'label has-text-weight-bold' : 'label has-text-weight-normal', showTooltip ? 'label-inline' : '']\"\n [innerHTML]=\"label\"\n [for]=\"id\"\n ></label>\n <wac-tooltip\n *ngIf=\"showTooltip\"\n [tooltipIcon]=\"iconTooltip\"\n [tooltipText]=\"textTooltip\"\n [tooltipLink]=\"linkTooltip\"\n [tooltipUrl]=\"urlTooltip\"\n ></wac-tooltip>\n <!-- Size -->\n <span *ngIf=\"value && size && !progressBar\" class=\"is-size-7 wac-input__size\">\n <strong>{{ value.toString().length }}</strong> / {{ size }}\n </span>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <p\n class=\"control\"\n [ngClass]=\"{ 'has-icons-right': textError || success, 'has-icons-left': icon !== '', 'has-input-group': textAppend || textPrepend }\"\n >\n <!-- Text Prepend -->\n <span *ngIf=\"textPrepend\" class=\"has-input-group\">\n <span class=\"has-input-group-text prepend\">{{ textPrepend }}</span>\n <span *ngIf=\"icon !== ''\" class=\"icon is-small is-left\">\n <i [class]=\"icon\"></i>\n </span>\n </span>\n\n <!-- Input -->\n <input\n [class]=\"'input ' + extraClasses\"\n [id]=\"id\"\n [ngClass]=\"{\n 'is-danger': textError,\n 'is-large': big,\n 'is-number': isNumber,\n 'remove-margin': disableMargin,\n 'text-append': textAppend\n }\"\n [type]=\"type\"\n [placeholder]=\"placeholder\"\n [attr.size]=\"size\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n (blur)=\"onBlur()\"\n [disabled]=\"disabled\"\n (focusout)=\"onFocusOut()\"\n [min]=\"min\"\n [max]=\"max\"\n (keypress)=\"keyPress($event)\"\n />\n\n <!-- Indication at the end of the input -->\n <span class=\"indication\" *ngIf=\"indication\">\n <span [innerHTML]=\"indication\"></span>\n </span>\n\n <!-- Text Append -->\n <span *ngIf=\"textAppend\" class=\"has-input-group\">\n <span class=\"has-input-group-text append\">{{ textAppend }}</span>\n <!-- error if text append not empty -->\n <span *ngIf=\"textError\" class=\"icon is-small is-right\">\n <i class=\"fal fa-times has-text-danger\"></i>\n </span>\n </span>\n\n <!-- Icon Left -->\n <span *ngIf=\"icon !== '' && !textPrepend\" class=\"icon is-small is-left\">\n <i [class]=\"icon\"></i>\n </span>\n\n <!-- Icon error if textAppend empty -->\n <span *ngIf=\"textError && !textAppend\" class=\"icon is-small is-right\">\n <i class=\"fal fa-times has-text-danger\"></i>\n </span>\n\n <!-- Icon success -->\n <span *ngIf=\"success\" class=\"icon is-small is-right\">\n <i class=\"fas fa-check has-text-success\"></i>\n </span>\n\n <!-- Text Info -->\n <span\n *ngIf=\"textInfo && (textError === null || textError === '') && !progressBar\"\n class=\"is-size-7 wac-input__info text-info\"\n [innerHtml]=\"textInfo\"\n ></span>\n\n <!-- Text Error -->\n <span *ngIf=\"textError && !progressBar\" class=\"is-size-7 wac-input__error has-text-danger\" [innerHtml]=\"textError\"></span>\n </p>\n\n <!-- Progress Bar -->\n <wac-progress-bar *ngIf=\"progressBar\" [min]=\"min\" [max]=\"max\" [valueLength]=\"value.length\"></wac-progress-bar>\n </div>\n </div>\n</div>\n",
1871
+ template: "<div\n class=\"field wac-input\"\n [ngClass]=\"{ 'has-no-block': withoutBlock, 'is-big': big, 'is-medium': medium, 'with-padding': padding, 'indication-left': indicationLeft, 'with-progress-bar': progressBar }\"\n>\n <div class=\"field-label is-normal has-text-left\" *ngIf=\"!withoutBlock\">\n <label\n [ngClass]=\"[boldLabel == 'true' ? 'label has-text-weight-bold' : 'label has-text-weight-normal', showTooltip ? 'label-inline' : '']\"\n [innerHTML]=\"label\"\n [for]=\"id\"\n ></label>\n <wac-tooltip\n *ngIf=\"showTooltip\"\n [tooltipIcon]=\"iconTooltip\"\n [tooltipText]=\"textTooltip\"\n [tooltipLink]=\"linkTooltip\"\n [tooltipUrl]=\"urlTooltip\"\n ></wac-tooltip>\n <!-- Size -->\n <span *ngIf=\"value && size && !progressBar\" class=\"is-size-7 wac-input__size\">\n <strong>{{ value.toString().length }}</strong> / {{ size }}\n </span>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <p\n class=\"control\"\n [ngClass]=\"{ 'has-icons-right': textError || success, 'has-icons-left': icon !== '', 'has-input-group': textAppend || textPrepend }\"\n >\n <!-- Text Prepend -->\n <span *ngIf=\"textPrepend\" class=\"has-input-group\">\n <span class=\"has-input-group-text prepend\">{{ textPrepend }}</span>\n <span *ngIf=\"icon !== ''\" class=\"icon is-small is-left\">\n <i [class]=\"icon\"></i>\n </span>\n </span>\n\n <!-- Input -->\n <input\n [class]=\"'input ' + extraClasses\"\n [id]=\"id\"\n [ngClass]=\"{\n 'is-danger': textError,\n 'is-large': big,\n 'is-number': isNumber,\n 'remove-margin': disableMargin,\n 'text-append': textAppend\n }\"\n [type]=\"type\"\n [placeholder]=\"placeholder\"\n [attr.size]=\"size\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n (blur)=\"onBlur()\"\n [disabled]=\"disabled\"\n (focusout)=\"onFocusOut()\"\n [min]=\"min\"\n [max]=\"max\"\n (keypress)=\"keyPress($event)\"\n />\n\n <!-- Indication at the end of the input -->\n <span class=\"indication\" *ngIf=\"indication\" [ngClass]=\"{'reverse': indicationLeft}\">\n <span [innerHTML]=\"indication\"></span>\n </span>\n\n <!-- Text Append -->\n <span *ngIf=\"textAppend && !indicationLeft\" class=\"has-input-group\">\n <span class=\"has-input-group-text append\">{{ textAppend }}</span>\n <!-- error if text append not empty -->\n <span *ngIf=\"textError\" class=\"icon is-small is-right\">\n <i class=\"fal fa-times has-text-danger\"></i>\n </span>\n </span>\n\n <!-- Icon Left -->\n <span *ngIf=\"icon !== '' && !textPrepend && !indicationLeft\" class=\"icon is-small is-left\">\n <i [class]=\"icon\"></i>\n </span>\n\n <!-- Icon error if textAppend empty -->\n <span *ngIf=\"textError && !textAppend && !indicationLeft\" class=\"icon is-small is-right\">\n <i class=\"fal fa-times has-text-danger\"></i>\n </span>\n\n <!-- Icon success -->\n <span *ngIf=\"success\" class=\"icon is-small is-right\">\n <i class=\"fas fa-check has-text-success\"></i>\n </span>\n\n <!-- Text Info -->\n <span\n *ngIf=\"textInfo && (textError === null || textError === '') && !progressBar && !indicationLeft\"\n class=\"is-size-7 wac-input__info text-info\"\n [innerHtml]=\"textInfo\"\n ></span>\n\n <!-- Text Error -->\n <span *ngIf=\"textError && !progressBar && !indicationLeft\" class=\"is-size-7 wac-input__error has-text-danger\" [innerHtml]=\"textError\"></span>\n </p>\n\n <!-- Progress Bar -->\n <wac-progress-bar *ngIf=\"progressBar && !indicationLeft\" [min]=\"min\" [max]=\"max\" [valueLength]=\"value.length\"></wac-progress-bar>\n </div>\n </div>\n</div>\n",
1877
1872
  providers: [{ provide: forms.NG_VALUE_ACCESSOR, useExisting: InputComponent, multi: true }]
1878
1873
  },] }
1879
1874
  ];
@@ -1908,6 +1903,7 @@
1908
1903
  disabled: [{ type: i0.Input }],
1909
1904
  indication: [{ type: i0.Input }],
1910
1905
  success: [{ type: i0.Input }],
1906
+ indicationLeft: [{ type: i0.Input }],
1911
1907
  keypressEnter: [{ type: i0.Output }]
1912
1908
  };
1913
1909
 
@@ -4045,14 +4041,6 @@
4045
4041
  },] }
4046
4042
  ];
4047
4043
 
4048
- var TableFiltersGroup = /** @class */ (function (_super) {
4049
- __extends(TableFiltersGroup, _super);
4050
- function TableFiltersGroup() {
4051
- return _super !== null && _super.apply(this, arguments) || this;
4052
- }
4053
- return TableFiltersGroup;
4054
- }(i1$1.NwbFilterGroup));
4055
-
4056
4044
  /*
4057
4045
  * Public API Surface of angular-components
4058
4046
  */
@@ -4119,7 +4107,6 @@
4119
4107
  exports.TableColumn = TableColumn;
4120
4108
  exports.TableColumnHeader = TableColumnHeader;
4121
4109
  exports.TableComponent = TableComponent;
4122
- exports.TableFiltersGroup = TableFiltersGroup;
4123
4110
  exports.TableRow = TableRow;
4124
4111
  exports.TagComponent = TagComponent;
4125
4112
  exports.TextAreaComponent = TextAreaComponent;