suis 0.19.0 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -0
- package/esm2022/lib/components/index.mjs +3 -1
- package/esm2022/lib/components/suis-button/suis-button.component.mjs +11 -7
- package/esm2022/lib/components/suis-icon/suis-icon-type.pipe.mjs +3 -1
- package/esm2022/lib/components/suis-icon/suis-icon.enums.mjs +3 -1
- package/esm2022/lib/components/suis-pagination/index.mjs +2 -0
- package/esm2022/lib/components/suis-pagination/suis-pagination-page.pipe.mjs +23 -0
- package/esm2022/lib/components/suis-pagination/suis-pagination.component.mjs +83 -0
- package/esm2022/lib/components/suis-table/index.mjs +5 -0
- package/esm2022/lib/components/suis-table/suis-table-cell.directive.mjs +22 -0
- package/esm2022/lib/components/suis-table/suis-table-column.directive.mjs +42 -0
- package/esm2022/lib/components/suis-table/suis-table.component.mjs +71 -0
- package/esm2022/lib/components/suis-table/suis-table.interfaces.mjs +2 -0
- package/esm2022/lib/shared/classes/suis-button.base.mjs +8 -2
- package/fesm2022/suis.mjs +239 -9
- package/fesm2022/suis.mjs.map +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/suis-icon/suis-icon.enums.d.ts +3 -1
- package/lib/components/suis-pagination/index.d.ts +1 -0
- package/lib/components/suis-pagination/suis-pagination-page.pipe.d.ts +7 -0
- package/lib/components/suis-pagination/suis-pagination.component.d.ts +41 -0
- package/lib/components/suis-table/index.d.ts +4 -0
- package/lib/components/suis-table/suis-table-cell.directive.d.ts +10 -0
- package/lib/components/suis-table/suis-table-column.directive.d.ts +14 -0
- package/lib/components/suis-table/suis-table.component.d.ts +38 -0
- package/lib/components/suis-table/suis-table.interfaces.d.ts +3 -0
- package/lib/shared/classes/suis-button.base.d.ts +5 -1
- package/package.json +4 -4
package/README.md
CHANGED
@@ -35,6 +35,8 @@ Modern UI component library. Supports Angular in version 16 and uses its latest
|
|
35
35
|
| NavigationGroupItem | SuisNavigationGroupItem | suis-navigation-group-item | 0.17.0 |
|
36
36
|
| Breadcrumbs | SuisBreadcrumbs | suis-breadcrumbs | 0.18.0 |
|
37
37
|
| Title | SuisTitle | suis-title | 0.19.0 |
|
38
|
+
| Table | SuisTable | suis-table | 0.20.0 |
|
39
|
+
| Pagination | SuisPagination | suis-pagination | 0.21.0 |
|
38
40
|
|
39
41
|
## Pipes
|
40
42
|
|
@@ -16,11 +16,13 @@ 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';
|
26
|
-
//# sourceMappingURL=data:application/json;base64,
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsWUFBWSxDQUFDO0FBQzNCLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyxlQUFlLENBQUM7QUFDOUIsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyxxQkFBcUIsQ0FBQztBQUNwQyxjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsY0FBYyxDQUFDO0FBQz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hwb3J0ICogZnJvbSAnLi9zdWlzLW5hdmlnYXRpb24tZ3JvdXAnO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLW5hdmlnYXRpb24tZ3JvdXAtaXRlbSc7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtbmF2aWdhdGlvbi1pdGVtJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy1ub3RpZmljYXRpb24nO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLW5vdGlmaWNhdGlvbnMnO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLXBhZ2luYXRpb24nO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLXByb2dyZXNzLWJhcic7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtc2VsZWN0JztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy1zZWxlY3Qtb3B0aW9uJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy1zZWxlY3QtbXVsdGknO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLXNwaW5uZXInO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLXNwaW5uZXItY29udGFpbmVyJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy10YWJsZSc7XG5leHBvcnQgKiBmcm9tICcuL3N1aXMtdGl0bGUnO1xuIl19
|
@@ -7,9 +7,11 @@ class SuisButtonComponent extends SuisButtonBase {
|
|
7
7
|
ngAfterViewInit() {
|
8
8
|
this.renderer2.addClass(this.elementRef.nativeElement, 'suis-button');
|
9
9
|
this.renderer2.addClass(this.elementRef.nativeElement, `suis-button--${this.color}`);
|
10
|
+
if (this.fitContent)
|
11
|
+
this.renderer2.addClass(this.elementRef.nativeElement, 'suis-button--fit-content');
|
10
12
|
}
|
11
13
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
12
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisButtonComponent, isStandalone: true, selector: "button[suisButton]", host: { properties: { "attr.disabled": "disabled || null", "attr.tabindex": "disabled ? -1 : 0" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!loading; else spinner\">\r\n <ng-content></ng-content>\r\n</ng-container>\r\n<ng-template #spinner>\r\n <!-- TODO: <suis-spinner></suis-spinner> -->\r\n</ng-template>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-button{width:100%;display:block;padding:.5rem 1rem;border
|
14
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisButtonComponent, isStandalone: true, selector: "button[suisButton]", host: { properties: { "attr.disabled": "disabled || null", "attr.tabindex": "disabled ? -1 : 0" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!loading; else spinner\">\r\n <ng-content></ng-content>\r\n</ng-container>\r\n<ng-template #spinner>\r\n <!-- TODO: <suis-spinner></suis-spinner> -->\r\n</ng-template>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-button{width:100%;display:block;padding:.5rem 1rem;border-radius:.25rem;font-size:500;text-align:center;text-decoration:none;border:none;transition:background-color .25s ease-in-out}.suis-button--fit-content{width:-moz-fit-content;width:fit-content}.suis-button:disabled{opacity:.5}.suis-button:hover:not(:disabled){cursor:pointer}.suis-button:hover:disabled{cursor:not-allowed}.suis-button:focus,.suis-button:focus-within{outline:none}.suis-button--primary{background-color:#192a56;color:#fff}.suis-button--primary:hover:not(:disabled){background-color:#192a56d9}.suis-button--primary:focus:not(:disabled){box-shadow:0 2px 5px #192a56bf}.suis-button--secondary{background-color:#273c75;color:#fff}.suis-button--secondary:hover:not(:disabled){background-color:#273c75d9}.suis-button--secondary:focus:not(:disabled){box-shadow:0 2px 5px #273c75bf}.suis-button--tertiary{background-color:#dcdde1;color:#2f3640}.suis-button--tertiary:hover:not(:disabled){background-color:#dcdde1d9}.suis-button--tertiary:focus:not(:disabled){box-shadow:0 2px 5px #dcdde1bf}.suis-button--complementary{background-color:#f5f6fa;color:#2f3640}.suis-button--complementary:hover:not(:disabled){background-color:#f5f6fad9}.suis-button--complementary:focus:not(:disabled){box-shadow:0 2px 5px #f5f6fabf}.suis-button--success{background-color:#2ed573;color:#fff}.suis-button--success:hover:not(:disabled){background-color:#2ed573d9}.suis-button--success:focus:not(:disabled){box-shadow:0 2px 5px #2ed573bf}.suis-button--warning{background-color:#ffa502;color:#fff}.suis-button--warning:hover:not(:disabled){background-color:#ffa502d9}.suis-button--warning:focus:not(:disabled){box-shadow:0 2px 5px #ffa502bf}.suis-button--danger{background-color:#ff4757;color:#fff}.suis-button--danger:hover:not(:disabled){background-color:#ff4757d9}.suis-button--danger:focus:not(:disabled){box-shadow:0 2px 5px #ff4757bf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
13
15
|
}
|
14
16
|
export { SuisButtonComponent };
|
15
17
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisButtonComponent, decorators: [{
|
@@ -17,15 +19,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
17
19
|
args: [{ selector: 'button[suisButton]', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
18
20
|
'[attr.disabled]': 'disabled || null',
|
19
21
|
'[attr.tabindex]': 'disabled ? -1 : 0',
|
20
|
-
}, template: "<ng-container *ngIf=\"!loading; else spinner\">\r\n <ng-content></ng-content>\r\n</ng-container>\r\n<ng-template #spinner>\r\n <!-- TODO: <suis-spinner></suis-spinner> -->\r\n</ng-template>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-button{width:100%;display:block;padding:.5rem 1rem;border
|
22
|
+
}, template: "<ng-container *ngIf=\"!loading; else spinner\">\r\n <ng-content></ng-content>\r\n</ng-container>\r\n<ng-template #spinner>\r\n <!-- TODO: <suis-spinner></suis-spinner> -->\r\n</ng-template>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-button{width:100%;display:block;padding:.5rem 1rem;border-radius:.25rem;font-size:500;text-align:center;text-decoration:none;border:none;transition:background-color .25s ease-in-out}.suis-button--fit-content{width:-moz-fit-content;width:fit-content}.suis-button:disabled{opacity:.5}.suis-button:hover:not(:disabled){cursor:pointer}.suis-button:hover:disabled{cursor:not-allowed}.suis-button:focus,.suis-button:focus-within{outline:none}.suis-button--primary{background-color:#192a56;color:#fff}.suis-button--primary:hover:not(:disabled){background-color:#192a56d9}.suis-button--primary:focus:not(:disabled){box-shadow:0 2px 5px #192a56bf}.suis-button--secondary{background-color:#273c75;color:#fff}.suis-button--secondary:hover:not(:disabled){background-color:#273c75d9}.suis-button--secondary:focus:not(:disabled){box-shadow:0 2px 5px #273c75bf}.suis-button--tertiary{background-color:#dcdde1;color:#2f3640}.suis-button--tertiary:hover:not(:disabled){background-color:#dcdde1d9}.suis-button--tertiary:focus:not(:disabled){box-shadow:0 2px 5px #dcdde1bf}.suis-button--complementary{background-color:#f5f6fa;color:#2f3640}.suis-button--complementary:hover:not(:disabled){background-color:#f5f6fad9}.suis-button--complementary:focus:not(:disabled){box-shadow:0 2px 5px #f5f6fabf}.suis-button--success{background-color:#2ed573;color:#fff}.suis-button--success:hover:not(:disabled){background-color:#2ed573d9}.suis-button--success:focus:not(:disabled){box-shadow:0 2px 5px #2ed573bf}.suis-button--warning{background-color:#ffa502;color:#fff}.suis-button--warning:hover:not(:disabled){background-color:#ffa502d9}.suis-button--warning:focus:not(:disabled){box-shadow:0 2px 5px #ffa502bf}.suis-button--danger{background-color:#ff4757;color:#fff}.suis-button--danger:hover:not(:disabled){background-color:#ff4757d9}.suis-button--danger:focus:not(:disabled){box-shadow:0 2px 5px #ff4757bf}\n"] }]
|
21
23
|
}] });
|
22
24
|
class SuisButtonOutlinedComponent extends SuisButtonBase {
|
23
25
|
ngAfterViewInit() {
|
24
26
|
this.renderer2.addClass(this.elementRef.nativeElement, 'suis-button-outlined');
|
25
27
|
this.renderer2.addClass(this.elementRef.nativeElement, `suis-button-outlined--${this.color}`);
|
28
|
+
if (this.fitContent)
|
29
|
+
this.renderer2.addClass(this.elementRef.nativeElement, 'suis-button-outlined--fit-content');
|
26
30
|
}
|
27
31
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisButtonOutlinedComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
28
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisButtonOutlinedComponent, isStandalone: true, selector: "button[suisButtonOutlined]", host: { properties: { "attr.disabled": "disabled || null", "attr.tabindex": "disabled ? -1 : 0" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!loading; else spinner\">\r\n <ng-content></ng-content>\r\n</ng-container>\r\n<ng-template #spinner>\r\n <!-- TODO: <suis-spinner></suis-spinner> -->\r\n</ng-template>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-button-outlined{width:100%;display:block;padding:.5rem 1rem;border-width:.125rem;border-style:solid;
|
32
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisButtonOutlinedComponent, isStandalone: true, selector: "button[suisButtonOutlined]", host: { properties: { "attr.disabled": "disabled || null", "attr.tabindex": "disabled ? -1 : 0" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!loading; else spinner\">\r\n <ng-content></ng-content>\r\n</ng-container>\r\n<ng-template #spinner>\r\n <!-- TODO: <suis-spinner></suis-spinner> -->\r\n</ng-template>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-button-outlined{width:100%;display:block;padding:.5rem 1rem;border-radius:.25rem;font-size:500;text-align:center;text-decoration:none;border-width:.125rem;border-style:solid;background-color:transparent;transition:background-color .5s ease-in-out}.suis-button-outlined--fit-content{width:-moz-fit-content;width:fit-content}.suis-button-outlined:disabled{opacity:.5}.suis-button-outlined:hover:not(:disabled){cursor:pointer}.suis-button-outlined:hover:disabled{cursor:not-allowed}.suis-button-outlined:focus,.suis-button-outlined:focus-within{outline:none}.suis-button-outlined--primary{border-color:#192a56;color:#192a56}.suis-button-outlined--primary:hover:not(:disabled){background-color:#192a56;color:#fff}.suis-button-outlined--primary:focus:not(:disabled){box-shadow:0 2px 5px #192a56bf}.suis-button-outlined--secondary{border-color:#273c75;color:#273c75}.suis-button-outlined--secondary:hover:not(:disabled){background-color:#273c75;color:#fff}.suis-button-outlined--secondary:focus:not(:disabled){box-shadow:0 2px 5px #273c75bf}.suis-button-outlined--tertiary{border-color:#dcdde1;color:#dcdde1}.suis-button-outlined--tertiary:hover:not(:disabled){background-color:#dcdde1;color:#2f3640}.suis-button-outlined--tertiary:focus:not(:disabled){box-shadow:0 2px 5px #dcdde1bf}.suis-button-outlined--complementary{border-color:#f5f6fa;color:#f5f6fa}.suis-button-outlined--complementary:hover:not(:disabled){background-color:#f5f6fa;color:#2f3640}.suis-button-outlined--complementary:focus:not(:disabled){box-shadow:0 2px 5px #f5f6fabf}.suis-button-outlined--success{border-color:#2ed573;color:#2ed573}.suis-button-outlined--success:hover:not(:disabled){background-color:#2ed573;color:#fff}.suis-button-outlined--success:focus:not(:disabled){box-shadow:0 2px 5px #2ed573bf}.suis-button-outlined--warning{border-color:#ffa502;color:#ffa502}.suis-button-outlined--warning:hover:not(:disabled){background-color:#ffa502;color:#fff}.suis-button-outlined--warning:focus:not(:disabled){box-shadow:0 2px 5px #ffa502bf}.suis-button-outlined--danger{border-color:#ff4757;color:#ff4757}.suis-button-outlined--danger:hover:not(:disabled){background-color:#ff4757;color:#fff}.suis-button-outlined--danger:focus:not(:disabled){box-shadow:0 2px 5px #ff4757bf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
29
33
|
}
|
30
34
|
export { SuisButtonOutlinedComponent };
|
31
35
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisButtonOutlinedComponent, decorators: [{
|
@@ -33,7 +37,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
33
37
|
args: [{ selector: 'button[suisButtonOutlined]', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
34
38
|
'[attr.disabled]': 'disabled || null',
|
35
39
|
'[attr.tabindex]': 'disabled ? -1 : 0',
|
36
|
-
}, template: "<ng-container *ngIf=\"!loading; else spinner\">\r\n <ng-content></ng-content>\r\n</ng-container>\r\n<ng-template #spinner>\r\n <!-- TODO: <suis-spinner></suis-spinner> -->\r\n</ng-template>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-button-outlined{width:100%;display:block;padding:.5rem 1rem;border-width:.125rem;border-style:solid;
|
40
|
+
}, template: "<ng-container *ngIf=\"!loading; else spinner\">\r\n <ng-content></ng-content>\r\n</ng-container>\r\n<ng-template #spinner>\r\n <!-- TODO: <suis-spinner></suis-spinner> -->\r\n</ng-template>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-button-outlined{width:100%;display:block;padding:.5rem 1rem;border-radius:.25rem;font-size:500;text-align:center;text-decoration:none;border-width:.125rem;border-style:solid;background-color:transparent;transition:background-color .5s ease-in-out}.suis-button-outlined--fit-content{width:-moz-fit-content;width:fit-content}.suis-button-outlined:disabled{opacity:.5}.suis-button-outlined:hover:not(:disabled){cursor:pointer}.suis-button-outlined:hover:disabled{cursor:not-allowed}.suis-button-outlined:focus,.suis-button-outlined:focus-within{outline:none}.suis-button-outlined--primary{border-color:#192a56;color:#192a56}.suis-button-outlined--primary:hover:not(:disabled){background-color:#192a56;color:#fff}.suis-button-outlined--primary:focus:not(:disabled){box-shadow:0 2px 5px #192a56bf}.suis-button-outlined--secondary{border-color:#273c75;color:#273c75}.suis-button-outlined--secondary:hover:not(:disabled){background-color:#273c75;color:#fff}.suis-button-outlined--secondary:focus:not(:disabled){box-shadow:0 2px 5px #273c75bf}.suis-button-outlined--tertiary{border-color:#dcdde1;color:#dcdde1}.suis-button-outlined--tertiary:hover:not(:disabled){background-color:#dcdde1;color:#2f3640}.suis-button-outlined--tertiary:focus:not(:disabled){box-shadow:0 2px 5px #dcdde1bf}.suis-button-outlined--complementary{border-color:#f5f6fa;color:#f5f6fa}.suis-button-outlined--complementary:hover:not(:disabled){background-color:#f5f6fa;color:#2f3640}.suis-button-outlined--complementary:focus:not(:disabled){box-shadow:0 2px 5px #f5f6fabf}.suis-button-outlined--success{border-color:#2ed573;color:#2ed573}.suis-button-outlined--success:hover:not(:disabled){background-color:#2ed573;color:#fff}.suis-button-outlined--success:focus:not(:disabled){box-shadow:0 2px 5px #2ed573bf}.suis-button-outlined--warning{border-color:#ffa502;color:#ffa502}.suis-button-outlined--warning:hover:not(:disabled){background-color:#ffa502;color:#fff}.suis-button-outlined--warning:focus:not(:disabled){box-shadow:0 2px 5px #ffa502bf}.suis-button-outlined--danger{border-color:#ff4757;color:#ff4757}.suis-button-outlined--danger:hover:not(:disabled){background-color:#ff4757;color:#fff}.suis-button-outlined--danger:focus:not(:disabled){box-shadow:0 2px 5px #ff4757bf}\n"] }]
|
37
41
|
}] });
|
38
42
|
class SuisAnchorButtonComponent extends SuisButtonBase {
|
39
43
|
ngAfterViewInit() {
|
@@ -47,16 +51,16 @@ class SuisAnchorButtonComponent extends SuisButtonBase {
|
|
47
51
|
}
|
48
52
|
}
|
49
53
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisAnchorButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
50
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisAnchorButtonComponent, isStandalone: true, selector: "a[suisButton]", host: { listeners: { "click": "onClick()" }, properties: { "attr.tabindex": "disabled ? -1 : 0" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!loading; else spinner\">\r\n <ng-content></ng-content>\r\n</ng-container>\r\n<ng-template #spinner>\r\n <!-- TODO: <suis-spinner></suis-spinner> -->\r\n</ng-template>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-button{width:100%;display:block;padding:.5rem 1rem;border
|
54
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisAnchorButtonComponent, isStandalone: true, selector: "a[suisButton]", host: { listeners: { "click": "onClick()" }, properties: { "attr.tabindex": "disabled ? -1 : 0" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!loading; else spinner\">\r\n <ng-content></ng-content>\r\n</ng-container>\r\n<ng-template #spinner>\r\n <!-- TODO: <suis-spinner></suis-spinner> -->\r\n</ng-template>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-button{width:100%;display:block;padding:.5rem 1rem;border-radius:.25rem;font-size:500;text-align:center;text-decoration:none;border:none;transition:background-color .25s ease-in-out}.suis-button--fit-content{width:-moz-fit-content;width:fit-content}.suis-button:disabled{opacity:.5}.suis-button:hover:not(:disabled){cursor:pointer}.suis-button:hover:disabled{cursor:not-allowed}.suis-button:focus,.suis-button:focus-within{outline:none}.suis-button--primary{background-color:#192a56;color:#fff}.suis-button--primary:hover:not(:disabled){background-color:#192a56d9}.suis-button--primary:focus:not(:disabled){box-shadow:0 2px 5px #192a56bf}.suis-button--secondary{background-color:#273c75;color:#fff}.suis-button--secondary:hover:not(:disabled){background-color:#273c75d9}.suis-button--secondary:focus:not(:disabled){box-shadow:0 2px 5px #273c75bf}.suis-button--tertiary{background-color:#dcdde1;color:#2f3640}.suis-button--tertiary:hover:not(:disabled){background-color:#dcdde1d9}.suis-button--tertiary:focus:not(:disabled){box-shadow:0 2px 5px #dcdde1bf}.suis-button--complementary{background-color:#f5f6fa;color:#2f3640}.suis-button--complementary:hover:not(:disabled){background-color:#f5f6fad9}.suis-button--complementary:focus:not(:disabled){box-shadow:0 2px 5px #f5f6fabf}.suis-button--success{background-color:#2ed573;color:#fff}.suis-button--success:hover:not(:disabled){background-color:#2ed573d9}.suis-button--success:focus:not(:disabled){box-shadow:0 2px 5px #2ed573bf}.suis-button--warning{background-color:#ffa502;color:#fff}.suis-button--warning:hover:not(:disabled){background-color:#ffa502d9}.suis-button--warning:focus:not(:disabled){box-shadow:0 2px 5px #ffa502bf}.suis-button--danger{background-color:#ff4757;color:#fff}.suis-button--danger:hover:not(:disabled){background-color:#ff4757d9}.suis-button--danger:focus:not(:disabled){box-shadow:0 2px 5px #ff4757bf}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
51
55
|
}
|
52
56
|
export { SuisAnchorButtonComponent };
|
53
57
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisAnchorButtonComponent, decorators: [{
|
54
58
|
type: Component,
|
55
59
|
args: [{ selector: 'a[suisButton]', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
56
60
|
'[attr.tabindex]': 'disabled ? -1 : 0',
|
57
|
-
}, template: "<ng-container *ngIf=\"!loading; else spinner\">\r\n <ng-content></ng-content>\r\n</ng-container>\r\n<ng-template #spinner>\r\n <!-- TODO: <suis-spinner></suis-spinner> -->\r\n</ng-template>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-button{width:100%;display:block;padding:.5rem 1rem;border
|
61
|
+
}, template: "<ng-container *ngIf=\"!loading; else spinner\">\r\n <ng-content></ng-content>\r\n</ng-container>\r\n<ng-template #spinner>\r\n <!-- TODO: <suis-spinner></suis-spinner> -->\r\n</ng-template>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-button{width:100%;display:block;padding:.5rem 1rem;border-radius:.25rem;font-size:500;text-align:center;text-decoration:none;border:none;transition:background-color .25s ease-in-out}.suis-button--fit-content{width:-moz-fit-content;width:fit-content}.suis-button:disabled{opacity:.5}.suis-button:hover:not(:disabled){cursor:pointer}.suis-button:hover:disabled{cursor:not-allowed}.suis-button:focus,.suis-button:focus-within{outline:none}.suis-button--primary{background-color:#192a56;color:#fff}.suis-button--primary:hover:not(:disabled){background-color:#192a56d9}.suis-button--primary:focus:not(:disabled){box-shadow:0 2px 5px #192a56bf}.suis-button--secondary{background-color:#273c75;color:#fff}.suis-button--secondary:hover:not(:disabled){background-color:#273c75d9}.suis-button--secondary:focus:not(:disabled){box-shadow:0 2px 5px #273c75bf}.suis-button--tertiary{background-color:#dcdde1;color:#2f3640}.suis-button--tertiary:hover:not(:disabled){background-color:#dcdde1d9}.suis-button--tertiary:focus:not(:disabled){box-shadow:0 2px 5px #dcdde1bf}.suis-button--complementary{background-color:#f5f6fa;color:#2f3640}.suis-button--complementary:hover:not(:disabled){background-color:#f5f6fad9}.suis-button--complementary:focus:not(:disabled){box-shadow:0 2px 5px #f5f6fabf}.suis-button--success{background-color:#2ed573;color:#fff}.suis-button--success:hover:not(:disabled){background-color:#2ed573d9}.suis-button--success:focus:not(:disabled){box-shadow:0 2px 5px #2ed573bf}.suis-button--warning{background-color:#ffa502;color:#fff}.suis-button--warning:hover:not(:disabled){background-color:#ffa502d9}.suis-button--warning:focus:not(:disabled){box-shadow:0 2px 5px #ffa502bf}.suis-button--danger{background-color:#ff4757;color:#fff}.suis-button--danger:hover:not(:disabled){background-color:#ff4757d9}.suis-button--danger:focus:not(:disabled){box-shadow:0 2px 5px #ff4757bf}\n"] }]
|
58
62
|
}], propDecorators: { onClick: [{
|
59
63
|
type: HostListener,
|
60
64
|
args: ['click']
|
61
65
|
}] } });
|
62
|
-
//# sourceMappingURL=data:application/json;base64,
|
66
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1idXR0b24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zdWlzL3NyYy9saWIvY29tcG9uZW50cy9zdWlzLWJ1dHRvbi9zdWlzLWJ1dHRvbi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMt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iaW5kZXhdJzogJ2Rpc2FibGVkID8gLTEgOiAwJyxcbiAgfSxcbn0pXG5leHBvcnQgY2xhc3MgU3Vpc0FuY2hvckJ1dHRvbkNvbXBvbmVudFxuICBleHRlbmRzIFN1aXNCdXR0b25CYXNlXG4gIGltcGxlbWVudHMgQWZ0ZXJWaWV3SW5pdFxue1xuICBuZ0FmdGVyVmlld0luaXQoKTogdm9pZCB7XG4gICAgdGhpcy5yZW5kZXJlcjIuYWRkQ2xhc3ModGhpcy5lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQsICdzdWlzLWJ1dHRvbicpO1xuICAgIHRoaXMucmVuZGVyZXIyLmFkZENsYXNzKFxuICAgICAgdGhpcy5lbGVtZW50UmVmLm5hdGl2ZUVsZW1lbnQsXG4gICAgICBgc3Vpcy1idXR0b24tLSR7dGhpcy5jb2xvcn1gXG4gICAgKTtcbiAgfVxuXG4gIEBIb3N0TGlzdGVuZXIoJ2NsaWNrJylcbiAgb25DbGljayhldmVudDogRXZlbnQpOiB2b2lkIHtcbiAgICBpZiAodGhpcy5kaXNhYmxlZCkge1xuICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgIGV2ZW50LnN0b3BJbW1lZGlhdGVQcm9wYWdhdGlvbigpO1xuICAgIH1cbiAgfVxufVxuIiwiPG5nLWNvbnRhaW5lciAqbmdJZj1cIiFsb2FkaW5nOyBlbHNlIHNwaW5uZXJcIj5cclxuICA8bmctY29udGVudD48L25nLWNvbnRlbnQ+XHJcbjwvbmctY29udGFpbmVyPlxyXG48bmctdGVtcGxhdGUgI3NwaW5uZXI+XHJcbiAgPCEtLSBUT0RPOiA8c3Vpcy1zcGlubmVyPjwvc3Vpcy1zcGlubmVyPiAtLT5cclxuPC9uZy10ZW1wbGF0ZT5cclxuIl19
|
@@ -25,8 +25,10 @@ class SuisIconTypePipe {
|
|
25
25
|
case SuisIconType.ARROW_DOWN:
|
26
26
|
return '↓';
|
27
27
|
case SuisIconType.CHEVRON_UP:
|
28
|
+
case SuisIconType.CHEVRON_LEFT:
|
28
29
|
return '‹';
|
29
30
|
case SuisIconType.CHEVRON_DOWN:
|
31
|
+
case SuisIconType.CHEVRON_RIGHT:
|
30
32
|
return '›';
|
31
33
|
}
|
32
34
|
}
|
@@ -41,4 +43,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
41
43
|
name: 'suisIconType',
|
42
44
|
}]
|
43
45
|
}] });
|
44
|
-
//# sourceMappingURL=data:application/json;base64,
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1pY29uLXR5cGUucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL2NvbXBvbmVudHMvc3Vpcy1pY29uL3N1aXMtaWNvbi10eXBlLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDcEQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLG1CQUFtQixDQUFDOztBQUVqRCxNQUlhLGdCQUFnQjtJQUMzQixTQUFTLENBQUMsSUFBa0I7UUFDMUIsUUFBUSxJQUFJLEVBQUU7WUFDWixLQUFLLFlBQVksQ0FBQyxJQUFJO2dCQUNwQixPQUFPLFNBQVMsQ0FBQztZQUNuQixLQUFLLFlBQVksQ0FBQyxPQUFPO2dCQUN2QixPQUFPLFFBQVEsQ0FBQztZQUNsQixLQUFLLFlBQVksQ0FBQyxLQUFLO2dCQUNyQixPQUFPLFNBQVMsQ0FBQztZQUNuQixLQUFLLFlBQVksQ0FBQyxLQUFLO2dCQUNyQixPQUFPLFNBQVMsQ0FBQztZQUNuQixLQUFLLFlBQVksQ0FBQyxJQUFJO2dCQUNwQixPQUFPLF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29uVHlwZS5DSEVWUk9OX1JJR0hUOlxuICAgICAgICByZXR1cm4gJyZyc2FxdW87JztcbiAgICB9XG4gIH1cbn1cbiJdfQ==
|
@@ -12,5 +12,7 @@ export var SuisIconType;
|
|
12
12
|
SuisIconType["ARROW_DOWN"] = "arrow-down";
|
13
13
|
SuisIconType["CHEVRON_UP"] = "chevron-up";
|
14
14
|
SuisIconType["CHEVRON_DOWN"] = "chevron-down";
|
15
|
+
SuisIconType["CHEVRON_LEFT"] = "chevron-left";
|
16
|
+
SuisIconType["CHEVRON_RIGHT"] = "chevron-right";
|
15
17
|
})(SuisIconType || (SuisIconType = {}));
|
16
|
-
//# sourceMappingURL=data:application/json;base64,
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1pY29uLmVudW1zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zdWlzL3NyYy9saWIvY29tcG9uZW50cy9zdWlzLWljb24vc3Vpcy1pY29uLmVudW1zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBTixJQUFZLFlBZVg7QUFmRCxXQUFZLFlBQVk7SUFDdEIsNkJBQWEsQ0FBQTtJQUNiLG1DQUFtQixDQUFBO0lBQ25CLCtCQUFlLENBQUE7SUFDZiwrQkFBZSxDQUFBO0lBQ2YsNkJBQWEsQ0FBQTtJQUNiLCtCQUFlLENBQUE7SUFDZixxQ0FBcUIsQ0FBQTtJQUNyQix5Q0FBeUIsQ0FBQTtJQUN6QiwyQ0FBMkIsQ0FBQTtJQUMzQix5Q0FBeUIsQ0FBQTtJQUN6Qix5Q0FBeUIsQ0FBQTtJQUN6Qiw2Q0FBNkIsQ0FBQTtJQUM3Qiw2Q0FBNkIsQ0FBQTtJQUM3QiwrQ0FBK0IsQ0FBQTtBQUNqQyxDQUFDLEVBZlcsWUFBWSxLQUFaLFlBQVksUUFldkIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZW51bSBTdWlzSWNvblR5cGUge1xuICBJTkZPID0gJ2luZm8nLFxuICBXQVJOSU5HID0gJ3dhcm5pbmcnLFxuICBDSEVDSyA9ICdjaGVjaycsXG4gIENST1NTID0gJ2Nyb3NzJyxcbiAgUExVUyA9ICdwbHVzJyxcbiAgTUlOVVMgPSAnbWludXMnLFxuICBBUlJPV19VUCA9ICdhcnJvdy11cCcsXG4gIEFSUk9XX0xFRlQgPSAnYXJyb3ctbGVmdCcsXG4gIEFSUk9XX1JJR0hUID0gJ2Fycm93LXJpZ2h0JyxcbiAgQVJST1dfRE9XTiA9ICdhcnJvdy1kb3duJyxcbiAgQ0hFVlJPTl9VUCA9ICdjaGV2cm9uLXVwJyxcbiAgQ0hFVlJPTl9ET1dOID0gJ2NoZXZyb24tZG93bicsXG4gIENIRVZST05fTEVGVCA9ICdjaGV2cm9uLWxlZnQnLFxuICBDSEVWUk9OX1JJR0hUID0gJ2NoZXZyb24tcmlnaHQnLFxufVxuIl19
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export * from './suis-pagination.component';
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtcGFnaW5hdGlvbi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDZCQUE2QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zdWlzLXBhZ2luYXRpb24uY29tcG9uZW50JztcbiJdfQ==
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Pipe } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
class SuisPaginationPagePipe {
|
4
|
+
transform(pageLabel, page, perPage, totalItems) {
|
5
|
+
if (totalItems <= 0)
|
6
|
+
return `${pageLabel}: 1 / 1 (0 / 0)`;
|
7
|
+
const maxPage = Math.ceil(totalItems / perPage);
|
8
|
+
const minItem = page * perPage - perPage + 1;
|
9
|
+
const maxItem = page * perPage > totalItems ? totalItems : page * perPage;
|
10
|
+
return `${pageLabel}: ${page} / ${maxPage} (${minItem}-${maxItem} / ${totalItems})`;
|
11
|
+
}
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisPaginationPagePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
13
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: SuisPaginationPagePipe, isStandalone: true, name: "suisPaginationPage" }); }
|
14
|
+
}
|
15
|
+
export { SuisPaginationPagePipe };
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisPaginationPagePipe, decorators: [{
|
17
|
+
type: Pipe,
|
18
|
+
args: [{
|
19
|
+
standalone: true,
|
20
|
+
name: 'suisPaginationPage',
|
21
|
+
}]
|
22
|
+
}] });
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1wYWdpbmF0aW9uLXBhZ2UucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL2NvbXBvbmVudHMvc3Vpcy1wYWdpbmF0aW9uL3N1aXMtcGFnaW5hdGlvbi1wYWdlLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7O0FBRXB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mb3JtKFxuICAgIHBhZ2VMYWJlbDogc3RyaW5nLFxuICAgIHBhZ2U6IG51bWJlcixcbiAgICBwZXJQYWdlOiBudW1iZXIsXG4gICAgdG90YWxJdGVtczogbnVtYmVyXG4gICk6IHN0cmluZyB7XG4gICAgaWYgKHRvdGFsSXRlbXMgPD0gMCkgcmV0dXJuIGAke3BhZ2VMYWJlbH06IDEgLyAxICgwIC8gMClgO1xuXG4gICAgY29uc3QgbWF4UGFnZSA9IE1hdGguY2VpbCh0b3RhbEl0ZW1zIC8gcGVyUGFnZSk7XG4gICAgY29uc3QgbWluSXRlbSA9IHBhZ2UgKiBwZXJQYWdlIC0gcGVyUGFnZSArIDE7XG4gICAgY29uc3QgbWF4SXRlbSA9IHBhZ2UgKiBwZXJQYWdlID4gdG90YWxJdGVtcyA/IHRvdGFsSXRlbXMgOiBwYWdlICogcGVyUGFnZTtcblxuICAgIHJldHVybiBgJHtwYWdlTGFiZWx9OiAke3BhZ2V9IC8gJHttYXhQYWdlfSAoJHttaW5JdGVtfS0ke21heEl0ZW19IC8gJHt0b3RhbEl0ZW1zfSlgO1xuICB9XG59XG4iXX0=
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, } from '@angular/core';
|
2
|
+
import { CommonModule } from '@angular/common';
|
3
|
+
import { SuisButtonComponent } from '../suis-button';
|
4
|
+
import { SuisIconComponent, SuisIconType } from '../suis-icon';
|
5
|
+
import { SuisPaginationPagePipe } from './suis-pagination-page.pipe';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
class SuisPaginationComponent {
|
8
|
+
constructor() {
|
9
|
+
/** @internal */
|
10
|
+
this.SuisIconType = SuisIconType;
|
11
|
+
/** @internal */
|
12
|
+
/**
|
13
|
+
* Number of the maximum page that can be reached based on totalItems and perPage values.
|
14
|
+
*/
|
15
|
+
this.maxPage = 1;
|
16
|
+
/**
|
17
|
+
* Number of the page presented. By default set to 1.
|
18
|
+
*/
|
19
|
+
this.page = 1;
|
20
|
+
/**
|
21
|
+
* Number of items presented per page. By default set to 15.
|
22
|
+
*/
|
23
|
+
this.perPage = 15;
|
24
|
+
/**
|
25
|
+
* Number of total items in data source. By default set to 0.
|
26
|
+
*/
|
27
|
+
this.totalItems = 0;
|
28
|
+
/**
|
29
|
+
* Adds margin top above the pagination. By default set to true.
|
30
|
+
*/
|
31
|
+
this.spacing = false;
|
32
|
+
/**
|
33
|
+
* Sets the page label between the buttons. By default set to 'Page'.
|
34
|
+
*/
|
35
|
+
this.pageLabel = 'Page';
|
36
|
+
/**
|
37
|
+
* Emits on page value change.
|
38
|
+
*/
|
39
|
+
this.pageChange = new EventEmitter();
|
40
|
+
}
|
41
|
+
ngOnChanges(changes) {
|
42
|
+
if (changes['totalItems'] || changes['perPage']) {
|
43
|
+
this.maxPage = Math.ceil(this.totalItems / this.perPage);
|
44
|
+
}
|
45
|
+
}
|
46
|
+
next() {
|
47
|
+
if (this.page < this.maxPage) {
|
48
|
+
this.page++;
|
49
|
+
this.pageChange.emit(this.page);
|
50
|
+
}
|
51
|
+
}
|
52
|
+
previous() {
|
53
|
+
if (this.page > 1) {
|
54
|
+
this.page--;
|
55
|
+
this.pageChange.emit(this.page);
|
56
|
+
}
|
57
|
+
}
|
58
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
59
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisPaginationComponent, isStandalone: true, selector: "suis-pagination", inputs: { page: "page", perPage: "perPage", totalItems: "totalItems", spacing: "spacing", pageLabel: "pageLabel" }, outputs: { pageChange: "pageChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"suis-pagination\" [class.suis-pagination--spacing]=\"true\">\n <button\n suisButton\n color=\"secondary\"\n [fitContent]=\"true\"\n [disabled]=\"page === 1\"\n (click)=\"previous()\"\n >\n <suis-icon [type]=\"SuisIconType.CHEVRON_LEFT\" color=\"white\"></suis-icon>\n </button>\n <div>\n {{ pageLabel | suisPaginationPage : page : perPage : totalItems }}\n </div>\n <button\n suisButton\n color=\"secondary\"\n [fitContent]=\"true\"\n [disabled]=\"page === maxPage\"\n (click)=\"next()\"\n >\n <suis-icon [type]=\"SuisIconType.CHEVRON_RIGHT\" color=\"white\"></suis-icon>\n </button>\n</div>\n", styles: [".suis-pagination{display:flex;align-items:center;justify-content:center}.suis-pagination--spacing{margin-top:1rem}.suis-pagination .suis-button:first-child{margin-right:1rem}.suis-pagination .suis-button:last-child{margin-left:1rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }, { kind: "component", type: SuisButtonComponent, selector: "button[suisButton]" }, { kind: "pipe", type: SuisPaginationPagePipe, name: "suisPaginationPage" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
60
|
+
}
|
61
|
+
export { SuisPaginationComponent };
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisPaginationComponent, decorators: [{
|
63
|
+
type: Component,
|
64
|
+
args: [{ selector: 'suis-pagination', standalone: true, imports: [
|
65
|
+
CommonModule,
|
66
|
+
SuisIconComponent,
|
67
|
+
SuisButtonComponent,
|
68
|
+
SuisPaginationPagePipe,
|
69
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"suis-pagination\" [class.suis-pagination--spacing]=\"true\">\n <button\n suisButton\n color=\"secondary\"\n [fitContent]=\"true\"\n [disabled]=\"page === 1\"\n (click)=\"previous()\"\n >\n <suis-icon [type]=\"SuisIconType.CHEVRON_LEFT\" color=\"white\"></suis-icon>\n </button>\n <div>\n {{ pageLabel | suisPaginationPage : page : perPage : totalItems }}\n </div>\n <button\n suisButton\n color=\"secondary\"\n [fitContent]=\"true\"\n [disabled]=\"page === maxPage\"\n (click)=\"next()\"\n >\n <suis-icon [type]=\"SuisIconType.CHEVRON_RIGHT\" color=\"white\"></suis-icon>\n </button>\n</div>\n", styles: [".suis-pagination{display:flex;align-items:center;justify-content:center}.suis-pagination--spacing{margin-top:1rem}.suis-pagination .suis-button:first-child{margin-right:1rem}.suis-pagination .suis-button:last-child{margin-left:1rem}\n"] }]
|
70
|
+
}], propDecorators: { page: [{
|
71
|
+
type: Input
|
72
|
+
}], perPage: [{
|
73
|
+
type: Input
|
74
|
+
}], totalItems: [{
|
75
|
+
type: Input
|
76
|
+
}], spacing: [{
|
77
|
+
type: Input
|
78
|
+
}], pageLabel: [{
|
79
|
+
type: Input
|
80
|
+
}], pageChange: [{
|
81
|
+
type: Output
|
82
|
+
}] } });
|
83
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1wYWdpbmF0aW9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL2NvbXBvbmVudHMvc3Vpcy1wYWdpbmF0aW9uL3N1aXMtcGFnaW5hdGlvbi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtcGFnaW5hdGlvbi9zdWlzLXBhZ2luYXRpb24uY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLHVCQUF1QixFQUN2QixTQUFTLEVBQ1QsWUFBWSxFQUNaLEtBQUssRUFFTCxNQUFNLEdBRVAsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRS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cbiAgICBbZGlzYWJsZWRdPVwicGFnZSA9PT0gbWF4UGFnZVwiXG4gICAgKGNsaWNrKT1cIm5leHQoKVwiXG4gID5cbiAgICA8c3Vpcy1pY29uIFt0eXBlXT1cIlN1aXNJY29uVHlwZS5DSEVWUk9OX1JJR0hUXCIgY29sb3I9XCJ3aGl0ZVwiPjwvc3Vpcy1pY29uPlxuICA8L2J1dHRvbj5cbjwvZGl2PlxuIl19
|
@@ -0,0 +1,5 @@
|
|
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';
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtdGFibGUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLCtCQUErQixDQUFDO0FBQzlDLGNBQWMsNkJBQTZCLENBQUM7QUFDNUMsY0FBYyx5QkFBeUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc3Vpcy10YWJsZS5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLXRhYmxlLWNvbHVtbi5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLXRhYmxlLWNlbGwuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy10YWJsZS5pbnRlcmZhY2VzJztcbiJdfQ==
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Directive, TemplateRef, inject } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
class SuisTableCellDirective {
|
4
|
+
constructor() {
|
5
|
+
/**
|
6
|
+
* Template of the table cell.
|
7
|
+
*/
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
9
|
+
this.templateRef = inject((TemplateRef));
|
10
|
+
}
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisTableCellDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
12
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: SuisTableCellDirective, isStandalone: true, selector: "[suisTableCell]", ngImport: i0 }); }
|
13
|
+
}
|
14
|
+
export { SuisTableCellDirective };
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisTableCellDirective, decorators: [{
|
16
|
+
type: Directive,
|
17
|
+
args: [{
|
18
|
+
selector: '[suisTableCell]',
|
19
|
+
standalone: true,
|
20
|
+
}]
|
21
|
+
}] });
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy10YWJsZS1jZWxsLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL2NvbXBvbmVudHMvc3Vpcy10YWJsZS9zdWlzLXRhYmxlLWNlbGwuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsV0FBVyxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFFL0QsTUFJYSxzQkFBc0I7SUFKbkM7UUFLRTs7V0FFRztRQUNILDhEQUE4RDtRQUM5QyxnQkFBVyxHQUFHLE1BQU0sQ0FBQyxDQUFBLFdBQWdCLENBQUEsQ0FBQyxDQUFDO0tBQ3hEOzhHQU5ZLHNCQUFzQjtrR0FBdEIsc0JBQXNCOztTQUF0QixzQkFBc0I7MkZBQXRCLHNCQUFzQjtrQkFKbEMsU0FBUzttQkFBQztvQkFDVCxRQUFRLEVBQUUsaUJBQWlCO29CQUMzQixVQUFVLEVBQUUsSUFBSTtpQkFDakIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBEaXJlY3RpdmUsIFRlbXBsYXRlUmVmLCBpbmplY3QgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuQERpcmVjdGl2ZSh7XG4gIHNlbGVjdG9yOiAnW3N1aXNUYWJsZUNlbGxdJyxcbiAgc3RhbmRhbG9uZTogdHJ1ZSxcbn0pXG5leHBvcnQgY2xhc3MgU3Vpc1RhYmxlQ2VsbERpcmVjdGl2ZSB7XG4gIC8qKlxuICAgKiBUZW1wbGF0ZSBvZiB0aGUgdGFibGUgY2VsbC5cbiAgICovXG4gIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55XG4gIHB1YmxpYyByZWFkb25seSB0ZW1wbGF0ZVJlZiA9IGluamVjdChUZW1wbGF0ZVJlZjxhbnk+KTtcbn1cbiJdfQ==
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { ContentChild, Directive, Input } from '@angular/core';
|
2
|
+
import { SuisTableCellDirective } from './suis-table-cell.directive';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
class SuisTableColumnDirective {
|
5
|
+
constructor() {
|
6
|
+
this._name = '';
|
7
|
+
this._orderProperty = '';
|
8
|
+
}
|
9
|
+
/** Unique name for this column. */
|
10
|
+
get name() {
|
11
|
+
return this._name;
|
12
|
+
}
|
13
|
+
set name(name) {
|
14
|
+
this._name = name;
|
15
|
+
}
|
16
|
+
get orderProperty() {
|
17
|
+
return this._orderProperty;
|
18
|
+
}
|
19
|
+
set orderProperty(orderProperty) {
|
20
|
+
this._orderProperty = orderProperty;
|
21
|
+
}
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisTableColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
23
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: SuisTableColumnDirective, isStandalone: true, selector: "[suisTableColumn]", inputs: { name: ["suisTableColumn", "name"], orderProperty: ["suisTableColumnOrderProperty", "orderProperty"] }, queries: [{ propertyName: "cell", first: true, predicate: SuisTableCellDirective, descendants: true }], ngImport: i0 }); }
|
24
|
+
}
|
25
|
+
export { SuisTableColumnDirective };
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisTableColumnDirective, decorators: [{
|
27
|
+
type: Directive,
|
28
|
+
args: [{
|
29
|
+
selector: '[suisTableColumn]',
|
30
|
+
standalone: true,
|
31
|
+
}]
|
32
|
+
}], propDecorators: { cell: [{
|
33
|
+
type: ContentChild,
|
34
|
+
args: [SuisTableCellDirective]
|
35
|
+
}], name: [{
|
36
|
+
type: Input,
|
37
|
+
args: ['suisTableColumn']
|
38
|
+
}], orderProperty: [{
|
39
|
+
type: Input,
|
40
|
+
args: ['suisTableColumnOrderProperty']
|
41
|
+
}] } });
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy10YWJsZS1jb2x1bW4uZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zdWlzL3NyYy9saWIvY29tcG9uZW50cy9zdWlzLXRhYmxlL3N1aXMtdGFibGUtY29sdW1uLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsW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pc1RhYmxlQ2VsbERpcmVjdGl2ZSB9IGZyb20gJy4vc3Vpcy10YWJsZS1jZWxsLmRpcmVjdGl2ZSc7XG5cbkBEaXJlY3RpdmUoe1xuICBzZWxlY3RvcjogJ1tzdWlzVGFibGVDb2x1bW5dJyxcbiAgc3RhbmRhbG9uZTogdHJ1ZSxcbn0pXG5leHBvcnQgY2xhc3MgU3Vpc1RhYmxlQ29sdW1uRGlyZWN0aXZlIHtcbiAgQENvbnRlbnRDaGlsZChTdWlzVGFibGVDZWxsRGlyZWN0aXZlKSBjZWxsPzogU3Vpc1RhYmxlQ2VsbERpcmVjdGl2ZTtcblxuICBwcm90ZWN0ZWQgX25hbWU6IHN0cmluZyA9ICcnO1xuICBwcm90ZWN0ZWQgX29yZGVyUHJvcGVydHk6IHN0cmluZyA9ICcnO1xuXG4gIC8qKiBVbmlxdWUgbmFtZSBmb3IgdGhpcyBjb2x1bW4uICovXG4gIEBJbnB1dCgnc3Vpc1RhYmxlQ29sdW1uJylcbiAgZ2V0IG5hbWUoKTogc3RyaW5nIHtcbiAgICByZXR1cm4gdGhpcy5fbmFtZTtcbiAgfVxuXG4gIHNldCBuYW1lKG5hbWU6IHN0cmluZykge1xuICAgIHRoaXMuX25hbWUgPSBuYW1lO1xuICB9XG5cbiAgQElucHV0KCdzdWlzVGFibGVDb2x1bW5PcmRlclByb3BlcnR5JylcbiAgZ2V0IG9yZGVyUHJvcGVydHkoKTogc3RyaW5nIHtcbiAgICByZXR1cm4gdGhpcy5fb3JkZXJQcm9wZXJ0eTtcbiAgfVxuXG4gIHNldCBvcmRlclByb3BlcnR5KG9yZGVyUHJvcGVydHk6IHN0cmluZykge1xuICAgIHRoaXMuX29yZGVyUHJvcGVydHkgPSBvcmRlclByb3BlcnR5O1xuICB9XG59XG4iXX0=
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ContentChildren, EventEmitter, Input, Output, QueryList, } from '@angular/core';
|
2
|
+
import { CommonModule } from '@angular/common';
|
3
|
+
import { SuisSpinnerContainerComponent } from '../suis-spinner-container';
|
4
|
+
import { SuisTableColumnDirective } from './suis-table-column.directive';
|
5
|
+
import { SuisIconComponent, SuisIconType } from '../suis-icon';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
import * as i1 from "@angular/common";
|
8
|
+
class SuisTableComponent {
|
9
|
+
constructor() {
|
10
|
+
/** @internal */
|
11
|
+
this.SuisIconType = SuisIconType;
|
12
|
+
/**
|
13
|
+
* Data items collection. Type of SuisTableDataItem[]. By default set to empty array. Required input.
|
14
|
+
*/
|
15
|
+
this.data = [];
|
16
|
+
/**
|
17
|
+
* Specifies property that data is ordered. By default set to empty string.
|
18
|
+
*/
|
19
|
+
this.orderBy = '';
|
20
|
+
/**
|
21
|
+
* Specifies sort condition. Accepted values - 'asc' and 'desc'. By default set to 'asc'.
|
22
|
+
*/
|
23
|
+
this.sortBy = 'asc';
|
24
|
+
/**
|
25
|
+
* Shows loading spinner and blurs data. By default set to false.
|
26
|
+
*/
|
27
|
+
this.loading = false;
|
28
|
+
/**
|
29
|
+
* Emits value on sort condition change.
|
30
|
+
*/
|
31
|
+
this.sortByChange = new EventEmitter();
|
32
|
+
/**
|
33
|
+
* Emits value on order property change.
|
34
|
+
*/
|
35
|
+
this.orderByChange = new EventEmitter();
|
36
|
+
}
|
37
|
+
onColumnClick(property) {
|
38
|
+
if (this.orderBy !== property) {
|
39
|
+
this.orderBy = property;
|
40
|
+
this.orderByChange.emit(this.orderBy);
|
41
|
+
}
|
42
|
+
else {
|
43
|
+
this.sortBy = this.sortBy === 'asc' ? 'desc' : 'asc';
|
44
|
+
this.sortByChange.emit(this.sortBy);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
48
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisTableComponent, isStandalone: true, selector: "suis-table", inputs: { data: "data", orderBy: "orderBy", sortBy: "sortBy", loading: "loading" }, outputs: { sortByChange: "sortByChange", orderByChange: "orderByChange" }, queries: [{ propertyName: "columns", predicate: SuisTableColumnDirective }], ngImport: i0, template: "<table *ngIf=\"columns\" class=\"suis-table\">\n <thead>\n <tr>\n <th\n *ngFor=\"let column of columns\"\n [class.pointer]=\"column.orderProperty\"\n (click)=\"\n column.orderProperty ? onColumnClick(column.orderProperty) : undefined\n \"\n >\n <div class=\"suis-table__header\">\n <span>\n {{ column.name }}\n </span>\n <suis-icon\n *ngIf=\"column.orderProperty === orderBy\"\n [type]=\"\n sortBy === 'asc'\n ? SuisIconType.CHEVRON_DOWN\n : SuisIconType.CHEVRON_UP\n \"\n size=\"lg\"\n color=\"white\"\n ></suis-icon>\n </div>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of data\">\n <td *ngFor=\"let column of columns\">\n <ng-container\n *ngTemplateOutlet=\"\n column.cell!.templateRef;\n context: { $implicit: item }\n \"\n ></ng-container>\n </td>\n </tr>\n <suis-spinner-container\n *ngIf=\"loading\"\n [absolute]=\"true\"\n [blur]=\"true\"\n ></suis-spinner-container>\n </tbody>\n</table>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-table{width:100%;border-collapse:collapse}.suis-table thead{background-color:#273c75;color:#fff}.suis-table thead tr th{font-weight:600;padding:.75rem 1rem}.suis-table thead tr th:first-child{border-top-left-radius:.25rem}.suis-table thead tr th:last-child{border-top-right-radius:.25rem}.suis-table thead tr th.pointer{cursor:pointer}.suis-table thead tr th>.suis-table__header{display:flex;align-items:center}.suis-table thead tr th>.suis-table__header suis-icon{display:block;margin-left:.125rem}.suis-table tbody{position:relative;background-color:#f5f6fa}.suis-table tbody tr{border-bottom:.0625rem solid #dcdde1}.suis-table tbody tr:hover{background-color:#dcdde1d9}.suis-table tbody tr td{padding:.375rem 1rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }, { kind: "component", type: SuisSpinnerContainerComponent, selector: "suis-spinner-container", inputs: ["size", "color", "blur", "absolute"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
49
|
+
}
|
50
|
+
export { SuisTableComponent };
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisTableComponent, decorators: [{
|
52
|
+
type: Component,
|
53
|
+
args: [{ selector: 'suis-table', standalone: true, imports: [CommonModule, SuisIconComponent, SuisSpinnerContainerComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<table *ngIf=\"columns\" class=\"suis-table\">\n <thead>\n <tr>\n <th\n *ngFor=\"let column of columns\"\n [class.pointer]=\"column.orderProperty\"\n (click)=\"\n column.orderProperty ? onColumnClick(column.orderProperty) : undefined\n \"\n >\n <div class=\"suis-table__header\">\n <span>\n {{ column.name }}\n </span>\n <suis-icon\n *ngIf=\"column.orderProperty === orderBy\"\n [type]=\"\n sortBy === 'asc'\n ? SuisIconType.CHEVRON_DOWN\n : SuisIconType.CHEVRON_UP\n \"\n size=\"lg\"\n color=\"white\"\n ></suis-icon>\n </div>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of data\">\n <td *ngFor=\"let column of columns\">\n <ng-container\n *ngTemplateOutlet=\"\n column.cell!.templateRef;\n context: { $implicit: item }\n \"\n ></ng-container>\n </td>\n </tr>\n <suis-spinner-container\n *ngIf=\"loading\"\n [absolute]=\"true\"\n [blur]=\"true\"\n ></suis-spinner-container>\n </tbody>\n</table>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-table{width:100%;border-collapse:collapse}.suis-table thead{background-color:#273c75;color:#fff}.suis-table thead tr th{font-weight:600;padding:.75rem 1rem}.suis-table thead tr th:first-child{border-top-left-radius:.25rem}.suis-table thead tr th:last-child{border-top-right-radius:.25rem}.suis-table thead tr th.pointer{cursor:pointer}.suis-table thead tr th>.suis-table__header{display:flex;align-items:center}.suis-table thead tr th>.suis-table__header suis-icon{display:block;margin-left:.125rem}.suis-table tbody{position:relative;background-color:#f5f6fa}.suis-table tbody tr{border-bottom:.0625rem solid #dcdde1}.suis-table tbody tr:hover{background-color:#dcdde1d9}.suis-table tbody tr td{padding:.375rem 1rem}\n"] }]
|
54
|
+
}], propDecorators: { columns: [{
|
55
|
+
type: ContentChildren,
|
56
|
+
args: [SuisTableColumnDirective]
|
57
|
+
}], data: [{
|
58
|
+
type: Input,
|
59
|
+
args: [{ required: true }]
|
60
|
+
}], orderBy: [{
|
61
|
+
type: Input
|
62
|
+
}], sortBy: [{
|
63
|
+
type: Input
|
64
|
+
}], loading: [{
|
65
|
+
type: Input
|
66
|
+
}], sortByChange: [{
|
67
|
+
type: Output
|
68
|
+
}], orderByChange: [{
|
69
|
+
type: Output
|
70
|
+
}] } });
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy10YWJsZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtdGFibGUvc3Vpcy10YWJsZS5jb21w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1bW4ubmFtZSB9fVxuICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICA8c3Vpcy1pY29uXG4gICAgICAgICAgICAqbmdJZj1cImNvbHVtbi5vcmRlclByb3BlcnR5ID09PSBvcmRlckJ5XCJcbiAgICAgICAgICAgIFt0eXBlXT1cIlxuICAgICAgICAgICAgICBzb3J0QnkgPT09ICdhc2MnXG4gICAgICAgICAgICAgICAgPyBTdWlzSWNvblR5cGUuQ0hFVlJPTl9ET1dOXG4gICAgICAgICAgICAgICAgOiBTdWlzSWNvblR5cGUuQ0hFVlJPTl9VUFxuICAgICAgICAgICAgXCJcbiAgICAgICAgICAgIHNpemU9XCJsZ1wiXG4gICAgICAgICAgICBjb2xvcj1cIndoaXRlXCJcbiAgICAgICAgICA+PC9zdWlzLWljb24+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC90aD5cbiAgICA8L3RyPlxuICA8L3RoZWFkPlxuICA8dGJvZHk+XG4gICAgPHRyICpuZ0Zvcj1cImxldCBpdGVtIG9mIGRhdGFcIj5cbiAgICAgIDx0ZCAqbmdGb3I9XCJsZXQgY29sdW1uIG9mIGNvbHVtbnNcIj5cbiAgICAgICAgPG5nLWNvbnRhaW5lclxuICAgICAgICAgICpuZ1RlbXBsYXRlT3V0bGV0PVwiXG4gICAgICAgICAgICBjb2x1bW4uY2VsbCEudGVtcGxhdGVSZWY7XG4gICAgICAgICAgICBjb250ZXh0OiB7ICRpbXBsaWNpdDogaXRlbSB9XG4gICAgICAgICAgXCJcbiAgICAgICAgPjwvbmctY29udGFpbmVyPlxuICAgICAgPC90ZD5cbiAgICA8L3RyPlxuICAgIDxzdWlzLXNwaW5uZXItY29udGFpbmVyXG4gICAgICAqbmdJZj1cImxvYWRpbmdcIlxuICAgICAgW2Fic29sdXRlXT1cInRydWVcIlxuICAgICAgW2JsdXJdPVwidHJ1ZVwiXG4gICAgPjwvc3Vpcy1zcGlubmVyLWNvbnRhaW5lcj5cbiAgPC90Ym9keT5cbjwvdGFibGU+XG4iXX0=
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export {};
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy10YWJsZS5pbnRlcmZhY2VzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zdWlzL3NyYy9saWIvY29tcG9uZW50cy9zdWlzLXRhYmxlL3N1aXMtdGFibGUuaW50ZXJmYWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBTdWlzVGFibGVEYXRhSXRlbSB7XG4gIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZXhwbGljaXQtYW55XG4gIFtrZXk6IHN0cmluZ106IGFueTtcbn1cbiJdfQ==
|
@@ -18,9 +18,13 @@ class SuisButtonBase {
|
|
18
18
|
* Shows loading spinner instead of content projection. By default set to false.
|
19
19
|
*/
|
20
20
|
this.loading = false;
|
21
|
+
/**
|
22
|
+
* Sets width to fit-content instead of 100%. By default set to false.
|
23
|
+
*/
|
24
|
+
this.fitContent = false;
|
21
25
|
}
|
22
26
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisButtonBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
23
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: SuisButtonBase, inputs: { color: "color", disabled: "disabled", loading: "loading" }, ngImport: i0 }); }
|
27
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: SuisButtonBase, inputs: { color: "color", disabled: "disabled", loading: "loading", fitContent: "fitContent" }, ngImport: i0 }); }
|
24
28
|
}
|
25
29
|
export { SuisButtonBase };
|
26
30
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisButtonBase, decorators: [{
|
@@ -31,5 +35,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
31
35
|
type: Input
|
32
36
|
}], loading: [{
|
33
37
|
type: Input
|
38
|
+
}], fitContent: [{
|
39
|
+
type: Input
|
34
40
|
}] } });
|
35
|
-
//# sourceMappingURL=data:application/json;base64,
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1idXR0b24uYmFzZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL3NoYXJlZC9jbGFzc2VzL3N1aXMtYnV0dG9uLmJhc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxVQUFVLEVBQUUsS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBR2hGLE1BQ3NCLGNBQWM7SUFEcEM7UUFFRSxnQkFBZ0I7UUFDRyxlQUFVLEdBQUcsTUFBTSxDQUFDLFVBQVUsQ0FBQyxDQUFDO1FBRW5ELGdCQUFnQjtRQUNHLGNBQVMsR0FBRyxNQUFNLENBQUMsU0FBUyxDQUFDLENBQUM7UUFFakQ7O1dBRUc7UUFDTSxVQUFLLEdBQXFDLFNBQVMsQ0FBQztRQUU3RDs7V0FFRztRQUNNLGFBQVEsR0FBWSxLQUFLLENBQUM7UUFFbkM7O1dBRUc7UUFDTSxZQUFPLEdBQVksS0FBSyxDQUFDO1FBRWxDOztXQUVHO1FBQ00sZUFBVSxHQUFZLEtBQUssQ0FBQztLQUN0Qzs4R0ExQnFCLGNBQWM7a0d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