suis 0.23.1 → 0.23.3
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/lib/components/suis-pagination/suis-pagination-items.pipe.mjs +22 -0
- package/esm2022/lib/components/suis-pagination/suis-pagination-page.pipe.mjs +4 -6
- package/esm2022/lib/components/suis-pagination/suis-pagination-per-page-options.pipe.mjs +20 -0
- package/esm2022/lib/components/suis-pagination/suis-pagination.component.mjs +53 -7
- package/esm2022/lib/components/suis-select/suis-select.component.mjs +19 -9
- package/esm2022/lib/components/suis-select-multi/suis-select-multi.component.mjs +3 -3
- package/esm2022/lib/components/suis-table/suis-table.component.mjs +2 -2
- package/esm2022/lib/types/index.mjs +2 -1
- package/esm2022/lib/types/suis-sort.type.mjs +2 -0
- package/fesm2022/suis.mjs +228 -143
- package/fesm2022/suis.mjs.map +1 -1
- package/lib/components/suis-pagination/suis-pagination-items.pipe.d.ts +7 -0
- package/lib/components/suis-pagination/suis-pagination-page.pipe.d.ts +1 -1
- package/lib/components/suis-pagination/suis-pagination-per-page-options.pipe.d.ts +8 -0
- package/lib/components/suis-pagination/suis-pagination.component.d.ts +24 -6
- package/lib/components/suis-select/suis-select.component.d.ts +5 -1
- package/lib/components/suis-table/suis-table.component.d.ts +4 -3
- package/lib/types/index.d.ts +1 -0
- package/lib/types/suis-sort.type.d.ts +1 -0
- package/package.json +1 -1
@@ -0,0 +1,7 @@
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class SuisPaginationItemsPipe implements PipeTransform {
|
4
|
+
transform(ofLabel: string, page: number, perPage: number, totalItems: number, itemsLabel: string): string;
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SuisPaginationItemsPipe, never>;
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SuisPaginationItemsPipe, "suisPaginationItems", true>;
|
7
|
+
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { PipeTransform } from '@angular/core';
|
2
2
|
import * as i0 from "@angular/core";
|
3
3
|
export declare class SuisPaginationPagePipe implements PipeTransform {
|
4
|
-
transform(
|
4
|
+
transform(ofLabel: string, page: number, perPage: number, totalItems: number): string;
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<SuisPaginationPagePipe, never>;
|
6
6
|
static ɵpipe: i0.ɵɵPipeDeclaration<SuisPaginationPagePipe, "suisPaginationPage", true>;
|
7
7
|
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
2
|
+
import { SuisSelectOption } from '../suis-select-option/suis-select-option.interfaces';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class SuisPaginationPerPageOptionsPipe implements PipeTransform {
|
5
|
+
transform(options: number[]): SuisSelectOption<number>[];
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SuisPaginationPerPageOptionsPipe, never>;
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<SuisPaginationPerPageOptionsPipe, "suisPaginationPerPageOptions", true>;
|
8
|
+
}
|
@@ -1,9 +1,11 @@
|
|
1
|
-
import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
|
1
|
+
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
2
2
|
import { SuisIconType } from '../suis-icon';
|
3
|
+
import { FormControl } from '@angular/forms';
|
3
4
|
import * as i0 from "@angular/core";
|
4
|
-
export declare class SuisPaginationComponent implements OnChanges {
|
5
|
+
export declare class SuisPaginationComponent implements OnInit, OnChanges {
|
6
|
+
private readonly destroyRef;
|
5
7
|
/** @internal */
|
6
|
-
SuisIconType: typeof SuisIconType;
|
8
|
+
readonly SuisIconType: typeof SuisIconType;
|
7
9
|
/** @internal */
|
8
10
|
/**
|
9
11
|
* Number of the maximum page that can be reached based on totalItems and perPage values.
|
@@ -17,6 +19,10 @@ export declare class SuisPaginationComponent implements OnChanges {
|
|
17
19
|
* Number of items presented per page. By default set to 15.
|
18
20
|
*/
|
19
21
|
perPage: number;
|
22
|
+
/**
|
23
|
+
* Options of perPage dropdown. Be default set to [10, 15, 20, 25].
|
24
|
+
*/
|
25
|
+
perPageOptions: number[];
|
20
26
|
/**
|
21
27
|
* Number of total items in data source. By default set to 0.
|
22
28
|
*/
|
@@ -26,16 +32,28 @@ export declare class SuisPaginationComponent implements OnChanges {
|
|
26
32
|
*/
|
27
33
|
spacing: boolean;
|
28
34
|
/**
|
29
|
-
* Sets the
|
35
|
+
* Sets the of label "1 'of' 25". By default set to 'of'.
|
36
|
+
*/
|
37
|
+
ofLabel: string;
|
38
|
+
/**
|
39
|
+
* Sets the page label "1-10 'of' 25 'items'". By default set to 'Page'.
|
30
40
|
*/
|
31
|
-
|
41
|
+
itemsLabel: string;
|
32
42
|
/**
|
33
43
|
* Emits on page value change.
|
34
44
|
*/
|
35
45
|
pageChange: EventEmitter<number>;
|
46
|
+
/**
|
47
|
+
* Emits on perPage value change.
|
48
|
+
*/
|
49
|
+
perPageChange: EventEmitter<number>;
|
50
|
+
/** @internal */
|
51
|
+
perPageControl: FormControl<number>;
|
52
|
+
ngOnInit(): void;
|
36
53
|
ngOnChanges(changes: SimpleChanges): void;
|
37
54
|
next(): void;
|
38
55
|
previous(): void;
|
56
|
+
onPerPageChange(value: number): void;
|
39
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<SuisPaginationComponent, never>;
|
40
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SuisPaginationComponent, "suis-pagination", never, { "page": { "alias": "page"; "required": false; }; "perPage": { "alias": "perPage"; "required": false; }; "totalItems": { "alias": "totalItems"; "required": false; }; "spacing": { "alias": "spacing"; "required": false; }; "
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SuisPaginationComponent, "suis-pagination", never, { "page": { "alias": "page"; "required": false; }; "perPage": { "alias": "perPage"; "required": false; }; "perPageOptions": { "alias": "perPageOptions"; "required": false; }; "totalItems": { "alias": "totalItems"; "required": false; }; "spacing": { "alias": "spacing"; "required": false; }; "ofLabel": { "alias": "ofLabel"; "required": false; }; "itemsLabel": { "alias": "itemsLabel"; "required": false; }; }, { "pageChange": "pageChange"; "perPageChange": "perPageChange"; }, never, never, true, never>;
|
41
59
|
}
|
@@ -3,10 +3,14 @@ import * as i0 from "@angular/core";
|
|
3
3
|
export declare class SuisSelectComponent<T> extends SuisSelectBase<T> {
|
4
4
|
/** @internal */
|
5
5
|
value: T | null;
|
6
|
+
/**
|
7
|
+
* Allows mechanism of clearing value. By default set to true.
|
8
|
+
*/
|
9
|
+
nullable: boolean;
|
6
10
|
writeValue(obj: T): void;
|
7
11
|
onSelect(value: T): void;
|
8
12
|
clearValue(): void;
|
9
13
|
setValue(value: T | null): void;
|
10
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<SuisSelectComponent<any>, never>;
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SuisSelectComponent<any>, "suis-select", never, {}, {}, never, never, true, never>;
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SuisSelectComponent<any>, "suis-select", never, { "nullable": { "alias": "nullable"; "required": false; }; }, {}, never, never, true, never>;
|
12
16
|
}
|
@@ -2,6 +2,7 @@ import { EventEmitter, QueryList } from '@angular/core';
|
|
2
2
|
import { SuisTableDataItem } from './suis-table.interfaces';
|
3
3
|
import { SuisTableColumnDirective } from './suis-table-column.directive';
|
4
4
|
import { SuisIconType } from '../suis-icon';
|
5
|
+
import { SuisSort } from '../../types/suis-sort.type';
|
5
6
|
import * as i0 from "@angular/core";
|
6
7
|
export declare class SuisTableComponent {
|
7
8
|
/** @internal */
|
@@ -17,9 +18,9 @@ export declare class SuisTableComponent {
|
|
17
18
|
*/
|
18
19
|
orderBy: string;
|
19
20
|
/**
|
20
|
-
* Specifies sort condition.
|
21
|
+
* Specifies sort condition. Type of SuisSort - 'asc' and 'desc'. By default set to 'asc'.
|
21
22
|
*/
|
22
|
-
sortBy:
|
23
|
+
sortBy: SuisSort;
|
23
24
|
/**
|
24
25
|
* Shows loading spinner and blurs data. By default set to false.
|
25
26
|
*/
|
@@ -31,7 +32,7 @@ export declare class SuisTableComponent {
|
|
31
32
|
/**
|
32
33
|
* Emits value on sort condition change.
|
33
34
|
*/
|
34
|
-
sortByChange: EventEmitter<
|
35
|
+
sortByChange: EventEmitter<SuisSort>;
|
35
36
|
/**
|
36
37
|
* Emits value on order property change.
|
37
38
|
*/
|
package/lib/types/index.d.ts
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export type SuisSort = 'asc' | 'desc';
|