@zdigambar/ngx-element 7.0.1 → 9.0.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/README.md +107 -105
- package/esm2022/lib/lazy-component-loaded-event.mjs +2 -2
- package/esm2022/lib/ngx-element.component.mjs +98 -98
- package/esm2022/lib/ngx-element.module.mjs +34 -34
- package/esm2022/lib/ngx-element.service.mjs +135 -135
- package/esm2022/lib/tokens.mjs +4 -4
- package/esm2022/public-api.mjs +5 -5
- package/esm2022/zdigambar-ngx-element.mjs +4 -4
- package/fesm2022/zdigambar-ngx-element.mjs +254 -254
- package/fesm2022/zdigambar-ngx-element.mjs.map +1 -1
- package/index.d.ts +5 -6
- package/lib/lazy-component-loaded-event.d.ts +5 -6
- package/lib/ngx-element.component.d.ts +24 -25
- package/lib/ngx-element.module.d.ts +12 -13
- package/lib/ngx-element.service.d.ts +31 -32
- package/lib/tokens.d.ts +7 -8
- package/package.json +7 -5
- package/public-api.d.ts +1 -2
- package/lib/lazy-component-loaded-event.d.ts.map +0 -1
- package/lib/ngx-element.component.d.ts.map +0 -1
- package/lib/ngx-element.module.d.ts.map +0 -1
- package/lib/ngx-element.service.d.ts.map +0 -1
- package/lib/tokens.d.ts.map +0 -1
- package/public-api.d.ts.map +0 -1
- package/zdigambar-ngx-element.d.ts.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Type } from '@angular/core';
|
|
2
|
-
export interface LazyCmpLoadedEvent {
|
|
3
|
-
selector: string;
|
|
4
|
-
componentClass: Type<any>;
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=lazy-component-loaded-event.d.ts.map
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
export interface LazyCmpLoadedEvent {
|
|
3
|
+
selector: string;
|
|
4
|
+
componentClass: Type<any>;
|
|
5
|
+
}
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { ComponentRef, OnInit, OnDestroy, ElementRef, Injector, Type } from '@angular/core';
|
|
2
|
-
import { NgxElementService } from './ngx-element.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NgxElementComponent implements OnInit, OnDestroy {
|
|
5
|
-
private ngxElementService;
|
|
6
|
-
private elementRef;
|
|
7
|
-
private ngElementEventsSubscription;
|
|
8
|
-
selector: string;
|
|
9
|
-
container: any;
|
|
10
|
-
componentRef: ComponentRef<any>;
|
|
11
|
-
componentToLoad: Type<any>;
|
|
12
|
-
injector: Injector;
|
|
13
|
-
constructor(ngxElementService: NgxElementService, elementRef: ElementRef);
|
|
14
|
-
private setProxiedOutputs;
|
|
15
|
-
ngOnInit(): void;
|
|
16
|
-
createComponent(attributes: any): void;
|
|
17
|
-
setAttributes(attributes: any): void;
|
|
18
|
-
getElementAttributes(): any[];
|
|
19
|
-
camelCaseAttribute(attribute: string): string;
|
|
20
|
-
listenToAttributeChanges(): void;
|
|
21
|
-
ngOnDestroy(): void;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxElementComponent, never>;
|
|
23
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxElementComponent, "lib-ngx-element", never, { "selector": { "alias": "selector"; "required": false; }; }, {}, never, never, false, never>;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=ngx-element.component.d.ts.map
|
|
1
|
+
import { ComponentRef, OnInit, OnDestroy, ElementRef, Injector, Type } from '@angular/core';
|
|
2
|
+
import { NgxElementService } from './ngx-element.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NgxElementComponent implements OnInit, OnDestroy {
|
|
5
|
+
private ngxElementService;
|
|
6
|
+
private elementRef;
|
|
7
|
+
private ngElementEventsSubscription;
|
|
8
|
+
selector: string;
|
|
9
|
+
container: any;
|
|
10
|
+
componentRef: ComponentRef<any>;
|
|
11
|
+
componentToLoad: Type<any>;
|
|
12
|
+
injector: Injector;
|
|
13
|
+
constructor(ngxElementService: NgxElementService, elementRef: ElementRef);
|
|
14
|
+
private setProxiedOutputs;
|
|
15
|
+
ngOnInit(): void;
|
|
16
|
+
createComponent(attributes: any): void;
|
|
17
|
+
setAttributes(attributes: any): void;
|
|
18
|
+
getElementAttributes(): any[];
|
|
19
|
+
camelCaseAttribute(attribute: string): string;
|
|
20
|
+
listenToAttributeChanges(): void;
|
|
21
|
+
ngOnDestroy(): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxElementComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgxElementComponent, "lib-ngx-element", never, { "selector": { "alias": "selector"; "required": false; }; }, {}, never, never, false, never>;
|
|
24
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { Injector, ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "./ngx-element.component";
|
|
4
|
-
export declare class NgxElementModule {
|
|
5
|
-
private injector;
|
|
6
|
-
constructor(injector: Injector);
|
|
7
|
-
static forRoot(modulePaths: any[]): ModuleWithProviders<NgxElementModule>;
|
|
8
|
-
ngDoBootstrap(): void;
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxElementModule, never>;
|
|
10
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxElementModule, [typeof i1.NgxElementComponent], never, never>;
|
|
11
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<NgxElementModule>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=ngx-element.module.d.ts.map
|
|
1
|
+
import { Injector, ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "./ngx-element.component";
|
|
4
|
+
export declare class NgxElementModule {
|
|
5
|
+
private injector;
|
|
6
|
+
constructor(injector: Injector);
|
|
7
|
+
static forRoot(modulePaths: any[]): ModuleWithProviders<NgxElementModule>;
|
|
8
|
+
ngDoBootstrap(): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxElementModule, never>;
|
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxElementModule, [typeof i1.NgxElementComponent], never, never>;
|
|
11
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgxElementModule>;
|
|
12
|
+
}
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { Type, Compiler, Injector, ComponentFactoryResolver } from '@angular/core';
|
|
2
|
-
import { LazyComponentDef } from './tokens';
|
|
3
|
-
import { LazyCmpLoadedEvent } from './lazy-component-loaded-event';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class NgxElementService {
|
|
7
|
-
private compiler;
|
|
8
|
-
private injector;
|
|
9
|
-
private componentsToLoad;
|
|
10
|
-
private loadedComponents;
|
|
11
|
-
private elementsLoading;
|
|
12
|
-
injectors: Map<Type<any>, Injector>;
|
|
13
|
-
componentFactoryResolvers: Map<Type<any>, ComponentFactoryResolver>;
|
|
14
|
-
constructor(modulePaths: {
|
|
15
|
-
selector: string;
|
|
16
|
-
}[], compiler: Compiler, injector: Injector);
|
|
17
|
-
receiveContext(component: Type<any>, injector: Injector): void;
|
|
18
|
-
getInjector(component: Type<any>): Injector;
|
|
19
|
-
getComponentFactoryResolver(component: Type<any>): ComponentFactoryResolver;
|
|
20
|
-
getComponentsToLoad(): Map<string, LazyComponentDef>;
|
|
21
|
-
getComponentToLoad(selector: string): Observable<LazyCmpLoadedEvent>;
|
|
22
|
-
/**
|
|
23
|
-
* Allows to lazy load a component given its selector.
|
|
24
|
-
* If the component selector has been registered, it's according module
|
|
25
|
-
* will be fetched lazily
|
|
26
|
-
* @param componentTag selector of the component to load
|
|
27
|
-
*/
|
|
28
|
-
loadComponent(componentSelector: string): Promise<LazyCmpLoadedEvent>;
|
|
29
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxElementService, never>;
|
|
30
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NgxElementService>;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=ngx-element.service.d.ts.map
|
|
1
|
+
import { Type, Compiler, Injector, ComponentFactoryResolver } from '@angular/core';
|
|
2
|
+
import { LazyComponentDef } from './tokens';
|
|
3
|
+
import { LazyCmpLoadedEvent } from './lazy-component-loaded-event';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class NgxElementService {
|
|
7
|
+
private compiler;
|
|
8
|
+
private injector;
|
|
9
|
+
private componentsToLoad;
|
|
10
|
+
private loadedComponents;
|
|
11
|
+
private elementsLoading;
|
|
12
|
+
injectors: Map<Type<any>, Injector>;
|
|
13
|
+
componentFactoryResolvers: Map<Type<any>, ComponentFactoryResolver>;
|
|
14
|
+
constructor(modulePaths: {
|
|
15
|
+
selector: string;
|
|
16
|
+
}[], compiler: Compiler, injector: Injector);
|
|
17
|
+
receiveContext(component: Type<any>, injector: Injector): void;
|
|
18
|
+
getInjector(component: Type<any>): Injector;
|
|
19
|
+
getComponentFactoryResolver(component: Type<any>): ComponentFactoryResolver;
|
|
20
|
+
getComponentsToLoad(): Map<string, LazyComponentDef>;
|
|
21
|
+
getComponentToLoad(selector: string): Observable<LazyCmpLoadedEvent>;
|
|
22
|
+
/**
|
|
23
|
+
* Allows to lazy load a component given its selector.
|
|
24
|
+
* If the component selector has been registered, it's according module
|
|
25
|
+
* will be fetched lazily
|
|
26
|
+
* @param componentTag selector of the component to load
|
|
27
|
+
*/
|
|
28
|
+
loadComponent(componentSelector: string): Promise<LazyCmpLoadedEvent>;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxElementService, never>;
|
|
30
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NgxElementService>;
|
|
31
|
+
}
|
package/lib/tokens.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { LoadChildrenCallback } from '@angular/router';
|
|
3
|
-
export declare const LAZY_CMPS_PATH_TOKEN: InjectionToken<unknown>;
|
|
4
|
-
export interface LazyComponentDef {
|
|
5
|
-
selector: string;
|
|
6
|
-
loadChildren: LoadChildrenCallback;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=tokens.d.ts.map
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { LoadChildrenCallback } from '@angular/router';
|
|
3
|
+
export declare const LAZY_CMPS_PATH_TOKEN: InjectionToken<unknown>;
|
|
4
|
+
export interface LazyComponentDef {
|
|
5
|
+
selector: string;
|
|
6
|
+
loadChildren: LoadChildrenCallback;
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zdigambar/ngx-element",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "A simple way to lazy load Angular components in non-angular projects",
|
|
5
5
|
"author": "Digambar Zurkale",
|
|
6
6
|
"repository": {
|
|
@@ -16,15 +16,17 @@
|
|
|
16
16
|
"elements",
|
|
17
17
|
"angular elements",
|
|
18
18
|
"AEM with non angular 10,angular 11,angular 12,angular 13,angular 14,angular 15,angular 16",
|
|
19
|
+
"angular 17",
|
|
20
|
+
"angular 18",
|
|
19
21
|
"web components",
|
|
20
22
|
"lazy loading",
|
|
21
23
|
"non-angular"
|
|
22
24
|
],
|
|
23
25
|
"licence": "MIT",
|
|
24
26
|
"peerDependencies": {
|
|
25
|
-
"@angular/common": "^
|
|
26
|
-
"@angular/core": "^
|
|
27
|
-
"@angular/elements": "^
|
|
27
|
+
"@angular/common": "^18.2.13",
|
|
28
|
+
"@angular/core": "^18.2.13",
|
|
29
|
+
"@angular/elements": "^18.2.13"
|
|
28
30
|
},
|
|
29
31
|
"module": "fesm2022/zdigambar-ngx-element.mjs",
|
|
30
32
|
"typings": "index.d.ts",
|
|
@@ -43,4 +45,4 @@
|
|
|
43
45
|
"dependencies": {
|
|
44
46
|
"tslib": "^2.3.0"
|
|
45
47
|
}
|
|
46
|
-
}
|
|
48
|
+
}
|
package/public-api.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from './lib/ngx-element.module';
|
|
2
|
-
//# sourceMappingURL=public-api.d.ts.map
|
|
1
|
+
export * from './lib/ngx-element.module';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazy-component-loaded-event.d.ts","sourceRoot":"","sources":["../../../projects/ngx-element/src/lib/lazy-component-loaded-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;CAC7B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-element.component.d.ts","sourceRoot":"","sources":["../../../projects/ngx-element/src/lib/ngx-element.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EACZ,MAAM,EAIN,SAAS,EAET,UAAU,EACV,QAAQ,EACR,IAAI,EACL,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;;AAI1D,qBAKa,mBAAoB,YAAW,MAAM,EAAE,SAAS;IASzD,OAAO,CAAC,iBAAiB;IACzB,OAAO,CAAC,UAAU;IATpB,OAAO,CAAC,2BAA2B,CAAe;IACzC,QAAQ,EAAE,MAAM,CAAC;IAC0B,SAAS,MAAC;IAC9D,YAAY,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IAChC,eAAe,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3B,QAAQ,EAAE,QAAQ,CAAC;gBAGT,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU;IAGhC,OAAO,CAAC,iBAAiB;IAazB,QAAQ,IAAI,IAAI;IAQhB,eAAe,CAAC,UAAU,KAAA;IAa1B,aAAa,CAAC,UAAU,KAAA;IAMxB,oBAAoB;IAepB,kBAAkB,CAAC,SAAS,EAAE,MAAM;IASpC,wBAAwB;IAcxB,WAAW;yCA3FA,mBAAmB;2CAAnB,mBAAmB;CA+F/B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-element.module.d.ts","sourceRoot":"","sources":["../../../projects/ngx-element/src/lib/ngx-element.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;;;AAKxE,qBAGa,gBAAgB;IAEf,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,QAAQ;IAKtC,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,mBAAmB,CAAC,gBAAgB,CAAC;IAYzE,aAAa;yCAnBF,gBAAgB;0CAAhB,gBAAgB;0CAAhB,gBAAgB;CAoB5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-element.service.d.ts","sourceRoot":"","sources":["../../../projects/ngx-element/src/lib/ngx-element.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACxH,OAAO,EAAwB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAQ,MAAM,MAAM,CAAC;;AAExC,qBAGa,iBAAiB;IAa1B,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,QAAQ;IAblB,OAAO,CAAC,gBAAgB,CAAgC;IACxD,OAAO,CAAC,gBAAgB,CAAgC;IACxD,OAAO,CAAC,eAAe,CAAkD;IAEzE,SAAS,2BAAkC;IAC3C,yBAAyB,2CAAkD;gBAIzE,WAAW,EAAE;QACX,QAAQ,EAAE,MAAM,CAAA;KACjB,EAAE,EACK,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ;IAU5B,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,QAAQ;IAKvD,WAAW,CAAC,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ;IAI3C,2BAA2B,CAAC,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,wBAAwB;IAI3E,mBAAmB;IAInB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAMpE;;;;;OAKG;IACH,aAAa,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;yCArD1D,iBAAiB;6CAAjB,iBAAiB;CA4I7B"}
|
package/lib/tokens.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../projects/ngx-element/src/lib/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAGvD,eAAO,MAAM,oBAAoB,yBAA8C,CAAC;AAEhF,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,oBAAoB,CAAC;CACpC"}
|
package/public-api.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../projects/ngx-element/src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,0BAA0B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zdigambar-ngx-element.d.ts","sourceRoot":"","sources":["../../projects/ngx-element/src/zdigambar-ngx-element.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
|