@keycloakify/angular 0.1.3 → 0.1.4
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/package.json +1 -1
- package/src/bin/initialize-account-theme/boilerplate/KcPageStory.ts +1 -1
- package/stories/account/pages/account.stories.ts +6 -6
- package/stories/account/pages/applications.stories.ts +6 -7
- package/stories/account/pages/federated-identity.stories.ts +3 -3
- package/stories/account/pages/log.stories.ts +6 -6
- package/stories/account/pages/password.stories.ts +37 -45
- package/stories/account/pages/sessions.stories.ts +6 -6
- package/stories/account/pages/totp.stories.ts +2 -2
- package/stories/login/pages/code.stories.ts +3 -3
- package/stories/login/pages/delete-account-confirm.stories.ts +3 -3
- package/stories/login/pages/delete-credential.stories.ts +4 -4
- package/stories/login/pages/error.stories.ts +4 -4
- package/stories/login/pages/frontchannel-logout.stories.ts +1 -1
- package/stories/login/pages/idp-review-user-profile.stories.ts +3 -3
- package/stories/login/pages/info.stories.ts +7 -7
- package/stories/login/pages/login-config-totp.stories.ts +4 -4
- package/stories/login/pages/login-idp-link-confirm.stories.ts +4 -4
- package/stories/login/pages/login-idp-link-email.stories.ts +4 -4
- package/stories/login/pages/login-oauth-grant.stories.ts +3 -3
- package/stories/login/pages/login-otp.stories.ts +4 -4
- package/stories/login/pages/login-page-expired.stories.ts +1 -1
- package/stories/login/pages/login-password.stories.ts +2 -2
- package/stories/login/pages/login-recovery-authn-code-config.stories.ts +1 -1
- package/stories/login/pages/login-reset-otp.stories.ts +3 -3
- package/stories/login/pages/login-reset-password.stories.ts +2 -2
- package/stories/login/pages/login-update-password.stories.ts +2 -2
- package/stories/login/pages/login-update-profile.stories.ts +1 -1
- package/stories/login/pages/login-username.stories.ts +1 -1
- package/stories/login/pages/login-verify-email.stories.ts +4 -4
- package/stories/login/pages/login-x509-info.stories.ts +1 -1
- package/stories/login/pages/login.stories.ts +14 -14
- package/stories/login/pages/logout-confirm.stories.ts +1 -1
- package/stories/login/pages/register.stories.ts +13 -13
- package/stories/login/pages/select-authenticator.stories.ts +3 -3
- package/stories/login/pages/terms.stories.ts +4 -4
- package/stories/login/pages/update-email.stories.ts +1 -1
- package/stories/login/pages/webauthn-authenticate.stories.ts +4 -4
- package/stories/login/pages/webauthn-error.stories.ts +3 -3
- package/stories/login/pages/webauthn-register.stories.ts +2 -2
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@ export const decorators = (_: unknown, context: StoryContextLike) => ({
|
|
|
37
37
|
classes: {},
|
|
38
38
|
kcContext: getKcContextMock({
|
|
39
39
|
pageId: context.globals['pageId'],
|
|
40
|
-
overrides: context.globals['
|
|
40
|
+
overrides: context.globals['kcContext']
|
|
41
41
|
}),
|
|
42
42
|
getI18n: getI18n
|
|
43
43
|
})
|
|
@@ -18,7 +18,7 @@ export const Default: Story = {};
|
|
|
18
18
|
|
|
19
19
|
export const UsernameNotEditable: Story = {
|
|
20
20
|
globals: {
|
|
21
|
-
|
|
21
|
+
kcContext: {
|
|
22
22
|
account: {
|
|
23
23
|
username: 'john_doe',
|
|
24
24
|
email: 'john.doe@gmail.com',
|
|
@@ -45,7 +45,7 @@ export const UsernameNotEditable: Story = {
|
|
|
45
45
|
|
|
46
46
|
export const WithValidationErrors: Story = {
|
|
47
47
|
globals: {
|
|
48
|
-
|
|
48
|
+
kcContext: {
|
|
49
49
|
account: {
|
|
50
50
|
username: 'john_doe',
|
|
51
51
|
email: '',
|
|
@@ -73,7 +73,7 @@ export const WithValidationErrors: Story = {
|
|
|
73
73
|
|
|
74
74
|
export const EmailAsUsername: Story = {
|
|
75
75
|
globals: {
|
|
76
|
-
|
|
76
|
+
kcContext: {
|
|
77
77
|
account: {
|
|
78
78
|
email: 'john.doe@gmail.com',
|
|
79
79
|
firstName: 'John',
|
|
@@ -98,7 +98,7 @@ export const EmailAsUsername: Story = {
|
|
|
98
98
|
|
|
99
99
|
export const WithErrorCode: Story = {
|
|
100
100
|
globals: {
|
|
101
|
-
|
|
101
|
+
kcContext: {
|
|
102
102
|
code: {
|
|
103
103
|
success: false,
|
|
104
104
|
error: 'Failed to generate code'
|
|
@@ -109,7 +109,7 @@ export const WithErrorCode: Story = {
|
|
|
109
109
|
|
|
110
110
|
export const WithFrenchLanguage: Story = {
|
|
111
111
|
globals: {
|
|
112
|
-
|
|
112
|
+
kcContext: {
|
|
113
113
|
locale: {
|
|
114
114
|
currentLanguageTag: 'fr'
|
|
115
115
|
},
|
|
@@ -123,7 +123,7 @@ export const WithFrenchLanguage: Story = {
|
|
|
123
123
|
|
|
124
124
|
export const WithHtmlErrorMessage: Story = {
|
|
125
125
|
globals: {
|
|
126
|
-
|
|
126
|
+
kcContext: {
|
|
127
127
|
code: {
|
|
128
128
|
success: false,
|
|
129
129
|
error: "Something went wrong. <a href='https://example.com'>Try again</a>"
|
|
@@ -16,7 +16,7 @@ type Story = StoryObj<KcPageStory>;
|
|
|
16
16
|
|
|
17
17
|
export const Default: Story = {
|
|
18
18
|
globals: {
|
|
19
|
-
|
|
19
|
+
kcContext: {
|
|
20
20
|
applications: {
|
|
21
21
|
applications: [
|
|
22
22
|
{
|
|
@@ -72,7 +72,7 @@ export const Default: Story = {
|
|
|
72
72
|
|
|
73
73
|
export const NoAvailableRolesOrGrants: Story = {
|
|
74
74
|
globals: {
|
|
75
|
-
|
|
75
|
+
kcContext: {
|
|
76
76
|
applications: {
|
|
77
77
|
applications: [
|
|
78
78
|
{
|
|
@@ -95,7 +95,7 @@ export const NoAvailableRolesOrGrants: Story = {
|
|
|
95
95
|
|
|
96
96
|
export const ConsentNotRequired: Story = {
|
|
97
97
|
globals: {
|
|
98
|
-
|
|
98
|
+
kcContext: {
|
|
99
99
|
applications: {
|
|
100
100
|
applications: [
|
|
101
101
|
{
|
|
@@ -118,7 +118,7 @@ export const ConsentNotRequired: Story = {
|
|
|
118
118
|
|
|
119
119
|
export const NoRolesButConsentRequired: Story = {
|
|
120
120
|
globals: {
|
|
121
|
-
|
|
121
|
+
kcContext: {
|
|
122
122
|
applications: {
|
|
123
123
|
applications: [
|
|
124
124
|
{
|
|
@@ -141,7 +141,7 @@ export const NoRolesButConsentRequired: Story = {
|
|
|
141
141
|
|
|
142
142
|
export const OnlyResourceRolesAvailable: Story = {
|
|
143
143
|
globals: {
|
|
144
|
-
|
|
144
|
+
kcContext: {
|
|
145
145
|
applications: {
|
|
146
146
|
applications: [
|
|
147
147
|
{
|
|
@@ -173,8 +173,7 @@ export const OnlyResourceRolesAvailable: Story = {
|
|
|
173
173
|
|
|
174
174
|
export const NoAdditionalGrants: Story = {
|
|
175
175
|
globals: {
|
|
176
|
-
|
|
177
|
-
pageId: 'applications.ftl',
|
|
176
|
+
kcContext: {
|
|
178
177
|
applications: {
|
|
179
178
|
applications: [
|
|
180
179
|
{
|
|
@@ -18,7 +18,7 @@ export const Default: Story = {};
|
|
|
18
18
|
|
|
19
19
|
export const NotConnected: Story = {
|
|
20
20
|
globals: {
|
|
21
|
-
|
|
21
|
+
kcContext: {
|
|
22
22
|
federatedIdentity: {
|
|
23
23
|
identities: [
|
|
24
24
|
{
|
|
@@ -35,7 +35,7 @@ export const NotConnected: Story = {
|
|
|
35
35
|
|
|
36
36
|
export const RemoveLinkNotPossible: Story = {
|
|
37
37
|
globals: {
|
|
38
|
-
|
|
38
|
+
kcContext: {
|
|
39
39
|
federatedIdentity: {
|
|
40
40
|
identities: [
|
|
41
41
|
{
|
|
@@ -57,7 +57,7 @@ export const RemoveLinkNotPossible: Story = {
|
|
|
57
57
|
|
|
58
58
|
export const AddLinkForUnconnectedIdentity: Story = {
|
|
59
59
|
globals: {
|
|
60
|
-
|
|
60
|
+
kcContext: {
|
|
61
61
|
federatedIdentity: {
|
|
62
62
|
identities: [
|
|
63
63
|
{
|
|
@@ -16,7 +16,7 @@ type Story = StoryObj<KcPageStory>;
|
|
|
16
16
|
|
|
17
17
|
export const Default: Story = {
|
|
18
18
|
globals: {
|
|
19
|
-
|
|
19
|
+
kcContext: {
|
|
20
20
|
log: {
|
|
21
21
|
events: [
|
|
22
22
|
{
|
|
@@ -48,7 +48,7 @@ export const Default: Story = {
|
|
|
48
48
|
|
|
49
49
|
export const LogsMissingDetails: Story = {
|
|
50
50
|
globals: {
|
|
51
|
-
|
|
51
|
+
kcContext: {
|
|
52
52
|
log: {
|
|
53
53
|
events: [
|
|
54
54
|
{
|
|
@@ -66,7 +66,7 @@ export const LogsMissingDetails: Story = {
|
|
|
66
66
|
|
|
67
67
|
export const SingleLogEntry: Story = {
|
|
68
68
|
globals: {
|
|
69
|
-
|
|
69
|
+
kcContext: {
|
|
70
70
|
log: {
|
|
71
71
|
events: [
|
|
72
72
|
{
|
|
@@ -87,7 +87,7 @@ export const SingleLogEntry: Story = {
|
|
|
87
87
|
|
|
88
88
|
export const LogsWithLongDetails: Story = {
|
|
89
89
|
globals: {
|
|
90
|
-
|
|
90
|
+
kcContext: {
|
|
91
91
|
log: {
|
|
92
92
|
events: [
|
|
93
93
|
{
|
|
@@ -117,7 +117,7 @@ export const LogsWithLongDetails: Story = {
|
|
|
117
117
|
|
|
118
118
|
export const EmptyClientField: Story = {
|
|
119
119
|
globals: {
|
|
120
|
-
|
|
120
|
+
kcContext: {
|
|
121
121
|
log: {
|
|
122
122
|
events: [
|
|
123
123
|
{
|
|
@@ -138,7 +138,7 @@ export const EmptyClientField: Story = {
|
|
|
138
138
|
|
|
139
139
|
export const NoLogsAvailable: Story = {
|
|
140
140
|
globals: {
|
|
141
|
-
|
|
141
|
+
kcContext: {
|
|
142
142
|
log: {
|
|
143
143
|
events: [] // No log events
|
|
144
144
|
}
|
|
@@ -18,10 +18,8 @@ export const Default: Story = {};
|
|
|
18
18
|
|
|
19
19
|
export const WithMessage: Story = {
|
|
20
20
|
globals: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
message: { type: 'success', summary: 'This is a test message' }
|
|
24
|
-
}
|
|
21
|
+
kcContext: {
|
|
22
|
+
message: { type: 'success', summary: 'This is a test message' }
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
25
|
};
|
|
@@ -34,19 +32,17 @@ export const WithMessage: Story = {
|
|
|
34
32
|
*/
|
|
35
33
|
export const FirstTimePasswordSetup: Story = {
|
|
36
34
|
globals: {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
stateChecker: 'state-checker'
|
|
49
|
-
}
|
|
35
|
+
kcContext: {
|
|
36
|
+
account: {
|
|
37
|
+
username: 'john_doe'
|
|
38
|
+
},
|
|
39
|
+
password: {
|
|
40
|
+
passwordSet: false
|
|
41
|
+
},
|
|
42
|
+
url: {
|
|
43
|
+
passwordUrl: '/password'
|
|
44
|
+
},
|
|
45
|
+
stateChecker: 'state-checker'
|
|
50
46
|
}
|
|
51
47
|
}
|
|
52
48
|
};
|
|
@@ -59,20 +55,18 @@ export const FirstTimePasswordSetup: Story = {
|
|
|
59
55
|
*/
|
|
60
56
|
export const IncorrectCurrentPassword: Story = {
|
|
61
57
|
globals: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
stateChecker: 'state-checker'
|
|
75
|
-
}
|
|
58
|
+
kcContext: {
|
|
59
|
+
message: { type: 'error', summary: 'Incorrect current password.' },
|
|
60
|
+
account: {
|
|
61
|
+
username: 'john_doe'
|
|
62
|
+
},
|
|
63
|
+
password: {
|
|
64
|
+
passwordSet: true
|
|
65
|
+
},
|
|
66
|
+
url: {
|
|
67
|
+
passwordUrl: '/password'
|
|
68
|
+
},
|
|
69
|
+
stateChecker: 'state-checker'
|
|
76
70
|
}
|
|
77
71
|
}
|
|
78
72
|
};
|
|
@@ -85,20 +79,18 @@ export const IncorrectCurrentPassword: Story = {
|
|
|
85
79
|
*/
|
|
86
80
|
export const SubmissionSuccessWithRedirect: Story = {
|
|
87
81
|
globals: {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
stateChecker: 'state-checker'
|
|
101
|
-
}
|
|
82
|
+
kcContext: {
|
|
83
|
+
message: { type: 'success', summary: 'Password successfully changed.' },
|
|
84
|
+
account: {
|
|
85
|
+
username: 'john_doe'
|
|
86
|
+
},
|
|
87
|
+
password: {
|
|
88
|
+
passwordSet: true
|
|
89
|
+
},
|
|
90
|
+
url: {
|
|
91
|
+
passwordUrl: '/password'
|
|
92
|
+
},
|
|
93
|
+
stateChecker: 'state-checker'
|
|
102
94
|
}
|
|
103
95
|
}
|
|
104
96
|
};
|
|
@@ -16,7 +16,7 @@ type Story = StoryObj<KcPageStory>;
|
|
|
16
16
|
|
|
17
17
|
export const Default: Story = {
|
|
18
18
|
globals: {
|
|
19
|
-
|
|
19
|
+
kcContext: {
|
|
20
20
|
sessions: {
|
|
21
21
|
sessions: [
|
|
22
22
|
{
|
|
@@ -44,7 +44,7 @@ export const Default: Story = {
|
|
|
44
44
|
|
|
45
45
|
export const WithError: Story = {
|
|
46
46
|
globals: {
|
|
47
|
-
|
|
47
|
+
kcContext: {
|
|
48
48
|
url: { passwordUrl: '/auth/realms/keycloakify/account/password' },
|
|
49
49
|
stateChecker: 'xQ7EOgFrLi4EvnJ8dbXKhwFGWk_bkOp0X89mhilt1os',
|
|
50
50
|
message: {
|
|
@@ -61,7 +61,7 @@ export const WithError: Story = {
|
|
|
61
61
|
*/
|
|
62
62
|
export const NoActiveSessions: Story = {
|
|
63
63
|
globals: {
|
|
64
|
-
|
|
64
|
+
kcContext: {
|
|
65
65
|
sessions: {
|
|
66
66
|
sessions: []
|
|
67
67
|
},
|
|
@@ -76,7 +76,7 @@ export const NoActiveSessions: Story = {
|
|
|
76
76
|
*/
|
|
77
77
|
export const SingleSession: Story = {
|
|
78
78
|
globals: {
|
|
79
|
-
|
|
79
|
+
kcContext: {
|
|
80
80
|
sessions: {
|
|
81
81
|
sessions: [
|
|
82
82
|
{
|
|
@@ -100,7 +100,7 @@ export const SingleSession: Story = {
|
|
|
100
100
|
*/
|
|
101
101
|
export const MultipleClientsSession: Story = {
|
|
102
102
|
globals: {
|
|
103
|
-
|
|
103
|
+
kcContext: {
|
|
104
104
|
sessions: {
|
|
105
105
|
sessions: [
|
|
106
106
|
{
|
|
@@ -124,7 +124,7 @@ export const MultipleClientsSession: Story = {
|
|
|
124
124
|
*/
|
|
125
125
|
export const SessionWithoutClients: Story = {
|
|
126
126
|
globals: {
|
|
127
|
-
|
|
127
|
+
kcContext: {
|
|
128
128
|
sessions: {
|
|
129
129
|
sessions: [
|
|
130
130
|
{
|
|
@@ -16,7 +16,7 @@ type Story = StoryObj<KcPageStory>;
|
|
|
16
16
|
|
|
17
17
|
export const Default: Story = {
|
|
18
18
|
globals: {
|
|
19
|
-
|
|
19
|
+
kcContext: {
|
|
20
20
|
totp: {
|
|
21
21
|
enabled: false,
|
|
22
22
|
totpSecretEncoded: 'HE4W MSTC OBKU CY2M ONXF OV3Q NYYU I3SH',
|
|
@@ -51,7 +51,7 @@ export const Default: Story = {
|
|
|
51
51
|
|
|
52
52
|
export const WithTotpEnabled: Story = {
|
|
53
53
|
globals: {
|
|
54
|
-
|
|
54
|
+
kcContext: {
|
|
55
55
|
totp: {
|
|
56
56
|
enabled: true,
|
|
57
57
|
totpSecretEncoded: 'G55E MZKC JFUD MQLT MFIF EVSB JFLG M6SO',
|
|
@@ -17,7 +17,7 @@ export const Default: Story = {};
|
|
|
17
17
|
|
|
18
18
|
export const WithErrorCode: Story = {
|
|
19
19
|
globals: {
|
|
20
|
-
|
|
20
|
+
kcContext: {
|
|
21
21
|
code: {
|
|
22
22
|
success: false,
|
|
23
23
|
error: 'Failed to generate code'
|
|
@@ -27,7 +27,7 @@ export const WithErrorCode: Story = {
|
|
|
27
27
|
};
|
|
28
28
|
export const WithFrenchLanguage: Story = {
|
|
29
29
|
globals: {
|
|
30
|
-
|
|
30
|
+
kcContext: {
|
|
31
31
|
locale: {
|
|
32
32
|
currentLanguageTag: 'fr'
|
|
33
33
|
},
|
|
@@ -41,7 +41,7 @@ export const WithFrenchLanguage: Story = {
|
|
|
41
41
|
|
|
42
42
|
export const WithHtmlErrorMessage: Story = {
|
|
43
43
|
globals: {
|
|
44
|
-
|
|
44
|
+
kcContext: {
|
|
45
45
|
code: {
|
|
46
46
|
success: false,
|
|
47
47
|
error: "Something went wrong. <a href='https://example.com'>Try again</a>"
|
|
@@ -17,7 +17,7 @@ export const Default: Story = {};
|
|
|
17
17
|
|
|
18
18
|
export const WithAIAFlow: Story = {
|
|
19
19
|
globals: {
|
|
20
|
-
|
|
20
|
+
kcContext: {
|
|
21
21
|
triggered_from_aia: true,
|
|
22
22
|
url: { loginAction: '/login-action' }
|
|
23
23
|
}
|
|
@@ -26,7 +26,7 @@ export const WithAIAFlow: Story = {
|
|
|
26
26
|
|
|
27
27
|
export const WithoutAIAFlow: Story = {
|
|
28
28
|
globals: {
|
|
29
|
-
|
|
29
|
+
kcContext: {
|
|
30
30
|
triggered_from_aia: false,
|
|
31
31
|
url: { loginAction: '/login-action' }
|
|
32
32
|
}
|
|
@@ -35,7 +35,7 @@ export const WithoutAIAFlow: Story = {
|
|
|
35
35
|
|
|
36
36
|
export const WithCustomButtonStyle: Story = {
|
|
37
37
|
globals: {
|
|
38
|
-
|
|
38
|
+
kcContext: {
|
|
39
39
|
triggered_from_aia: true,
|
|
40
40
|
url: { loginAction: '/login-action' }
|
|
41
41
|
}
|
|
@@ -17,7 +17,7 @@ export const Default: Story = {};
|
|
|
17
17
|
|
|
18
18
|
export const WithCustomCredentialLabel: Story = {
|
|
19
19
|
globals: {
|
|
20
|
-
|
|
20
|
+
kcContext: {
|
|
21
21
|
credentialLabel: 'Test Credential',
|
|
22
22
|
url: { loginAction: '/login-action' }
|
|
23
23
|
}
|
|
@@ -26,7 +26,7 @@ export const WithCustomCredentialLabel: Story = {
|
|
|
26
26
|
|
|
27
27
|
export const WithSuccessMessage: Story = {
|
|
28
28
|
globals: {
|
|
29
|
-
|
|
29
|
+
kcContext: {
|
|
30
30
|
message: {
|
|
31
31
|
type: 'success',
|
|
32
32
|
summary: 'Credential has been successfully deleted.'
|
|
@@ -37,7 +37,7 @@ export const WithSuccessMessage: Story = {
|
|
|
37
37
|
|
|
38
38
|
export const WithErrorMessage: Story = {
|
|
39
39
|
globals: {
|
|
40
|
-
|
|
40
|
+
kcContext: {
|
|
41
41
|
message: {
|
|
42
42
|
type: 'error',
|
|
43
43
|
summary: 'Failed to delete the credential. Please try again.'
|
|
@@ -48,7 +48,7 @@ export const WithErrorMessage: Story = {
|
|
|
48
48
|
|
|
49
49
|
export const WithDisabledDeleteButton: Story = {
|
|
50
50
|
globals: {
|
|
51
|
-
|
|
51
|
+
kcContext: {
|
|
52
52
|
isDeleteButtonDisabled: true,
|
|
53
53
|
credentialLabel: 'Non-deletable Credential'
|
|
54
54
|
}
|
|
@@ -17,7 +17,7 @@ export const Default: Story = {};
|
|
|
17
17
|
|
|
18
18
|
export const WithAnotherMessage: Story = {
|
|
19
19
|
globals: {
|
|
20
|
-
|
|
20
|
+
kcContext: {
|
|
21
21
|
message: { summary: 'With another error message' }
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -25,7 +25,7 @@ export const WithAnotherMessage: Story = {
|
|
|
25
25
|
|
|
26
26
|
export const WithHtmlErrorMessage: Story = {
|
|
27
27
|
globals: {
|
|
28
|
-
|
|
28
|
+
kcContext: {
|
|
29
29
|
message: {
|
|
30
30
|
summary:
|
|
31
31
|
"<strong>Error:</strong> Something went wrong. <a href='https://example.com'>Go back</a>"
|
|
@@ -36,7 +36,7 @@ export const WithHtmlErrorMessage: Story = {
|
|
|
36
36
|
|
|
37
37
|
export const FrenchError: Story = {
|
|
38
38
|
globals: {
|
|
39
|
-
|
|
39
|
+
kcContext: {
|
|
40
40
|
locale: { currentLanguageTag: 'fr' },
|
|
41
41
|
message: { summary: "Une erreur s'est produite" }
|
|
42
42
|
}
|
|
@@ -45,7 +45,7 @@ export const FrenchError: Story = {
|
|
|
45
45
|
|
|
46
46
|
export const WithSkipLink: Story = {
|
|
47
47
|
globals: {
|
|
48
|
-
|
|
48
|
+
kcContext: {
|
|
49
49
|
message: { summary: 'An error occurred' },
|
|
50
50
|
skipLink: true,
|
|
51
51
|
client: {
|
|
@@ -18,7 +18,7 @@ export const Default: Story = {};
|
|
|
18
18
|
|
|
19
19
|
export const WithFormValidationErrors: Story = {
|
|
20
20
|
globals: {
|
|
21
|
-
|
|
21
|
+
kcContext: {
|
|
22
22
|
messagesPerField: {
|
|
23
23
|
existsError: (fieldName: string) =>
|
|
24
24
|
['email', 'firstName'].includes(fieldName),
|
|
@@ -34,7 +34,7 @@ export const WithFormValidationErrors: Story = {
|
|
|
34
34
|
|
|
35
35
|
export const WithReadOnlyFields: Story = {
|
|
36
36
|
globals: {
|
|
37
|
-
|
|
37
|
+
kcContext: {
|
|
38
38
|
profile: {
|
|
39
39
|
attributesByName: {
|
|
40
40
|
email: { value: 'jane.doe@example.com', readOnly: true },
|
|
@@ -47,7 +47,7 @@ export const WithReadOnlyFields: Story = {
|
|
|
47
47
|
|
|
48
48
|
export const WithPrefilledFormFields: Story = {
|
|
49
49
|
globals: {
|
|
50
|
-
|
|
50
|
+
kcContext: {
|
|
51
51
|
profile: {
|
|
52
52
|
attributesByName: {
|
|
53
53
|
firstName: { value: 'Jane' },
|
|
@@ -15,7 +15,7 @@ type Story = StoryObj<KcPageStory>;
|
|
|
15
15
|
|
|
16
16
|
export const Default: Story = {
|
|
17
17
|
globals: {
|
|
18
|
-
|
|
18
|
+
kcContext: {
|
|
19
19
|
message: {
|
|
20
20
|
summary: 'Server info message'
|
|
21
21
|
}
|
|
@@ -25,7 +25,7 @@ export const Default: Story = {
|
|
|
25
25
|
|
|
26
26
|
export const WithLinkBack: Story = {
|
|
27
27
|
globals: {
|
|
28
|
-
|
|
28
|
+
kcContext: {
|
|
29
29
|
message: {
|
|
30
30
|
summary: 'Server message'
|
|
31
31
|
},
|
|
@@ -36,7 +36,7 @@ export const WithLinkBack: Story = {
|
|
|
36
36
|
|
|
37
37
|
export const WithRequiredActions: Story = {
|
|
38
38
|
globals: {
|
|
39
|
-
|
|
39
|
+
kcContext: {
|
|
40
40
|
message: {
|
|
41
41
|
summary: 'Required actions: '
|
|
42
42
|
},
|
|
@@ -57,7 +57,7 @@ export const WithRequiredActions: Story = {
|
|
|
57
57
|
|
|
58
58
|
export const WithPageRedirect: Story = {
|
|
59
59
|
globals: {
|
|
60
|
-
|
|
60
|
+
kcContext: {
|
|
61
61
|
message: { summary: 'You will be redirected shortly.' },
|
|
62
62
|
pageRedirectUri: 'https://example.com'
|
|
63
63
|
}
|
|
@@ -66,7 +66,7 @@ export const WithPageRedirect: Story = {
|
|
|
66
66
|
|
|
67
67
|
export const WithoutClientBaseUrl: Story = {
|
|
68
68
|
globals: {
|
|
69
|
-
|
|
69
|
+
kcContext: {
|
|
70
70
|
message: { summary: 'No client base URL defined.' },
|
|
71
71
|
client: { baseUrl: undefined }
|
|
72
72
|
}
|
|
@@ -75,7 +75,7 @@ export const WithoutClientBaseUrl: Story = {
|
|
|
75
75
|
|
|
76
76
|
export const WithMessageHeader: Story = {
|
|
77
77
|
globals: {
|
|
78
|
-
|
|
78
|
+
kcContext: {
|
|
79
79
|
messageHeader: 'Important Notice',
|
|
80
80
|
message: { summary: 'This is an important message.' }
|
|
81
81
|
}
|
|
@@ -84,7 +84,7 @@ export const WithMessageHeader: Story = {
|
|
|
84
84
|
|
|
85
85
|
export const WithAdvancedMessage: Story = {
|
|
86
86
|
globals: {
|
|
87
|
-
|
|
87
|
+
kcContext: {
|
|
88
88
|
message: {
|
|
89
89
|
summary:
|
|
90
90
|
'Please take note of this <strong>important</strong> information.'
|
|
@@ -17,7 +17,7 @@ export const Default: Story = {};
|
|
|
17
17
|
|
|
18
18
|
export const WithManualSetUp: Story = {
|
|
19
19
|
globals: {
|
|
20
|
-
|
|
20
|
+
kcContext: {
|
|
21
21
|
mode: 'manual'
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -25,7 +25,7 @@ export const WithManualSetUp: Story = {
|
|
|
25
25
|
|
|
26
26
|
export const WithError: Story = {
|
|
27
27
|
globals: {
|
|
28
|
-
|
|
28
|
+
kcContext: {
|
|
29
29
|
messagesPerField: {
|
|
30
30
|
get: (fieldName: string) =>
|
|
31
31
|
fieldName === 'totp' ? 'Invalid TOTP' : undefined,
|
|
@@ -40,7 +40,7 @@ export const WithError: Story = {
|
|
|
40
40
|
|
|
41
41
|
export const WithAppInitiatedAction: Story = {
|
|
42
42
|
globals: {
|
|
43
|
-
|
|
43
|
+
kcContext: {
|
|
44
44
|
isAppInitiatedAction: true
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -48,7 +48,7 @@ export const WithAppInitiatedAction: Story = {
|
|
|
48
48
|
|
|
49
49
|
export const WithPreFilledUserLabel: Story = {
|
|
50
50
|
globals: {
|
|
51
|
-
|
|
51
|
+
kcContext: {
|
|
52
52
|
totp: {
|
|
53
53
|
otpCredentials: [{ userLabel: 'MyDevice' }]
|
|
54
54
|
}
|
|
@@ -21,7 +21,7 @@ const meta: Meta<KcPageStory> = {
|
|
|
21
21
|
decorators: decorators,
|
|
22
22
|
globals: {
|
|
23
23
|
pageId: 'login-idp-link-confirm.ftl',
|
|
24
|
-
|
|
24
|
+
kcContext: {
|
|
25
25
|
kcContext: mockKcContext
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -47,7 +47,7 @@ export const Default: Story = {};
|
|
|
47
47
|
*/
|
|
48
48
|
export const WithIdpAlias: Story = {
|
|
49
49
|
globals: {
|
|
50
|
-
|
|
50
|
+
kcContext: {
|
|
51
51
|
...mockKcContext,
|
|
52
52
|
idpAlias: 'Google',
|
|
53
53
|
brokerContext: {
|
|
@@ -68,7 +68,7 @@ export const WithIdpAlias: Story = {
|
|
|
68
68
|
*/
|
|
69
69
|
export const WithCustomRealmDisplayName: Story = {
|
|
70
70
|
globals: {
|
|
71
|
-
|
|
71
|
+
kcContext: {
|
|
72
72
|
...mockKcContext,
|
|
73
73
|
idpAlias: 'Facebook',
|
|
74
74
|
brokerContext: {
|
|
@@ -89,7 +89,7 @@ export const WithCustomRealmDisplayName: Story = {
|
|
|
89
89
|
*/
|
|
90
90
|
export const WithFormSubmissionError: Story = {
|
|
91
91
|
globals: {
|
|
92
|
-
|
|
92
|
+
kcContext: {
|
|
93
93
|
...mockKcContext,
|
|
94
94
|
url: {
|
|
95
95
|
loginAction: '/error'
|