@testgorilla/tgo-ui 0.0.23 → 0.0.25

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.
Files changed (63) hide show
  1. package/.github/README.md +15 -2
  2. package/README.md +1 -1
  3. package/components/create-account/create-account.component.d.ts +9 -2
  4. package/components/create-account/create-account.constant.d.ts +10 -0
  5. package/components/create-account/create-account.model.d.ts +10 -0
  6. package/components/create-password/create-password.component.d.ts +9 -2
  7. package/components/create-password/create-password.constant.d.ts +5 -0
  8. package/components/create-password/create-password.model.d.ts +5 -0
  9. package/components/forgot-password/forgot-password.component.d.ts +9 -2
  10. package/components/forgot-password/forgot-password.constant.d.ts +6 -0
  11. package/components/forgot-password/forgot-password.model.d.ts +6 -0
  12. package/components/label/label.component.d.ts +39 -0
  13. package/components/label/label.component.module.d.ts +8 -0
  14. package/components/label/label.model.d.ts +16 -0
  15. package/components/login/login.component.d.ts +8 -2
  16. package/components/login/login.constant.d.ts +10 -0
  17. package/components/login/login.model.d.ts +10 -0
  18. package/components/navigation/navigation.component.d.ts +4 -4
  19. package/components/navigation/navigation.component.module.d.ts +2 -2
  20. package/components/table/directives/dynamic-component.directive.d.ts +13 -0
  21. package/{shared/pipes/dataPropertyGetter.d.ts → components/table/pipes/data-property-getter.d.ts} +0 -0
  22. package/components/table/table.component.d.ts +5 -11
  23. package/components/table/table.component.module.d.ts +6 -6
  24. package/components/table/table.model.d.ts +17 -8
  25. package/esm2020/components/card/card.component.mjs +2 -2
  26. package/esm2020/components/create-account/create-account.component.mjs +19 -3
  27. package/esm2020/components/create-account/create-account.constant.mjs +11 -0
  28. package/esm2020/components/create-account/create-account.model.mjs +1 -1
  29. package/esm2020/components/create-password/create-password.component.mjs +19 -3
  30. package/esm2020/components/create-password/create-password.constant.mjs +6 -0
  31. package/esm2020/components/create-password/create-password.model.mjs +1 -1
  32. package/esm2020/components/forgot-password/forgot-password.component.mjs +13 -3
  33. package/esm2020/components/forgot-password/forgot-password.constant.mjs +7 -0
  34. package/esm2020/components/forgot-password/forgot-password.model.mjs +1 -1
  35. package/esm2020/components/label/label.component.mjs +55 -0
  36. package/esm2020/components/label/label.component.module.mjs +19 -0
  37. package/esm2020/components/label/label.model.mjs +9 -0
  38. package/esm2020/components/login/login.component.mjs +18 -3
  39. package/esm2020/components/login/login.constant.mjs +11 -0
  40. package/esm2020/components/login/login.model.mjs +1 -1
  41. package/esm2020/components/navigation/navigation.component.mjs +5 -5
  42. package/esm2020/components/navigation/navigation.component.module.mjs +5 -5
  43. package/esm2020/components/table/directives/dynamic-component.directive.mjs +39 -0
  44. package/esm2020/components/table/pipes/data-property-getter.mjs +32 -0
  45. package/esm2020/components/table/table.component.mjs +9 -19
  46. package/esm2020/components/table/table.component.module.mjs +7 -7
  47. package/esm2020/components/table/table.model.mjs +13 -14
  48. package/esm2020/public-api.mjs +10 -7
  49. package/fesm2015/testgorilla-tgo-ui.mjs +250 -116
  50. package/fesm2015/testgorilla-tgo-ui.mjs.map +1 -1
  51. package/fesm2020/testgorilla-tgo-ui.mjs +249 -116
  52. package/fesm2020/testgorilla-tgo-ui.mjs.map +1 -1
  53. package/package.json +17 -17
  54. package/public-api.d.ts +8 -4
  55. package/src/assets/.gitkeep +0 -0
  56. package/{index.d.ts → testgorilla-tgo-ui.d.ts} +0 -0
  57. package/components/status/status.component.d.ts +0 -27
  58. package/components/status/status.component.module.d.ts +0 -9
  59. package/components/status/status.model.d.ts +0 -8
  60. package/esm2020/components/status/status.component.mjs +0 -44
  61. package/esm2020/components/status/status.component.module.mjs +0 -20
  62. package/esm2020/components/status/status.model.mjs +0 -2
  63. package/esm2020/shared/pipes/dataPropertyGetter.mjs +0 -32
package/.github/README.md CHANGED
@@ -46,7 +46,19 @@ In order to update the existing snapshots, we need to use DOCKER to update, sinc
46
46
  ```
47
47
  docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:latest /bin/bash
48
48
  npm install
49
- npx playwright test e2e/common.spec.ts --update-snapshots
49
+ npx playwright install
50
+ npx playwright test e2e/<file_name>.spec.ts --update-snapshots
51
+ ```
52
+
53
+ if you see the following error, you can skip them conviniently. This will not affect the tests, just that we will have the reports in same directory. We need the reports to be in a single directory to store artifacts in CI. So we can ignore them.
54
+ ```
55
+ root@docker-desktop:/work# npx playwright test e2e/common.spec.ts --update-snapshots
56
+ Configuration Error: HTML reporter output folder clashes with the tests output folder:
57
+
58
+ html reporter folder: /work/test-results/html-report
59
+ test results folder: /work/test-results
60
+
61
+ HTML reporter will clear its output directory prior to being generated, which will lead to the artifact loss.
50
62
  ```
51
63
 
52
64
  In order to execute the visual tests, we need to use same docker so that the screenshots are aligned with the same OS.
@@ -54,7 +66,8 @@ In order to execute the visual tests, we need to use same docker so that the scr
54
66
  ```
55
67
  docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:latest /bin/bash
56
68
  npm install
57
- npx playwright test e2e/common.spec.ts
69
+ npx playwright install
70
+ npx playwright test e2e/<file_name>.spec.ts
58
71
  ```
59
72
 
60
73
  Currently we are using `toMatchSnapshot` instead of the latest `toHaveScreenshot` from playwright. Since `toHaveScreenshot` doesn't support firefox now, we are going ahead with `toMatchSnapshot`. In (near) future once it supports firefox, we will be using the latest `toHaveScreenshot` method.
package/README.md CHANGED
@@ -8,11 +8,11 @@
8
8
  * Create Password
9
9
  * Field
10
10
  * Forgot Password
11
+ * Label
11
12
  * Login
12
13
  * Logo
13
14
  * NavBar
14
15
  * Navigation
15
16
  * Paginator
16
17
  * Create Account
17
- * Status
18
18
  * Table
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { FormBuilder } from '@angular/forms';
3
- import { CreateAccountCredentials } from './create-account.model';
3
+ import { CreateAccountCredentials, Ii18nCreateAccount } from './create-account.model';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class CreateAccountComponent implements OnInit {
6
6
  private fb;
@@ -21,6 +21,13 @@ export declare class CreateAccountComponent implements OnInit {
21
21
  * @memberof ButtonComponent
22
22
  */
23
23
  loading: boolean;
24
+ /**
25
+ *
26
+ * @description Object with the translations for the component.
27
+ * @type {Ii18nCreateAccount}
28
+ * @memberof CreateAccountComponent
29
+ */
30
+ i18n: Ii18nCreateAccount;
24
31
  /**
25
32
  * @ignore
26
33
  */
@@ -38,5 +45,5 @@ export declare class CreateAccountComponent implements OnInit {
38
45
  login(): void;
39
46
  checkErrors(field: string): void;
40
47
  static ɵfac: i0.ɵɵFactoryDeclaration<CreateAccountComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<CreateAccountComponent, "ui-create-account", never, { "formErrors": "formErrors"; "loading": "loading"; }, { "submitEvent": "submitEvent"; "loginEvent": "loginEvent"; }, never, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<CreateAccountComponent, "ui-create-account", never, { "formErrors": "formErrors"; "loading": "loading"; "i18n": "i18n"; }, { "submitEvent": "submitEvent"; "loginEvent": "loginEvent"; }, never, never>;
42
49
  }
@@ -0,0 +1,10 @@
1
+ export declare const CREATE_ACCOUNT_i18n: {
2
+ title: string;
3
+ subtitle: string;
4
+ email_placeholder: string;
5
+ password_placeholder: string;
6
+ terms_conditions: string;
7
+ button_label: string;
8
+ have_career_passport: string;
9
+ login: string;
10
+ };
@@ -2,3 +2,13 @@ export interface CreateAccountCredentials {
2
2
  username: string;
3
3
  password: string;
4
4
  }
5
+ export interface Ii18nCreateAccount {
6
+ title: string;
7
+ subtitle: string;
8
+ email_placeholder: string;
9
+ password_placeholder: string;
10
+ terms_conditions: string;
11
+ button_label: string;
12
+ have_career_passport: string;
13
+ login: string;
14
+ }
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { FormBuilder } from '@angular/forms';
3
- import { CreatePasswordCredentials } from './create-password.model';
3
+ import { CreatePasswordCredentials, Ii18nCreatePassword } from './create-password.model';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class CreatePasswordComponent implements OnInit {
6
6
  private fb;
@@ -20,6 +20,13 @@ export declare class CreatePasswordComponent implements OnInit {
20
20
  * @memberof ButtonComponent
21
21
  */
22
22
  loading: boolean;
23
+ /**
24
+ *
25
+ * @description Object with the translations for the component.
26
+ * @type {Ii18nCreatePassword}
27
+ * @memberof CreatePasswordComponent
28
+ */
29
+ i18n: Ii18nCreatePassword;
23
30
  /**
24
31
  * @ignore
25
32
  */
@@ -32,5 +39,5 @@ export declare class CreatePasswordComponent implements OnInit {
32
39
  submit(): void;
33
40
  checkErrors(field: string): void;
34
41
  static ɵfac: i0.ɵɵFactoryDeclaration<CreatePasswordComponent, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<CreatePasswordComponent, "ui-create-password", never, { "formErrors": "formErrors"; "loading": "loading"; }, { "submitEvent": "submitEvent"; }, never, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<CreatePasswordComponent, "ui-create-password", never, { "formErrors": "formErrors"; "loading": "loading"; "i18n": "i18n"; }, { "submitEvent": "submitEvent"; }, never, never>;
36
43
  }
@@ -0,0 +1,5 @@
1
+ export declare const CREATE_PASSWORD_i18n: {
2
+ title: string;
3
+ password_placeholder: string;
4
+ button: string;
5
+ };
@@ -1,3 +1,8 @@
1
1
  export interface CreatePasswordCredentials {
2
2
  password: string;
3
3
  }
4
+ export interface Ii18nCreatePassword {
5
+ title: string;
6
+ password_placeholder: string;
7
+ button: string;
8
+ }
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { FormBuilder } from '@angular/forms';
3
- import { ForgotPasswordCredentials } from './forgot-password.model';
3
+ import { ForgotPasswordCredentials, Ii18nForgotPassword } from './forgot-password.model';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class ForgotPasswordComponent implements OnInit {
6
6
  private fb;
@@ -20,6 +20,13 @@ export declare class ForgotPasswordComponent implements OnInit {
20
20
  * @memberof ButtonComponent
21
21
  */
22
22
  loading: boolean;
23
+ /**
24
+ *
25
+ * @description Object with the translations for the component.
26
+ * @type {Ii18nForgotPassword}
27
+ * @memberof ForgotPasswordComponent
28
+ */
29
+ i18n: Ii18nForgotPassword;
23
30
  /**
24
31
  * @ignore
25
32
  */
@@ -37,5 +44,5 @@ export declare class ForgotPasswordComponent implements OnInit {
37
44
  backToLogin(): void;
38
45
  checkErrors(field: string): void;
39
46
  static ɵfac: i0.ɵɵFactoryDeclaration<ForgotPasswordComponent, never>;
40
- static ɵcmp: i0.ɵɵComponentDeclaration<ForgotPasswordComponent, "ui-forgot-password", never, { "formErrors": "formErrors"; "loading": "loading"; }, { "submitEvent": "submitEvent"; "backToLoginEvent": "backToLoginEvent"; }, never, never>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<ForgotPasswordComponent, "ui-forgot-password", never, { "formErrors": "formErrors"; "loading": "loading"; "i18n": "i18n"; }, { "submitEvent": "submitEvent"; "backToLoginEvent": "backToLoginEvent"; }, never, never>;
41
48
  }
@@ -0,0 +1,6 @@
1
+ export declare const FORGOT_PASSWORD_i18n: {
2
+ title: string;
3
+ email_placeholder: string;
4
+ button_label: string;
5
+ back_to_login: string;
6
+ };
@@ -1,3 +1,9 @@
1
1
  export interface ForgotPasswordCredentials {
2
2
  email: string;
3
3
  }
4
+ export interface Ii18nForgotPassword {
5
+ title: string;
6
+ email_placeholder: string;
7
+ button_label: string;
8
+ back_to_login: string;
9
+ }
@@ -0,0 +1,39 @@
1
+ import { LabelSizeEnum } from './label.model';
2
+ import * as i0 from "@angular/core";
3
+ export declare class LabelComponent {
4
+ /**
5
+ * @ignore
6
+ */
7
+ LabelSizeEnum: typeof LabelSizeEnum;
8
+ /**
9
+ * Label background color
10
+ *
11
+ * @type {string}
12
+ * @memberof LabelComponent
13
+ */
14
+ backgroundColor: string;
15
+ /**
16
+ * Status text color
17
+ *
18
+ * @type {string}
19
+ * @memberof LabelComponent
20
+ */
21
+ textColor: string;
22
+ /**
23
+ * Status title
24
+ *
25
+ * @type {string}
26
+ * @memberof LabelComponent
27
+ */
28
+ title: string;
29
+ /**
30
+ * Label size
31
+ *
32
+ * @type {LabelSizeEnum}
33
+ * @memberof LabelComponent
34
+ */
35
+ size: LabelSizeEnum;
36
+ constructor();
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<LabelComponent, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<LabelComponent, "ui-label", never, { "backgroundColor": "backgroundColor"; "textColor": "textColor"; "title": "title"; "size": "size"; }, {}, never, never>;
39
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./label.component";
3
+ import * as i2 from "@angular/common";
4
+ export declare class LabelComponentModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<LabelComponentModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LabelComponentModule, [typeof i1.LabelComponent], [typeof i2.CommonModule], [typeof i1.LabelComponent]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<LabelComponentModule>;
8
+ }
@@ -0,0 +1,16 @@
1
+ export interface ILabelOptions {
2
+ [key: string]: ILabelOptionItem;
3
+ }
4
+ export interface ILabelOptionItem {
5
+ title: string;
6
+ textColor: string;
7
+ backgroundColor: string;
8
+ size: LabelSizeEnum;
9
+ }
10
+ export declare enum LabelSizeEnum {
11
+ SMALL = "small",
12
+ MEDIUM = "medium",
13
+ LARGE = "large",
14
+ BIG = "big",
15
+ HUGE = "huge"
16
+ }
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { FormBuilder } from '@angular/forms';
3
- import { LoginCredentials } from './login.model';
3
+ import { Ii18nLogin, LoginCredentials } from './login.model';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class LoginComponent implements OnInit {
6
6
  private fb;
@@ -21,6 +21,12 @@ export declare class LoginComponent implements OnInit {
21
21
  * @memberof ButtonComponent
22
22
  */
23
23
  loading: boolean;
24
+ /**
25
+ * @description Object with the translations for the component.
26
+ * @type {Ii18n}
27
+ * @memberof LoginComponent
28
+ */
29
+ i18n: Ii18nLogin;
24
30
  /**
25
31
  * @ignore
26
32
  */
@@ -43,5 +49,5 @@ export declare class LoginComponent implements OnInit {
43
49
  createAccount(): void;
44
50
  checkErrors(field: string): void;
45
51
  static ɵfac: i0.ɵɵFactoryDeclaration<LoginComponent, never>;
46
- static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "ui-login", never, { "loading": "loading"; }, { "submitEvent": "submitEvent"; "forgotPasswordEvent": "forgotPasswordEvent"; "createAccountEvent": "createAccountEvent"; }, never, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoginComponent, "ui-login", never, { "loading": "loading"; "i18n": "i18n"; }, { "submitEvent": "submitEvent"; "forgotPasswordEvent": "forgotPasswordEvent"; "createAccountEvent": "createAccountEvent"; }, never, never>;
47
53
  }
@@ -0,0 +1,10 @@
1
+ export declare const LOGIN_i18n: {
2
+ title: string;
3
+ email_placeholder: string;
4
+ password_placeholder: string;
5
+ remember_me: string;
6
+ forgot_password: string;
7
+ button_label: string;
8
+ not_have_account: string;
9
+ create_account: string;
10
+ };
@@ -3,3 +3,13 @@ export interface LoginCredentials {
3
3
  password: string;
4
4
  remember_me: boolean;
5
5
  }
6
+ export interface Ii18nLogin {
7
+ title: string;
8
+ email_placeholder: string;
9
+ password_placeholder: string;
10
+ remember_me: string;
11
+ forgot_password: string;
12
+ button_label: string;
13
+ not_have_account: string;
14
+ create_account: string;
15
+ }
@@ -1,5 +1,5 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { IStatusOptionItem } from '../status/status.model';
2
+ import { ILabelOptionItem } from '../label/label.model';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class NavigationComponent {
5
5
  /**
@@ -19,11 +19,11 @@ export declare class NavigationComponent {
19
19
  /**
20
20
  * Navigation status component
21
21
  *
22
- * @type {IStatusOptionItem}
22
+ * @type {ILabelOptionItem}
23
23
  * @memberof NavigationComponent
24
24
  * @ignore
25
25
  */
26
- statusItem: IStatusOptionItem;
26
+ labelItem: ILabelOptionItem;
27
27
  /**
28
28
  * @ignore
29
29
  */
@@ -31,5 +31,5 @@ export declare class NavigationComponent {
31
31
  constructor();
32
32
  goBackClicked(): void;
33
33
  static ɵfac: i0.ɵɵFactoryDeclaration<NavigationComponent, never>;
34
- static ɵcmp: i0.ɵɵComponentDeclaration<NavigationComponent, "ui-navigation", never, { "title": "title"; "subtitle": "subtitle"; "statusItem": "statusItem"; }, { "goBackClickedEvent": "goBackClickedEvent"; }, never, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<NavigationComponent, "ui-navigation", never, { "title": "title"; "subtitle": "subtitle"; "labelItem": "labelItem"; }, { "goBackClickedEvent": "goBackClickedEvent"; }, never, never>;
35
35
  }
@@ -3,9 +3,9 @@ import * as i1 from "./navigation.component";
3
3
  import * as i2 from "@angular/common";
4
4
  import * as i3 from "@angular/material/icon";
5
5
  import * as i4 from "@angular/material/button";
6
- import * as i5 from "../status/status.component.module";
6
+ import * as i5 from "../label/label.component.module";
7
7
  export declare class NavigationComponentModule {
8
8
  static ɵfac: i0.ɵɵFactoryDeclaration<NavigationComponentModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<NavigationComponentModule, [typeof i1.NavigationComponent], [typeof i2.CommonModule, typeof i3.MatIconModule, typeof i4.MatButtonModule, typeof i5.StatusComponentModule], [typeof i1.NavigationComponent]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NavigationComponentModule, [typeof i1.NavigationComponent], [typeof i2.CommonModule, typeof i3.MatIconModule, typeof i4.MatButtonModule, typeof i5.LabelComponentModule], [typeof i1.NavigationComponent]>;
10
10
  static ɵinj: i0.ɵɵInjectorDeclaration<NavigationComponentModule>;
11
11
  }
@@ -0,0 +1,13 @@
1
+ import { OnDestroy, ViewContainerRef } from '@angular/core';
2
+ import { IComponentRenderer } from '../table.model';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DynamicComponentDirective implements OnDestroy {
5
+ private vcr;
6
+ private subscription;
7
+ private compRef;
8
+ set dynamicComponent(componentRenderer: IComponentRenderer);
9
+ constructor(vcr: ViewContainerRef);
10
+ ngOnDestroy(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicComponentDirective, never>;
12
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DynamicComponentDirective, "[dynamicComponent]", never, { "dynamicComponent": "dynamicComponent"; }, {}, never>;
13
+ }
@@ -1,9 +1,8 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { MatSort, Sort } from '@angular/material/sort';
3
3
  import { MatTableDataSource } from '@angular/material/table';
4
- import { DataPropertyGetterPipe } from '../../shared/pipes/dataPropertyGetter';
5
- import { IStatusOptions } from '../status/status.model';
6
- import { ColumnType, IDataSource, ITableColumn, ITableDetailColumn } from './table.model';
4
+ import { DataPropertyGetterPipe } from './pipes/data-property-getter';
5
+ import { ColumnTypeEnum, IDataSource, ITableColumn, ITableDetailColumn } from './table.model';
7
6
  import * as i0 from "@angular/core";
8
7
  export declare class TableComponent<T extends IDataSource, TDetail extends IDataSource> implements OnInit {
9
8
  private dataPropertyGetterPipe;
@@ -18,6 +17,7 @@ export declare class TableComponent<T extends IDataSource, TDetail extends IData
18
17
  /**
19
18
  * Data to be rendered
20
19
  *
20
+ * @ignore
21
21
  * @type {IDataSource}
22
22
  * @memberof TableComponent
23
23
  */
@@ -36,12 +36,6 @@ export declare class TableComponent<T extends IDataSource, TDetail extends IData
36
36
  * @memberof TableComponent
37
37
  */
38
38
  tableDetailColumns: ITableDetailColumn<T, TDetail>;
39
- /**
40
- * @type {IStatusOptions}
41
- * @memberof TableComponent
42
- * @ignore
43
- */
44
- statusOptions: IStatusOptions;
45
39
  /**
46
40
  * @ignore
47
41
  */
@@ -77,7 +71,7 @@ export declare class TableComponent<T extends IDataSource, TDetail extends IData
77
71
  /**
78
72
  * @ignore
79
73
  */
80
- DataType: typeof ColumnType;
74
+ DataType: typeof ColumnTypeEnum;
81
75
  ngOnInit(): void;
82
76
  constructor(dataPropertyGetterPipe: DataPropertyGetterPipe);
83
77
  onSort(sortParams: Sort): void;
@@ -93,5 +87,5 @@ export declare class TableComponent<T extends IDataSource, TDetail extends IData
93
87
  */
94
88
  private setTableDetailDataSource;
95
89
  static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any, any>, never>;
96
- static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any, any>, "ui-table", never, { "tableDetails": "tableDetails"; "tableData": "tableData"; "tableColumns": "tableColumns"; "tableDetailColumns": "tableDetailColumns"; "statusOptions": "statusOptions"; }, { "onSortEvent": "onSortEvent"; "onRowClickEvent": "onRowClickEvent"; "onDetailRowClickEvent": "onDetailRowClickEvent"; }, never, never>;
90
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any, any>, "ui-table", never, { "tableDetails": "tableDetails"; "tableData": "tableData"; "tableColumns": "tableColumns"; "tableDetailColumns": "tableDetailColumns"; }, { "onSortEvent": "onSortEvent"; "onRowClickEvent": "onRowClickEvent"; "onDetailRowClickEvent": "onDetailRowClickEvent"; }, never, never>;
97
91
  }
@@ -1,12 +1,12 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./table.component";
3
- import * as i2 from "../../shared/pipes/dataPropertyGetter";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "@angular/material/table";
6
- import * as i5 from "@angular/material/sort";
7
- import * as i6 from "../status/status.component.module";
3
+ import * as i2 from "./pipes/data-property-getter";
4
+ import * as i3 from "./directives/dynamic-component.directive";
5
+ import * as i4 from "@angular/common";
6
+ import * as i5 from "@angular/material/table";
7
+ import * as i6 from "@angular/material/sort";
8
8
  export declare class TableComponentModule {
9
9
  static ɵfac: i0.ɵɵFactoryDeclaration<TableComponentModule, never>;
10
- static ɵmod: i0.ɵɵNgModuleDeclaration<TableComponentModule, [typeof i1.TableComponent, typeof i2.DataPropertyGetterPipe], [typeof i3.CommonModule, typeof i4.MatTableModule, typeof i5.MatSortModule, typeof i6.StatusComponentModule], [typeof i1.TableComponent]>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TableComponentModule, [typeof i1.TableComponent, typeof i2.DataPropertyGetterPipe, typeof i3.DynamicComponentDirective], [typeof i4.CommonModule, typeof i5.MatTableModule, typeof i6.MatSortModule], [typeof i1.TableComponent]>;
11
11
  static ɵinj: i0.ɵɵInjectorDeclaration<TableComponentModule>;
12
12
  }
@@ -1,14 +1,22 @@
1
+ import { Type } from '@angular/core';
1
2
  export declare type IDataSource = {
2
3
  [key: string]: any;
3
4
  };
4
5
  export interface ITableColumn<T> {
5
6
  headerName: string;
6
7
  field?: string;
7
- type?: ColumnType;
8
+ type?: ColumnTypeEnum;
8
9
  function?: (v: T) => string;
9
- renderer?: (v: T) => string;
10
+ renderer?: (v: T) => IComponentRenderer | string;
10
11
  sortable?: boolean;
11
- styles?: ColumnStyles;
12
+ styles?: IColumnStyles;
13
+ }
14
+ export interface IComponentRenderer {
15
+ component: Type<any>;
16
+ inputs?: any;
17
+ outputs?: {
18
+ [key: string]: any;
19
+ };
12
20
  }
13
21
  export interface IDetailRowDataParams<T, TDetail> {
14
22
  data: T;
@@ -18,17 +26,18 @@ export interface ITableDetailColumn<T, TDetail> {
18
26
  columnDefs: ITableColumn<TDetail>[];
19
27
  setDetailRowData: (params: IDetailRowDataParams<T, TDetail>) => void;
20
28
  }
21
- export interface ColumnStyles {
22
- alignment?: ColumnAlignment;
29
+ export interface IColumnStyles {
30
+ alignment?: ColumnAlignmentEnum;
23
31
  width?: string;
32
+ 'min-width'?: string;
33
+ padding?: string;
24
34
  }
25
- export declare enum ColumnType {
35
+ export declare enum ColumnTypeEnum {
26
36
  FIELD = "field",
27
- LABEL = "label",
28
37
  FUNCTION = "function",
29
38
  RENDERER = "renderer"
30
39
  }
31
- export declare enum ColumnAlignment {
40
+ export declare enum ColumnAlignmentEnum {
32
41
  LEFT = "left",
33
42
  RIGHT = "right",
34
43
  CENTER = "center"
@@ -9,10 +9,10 @@ export class CardComponent {
9
9
  }
10
10
  }
11
11
  CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
12
- CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CardComponent, selector: "ui-card", inputs: { title: "title", subTitle: "subTitle" }, ngImport: i0, template: "<mat-card class=\"container\">\n <ui-logo class=\"logo\"></ui-logo>\n <mat-card-title>{{title}}</mat-card-title>\n <mat-card-subtitle>{{subTitle}}</mat-card-subtitle>\n</mat-card>\n", styles: [".container{width:672px;box-sizing:border-box;padding:80px!important}.container .logo{margin-bottom:40px}.container .mat-card-title{margin-bottom:24px;font-weight:700;font-size:22px;line-height:135%}.container .mat-card-subtitle{color:#000;font-weight:400;font-size:16px;line-height:135%}\n"], components: [{ type: i1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i2.LogoComponent, selector: "ui-logo" }], directives: [{ type: i1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i1.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12
+ CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: CardComponent, selector: "ui-card", inputs: { title: "title", subTitle: "subTitle" }, ngImport: i0, template: "<mat-card class=\"container\">\n <ui-logo class=\"logo\"></ui-logo>\n <mat-card-title>{{title}}</mat-card-title>\n <mat-card-subtitle>{{subTitle}}</mat-card-subtitle>\n</mat-card>\n", styles: [".container{width:672px;box-sizing:border-box;padding:80px!important}.container .logo{margin-bottom:40px}.container .mat-card-title{margin-bottom:24px;font-weight:700;font-size:22px;line-height:135%;width:100%;word-wrap:break-word}.container .mat-card-subtitle{color:#000;font-weight:400;font-size:16px;line-height:135%}\n"], components: [{ type: i1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i2.LogoComponent, selector: "ui-logo" }], directives: [{ type: i1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i1.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
13
13
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CardComponent, decorators: [{
14
14
  type: Component,
15
- args: [{ selector: 'ui-card', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-card class=\"container\">\n <ui-logo class=\"logo\"></ui-logo>\n <mat-card-title>{{title}}</mat-card-title>\n <mat-card-subtitle>{{subTitle}}</mat-card-subtitle>\n</mat-card>\n", styles: [".container{width:672px;box-sizing:border-box;padding:80px!important}.container .logo{margin-bottom:40px}.container .mat-card-title{margin-bottom:24px;font-weight:700;font-size:22px;line-height:135%}.container .mat-card-subtitle{color:#000;font-weight:400;font-size:16px;line-height:135%}\n"] }]
15
+ args: [{ selector: 'ui-card', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-card class=\"container\">\n <ui-logo class=\"logo\"></ui-logo>\n <mat-card-title>{{title}}</mat-card-title>\n <mat-card-subtitle>{{subTitle}}</mat-card-subtitle>\n</mat-card>\n", styles: [".container{width:672px;box-sizing:border-box;padding:80px!important}.container .logo{margin-bottom:40px}.container .mat-card-title{margin-bottom:24px;font-weight:700;font-size:22px;line-height:135%;width:100%;word-wrap:break-word}.container .mat-card-subtitle{color:#000;font-weight:400;font-size:16px;line-height:135%}\n"] }]
16
16
  }], propDecorators: { title: [{
17
17
  type: Input
18
18
  }], subTitle: [{