suis 0.23.1 → 0.23.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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(pageLabel: string, page: number, perPage: number, totalItems: number): string;
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 page label between the buttons. By default set to 'Page'.
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
- pageLabel: string;
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; }; "pageLabel": { "alias": "pageLabel"; "required": false; }; }, { "pageChange": "pageChange"; }, never, never, true, never>;
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. Accepted values - 'asc' and 'desc'. By default set to 'asc'.
21
+ * Specifies sort condition. Type of SuisSort - 'asc' and 'desc'. By default set to 'asc'.
21
22
  */
22
- sortBy: 'asc' | 'desc';
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<string>;
35
+ sortByChange: EventEmitter<SuisSort>;
35
36
  /**
36
37
  * Emits value on order property change.
37
38
  */
@@ -1,2 +1,3 @@
1
1
  export * from './suis-color.type';
2
2
  export * from './suis-size.type';
3
+ export * from './suis-sort.type';
@@ -0,0 +1 @@
1
+ export type SuisSort = 'asc' | 'desc';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suis",
3
- "version": "0.23.1",
3
+ "version": "0.23.3",
4
4
  "main": "src/index.ts",
5
5
  "author": "Karol Jaskółka",
6
6
  "description": "SUIS (Standalone UI + Signals) Angular 16+ Component Library",