@veloceapps/sdk 2.0.3 → 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 (148) hide show
  1. package/bundles/veloce-sdk-cms.umd.js +533 -355
  2. package/bundles/veloce-sdk-cms.umd.js.map +1 -1
  3. package/bundles/veloce-sdk-runtime.umd.js +145 -173
  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 +11 -10
  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 +45 -44
  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 +5 -8
  65. package/esm2015/runtime/runtime.module.js +5 -8
  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/index.js +1 -2
  73. package/esm2015/runtime/services/product-model-cache.service.js +3 -3
  74. package/esm2015/runtime/services/quote.service.js +3 -3
  75. package/esm2015/runtime/services/runtime-context.service.js +3 -3
  76. package/esm2015/runtime/services/runtime-form.service.js +3 -3
  77. package/esm2015/runtime/services/runtime.service.js +3 -3
  78. package/esm2015/runtime/services/section-helper.service.js +3 -3
  79. package/esm2015/runtime/services/section-scope.service.js +3 -3
  80. package/esm2015/runtime/services/section-store.service.js +3 -3
  81. package/esm2015/runtime/services/section.service.js +6 -6
  82. package/esm2015/runtime/types/index.js +1 -2
  83. package/esm2015/src/constants.js +2 -0
  84. package/esm2015/src/flow-routing.module.js +75 -0
  85. package/esm2015/src/flow.component.js +23 -0
  86. package/esm2015/src/flow.module.js +24 -0
  87. package/esm2015/src/guards/context.guard.js +63 -0
  88. package/esm2015/src/guards/index.js +2 -0
  89. package/esm2015/src/guards/root.guard.js +41 -0
  90. package/esm2015/src/index.js +6 -0
  91. package/esm2015/src/pages/debug/debug.component.js +54 -0
  92. package/esm2015/src/pages/debug/debug.module.js +44 -0
  93. package/esm2015/src/pages/legacy-product/legacy-product.component.js +117 -0
  94. package/esm2015/src/pages/legacy-product/legacy-product.module.js +20 -0
  95. package/esm2015/src/pages/product/product.component.js +95 -0
  96. package/esm2015/src/pages/product/product.module.js +20 -0
  97. package/esm2015/src/pages/record-not-found/record-not-found.component.js +26 -0
  98. package/esm2015/src/pages/record-not-found/record-not-found.module.js +20 -0
  99. package/esm2015/src/resolvers/context.resolver.js +42 -0
  100. package/esm2015/src/resolvers/flow.resolver.js +58 -0
  101. package/esm2015/src/resolvers/quote.resolver.js +36 -0
  102. package/esm2015/src/services/flow.service.js +24 -0
  103. package/esm2015/src/services/index.js +2 -0
  104. package/esm2015/src/services/router.service.js +47 -0
  105. package/esm2015/src/types/context-route.types.js +2 -0
  106. package/esm2015/src/types/flow-customization.types.js +3 -0
  107. package/esm2015/src/types/flow.types.js +2 -0
  108. package/esm2015/src/types/index.js +4 -0
  109. package/esm2015/src/types/route.types.js +2 -0
  110. package/fesm2015/veloce-sdk-cms.js +466 -318
  111. package/fesm2015/veloce-sdk-cms.js.map +1 -1
  112. package/fesm2015/veloce-sdk-runtime.js +146 -169
  113. package/fesm2015/veloce-sdk-runtime.js.map +1 -1
  114. package/fesm2015/veloce-sdk.js +725 -1
  115. package/fesm2015/veloce-sdk.js.map +1 -1
  116. package/index.d.ts +1 -2
  117. package/package.json +1 -1
  118. package/runtime/services/index.d.ts +0 -1
  119. package/runtime/types/index.d.ts +0 -1
  120. package/src/constants.d.ts +1 -0
  121. package/src/flow-routing.module.d.ts +9 -0
  122. package/src/flow.component.d.ts +8 -0
  123. package/src/flow.module.d.ts +12 -0
  124. package/src/guards/context.guard.d.ts +16 -0
  125. package/src/guards/index.d.ts +1 -0
  126. package/src/guards/root.guard.d.ts +15 -0
  127. package/src/index.d.ts +5 -0
  128. package/src/pages/debug/debug.component.d.ts +24 -0
  129. package/src/pages/debug/debug.module.d.ts +13 -0
  130. package/src/pages/legacy-product/legacy-product.component.d.ts +33 -0
  131. package/src/pages/legacy-product/legacy-product.module.d.ts +10 -0
  132. package/src/pages/product/product.component.d.ts +32 -0
  133. package/src/pages/product/product.module.d.ts +10 -0
  134. package/src/pages/record-not-found/record-not-found.component.d.ts +11 -0
  135. package/src/pages/record-not-found/record-not-found.module.d.ts +9 -0
  136. package/src/resolvers/context.resolver.d.ts +16 -0
  137. package/src/resolvers/flow.resolver.d.ts +14 -0
  138. package/src/resolvers/quote.resolver.d.ts +15 -0
  139. package/{runtime → src}/services/flow.service.d.ts +1 -2
  140. package/src/services/index.d.ts +1 -0
  141. package/src/services/router.service.d.ts +12 -0
  142. package/src/types/context-route.types.d.ts +5 -0
  143. package/src/types/flow-customization.types.d.ts +7 -0
  144. package/{runtime → src}/types/flow.types.d.ts +0 -0
  145. package/src/types/index.d.ts +3 -0
  146. package/src/types/route.types.d.ts +4 -0
  147. package/esm2015/runtime/services/flow.service.js +0 -24
  148. package/esm2015/runtime/types/flow.types.js +0 -2
@@ -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,41 +794,171 @@
561
794
  return lineItem;
562
795
  };
563
796
 
564
- var ConfigurationService = /** @class */ (function () {
565
- function ConfigurationService(apiService, contextService, configurationApiService, messageService) {
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) {
566
854
  this.apiService = apiService;
567
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
+
942
+ var ConfigurationService = /** @class */ (function () {
943
+ function ConfigurationService(runtimeService, contextService, configurationApiService, messageService) {
944
+ this.runtimeService = runtimeService;
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);
951
+ this.charges = new rxjs.BehaviorSubject({});
574
952
  }
575
- ConfigurationService.prototype.init = function (modelId, uiDefinitionProperties) {
576
- var _this = this;
577
- this.uiDefinitionProperties = uiDefinitionProperties;
578
- return rxjs.combineLatest([
579
- this.apiService.getRuntimeDataByModelId(modelId),
580
- this.contextService.create('TestId', core.ConfigurationContextMode.TEST),
581
- ]).pipe(rxjsOperators.first(), rxjsOperators.switchMap(function (_d) {
582
- var _e = __read(_d, 1), runtimeData = _e[0];
583
- _this.runtimeModel = core.RuntimeModel.create(runtimeData.types, runtimeData.products);
584
- var runtimeContext = {
585
- modelId: modelId,
586
- runtimeModel: _this.runtimeModel,
587
- runtimeMode: i2.RuntimeMode.TEST,
588
- };
589
- _this.runtimeContext = runtimeContext;
590
- return _this.configure();
591
- }));
592
- };
593
953
  ConfigurationService.prototype.patch = function (lineItem) {
594
954
  var _this = this;
595
955
  if (!this.lineItem.value) {
596
956
  return;
597
957
  }
598
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;
599
962
  this.configure()
600
963
  .pipe(rxjsOperators.catchError(function (error) {
601
964
  _this.messageService.add({
@@ -608,52 +971,72 @@
608
971
  }))
609
972
  .subscribe();
610
973
  };
974
+ ConfigurationService.prototype.updateCurrentStates = function (update) {
975
+ this.states = Object.assign(Object.assign({}, this.states), update);
976
+ };
611
977
  ConfigurationService.prototype.get = function () {
612
- var _a;
613
- return (_a = this.lineItem) === null || _a === void 0 ? void 0 : _a.asObservable().pipe(rxjs.shareReplay());
978
+ return this.lineItem.asObservable().pipe(rxjs.shareReplay());
614
979
  };
615
980
  ConfigurationService.prototype.getSnapshot = function () {
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
  };
989
+ Object.defineProperty(ConfigurationService.prototype, "charges$", {
990
+ get: function () {
991
+ return this.charges.asObservable();
992
+ },
993
+ enumerable: false,
994
+ configurable: true
995
+ });
996
+ Object.defineProperty(ConfigurationService.prototype, "chargesSnapshot", {
997
+ get: function () {
998
+ return this.charges.value;
999
+ },
1000
+ enumerable: false,
1001
+ configurable: true
1002
+ });
624
1003
  ConfigurationService.prototype.configure = function () {
625
1004
  var _this = this;
626
- var _a, _b;
627
- 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) {
628
1009
  return rxjs.of(undefined);
629
1010
  }
630
- 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);
631
1013
  var configurationRequest = this.createRequest(lineItem);
632
1014
  configurationRequest.lineItems = this.states.currentState || [];
633
1015
  configurationRequest.asset = this.states.asset;
634
- var runtimeModel = (_b = this.runtimeContext) === null || _b === void 0 ? void 0 : _b.runtimeModel;
635
1016
  var request$;
636
- if (this.uiDefinitionProperties.pricingEnabled) {
637
- request$ = this.configurationApiService.configureAndPriceLineItem(configurationRequest, this.runtimeModel).pipe(rxjsOperators.map(function (_d) {
638
- var lineItem = _d.lineItem, context = _d.context;
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;
639
1020
  if (context) {
640
1021
  _this.contextService.update({ properties: context.properties });
641
1022
  }
1023
+ _this.charges.next(charges !== null && charges !== void 0 ? charges : {});
642
1024
  return lineItem;
643
1025
  }));
644
1026
  }
645
1027
  else {
646
1028
  request$ = this.configurationApiService.configureLineItem(configurationRequest, runtimeModel);
647
1029
  }
648
- return request$.pipe(rxjsOperators.tap(function (lineItem) { var _a; return lineItem && ((_a = _this.lineItem) === null || _a === void 0 ? void 0 : _a.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)); }); }));
1030
+ 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)); }); }));
649
1031
  };
650
1032
  ConfigurationService.prototype.createRequest = function (lineItem) {
651
1033
  var _a, _b, _c;
652
- var runtimeContext = this.runtimeContext;
1034
+ var runtimeContext = this.getRuntimeContext();
1035
+ var uiDefinitionProperties = this.runtimeService.uiDefinitionProperties;
653
1036
  if (runtimeContext.runtimeMode === i2.RuntimeMode.TEST) {
654
- 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 });
655
1038
  var ctx = {
656
- priceListId: this.uiDefinitionProperties.priceList,
1039
+ priceListId: uiDefinitionProperties.priceList,
657
1040
  properties: properties,
658
1041
  };
659
1042
  this.contextService.update(ctx);
@@ -662,7 +1045,8 @@
662
1045
  var context = this.contextService.resolve();
663
1046
  if ((context === null || context === void 0 ? void 0 : context.properties) && ((_c = runtimeContext.properties) === null || _c === void 0 ? void 0 : _c.StartDate)) {
664
1047
  this.contextService.update({
665
- 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 }),
666
1050
  });
667
1051
  }
668
1052
  }
@@ -676,244 +1060,11 @@
676
1060
  };
677
1061
  return ConfigurationService;
678
1062
  }());
679
- 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 });
680
- ConfigurationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationService });
681
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationService, decorators: [{
682
- type: i0.Injectable
683
- }], ctorParameters: function () { return [{ type: i1__namespace.ConfigurationApiService }, { type: i2__namespace.ContextService }, { type: i1__namespace.ConfigurationApiService }, { type: i3__namespace.MessageService }]; } });
684
-
685
- var parsePath = function (path) {
686
- var _a, _b, _c, _d;
687
- var segments = path.split('/');
688
- var module;
689
- var variable;
690
- if ((_a = segments[0]) === null || _a === void 0 ? void 0 : _a.startsWith('@')) {
691
- module = (_b = segments.shift()) === null || _b === void 0 ? void 0 : _b.substring(1);
692
- }
693
- if (((_c = segments[segments.length - 1]) === null || _c === void 0 ? void 0 : _c[0]) === ':') {
694
- variable = (_d = segments.pop()) === null || _d === void 0 ? void 0 : _d.substring(1);
695
- }
696
- return {
697
- segments: segments,
698
- module: module,
699
- variable: variable,
700
- };
701
- };
702
- var findElementByModule = function (elements, module, elementName) {
703
- var e_1, _e;
704
- try {
705
- for (var elements_1 = __values(elements), elements_1_1 = elements_1.next(); !elements_1_1.done; elements_1_1 = elements_1.next()) {
706
- var el = elements_1_1.value;
707
- if (el.module === module && el.name === elementName) {
708
- return el;
709
- }
710
- var child = findElementByModule(el.children, module, elementName);
711
- if (child) {
712
- return child;
713
- }
714
- }
715
- }
716
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
717
- finally {
718
- try {
719
- if (elements_1_1 && !elements_1_1.done && (_e = elements_1.return)) _e.call(elements_1);
720
- }
721
- finally { if (e_1) throw e_1.error; }
722
- }
723
- return;
724
- };
725
- var getAbsolutePath = function (elements, subject, path) {
726
- var _a, _b, _c, _d;
727
- if (path.module) {
728
- return (_a = findElementByModule(elements, path.module, path.segments[0])) === null || _a === void 0 ? void 0 : _a.path;
729
- }
730
- var subjectSegments = (_c = (_b = subject.path) === null || _b === void 0 ? void 0 : _b.split('/')) !== null && _c !== void 0 ? _c : [];
731
- var isRelativePath = ((_d = path.segments[0]) === null || _d === void 0 ? void 0 : _d[0]) === '.';
732
- if (!isRelativePath) {
733
- return path.segments.join('/');
734
- }
735
- var segments = __spreadArray([], __read(path.segments));
736
- while (segments.length) {
737
- var segment = segments.shift();
738
- if (segment === '..') {
739
- subjectSegments.pop();
740
- }
741
- else if (segment) {
742
- subjectSegments.push(segment);
743
- }
744
- }
745
- return subjectSegments.join('/');
746
- };
747
-
748
- var DynamicModuleService = /** @class */ (function () {
749
- function DynamicModuleService() {
750
- this._elementsTree = [];
751
- this._componentFactories = [];
752
- }
753
- Object.defineProperty(DynamicModuleService.prototype, "componentFactories", {
754
- get: function () {
755
- return this._componentFactories;
756
- },
757
- set: function (data) {
758
- this._componentFactories = data;
759
- },
760
- enumerable: false,
761
- configurable: true
762
- });
763
- DynamicModuleService.prototype.getComponentFactory = function (element) {
764
- return this.componentFactories.find(function (f) { return f.componentType.path === element.path; });
765
- };
766
- Object.defineProperty(DynamicModuleService.prototype, "elementsTree", {
767
- get: function () {
768
- return this._elementsTree;
769
- },
770
- set: function (tree) {
771
- this._elementsTree = tree;
772
- },
773
- enumerable: false,
774
- configurable: true
775
- });
776
- DynamicModuleService.prototype.clear = function () {
777
- this._elementsTree = [];
778
- this.componentFactories = [];
779
- };
780
- return DynamicModuleService;
781
- }());
782
- DynamicModuleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
783
- DynamicModuleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService });
784
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService, decorators: [{
785
- type: i0.Injectable
786
- }] });
787
-
788
- var IOProviderService = /** @class */ (function () {
789
- function IOProviderService(dynamicModuleService) {
790
- this.dynamicModuleService = dynamicModuleService;
791
- this.inputs = {};
792
- }
793
- IOProviderService.prototype.connect = function (el, name, target) {
794
- var _a;
795
- return (_a = this.resolveTarget(el, name, target)) === null || _a === void 0 ? void 0 : _a.asObservable();
796
- };
797
- IOProviderService.prototype.provide = function (el, name, target) {
798
- return this.resolveTarget(el, name, target);
799
- };
800
- IOProviderService.prototype.resolveTarget = function (el, name, target) {
801
- var _a, _b;
802
- var isHost = !target;
803
- if (isHost) {
804
- return this.createSubjectSafe((_a = el.path) !== null && _a !== void 0 ? _a : '', name);
805
- }
806
- var elPath = parsePath(target);
807
- var pathIsValue = elPath.segments.length === 1 && elPath.segments[0].startsWith('"') && elPath.segments[0].endsWith('"');
808
- var finalName = (_b = elPath.variable) !== null && _b !== void 0 ? _b : name;
809
- var value = pathIsValue ? new rxjs.BehaviorSubject(elPath.segments[0].slice(1, -1)) : undefined;
810
- var absolutePath = !pathIsValue ? getAbsolutePath(this.dynamicModuleService.elementsTree, el, elPath) : el.path;
811
- return this.createSubjectSafe(absolutePath !== null && absolutePath !== void 0 ? absolutePath : '', finalName, value);
812
- };
813
- IOProviderService.prototype.createSubjectSafe = function (path, name, subject) {
814
- if (!this.inputs[path]) {
815
- this.inputs[path] = {};
816
- }
817
- if (!this.inputs[path][name]) {
818
- this.inputs[path][name] = subject !== null && subject !== void 0 ? subject : new rxjs.BehaviorSubject(undefined);
819
- }
820
- return this.inputs[path][name];
821
- };
822
- return IOProviderService;
823
- }());
824
- 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 });
825
- IOProviderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOProviderService });
826
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOProviderService, decorators: [{
827
- type: i0.Injectable
828
- }], ctorParameters: function () { return [{ type: DynamicModuleService }]; } });
829
-
830
- var TemplatesService = /** @class */ (function () {
831
- function TemplatesService() {
832
- this.templates = {};
833
- }
834
- TemplatesService.prototype.register = function (name, templateRef) {
835
- this.templates[name] = templateRef;
836
- };
837
- TemplatesService.prototype.get = function (name) {
838
- return this.templates[name];
839
- };
840
- return TemplatesService;
841
- }());
842
- TemplatesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TemplatesService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
843
- TemplatesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TemplatesService });
844
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TemplatesService, decorators: [{
845
- type: i0.Injectable
846
- }] });
847
-
848
- var EXPORTED_CLASS_REGEX = /export class (\S+)/;
849
- var METADATA_DECORATOR_REGEX = /@ElementDefinition\(([\s\S]+)\)(\n|.)*export class/g;
850
- var elementToMetadata = function (el, parentPath) {
851
- var _a;
852
- var script = el.script && window.atob(el.script);
853
- var template = el.template && window.atob(el.template);
854
- var styles = el.styles && window.atob(el.styles);
855
- var exportedClassName = script && ((_a = EXPORTED_CLASS_REGEX.exec(script)) !== null && _a !== void 0 ? _a : [])[1];
856
- if (!exportedClassName) {
857
- console.error("Script doesn't have exported class");
858
- }
859
- var elementMetadata = extractElementMetadata(script || '');
860
- var path = (parentPath ? parentPath + '/' : '') + elementMetadata.name;
861
- 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); }) });
862
- };
863
- var metadataToElement = function (metadata) {
864
- var elMetadata = {
865
- name: metadata.name,
866
- type: metadata.type,
867
- model: metadata.model,
868
- module: metadata.module,
869
- reference: metadata.reference,
870
- inputs: metadata.inputs,
871
- outputs: metadata.outputs,
872
- children: metadata.children.map(function (_b) {
873
- var name = _b.name;
874
- return name;
875
- }),
876
- };
877
- var script = metadata.script &&
878
- window.btoa(metadata.script.replace(EXPORTED_CLASS_REGEX, "@ElementDefinition(" + JSON.stringify(elMetadata) + ") export class Script"));
879
- var template = metadata.template && window.btoa(metadata.template);
880
- var styles = metadata.styles && window.btoa(metadata.styles);
881
- return {
882
- script: script,
883
- template: template,
884
- styles: styles,
885
- children: metadata.children.map(function (meta) { return metadataToElement(meta); }),
886
- };
887
- };
888
- var extractElementMetadata = function (script) {
889
- var _a;
890
- var metadataString = ((_a = METADATA_DECORATOR_REGEX.exec(script)) !== null && _a !== void 0 ? _a : [])[1];
891
- // need to reset regex last index to prevent null result for next execution
892
- METADATA_DECORATOR_REGEX.lastIndex = 0;
893
- return eval("(" + metadataString + ")");
894
- };
895
- var extendElementMetadata = function (script, extend) {
896
- var _a;
897
- var metadataString = ((_a = METADATA_DECORATOR_REGEX.exec(script)) !== null && _a !== void 0 ? _a : [])[1];
898
- // need to reset regex last index to prevent null result for next execution
899
- METADATA_DECORATOR_REGEX.lastIndex = 0;
900
- if (!metadataString) {
901
- return script;
902
- }
903
- var updated = Object.assign(Object.assign({}, eval("(" + metadataString + ")")), extend);
904
- return script.replace(metadataString, JSON.stringify(updated));
905
- };
906
-
907
- var ElementContextService = /** @class */ (function () {
908
- function ElementContextService() {
909
- }
910
- return ElementContextService;
911
- }());
912
- ElementContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementContextService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
913
- ElementContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementContextService });
914
- 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: [{
915
1066
  type: i0.Injectable
916
- }] });
1067
+ }], ctorParameters: function () { return [{ type: ConfigurationRuntimeService }, { type: i2__namespace$1.ContextService }, { type: i1__namespace.ConfigurationApiService }, { type: i2__namespace.MessageService }]; } });
917
1068
 
918
1069
  var ElementRendererComponent = /** @class */ (function () {
919
1070
  function ElementRendererComponent(parentInjector, dynamicModuleService, elementContext, ioProviderService, configurationService, elementRef, cdr) {
@@ -1036,9 +1187,9 @@
1036
1187
  };
1037
1188
  return ElementRendererComponent;
1038
1189
  }());
1039
- 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 });
1040
- 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 });
1041
- 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: [{
1042
1193
  type: i0.Component,
1043
1194
  args: [{
1044
1195
  selector: 'vl-cms-element-renderer',
@@ -1065,9 +1216,9 @@
1065
1216
  }
1066
1217
  return ElementChildrenComponent;
1067
1218
  }());
1068
- 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 });
1069
- 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 });
1070
- 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: [{
1071
1222
  type: i0.Component,
1072
1223
  args: [{
1073
1224
  // eslint-disable-next-line @angular-eslint/component-selector
@@ -1092,9 +1243,9 @@
1092
1243
  };
1093
1244
  return CustomTemplateDirective;
1094
1245
  }());
1095
- 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 });
1096
- CustomTemplateDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: CustomTemplateDirective, selector: "[customTemplate]", inputs: { customTemplate: "customTemplate" }, ngImport: i0__namespace });
1097
- 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: [{
1098
1249
  type: i0.Directive,
1099
1250
  args: [{ selector: '[customTemplate]' }]
1100
1251
  }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }, { type: TemplatesService }]; }, propDecorators: { customTemplate: [{
@@ -1203,15 +1354,16 @@
1203
1354
  });
1204
1355
  return ConfigurationPlugin;
1205
1356
  }());
1206
- 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 });
1207
- ConfigurationPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: ConfigurationPlugin, ngImport: i0__namespace });
1208
- 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: [{
1209
1360
  type: i0.Directive
1210
1361
  }], ctorParameters: function () { return [{ type: undefined }]; } });
1211
1362
 
1212
1363
  var vlCmsModules = /*#__PURE__*/Object.freeze({
1213
1364
  __proto__: null,
1214
1365
  getDefaultLineItem: getDefaultLineItem,
1366
+ ConfigurationRuntimeService: ConfigurationRuntimeService,
1215
1367
  ConfigurationService: ConfigurationService
1216
1368
  });
1217
1369
 
@@ -1255,7 +1407,7 @@
1255
1407
  var ScriptPlugin = /** @class */ (function () {
1256
1408
  function ScriptPlugin(host) {
1257
1409
  this.host = host;
1258
- this.document = this.host.injector.get(i6.DOCUMENT);
1410
+ this.document = this.host.injector.get(i7.DOCUMENT);
1259
1411
  var elementMetadata = this.host.injector.get(ELEMENT_METADATA);
1260
1412
  var sharedElementMetadata = this.host.injector.get(SHARED_ELEMENT_METADATA);
1261
1413
  if (sharedElementMetadata === null || sharedElementMetadata === void 0 ? void 0 : sharedElementMetadata.script) {
@@ -1287,9 +1439,9 @@
1287
1439
  };
1288
1440
  return ScriptPlugin;
1289
1441
  }());
1290
- 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 });
1291
- ScriptPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: ScriptPlugin, ngImport: i0__namespace });
1292
- 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: [{
1293
1445
  type: i0.Directive
1294
1446
  }], ctorParameters: function () { return [{ type: exports.ElementComponent }]; } });
1295
1447
 
@@ -1328,9 +1480,9 @@
1328
1480
  }
1329
1481
  return IOPlugin;
1330
1482
  }());
1331
- 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 });
1332
- IOPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: IOPlugin, ngImport: i0__namespace });
1333
- 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: [{
1334
1486
  type: i0.Directive
1335
1487
  }], ctorParameters: function () { return [{ type: exports.ElementComponent }]; } });
1336
1488
 
@@ -1559,9 +1711,9 @@
1559
1711
  };
1560
1712
  return FederatedComponent;
1561
1713
  }());
1562
- 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 });
1563
- 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 });
1564
- 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: [{
1565
1717
  type: i0.Component,
1566
1718
  args: [{
1567
1719
  // eslint-disable-next-line @angular-eslint/component-selector
@@ -1598,10 +1750,10 @@
1598
1750
  }
1599
1751
  return FederatedModule;
1600
1752
  }());
1601
- FederatedModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FederatedModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1602
- FederatedModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FederatedModule, declarations: [FederatedComponent], exports: [FederatedComponent] });
1603
- FederatedModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FederatedModule });
1604
- 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: [{
1605
1757
  type: i0.NgModule,
1606
1758
  args: [{
1607
1759
  declarations: [FederatedComponent],
@@ -1643,7 +1795,7 @@
1643
1795
  }());
1644
1796
  DynamicModule = __decorate([
1645
1797
  i0.NgModule({
1646
- imports: [i6.CommonModule, angularForms.ReactiveFormsModule, FederatedModule],
1798
+ imports: [i7.CommonModule, angularForms.ReactiveFormsModule, FederatedModule],
1647
1799
  declarations: __spreadArray(__spreadArray([], __read(staticComponents)), __read(elementsResolver.getNgComponents())),
1648
1800
  jit: true,
1649
1801
  })
@@ -1652,17 +1804,18 @@
1652
1804
  };
1653
1805
  return LauncherService;
1654
1806
  }());
1655
- 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 });
1656
- LauncherService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherService });
1657
- 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: [{
1658
1810
  type: i0.Injectable
1659
1811
  }], ctorParameters: function () { return [{ type: i0__namespace.Compiler }, { type: DynamicModuleService }]; } });
1660
1812
 
1661
1813
  var PreviewComponent = /** @class */ (function () {
1662
- function PreviewComponent(launcherService, configurationService, messageService) {
1814
+ function PreviewComponent(launcherService, configurationService, messageService, runtimeService) {
1663
1815
  this.launcherService = launcherService;
1664
1816
  this.configurationService = configurationService;
1665
1817
  this.messageService = messageService;
1818
+ this.runtimeService = runtimeService;
1666
1819
  this.state$ = new rxjs.BehaviorSubject({ loading: true, failure: false });
1667
1820
  this.elements = [];
1668
1821
  this.destroy$ = new rxjs.Subject();
@@ -1674,24 +1827,32 @@
1674
1827
  this.destroy$.next();
1675
1828
  this.destroy$.complete();
1676
1829
  };
1677
- PreviewComponent.prototype.startPreview = function () {
1830
+ PreviewComponent.prototype.initializeConfiguration$ = function () {
1678
1831
  var _this = this;
1679
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;
1680
1849
  if (!this.uiDefinition) {
1681
1850
  return;
1682
1851
  }
1683
- var _b = this.uiDefinition, children = _b.children, uiDefinitionMeta = __rest(_b, ["children"]);
1852
+ var _a = this.uiDefinition, children = _a.children, uiDefinitionMeta = __rest(_a, ["children"]);
1684
1853
  this.elements = children.map(function (child) { return elementToMetadata(child); });
1685
- var initializers = [this.launcherService.compileModule(this.elements, uiDefinitionMeta)];
1686
- if (this.uiDefinition.type === 'CONFIGURATION') {
1687
- if (!this.modelId) {
1688
- console.warn("No modelId is given for uiDefinition with '" + this.uiDefinition.type + "' type");
1689
- return;
1690
- }
1691
- var uiDefinitionProps = (_a = this.uiDefinition.properties) !== null && _a !== void 0 ? _a : {};
1692
- initializers.push(this.configurationService.init(this.modelId, uiDefinitionProps));
1693
- }
1694
- rxjs.forkJoin(initializers)
1854
+ var compilation$ = this.launcherService.compileModule(this.elements, uiDefinitionMeta);
1855
+ rxjs.forkJoin([compilation$, this.initializeConfiguration$()])
1695
1856
  .pipe(rxjs.tap(function () { return _this.state$.next({ loading: false, failure: false }); }), rxjs.catchError(function (error) {
1696
1857
  _this.messageService.add({
1697
1858
  severity: 'error',
@@ -1704,18 +1865,18 @@
1704
1865
  };
1705
1866
  return PreviewComponent;
1706
1867
  }());
1707
- 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 });
1708
- 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 });
1709
- 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: [{
1710
1871
  type: i0.Component,
1711
1872
  args: [{
1712
1873
  selector: 'vl-cms-preview',
1713
1874
  templateUrl: './preview.component.html',
1714
1875
  styleUrls: ['./preview.component.scss'],
1715
1876
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1716
- providers: [IOProviderService, ConfigurationService, TemplatesService],
1877
+ providers: [IOProviderService, TemplatesService],
1717
1878
  }]
1718
- }], 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: [{
1719
1880
  type: i0.Input
1720
1881
  }], uiDefinition: [{
1721
1882
  type: i0.Input
@@ -1726,10 +1887,10 @@
1726
1887
  }
1727
1888
  return ElementRendererModule;
1728
1889
  }());
1729
- ElementRendererModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1730
- ElementRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule, declarations: [ElementRendererComponent], exports: [ElementRendererComponent] });
1731
- ElementRendererModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule });
1732
- 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: [{
1733
1894
  type: i0.NgModule,
1734
1895
  args: [{
1735
1896
  declarations: [ElementRendererComponent],
@@ -1742,10 +1903,10 @@
1742
1903
  }
1743
1904
  return ElementChildrenModule;
1744
1905
  }());
1745
- ElementChildrenModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1746
- ElementChildrenModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, declarations: [ElementChildrenComponent], imports: [ElementRendererModule], exports: [ElementChildrenComponent] });
1747
- ElementChildrenModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, imports: [[ElementRendererModule]] });
1748
- 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: [{
1749
1910
  type: i0.NgModule,
1750
1911
  args: [{
1751
1912
  declarations: [ElementChildrenComponent],
@@ -1759,14 +1920,14 @@
1759
1920
  }
1760
1921
  return PreviewModule;
1761
1922
  }());
1762
- PreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1763
- 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] });
1764
- 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]] });
1765
- 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: [{
1766
1927
  type: i0.NgModule,
1767
1928
  args: [{
1768
1929
  declarations: [PreviewComponent],
1769
- imports: [i6.CommonModule, i4.LoaderModule, ElementRendererModule, ElementChildrenModule],
1930
+ imports: [i7.CommonModule, i5.LoaderModule, ElementRendererModule, ElementChildrenModule],
1770
1931
  exports: [PreviewComponent],
1771
1932
  }]
1772
1933
  }] });
@@ -1782,13 +1943,29 @@
1782
1943
  }
1783
1944
  return ConfigurationModule;
1784
1945
  }());
1785
- ConfigurationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1786
- ConfigurationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule });
1787
- 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] });
1788
- 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: [{
1789
1958
  type: i0.NgModule,
1790
1959
  args: [{
1791
- 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
+ ],
1792
1969
  }]
1793
1970
  }] });
1794
1971
 
@@ -1797,13 +1974,13 @@
1797
1974
  }
1798
1975
  return LauncherModule;
1799
1976
  }());
1800
- LauncherModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1801
- LauncherModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, imports: [i6.CommonModule, core.CoreModule, ConfigurationModule] });
1802
- 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]] });
1803
- 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: [{
1804
1981
  type: i0.NgModule,
1805
1982
  args: [{
1806
- imports: [i6.CommonModule, core.CoreModule, ConfigurationModule],
1983
+ imports: [i7.CommonModule, core.CoreModule, ConfigurationModule],
1807
1984
  providers: [LauncherService, DynamicModuleService, i1.SalesforceApiService, i1.QuoteApiService],
1808
1985
  }]
1809
1986
  }] });
@@ -1812,6 +1989,7 @@
1812
1989
  * Generated bundle index. Do not edit.
1813
1990
  */
1814
1991
 
1992
+ exports.ConfigurationRuntimeService = ConfigurationRuntimeService;
1815
1993
  exports.ConfigurationService = ConfigurationService;
1816
1994
  exports.DEFAULT_PLUGINS_TOKEN = DEFAULT_PLUGINS_TOKEN;
1817
1995
  exports.ELEMENT_CONFIG = ELEMENT_CONFIG;