@veloceapps/sdk 2.0.1 → 2.0.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.
- package/bundles/veloce-sdk-cms.umd.js +213 -60
- package/bundles/veloce-sdk-cms.umd.js.map +1 -1
- package/bundles/veloce-sdk-runtime.umd.js +146 -146
- package/bundles/veloce-sdk-runtime.umd.js.map +1 -1
- package/bundles/veloce-sdk.umd.js.map +1 -1
- package/cms/components/federated/federated.component.d.ts +36 -0
- package/cms/components/federated/federated.module.d.ts +7 -0
- package/cms/utils/federated.util.d.ts +6 -0
- package/esm2015/cms/components/element-children/element-children.component.js +3 -3
- package/esm2015/cms/components/element-children/element-children.module.js +4 -4
- package/esm2015/cms/components/element-renderer/element-renderer.component.js +3 -3
- package/esm2015/cms/components/element-renderer/element-renderer.module.js +4 -4
- package/esm2015/cms/components/federated/federated.component.js +81 -0
- package/esm2015/cms/components/federated/federated.module.js +16 -0
- package/esm2015/cms/components/plugin.component.js +3 -3
- package/esm2015/cms/components/preview/preview.component.js +3 -3
- package/esm2015/cms/components/preview/preview.module.js +4 -4
- package/esm2015/cms/directives/custom-template.directive.js +3 -3
- package/esm2015/cms/launcher.module.js +4 -4
- package/esm2015/cms/modules/configuration/configuration.module.js +4 -4
- package/esm2015/cms/modules/configuration/services/configuration.service.js +3 -3
- package/esm2015/cms/plugins/configuration.plugin.js +3 -3
- package/esm2015/cms/plugins/io.plugin.js +3 -3
- package/esm2015/cms/plugins/script.plugin.js +3 -3
- package/esm2015/cms/services/dynamic-module.service.js +3 -3
- package/esm2015/cms/services/element-context.service.js +3 -3
- package/esm2015/cms/services/io-provider.service.js +3 -3
- package/esm2015/cms/services/launcher.service.js +6 -5
- package/esm2015/cms/services/templates.service.js +3 -3
- package/esm2015/cms/utils/federated.util.js +37 -0
- package/esm2015/runtime/components/component-preview/component-preview.component.js +3 -3
- package/esm2015/runtime/components/section-renderer/section-renderer.component.js +3 -3
- package/esm2015/runtime/components/ui-runtime/runtime.component.js +3 -3
- package/esm2015/runtime/components/ui-runtime-preview/runtime-preview.component.js +3 -3
- package/esm2015/runtime/execution/components/children-placeholder/children-placeholder.component.js +6 -6
- package/esm2015/runtime/execution/components/context-provider/context-provider.component.js +3 -3
- package/esm2015/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.js +3 -3
- package/esm2015/runtime/execution/components/federated/federated.component.js +3 -3
- package/esm2015/runtime/execution/components/velo-attribute/velo-attribute.component.js +3 -3
- package/esm2015/runtime/execution/components/velo-multiselect/velo-multiselect.component.js +3 -3
- package/esm2015/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.js +3 -3
- package/esm2015/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.js +3 -3
- package/esm2015/runtime/execution/components/velo-port-radio/velo-port-radio.component.js +3 -3
- package/esm2015/runtime/execution/components/velo-type/velo-type.component.js +3 -3
- package/esm2015/runtime/execution/directives/section-script.directive.js +3 -3
- package/esm2015/runtime/execution/directives/sf-query.directive.js +3 -3
- package/esm2015/runtime/execution/directives/velo-attribute.directive.js +3 -3
- package/esm2015/runtime/execution/directives/velo-port.directive.js +18 -18
- package/esm2015/runtime/execution/directives/vl-approval.directive.js +3 -3
- package/esm2015/runtime/execution/directives/vl-document-attachments.directive.js +3 -3
- package/esm2015/runtime/execution/directives/vl-document-templates.directive.js +3 -3
- package/esm2015/runtime/execution/directives/vl-quote.directive.js +3 -3
- package/esm2015/runtime/execution/directives/vl-ramp.directive.js +3 -3
- package/esm2015/runtime/execution/runtime-execution.module.js +4 -4
- package/esm2015/runtime/runtime.module.js +4 -4
- package/esm2015/runtime/services/cart.service.js +3 -3
- package/esm2015/runtime/services/collapsible-state.service.js +3 -3
- package/esm2015/runtime/services/configuration.service.js +3 -3
- package/esm2015/runtime/services/context.service.js +3 -3
- package/esm2015/runtime/services/current-state.service.js +3 -3
- package/esm2015/runtime/services/flow.service.js +3 -3
- package/esm2015/runtime/services/form-scope.service.js +3 -3
- package/esm2015/runtime/services/product-model-cache.service.js +3 -3
- package/esm2015/runtime/services/quote.service.js +3 -3
- package/esm2015/runtime/services/runtime-context.service.js +3 -3
- package/esm2015/runtime/services/runtime-form.service.js +3 -3
- package/esm2015/runtime/services/runtime.service.js +3 -3
- package/esm2015/runtime/services/section-helper.service.js +3 -3
- package/esm2015/runtime/services/section-scope.service.js +3 -3
- package/esm2015/runtime/services/section-store.service.js +3 -3
- package/esm2015/runtime/services/section.service.js +6 -6
- package/fesm2015/veloce-sdk-cms.js +189 -62
- package/fesm2015/veloce-sdk-cms.js.map +1 -1
- package/fesm2015/veloce-sdk-runtime.js +146 -146
- package/fesm2015/veloce-sdk-runtime.js.map +1 -1
- package/fesm2015/veloce-sdk.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { __decorate, __param, __rest } from 'tslib';
|
|
1
|
+
import { __decorate, __param, __awaiter, __rest } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, Component, ChangeDetectionStrategy, Inject, Injector, Injectable, ViewContainerRef, SkipSelf, ViewChild, Input, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import { InjectionToken, Component, ChangeDetectionStrategy, Inject, Injector, Injectable, ViewContainerRef, SkipSelf, ViewChild, Input, Directive, EventEmitter, TemplateRef, Output, NgModule } from '@angular/core';
|
|
4
4
|
import * as rxjs from 'rxjs';
|
|
5
5
|
import { BehaviorSubject, combineLatest, of, shareReplay, throwError, Subject, takeUntil, map as map$1, from, tap as tap$1, forkJoin, catchError as catchError$1 } from 'rxjs';
|
|
6
6
|
import { EntityUtil, UUID, ConfigurationMode, ConfigurationContextMode, RuntimeModel, CoreModule } from '@veloce/core';
|
|
@@ -315,9 +315,9 @@ class ConfigurationService {
|
|
|
315
315
|
};
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
ConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
319
|
-
ConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
318
|
+
ConfigurationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationService, deps: [{ token: i1.ConfigurationApiService }, { token: i2.ContextService }, { token: i1.ConfigurationApiService }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
319
|
+
ConfigurationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationService });
|
|
320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationService, decorators: [{
|
|
321
321
|
type: Injectable
|
|
322
322
|
}], ctorParameters: function () { return [{ type: i1.ConfigurationApiService }, { type: i2.ContextService }, { type: i1.ConfigurationApiService }, { type: i3.MessageService }]; } });
|
|
323
323
|
|
|
@@ -398,9 +398,9 @@ class DynamicModuleService {
|
|
|
398
398
|
this.componentFactories = [];
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
DynamicModuleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
402
|
-
DynamicModuleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
403
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
401
|
+
DynamicModuleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DynamicModuleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
402
|
+
DynamicModuleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DynamicModuleService });
|
|
403
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DynamicModuleService, decorators: [{
|
|
404
404
|
type: Injectable
|
|
405
405
|
}] });
|
|
406
406
|
|
|
@@ -439,9 +439,9 @@ class IOProviderService {
|
|
|
439
439
|
return this.inputs[path][name];
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
IOProviderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
443
|
-
IOProviderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
442
|
+
IOProviderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: IOProviderService, deps: [{ token: DynamicModuleService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
443
|
+
IOProviderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: IOProviderService });
|
|
444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: IOProviderService, decorators: [{
|
|
445
445
|
type: Injectable
|
|
446
446
|
}], ctorParameters: function () { return [{ type: DynamicModuleService }]; } });
|
|
447
447
|
|
|
@@ -456,9 +456,9 @@ class TemplatesService {
|
|
|
456
456
|
return this.templates[name];
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
|
-
TemplatesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
460
|
-
TemplatesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
461
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
459
|
+
TemplatesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TemplatesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
460
|
+
TemplatesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TemplatesService });
|
|
461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: TemplatesService, decorators: [{
|
|
462
462
|
type: Injectable
|
|
463
463
|
}] });
|
|
464
464
|
|
|
@@ -520,9 +520,9 @@ const extendElementMetadata = (script, extend) => {
|
|
|
520
520
|
|
|
521
521
|
class ElementContextService {
|
|
522
522
|
}
|
|
523
|
-
ElementContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
524
|
-
ElementContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
525
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
523
|
+
ElementContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
524
|
+
ElementContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementContextService });
|
|
525
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementContextService, decorators: [{
|
|
526
526
|
type: Injectable
|
|
527
527
|
}] });
|
|
528
528
|
|
|
@@ -638,9 +638,9 @@ class ElementRendererComponent {
|
|
|
638
638
|
this.refs = {};
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
|
-
ElementRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
642
|
-
ElementRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
643
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
641
|
+
ElementRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementRendererComponent, deps: [{ token: i0.Injector, skipSelf: true }, { token: DynamicModuleService }, { token: ElementContextService }, { token: IOProviderService }, { token: ConfigurationService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
642
|
+
ElementRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: { meta: "meta" }, providers: [ElementContextService], viewQueries: [{ propertyName: "el", first: true, predicate: ["el"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<ng-template #el></ng-template>\n", styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
643
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementRendererComponent, decorators: [{
|
|
644
644
|
type: Component,
|
|
645
645
|
args: [{
|
|
646
646
|
selector: 'vl-cms-element-renderer',
|
|
@@ -664,9 +664,9 @@ class ElementChildrenComponent {
|
|
|
664
664
|
this.metadata = this.elementContext.metadata;
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
|
-
ElementChildrenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
668
|
-
ElementChildrenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
669
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
667
|
+
ElementChildrenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementChildrenComponent, deps: [{ token: ElementContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
668
|
+
ElementChildrenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ElementChildrenComponent, selector: "element-children", ngImport: i0, template: "<ng-container *ngIf=\"metadata?.children.length\">\n <ng-container *ngFor=\"let child of metadata.children\">\n <vl-cms-element-renderer [meta]=\"child\"></vl-cms-element-renderer>\n </ng-container>\n</ng-container>\n", styles: [":host{display:contents}\n"], components: [{ type: ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: ["meta"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementChildrenComponent, decorators: [{
|
|
670
670
|
type: Component,
|
|
671
671
|
args: [{
|
|
672
672
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
@@ -690,9 +690,9 @@ class CustomTemplateDirective {
|
|
|
690
690
|
this.templatesService.register(this.customTemplate, this.templateRef);
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
|
-
CustomTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
694
|
-
CustomTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
695
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
693
|
+
CustomTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CustomTemplateDirective, deps: [{ token: i0.TemplateRef }, { token: TemplatesService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
694
|
+
CustomTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: CustomTemplateDirective, selector: "[customTemplate]", inputs: { customTemplate: "customTemplate" }, ngImport: i0 });
|
|
695
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: CustomTemplateDirective, decorators: [{
|
|
696
696
|
type: Directive,
|
|
697
697
|
args: [{ selector: '[customTemplate]' }]
|
|
698
698
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: TemplatesService }]; }, propDecorators: { customTemplate: [{
|
|
@@ -783,9 +783,9 @@ class ConfigurationPlugin {
|
|
|
783
783
|
return this.host;
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
ConfigurationPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
787
|
-
ConfigurationPlugin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
788
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
786
|
+
ConfigurationPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationPlugin, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
787
|
+
ConfigurationPlugin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: ConfigurationPlugin, ngImport: i0 });
|
|
788
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationPlugin, decorators: [{
|
|
789
789
|
type: Directive
|
|
790
790
|
}], ctorParameters: function () { return [{ type: undefined }]; } });
|
|
791
791
|
|
|
@@ -863,9 +863,9 @@ class ScriptPlugin {
|
|
|
863
863
|
this.document.body.removeChild(script);
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
|
-
ScriptPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
867
|
-
ScriptPlugin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
868
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
866
|
+
ScriptPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ScriptPlugin, deps: [{ token: ElementComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
867
|
+
ScriptPlugin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: ScriptPlugin, ngImport: i0 });
|
|
868
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ScriptPlugin, decorators: [{
|
|
869
869
|
type: Directive
|
|
870
870
|
}], ctorParameters: function () { return [{ type: ElementComponent }]; } });
|
|
871
871
|
|
|
@@ -900,9 +900,9 @@ class IOPlugin {
|
|
|
900
900
|
});
|
|
901
901
|
}
|
|
902
902
|
}
|
|
903
|
-
IOPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
904
|
-
IOPlugin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
905
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
903
|
+
IOPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: IOPlugin, deps: [{ token: ElementComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
904
|
+
IOPlugin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: IOPlugin, ngImport: i0 });
|
|
905
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: IOPlugin, decorators: [{
|
|
906
906
|
type: Directive
|
|
907
907
|
}], ctorParameters: function () { return [{ type: ElementComponent }]; } });
|
|
908
908
|
|
|
@@ -1008,6 +1008,133 @@ class ElementsResolver {
|
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
1010
|
|
|
1011
|
+
const moduleMap = {};
|
|
1012
|
+
function loadRemoteEntry(remoteEntry) {
|
|
1013
|
+
return new Promise((resolve, reject) => {
|
|
1014
|
+
if (moduleMap[remoteEntry]) {
|
|
1015
|
+
resolve();
|
|
1016
|
+
return;
|
|
1017
|
+
}
|
|
1018
|
+
const script = document.createElement('script');
|
|
1019
|
+
script.src = remoteEntry;
|
|
1020
|
+
script.onerror = reject;
|
|
1021
|
+
script.onload = () => {
|
|
1022
|
+
moduleMap[remoteEntry] = true;
|
|
1023
|
+
resolve(); // window is the global namespace
|
|
1024
|
+
};
|
|
1025
|
+
document.body.append(script);
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
function lookupExposedModule(remoteName, exposedModule) {
|
|
1029
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1030
|
+
// Initializes the share scope. This fills it with known provided modules from this build and all remotes
|
|
1031
|
+
yield __webpack_init_sharing__('default');
|
|
1032
|
+
const container = window[remoteName]; // or get the container somewhere else
|
|
1033
|
+
// Initialize the container, it may provide shared modules
|
|
1034
|
+
yield container.init(__webpack_share_scopes__.default);
|
|
1035
|
+
const factory = yield container.get(exposedModule);
|
|
1036
|
+
const Module = factory();
|
|
1037
|
+
return Module;
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
function loadRemoteModule(options) {
|
|
1041
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1042
|
+
yield loadRemoteEntry(options.remoteEntry);
|
|
1043
|
+
return yield lookupExposedModule(options.remoteName, options.exposedModule);
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
var IntegrationEvent;
|
|
1048
|
+
(function (IntegrationEvent) {
|
|
1049
|
+
IntegrationEvent["Init"] = "Init";
|
|
1050
|
+
})(IntegrationEvent || (IntegrationEvent = {}));
|
|
1051
|
+
class FederatedComponent {
|
|
1052
|
+
constructor(injector, compiler, appRef, renderer) {
|
|
1053
|
+
this.injector = injector;
|
|
1054
|
+
this.compiler = compiler;
|
|
1055
|
+
this.appRef = appRef;
|
|
1056
|
+
this.renderer = renderer;
|
|
1057
|
+
this.integrationEvent = new EventEmitter();
|
|
1058
|
+
this.moduleReady = false;
|
|
1059
|
+
}
|
|
1060
|
+
ngAfterViewInit() {
|
|
1061
|
+
if (!this.remoteEntry || !this.remoteName || !this.exposedModule) {
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1064
|
+
loadRemoteModule({
|
|
1065
|
+
remoteEntry: this.remoteEntry,
|
|
1066
|
+
remoteName: this.remoteName,
|
|
1067
|
+
exposedModule: this.exposedModule,
|
|
1068
|
+
}).then(federated => {
|
|
1069
|
+
this.compiler.compileModuleAsync(federated[this.exposedModule]).then(moduleFactory => {
|
|
1070
|
+
var _a;
|
|
1071
|
+
const rootModuleRef = moduleFactory.create(this.injector);
|
|
1072
|
+
const rootComponentFactory = rootModuleRef.componentFactoryResolver.resolveComponentFactory(federated[this.exposedModule].rootComponent);
|
|
1073
|
+
const node = document.createElement('div');
|
|
1074
|
+
const { instance, hostView } = rootComponentFactory.create(this.injector, [], node);
|
|
1075
|
+
this.instance = instance;
|
|
1076
|
+
this.instance.data = this.data;
|
|
1077
|
+
this.instance.eventData = this.eventData;
|
|
1078
|
+
this.instance.integrationEvent = this.integrationEvent;
|
|
1079
|
+
this.renderer.appendChild((_a = this.moduleHostRef) === null || _a === void 0 ? void 0 : _a.nativeElement, node);
|
|
1080
|
+
this.appRef.attachView(hostView);
|
|
1081
|
+
});
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
ngOnChanges(changes) {
|
|
1085
|
+
if (!this.instance) {
|
|
1086
|
+
return;
|
|
1087
|
+
}
|
|
1088
|
+
this.instance.ngOnChanges(changes);
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
FederatedComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FederatedComponent, deps: [{ token: i0.Injector }, { token: i0.Compiler }, { token: i0.ApplicationRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
1092
|
+
FederatedComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FederatedComponent, selector: "veloce-host-federated", inputs: { remoteEntry: "remoteEntry", remoteName: "remoteName", exposedModule: "exposedModule", data: "data", eventData: "eventData" }, outputs: { integrationEvent: "integrationEvent" }, viewQueries: [{ propertyName: "federatedComponent", first: true, predicate: ["federatedComponent"], descendants: true, read: ViewContainerRef }, { propertyName: "foo", first: true, predicate: ["foo"], descendants: true, read: TemplateRef }, { propertyName: "moduleHostRef", first: true, predicate: ["moduleHost"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #moduleHost></div>\n", styles: [":host{display:block}div{height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1093
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FederatedComponent, decorators: [{
|
|
1094
|
+
type: Component,
|
|
1095
|
+
args: [{
|
|
1096
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1097
|
+
selector: 'veloce-host-federated',
|
|
1098
|
+
templateUrl: './federated.component.html',
|
|
1099
|
+
styleUrls: ['./federated.component.scss'],
|
|
1100
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1101
|
+
}]
|
|
1102
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Compiler }, { type: i0.ApplicationRef }, { type: i0.Renderer2 }]; }, propDecorators: { federatedComponent: [{
|
|
1103
|
+
type: ViewChild,
|
|
1104
|
+
args: ['federatedComponent', { read: ViewContainerRef }]
|
|
1105
|
+
}], foo: [{
|
|
1106
|
+
type: ViewChild,
|
|
1107
|
+
args: ['foo', { read: TemplateRef }]
|
|
1108
|
+
}], moduleHostRef: [{
|
|
1109
|
+
type: ViewChild,
|
|
1110
|
+
args: ['moduleHost', { static: false }]
|
|
1111
|
+
}], remoteEntry: [{
|
|
1112
|
+
type: Input
|
|
1113
|
+
}], remoteName: [{
|
|
1114
|
+
type: Input
|
|
1115
|
+
}], exposedModule: [{
|
|
1116
|
+
type: Input
|
|
1117
|
+
}], data: [{
|
|
1118
|
+
type: Input
|
|
1119
|
+
}], eventData: [{
|
|
1120
|
+
type: Input
|
|
1121
|
+
}], integrationEvent: [{
|
|
1122
|
+
type: Output
|
|
1123
|
+
}] } });
|
|
1124
|
+
|
|
1125
|
+
class FederatedModule {
|
|
1126
|
+
}
|
|
1127
|
+
FederatedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FederatedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1128
|
+
FederatedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FederatedModule, declarations: [FederatedComponent], exports: [FederatedComponent] });
|
|
1129
|
+
FederatedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FederatedModule });
|
|
1130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: FederatedModule, decorators: [{
|
|
1131
|
+
type: NgModule,
|
|
1132
|
+
args: [{
|
|
1133
|
+
declarations: [FederatedComponent],
|
|
1134
|
+
exports: [FederatedComponent],
|
|
1135
|
+
}]
|
|
1136
|
+
}] });
|
|
1137
|
+
|
|
1011
1138
|
class LauncherService {
|
|
1012
1139
|
constructor(compiler, dynamicModuleService) {
|
|
1013
1140
|
this.compiler = compiler;
|
|
@@ -1038,7 +1165,7 @@ class LauncherService {
|
|
|
1038
1165
|
};
|
|
1039
1166
|
DynamicModule = __decorate([
|
|
1040
1167
|
NgModule({
|
|
1041
|
-
imports: [CommonModule, ReactiveFormsModule],
|
|
1168
|
+
imports: [CommonModule, ReactiveFormsModule, FederatedModule],
|
|
1042
1169
|
declarations: [...staticComponents, ...elementsResolver.getNgComponents()],
|
|
1043
1170
|
jit: true,
|
|
1044
1171
|
})
|
|
@@ -1046,9 +1173,9 @@ class LauncherService {
|
|
|
1046
1173
|
return DynamicModule;
|
|
1047
1174
|
}
|
|
1048
1175
|
}
|
|
1049
|
-
LauncherService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1050
|
-
LauncherService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
1051
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1176
|
+
LauncherService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LauncherService, deps: [{ token: i0.Compiler }, { token: DynamicModuleService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1177
|
+
LauncherService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LauncherService });
|
|
1178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LauncherService, decorators: [{
|
|
1052
1179
|
type: Injectable
|
|
1053
1180
|
}], ctorParameters: function () { return [{ type: i0.Compiler }, { type: DynamicModuleService }]; } });
|
|
1054
1181
|
|
|
@@ -1096,9 +1223,9 @@ class PreviewComponent {
|
|
|
1096
1223
|
.subscribe();
|
|
1097
1224
|
}
|
|
1098
1225
|
}
|
|
1099
|
-
PreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1100
|
-
PreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1226
|
+
PreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreviewComponent, deps: [{ token: LauncherService }, { token: ConfigurationService }, { token: i3.MessageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1227
|
+
PreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: PreviewComponent, selector: "vl-cms-preview", inputs: { modelId: "modelId", uiDefinition: "uiDefinition" }, providers: [IOProviderService, ConfigurationService, TemplatesService], ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-element-renderer *ngFor=\"let el of elements\" [meta]=\"el\"></vl-cms-element-renderer>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [":host{flex-grow:1;display:flex;flex-direction:column;height:100%}\n"], components: [{ type: i4.LoaderComponent, selector: "vl-loader", inputs: ["label"] }, { type: ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: ["meta"] }], directives: [{ type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i6.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreviewComponent, decorators: [{
|
|
1102
1229
|
type: Component,
|
|
1103
1230
|
args: [{
|
|
1104
1231
|
selector: 'vl-cms-preview',
|
|
@@ -1115,10 +1242,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1115
1242
|
|
|
1116
1243
|
class ElementRendererModule {
|
|
1117
1244
|
}
|
|
1118
|
-
ElementRendererModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1119
|
-
ElementRendererModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1120
|
-
ElementRendererModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
1121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1245
|
+
ElementRendererModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementRendererModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1246
|
+
ElementRendererModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementRendererModule, declarations: [ElementRendererComponent], exports: [ElementRendererComponent] });
|
|
1247
|
+
ElementRendererModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementRendererModule });
|
|
1248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementRendererModule, decorators: [{
|
|
1122
1249
|
type: NgModule,
|
|
1123
1250
|
args: [{
|
|
1124
1251
|
declarations: [ElementRendererComponent],
|
|
@@ -1128,10 +1255,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1128
1255
|
|
|
1129
1256
|
class ElementChildrenModule {
|
|
1130
1257
|
}
|
|
1131
|
-
ElementChildrenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1132
|
-
ElementChildrenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1133
|
-
ElementChildrenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
1134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1258
|
+
ElementChildrenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementChildrenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1259
|
+
ElementChildrenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementChildrenModule, declarations: [ElementChildrenComponent], imports: [ElementRendererModule], exports: [ElementChildrenComponent] });
|
|
1260
|
+
ElementChildrenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementChildrenModule, imports: [[ElementRendererModule]] });
|
|
1261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ElementChildrenModule, decorators: [{
|
|
1135
1262
|
type: NgModule,
|
|
1136
1263
|
args: [{
|
|
1137
1264
|
declarations: [ElementChildrenComponent],
|
|
@@ -1142,10 +1269,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1142
1269
|
|
|
1143
1270
|
class PreviewModule {
|
|
1144
1271
|
}
|
|
1145
|
-
PreviewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1146
|
-
PreviewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1147
|
-
PreviewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
1148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1272
|
+
PreviewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreviewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1273
|
+
PreviewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreviewModule, declarations: [PreviewComponent], imports: [CommonModule, LoaderModule, ElementRendererModule, ElementChildrenModule], exports: [PreviewComponent] });
|
|
1274
|
+
PreviewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreviewModule, imports: [[CommonModule, LoaderModule, ElementRendererModule, ElementChildrenModule]] });
|
|
1275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PreviewModule, decorators: [{
|
|
1149
1276
|
type: NgModule,
|
|
1150
1277
|
args: [{
|
|
1151
1278
|
declarations: [PreviewComponent],
|
|
@@ -1162,10 +1289,10 @@ function ElementDefinition(definition) {
|
|
|
1162
1289
|
|
|
1163
1290
|
class ConfigurationModule {
|
|
1164
1291
|
}
|
|
1165
|
-
ConfigurationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1166
|
-
ConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1167
|
-
ConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
1168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1292
|
+
ConfigurationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1293
|
+
ConfigurationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationModule });
|
|
1294
|
+
ConfigurationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationModule, providers: [ContextService, ContextApiService, ProductModelApiService, ConfigurationApiService] });
|
|
1295
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationModule, decorators: [{
|
|
1169
1296
|
type: NgModule,
|
|
1170
1297
|
args: [{
|
|
1171
1298
|
providers: [ContextService, ContextApiService, ProductModelApiService, ConfigurationApiService],
|
|
@@ -1174,10 +1301,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1174
1301
|
|
|
1175
1302
|
class LauncherModule {
|
|
1176
1303
|
}
|
|
1177
|
-
LauncherModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1178
|
-
LauncherModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
1179
|
-
LauncherModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
1180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1304
|
+
LauncherModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LauncherModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1305
|
+
LauncherModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LauncherModule, imports: [CommonModule, CoreModule, ConfigurationModule] });
|
|
1306
|
+
LauncherModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LauncherModule, providers: [LauncherService, DynamicModuleService], imports: [[CommonModule, CoreModule, ConfigurationModule]] });
|
|
1307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: LauncherModule, decorators: [{
|
|
1181
1308
|
type: NgModule,
|
|
1182
1309
|
args: [{
|
|
1183
1310
|
imports: [CommonModule, CoreModule, ConfigurationModule],
|