suis 0.23.1 → 0.23.2

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.
@@ -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,15 @@
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
+ private readonly PER_PAGE;
9
+ /** @internal */
10
+ readonly SuisIconType: typeof SuisIconType;
11
+ /** @internal */
12
+ perPageControl: FormControl<number>;
7
13
  /** @internal */
8
14
  /**
9
15
  * Number of the maximum page that can be reached based on totalItems and perPage values.
@@ -17,6 +23,10 @@ export declare class SuisPaginationComponent implements OnChanges {
17
23
  * Number of items presented per page. By default set to 15.
18
24
  */
19
25
  perPage: number;
26
+ /**
27
+ * Options of perPage dropdown. Be default set to [10, 15, 20, 25].
28
+ */
29
+ perPageOptions: number[];
20
30
  /**
21
31
  * Number of total items in data source. By default set to 0.
22
32
  */
@@ -26,16 +36,26 @@ export declare class SuisPaginationComponent implements OnChanges {
26
36
  */
27
37
  spacing: boolean;
28
38
  /**
29
- * Sets the page label between the buttons. By default set to 'Page'.
39
+ * Sets the of label "1 'of' 25". By default set to 'of'.
30
40
  */
31
- pageLabel: string;
41
+ ofLabel: string;
42
+ /**
43
+ * Sets the page label "1-10 'of' 25 'items'". By default set to 'Page'.
44
+ */
45
+ itemsLabel: string;
32
46
  /**
33
47
  * Emits on page value change.
34
48
  */
35
49
  pageChange: EventEmitter<number>;
50
+ /**
51
+ * Emits on perPage value change.
52
+ */
53
+ perPageChange: EventEmitter<number>;
54
+ ngOnInit(): void;
36
55
  ngOnChanges(changes: SimpleChanges): void;
37
56
  next(): void;
38
57
  previous(): void;
58
+ onPerPageChange(value: number): void;
39
59
  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>;
60
+ 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
61
  }
@@ -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.2",
4
4
  "main": "src/index.ts",
5
5
  "author": "Karol Jaskółka",
6
6
  "description": "SUIS (Standalone UI + Signals) Angular 16+ Component Library",