@sitecore-jss/sitecore-jss-angular 21.7.0 → 21.7.1-canary.2

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 (67) hide show
  1. package/LICENSE.txt +202 -202
  2. package/README.md +7 -7
  3. package/angular.json +48 -48
  4. package/dist/README.md +7 -7
  5. package/dist/components/date.directive.d.ts +20 -20
  6. package/dist/components/editframe.component.d.ts +22 -22
  7. package/dist/components/file.directive.d.ts +17 -17
  8. package/dist/components/generic-link.directive.d.ts +20 -20
  9. package/dist/components/hidden-rendering.component.d.ts +7 -7
  10. package/dist/components/image.directive.d.ts +35 -35
  11. package/dist/components/link.directive.d.ts +26 -26
  12. package/dist/components/missing-component.component.d.ts +7 -7
  13. package/dist/components/placeholder-loading.directive.d.ts +8 -8
  14. package/dist/components/placeholder.component.d.ts +60 -60
  15. package/dist/components/raw.component.d.ts +12 -12
  16. package/dist/components/render-component.component.d.ts +33 -33
  17. package/dist/components/render-each.directive.d.ts +8 -8
  18. package/dist/components/render-empty.directive.d.ts +8 -8
  19. package/dist/components/rendering-field.d.ts +41 -41
  20. package/dist/components/rendering.d.ts +5 -5
  21. package/dist/components/rich-text.directive.d.ts +18 -18
  22. package/dist/components/router-link.directive.d.ts +19 -19
  23. package/dist/components/text.directive.d.ts +16 -16
  24. package/dist/esm2022/components/date.directive.mjs +67 -67
  25. package/dist/esm2022/components/editframe.component.mjs +70 -70
  26. package/dist/esm2022/components/file.directive.mjs +48 -48
  27. package/dist/esm2022/components/generic-link.directive.mjs +67 -67
  28. package/dist/esm2022/components/hidden-rendering.component.mjs +20 -20
  29. package/dist/esm2022/components/image.directive.mjs +150 -150
  30. package/dist/esm2022/components/link.directive.mjs +122 -122
  31. package/dist/esm2022/components/missing-component.component.mjs +16 -16
  32. package/dist/esm2022/components/placeholder-loading.directive.mjs +16 -16
  33. package/dist/esm2022/components/placeholder.component.mjs +281 -281
  34. package/dist/esm2022/components/raw.component.mjs +38 -38
  35. package/dist/esm2022/components/render-component.component.mjs +98 -98
  36. package/dist/esm2022/components/render-each.directive.mjs +16 -16
  37. package/dist/esm2022/components/render-empty.directive.mjs +16 -16
  38. package/dist/esm2022/components/rendering-field.mjs +1 -1
  39. package/dist/esm2022/components/rendering.mjs +7 -7
  40. package/dist/esm2022/components/rich-text.directive.mjs +68 -68
  41. package/dist/esm2022/components/router-link.directive.mjs +49 -49
  42. package/dist/esm2022/components/text.directive.mjs +61 -61
  43. package/dist/esm2022/lib.module.mjs +160 -160
  44. package/dist/esm2022/public_api.mjs +25 -25
  45. package/dist/esm2022/services/data-resolver-factory.mjs +58 -58
  46. package/dist/esm2022/services/guard-resolver-factory.mjs +86 -86
  47. package/dist/esm2022/services/jss-can-activate-error.mjs +14 -14
  48. package/dist/esm2022/services/jss-component-factory.service.mjs +88 -88
  49. package/dist/esm2022/services/placeholder.token.mjs +27 -27
  50. package/dist/esm2022/sitecore-jss-sitecore-jss-angular.mjs +4 -4
  51. package/dist/esm2022/utils.mjs +16 -16
  52. package/dist/fesm2022/sitecore-jss-sitecore-jss-angular.mjs +1530 -1530
  53. package/dist/index.d.ts +5 -5
  54. package/dist/lib.module.d.ts +48 -48
  55. package/dist/package.json +2 -2
  56. package/dist/public_api.d.ts +26 -26
  57. package/dist/services/data-resolver-factory.d.ts +13 -13
  58. package/dist/services/guard-resolver-factory.d.ts +11 -11
  59. package/dist/services/jss-can-activate-error.d.ts +10 -10
  60. package/dist/services/jss-component-factory.service.d.ts +26 -26
  61. package/dist/services/placeholder.token.d.ts +64 -64
  62. package/dist/utils.d.ts +6 -6
  63. package/ng-package.json +13 -13
  64. package/package.json +3 -3
  65. package/tsconfig.json +9 -9
  66. package/tsconfig.spec.json +17 -17
  67. package/typings/README.md +2 -2
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@sitecore-jss/sitecore-jss-angular" />
5
- export * from './public_api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@sitecore-jss/sitecore-jss-angular" />
5
+ export * from './public_api';
@@ -1,48 +1,48 @@
1
- import { ModuleWithProviders, Type } from '@angular/core';
2
- import { ComponentNameAndModule, ComponentNameAndType } from './services/placeholder.token';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "./components/file.directive";
5
- import * as i2 from "./components/image.directive";
6
- import * as i3 from "./components/link.directive";
7
- import * as i4 from "./components/router-link.directive";
8
- import * as i5 from "./components/generic-link.directive";
9
- import * as i6 from "./components/date.directive";
10
- import * as i7 from "./components/render-each.directive";
11
- import * as i8 from "./components/render-empty.directive";
12
- import * as i9 from "./components/placeholder-loading.directive";
13
- import * as i10 from "./components/render-component.component";
14
- import * as i11 from "./components/placeholder.component";
15
- import * as i12 from "./components/raw.component";
16
- import * as i13 from "./components/rich-text.directive";
17
- import * as i14 from "./components/text.directive";
18
- import * as i15 from "./components/missing-component.component";
19
- import * as i16 from "./components/hidden-rendering.component";
20
- import * as i17 from "./components/editframe.component";
21
- import * as i18 from "@angular/common";
22
- export declare class JssModule {
23
- /**
24
- * Instantiates the JSS module with no component factory.
25
- * Useful for using it from libraries. Most of the time you'd want withComponents()
26
- * @returns {ModuleWithProviders<JssModule>} module
27
- */
28
- static forRoot(): ModuleWithProviders<JssModule>;
29
- /**
30
- * Instantiates a module for a lazy-loaded JSS component(s)
31
- * @param {Type<unknown> | Record<string, Type<unknown>> } value - component or map of components
32
- * @returns {ModuleWithProviders<JssModule>} module
33
- */
34
- static forChild(value: Type<unknown> | {
35
- [key: string]: Type<unknown>;
36
- }): ModuleWithProviders<JssModule>;
37
- /**
38
- * Instantiates the JSS module and specifies the mapping from component name to component implementation.
39
- * Appropriate when defining the set of JSS components that your app is aware of.
40
- * @param {ComponentNameAndType[]} components
41
- * @param {ComponentNameAndModule[]} [lazyComponents]
42
- * @returns {ModuleWithProviders<JssModule>} module
43
- */
44
- static withComponents(components: ComponentNameAndType[], lazyComponents?: ComponentNameAndModule[]): ModuleWithProviders<JssModule>;
45
- static ɵfac: i0.ɵɵFactoryDeclaration<JssModule, never>;
46
- static ɵmod: i0.ɵɵNgModuleDeclaration<JssModule, [typeof i1.FileDirective, typeof i2.ImageDirective, typeof i3.LinkDirective, typeof i4.RouterLinkDirective, typeof i5.GenericLinkDirective, typeof i6.DateDirective, typeof i7.RenderEachDirective, typeof i8.RenderEmptyDirective, typeof i9.PlaceholderLoadingDirective, typeof i10.RenderComponentComponent, typeof i11.PlaceholderComponent, typeof i12.RawComponent, typeof i13.RichTextDirective, typeof i14.TextDirective, typeof i15.MissingComponentComponent, typeof i16.HiddenRenderingComponent, typeof i17.EditFrameComponent], [typeof i18.CommonModule], [typeof i1.FileDirective, typeof i2.ImageDirective, typeof i6.DateDirective, typeof i3.LinkDirective, typeof i4.RouterLinkDirective, typeof i5.GenericLinkDirective, typeof i7.RenderEachDirective, typeof i8.RenderEmptyDirective, typeof i10.RenderComponentComponent, typeof i11.PlaceholderComponent, typeof i16.HiddenRenderingComponent, typeof i9.PlaceholderLoadingDirective, typeof i13.RichTextDirective, typeof i14.TextDirective, typeof i17.EditFrameComponent]>;
47
- static ɵinj: i0.ɵɵInjectorDeclaration<JssModule>;
48
- }
1
+ import { ModuleWithProviders, Type } from '@angular/core';
2
+ import { ComponentNameAndModule, ComponentNameAndType } from './services/placeholder.token';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "./components/file.directive";
5
+ import * as i2 from "./components/image.directive";
6
+ import * as i3 from "./components/link.directive";
7
+ import * as i4 from "./components/router-link.directive";
8
+ import * as i5 from "./components/generic-link.directive";
9
+ import * as i6 from "./components/date.directive";
10
+ import * as i7 from "./components/render-each.directive";
11
+ import * as i8 from "./components/render-empty.directive";
12
+ import * as i9 from "./components/placeholder-loading.directive";
13
+ import * as i10 from "./components/render-component.component";
14
+ import * as i11 from "./components/placeholder.component";
15
+ import * as i12 from "./components/raw.component";
16
+ import * as i13 from "./components/rich-text.directive";
17
+ import * as i14 from "./components/text.directive";
18
+ import * as i15 from "./components/missing-component.component";
19
+ import * as i16 from "./components/hidden-rendering.component";
20
+ import * as i17 from "./components/editframe.component";
21
+ import * as i18 from "@angular/common";
22
+ export declare class JssModule {
23
+ /**
24
+ * Instantiates the JSS module with no component factory.
25
+ * Useful for using it from libraries. Most of the time you'd want withComponents()
26
+ * @returns {ModuleWithProviders<JssModule>} module
27
+ */
28
+ static forRoot(): ModuleWithProviders<JssModule>;
29
+ /**
30
+ * Instantiates a module for a lazy-loaded JSS component(s)
31
+ * @param {Type<unknown> | Record<string, Type<unknown>> } value - component or map of components
32
+ * @returns {ModuleWithProviders<JssModule>} module
33
+ */
34
+ static forChild(value: Type<unknown> | {
35
+ [key: string]: Type<unknown>;
36
+ }): ModuleWithProviders<JssModule>;
37
+ /**
38
+ * Instantiates the JSS module and specifies the mapping from component name to component implementation.
39
+ * Appropriate when defining the set of JSS components that your app is aware of.
40
+ * @param {ComponentNameAndType[]} components
41
+ * @param {ComponentNameAndModule[]} [lazyComponents]
42
+ * @returns {ModuleWithProviders<JssModule>} module
43
+ */
44
+ static withComponents(components: ComponentNameAndType[], lazyComponents?: ComponentNameAndModule[]): ModuleWithProviders<JssModule>;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<JssModule, never>;
46
+ static ɵmod: i0.ɵɵNgModuleDeclaration<JssModule, [typeof i1.FileDirective, typeof i2.ImageDirective, typeof i3.LinkDirective, typeof i4.RouterLinkDirective, typeof i5.GenericLinkDirective, typeof i6.DateDirective, typeof i7.RenderEachDirective, typeof i8.RenderEmptyDirective, typeof i9.PlaceholderLoadingDirective, typeof i10.RenderComponentComponent, typeof i11.PlaceholderComponent, typeof i12.RawComponent, typeof i13.RichTextDirective, typeof i14.TextDirective, typeof i15.MissingComponentComponent, typeof i16.HiddenRenderingComponent, typeof i17.EditFrameComponent], [typeof i18.CommonModule], [typeof i1.FileDirective, typeof i2.ImageDirective, typeof i6.DateDirective, typeof i3.LinkDirective, typeof i4.RouterLinkDirective, typeof i5.GenericLinkDirective, typeof i7.RenderEachDirective, typeof i8.RenderEmptyDirective, typeof i10.RenderComponentComponent, typeof i11.PlaceholderComponent, typeof i16.HiddenRenderingComponent, typeof i9.PlaceholderLoadingDirective, typeof i13.RichTextDirective, typeof i14.TextDirective, typeof i17.EditFrameComponent]>;
47
+ static ɵinj: i0.ɵɵInjectorDeclaration<JssModule>;
48
+ }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-jss/sitecore-jss-angular",
3
- "version": "21.7.0-canary.89",
3
+ "version": "21.7.1-canary.1",
4
4
  "description": "",
5
5
  "engines": {
6
6
  "node": ">=18"
@@ -19,7 +19,7 @@
19
19
  "rxjs": "~7.8.1"
20
20
  },
21
21
  "dependencies": {
22
- "@sitecore-jss/sitecore-jss": "21.7.0-canary.89",
22
+ "@sitecore-jss/sitecore-jss": "21.7.1-canary.1",
23
23
  "tslib": "^2.3.0"
24
24
  },
25
25
  "main": "dist/esm2022/sitecore-jss-sitecore-jss-angular.mjs",
@@ -1,26 +1,26 @@
1
- export { FileDirective } from './components/file.directive';
2
- export { ImageDirective } from './components/image.directive';
3
- export { LinkDirective } from './components/link.directive';
4
- export { RouterLinkDirective } from './components/router-link.directive';
5
- export { GenericLinkDirective } from './components/generic-link.directive';
6
- export { PlaceholderComponent } from './components/placeholder.component';
7
- export { HiddenRenderingComponent } from './components/hidden-rendering.component';
8
- export { RenderEachDirective } from './components/render-each.directive';
9
- export { RenderEmptyDirective } from './components/render-empty.directive';
10
- export { RenderComponentComponent } from './components/render-component.component';
11
- export { DateDirective } from './components/date.directive';
12
- export { EditFrameComponent } from './components/editframe.component';
13
- export { ComponentNameAndType, DYNAMIC_COMPONENT, ComponentNameAndModule, JssResolve, JssCanActivate, JssCanActivateFn, GuardInput, } from './services/placeholder.token';
14
- export { PlaceholderLoadingDirective } from './components/placeholder-loading.directive';
15
- export { isRawRendering } from './components/rendering';
16
- export { FileField, ImageField, ImageFieldValue, LinkField, LinkFieldValue, RenderingField, RichTextField, TextField, } from './components/rendering-field';
17
- export { RichTextDirective } from './components/rich-text.directive';
18
- export { TextDirective } from './components/text.directive';
19
- export { JssModule } from './lib.module';
20
- export { mediaApi } from '@sitecore-jss/sitecore-jss/media';
21
- export { DictionaryService, GraphQLDictionaryService, RestDictionaryService, } from '@sitecore-jss/sitecore-jss/i18n';
22
- export { LayoutService, LayoutServiceData, LayoutServiceContextData, GraphQLLayoutService, RestLayoutService, PlaceholdersData, RouteData, Field, HtmlElementRendering, getChildPlaceholder, getFieldValue, ComponentRendering, ComponentFields, ComponentParams, } from '@sitecore-jss/sitecore-jss/layout';
23
- export { RetryStrategy, DefaultRetryStrategy, GraphQLClientError, } from '@sitecore-jss/sitecore-jss/graphql';
24
- export { constants, HttpDataFetcher, HttpResponse, enableDebug, ClientError, } from '@sitecore-jss/sitecore-jss';
25
- export { isServer, isEditorActive, resetEditorChromes, handleEditorAnchors, DefaultEditFrameButton, DefaultEditFrameButtons, EditFrameDataSource, FieldEditButton, WebEditButton, } from '@sitecore-jss/sitecore-jss/utils';
26
- export { trackingApi, TrackingRequestOptions, CampaignInstance, GoalInstance, OutcomeInstance, EventInstance, PageViewInstance, } from '@sitecore-jss/sitecore-jss/tracking';
1
+ export { FileDirective } from './components/file.directive';
2
+ export { ImageDirective } from './components/image.directive';
3
+ export { LinkDirective } from './components/link.directive';
4
+ export { RouterLinkDirective } from './components/router-link.directive';
5
+ export { GenericLinkDirective } from './components/generic-link.directive';
6
+ export { PlaceholderComponent } from './components/placeholder.component';
7
+ export { HiddenRenderingComponent } from './components/hidden-rendering.component';
8
+ export { RenderEachDirective } from './components/render-each.directive';
9
+ export { RenderEmptyDirective } from './components/render-empty.directive';
10
+ export { RenderComponentComponent } from './components/render-component.component';
11
+ export { DateDirective } from './components/date.directive';
12
+ export { EditFrameComponent } from './components/editframe.component';
13
+ export { ComponentNameAndType, DYNAMIC_COMPONENT, ComponentNameAndModule, JssResolve, JssCanActivate, JssCanActivateFn, GuardInput, } from './services/placeholder.token';
14
+ export { PlaceholderLoadingDirective } from './components/placeholder-loading.directive';
15
+ export { isRawRendering } from './components/rendering';
16
+ export { FileField, ImageField, ImageFieldValue, LinkField, LinkFieldValue, RenderingField, RichTextField, TextField, } from './components/rendering-field';
17
+ export { RichTextDirective } from './components/rich-text.directive';
18
+ export { TextDirective } from './components/text.directive';
19
+ export { JssModule } from './lib.module';
20
+ export { mediaApi } from '@sitecore-jss/sitecore-jss/media';
21
+ export { DictionaryService, GraphQLDictionaryService, RestDictionaryService, } from '@sitecore-jss/sitecore-jss/i18n';
22
+ export { LayoutService, LayoutServiceData, LayoutServiceContextData, GraphQLLayoutService, RestLayoutService, PlaceholdersData, RouteData, Field, HtmlElementRendering, getChildPlaceholder, getFieldValue, ComponentRendering, ComponentFields, ComponentParams, } from '@sitecore-jss/sitecore-jss/layout';
23
+ export { RetryStrategy, DefaultRetryStrategy, GraphQLClientError, } from '@sitecore-jss/sitecore-jss/graphql';
24
+ export { constants, HttpDataFetcher, HttpResponse, enableDebug, ClientError, } from '@sitecore-jss/sitecore-jss';
25
+ export { isServer, isEditorActive, resetEditorChromes, handleEditorAnchors, DefaultEditFrameButton, DefaultEditFrameButtons, EditFrameDataSource, FieldEditButton, WebEditButton, } from '@sitecore-jss/sitecore-jss/utils';
26
+ export { trackingApi, TrackingRequestOptions, CampaignInstance, GoalInstance, OutcomeInstance, EventInstance, PageViewInstance, } from '@sitecore-jss/sitecore-jss/tracking';
@@ -1,13 +1,13 @@
1
- import { Injector } from '@angular/core';
2
- import { ActivatedRoute, Router } from '@angular/router';
3
- import { ComponentFactoryResult } from './jss-component-factory.service';
4
- /**
5
- * @param {Injector} injector
6
- * @param {ActivatedRoute} activatedRoute
7
- * @param {Router} router
8
- * @returns resolved data
9
- */
10
- export declare function dataResolverFactory(injector: Injector, activatedRoute: ActivatedRoute, router: Router): (factories: ComponentFactoryResult[]) => Promise<{
11
- factory: ComponentFactoryResult;
12
- data: Record<string, any>;
13
- }[]>;
1
+ import { Injector } from '@angular/core';
2
+ import { ActivatedRoute, Router } from '@angular/router';
3
+ import { ComponentFactoryResult } from './jss-component-factory.service';
4
+ /**
5
+ * @param {Injector} injector
6
+ * @param {ActivatedRoute} activatedRoute
7
+ * @param {Router} router
8
+ * @returns resolved data
9
+ */
10
+ export declare function dataResolverFactory(injector: Injector, activatedRoute: ActivatedRoute, router: Router): (factories: ComponentFactoryResult[]) => Promise<{
11
+ factory: ComponentFactoryResult;
12
+ data: Record<string, any>;
13
+ }[]>;
@@ -1,11 +1,11 @@
1
- import { Injector } from '@angular/core';
2
- import { ActivatedRoute, Router } from '@angular/router';
3
- import { ComponentFactoryResult } from './jss-component-factory.service';
4
- /**
5
- * Resolves components based on provided guards
6
- * @param {Injector} injector
7
- * @param {ActivatedRoute} activatedRoute
8
- * @param {Router} router
9
- * @returns {(factories: ComponentFactoryResult[]) => Promise<ComponentFactoryResult[]>} factory
10
- */
11
- export declare function guardResolverFactory(injector: Injector, activatedRoute: ActivatedRoute, router: Router): (factories: ComponentFactoryResult[]) => Promise<ComponentFactoryResult[]>;
1
+ import { Injector } from '@angular/core';
2
+ import { ActivatedRoute, Router } from '@angular/router';
3
+ import { ComponentFactoryResult } from './jss-component-factory.service';
4
+ /**
5
+ * Resolves components based on provided guards
6
+ * @param {Injector} injector
7
+ * @param {ActivatedRoute} activatedRoute
8
+ * @param {Router} router
9
+ * @returns {(factories: ComponentFactoryResult[]) => Promise<ComponentFactoryResult[]>} factory
10
+ */
11
+ export declare function guardResolverFactory(injector: Injector, activatedRoute: ActivatedRoute, router: Router): (factories: ComponentFactoryResult[]) => Promise<ComponentFactoryResult[]>;
@@ -1,10 +1,10 @@
1
- import { UrlTree } from '@angular/router';
2
- /**
3
- * Error thrown when a JssCanActivate guard returns a redirect value.
4
- * The redirect value will be used to redirect the user to a different route.
5
- */
6
- export declare class JssCanActivateRedirectError extends Error {
7
- message: string;
8
- redirectValue: string | string[] | UrlTree;
9
- constructor(message: string, redirectValue: string | string[] | UrlTree);
10
- }
1
+ import { UrlTree } from '@angular/router';
2
+ /**
3
+ * Error thrown when a JssCanActivate guard returns a redirect value.
4
+ * The redirect value will be used to redirect the user to a different route.
5
+ */
6
+ export declare class JssCanActivateRedirectError extends Error {
7
+ message: string;
8
+ redirectValue: string | string[] | UrlTree;
9
+ constructor(message: string, redirectValue: string | string[] | UrlTree);
10
+ }
@@ -1,26 +1,26 @@
1
- import { Injector, NgModuleRef, Type } from '@angular/core';
2
- import { ComponentRendering, HtmlElementRendering } from '@sitecore-jss/sitecore-jss/layout';
3
- import { ComponentNameAndModule, ComponentNameAndType, JssCanActivate, JssCanActivateFn, JssResolve } from './placeholder.token';
4
- import * as i0 from "@angular/core";
5
- export interface ComponentFactoryResult {
6
- componentImplementation?: Type<any>;
7
- componentDefinition: ComponentRendering | HtmlElementRendering;
8
- componentModuleRef?: NgModuleRef<unknown>;
9
- canActivate?: JssCanActivate | Type<JssCanActivate> | JssCanActivateFn | Array<JssCanActivate | JssCanActivateFn | Type<JssCanActivate>>;
10
- resolve?: {
11
- [key: string]: JssResolve<any> | Type<JssResolve<any>>;
12
- };
13
- }
14
- export declare class JssComponentFactoryService {
15
- private injector;
16
- private components;
17
- private lazyComponents;
18
- private componentMap;
19
- private lazyComponentMap;
20
- constructor(injector: Injector, components: ComponentNameAndType[], lazyComponents: ComponentNameAndModule[]);
21
- getComponent(component: ComponentRendering): Promise<ComponentFactoryResult>;
22
- getComponents(components: Array<ComponentRendering | HtmlElementRendering>): Promise<ComponentFactoryResult[]>;
23
- private getRawComponent;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<JssComponentFactoryService, never>;
25
- static ɵprov: i0.ɵɵInjectableDeclaration<JssComponentFactoryService>;
26
- }
1
+ import { Injector, NgModuleRef, Type } from '@angular/core';
2
+ import { ComponentRendering, HtmlElementRendering } from '@sitecore-jss/sitecore-jss/layout';
3
+ import { ComponentNameAndModule, ComponentNameAndType, JssCanActivate, JssCanActivateFn, JssResolve } from './placeholder.token';
4
+ import * as i0 from "@angular/core";
5
+ export interface ComponentFactoryResult {
6
+ componentImplementation?: Type<any>;
7
+ componentDefinition: ComponentRendering | HtmlElementRendering;
8
+ componentModuleRef?: NgModuleRef<unknown>;
9
+ canActivate?: JssCanActivate | Type<JssCanActivate> | JssCanActivateFn | Array<JssCanActivate | JssCanActivateFn | Type<JssCanActivate>>;
10
+ resolve?: {
11
+ [key: string]: JssResolve<any> | Type<JssResolve<any>>;
12
+ };
13
+ }
14
+ export declare class JssComponentFactoryService {
15
+ private injector;
16
+ private components;
17
+ private lazyComponents;
18
+ private componentMap;
19
+ private lazyComponentMap;
20
+ constructor(injector: Injector, components: ComponentNameAndType[], lazyComponents: ComponentNameAndModule[]);
21
+ getComponent(component: ComponentRendering): Promise<ComponentFactoryResult>;
22
+ getComponents(components: Array<ComponentRendering | HtmlElementRendering>): Promise<ComponentFactoryResult[]>;
23
+ private getRawComponent;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<JssComponentFactoryService, never>;
25
+ static ɵprov: i0.ɵɵInjectableDeclaration<JssComponentFactoryService>;
26
+ }
@@ -1,64 +1,64 @@
1
- import { InjectionToken, Type } from '@angular/core';
2
- import { ActivatedRouteSnapshot, Data, RouterStateSnapshot, UrlTree } from '@angular/router';
3
- import { Observable } from 'rxjs';
4
- import { ComponentFactoryResult } from './jss-component-factory.service';
5
- import { ComponentRendering } from '../public_api';
6
- /** Registers a statically loaded component */
7
- export declare class ComponentNameAndType {
8
- name: string;
9
- type: Type<unknown>;
10
- canActivate?: JssCanActivate | Type<JssCanActivate> | JssCanActivateFn | Array<JssCanActivate | JssCanActivateFn | Type<JssCanActivate>>;
11
- resolve?: {
12
- [key: string]: JssResolve<unknown> | Type<JssResolve<unknown>>;
13
- };
14
- }
15
- /** Registers a lazily loaded component by name and module to lazy load when it's needed */
16
- export interface ComponentNameAndModule {
17
- /** Name of the component */
18
- path: string;
19
- /**
20
- * Dynamic import of the component,
21
- * e.g. () => import('./path/to/lazyloadedcomponent.module').then(m => m.LazyLoadedComponentModuleExportName)
22
- */
23
- loadChildren: () => Promise<Type<unknown>>;
24
- canActivate?: JssCanActivate | JssCanActivateFn | Type<JssCanActivate> | Array<JssCanActivate | JssCanActivateFn | Type<JssCanActivate>>;
25
- resolve?: {
26
- [key: string]: JssResolve<unknown> | Type<JssResolve<unknown>>;
27
- };
28
- }
29
- /**
30
- * @param {unknown} object
31
- */
32
- export declare function instanceOfComponentNameAndType(object: unknown): object is ComponentNameAndType;
33
- /**
34
- * @param {unknown} object
35
- */
36
- export declare function instanceOfComponentNameAndModule(object: unknown): object is ComponentNameAndModule;
37
- export declare const PLACEHOLDER_COMPONENTS: InjectionToken<ComponentNameAndType[]>;
38
- export declare const PLACEHOLDER_LAZY_COMPONENTS: InjectionToken<ComponentNameAndType[]>;
39
- export declare const PLACEHOLDER_MISSING_COMPONENT_COMPONENT: InjectionToken<Type<unknown>>;
40
- export declare const PLACEHOLDER_HIDDEN_RENDERING_COMPONENT: InjectionToken<Type<unknown>>;
41
- export declare const DYNAMIC_COMPONENT: InjectionToken<Type<unknown> | {
42
- [s: string]: unknown;
43
- }>;
44
- export type GuardResolver = (result: ComponentFactoryResult[]) => Promise<ComponentFactoryResult[]>;
45
- export declare const GUARD_RESOLVER: InjectionToken<GuardResolver>;
46
- export type DataResolver = (result: ComponentFactoryResult[]) => Promise<Array<{
47
- factory: ComponentFactoryResult;
48
- data: Data;
49
- }>>;
50
- export declare const DATA_RESOLVER: InjectionToken<DataResolver>;
51
- export interface GuardInput {
52
- activatedRoute: ActivatedRouteSnapshot;
53
- routerState: RouterStateSnapshot;
54
- rendering: ComponentRendering;
55
- }
56
- export interface JssCanActivateFn {
57
- (input: GuardInput): Observable<boolean | UrlTree | string | string[]> | Promise<boolean | UrlTree | string | string[]> | boolean | UrlTree | string | string[];
58
- }
59
- export interface JssCanActivate {
60
- canActivate: JssCanActivateFn;
61
- }
62
- export interface JssResolve<T> {
63
- resolve(input: GuardInput): Observable<T> | Promise<T> | T;
64
- }
1
+ import { InjectionToken, Type } from '@angular/core';
2
+ import { ActivatedRouteSnapshot, Data, RouterStateSnapshot, UrlTree } from '@angular/router';
3
+ import { Observable } from 'rxjs';
4
+ import { ComponentFactoryResult } from './jss-component-factory.service';
5
+ import { ComponentRendering } from '../public_api';
6
+ /** Registers a statically loaded component */
7
+ export declare class ComponentNameAndType {
8
+ name: string;
9
+ type: Type<unknown>;
10
+ canActivate?: JssCanActivate | Type<JssCanActivate> | JssCanActivateFn | Array<JssCanActivate | JssCanActivateFn | Type<JssCanActivate>>;
11
+ resolve?: {
12
+ [key: string]: JssResolve<unknown> | Type<JssResolve<unknown>>;
13
+ };
14
+ }
15
+ /** Registers a lazily loaded component by name and module to lazy load when it's needed */
16
+ export interface ComponentNameAndModule {
17
+ /** Name of the component */
18
+ path: string;
19
+ /**
20
+ * Dynamic import of the component,
21
+ * e.g. () => import('./path/to/lazyloadedcomponent.module').then(m => m.LazyLoadedComponentModuleExportName)
22
+ */
23
+ loadChildren: () => Promise<Type<unknown>>;
24
+ canActivate?: JssCanActivate | JssCanActivateFn | Type<JssCanActivate> | Array<JssCanActivate | JssCanActivateFn | Type<JssCanActivate>>;
25
+ resolve?: {
26
+ [key: string]: JssResolve<unknown> | Type<JssResolve<unknown>>;
27
+ };
28
+ }
29
+ /**
30
+ * @param {unknown} object
31
+ */
32
+ export declare function instanceOfComponentNameAndType(object: unknown): object is ComponentNameAndType;
33
+ /**
34
+ * @param {unknown} object
35
+ */
36
+ export declare function instanceOfComponentNameAndModule(object: unknown): object is ComponentNameAndModule;
37
+ export declare const PLACEHOLDER_COMPONENTS: InjectionToken<ComponentNameAndType[]>;
38
+ export declare const PLACEHOLDER_LAZY_COMPONENTS: InjectionToken<ComponentNameAndType[]>;
39
+ export declare const PLACEHOLDER_MISSING_COMPONENT_COMPONENT: InjectionToken<Type<unknown>>;
40
+ export declare const PLACEHOLDER_HIDDEN_RENDERING_COMPONENT: InjectionToken<Type<unknown>>;
41
+ export declare const DYNAMIC_COMPONENT: InjectionToken<Type<unknown> | {
42
+ [s: string]: unknown;
43
+ }>;
44
+ export type GuardResolver = (result: ComponentFactoryResult[]) => Promise<ComponentFactoryResult[]>;
45
+ export declare const GUARD_RESOLVER: InjectionToken<GuardResolver>;
46
+ export type DataResolver = (result: ComponentFactoryResult[]) => Promise<Array<{
47
+ factory: ComponentFactoryResult;
48
+ data: Data;
49
+ }>>;
50
+ export declare const DATA_RESOLVER: InjectionToken<DataResolver>;
51
+ export interface GuardInput {
52
+ activatedRoute: ActivatedRouteSnapshot;
53
+ routerState: RouterStateSnapshot;
54
+ rendering: ComponentRendering;
55
+ }
56
+ export interface JssCanActivateFn {
57
+ (input: GuardInput): Observable<boolean | UrlTree | string | string[]> | Promise<boolean | UrlTree | string | string[]> | boolean | UrlTree | string | string[];
58
+ }
59
+ export interface JssCanActivate {
60
+ canActivate: JssCanActivateFn;
61
+ }
62
+ export interface JssResolve<T> {
63
+ resolve(input: GuardInput): Observable<T> | Promise<T> | T;
64
+ }
package/dist/utils.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { Observable } from 'rxjs';
2
- /**
3
- * @param {T} value
4
- * @returns {Promise | Observable | any} resolved value
5
- */
6
- export declare function wrapIntoObservable<T>(value: T | Promise<T> | Observable<T>): Observable<T>;
1
+ import { Observable } from 'rxjs';
2
+ /**
3
+ * @param {T} value
4
+ * @returns {Promise | Observable | any} resolved value
5
+ */
6
+ export declare function wrapIntoObservable<T>(value: T | Promise<T> | Observable<T>): Observable<T>;
package/ng-package.json CHANGED
@@ -1,13 +1,13 @@
1
- {
2
- "$schema": "./node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "dist",
4
- "lib": {
5
- "entryFile": "./src/public_api.ts"
6
- },
7
- "allowedNonPeerDependencies": [
8
- "sitecore-jss",
9
- "@angular/common",
10
- "@angular/core",
11
- "@angular/router"
12
- ]
13
- }
1
+ {
2
+ "$schema": "./node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "dist",
4
+ "lib": {
5
+ "entryFile": "./src/public_api.ts"
6
+ },
7
+ "allowedNonPeerDependencies": [
8
+ "sitecore-jss",
9
+ "@angular/common",
10
+ "@angular/core",
11
+ "@angular/router"
12
+ ]
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-jss/sitecore-jss-angular",
3
- "version": "21.7.0",
3
+ "version": "21.7.1-canary.2",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "ng-packagr -p ng-package.json",
@@ -58,7 +58,7 @@
58
58
  "rxjs": "~7.8.1"
59
59
  },
60
60
  "dependencies": {
61
- "@sitecore-jss/sitecore-jss": "21.7.0"
61
+ "@sitecore-jss/sitecore-jss": "^21.7.1-canary.2"
62
62
  },
63
63
  "main": "dist/esm2022/sitecore-jss-sitecore-jss-angular.mjs",
64
64
  "module": "dist/esm2022/sitecore-jss-sitecore-jss-angular.js",
@@ -68,7 +68,7 @@
68
68
  "esm2022": "dist/esm2022/sitecore-jss-sitecore-jss-angular.js",
69
69
  "fesm2022": "dist/fesm2022/sitecore-jss-sitecore-jss-angular.js",
70
70
  "sideEffects": false,
71
- "gitHead": "cab407f388b2015ea1d4b47bc53eb7b4da39c614",
71
+ "gitHead": "815c4bdc18a5b8843591f71e67bdd6b4148ebc54",
72
72
  "files": [
73
73
  "dist",
74
74
  "typings",
package/tsconfig.json CHANGED
@@ -1,9 +1,9 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "target": "es2022",
5
- "module": "es2022",
6
- "strictPropertyInitialization": false,
7
- "typeRoots": ["./node_modules/@types", "./typings"],
8
- }
9
- }
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "target": "es2022",
5
+ "module": "es2022",
6
+ "strictPropertyInitialization": false,
7
+ "typeRoots": ["./node_modules/@types", "./typings"],
8
+ }
9
+ }
@@ -1,18 +1,18 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "skipLibCheck": true,
5
- "outDir": "./dist/out-tsc",
6
- "types": [
7
- "jasmine"
8
- ]
9
- },
10
- "files": [
11
- "./src/test.ts"
12
- ],
13
- "include": [
14
- "**/*.spec.ts",
15
- "**/*.d.ts"
16
- ]
17
- }
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "skipLibCheck": true,
5
+ "outDir": "./dist/out-tsc",
6
+ "types": [
7
+ "jasmine"
8
+ ]
9
+ },
10
+ "files": [
11
+ "./src/test.ts"
12
+ ],
13
+ "include": [
14
+ "**/*.spec.ts",
15
+ "**/*.d.ts"
16
+ ]
17
+ }
18
18
 
package/typings/README.md CHANGED
@@ -1,2 +1,2 @@
1
- This folder is not a TypeScript v1 typings folder (which was a generated folder of typings).
2
- This is a manually maintained typings folder.
1
+ This folder is not a TypeScript v1 typings folder (which was a generated folder of typings).
2
+ This is a manually maintained typings folder.