@gettrx/core-components-angular 1.0.41 → 1.0.43
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/esm2022/lib/molecules/pagination/pagination/gtr-pagination.component.mjs +1 -1
- package/esm2022/lib/molecules/select/select/gtr-select.component.mjs +29 -7
- package/fesm2022/gettrx-core-components-angular.mjs +29 -7
- package/fesm2022/gettrx-core-components-angular.mjs.map +1 -1
- package/lib/molecules/select/select/gtr-select.component.d.ts +8 -3
- package/package.json +2 -2
|
@@ -8211,6 +8211,8 @@ class GtrSelectComponent {
|
|
|
8211
8211
|
this.searchable = false;
|
|
8212
8212
|
/** Allow to disable select box */
|
|
8213
8213
|
this.disabled = false;
|
|
8214
|
+
/** Allow to clean search when closing the select */
|
|
8215
|
+
this.cleanSearchWhenClose = false;
|
|
8214
8216
|
/** Allow to enable readonly state for select box */
|
|
8215
8217
|
this.readonly = false;
|
|
8216
8218
|
/** If is invalid then select box accept error message and style border to red color of select box input wrapper */
|
|
@@ -8365,7 +8367,8 @@ class GtrSelectComponent {
|
|
|
8365
8367
|
if (this.isOpen && !this.touched) {
|
|
8366
8368
|
this.handleTouchEvent();
|
|
8367
8369
|
}
|
|
8368
|
-
if (this.isOpen
|
|
8370
|
+
if (!this.isOpen) {
|
|
8371
|
+
this.handleCloseSelect();
|
|
8369
8372
|
this.gtrBlur.emit(this.autocomplete ? this.autocompleteInputValue : '');
|
|
8370
8373
|
}
|
|
8371
8374
|
}
|
|
@@ -8410,7 +8413,7 @@ class GtrSelectComponent {
|
|
|
8410
8413
|
? (this.valueChanged.emit(this.multipleSelectedValues),
|
|
8411
8414
|
this.onChange(this.multipleSelectedValues))
|
|
8412
8415
|
: '';
|
|
8413
|
-
removeOption ? (toggleSelectBox ?
|
|
8416
|
+
removeOption ? (toggleSelectBox ? this.handleCloseSelect() : '') : '';
|
|
8414
8417
|
}
|
|
8415
8418
|
else {
|
|
8416
8419
|
if (this.lazyLoaded) {
|
|
@@ -8419,7 +8422,7 @@ class GtrSelectComponent {
|
|
|
8419
8422
|
this.selectedValues = [optionValue];
|
|
8420
8423
|
this.selectedValuesRaw = [option];
|
|
8421
8424
|
emitValue ? (this.valueChanged.emit(optionValue), this.onChange(optionValue)) : '';
|
|
8422
|
-
toggleSelectBox ?
|
|
8425
|
+
toggleSelectBox ? this.handleCloseSelect() : '';
|
|
8423
8426
|
}
|
|
8424
8427
|
}
|
|
8425
8428
|
/**
|
|
@@ -8512,12 +8515,13 @@ class GtrSelectComponent {
|
|
|
8512
8515
|
this.multipleSelectedValues = [];
|
|
8513
8516
|
this.multipleSelectedValuesRaw = [];
|
|
8514
8517
|
this.selectedValueLazy = [];
|
|
8518
|
+
this.cleanSearch();
|
|
8515
8519
|
}
|
|
8516
8520
|
}
|
|
8517
8521
|
handleKeyboardNavigations(event) {
|
|
8518
8522
|
if (this.isOpen && !this.isOnlyView) {
|
|
8519
8523
|
if (event.key === 'Escape') {
|
|
8520
|
-
this.
|
|
8524
|
+
this.handleCloseSelect();
|
|
8521
8525
|
}
|
|
8522
8526
|
else if (event.key === 'ArrowDown') {
|
|
8523
8527
|
event.preventDefault();
|
|
@@ -8595,7 +8599,7 @@ class GtrSelectComponent {
|
|
|
8595
8599
|
*/
|
|
8596
8600
|
onClickOutside(event) {
|
|
8597
8601
|
if (!event?.composedPath()?.includes(this._el.nativeElement)) {
|
|
8598
|
-
this.
|
|
8602
|
+
this.handleCloseSelect();
|
|
8599
8603
|
this.gtrBlur.emit(this.autocomplete ? this.autocompleteInputValue : '');
|
|
8600
8604
|
}
|
|
8601
8605
|
}
|
|
@@ -8639,8 +8643,24 @@ class GtrSelectComponent {
|
|
|
8639
8643
|
this.autocompleteInputChanged.emit(this.autocompleteInputValue);
|
|
8640
8644
|
this.filterOptionList();
|
|
8641
8645
|
}
|
|
8646
|
+
handleCloseSelect() {
|
|
8647
|
+
this.isOpen = false;
|
|
8648
|
+
if (this.cleanSearchWhenClose) {
|
|
8649
|
+
this.cleanSearch();
|
|
8650
|
+
}
|
|
8651
|
+
}
|
|
8652
|
+
cleanSearch() {
|
|
8653
|
+
if (this.searchValue && !this.isOpen) {
|
|
8654
|
+
this.searchValue = '';
|
|
8655
|
+
this.searchChanged.emit(this.searchValue || '');
|
|
8656
|
+
this.filterOptionList();
|
|
8657
|
+
}
|
|
8658
|
+
}
|
|
8659
|
+
ngOnDestroy() {
|
|
8660
|
+
this.cleanSearch();
|
|
8661
|
+
}
|
|
8642
8662
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GtrSelectComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8643
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GtrSelectComponent, selector: "gtr-select", inputs: { inputLabel: "inputLabel", placeholder: "placeholder", floatPlaceholder: "floatPlaceholder", labelKey: "labelKey", valueKey: "valueKey", selectedLabel: "selectedLabel", highlightLabel: "highlightLabel", subLabel: "subLabel", isOnlyView: "isOnlyView", value: "value", multiple: "multiple", lazyLoaded: "lazyLoaded", searchable: "searchable", disabled: "disabled", readonly: "readonly", is_invalid: "is_invalid", listLoading: "listLoading", loading: "loading", changeLoading: "changeLoading", listLoaderVariation: "listLoaderVariation", options: "options", textLimit: "textLimit", autoSelect: "autoSelect", autocomplete: "autocomplete", enableAddButton: "enableAddButton", addButtonPosition: "addButtonPosition", addButtonLabel: "addButtonLabel", searchPlaceholder: "searchPlaceholder" }, outputs: { addButtonClicked: "addButtonClicked", valueChanged: "valueChanged", searchChanged: "searchChanged", autocompleteInputChanged: "autocompleteInputChanged", gtrScroll: "gtrScroll", gtrTouched: "gtrTouched", gtrBlur: "gtrBlur" }, host: { listeners: { "keydown": "handleKeyboardNavigations($event)", "window:click": "onClickOutside($event)", "window:resize": "onWindowResize($event)", "window:scroll": "onWindowScroll($event)" } }, providers: [
|
|
8663
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GtrSelectComponent, selector: "gtr-select", inputs: { inputLabel: "inputLabel", placeholder: "placeholder", floatPlaceholder: "floatPlaceholder", labelKey: "labelKey", valueKey: "valueKey", selectedLabel: "selectedLabel", highlightLabel: "highlightLabel", subLabel: "subLabel", isOnlyView: "isOnlyView", value: "value", multiple: "multiple", lazyLoaded: "lazyLoaded", searchable: "searchable", disabled: "disabled", cleanSearchWhenClose: "cleanSearchWhenClose", readonly: "readonly", is_invalid: "is_invalid", listLoading: "listLoading", loading: "loading", changeLoading: "changeLoading", listLoaderVariation: "listLoaderVariation", options: "options", textLimit: "textLimit", autoSelect: "autoSelect", autocomplete: "autocomplete", enableAddButton: "enableAddButton", addButtonPosition: "addButtonPosition", addButtonLabel: "addButtonLabel", searchPlaceholder: "searchPlaceholder" }, outputs: { addButtonClicked: "addButtonClicked", valueChanged: "valueChanged", searchChanged: "searchChanged", autocompleteInputChanged: "autocompleteInputChanged", gtrScroll: "gtrScroll", gtrTouched: "gtrTouched", gtrBlur: "gtrBlur" }, host: { listeners: { "keydown": "handleKeyboardNavigations($event)", "window:click": "onClickOutside($event)", "window:resize": "onWindowResize($event)", "window:scroll": "onWindowScroll($event)" } }, providers: [
|
|
8644
8664
|
{
|
|
8645
8665
|
provide: NG_VALUE_ACCESSOR,
|
|
8646
8666
|
useExisting: forwardRef((() => GtrSelectComponent)),
|
|
@@ -8685,6 +8705,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
8685
8705
|
type: Input
|
|
8686
8706
|
}], disabled: [{
|
|
8687
8707
|
type: Input
|
|
8708
|
+
}], cleanSearchWhenClose: [{
|
|
8709
|
+
type: Input
|
|
8688
8710
|
}], readonly: [{
|
|
8689
8711
|
type: Input
|
|
8690
8712
|
}], is_invalid: [{
|
|
@@ -8867,7 +8889,7 @@ class GtrPaginationComponent {
|
|
|
8867
8889
|
this._setTotalPages();
|
|
8868
8890
|
}
|
|
8869
8891
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GtrPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8870
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "16.2.12", type: GtrPaginationComponent, selector: "gtr-pagination", inputs: { options: "options", identifier: "identifier", disabled: ["disabled", "disabled", booleanAttribute], limit: "limit", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions", hidePageSize: "hidePageSize", showFirstLastButtons: ["showFirstLastButtons", "showFirstLastButtons", booleanAttribute], pageIndex: "pageIndex", ariaLabel: "ariaLabel" }, outputs: { pageEvent: "pageEvent", getNumberOfPages: "getNumberOfPages" }, host: { listeners: { "window:resize": "onScreenResize($event)" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container>\n <div [ngSwitch]=\"options.type\">\n <div *ngSwitchCase=\"'flat'\" class=\"flat\">\n <ng-container *ngIf=\"!this.hidePageSize\">\n <div class=\"gtr-pagination-ps-options-wrapper\">\n <span>Items per Page: </span>\n <gtr-select [value]=\"pageSize\" [options]=\"pageSizeOptions\" [disabled]=\"disabled\"\n (valueChanged)=\"onPageSizeChange($event)\"></gtr-select>\n </div>\n </ng-container>\n\n <nav aria-label=\"page\" [attr.id]=\"identifier || 'gtr__pagination'\"\n [attr.data-testid]=\"identifier || 'gtr__pagination'\" role=\"navigation\"\n [attr.aria-label]=\"ariaLabel || 'gtr__pagination'\">\n <ul class=\"gtr-pagination\">\n <li class=\"gtr-pagination-item\" [class.disabled]=\"pageIndex===1\" (click)=\"changePage(1)\"><a class=\"gtr-pagination-link\"\n href=\"javascript:void(0);\">First\n </a></li>\n <li class=\"gtr-pagination-item\" [class.disabled]=\"pageIndex===1\" (click)=\"changePage(pageIndex - 1)\"><a class=\"gtr-pagination-link\"\n href=\"javascript:void(0);\">\n <gtr-icon name=\"chevron-left\" [size]=\"20\"></gtr-icon>\n </a></li>\n <li class=\"gtr-pagination-item\" [class.disabled]=\"pageIndex===totalPages\" (click)=\"changePage(pageIndex + 1)\"><a class=\"gtr-pagination-link\"\n href=\"javascript:void(0);\">\n <gtr-icon name=\"chevron-right\" [size]=\"20\"></gtr-icon>\n </a></li>\n <li class=\"gtr-pagination-item\" [class.disabled]=\"pageIndex===totalPages\" id=\"gtr-pagination-link-last\" *ngIf=\"!options.hideLast\" (click)=\"changePage(totalPages)\"><a\n class=\"gtr-pagination-link\" href=\"javascript:void(0);\">Last\n </a></li>\n </ul>\n </nav>\n </div>\n <div *ngSwitchDefault>\n <ng-container *ngIf=\"pageIndex !== 0 && pagesArray?.length\">\n <div class=\"gtr-pagination-wrapper\" [attr.id]=\"identifier || 'gtr__pagination'\"\n [attr.data-testid]=\"identifier || 'gtr__pagination'\" role=\"navigation\"\n [attr.aria-label]=\"ariaLabel || 'gtr__pagination'\">\n <ng-container *ngIf=\"!this.hidePageSize\">\n <div class=\"gtr-pagination-ps-options-wrapper\">\n <span>Items per Page: </span>\n <gtr-select [value]=\"pageSize\" [options]=\"pageSizeOptions\" [disabled]=\"disabled\"\n (valueChanged)=\"onPageSizeChange($event)\"></gtr-select>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"showFirstLastButtons\">\n <button tabindex=\"0\" class=\"gtr-pagination-button\" type=\"button\" [disabled]=\"pageIndex === 1 || disabled\"\n (click)=\"changePage(defaultPage)\" aria-label=\"gtr__pagination-first-page\">\n <gtr-icon name=\"chevrons-left\" [size]=\"20\"></gtr-icon>\n </button>\n </ng-container>\n\n <button tabindex=\"0\" class=\"gtr-pagination-button\" type=\"button\" [disabled]=\"pageIndex === 1 || disabled\"\n (click)=\"changePage(pageIndex - 1)\" aria-label=\"gtr__pagination-prev-page\">\n <gtr-icon name=\"chevron-left\" [size]=\"20\"></gtr-icon>\n </button>\n\n <ng-container *ngIf=\"pagesArray?.length\">\n <ng-container *ngFor=\"let page of pagesArray; let i = index\">\n <button type=\"button\" [disabled]=\"disabled\" (click)=\"changePage(page)\"\n [attr.aria-label]=\"'gtr__pagination-page' + page\"\n [attr.aria-current]=\"page === pageIndex ? 'true' : 'false'\" class=\"gtr-pagination-button\"\n [class.active]=\"pageIndex === page\" tabindex=\"0\">\n {{ page | gtrValidatePage : \"...\" }}\n </button>\n </ng-container>\n </ng-container>\n\n <button tabindex=\"0\" class=\"gtr-pagination-button\" type=\"button\"\n [disabled]=\"pageIndex === pagesArray[pagesArray.length - 1] || disabled\" (click)=\"changePage(pageIndex + 1)\"\n aria-label=\"gtr__pagination-next-page\">\n <gtr-icon name=\"chevron-right\" [size]=\"20\"></gtr-icon>\n </button>\n\n <ng-container *ngIf=\"showFirstLastButtons\">\n <button tabindex=\"0\" class=\"gtr-pagination-button\" type=\"button\"\n [disabled]=\"pageIndex === pagesArray[pagesArray.length - 1] || disabled\" (click)=\"changePage(totalPages)\"\n aria-label=\"Last Page\">\n <gtr-icon name=\"chevrons-right\" [size]=\"20\"></gtr-icon>\n </button>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:block;--gtr-pagination-btn-background-color: rgba(75, 70, 92);--gtr-pagination-btn-background-color-30: rgba(75, 70, 92, .3);--gtr-pagination-btn-background-color-10: rgba(75, 70, 92, .08)}.flat{justify-content:space-between;display:flex;align-items:center}.flat .gtr-pagination-ps-options-wrapper{display:flex;flex-direction:row;align-items:center;flex-grow:1}.flat .gtr-pagination-ps-options-wrapper span{font-weight:var(--gtr-size-font-weight-normal);font-size:15px;line-height:24px;color:var(--gtr-color-base-black-40);margin-right:8px}.gtr-pagination{margin:0;display:flex;padding:0;list-style:none;border-radius:6px;gap:4px}.gtr-pagination-item{border-radius:6px;list-style:none;background:#f1f0f2}.gtr-pagination-item.disabled{pointer-events:none;opacity:.8;background-color:#f3f2f7}.gtr-pagination-item:last-child{border-top-right-radius:6px!important;border-bottom-right-radius:6px!important}.gtr-pagination-item.disabled .gtr-pagination-link{color:#b9b9c3}.gtr-pagination-item .gtr-pagination-link{line-height:1.3;border:none;margin:0;font-size:1rem;min-width:2.286rem;display:flex;align-items:center;justify-content:center;padding:.5rem .85rem;text-decoration:none;color:var(--gtr-color-base-black-60);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.gtr-pagination-link:hover{color:var(--gtr-color-base-primary-100)}.gtr-pagination-item .gtr-pagination-link:focus{color:var(--gtr-color-base-primary-100);background:#ededed}.gtr-pagination-item:last-child .gtr-pagination-link:focus{border-top-right-radius:6px!important;border-bottom-right-radius:6px!important}.gtr-pagination-item:first-child .gtr-pagination-link:focus{border-top-left-radius:6px!important;border-bottom-left-radius:6px!important}.gtr-pagination-item.disabled .gtr-pagination-link:focus{color:var(--gtr-color-base-black-60);pointer-events:none;opacity:.8;background-color:#f3f2f7}.gtr-pagination-link:focus{box-shadow:none}.gtr-pagination-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center}.gtr-pagination-wrapper .gtr-pagination-ps-options-wrapper{display:flex;flex-direction:row;align-items:center;flex-grow:1}.gtr-pagination-wrapper .gtr-pagination-ps-options-wrapper gtr-select{min-width:76px}.gtr-pagination-wrapper .gtr-pagination-ps-options-wrapper gtr-select::ng-deep .gtr-options-wrapper{min-width:auto}.gtr-pagination-wrapper .gtr-pagination-ps-options-wrapper span{font-family:var(--gtr-component-font-family-base);font-weight:var(--gtr-size-font-weight-normal);font-size:15px;line-height:24px;color:var(--gtr-color-base-black-40);margin-right:8px}.gtr-pagination-wrapper .gtr-pagination-button{display:flex;align-items:center;justify-content:center;min-width:34px;max-width:-moz-fit-content;max-width:fit-content;height:34px;background:var(--gtr-pagination-btn-background-color-10);border-radius:6px;line-height:22px;font-size:15px;outline:none;border:none;cursor:pointer;margin-left:4px;font-family:var(--gtr-component-font-family-base);transition:ease-in-out;transition-duration:.1s;position:relative;color:var(--gtr-color-base-black-60);margin-bottom:4px}.gtr-pagination-wrapper .gtr-pagination-button:disabled{cursor:default;pointer-events:none;opacity:.8}.gtr-pagination-wrapper .gtr-pagination-button:disabled gtr-icon{opacity:.5}.gtr-pagination-wrapper .gtr-pagination-button:hover,.gtr-pagination-wrapper .gtr-pagination-button:focus{background:var(--gtr-pagination-btn-background-color-30)}.gtr-pagination-wrapper .gtr-pagination-button.active{background:var(--gtr-color-base-primary-100);color:var(--gtr-color-font-inverse-primary);box-shadow:var(--gtr-content-box-shadow-20)}@media only screen and (max-width: 540px){.flat{justify-content:space-between;display:flex;flex-direction:column;align-items:end}.gtr-pagination-wrapper{justify-content:end!important}.gtr-pagination-ps-options-wrapper{width:100%;align-items:center;justify-content:end;margin-bottom:1em}}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: GtrSelectComponent, selector: "gtr-select", inputs: ["inputLabel", "placeholder", "floatPlaceholder", "labelKey", "valueKey", "selectedLabel", "highlightLabel", "subLabel", "isOnlyView", "value", "multiple", "lazyLoaded", "searchable", "disabled", "readonly", "is_invalid", "listLoading", "loading", "changeLoading", "listLoaderVariation", "options", "textLimit", "autoSelect", "autocomplete", "enableAddButton", "addButtonPosition", "addButtonLabel", "searchPlaceholder"], outputs: ["addButtonClicked", "valueChanged", "searchChanged", "autocompleteInputChanged", "gtrScroll", "gtrTouched", "gtrBlur"] }, { kind: "component", type: GtrIconComponent, selector: "gtr-icon", inputs: ["name", "weight", "color", "size", "iconId"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: GtrValidatePagePipe, name: "gtrValidatePage" }] }); }
|
|
8892
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "16.2.12", type: GtrPaginationComponent, selector: "gtr-pagination", inputs: { options: "options", identifier: "identifier", disabled: ["disabled", "disabled", booleanAttribute], limit: "limit", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions", hidePageSize: "hidePageSize", showFirstLastButtons: ["showFirstLastButtons", "showFirstLastButtons", booleanAttribute], pageIndex: "pageIndex", ariaLabel: "ariaLabel" }, outputs: { pageEvent: "pageEvent", getNumberOfPages: "getNumberOfPages" }, host: { listeners: { "window:resize": "onScreenResize($event)" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container>\n <div [ngSwitch]=\"options.type\">\n <div *ngSwitchCase=\"'flat'\" class=\"flat\">\n <ng-container *ngIf=\"!this.hidePageSize\">\n <div class=\"gtr-pagination-ps-options-wrapper\">\n <span>Items per Page: </span>\n <gtr-select [value]=\"pageSize\" [options]=\"pageSizeOptions\" [disabled]=\"disabled\"\n (valueChanged)=\"onPageSizeChange($event)\"></gtr-select>\n </div>\n </ng-container>\n\n <nav aria-label=\"page\" [attr.id]=\"identifier || 'gtr__pagination'\"\n [attr.data-testid]=\"identifier || 'gtr__pagination'\" role=\"navigation\"\n [attr.aria-label]=\"ariaLabel || 'gtr__pagination'\">\n <ul class=\"gtr-pagination\">\n <li class=\"gtr-pagination-item\" [class.disabled]=\"pageIndex===1\" (click)=\"changePage(1)\"><a class=\"gtr-pagination-link\"\n href=\"javascript:void(0);\">First\n </a></li>\n <li class=\"gtr-pagination-item\" [class.disabled]=\"pageIndex===1\" (click)=\"changePage(pageIndex - 1)\"><a class=\"gtr-pagination-link\"\n href=\"javascript:void(0);\">\n <gtr-icon name=\"chevron-left\" [size]=\"20\"></gtr-icon>\n </a></li>\n <li class=\"gtr-pagination-item\" [class.disabled]=\"pageIndex===totalPages\" (click)=\"changePage(pageIndex + 1)\"><a class=\"gtr-pagination-link\"\n href=\"javascript:void(0);\">\n <gtr-icon name=\"chevron-right\" [size]=\"20\"></gtr-icon>\n </a></li>\n <li class=\"gtr-pagination-item\" [class.disabled]=\"pageIndex===totalPages\" id=\"gtr-pagination-link-last\" *ngIf=\"!options.hideLast\" (click)=\"changePage(totalPages)\"><a\n class=\"gtr-pagination-link\" href=\"javascript:void(0);\">Last\n </a></li>\n </ul>\n </nav>\n </div>\n <div *ngSwitchDefault>\n <ng-container *ngIf=\"pageIndex !== 0 && pagesArray?.length\">\n <div class=\"gtr-pagination-wrapper\" [attr.id]=\"identifier || 'gtr__pagination'\"\n [attr.data-testid]=\"identifier || 'gtr__pagination'\" role=\"navigation\"\n [attr.aria-label]=\"ariaLabel || 'gtr__pagination'\">\n <ng-container *ngIf=\"!this.hidePageSize\">\n <div class=\"gtr-pagination-ps-options-wrapper\">\n <span>Items per Page: </span>\n <gtr-select [value]=\"pageSize\" [options]=\"pageSizeOptions\" [disabled]=\"disabled\"\n (valueChanged)=\"onPageSizeChange($event)\"></gtr-select>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"showFirstLastButtons\">\n <button tabindex=\"0\" class=\"gtr-pagination-button\" type=\"button\" [disabled]=\"pageIndex === 1 || disabled\"\n (click)=\"changePage(defaultPage)\" aria-label=\"gtr__pagination-first-page\">\n <gtr-icon name=\"chevrons-left\" [size]=\"20\"></gtr-icon>\n </button>\n </ng-container>\n\n <button tabindex=\"0\" class=\"gtr-pagination-button\" type=\"button\" [disabled]=\"pageIndex === 1 || disabled\"\n (click)=\"changePage(pageIndex - 1)\" aria-label=\"gtr__pagination-prev-page\">\n <gtr-icon name=\"chevron-left\" [size]=\"20\"></gtr-icon>\n </button>\n\n <ng-container *ngIf=\"pagesArray?.length\">\n <ng-container *ngFor=\"let page of pagesArray; let i = index\">\n <button type=\"button\" [disabled]=\"disabled\" (click)=\"changePage(page)\"\n [attr.aria-label]=\"'gtr__pagination-page' + page\"\n [attr.aria-current]=\"page === pageIndex ? 'true' : 'false'\" class=\"gtr-pagination-button\"\n [class.active]=\"pageIndex === page\" tabindex=\"0\">\n {{ page | gtrValidatePage : \"...\" }}\n </button>\n </ng-container>\n </ng-container>\n\n <button tabindex=\"0\" class=\"gtr-pagination-button\" type=\"button\"\n [disabled]=\"pageIndex === pagesArray[pagesArray.length - 1] || disabled\" (click)=\"changePage(pageIndex + 1)\"\n aria-label=\"gtr__pagination-next-page\">\n <gtr-icon name=\"chevron-right\" [size]=\"20\"></gtr-icon>\n </button>\n\n <ng-container *ngIf=\"showFirstLastButtons\">\n <button tabindex=\"0\" class=\"gtr-pagination-button\" type=\"button\"\n [disabled]=\"pageIndex === pagesArray[pagesArray.length - 1] || disabled\" (click)=\"changePage(totalPages)\"\n aria-label=\"Last Page\">\n <gtr-icon name=\"chevrons-right\" [size]=\"20\"></gtr-icon>\n </button>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:block;--gtr-pagination-btn-background-color: rgba(75, 70, 92);--gtr-pagination-btn-background-color-30: rgba(75, 70, 92, .3);--gtr-pagination-btn-background-color-10: rgba(75, 70, 92, .08)}.flat{justify-content:space-between;display:flex;align-items:center}.flat .gtr-pagination-ps-options-wrapper{display:flex;flex-direction:row;align-items:center;flex-grow:1}.flat .gtr-pagination-ps-options-wrapper span{font-weight:var(--gtr-size-font-weight-normal);font-size:15px;line-height:24px;color:var(--gtr-color-base-black-40);margin-right:8px}.gtr-pagination{margin:0;display:flex;padding:0;list-style:none;border-radius:6px;gap:4px}.gtr-pagination-item{border-radius:6px;list-style:none;background:#f1f0f2}.gtr-pagination-item.disabled{pointer-events:none;opacity:.8;background-color:#f3f2f7}.gtr-pagination-item:last-child{border-top-right-radius:6px!important;border-bottom-right-radius:6px!important}.gtr-pagination-item.disabled .gtr-pagination-link{color:#b9b9c3}.gtr-pagination-item .gtr-pagination-link{line-height:1.3;border:none;margin:0;font-size:1rem;min-width:2.286rem;display:flex;align-items:center;justify-content:center;padding:.5rem .85rem;text-decoration:none;color:var(--gtr-color-base-black-60);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}.gtr-pagination-link:hover{color:var(--gtr-color-base-primary-100)}.gtr-pagination-item .gtr-pagination-link:focus{color:var(--gtr-color-base-primary-100);background:#ededed}.gtr-pagination-item:last-child .gtr-pagination-link:focus{border-top-right-radius:6px!important;border-bottom-right-radius:6px!important}.gtr-pagination-item:first-child .gtr-pagination-link:focus{border-top-left-radius:6px!important;border-bottom-left-radius:6px!important}.gtr-pagination-item.disabled .gtr-pagination-link:focus{color:var(--gtr-color-base-black-60);pointer-events:none;opacity:.8;background-color:#f3f2f7}.gtr-pagination-link:focus{box-shadow:none}.gtr-pagination-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center}.gtr-pagination-wrapper .gtr-pagination-ps-options-wrapper{display:flex;flex-direction:row;align-items:center;flex-grow:1}.gtr-pagination-wrapper .gtr-pagination-ps-options-wrapper gtr-select{min-width:76px}.gtr-pagination-wrapper .gtr-pagination-ps-options-wrapper gtr-select::ng-deep .gtr-options-wrapper{min-width:auto}.gtr-pagination-wrapper .gtr-pagination-ps-options-wrapper span{font-family:var(--gtr-component-font-family-base);font-weight:var(--gtr-size-font-weight-normal);font-size:15px;line-height:24px;color:var(--gtr-color-base-black-40);margin-right:8px}.gtr-pagination-wrapper .gtr-pagination-button{display:flex;align-items:center;justify-content:center;min-width:34px;max-width:-moz-fit-content;max-width:fit-content;height:34px;background:var(--gtr-pagination-btn-background-color-10);border-radius:6px;line-height:22px;font-size:15px;outline:none;border:none;cursor:pointer;margin-left:4px;font-family:var(--gtr-component-font-family-base);transition:ease-in-out;transition-duration:.1s;position:relative;color:var(--gtr-color-base-black-60);margin-bottom:4px}.gtr-pagination-wrapper .gtr-pagination-button:disabled{cursor:default;pointer-events:none;opacity:.8}.gtr-pagination-wrapper .gtr-pagination-button:disabled gtr-icon{opacity:.5}.gtr-pagination-wrapper .gtr-pagination-button:hover,.gtr-pagination-wrapper .gtr-pagination-button:focus{background:var(--gtr-pagination-btn-background-color-30)}.gtr-pagination-wrapper .gtr-pagination-button.active{background:var(--gtr-color-base-primary-100);color:var(--gtr-color-font-inverse-primary);box-shadow:var(--gtr-content-box-shadow-20)}@media only screen and (max-width: 540px){.flat{justify-content:space-between;display:flex;flex-direction:column;align-items:end}.gtr-pagination-wrapper{justify-content:end!important}.gtr-pagination-ps-options-wrapper{width:100%;align-items:center;justify-content:end;margin-bottom:1em}}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: GtrSelectComponent, selector: "gtr-select", inputs: ["inputLabel", "placeholder", "floatPlaceholder", "labelKey", "valueKey", "selectedLabel", "highlightLabel", "subLabel", "isOnlyView", "value", "multiple", "lazyLoaded", "searchable", "disabled", "cleanSearchWhenClose", "readonly", "is_invalid", "listLoading", "loading", "changeLoading", "listLoaderVariation", "options", "textLimit", "autoSelect", "autocomplete", "enableAddButton", "addButtonPosition", "addButtonLabel", "searchPlaceholder"], outputs: ["addButtonClicked", "valueChanged", "searchChanged", "autocompleteInputChanged", "gtrScroll", "gtrTouched", "gtrBlur"] }, { kind: "component", type: GtrIconComponent, selector: "gtr-icon", inputs: ["name", "weight", "color", "size", "iconId"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: GtrValidatePagePipe, name: "gtrValidatePage" }] }); }
|
|
8871
8893
|
}
|
|
8872
8894
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GtrPaginationComponent, decorators: [{
|
|
8873
8895
|
type: Component,
|