@veloceapps/sdk 2.0.4 → 2.0.5

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 (142) hide show
  1. package/bundles/veloce-sdk-cms.umd.js +515 -352
  2. package/bundles/veloce-sdk-cms.umd.js.map +1 -1
  3. package/bundles/veloce-sdk-runtime.umd.js +145 -144
  4. package/bundles/veloce-sdk-runtime.umd.js.map +1 -1
  5. package/bundles/veloce-sdk.umd.js +1104 -8
  6. package/bundles/veloce-sdk.umd.js.map +1 -1
  7. package/cms/components/preview/preview.component.d.ts +4 -1
  8. package/cms/modules/configuration/index.d.ts +2 -0
  9. package/cms/modules/configuration/services/configuration-runtime.service.d.ts +29 -0
  10. package/cms/modules/configuration/services/configuration.service.d.ts +6 -9
  11. package/cms/modules/configuration/services/runtime-context.service.d.ts +14 -0
  12. package/cms/modules/configuration/types/configuration-runtime.types.d.ts +6 -0
  13. package/cms/modules/configuration/types/configuration.types.d.ts +2 -0
  14. package/esm2015/cms/components/element-children/element-children.component.js +3 -3
  15. package/esm2015/cms/components/element-children/element-children.module.js +4 -4
  16. package/esm2015/cms/components/element-renderer/element-renderer.component.js +3 -3
  17. package/esm2015/cms/components/element-renderer/element-renderer.module.js +4 -4
  18. package/esm2015/cms/components/federated/federated.component.js +3 -3
  19. package/esm2015/cms/components/federated/federated.module.js +4 -4
  20. package/esm2015/cms/components/plugin.component.js +3 -3
  21. package/esm2015/cms/components/preview/preview.component.js +32 -24
  22. package/esm2015/cms/components/preview/preview.module.js +4 -4
  23. package/esm2015/cms/directives/custom-template.directive.js +3 -3
  24. package/esm2015/cms/launcher.module.js +4 -4
  25. package/esm2015/cms/modules/configuration/configuration.module.js +25 -6
  26. package/esm2015/cms/modules/configuration/index.js +3 -1
  27. package/esm2015/cms/modules/configuration/services/configuration-runtime.service.js +80 -0
  28. package/esm2015/cms/modules/configuration/services/configuration.service.js +35 -41
  29. package/esm2015/cms/modules/configuration/services/runtime-context.service.js +60 -0
  30. package/esm2015/cms/modules/configuration/types/configuration-runtime.types.js +2 -0
  31. package/esm2015/cms/modules/configuration/types/configuration.types.js +1 -1
  32. package/esm2015/cms/plugins/configuration.plugin.js +3 -3
  33. package/esm2015/cms/plugins/io.plugin.js +3 -3
  34. package/esm2015/cms/plugins/script.plugin.js +3 -3
  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 +3 -3
  38. package/esm2015/cms/services/launcher.service.js +3 -3
  39. package/esm2015/cms/services/templates.service.js +3 -3
  40. package/esm2015/index.js +2 -2
  41. package/esm2015/runtime/components/component-preview/component-preview.component.js +3 -3
  42. package/esm2015/runtime/components/section-renderer/section-renderer.component.js +3 -3
  43. package/esm2015/runtime/components/ui-runtime/runtime.component.js +3 -3
  44. package/esm2015/runtime/components/ui-runtime-preview/runtime-preview.component.js +3 -3
  45. package/esm2015/runtime/execution/components/children-placeholder/children-placeholder.component.js +6 -6
  46. package/esm2015/runtime/execution/components/context-provider/context-provider.component.js +3 -3
  47. package/esm2015/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.js +3 -3
  48. package/esm2015/runtime/execution/components/federated/federated.component.js +3 -3
  49. package/esm2015/runtime/execution/components/velo-attribute/velo-attribute.component.js +3 -3
  50. package/esm2015/runtime/execution/components/velo-multiselect/velo-multiselect.component.js +3 -3
  51. package/esm2015/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.js +3 -3
  52. package/esm2015/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.js +3 -3
  53. package/esm2015/runtime/execution/components/velo-port-radio/velo-port-radio.component.js +3 -3
  54. package/esm2015/runtime/execution/components/velo-type/velo-type.component.js +3 -3
  55. package/esm2015/runtime/execution/directives/section-script.directive.js +3 -3
  56. package/esm2015/runtime/execution/directives/sf-query.directive.js +3 -3
  57. package/esm2015/runtime/execution/directives/velo-attribute.directive.js +3 -3
  58. package/esm2015/runtime/execution/directives/velo-port.directive.js +18 -18
  59. package/esm2015/runtime/execution/directives/vl-approval.directive.js +3 -3
  60. package/esm2015/runtime/execution/directives/vl-document-attachments.directive.js +3 -3
  61. package/esm2015/runtime/execution/directives/vl-document-templates.directive.js +3 -3
  62. package/esm2015/runtime/execution/directives/vl-quote.directive.js +3 -3
  63. package/esm2015/runtime/execution/directives/vl-ramp.directive.js +3 -3
  64. package/esm2015/runtime/execution/runtime-execution.module.js +4 -4
  65. package/esm2015/runtime/runtime.module.js +4 -4
  66. package/esm2015/runtime/services/cart.service.js +3 -3
  67. package/esm2015/runtime/services/collapsible-state.service.js +3 -3
  68. package/esm2015/runtime/services/configuration.service.js +3 -3
  69. package/esm2015/runtime/services/context.service.js +6 -5
  70. package/esm2015/runtime/services/current-state.service.js +3 -3
  71. package/esm2015/runtime/services/form-scope.service.js +3 -3
  72. package/esm2015/runtime/services/product-model-cache.service.js +3 -3
  73. package/esm2015/runtime/services/quote.service.js +3 -3
  74. package/esm2015/runtime/services/runtime-context.service.js +3 -3
  75. package/esm2015/runtime/services/runtime-form.service.js +3 -3
  76. package/esm2015/runtime/services/runtime.service.js +3 -3
  77. package/esm2015/runtime/services/section-helper.service.js +3 -3
  78. package/esm2015/runtime/services/section-scope.service.js +3 -3
  79. package/esm2015/runtime/services/section-store.service.js +3 -3
  80. package/esm2015/runtime/services/section.service.js +6 -6
  81. package/esm2015/src/constants.js +2 -0
  82. package/esm2015/src/flow-routing.module.js +75 -0
  83. package/esm2015/src/flow.component.js +23 -0
  84. package/esm2015/src/flow.module.js +24 -0
  85. package/esm2015/src/guards/context.guard.js +63 -0
  86. package/esm2015/src/guards/index.js +2 -0
  87. package/esm2015/src/guards/root.guard.js +41 -0
  88. package/esm2015/src/index.js +6 -0
  89. package/esm2015/src/pages/debug/debug.component.js +54 -0
  90. package/esm2015/src/pages/debug/debug.module.js +44 -0
  91. package/esm2015/src/pages/legacy-product/legacy-product.component.js +117 -0
  92. package/esm2015/src/pages/legacy-product/legacy-product.module.js +20 -0
  93. package/esm2015/src/pages/product/product.component.js +95 -0
  94. package/esm2015/src/pages/product/product.module.js +20 -0
  95. package/esm2015/src/pages/record-not-found/record-not-found.component.js +26 -0
  96. package/esm2015/src/pages/record-not-found/record-not-found.module.js +20 -0
  97. package/esm2015/src/resolvers/context.resolver.js +42 -0
  98. package/esm2015/src/resolvers/flow.resolver.js +58 -0
  99. package/esm2015/src/resolvers/quote.resolver.js +36 -0
  100. package/esm2015/src/services/flow.service.js +24 -0
  101. package/esm2015/src/services/index.js +2 -0
  102. package/esm2015/src/services/router.service.js +47 -0
  103. package/esm2015/src/types/context-route.types.js +2 -0
  104. package/esm2015/src/types/flow-customization.types.js +3 -0
  105. package/esm2015/src/types/flow.types.js +2 -0
  106. package/esm2015/src/types/index.js +4 -0
  107. package/esm2015/src/types/route.types.js +2 -0
  108. package/fesm2015/veloce-sdk-cms.js +457 -316
  109. package/fesm2015/veloce-sdk-cms.js.map +1 -1
  110. package/fesm2015/veloce-sdk-runtime.js +145 -144
  111. package/fesm2015/veloce-sdk-runtime.js.map +1 -1
  112. package/fesm2015/veloce-sdk.js +725 -1
  113. package/fesm2015/veloce-sdk.js.map +1 -1
  114. package/index.d.ts +1 -2
  115. package/package.json +1 -1
  116. package/src/constants.d.ts +1 -0
  117. package/src/flow-routing.module.d.ts +9 -0
  118. package/src/flow.component.d.ts +8 -0
  119. package/src/flow.module.d.ts +12 -0
  120. package/src/guards/context.guard.d.ts +16 -0
  121. package/src/guards/index.d.ts +1 -0
  122. package/src/guards/root.guard.d.ts +15 -0
  123. package/src/index.d.ts +5 -0
  124. package/src/pages/debug/debug.component.d.ts +24 -0
  125. package/src/pages/debug/debug.module.d.ts +13 -0
  126. package/src/pages/legacy-product/legacy-product.component.d.ts +33 -0
  127. package/src/pages/legacy-product/legacy-product.module.d.ts +10 -0
  128. package/src/pages/product/product.component.d.ts +32 -0
  129. package/src/pages/product/product.module.d.ts +10 -0
  130. package/src/pages/record-not-found/record-not-found.component.d.ts +11 -0
  131. package/src/pages/record-not-found/record-not-found.module.d.ts +9 -0
  132. package/src/resolvers/context.resolver.d.ts +16 -0
  133. package/src/resolvers/flow.resolver.d.ts +14 -0
  134. package/src/resolvers/quote.resolver.d.ts +15 -0
  135. package/src/services/flow.service.d.ts +13 -0
  136. package/src/services/index.d.ts +1 -0
  137. package/src/services/router.service.d.ts +12 -0
  138. package/src/types/context-route.types.d.ts +5 -0
  139. package/src/types/flow-customization.types.d.ts +7 -0
  140. package/src/types/flow.types.d.ts +5 -0
  141. package/src/types/index.d.ts +3 -0
  142. package/src/types/route.types.d.ts +4 -0
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@veloce/core'), require('@veloce/sdk/runtime'), require('rxjs/operators'), require('lodash'), require('@veloce/api'), require('primeng/api'), require('@angular/common'), require('@angular/forms'), require('@babel/standalone'), require('@veloce/components')) :
3
- typeof define === 'function' && define.amd ? define('@veloce/sdk/cms', ['exports', '@angular/core', 'rxjs', '@veloce/core', '@veloce/sdk/runtime', 'rxjs/operators', 'lodash', '@veloce/api', 'primeng/api', '@angular/common', '@angular/forms', '@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["@veloce/core"], global.veloce.sdk.runtime, global.rxjs.operators, global.lodash, global["@veloce/api"], global["primeng/api"], global.ng.common, global.ng.forms, global["@babel/standalone"], global["@veloce/components"]));
5
- })(this, (function (exports, i0, rxjs, core, i2, rxjsOperators, lodash, i1, i3, i6, angularForms, standalone, i4) { 'use strict';
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';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -24,14 +24,14 @@
24
24
 
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
26
  var rxjs__namespace = /*#__PURE__*/_interopNamespace(rxjs);
27
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
28
- var rxjsOperators__namespace = /*#__PURE__*/_interopNamespace(rxjsOperators);
27
+ var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
28
+ var angularForms__namespace = /*#__PURE__*/_interopNamespace(angularForms);
29
29
  var lodash__namespace = /*#__PURE__*/_interopNamespace(lodash);
30
+ var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2);
31
+ var rxjsOperators__namespace = /*#__PURE__*/_interopNamespace(rxjsOperators);
30
32
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
31
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
32
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
33
- var angularForms__namespace = /*#__PURE__*/_interopNamespace(angularForms);
34
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
33
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2$1);
34
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
35
35
 
36
36
  /*! *****************************************************************************
37
37
  Copyright (c) Microsoft Corporation.
@@ -414,6 +414,239 @@
414
414
  __param(0, i0.Inject(i0.Injector))
415
415
  ], exports.ElementComponent);
416
416
 
417
+ var parsePath = function (path) {
418
+ var _a, _b, _c, _d;
419
+ var segments = path.split('/');
420
+ var module;
421
+ var variable;
422
+ if ((_a = segments[0]) === null || _a === void 0 ? void 0 : _a.startsWith('@')) {
423
+ module = (_b = segments.shift()) === null || _b === void 0 ? void 0 : _b.substring(1);
424
+ }
425
+ if (((_c = segments[segments.length - 1]) === null || _c === void 0 ? void 0 : _c[0]) === ':') {
426
+ variable = (_d = segments.pop()) === null || _d === void 0 ? void 0 : _d.substring(1);
427
+ }
428
+ return {
429
+ segments: segments,
430
+ module: module,
431
+ variable: variable,
432
+ };
433
+ };
434
+ var findElementByModule = function (elements, module, elementName) {
435
+ var e_1, _e;
436
+ try {
437
+ for (var elements_1 = __values(elements), elements_1_1 = elements_1.next(); !elements_1_1.done; elements_1_1 = elements_1.next()) {
438
+ var el = elements_1_1.value;
439
+ if (el.module === module && el.name === elementName) {
440
+ return el;
441
+ }
442
+ var child = findElementByModule(el.children, module, elementName);
443
+ if (child) {
444
+ return child;
445
+ }
446
+ }
447
+ }
448
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
449
+ finally {
450
+ try {
451
+ if (elements_1_1 && !elements_1_1.done && (_e = elements_1.return)) _e.call(elements_1);
452
+ }
453
+ finally { if (e_1) throw e_1.error; }
454
+ }
455
+ return;
456
+ };
457
+ var getAbsolutePath = function (elements, subject, path) {
458
+ var _a, _b, _c, _d;
459
+ if (path.module) {
460
+ return (_a = findElementByModule(elements, path.module, path.segments[0])) === null || _a === void 0 ? void 0 : _a.path;
461
+ }
462
+ 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
+ var segments = __spreadArray([], __read(path.segments));
468
+ while (segments.length) {
469
+ var segment = segments.shift();
470
+ if (segment === '..') {
471
+ subjectSegments.pop();
472
+ }
473
+ else if (segment) {
474
+ subjectSegments.push(segment);
475
+ }
476
+ }
477
+ return subjectSegments.join('/');
478
+ };
479
+
480
+ var DynamicModuleService = /** @class */ (function () {
481
+ function DynamicModuleService() {
482
+ this._elementsTree = [];
483
+ this._componentFactories = [];
484
+ }
485
+ Object.defineProperty(DynamicModuleService.prototype, "componentFactories", {
486
+ get: function () {
487
+ return this._componentFactories;
488
+ },
489
+ set: function (data) {
490
+ this._componentFactories = data;
491
+ },
492
+ enumerable: false,
493
+ configurable: true
494
+ });
495
+ DynamicModuleService.prototype.getComponentFactory = function (element) {
496
+ return this.componentFactories.find(function (f) { return f.componentType.path === element.path; });
497
+ };
498
+ Object.defineProperty(DynamicModuleService.prototype, "elementsTree", {
499
+ get: function () {
500
+ return this._elementsTree;
501
+ },
502
+ set: function (tree) {
503
+ this._elementsTree = tree;
504
+ },
505
+ enumerable: false,
506
+ configurable: true
507
+ });
508
+ DynamicModuleService.prototype.clear = function () {
509
+ this._elementsTree = [];
510
+ this.componentFactories = [];
511
+ };
512
+ return DynamicModuleService;
513
+ }());
514
+ DynamicModuleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DynamicModuleService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
515
+ DynamicModuleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DynamicModuleService });
516
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DynamicModuleService, decorators: [{
517
+ type: i0.Injectable
518
+ }] });
519
+
520
+ var IOProviderService = /** @class */ (function () {
521
+ function IOProviderService(dynamicModuleService) {
522
+ this.dynamicModuleService = dynamicModuleService;
523
+ this.inputs = {};
524
+ }
525
+ IOProviderService.prototype.connect = function (el, name, target) {
526
+ var _a;
527
+ return (_a = this.resolveTarget(el, name, target)) === null || _a === void 0 ? void 0 : _a.asObservable();
528
+ };
529
+ IOProviderService.prototype.provide = function (el, name, target) {
530
+ return this.resolveTarget(el, name, target);
531
+ };
532
+ IOProviderService.prototype.resolveTarget = function (el, name, target) {
533
+ var _a, _b;
534
+ var isHost = !target;
535
+ if (isHost) {
536
+ return this.createSubjectSafe((_a = el.path) !== null && _a !== void 0 ? _a : '', name);
537
+ }
538
+ var elPath = parsePath(target);
539
+ var pathIsValue = elPath.segments.length === 1 && elPath.segments[0].startsWith('"') && elPath.segments[0].endsWith('"');
540
+ var finalName = (_b = elPath.variable) !== null && _b !== void 0 ? _b : name;
541
+ var value = pathIsValue ? new rxjs.BehaviorSubject(elPath.segments[0].slice(1, -1)) : undefined;
542
+ var absolutePath = !pathIsValue ? getAbsolutePath(this.dynamicModuleService.elementsTree, el, elPath) : el.path;
543
+ return this.createSubjectSafe(absolutePath !== null && absolutePath !== void 0 ? absolutePath : '', finalName, value);
544
+ };
545
+ IOProviderService.prototype.createSubjectSafe = function (path, name, subject) {
546
+ if (!this.inputs[path]) {
547
+ this.inputs[path] = {};
548
+ }
549
+ if (!this.inputs[path][name]) {
550
+ this.inputs[path][name] = subject !== null && subject !== void 0 ? subject : new rxjs.BehaviorSubject(undefined);
551
+ }
552
+ return this.inputs[path][name];
553
+ };
554
+ return IOProviderService;
555
+ }());
556
+ 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 });
557
+ IOProviderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IOProviderService });
558
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IOProviderService, decorators: [{
559
+ type: i0.Injectable
560
+ }], ctorParameters: function () { return [{ type: DynamicModuleService }]; } });
561
+
562
+ var TemplatesService = /** @class */ (function () {
563
+ function TemplatesService() {
564
+ this.templates = {};
565
+ }
566
+ TemplatesService.prototype.register = function (name, templateRef) {
567
+ this.templates[name] = templateRef;
568
+ };
569
+ TemplatesService.prototype.get = function (name) {
570
+ return this.templates[name];
571
+ };
572
+ return TemplatesService;
573
+ }());
574
+ TemplatesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
575
+ TemplatesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesService });
576
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesService, decorators: [{
577
+ type: i0.Injectable
578
+ }] });
579
+
580
+ var EXPORTED_CLASS_REGEX = /export class (\S+)/;
581
+ var METADATA_DECORATOR_REGEX = /@ElementDefinition\(([\s\S]+)\)(\n|.)*export class/g;
582
+ var elementToMetadata = function (el, parentPath) {
583
+ var _a;
584
+ var script = el.script && window.atob(el.script);
585
+ var template = el.template && window.atob(el.template);
586
+ var styles = el.styles && window.atob(el.styles);
587
+ var exportedClassName = script && ((_a = EXPORTED_CLASS_REGEX.exec(script)) !== null && _a !== void 0 ? _a : [])[1];
588
+ if (!exportedClassName) {
589
+ console.error("Script doesn't have exported class");
590
+ }
591
+ var elementMetadata = extractElementMetadata(script || '');
592
+ var path = (parentPath ? parentPath + '/' : '') + elementMetadata.name;
593
+ return Object.assign(Object.assign({}, elementMetadata), { path: path, script: script === null || script === void 0 ? void 0 : script.replace(METADATA_DECORATOR_REGEX, 'export class'), template: template, styles: styles, children: el.children.map(function (child) { return elementToMetadata(child, path); }) });
594
+ };
595
+ var metadataToElement = function (metadata) {
596
+ var elMetadata = {
597
+ name: metadata.name,
598
+ type: metadata.type,
599
+ model: metadata.model,
600
+ module: metadata.module,
601
+ reference: metadata.reference,
602
+ inputs: metadata.inputs,
603
+ outputs: metadata.outputs,
604
+ children: metadata.children.map(function (_b) {
605
+ var name = _b.name;
606
+ return name;
607
+ }),
608
+ };
609
+ var script = metadata.script &&
610
+ window.btoa(metadata.script.replace(EXPORTED_CLASS_REGEX, "@ElementDefinition(" + JSON.stringify(elMetadata) + ") export class Script"));
611
+ var template = metadata.template && window.btoa(metadata.template);
612
+ var styles = metadata.styles && window.btoa(metadata.styles);
613
+ return {
614
+ script: script,
615
+ template: template,
616
+ styles: styles,
617
+ children: metadata.children.map(function (meta) { return metadataToElement(meta); }),
618
+ };
619
+ };
620
+ var extractElementMetadata = function (script) {
621
+ var _a;
622
+ var metadataString = ((_a = METADATA_DECORATOR_REGEX.exec(script)) !== null && _a !== void 0 ? _a : [])[1];
623
+ // need to reset regex last index to prevent null result for next execution
624
+ METADATA_DECORATOR_REGEX.lastIndex = 0;
625
+ return eval("(" + metadataString + ")");
626
+ };
627
+ var extendElementMetadata = function (script, extend) {
628
+ var _a;
629
+ var metadataString = ((_a = METADATA_DECORATOR_REGEX.exec(script)) !== null && _a !== void 0 ? _a : [])[1];
630
+ // need to reset regex last index to prevent null result for next execution
631
+ METADATA_DECORATOR_REGEX.lastIndex = 0;
632
+ if (!metadataString) {
633
+ return script;
634
+ }
635
+ var updated = Object.assign(Object.assign({}, eval("(" + metadataString + ")")), extend);
636
+ return script.replace(metadataString, JSON.stringify(updated));
637
+ };
638
+
639
+ var ElementContextService = /** @class */ (function () {
640
+ function ElementContextService() {
641
+ }
642
+ return ElementContextService;
643
+ }());
644
+ ElementContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementContextService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
645
+ ElementContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementContextService });
646
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementContextService, decorators: [{
647
+ type: i0.Injectable
648
+ }] });
649
+
417
650
  var parseBoundPath = function (path) {
418
651
  var _a, _b;
419
652
  var regexp = new RegExp("(?:\\/)(?:\\w+)(?:\\/)(?:ports|attributes)(?:\\/)(?:\\w+)|(?:\\/)(?:\\w+)", 'g');
@@ -561,42 +794,171 @@
561
794
  return lineItem;
562
795
  };
563
796
 
797
+ var RuntimeContextService = /** @class */ (function () {
798
+ function RuntimeContextService(configurationApiService, messageService) {
799
+ this.configurationApiService = configurationApiService;
800
+ this.messageService = messageService;
801
+ }
802
+ RuntimeContextService.prototype.getRuntimeContext = function (productId, offeringId) {
803
+ var _this = this;
804
+ return this.configurationApiService.getRuntimeDataByProductId(productId, offeringId).pipe(rxjsOperators.map(function (runtimeData) {
805
+ var _a, _b;
806
+ var uiDefinition = _this.getUIDefinition(runtimeData);
807
+ var runtimeModel = core.RuntimeModel.create(runtimeData.types, runtimeData.products);
808
+ 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;
809
+ return {
810
+ modelId: runtimeData.modelId,
811
+ uiDefinition: uiDefinition,
812
+ runtimeModel: runtimeModel,
813
+ runtimeMode: i2.RuntimeMode.PROD,
814
+ productId: productId,
815
+ productType: (properties === null || properties === void 0 ? void 0 : properties.displayName) || productName,
816
+ offeringId: offeringId,
817
+ properties: {
818
+ PricingEnabled: (_b = uiDefinition === null || uiDefinition === void 0 ? void 0 : uiDefinition.properties) === null || _b === void 0 ? void 0 : _b.pricingEnabled,
819
+ },
820
+ };
821
+ }));
822
+ };
823
+ RuntimeContextService.prototype.getUIDefinition = function (runtimeData) {
824
+ var _a;
825
+ var rawUiDefinitions;
826
+ try {
827
+ rawUiDefinitions = JSON.parse(runtimeData.uiDefinitionsSource);
828
+ }
829
+ catch (e) {
830
+ return;
831
+ }
832
+ var uiDefinitions = rawUiDefinitions.filter(function (uiDef) { return uiDef.version; });
833
+ var uiDefinition = (_a = uiDefinitions.find(function (uiDef) { return uiDef.primary; })) !== null && _a !== void 0 ? _a : uiDefinitions[0];
834
+ if (!uiDefinition) {
835
+ var errMsg = "Unable to find Default UI";
836
+ this.messageService.add({
837
+ severity: 'error',
838
+ summary: 'ERROR',
839
+ });
840
+ throw new Error(errMsg);
841
+ }
842
+ return uiDefinition;
843
+ };
844
+ return RuntimeContextService;
845
+ }());
846
+ 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 });
847
+ RuntimeContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RuntimeContextService });
848
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: RuntimeContextService, decorators: [{
849
+ type: i0.Injectable
850
+ }], ctorParameters: function () { return [{ type: i1__namespace.ConfigurationApiService }, { type: i2__namespace.MessageService }]; } });
851
+
852
+ var ConfigurationRuntimeService = /** @class */ (function () {
853
+ function ConfigurationRuntimeService(apiService, contextService, runtimeContextService) {
854
+ this.apiService = apiService;
855
+ this.contextService = contextService;
856
+ this.runtimeContextService = runtimeContextService;
857
+ this._isInitialized = new rxjs.BehaviorSubject(false);
858
+ this.uiDefinitionProperties = {};
859
+ }
860
+ ConfigurationRuntimeService.prototype.initTestMode = function (modelId, uiDefinitionProperties) {
861
+ var _this = this;
862
+ this.uiDefinitionProperties = uiDefinitionProperties;
863
+ return rxjs.combineLatest([
864
+ this.apiService.getRuntimeDataByModelId(modelId),
865
+ this.contextService.create('TestId', core.ConfigurationContextMode.TEST),
866
+ ]).pipe(rxjsOperators.first(), rxjsOperators.tap(function (_d) {
867
+ var _e = __read(_d, 1), runtimeData = _e[0];
868
+ var runtimeModel = core.RuntimeModel.create(runtimeData.types, runtimeData.products);
869
+ var runtimeContext = {
870
+ modelId: modelId,
871
+ runtimeModel: runtimeModel,
872
+ runtimeMode: i2.RuntimeMode.TEST,
873
+ };
874
+ _this._runtimeContext = runtimeContext;
875
+ _this._isInitialized.next(true);
876
+ }));
877
+ };
878
+ ConfigurationRuntimeService.prototype.init = function (props) {
879
+ var _this = this;
880
+ this._assets = props.assets;
881
+ var configurationContext = this.contextService.resolve();
882
+ if (!configurationContext) {
883
+ return rxjs.of();
884
+ }
885
+ return this.runtimeContextService.getRuntimeContext(props.productId, props.offeringId).pipe(rxjsOperators.tap(function (runtimeContext) {
886
+ var _a, _b, _c;
887
+ _this.uiDefinitionProperties = (_b = (_a = runtimeContext.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {};
888
+ var mergeContext = Object.assign(Object.assign({}, runtimeContext), { properties: Object.assign(Object.assign({}, runtimeContext.properties), configurationContext.properties) });
889
+ var accountId = (_c = mergeContext.properties) === null || _c === void 0 ? void 0 : _c.AccountId;
890
+ if (accountId && accountId.length === 15) {
891
+ _this.patchContext(mergeContext, {
892
+ properties: { AccountId: core.SalesforceIdUtils.generateId18FromId15(accountId) },
893
+ });
894
+ }
895
+ _this._runtimeContext = mergeContext;
896
+ _this._isInitialized.next(true);
897
+ }));
898
+ };
899
+ ConfigurationRuntimeService.prototype.patchContext = function (context, patch) {
900
+ lodash.merge(context, patch);
901
+ };
902
+ ConfigurationRuntimeService.prototype.getAsset = function (lineItem) {
903
+ return this._assets && this._assets.find(function (a) { return a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId; });
904
+ };
905
+ Object.defineProperty(ConfigurationRuntimeService.prototype, "isInitialized$", {
906
+ get: function () {
907
+ return this._isInitialized.asObservable();
908
+ },
909
+ enumerable: false,
910
+ configurable: true
911
+ });
912
+ Object.defineProperty(ConfigurationRuntimeService.prototype, "isInitialized", {
913
+ get: function () {
914
+ return this._isInitialized.getValue();
915
+ },
916
+ enumerable: false,
917
+ configurable: true
918
+ });
919
+ Object.defineProperty(ConfigurationRuntimeService.prototype, "runtimeModel", {
920
+ get: function () {
921
+ var _a;
922
+ return (_a = this.runtimeContext) === null || _a === void 0 ? void 0 : _a.runtimeModel;
923
+ },
924
+ enumerable: false,
925
+ configurable: true
926
+ });
927
+ Object.defineProperty(ConfigurationRuntimeService.prototype, "runtimeContext", {
928
+ get: function () {
929
+ return this._runtimeContext;
930
+ },
931
+ enumerable: false,
932
+ configurable: true
933
+ });
934
+ return ConfigurationRuntimeService;
935
+ }());
936
+ 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 });
937
+ ConfigurationRuntimeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationRuntimeService });
938
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationRuntimeService, decorators: [{
939
+ type: i0.Injectable
940
+ }], ctorParameters: function () { return [{ type: i1__namespace.ConfigurationApiService }, { type: i2__namespace$1.ContextService }, { type: RuntimeContextService }]; } });
941
+
564
942
  var ConfigurationService = /** @class */ (function () {
565
- function ConfigurationService(apiService, contextService, configurationApiService, messageService) {
566
- this.apiService = apiService;
943
+ function ConfigurationService(runtimeService, contextService, configurationApiService, messageService) {
944
+ this.runtimeService = runtimeService;
567
945
  this.contextService = contextService;
568
946
  this.configurationApiService = configurationApiService;
569
947
  this.messageService = messageService;
570
948
  this.mode = core.ConfigurationMode.SEARCH;
571
949
  this.states = {};
572
- this.uiDefinitionProperties = {};
573
950
  this.lineItem = new rxjs.BehaviorSubject(undefined);
574
951
  this.charges = new rxjs.BehaviorSubject({});
575
952
  }
576
- ConfigurationService.prototype.init = function (modelId, uiDefinitionProperties) {
577
- var _this = this;
578
- this.uiDefinitionProperties = uiDefinitionProperties;
579
- return rxjs.combineLatest([
580
- this.apiService.getRuntimeDataByModelId(modelId),
581
- this.contextService.create('TestId', core.ConfigurationContextMode.TEST),
582
- ]).pipe(rxjsOperators.first(), rxjsOperators.switchMap(function (_d) {
583
- var _e = __read(_d, 1), runtimeData = _e[0];
584
- _this.runtimeModel = core.RuntimeModel.create(runtimeData.types, runtimeData.products);
585
- var runtimeContext = {
586
- modelId: modelId,
587
- runtimeModel: _this.runtimeModel,
588
- runtimeMode: i2.RuntimeMode.TEST,
589
- };
590
- _this.runtimeContext = runtimeContext;
591
- return _this.configure();
592
- }));
593
- };
594
953
  ConfigurationService.prototype.patch = function (lineItem) {
595
954
  var _this = this;
596
955
  if (!this.lineItem.value) {
597
956
  return;
598
957
  }
599
958
  this.states.configurableRamp = new LineItemWorker(this.lineItem.value).replace(lineItem).li;
959
+ this.states.asset = this.states.configurableRamp
960
+ ? this.runtimeService.getAsset(this.states.configurableRamp)
961
+ : undefined;
600
962
  this.configure()
601
963
  .pipe(rxjsOperators.catchError(function (error) {
602
964
  _this.messageService.add({
@@ -609,6 +971,9 @@
609
971
  }))
610
972
  .subscribe();
611
973
  };
974
+ ConfigurationService.prototype.updateCurrentStates = function (update) {
975
+ this.states = Object.assign(Object.assign({}, this.states), update);
976
+ };
612
977
  ConfigurationService.prototype.get = function () {
613
978
  return this.lineItem.asObservable().pipe(rxjs.shareReplay());
614
979
  };
@@ -616,10 +981,10 @@
616
981
  return this.lineItem.value ? Object.assign({}, this.lineItem.value) : undefined;
617
982
  };
618
983
  ConfigurationService.prototype.getRuntimeModel = function () {
619
- return this.runtimeModel;
984
+ return this.runtimeService.runtimeModel;
620
985
  };
621
986
  ConfigurationService.prototype.getRuntimeContext = function () {
622
- return this.runtimeContext;
987
+ return this.runtimeService.runtimeContext;
623
988
  };
624
989
  Object.defineProperty(ConfigurationService.prototype, "charges$", {
625
990
  get: function () {
@@ -637,19 +1002,21 @@
637
1002
  });
638
1003
  ConfigurationService.prototype.configure = function () {
639
1004
  var _this = this;
640
- var _a, _b;
641
- if (!this.runtimeContext || !this.runtimeModel) {
1005
+ var _a, _b, _c, _d;
1006
+ var runtimeContext = this.getRuntimeContext();
1007
+ var runtimeModel = this.getRuntimeModel();
1008
+ if (!runtimeContext || !runtimeModel) {
642
1009
  return rxjs.of(undefined);
643
1010
  }
644
- var lineItem = (_a = this.states.configurableRamp) !== null && _a !== void 0 ? _a : getDefaultLineItem(this.runtimeContext, this.uiDefinitionProperties);
1011
+ var uiDefinitionProperties = Object.assign(Object.assign({}, ((_b = (_a = runtimeContext.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {})), ((_c = this.runtimeService.uiDefinitionProperties) !== null && _c !== void 0 ? _c : {}));
1012
+ var lineItem = (_d = this.states.configurableRamp) !== null && _d !== void 0 ? _d : getDefaultLineItem(runtimeContext, uiDefinitionProperties);
645
1013
  var configurationRequest = this.createRequest(lineItem);
646
1014
  configurationRequest.lineItems = this.states.currentState || [];
647
1015
  configurationRequest.asset = this.states.asset;
648
- var runtimeModel = (_b = this.runtimeContext) === null || _b === void 0 ? void 0 : _b.runtimeModel;
649
1016
  var request$;
650
- if (this.uiDefinitionProperties.pricingEnabled) {
651
- request$ = this.configurationApiService.configureAndPriceLineItem(configurationRequest, this.runtimeModel).pipe(rxjsOperators.map(function (_d) {
652
- var lineItem = _d.lineItem, context = _d.context, charges = _d.charges;
1017
+ if (uiDefinitionProperties.pricingEnabled) {
1018
+ request$ = this.configurationApiService.configureAndPriceLineItem(configurationRequest, runtimeModel).pipe(rxjsOperators.map(function (_e) {
1019
+ var lineItem = _e.lineItem, context = _e.context, charges = _e.charges;
653
1020
  if (context) {
654
1021
  _this.contextService.update({ properties: context.properties });
655
1022
  }
@@ -664,11 +1031,12 @@
664
1031
  };
665
1032
  ConfigurationService.prototype.createRequest = function (lineItem) {
666
1033
  var _a, _b, _c;
667
- var runtimeContext = this.runtimeContext;
1034
+ var runtimeContext = this.getRuntimeContext();
1035
+ var uiDefinitionProperties = this.runtimeService.uiDefinitionProperties;
668
1036
  if (runtimeContext.runtimeMode === i2.RuntimeMode.TEST) {
669
- var properties = Object.assign(Object.assign({}, runtimeContext.properties), { ModelId: runtimeContext.modelId, RuntimeMode: core.ConfigurationContextMode.TEST, PricingEnabled: String(this.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: this.uiDefinitionProperties.priceList });
1037
+ 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 });
670
1038
  var ctx = {
671
- priceListId: this.uiDefinitionProperties.priceList,
1039
+ priceListId: uiDefinitionProperties.priceList,
672
1040
  properties: properties,
673
1041
  };
674
1042
  this.contextService.update(ctx);
@@ -677,7 +1045,8 @@
677
1045
  var context = this.contextService.resolve();
678
1046
  if ((context === null || context === void 0 ? void 0 : context.properties) && ((_c = runtimeContext.properties) === null || _c === void 0 ? void 0 : _c.StartDate)) {
679
1047
  this.contextService.update({
680
- properties: Object.assign(Object.assign({}, context.properties), runtimeContext.properties),
1048
+ priceListId: uiDefinitionProperties.priceList,
1049
+ properties: Object.assign(Object.assign(Object.assign({}, context.properties), runtimeContext.properties), { PricingEnabled: String(uiDefinitionProperties.pricingEnabled), PriceListId: uiDefinitionProperties.priceList }),
681
1050
  });
682
1051
  }
683
1052
  }
@@ -691,244 +1060,11 @@
691
1060
  };
692
1061
  return ConfigurationService;
693
1062
  }());
694
- ConfigurationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationService, deps: [{ token: i1__namespace.ConfigurationApiService }, { token: i2__namespace.ContextService }, { token: i1__namespace.ConfigurationApiService }, { token: i3__namespace.MessageService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
695
- ConfigurationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationService });
696
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationService, decorators: [{
697
- type: i0.Injectable
698
- }], ctorParameters: function () { return [{ type: i1__namespace.ConfigurationApiService }, { type: i2__namespace.ContextService }, { type: i1__namespace.ConfigurationApiService }, { type: i3__namespace.MessageService }]; } });
699
-
700
- var parsePath = function (path) {
701
- var _a, _b, _c, _d;
702
- var segments = path.split('/');
703
- var module;
704
- var variable;
705
- if ((_a = segments[0]) === null || _a === void 0 ? void 0 : _a.startsWith('@')) {
706
- module = (_b = segments.shift()) === null || _b === void 0 ? void 0 : _b.substring(1);
707
- }
708
- if (((_c = segments[segments.length - 1]) === null || _c === void 0 ? void 0 : _c[0]) === ':') {
709
- variable = (_d = segments.pop()) === null || _d === void 0 ? void 0 : _d.substring(1);
710
- }
711
- return {
712
- segments: segments,
713
- module: module,
714
- variable: variable,
715
- };
716
- };
717
- var findElementByModule = function (elements, module, elementName) {
718
- var e_1, _e;
719
- try {
720
- for (var elements_1 = __values(elements), elements_1_1 = elements_1.next(); !elements_1_1.done; elements_1_1 = elements_1.next()) {
721
- var el = elements_1_1.value;
722
- if (el.module === module && el.name === elementName) {
723
- return el;
724
- }
725
- var child = findElementByModule(el.children, module, elementName);
726
- if (child) {
727
- return child;
728
- }
729
- }
730
- }
731
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
732
- finally {
733
- try {
734
- if (elements_1_1 && !elements_1_1.done && (_e = elements_1.return)) _e.call(elements_1);
735
- }
736
- finally { if (e_1) throw e_1.error; }
737
- }
738
- return;
739
- };
740
- var getAbsolutePath = function (elements, subject, path) {
741
- var _a, _b, _c, _d;
742
- if (path.module) {
743
- return (_a = findElementByModule(elements, path.module, path.segments[0])) === null || _a === void 0 ? void 0 : _a.path;
744
- }
745
- var subjectSegments = (_c = (_b = subject.path) === null || _b === void 0 ? void 0 : _b.split('/')) !== null && _c !== void 0 ? _c : [];
746
- var isRelativePath = ((_d = path.segments[0]) === null || _d === void 0 ? void 0 : _d[0]) === '.';
747
- if (!isRelativePath) {
748
- return path.segments.join('/');
749
- }
750
- var segments = __spreadArray([], __read(path.segments));
751
- while (segments.length) {
752
- var segment = segments.shift();
753
- if (segment === '..') {
754
- subjectSegments.pop();
755
- }
756
- else if (segment) {
757
- subjectSegments.push(segment);
758
- }
759
- }
760
- return subjectSegments.join('/');
761
- };
762
-
763
- var DynamicModuleService = /** @class */ (function () {
764
- function DynamicModuleService() {
765
- this._elementsTree = [];
766
- this._componentFactories = [];
767
- }
768
- Object.defineProperty(DynamicModuleService.prototype, "componentFactories", {
769
- get: function () {
770
- return this._componentFactories;
771
- },
772
- set: function (data) {
773
- this._componentFactories = data;
774
- },
775
- enumerable: false,
776
- configurable: true
777
- });
778
- DynamicModuleService.prototype.getComponentFactory = function (element) {
779
- return this.componentFactories.find(function (f) { return f.componentType.path === element.path; });
780
- };
781
- Object.defineProperty(DynamicModuleService.prototype, "elementsTree", {
782
- get: function () {
783
- return this._elementsTree;
784
- },
785
- set: function (tree) {
786
- this._elementsTree = tree;
787
- },
788
- enumerable: false,
789
- configurable: true
790
- });
791
- DynamicModuleService.prototype.clear = function () {
792
- this._elementsTree = [];
793
- this.componentFactories = [];
794
- };
795
- return DynamicModuleService;
796
- }());
797
- DynamicModuleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
798
- DynamicModuleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService });
799
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService, decorators: [{
800
- type: i0.Injectable
801
- }] });
802
-
803
- var IOProviderService = /** @class */ (function () {
804
- function IOProviderService(dynamicModuleService) {
805
- this.dynamicModuleService = dynamicModuleService;
806
- this.inputs = {};
807
- }
808
- IOProviderService.prototype.connect = function (el, name, target) {
809
- var _a;
810
- return (_a = this.resolveTarget(el, name, target)) === null || _a === void 0 ? void 0 : _a.asObservable();
811
- };
812
- IOProviderService.prototype.provide = function (el, name, target) {
813
- return this.resolveTarget(el, name, target);
814
- };
815
- IOProviderService.prototype.resolveTarget = function (el, name, target) {
816
- var _a, _b;
817
- var isHost = !target;
818
- if (isHost) {
819
- return this.createSubjectSafe((_a = el.path) !== null && _a !== void 0 ? _a : '', name);
820
- }
821
- var elPath = parsePath(target);
822
- var pathIsValue = elPath.segments.length === 1 && elPath.segments[0].startsWith('"') && elPath.segments[0].endsWith('"');
823
- var finalName = (_b = elPath.variable) !== null && _b !== void 0 ? _b : name;
824
- var value = pathIsValue ? new rxjs.BehaviorSubject(elPath.segments[0].slice(1, -1)) : undefined;
825
- var absolutePath = !pathIsValue ? getAbsolutePath(this.dynamicModuleService.elementsTree, el, elPath) : el.path;
826
- return this.createSubjectSafe(absolutePath !== null && absolutePath !== void 0 ? absolutePath : '', finalName, value);
827
- };
828
- IOProviderService.prototype.createSubjectSafe = function (path, name, subject) {
829
- if (!this.inputs[path]) {
830
- this.inputs[path] = {};
831
- }
832
- if (!this.inputs[path][name]) {
833
- this.inputs[path][name] = subject !== null && subject !== void 0 ? subject : new rxjs.BehaviorSubject(undefined);
834
- }
835
- return this.inputs[path][name];
836
- };
837
- return IOProviderService;
838
- }());
839
- 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 });
840
- IOProviderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOProviderService });
841
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOProviderService, decorators: [{
842
- type: i0.Injectable
843
- }], ctorParameters: function () { return [{ type: DynamicModuleService }]; } });
844
-
845
- var TemplatesService = /** @class */ (function () {
846
- function TemplatesService() {
847
- this.templates = {};
848
- }
849
- TemplatesService.prototype.register = function (name, templateRef) {
850
- this.templates[name] = templateRef;
851
- };
852
- TemplatesService.prototype.get = function (name) {
853
- return this.templates[name];
854
- };
855
- return TemplatesService;
856
- }());
857
- TemplatesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TemplatesService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
858
- TemplatesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TemplatesService });
859
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TemplatesService, decorators: [{
860
- type: i0.Injectable
861
- }] });
862
-
863
- var EXPORTED_CLASS_REGEX = /export class (\S+)/;
864
- var METADATA_DECORATOR_REGEX = /@ElementDefinition\(([\s\S]+)\)(\n|.)*export class/g;
865
- var elementToMetadata = function (el, parentPath) {
866
- var _a;
867
- var script = el.script && window.atob(el.script);
868
- var template = el.template && window.atob(el.template);
869
- var styles = el.styles && window.atob(el.styles);
870
- var exportedClassName = script && ((_a = EXPORTED_CLASS_REGEX.exec(script)) !== null && _a !== void 0 ? _a : [])[1];
871
- if (!exportedClassName) {
872
- console.error("Script doesn't have exported class");
873
- }
874
- var elementMetadata = extractElementMetadata(script || '');
875
- var path = (parentPath ? parentPath + '/' : '') + elementMetadata.name;
876
- return Object.assign(Object.assign({}, elementMetadata), { path: path, script: script === null || script === void 0 ? void 0 : script.replace(METADATA_DECORATOR_REGEX, 'export class'), template: template, styles: styles, children: el.children.map(function (child) { return elementToMetadata(child, path); }) });
877
- };
878
- var metadataToElement = function (metadata) {
879
- var elMetadata = {
880
- name: metadata.name,
881
- type: metadata.type,
882
- model: metadata.model,
883
- module: metadata.module,
884
- reference: metadata.reference,
885
- inputs: metadata.inputs,
886
- outputs: metadata.outputs,
887
- children: metadata.children.map(function (_b) {
888
- var name = _b.name;
889
- return name;
890
- }),
891
- };
892
- var script = metadata.script &&
893
- window.btoa(metadata.script.replace(EXPORTED_CLASS_REGEX, "@ElementDefinition(" + JSON.stringify(elMetadata) + ") export class Script"));
894
- var template = metadata.template && window.btoa(metadata.template);
895
- var styles = metadata.styles && window.btoa(metadata.styles);
896
- return {
897
- script: script,
898
- template: template,
899
- styles: styles,
900
- children: metadata.children.map(function (meta) { return metadataToElement(meta); }),
901
- };
902
- };
903
- var extractElementMetadata = function (script) {
904
- var _a;
905
- var metadataString = ((_a = METADATA_DECORATOR_REGEX.exec(script)) !== null && _a !== void 0 ? _a : [])[1];
906
- // need to reset regex last index to prevent null result for next execution
907
- METADATA_DECORATOR_REGEX.lastIndex = 0;
908
- return eval("(" + metadataString + ")");
909
- };
910
- var extendElementMetadata = function (script, extend) {
911
- var _a;
912
- var metadataString = ((_a = METADATA_DECORATOR_REGEX.exec(script)) !== null && _a !== void 0 ? _a : [])[1];
913
- // need to reset regex last index to prevent null result for next execution
914
- METADATA_DECORATOR_REGEX.lastIndex = 0;
915
- if (!metadataString) {
916
- return script;
917
- }
918
- var updated = Object.assign(Object.assign({}, eval("(" + metadataString + ")")), extend);
919
- return script.replace(metadataString, JSON.stringify(updated));
920
- };
921
-
922
- var ElementContextService = /** @class */ (function () {
923
- function ElementContextService() {
924
- }
925
- return ElementContextService;
926
- }());
927
- ElementContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementContextService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
928
- ElementContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementContextService });
929
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementContextService, decorators: [{
1063
+ 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 });
1064
+ ConfigurationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationService });
1065
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationService, decorators: [{
930
1066
  type: i0.Injectable
931
- }] });
1067
+ }], ctorParameters: function () { return [{ type: ConfigurationRuntimeService }, { type: i2__namespace$1.ContextService }, { type: i1__namespace.ConfigurationApiService }, { type: i2__namespace.MessageService }]; } });
932
1068
 
933
1069
  var ElementRendererComponent = /** @class */ (function () {
934
1070
  function ElementRendererComponent(parentInjector, dynamicModuleService, elementContext, ioProviderService, configurationService, elementRef, cdr) {
@@ -1051,9 +1187,9 @@
1051
1187
  };
1052
1188
  return ElementRendererComponent;
1053
1189
  }());
1054
- 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 });
1055
- 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 });
1056
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererComponent, decorators: [{
1190
+ 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 });
1191
+ 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 });
1192
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererComponent, decorators: [{
1057
1193
  type: i0.Component,
1058
1194
  args: [{
1059
1195
  selector: 'vl-cms-element-renderer',
@@ -1080,9 +1216,9 @@
1080
1216
  }
1081
1217
  return ElementChildrenComponent;
1082
1218
  }());
1083
- 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 });
1084
- 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 });
1085
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenComponent, decorators: [{
1219
+ 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 });
1220
+ 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 });
1221
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenComponent, decorators: [{
1086
1222
  type: i0.Component,
1087
1223
  args: [{
1088
1224
  // eslint-disable-next-line @angular-eslint/component-selector
@@ -1107,9 +1243,9 @@
1107
1243
  };
1108
1244
  return CustomTemplateDirective;
1109
1245
  }());
1110
- 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 });
1111
- CustomTemplateDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: CustomTemplateDirective, selector: "[customTemplate]", inputs: { customTemplate: "customTemplate" }, ngImport: i0__namespace });
1112
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CustomTemplateDirective, decorators: [{
1246
+ 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 });
1247
+ CustomTemplateDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: CustomTemplateDirective, selector: "[customTemplate]", inputs: { customTemplate: "customTemplate" }, ngImport: i0__namespace });
1248
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CustomTemplateDirective, decorators: [{
1113
1249
  type: i0.Directive,
1114
1250
  args: [{ selector: '[customTemplate]' }]
1115
1251
  }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }, { type: TemplatesService }]; }, propDecorators: { customTemplate: [{
@@ -1218,15 +1354,16 @@
1218
1354
  });
1219
1355
  return ConfigurationPlugin;
1220
1356
  }());
1221
- 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 });
1222
- ConfigurationPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: ConfigurationPlugin, ngImport: i0__namespace });
1223
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationPlugin, decorators: [{
1357
+ 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 });
1358
+ ConfigurationPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ConfigurationPlugin, ngImport: i0__namespace });
1359
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationPlugin, decorators: [{
1224
1360
  type: i0.Directive
1225
1361
  }], ctorParameters: function () { return [{ type: undefined }]; } });
1226
1362
 
1227
1363
  var vlCmsModules = /*#__PURE__*/Object.freeze({
1228
1364
  __proto__: null,
1229
1365
  getDefaultLineItem: getDefaultLineItem,
1366
+ ConfigurationRuntimeService: ConfigurationRuntimeService,
1230
1367
  ConfigurationService: ConfigurationService
1231
1368
  });
1232
1369
 
@@ -1270,7 +1407,7 @@
1270
1407
  var ScriptPlugin = /** @class */ (function () {
1271
1408
  function ScriptPlugin(host) {
1272
1409
  this.host = host;
1273
- this.document = this.host.injector.get(i6.DOCUMENT);
1410
+ this.document = this.host.injector.get(i7.DOCUMENT);
1274
1411
  var elementMetadata = this.host.injector.get(ELEMENT_METADATA);
1275
1412
  var sharedElementMetadata = this.host.injector.get(SHARED_ELEMENT_METADATA);
1276
1413
  if (sharedElementMetadata === null || sharedElementMetadata === void 0 ? void 0 : sharedElementMetadata.script) {
@@ -1302,9 +1439,9 @@
1302
1439
  };
1303
1440
  return ScriptPlugin;
1304
1441
  }());
1305
- 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 });
1306
- ScriptPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: ScriptPlugin, ngImport: i0__namespace });
1307
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ScriptPlugin, decorators: [{
1442
+ 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 });
1443
+ ScriptPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ScriptPlugin, ngImport: i0__namespace });
1444
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ScriptPlugin, decorators: [{
1308
1445
  type: i0.Directive
1309
1446
  }], ctorParameters: function () { return [{ type: exports.ElementComponent }]; } });
1310
1447
 
@@ -1343,9 +1480,9 @@
1343
1480
  }
1344
1481
  return IOPlugin;
1345
1482
  }());
1346
- 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 });
1347
- IOPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: IOPlugin, ngImport: i0__namespace });
1348
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOPlugin, decorators: [{
1483
+ 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 });
1484
+ IOPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: IOPlugin, ngImport: i0__namespace });
1485
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IOPlugin, decorators: [{
1349
1486
  type: i0.Directive
1350
1487
  }], ctorParameters: function () { return [{ type: exports.ElementComponent }]; } });
1351
1488
 
@@ -1574,9 +1711,9 @@
1574
1711
  };
1575
1712
  return FederatedComponent;
1576
1713
  }());
1577
- 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 });
1578
- 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 });
1579
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FederatedComponent, decorators: [{
1714
+ 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 });
1715
+ 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 });
1716
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedComponent, decorators: [{
1580
1717
  type: i0.Component,
1581
1718
  args: [{
1582
1719
  // eslint-disable-next-line @angular-eslint/component-selector
@@ -1613,10 +1750,10 @@
1613
1750
  }
1614
1751
  return FederatedModule;
1615
1752
  }());
1616
- FederatedModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FederatedModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1617
- FederatedModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FederatedModule, declarations: [FederatedComponent], exports: [FederatedComponent] });
1618
- FederatedModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FederatedModule });
1619
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FederatedModule, decorators: [{
1753
+ FederatedModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1754
+ FederatedModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedModule, declarations: [FederatedComponent], exports: [FederatedComponent] });
1755
+ FederatedModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedModule });
1756
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedModule, decorators: [{
1620
1757
  type: i0.NgModule,
1621
1758
  args: [{
1622
1759
  declarations: [FederatedComponent],
@@ -1658,7 +1795,7 @@
1658
1795
  }());
1659
1796
  DynamicModule = __decorate([
1660
1797
  i0.NgModule({
1661
- imports: [i6.CommonModule, angularForms.ReactiveFormsModule, FederatedModule],
1798
+ imports: [i7.CommonModule, angularForms.ReactiveFormsModule, FederatedModule],
1662
1799
  declarations: __spreadArray(__spreadArray([], __read(staticComponents)), __read(elementsResolver.getNgComponents())),
1663
1800
  jit: true,
1664
1801
  })
@@ -1667,17 +1804,18 @@
1667
1804
  };
1668
1805
  return LauncherService;
1669
1806
  }());
1670
- 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 });
1671
- LauncherService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherService });
1672
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherService, decorators: [{
1807
+ 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 });
1808
+ LauncherService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherService });
1809
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherService, decorators: [{
1673
1810
  type: i0.Injectable
1674
1811
  }], ctorParameters: function () { return [{ type: i0__namespace.Compiler }, { type: DynamicModuleService }]; } });
1675
1812
 
1676
1813
  var PreviewComponent = /** @class */ (function () {
1677
- function PreviewComponent(launcherService, configurationService, messageService) {
1814
+ function PreviewComponent(launcherService, configurationService, messageService, runtimeService) {
1678
1815
  this.launcherService = launcherService;
1679
1816
  this.configurationService = configurationService;
1680
1817
  this.messageService = messageService;
1818
+ this.runtimeService = runtimeService;
1681
1819
  this.state$ = new rxjs.BehaviorSubject({ loading: true, failure: false });
1682
1820
  this.elements = [];
1683
1821
  this.destroy$ = new rxjs.Subject();
@@ -1689,24 +1827,32 @@
1689
1827
  this.destroy$.next();
1690
1828
  this.destroy$.complete();
1691
1829
  };
1692
- PreviewComponent.prototype.startPreview = function () {
1830
+ PreviewComponent.prototype.initializeConfiguration$ = function () {
1693
1831
  var _this = this;
1694
1832
  var _a;
1833
+ var isAlreadyInitialized = this.runtimeService.isInitialized;
1834
+ if (!this.uiDefinition || this.uiDefinition.type !== 'CONFIGURATION' || isAlreadyInitialized) {
1835
+ return rxjs.of({});
1836
+ }
1837
+ if (!this.modelId) {
1838
+ console.warn("No modelId is given for uiDefinition with '" + this.uiDefinition.type + "' type");
1839
+ return rxjs.of({});
1840
+ }
1841
+ // If still not initialized - init configuration in Test mode
1842
+ var uiDefinitionProps = (_a = this.uiDefinition.properties) !== null && _a !== void 0 ? _a : {};
1843
+ return this.runtimeService
1844
+ .initTestMode(this.modelId, uiDefinitionProps)
1845
+ .pipe(rxjs.switchMap(function () { return _this.configurationService.configure(); }));
1846
+ };
1847
+ PreviewComponent.prototype.startPreview = function () {
1848
+ var _this = this;
1695
1849
  if (!this.uiDefinition) {
1696
1850
  return;
1697
1851
  }
1698
- var _b = this.uiDefinition, children = _b.children, uiDefinitionMeta = __rest(_b, ["children"]);
1852
+ var _a = this.uiDefinition, children = _a.children, uiDefinitionMeta = __rest(_a, ["children"]);
1699
1853
  this.elements = children.map(function (child) { return elementToMetadata(child); });
1700
- var initializers = [this.launcherService.compileModule(this.elements, uiDefinitionMeta)];
1701
- if (this.uiDefinition.type === 'CONFIGURATION') {
1702
- if (!this.modelId) {
1703
- console.warn("No modelId is given for uiDefinition with '" + this.uiDefinition.type + "' type");
1704
- return;
1705
- }
1706
- var uiDefinitionProps = (_a = this.uiDefinition.properties) !== null && _a !== void 0 ? _a : {};
1707
- initializers.push(this.configurationService.init(this.modelId, uiDefinitionProps));
1708
- }
1709
- rxjs.forkJoin(initializers)
1854
+ var compilation$ = this.launcherService.compileModule(this.elements, uiDefinitionMeta);
1855
+ rxjs.forkJoin([compilation$, this.initializeConfiguration$()])
1710
1856
  .pipe(rxjs.tap(function () { return _this.state$.next({ loading: false, failure: false }); }), rxjs.catchError(function (error) {
1711
1857
  _this.messageService.add({
1712
1858
  severity: 'error',
@@ -1719,18 +1865,18 @@
1719
1865
  };
1720
1866
  return PreviewComponent;
1721
1867
  }());
1722
- PreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewComponent, deps: [{ token: LauncherService }, { token: ConfigurationService }, { token: i3__namespace.MessageService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1723
- 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, ConfigurationService, 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: i4__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label"] }, { type: ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: ["meta"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i6__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1724
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewComponent, decorators: [{
1868
+ 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 });
1869
+ 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 });
1870
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewComponent, decorators: [{
1725
1871
  type: i0.Component,
1726
1872
  args: [{
1727
1873
  selector: 'vl-cms-preview',
1728
1874
  templateUrl: './preview.component.html',
1729
1875
  styleUrls: ['./preview.component.scss'],
1730
1876
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1731
- providers: [IOProviderService, ConfigurationService, TemplatesService],
1877
+ providers: [IOProviderService, TemplatesService],
1732
1878
  }]
1733
- }], ctorParameters: function () { return [{ type: LauncherService }, { type: ConfigurationService }, { type: i3__namespace.MessageService }]; }, propDecorators: { modelId: [{
1879
+ }], ctorParameters: function () { return [{ type: LauncherService }, { type: ConfigurationService }, { type: i2__namespace.MessageService }, { type: ConfigurationRuntimeService }]; }, propDecorators: { modelId: [{
1734
1880
  type: i0.Input
1735
1881
  }], uiDefinition: [{
1736
1882
  type: i0.Input
@@ -1741,10 +1887,10 @@
1741
1887
  }
1742
1888
  return ElementRendererModule;
1743
1889
  }());
1744
- ElementRendererModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1745
- ElementRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule, declarations: [ElementRendererComponent], exports: [ElementRendererComponent] });
1746
- ElementRendererModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule });
1747
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule, decorators: [{
1890
+ ElementRendererModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1891
+ ElementRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule, declarations: [ElementRendererComponent], exports: [ElementRendererComponent] });
1892
+ ElementRendererModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule });
1893
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule, decorators: [{
1748
1894
  type: i0.NgModule,
1749
1895
  args: [{
1750
1896
  declarations: [ElementRendererComponent],
@@ -1757,10 +1903,10 @@
1757
1903
  }
1758
1904
  return ElementChildrenModule;
1759
1905
  }());
1760
- ElementChildrenModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1761
- ElementChildrenModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, declarations: [ElementChildrenComponent], imports: [ElementRendererModule], exports: [ElementChildrenComponent] });
1762
- ElementChildrenModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, imports: [[ElementRendererModule]] });
1763
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, decorators: [{
1906
+ ElementChildrenModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1907
+ ElementChildrenModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, declarations: [ElementChildrenComponent], imports: [ElementRendererModule], exports: [ElementChildrenComponent] });
1908
+ ElementChildrenModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, imports: [[ElementRendererModule]] });
1909
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, decorators: [{
1764
1910
  type: i0.NgModule,
1765
1911
  args: [{
1766
1912
  declarations: [ElementChildrenComponent],
@@ -1774,14 +1920,14 @@
1774
1920
  }
1775
1921
  return PreviewModule;
1776
1922
  }());
1777
- PreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1778
- PreviewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, declarations: [PreviewComponent], imports: [i6.CommonModule, i4.LoaderModule, ElementRendererModule, ElementChildrenModule], exports: [PreviewComponent] });
1779
- PreviewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, imports: [[i6.CommonModule, i4.LoaderModule, ElementRendererModule, ElementChildrenModule]] });
1780
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, decorators: [{
1923
+ PreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1924
+ 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] });
1925
+ 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]] });
1926
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewModule, decorators: [{
1781
1927
  type: i0.NgModule,
1782
1928
  args: [{
1783
1929
  declarations: [PreviewComponent],
1784
- imports: [i6.CommonModule, i4.LoaderModule, ElementRendererModule, ElementChildrenModule],
1930
+ imports: [i7.CommonModule, i5.LoaderModule, ElementRendererModule, ElementChildrenModule],
1785
1931
  exports: [PreviewComponent],
1786
1932
  }]
1787
1933
  }] });
@@ -1797,13 +1943,29 @@
1797
1943
  }
1798
1944
  return ConfigurationModule;
1799
1945
  }());
1800
- ConfigurationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1801
- ConfigurationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule });
1802
- ConfigurationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, providers: [i2.ContextService, i1.ContextApiService, i1.ProductModelApiService, i1.ConfigurationApiService] });
1803
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, decorators: [{
1946
+ ConfigurationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1947
+ ConfigurationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule });
1948
+ ConfigurationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule, providers: [
1949
+ i2.ContextService,
1950
+ i1.ContextApiService,
1951
+ i1.ProductModelApiService,
1952
+ i1.ConfigurationApiService,
1953
+ ConfigurationRuntimeService,
1954
+ RuntimeContextService,
1955
+ ConfigurationService,
1956
+ ] });
1957
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule, decorators: [{
1804
1958
  type: i0.NgModule,
1805
1959
  args: [{
1806
- providers: [i2.ContextService, i1.ContextApiService, i1.ProductModelApiService, i1.ConfigurationApiService],
1960
+ providers: [
1961
+ i2.ContextService,
1962
+ i1.ContextApiService,
1963
+ i1.ProductModelApiService,
1964
+ i1.ConfigurationApiService,
1965
+ ConfigurationRuntimeService,
1966
+ RuntimeContextService,
1967
+ ConfigurationService,
1968
+ ],
1807
1969
  }]
1808
1970
  }] });
1809
1971
 
@@ -1812,13 +1974,13 @@
1812
1974
  }
1813
1975
  return LauncherModule;
1814
1976
  }());
1815
- LauncherModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1816
- LauncherModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, imports: [i6.CommonModule, core.CoreModule, ConfigurationModule] });
1817
- 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: [[i6.CommonModule, core.CoreModule, ConfigurationModule]] });
1818
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, decorators: [{
1977
+ LauncherModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1978
+ LauncherModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherModule, imports: [i7.CommonModule, core.CoreModule, ConfigurationModule] });
1979
+ 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]] });
1980
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherModule, decorators: [{
1819
1981
  type: i0.NgModule,
1820
1982
  args: [{
1821
- imports: [i6.CommonModule, core.CoreModule, ConfigurationModule],
1983
+ imports: [i7.CommonModule, core.CoreModule, ConfigurationModule],
1822
1984
  providers: [LauncherService, DynamicModuleService, i1.SalesforceApiService, i1.QuoteApiService],
1823
1985
  }]
1824
1986
  }] });
@@ -1827,6 +1989,7 @@
1827
1989
  * Generated bundle index. Do not edit.
1828
1990
  */
1829
1991
 
1992
+ exports.ConfigurationRuntimeService = ConfigurationRuntimeService;
1830
1993
  exports.ConfigurationService = ConfigurationService;
1831
1994
  exports.DEFAULT_PLUGINS_TOKEN = DEFAULT_PLUGINS_TOKEN;
1832
1995
  exports.ELEMENT_CONFIG = ELEMENT_CONFIG;