@genesislcap/foundation-auth 14.71.1-auth-mf.18 → 14.71.1-auth-mf.20

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 (143) hide show
  1. package/README.md +36 -14
  2. package/dist/dts/components/core-components.d.ts +2 -0
  3. package/dist/dts/components/core-components.d.ts.map +1 -0
  4. package/dist/dts/components/zero-components.d.ts +6 -0
  5. package/dist/dts/components/zero-components.d.ts.map +1 -0
  6. package/dist/dts/{main → config}/config.d.ts +13 -39
  7. package/dist/dts/config/config.d.ts.map +1 -0
  8. package/dist/dts/config/configure.d.ts +54 -0
  9. package/dist/dts/config/configure.d.ts.map +1 -0
  10. package/dist/dts/config/index.d.ts +3 -0
  11. package/dist/dts/config/index.d.ts.map +1 -0
  12. package/dist/dts/config/templates.d.ts +38 -0
  13. package/dist/dts/config/templates.d.ts.map +1 -0
  14. package/dist/dts/index.d.ts +1 -0
  15. package/dist/dts/index.d.ts.map +1 -1
  16. package/dist/dts/machine/machine.d.ts +1 -1
  17. package/dist/dts/machine/machine.d.ts.map +1 -1
  18. package/dist/dts/main/index.d.ts +0 -3
  19. package/dist/dts/main/index.d.ts.map +1 -1
  20. package/dist/dts/main/main.d.ts +65 -29
  21. package/dist/dts/main/main.d.ts.map +1 -1
  22. package/dist/dts/main/main.styles.d.ts +1 -12
  23. package/dist/dts/main/main.styles.d.ts.map +1 -1
  24. package/dist/dts/main/main.template.d.ts +2 -3
  25. package/dist/dts/main/main.template.d.ts.map +1 -1
  26. package/dist/dts/routes/base.d.ts +8 -14
  27. package/dist/dts/routes/base.d.ts.map +1 -1
  28. package/dist/dts/routes/config.d.ts +2 -2
  29. package/dist/dts/routes/config.d.ts.map +1 -1
  30. package/dist/dts/routes/forgot-password/forgot-password.d.ts +1 -0
  31. package/dist/dts/routes/forgot-password/forgot-password.d.ts.map +1 -1
  32. package/dist/dts/routes/forgot-password/forgot-password.template.d.ts.map +1 -1
  33. package/dist/dts/routes/index.d.ts +0 -1
  34. package/dist/dts/routes/index.d.ts.map +1 -1
  35. package/dist/dts/routes/login/login.d.ts +6 -7
  36. package/dist/dts/routes/login/login.d.ts.map +1 -1
  37. package/dist/dts/routes/login/login.styles.d.ts.map +1 -1
  38. package/dist/dts/routes/login/login.template.d.ts.map +1 -1
  39. package/dist/dts/routes/logout/logout.d.ts +1 -1
  40. package/dist/dts/routes/logout/logout.d.ts.map +1 -1
  41. package/dist/dts/routes/logout/logout.template.d.ts.map +1 -1
  42. package/dist/dts/routes/protected/protected.template.d.ts.map +1 -1
  43. package/dist/dts/routes/request-account/request-account.template.d.ts.map +1 -1
  44. package/dist/dts/routes/reset-password/reset-password.d.ts +2 -1
  45. package/dist/dts/routes/reset-password/reset-password.d.ts.map +1 -1
  46. package/dist/dts/routes/reset-password/reset-password.template.d.ts.map +1 -1
  47. package/dist/dts/routes/routing.d.ts +2 -2
  48. package/dist/dts/routes/types.d.ts +0 -18
  49. package/dist/dts/routes/types.d.ts.map +1 -1
  50. package/dist/dts/routes/verify/verify.template.d.ts.map +1 -1
  51. package/dist/dts/store/auth.d.ts +1 -1
  52. package/dist/dts/store/auth.d.ts.map +1 -1
  53. package/dist/dts/store/authFormEntry.d.ts +21 -5
  54. package/dist/dts/store/authFormEntry.d.ts.map +1 -1
  55. package/dist/dts/styles/styles.d.ts.map +1 -1
  56. package/dist/dts/tags/index.d.ts +2 -0
  57. package/dist/dts/tags/index.d.ts.map +1 -0
  58. package/dist/dts/tags/tags.d.ts +59 -0
  59. package/dist/dts/tags/tags.d.ts.map +1 -0
  60. package/dist/dts/utils/sso.d.ts +14 -1
  61. package/dist/dts/utils/sso.d.ts.map +1 -1
  62. package/dist/esm/components/core-components.js +8 -0
  63. package/dist/esm/components/zero-components.js +48 -0
  64. package/dist/esm/{main → config}/config.js +4 -40
  65. package/dist/esm/config/configure.js +83 -0
  66. package/dist/esm/config/index.js +2 -0
  67. package/dist/esm/config/templates.js +18 -0
  68. package/dist/esm/index.js +1 -0
  69. package/dist/esm/machine/machine.js +1 -9
  70. package/dist/esm/main/index.js +0 -3
  71. package/dist/esm/main/main.js +94 -67
  72. package/dist/esm/main/main.styles.js +20 -33
  73. package/dist/esm/main/main.template.js +7 -11
  74. package/dist/esm/routes/base.js +24 -56
  75. package/dist/esm/routes/config.js +33 -29
  76. package/dist/esm/routes/forgot-password/forgot-password.js +4 -0
  77. package/dist/esm/routes/forgot-password/forgot-password.template.js +3 -2
  78. package/dist/esm/routes/index.js +0 -1
  79. package/dist/esm/routes/login/login.js +17 -45
  80. package/dist/esm/routes/login/login.styles.js +3 -9
  81. package/dist/esm/routes/login/login.template.js +34 -24
  82. package/dist/esm/routes/logout/logout.js +2 -1
  83. package/dist/esm/routes/logout/logout.template.js +3 -2
  84. package/dist/esm/routes/protected/protected.template.js +7 -6
  85. package/dist/esm/routes/request-account/request-account.template.js +5 -4
  86. package/dist/esm/routes/reset-password/reset-password.js +6 -4
  87. package/dist/esm/routes/reset-password/reset-password.template.js +3 -2
  88. package/dist/esm/routes/routing.js +2 -2
  89. package/dist/esm/routes/verify/verify.template.js +5 -4
  90. package/dist/esm/store/auth.js +2 -2
  91. package/dist/esm/store/authFormEntry.js +50 -3
  92. package/dist/esm/styles/styles.js +9 -8
  93. package/dist/esm/tags/index.js +1 -0
  94. package/dist/esm/tags/tags.js +77 -0
  95. package/dist/foundation-auth.api.json +531 -385
  96. package/dist/foundation-auth.d.ts +636 -1033
  97. package/docs/api/foundation-auth.authconfig.md +3 -1
  98. package/docs/api/foundation-auth.authconfig.templateoptions.md +18 -0
  99. package/docs/api/foundation-auth.authformentryeventmap.md +2 -0
  100. package/docs/api/foundation-auth.authformentrystore.autofilling.md +11 -0
  101. package/docs/api/foundation-auth.authformentrystore.md +3 -0
  102. package/docs/api/foundation-auth.authformentrystore.onselectedidpchanged.md +22 -0
  103. package/docs/api/foundation-auth.authformentrystore.onssotogglechanged.md +22 -0
  104. package/docs/api/foundation-auth.authrouting.md +1 -1
  105. package/docs/api/foundation-auth.configure.md +30 -9
  106. package/docs/api/foundation-auth.defaultauthformentrystore.autofill.md +15 -0
  107. package/docs/api/foundation-auth.defaultauthformentrystore.autofilling.md +11 -0
  108. package/docs/api/foundation-auth.defaultauthformentrystore.fetchmachine.md +11 -0
  109. package/docs/api/foundation-auth.defaultauthformentrystore.md +12 -0
  110. package/docs/api/foundation-auth.defaultauthformentrystore.onselectedidpchanged.md +11 -0
  111. package/docs/api/foundation-auth.defaultauthformentrystore.onssotogglechanged.md +11 -0
  112. package/docs/api/foundation-auth.defaultauthformentrystore.resetidpstate.md +15 -0
  113. package/docs/api/foundation-auth.defaultauthformentrystore.ssotoggledchanged.md +23 -0
  114. package/docs/api/foundation-auth.foundationauth.md +21 -0
  115. package/docs/api/foundation-auth.getauthrouting.md +1 -1
  116. package/docs/api/foundation-auth.md +3 -8
  117. package/docs/api/foundation-auth.settings.md +0 -5
  118. package/docs/api/foundation-auth.styles.md +2 -14
  119. package/docs/api/foundation-auth.template.md +1 -1
  120. package/docs/api/foundation-auth.zeroauth.md +45 -0
  121. package/docs/api-report.md +77 -188
  122. package/package.json +26 -12
  123. package/dist/dts/components/components.d.ts +0 -5
  124. package/dist/dts/components/components.d.ts.map +0 -1
  125. package/dist/dts/components/index.d.ts +0 -2
  126. package/dist/dts/components/index.d.ts.map +0 -1
  127. package/dist/dts/main/config.d.ts.map +0 -1
  128. package/dist/dts/main/define.d.ts +0 -29
  129. package/dist/dts/main/define.d.ts.map +0 -1
  130. package/dist/dts/main/main.definition.d.ts +0 -48
  131. package/dist/dts/main/main.definition.d.ts.map +0 -1
  132. package/dist/esm/components/components.js +0 -48
  133. package/dist/esm/components/index.js +0 -1
  134. package/dist/esm/main/define.js +0 -30
  135. package/dist/esm/main/main.definition.js +0 -43
  136. package/docs/api/foundation-auth.auth.md +0 -14
  137. package/docs/api/foundation-auth.authhosted.md +0 -23
  138. package/docs/api/foundation-auth.authhosted.registercommoncomponents.md +0 -18
  139. package/docs/api/foundation-auth.defaulttemplateoptions.md +0 -16
  140. package/docs/api/foundation-auth.define.md +0 -38
  141. package/docs/api/foundation-auth.definition.md +0 -19
  142. package/docs/api/foundation-auth.templatecomponents.md +0 -25
  143. package/docs/api/foundation-auth.templateoptions.md +0 -19
package/README.md CHANGED
@@ -3,19 +3,33 @@
3
3
  [![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/)
4
4
  [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](https://www.typescriptlang.org/)
5
5
 
6
- `foundation-auth` provides several exports to promote reuse and extensibility at various levels. These include but are
7
- not limited to:
6
+ `foundation-auth` provides a fully featured authentication micro frontend and several additional exports to promote
7
+ reuse and extensibility at various levels. These include but are not limited to:
8
8
 
9
- * `Auth`: The fully featured authentication micro frontend.
9
+ * `ZeroAuth`: A preconfigured version of the micro frontend built with the zero design system and zero components.
10
+ * `configure`: A customisation hook for the base micro frontend that integrates it with your design system of choice.
10
11
  * `User`: The user singleton, which always exists in either an anonymous or authenticated mode.
11
12
  * `AuthStore`: An auth based `foundation-store`.
12
13
  * `AuthMachine`: An auth based `foundation-state-machine` covering the various auth workflows.
13
14
  * `AuthMessageMapper`: The auth message dto to entity mapper.
14
15
  * `AuthRouting`: A routing utility, which you can call `navigateTo(...)` to navigate to internal routes.
15
- * Various UI components / screens.
16
+ * `SOCKET_URL`: The full socket url environment variable to connect with, ie. `wss://public-foundation-hardened1/gwf/`.
17
+ * Various UI components / route screens, which are lazy loaded on-demand to optimise the experience.
16
18
 
17
- In most cases, developers simply import both the `User` and `Auth` micro frontend, and use the `configure` export token
18
- to tailor the micro frontend to their specific needs in their router config. However, developers can also use the
19
+ Many of these are available as [subpath exports](https://nodejs.org/api/packages.html#subpath-exports) and should be
20
+ imported from these to optimise bundling and overall efficiency.
21
+
22
+ ```ts
23
+ import { configure } from '@genesislcap/foundation-auth/configure';
24
+ import { User } from '@genesislcap/foundation-auth/user';
25
+ import { AuthRouting } from '@genesislcap/foundation-auth/routing';
26
+ import { SOCKET_URL } from '@genesislcap/foundation-auth/env';
27
+ // zero is on the root export
28
+ import { ZeroAuth } from '@genesislcap/foundation-auth';
29
+ ```
30
+
31
+ In most cases, developers simply import both the `User` and `ZeroAuth` micro frontend, or use the `configure` export
32
+ token to tailor the micro frontend to their specific needs in their router config. However, developers can also use the
19
33
  exports provided to build their own authentication frontends or workflows. A set of pre-defined custom events are used
20
34
  to interact with the `AuthStore` and `AuthMachine`, and developers can provide custom implementations of parts of the
21
35
  machine's workflow.
@@ -80,8 +94,8 @@ Here we are lazy loading the micro frontend when the route is accessed.
80
94
  name: 'auth',
81
95
  path: 'auth', // < at what path should the micro frontend be accessed
82
96
  element: async () => {
83
- const { Auth, configure } = await import('@genesislcap/foundation-auth');
84
- configure({
97
+ const { configure } = await import('@genesislcap/foundation-auth/config');
98
+ return configure({
85
99
  omitRoutes: ['request-account'],
86
100
  hostPath: 'auth', // < important to match the route path
87
101
  logo: myLogo,
@@ -91,7 +105,6 @@ Here we are lazy loading the micro frontend when the route is accessed.
91
105
  Route.path.push('my-dashboard');
92
106
  },
93
107
  });
94
- return Auth;
95
108
  },
96
109
  childRouters: true,
97
110
  settings: { public: true },
@@ -116,7 +129,7 @@ this.contributors.push({
116
129
  * Otherwise route them to auth
117
130
  */
118
131
  phase.cancel(() => {
119
- this.user.trackPath();
132
+ this.user.trackPath(); // < Track the user's path to return to it post login if required
120
133
  Route.name.replace(phase.router, 'auth');
121
134
  });
122
135
  },
@@ -135,9 +148,10 @@ this.connect.connect(SOCKET_URL);
135
148
  ```
136
149
 
137
150
  ### Logging out
138
- You can logout by navigating to the logout route. You can access the `AuthRouting` singleton via the DI container.
151
+ You can logout easily by navigating to the logout route. To help, you can access the `AuthRouting` singleton via the DI
152
+ container from anywhere in your app, such as a header's logout button, and call `navigateTo`.
139
153
  ```ts
140
- import { AuthRouting } from '@genesislcap/foundation-auth';
154
+ import { AuthRouting } from '@genesislcap/foundation-auth/routing';
141
155
  ...
142
156
  @AuthRouting private authRouting: AuthRouting;
143
157
  ...
@@ -147,19 +161,27 @@ this.authRouting.navigateTo('logout');
147
161
  ...or via a utility if your app is not using decorators or the DI container.
148
162
 
149
163
  ```ts
150
- import { getAuthRouting } from '@genesislcap/foundation-auth';
164
+ import { getAuthRouting } from '@genesislcap/foundation-auth/routing';
151
165
  ...
152
166
  private authRouting = getAuthRouting();
153
167
  ...
154
168
  this.authRouting.navigateTo('logout');
155
169
  ```
156
170
 
157
- You can use `AuthRouting` to navigate to other routes, like change password etc.
171
+ You can use `AuthRouting` to navigate to other routes, like change password etc, all without needing to know the full
172
+ path the micro frontend is hosted on.
158
173
 
159
174
  See the [AuthRouting API Docs](./docs/api/foundation-auth.authrouting.md) for more information.
160
175
 
161
176
  ## [API Docs](./docs/api/index.md)
162
177
 
178
+ ## Troubleshooting
179
+
180
+ * I'm using `configure` but I'm not seeing my changes reflected?
181
+ * *Ensure you're importing `configure` from the `/config` subpath and not the root of the package.*
182
+ * The `Forgot Password?`, `Change Password` and `Request Account` links don't seem to do anything.
183
+ * *If you're hosting the micro frontend on anything other than the top level root path `''`, for example: `path: 'auth'`, then ensure the `hostPath` property in the `configure` matches.*
184
+
163
185
  ## License
164
186
 
165
187
  Note: this project provides front-end dependencies and uses licensed components listed in the next section; thus, licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=core-components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-components.d.ts","sourceRoot":"","sources":["../../../src/components/core-components.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * registerCommonZeroComponents.
3
+ * @public
4
+ */
5
+ export declare const registerCommonZeroComponents: () => Promise<void>;
6
+ //# sourceMappingURL=zero-components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zero-components.d.ts","sourceRoot":"","sources":["../../../src/components/zero-components.ts"],"names":[],"mappings":"AA8BA;;;GAGG;AACH,eAAO,MAAM,4BAA4B,qBAkCxC,CAAC"}
@@ -1,5 +1,9 @@
1
- import { ElementStyles } from '@microsoft/fast-element';
1
+ import { ElementStyles, PartialFASTElementDefinition } from '@microsoft/fast-element';
2
2
  import type { AuthRoutes } from '../routes/types';
3
+ import { TemplateOptions } from './templates';
4
+ /**
5
+ * Do not reference any ../main files here. We must avoid ../tags being referenced and therefore setup pre-configuration.
6
+ */
3
7
  /**
4
8
  * @public
5
9
  * Could be expanded to allow field ViewTemplates.
@@ -61,7 +65,14 @@ export type SSOConfig = {
61
65
  *
62
66
  * @public
63
67
  */
64
- export interface AuthConfig {
68
+ export interface AuthConfig extends PartialFASTElementDefinition {
69
+ /**
70
+ * Template options.
71
+ *
72
+ * @remarks
73
+ * Used by host applications to assign MF template options and subcomponent tags to align with the host design system.
74
+ */
75
+ templateOptions: TemplateOptions;
65
76
  /**
66
77
  * Logo styles.
67
78
  *
@@ -192,41 +203,4 @@ export declare const defaultAuthConfig: AuthConfig;
192
203
  * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
193
204
  */
194
205
  export declare const AuthConfig: import("@microsoft/fast-foundation").InterfaceSymbol<AuthConfig>;
195
- /**
196
- * Configure the auth micro frontend settings.
197
- *
198
- * @remarks
199
- * This is primarily for general settings, rather than re-defining the element, static templating / style changes.
200
- *
201
- * @param config - A partial AuthConfig.
202
- *
203
- * @example Configuring auth on lazy load
204
- * ```ts
205
- * title: 'Authenticate',
206
- * name: 'auth',
207
- * path: 'auth',
208
- * element: async () => {
209
- * const { configure, Auth } = await import('@genesislcap/foundation-auth');
210
- * configure({
211
- * hostPath: 'auth',
212
- * omitRoutes: ['request-account'],
213
- * logo: myCompanyLogo,
214
- * background: myAuthBG,
215
- * postLoginRedirect: () => {
216
- * // You could inspect the user here and route them based on various conditions.
217
- * Route.path.push('dashboard');
218
- * },
219
- * });
220
- * return Auth;
221
- * },
222
- * layout: authLayout,
223
- * settings: { public: true },
224
- * childRouters: true,
225
- * ```
226
- *
227
- * @public
228
- * @privateRemarks
229
- * We can tailor the spreading logic after we put it to use. Keeping it simple for now.
230
- */
231
- export declare function configure(config: Partial<AuthConfig>): void;
232
206
  //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,aAAa,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAI3F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAA0B,eAAe,EAAE,MAAM,aAAa,CAAC;AAEtE;;GAEG;AAEH;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,WAAW,CAAC;IACtB,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,UAAW,SAAQ,4BAA4B;IAC9D;;;;;OAKG;IACH,eAAe,EAAE,eAAe,CAAC;IACjC;;;;;;;;;;;;OAYG;IACH,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;IAC3B;;;;;;;;;;;;;;OAcG;IACH,UAAU,EAAE,aAAa,CAAC;IAC1B;;;;;OAKG;IACH,eAAe,EAAE;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,WAAW,GAAG,WAAW,GAAG,YAAY,CAAC;KAChD,GAAG,IAAI,CAAC;IACT;;;;;;;;;;OAUG;IACH,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,OAAO,GAAG,WAAW,CAAC,EAAE,CAAC;IACzD;;;;;OAKG;IACH,MAAM,EAAE,cAAc,CAAC;IACvB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAChC;;;;;;;OAOG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B;;;;OAIG;IACH,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B;;;OAGG;IACH,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B;;;;;OAKG;IACH,GAAG,EAAE,SAAS,GAAG,IAAI,CAAC;IACtB;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAsC/B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,kEAAuE,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { AuthConfig } from './config';
2
+ /**
3
+ * configure.
4
+ *
5
+ * @remarks
6
+ * Configure the auth micro frontend for host app integration.
7
+ *
8
+ * @example General foundation-auth configuration when the route is visited, ie. lazy loading.
9
+ * ```ts
10
+ * title: 'Authenticate',
11
+ * name: 'auth',
12
+ * path: 'auth',
13
+ * element: async () => {
14
+ * const { configure } = await import('@genesislcap/foundation-auth/config'); // < import from the subpath
15
+ * return configure({
16
+ * hostPath: 'auth',
17
+ * omitRoutes: ['request-account'],
18
+ * logo: myCompanyLogo,
19
+ * background: myAuthBG,
20
+ * postLoginRedirect: () => {
21
+ * // You could inspect the user here and route them based on various conditions.
22
+ * Route.path.push('dashboard');
23
+ * },
24
+ * });
25
+ * },
26
+ * layout: authLayout,
27
+ * settings: { public: true },
28
+ * childRouters: true,
29
+ * ```
30
+ *
31
+ * @example Providing template options align to your host application.
32
+ * ```ts
33
+ * title: 'Authenticate',
34
+ * name: 'auth',
35
+ * path: 'auth',
36
+ * element: async () => {
37
+ * const { configure } = await import('@genesislcap/foundation-auth/config'); // < import from the subpath
38
+ * return configure({
39
+ * name: `nexus-app-auth`,
40
+ * // These will be merged with the packages `defaultTemplateOptions`. You will need to have these components registered in your application.
41
+ * templateOptions: {
42
+ * button: 'nexus-button',
43
+ * checkbox: 'nexus-checkbox-next',
44
+ * provider: 'template',
45
+ * },
46
+ * });
47
+ * },
48
+ * ```
49
+ *
50
+ * @param config - A partial AuthConfig.
51
+ * @public
52
+ */
53
+ export declare function configure(config: Partial<AuthConfig>): Promise<typeof import("../main").FoundationAuth>;
54
+ //# sourceMappingURL=configure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../src/config/configure.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAqB,MAAM,UAAU,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,wBAAsB,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,oDA+B1D"}
@@ -0,0 +1,3 @@
1
+ export * from './config';
2
+ export * from './configure';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { TemplateElementDependency } from '@genesislcap/foundation-ui';
2
+ import { SyntheticViewTemplate } from '@microsoft/fast-element';
3
+ /**
4
+ * TemplateComponents.
5
+ * @public
6
+ */
7
+ export type TemplateComponents = {
8
+ anchor: TemplateElementDependency;
9
+ button: TemplateElementDependency;
10
+ card: TemplateElementDependency;
11
+ checkbox: TemplateElementDependency;
12
+ listboxOption: TemplateElementDependency;
13
+ provider: TemplateElementDependency;
14
+ router: TemplateElementDependency;
15
+ select: TemplateElementDependency;
16
+ textField: TemplateElementDependency;
17
+ progressRing: TemplateElementDependency;
18
+ };
19
+ /**
20
+ * TemplateOptions.
21
+ * @public
22
+ */
23
+ export type TemplateOptions = Partial<TemplateComponents> & {
24
+ /**
25
+ * @remarks
26
+ * Just for reference that template options may be more than tags.
27
+ * @internal
28
+ */
29
+ somePartial?: string | SyntheticViewTemplate;
30
+ };
31
+ /**
32
+ * defaultTemplateOptions.
33
+ * @remarks
34
+ * The default template options this MF has been created with.
35
+ * @public
36
+ */
37
+ export declare const defaultTemplateOptions: TemplateOptions;
38
+ //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/config/templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,yBAAyB,CAAC;IAClC,MAAM,EAAE,yBAAyB,CAAC;IAClC,IAAI,EAAE,yBAAyB,CAAC;IAChC,QAAQ,EAAE,yBAAyB,CAAC;IACpC,aAAa,EAAE,yBAAyB,CAAC;IACzC,QAAQ,EAAE,yBAAyB,CAAC;IACpC,MAAM,EAAE,yBAAyB,CAAC;IAClC,MAAM,EAAE,yBAAyB,CAAC;IAClC,SAAS,EAAE,yBAAyB,CAAC;IACrC,YAAY,EAAE,yBAAyB,CAAC;CACzC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,GAAG;IAC1D;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAC;CAC9C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,eAWpC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './env';
2
+ export * from './config';
2
3
  export * from './credential';
3
4
  export * from './dto';
4
5
  export * from './entity';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import { AbstractMachine, FetchMachine, FetchMachineEvent, Machine } from '@genesislcap/foundation-state-machine';
2
2
  import { UUID } from '@genesislcap/foundation-utils';
3
3
  import type { InterpreterOptions } from 'xstate';
4
+ import { AuthConfig } from '../config/config';
4
5
  import { CredentialManager } from '../credential';
5
- import { AuthConfig } from '../main/config';
6
6
  import { AuthMessageMapper } from '../mapper';
7
7
  import { AuthRouting } from '../routes/routing';
8
8
  import { User } from '../user';
@@ -1 +1 @@
1
- {"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../src/machine/machine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,YAAY,EACZ,iBAAiB,EAMjB,OAAO,EAER,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAGrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAEL,iBAAiB,EAIlB,MAAM,eAAe,CAAC;AAWvB,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EACL,iBAAiB,EAQlB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAGhB,WAAW,EACX,WAAW,EAEZ,MAAM,SAAS,CAAC;AAGjB;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO,CAAC,kBAAkB,EAAE,gBAAgB,CAAC;CAAG;AAErF;;;GAGG;AACH,qBAAa,kBACX,SAAQ,eAAe,CAAC,kBAAkB,EAAE,gBAAgB,CAC5D,YAAW,WAAW;IAGd,OAAO,CAAC,IAAI;IACJ,OAAO,CAAC,YAAY;IACf,OAAO,CAAC,EAAE;IACvB,OAAO,CAAC,IAAI;IACC,OAAO,CAAC,aAAa;IAC5B,OAAO,CAAC,MAAM;IACb,OAAO,CAAC,OAAO;gBANd,IAAI,EAAE,IAAI,EACF,YAAY,EAAE,YAAY,EACrB,EAAE,EAAE,iBAAiB,EAClC,IAAI,EAAE,IAAI,EACG,aAAa,EAAE,iBAAiB,EACvC,MAAM,EAAE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SAAQ,eAAe,CAAC,kBAAkB,EAAE,gBAAgB,CAC5D,YAAW,WAAW;IAGd,OAAO,CAAC,IAAI;IACJ,OAAO,CAAC,YAAY;IACf,OAAO,CAAC,EAAE;IACvB,OAAO,CAAC,IAAI;IACC,OAAO,CAAC,aAAa;IAC5B,OAAO,CAAC,MAAM;IACb,OAAO,CAAC,OAAO;gBANd,IAAI,EAAE,IAAI,EACF,YAAY,EAAE,YAAY,EACrB,EAAE,EAAE,iBAAiB,EAClC,IAAI,EAAE,IAAI,EACG,aAAa,EAAE,iBAAiB,EACvC,MAAM,EAAE,UAAU,EACjB,OAAO,EAAE,WAAW;IAokB3C,KAAK,CACH,OAAO,GAAE,kBAAkB,CAAC,OAAO,IAAI,CAAC,OAAO,CAM9C;IAKH;;OAEG;IACH,gBAAgB,IAAI,IAAI;IAIxB,SAAS,CAAC,sBAAsB,IAAI,WAAW;IAQ/C,SAAS,CAAC,+BAA+B,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW;IAqB3E,SAAS,CAAC,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,iBAAiB;IAgB3E,SAAS,CAAC,YAAY;;;;;;;;;;;;;;;;;MAiBnB;IAEH,SAAS,CAAC,SAAS;;;MAGhB;CACJ;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,mEAA0E,CAAC"}
@@ -1,6 +1,3 @@
1
- export * from './config';
2
- export * from './define';
3
- export * from './main.definition';
4
1
  export * from './main.template';
5
2
  export * from './main.styles';
6
3
  export * from './main';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/main/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/main/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import { Container } from '@microsoft/fast-foundation';
2
- import { MainRouterConfig } from '../routes';
2
+ import '../components/core-components';
3
+ import { AuthRouterConfig } from '../routes/config';
3
4
  import { AuthEventMap, AuthStore } from '../store';
4
- declare const Auth_base: abstract new (...args: any[]) => {
5
+ declare const FoundationAuth_base: abstract new (...args: any[]) => {
5
6
  $emit<K extends "store-connected" | "store-disconnected" | "store-ready" | "auth-machine-event" | "auth-login" | "auth-logout" | "auth-change-password" | "auth-forgot-password" | "auth-reset-password">(...args: AuthEventMap[K] extends void ? [type: K, options?: import("@genesislcap/foundation-events").EmitOptions] : [type: K, detail: AuthEventMap[K], options?: import("@genesislcap/foundation-events").EmitOptions]): import("@genesislcap/foundation-events").EmitReturn;
6
7
  accessKey: string;
7
8
  readonly accessKeyLabel: string;
@@ -317,73 +318,108 @@ declare const Auth_base: abstract new (...args: any[]) => {
317
318
  attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
318
319
  };
319
320
  /**
321
+ * FoundationAuth.
322
+ *
323
+ * @remarks
324
+ * Base MF export used by host application `configure` calls. It does not set up a design system or components. Both are
325
+ * expected to be registered in the host application, which should provide the details of which to the MF via
326
+ * TemplateOptions.
327
+ *
328
+ * See the {@link configure} hook for more information on how to set up and use this micro frontend in your application.
329
+ *
320
330
  * @public
321
331
  */
322
- export declare class Auth extends Auth_base {
332
+ export declare class FoundationAuth extends FoundationAuth_base {
323
333
  /**
324
334
  * @internal
325
335
  */
326
336
  store: AuthStore;
327
337
  /**
328
- * Configuration for the routes and their associated settings.
329
- * The client would override this in their app with their own settings to set
330
- * their routes up as desired
331
338
  * @internal
332
339
  */
333
- config: MainRouterConfig;
340
+ config: AuthRouterConfig;
334
341
  /**
335
- * The DI container used to register required components in {@link Auth.registerDIDependencies}
336
342
  * @internal
337
343
  */
338
344
  container: Container;
339
345
  /**
340
- * Marked true when remote components are loaded, currently unused.
341
346
  * @internal
342
347
  */
343
- ready: boolean;
348
+ connectedCallback(): void;
344
349
  /**
345
- * DS provider / root level template.
346
350
  * @internal
347
351
  */
348
- provider: HTMLElement;
352
+ disconnectedCallback(): void;
349
353
  /**
350
354
  * @internal
351
355
  */
352
- connectedCallback(): Promise<void>;
356
+ protected registerDIDependencies(): void;
353
357
  /**
354
358
  * @internal
355
359
  */
356
- disconnectedCallback(): void;
360
+ protected addEventListeners(): void;
357
361
  /**
358
- * Called from the connectedCallback
359
362
  * @internal
360
363
  */
361
- registerCommonComponents(): Promise<void>;
364
+ protected removeEventListeners(): void;
362
365
  /**
363
366
  * @internal
364
367
  */
365
- protected registerDIDependencies(): void;
368
+ protected readyStore(): void;
366
369
  /**
367
370
  * @internal
368
371
  */
369
- protected addEventListeners(): void;
372
+ get isReady(): boolean;
373
+ }
374
+ /**
375
+ * ZeroAuth.
376
+ *
377
+ * @remarks
378
+ * A zero version that pre-registers zero components and uses the zero design system so that it can run standalone.
379
+ * Generally this is used for development purposes, but can be deployed as a standalone application if required or be
380
+ * used by a host application that is already using zero. ZeroAuth and its components won't bloat the core bundle as
381
+ * these are only loaded on-demand when in use.
382
+ *
383
+ * @example
384
+ * ```ts
385
+ * import { ZeroAuth } from '@genesislcap/foundation-auth';
386
+ * ...
387
+ * title: 'Authenticate',
388
+ * name: 'auth',
389
+ * path: '',
390
+ * element: ZeroAuth,
391
+ * ```
392
+ *
393
+ * @example Load the micro frontend on-demand
394
+ * ```ts
395
+ * title: 'Authenticate',
396
+ * name: 'auth',
397
+ * path: '',
398
+ * element: async () => {
399
+ * const { ZeroAuth } = await import('@genesislcap/foundation-auth');
400
+ * return ZeroAuth;
401
+ * },
402
+ * ```
403
+ *
404
+ * @public
405
+ */
406
+ export declare class ZeroAuth extends FoundationAuth {
370
407
  /**
371
408
  * @internal
372
409
  */
373
- protected removeEventListeners(): void;
410
+ protected zeroReady: boolean;
374
411
  /**
375
412
  * @internal
376
413
  */
377
- protected readyStore(): void;
378
- }
379
- /**
380
- * @beta
381
- * @privateRemarks
382
- * A hosted version of the MF that doesn't set up a design system or components. This is what apps would use to truly
383
- * customise the MF for their needs via define.ts.
384
- */
385
- export declare class AuthHosted extends Auth {
386
- registerCommonComponents(): Promise<void>;
414
+ connectedCallback(): Promise<void>;
415
+ /**
416
+ * @internal
417
+ */
418
+ protected loadRemotes(): Promise<void>;
419
+ /**
420
+ * @internal
421
+ */
422
+ get isReady(): boolean;
387
423
  }
388
424
  export {};
389
425
  //# sourceMappingURL=main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main/main.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAwB,MAAM,4BAA4B,CAAC;AAG7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGnD;;GAEG;AACH,qBACa,IAAK,SAAQ,SAAuC;IAC/D;;OAEG;IACQ,KAAK,EAAG,SAAS,CAAC;IAE7B;;;;;OAKG;IACuB,MAAM,EAAG,gBAAgB,CAAC;IAEpD;;;OAGG;IACQ,SAAS,EAAG,SAAS,CAAC;IAEjC;;;OAGG;IACS,KAAK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;IACH,iBAAiB;IAOjB;;OAEG;IACH,oBAAoB;IAKpB;;OAEG;IACH,SAAS,CAAC,sBAAsB;IAIhC;;OAEG;IACH,SAAS,CAAC,iBAAiB;IAI3B;;OAEG;IACH,SAAS,CAAC,oBAAoB;IAI9B;;OAEG;IACH,SAAS,CAAC,UAAU;IAKpB;;OAEG;IACH,IAAI,OAAO,YAEV;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAKa,QAAS,SAAQ,cAAc;IAC1C;;OAEG;IACH,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACG,iBAAiB;IAKvB;;OAEG;cACa,WAAW;IAM3B;;OAEG;IACH,IAAI,OAAO,YAEV;CACF"}
@@ -1,16 +1,5 @@
1
- import type { TemplateOptions } from './main.definition';
2
1
  /**
3
2
  * @public
4
- * @privateRemarks
5
- * Options can be used to target unknown component tags in the css, such as:
6
- * @example unknown target
7
- * ```
8
- * const buttonTag = tagFor(options.button);
9
- * ...
10
- * ${buttonTag} {
11
- * width: 200px;
12
- * }
13
- * ```
14
3
  */
15
- export declare const styles: (options: TemplateOptions) => import("@microsoft/fast-element").ElementStyles;
4
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
16
5
  //# sourceMappingURL=main.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.styles.d.ts","sourceRoot":"","sources":["../../../src/main/main.styles.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,YAAa,eAAe,oDAwB9C,CAAC"}
1
+ {"version":3,"file":"main.styles.d.ts","sourceRoot":"","sources":["../../../src/main/main.styles.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,MAAM,iDAqBlB,CAAC"}
@@ -1,7 +1,6 @@
1
- import type { Auth } from './main';
2
- import type { TemplateOptions } from './main.definition';
1
+ import type { FoundationAuth } from './main';
3
2
  /**
4
3
  * @public
5
4
  */
6
- export declare const template: (options: TemplateOptions) => import("@microsoft/fast-element").ViewTemplate<Auth, any>;
5
+ export declare const template: import("@microsoft/fast-element").ViewTemplate<FoundationAuth, any>;
7
6
  //# sourceMappingURL=main.template.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,QAAQ,YAAa,eAAe,8DAQhD,CAAC"}
1
+ {"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,QAAQ,qEAIpB,CAAC"}
@@ -1,9 +1,7 @@
1
1
  import { Binding } from '@microsoft/fast-element';
2
2
  import { Container } from '@microsoft/fast-foundation';
3
- import { CredentialManager } from '../credential';
4
- import { AuthConfig } from '../main/config';
3
+ import { AuthConfig } from '../config/config';
5
4
  import { AuthEventMap, AuthFormEntryEventMap, AuthStore } from '../store';
6
- import { User } from '../user';
7
5
  import { AuthRouting } from './routing';
8
6
  type EventMap = AuthEventMap & AuthFormEntryEventMap & {};
9
7
  /**
@@ -21,7 +19,7 @@ export type ConfigHost = {
21
19
  config: AuthConfig;
22
20
  };
23
21
  declare const ConfigHostElement_base: abstract new (...args: any[]) => {
24
- $emit<K extends "auth-autofill-form" | "auth-organisation-changed" | "auth-username-changed" | "auth-email-changed" | "auth-password-changed" | "auth-password2-changed" | "auth-showPasswords-changed" | "store-connected" | "store-disconnected" | "store-ready" | "auth-machine-event" | "auth-login" | "auth-logout" | "auth-change-password" | "auth-forgot-password" | "auth-reset-password">(...args: EventMap[K] extends void ? [type: K, options?: import("@genesislcap/foundation-events").EmitOptions] : [type: K, detail: EventMap[K], options?: import("@genesislcap/foundation-events").EmitOptions]): import("@genesislcap/foundation-events").EmitReturn;
22
+ $emit<K extends "auth-autofill-form" | "auth-organisation-changed" | "auth-username-changed" | "auth-email-changed" | "auth-password-changed" | "auth-password2-changed" | "auth-showPasswords-changed" | "auth-selectedIDP-changed" | "auth-ssoToggled-changed" | "store-connected" | "store-disconnected" | "store-ready" | "auth-machine-event" | "auth-login" | "auth-logout" | "auth-change-password" | "auth-forgot-password" | "auth-reset-password">(...args: EventMap[K] extends void ? [type: K, options?: import("@genesislcap/foundation-events").EmitOptions] : [type: K, detail: EventMap[K], options?: import("@genesislcap/foundation-events").EmitOptions]): import("@genesislcap/foundation-events").EmitReturn;
25
23
  accessKey: string;
26
24
  readonly accessKeyLabel: string;
27
25
  autocapitalize: string;
@@ -50,6 +48,9 @@ declare const ConfigHostElement_base: abstract new (...args: any[]) => {
50
48
  readonly classList: DOMTokenList;
51
49
  className: string;
52
50
  readonly clientHeight: number;
51
+ /**
52
+ * @internal
53
+ */
53
54
  readonly clientLeft: number;
54
55
  readonly clientTop: number;
55
56
  readonly clientWidth: number;
@@ -166,6 +167,9 @@ declare const ConfigHostElement_base: abstract new (...args: any[]) => {
166
167
  ariaAutoComplete: string;
167
168
  ariaBusy: string;
168
169
  ariaChecked: string;
170
+ /**
171
+ * @internal
172
+ */
169
173
  ariaColCount: string;
170
174
  ariaColIndex: string;
171
175
  ariaColIndexText: string;
@@ -352,16 +356,6 @@ export declare class ConfigHostElement extends ConfigHostElement_base implements
352
356
  export declare class BaseRoute extends ConfigHostElement {
353
357
  store: AuthStore;
354
358
  routing: AuthRouting;
355
- user: User;
356
- credentialManager: CredentialManager;
357
- /**
358
- * TODO: Replace with machine
359
- */
360
- message: string;
361
- hasErrors: boolean;
362
- connectedCallback(): void;
363
- setError(message: string): void;
364
- clearError(): void;
365
359
  onBack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