@veloceapps/sdk 2.0.9 → 2.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/bundles/veloce-sdk-cms.umd.js +332 -322
  2. package/bundles/veloce-sdk-cms.umd.js.map +1 -1
  3. package/bundles/veloce-sdk-runtime.umd.js +144 -144
  4. package/bundles/veloce-sdk-runtime.umd.js.map +1 -1
  5. package/bundles/veloce-sdk.umd.js +60 -60
  6. package/bundles/veloce-sdk.umd.js.map +1 -1
  7. package/cms/injection-tokens.d.ts +2 -0
  8. package/cms/modules/configuration/services/configuration-runtime.service.d.ts +1 -1
  9. package/cms/plugins/configuration.plugin.d.ts +2 -3
  10. package/cms/plugins/script.plugin.d.ts +1 -0
  11. package/cms/types/common.types.d.ts +6 -4
  12. package/cms/vendor-map.d.ts +2 -0
  13. package/esm2015/cms/cms.default.js +3 -4
  14. package/esm2015/cms/cms.elements.js +9 -5
  15. package/esm2015/cms/components/element-children/element-children.component.js +3 -3
  16. package/esm2015/cms/components/element-children/element-children.module.js +4 -4
  17. package/esm2015/cms/components/element-renderer/element-renderer.component.js +3 -3
  18. package/esm2015/cms/components/element-renderer/element-renderer.module.js +4 -4
  19. package/esm2015/cms/components/federated/federated.component.js +3 -3
  20. package/esm2015/cms/components/federated/federated.module.js +4 -4
  21. package/esm2015/cms/components/plugin.component.js +3 -3
  22. package/esm2015/cms/components/preview/preview.component.js +3 -3
  23. package/esm2015/cms/components/preview/preview.module.js +4 -4
  24. package/esm2015/cms/directives/custom-template.directive.js +3 -3
  25. package/esm2015/cms/injection-tokens.js +2 -1
  26. package/esm2015/cms/launcher.module.js +4 -4
  27. package/esm2015/cms/modules/configuration/configuration.module.js +4 -4
  28. package/esm2015/cms/modules/configuration/helpers.js +2 -2
  29. package/esm2015/cms/modules/configuration/services/configuration-runtime.service.js +26 -17
  30. package/esm2015/cms/modules/configuration/services/configuration.service.js +6 -26
  31. package/esm2015/cms/modules/configuration/services/runtime-context.service.js +8 -6
  32. package/esm2015/cms/plugins/configuration.plugin.js +5 -7
  33. package/esm2015/cms/plugins/io.plugin.js +3 -3
  34. package/esm2015/cms/plugins/script.plugin.js +7 -29
  35. package/esm2015/cms/services/dynamic-module.service.js +3 -3
  36. package/esm2015/cms/services/element-context.service.js +3 -3
  37. package/esm2015/cms/services/io-provider.service.js +9 -4
  38. package/esm2015/cms/services/launcher.service.js +5 -5
  39. package/esm2015/cms/services/templates.service.js +3 -3
  40. package/esm2015/cms/types/common.types.js +1 -1
  41. package/esm2015/cms/utils/elements-resolver.js +4 -2
  42. package/esm2015/cms/utils/path.utils.js +12 -7
  43. package/esm2015/cms/vendor-map.js +24 -0
  44. package/esm2015/runtime/components/component-preview/component-preview.component.js +3 -3
  45. package/esm2015/runtime/components/section-renderer/section-renderer.component.js +3 -3
  46. package/esm2015/runtime/components/ui-runtime/runtime.component.js +3 -3
  47. package/esm2015/runtime/components/ui-runtime-preview/runtime-preview.component.js +3 -3
  48. package/esm2015/runtime/execution/components/children-placeholder/children-placeholder.component.js +6 -6
  49. package/esm2015/runtime/execution/components/context-provider/context-provider.component.js +3 -3
  50. package/esm2015/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.js +3 -3
  51. package/esm2015/runtime/execution/components/federated/federated.component.js +3 -3
  52. package/esm2015/runtime/execution/components/velo-attribute/velo-attribute.component.js +3 -3
  53. package/esm2015/runtime/execution/components/velo-multiselect/velo-multiselect.component.js +3 -3
  54. package/esm2015/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.js +3 -3
  55. package/esm2015/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.js +3 -3
  56. package/esm2015/runtime/execution/components/velo-port-radio/velo-port-radio.component.js +3 -3
  57. package/esm2015/runtime/execution/components/velo-type/velo-type.component.js +3 -3
  58. package/esm2015/runtime/execution/directives/section-script.directive.js +3 -3
  59. package/esm2015/runtime/execution/directives/sf-query.directive.js +3 -3
  60. package/esm2015/runtime/execution/directives/velo-attribute.directive.js +3 -3
  61. package/esm2015/runtime/execution/directives/velo-port.directive.js +18 -18
  62. package/esm2015/runtime/execution/directives/vl-approval.directive.js +3 -3
  63. package/esm2015/runtime/execution/directives/vl-document-attachments.directive.js +3 -3
  64. package/esm2015/runtime/execution/directives/vl-document-templates.directive.js +3 -3
  65. package/esm2015/runtime/execution/directives/vl-quote.directive.js +3 -3
  66. package/esm2015/runtime/execution/directives/vl-ramp.directive.js +3 -3
  67. package/esm2015/runtime/execution/runtime-execution.module.js +4 -4
  68. package/esm2015/runtime/runtime.module.js +4 -4
  69. package/esm2015/runtime/services/cart.service.js +3 -3
  70. package/esm2015/runtime/services/collapsible-state.service.js +3 -3
  71. package/esm2015/runtime/services/configuration.service.js +3 -3
  72. package/esm2015/runtime/services/context.service.js +6 -6
  73. package/esm2015/runtime/services/current-state.service.js +3 -3
  74. package/esm2015/runtime/services/form-scope.service.js +3 -3
  75. package/esm2015/runtime/services/product-model-cache.service.js +3 -3
  76. package/esm2015/runtime/services/quote.service.js +3 -3
  77. package/esm2015/runtime/services/runtime-context.service.js +3 -3
  78. package/esm2015/runtime/services/runtime-form.service.js +3 -3
  79. package/esm2015/runtime/services/runtime.service.js +3 -3
  80. package/esm2015/runtime/services/section-helper.service.js +3 -3
  81. package/esm2015/runtime/services/section-scope.service.js +3 -3
  82. package/esm2015/runtime/services/section-store.service.js +3 -3
  83. package/esm2015/runtime/services/section.service.js +6 -6
  84. package/esm2015/src/flow-routing.module.js +4 -4
  85. package/esm2015/src/flow.component.js +3 -3
  86. package/esm2015/src/flow.module.js +4 -4
  87. package/esm2015/src/guards/context.guard.js +3 -3
  88. package/esm2015/src/guards/root.guard.js +3 -3
  89. package/esm2015/src/pages/debug/debug.component.js +3 -3
  90. package/esm2015/src/pages/debug/debug.module.js +4 -4
  91. package/esm2015/src/pages/legacy-product/legacy-product.component.js +3 -3
  92. package/esm2015/src/pages/legacy-product/legacy-product.module.js +4 -4
  93. package/esm2015/src/pages/product/product.component.js +3 -3
  94. package/esm2015/src/pages/product/product.module.js +4 -4
  95. package/esm2015/src/pages/record-not-found/record-not-found.component.js +3 -3
  96. package/esm2015/src/pages/record-not-found/record-not-found.module.js +4 -4
  97. package/esm2015/src/resolvers/context.resolver.js +3 -3
  98. package/esm2015/src/resolvers/flow.resolver.js +3 -3
  99. package/esm2015/src/resolvers/quote.resolver.js +3 -3
  100. package/esm2015/src/services/flow.service.js +3 -3
  101. package/esm2015/src/services/router.service.js +3 -3
  102. package/fesm2015/veloce-sdk-cms.js +300 -292
  103. package/fesm2015/veloce-sdk-cms.js.map +1 -1
  104. package/fesm2015/veloce-sdk-runtime.js +144 -144
  105. package/fesm2015/veloce-sdk-runtime.js.map +1 -1
  106. package/fesm2015/veloce-sdk.js +60 -60
  107. package/fesm2015/veloce-sdk.js.map +1 -1
  108. 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('@angular/forms'), require('@veloce/core'), 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', '@angular/forms', '@veloce/core', '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.ng.forms, global["@veloce/core"], 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, angularForms, core, lodash, i2, rxjsOperators, i1, i2$1, standalone, i5) { 'use strict';
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 () {
@@ -425,8 +427,14 @@
425
427
  if (((_c = segments[segments.length - 1]) === null || _c === void 0 ? void 0 : _c[0]) === ':') {
426
428
  variable = (_d = segments.pop()) === null || _d === void 0 ? void 0 : _d.substring(1);
427
429
  }
430
+ var isAbsolute = !segments[0];
431
+ var nonEmptySegments = segments.filter(Boolean);
432
+ if (!isAbsolute && nonEmptySegments[0] === '.') {
433
+ nonEmptySegments.shift();
434
+ }
428
435
  return {
429
- segments: segments,
436
+ isAbsolute: isAbsolute,
437
+ segments: nonEmptySegments,
430
438
  module: module,
431
439
  variable: variable,
432
440
  };
@@ -455,16 +463,15 @@
455
463
  return;
456
464
  };
457
465
  var getAbsolutePath = function (elements, subject, path) {
458
- var _a, _b, _c, _d;
466
+ var _a, _b, _c;
459
467
  if (path.module) {
460
468
  return (_a = findElementByModule(elements, path.module, path.segments[0])) === null || _a === void 0 ? void 0 : _a.path;
461
469
  }
462
470
  var subjectSegments = (_c = (_b = subject.path) === null || _b === void 0 ? void 0 : _b.split('/')) !== null && _c !== void 0 ? _c : [];
463
- var isRelativePath = ((_d = path.segments[0]) === null || _d === void 0 ? void 0 : _d[0]) === '.';
464
- if (!isRelativePath) {
465
- return path.segments.join('/');
466
- }
467
471
  var segments = __spreadArray([], __read(path.segments));
472
+ if (path.isAbsolute) {
473
+ return segments.join('/');
474
+ }
468
475
  while (segments.length) {
469
476
  var segment = segments.shift();
470
477
  if (segment === '..') {
@@ -511,9 +518,9 @@
511
518
  };
512
519
  return DynamicModuleService;
513
520
  }());
514
- DynamicModuleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
515
- DynamicModuleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService });
516
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService, decorators: [{
521
+ DynamicModuleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DynamicModuleService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
522
+ DynamicModuleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DynamicModuleService });
523
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DynamicModuleService, decorators: [{
517
524
  type: i0.Injectable
518
525
  }] });
519
526
 
@@ -543,19 +550,25 @@
543
550
  return this.createSubjectSafe(absolutePath !== null && absolutePath !== void 0 ? absolutePath : '', finalName, value);
544
551
  };
545
552
  IOProviderService.prototype.createSubjectSafe = function (path, name, subject) {
553
+ var _this = this;
546
554
  if (!this.inputs[path]) {
547
555
  this.inputs[path] = {};
548
556
  }
557
+ var subjectAlreadyExists = Boolean(this.inputs[path][name]);
549
558
  if (!this.inputs[path][name]) {
550
559
  this.inputs[path][name] = subject !== null && subject !== void 0 ? subject : new rxjs.BehaviorSubject(undefined);
551
560
  }
561
+ if (subject && subjectAlreadyExists) {
562
+ // push delayed value to workaround 'changed after it was checked' issue
563
+ setTimeout(function () { return _this.inputs[path][name].next(subject.value); });
564
+ }
552
565
  return this.inputs[path][name];
553
566
  };
554
567
  return IOProviderService;
555
568
  }());
556
- IOProviderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOProviderService, deps: [{ token: DynamicModuleService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
557
- IOProviderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOProviderService });
558
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOProviderService, decorators: [{
569
+ 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 });
570
+ IOProviderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IOProviderService });
571
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IOProviderService, decorators: [{
559
572
  type: i0.Injectable
560
573
  }], ctorParameters: function () { return [{ type: DynamicModuleService }]; } });
561
574
 
@@ -571,9 +584,9 @@
571
584
  };
572
585
  return TemplatesService;
573
586
  }());
574
- TemplatesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TemplatesService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
575
- TemplatesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TemplatesService });
576
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TemplatesService, decorators: [{
587
+ TemplatesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
588
+ TemplatesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesService });
589
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesService, decorators: [{
577
590
  type: i0.Injectable
578
591
  }] });
579
592
 
@@ -607,31 +620,81 @@
607
620
  }
608
621
  return IOPlugin;
609
622
  }());
610
- IOPlugin.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOPlugin, deps: [{ token: exports.ElementComponent }], target: i0__namespace.ɵɵFactoryTarget.Directive });
611
- IOPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: IOPlugin, ngImport: i0__namespace });
612
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOPlugin, decorators: [{
623
+ 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 });
624
+ IOPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: IOPlugin, ngImport: i0__namespace });
625
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IOPlugin, decorators: [{
626
+ type: i0.Directive
627
+ }], ctorParameters: function () { return [{ type: exports.ElementComponent }]; } });
628
+
629
+ var normalizeImports = function (script) {
630
+ 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');
631
+ var result = script.replace(regexp, function (match, g1, g2, src) { return "const " + g1 + " = vendor['" + src + "'];"; });
632
+ return result;
633
+ };
634
+ var ScriptPlugin = /** @class */ (function () {
635
+ function ScriptPlugin(host) {
636
+ this.host = host;
637
+ this.document = this.host.injector.get(i7.DOCUMENT);
638
+ this.vendorMap = this.host.injector.get(VENDOR_MAP);
639
+ var elementMetadata = this.host.injector.get(ELEMENT_METADATA);
640
+ var sharedElementMetadata = this.host.injector.get(SHARED_ELEMENT_METADATA);
641
+ if (sharedElementMetadata === null || sharedElementMetadata === void 0 ? void 0 : sharedElementMetadata.script) {
642
+ this.addScript(sharedElementMetadata.script);
643
+ }
644
+ if (elementMetadata.script) {
645
+ this.addScript(elementMetadata.script);
646
+ }
647
+ }
648
+ ScriptPlugin.prototype.addScript = function (scriptStr) {
649
+ var id = btoa(core.UUID.UUID());
650
+ var script = this.document.createElement('script');
651
+ script.type = "text/javascript";
652
+ var scriptContent = normalizeImports(scriptStr);
653
+ var classMatch = /export class (\S+)/.exec(scriptContent);
654
+ var className = classMatch === null || classMatch === void 0 ? void 0 : classMatch[1];
655
+ if (!classMatch || !className) {
656
+ console.error("Script doesn't have exported class");
657
+ return;
658
+ }
659
+ scriptContent = scriptContent.replace(classMatch[0], "class " + className);
660
+ script.text = "var " + id + " = function(vendor) {" + scriptContent + "\n return " + className + "; };";
661
+ this.document.body.appendChild(script);
662
+ var ScriptClass = window[id](this.vendorMap);
663
+ if (ScriptClass instanceof Object) {
664
+ this.host.registerPlugin(new ScriptClass(this.host));
665
+ }
666
+ this.document.body.removeChild(script);
667
+ };
668
+ return ScriptPlugin;
669
+ }());
670
+ 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 });
671
+ ScriptPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ScriptPlugin, ngImport: i0__namespace });
672
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ScriptPlugin, decorators: [{
613
673
  type: i0.Directive
614
674
  }], ctorParameters: function () { return [{ type: exports.ElementComponent }]; } });
615
675
 
676
+ /*
677
+ * ScriptPlugin must always be the last plugin in the list to make sure user code is running after all pre-initializers.
678
+ */
616
679
  var CONFIG = {
617
680
  CUSTOM: {
618
681
  component: exports.ElementComponent,
619
- plugins: [IOPlugin],
682
+ plugins: [IOPlugin, ScriptPlugin],
620
683
  },
621
684
  CONTAINER: {
622
685
  component: exports.ElementComponent,
623
686
  defaultTemplate: '<element-children></element-children>',
624
- plugins: [],
687
+ plugins: [ScriptPlugin],
625
688
  },
626
689
  SERVICE: {
627
690
  component: exports.ElementComponent,
628
- plugins: [IOPlugin],
691
+ plugins: [IOPlugin, ScriptPlugin],
629
692
  suppressTemplate: true,
630
693
  suppressStyles: true,
631
694
  },
632
695
  REFERENCE: {
633
696
  component: exports.ElementComponent,
634
- plugins: [IOPlugin],
697
+ plugins: [IOPlugin, ScriptPlugin],
635
698
  suppressTemplate: true,
636
699
  },
637
700
  };
@@ -772,9 +835,9 @@
772
835
  }
773
836
  return ElementContextService;
774
837
  }());
775
- ElementContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementContextService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
776
- ElementContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementContextService });
777
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementContextService, decorators: [{
838
+ ElementContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementContextService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
839
+ ElementContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementContextService });
840
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementContextService, decorators: [{
778
841
  type: i0.Injectable
779
842
  }] });
780
843
 
@@ -919,7 +982,7 @@
919
982
  var getDefaultLineItem = function (context, uiDefinitionProperties) {
920
983
  var _a, _b, _c;
921
984
  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 : '', offeringId: context.offeringId }, (context.offeringId
985
+ 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
986
  ? { offeringId: context.offeringId, offeringInstanceId: context.offeringInstanceId || id }
924
987
  : {}));
925
988
  return lineItem;
@@ -933,10 +996,10 @@
933
996
  RuntimeContextService.prototype.getRuntimeContext = function (productId, offeringId) {
934
997
  var _this = this;
935
998
  return this.configurationApiService.getRuntimeDataByProductId(productId, offeringId).pipe(rxjsOperators.map(function (runtimeData) {
936
- var _a, _b;
999
+ var _a, _b, _c, _d;
937
1000
  var uiDefinition = _this.getUIDefinition(runtimeData);
938
1001
  var runtimeModel = core.RuntimeModel.create(runtimeData.types, runtimeData.products);
939
- var _c = (_a = Array.from(runtimeModel.components.values()).find(function (c) { return c.productId === productId; })) !== null && _a !== void 0 ? _a : {}, productName = _c.productName, properties = _c.properties;
1002
+ 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
1003
  return {
941
1004
  modelId: runtimeData.modelId,
942
1005
  uiDefinition: uiDefinition,
@@ -945,8 +1008,10 @@
945
1008
  productId: productId,
946
1009
  productType: (properties === null || properties === void 0 ? void 0 : properties.displayName) || productName,
947
1010
  offeringId: offeringId,
1011
+ priceListId: (_b = uiDefinition === null || uiDefinition === void 0 ? void 0 : uiDefinition.properties) === null || _b === void 0 ? void 0 : _b.priceList,
948
1012
  properties: {
949
- PricingEnabled: (_b = uiDefinition === null || uiDefinition === void 0 ? void 0 : uiDefinition.properties) === null || _b === void 0 ? void 0 : _b.pricingEnabled,
1013
+ PricingEnabled: (_c = uiDefinition === null || uiDefinition === void 0 ? void 0 : uiDefinition.properties) === null || _c === void 0 ? void 0 : _c.pricingEnabled,
1014
+ PriceListId: (_d = uiDefinition === null || uiDefinition === void 0 ? void 0 : uiDefinition.properties) === null || _d === void 0 ? void 0 : _d.priceList,
950
1015
  },
951
1016
  };
952
1017
  }));
@@ -974,9 +1039,9 @@
974
1039
  };
975
1040
  return RuntimeContextService;
976
1041
  }());
977
- RuntimeContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RuntimeContextService, deps: [{ token: i1__namespace.ConfigurationApiService }, { token: i2__namespace.MessageService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
978
- RuntimeContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RuntimeContextService });
979
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RuntimeContextService, decorators: [{
1042
+ 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 });
1043
+ RuntimeContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RuntimeContextService });
1044
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RuntimeContextService, decorators: [{
980
1045
  type: i0.Injectable
981
1046
  }], ctorParameters: function () { return [{ type: i1__namespace.ConfigurationApiService }, { type: i2__namespace.MessageService }]; } });
982
1047
 
@@ -1001,14 +1066,17 @@
1001
1066
  this.apiService.getRuntimeDataByModelId(modelId),
1002
1067
  this.contextService.create('TestId', core.ConfigurationContextMode.TEST),
1003
1068
  ]).pipe(rxjsOperators.first(), rxjsOperators.tap(function (_d) {
1004
- var _e = __read(_d, 1), runtimeData = _e[0];
1005
- var runtimeModel = core.RuntimeModel.create(runtimeData.types, runtimeData.products);
1006
- var runtimeContext = {
1069
+ var _e = __read(_d, 2), runtimeData = _e[0], configurationContext = _e[1];
1070
+ var _a;
1071
+ _this._runtimeContext = {
1007
1072
  modelId: modelId,
1008
- runtimeModel: runtimeModel,
1073
+ runtimeModel: core.RuntimeModel.create(runtimeData.types, runtimeData.products),
1009
1074
  runtimeMode: i2.RuntimeMode.TEST,
1010
1075
  };
1011
- _this._runtimeContext = runtimeContext;
1076
+ _this.contextService.update({
1077
+ priceListId: uiDefinitionProperties.priceList,
1078
+ 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 }),
1079
+ });
1012
1080
  _this._isInitialized = true;
1013
1081
  }));
1014
1082
  };
@@ -1023,18 +1091,25 @@
1023
1091
  var _a, _b, _c;
1024
1092
  _this.uiDefinitionProperties = (_b = (_a = runtimeContext.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {};
1025
1093
  var mergeContext = Object.assign(Object.assign({}, runtimeContext), { properties: Object.assign(Object.assign({}, runtimeContext.properties), configurationContext.properties) });
1026
- var accountId = (_c = mergeContext.properties) === null || _c === void 0 ? void 0 : _c.AccountId;
1027
- if (accountId && accountId.length === 15) {
1028
- _this.patchContext(mergeContext, {
1029
- properties: { AccountId: core.SalesforceIdUtils.generateId18FromId15(accountId) },
1094
+ _this.id15to18('AccountId', mergeContext.properties);
1095
+ _this._runtimeContext = mergeContext;
1096
+ if (configurationContext.properties && ((_c = runtimeContext.properties) === null || _c === void 0 ? void 0 : _c.StartDate)) {
1097
+ _this.contextService.update({
1098
+ priceListId: _this.uiDefinitionProperties.priceList,
1099
+ properties: Object.assign(Object.assign(Object.assign({}, runtimeContext.properties), configurationContext.properties), { PricingEnabled: String(_this.uiDefinitionProperties.pricingEnabled), PriceListId: _this.uiDefinitionProperties.priceList }),
1030
1100
  });
1031
1101
  }
1032
- _this._runtimeContext = mergeContext;
1033
1102
  _this._isInitialized = true;
1034
1103
  }));
1035
1104
  };
1036
- ConfigurationRuntimeService.prototype.patchContext = function (context, patch) {
1037
- lodash.merge(context, patch);
1105
+ ConfigurationRuntimeService.prototype.id15to18 = function (propertyName, source) {
1106
+ if (!source) {
1107
+ return;
1108
+ }
1109
+ var value = source[propertyName];
1110
+ if (typeof value === 'string' && value.length === 15) {
1111
+ source[propertyName] = core.SalesforceIdUtils.generateId18FromId15(value);
1112
+ }
1038
1113
  };
1039
1114
  ConfigurationRuntimeService.prototype.getAsset = function (lineItem) {
1040
1115
  return this._assets && this._assets.find(function (a) { return a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId; });
@@ -1063,9 +1138,9 @@
1063
1138
  });
1064
1139
  return ConfigurationRuntimeService;
1065
1140
  }());
1066
- ConfigurationRuntimeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationRuntimeService, deps: [{ token: i1__namespace.ConfigurationApiService }, { token: i2__namespace$1.ContextService }, { token: RuntimeContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1067
- ConfigurationRuntimeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationRuntimeService });
1068
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationRuntimeService, decorators: [{
1141
+ 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 });
1142
+ ConfigurationRuntimeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationRuntimeService });
1143
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationRuntimeService, decorators: [{
1069
1144
  type: i0.Injectable
1070
1145
  }], ctorParameters: function () { return [{ type: i1__namespace.ConfigurationApiService }, { type: i2__namespace$1.ContextService }, { type: RuntimeContextService }]; } });
1071
1146
 
@@ -1166,26 +1241,6 @@
1166
1241
  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
1242
  };
1168
1243
  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
1244
  return {
1190
1245
  lineItem: lineItem,
1191
1246
  mode: this.mode,
@@ -1196,9 +1251,9 @@
1196
1251
  };
1197
1252
  return ConfigurationService;
1198
1253
  }());
1199
- ConfigurationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", 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 });
1200
- ConfigurationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationService });
1201
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationService, decorators: [{
1254
+ 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 });
1255
+ ConfigurationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationService });
1256
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationService, decorators: [{
1202
1257
  type: i0.Injectable
1203
1258
  }], ctorParameters: function () { return [{ type: ConfigurationRuntimeService }, { type: i2__namespace$1.ContextService }, { type: i1__namespace.ConfigurationApiService }, { type: i2__namespace.MessageService }]; } });
1204
1259
 
@@ -1323,9 +1378,9 @@
1323
1378
  };
1324
1379
  return ElementRendererComponent;
1325
1380
  }());
1326
- ElementRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", 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 });
1327
- ElementRendererComponent.ɵcmp = i0__namespace.ɵɵ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: i0.ViewContainerRef, static: true }], ngImport: i0__namespace, template: "<ng-template #el></ng-template>\n", styles: [":host{display:contents}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1328
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererComponent, decorators: [{
1381
+ 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 });
1382
+ 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 });
1383
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererComponent, decorators: [{
1329
1384
  type: i0.Component,
1330
1385
  args: [{
1331
1386
  selector: 'vl-cms-element-renderer',
@@ -1352,9 +1407,9 @@
1352
1407
  }
1353
1408
  return ElementChildrenComponent;
1354
1409
  }());
1355
- ElementChildrenComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenComponent, deps: [{ token: ElementContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1356
- ElementChildrenComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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 });
1357
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenComponent, decorators: [{
1410
+ 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 });
1411
+ 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 });
1412
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenComponent, decorators: [{
1358
1413
  type: i0.Component,
1359
1414
  args: [{
1360
1415
  // eslint-disable-next-line @angular-eslint/component-selector
@@ -1365,6 +1420,159 @@
1365
1420
  }]
1366
1421
  }], ctorParameters: function () { return [{ type: ElementContextService }]; } });
1367
1422
 
1423
+ var moduleMap = {};
1424
+ function loadRemoteEntry(remoteEntry) {
1425
+ return new Promise(function (resolve, reject) {
1426
+ if (moduleMap[remoteEntry]) {
1427
+ resolve();
1428
+ return;
1429
+ }
1430
+ var script = document.createElement('script');
1431
+ script.src = remoteEntry;
1432
+ script.onerror = reject;
1433
+ script.onload = function () {
1434
+ moduleMap[remoteEntry] = true;
1435
+ resolve(); // window is the global namespace
1436
+ };
1437
+ document.body.append(script);
1438
+ });
1439
+ }
1440
+ function lookupExposedModule(remoteName, exposedModule) {
1441
+ return __awaiter(this, void 0, void 0, function () {
1442
+ var container, factory, Module;
1443
+ return __generator(this, function (_a) {
1444
+ switch (_a.label) {
1445
+ case 0:
1446
+ // Initializes the share scope. This fills it with known provided modules from this build and all remotes
1447
+ return [4 /*yield*/, __webpack_init_sharing__('default')];
1448
+ case 1:
1449
+ // Initializes the share scope. This fills it with known provided modules from this build and all remotes
1450
+ _a.sent();
1451
+ container = window[remoteName];
1452
+ // Initialize the container, it may provide shared modules
1453
+ return [4 /*yield*/, container.init(__webpack_share_scopes__.default)];
1454
+ case 2:
1455
+ // Initialize the container, it may provide shared modules
1456
+ _a.sent();
1457
+ return [4 /*yield*/, container.get(exposedModule)];
1458
+ case 3:
1459
+ factory = _a.sent();
1460
+ Module = factory();
1461
+ return [2 /*return*/, Module];
1462
+ }
1463
+ });
1464
+ });
1465
+ }
1466
+ function loadRemoteModule(options) {
1467
+ return __awaiter(this, void 0, void 0, function () {
1468
+ return __generator(this, function (_a) {
1469
+ switch (_a.label) {
1470
+ case 0: return [4 /*yield*/, loadRemoteEntry(options.remoteEntry)];
1471
+ case 1:
1472
+ _a.sent();
1473
+ return [4 /*yield*/, lookupExposedModule(options.remoteName, options.exposedModule)];
1474
+ case 2: return [2 /*return*/, _a.sent()];
1475
+ }
1476
+ });
1477
+ });
1478
+ }
1479
+
1480
+ var IntegrationEvent;
1481
+ (function (IntegrationEvent) {
1482
+ IntegrationEvent["Init"] = "Init";
1483
+ })(IntegrationEvent || (IntegrationEvent = {}));
1484
+ var FederatedComponent = /** @class */ (function () {
1485
+ function FederatedComponent(injector, compiler, appRef, renderer) {
1486
+ this.injector = injector;
1487
+ this.compiler = compiler;
1488
+ this.appRef = appRef;
1489
+ this.renderer = renderer;
1490
+ this.integrationEvent = new i0.EventEmitter();
1491
+ this.moduleReady = false;
1492
+ }
1493
+ FederatedComponent.prototype.ngAfterViewInit = function () {
1494
+ var _this = this;
1495
+ if (!this.remoteEntry || !this.remoteName || !this.exposedModule) {
1496
+ return;
1497
+ }
1498
+ loadRemoteModule({
1499
+ remoteEntry: this.remoteEntry,
1500
+ remoteName: this.remoteName,
1501
+ exposedModule: this.exposedModule,
1502
+ }).then(function (federated) {
1503
+ _this.compiler.compileModuleAsync(federated[_this.exposedModule]).then(function (moduleFactory) {
1504
+ var _a;
1505
+ var rootModuleRef = moduleFactory.create(_this.injector);
1506
+ var rootComponentFactory = rootModuleRef.componentFactoryResolver.resolveComponentFactory(federated[_this.exposedModule].rootComponent);
1507
+ var node = document.createElement('div');
1508
+ var _b = rootComponentFactory.create(_this.injector, [], node), instance = _b.instance, hostView = _b.hostView;
1509
+ _this.instance = instance;
1510
+ _this.instance.data = _this.data;
1511
+ _this.instance.eventData = _this.eventData;
1512
+ _this.instance.integrationEvent = _this.integrationEvent;
1513
+ _this.renderer.appendChild((_a = _this.moduleHostRef) === null || _a === void 0 ? void 0 : _a.nativeElement, node);
1514
+ _this.appRef.attachView(hostView);
1515
+ });
1516
+ });
1517
+ };
1518
+ FederatedComponent.prototype.ngOnChanges = function (changes) {
1519
+ if (!this.instance) {
1520
+ return;
1521
+ }
1522
+ this.instance.ngOnChanges(changes);
1523
+ };
1524
+ return FederatedComponent;
1525
+ }());
1526
+ 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 });
1527
+ 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 });
1528
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedComponent, decorators: [{
1529
+ type: i0.Component,
1530
+ args: [{
1531
+ // eslint-disable-next-line @angular-eslint/component-selector
1532
+ selector: 'veloce-host-federated',
1533
+ templateUrl: './federated.component.html',
1534
+ styleUrls: ['./federated.component.scss'],
1535
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1536
+ }]
1537
+ }], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: i0__namespace.Compiler }, { type: i0__namespace.ApplicationRef }, { type: i0__namespace.Renderer2 }]; }, propDecorators: { federatedComponent: [{
1538
+ type: i0.ViewChild,
1539
+ args: ['federatedComponent', { read: i0.ViewContainerRef }]
1540
+ }], foo: [{
1541
+ type: i0.ViewChild,
1542
+ args: ['foo', { read: i0.TemplateRef }]
1543
+ }], moduleHostRef: [{
1544
+ type: i0.ViewChild,
1545
+ args: ['moduleHost', { static: false }]
1546
+ }], remoteEntry: [{
1547
+ type: i0.Input
1548
+ }], remoteName: [{
1549
+ type: i0.Input
1550
+ }], exposedModule: [{
1551
+ type: i0.Input
1552
+ }], data: [{
1553
+ type: i0.Input
1554
+ }], eventData: [{
1555
+ type: i0.Input
1556
+ }], integrationEvent: [{
1557
+ type: i0.Output
1558
+ }] } });
1559
+
1560
+ var FederatedModule = /** @class */ (function () {
1561
+ function FederatedModule() {
1562
+ }
1563
+ return FederatedModule;
1564
+ }());
1565
+ FederatedModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1566
+ FederatedModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedModule, declarations: [FederatedComponent], exports: [FederatedComponent] });
1567
+ FederatedModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedModule });
1568
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedModule, decorators: [{
1569
+ type: i0.NgModule,
1570
+ args: [{
1571
+ declarations: [FederatedComponent],
1572
+ exports: [FederatedComponent],
1573
+ }]
1574
+ }] });
1575
+
1368
1576
  // eslint-disable-next-line @angular-eslint/directive-selector
1369
1577
  var CustomTemplateDirective = /** @class */ (function () {
1370
1578
  function CustomTemplateDirective(templateRef, templatesService) {
@@ -1379,9 +1587,9 @@
1379
1587
  };
1380
1588
  return CustomTemplateDirective;
1381
1589
  }());
1382
- CustomTemplateDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CustomTemplateDirective, deps: [{ token: i0__namespace.TemplateRef }, { token: TemplatesService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1383
- CustomTemplateDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: CustomTemplateDirective, selector: "[customTemplate]", inputs: { customTemplate: "customTemplate" }, ngImport: i0__namespace });
1384
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CustomTemplateDirective, decorators: [{
1590
+ 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 });
1591
+ CustomTemplateDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: CustomTemplateDirective, selector: "[customTemplate]", inputs: { customTemplate: "customTemplate" }, ngImport: i0__namespace });
1592
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CustomTemplateDirective, decorators: [{
1385
1593
  type: i0.Directive,
1386
1594
  args: [{ selector: '[customTemplate]' }]
1387
1595
  }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }, { type: TemplatesService }]; }, propDecorators: { customTemplate: [{
@@ -1390,14 +1598,12 @@
1390
1598
 
1391
1599
  var ConfigurationPlugin = /** @class */ (function () {
1392
1600
  function ConfigurationPlugin(host) {
1601
+ var _this = this;
1602
+ var _a, _b;
1393
1603
  this.host = host;
1394
1604
  this.destroy$ = new rxjs.Subject();
1395
1605
  this.elementMetadata = this.host.injector.get(ELEMENT_METADATA);
1396
1606
  this.configurationService = this.host.injector.get(ConfigurationService);
1397
- }
1398
- ConfigurationPlugin.prototype.ngOnInit = function () {
1399
- var _this = this;
1400
- var _a, _b;
1401
1607
  if ((_a = this.elementMetadata.model) === null || _a === void 0 ? void 0 : _a.lineItem) {
1402
1608
  this.host.model$.pipe(rxjs.takeUntil(this.destroy$)).subscribe(function (model) { return (_this.modelSnapshot = model); });
1403
1609
  var pathBlocks = parseBoundPath((_b = this.elementMetadata.model) === null || _b === void 0 ? void 0 : _b.lineItem);
@@ -1405,7 +1611,7 @@
1405
1611
  this.host.boundName = name !== null && name !== void 0 ? name : type;
1406
1612
  this.register(type, property, name);
1407
1613
  }
1408
- };
1614
+ }
1409
1615
  ConfigurationPlugin.prototype.ngOnDestroy = function () {
1410
1616
  this.destroy$.next();
1411
1617
  this.destroy$.complete();
@@ -1490,12 +1696,17 @@
1490
1696
  });
1491
1697
  return ConfigurationPlugin;
1492
1698
  }());
1493
- ConfigurationPlugin.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationPlugin, deps: "invalid", target: i0__namespace.ɵɵFactoryTarget.Directive });
1494
- ConfigurationPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: ConfigurationPlugin, ngImport: i0__namespace });
1495
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationPlugin, decorators: [{
1699
+ 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 });
1700
+ ConfigurationPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ConfigurationPlugin, ngImport: i0__namespace });
1701
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationPlugin, decorators: [{
1496
1702
  type: i0.Directive
1497
1703
  }], ctorParameters: function () { return [{ type: undefined }]; } });
1498
1704
 
1705
+ var DEFAULT_PLUGINS = {
1706
+ CONFIGURATION: [ConfigurationPlugin],
1707
+ DEFAULT: [],
1708
+ };
1709
+
1499
1710
  var vlCmsModules = /*#__PURE__*/Object.freeze({
1500
1711
  __proto__: null,
1501
1712
  getDefaultLineItem: getDefaultLineItem,
@@ -1531,7 +1742,7 @@
1531
1742
  '@veloce/sdk/cms': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, vlCmsModules), vlCmsUtils), vlCmsLineItemTypes), vlInjectionTokens), { TemplatesService: TemplatesService }),
1532
1743
  '@veloce/api': {
1533
1744
  SalesforceApiService: i1.SalesforceApiService,
1534
- QuoteApiService: i1.QuoteApiService
1745
+ QuoteApiService: i1.QuoteApiService,
1535
1746
  },
1536
1747
  '@angular/core': i0__namespace,
1537
1748
  '@angular/forms': angularForms__namespace,
@@ -1539,56 +1750,6 @@
1539
1750
  'rxjs/operators': rxjsOperators__namespace,
1540
1751
  lodash: lodash__namespace,
1541
1752
  };
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
1753
 
1593
1754
  var ElementsResolver = /** @class */ (function () {
1594
1755
  function ElementsResolver(uiDef, elements) {
@@ -1691,6 +1852,7 @@
1691
1852
  { provide: ELEMENT_METADATA, useValue: element },
1692
1853
  { provide: SHARED_ELEMENT_METADATA, useValue: this.getSharedElement(sourceElement) },
1693
1854
  { provide: ELEMENT_CONFIG, useValue: config },
1855
+ { provide: VENDOR_MAP, useValue: vendorMap },
1694
1856
  ] });
1695
1857
  var cmp = i0.Component(component)(/** @class */ (function (_super) {
1696
1858
  __extends(C, _super);
@@ -1709,159 +1871,6 @@
1709
1871
  return ElementsResolver;
1710
1872
  }());
1711
1873
 
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
1874
  var LauncherService = /** @class */ (function () {
1866
1875
  function LauncherService(compiler, dynamicModuleService) {
1867
1876
  this.compiler = compiler;
@@ -1905,9 +1914,9 @@
1905
1914
  };
1906
1915
  return LauncherService;
1907
1916
  }());
1908
- LauncherService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherService, deps: [{ token: i0__namespace.Compiler }, { token: DynamicModuleService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1909
- LauncherService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherService });
1910
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherService, decorators: [{
1917
+ 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 });
1918
+ LauncherService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherService });
1919
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherService, decorators: [{
1911
1920
  type: i0.Injectable
1912
1921
  }], ctorParameters: function () { return [{ type: i0__namespace.Compiler }, { type: DynamicModuleService }]; } });
1913
1922
 
@@ -1977,9 +1986,9 @@
1977
1986
  };
1978
1987
  return PreviewComponent;
1979
1988
  }());
1980
- PreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewComponent, deps: [{ token: LauncherService }, { token: ConfigurationService }, { token: i2__namespace.MessageService }, { token: ConfigurationRuntimeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1981
- PreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", 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 });
1982
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewComponent, decorators: [{
1989
+ 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 });
1990
+ 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", "overlayVisible"] }, { 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 });
1991
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewComponent, decorators: [{
1983
1992
  type: i0.Component,
1984
1993
  args: [{
1985
1994
  selector: 'vl-cms-preview',
@@ -1999,10 +2008,10 @@
1999
2008
  }
2000
2009
  return ElementRendererModule;
2001
2010
  }());
2002
- ElementRendererModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2003
- ElementRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule, declarations: [ElementRendererComponent], exports: [ElementRendererComponent] });
2004
- ElementRendererModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule });
2005
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule, decorators: [{
2011
+ ElementRendererModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2012
+ ElementRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule, declarations: [ElementRendererComponent], exports: [ElementRendererComponent] });
2013
+ ElementRendererModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule });
2014
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule, decorators: [{
2006
2015
  type: i0.NgModule,
2007
2016
  args: [{
2008
2017
  declarations: [ElementRendererComponent],
@@ -2015,10 +2024,10 @@
2015
2024
  }
2016
2025
  return ElementChildrenModule;
2017
2026
  }());
2018
- ElementChildrenModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2019
- ElementChildrenModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, declarations: [ElementChildrenComponent], imports: [ElementRendererModule], exports: [ElementChildrenComponent] });
2020
- ElementChildrenModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, imports: [[ElementRendererModule]] });
2021
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, decorators: [{
2027
+ ElementChildrenModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2028
+ ElementChildrenModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, declarations: [ElementChildrenComponent], imports: [ElementRendererModule], exports: [ElementChildrenComponent] });
2029
+ ElementChildrenModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, imports: [[ElementRendererModule]] });
2030
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, decorators: [{
2022
2031
  type: i0.NgModule,
2023
2032
  args: [{
2024
2033
  declarations: [ElementChildrenComponent],
@@ -2032,10 +2041,10 @@
2032
2041
  }
2033
2042
  return PreviewModule;
2034
2043
  }());
2035
- PreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2036
- PreviewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, declarations: [PreviewComponent], imports: [i7.CommonModule, i5.LoaderModule, ElementRendererModule, ElementChildrenModule], exports: [PreviewComponent] });
2037
- PreviewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, imports: [[i7.CommonModule, i5.LoaderModule, ElementRendererModule, ElementChildrenModule]] });
2038
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, decorators: [{
2044
+ PreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2045
+ 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] });
2046
+ 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]] });
2047
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewModule, decorators: [{
2039
2048
  type: i0.NgModule,
2040
2049
  args: [{
2041
2050
  declarations: [PreviewComponent],
@@ -2055,9 +2064,9 @@
2055
2064
  }
2056
2065
  return ConfigurationModule;
2057
2066
  }());
2058
- ConfigurationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2059
- ConfigurationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule });
2060
- ConfigurationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, providers: [
2067
+ ConfigurationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2068
+ ConfigurationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule });
2069
+ ConfigurationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule, providers: [
2061
2070
  i2.ContextService,
2062
2071
  i1.ContextApiService,
2063
2072
  i1.ProductModelApiService,
@@ -2066,7 +2075,7 @@
2066
2075
  RuntimeContextService,
2067
2076
  ConfigurationService,
2068
2077
  ] });
2069
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, decorators: [{
2078
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule, decorators: [{
2070
2079
  type: i0.NgModule,
2071
2080
  args: [{
2072
2081
  providers: [
@@ -2086,10 +2095,10 @@
2086
2095
  }
2087
2096
  return LauncherModule;
2088
2097
  }());
2089
- LauncherModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2090
- LauncherModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, imports: [i7.CommonModule, core.CoreModule, ConfigurationModule] });
2091
- LauncherModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, providers: [LauncherService, DynamicModuleService, i1.SalesforceApiService, i1.QuoteApiService], imports: [[i7.CommonModule, core.CoreModule, ConfigurationModule]] });
2092
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, decorators: [{
2098
+ LauncherModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2099
+ LauncherModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherModule, imports: [i7.CommonModule, core.CoreModule, ConfigurationModule] });
2100
+ 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]] });
2101
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherModule, decorators: [{
2093
2102
  type: i0.NgModule,
2094
2103
  args: [{
2095
2104
  imports: [i7.CommonModule, core.CoreModule, ConfigurationModule],
@@ -2115,6 +2124,7 @@
2115
2124
  exports.SHARED_ELEMENT_METADATA = SHARED_ELEMENT_METADATA;
2116
2125
  exports.TemplatesService = TemplatesService;
2117
2126
  exports.UI_DEFINITION_METADATA = UI_DEFINITION_METADATA;
2127
+ exports.VENDOR_MAP = VENDOR_MAP;
2118
2128
  exports.doesElementSupportIO = doesElementSupportIO;
2119
2129
  exports.elementToMetadata = elementToMetadata;
2120
2130
  exports.extendElementMetadata = extendElementMetadata;