@genesislcap/foundation-auth 14.107.0-auth-mf.27 → 14.121.0

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 (118) hide show
  1. package/README.md +14 -19
  2. package/dist/dts/dto/EVENT_LOGIN_AUTH_NACK.d.ts +1 -0
  3. package/dist/dts/dto/EVENT_LOGIN_AUTH_NACK.d.ts.map +1 -1
  4. package/dist/dts/dto/{IDP.d.ts → IDENTITY_PROVIDER.d.ts} +2 -2
  5. package/dist/dts/dto/IDENTITY_PROVIDER.d.ts.map +1 -0
  6. package/dist/dts/dto/index.d.ts +1 -1
  7. package/dist/dts/dto/index.d.ts.map +1 -1
  8. package/dist/dts/entity/{idp.d.ts → identityProvider.d.ts} +2 -2
  9. package/dist/dts/entity/identityProvider.d.ts.map +1 -0
  10. package/dist/dts/entity/index.d.ts +1 -1
  11. package/dist/dts/entity/index.d.ts.map +1 -1
  12. package/dist/dts/entity/loginNack.d.ts +1 -0
  13. package/dist/dts/entity/loginNack.d.ts.map +1 -1
  14. package/dist/dts/env.d.ts +0 -5
  15. package/dist/dts/env.d.ts.map +1 -1
  16. package/dist/dts/machine/errors.d.ts +2 -2
  17. package/dist/dts/main/main.d.ts +12 -4
  18. package/dist/dts/main/main.d.ts.map +1 -1
  19. package/dist/dts/mapper/loginMapper.d.ts.map +1 -1
  20. package/dist/dts/mapper/utils.d.ts +4 -4
  21. package/dist/dts/mapper/utils.d.ts.map +1 -1
  22. package/dist/dts/routes/base.d.ts +5 -7
  23. package/dist/dts/routes/base.d.ts.map +1 -1
  24. package/dist/dts/routes/forgot-password/forgot-password.d.ts +9 -0
  25. package/dist/dts/routes/forgot-password/forgot-password.d.ts.map +1 -1
  26. package/dist/dts/routes/forgot-password/forgot-password.template.d.ts +4 -0
  27. package/dist/dts/routes/forgot-password/forgot-password.template.d.ts.map +1 -1
  28. package/dist/dts/routes/login/login.d.ts +14 -0
  29. package/dist/dts/routes/login/login.d.ts.map +1 -1
  30. package/dist/dts/routes/login/login.styles.d.ts +4 -0
  31. package/dist/dts/routes/login/login.styles.d.ts.map +1 -1
  32. package/dist/dts/routes/login/login.template.d.ts +4 -0
  33. package/dist/dts/routes/login/login.template.d.ts.map +1 -1
  34. package/dist/dts/routes/logout/logout.d.ts +7 -0
  35. package/dist/dts/routes/logout/logout.d.ts.map +1 -1
  36. package/dist/dts/routes/logout/logout.styles.d.ts +4 -0
  37. package/dist/dts/routes/logout/logout.styles.d.ts.map +1 -1
  38. package/dist/dts/routes/logout/logout.template.d.ts +4 -0
  39. package/dist/dts/routes/logout/logout.template.d.ts.map +1 -1
  40. package/dist/dts/routes/not-found/not-found.d.ts +4 -0
  41. package/dist/dts/routes/not-found/not-found.d.ts.map +1 -1
  42. package/dist/dts/routes/protected/protected.d.ts +5 -0
  43. package/dist/dts/routes/protected/protected.d.ts.map +1 -1
  44. package/dist/dts/routes/protected/protected.template.d.ts +4 -0
  45. package/dist/dts/routes/protected/protected.template.d.ts.map +1 -1
  46. package/dist/dts/routes/request-account/request-account.d.ts +11 -0
  47. package/dist/dts/routes/request-account/request-account.d.ts.map +1 -1
  48. package/dist/dts/routes/request-account/request-account.template.d.ts +4 -0
  49. package/dist/dts/routes/request-account/request-account.template.d.ts.map +1 -1
  50. package/dist/dts/routes/reset-password/reset-password.d.ts +13 -0
  51. package/dist/dts/routes/reset-password/reset-password.d.ts.map +1 -1
  52. package/dist/dts/routes/reset-password/reset-password.template.d.ts +4 -0
  53. package/dist/dts/routes/reset-password/reset-password.template.d.ts.map +1 -1
  54. package/dist/dts/routes/verify/verify.d.ts +4 -0
  55. package/dist/dts/routes/verify/verify.d.ts.map +1 -1
  56. package/dist/dts/routes/verify/verify.template.d.ts +4 -0
  57. package/dist/dts/routes/verify/verify.template.d.ts.map +1 -1
  58. package/dist/dts/services/idp.d.ts +6 -6
  59. package/dist/dts/services/idp.d.ts.map +1 -1
  60. package/dist/dts/store/authFormEntry.d.ts +6 -6
  61. package/dist/dts/store/authFormEntry.d.ts.map +1 -1
  62. package/dist/esm/entity/index.js +1 -1
  63. package/dist/esm/env.js +54 -95
  64. package/dist/esm/machine/errors.js +2 -2
  65. package/dist/esm/main/main.js +11 -0
  66. package/dist/esm/mapper/loginMapper.js +1 -1
  67. package/dist/esm/mapper/utils.js +1 -1
  68. package/dist/esm/routes/base.js +8 -8
  69. package/dist/esm/routes/forgot-password/forgot-password.js +9 -0
  70. package/dist/esm/routes/forgot-password/forgot-password.template.js +4 -0
  71. package/dist/esm/routes/login/login.js +14 -0
  72. package/dist/esm/routes/login/login.styles.js +4 -0
  73. package/dist/esm/routes/login/login.template.js +4 -0
  74. package/dist/esm/routes/logout/logout.js +7 -0
  75. package/dist/esm/routes/logout/logout.styles.js +4 -0
  76. package/dist/esm/routes/logout/logout.template.js +4 -0
  77. package/dist/esm/routes/not-found/not-found.js +4 -0
  78. package/dist/esm/routes/protected/protected.js +9 -2
  79. package/dist/esm/routes/protected/protected.template.js +16 -2
  80. package/dist/esm/routes/request-account/request-account.js +11 -0
  81. package/dist/esm/routes/request-account/request-account.template.js +4 -0
  82. package/dist/esm/routes/reset-password/reset-password.js +13 -0
  83. package/dist/esm/routes/reset-password/reset-password.template.js +4 -0
  84. package/dist/esm/routes/verify/verify.js +4 -0
  85. package/dist/esm/routes/verify/verify.template.js +4 -0
  86. package/dist/esm/services/idp.js +2 -2
  87. package/dist/esm/store/authFormEntry.js +22 -1
  88. package/dist/foundation-auth.api.json +107 -64
  89. package/dist/foundation-auth.d.ts +26 -21
  90. package/docs/api/foundation-auth.authformentrystore.idps.md +1 -1
  91. package/docs/api/foundation-auth.authformentrystore.md +2 -2
  92. package/docs/api/foundation-auth.authformentrystore.selectedidp.md +1 -1
  93. package/docs/api/foundation-auth.defaultauthformentrystore.idps.md +1 -1
  94. package/docs/api/foundation-auth.defaultauthformentrystore.md +2 -2
  95. package/docs/api/foundation-auth.defaultauthformentrystore.selectedidp.md +1 -1
  96. package/docs/api/foundation-auth.event_login_auth_nack.md +1 -0
  97. package/docs/api/foundation-auth.event_login_auth_nack.refresh_token_expiration_mins.md +11 -0
  98. package/docs/api/foundation-auth.fromidpdto.md +1 -1
  99. package/docs/api/{foundation-auth.idp.description.md → foundation-auth.identity_provider.description.md} +2 -2
  100. package/docs/api/{foundation-auth.idp.id.md → foundation-auth.identity_provider.id.md} +2 -2
  101. package/docs/api/foundation-auth.identity_provider.md +21 -0
  102. package/docs/api/{foundation-auth.idp.type.md → foundation-auth.identity_provider.type.md} +2 -2
  103. package/docs/api/foundation-auth.identityprovider.description.md +11 -0
  104. package/docs/api/foundation-auth.identityprovider.id.md +11 -0
  105. package/docs/api/foundation-auth.identityprovider.md +21 -0
  106. package/docs/api/foundation-auth.identityprovider.type.md +11 -0
  107. package/docs/api/foundation-auth.loginnack.md +1 -0
  108. package/docs/api/foundation-auth.loginnack.refreshtokenexpirationmins.md +11 -0
  109. package/docs/api/foundation-auth.md +2 -3
  110. package/docs/api-report.md +13 -10
  111. package/package.json +16 -15
  112. package/test/README.md +2 -0
  113. package/dist/dts/dto/IDP.d.ts.map +0 -1
  114. package/dist/dts/entity/idp.d.ts.map +0 -1
  115. package/docs/api/foundation-auth.idp.md +0 -21
  116. package/docs/api/foundation-auth.socket_url.md +0 -12
  117. /package/dist/esm/dto/{IDP.js → IDENTITY_PROVIDER.js} +0 -0
  118. /package/dist/esm/entity/{idp.js → identityProvider.js} +0 -0
@@ -1,3 +1,7 @@
1
1
  import type { Verify } from './verify';
2
+ /**
3
+ * VerifyTemplate
4
+ * @public
5
+ */
2
6
  export declare const VerifyTemplate: import("@microsoft/fast-element").ViewTemplate<Verify, any>;
3
7
  //# sourceMappingURL=verify.template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/verify/verify.template.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,eAAO,MAAM,cAAc,6DA+B1B,CAAC"}
1
+ {"version":3,"file":"verify.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/verify/verify.template.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;;GAGG;AACH,eAAO,MAAM,cAAc,6DA+B1B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { FetchMachine } from '@genesislcap/foundation-state-machine';
2
- import type { Idp } from '../entity';
2
+ import type { IdentityProvider } from '../entity';
3
3
  /**
4
4
  * IDPService interface.
5
5
  * @public
@@ -8,11 +8,11 @@ export interface IDPService {
8
8
  /**
9
9
  * @param url - Defaults to `SSO_LIST_URL`.
10
10
  */
11
- getList(url?: string): Promise<Idp[]>;
11
+ getList(url?: string): Promise<IdentityProvider[]>;
12
12
  /**
13
- * @param idp - An idp entity.
13
+ * @param idp - An IdentityProvider entity.
14
14
  */
15
- getLoginUrl(idp: Idp): string;
15
+ getLoginUrl(idp: IdentityProvider): string;
16
16
  }
17
17
  /**
18
18
  * Default IDPService.
@@ -29,9 +29,9 @@ export declare class DefaultIDPService implements IDPService {
29
29
  */
30
30
  protected loginUrlReplacePattern: RegExp;
31
31
  /** {@inheritDoc IDPService.getList} */
32
- getList: (url?: string) => Promise<Idp[]>;
32
+ getList: (url?: string) => Promise<IdentityProvider[]>;
33
33
  /** {@inheritDoc IDPService.getLoginUrl} */
34
- getLoginUrl: (idp: Idp, urlTemplate?: string) => string;
34
+ getLoginUrl: (idp: IdentityProvider, urlTemplate?: string) => string;
35
35
  }
36
36
  /**
37
37
  * IDPService DI key.
@@ -1 +1 @@
1
- {"version":3,"file":"idp.d.ts","sourceRoot":"","sources":["../../../src/services/idp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAGrE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAIrC;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,O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AAC"}
@@ -2,7 +2,7 @@ import { CustomEventMap } from '@genesislcap/foundation-events';
2
2
  import { AbstractStore, Store } from '@genesislcap/foundation-store';
3
3
  import { AuthConfig } from '../config/config';
4
4
  import { CredentialManager } from '../credential';
5
- import type { Idp } from '../entity';
5
+ import type { IdentityProvider } from '../entity';
6
6
  import { IDPService } from '../services';
7
7
  /**
8
8
  * @public
@@ -24,7 +24,7 @@ declare global {
24
24
  }
25
25
  type InternalEventMap = {
26
26
  'auth-fetch-idps': void;
27
- 'auth-fetch-idps-success': Idp[];
27
+ 'auth-fetch-idps-success': IdentityProvider[];
28
28
  'auth-fetch-idps-error': Error;
29
29
  };
30
30
  /**
@@ -46,8 +46,8 @@ export interface AuthFormEntryStore extends Store {
46
46
  readonly hasPasswordExpired: boolean;
47
47
  readonly passwordResetToken: string;
48
48
  readonly mfaCode: string;
49
- readonly idps: Idp[];
50
- readonly selectedIdp: Idp;
49
+ readonly idps: IdentityProvider[];
50
+ readonly selectedIdp: IdentityProvider;
51
51
  readonly ssoLoginUrl: string;
52
52
  readonly ssoToggled: boolean;
53
53
  readonly termsAgreed: boolean;
@@ -89,9 +89,9 @@ export declare class DefaultAuthFormEntryStore extends AbstractStore<AuthFormEnt
89
89
  /** {@inheritDoc AuthFormEntryStore.mfaCode} */
90
90
  mfaCode: string;
91
91
  /** {@inheritDoc AuthFormEntryStore.idps} */
92
- idps: Idp[];
92
+ idps: IdentityProvider[];
93
93
  /** {@inheritDoc AuthFormEntryStore.selectedIdp} */
94
- selectedIdp: Idp;
94
+ selectedIdp: IdentityProvider;
95
95
  /** {@inheritDoc AuthFormEntryStore.ssoToggled} */
96
96
  ssoToggled: boolean;
97
97
  /** {@inheritDoc AuthFormEntryStore.termsAgreed} */
@@ -1 +1 @@
1
- {"version":3,"file":"authFormEntry.d.ts","sourceRoot":"","sources":["../../../src/store/authFormEntry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,O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qBAAqB,gBAGnB;IAEF,yDAAyD;IACzD,iBAAiB,gBAGf;IAEF,sDAAsD;IACtD,cAAc,gBAGZ;IAEF,yDAAyD;IACzD,iBAAiB,gBAGf;IAEF,0DAA0D;IAC1D,kBAAkB,gBAGhB;IAEF,8DAA8D;IAC9D,sBAAsB,gBAGpB;IAEF,4DAA4D;IAC5D,oBAAoB,gBAIjB;IAEH,0DAA0D;IAC1D,kBAAkB,gBAGhB;IAEF;;;;OAIG;IACH,SAAS,CAAC,iBAAiB,SAAgB,OAAO,QAAQ,OAAO,mBAW/D;IAEF,mDAAmD;IACnD,IAAI,WAAW,IAAI,MAAM,CAExB;CACF;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,0EAG9B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export * from './ack';
2
- export * from './idp';
2
+ export * from './identityProvider';
3
3
  export * from './loginAck';
4
4
  export * from './loginDetailsAck';
5
5
  export * from './loginNack';
package/dist/esm/env.js CHANGED
@@ -4,139 +4,98 @@ import { logger } from './utils';
4
4
  * @public
5
5
  */
6
6
  let LOGIN_URL = 'unset';
7
- try {
8
- if (typeof GENX_LOGIN_URL !== 'undefined') {
9
- LOGIN_URL = GENX_LOGIN_URL;
10
- }
11
- else {
12
- logger.warn('Missing GENX_LOGIN_URL env');
13
- }
14
- }
15
- catch (_a) { }
7
+ if (typeof GENX_LOGIN_URL !== 'undefined') {
8
+ LOGIN_URL = GENX_LOGIN_URL;
9
+ }
10
+ else {
11
+ logger.warn('Missing GENX_LOGIN_URL env');
12
+ }
16
13
  export { LOGIN_URL };
17
14
  /**
18
15
  * @public
19
16
  */
20
17
  let LOGIN_REFRESH_URL = 'unset';
21
- try {
22
- if (typeof GENX_LOGIN_REFRESH_URL !== 'undefined') {
23
- LOGIN_REFRESH_URL = GENX_LOGIN_REFRESH_URL;
24
- }
25
- else {
26
- logger.warn('Missing GENX_LOGIN_REFRESH_URL env');
27
- }
28
- }
29
- catch (_b) { }
18
+ if (typeof GENX_LOGIN_REFRESH_URL !== 'undefined') {
19
+ LOGIN_REFRESH_URL = GENX_LOGIN_REFRESH_URL;
20
+ }
21
+ else {
22
+ logger.warn('Missing GENX_LOGIN_REFRESH_URL env');
23
+ }
30
24
  export { LOGIN_REFRESH_URL };
31
25
  /**
32
26
  * @public
33
27
  */
34
28
  let LOGIN_DETAILS_URL = 'unset';
35
- try {
36
- if (typeof GENX_LOGIN_DETAILS_URL !== 'undefined') {
37
- LOGIN_DETAILS_URL = GENX_LOGIN_DETAILS_URL;
38
- }
39
- else {
40
- logger.warn('Missing GENX_LOGIN_DETAILS_URL env');
41
- }
42
- }
43
- catch (_c) { }
29
+ if (typeof GENX_LOGIN_DETAILS_URL !== 'undefined') {
30
+ LOGIN_DETAILS_URL = GENX_LOGIN_DETAILS_URL;
31
+ }
32
+ else {
33
+ logger.warn('Missing GENX_LOGIN_DETAILS_URL env');
34
+ }
44
35
  export { LOGIN_DETAILS_URL };
45
36
  /**
46
37
  * @public
47
38
  */
48
39
  let LOGOUT_URL = 'unset';
49
- try {
50
- if (typeof GENX_LOGOUT_URL !== 'undefined') {
51
- LOGOUT_URL = GENX_LOGOUT_URL;
52
- }
53
- else {
54
- logger.warn('Missing GENX_LOGOUT_URL env');
55
- }
56
- }
57
- catch (_d) { }
40
+ if (typeof GENX_LOGOUT_URL !== 'undefined') {
41
+ LOGOUT_URL = GENX_LOGOUT_URL;
42
+ }
43
+ else {
44
+ logger.warn('Missing GENX_LOGOUT_URL env');
45
+ }
58
46
  export { LOGOUT_URL };
59
47
  /**
60
48
  * @public
61
49
  */
62
50
  let CHANGE_PASSWORD_URL = 'unset';
63
- try {
64
- if (typeof GENX_CHANGE_PASSWORD_URL !== 'undefined') {
65
- CHANGE_PASSWORD_URL = GENX_CHANGE_PASSWORD_URL;
66
- }
67
- else {
68
- logger.warn('Missing GENX_CHANGE_PASSWORD_URL env');
69
- }
70
- }
71
- catch (_e) { }
51
+ if (typeof GENX_CHANGE_PASSWORD_URL !== 'undefined') {
52
+ CHANGE_PASSWORD_URL = GENX_CHANGE_PASSWORD_URL;
53
+ }
54
+ else {
55
+ logger.warn('Missing GENX_CHANGE_PASSWORD_URL env');
56
+ }
72
57
  export { CHANGE_PASSWORD_URL };
73
58
  /**
74
59
  * @public
75
60
  */
76
61
  let FORGOT_PASSWORD_URL = 'unset';
77
- try {
78
- if (typeof GENX_FORGOT_PASSWORD_URL !== 'undefined') {
79
- FORGOT_PASSWORD_URL = GENX_FORGOT_PASSWORD_URL;
80
- }
81
- else {
82
- logger.warn('Missing GENX_FORGOT_PASSWORD_URL env');
83
- }
84
- }
85
- catch (_f) { }
62
+ if (typeof GENX_FORGOT_PASSWORD_URL !== 'undefined') {
63
+ FORGOT_PASSWORD_URL = GENX_FORGOT_PASSWORD_URL;
64
+ }
65
+ else {
66
+ logger.warn('Missing GENX_FORGOT_PASSWORD_URL env');
67
+ }
86
68
  export { FORGOT_PASSWORD_URL };
87
69
  /**
88
70
  * @public
89
71
  */
90
72
  let RESET_PASSWORD_URL = 'unset';
91
- try {
92
- if (typeof GENX_RESET_PASSWORD_URL !== 'undefined') {
93
- RESET_PASSWORD_URL = GENX_RESET_PASSWORD_URL;
94
- }
95
- else {
96
- logger.warn('Missing GENX_RESET_PASSWORD_URL env');
97
- }
98
- }
99
- catch (_g) { }
73
+ if (typeof GENX_RESET_PASSWORD_URL !== 'undefined') {
74
+ RESET_PASSWORD_URL = GENX_RESET_PASSWORD_URL;
75
+ }
76
+ else {
77
+ logger.warn('Missing GENX_RESET_PASSWORD_URL env');
78
+ }
100
79
  export { RESET_PASSWORD_URL };
101
80
  /**
102
81
  * @public
103
82
  */
104
83
  let SSO_LIST_URL = 'unset';
105
- try {
106
- if (typeof GENX_SSO_LIST_URL !== 'undefined') {
107
- SSO_LIST_URL = GENX_SSO_LIST_URL;
108
- }
109
- else {
110
- logger.warn('Missing GENX_SSO_LIST_URL env');
111
- }
112
- }
113
- catch (_h) { }
84
+ if (typeof GENX_SSO_LIST_URL !== 'undefined') {
85
+ SSO_LIST_URL = GENX_SSO_LIST_URL;
86
+ }
87
+ else {
88
+ logger.warn('Missing GENX_SSO_LIST_URL env');
89
+ }
114
90
  export { SSO_LIST_URL };
115
91
  /**
116
92
  * @public
117
93
  */
118
94
  let SSO_LOGIN_URL = 'unset';
119
- try {
120
- if (typeof GENX_SSO_LOGIN_URL !== 'undefined') {
121
- SSO_LOGIN_URL = GENX_SSO_LOGIN_URL;
122
- }
123
- else {
124
- logger.warn('Missing GENX_SSO_LOGIN_URL env');
125
- }
126
- }
127
- catch (_j) { }
95
+ if (typeof GENX_SSO_LOGIN_URL !== 'undefined') {
96
+ SSO_LOGIN_URL = GENX_SSO_LOGIN_URL;
97
+ }
98
+ else {
99
+ logger.warn('Missing GENX_SSO_LOGIN_URL env');
100
+ }
128
101
  export { SSO_LOGIN_URL };
129
- /**
130
- * @public
131
- */
132
- let SOCKET_URL = 'unset';
133
- try {
134
- if (typeof GENX_SOCKET_URL !== 'undefined') {
135
- SOCKET_URL = GENX_SOCKET_URL;
136
- }
137
- else {
138
- logger.warn('Missing GENX_SOCKET_URL env');
139
- }
140
- }
141
- catch (_k) { }
142
- export { SOCKET_URL };
@@ -2,8 +2,8 @@ import { APIError } from '@genesislcap/foundation-state-machine';
2
2
  /**
3
3
  * NackError.
4
4
  *
5
- * @remarks
6
- * If Required until http status codes are aligned on backend.
5
+ * @privateRemarks
6
+ * Is required until http status codes are aligned on backend.
7
7
  *
8
8
  * @example
9
9
  * ```ts
@@ -19,6 +19,10 @@ import { template } from './main.template';
19
19
  *
20
20
  * See the {@link configure} hook for more information on how to set up and use this micro frontend in your application.
21
21
  *
22
+ * @fires store-connected - Fires a custom 'store-connected' event after connection to connect the store.
23
+ * @fires store-ready - Fires a custom 'store-ready' event after connection to ready the store.
24
+ * @fires store-disconnected - Fires a custom 'store-disconnected' event after disconnection to unbind the store.
25
+ *
22
26
  * @public
23
27
  */
24
28
  export class FoundationAuth extends EventEmitter(FASTElement) {
@@ -39,6 +43,7 @@ export class FoundationAuth extends EventEmitter(FASTElement) {
39
43
  super.disconnectedCallback();
40
44
  this.removeBindings();
41
45
  this.removeEventListeners();
46
+ this.disconnectStore();
42
47
  }
43
48
  /**
44
49
  * @internal
@@ -81,6 +86,12 @@ export class FoundationAuth extends EventEmitter(FASTElement) {
81
86
  this.$emit('store-connected', this);
82
87
  this.$emit('store-ready', true);
83
88
  }
89
+ /**
90
+ * @internal
91
+ */
92
+ disconnectStore() {
93
+ this.$emit('store-disconnected');
94
+ }
84
95
  /**
85
96
  * @internal
86
97
  */
@@ -82,7 +82,7 @@ export class DefaultLoginMapper {
82
82
  return ack;
83
83
  }
84
84
  if (isLoginNackDTO(dto)) {
85
- const nack = Object.assign(Object.assign({}, fromDTONack(dto)), { refreshAuthToken: dto.REFRESH_AUTH_TOKEN, hasIncorrectCredentials: hasDTOErrorWarningCode(dto, 'INCORRECT_CREDENTIALS'), maxTriesReached: hasDTOErrorWarningCode(dto, 'MAX_TRIES_REACHED'), isMFARequired: hasDTOErrorWarningCode(dto, 'MFA_REQUIRED'), hasPasswordExpired: hasDTOErrorWarningCode(dto, 'PASSWORD_EXPIRED') });
85
+ const nack = Object.assign(Object.assign({}, fromDTONack(dto)), { refreshAuthToken: dto.REFRESH_AUTH_TOKEN, refreshTokenExpirationMins: dto.REFRESH_TOKEN_EXPIRATION_MINS, hasIncorrectCredentials: hasDTOErrorWarningCode(dto, 'INCORRECT_CREDENTIALS'), maxTriesReached: hasDTOErrorWarningCode(dto, 'MAX_TRIES_REACHED'), isMFARequired: hasDTOErrorWarningCode(dto, 'MFA_REQUIRED'), hasPasswordExpired: hasDTOErrorWarningCode(dto, 'PASSWORD_EXPIRED') });
86
86
  return nack;
87
87
  }
88
88
  throw new Error('No Entity mapping implementation for provided DTO');
@@ -88,7 +88,7 @@ export const fromDTONack = (dto) => {
88
88
  };
89
89
  /**
90
90
  * fromIDPDTO
91
- * @param dto - IDP.
91
+ * @param dto - IDENTITY_PROVIDER.
92
92
  * @public
93
93
  */
94
94
  export const fromIDPDTO = (dto) => {
@@ -68,7 +68,7 @@ export const organisationField = () => html `
68
68
  autocomplete="organization"
69
69
  data-test-id="organisation"
70
70
  :value="${(x) => x.store.formEntry.organisation}"
71
- @change="${inputEmit('auth-organisation-changed')}"
71
+ @input="${inputEmit('auth-organisation-changed')}"
72
72
  autofocus
73
73
  class="${(x) => (!x.config.logo ? 'no-top-margin' : '')}"
74
74
  ?required="${(x) => x.config.fields.organisation.required !== false}"
@@ -90,7 +90,7 @@ export const usernameField = () => html `
90
90
  autocomplete="username email"
91
91
  data-test-id="username"
92
92
  :value="${(x) => x.store.formEntry.username}"
93
- @change="${inputEmit('auth-username-changed')}"
93
+ @input="${inputEmit('auth-username-changed')}"
94
94
  ?autofocus="${(x) => !x.config.fields.organisation}"
95
95
  class="${(x) => (!x.config.logo && !x.config.fields.organisation ? 'no-top-margin' : '')}"
96
96
  pattern="${(x) => x.config.fields.username.pattern}"
@@ -112,7 +112,7 @@ export const emailField = () => html `
112
112
  autocomplete="email"
113
113
  data-test-id="email"
114
114
  :value="${(x) => x.store.formEntry.email}"
115
- @change="${inputEmit('auth-email-changed')}"
115
+ @input="${inputEmit('auth-email-changed')}"
116
116
  required
117
117
  >
118
118
  <span class="form-title">${(x) => { var _a; return (_a = x.config.fields.email.label) !== null && _a !== void 0 ? _a : 'Email'; }}</span>
@@ -130,7 +130,7 @@ export const passwordField = (label) => html `
130
130
  autocomplete="current-password"
131
131
  data-test-id="password"
132
132
  :value="${(x) => x.store.formEntry.password}"
133
- @change="${inputEmit('auth-password-changed')}"
133
+ @input="${inputEmit('auth-password-changed')}"
134
134
  required
135
135
  >
136
136
  <span class="form-title">${(x) => { var _a; return (_a = label !== null && label !== void 0 ? label : x.config.fields.password.label) !== null && _a !== void 0 ? _a : 'Password'; }}</span>
@@ -153,7 +153,7 @@ export const password2Field = (type) => {
153
153
  autocomplete="${name}"
154
154
  data-test-id="${name}"
155
155
  :value="${(x) => x.store.formEntry.password2}"
156
- @change="${inputEmit('auth-password2-changed')}"
156
+ @input="${inputEmit('auth-password2-changed')}"
157
157
  required
158
158
  >
159
159
  <span class="form-title">${label}</span>
@@ -311,8 +311,8 @@ export const showPasswordsCheckbox = () => html `
311
311
  */
312
312
  let MessageElement = class MessageElement extends FASTElement {
313
313
  get message() {
314
- const meta = this.store.metaMessages.join('/n');
315
- const error = this.store.errorMessages.join('/n');
314
+ const meta = this.store.metaMessages.join('\n');
315
+ const error = this.store.errorMessages.join('\n');
316
316
  return !error ? meta : `${meta} ${error}.`;
317
317
  }
318
318
  get hasError() {
@@ -340,7 +340,7 @@ MessageElement = __decorate([
340
340
  text-align: center;
341
341
  }
342
342
  .message {
343
- color: ${SecondaryRapidColorHEX.teal};
343
+ color: var(--accent-foreground-rest);
344
344
  margin-top: calc(var(--design-unit) * 3px);
345
345
  white-space: pre-line;
346
346
  }
@@ -4,6 +4,15 @@ import { commonStyles } from '../../styles';
4
4
  import { logger } from '../../utils';
5
5
  import { BaseRoute } from '../base';
6
6
  import { ForgotPasswordTemplate as template } from './forgot-password.template';
7
+ /**
8
+ * ForgotPassword
9
+ *
10
+ * @fires auth-forgot-password - Fires a custom 'auth-forgot-password' event.
11
+ * @fires auth-organisation-changed - Fires a custom 'auth-organisation-changed' event.
12
+ * @fires auth-username-changed - Fires a custom 'auth-username-changed' event.
13
+ *
14
+ * @public
15
+ */
7
16
  let ForgotPassword = class ForgotPassword extends BaseRoute {
8
17
  onSubmit() {
9
18
  return __awaiter(this, void 0, void 0, function* () {
@@ -1,6 +1,10 @@
1
1
  import { html } from '@microsoft/fast-element';
2
2
  import { cardTag } from '../../tags';
3
3
  import { backButton, organisationField, submitButton, usernameField } from '../base';
4
+ /**
5
+ * ForgotPasswordTemplate
6
+ * @public
7
+ */
4
8
  export const ForgotPasswordTemplate = html `
5
9
  <auth-background>
6
10
  <div class="container">
@@ -6,6 +6,20 @@ import { logger } from '../../utils';
6
6
  import { BaseRoute } from '../base';
7
7
  import { LoginStyles as styles } from './login.styles';
8
8
  import { LoginTemplate as template } from './login.template';
9
+ /**
10
+ * Login
11
+ *
12
+ * @fires auth-login - Fires a custom 'auth-login' event.
13
+ * @fires auth-logout - Fires a custom 'auth-logout' event.
14
+ * @fires auth-ssoToggled-changed - Fires a custom 'auth-ssoToggled-changed' event.
15
+ * @fires auth-selectedIdp-changed - Fires a custom 'auth-selectedIdp-changed' event.
16
+ * @fires auth-organisation-changed - Fires a custom 'auth-organisation-changed' event.
17
+ * @fires auth-username-changed - Fires a custom 'auth-username-changed' event.
18
+ * @fires auth-password-changed - Fires a custom 'auth-password-changed' event.
19
+ * @fires auth-showPasswords-changed - Fires a custom 'auth-showPasswords-changed' event.
20
+ *
21
+ * @public
22
+ */
9
23
  let Login = class Login extends BaseRoute {
10
24
  connectedCallback() {
11
25
  super.connectedCallback();
@@ -1,5 +1,9 @@
1
1
  import { css } from '@microsoft/fast-element';
2
2
  import { commonStyles } from '../../styles';
3
+ /**
4
+ * LogoutStyles
5
+ * @public
6
+ */
3
7
  export const LoginStyles = css `
4
8
  ${commonStyles}
5
9
  .link-url {
@@ -87,6 +87,10 @@ const ssoLogin = html `
87
87
  </div>
88
88
  `)}
89
89
  `;
90
+ /**
91
+ * LoginTemplate
92
+ * @public
93
+ */
90
94
  export const LoginTemplate = html `
91
95
  <auth-background>
92
96
  <div class="container">
@@ -3,6 +3,13 @@ import { customElement } from '@microsoft/fast-element';
3
3
  import { BaseRoute } from '../base';
4
4
  import { LogoutStyles as styles } from './logout.styles';
5
5
  import { LogoutTemplate as template } from './logout.template';
6
+ /**
7
+ * Logout
8
+ *
9
+ * @fires auth-logout - Fires a custom 'auth-logout' event.
10
+ *
11
+ * @public
12
+ */
6
13
  let Logout = class Logout extends BaseRoute {
7
14
  connectedCallback() {
8
15
  super.connectedCallback();
@@ -1,5 +1,9 @@
1
1
  import { css } from '@microsoft/fast-element';
2
2
  import { commonStyles } from '../../styles';
3
+ /**
4
+ * LogoutStyles
5
+ * @public
6
+ */
3
7
  export const LogoutStyles = css `
4
8
  ${commonStyles}
5
9
  `;
@@ -1,5 +1,9 @@
1
1
  import { html } from '@microsoft/fast-element';
2
2
  import { cardTag } from '../../tags';
3
+ /**
4
+ * LogoutTemplate
5
+ * @public
6
+ */
3
7
  export const LogoutTemplate = html `
4
8
  <auth-background>
5
9
  <div class="container">
@@ -2,6 +2,10 @@ import { __decorate } from "tslib";
2
2
  import { customElement, html } from '@microsoft/fast-element';
3
3
  import { commonStyles } from '../../styles';
4
4
  import { BaseRoute } from '../base';
5
+ /**
6
+ * NotFound
7
+ * @public
8
+ */
5
9
  let NotFound = class NotFound extends BaseRoute {
6
10
  };
7
11
  NotFound = __decorate([
@@ -1,20 +1,27 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { Connect } from '@genesislcap/foundation-comms';
3
+ import { API_HOST } from '@genesislcap/foundation-utils';
3
4
  import { customElement } from '@microsoft/fast-element';
4
- import { SOCKET_URL } from '../../env';
5
5
  import { commonStyles } from '../../styles';
6
6
  import { BaseRoute } from '../base';
7
7
  import { ProtectedTemplate as template } from './protected.template';
8
+ /**
9
+ * Protected
10
+ * @internal
11
+ */
8
12
  let Protected = class Protected extends BaseRoute {
9
13
  onLogout() {
10
14
  this.routing.navigateTo('logout');
11
15
  }
12
16
  onOpenSocketTest() {
13
- this.connect.connect(SOCKET_URL);
17
+ this.connect.connect(API_HOST);
14
18
  }
15
19
  onCloseSocketTest() {
16
20
  this.connect.disconnect();
17
21
  }
22
+ get isSocketOpen() {
23
+ return this.connect.isConnected;
24
+ }
18
25
  };
19
26
  __decorate([
20
27
  Connect
@@ -1,5 +1,9 @@
1
1
  import { html } from '@microsoft/fast-element';
2
2
  import { buttonTag } from '../../tags';
3
+ /**
4
+ * ProtectedTemplate
5
+ * @internal
6
+ */
3
7
  export const ProtectedTemplate = html `
4
8
  <div class="container">
5
9
  <${buttonTag}
@@ -10,10 +14,20 @@ export const ProtectedTemplate = html `
10
14
  >
11
15
  Logout
12
16
  </${buttonTag}>
13
- <${buttonTag} type="button" @click=${(x) => x.onOpenSocketTest()} data-test-id="open-socket">
17
+ <${buttonTag}
18
+ type="button"
19
+ @click=${(x) => x.onOpenSocketTest()}
20
+ ?disabled=${(x) => x.isSocketOpen}
21
+ data-test-id="open-socket"
22
+ >
14
23
  Open Socket
15
24
  </${buttonTag}>
16
- <${buttonTag} type="button" @click=${(x) => x.onCloseSocketTest()} data-test-id="close-socket">
25
+ <${buttonTag}
26
+ type="button"
27
+ @click=${(x) => x.onCloseSocketTest()}
28
+ ?disabled=${(x) => !x.isSocketOpen}
29
+ data-test-id="close-socket"
30
+ >
17
31
  Close Socket
18
32
  </${buttonTag}>
19
33
  </div>
@@ -4,6 +4,17 @@ import { commonStyles } from '../../styles';
4
4
  import { logger } from '../../utils';
5
5
  import { BaseRoute } from '../base';
6
6
  import { RequestAccountTemplate as template } from './request-account.template';
7
+ /**
8
+ * RequestAccount
9
+ *
10
+ * @fires auth-organisation-changed - Fires a custom 'auth-organisation-changed' event.
11
+ * @fires auth-username-changed - Fires a custom 'auth-username-changed' event.
12
+ * @fires auth-email-changed - Fires a custom 'auth-email-changed' event.
13
+ * @fires auth-password-changed - Fires a custom 'auth-password-changed' event.
14
+ * @fires auth-password2-changed - Fires a custom 'auth-password2-changed' event.
15
+ *
16
+ * @public
17
+ */
7
18
  let RequestAccount = class RequestAccount extends BaseRoute {
8
19
  constructor() {
9
20
  super(...arguments);