@keycloakify/angular 0.2.12 → 0.2.14
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/README.md
CHANGED
package/bin/671.index.js
CHANGED
|
@@ -869,6 +869,7 @@ async function command(params) {
|
|
|
869
869
|
console.log(source/* default */.Ay.cyan('Select the page you want to customize:'));
|
|
870
870
|
const templateValue = 'template.ftl (Layout common to every page)';
|
|
871
871
|
const userProfileFormFieldsValue = 'user-profile-commons.ftl (Renders the form of the register.ftl, login-update-profile.ftl, update-email.ftl and idp-review-user-profile.ftl)';
|
|
872
|
+
const otherPageValue = "The page you're looking for isn't listed here";
|
|
872
873
|
const { value: pageIdOrComponent } = await dist_default()({
|
|
873
874
|
values: (() => {
|
|
874
875
|
switch (themeType) {
|
|
@@ -876,10 +877,11 @@ async function command(params) {
|
|
|
876
877
|
return [
|
|
877
878
|
templateValue,
|
|
878
879
|
userProfileFormFieldsValue,
|
|
879
|
-
...constants/* LOGIN_THEME_PAGE_IDS */.hz
|
|
880
|
+
...constants/* LOGIN_THEME_PAGE_IDS */.hz,
|
|
881
|
+
otherPageValue
|
|
880
882
|
];
|
|
881
883
|
case 'account':
|
|
882
|
-
return [templateValue, ...constants/* ACCOUNT_THEME_PAGE_IDS */.Hp];
|
|
884
|
+
return [templateValue, ...constants/* ACCOUNT_THEME_PAGE_IDS */.Hp, otherPageValue];
|
|
883
885
|
case 'admin':
|
|
884
886
|
return [];
|
|
885
887
|
}
|
|
@@ -888,6 +890,13 @@ async function command(params) {
|
|
|
888
890
|
}).catch(() => {
|
|
889
891
|
process.exit(-1);
|
|
890
892
|
});
|
|
893
|
+
if (pageIdOrComponent === otherPageValue) {
|
|
894
|
+
console.log([
|
|
895
|
+
'To style a page not included in the base Keycloak, such as one added by a third-party Keycloak extension,',
|
|
896
|
+
'refer to the documentation: https://docs.keycloakify.dev/features/styling-a-custom-page-not-included-in-base-keycloak'
|
|
897
|
+
].join(' '));
|
|
898
|
+
process.exit(0);
|
|
899
|
+
}
|
|
891
900
|
console.log(`→ ${pageIdOrComponent}`);
|
|
892
901
|
const componentRelativeDirPath_posix_to_componentRelativeFilePath_posix = (params) => {
|
|
893
902
|
const { componentRelativeDirPath_posix } = params;
|
package/package.json
CHANGED
package/src/bin/eject-page.ts
CHANGED
|
@@ -68,12 +68,14 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
|
68
68
|
const templateValue = 'template.ftl (Layout common to every page)';
|
|
69
69
|
const userProfileFormFieldsValue =
|
|
70
70
|
'user-profile-commons.ftl (Renders the form of the register.ftl, login-update-profile.ftl, update-email.ftl and idp-review-user-profile.ftl)';
|
|
71
|
+
const otherPageValue = "The page you're looking for isn't listed here";
|
|
71
72
|
|
|
72
73
|
const { value: pageIdOrComponent } = await cliSelect<
|
|
73
74
|
| LoginThemePageId
|
|
74
75
|
| AccountThemePageId
|
|
75
76
|
| typeof templateValue
|
|
76
77
|
| typeof userProfileFormFieldsValue
|
|
78
|
+
| typeof otherPageValue
|
|
77
79
|
>({
|
|
78
80
|
values: (() => {
|
|
79
81
|
switch (themeType) {
|
|
@@ -81,10 +83,11 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
|
81
83
|
return [
|
|
82
84
|
templateValue,
|
|
83
85
|
userProfileFormFieldsValue,
|
|
84
|
-
...LOGIN_THEME_PAGE_IDS
|
|
86
|
+
...LOGIN_THEME_PAGE_IDS,
|
|
87
|
+
otherPageValue
|
|
85
88
|
];
|
|
86
89
|
case 'account':
|
|
87
|
-
return [templateValue, ...ACCOUNT_THEME_PAGE_IDS];
|
|
90
|
+
return [templateValue, ...ACCOUNT_THEME_PAGE_IDS, otherPageValue];
|
|
88
91
|
case 'admin':
|
|
89
92
|
return [];
|
|
90
93
|
}
|
|
@@ -94,6 +97,17 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
|
94
97
|
process.exit(-1);
|
|
95
98
|
});
|
|
96
99
|
|
|
100
|
+
if (pageIdOrComponent === otherPageValue) {
|
|
101
|
+
console.log(
|
|
102
|
+
[
|
|
103
|
+
'To style a page not included in the base Keycloak, such as one added by a third-party Keycloak extension,',
|
|
104
|
+
'refer to the documentation: https://docs.keycloakify.dev/features/styling-a-custom-page-not-included-in-base-keycloak'
|
|
105
|
+
].join(' ')
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
process.exit(0);
|
|
109
|
+
}
|
|
110
|
+
|
|
97
111
|
console.log(`→ ${pageIdOrComponent}`);
|
|
98
112
|
|
|
99
113
|
const componentRelativeDirPath_posix_to_componentRelativeFilePath_posix = (params: {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1
2
|
import { i18nBuilder } from '@keycloakify/angular/account';
|
|
2
|
-
import { ThemeName } from '../kc.gen';
|
|
3
|
+
import type { ThemeName } from '../kc.gen';
|
|
4
|
+
|
|
5
|
+
/** @see: https://docs.keycloakify.dev/features/i18n */
|
|
6
|
+
const { getI18n, ofTypeI18n } = i18nBuilder.withThemeName<ThemeName>().build();
|
|
3
7
|
|
|
4
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5
|
-
const { getI18n, ofTypeI18n } = i18nBuilder
|
|
6
|
-
.withThemeName<ThemeName>()
|
|
7
|
-
.withExtraLanguages({}) // See: https://docs.keycloakify.dev/i18n/adding-support-for-extra-languages
|
|
8
|
-
.withCustomTranslations({}) // See: https://docs.keycloakify.dev/i18n/adding-new-translation-messages-or-changing-the-default-ones
|
|
9
|
-
.build();
|
|
10
8
|
type I18n = typeof ofTypeI18n;
|
|
9
|
+
|
|
11
10
|
export { getI18n, type I18n };
|