@wizishop/angular-components 0.0.88 → 0.0.101

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.
@@ -5379,11 +5379,18 @@ h4.wac-h4 {
5379
5379
  color: $wac-second-color;
5380
5380
  font-size: rem(14);
5381
5381
  padding: 7.5px 20px;
5382
- background-color: $wac-border-form;
5383
- border: 1px solid $wac-border-form;
5384
- border-radius: 3px;
5382
+ background-color: $gray-background;
5383
+ border-left: 1px solid $wac-border-form;
5384
+ border-radius: 3px 3px 0 0;
5385
5385
  white-space: nowrap;
5386
5386
  transition: .3s ease;
5387
+ &.reverse {
5388
+ right: auto;
5389
+ left: 1px;
5390
+ border-radius: 3px 0 0 3px;
5391
+ border-left: none;
5392
+ border-right: 1px solid $wac-border-form;
5393
+ }
5387
5394
  }
5388
5395
  input:focus {
5389
5396
  & + .indication {
@@ -5398,6 +5405,36 @@ h4.wac-h4 {
5398
5405
  color: $wac-green-color;
5399
5406
  font-size: rem(14);
5400
5407
  }
5408
+
5409
+ .indication-left {
5410
+ .control {
5411
+ display: flex;
5412
+ flex-direction: row-reverse;
5413
+ width: 100%;
5414
+ border: 1px solid $border-form;
5415
+ border-radius: 3px;
5416
+ overflow: hidden;
5417
+ &:hover, &:focus {
5418
+ border-color: $wizishop-blue;
5419
+ }
5420
+ input {
5421
+ border: none!important;
5422
+ padding: 0 10px!important;
5423
+ margin: 0!important;
5424
+ }
5425
+ .indication {
5426
+ position: relative;
5427
+ top: auto;
5428
+ left: auto;
5429
+ right: auto;
5430
+ padding: 8px 20px;
5431
+ height: 40px;
5432
+ display: flex;
5433
+ align-items: center;
5434
+ justify-content: center;
5435
+ }
5436
+ }
5437
+ }
5401
5438
  div.wac-field-input-search {
5402
5439
  padding: 20px;
5403
5440
  background-color: $wac-gray-background;
@@ -722,6 +722,9 @@
722
722
  currentPage: currentPage
723
723
  });
724
724
  };
725
+ /*
726
+ Add defaults filters in the URL if they not exists.
727
+ */
725
728
  FiltersTableService.prototype.setInitialPaginationFiltersIfNotExist = function (dataTableName, itemsPerPage, currentPage) {
726
729
  var filterGroup = this.getTableFilterGroup(dataTableName);
727
730
  filterGroup.setValues({
@@ -764,14 +767,11 @@
764
767
  this.headerCheckBoxId = uuid.v4(); // Create checkbox unique id
765
768
  /* Handle routing filters */
766
769
  if (this.tableRoutingName) {
767
- console.log('ngOnInit TableComponent');
770
+ this.filtersTableService.setInitialPaginationFiltersIfNotExist(this.tableRoutingName, this.tableFilters.itemsPerPage, this.tableFilters.currentPage);
768
771
  this._tableFiltersGroup = this.filtersTableService.getTableFilterGroup(this.tableRoutingName);
769
772
  this.setTablesFilters();
770
- // Performe initial fetch data
771
- //this._tableFiltersGroup.valuesChange$.next([]);
772
773
  // Listen to filters changes with debounced time to limit multiple api calls
773
774
  this.filterGroupChangeSub = this._tableFiltersGroup.valuesChange$.subscribe(function (filters) {
774
- console.log('valuesChange', filters);
775
775
  _this.setTablesFilters();
776
776
  });
777
777
  }
@@ -817,7 +817,6 @@
817
817
  totalItems: this.tableFilters.totalItems
818
818
  };
819
819
  this.tableFiltersChange.emit(this.tableFilters);
820
- console.log('tableFiltersValuesChange$.next');
821
820
  this._tableFiltersGroup.tableFiltersValuesChange$.next(this.tableFilters);
822
821
  };
823
822
  TableComponent.prototype.ngDestroy = function () {
@@ -1818,6 +1817,7 @@
1818
1817
  this.disabled = false;
1819
1818
  this.indication = false;
1820
1819
  this.success = false;
1820
+ this.indicationLeft = false;
1821
1821
  this.keypressEnter = new i0.EventEmitter();
1822
1822
  this.KEYPRESS_ENTER = "Enter";
1823
1823
  this.id = 'wz-input_' +
@@ -1873,7 +1873,7 @@
1873
1873
  InputComponent.decorators = [
1874
1874
  { type: i0.Component, args: [{
1875
1875
  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",
1876
+ 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
1877
  providers: [{ provide: forms.NG_VALUE_ACCESSOR, useExisting: InputComponent, multi: true }]
1878
1878
  },] }
1879
1879
  ];
@@ -1908,6 +1908,7 @@
1908
1908
  disabled: [{ type: i0.Input }],
1909
1909
  indication: [{ type: i0.Input }],
1910
1910
  success: [{ type: i0.Input }],
1911
+ indicationLeft: [{ type: i0.Input }],
1911
1912
  keypressEnter: [{ type: i0.Output }]
1912
1913
  };
1913
1914