asksuite-citrus 1.5.0 → 1.5.1
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/asksuite-citrus.module.mjs +8 -3
- package/esm2022/lib/components/pagination/pagination.component.mjs +13 -3
- package/esm2022/lib/components/table/table.component.mjs +12 -5
- package/esm2022/lib/pipes/paginate/paginate.helper.mjs +12 -0
- package/esm2022/lib/pipes/paginate/paginate.pipe.mjs +25 -0
- package/esm2022/public-api.mjs +5 -1
- package/fesm2022/asksuite-citrus.mjs +111 -57
- package/fesm2022/asksuite-citrus.mjs.map +1 -1
- package/lib/asksuite-citrus.module.d.ts +8 -7
- package/lib/components/pagination/pagination.component.d.ts +4 -2
- package/lib/components/table/table.component.d.ts +8 -2
- package/lib/pipes/paginate/paginate.helper.d.ts +3 -0
- package/lib/pipes/paginate/paginate.pipe.d.ts +10 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
@@ -29,14 +29,15 @@ import * as i27 from "./components/accordion/accordion.component";
|
|
29
29
|
import * as i28 from "./components/accordion/extendable-panel/extendable-panel.component";
|
30
30
|
import * as i29 from "./components/table/table.component";
|
31
31
|
import * as i30 from "./components/pagination/pagination.component";
|
32
|
-
import * as i31 from "
|
33
|
-
import * as i32 from "@angular/
|
34
|
-
import * as i33 from "@angular/
|
35
|
-
import * as i34 from "@
|
36
|
-
import * as i35 from "ngx-
|
37
|
-
import * as i36 from "
|
32
|
+
import * as i31 from "./pipes/paginate/paginate.pipe";
|
33
|
+
import * as i32 from "@angular/common";
|
34
|
+
import * as i33 from "@angular/forms";
|
35
|
+
import * as i34 from "@angular/cdk/overlay";
|
36
|
+
import * as i35 from "@ngx-translate/core";
|
37
|
+
import * as i36 from "ngx-skeleton-loader";
|
38
|
+
import * as i37 from "@angular/material/tooltip";
|
38
39
|
export declare class AsksuiteCitrusModule {
|
39
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<AsksuiteCitrusModule, never>;
|
40
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AsksuiteCitrusModule, [typeof i1.ButtonComponent, typeof i2.InputComponent, typeof i3.SelectComponent, typeof i4.BoxComponent, typeof i5.AvatarComponent, typeof i6.DropdownContainerComponent, typeof i7.AskDropdownDirective, typeof i8.AutocompleteComponent, typeof i9.ChipsComponent, typeof i10.CheckboxComponent, typeof i11.DatePickerComponent, typeof i12.DatePickerCalendarComponent, typeof i13.SkeletonComponent, typeof i14.SpinnerComponent, typeof i15.SpinnerDirective, typeof i16.BadgeDirective, typeof i17.AutofocusDirective, typeof i18.ScrollDirective, typeof i19.AskTooltipDirective, typeof i20.ToastComponent, typeof i21.AskButtonDirective, typeof i22.ModalComponent, typeof i23.ModalBodyDirective, typeof i24.ModalHeaderDirective, typeof i25.ModalFooterDirective, typeof i26.CharacterCounterComponent, typeof i27.AccordionComponent, typeof i28.ExtendablePanelComponent, typeof i29.TableComponent, typeof i30.PaginationComponent], [typeof
|
41
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AsksuiteCitrusModule, [typeof i1.ButtonComponent, typeof i2.InputComponent, typeof i3.SelectComponent, typeof i4.BoxComponent, typeof i5.AvatarComponent, typeof i6.DropdownContainerComponent, typeof i7.AskDropdownDirective, typeof i8.AutocompleteComponent, typeof i9.ChipsComponent, typeof i10.CheckboxComponent, typeof i11.DatePickerComponent, typeof i12.DatePickerCalendarComponent, typeof i13.SkeletonComponent, typeof i14.SpinnerComponent, typeof i15.SpinnerDirective, typeof i16.BadgeDirective, typeof i17.AutofocusDirective, typeof i18.ScrollDirective, typeof i19.AskTooltipDirective, typeof i20.ToastComponent, typeof i21.AskButtonDirective, typeof i22.ModalComponent, typeof i23.ModalBodyDirective, typeof i24.ModalHeaderDirective, typeof i25.ModalFooterDirective, typeof i26.CharacterCounterComponent, typeof i27.AccordionComponent, typeof i28.ExtendablePanelComponent, typeof i29.TableComponent, typeof i30.PaginationComponent, typeof i31.PaginatePipe], [typeof i32.CommonModule, typeof i33.FormsModule, typeof i33.ReactiveFormsModule, typeof i34.CdkOverlayOrigin, typeof i34.CdkConnectedOverlay, typeof i34.OverlayModule, typeof i35.TranslateModule, typeof i36.NgxSkeletonLoaderModule, typeof i37.MatTooltipModule], [typeof i1.ButtonComponent, typeof i2.InputComponent, typeof i3.SelectComponent, typeof i4.BoxComponent, typeof i5.AvatarComponent, typeof i6.DropdownContainerComponent, typeof i7.AskDropdownDirective, typeof i8.AutocompleteComponent, typeof i9.ChipsComponent, typeof i10.CheckboxComponent, typeof i11.DatePickerComponent, typeof i12.DatePickerCalendarComponent, typeof i13.SkeletonComponent, typeof i15.SpinnerDirective, typeof i16.BadgeDirective, typeof i17.AutofocusDirective, typeof i18.ScrollDirective, typeof i19.AskTooltipDirective, typeof i21.AskButtonDirective, typeof i23.ModalBodyDirective, typeof i24.ModalHeaderDirective, typeof i25.ModalFooterDirective, typeof i26.CharacterCounterComponent, typeof i27.AccordionComponent, typeof i28.ExtendablePanelComponent, typeof i29.TableComponent, typeof i30.PaginationComponent, typeof i31.PaginatePipe]>;
|
41
42
|
static ɵinj: i0.ɵɵInjectorDeclaration<AsksuiteCitrusModule>;
|
42
43
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
1
|
+
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
2
2
|
import * as i0 from "@angular/core";
|
3
3
|
type PageItem = {
|
4
4
|
page: string;
|
@@ -10,7 +10,7 @@ export type PageChangeEvent = {
|
|
10
10
|
page: number;
|
11
11
|
pageSize: number;
|
12
12
|
};
|
13
|
-
export declare class PaginationComponent implements OnInit {
|
13
|
+
export declare class PaginationComponent implements OnInit, OnChanges {
|
14
14
|
maxPages: number;
|
15
15
|
maxPageItemsOnDisplay: number;
|
16
16
|
resultsPerPage: number;
|
@@ -22,6 +22,7 @@ export declare class PaginationComponent implements OnInit {
|
|
22
22
|
protected disablePrevious: boolean;
|
23
23
|
protected disableNext: boolean;
|
24
24
|
ngOnInit(): void;
|
25
|
+
ngOnChanges(changes: SimpleChanges): void;
|
25
26
|
changePage(page: number): void;
|
26
27
|
private buildDisplay;
|
27
28
|
private buildCurrentPageGroup;
|
@@ -30,6 +31,7 @@ export declare class PaginationComponent implements OnInit {
|
|
30
31
|
private getPageItem;
|
31
32
|
private incrementPageGroup;
|
32
33
|
private getGroupByPage;
|
34
|
+
protected handleResultsPerPageChange(value: string): void;
|
33
35
|
protected emitChange(): void;
|
34
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationComponent, never>;
|
35
37
|
static ɵcmp: i0.ɵɵComponentDeclaration<PaginationComponent, "ask-pagination", never, { "maxPages": { "alias": "maxPages"; "required": true; }; "maxPageItemsOnDisplay": { "alias": "maxPageItemsOnDisplay"; "required": false; }; "resultsPerPage": { "alias": "resultsPerPage"; "required": false; }; "resultsPerPageOptions": { "alias": "resultsPerPageOptions"; "required": false; }; }, { "pageChange": "pageChange"; }, never, never, false, never>;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
2
|
+
import { PageChangeEvent } from "../pagination/pagination.component";
|
2
3
|
import * as i0 from "@angular/core";
|
3
4
|
export type ColumnConfig = {
|
4
5
|
title: string;
|
@@ -14,6 +15,8 @@ export type ColumnConfig = {
|
|
14
15
|
};
|
15
16
|
export type PaginationConfig = {
|
16
17
|
itemsPerPage: number;
|
18
|
+
itemsPerPageOptions?: Array<number>;
|
19
|
+
maxPageItemsOnDisplay?: number;
|
17
20
|
totalItems: number;
|
18
21
|
currentPage: number;
|
19
22
|
totalPages: number;
|
@@ -26,13 +29,16 @@ export type TableConfig = {
|
|
26
29
|
};
|
27
30
|
export declare class TableComponent {
|
28
31
|
private _tableConfig;
|
32
|
+
protected readonly ITEMS_PER_PAGE_OPTIONS_DEFAULT: number[];
|
33
|
+
protected readonly MAX_PAGE_ITEMS_ON_DISPLAY = 5;
|
29
34
|
set tableConfig(config: TableConfig);
|
30
35
|
data: any[];
|
31
36
|
sort: EventEmitter<any>;
|
37
|
+
pageChange: EventEmitter<PageChangeEvent>;
|
32
38
|
maxHeight?: number;
|
33
|
-
onPageChange(): void;
|
39
|
+
onPageChange(event: PageChangeEvent): void;
|
34
40
|
get tableConfig(): TableConfig;
|
35
41
|
onSort(column: ColumnConfig): void;
|
36
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "ask-table", never, { "tableConfig": { "alias": "tableConfig"; "required": false; }; "data": { "alias": "data"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; }, { "sort": "sort"; }, never, ["[ask-table-body]", "[ask-table-totalizer]"], false, never>;
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "ask-table", never, { "tableConfig": { "alias": "tableConfig"; "required": false; }; "data": { "alias": "data"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; }, { "sort": "sort"; "pageChange": "pageChange"; }, never, ["[ask-table-body]", "[ask-table-totalizer]"], false, never>;
|
38
44
|
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
2
|
+
import { PaginationConfig, TableConfig } from "../../components/table/table.component";
|
3
|
+
import { PageChangeEvent } from "../../components/pagination/pagination.component";
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class PaginatePipe implements PipeTransform {
|
6
|
+
transform<T>(data: Array<T>, config: TableConfig, initialPageEvent?: PageChangeEvent): Array<T>;
|
7
|
+
getPaginatedSlice(data: Array<any>, paginationConfig: PaginationConfig): any[];
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PaginatePipe, never>;
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<PaginatePipe, "paginate", false>;
|
10
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
@@ -20,4 +20,6 @@ export * from './lib/directives';
|
|
20
20
|
export * from './lib/components/modal/directives';
|
21
21
|
export * from './lib/services/toast/toast.service';
|
22
22
|
export * from './lib/services/modal';
|
23
|
+
export * from './lib/pipes/paginate/paginate.pipe';
|
23
24
|
export * from './lib/services/toast/toast.config';
|
25
|
+
export * from './lib/pipes/paginate/paginate.helper';
|