suis 0.19.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (28) hide show
  1. package/README.md +2 -0
  2. package/esm2022/lib/components/index.mjs +3 -1
  3. package/esm2022/lib/components/suis-button/suis-button.component.mjs +11 -7
  4. package/esm2022/lib/components/suis-icon/suis-icon-type.pipe.mjs +3 -1
  5. package/esm2022/lib/components/suis-icon/suis-icon.enums.mjs +3 -1
  6. package/esm2022/lib/components/suis-pagination/index.mjs +2 -0
  7. package/esm2022/lib/components/suis-pagination/suis-pagination-page.pipe.mjs +23 -0
  8. package/esm2022/lib/components/suis-pagination/suis-pagination.component.mjs +83 -0
  9. package/esm2022/lib/components/suis-table/index.mjs +5 -0
  10. package/esm2022/lib/components/suis-table/suis-table-cell.directive.mjs +22 -0
  11. package/esm2022/lib/components/suis-table/suis-table-column.directive.mjs +42 -0
  12. package/esm2022/lib/components/suis-table/suis-table.component.mjs +71 -0
  13. package/esm2022/lib/components/suis-table/suis-table.interfaces.mjs +2 -0
  14. package/esm2022/lib/shared/classes/suis-button.base.mjs +8 -2
  15. package/fesm2022/suis.mjs +239 -9
  16. package/fesm2022/suis.mjs.map +1 -1
  17. package/lib/components/index.d.ts +2 -0
  18. package/lib/components/suis-icon/suis-icon.enums.d.ts +3 -1
  19. package/lib/components/suis-pagination/index.d.ts +1 -0
  20. package/lib/components/suis-pagination/suis-pagination-page.pipe.d.ts +7 -0
  21. package/lib/components/suis-pagination/suis-pagination.component.d.ts +41 -0
  22. package/lib/components/suis-table/index.d.ts +4 -0
  23. package/lib/components/suis-table/suis-table-cell.directive.d.ts +10 -0
  24. package/lib/components/suis-table/suis-table-column.directive.d.ts +14 -0
  25. package/lib/components/suis-table/suis-table.component.d.ts +38 -0
  26. package/lib/components/suis-table/suis-table.interfaces.d.ts +3 -0
  27. package/lib/shared/classes/suis-button.base.d.ts +5 -1
  28. package/package.json +4 -4
@@ -16,10 +16,12 @@ export * from './suis-navigation-group-item';
16
16
  export * from './suis-navigation-item';
17
17
  export * from './suis-notification';
18
18
  export * from './suis-notifications';
19
+ export * from './suis-pagination';
19
20
  export * from './suis-progress-bar';
20
21
  export * from './suis-select';
21
22
  export * from './suis-select-option';
22
23
  export * from './suis-select-multi';
23
24
  export * from './suis-spinner';
24
25
  export * from './suis-spinner-container';
26
+ export * from './suis-table';
25
27
  export * from './suis-title';
@@ -10,5 +10,7 @@ export declare enum SuisIconType {
10
10
  ARROW_RIGHT = "arrow-right",
11
11
  ARROW_DOWN = "arrow-down",
12
12
  CHEVRON_UP = "chevron-up",
13
- CHEVRON_DOWN = "chevron-down"
13
+ CHEVRON_DOWN = "chevron-down",
14
+ CHEVRON_LEFT = "chevron-left",
15
+ CHEVRON_RIGHT = "chevron-right"
14
16
  }
@@ -0,0 +1 @@
1
+ export * from './suis-pagination.component';
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SuisPaginationPagePipe implements PipeTransform {
4
+ transform(pageLabel: string, page: number, perPage: number, totalItems: number): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<SuisPaginationPagePipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<SuisPaginationPagePipe, "suisPaginationPage", true>;
7
+ }
@@ -0,0 +1,41 @@
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { SuisIconType } from '../suis-icon';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SuisPaginationComponent implements OnChanges {
5
+ /** @internal */
6
+ SuisIconType: typeof SuisIconType;
7
+ /** @internal */
8
+ /**
9
+ * Number of the maximum page that can be reached based on totalItems and perPage values.
10
+ */
11
+ maxPage: number;
12
+ /**
13
+ * Number of the page presented. By default set to 1.
14
+ */
15
+ page: number;
16
+ /**
17
+ * Number of items presented per page. By default set to 15.
18
+ */
19
+ perPage: number;
20
+ /**
21
+ * Number of total items in data source. By default set to 0.
22
+ */
23
+ totalItems: number;
24
+ /**
25
+ * Adds margin top above the pagination. By default set to true.
26
+ */
27
+ spacing: boolean;
28
+ /**
29
+ * Sets the page label between the buttons. By default set to 'Page'.
30
+ */
31
+ pageLabel: string;
32
+ /**
33
+ * Emits on page value change.
34
+ */
35
+ pageChange: EventEmitter<number>;
36
+ ngOnChanges(changes: SimpleChanges): void;
37
+ next(): void;
38
+ previous(): void;
39
+ 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>;
41
+ }
@@ -0,0 +1,4 @@
1
+ export * from './suis-table.component';
2
+ export * from './suis-table-column.directive';
3
+ export * from './suis-table-cell.directive';
4
+ export * from './suis-table.interfaces';
@@ -0,0 +1,10 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SuisTableCellDirective {
4
+ /**
5
+ * Template of the table cell.
6
+ */
7
+ readonly templateRef: TemplateRef<any>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<SuisTableCellDirective, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SuisTableCellDirective, "[suisTableCell]", never, {}, {}, never, never, true, never>;
10
+ }
@@ -0,0 +1,14 @@
1
+ import { SuisTableCellDirective } from './suis-table-cell.directive';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SuisTableColumnDirective {
4
+ cell?: SuisTableCellDirective;
5
+ protected _name: string;
6
+ protected _orderProperty: string;
7
+ /** Unique name for this column. */
8
+ get name(): string;
9
+ set name(name: string);
10
+ get orderProperty(): string;
11
+ set orderProperty(orderProperty: string);
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<SuisTableColumnDirective, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SuisTableColumnDirective, "[suisTableColumn]", never, { "name": { "alias": "suisTableColumn"; "required": false; }; "orderProperty": { "alias": "suisTableColumnOrderProperty"; "required": false; }; }, {}, ["cell"], never, true, never>;
14
+ }
@@ -0,0 +1,38 @@
1
+ import { EventEmitter, QueryList } from '@angular/core';
2
+ import { SuisTableDataItem } from './suis-table.interfaces';
3
+ import { SuisTableColumnDirective } from './suis-table-column.directive';
4
+ import { SuisIconType } from '../suis-icon';
5
+ import * as i0 from "@angular/core";
6
+ export declare class SuisTableComponent {
7
+ /** @internal */
8
+ readonly SuisIconType: typeof SuisIconType;
9
+ /** @internal */
10
+ columns?: QueryList<SuisTableColumnDirective>;
11
+ /**
12
+ * Data items collection. Type of SuisTableDataItem[]. By default set to empty array. Required input.
13
+ */
14
+ data: SuisTableDataItem[];
15
+ /**
16
+ * Specifies property that data is ordered. By default set to empty string.
17
+ */
18
+ orderBy: string;
19
+ /**
20
+ * Specifies sort condition. Accepted values - 'asc' and 'desc'. By default set to 'asc'.
21
+ */
22
+ sortBy: 'asc' | 'desc';
23
+ /**
24
+ * Shows loading spinner and blurs data. By default set to false.
25
+ */
26
+ loading: boolean;
27
+ /**
28
+ * Emits value on sort condition change.
29
+ */
30
+ sortByChange: EventEmitter<string>;
31
+ /**
32
+ * Emits value on order property change.
33
+ */
34
+ orderByChange: EventEmitter<string>;
35
+ onColumnClick(property: string): void;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<SuisTableComponent, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<SuisTableComponent, "suis-table", never, { "data": { "alias": "data"; "required": true; }; "orderBy": { "alias": "orderBy"; "required": false; }; "sortBy": { "alias": "sortBy"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, { "sortByChange": "sortByChange"; "orderByChange": "orderByChange"; }, ["columns"], never, true, never>;
38
+ }
@@ -0,0 +1,3 @@
1
+ export interface SuisTableDataItem {
2
+ [key: string]: any;
3
+ }
@@ -18,6 +18,10 @@ export declare abstract class SuisButtonBase {
18
18
  * Shows loading spinner instead of content projection. By default set to false.
19
19
  */
20
20
  loading: boolean;
21
+ /**
22
+ * Sets width to fit-content instead of 100%. By default set to false.
23
+ */
24
+ fitContent: boolean;
21
25
  static ɵfac: i0.ɵɵFactoryDeclaration<SuisButtonBase, never>;
22
- static ɵdir: i0.ɵɵDirectiveDeclaration<SuisButtonBase, never, never, { "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; }, {}, never, never, false, never>;
26
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SuisButtonBase, never, never, { "color": { "alias": "color"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "fitContent": { "alias": "fitContent"; "required": false; }; }, {}, never, never, false, never>;
23
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "suis",
3
- "version": "0.19.0",
3
+ "version": "0.21.0",
4
4
  "main": "src/index.ts",
5
5
  "author": "Karol Jaskółka",
6
6
  "description": "SUIS (Standalone UI + Signals) Angular 16+ Component Library",
@@ -12,13 +12,13 @@
12
12
  "dashboard"
13
13
  ],
14
14
  "peerDependencies": {
15
- "@angular/common": "^16.0.0",
16
- "@angular/core": "^16.0.0",
15
+ "@angular/common": ">=16.0.0",
16
+ "@angular/core": ">=16.0.0",
17
17
  "@angular/router": "16.0.0",
18
18
  "@angular/forms": "16.0.0"
19
19
  },
20
20
  "dependencies": {
21
- "tslib": "^2.3.0"
21
+ "tslib": ">=2.3.0"
22
22
  },
23
23
  "sideEffects": false,
24
24
  "module": "fesm2022/suis.mjs",