@keycloakify/angular 0.1.1 → 0.1.3
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/bin/84.index.js
CHANGED
|
@@ -453,45 +453,57 @@ async function command(params) {
|
|
|
453
453
|
source/* default */.Ay.grey('```'),
|
|
454
454
|
`// ...`,
|
|
455
455
|
``,
|
|
456
|
-
...
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
456
|
+
...(() => {
|
|
457
|
+
let inGreenBlock = false;
|
|
458
|
+
return [
|
|
459
|
+
` export async function getKcPage(pageId: KcContext['pageId']): Promise<KcPage> {`,
|
|
460
|
+
` switch (pageId) {`,
|
|
461
|
+
`+`,
|
|
462
|
+
` case '${pageId}':`,
|
|
463
|
+
` return {`,
|
|
464
|
+
` PageComponent: (await import('${componentRelativeDirPath_posix_to_componentRelativeFilePath_posix({
|
|
465
|
+
componentRelativeDirPath_posix: `./${componentDirRelativeToThemeTypePath.split(external_path_.sep).join('/')}`
|
|
466
|
+
})}')).${kebabCaseToCamelCase(capitalize(pageId).replace(/\.ftl$/, ''))}Component,`,
|
|
467
|
+
` TemplateComponent,`,
|
|
468
|
+
...(themeType === 'login'
|
|
469
|
+
? [` UserProfileFormFieldsComponent,`]
|
|
470
|
+
: []),
|
|
471
|
+
...(themeType === 'login'
|
|
472
|
+
? [` doMakeUserConfirmPassword,`]
|
|
473
|
+
: []),
|
|
474
|
+
` doUseDefaultCss,`,
|
|
475
|
+
` classes,`,
|
|
476
|
+
` };`,
|
|
477
|
+
`+`,
|
|
478
|
+
` //...`,
|
|
479
|
+
` default:`,
|
|
480
|
+
` return {`,
|
|
481
|
+
` PageComponent: await getDefaultPageComponent(pageId),`,
|
|
482
|
+
` TemplateComponent,`,
|
|
483
|
+
...(themeType === 'login'
|
|
484
|
+
? [` UserProfileFormFieldsComponent,`]
|
|
485
|
+
: []),
|
|
486
|
+
...(themeType === 'login'
|
|
487
|
+
? [` doMakeUserConfirmPassword,`]
|
|
488
|
+
: []),
|
|
489
|
+
` doUseDefaultCss,`,
|
|
490
|
+
` classes,`,
|
|
491
|
+
` };`,
|
|
492
|
+
` }`,
|
|
493
|
+
` }`
|
|
494
|
+
].map(line => {
|
|
495
|
+
if (line === `+`) {
|
|
496
|
+
inGreenBlock = !inGreenBlock;
|
|
497
|
+
}
|
|
498
|
+
if (inGreenBlock || line.startsWith('+')) {
|
|
499
|
+
return source/* default */.Ay.green(line);
|
|
500
|
+
}
|
|
501
|
+
if (line.startsWith('-')) {
|
|
502
|
+
return source/* default */.Ay.red(line);
|
|
503
|
+
}
|
|
504
|
+
return source/* default */.Ay.grey(line);
|
|
505
|
+
});
|
|
506
|
+
})(),
|
|
495
507
|
source/* default */.Ay.grey('```')
|
|
496
508
|
].join('\n'));
|
|
497
509
|
}
|
package/package.json
CHANGED
package/src/bin/eject-page.ts
CHANGED
|
@@ -352,47 +352,59 @@ export async function command(params: { buildContext: BuildContext }) {
|
|
|
352
352
|
chalk.grey('```'),
|
|
353
353
|
`// ...`,
|
|
354
354
|
``,
|
|
355
|
-
...
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
{
|
|
362
|
-
|
|
355
|
+
...(() => {
|
|
356
|
+
let inGreenBlock = false;
|
|
357
|
+
return [
|
|
358
|
+
` export async function getKcPage(pageId: KcContext['pageId']): Promise<KcPage> {`,
|
|
359
|
+
` switch (pageId) {`,
|
|
360
|
+
`+`,
|
|
361
|
+
` case '${pageId}':`,
|
|
362
|
+
` return {`,
|
|
363
|
+
` PageComponent: (await import('${componentRelativeDirPath_posix_to_componentRelativeFilePath_posix(
|
|
364
|
+
{
|
|
365
|
+
componentRelativeDirPath_posix: `./${componentDirRelativeToThemeTypePath.split(pathSep).join('/')}`
|
|
366
|
+
}
|
|
367
|
+
)}')).${kebabCaseToCamelCase(capitalize(pageId).replace(/\.ftl$/, ''))}Component,`,
|
|
368
|
+
` TemplateComponent,`,
|
|
369
|
+
...(themeType === 'login'
|
|
370
|
+
? [` UserProfileFormFieldsComponent,`]
|
|
371
|
+
: []),
|
|
372
|
+
...(themeType === 'login'
|
|
373
|
+
? [` doMakeUserConfirmPassword,`]
|
|
374
|
+
: []),
|
|
375
|
+
` doUseDefaultCss,`,
|
|
376
|
+
` classes,`,
|
|
377
|
+
` };`,
|
|
378
|
+
`+`,
|
|
379
|
+
` //...`,
|
|
380
|
+
` default:`,
|
|
381
|
+
` return {`,
|
|
382
|
+
` PageComponent: await getDefaultPageComponent(pageId),`,
|
|
383
|
+
` TemplateComponent,`,
|
|
384
|
+
...(themeType === 'login'
|
|
385
|
+
? [` UserProfileFormFieldsComponent,`]
|
|
386
|
+
: []),
|
|
387
|
+
...(themeType === 'login'
|
|
388
|
+
? [` doMakeUserConfirmPassword,`]
|
|
389
|
+
: []),
|
|
390
|
+
` doUseDefaultCss,`,
|
|
391
|
+
` classes,`,
|
|
392
|
+
` };`,
|
|
393
|
+
` }`,
|
|
394
|
+
` }`
|
|
395
|
+
].map(line => {
|
|
396
|
+
if (line === `+`) {
|
|
397
|
+
inGreenBlock = !inGreenBlock;
|
|
363
398
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
` //...`,
|
|
374
|
-
` default:`,
|
|
375
|
-
` return {`,
|
|
376
|
-
` PageComponent: await getDefaultPageComponent(pageId),`,
|
|
377
|
-
` TemplateComponent,`,
|
|
378
|
-
...(themeType === 'login'
|
|
379
|
-
? [` UserProfileFormFieldsComponent,`]
|
|
380
|
-
: []),
|
|
381
|
-
...(themeType === 'login' ? [` doMakeUserConfirmPassword,`] : []),
|
|
382
|
-
` doUseDefaultCss,`,
|
|
383
|
-
` classes,`,
|
|
384
|
-
` };`,
|
|
385
|
-
` }`,
|
|
386
|
-
` }`
|
|
387
|
-
].map(line => {
|
|
388
|
-
if (line.startsWith('+')) {
|
|
389
|
-
return chalk.green(line);
|
|
390
|
-
}
|
|
391
|
-
if (line.startsWith('-')) {
|
|
392
|
-
return chalk.red(line);
|
|
393
|
-
}
|
|
394
|
-
return chalk.grey(line);
|
|
395
|
-
}),
|
|
399
|
+
if (inGreenBlock || line.startsWith('+')) {
|
|
400
|
+
return chalk.green(line);
|
|
401
|
+
}
|
|
402
|
+
if (line.startsWith('-')) {
|
|
403
|
+
return chalk.red(line);
|
|
404
|
+
}
|
|
405
|
+
return chalk.grey(line);
|
|
406
|
+
});
|
|
407
|
+
})(),
|
|
396
408
|
chalk.grey('```')
|
|
397
409
|
].join('\n')
|
|
398
410
|
);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @angular-eslint/component-class-suffix */
|
|
2
2
|
import { Component, inject, OnInit, Type } from '@angular/core';
|
|
3
|
-
import { provideKeycloakifyAngular } from '@keycloakify/angular/
|
|
4
|
-
import { TemplateComponent } from '@keycloakify/angular/
|
|
3
|
+
import { provideKeycloakifyAngular } from '@keycloakify/angular/account/providers/keycloakify-angular';
|
|
4
|
+
import { TemplateComponent } from '@keycloakify/angular/account/template';
|
|
5
5
|
import { getKcPage } from './KcPage';
|
|
6
6
|
import { getI18n } from './i18n';
|
|
7
|
-
import { KC_ACCOUNT_CONTEXT } from '@keycloakify/angular/
|
|
8
|
-
import { createGetKcContextMock } from 'keycloakify/
|
|
7
|
+
import { KC_ACCOUNT_CONTEXT } from '@keycloakify/angular/account/tokens/kc-context';
|
|
8
|
+
import { createGetKcContextMock } from 'keycloakify/account/KcContext';
|
|
9
9
|
import { kcEnvDefaults, themeNames } from '../kc.gen';
|
|
10
10
|
import type { KcContextExtension, KcContextExtensionPerPage } from './KcContext';
|
|
11
11
|
|