@genesislcap/foundation-auth 14.319.0 → 14.320.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.
- package/dist/dts/credential/types.d.ts +2 -2
- package/dist/dts/credential/types.d.ts.map +1 -1
- package/dist/dts/entity/loginNack.d.ts +1 -0
- package/dist/dts/entity/loginNack.d.ts.map +1 -1
- package/dist/dts/machine/machine.d.ts +4 -0
- package/dist/dts/machine/machine.d.ts.map +1 -1
- package/dist/dts/machine/types.d.ts +20 -0
- package/dist/dts/machine/types.d.ts.map +1 -1
- package/dist/dts/main/main.d.ts +1 -1
- package/dist/dts/mapper/loginMapper.d.ts.map +1 -1
- package/dist/dts/routes/base.d.ts +1 -1
- package/dist/dts/routes/config.d.ts.map +1 -1
- package/dist/dts/routes/terms-conditions/terms-conditions.d.ts +23 -0
- package/dist/dts/routes/terms-conditions/terms-conditions.d.ts.map +1 -0
- package/dist/dts/routes/terms-conditions/terms-conditions.template.d.ts +7 -0
- package/dist/dts/routes/terms-conditions/terms-conditions.template.d.ts.map +1 -0
- package/dist/dts/routes/types.d.ts +1 -0
- package/dist/dts/routes/types.d.ts.map +1 -1
- package/dist/dts/store/auth.d.ts +4 -1
- package/dist/dts/store/auth.d.ts.map +1 -1
- package/dist/esm/machine/machine.js +54 -1
- package/dist/esm/mapper/loginMapper.js +1 -1
- package/dist/esm/routes/config.js +10 -0
- package/dist/esm/routes/request-account/request-account.template.js +1 -1
- package/dist/esm/routes/terms-conditions/terms-conditions.js +171 -0
- package/dist/esm/routes/terms-conditions/terms-conditions.template.js +52 -0
- package/dist/esm/routes/types.js +1 -0
- package/dist/esm/store/auth.js +5 -0
- package/dist/esm/translation.json +3 -1
- package/dist/foundation-auth.api.json +133 -5
- package/dist/foundation-auth.d.ts +34 -3
- package/docs/api/foundation-auth.accepttermsparams.md +17 -0
- package/docs/api/foundation-auth.autheventmap.md +2 -1
- package/docs/api/foundation-auth.authmachineevent.md +4 -1
- package/docs/api/foundation-auth.authroutes.md +1 -0
- package/docs/api/foundation-auth.defaultauthmachine.md +1 -1
- package/docs/api/foundation-auth.defaultauthmachine.onidleevents.md +4 -0
- package/docs/api/foundation-auth.defaultauthstore.md +18 -0
- package/docs/api/foundation-auth.defaultauthstore.ontermsagreed.md +12 -0
- package/docs/api/foundation-auth.loginnack.md +19 -0
- package/docs/api/foundation-auth.loginnack.requirestermsandconditions.md +11 -0
- package/docs/api/foundation-auth.md +20 -0
- package/docs/api/foundation-auth.refreshcredentials.md +2 -2
- package/docs/api/foundation-auth.termsconditionsparams.md +16 -0
- package/docs/api-report.md.api.md +32 -2
- package/package.json +19 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/credential/types.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,6BAA6B,CAAC;CACvC;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,+EAAgD,CAAC;AAErF;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,sBAAsB,GAAG;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,GAAG,EAAE,CAAC;AAEjE;;;GAGG;AACH,oBAAY,cAAc;IACxB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,GAAG,QAAQ;CACZ;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC;IAC5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
1
|
+
{"version":3,"file":"loginNack.d.ts","sourceRoot":"","sources":["../../../src/entity/loginNack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,IAAI;IACrC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,0BAA0B,EAAE,MAAM,CAAC;IAC5C,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;IAC1C,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC;CAC9C"}
|
|
@@ -39,6 +39,10 @@ export declare class DefaultAuthMachine extends AbstractMachine<AuthMachineConte
|
|
|
39
39
|
actions: string[];
|
|
40
40
|
target: string;
|
|
41
41
|
};
|
|
42
|
+
"terms-and-conditions": {
|
|
43
|
+
actions: string[];
|
|
44
|
+
target: string;
|
|
45
|
+
};
|
|
42
46
|
"forgot-password": {
|
|
43
47
|
actions: string[];
|
|
44
48
|
target: string;
|
|
@@ -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,EACR,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;
|
|
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,EACR,MAAM,uCAAuC,C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C,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,GAAG,iBAAiB;IAgB3E,SAAS,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;MAwBpB;IAEF,SAAS,CAAC,aAAa;;;MAGpB;CACJ;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,mEAA0E,CAAC;AAEnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAE5C"}
|
|
@@ -33,6 +33,23 @@ export type ResetPasswordParams = {
|
|
|
33
33
|
newPassword: string;
|
|
34
34
|
requester?: string;
|
|
35
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export type TermsConditionsParams = {
|
|
40
|
+
username: string;
|
|
41
|
+
termsAgreed: boolean;
|
|
42
|
+
version: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
export type AcceptTermsParams = {
|
|
48
|
+
username?: string;
|
|
49
|
+
orgUsername?: string;
|
|
50
|
+
termsAgreed?: boolean;
|
|
51
|
+
version?: string;
|
|
52
|
+
};
|
|
36
53
|
/**
|
|
37
54
|
* @public
|
|
38
55
|
*/
|
|
@@ -89,6 +106,9 @@ export type AuthMachineEvent = {
|
|
|
89
106
|
} | {
|
|
90
107
|
type: 'reset-password';
|
|
91
108
|
params: ResetPasswordParams;
|
|
109
|
+
} | {
|
|
110
|
+
type: 'terms-and-conditions';
|
|
111
|
+
params: TermsConditionsParams;
|
|
92
112
|
} | DoneInvokeEvent<unknown> | ErrorEvent<unknown>;
|
|
93
113
|
/**
|
|
94
114
|
* AuthMachineEventMap type.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/machine/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E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AE,sBAAsB,GAAG,MAAM,IAAI,WAAW,CAGnF;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,sBAAsB,GAC7B,MAAM,IAAI,oBAAoB,CAGhC;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,sBAAsB,GAC7B,MAAM,IAAI,oBAAoB,CAGhC;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,sBAAsB,GAC7B,MAAM,IAAI,mBAAmB,CAG/B;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,IAAI,WAAW,CAGnF"}
|
package/dist/dts/main/main.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { AuthEventMap, AuthFormEntryEventMap, AuthStore } from '../store';
|
|
|
8
8
|
*/
|
|
9
9
|
type EventMap = AuthEventMap & Pick<AuthFormEntryEventMap, 'auth-autofill-form'> & {};
|
|
10
10
|
declare const FoundationAuth_base: abstract new (...args: any[]) => {
|
|
11
|
-
$emit<K extends "auth-autofill-form" | "store-connected" | "store-disconnected" | "store-ready" | "auth-machine-event" | "auth-store-connected" | "auth-store-disconnected" | "auth-store-ready" | "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;
|
|
11
|
+
$emit<K extends "auth-autofill-form" | "store-connected" | "store-disconnected" | "store-ready" | "auth-machine-event" | "auth-store-connected" | "auth-store-disconnected" | "auth-store-ready" | "auth-login" | "auth-logout" | "auth-change-password" | "auth-forgot-password" | "auth-reset-password" | "auth-terms-conditions">(...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;
|
|
12
12
|
accessKey: string;
|
|
13
13
|
readonly accessKeyLabel: string;
|
|
14
14
|
autocapitalize: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loginMapper.d.ts","sourceRoot":"","sources":["../../../src/mapper/loginMapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,OAAO,EAAgB,MAAM,QAAQ,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC9F,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAI3F,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGjC;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAChB,gBAAgB,GAChB,oBAAoB,GACpB,qBAAqB,GACrB,uBAAuB,GACvB,OAAO,CAAC;AAEZ;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,eAAe,GAAG,SAAS,CAAC;AAE/E;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,GAAG,GAAG,IAAI,oBAAoB,CAExE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,QAAQ,GAAG,GAAG,IAAI,uBAAuB,CAElF;AAED;;;;GAIG;AACH,wBAAgB,cAAc,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EAAE,KAAG,aAAa,EAAE,CAM3D;CACV;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,mEAA0E,CAAC"}
|
|
@@ -24,7 +24,7 @@ export type ConfigHost = {
|
|
|
24
24
|
config: AuthConfig;
|
|
25
25
|
};
|
|
26
26
|
declare const ConfigHostElement_base: abstract new (...args: any[]) => {
|
|
27
|
-
$emit<K extends "auth-autofill-form" | "auth-organisation-changed" | "auth-username-changed" | "auth-email-changed" | "auth-password-changed" | "auth-password2-changed" | "auth-showPassword-changed" | "auth-selectedIdp-changed" | "auth-ssoToggled-changed" | "store-connected" | "store-disconnected" | "store-ready" | "auth-machine-event" | "auth-store-connected" | "auth-store-disconnected" | "auth-store-ready" | "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;
|
|
27
|
+
$emit<K extends "auth-autofill-form" | "auth-organisation-changed" | "auth-username-changed" | "auth-email-changed" | "auth-password-changed" | "auth-password2-changed" | "auth-showPassword-changed" | "auth-selectedIdp-changed" | "auth-ssoToggled-changed" | "store-connected" | "store-disconnected" | "store-ready" | "auth-machine-event" | "auth-store-connected" | "auth-store-disconnected" | "auth-store-ready" | "auth-login" | "auth-logout" | "auth-change-password" | "auth-forgot-password" | "auth-reset-password" | "auth-terms-conditions">(...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;
|
|
28
28
|
accessKey: string;
|
|
29
29
|
readonly accessKeyLabel: string;
|
|
30
30
|
autocapitalize: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/routes/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAA2B,mBAAmB,EAAS,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAS9C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/routes/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAA2B,mBAAmB,EAAS,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAS9C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,mBAAmB,CAAC,QAAQ,CAAC;IAEzD,OAAO,CAAC,IAAI;IACP,OAAO,CAAC,SAAS;IAChB,OAAO,CAAC,UAAU;IACjB,OAAO,CAAC,WAAW;gBAHlB,IAAI,EAAE,IAAI,EACL,SAAS,EAAE,SAAS,EACnB,UAAU,EAAE,UAAU,EACrB,WAAW,EAAE,WAAW;IAK/C,SAAS;IA0IT,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC;CAGxC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseRoute } from '../base';
|
|
2
|
+
/**
|
|
3
|
+
* TermsConditions
|
|
4
|
+
*
|
|
5
|
+
* @fires auth-terms-conditions - Fires a custom 'auth-terms-conditions' event.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare class TermsConditions extends BaseRoute {
|
|
10
|
+
termsAgreed: boolean;
|
|
11
|
+
termsText: string;
|
|
12
|
+
termsVersion: string;
|
|
13
|
+
isPdfData: boolean;
|
|
14
|
+
pdfDataUrl: string;
|
|
15
|
+
private http;
|
|
16
|
+
connectedCallback(): Promise<void>;
|
|
17
|
+
private isBase64Pdf;
|
|
18
|
+
private createPdfDataUrl;
|
|
19
|
+
loadTermsAndConditions(): Promise<void>;
|
|
20
|
+
onSubmit(): Promise<void>;
|
|
21
|
+
get headingText(): string;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=terms-conditions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terms-conditions.d.ts","sourceRoot":"","sources":["../../../../src/routes/terms-conditions/terms-conditions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC;;;;;;GAMG;AACH,qBAwCa,eAAgB,SAAQ,SAAS;IAChC,WAAW,EAAE,OAAO,CAAS;IAC7B,SAAS,EAAE,MAAM,CAAqC;IACtD,YAAY,EAAE,MAAM,CAAM;IAC1B,SAAS,EAAE,OAAO,CAAS;IAC3B,UAAU,EAAE,MAAM,CAAM;IAC9B,OAAO,CAAC,IAAI,CAAO;IAEnB,iBAAiB;IAKvB,OAAO,CAAC,WAAW;IAmBnB,OAAO,CAAC,gBAAgB;IAWlB,sBAAsB;IA8BtB,QAAQ;IASd,IACI,WAAW,WAEd;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TermsConditions } from './terms-conditions';
|
|
2
|
+
/**
|
|
3
|
+
* TermsConditionsTemplate
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare const TermsConditionsTemplate: import("@microsoft/fast-element").ViewTemplate<TermsConditions, any>;
|
|
7
|
+
//# sourceMappingURL=terms-conditions.template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terms-conditions.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/terms-conditions/terms-conditions.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,uBAAuB,sEA6CnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/routes/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/routes/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;CAUb,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC"}
|
package/dist/dts/store/auth.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { CustomEventMap } from '@genesislcap/foundation-events';
|
|
|
2
2
|
import { AbstractStoreRoot, StoreRoot, StoreRootEventDetailMap } from '@genesislcap/foundation-store';
|
|
3
3
|
import { AuthConfig } from '../config/config';
|
|
4
4
|
import { AuthMachine } from '../machine/machine';
|
|
5
|
-
import type { AuthMachineEventMap, ChangePasswordParams, ForgotPasswordParams, LoginParams, ResetPasswordParams } from '../machine/types';
|
|
5
|
+
import type { AuthMachineEventMap, ChangePasswordParams, ForgotPasswordParams, LoginParams, ResetPasswordParams, TermsConditionsParams } from '../machine/types';
|
|
6
6
|
import { AuthFormEntryStore } from './authFormEntry';
|
|
7
7
|
/**
|
|
8
8
|
* @public
|
|
@@ -16,6 +16,7 @@ export type AuthEventMap = StoreRootEventDetailMap & AuthMachineEventMap & {
|
|
|
16
16
|
'auth-change-password': ChangePasswordParams;
|
|
17
17
|
'auth-forgot-password': ForgotPasswordParams;
|
|
18
18
|
'auth-reset-password': ResetPasswordParams;
|
|
19
|
+
'auth-terms-conditions': TermsConditionsParams;
|
|
19
20
|
};
|
|
20
21
|
declare global {
|
|
21
22
|
interface HTMLElementEventMap extends CustomEventMap<AuthEventMap> {
|
|
@@ -70,6 +71,8 @@ export declare class DefaultAuthStore extends AbstractStoreRoot<AuthStore, AuthE
|
|
|
70
71
|
onForgotPassword: EventListener;
|
|
71
72
|
/** {@inheritDoc AuthStore.onResetPassword} */
|
|
72
73
|
onResetPassword: EventListener;
|
|
74
|
+
/** {@inheritDoc AuthStore.onTermsAgreed} */
|
|
75
|
+
onTermsAgreed: EventListener;
|
|
73
76
|
onConnected: EventListener;
|
|
74
77
|
onDisconnected: EventListener;
|
|
75
78
|
onReady: EventListener;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/store/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EACL,iBAAiB,EAEjB,SAAS,EACT,uBAAuB,EACxB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,EACX,mBAAmB,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["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IAAI,aAAa,aAShB;CACF;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,iEAA0D,CAAC;AAEjF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,IAAI,SAAS,CAExC"}
|
|
@@ -2,7 +2,7 @@ import { __awaiter, __decorate, __param } from "tslib";
|
|
|
2
2
|
import { AbstractMachine, createErrorStateNode, FetchMachine, isDoneInvokeEvent, isErrorEvent, isEventWithParams, isUnauthorizedError, } from '@genesislcap/foundation-state-machine';
|
|
3
3
|
import { User } from '@genesislcap/foundation-user';
|
|
4
4
|
import { UUID } from '@genesislcap/foundation-utils';
|
|
5
|
-
import { LOGIN_DETAILS_URL, LOGIN_URL, LOGOUT_URL, FORGOT_PASSWORD_URL, CHANGE_PASSWORD_URL, RESET_PASSWORD_URL, } from '@genesislcap/foundation-utils';
|
|
5
|
+
import { LOGIN_DETAILS_URL, LOGIN_URL, ACCEPT_TERMS_URL, LOGOUT_URL, FORGOT_PASSWORD_URL, CHANGE_PASSWORD_URL, RESET_PASSWORD_URL, } from '@genesislcap/foundation-utils';
|
|
6
6
|
import { DI } from '@microsoft/fast-foundation';
|
|
7
7
|
import { and, assign, createMachine, fromPromise, not, or, raise, sendTo } from 'xstate';
|
|
8
8
|
import { AuthConfig } from '../config/config';
|
|
@@ -34,6 +34,10 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
34
34
|
actions,
|
|
35
35
|
target: '#authMachine.loggingIn',
|
|
36
36
|
},
|
|
37
|
+
['terms-and-conditions']: {
|
|
38
|
+
actions,
|
|
39
|
+
target: '#authMachine.acceptTerms',
|
|
40
|
+
},
|
|
37
41
|
['forgot-password']: {
|
|
38
42
|
actions,
|
|
39
43
|
target: '#authMachine.forgotPassword',
|
|
@@ -291,6 +295,35 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
291
295
|
}),
|
|
292
296
|
],
|
|
293
297
|
},
|
|
298
|
+
/**
|
|
299
|
+
* Accept Terms & Conditions
|
|
300
|
+
*/
|
|
301
|
+
acceptTerms: {
|
|
302
|
+
tags: ['acceptTerms', 'pending'],
|
|
303
|
+
meta: {
|
|
304
|
+
content: 'Accepting terms, please wait.',
|
|
305
|
+
},
|
|
306
|
+
invoke: {
|
|
307
|
+
id: 'acceptTermsFetcher',
|
|
308
|
+
src: fetchMachine.machine,
|
|
309
|
+
onDone: {
|
|
310
|
+
actions: ['refreshLogin'],
|
|
311
|
+
target: '#authMachine.idle',
|
|
312
|
+
},
|
|
313
|
+
onError: '#authMachine.idle',
|
|
314
|
+
},
|
|
315
|
+
entry: [
|
|
316
|
+
sendTo('acceptTermsFetcher', ({ context }) => {
|
|
317
|
+
const params = context.params;
|
|
318
|
+
const userName = ((params === null || params === void 0 ? void 0 : params.orgUsername) || (params === null || params === void 0 ? void 0 : params.username) || '');
|
|
319
|
+
const message = {
|
|
320
|
+
USER_NAME: userName,
|
|
321
|
+
VERSION: params === null || params === void 0 ? void 0 : params.version,
|
|
322
|
+
};
|
|
323
|
+
return this.createFetchMachineEvent(ACCEPT_TERMS_URL, message);
|
|
324
|
+
}),
|
|
325
|
+
],
|
|
326
|
+
},
|
|
294
327
|
/**
|
|
295
328
|
* Map the server responses to entities
|
|
296
329
|
*/
|
|
@@ -347,6 +380,11 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
347
380
|
actions: 'storeBasicCredentials',
|
|
348
381
|
target: '#authMachine.feedback.passwordExpired',
|
|
349
382
|
},
|
|
383
|
+
{
|
|
384
|
+
guard: and(['isLoginNackEntity', 'requiresTermsAndConditions']),
|
|
385
|
+
actions: 'storeBasicCredentials',
|
|
386
|
+
target: '#authMachine.feedback.termsAndConditions',
|
|
387
|
+
},
|
|
350
388
|
{
|
|
351
389
|
guard: 'isLoginNackEntity',
|
|
352
390
|
target: '#authMachine.error.login',
|
|
@@ -450,6 +488,16 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
450
488
|
},
|
|
451
489
|
},
|
|
452
490
|
},
|
|
491
|
+
termsAndConditions: {
|
|
492
|
+
tags: ['feedback', 'termsAndConditions'],
|
|
493
|
+
meta: {
|
|
494
|
+
content: 'MESSAGE_T&Cs_REQUIRED',
|
|
495
|
+
},
|
|
496
|
+
always: {
|
|
497
|
+
actions: 'termsAndConditionsRedirect',
|
|
498
|
+
target: '#authMachine.idle',
|
|
499
|
+
},
|
|
500
|
+
},
|
|
453
501
|
},
|
|
454
502
|
},
|
|
455
503
|
/**
|
|
@@ -550,6 +598,8 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
550
598
|
postLoginRedirect: this.config.postLoginRedirect,
|
|
551
599
|
postLogoutRedirect: this.config.postLogoutRedirect,
|
|
552
600
|
resetPasswordRedirect: () => this.routing.navigateTo('reset-password?expired'),
|
|
601
|
+
termsAndConditionsRedirect: () => this.routing.navigateTo('terms-and-conditions'),
|
|
602
|
+
refreshLogin: () => this.send({ type: 'login', params: { type: CredentialType.REFRESH } }),
|
|
553
603
|
loggedInCallback: () => logger.debug('AuthMachine.loggedInCallback invoked.'),
|
|
554
604
|
loggedOutCallback: () => logger.debug('AuthMachine.loggedOutCallback invoked.'),
|
|
555
605
|
errorCallback: () => logger.debug('AuthMachine.errorCallback invoked.'),
|
|
@@ -576,6 +626,9 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
576
626
|
hasPasswordExpired: ({ event }) => isDoneInvokeEvent(event)
|
|
577
627
|
? isLoginNackEntity(event.output) && event.output.hasPasswordExpired
|
|
578
628
|
: false,
|
|
629
|
+
requiresTermsAndConditions: ({ event }) => isDoneInvokeEvent(event)
|
|
630
|
+
? isLoginNackEntity(event.output) && event.output.requiresTermsAndConditions
|
|
631
|
+
: false,
|
|
579
632
|
isLogoutAckEntity: ({ event }) => isDoneInvokeEvent(event) ? isLogoutAckEntity(event.output) : false,
|
|
580
633
|
isLogoutNackEntity: ({ event }) => isDoneInvokeEvent(event) ? isLogoutNackEntity(event.output) : false,
|
|
581
634
|
/**
|
|
@@ -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, 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') });
|
|
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'), requiresTermsAndConditions: hasDTOErrorWarningCode(dto, 'TERMS_ACCEPTANCE_REQUIRED') });
|
|
86
86
|
return nack;
|
|
87
87
|
}
|
|
88
88
|
throw new Error(`No Entity mapping implementation for '${dto === null || dto === void 0 ? void 0 : dto.MESSAGE_TYPE}' DTO`);
|
|
@@ -12,6 +12,7 @@ import { NotFound } from './not-found/not-found';
|
|
|
12
12
|
import { RequestAccount } from './request-account/request-account';
|
|
13
13
|
import { ResetPassword } from './reset-password/reset-password';
|
|
14
14
|
import { AuthRouting } from './routing';
|
|
15
|
+
import { TermsConditions } from './terms-conditions/terms-conditions';
|
|
15
16
|
import { Verify } from './verify/verify';
|
|
16
17
|
/**
|
|
17
18
|
* Base implementation of a routing used with the Auth class
|
|
@@ -90,6 +91,15 @@ let AuthRouterConfig = class AuthRouterConfig extends RouterConfiguration {
|
|
|
90
91
|
settings: { public: true },
|
|
91
92
|
});
|
|
92
93
|
}
|
|
94
|
+
if (!omitRoutes.includes('terms-and-conditions')) {
|
|
95
|
+
routes.push({
|
|
96
|
+
path: getRoutePath('terms-and-conditions'),
|
|
97
|
+
name: 'terms-and-conditions',
|
|
98
|
+
element: TermsConditions,
|
|
99
|
+
title: 'Terms and Conditions',
|
|
100
|
+
settings: { public: true },
|
|
101
|
+
});
|
|
102
|
+
}
|
|
93
103
|
if (!omitRoutes.includes('protected')) {
|
|
94
104
|
routes.push({
|
|
95
105
|
path: getRoutePath('protected'),
|
|
@@ -21,7 +21,7 @@ export const RequestAccountTemplate = html `
|
|
|
21
21
|
name="terms"
|
|
22
22
|
:value=${sync((x) => x.termsAgreed, 'boolean')}
|
|
23
23
|
data-test-id="terms"
|
|
24
|
-
:innerHTML="${(x) => x.toLocalisedText('
|
|
24
|
+
:innerHTML="${(x) => x.toLocalisedText('TERMS_AND_CONDITIONS_HTML')}"
|
|
25
25
|
></rapid-checkbox>
|
|
26
26
|
<div class="form-buttons">
|
|
27
27
|
${(x) => submitButton(x.toLocalisedText('REQUEST_ACCOUNT_SUBMIT_BUTTON'))}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { __awaiter, __decorate } from "tslib";
|
|
2
|
+
import { Http } from '@genesislcap/foundation-comms';
|
|
3
|
+
import { css, customElement, observable, volatile } from '@microsoft/fast-element';
|
|
4
|
+
import { commonStyles } from '../../styles';
|
|
5
|
+
import { logger } from '../../utils';
|
|
6
|
+
import { BaseRoute } from '../base';
|
|
7
|
+
import { TermsConditionsTemplate as template } from './terms-conditions.template';
|
|
8
|
+
/**
|
|
9
|
+
* TermsConditions
|
|
10
|
+
*
|
|
11
|
+
* @fires auth-terms-conditions - Fires a custom 'auth-terms-conditions' event.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
let TermsConditions = class TermsConditions extends BaseRoute {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.termsAgreed = false;
|
|
19
|
+
this.termsText = 'Loading terms and conditions...';
|
|
20
|
+
this.termsVersion = '';
|
|
21
|
+
this.isPdfData = false;
|
|
22
|
+
this.pdfDataUrl = '';
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
const _super = Object.create(null, {
|
|
26
|
+
connectedCallback: { get: () => super.connectedCallback }
|
|
27
|
+
});
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
_super.connectedCallback.call(this);
|
|
30
|
+
yield this.loadTermsAndConditions();
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
isBase64Pdf(content) {
|
|
34
|
+
// Check if content looks like base64 encoded PDF data
|
|
35
|
+
// PDF files start with specific base64 patterns
|
|
36
|
+
if (!content || typeof content !== 'string')
|
|
37
|
+
return false;
|
|
38
|
+
// Remove any whitespace and check if it's base64
|
|
39
|
+
const cleanContent = content.trim();
|
|
40
|
+
if (cleanContent.length < 100)
|
|
41
|
+
return false; // Too short to be a meaningful PDF
|
|
42
|
+
// Check if it's valid base64
|
|
43
|
+
try {
|
|
44
|
+
const decoded = atob(cleanContent);
|
|
45
|
+
// Check if decoded content starts with PDF signature (%PDF)
|
|
46
|
+
return decoded.startsWith('%PDF');
|
|
47
|
+
}
|
|
48
|
+
catch (_a) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
createPdfDataUrl(base64Content) {
|
|
53
|
+
try {
|
|
54
|
+
// Request hiding built-in controls where supported
|
|
55
|
+
const params = '#toolbar=0&navpanes=0&scrollbar=0';
|
|
56
|
+
return `data:application/pdf;base64,${base64Content}${params}`;
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
logger.error('Failed to create PDF data URL:', error);
|
|
60
|
+
return '';
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
loadTermsAndConditions() {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
try {
|
|
66
|
+
const url = `gwf/auth/terms-and-conditions`;
|
|
67
|
+
const userName = this.store.formEntry.orgUsername || this.store.formEntry.username;
|
|
68
|
+
const data = (yield this.http
|
|
69
|
+
.get(url, { headers: { Accept: 'application/json', ['USER_NAME']: userName } })
|
|
70
|
+
.catch(() => ({})));
|
|
71
|
+
const record = Array.isArray(data) ? data[0] : data;
|
|
72
|
+
const content = (record === null || record === void 0 ? void 0 : record.CONTENT) || '';
|
|
73
|
+
// Check if content is base64 encoded PDF data
|
|
74
|
+
if (this.isBase64Pdf(content)) {
|
|
75
|
+
this.isPdfData = true;
|
|
76
|
+
this.pdfDataUrl = this.createPdfDataUrl(content);
|
|
77
|
+
this.termsText = 'PDF Terms and Conditions loaded';
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
this.isPdfData = false;
|
|
81
|
+
this.pdfDataUrl = '';
|
|
82
|
+
this.termsText = content || 'No terms and conditions available';
|
|
83
|
+
}
|
|
84
|
+
this.termsVersion = (record === null || record === void 0 ? void 0 : record.VERSION) || '';
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
logger.error('Failed to load terms and conditions:', error);
|
|
88
|
+
this.termsText = 'Failed to load terms and conditions. Please try again.';
|
|
89
|
+
this.isPdfData = false;
|
|
90
|
+
this.pdfDataUrl = '';
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
onSubmit() {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
logger.debug('TermsConditions onSubmit - termsAgreed:', this.termsAgreed);
|
|
97
|
+
this.$emit('auth-terms-conditions', {
|
|
98
|
+
username: this.store.formEntry.orgUsername,
|
|
99
|
+
termsAgreed: this.termsAgreed,
|
|
100
|
+
version: this.termsVersion,
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
get headingText() {
|
|
105
|
+
return 'You are required to accept the Terms & Conditions before proceeding to the application';
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
__decorate([
|
|
109
|
+
observable
|
|
110
|
+
], TermsConditions.prototype, "termsAgreed", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
observable
|
|
113
|
+
], TermsConditions.prototype, "termsText", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
observable
|
|
116
|
+
], TermsConditions.prototype, "termsVersion", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
observable
|
|
119
|
+
], TermsConditions.prototype, "isPdfData", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
observable
|
|
122
|
+
], TermsConditions.prototype, "pdfDataUrl", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
Http
|
|
125
|
+
], TermsConditions.prototype, "http", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
volatile
|
|
128
|
+
], TermsConditions.prototype, "headingText", null);
|
|
129
|
+
TermsConditions = __decorate([
|
|
130
|
+
customElement({
|
|
131
|
+
name: 'foundation-auth-terms-conditions',
|
|
132
|
+
template,
|
|
133
|
+
styles: css `
|
|
134
|
+
${commonStyles}
|
|
135
|
+
.container {
|
|
136
|
+
min-width: 50%;
|
|
137
|
+
max-width: 50%;
|
|
138
|
+
width: 50%;
|
|
139
|
+
}
|
|
140
|
+
.card-pd {
|
|
141
|
+
display: flex;
|
|
142
|
+
flex-direction: column;
|
|
143
|
+
justify-content: space-between;
|
|
144
|
+
min-height: 90vh;
|
|
145
|
+
max-height: 90vh;
|
|
146
|
+
min-width: 75vw;
|
|
147
|
+
max-width: 75vw;
|
|
148
|
+
}
|
|
149
|
+
.column-content {
|
|
150
|
+
height: 100%;
|
|
151
|
+
}
|
|
152
|
+
.terms-content {
|
|
153
|
+
margin: 10px;
|
|
154
|
+
padding: 10px;
|
|
155
|
+
border: 1px solid white;
|
|
156
|
+
height: 100%;
|
|
157
|
+
width: 100%;
|
|
158
|
+
}
|
|
159
|
+
.text-content {
|
|
160
|
+
white-space: pre-wrap;
|
|
161
|
+
word-wrap: break-word;
|
|
162
|
+
}
|
|
163
|
+
auth-logo {
|
|
164
|
+
width: 100%;
|
|
165
|
+
display: flex;
|
|
166
|
+
justify-content: center;
|
|
167
|
+
}
|
|
168
|
+
`,
|
|
169
|
+
})
|
|
170
|
+
], TermsConditions);
|
|
171
|
+
export { TermsConditions };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { targetChecked } from '@genesislcap/foundation-events';
|
|
2
|
+
import { html } from '@microsoft/fast-element';
|
|
3
|
+
import { backButton, submitButton } from '../base';
|
|
4
|
+
/**
|
|
5
|
+
* TermsConditionsTemplate
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export const TermsConditionsTemplate = html `
|
|
9
|
+
<auth-background>
|
|
10
|
+
<div class="container">
|
|
11
|
+
<rapid-card class="card-pd">
|
|
12
|
+
<div class="column-content">
|
|
13
|
+
<auth-logo></auth-logo>
|
|
14
|
+
<div class="heading2" data-test-id="heading">${(x) => x.headingText}</div>
|
|
15
|
+
<div class="terms-content" data-test-id="termsContent">
|
|
16
|
+
${(x) => x.isPdfData
|
|
17
|
+
? html `
|
|
18
|
+
<iframe
|
|
19
|
+
:src=${(y) => y.pdfDataUrl}
|
|
20
|
+
width="100%"
|
|
21
|
+
height="100%"
|
|
22
|
+
frameborder="0"
|
|
23
|
+
data-test-id="pdfViewer"
|
|
24
|
+
></iframe>
|
|
25
|
+
`
|
|
26
|
+
: html `
|
|
27
|
+
<div class="text-content">${(y) => y.termsText}</div>
|
|
28
|
+
`}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
<form @submit=${(x) => x.onSubmit()} autocomplete="on" data-test-id="form">
|
|
32
|
+
<rapid-checkbox
|
|
33
|
+
name="terms"
|
|
34
|
+
:checked=${(x) => x.termsAgreed}
|
|
35
|
+
@change=${(x, c) => {
|
|
36
|
+
const checked = targetChecked(c);
|
|
37
|
+
x.termsAgreed = checked;
|
|
38
|
+
}}
|
|
39
|
+
data-test-id="termsAndConditions"
|
|
40
|
+
:innerHTML="${(x) => x.toLocalisedText('TERMS_AND_CONDITIONS_HTML')}"
|
|
41
|
+
></rapid-checkbox>
|
|
42
|
+
<div class="form-buttons">
|
|
43
|
+
${(x) => submitButton(x.toLocalisedText('ACCEPT'), 'submit', !x.termsAgreed)}
|
|
44
|
+
${(x) => backButton(() => x.onBack(), x.toLocalisedText('DECLINE'))}
|
|
45
|
+
</div>
|
|
46
|
+
<submitting-indicator is-submitting="${(x) => x.store.isPending}"></submitting-indicator>
|
|
47
|
+
<auth-message></auth-message>
|
|
48
|
+
</form>
|
|
49
|
+
</rapid-card>
|
|
50
|
+
</div>
|
|
51
|
+
</auth-background>
|
|
52
|
+
`;
|
package/dist/esm/routes/types.js
CHANGED
package/dist/esm/store/auth.js
CHANGED
|
@@ -38,6 +38,11 @@ let DefaultAuthStore = class DefaultAuthStore extends AbstractStoreRoot {
|
|
|
38
38
|
type: 'reset-password',
|
|
39
39
|
params,
|
|
40
40
|
}));
|
|
41
|
+
/** {@inheritDoc AuthStore.onTermsAgreed} */
|
|
42
|
+
this.onTermsAgreed = this.createListener('auth-terms-conditions', (params) => this.authMachine.send({
|
|
43
|
+
type: 'terms-and-conditions',
|
|
44
|
+
params,
|
|
45
|
+
}));
|
|
41
46
|
this.onConnected = this.createListener('auth-store-connected', (element) => (this.commit.element = element));
|
|
42
47
|
this.onDisconnected = this.createListener('auth-store-disconnected', () => (this.commit.element = undefined));
|
|
43
48
|
this.onReady = this.createListener('auth-store-ready', (ready) => (this.commit.ready = ready));
|