@veloceapps/sdk 2.0.17 → 2.0.19

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 (37) hide show
  1. package/bundles/veloce-sdk-cms.umd.js +121 -59
  2. package/bundles/veloce-sdk-cms.umd.js.map +1 -1
  3. package/bundles/veloce-sdk-runtime.umd.js +2 -3
  4. package/bundles/veloce-sdk-runtime.umd.js.map +1 -1
  5. package/bundles/veloce-sdk.umd.js +27 -11
  6. package/bundles/veloce-sdk.umd.js.map +1 -1
  7. package/cms/components/preview/preview.component.d.ts +5 -2
  8. package/cms/launcher.module.d.ts +3 -2
  9. package/cms/modules/configuration/services/configuration.service.d.ts +3 -2
  10. package/cms/services/index.d.ts +1 -0
  11. package/cms/services/integration.state.d.ts +20 -0
  12. package/cms/types/ui-definition.types.d.ts +1 -0
  13. package/cms/utils/element.utils.d.ts +1 -0
  14. package/esm2015/cms/components/preview/preview.component.js +25 -13
  15. package/esm2015/cms/components/preview/preview.module.js +4 -2
  16. package/esm2015/cms/launcher.module.js +8 -23
  17. package/esm2015/cms/modules/configuration/services/configuration.service.js +16 -15
  18. package/esm2015/cms/services/index.js +2 -1
  19. package/esm2015/cms/services/integration.state.js +40 -0
  20. package/esm2015/cms/types/ui-definition.types.js +1 -1
  21. package/esm2015/cms/utils/element.utils.js +16 -1
  22. package/esm2015/cms/utils/elements-resolver.js +3 -2
  23. package/esm2015/cms/vendor-map.js +4 -2
  24. package/esm2015/runtime/execution/directives/vl-quote.directive.js +2 -2
  25. package/esm2015/runtime/services/quote.service.js +2 -3
  26. package/esm2015/src/pages/legacy-product/legacy-product.component.js +22 -8
  27. package/esm2015/src/pages/product/product.component.js +6 -6
  28. package/esm2015/src/types/flow-customization.types.js +1 -1
  29. package/fesm2015/veloce-sdk-cms.js +102 -50
  30. package/fesm2015/veloce-sdk-cms.js.map +1 -1
  31. package/fesm2015/veloce-sdk-runtime.js +2 -3
  32. package/fesm2015/veloce-sdk-runtime.js.map +1 -1
  33. package/fesm2015/veloce-sdk.js +27 -14
  34. package/fesm2015/veloce-sdk.js.map +1 -1
  35. package/package.json +2 -1
  36. package/src/pages/legacy-product/legacy-product.component.d.ts +5 -2
  37. package/src/types/flow-customization.types.d.ts +2 -0
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@angular/common'), require('@veloce/core'), require('@angular/cdk/drag-drop'), require('@angular/forms'), require('lodash'), require('@veloce/sdk/runtime'), require('rxjs/operators'), require('@veloce/components'), require('@veloce/api'), require('primeng/api'), require('primeng/dynamicdialog'), require('@babel/standalone')) :
3
- typeof define === 'function' && define.amd ? define('@veloce/sdk/cms', ['exports', '@angular/core', 'rxjs', '@angular/common', '@veloce/core', '@angular/cdk/drag-drop', '@angular/forms', 'lodash', '@veloce/sdk/runtime', 'rxjs/operators', '@veloce/components', '@veloce/api', 'primeng/api', 'primeng/dynamicdialog', '@babel/standalone'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloce = global.veloce || {}, global.veloce.sdk = global.veloce.sdk || {}, global.veloce.sdk.cms = {}), global.ng.core, global.rxjs, global.ng.common, global["@veloce/core"], global.ng.cdk.dragDrop, global.ng.forms, global.lodash, global.veloce.sdk.runtime, global.rxjs.operators, global["@veloce/components"], global["@veloce/api"], global["primeng/api"], global.i5$1, global["@babel/standalone"]));
5
- })(this, (function (exports, i0, rxjs, i7, core, dragDrop, angularForms, lodash, i2, rxjsOperators, i5, i1, i2$1, i5$1, standalone) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@angular/common'), require('@veloce/core'), require('@angular/cdk/drag-drop'), require('@angular/forms'), require('lodash'), require('@veloce/components'), require('@veloce/sdk/runtime'), require('rxjs/operators'), require('@veloce/api'), require('primeng/api'), require('primeng/dynamicdialog'), require('@babel/standalone')) :
3
+ typeof define === 'function' && define.amd ? define('@veloce/sdk/cms', ['exports', '@angular/core', 'rxjs', '@angular/common', '@veloce/core', '@angular/cdk/drag-drop', '@angular/forms', 'lodash', '@veloce/components', '@veloce/sdk/runtime', 'rxjs/operators', '@veloce/api', 'primeng/api', 'primeng/dynamicdialog', '@babel/standalone'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloce = global.veloce || {}, global.veloce.sdk = global.veloce.sdk || {}, global.veloce.sdk.cms = {}), global.ng.core, global.rxjs, global.ng.common, global["@veloce/core"], global.ng.cdk.dragDrop, global.ng.forms, global.lodash, global["@veloce/components"], global.veloce.sdk.runtime, global.rxjs.operators, global["@veloce/api"], global["primeng/api"], global.i5, global["@babel/standalone"]));
5
+ })(this, (function (exports, i0, rxjs, i8, core, dragDrop, angularForms, lodash, i6, i2, rxjsOperators, i1, i2$1, i5, standalone) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -24,15 +24,15 @@
24
24
 
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
26
  var rxjs__namespace = /*#__PURE__*/_interopNamespace(rxjs);
27
- var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
27
+ var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
28
28
  var angularForms__namespace = /*#__PURE__*/_interopNamespace(angularForms);
29
29
  var lodash__namespace = /*#__PURE__*/_interopNamespace(lodash);
30
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
30
31
  var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2);
31
32
  var rxjsOperators__namespace = /*#__PURE__*/_interopNamespace(rxjsOperators);
32
- var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5);
33
33
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
34
34
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2$1);
35
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5$1);
35
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
36
36
 
37
37
  /*! *****************************************************************************
38
38
  Copyright (c) Microsoft Corporation.
@@ -635,7 +635,7 @@
635
635
  var ScriptPlugin = /** @class */ (function () {
636
636
  function ScriptPlugin(host) {
637
637
  this.host = host;
638
- this.document = this.host.injector.get(i7.DOCUMENT);
638
+ this.document = this.host.injector.get(i8.DOCUMENT);
639
639
  this.vendorMap = this.host.injector.get(VENDOR_MAP);
640
640
  var elementMetadata = this.host.injector.get(ELEMENT_METADATA);
641
641
  var sharedElementMetadata = this.host.injector.get(SHARED_ELEMENT_METADATA);
@@ -841,6 +841,21 @@
841
841
  return match.replace(/"/g, '');
842
842
  });
843
843
  }
844
+ var isValidScript = function (script) {
845
+ var _a;
846
+ if (!script) {
847
+ return false;
848
+ }
849
+ var exportedClassName = script && ((_a = EXPORTED_CLASS_REGEX.exec(script)) !== null && _a !== void 0 ? _a : [])[1];
850
+ if (!exportedClassName) {
851
+ return false;
852
+ }
853
+ var meta = extractElementMetadata(script);
854
+ if (!meta.name || !meta.type) {
855
+ return false;
856
+ }
857
+ return true;
858
+ };
844
859
 
845
860
  var ElementContextService = /** @class */ (function () {
846
861
  function ElementContextService() {
@@ -1174,26 +1189,27 @@
1174
1189
  this.lineItem.next(undefined);
1175
1190
  this.charges.next({});
1176
1191
  };
1177
- ConfigurationService.prototype.patch = function (lineItem) {
1192
+ ConfigurationService.prototype.patch$ = function (lineItem) {
1178
1193
  var _this = this;
1179
1194
  if (!this.lineItem.value) {
1180
- return;
1195
+ return rxjs.throwError(function () { return new Error("Source LineItem not found"); });
1181
1196
  }
1182
1197
  this.states.configurableRamp = new LineItemWorker(this.lineItem.value).replace(lineItem).li;
1183
1198
  this.states.asset = this.states.configurableRamp
1184
1199
  ? this.runtimeService.getAsset(this.states.configurableRamp)
1185
1200
  : undefined;
1186
- this.configure()
1187
- .pipe(rxjsOperators.catchError(function (error) {
1188
- _this.messageService.add({
1189
- severity: 'error',
1190
- summary: error,
1191
- });
1201
+ return this.configure().pipe(rxjsOperators.catchError(function (error) {
1202
+ console.error(error);
1203
+ if (!_this.runtimeService.uiDefinitionProperties.suppressToastMessages) {
1204
+ _this.messageService.add({ severity: 'error', summary: error });
1205
+ }
1192
1206
  // bounce back if configuration call has failed
1193
1207
  _this.lineItem.next(_this.lineItem.value ? Object.assign({}, _this.lineItem.value) : undefined);
1194
- return rxjs.of();
1195
- }))
1196
- .subscribe();
1208
+ return rxjs.throwError(function () { return error; });
1209
+ }));
1210
+ };
1211
+ ConfigurationService.prototype.patch = function (lineItem) {
1212
+ this.patch$(lineItem).subscribe();
1197
1213
  };
1198
1214
  ConfigurationService.prototype.updateCurrentStates = function (update) {
1199
1215
  this.states = Object.assign(Object.assign({}, this.states), update);
@@ -1230,7 +1246,7 @@
1230
1246
  var runtimeContext = this.getRuntimeContext();
1231
1247
  var runtimeModel = this.getRuntimeModel();
1232
1248
  if (!runtimeContext || !runtimeModel) {
1233
- return rxjs.of(undefined);
1249
+ return rxjs.throwError(function () { return new Error('Runtime context/model not initialized'); });
1234
1250
  }
1235
1251
  var uiDefinitionProperties = Object.assign(Object.assign({}, ((_b = (_a = runtimeContext.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {})), ((_c = this.runtimeService.uiDefinitionProperties) !== null && _c !== void 0 ? _c : {}));
1236
1252
  var lineItem = (_d = this.states.configurableRamp) !== null && _d !== void 0 ? _d : getDefaultLineItem(runtimeContext, uiDefinitionProperties);
@@ -1265,7 +1281,7 @@
1265
1281
  ConfigurationService.prototype.showInactiveProductsConfirmation = function () {
1266
1282
  var _this = this;
1267
1283
  this.dialogService
1268
- .open(i5.ConfirmationComponent, {
1284
+ .open(i6.ConfirmationComponent, {
1269
1285
  dismissableMask: false,
1270
1286
  closeOnEscape: false,
1271
1287
  closable: false,
@@ -1753,6 +1769,52 @@
1753
1769
  ConfigurationService: ConfigurationService
1754
1770
  });
1755
1771
 
1772
+ var InitAction = { type: 'INIT' };
1773
+ var ClearAction = { type: 'CLEAR' };
1774
+ var IntegrationState = /** @class */ (function () {
1775
+ function IntegrationState() {
1776
+ this.stateSubj$ = new rxjs.BehaviorSubject({});
1777
+ this.action$ = new rxjs.BehaviorSubject(InitAction);
1778
+ }
1779
+ Object.defineProperty(IntegrationState.prototype, "state$", {
1780
+ get: function () {
1781
+ return this.stateSubj$.asObservable();
1782
+ },
1783
+ enumerable: false,
1784
+ configurable: true
1785
+ });
1786
+ Object.defineProperty(IntegrationState.prototype, "state", {
1787
+ get: function () {
1788
+ return this.stateSubj$.getValue();
1789
+ },
1790
+ enumerable: false,
1791
+ configurable: true
1792
+ });
1793
+ IntegrationState.prototype.patchState = function (update) {
1794
+ this.stateSubj$.next(Object.assign(Object.assign({}, this.stateSubj$.getValue()), update));
1795
+ };
1796
+ IntegrationState.prototype.dispatch = function (action) {
1797
+ this.action$.next(action);
1798
+ };
1799
+ IntegrationState.prototype.listen$ = function (actionType) {
1800
+ return this.action$.pipe(rxjs.filter(function (action) { return action.type === actionType; }), rxjs.map(function (action) { return action.payload; }));
1801
+ };
1802
+ IntegrationState.prototype.listenAll$ = function () {
1803
+ return this.action$.asObservable();
1804
+ };
1805
+ IntegrationState.prototype.clear = function () {
1806
+ this.stateSubj$.next({});
1807
+ this.action$.next(ClearAction);
1808
+ };
1809
+ return IntegrationState;
1810
+ }());
1811
+ IntegrationState.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IntegrationState, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1812
+ IntegrationState.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IntegrationState, providedIn: 'root' });
1813
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: IntegrationState, decorators: [{
1814
+ type: i0.Injectable,
1815
+ args: [{ providedIn: 'root' }]
1816
+ }] });
1817
+
1756
1818
  var vlCmsUtils = /*#__PURE__*/Object.freeze({
1757
1819
  __proto__: null,
1758
1820
  UiBuildError: UiBuildError,
@@ -1764,6 +1826,7 @@
1764
1826
  getElementConfig: getElementConfig,
1765
1827
  doesElementSupportIO: doesElementSupportIO,
1766
1828
  stringifyElementMetadata: stringifyElementMetadata,
1829
+ isValidScript: isValidScript,
1767
1830
  parseBoundPath: parseBoundPath,
1768
1831
  findLineItem: findLineItem,
1769
1832
  insertLineItem: insertLineItem,
@@ -1779,7 +1842,7 @@
1779
1842
  });
1780
1843
 
1781
1844
  var vendorMap = {
1782
- '@veloce/sdk/cms': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, vlCmsModules), vlCmsUtils), vlCmsLineItemTypes), vlInjectionTokens), { TemplatesService: TemplatesService }),
1845
+ '@veloce/sdk/cms': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, vlCmsModules), vlCmsUtils), vlCmsLineItemTypes), vlInjectionTokens), { TemplatesService: TemplatesService, IntegrationState: IntegrationState }),
1783
1846
  '@veloce/api': {
1784
1847
  SalesforceApiService: i1.SalesforceApiService,
1785
1848
  QuoteApiService: i1.QuoteApiService,
@@ -1878,12 +1941,13 @@
1878
1941
  return finalElement;
1879
1942
  };
1880
1943
  ElementsResolver.prototype.resolveElement = function (sourceElement) {
1944
+ var _a;
1881
1945
  var element = this.processElementMetadata(sourceElement);
1882
1946
  if (!element) {
1883
1947
  return;
1884
1948
  }
1885
1949
  var config = CONFIG[element.type];
1886
- var defaultPlugins = DEFAULT_PLUGINS[this.uiDef.type];
1950
+ var defaultPlugins = (_a = DEFAULT_PLUGINS[this.uiDef.type]) !== null && _a !== void 0 ? _a : [];
1887
1951
  if (!config) {
1888
1952
  console.warn("Unknown element type \"" + element.type + "\"");
1889
1953
  return;
@@ -1947,7 +2011,7 @@
1947
2011
  }());
1948
2012
  DynamicModule = __decorate([
1949
2013
  i0.NgModule({
1950
- imports: [i7.CommonModule, angularForms.FormsModule, angularForms.ReactiveFormsModule, FederatedModule, dragDrop.DragDropModule],
2014
+ imports: [i8.CommonModule, angularForms.FormsModule, angularForms.ReactiveFormsModule, FederatedModule, dragDrop.DragDropModule],
1951
2015
  declarations: __spreadArray(__spreadArray([], __read(staticComponents)), __read(elementsResolver.getNgComponents())),
1952
2016
  jit: true,
1953
2017
  })
@@ -1963,11 +2027,13 @@
1963
2027
  }], ctorParameters: function () { return [{ type: i0__namespace.Compiler }, { type: DynamicModuleService }]; } });
1964
2028
 
1965
2029
  var PreviewComponent = /** @class */ (function () {
1966
- function PreviewComponent(launcherService, configurationService, messageService, runtimeService) {
2030
+ function PreviewComponent(launcherService, configurationService, messageService, runtimeService, integrationState) {
1967
2031
  this.launcherService = launcherService;
1968
2032
  this.configurationService = configurationService;
1969
2033
  this.messageService = messageService;
1970
2034
  this.runtimeService = runtimeService;
2035
+ this.integrationState = integrationState;
2036
+ this.clearState = true;
1971
2037
  this.state$ = new rxjs.BehaviorSubject({ loading: true, failure: false });
1972
2038
  this.elements = [];
1973
2039
  this.destroy$ = new rxjs.Subject();
@@ -1979,6 +2045,9 @@
1979
2045
  this.destroy$.next();
1980
2046
  this.destroy$.complete();
1981
2047
  this.configurationService.reset();
2048
+ if (this.clearState) {
2049
+ this.integrationState.clear();
2050
+ }
1982
2051
  };
1983
2052
  PreviewComponent.prototype.initializeConfiguration$ = function () {
1984
2053
  var _this = this;
@@ -1998,12 +2067,15 @@
1998
2067
  .pipe(rxjs.switchMap(function () { return _this.configurationService.configure(); }));
1999
2068
  };
2000
2069
  PreviewComponent.prototype.elementToMetadataSafe = function (elements) {
2070
+ var _a, _b;
2001
2071
  try {
2002
2072
  return elements.map(function (element) { return elementToMetadata(element); });
2003
2073
  }
2004
2074
  catch (e) {
2005
2075
  console.error(e);
2006
- this.messageService.add({ severity: 'error', summary: String(e) });
2076
+ if (!((_b = (_a = this.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.suppressToastMessages)) {
2077
+ this.messageService.add({ severity: 'error', summary: String(e) });
2078
+ }
2007
2079
  return [];
2008
2080
  }
2009
2081
  };
@@ -2017,10 +2089,11 @@
2017
2089
  var compilation$ = this.launcherService.compileModule(this.elements, uiDefinitionMeta);
2018
2090
  rxjs.forkJoin([compilation$, this.initializeConfiguration$()])
2019
2091
  .pipe(rxjs.tap(function () { return _this.state$.next({ loading: false, failure: false }); }), rxjs.catchError(function (error) {
2020
- _this.messageService.add({
2021
- severity: 'error',
2022
- summary: error,
2023
- });
2092
+ var _a, _b;
2093
+ console.error(error);
2094
+ if (!((_b = (_a = _this.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.suppressToastMessages)) {
2095
+ _this.messageService.add({ severity: 'error', summary: error });
2096
+ }
2024
2097
  _this.state$.next({ loading: false, failure: true });
2025
2098
  return rxjs.of();
2026
2099
  }), rxjs.takeUntil(this.destroy$))
@@ -2028,8 +2101,8 @@
2028
2101
  };
2029
2102
  return PreviewComponent;
2030
2103
  }());
2031
- PreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewComponent, deps: [{ token: LauncherService }, { token: ConfigurationService }, { token: i2__namespace.MessageService }, { token: ConfigurationRuntimeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
2032
- PreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: PreviewComponent, selector: "vl-cms-preview", inputs: { modelId: "modelId", uiDefinition: "uiDefinition" }, providers: [IOProviderService, TemplatesService], ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-element-renderer *ngFor=\"let el of elements\" [meta]=\"el\"></vl-cms-element-renderer>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [":host{flex-grow:1;display:flex;flex-direction:column;height:100%}\n"], components: [{ type: i5__namespace$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: ["meta"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i7__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.ShadowDom });
2104
+ PreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewComponent, deps: [{ token: LauncherService }, { token: ConfigurationService }, { token: i2__namespace.MessageService }, { token: ConfigurationRuntimeService }, { token: IntegrationState }], target: i0__namespace.ɵɵFactoryTarget.Component });
2105
+ PreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: PreviewComponent, selector: "vl-cms-preview", inputs: { modelId: "modelId", uiDefinition: "uiDefinition", clearState: "clearState" }, providers: [IOProviderService, TemplatesService], ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-element-renderer *ngFor=\"let el of elements\" [meta]=\"el\"></vl-cms-element-renderer>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [":host{flex-grow:1;display:flex;flex-direction:column;height:100%}\n"], components: [{ type: i6__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: ["meta"] }], directives: [{ type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i8__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.ShadowDom });
2033
2106
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewComponent, decorators: [{
2034
2107
  type: i0.Component,
2035
2108
  args: [{
@@ -2041,10 +2114,12 @@
2041
2114
  // use shadow DOM to prevent UI from being affected by global styles
2042
2115
  encapsulation: i0.ViewEncapsulation.ShadowDom,
2043
2116
  }]
2044
- }], ctorParameters: function () { return [{ type: LauncherService }, { type: ConfigurationService }, { type: i2__namespace.MessageService }, { type: ConfigurationRuntimeService }]; }, propDecorators: { modelId: [{
2117
+ }], ctorParameters: function () { return [{ type: LauncherService }, { type: ConfigurationService }, { type: i2__namespace.MessageService }, { type: ConfigurationRuntimeService }, { type: IntegrationState }]; }, propDecorators: { modelId: [{
2045
2118
  type: i0.Input
2046
2119
  }], uiDefinition: [{
2047
2120
  type: i0.Input
2121
+ }], clearState: [{
2122
+ type: i0.Input
2048
2123
  }] } });
2049
2124
 
2050
2125
  var ElementRendererModule = /** @class */ (function () {
@@ -2086,13 +2161,14 @@
2086
2161
  return PreviewModule;
2087
2162
  }());
2088
2163
  PreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2089
- PreviewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, declarations: [PreviewComponent], imports: [i7.CommonModule, i5.LoaderModule, ElementRendererModule, ElementChildrenModule], exports: [PreviewComponent] });
2090
- PreviewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, imports: [[i7.CommonModule, i5.LoaderModule, ElementRendererModule, ElementChildrenModule]] });
2164
+ PreviewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, declarations: [PreviewComponent], imports: [i8.CommonModule, i6.LoaderModule, ElementRendererModule, ElementChildrenModule], exports: [PreviewComponent] });
2165
+ PreviewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, providers: [IntegrationState], imports: [[i8.CommonModule, i6.LoaderModule, ElementRendererModule, ElementChildrenModule]] });
2091
2166
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: PreviewModule, decorators: [{
2092
2167
  type: i0.NgModule,
2093
2168
  args: [{
2094
2169
  declarations: [PreviewComponent],
2095
- imports: [i7.CommonModule, i5.LoaderModule, ElementRendererModule, ElementChildrenModule],
2170
+ imports: [i8.CommonModule, i6.LoaderModule, ElementRendererModule, ElementChildrenModule],
2171
+ providers: [IntegrationState],
2096
2172
  exports: [PreviewComponent],
2097
2173
  }]
2098
2174
  }] });
@@ -2109,7 +2185,7 @@
2109
2185
  return ConfigurationModule;
2110
2186
  }());
2111
2187
  ConfigurationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2112
- ConfigurationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, imports: [i5.ConfirmationDialogModule] });
2188
+ ConfigurationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, imports: [i6.ConfirmationDialogModule] });
2113
2189
  ConfigurationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, providers: [
2114
2190
  i2.ContextService,
2115
2191
  i1.ContextApiService,
@@ -2118,11 +2194,11 @@
2118
2194
  ConfigurationRuntimeService,
2119
2195
  RuntimeContextService,
2120
2196
  ConfigurationService,
2121
- ], imports: [[i5.ConfirmationDialogModule]] });
2197
+ ], imports: [[i6.ConfirmationDialogModule]] });
2122
2198
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ConfigurationModule, decorators: [{
2123
2199
  type: i0.NgModule,
2124
2200
  args: [{
2125
- imports: [i5.ConfirmationDialogModule],
2201
+ imports: [i6.ConfirmationDialogModule],
2126
2202
  providers: [
2127
2203
  i2.ContextService,
2128
2204
  i1.ContextApiService,
@@ -2141,29 +2217,13 @@
2141
2217
  return LauncherModule;
2142
2218
  }());
2143
2219
  LauncherModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
2144
- LauncherModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, imports: [i7.CommonModule, core.CoreModule, ConfigurationModule] });
2145
- LauncherModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, providers: [
2146
- LauncherService,
2147
- DynamicModuleService,
2148
- i1.SalesforceApiService,
2149
- i1.QuoteApiService,
2150
- i1.DocumentTemplatesApiService,
2151
- i1.DocumentAttachmentApiService,
2152
- i5$1.DialogService,
2153
- ], imports: [[i7.CommonModule, core.CoreModule, ConfigurationModule]] });
2220
+ LauncherModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, imports: [i8.CommonModule, core.CoreModule, i1.ApiModule, ConfigurationModule] });
2221
+ LauncherModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, providers: [LauncherService, IntegrationState, DynamicModuleService, i5.DialogService], imports: [[i8.CommonModule, core.CoreModule, i1.ApiModule, ConfigurationModule]] });
2154
2222
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LauncherModule, decorators: [{
2155
2223
  type: i0.NgModule,
2156
2224
  args: [{
2157
- imports: [i7.CommonModule, core.CoreModule, ConfigurationModule],
2158
- providers: [
2159
- LauncherService,
2160
- DynamicModuleService,
2161
- i1.SalesforceApiService,
2162
- i1.QuoteApiService,
2163
- i1.DocumentTemplatesApiService,
2164
- i1.DocumentAttachmentApiService,
2165
- i5$1.DialogService,
2166
- ],
2225
+ imports: [i8.CommonModule, core.CoreModule, i1.ApiModule, ConfigurationModule],
2226
+ providers: [LauncherService, IntegrationState, DynamicModuleService, i5.DialogService],
2167
2227
  }]
2168
2228
  }] });
2169
2229
 
@@ -2177,6 +2237,7 @@
2177
2237
  exports.ELEMENT_CONFIG = ELEMENT_CONFIG;
2178
2238
  exports.ELEMENT_METADATA = ELEMENT_METADATA;
2179
2239
  exports.ElementDefinition = ElementDefinition;
2240
+ exports.IntegrationState = IntegrationState;
2180
2241
  exports.LauncherModule = LauncherModule;
2181
2242
  exports.LauncherService = LauncherService;
2182
2243
  exports.LineItemWorker = LineItemWorker;
@@ -2199,6 +2260,7 @@
2199
2260
  exports.getElementConfig = getElementConfig;
2200
2261
  exports.getRecommendedPrices = getRecommendedPrices;
2201
2262
  exports.insertLineItem = insertLineItem;
2263
+ exports.isValidScript = isValidScript;
2202
2264
  exports.mapAttributes = mapAttributes;
2203
2265
  exports.metadataToElement = metadataToElement;
2204
2266
  exports.normalizeElementMetadata = normalizeElementMetadata;