@veloceapps/sdk 2.0.9 → 2.0.10
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 +315 -316
- package/bundles/veloce-sdk-cms.umd.js.map +1 -1
- package/bundles/veloce-sdk-runtime.umd.js +144 -144
- package/bundles/veloce-sdk-runtime.umd.js.map +1 -1
- package/bundles/veloce-sdk.umd.js +60 -60
- package/bundles/veloce-sdk.umd.js.map +1 -1
- package/cms/injection-tokens.d.ts +2 -0
- package/cms/modules/configuration/services/configuration-runtime.service.d.ts +1 -1
- package/cms/plugins/configuration.plugin.d.ts +2 -3
- package/cms/plugins/script.plugin.d.ts +1 -0
- package/cms/vendor-map.d.ts +2 -0
- package/esm2015/cms/cms.default.js +3 -4
- package/esm2015/cms/cms.elements.js +9 -5
- 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 +3 -3
- package/esm2015/cms/components/federated/federated.module.js +4 -4
- 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/injection-tokens.js +2 -1
- package/esm2015/cms/launcher.module.js +4 -4
- package/esm2015/cms/modules/configuration/configuration.module.js +4 -4
- package/esm2015/cms/modules/configuration/helpers.js +2 -2
- package/esm2015/cms/modules/configuration/services/configuration-runtime.service.js +26 -17
- package/esm2015/cms/modules/configuration/services/configuration.service.js +6 -26
- package/esm2015/cms/modules/configuration/services/runtime-context.service.js +8 -6
- package/esm2015/cms/plugins/configuration.plugin.js +5 -7
- package/esm2015/cms/plugins/io.plugin.js +3 -3
- package/esm2015/cms/plugins/script.plugin.js +7 -29
- 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 +5 -5
- package/esm2015/cms/services/templates.service.js +3 -3
- package/esm2015/cms/utils/elements-resolver.js +4 -2
- package/esm2015/cms/vendor-map.js +24 -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 +6 -6
- package/esm2015/runtime/services/current-state.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/esm2015/src/flow-routing.module.js +4 -4
- package/esm2015/src/flow.component.js +3 -3
- package/esm2015/src/flow.module.js +4 -4
- package/esm2015/src/guards/context.guard.js +3 -3
- package/esm2015/src/guards/root.guard.js +3 -3
- package/esm2015/src/pages/debug/debug.component.js +3 -3
- package/esm2015/src/pages/debug/debug.module.js +4 -4
- package/esm2015/src/pages/legacy-product/legacy-product.component.js +3 -3
- package/esm2015/src/pages/legacy-product/legacy-product.module.js +4 -4
- package/esm2015/src/pages/product/product.component.js +3 -3
- package/esm2015/src/pages/product/product.module.js +4 -4
- package/esm2015/src/pages/record-not-found/record-not-found.component.js +3 -3
- package/esm2015/src/pages/record-not-found/record-not-found.module.js +4 -4
- package/esm2015/src/resolvers/context.resolver.js +3 -3
- package/esm2015/src/resolvers/flow.resolver.js +3 -3
- package/esm2015/src/resolvers/quote.resolver.js +3 -3
- package/esm2015/src/services/flow.service.js +3 -3
- package/esm2015/src/services/router.service.js +3 -3
- package/fesm2015/veloce-sdk-cms.js +284 -286
- package/fesm2015/veloce-sdk-cms.js.map +1 -1
- package/fesm2015/veloce-sdk-runtime.js +144 -144
- package/fesm2015/veloce-sdk-runtime.js.map +1 -1
- package/fesm2015/veloce-sdk.js +60 -60
- package/fesm2015/veloce-sdk.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@angular/common'), require('@
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@veloce/sdk/cms', ['exports', '@angular/core', 'rxjs', '@angular/common', '@
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloce = global.veloce || {}, global.veloce.sdk = global.veloce.sdk || {}, global.veloce.sdk.cms = {}), global.ng.core, global.rxjs, global.ng.common, global
|
|
5
|
-
})(this, (function (exports, i0, rxjs, i7,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@angular/common'), require('@veloce/core'), require('@angular/forms'), require('lodash'), require('@veloce/sdk/runtime'), require('rxjs/operators'), require('@veloce/api'), require('primeng/api'), require('@babel/standalone'), require('@veloce/components')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@veloce/sdk/cms', ['exports', '@angular/core', 'rxjs', '@angular/common', '@veloce/core', '@angular/forms', 'lodash', '@veloce/sdk/runtime', 'rxjs/operators', '@veloce/api', 'primeng/api', '@babel/standalone', '@veloce/components'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloce = global.veloce || {}, global.veloce.sdk = global.veloce.sdk || {}, global.veloce.sdk.cms = {}), global.ng.core, global.rxjs, global.ng.common, global["@veloce/core"], global.ng.forms, global.lodash, global.veloce.sdk.runtime, global.rxjs.operators, global["@veloce/api"], global["primeng/api"], global["@babel/standalone"], global["@veloce/components"]));
|
|
5
|
+
})(this, (function (exports, i0, rxjs, i7, core, angularForms, lodash, i2, rxjsOperators, i1, i2$1, standalone, i5) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -356,6 +356,7 @@
|
|
|
356
356
|
var ELEMENT_METADATA = new i0.InjectionToken('ELEMENT_METADATA_TOKEN');
|
|
357
357
|
var SHARED_ELEMENT_METADATA = new i0.InjectionToken('SHARED_ELEMENT_METADATA_TOKEN');
|
|
358
358
|
var ELEMENT_CONFIG = new i0.InjectionToken('ELEMENT_CONFIG_TOKEN');
|
|
359
|
+
var VENDOR_MAP = new i0.InjectionToken('VENDOR_MAP');
|
|
359
360
|
|
|
360
361
|
var vlInjectionTokens = /*#__PURE__*/Object.freeze({
|
|
361
362
|
__proto__: null,
|
|
@@ -363,7 +364,8 @@
|
|
|
363
364
|
UI_DEFINITION_METADATA: UI_DEFINITION_METADATA,
|
|
364
365
|
ELEMENT_METADATA: ELEMENT_METADATA,
|
|
365
366
|
SHARED_ELEMENT_METADATA: SHARED_ELEMENT_METADATA,
|
|
366
|
-
ELEMENT_CONFIG: ELEMENT_CONFIG
|
|
367
|
+
ELEMENT_CONFIG: ELEMENT_CONFIG,
|
|
368
|
+
VENDOR_MAP: VENDOR_MAP
|
|
367
369
|
});
|
|
368
370
|
|
|
369
371
|
var Entity = /** @class */ (function () {
|
|
@@ -511,9 +513,9 @@
|
|
|
511
513
|
};
|
|
512
514
|
return DynamicModuleService;
|
|
513
515
|
}());
|
|
514
|
-
DynamicModuleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
515
|
-
DynamicModuleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
516
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
516
|
+
DynamicModuleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DynamicModuleService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
517
|
+
DynamicModuleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DynamicModuleService });
|
|
518
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DynamicModuleService, decorators: [{
|
|
517
519
|
type: i0.Injectable
|
|
518
520
|
}] });
|
|
519
521
|
|
|
@@ -553,9 +555,9 @@
|
|
|
553
555
|
};
|
|
554
556
|
return IOProviderService;
|
|
555
557
|
}());
|
|
556
|
-
IOProviderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
557
|
-
IOProviderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
558
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
558
|
+
IOProviderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IOProviderService, deps: [{ token: DynamicModuleService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
559
|
+
IOProviderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IOProviderService });
|
|
560
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IOProviderService, decorators: [{
|
|
559
561
|
type: i0.Injectable
|
|
560
562
|
}], ctorParameters: function () { return [{ type: DynamicModuleService }]; } });
|
|
561
563
|
|
|
@@ -571,9 +573,9 @@
|
|
|
571
573
|
};
|
|
572
574
|
return TemplatesService;
|
|
573
575
|
}());
|
|
574
|
-
TemplatesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
575
|
-
TemplatesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
576
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
576
|
+
TemplatesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
577
|
+
TemplatesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesService });
|
|
578
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesService, decorators: [{
|
|
577
579
|
type: i0.Injectable
|
|
578
580
|
}] });
|
|
579
581
|
|
|
@@ -607,31 +609,81 @@
|
|
|
607
609
|
}
|
|
608
610
|
return IOPlugin;
|
|
609
611
|
}());
|
|
610
|
-
IOPlugin.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
611
|
-
IOPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
612
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
612
|
+
IOPlugin.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IOPlugin, deps: [{ token: exports.ElementComponent }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
613
|
+
IOPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: IOPlugin, ngImport: i0__namespace });
|
|
614
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IOPlugin, decorators: [{
|
|
613
615
|
type: i0.Directive
|
|
614
616
|
}], ctorParameters: function () { return [{ type: exports.ElementComponent }]; } });
|
|
615
617
|
|
|
618
|
+
var normalizeImports = function (script) {
|
|
619
|
+
var regexp = new RegExp("import([ \\n\\t]*(?:[^ \\n\\t\\{\\}]+[ \\n\\t]*,?)?(?:[ \\n\\t]*\\{(?:[ \\n\\t]*[^ \\n\\t\"'\\{\\}]+[ \\n\\t]*,?)+\\})?[ \\n\\t]*)from[ \\n\\t]*(['\"])([^'\"\\n]+)(?:['\"]);", 'g');
|
|
620
|
+
var result = script.replace(regexp, function (match, g1, g2, src) { return "const " + g1 + " = vendor['" + src + "'];"; });
|
|
621
|
+
return result;
|
|
622
|
+
};
|
|
623
|
+
var ScriptPlugin = /** @class */ (function () {
|
|
624
|
+
function ScriptPlugin(host) {
|
|
625
|
+
this.host = host;
|
|
626
|
+
this.document = this.host.injector.get(i7.DOCUMENT);
|
|
627
|
+
this.vendorMap = this.host.injector.get(VENDOR_MAP);
|
|
628
|
+
var elementMetadata = this.host.injector.get(ELEMENT_METADATA);
|
|
629
|
+
var sharedElementMetadata = this.host.injector.get(SHARED_ELEMENT_METADATA);
|
|
630
|
+
if (sharedElementMetadata === null || sharedElementMetadata === void 0 ? void 0 : sharedElementMetadata.script) {
|
|
631
|
+
this.addScript(sharedElementMetadata.script);
|
|
632
|
+
}
|
|
633
|
+
if (elementMetadata.script) {
|
|
634
|
+
this.addScript(elementMetadata.script);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
ScriptPlugin.prototype.addScript = function (scriptStr) {
|
|
638
|
+
var id = btoa(core.UUID.UUID());
|
|
639
|
+
var script = this.document.createElement('script');
|
|
640
|
+
script.type = "text/javascript";
|
|
641
|
+
var scriptContent = normalizeImports(scriptStr);
|
|
642
|
+
var classMatch = /export class (\S+)/.exec(scriptContent);
|
|
643
|
+
var className = classMatch === null || classMatch === void 0 ? void 0 : classMatch[1];
|
|
644
|
+
if (!classMatch || !className) {
|
|
645
|
+
console.error("Script doesn't have exported class");
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
648
|
+
scriptContent = scriptContent.replace(classMatch[0], "class " + className);
|
|
649
|
+
script.text = "var " + id + " = function(vendor) {" + scriptContent + "\n return " + className + "; };";
|
|
650
|
+
this.document.body.appendChild(script);
|
|
651
|
+
var ScriptClass = window[id](this.vendorMap);
|
|
652
|
+
if (ScriptClass instanceof Object) {
|
|
653
|
+
this.host.registerPlugin(new ScriptClass(this.host));
|
|
654
|
+
}
|
|
655
|
+
this.document.body.removeChild(script);
|
|
656
|
+
};
|
|
657
|
+
return ScriptPlugin;
|
|
658
|
+
}());
|
|
659
|
+
ScriptPlugin.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ScriptPlugin, deps: [{ token: exports.ElementComponent }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
660
|
+
ScriptPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ScriptPlugin, ngImport: i0__namespace });
|
|
661
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ScriptPlugin, decorators: [{
|
|
662
|
+
type: i0.Directive
|
|
663
|
+
}], ctorParameters: function () { return [{ type: exports.ElementComponent }]; } });
|
|
664
|
+
|
|
665
|
+
/*
|
|
666
|
+
* ScriptPlugin must always be the last plugin in the list to make sure user code is running after all pre-initializers.
|
|
667
|
+
*/
|
|
616
668
|
var CONFIG = {
|
|
617
669
|
CUSTOM: {
|
|
618
670
|
component: exports.ElementComponent,
|
|
619
|
-
plugins: [IOPlugin],
|
|
671
|
+
plugins: [IOPlugin, ScriptPlugin],
|
|
620
672
|
},
|
|
621
673
|
CONTAINER: {
|
|
622
674
|
component: exports.ElementComponent,
|
|
623
675
|
defaultTemplate: '<element-children></element-children>',
|
|
624
|
-
plugins: [],
|
|
676
|
+
plugins: [ScriptPlugin],
|
|
625
677
|
},
|
|
626
678
|
SERVICE: {
|
|
627
679
|
component: exports.ElementComponent,
|
|
628
|
-
plugins: [IOPlugin],
|
|
680
|
+
plugins: [IOPlugin, ScriptPlugin],
|
|
629
681
|
suppressTemplate: true,
|
|
630
682
|
suppressStyles: true,
|
|
631
683
|
},
|
|
632
684
|
REFERENCE: {
|
|
633
685
|
component: exports.ElementComponent,
|
|
634
|
-
plugins: [IOPlugin],
|
|
686
|
+
plugins: [IOPlugin, ScriptPlugin],
|
|
635
687
|
suppressTemplate: true,
|
|
636
688
|
},
|
|
637
689
|
};
|
|
@@ -772,9 +824,9 @@
|
|
|
772
824
|
}
|
|
773
825
|
return ElementContextService;
|
|
774
826
|
}());
|
|
775
|
-
ElementContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
776
|
-
ElementContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
777
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
827
|
+
ElementContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementContextService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
828
|
+
ElementContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementContextService });
|
|
829
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementContextService, decorators: [{
|
|
778
830
|
type: i0.Injectable
|
|
779
831
|
}] });
|
|
780
832
|
|
|
@@ -919,7 +971,7 @@
|
|
|
919
971
|
var getDefaultLineItem = function (context, uiDefinitionProperties) {
|
|
920
972
|
var _a, _b, _c;
|
|
921
973
|
var id = core.UUID.UUID();
|
|
922
|
-
var lineItem = Object.assign({ id: id, type: (_a = uiDefinitionProperties.rootType) !== null && _a !== void 0 ? _a : '', cfgStatus: 'Default', qty: 1, productName: ((_b = context.properties) === null || _b === void 0 ? void 0 : _b.displayName) || context.productName, productId: (_c = context.productId) !== null && _c !== void 0 ? _c : ''
|
|
974
|
+
var lineItem = Object.assign({ id: id, type: (_a = uiDefinitionProperties.rootType) !== null && _a !== void 0 ? _a : '', cfgStatus: 'Default', qty: 1, productName: ((_b = context.properties) === null || _b === void 0 ? void 0 : _b.displayName) || context.productName, productId: (_c = context.productId) !== null && _c !== void 0 ? _c : '' }, (context.offeringId
|
|
923
975
|
? { offeringId: context.offeringId, offeringInstanceId: context.offeringInstanceId || id }
|
|
924
976
|
: {}));
|
|
925
977
|
return lineItem;
|
|
@@ -933,10 +985,10 @@
|
|
|
933
985
|
RuntimeContextService.prototype.getRuntimeContext = function (productId, offeringId) {
|
|
934
986
|
var _this = this;
|
|
935
987
|
return this.configurationApiService.getRuntimeDataByProductId(productId, offeringId).pipe(rxjsOperators.map(function (runtimeData) {
|
|
936
|
-
var _a, _b;
|
|
988
|
+
var _a, _b, _c, _d;
|
|
937
989
|
var uiDefinition = _this.getUIDefinition(runtimeData);
|
|
938
990
|
var runtimeModel = core.RuntimeModel.create(runtimeData.types, runtimeData.products);
|
|
939
|
-
var
|
|
991
|
+
var _e = (_a = Array.from(runtimeModel.components.values()).find(function (c) { return c.productId === productId; })) !== null && _a !== void 0 ? _a : {}, productName = _e.productName, properties = _e.properties;
|
|
940
992
|
return {
|
|
941
993
|
modelId: runtimeData.modelId,
|
|
942
994
|
uiDefinition: uiDefinition,
|
|
@@ -945,8 +997,10 @@
|
|
|
945
997
|
productId: productId,
|
|
946
998
|
productType: (properties === null || properties === void 0 ? void 0 : properties.displayName) || productName,
|
|
947
999
|
offeringId: offeringId,
|
|
1000
|
+
priceListId: (_b = uiDefinition === null || uiDefinition === void 0 ? void 0 : uiDefinition.properties) === null || _b === void 0 ? void 0 : _b.priceList,
|
|
948
1001
|
properties: {
|
|
949
|
-
PricingEnabled: (
|
|
1002
|
+
PricingEnabled: (_c = uiDefinition === null || uiDefinition === void 0 ? void 0 : uiDefinition.properties) === null || _c === void 0 ? void 0 : _c.pricingEnabled,
|
|
1003
|
+
PriceListId: (_d = uiDefinition === null || uiDefinition === void 0 ? void 0 : uiDefinition.properties) === null || _d === void 0 ? void 0 : _d.priceList,
|
|
950
1004
|
},
|
|
951
1005
|
};
|
|
952
1006
|
}));
|
|
@@ -974,9 +1028,9 @@
|
|
|
974
1028
|
};
|
|
975
1029
|
return RuntimeContextService;
|
|
976
1030
|
}());
|
|
977
|
-
RuntimeContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
978
|
-
RuntimeContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
979
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1031
|
+
RuntimeContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RuntimeContextService, deps: [{ token: i1__namespace.ConfigurationApiService }, { token: i2__namespace.MessageService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1032
|
+
RuntimeContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RuntimeContextService });
|
|
1033
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RuntimeContextService, decorators: [{
|
|
980
1034
|
type: i0.Injectable
|
|
981
1035
|
}], ctorParameters: function () { return [{ type: i1__namespace.ConfigurationApiService }, { type: i2__namespace.MessageService }]; } });
|
|
982
1036
|
|
|
@@ -1001,14 +1055,17 @@
|
|
|
1001
1055
|
this.apiService.getRuntimeDataByModelId(modelId),
|
|
1002
1056
|
this.contextService.create('TestId', core.ConfigurationContextMode.TEST),
|
|
1003
1057
|
]).pipe(rxjsOperators.first(), rxjsOperators.tap(function (_d) {
|
|
1004
|
-
var _e = __read(_d,
|
|
1005
|
-
var
|
|
1006
|
-
|
|
1058
|
+
var _e = __read(_d, 2), runtimeData = _e[0], configurationContext = _e[1];
|
|
1059
|
+
var _a;
|
|
1060
|
+
_this._runtimeContext = {
|
|
1007
1061
|
modelId: modelId,
|
|
1008
|
-
runtimeModel:
|
|
1062
|
+
runtimeModel: core.RuntimeModel.create(runtimeData.types, runtimeData.products),
|
|
1009
1063
|
runtimeMode: i2.RuntimeMode.TEST,
|
|
1010
1064
|
};
|
|
1011
|
-
_this.
|
|
1065
|
+
_this.contextService.update({
|
|
1066
|
+
priceListId: uiDefinitionProperties.priceList,
|
|
1067
|
+
properties: Object.assign(Object.assign(Object.assign({}, (_a = _this.runtimeContext) === null || _a === void 0 ? void 0 : _a.properties), configurationContext.properties), { ModelId: modelId, RuntimeMode: core.ConfigurationContextMode.TEST, PricingEnabled: String(uiDefinitionProperties.pricingEnabled), StartDate: new Date().toISOString().substring(0, 10), PriceListId: uiDefinitionProperties.priceList }),
|
|
1068
|
+
});
|
|
1012
1069
|
_this._isInitialized = true;
|
|
1013
1070
|
}));
|
|
1014
1071
|
};
|
|
@@ -1023,18 +1080,25 @@
|
|
|
1023
1080
|
var _a, _b, _c;
|
|
1024
1081
|
_this.uiDefinitionProperties = (_b = (_a = runtimeContext.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {};
|
|
1025
1082
|
var mergeContext = Object.assign(Object.assign({}, runtimeContext), { properties: Object.assign(Object.assign({}, runtimeContext.properties), configurationContext.properties) });
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1083
|
+
_this.id15to18('AccountId', mergeContext.properties);
|
|
1084
|
+
_this._runtimeContext = mergeContext;
|
|
1085
|
+
if (configurationContext.properties && ((_c = runtimeContext.properties) === null || _c === void 0 ? void 0 : _c.StartDate)) {
|
|
1086
|
+
_this.contextService.update({
|
|
1087
|
+
priceListId: _this.uiDefinitionProperties.priceList,
|
|
1088
|
+
properties: Object.assign(Object.assign(Object.assign({}, runtimeContext.properties), configurationContext.properties), { PricingEnabled: String(_this.uiDefinitionProperties.pricingEnabled), PriceListId: _this.uiDefinitionProperties.priceList }),
|
|
1030
1089
|
});
|
|
1031
1090
|
}
|
|
1032
|
-
_this._runtimeContext = mergeContext;
|
|
1033
1091
|
_this._isInitialized = true;
|
|
1034
1092
|
}));
|
|
1035
1093
|
};
|
|
1036
|
-
ConfigurationRuntimeService.prototype.
|
|
1037
|
-
|
|
1094
|
+
ConfigurationRuntimeService.prototype.id15to18 = function (propertyName, source) {
|
|
1095
|
+
if (!source) {
|
|
1096
|
+
return;
|
|
1097
|
+
}
|
|
1098
|
+
var value = source[propertyName];
|
|
1099
|
+
if (typeof value === 'string' && value.length === 15) {
|
|
1100
|
+
source[propertyName] = core.SalesforceIdUtils.generateId18FromId15(value);
|
|
1101
|
+
}
|
|
1038
1102
|
};
|
|
1039
1103
|
ConfigurationRuntimeService.prototype.getAsset = function (lineItem) {
|
|
1040
1104
|
return this._assets && this._assets.find(function (a) { return a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId; });
|
|
@@ -1063,9 +1127,9 @@
|
|
|
1063
1127
|
});
|
|
1064
1128
|
return ConfigurationRuntimeService;
|
|
1065
1129
|
}());
|
|
1066
|
-
ConfigurationRuntimeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1067
|
-
ConfigurationRuntimeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
1068
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1130
|
+
ConfigurationRuntimeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationRuntimeService, deps: [{ token: i1__namespace.ConfigurationApiService }, { token: i2__namespace$1.ContextService }, { token: RuntimeContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1131
|
+
ConfigurationRuntimeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationRuntimeService });
|
|
1132
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationRuntimeService, decorators: [{
|
|
1069
1133
|
type: i0.Injectable
|
|
1070
1134
|
}], ctorParameters: function () { return [{ type: i1__namespace.ConfigurationApiService }, { type: i2__namespace$1.ContextService }, { type: RuntimeContextService }]; } });
|
|
1071
1135
|
|
|
@@ -1166,26 +1230,6 @@
|
|
|
1166
1230
|
return request$.pipe(rxjsOperators.tap(function (lineItem) { return lineItem && _this.lineItem.next(lineItem); }), rxjsOperators.catchError(function (error) { return rxjs.throwError(function () { var _a; return new Error(((_a = error.error) === null || _a === void 0 ? void 0 : _a.message) || error.message || JSON.stringify(error)); }); }));
|
|
1167
1231
|
};
|
|
1168
1232
|
ConfigurationService.prototype.createRequest = function (lineItem) {
|
|
1169
|
-
var _a, _b, _c;
|
|
1170
|
-
var runtimeContext = this.getRuntimeContext();
|
|
1171
|
-
var uiDefinitionProperties = this.runtimeService.uiDefinitionProperties;
|
|
1172
|
-
if (runtimeContext.runtimeMode === i2.RuntimeMode.TEST) {
|
|
1173
|
-
var properties = Object.assign(Object.assign({}, runtimeContext.properties), { ModelId: runtimeContext.modelId, RuntimeMode: core.ConfigurationContextMode.TEST, PricingEnabled: String(uiDefinitionProperties.pricingEnabled), StartDate: (_b = (_a = runtimeContext.properties) === null || _a === void 0 ? void 0 : _a.StartDate) !== null && _b !== void 0 ? _b : new Date().toISOString().substring(0, 10), PriceListId: uiDefinitionProperties.priceList });
|
|
1174
|
-
var ctx = {
|
|
1175
|
-
priceListId: uiDefinitionProperties.priceList,
|
|
1176
|
-
properties: properties,
|
|
1177
|
-
};
|
|
1178
|
-
this.contextService.update(ctx);
|
|
1179
|
-
}
|
|
1180
|
-
else {
|
|
1181
|
-
var context = this.contextService.resolve();
|
|
1182
|
-
if ((context === null || context === void 0 ? void 0 : context.properties) && ((_c = runtimeContext.properties) === null || _c === void 0 ? void 0 : _c.StartDate)) {
|
|
1183
|
-
this.contextService.update({
|
|
1184
|
-
priceListId: uiDefinitionProperties.priceList,
|
|
1185
|
-
properties: Object.assign(Object.assign(Object.assign({}, context.properties), runtimeContext.properties), { PricingEnabled: String(uiDefinitionProperties.pricingEnabled), PriceListId: uiDefinitionProperties.priceList }),
|
|
1186
|
-
});
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
1233
|
return {
|
|
1190
1234
|
lineItem: lineItem,
|
|
1191
1235
|
mode: this.mode,
|
|
@@ -1196,9 +1240,9 @@
|
|
|
1196
1240
|
};
|
|
1197
1241
|
return ConfigurationService;
|
|
1198
1242
|
}());
|
|
1199
|
-
ConfigurationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1200
|
-
ConfigurationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
1201
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1243
|
+
ConfigurationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationService, deps: [{ token: ConfigurationRuntimeService }, { token: i2__namespace$1.ContextService }, { token: i1__namespace.ConfigurationApiService }, { token: i2__namespace.MessageService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1244
|
+
ConfigurationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationService });
|
|
1245
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationService, decorators: [{
|
|
1202
1246
|
type: i0.Injectable
|
|
1203
1247
|
}], ctorParameters: function () { return [{ type: ConfigurationRuntimeService }, { type: i2__namespace$1.ContextService }, { type: i1__namespace.ConfigurationApiService }, { type: i2__namespace.MessageService }]; } });
|
|
1204
1248
|
|
|
@@ -1323,9 +1367,9 @@
|
|
|
1323
1367
|
};
|
|
1324
1368
|
return ElementRendererComponent;
|
|
1325
1369
|
}());
|
|
1326
|
-
ElementRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1327
|
-
ElementRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1328
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1370
|
+
ElementRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererComponent, deps: [{ token: i0__namespace.Injector, skipSelf: true }, { token: DynamicModuleService }, { token: ElementContextService }, { token: IOProviderService }, { token: ConfigurationService }, { token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1371
|
+
ElementRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: { meta: "meta" }, providers: [ElementContextService], viewQueries: [{ propertyName: "el", first: true, predicate: ["el"], descendants: true, read: i0.ViewContainerRef, static: true }], ngImport: i0__namespace, template: "<ng-template #el></ng-template>\n", styles: [":host{display:contents}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1372
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererComponent, decorators: [{
|
|
1329
1373
|
type: i0.Component,
|
|
1330
1374
|
args: [{
|
|
1331
1375
|
selector: 'vl-cms-element-renderer',
|
|
@@ -1352,9 +1396,9 @@
|
|
|
1352
1396
|
}
|
|
1353
1397
|
return ElementChildrenComponent;
|
|
1354
1398
|
}());
|
|
1355
|
-
ElementChildrenComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1356
|
-
ElementChildrenComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1357
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1399
|
+
ElementChildrenComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenComponent, deps: [{ token: ElementContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1400
|
+
ElementChildrenComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ElementChildrenComponent, selector: "element-children", ngImport: i0__namespace, 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__namespace.ChangeDetectionStrategy.OnPush });
|
|
1401
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenComponent, decorators: [{
|
|
1358
1402
|
type: i0.Component,
|
|
1359
1403
|
args: [{
|
|
1360
1404
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
@@ -1365,6 +1409,159 @@
|
|
|
1365
1409
|
}]
|
|
1366
1410
|
}], ctorParameters: function () { return [{ type: ElementContextService }]; } });
|
|
1367
1411
|
|
|
1412
|
+
var moduleMap = {};
|
|
1413
|
+
function loadRemoteEntry(remoteEntry) {
|
|
1414
|
+
return new Promise(function (resolve, reject) {
|
|
1415
|
+
if (moduleMap[remoteEntry]) {
|
|
1416
|
+
resolve();
|
|
1417
|
+
return;
|
|
1418
|
+
}
|
|
1419
|
+
var script = document.createElement('script');
|
|
1420
|
+
script.src = remoteEntry;
|
|
1421
|
+
script.onerror = reject;
|
|
1422
|
+
script.onload = function () {
|
|
1423
|
+
moduleMap[remoteEntry] = true;
|
|
1424
|
+
resolve(); // window is the global namespace
|
|
1425
|
+
};
|
|
1426
|
+
document.body.append(script);
|
|
1427
|
+
});
|
|
1428
|
+
}
|
|
1429
|
+
function lookupExposedModule(remoteName, exposedModule) {
|
|
1430
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1431
|
+
var container, factory, Module;
|
|
1432
|
+
return __generator(this, function (_a) {
|
|
1433
|
+
switch (_a.label) {
|
|
1434
|
+
case 0:
|
|
1435
|
+
// Initializes the share scope. This fills it with known provided modules from this build and all remotes
|
|
1436
|
+
return [4 /*yield*/, __webpack_init_sharing__('default')];
|
|
1437
|
+
case 1:
|
|
1438
|
+
// Initializes the share scope. This fills it with known provided modules from this build and all remotes
|
|
1439
|
+
_a.sent();
|
|
1440
|
+
container = window[remoteName];
|
|
1441
|
+
// Initialize the container, it may provide shared modules
|
|
1442
|
+
return [4 /*yield*/, container.init(__webpack_share_scopes__.default)];
|
|
1443
|
+
case 2:
|
|
1444
|
+
// Initialize the container, it may provide shared modules
|
|
1445
|
+
_a.sent();
|
|
1446
|
+
return [4 /*yield*/, container.get(exposedModule)];
|
|
1447
|
+
case 3:
|
|
1448
|
+
factory = _a.sent();
|
|
1449
|
+
Module = factory();
|
|
1450
|
+
return [2 /*return*/, Module];
|
|
1451
|
+
}
|
|
1452
|
+
});
|
|
1453
|
+
});
|
|
1454
|
+
}
|
|
1455
|
+
function loadRemoteModule(options) {
|
|
1456
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1457
|
+
return __generator(this, function (_a) {
|
|
1458
|
+
switch (_a.label) {
|
|
1459
|
+
case 0: return [4 /*yield*/, loadRemoteEntry(options.remoteEntry)];
|
|
1460
|
+
case 1:
|
|
1461
|
+
_a.sent();
|
|
1462
|
+
return [4 /*yield*/, lookupExposedModule(options.remoteName, options.exposedModule)];
|
|
1463
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
1464
|
+
}
|
|
1465
|
+
});
|
|
1466
|
+
});
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
var IntegrationEvent;
|
|
1470
|
+
(function (IntegrationEvent) {
|
|
1471
|
+
IntegrationEvent["Init"] = "Init";
|
|
1472
|
+
})(IntegrationEvent || (IntegrationEvent = {}));
|
|
1473
|
+
var FederatedComponent = /** @class */ (function () {
|
|
1474
|
+
function FederatedComponent(injector, compiler, appRef, renderer) {
|
|
1475
|
+
this.injector = injector;
|
|
1476
|
+
this.compiler = compiler;
|
|
1477
|
+
this.appRef = appRef;
|
|
1478
|
+
this.renderer = renderer;
|
|
1479
|
+
this.integrationEvent = new i0.EventEmitter();
|
|
1480
|
+
this.moduleReady = false;
|
|
1481
|
+
}
|
|
1482
|
+
FederatedComponent.prototype.ngAfterViewInit = function () {
|
|
1483
|
+
var _this = this;
|
|
1484
|
+
if (!this.remoteEntry || !this.remoteName || !this.exposedModule) {
|
|
1485
|
+
return;
|
|
1486
|
+
}
|
|
1487
|
+
loadRemoteModule({
|
|
1488
|
+
remoteEntry: this.remoteEntry,
|
|
1489
|
+
remoteName: this.remoteName,
|
|
1490
|
+
exposedModule: this.exposedModule,
|
|
1491
|
+
}).then(function (federated) {
|
|
1492
|
+
_this.compiler.compileModuleAsync(federated[_this.exposedModule]).then(function (moduleFactory) {
|
|
1493
|
+
var _a;
|
|
1494
|
+
var rootModuleRef = moduleFactory.create(_this.injector);
|
|
1495
|
+
var rootComponentFactory = rootModuleRef.componentFactoryResolver.resolveComponentFactory(federated[_this.exposedModule].rootComponent);
|
|
1496
|
+
var node = document.createElement('div');
|
|
1497
|
+
var _b = rootComponentFactory.create(_this.injector, [], node), instance = _b.instance, hostView = _b.hostView;
|
|
1498
|
+
_this.instance = instance;
|
|
1499
|
+
_this.instance.data = _this.data;
|
|
1500
|
+
_this.instance.eventData = _this.eventData;
|
|
1501
|
+
_this.instance.integrationEvent = _this.integrationEvent;
|
|
1502
|
+
_this.renderer.appendChild((_a = _this.moduleHostRef) === null || _a === void 0 ? void 0 : _a.nativeElement, node);
|
|
1503
|
+
_this.appRef.attachView(hostView);
|
|
1504
|
+
});
|
|
1505
|
+
});
|
|
1506
|
+
};
|
|
1507
|
+
FederatedComponent.prototype.ngOnChanges = function (changes) {
|
|
1508
|
+
if (!this.instance) {
|
|
1509
|
+
return;
|
|
1510
|
+
}
|
|
1511
|
+
this.instance.ngOnChanges(changes);
|
|
1512
|
+
};
|
|
1513
|
+
return FederatedComponent;
|
|
1514
|
+
}());
|
|
1515
|
+
FederatedComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedComponent, deps: [{ token: i0__namespace.Injector }, { token: i0__namespace.Compiler }, { token: i0__namespace.ApplicationRef }, { token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1516
|
+
FederatedComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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: i0.ViewContainerRef }, { propertyName: "foo", first: true, predicate: ["foo"], descendants: true, read: i0.TemplateRef }, { propertyName: "moduleHostRef", first: true, predicate: ["moduleHost"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div #moduleHost></div>\n", styles: [":host{display:block}div{height:100%}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1517
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedComponent, decorators: [{
|
|
1518
|
+
type: i0.Component,
|
|
1519
|
+
args: [{
|
|
1520
|
+
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1521
|
+
selector: 'veloce-host-federated',
|
|
1522
|
+
templateUrl: './federated.component.html',
|
|
1523
|
+
styleUrls: ['./federated.component.scss'],
|
|
1524
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1525
|
+
}]
|
|
1526
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: i0__namespace.Compiler }, { type: i0__namespace.ApplicationRef }, { type: i0__namespace.Renderer2 }]; }, propDecorators: { federatedComponent: [{
|
|
1527
|
+
type: i0.ViewChild,
|
|
1528
|
+
args: ['federatedComponent', { read: i0.ViewContainerRef }]
|
|
1529
|
+
}], foo: [{
|
|
1530
|
+
type: i0.ViewChild,
|
|
1531
|
+
args: ['foo', { read: i0.TemplateRef }]
|
|
1532
|
+
}], moduleHostRef: [{
|
|
1533
|
+
type: i0.ViewChild,
|
|
1534
|
+
args: ['moduleHost', { static: false }]
|
|
1535
|
+
}], remoteEntry: [{
|
|
1536
|
+
type: i0.Input
|
|
1537
|
+
}], remoteName: [{
|
|
1538
|
+
type: i0.Input
|
|
1539
|
+
}], exposedModule: [{
|
|
1540
|
+
type: i0.Input
|
|
1541
|
+
}], data: [{
|
|
1542
|
+
type: i0.Input
|
|
1543
|
+
}], eventData: [{
|
|
1544
|
+
type: i0.Input
|
|
1545
|
+
}], integrationEvent: [{
|
|
1546
|
+
type: i0.Output
|
|
1547
|
+
}] } });
|
|
1548
|
+
|
|
1549
|
+
var FederatedModule = /** @class */ (function () {
|
|
1550
|
+
function FederatedModule() {
|
|
1551
|
+
}
|
|
1552
|
+
return FederatedModule;
|
|
1553
|
+
}());
|
|
1554
|
+
FederatedModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1555
|
+
FederatedModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedModule, declarations: [FederatedComponent], exports: [FederatedComponent] });
|
|
1556
|
+
FederatedModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedModule });
|
|
1557
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedModule, decorators: [{
|
|
1558
|
+
type: i0.NgModule,
|
|
1559
|
+
args: [{
|
|
1560
|
+
declarations: [FederatedComponent],
|
|
1561
|
+
exports: [FederatedComponent],
|
|
1562
|
+
}]
|
|
1563
|
+
}] });
|
|
1564
|
+
|
|
1368
1565
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
1369
1566
|
var CustomTemplateDirective = /** @class */ (function () {
|
|
1370
1567
|
function CustomTemplateDirective(templateRef, templatesService) {
|
|
@@ -1379,9 +1576,9 @@
|
|
|
1379
1576
|
};
|
|
1380
1577
|
return CustomTemplateDirective;
|
|
1381
1578
|
}());
|
|
1382
|
-
CustomTemplateDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1383
|
-
CustomTemplateDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
1384
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1579
|
+
CustomTemplateDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CustomTemplateDirective, deps: [{ token: i0__namespace.TemplateRef }, { token: TemplatesService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1580
|
+
CustomTemplateDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: CustomTemplateDirective, selector: "[customTemplate]", inputs: { customTemplate: "customTemplate" }, ngImport: i0__namespace });
|
|
1581
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CustomTemplateDirective, decorators: [{
|
|
1385
1582
|
type: i0.Directive,
|
|
1386
1583
|
args: [{ selector: '[customTemplate]' }]
|
|
1387
1584
|
}], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }, { type: TemplatesService }]; }, propDecorators: { customTemplate: [{
|
|
@@ -1390,14 +1587,12 @@
|
|
|
1390
1587
|
|
|
1391
1588
|
var ConfigurationPlugin = /** @class */ (function () {
|
|
1392
1589
|
function ConfigurationPlugin(host) {
|
|
1590
|
+
var _this = this;
|
|
1591
|
+
var _a, _b;
|
|
1393
1592
|
this.host = host;
|
|
1394
1593
|
this.destroy$ = new rxjs.Subject();
|
|
1395
1594
|
this.elementMetadata = this.host.injector.get(ELEMENT_METADATA);
|
|
1396
1595
|
this.configurationService = this.host.injector.get(ConfigurationService);
|
|
1397
|
-
}
|
|
1398
|
-
ConfigurationPlugin.prototype.ngOnInit = function () {
|
|
1399
|
-
var _this = this;
|
|
1400
|
-
var _a, _b;
|
|
1401
1596
|
if ((_a = this.elementMetadata.model) === null || _a === void 0 ? void 0 : _a.lineItem) {
|
|
1402
1597
|
this.host.model$.pipe(rxjs.takeUntil(this.destroy$)).subscribe(function (model) { return (_this.modelSnapshot = model); });
|
|
1403
1598
|
var pathBlocks = parseBoundPath((_b = this.elementMetadata.model) === null || _b === void 0 ? void 0 : _b.lineItem);
|
|
@@ -1405,7 +1600,7 @@
|
|
|
1405
1600
|
this.host.boundName = name !== null && name !== void 0 ? name : type;
|
|
1406
1601
|
this.register(type, property, name);
|
|
1407
1602
|
}
|
|
1408
|
-
}
|
|
1603
|
+
}
|
|
1409
1604
|
ConfigurationPlugin.prototype.ngOnDestroy = function () {
|
|
1410
1605
|
this.destroy$.next();
|
|
1411
1606
|
this.destroy$.complete();
|
|
@@ -1490,12 +1685,17 @@
|
|
|
1490
1685
|
});
|
|
1491
1686
|
return ConfigurationPlugin;
|
|
1492
1687
|
}());
|
|
1493
|
-
ConfigurationPlugin.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1494
|
-
ConfigurationPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.
|
|
1495
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1688
|
+
ConfigurationPlugin.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationPlugin, deps: "invalid", target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1689
|
+
ConfigurationPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ConfigurationPlugin, ngImport: i0__namespace });
|
|
1690
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationPlugin, decorators: [{
|
|
1496
1691
|
type: i0.Directive
|
|
1497
1692
|
}], ctorParameters: function () { return [{ type: undefined }]; } });
|
|
1498
1693
|
|
|
1694
|
+
var DEFAULT_PLUGINS = {
|
|
1695
|
+
CONFIGURATION: [ConfigurationPlugin],
|
|
1696
|
+
DEFAULT: [],
|
|
1697
|
+
};
|
|
1698
|
+
|
|
1499
1699
|
var vlCmsModules = /*#__PURE__*/Object.freeze({
|
|
1500
1700
|
__proto__: null,
|
|
1501
1701
|
getDefaultLineItem: getDefaultLineItem,
|
|
@@ -1531,7 +1731,7 @@
|
|
|
1531
1731
|
'@veloce/sdk/cms': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, vlCmsModules), vlCmsUtils), vlCmsLineItemTypes), vlInjectionTokens), { TemplatesService: TemplatesService }),
|
|
1532
1732
|
'@veloce/api': {
|
|
1533
1733
|
SalesforceApiService: i1.SalesforceApiService,
|
|
1534
|
-
QuoteApiService: i1.QuoteApiService
|
|
1734
|
+
QuoteApiService: i1.QuoteApiService,
|
|
1535
1735
|
},
|
|
1536
1736
|
'@angular/core': i0__namespace,
|
|
1537
1737
|
'@angular/forms': angularForms__namespace,
|
|
@@ -1539,56 +1739,6 @@
|
|
|
1539
1739
|
'rxjs/operators': rxjsOperators__namespace,
|
|
1540
1740
|
lodash: lodash__namespace,
|
|
1541
1741
|
};
|
|
1542
|
-
var normalizeImports = function (script) {
|
|
1543
|
-
var regexp = new RegExp("import([ \\n\\t]*(?:[^ \\n\\t\\{\\}]+[ \\n\\t]*,?)?(?:[ \\n\\t]*\\{(?:[ \\n\\t]*[^ \\n\\t\"'\\{\\}]+[ \\n\\t]*,?)+\\})?[ \\n\\t]*)from[ \\n\\t]*(['\"])([^'\"\\n]+)(?:['\"]);", 'g');
|
|
1544
|
-
var result = script.replace(regexp, function (match, g1, g2, src) { return "const " + g1 + " = vendor['" + src + "'];"; });
|
|
1545
|
-
return result;
|
|
1546
|
-
};
|
|
1547
|
-
var ScriptPlugin = /** @class */ (function () {
|
|
1548
|
-
function ScriptPlugin(host) {
|
|
1549
|
-
this.host = host;
|
|
1550
|
-
this.document = this.host.injector.get(i7.DOCUMENT);
|
|
1551
|
-
var elementMetadata = this.host.injector.get(ELEMENT_METADATA);
|
|
1552
|
-
var sharedElementMetadata = this.host.injector.get(SHARED_ELEMENT_METADATA);
|
|
1553
|
-
if (sharedElementMetadata === null || sharedElementMetadata === void 0 ? void 0 : sharedElementMetadata.script) {
|
|
1554
|
-
this.addScript(sharedElementMetadata.script);
|
|
1555
|
-
}
|
|
1556
|
-
if (elementMetadata.script) {
|
|
1557
|
-
this.addScript(elementMetadata.script);
|
|
1558
|
-
}
|
|
1559
|
-
}
|
|
1560
|
-
ScriptPlugin.prototype.addScript = function (scriptStr) {
|
|
1561
|
-
var id = btoa(core.UUID.UUID());
|
|
1562
|
-
var script = this.document.createElement('script');
|
|
1563
|
-
script.type = "text/javascript";
|
|
1564
|
-
var scriptContent = normalizeImports(scriptStr);
|
|
1565
|
-
var classMatch = /export class (\S+)/.exec(scriptContent);
|
|
1566
|
-
var className = classMatch === null || classMatch === void 0 ? void 0 : classMatch[1];
|
|
1567
|
-
if (!classMatch || !className) {
|
|
1568
|
-
console.error("Script doesn't have exported class");
|
|
1569
|
-
return;
|
|
1570
|
-
}
|
|
1571
|
-
scriptContent = scriptContent.replace(classMatch[0], "class " + className);
|
|
1572
|
-
script.text = "var " + id + " = function(vendor) {" + scriptContent + "\n return " + className + "; };";
|
|
1573
|
-
this.document.body.appendChild(script);
|
|
1574
|
-
var ScriptClass = window[id](vendorMap);
|
|
1575
|
-
if (ScriptClass instanceof Object) {
|
|
1576
|
-
this.host.registerPlugin(new ScriptClass(this.host));
|
|
1577
|
-
}
|
|
1578
|
-
this.document.body.removeChild(script);
|
|
1579
|
-
};
|
|
1580
|
-
return ScriptPlugin;
|
|
1581
|
-
}());
|
|
1582
|
-
ScriptPlugin.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ScriptPlugin, deps: [{ token: exports.ElementComponent }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1583
|
-
ScriptPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: ScriptPlugin, ngImport: i0__namespace });
|
|
1584
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ScriptPlugin, decorators: [{
|
|
1585
|
-
type: i0.Directive
|
|
1586
|
-
}], ctorParameters: function () { return [{ type: exports.ElementComponent }]; } });
|
|
1587
|
-
|
|
1588
|
-
var DEFAULT_PLUGINS = {
|
|
1589
|
-
CONFIGURATION: [ScriptPlugin, ConfigurationPlugin],
|
|
1590
|
-
DEFAULT: [ScriptPlugin],
|
|
1591
|
-
};
|
|
1592
1742
|
|
|
1593
1743
|
var ElementsResolver = /** @class */ (function () {
|
|
1594
1744
|
function ElementsResolver(uiDef, elements) {
|
|
@@ -1691,6 +1841,7 @@
|
|
|
1691
1841
|
{ provide: ELEMENT_METADATA, useValue: element },
|
|
1692
1842
|
{ provide: SHARED_ELEMENT_METADATA, useValue: this.getSharedElement(sourceElement) },
|
|
1693
1843
|
{ provide: ELEMENT_CONFIG, useValue: config },
|
|
1844
|
+
{ provide: VENDOR_MAP, useValue: vendorMap },
|
|
1694
1845
|
] });
|
|
1695
1846
|
var cmp = i0.Component(component)(/** @class */ (function (_super) {
|
|
1696
1847
|
__extends(C, _super);
|
|
@@ -1709,159 +1860,6 @@
|
|
|
1709
1860
|
return ElementsResolver;
|
|
1710
1861
|
}());
|
|
1711
1862
|
|
|
1712
|
-
var moduleMap = {};
|
|
1713
|
-
function loadRemoteEntry(remoteEntry) {
|
|
1714
|
-
return new Promise(function (resolve, reject) {
|
|
1715
|
-
if (moduleMap[remoteEntry]) {
|
|
1716
|
-
resolve();
|
|
1717
|
-
return;
|
|
1718
|
-
}
|
|
1719
|
-
var script = document.createElement('script');
|
|
1720
|
-
script.src = remoteEntry;
|
|
1721
|
-
script.onerror = reject;
|
|
1722
|
-
script.onload = function () {
|
|
1723
|
-
moduleMap[remoteEntry] = true;
|
|
1724
|
-
resolve(); // window is the global namespace
|
|
1725
|
-
};
|
|
1726
|
-
document.body.append(script);
|
|
1727
|
-
});
|
|
1728
|
-
}
|
|
1729
|
-
function lookupExposedModule(remoteName, exposedModule) {
|
|
1730
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1731
|
-
var container, factory, Module;
|
|
1732
|
-
return __generator(this, function (_a) {
|
|
1733
|
-
switch (_a.label) {
|
|
1734
|
-
case 0:
|
|
1735
|
-
// Initializes the share scope. This fills it with known provided modules from this build and all remotes
|
|
1736
|
-
return [4 /*yield*/, __webpack_init_sharing__('default')];
|
|
1737
|
-
case 1:
|
|
1738
|
-
// Initializes the share scope. This fills it with known provided modules from this build and all remotes
|
|
1739
|
-
_a.sent();
|
|
1740
|
-
container = window[remoteName];
|
|
1741
|
-
// Initialize the container, it may provide shared modules
|
|
1742
|
-
return [4 /*yield*/, container.init(__webpack_share_scopes__.default)];
|
|
1743
|
-
case 2:
|
|
1744
|
-
// Initialize the container, it may provide shared modules
|
|
1745
|
-
_a.sent();
|
|
1746
|
-
return [4 /*yield*/, container.get(exposedModule)];
|
|
1747
|
-
case 3:
|
|
1748
|
-
factory = _a.sent();
|
|
1749
|
-
Module = factory();
|
|
1750
|
-
return [2 /*return*/, Module];
|
|
1751
|
-
}
|
|
1752
|
-
});
|
|
1753
|
-
});
|
|
1754
|
-
}
|
|
1755
|
-
function loadRemoteModule(options) {
|
|
1756
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1757
|
-
return __generator(this, function (_a) {
|
|
1758
|
-
switch (_a.label) {
|
|
1759
|
-
case 0: return [4 /*yield*/, loadRemoteEntry(options.remoteEntry)];
|
|
1760
|
-
case 1:
|
|
1761
|
-
_a.sent();
|
|
1762
|
-
return [4 /*yield*/, lookupExposedModule(options.remoteName, options.exposedModule)];
|
|
1763
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
1764
|
-
}
|
|
1765
|
-
});
|
|
1766
|
-
});
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
|
-
var IntegrationEvent;
|
|
1770
|
-
(function (IntegrationEvent) {
|
|
1771
|
-
IntegrationEvent["Init"] = "Init";
|
|
1772
|
-
})(IntegrationEvent || (IntegrationEvent = {}));
|
|
1773
|
-
var FederatedComponent = /** @class */ (function () {
|
|
1774
|
-
function FederatedComponent(injector, compiler, appRef, renderer) {
|
|
1775
|
-
this.injector = injector;
|
|
1776
|
-
this.compiler = compiler;
|
|
1777
|
-
this.appRef = appRef;
|
|
1778
|
-
this.renderer = renderer;
|
|
1779
|
-
this.integrationEvent = new i0.EventEmitter();
|
|
1780
|
-
this.moduleReady = false;
|
|
1781
|
-
}
|
|
1782
|
-
FederatedComponent.prototype.ngAfterViewInit = function () {
|
|
1783
|
-
var _this = this;
|
|
1784
|
-
if (!this.remoteEntry || !this.remoteName || !this.exposedModule) {
|
|
1785
|
-
return;
|
|
1786
|
-
}
|
|
1787
|
-
loadRemoteModule({
|
|
1788
|
-
remoteEntry: this.remoteEntry,
|
|
1789
|
-
remoteName: this.remoteName,
|
|
1790
|
-
exposedModule: this.exposedModule,
|
|
1791
|
-
}).then(function (federated) {
|
|
1792
|
-
_this.compiler.compileModuleAsync(federated[_this.exposedModule]).then(function (moduleFactory) {
|
|
1793
|
-
var _a;
|
|
1794
|
-
var rootModuleRef = moduleFactory.create(_this.injector);
|
|
1795
|
-
var rootComponentFactory = rootModuleRef.componentFactoryResolver.resolveComponentFactory(federated[_this.exposedModule].rootComponent);
|
|
1796
|
-
var node = document.createElement('div');
|
|
1797
|
-
var _b = rootComponentFactory.create(_this.injector, [], node), instance = _b.instance, hostView = _b.hostView;
|
|
1798
|
-
_this.instance = instance;
|
|
1799
|
-
_this.instance.data = _this.data;
|
|
1800
|
-
_this.instance.eventData = _this.eventData;
|
|
1801
|
-
_this.instance.integrationEvent = _this.integrationEvent;
|
|
1802
|
-
_this.renderer.appendChild((_a = _this.moduleHostRef) === null || _a === void 0 ? void 0 : _a.nativeElement, node);
|
|
1803
|
-
_this.appRef.attachView(hostView);
|
|
1804
|
-
});
|
|
1805
|
-
});
|
|
1806
|
-
};
|
|
1807
|
-
FederatedComponent.prototype.ngOnChanges = function (changes) {
|
|
1808
|
-
if (!this.instance) {
|
|
1809
|
-
return;
|
|
1810
|
-
}
|
|
1811
|
-
this.instance.ngOnChanges(changes);
|
|
1812
|
-
};
|
|
1813
|
-
return FederatedComponent;
|
|
1814
|
-
}());
|
|
1815
|
-
FederatedComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FederatedComponent, deps: [{ token: i0__namespace.Injector }, { token: i0__namespace.Compiler }, { token: i0__namespace.ApplicationRef }, { token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1816
|
-
FederatedComponent.ɵcmp = i0__namespace.ɵɵ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: i0.ViewContainerRef }, { propertyName: "foo", first: true, predicate: ["foo"], descendants: true, read: i0.TemplateRef }, { propertyName: "moduleHostRef", first: true, predicate: ["moduleHost"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div #moduleHost></div>\n", styles: [":host{display:block}div{height:100%}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1817
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FederatedComponent, decorators: [{
|
|
1818
|
-
type: i0.Component,
|
|
1819
|
-
args: [{
|
|
1820
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1821
|
-
selector: 'veloce-host-federated',
|
|
1822
|
-
templateUrl: './federated.component.html',
|
|
1823
|
-
styleUrls: ['./federated.component.scss'],
|
|
1824
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1825
|
-
}]
|
|
1826
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: i0__namespace.Compiler }, { type: i0__namespace.ApplicationRef }, { type: i0__namespace.Renderer2 }]; }, propDecorators: { federatedComponent: [{
|
|
1827
|
-
type: i0.ViewChild,
|
|
1828
|
-
args: ['federatedComponent', { read: i0.ViewContainerRef }]
|
|
1829
|
-
}], foo: [{
|
|
1830
|
-
type: i0.ViewChild,
|
|
1831
|
-
args: ['foo', { read: i0.TemplateRef }]
|
|
1832
|
-
}], moduleHostRef: [{
|
|
1833
|
-
type: i0.ViewChild,
|
|
1834
|
-
args: ['moduleHost', { static: false }]
|
|
1835
|
-
}], remoteEntry: [{
|
|
1836
|
-
type: i0.Input
|
|
1837
|
-
}], remoteName: [{
|
|
1838
|
-
type: i0.Input
|
|
1839
|
-
}], exposedModule: [{
|
|
1840
|
-
type: i0.Input
|
|
1841
|
-
}], data: [{
|
|
1842
|
-
type: i0.Input
|
|
1843
|
-
}], eventData: [{
|
|
1844
|
-
type: i0.Input
|
|
1845
|
-
}], integrationEvent: [{
|
|
1846
|
-
type: i0.Output
|
|
1847
|
-
}] } });
|
|
1848
|
-
|
|
1849
|
-
var FederatedModule = /** @class */ (function () {
|
|
1850
|
-
function FederatedModule() {
|
|
1851
|
-
}
|
|
1852
|
-
return FederatedModule;
|
|
1853
|
-
}());
|
|
1854
|
-
FederatedModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FederatedModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1855
|
-
FederatedModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FederatedModule, declarations: [FederatedComponent], exports: [FederatedComponent] });
|
|
1856
|
-
FederatedModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FederatedModule });
|
|
1857
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FederatedModule, decorators: [{
|
|
1858
|
-
type: i0.NgModule,
|
|
1859
|
-
args: [{
|
|
1860
|
-
declarations: [FederatedComponent],
|
|
1861
|
-
exports: [FederatedComponent],
|
|
1862
|
-
}]
|
|
1863
|
-
}] });
|
|
1864
|
-
|
|
1865
1863
|
var LauncherService = /** @class */ (function () {
|
|
1866
1864
|
function LauncherService(compiler, dynamicModuleService) {
|
|
1867
1865
|
this.compiler = compiler;
|
|
@@ -1905,9 +1903,9 @@
|
|
|
1905
1903
|
};
|
|
1906
1904
|
return LauncherService;
|
|
1907
1905
|
}());
|
|
1908
|
-
LauncherService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1909
|
-
LauncherService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
1910
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1906
|
+
LauncherService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherService, deps: [{ token: i0__namespace.Compiler }, { token: DynamicModuleService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1907
|
+
LauncherService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherService });
|
|
1908
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherService, decorators: [{
|
|
1911
1909
|
type: i0.Injectable
|
|
1912
1910
|
}], ctorParameters: function () { return [{ type: i0__namespace.Compiler }, { type: DynamicModuleService }]; } });
|
|
1913
1911
|
|
|
@@ -1977,9 +1975,9 @@
|
|
|
1977
1975
|
};
|
|
1978
1976
|
return PreviewComponent;
|
|
1979
1977
|
}());
|
|
1980
|
-
PreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
1981
|
-
PreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
1982
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
1978
|
+
PreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewComponent, deps: [{ token: LauncherService }, { token: ConfigurationService }, { token: i2__namespace.MessageService }, { token: ConfigurationRuntimeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1979
|
+
PreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PreviewComponent, selector: "vl-cms-preview", inputs: { modelId: "modelId", uiDefinition: "uiDefinition" }, providers: [IOProviderService, TemplatesService], ngImport: i0__namespace, 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: i5__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label"] }, { type: ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: ["meta"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i7__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1980
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewComponent, decorators: [{
|
|
1983
1981
|
type: i0.Component,
|
|
1984
1982
|
args: [{
|
|
1985
1983
|
selector: 'vl-cms-preview',
|
|
@@ -1999,10 +1997,10 @@
|
|
|
1999
1997
|
}
|
|
2000
1998
|
return ElementRendererModule;
|
|
2001
1999
|
}());
|
|
2002
|
-
ElementRendererModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2003
|
-
ElementRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
2004
|
-
ElementRendererModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
2005
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2000
|
+
ElementRendererModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
2001
|
+
ElementRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule, declarations: [ElementRendererComponent], exports: [ElementRendererComponent] });
|
|
2002
|
+
ElementRendererModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule });
|
|
2003
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule, decorators: [{
|
|
2006
2004
|
type: i0.NgModule,
|
|
2007
2005
|
args: [{
|
|
2008
2006
|
declarations: [ElementRendererComponent],
|
|
@@ -2015,10 +2013,10 @@
|
|
|
2015
2013
|
}
|
|
2016
2014
|
return ElementChildrenModule;
|
|
2017
2015
|
}());
|
|
2018
|
-
ElementChildrenModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2019
|
-
ElementChildrenModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
2020
|
-
ElementChildrenModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
2021
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2016
|
+
ElementChildrenModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
2017
|
+
ElementChildrenModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, declarations: [ElementChildrenComponent], imports: [ElementRendererModule], exports: [ElementChildrenComponent] });
|
|
2018
|
+
ElementChildrenModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, imports: [[ElementRendererModule]] });
|
|
2019
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, decorators: [{
|
|
2022
2020
|
type: i0.NgModule,
|
|
2023
2021
|
args: [{
|
|
2024
2022
|
declarations: [ElementChildrenComponent],
|
|
@@ -2032,10 +2030,10 @@
|
|
|
2032
2030
|
}
|
|
2033
2031
|
return PreviewModule;
|
|
2034
2032
|
}());
|
|
2035
|
-
PreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2036
|
-
PreviewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
2037
|
-
PreviewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
2038
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2033
|
+
PreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
2034
|
+
PreviewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewModule, declarations: [PreviewComponent], imports: [i7.CommonModule, i5.LoaderModule, ElementRendererModule, ElementChildrenModule], exports: [PreviewComponent] });
|
|
2035
|
+
PreviewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewModule, imports: [[i7.CommonModule, i5.LoaderModule, ElementRendererModule, ElementChildrenModule]] });
|
|
2036
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewModule, decorators: [{
|
|
2039
2037
|
type: i0.NgModule,
|
|
2040
2038
|
args: [{
|
|
2041
2039
|
declarations: [PreviewComponent],
|
|
@@ -2055,9 +2053,9 @@
|
|
|
2055
2053
|
}
|
|
2056
2054
|
return ConfigurationModule;
|
|
2057
2055
|
}());
|
|
2058
|
-
ConfigurationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2059
|
-
ConfigurationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
2060
|
-
ConfigurationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
2056
|
+
ConfigurationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
2057
|
+
ConfigurationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule });
|
|
2058
|
+
ConfigurationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule, providers: [
|
|
2061
2059
|
i2.ContextService,
|
|
2062
2060
|
i1.ContextApiService,
|
|
2063
2061
|
i1.ProductModelApiService,
|
|
@@ -2066,7 +2064,7 @@
|
|
|
2066
2064
|
RuntimeContextService,
|
|
2067
2065
|
ConfigurationService,
|
|
2068
2066
|
] });
|
|
2069
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2067
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule, decorators: [{
|
|
2070
2068
|
type: i0.NgModule,
|
|
2071
2069
|
args: [{
|
|
2072
2070
|
providers: [
|
|
@@ -2086,10 +2084,10 @@
|
|
|
2086
2084
|
}
|
|
2087
2085
|
return LauncherModule;
|
|
2088
2086
|
}());
|
|
2089
|
-
LauncherModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
2090
|
-
LauncherModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
2091
|
-
LauncherModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
2092
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
2087
|
+
LauncherModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
2088
|
+
LauncherModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherModule, imports: [i7.CommonModule, core.CoreModule, ConfigurationModule] });
|
|
2089
|
+
LauncherModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherModule, providers: [LauncherService, DynamicModuleService, i1.SalesforceApiService, i1.QuoteApiService], imports: [[i7.CommonModule, core.CoreModule, ConfigurationModule]] });
|
|
2090
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherModule, decorators: [{
|
|
2093
2091
|
type: i0.NgModule,
|
|
2094
2092
|
args: [{
|
|
2095
2093
|
imports: [i7.CommonModule, core.CoreModule, ConfigurationModule],
|
|
@@ -2115,6 +2113,7 @@
|
|
|
2115
2113
|
exports.SHARED_ELEMENT_METADATA = SHARED_ELEMENT_METADATA;
|
|
2116
2114
|
exports.TemplatesService = TemplatesService;
|
|
2117
2115
|
exports.UI_DEFINITION_METADATA = UI_DEFINITION_METADATA;
|
|
2116
|
+
exports.VENDOR_MAP = VENDOR_MAP;
|
|
2118
2117
|
exports.doesElementSupportIO = doesElementSupportIO;
|
|
2119
2118
|
exports.elementToMetadata = elementToMetadata;
|
|
2120
2119
|
exports.extendElementMetadata = extendElementMetadata;
|