@veloceapps/sdk 1.0.1 → 2.0.0

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 (81) hide show
  1. package/bundles/veloce-sdk-cms.umd.js +446 -309
  2. package/bundles/veloce-sdk-cms.umd.js.map +1 -1
  3. package/bundles/veloce-sdk-runtime.umd.js +146 -146
  4. package/bundles/veloce-sdk-runtime.umd.js.map +1 -1
  5. package/bundles/veloce-sdk.umd.js.map +1 -1
  6. package/cms/services/dynamic-module.service.d.ts +4 -0
  7. package/cms/services/io-provider.service.d.ts +3 -0
  8. package/cms/services/launcher.service.d.ts +0 -2
  9. package/cms/types/common.types.d.ts +31 -11
  10. package/cms/utils/elements-resolver.d.ts +16 -0
  11. package/cms/utils/path.utils.d.ts +4 -0
  12. package/esm2015/cms/cms.elements.js +6 -2
  13. package/esm2015/cms/components/element-children/element-children.component.js +3 -3
  14. package/esm2015/cms/components/element-children/element-children.module.js +4 -4
  15. package/esm2015/cms/components/element-renderer/element-renderer.component.js +5 -5
  16. package/esm2015/cms/components/element-renderer/element-renderer.module.js +4 -4
  17. package/esm2015/cms/components/plugin.component.js +3 -3
  18. package/esm2015/cms/components/preview/preview.component.js +3 -3
  19. package/esm2015/cms/components/preview/preview.module.js +4 -4
  20. package/esm2015/cms/directives/custom-template.directive.js +3 -3
  21. package/esm2015/cms/launcher.module.js +4 -4
  22. package/esm2015/cms/modules/configuration/configuration.module.js +4 -4
  23. package/esm2015/cms/modules/configuration/services/configuration.service.js +6 -4
  24. package/esm2015/cms/plugins/configuration.plugin.js +3 -3
  25. package/esm2015/cms/plugins/io.plugin.js +3 -3
  26. package/esm2015/cms/plugins/script.plugin.js +3 -3
  27. package/esm2015/cms/services/dynamic-module.service.js +15 -4
  28. package/esm2015/cms/services/element-context.service.js +3 -3
  29. package/esm2015/cms/services/io-provider.service.js +17 -17
  30. package/esm2015/cms/services/launcher.service.js +12 -49
  31. package/esm2015/cms/services/templates.service.js +3 -3
  32. package/esm2015/cms/types/common.types.js +1 -1
  33. package/esm2015/cms/utils/elements-resolver.js +81 -0
  34. package/esm2015/cms/utils/path.utils.js +52 -0
  35. package/esm2015/runtime/components/component-preview/component-preview.component.js +3 -3
  36. package/esm2015/runtime/components/section-renderer/section-renderer.component.js +3 -3
  37. package/esm2015/runtime/components/ui-runtime/runtime.component.js +3 -3
  38. package/esm2015/runtime/components/ui-runtime-preview/runtime-preview.component.js +3 -3
  39. package/esm2015/runtime/execution/components/children-placeholder/children-placeholder.component.js +6 -6
  40. package/esm2015/runtime/execution/components/context-provider/context-provider.component.js +3 -3
  41. package/esm2015/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.js +3 -3
  42. package/esm2015/runtime/execution/components/federated/federated.component.js +3 -3
  43. package/esm2015/runtime/execution/components/velo-attribute/velo-attribute.component.js +3 -3
  44. package/esm2015/runtime/execution/components/velo-multiselect/velo-multiselect.component.js +3 -3
  45. package/esm2015/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.js +3 -3
  46. package/esm2015/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.js +3 -3
  47. package/esm2015/runtime/execution/components/velo-port-radio/velo-port-radio.component.js +3 -3
  48. package/esm2015/runtime/execution/components/velo-type/velo-type.component.js +3 -3
  49. package/esm2015/runtime/execution/directives/section-script.directive.js +3 -3
  50. package/esm2015/runtime/execution/directives/sf-query.directive.js +3 -3
  51. package/esm2015/runtime/execution/directives/velo-attribute.directive.js +3 -3
  52. package/esm2015/runtime/execution/directives/velo-port.directive.js +18 -18
  53. package/esm2015/runtime/execution/directives/vl-approval.directive.js +3 -3
  54. package/esm2015/runtime/execution/directives/vl-document-attachments.directive.js +3 -3
  55. package/esm2015/runtime/execution/directives/vl-document-templates.directive.js +3 -3
  56. package/esm2015/runtime/execution/directives/vl-quote.directive.js +3 -3
  57. package/esm2015/runtime/execution/directives/vl-ramp.directive.js +3 -3
  58. package/esm2015/runtime/execution/runtime-execution.module.js +4 -4
  59. package/esm2015/runtime/runtime.module.js +4 -4
  60. package/esm2015/runtime/services/cart.service.js +3 -3
  61. package/esm2015/runtime/services/collapsible-state.service.js +3 -3
  62. package/esm2015/runtime/services/configuration.service.js +3 -3
  63. package/esm2015/runtime/services/context.service.js +3 -3
  64. package/esm2015/runtime/services/current-state.service.js +3 -3
  65. package/esm2015/runtime/services/flow.service.js +3 -3
  66. package/esm2015/runtime/services/form-scope.service.js +3 -3
  67. package/esm2015/runtime/services/product-model-cache.service.js +3 -3
  68. package/esm2015/runtime/services/quote.service.js +3 -3
  69. package/esm2015/runtime/services/runtime-context.service.js +3 -3
  70. package/esm2015/runtime/services/runtime-form.service.js +3 -3
  71. package/esm2015/runtime/services/runtime.service.js +3 -3
  72. package/esm2015/runtime/services/section-helper.service.js +3 -3
  73. package/esm2015/runtime/services/section-scope.service.js +3 -3
  74. package/esm2015/runtime/services/section-store.service.js +3 -3
  75. package/esm2015/runtime/services/section.service.js +6 -6
  76. package/fesm2015/veloce-sdk-cms.js +393 -284
  77. package/fesm2015/veloce-sdk-cms.js.map +1 -1
  78. package/fesm2015/veloce-sdk-runtime.js +146 -146
  79. package/fesm2015/veloce-sdk-runtime.js.map +1 -1
  80. package/fesm2015/veloce-sdk.js.map +1 -1
  81. package/package.json +4 -4
@@ -600,6 +600,8 @@
600
600
  severity: 'error',
601
601
  summary: error,
602
602
  });
603
+ // bounce back if configuration call has failed
604
+ _this.lineItem.next(_this.lineItem.value ? Object.assign({}, _this.lineItem.value) : undefined);
603
605
  return rxjs.of();
604
606
  }))
605
607
  .subscribe();
@@ -672,14 +674,118 @@
672
674
  };
673
675
  return ConfigurationService;
674
676
  }());
675
- 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 });
676
- ConfigurationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationService });
677
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationService, decorators: [{
677
+ ConfigurationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", 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 });
678
+ ConfigurationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationService });
679
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationService, decorators: [{
678
680
  type: i0.Injectable
679
681
  }], ctorParameters: function () { return [{ type: i1__namespace.ConfigurationApiService }, { type: i2__namespace.ContextService }, { type: i1__namespace.ConfigurationApiService }, { type: i3__namespace.MessageService }]; } });
680
682
 
683
+ var parsePath = function (path) {
684
+ var _a, _b, _c, _d;
685
+ var segments = path.split('/');
686
+ var module;
687
+ var variable;
688
+ if ((_a = segments[0]) === null || _a === void 0 ? void 0 : _a.startsWith('@')) {
689
+ module = (_b = segments.shift()) === null || _b === void 0 ? void 0 : _b.substring(1);
690
+ }
691
+ if (((_c = segments[segments.length - 1]) === null || _c === void 0 ? void 0 : _c[0]) === ':') {
692
+ variable = (_d = segments.pop()) === null || _d === void 0 ? void 0 : _d.substring(1);
693
+ }
694
+ return {
695
+ segments: segments,
696
+ module: module,
697
+ variable: variable,
698
+ };
699
+ };
700
+ var findElementByModule = function (elements, module, elementName) {
701
+ var e_1, _e;
702
+ try {
703
+ for (var elements_1 = __values(elements), elements_1_1 = elements_1.next(); !elements_1_1.done; elements_1_1 = elements_1.next()) {
704
+ var el = elements_1_1.value;
705
+ if (el.module === module && el.name === elementName) {
706
+ return el;
707
+ }
708
+ var child = findElementByModule(el.children, module, elementName);
709
+ if (child) {
710
+ return child;
711
+ }
712
+ }
713
+ }
714
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
715
+ finally {
716
+ try {
717
+ if (elements_1_1 && !elements_1_1.done && (_e = elements_1.return)) _e.call(elements_1);
718
+ }
719
+ finally { if (e_1) throw e_1.error; }
720
+ }
721
+ return;
722
+ };
723
+ var getAbsolutePath = function (elements, subject, path) {
724
+ var _a, _b, _c, _d;
725
+ if (path.module) {
726
+ return (_a = findElementByModule(elements, path.module, path.segments[0])) === null || _a === void 0 ? void 0 : _a.path;
727
+ }
728
+ var subjectSegments = (_c = (_b = subject.path) === null || _b === void 0 ? void 0 : _b.split('/')) !== null && _c !== void 0 ? _c : [];
729
+ var isRelativePath = ((_d = path.segments[0]) === null || _d === void 0 ? void 0 : _d[0]) === '.';
730
+ if (!isRelativePath) {
731
+ return path.segments.join('/');
732
+ }
733
+ var segments = __spreadArray([], __read(path.segments));
734
+ while (segments.length) {
735
+ var segment = segments.shift();
736
+ if (segment === '..') {
737
+ subjectSegments.pop();
738
+ }
739
+ else if (segment) {
740
+ subjectSegments.push(segment);
741
+ }
742
+ }
743
+ return subjectSegments.join('/');
744
+ };
745
+
746
+ var DynamicModuleService = /** @class */ (function () {
747
+ function DynamicModuleService() {
748
+ this._elementsTree = [];
749
+ this._componentFactories = [];
750
+ }
751
+ Object.defineProperty(DynamicModuleService.prototype, "componentFactories", {
752
+ get: function () {
753
+ return this._componentFactories;
754
+ },
755
+ set: function (data) {
756
+ this._componentFactories = data;
757
+ },
758
+ enumerable: false,
759
+ configurable: true
760
+ });
761
+ DynamicModuleService.prototype.getComponentFactory = function (element) {
762
+ return this.componentFactories.find(function (f) { return f.componentType.path === element.path; });
763
+ };
764
+ Object.defineProperty(DynamicModuleService.prototype, "elementsTree", {
765
+ get: function () {
766
+ return this._elementsTree;
767
+ },
768
+ set: function (tree) {
769
+ this._elementsTree = tree;
770
+ },
771
+ enumerable: false,
772
+ configurable: true
773
+ });
774
+ DynamicModuleService.prototype.clear = function () {
775
+ this._elementsTree = [];
776
+ this.componentFactories = [];
777
+ };
778
+ return DynamicModuleService;
779
+ }());
780
+ DynamicModuleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DynamicModuleService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
781
+ DynamicModuleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DynamicModuleService });
782
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: DynamicModuleService, decorators: [{
783
+ type: i0.Injectable
784
+ }] });
785
+
681
786
  var IOProviderService = /** @class */ (function () {
682
- function IOProviderService() {
787
+ function IOProviderService(dynamicModuleService) {
788
+ this.dynamicModuleService = dynamicModuleService;
683
789
  this.inputs = {};
684
790
  }
685
791
  IOProviderService.prototype.connect = function (el, name, target) {
@@ -692,18 +798,15 @@
692
798
  IOProviderService.prototype.resolveTarget = function (el, name, target) {
693
799
  var _a, _b;
694
800
  var isHost = !target;
695
- if (!isHost) {
696
- var _c = __read((_a = target === null || target === void 0 ? void 0 : target.split('#')) !== null && _a !== void 0 ? _a : [], 2), path_1 = _c[0], optionalName = _c[1];
697
- var finalName = optionalName !== null && optionalName !== void 0 ? optionalName : name;
698
- return this.createSubjectSafe(path_1, finalName);
801
+ if (isHost) {
802
+ return this.createSubjectSafe((_a = el.path) !== null && _a !== void 0 ? _a : '', name);
699
803
  }
700
- var path = (_b = el.path) !== null && _b !== void 0 ? _b : '';
701
- var modulePath = el.module ? "[" + el.module + "]" + el.name : undefined;
702
- var subject = this.createSubjectSafe(path, name);
703
- if (modulePath) {
704
- this.createSubjectSafe(modulePath, name, subject);
705
- }
706
- return subject;
804
+ var elPath = parsePath(target);
805
+ var pathIsValue = elPath.segments.length === 1 && elPath.segments[0].startsWith('"') && elPath.segments[0].endsWith('"');
806
+ var finalName = (_b = elPath.variable) !== null && _b !== void 0 ? _b : name;
807
+ var value = pathIsValue ? new rxjs.BehaviorSubject(elPath.segments[0].slice(1, -1)) : undefined;
808
+ var absolutePath = !pathIsValue ? getAbsolutePath(this.dynamicModuleService.elementsTree, el, elPath) : el.path;
809
+ return this.createSubjectSafe(absolutePath !== null && absolutePath !== void 0 ? absolutePath : '', finalName, value);
707
810
  };
708
811
  IOProviderService.prototype.createSubjectSafe = function (path, name, subject) {
709
812
  if (!this.inputs[path]) {
@@ -716,11 +819,11 @@
716
819
  };
717
820
  return IOProviderService;
718
821
  }());
719
- IOProviderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOProviderService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
720
- IOProviderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOProviderService });
721
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOProviderService, decorators: [{
822
+ 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 });
823
+ IOProviderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IOProviderService });
824
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IOProviderService, decorators: [{
722
825
  type: i0.Injectable
723
- }] });
826
+ }], ctorParameters: function () { return [{ type: DynamicModuleService }]; } });
724
827
 
725
828
  var TemplatesService = /** @class */ (function () {
726
829
  function TemplatesService() {
@@ -734,9 +837,9 @@
734
837
  };
735
838
  return TemplatesService;
736
839
  }());
737
- TemplatesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TemplatesService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
738
- TemplatesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TemplatesService });
739
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TemplatesService, decorators: [{
840
+ TemplatesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
841
+ TemplatesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesService });
842
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TemplatesService, decorators: [{
740
843
  type: i0.Injectable
741
844
  }] });
742
845
 
@@ -774,6 +877,203 @@
774
877
  return script.replace(metadataString, JSON.stringify(updated));
775
878
  };
776
879
 
880
+ var ElementContextService = /** @class */ (function () {
881
+ function ElementContextService() {
882
+ }
883
+ return ElementContextService;
884
+ }());
885
+ ElementContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementContextService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
886
+ ElementContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementContextService });
887
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementContextService, decorators: [{
888
+ type: i0.Injectable
889
+ }] });
890
+
891
+ var ElementRendererComponent = /** @class */ (function () {
892
+ function ElementRendererComponent(parentInjector, dynamicModuleService, elementContext, ioProviderService, configurationService, elementRef, cdr) {
893
+ this.parentInjector = parentInjector;
894
+ this.dynamicModuleService = dynamicModuleService;
895
+ this.elementContext = elementContext;
896
+ this.ioProviderService = ioProviderService;
897
+ this.configurationService = configurationService;
898
+ this.elementRef = elementRef;
899
+ this.cdr = cdr;
900
+ this.refs = {};
901
+ this.destroy$ = new rxjs.Subject();
902
+ }
903
+ ElementRendererComponent.prototype.ngOnInit = function () {
904
+ this.elementContext.metadata = this.meta;
905
+ this.factory = this.dynamicModuleService.getComponentFactory(this.meta);
906
+ this.createComponents();
907
+ };
908
+ ElementRendererComponent.prototype.ngOnDestroy = function () {
909
+ this.destroyComponents();
910
+ this.destroy$.next();
911
+ this.destroy$.complete();
912
+ };
913
+ ElementRendererComponent.prototype.createComponents = function () {
914
+ var modelMeta = this.meta.model;
915
+ if (!modelMeta) {
916
+ this.refs[core.UUID.UUID()] = this.createComponent();
917
+ return;
918
+ }
919
+ if (modelMeta.lineItem) {
920
+ this.createFromLineItem(modelMeta.lineItem);
921
+ }
922
+ else if (modelMeta.path) {
923
+ this.createFromPath(modelMeta.path);
924
+ }
925
+ };
926
+ ElementRendererComponent.prototype.createFromPath = function (path) {
927
+ var _this = this;
928
+ var array$ = this.ioProviderService.connect(this.meta, 'children$', path);
929
+ array$ === null || array$ === void 0 ? void 0 : array$.pipe(rxjs.takeUntil(this.destroy$)).subscribe(function (children) {
930
+ if (!lodash.isArray(children)) {
931
+ return;
932
+ }
933
+ _this.processChildren(children);
934
+ });
935
+ };
936
+ ElementRendererComponent.prototype.createFromLineItem = function (path) {
937
+ var _this = this;
938
+ var _a, _b;
939
+ var parentComp = this.parentInjector.get(ElementRendererComponent, null);
940
+ var parentPath = (_a = parentComp === null || parentComp === void 0 ? void 0 : parentComp.meta.model) === null || _a === void 0 ? void 0 : _a.lineItem;
941
+ var pathBlocks = parseBoundPath(path).reverse();
942
+ var _c = (_b = pathBlocks[1]) !== null && _b !== void 0 ? _b : {}, property = _c.property, name = _c.name;
943
+ var finalPath = pathBlocks[0];
944
+ var children$ = this.getParentLineItem$(parentComp).pipe(rxjs.map(function (model) {
945
+ var _a;
946
+ if (property === 'ports' && !finalPath.property && parentPath !== path) {
947
+ return (_a = model.lineItems.filter(function (_c) {
948
+ var port = _c.port;
949
+ return port === name;
950
+ })) !== null && _a !== void 0 ? _a : [];
951
+ }
952
+ return [model];
953
+ }));
954
+ children$.pipe(rxjs.takeUntil(this.destroy$)).subscribe(function (children) {
955
+ _this.processChildren(children);
956
+ });
957
+ };
958
+ ElementRendererComponent.prototype.processChildren = function (children) {
959
+ var _this = this;
960
+ var refs = children.reduce(function (acc, data) {
961
+ var _c;
962
+ var _a;
963
+ var key = String((_a = data === null || data === void 0 ? void 0 : data.id) !== null && _a !== void 0 ? _a : core.UUID.UUID());
964
+ var ref = _this.refs[key] ? _this.updateComponent(key, data) : _this.createComponent(data);
965
+ return ref ? Object.assign(Object.assign({}, acc), (_c = {}, _c[key] = ref, _c)) : acc;
966
+ }, {});
967
+ var existingKeys = Object.keys(this.refs);
968
+ var newKeys = Object.keys(refs);
969
+ lodash.pull.apply(void 0, __spreadArray([existingKeys], __read(newKeys))).forEach(function (key) {
970
+ _this.destroyComponent(key);
971
+ });
972
+ this.refs = refs;
973
+ this.cdr.detectChanges();
974
+ };
975
+ ElementRendererComponent.prototype.getParentLineItem$ = function (parentComp) {
976
+ var _this = this;
977
+ var _a;
978
+ var parentRefs = Object.values((_a = parentComp === null || parentComp === void 0 ? void 0 : parentComp.refs) !== null && _a !== void 0 ? _a : {});
979
+ var parentRef = parentRefs.find(function (ref) { var _a; return (_a = ref === null || ref === void 0 ? void 0 : ref.location.nativeElement) === null || _a === void 0 ? void 0 : _a.contains(_this.elementRef.nativeElement); });
980
+ var parentModel$ = parentRef === null || parentRef === void 0 ? void 0 : parentRef.instance.model$;
981
+ return parentModel$ !== null && parentModel$ !== void 0 ? parentModel$ : this.configurationService.get();
982
+ };
983
+ ElementRendererComponent.prototype.createComponent = function (data) {
984
+ var _a, _b;
985
+ if (!this.factory) {
986
+ return;
987
+ }
988
+ var componentRef = (_a = this.el) === null || _a === void 0 ? void 0 : _a.createComponent(this.factory);
989
+ if (componentRef) {
990
+ componentRef.location.nativeElement.setAttribute('name', this.meta.name);
991
+ componentRef.location.nativeElement.setAttribute('path', this.meta.path);
992
+ (_b = componentRef.instance) === null || _b === void 0 ? void 0 : _b.model$.next(data);
993
+ }
994
+ return componentRef;
995
+ };
996
+ ElementRendererComponent.prototype.updateComponent = function (key, data) {
997
+ var ref = this.refs[key];
998
+ ref === null || ref === void 0 ? void 0 : ref.instance.model$.next(data);
999
+ return ref;
1000
+ };
1001
+ ElementRendererComponent.prototype.destroyComponent = function (key) {
1002
+ var _a;
1003
+ (_a = this.refs[key]) === null || _a === void 0 ? void 0 : _a.destroy();
1004
+ delete this.refs[key];
1005
+ };
1006
+ ElementRendererComponent.prototype.destroyComponents = function () {
1007
+ Object.values(this.refs).forEach(function (ref) { return ref === null || ref === void 0 ? void 0 : ref.destroy(); });
1008
+ this.refs = {};
1009
+ };
1010
+ return ElementRendererComponent;
1011
+ }());
1012
+ 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 });
1013
+ 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 });
1014
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererComponent, decorators: [{
1015
+ type: i0.Component,
1016
+ args: [{
1017
+ selector: 'vl-cms-element-renderer',
1018
+ templateUrl: './element-renderer.component.html',
1019
+ styleUrls: ['./element-renderer.component.scss'],
1020
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1021
+ providers: [ElementContextService],
1022
+ }]
1023
+ }], ctorParameters: function () {
1024
+ return [{ type: i0__namespace.Injector, decorators: [{
1025
+ type: i0.SkipSelf
1026
+ }] }, { type: DynamicModuleService }, { type: ElementContextService }, { type: IOProviderService }, { type: ConfigurationService }, { type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }];
1027
+ }, propDecorators: { el: [{
1028
+ type: i0.ViewChild,
1029
+ args: ['el', { read: i0.ViewContainerRef, static: true }]
1030
+ }], meta: [{
1031
+ type: i0.Input
1032
+ }] } });
1033
+
1034
+ var ElementChildrenComponent = /** @class */ (function () {
1035
+ function ElementChildrenComponent(elementContext) {
1036
+ this.elementContext = elementContext;
1037
+ this.metadata = this.elementContext.metadata;
1038
+ }
1039
+ return ElementChildrenComponent;
1040
+ }());
1041
+ 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 });
1042
+ 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 });
1043
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenComponent, decorators: [{
1044
+ type: i0.Component,
1045
+ args: [{
1046
+ // eslint-disable-next-line @angular-eslint/component-selector
1047
+ selector: 'element-children',
1048
+ templateUrl: 'element-children.component.html',
1049
+ styleUrls: ['./element-children.component.scss'],
1050
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1051
+ }]
1052
+ }], ctorParameters: function () { return [{ type: ElementContextService }]; } });
1053
+
1054
+ // eslint-disable-next-line @angular-eslint/directive-selector
1055
+ var CustomTemplateDirective = /** @class */ (function () {
1056
+ function CustomTemplateDirective(templateRef, templatesService) {
1057
+ this.templateRef = templateRef;
1058
+ this.templatesService = templatesService;
1059
+ }
1060
+ CustomTemplateDirective.prototype.ngAfterViewInit = function () {
1061
+ if (!this.customTemplate) {
1062
+ return;
1063
+ }
1064
+ this.templatesService.register(this.customTemplate, this.templateRef);
1065
+ };
1066
+ return CustomTemplateDirective;
1067
+ }());
1068
+ 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 });
1069
+ CustomTemplateDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: CustomTemplateDirective, selector: "[customTemplate]", inputs: { customTemplate: "customTemplate" }, ngImport: i0__namespace });
1070
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CustomTemplateDirective, decorators: [{
1071
+ type: i0.Directive,
1072
+ args: [{ selector: '[customTemplate]' }]
1073
+ }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }, { type: TemplatesService }]; }, propDecorators: { customTemplate: [{
1074
+ type: i0.Input
1075
+ }] } });
1076
+
777
1077
  var ConfigurationPlugin = /** @class */ (function () {
778
1078
  function ConfigurationPlugin(host) {
779
1079
  this.host = host;
@@ -876,9 +1176,9 @@
876
1176
  });
877
1177
  return ConfigurationPlugin;
878
1178
  }());
879
- 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 });
880
- ConfigurationPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: ConfigurationPlugin, ngImport: i0__namespace });
881
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationPlugin, decorators: [{
1179
+ 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 });
1180
+ ConfigurationPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ConfigurationPlugin, ngImport: i0__namespace });
1181
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationPlugin, decorators: [{
882
1182
  type: i0.Directive
883
1183
  }], ctorParameters: function () { return [{ type: undefined }]; } });
884
1184
 
@@ -948,9 +1248,9 @@
948
1248
  }
949
1249
  return ScriptPlugin;
950
1250
  }());
951
- 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 });
952
- ScriptPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: ScriptPlugin, ngImport: i0__namespace });
953
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ScriptPlugin, decorators: [{
1251
+ 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 });
1252
+ ScriptPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ScriptPlugin, ngImport: i0__namespace });
1253
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ScriptPlugin, decorators: [{
954
1254
  type: i0.Directive
955
1255
  }], ctorParameters: function () { return [{ type: exports.ElementComponent }]; } });
956
1256
 
@@ -989,9 +1289,9 @@
989
1289
  }
990
1290
  return IOPlugin;
991
1291
  }());
992
- 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 });
993
- IOPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: IOPlugin, ngImport: i0__namespace });
994
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOPlugin, decorators: [{
1292
+ 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 });
1293
+ IOPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: IOPlugin, ngImport: i0__namespace });
1294
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: IOPlugin, decorators: [{
995
1295
  type: i0.Directive
996
1296
  }], ctorParameters: function () { return [{ type: exports.ElementComponent }]; } });
997
1297
 
@@ -1003,235 +1303,112 @@
1003
1303
  CONTAINER: {
1004
1304
  component: exports.ElementComponent,
1005
1305
  template: '<element-children></element-children>',
1006
- plugins: [],
1306
+ plugins: [IOPlugin],
1007
1307
  },
1008
1308
  SERVICE: {
1009
1309
  component: exports.ElementComponent,
1010
1310
  plugins: [IOPlugin],
1011
1311
  },
1312
+ REFERENCE: {
1313
+ component: exports.ElementComponent,
1314
+ plugins: [IOPlugin],
1315
+ },
1012
1316
  };
1013
1317
 
1014
- var ElementContextService = /** @class */ (function () {
1015
- function ElementContextService() {
1016
- }
1017
- return ElementContextService;
1018
- }());
1019
- ElementContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementContextService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1020
- ElementContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementContextService });
1021
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementContextService, decorators: [{
1022
- type: i0.Injectable
1023
- }] });
1024
-
1025
- var DynamicModuleService = /** @class */ (function () {
1026
- function DynamicModuleService() {
1027
- this._componentFactories = [];
1028
- }
1029
- Object.defineProperty(DynamicModuleService.prototype, "componentFactories", {
1030
- get: function () {
1031
- return this._componentFactories;
1032
- },
1033
- set: function (data) {
1034
- this._componentFactories = data;
1035
- },
1036
- enumerable: false,
1037
- configurable: true
1038
- });
1039
- DynamicModuleService.prototype.getComponentFactory = function (element) {
1040
- return this.componentFactories.find(function (f) { return f.componentType.path === element.path; });
1041
- };
1042
- return DynamicModuleService;
1043
- }());
1044
- DynamicModuleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1045
- DynamicModuleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService });
1046
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService, decorators: [{
1047
- type: i0.Injectable
1048
- }] });
1049
-
1050
- var ElementRendererComponent = /** @class */ (function () {
1051
- function ElementRendererComponent(parentInjector, dynamicModuleService, elementContext, ioProviderService, configurationService, elementRef, cdr) {
1052
- this.parentInjector = parentInjector;
1053
- this.dynamicModuleService = dynamicModuleService;
1054
- this.elementContext = elementContext;
1055
- this.ioProviderService = ioProviderService;
1056
- this.configurationService = configurationService;
1057
- this.elementRef = elementRef;
1058
- this.cdr = cdr;
1059
- this.refs = {};
1060
- this.destroy$ = new rxjs.Subject();
1061
- }
1062
- ElementRendererComponent.prototype.ngOnInit = function () {
1063
- this.elementContext.metadata = this.meta;
1064
- this.factory = this.dynamicModuleService.getComponentFactory(this.meta);
1065
- this.createComponents();
1066
- };
1067
- ElementRendererComponent.prototype.ngOnDestroy = function () {
1068
- this.destroyComponents();
1069
- this.destroy$.next();
1070
- this.destroy$.complete();
1071
- };
1072
- ElementRendererComponent.prototype.createComponents = function () {
1073
- var modelMeta = this.meta.model;
1074
- if (!modelMeta) {
1075
- this.refs[core.UUID.UUID()] = this.createComponent();
1076
- return;
1318
+ var ElementsResolver = /** @class */ (function () {
1319
+ function ElementsResolver(uiDef, elements) {
1320
+ var e_1, _b;
1321
+ this.uiDef = uiDef;
1322
+ this.renderableElements = [];
1323
+ this.sharedElements = [];
1324
+ this.elements = this.transpileScripts(elements);
1325
+ var flatElements = this.flattenElements(this.elements);
1326
+ try {
1327
+ for (var flatElements_1 = __values(flatElements), flatElements_1_1 = flatElements_1.next(); !flatElements_1_1.done; flatElements_1_1 = flatElements_1.next()) {
1328
+ var el = flatElements_1_1.value;
1329
+ if (this.isSharedElement(el)) {
1330
+ this.sharedElements.push(el);
1331
+ }
1332
+ else {
1333
+ this.renderableElements.push(el);
1334
+ }
1335
+ }
1077
1336
  }
1078
- if (modelMeta.lineItem) {
1079
- this.createFromLineItem(modelMeta.lineItem);
1337
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1338
+ finally {
1339
+ try {
1340
+ if (flatElements_1_1 && !flatElements_1_1.done && (_b = flatElements_1.return)) _b.call(flatElements_1);
1341
+ }
1342
+ finally { if (e_1) throw e_1.error; }
1080
1343
  }
1081
- else if (modelMeta.path) {
1082
- this.createFromPath(modelMeta.path);
1344
+ }
1345
+ ElementsResolver.prototype.transpile = function (el) {
1346
+ var _a;
1347
+ if (!el.script) {
1348
+ return;
1083
1349
  }
1084
- };
1085
- ElementRendererComponent.prototype.createFromPath = function (path) {
1086
- var _this = this;
1087
- var array$ = this.ioProviderService.connect(this.meta, 'children$', path);
1088
- array$ === null || array$ === void 0 ? void 0 : array$.pipe(rxjs.takeUntil(this.destroy$)).subscribe(function (children) {
1089
- if (!lodash.isArray(children)) {
1090
- return;
1091
- }
1092
- _this.processChildren(children);
1350
+ var transformed = standalone.transform(el.script, {
1351
+ filename: el.name + '.ts',
1352
+ presets: ['typescript'],
1353
+ sourceMaps: 'inline',
1093
1354
  });
1355
+ return (_a = transformed.code) !== null && _a !== void 0 ? _a : undefined;
1094
1356
  };
1095
- ElementRendererComponent.prototype.createFromLineItem = function (path) {
1357
+ ElementsResolver.prototype.transpileScripts = function (elements) {
1096
1358
  var _this = this;
1097
- var _a, _b;
1098
- var parentComp = this.parentInjector.get(ElementRendererComponent, null);
1099
- var parentPath = (_a = parentComp === null || parentComp === void 0 ? void 0 : parentComp.meta.model) === null || _a === void 0 ? void 0 : _a.lineItem;
1100
- var pathBlocks = parseBoundPath(path).reverse();
1101
- var _c = (_b = pathBlocks[1]) !== null && _b !== void 0 ? _b : {}, property = _c.property, name = _c.name;
1102
- var finalPath = pathBlocks[0];
1103
- var children$ = this.getParentLineItem$(parentComp).pipe(rxjs.map(function (model) {
1104
- var _a;
1105
- if (property === 'ports' && !finalPath.property && parentPath !== path) {
1106
- return (_a = model.lineItems.filter(function (_c) {
1107
- var port = _c.port;
1108
- return port === name;
1109
- })) !== null && _a !== void 0 ? _a : [];
1110
- }
1111
- return [model];
1112
- }));
1113
- children$.pipe(rxjs.takeUntil(this.destroy$)).subscribe(function (children) {
1114
- _this.processChildren(children);
1115
- });
1359
+ return elements.map(function (el) { return (Object.assign(Object.assign({}, el), { script: _this.transpile(el), children: _this.transpileScripts(el.children) })); });
1116
1360
  };
1117
- ElementRendererComponent.prototype.processChildren = function (children) {
1361
+ ElementsResolver.prototype.flattenElements = function (elements) {
1118
1362
  var _this = this;
1119
- var refs = children.reduce(function (acc, data) {
1120
- var _c;
1121
- var _a;
1122
- var key = String((_a = data === null || data === void 0 ? void 0 : data.id) !== null && _a !== void 0 ? _a : core.UUID.UUID());
1123
- var ref = _this.refs[key] ? _this.updateComponent(key, data) : _this.createComponent(data);
1124
- return ref ? Object.assign(Object.assign({}, acc), (_c = {}, _c[key] = ref, _c)) : acc;
1125
- }, {});
1126
- var existingKeys = Object.keys(this.refs);
1127
- var newKeys = Object.keys(refs);
1128
- lodash.pull.apply(void 0, __spreadArray([existingKeys], __read(newKeys))).forEach(function (key) {
1129
- _this.destroyComponent(key);
1130
- });
1131
- this.refs = refs;
1132
- this.cdr.markForCheck();
1363
+ return lodash.flatten(elements.map(function (el) { return __spreadArray([el], __read(_this.flattenElements(el.children))); }));
1133
1364
  };
1134
- ElementRendererComponent.prototype.getParentLineItem$ = function (parentComp) {
1135
- var _this = this;
1136
- var _a;
1137
- var parentRefs = Object.values((_a = parentComp === null || parentComp === void 0 ? void 0 : parentComp.refs) !== null && _a !== void 0 ? _a : {});
1138
- var parentRef = parentRefs.find(function (ref) { var _a; return (_a = ref === null || ref === void 0 ? void 0 : ref.location.nativeElement) === null || _a === void 0 ? void 0 : _a.contains(_this.elementRef.nativeElement); });
1139
- var parentModel$ = parentRef === null || parentRef === void 0 ? void 0 : parentRef.instance.model$;
1140
- return parentModel$ !== null && parentModel$ !== void 0 ? parentModel$ : this.configurationService.get();
1365
+ ElementsResolver.prototype.isSharedElement = function (el) {
1366
+ return Boolean(el.reference) && el.type !== 'REFERENCE';
1141
1367
  };
1142
- ElementRendererComponent.prototype.createComponent = function (data) {
1143
- var _a, _b;
1144
- if (!this.factory) {
1145
- return;
1146
- }
1147
- var componentRef = (_a = this.el) === null || _a === void 0 ? void 0 : _a.createComponent(this.factory);
1148
- if (componentRef) {
1149
- componentRef.location.nativeElement.setAttribute('name', this.meta.name);
1150
- componentRef.location.nativeElement.setAttribute('path', this.meta.path);
1151
- (_b = componentRef.instance) === null || _b === void 0 ? void 0 : _b.model$.next(data);
1368
+ ElementsResolver.prototype.processElementMetadata = function (element) {
1369
+ if (element.type === 'REFERENCE') {
1370
+ var sharedElement = this.sharedElements.find(function (el) { return element.reference === el.name; });
1371
+ if (!sharedElement) {
1372
+ console.warn("Shared element \"" + element.reference + "\" not found");
1373
+ return;
1374
+ }
1375
+ return Object.assign(Object.assign({}, element), { type: sharedElement.type, template: sharedElement.template, script: sharedElement.script, styles: sharedElement.styles, inputs: Object.assign(Object.assign({}, sharedElement.inputs), element.inputs), outputs: Object.assign(Object.assign({}, sharedElement.outputs), element.outputs) });
1152
1376
  }
1153
- return componentRef;
1377
+ return element;
1154
1378
  };
1155
- ElementRendererComponent.prototype.updateComponent = function (key, data) {
1156
- var ref = this.refs[key];
1157
- ref === null || ref === void 0 ? void 0 : ref.instance.model$.next(data);
1158
- return ref;
1159
- };
1160
- ElementRendererComponent.prototype.destroyComponent = function (key) {
1161
- var _a;
1162
- (_a = this.refs[key]) === null || _a === void 0 ? void 0 : _a.destroy();
1163
- delete this.refs[key];
1164
- };
1165
- ElementRendererComponent.prototype.destroyComponents = function () {
1166
- Object.values(this.refs).forEach(function (ref) { return ref === null || ref === void 0 ? void 0 : ref.destroy(); });
1167
- this.refs = {};
1168
- };
1169
- return ElementRendererComponent;
1170
- }());
1171
- 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 });
1172
- 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 });
1173
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererComponent, decorators: [{
1174
- type: i0.Component,
1175
- args: [{
1176
- selector: 'vl-cms-element-renderer',
1177
- templateUrl: './element-renderer.component.html',
1178
- styleUrls: ['./element-renderer.component.scss'],
1179
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1180
- providers: [ElementContextService],
1181
- }]
1182
- }], ctorParameters: function () {
1183
- return [{ type: i0__namespace.Injector, decorators: [{
1184
- type: i0.SkipSelf
1185
- }] }, { type: DynamicModuleService }, { type: ElementContextService }, { type: IOProviderService }, { type: ConfigurationService }, { type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }];
1186
- }, propDecorators: { el: [{
1187
- type: i0.ViewChild,
1188
- args: ['el', { read: i0.ViewContainerRef, static: true }]
1189
- }], meta: [{
1190
- type: i0.Input
1191
- }] } });
1192
-
1193
- var ElementChildrenComponent = /** @class */ (function () {
1194
- function ElementChildrenComponent(elementContext) {
1195
- this.elementContext = elementContext;
1196
- this.metadata = this.elementContext.metadata;
1197
- }
1198
- return ElementChildrenComponent;
1199
- }());
1200
- 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 });
1201
- 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 });
1202
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenComponent, decorators: [{
1203
- type: i0.Component,
1204
- args: [{
1205
- // eslint-disable-next-line @angular-eslint/component-selector
1206
- selector: 'element-children',
1207
- templateUrl: 'element-children.component.html',
1208
- styleUrls: ['./element-children.component.scss'],
1209
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1210
- }]
1211
- }], ctorParameters: function () { return [{ type: ElementContextService }]; } });
1212
-
1213
- // eslint-disable-next-line @angular-eslint/directive-selector
1214
- var CustomTemplateDirective = /** @class */ (function () {
1215
- function CustomTemplateDirective(templateRef, templatesService) {
1216
- this.templateRef = templateRef;
1217
- this.templatesService = templatesService;
1218
- }
1219
- CustomTemplateDirective.prototype.ngAfterViewInit = function () {
1220
- if (!this.customTemplate) {
1379
+ ElementsResolver.prototype.resolveElement = function (sourceElement) {
1380
+ var element = this.processElementMetadata(sourceElement);
1381
+ if (!element) {
1221
1382
  return;
1222
1383
  }
1223
- this.templatesService.register(this.customTemplate, this.templateRef);
1384
+ var config = CONFIG[element.type];
1385
+ var defaultPlugins = DEFAULT_PLUGINS[this.uiDef.type];
1386
+ if (!config) {
1387
+ console.warn("Unknown element type \"" + element.type + "\"");
1388
+ return;
1389
+ }
1390
+ var component = Object.assign(Object.assign({ selector: 'vl-element', template: element.template || config.template || '' }, (element.styles ? { styles: [element.styles] } : {})), { providers: [
1391
+ { provide: DEFAULT_PLUGINS_TOKEN, useValue: defaultPlugins },
1392
+ { provide: UI_DEFINITION_METADATA, useValue: this.uiDef },
1393
+ { provide: ELEMENT_METADATA, useValue: element },
1394
+ { provide: ELEMENT_CONFIG, useValue: config },
1395
+ ] });
1396
+ var cmp = i0.Component(component)(/** @class */ (function (_super) {
1397
+ __extends(C, _super);
1398
+ function C() {
1399
+ return _super !== null && _super.apply(this, arguments) || this;
1400
+ }
1401
+ return C;
1402
+ }(config.component)));
1403
+ lodash.set(cmp, 'path', element.path);
1404
+ return cmp;
1224
1405
  };
1225
- return CustomTemplateDirective;
1406
+ ElementsResolver.prototype.getNgComponents = function () {
1407
+ var _this = this;
1408
+ return this.renderableElements.map(function (el) { return _this.resolveElement(el); }).filter(Boolean);
1409
+ };
1410
+ return ElementsResolver;
1226
1411
  }());
1227
- 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 });
1228
- CustomTemplateDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: CustomTemplateDirective, selector: "[customTemplate]", inputs: { customTemplate: "customTemplate" }, ngImport: i0__namespace });
1229
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CustomTemplateDirective, decorators: [{
1230
- type: i0.Directive,
1231
- args: [{ selector: '[customTemplate]' }]
1232
- }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }, { type: TemplatesService }]; }, propDecorators: { customTemplate: [{
1233
- type: i0.Input
1234
- }] } });
1235
1412
 
1236
1413
  var LauncherService = /** @class */ (function () {
1237
1414
  function LauncherService(compiler, dynamicModuleService) {
@@ -1240,8 +1417,7 @@
1240
1417
  }
1241
1418
  LauncherService.prototype.compileModule = function (elements, uiDefs) {
1242
1419
  var _this = this;
1243
- var transformedElements = this.transformElements(elements);
1244
- this.module = this.getModule(transformedElements, uiDefs);
1420
+ this.module = this.getModule(elements, uiDefs);
1245
1421
  return rxjs.from(this.compiler.compileModuleAndAllComponentsAsync(this.module)).pipe(rxjs.tap(function (m) {
1246
1422
  _this.dynamicModuleService.componentFactories = m.componentFactories;
1247
1423
  _this.moduleInstance = m;
@@ -1249,7 +1425,7 @@
1249
1425
  };
1250
1426
  LauncherService.prototype.destroy = function () {
1251
1427
  if (this.moduleInstance) {
1252
- this.dynamicModuleService.componentFactories = [];
1428
+ this.dynamicModuleService.clear();
1253
1429
  this.moduleInstance = undefined;
1254
1430
  }
1255
1431
  if (this.module) {
@@ -1257,32 +1433,10 @@
1257
1433
  this.module = undefined;
1258
1434
  }
1259
1435
  };
1260
- LauncherService.prototype.getComponent = function (element, uiDefs) {
1261
- var config = CONFIG[element.type];
1262
- var defaultPlugins = DEFAULT_PLUGINS[uiDefs.type];
1263
- if (!config) {
1264
- console.warn("Unknown element type \"" + element.type + "\"");
1265
- return;
1266
- }
1267
- var cmp = i0.Component(Object.assign(Object.assign({ selector: 'vl-element', template: element.template || config.template || '' }, (element.styles ? { styles: [element.styles] } : {})), { providers: [
1268
- { provide: DEFAULT_PLUGINS_TOKEN, useValue: defaultPlugins },
1269
- { provide: UI_DEFINITION_METADATA, useValue: uiDefs },
1270
- { provide: ELEMENT_METADATA, useValue: element },
1271
- { provide: ELEMENT_CONFIG, useValue: config },
1272
- ] }))(/** @class */ (function (_super) {
1273
- __extends(C, _super);
1274
- function C() {
1275
- return _super !== null && _super.apply(this, arguments) || this;
1276
- }
1277
- return C;
1278
- }(config.component)));
1279
- lodash.set(cmp, 'path', element.path);
1280
- return cmp;
1281
- };
1282
- LauncherService.prototype.getModule = function (elements, uiDefs) {
1283
- var _this = this;
1436
+ LauncherService.prototype.getModule = function (elements, uiDef) {
1284
1437
  var staticComponents = [ElementChildrenComponent, ElementRendererComponent, CustomTemplateDirective];
1285
- var dynamicComponents = elements.map(function (el) { return _this.getComponent(el, uiDefs); }).filter(Boolean);
1438
+ var elementsResolver = new ElementsResolver(uiDef, elements);
1439
+ this.dynamicModuleService.elementsTree = elementsResolver.elements;
1286
1440
  var DynamicModule = /** @class */ (function () {
1287
1441
  function DynamicModule() {
1288
1442
  }
@@ -1291,34 +1445,17 @@
1291
1445
  DynamicModule = __decorate([
1292
1446
  i0.NgModule({
1293
1447
  imports: [i6.CommonModule, angularForms.ReactiveFormsModule],
1294
- declarations: __spreadArray(__spreadArray([], __read(staticComponents)), __read(dynamicComponents)),
1448
+ declarations: __spreadArray(__spreadArray([], __read(staticComponents)), __read(elementsResolver.getNgComponents())),
1295
1449
  jit: true,
1296
1450
  })
1297
1451
  ], DynamicModule);
1298
1452
  return DynamicModule;
1299
1453
  };
1300
- LauncherService.prototype.transformElements = function (elements) {
1301
- var _this = this;
1302
- return lodash.flatten(elements.map(function (el) {
1303
- var _a;
1304
- var children = _this.transformElements(el.children);
1305
- if (!el.script) {
1306
- return __spreadArray([el], __read(children));
1307
- }
1308
- var transformed = standalone.transform(el.script, {
1309
- filename: el.name + '.ts',
1310
- presets: ['typescript'],
1311
- sourceMaps: 'inline',
1312
- });
1313
- var script = (_a = transformed.code) !== null && _a !== void 0 ? _a : undefined;
1314
- return __spreadArray([Object.assign(Object.assign({}, el), { script: script })], __read(children));
1315
- }));
1316
- };
1317
1454
  return LauncherService;
1318
1455
  }());
1319
- 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 });
1320
- LauncherService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherService });
1321
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherService, decorators: [{
1456
+ 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 });
1457
+ LauncherService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherService });
1458
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherService, decorators: [{
1322
1459
  type: i0.Injectable
1323
1460
  }], ctorParameters: function () { return [{ type: i0__namespace.Compiler }, { type: DynamicModuleService }]; } });
1324
1461
 
@@ -1368,9 +1505,9 @@
1368
1505
  };
1369
1506
  return PreviewComponent;
1370
1507
  }());
1371
- 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 });
1372
- 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 });
1373
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewComponent, decorators: [{
1508
+ PreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewComponent, deps: [{ token: LauncherService }, { token: ConfigurationService }, { token: i3__namespace.MessageService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1509
+ 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, 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%;all:unset}\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 });
1510
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewComponent, decorators: [{
1374
1511
  type: i0.Component,
1375
1512
  args: [{
1376
1513
  selector: 'vl-cms-preview',
@@ -1390,10 +1527,10 @@
1390
1527
  }
1391
1528
  return ElementRendererModule;
1392
1529
  }());
1393
- ElementRendererModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1394
- ElementRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule, declarations: [ElementRendererComponent], exports: [ElementRendererComponent] });
1395
- ElementRendererModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule });
1396
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule, decorators: [{
1530
+ ElementRendererModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1531
+ ElementRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule, declarations: [ElementRendererComponent], exports: [ElementRendererComponent] });
1532
+ ElementRendererModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule });
1533
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementRendererModule, decorators: [{
1397
1534
  type: i0.NgModule,
1398
1535
  args: [{
1399
1536
  declarations: [ElementRendererComponent],
@@ -1406,10 +1543,10 @@
1406
1543
  }
1407
1544
  return ElementChildrenModule;
1408
1545
  }());
1409
- ElementChildrenModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1410
- ElementChildrenModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, declarations: [ElementChildrenComponent], imports: [ElementRendererModule], exports: [ElementChildrenComponent] });
1411
- ElementChildrenModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, imports: [[ElementRendererModule]] });
1412
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, decorators: [{
1546
+ ElementChildrenModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1547
+ ElementChildrenModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, declarations: [ElementChildrenComponent], imports: [ElementRendererModule], exports: [ElementChildrenComponent] });
1548
+ ElementChildrenModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, imports: [[ElementRendererModule]] });
1549
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ElementChildrenModule, decorators: [{
1413
1550
  type: i0.NgModule,
1414
1551
  args: [{
1415
1552
  declarations: [ElementChildrenComponent],
@@ -1423,10 +1560,10 @@
1423
1560
  }
1424
1561
  return PreviewModule;
1425
1562
  }());
1426
- PreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1427
- 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] });
1428
- 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]] });
1429
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, decorators: [{
1563
+ PreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1564
+ PreviewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewModule, declarations: [PreviewComponent], imports: [i6.CommonModule, i4.LoaderModule, ElementRendererModule, ElementChildrenModule], exports: [PreviewComponent] });
1565
+ PreviewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewModule, imports: [[i6.CommonModule, i4.LoaderModule, ElementRendererModule, ElementChildrenModule]] });
1566
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PreviewModule, decorators: [{
1430
1567
  type: i0.NgModule,
1431
1568
  args: [{
1432
1569
  declarations: [PreviewComponent],
@@ -1446,10 +1583,10 @@
1446
1583
  }
1447
1584
  return ConfigurationModule;
1448
1585
  }());
1449
- ConfigurationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1450
- ConfigurationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule });
1451
- 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] });
1452
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, decorators: [{
1586
+ ConfigurationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1587
+ ConfigurationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule });
1588
+ ConfigurationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule, providers: [i2.ContextService, i1.ContextApiService, i1.ProductModelApiService, i1.ConfigurationApiService] });
1589
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfigurationModule, decorators: [{
1453
1590
  type: i0.NgModule,
1454
1591
  args: [{
1455
1592
  providers: [i2.ContextService, i1.ContextApiService, i1.ProductModelApiService, i1.ConfigurationApiService],
@@ -1461,10 +1598,10 @@
1461
1598
  }
1462
1599
  return LauncherModule;
1463
1600
  }());
1464
- LauncherModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1465
- LauncherModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, imports: [i6.CommonModule, core.CoreModule, ConfigurationModule] });
1466
- LauncherModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, providers: [LauncherService, DynamicModuleService], imports: [[i6.CommonModule, core.CoreModule, ConfigurationModule]] });
1467
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, decorators: [{
1601
+ LauncherModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1602
+ LauncherModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherModule, imports: [i6.CommonModule, core.CoreModule, ConfigurationModule] });
1603
+ LauncherModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherModule, providers: [LauncherService, DynamicModuleService], imports: [[i6.CommonModule, core.CoreModule, ConfigurationModule]] });
1604
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LauncherModule, decorators: [{
1468
1605
  type: i0.NgModule,
1469
1606
  args: [{
1470
1607
  imports: [i6.CommonModule, core.CoreModule, ConfigurationModule],