@veloceapps/sdk 1.0.2 → 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 +444 -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 +3 -3
  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 +391 -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
@@ -674,14 +674,118 @@
674
674
  };
675
675
  return ConfigurationService;
676
676
  }());
677
- 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 });
678
- ConfigurationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationService });
679
- 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: [{
680
680
  type: i0.Injectable
681
681
  }], ctorParameters: function () { return [{ type: i1__namespace.ConfigurationApiService }, { type: i2__namespace.ContextService }, { type: i1__namespace.ConfigurationApiService }, { type: i3__namespace.MessageService }]; } });
682
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
+
683
786
  var IOProviderService = /** @class */ (function () {
684
- function IOProviderService() {
787
+ function IOProviderService(dynamicModuleService) {
788
+ this.dynamicModuleService = dynamicModuleService;
685
789
  this.inputs = {};
686
790
  }
687
791
  IOProviderService.prototype.connect = function (el, name, target) {
@@ -694,18 +798,15 @@
694
798
  IOProviderService.prototype.resolveTarget = function (el, name, target) {
695
799
  var _a, _b;
696
800
  var isHost = !target;
697
- if (!isHost) {
698
- 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];
699
- var finalName = optionalName !== null && optionalName !== void 0 ? optionalName : name;
700
- return this.createSubjectSafe(path_1, finalName);
801
+ if (isHost) {
802
+ return this.createSubjectSafe((_a = el.path) !== null && _a !== void 0 ? _a : '', name);
701
803
  }
702
- var path = (_b = el.path) !== null && _b !== void 0 ? _b : '';
703
- var modulePath = el.module ? "[" + el.module + "]" + el.name : undefined;
704
- var subject = this.createSubjectSafe(path, name);
705
- if (modulePath) {
706
- this.createSubjectSafe(modulePath, name, subject);
707
- }
708
- 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);
709
810
  };
710
811
  IOProviderService.prototype.createSubjectSafe = function (path, name, subject) {
711
812
  if (!this.inputs[path]) {
@@ -718,11 +819,11 @@
718
819
  };
719
820
  return IOProviderService;
720
821
  }());
721
- IOProviderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOProviderService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
722
- IOProviderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IOProviderService });
723
- 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: [{
724
825
  type: i0.Injectable
725
- }] });
826
+ }], ctorParameters: function () { return [{ type: DynamicModuleService }]; } });
726
827
 
727
828
  var TemplatesService = /** @class */ (function () {
728
829
  function TemplatesService() {
@@ -736,9 +837,9 @@
736
837
  };
737
838
  return TemplatesService;
738
839
  }());
739
- TemplatesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TemplatesService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
740
- TemplatesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: TemplatesService });
741
- 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: [{
742
843
  type: i0.Injectable
743
844
  }] });
744
845
 
@@ -776,6 +877,203 @@
776
877
  return script.replace(metadataString, JSON.stringify(updated));
777
878
  };
778
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
+
779
1077
  var ConfigurationPlugin = /** @class */ (function () {
780
1078
  function ConfigurationPlugin(host) {
781
1079
  this.host = host;
@@ -878,9 +1176,9 @@
878
1176
  });
879
1177
  return ConfigurationPlugin;
880
1178
  }());
881
- 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 });
882
- ConfigurationPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: ConfigurationPlugin, ngImport: i0__namespace });
883
- 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: [{
884
1182
  type: i0.Directive
885
1183
  }], ctorParameters: function () { return [{ type: undefined }]; } });
886
1184
 
@@ -950,9 +1248,9 @@
950
1248
  }
951
1249
  return ScriptPlugin;
952
1250
  }());
953
- 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 });
954
- ScriptPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: ScriptPlugin, ngImport: i0__namespace });
955
- 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: [{
956
1254
  type: i0.Directive
957
1255
  }], ctorParameters: function () { return [{ type: exports.ElementComponent }]; } });
958
1256
 
@@ -991,9 +1289,9 @@
991
1289
  }
992
1290
  return IOPlugin;
993
1291
  }());
994
- 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 });
995
- IOPlugin.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: IOPlugin, ngImport: i0__namespace });
996
- 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: [{
997
1295
  type: i0.Directive
998
1296
  }], ctorParameters: function () { return [{ type: exports.ElementComponent }]; } });
999
1297
 
@@ -1005,235 +1303,112 @@
1005
1303
  CONTAINER: {
1006
1304
  component: exports.ElementComponent,
1007
1305
  template: '<element-children></element-children>',
1008
- plugins: [],
1306
+ plugins: [IOPlugin],
1009
1307
  },
1010
1308
  SERVICE: {
1011
1309
  component: exports.ElementComponent,
1012
1310
  plugins: [IOPlugin],
1013
1311
  },
1312
+ REFERENCE: {
1313
+ component: exports.ElementComponent,
1314
+ plugins: [IOPlugin],
1315
+ },
1014
1316
  };
1015
1317
 
1016
- var ElementContextService = /** @class */ (function () {
1017
- function ElementContextService() {
1018
- }
1019
- return ElementContextService;
1020
- }());
1021
- ElementContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementContextService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1022
- ElementContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementContextService });
1023
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementContextService, decorators: [{
1024
- type: i0.Injectable
1025
- }] });
1026
-
1027
- var DynamicModuleService = /** @class */ (function () {
1028
- function DynamicModuleService() {
1029
- this._componentFactories = [];
1030
- }
1031
- Object.defineProperty(DynamicModuleService.prototype, "componentFactories", {
1032
- get: function () {
1033
- return this._componentFactories;
1034
- },
1035
- set: function (data) {
1036
- this._componentFactories = data;
1037
- },
1038
- enumerable: false,
1039
- configurable: true
1040
- });
1041
- DynamicModuleService.prototype.getComponentFactory = function (element) {
1042
- return this.componentFactories.find(function (f) { return f.componentType.path === element.path; });
1043
- };
1044
- return DynamicModuleService;
1045
- }());
1046
- DynamicModuleService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1047
- DynamicModuleService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService });
1048
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DynamicModuleService, decorators: [{
1049
- type: i0.Injectable
1050
- }] });
1051
-
1052
- var ElementRendererComponent = /** @class */ (function () {
1053
- function ElementRendererComponent(parentInjector, dynamicModuleService, elementContext, ioProviderService, configurationService, elementRef, cdr) {
1054
- this.parentInjector = parentInjector;
1055
- this.dynamicModuleService = dynamicModuleService;
1056
- this.elementContext = elementContext;
1057
- this.ioProviderService = ioProviderService;
1058
- this.configurationService = configurationService;
1059
- this.elementRef = elementRef;
1060
- this.cdr = cdr;
1061
- this.refs = {};
1062
- this.destroy$ = new rxjs.Subject();
1063
- }
1064
- ElementRendererComponent.prototype.ngOnInit = function () {
1065
- this.elementContext.metadata = this.meta;
1066
- this.factory = this.dynamicModuleService.getComponentFactory(this.meta);
1067
- this.createComponents();
1068
- };
1069
- ElementRendererComponent.prototype.ngOnDestroy = function () {
1070
- this.destroyComponents();
1071
- this.destroy$.next();
1072
- this.destroy$.complete();
1073
- };
1074
- ElementRendererComponent.prototype.createComponents = function () {
1075
- var modelMeta = this.meta.model;
1076
- if (!modelMeta) {
1077
- this.refs[core.UUID.UUID()] = this.createComponent();
1078
- 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
+ }
1079
1336
  }
1080
- if (modelMeta.lineItem) {
1081
- 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; }
1082
1343
  }
1083
- else if (modelMeta.path) {
1084
- this.createFromPath(modelMeta.path);
1344
+ }
1345
+ ElementsResolver.prototype.transpile = function (el) {
1346
+ var _a;
1347
+ if (!el.script) {
1348
+ return;
1085
1349
  }
1086
- };
1087
- ElementRendererComponent.prototype.createFromPath = function (path) {
1088
- var _this = this;
1089
- var array$ = this.ioProviderService.connect(this.meta, 'children$', path);
1090
- array$ === null || array$ === void 0 ? void 0 : array$.pipe(rxjs.takeUntil(this.destroy$)).subscribe(function (children) {
1091
- if (!lodash.isArray(children)) {
1092
- return;
1093
- }
1094
- _this.processChildren(children);
1350
+ var transformed = standalone.transform(el.script, {
1351
+ filename: el.name + '.ts',
1352
+ presets: ['typescript'],
1353
+ sourceMaps: 'inline',
1095
1354
  });
1355
+ return (_a = transformed.code) !== null && _a !== void 0 ? _a : undefined;
1096
1356
  };
1097
- ElementRendererComponent.prototype.createFromLineItem = function (path) {
1357
+ ElementsResolver.prototype.transpileScripts = function (elements) {
1098
1358
  var _this = this;
1099
- var _a, _b;
1100
- var parentComp = this.parentInjector.get(ElementRendererComponent, null);
1101
- var parentPath = (_a = parentComp === null || parentComp === void 0 ? void 0 : parentComp.meta.model) === null || _a === void 0 ? void 0 : _a.lineItem;
1102
- var pathBlocks = parseBoundPath(path).reverse();
1103
- var _c = (_b = pathBlocks[1]) !== null && _b !== void 0 ? _b : {}, property = _c.property, name = _c.name;
1104
- var finalPath = pathBlocks[0];
1105
- var children$ = this.getParentLineItem$(parentComp).pipe(rxjs.map(function (model) {
1106
- var _a;
1107
- if (property === 'ports' && !finalPath.property && parentPath !== path) {
1108
- return (_a = model.lineItems.filter(function (_c) {
1109
- var port = _c.port;
1110
- return port === name;
1111
- })) !== null && _a !== void 0 ? _a : [];
1112
- }
1113
- return [model];
1114
- }));
1115
- children$.pipe(rxjs.takeUntil(this.destroy$)).subscribe(function (children) {
1116
- _this.processChildren(children);
1117
- });
1359
+ return elements.map(function (el) { return (Object.assign(Object.assign({}, el), { script: _this.transpile(el), children: _this.transpileScripts(el.children) })); });
1118
1360
  };
1119
- ElementRendererComponent.prototype.processChildren = function (children) {
1361
+ ElementsResolver.prototype.flattenElements = function (elements) {
1120
1362
  var _this = this;
1121
- var refs = children.reduce(function (acc, data) {
1122
- var _c;
1123
- var _a;
1124
- var key = String((_a = data === null || data === void 0 ? void 0 : data.id) !== null && _a !== void 0 ? _a : core.UUID.UUID());
1125
- var ref = _this.refs[key] ? _this.updateComponent(key, data) : _this.createComponent(data);
1126
- return ref ? Object.assign(Object.assign({}, acc), (_c = {}, _c[key] = ref, _c)) : acc;
1127
- }, {});
1128
- var existingKeys = Object.keys(this.refs);
1129
- var newKeys = Object.keys(refs);
1130
- lodash.pull.apply(void 0, __spreadArray([existingKeys], __read(newKeys))).forEach(function (key) {
1131
- _this.destroyComponent(key);
1132
- });
1133
- this.refs = refs;
1134
- this.cdr.markForCheck();
1363
+ return lodash.flatten(elements.map(function (el) { return __spreadArray([el], __read(_this.flattenElements(el.children))); }));
1135
1364
  };
1136
- ElementRendererComponent.prototype.getParentLineItem$ = function (parentComp) {
1137
- var _this = this;
1138
- var _a;
1139
- var parentRefs = Object.values((_a = parentComp === null || parentComp === void 0 ? void 0 : parentComp.refs) !== null && _a !== void 0 ? _a : {});
1140
- 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); });
1141
- var parentModel$ = parentRef === null || parentRef === void 0 ? void 0 : parentRef.instance.model$;
1142
- return parentModel$ !== null && parentModel$ !== void 0 ? parentModel$ : this.configurationService.get();
1365
+ ElementsResolver.prototype.isSharedElement = function (el) {
1366
+ return Boolean(el.reference) && el.type !== 'REFERENCE';
1143
1367
  };
1144
- ElementRendererComponent.prototype.createComponent = function (data) {
1145
- var _a, _b;
1146
- if (!this.factory) {
1147
- return;
1148
- }
1149
- var componentRef = (_a = this.el) === null || _a === void 0 ? void 0 : _a.createComponent(this.factory);
1150
- if (componentRef) {
1151
- componentRef.location.nativeElement.setAttribute('name', this.meta.name);
1152
- componentRef.location.nativeElement.setAttribute('path', this.meta.path);
1153
- (_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) });
1154
1376
  }
1155
- return componentRef;
1377
+ return element;
1156
1378
  };
1157
- ElementRendererComponent.prototype.updateComponent = function (key, data) {
1158
- var ref = this.refs[key];
1159
- ref === null || ref === void 0 ? void 0 : ref.instance.model$.next(data);
1160
- return ref;
1161
- };
1162
- ElementRendererComponent.prototype.destroyComponent = function (key) {
1163
- var _a;
1164
- (_a = this.refs[key]) === null || _a === void 0 ? void 0 : _a.destroy();
1165
- delete this.refs[key];
1166
- };
1167
- ElementRendererComponent.prototype.destroyComponents = function () {
1168
- Object.values(this.refs).forEach(function (ref) { return ref === null || ref === void 0 ? void 0 : ref.destroy(); });
1169
- this.refs = {};
1170
- };
1171
- return ElementRendererComponent;
1172
- }());
1173
- 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 });
1174
- 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 });
1175
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererComponent, decorators: [{
1176
- type: i0.Component,
1177
- args: [{
1178
- selector: 'vl-cms-element-renderer',
1179
- templateUrl: './element-renderer.component.html',
1180
- styleUrls: ['./element-renderer.component.scss'],
1181
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1182
- providers: [ElementContextService],
1183
- }]
1184
- }], ctorParameters: function () {
1185
- return [{ type: i0__namespace.Injector, decorators: [{
1186
- type: i0.SkipSelf
1187
- }] }, { type: DynamicModuleService }, { type: ElementContextService }, { type: IOProviderService }, { type: ConfigurationService }, { type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }];
1188
- }, propDecorators: { el: [{
1189
- type: i0.ViewChild,
1190
- args: ['el', { read: i0.ViewContainerRef, static: true }]
1191
- }], meta: [{
1192
- type: i0.Input
1193
- }] } });
1194
-
1195
- var ElementChildrenComponent = /** @class */ (function () {
1196
- function ElementChildrenComponent(elementContext) {
1197
- this.elementContext = elementContext;
1198
- this.metadata = this.elementContext.metadata;
1199
- }
1200
- return ElementChildrenComponent;
1201
- }());
1202
- 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 });
1203
- 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 });
1204
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenComponent, decorators: [{
1205
- type: i0.Component,
1206
- args: [{
1207
- // eslint-disable-next-line @angular-eslint/component-selector
1208
- selector: 'element-children',
1209
- templateUrl: 'element-children.component.html',
1210
- styleUrls: ['./element-children.component.scss'],
1211
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1212
- }]
1213
- }], ctorParameters: function () { return [{ type: ElementContextService }]; } });
1214
-
1215
- // eslint-disable-next-line @angular-eslint/directive-selector
1216
- var CustomTemplateDirective = /** @class */ (function () {
1217
- function CustomTemplateDirective(templateRef, templatesService) {
1218
- this.templateRef = templateRef;
1219
- this.templatesService = templatesService;
1220
- }
1221
- CustomTemplateDirective.prototype.ngAfterViewInit = function () {
1222
- if (!this.customTemplate) {
1379
+ ElementsResolver.prototype.resolveElement = function (sourceElement) {
1380
+ var element = this.processElementMetadata(sourceElement);
1381
+ if (!element) {
1223
1382
  return;
1224
1383
  }
1225
- 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;
1226
1405
  };
1227
- 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;
1228
1411
  }());
1229
- 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 });
1230
- CustomTemplateDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: CustomTemplateDirective, selector: "[customTemplate]", inputs: { customTemplate: "customTemplate" }, ngImport: i0__namespace });
1231
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CustomTemplateDirective, decorators: [{
1232
- type: i0.Directive,
1233
- args: [{ selector: '[customTemplate]' }]
1234
- }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }, { type: TemplatesService }]; }, propDecorators: { customTemplate: [{
1235
- type: i0.Input
1236
- }] } });
1237
1412
 
1238
1413
  var LauncherService = /** @class */ (function () {
1239
1414
  function LauncherService(compiler, dynamicModuleService) {
@@ -1242,8 +1417,7 @@
1242
1417
  }
1243
1418
  LauncherService.prototype.compileModule = function (elements, uiDefs) {
1244
1419
  var _this = this;
1245
- var transformedElements = this.transformElements(elements);
1246
- this.module = this.getModule(transformedElements, uiDefs);
1420
+ this.module = this.getModule(elements, uiDefs);
1247
1421
  return rxjs.from(this.compiler.compileModuleAndAllComponentsAsync(this.module)).pipe(rxjs.tap(function (m) {
1248
1422
  _this.dynamicModuleService.componentFactories = m.componentFactories;
1249
1423
  _this.moduleInstance = m;
@@ -1251,7 +1425,7 @@
1251
1425
  };
1252
1426
  LauncherService.prototype.destroy = function () {
1253
1427
  if (this.moduleInstance) {
1254
- this.dynamicModuleService.componentFactories = [];
1428
+ this.dynamicModuleService.clear();
1255
1429
  this.moduleInstance = undefined;
1256
1430
  }
1257
1431
  if (this.module) {
@@ -1259,32 +1433,10 @@
1259
1433
  this.module = undefined;
1260
1434
  }
1261
1435
  };
1262
- LauncherService.prototype.getComponent = function (element, uiDefs) {
1263
- var config = CONFIG[element.type];
1264
- var defaultPlugins = DEFAULT_PLUGINS[uiDefs.type];
1265
- if (!config) {
1266
- console.warn("Unknown element type \"" + element.type + "\"");
1267
- return;
1268
- }
1269
- var cmp = i0.Component(Object.assign(Object.assign({ selector: 'vl-element', template: element.template || config.template || '' }, (element.styles ? { styles: [element.styles] } : {})), { providers: [
1270
- { provide: DEFAULT_PLUGINS_TOKEN, useValue: defaultPlugins },
1271
- { provide: UI_DEFINITION_METADATA, useValue: uiDefs },
1272
- { provide: ELEMENT_METADATA, useValue: element },
1273
- { provide: ELEMENT_CONFIG, useValue: config },
1274
- ] }))(/** @class */ (function (_super) {
1275
- __extends(C, _super);
1276
- function C() {
1277
- return _super !== null && _super.apply(this, arguments) || this;
1278
- }
1279
- return C;
1280
- }(config.component)));
1281
- lodash.set(cmp, 'path', element.path);
1282
- return cmp;
1283
- };
1284
- LauncherService.prototype.getModule = function (elements, uiDefs) {
1285
- var _this = this;
1436
+ LauncherService.prototype.getModule = function (elements, uiDef) {
1286
1437
  var staticComponents = [ElementChildrenComponent, ElementRendererComponent, CustomTemplateDirective];
1287
- 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;
1288
1440
  var DynamicModule = /** @class */ (function () {
1289
1441
  function DynamicModule() {
1290
1442
  }
@@ -1293,34 +1445,17 @@
1293
1445
  DynamicModule = __decorate([
1294
1446
  i0.NgModule({
1295
1447
  imports: [i6.CommonModule, angularForms.ReactiveFormsModule],
1296
- declarations: __spreadArray(__spreadArray([], __read(staticComponents)), __read(dynamicComponents)),
1448
+ declarations: __spreadArray(__spreadArray([], __read(staticComponents)), __read(elementsResolver.getNgComponents())),
1297
1449
  jit: true,
1298
1450
  })
1299
1451
  ], DynamicModule);
1300
1452
  return DynamicModule;
1301
1453
  };
1302
- LauncherService.prototype.transformElements = function (elements) {
1303
- var _this = this;
1304
- return lodash.flatten(elements.map(function (el) {
1305
- var _a;
1306
- var children = _this.transformElements(el.children);
1307
- if (!el.script) {
1308
- return __spreadArray([el], __read(children));
1309
- }
1310
- var transformed = standalone.transform(el.script, {
1311
- filename: el.name + '.ts',
1312
- presets: ['typescript'],
1313
- sourceMaps: 'inline',
1314
- });
1315
- var script = (_a = transformed.code) !== null && _a !== void 0 ? _a : undefined;
1316
- return __spreadArray([Object.assign(Object.assign({}, el), { script: script })], __read(children));
1317
- }));
1318
- };
1319
1454
  return LauncherService;
1320
1455
  }());
1321
- 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 });
1322
- LauncherService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherService });
1323
- 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: [{
1324
1459
  type: i0.Injectable
1325
1460
  }], ctorParameters: function () { return [{ type: i0__namespace.Compiler }, { type: DynamicModuleService }]; } });
1326
1461
 
@@ -1370,9 +1505,9 @@
1370
1505
  };
1371
1506
  return PreviewComponent;
1372
1507
  }());
1373
- 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 });
1374
- 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 });
1375
- 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: [{
1376
1511
  type: i0.Component,
1377
1512
  args: [{
1378
1513
  selector: 'vl-cms-preview',
@@ -1392,10 +1527,10 @@
1392
1527
  }
1393
1528
  return ElementRendererModule;
1394
1529
  }());
1395
- ElementRendererModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1396
- ElementRendererModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule, declarations: [ElementRendererComponent], exports: [ElementRendererComponent] });
1397
- ElementRendererModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementRendererModule });
1398
- 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: [{
1399
1534
  type: i0.NgModule,
1400
1535
  args: [{
1401
1536
  declarations: [ElementRendererComponent],
@@ -1408,10 +1543,10 @@
1408
1543
  }
1409
1544
  return ElementChildrenModule;
1410
1545
  }());
1411
- ElementChildrenModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1412
- ElementChildrenModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, declarations: [ElementChildrenComponent], imports: [ElementRendererModule], exports: [ElementChildrenComponent] });
1413
- ElementChildrenModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ElementChildrenModule, imports: [[ElementRendererModule]] });
1414
- 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: [{
1415
1550
  type: i0.NgModule,
1416
1551
  args: [{
1417
1552
  declarations: [ElementChildrenComponent],
@@ -1425,10 +1560,10 @@
1425
1560
  }
1426
1561
  return PreviewModule;
1427
1562
  }());
1428
- PreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1429
- 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] });
1430
- 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]] });
1431
- 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: [{
1432
1567
  type: i0.NgModule,
1433
1568
  args: [{
1434
1569
  declarations: [PreviewComponent],
@@ -1448,10 +1583,10 @@
1448
1583
  }
1449
1584
  return ConfigurationModule;
1450
1585
  }());
1451
- ConfigurationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1452
- ConfigurationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule });
1453
- 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] });
1454
- 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: [{
1455
1590
  type: i0.NgModule,
1456
1591
  args: [{
1457
1592
  providers: [i2.ContextService, i1.ContextApiService, i1.ProductModelApiService, i1.ConfigurationApiService],
@@ -1463,10 +1598,10 @@
1463
1598
  }
1464
1599
  return LauncherModule;
1465
1600
  }());
1466
- LauncherModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1467
- LauncherModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, imports: [i6.CommonModule, core.CoreModule, ConfigurationModule] });
1468
- 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]] });
1469
- 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: [{
1470
1605
  type: i0.NgModule,
1471
1606
  args: [{
1472
1607
  imports: [i6.CommonModule, core.CoreModule, ConfigurationModule],