@wizishop/angular-components 0.0.87 → 0.0.100
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/angular-components.scss +40 -3
- package/bundles/wizishop-angular-components.umd.js +19 -17
- package/bundles/wizishop-angular-components.umd.js.map +1 -1
- package/bundles/wizishop-angular-components.umd.min.js +1 -1
- package/bundles/wizishop-angular-components.umd.min.js.map +1 -1
- package/esm2015/lib/components/inputs/input/input.component.js +4 -2
- package/esm2015/lib/components/table/shared/filters-table.service.js +4 -1
- package/esm2015/lib/components/table/table.component.js +14 -17
- package/fesm2015/wizishop-angular-components.js +19 -17
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/inputs/input/input.component.d.ts +1 -0
- package/lib/components/table/table.component.d.ts +1 -1
- package/package.json +1 -1
- package/wizishop-angular-components-0.0.100.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.87.tgz +0 -0
package/angular-components.scss
CHANGED
|
@@ -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: $
|
|
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,13 +767,11 @@
|
|
|
764
767
|
this.headerCheckBoxId = uuid.v4(); // Create checkbox unique id
|
|
765
768
|
/* Handle routing filters */
|
|
766
769
|
if (this.tableRoutingName) {
|
|
767
|
-
this.
|
|
770
|
+
this.filtersTableService.setInitialPaginationFiltersIfNotExist(this.tableRoutingName, this.tableFilters.itemsPerPage, this.tableFilters.currentPage);
|
|
771
|
+
this._tableFiltersGroup = this.filtersTableService.getTableFilterGroup(this.tableRoutingName);
|
|
768
772
|
this.setTablesFilters();
|
|
769
|
-
// Performe initial fetch data
|
|
770
|
-
this._filterGroup.valuesChange$.next([]);
|
|
771
773
|
// Listen to filters changes with debounced time to limit multiple api calls
|
|
772
|
-
this.filterGroupChangeSub = this.
|
|
773
|
-
console.log('valuesChange', filters);
|
|
774
|
+
this.filterGroupChangeSub = this._tableFiltersGroup.valuesChange$.subscribe(function (filters) {
|
|
774
775
|
_this.setTablesFilters();
|
|
775
776
|
});
|
|
776
777
|
}
|
|
@@ -785,8 +786,8 @@
|
|
|
785
786
|
this.tableFilters.currentPage = 1;
|
|
786
787
|
this.tableFiltersChange.emit(this.tableFilters);
|
|
787
788
|
// Reset routing filters
|
|
788
|
-
if (this.
|
|
789
|
-
this.
|
|
789
|
+
if (this._tableFiltersGroup) {
|
|
790
|
+
this._tableFiltersGroup.setValues({
|
|
790
791
|
searchValue: this.tableFilters.searchValue,
|
|
791
792
|
sort: undefined,
|
|
792
793
|
order: undefined,
|
|
@@ -796,8 +797,8 @@
|
|
|
796
797
|
};
|
|
797
798
|
TableComponent.prototype.pageChange = function () {
|
|
798
799
|
this.tableFiltersChange.emit(this.tableFilters);
|
|
799
|
-
if (this.
|
|
800
|
-
this.
|
|
800
|
+
if (this._tableFiltersGroup) {
|
|
801
|
+
this._tableFiltersGroup.setValues({
|
|
801
802
|
itemsPerPage: this.tableFilters.itemsPerPage,
|
|
802
803
|
currentPage: this.tableFilters.currentPage
|
|
803
804
|
});
|
|
@@ -808,16 +809,15 @@
|
|
|
808
809
|
* */
|
|
809
810
|
TableComponent.prototype.setTablesFilters = function () {
|
|
810
811
|
this.tableFilters = {
|
|
811
|
-
sort: this.
|
|
812
|
-
order: this.
|
|
813
|
-
searchValue: this.
|
|
814
|
-
itemsPerPage: this.
|
|
815
|
-
currentPage: this.
|
|
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,
|
|
816
817
|
totalItems: this.tableFilters.totalItems
|
|
817
818
|
};
|
|
818
819
|
this.tableFiltersChange.emit(this.tableFilters);
|
|
819
|
-
|
|
820
|
-
this._filterGroup.tableFiltersValuesChange$.next(this.tableFilters);
|
|
820
|
+
this._tableFiltersGroup.tableFiltersValuesChange$.next(this.tableFilters);
|
|
821
821
|
};
|
|
822
822
|
TableComponent.prototype.ngDestroy = function () {
|
|
823
823
|
if (this.filterGroupChangeSub) {
|
|
@@ -1817,6 +1817,7 @@
|
|
|
1817
1817
|
this.disabled = false;
|
|
1818
1818
|
this.indication = false;
|
|
1819
1819
|
this.success = false;
|
|
1820
|
+
this.indicationLeft = false;
|
|
1820
1821
|
this.keypressEnter = new i0.EventEmitter();
|
|
1821
1822
|
this.KEYPRESS_ENTER = "Enter";
|
|
1822
1823
|
this.id = 'wz-input_' +
|
|
@@ -1872,7 +1873,7 @@
|
|
|
1872
1873
|
InputComponent.decorators = [
|
|
1873
1874
|
{ type: i0.Component, args: [{
|
|
1874
1875
|
selector: 'wac-input',
|
|
1875
|
-
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",
|
|
1876
1877
|
providers: [{ provide: forms.NG_VALUE_ACCESSOR, useExisting: InputComponent, multi: true }]
|
|
1877
1878
|
},] }
|
|
1878
1879
|
];
|
|
@@ -1907,6 +1908,7 @@
|
|
|
1907
1908
|
disabled: [{ type: i0.Input }],
|
|
1908
1909
|
indication: [{ type: i0.Input }],
|
|
1909
1910
|
success: [{ type: i0.Input }],
|
|
1911
|
+
indicationLeft: [{ type: i0.Input }],
|
|
1910
1912
|
keypressEnter: [{ type: i0.Output }]
|
|
1911
1913
|
};
|
|
1912
1914
|
|