@veloceapps/sdk 7.0.2-41 → 7.0.2-43

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 (64) hide show
  1. package/cms/cms.default.d.ts +2 -2
  2. package/cms/components/preview/preview.component.d.ts +2 -1
  3. package/cms/injection-tokens.d.ts +1 -1
  4. package/cms/modules/migrations/services/migrations.service.d.ts +1 -1
  5. package/cms/modules/migrations/types/migrations.types.d.ts +1 -1
  6. package/cms/modules/runtime/services/compilation.service.d.ts +1 -1
  7. package/cms/modules/runtime/services/runtime.service.d.ts +1 -1
  8. package/cms/utils/element.utils.d.ts +1 -1
  9. package/cms/utils/elements-resolver.d.ts +1 -1
  10. package/cms/vendor-map.d.ts +1 -1
  11. package/core/modules/configuration/helpers.d.ts +2 -2
  12. package/core/modules/configuration/services/configuration-runtime.service.d.ts +2 -2
  13. package/core/types/runtime.types.d.ts +1 -2
  14. package/core/types/ui-definition.types.d.ts +0 -46
  15. package/core/utils/ui-definition.utils.d.ts +1 -1
  16. package/esm2020/cms/cms.default.mjs +1 -1
  17. package/esm2020/cms/components/preview/preview.component.mjs +1 -1
  18. package/esm2020/cms/injection-tokens.mjs +1 -1
  19. package/esm2020/cms/modules/migrations/services/migrations.service.mjs +1 -1
  20. package/esm2020/cms/modules/migrations/types/migrations.types.mjs +1 -1
  21. package/esm2020/cms/modules/runtime/services/compilation.service.mjs +1 -1
  22. package/esm2020/cms/modules/runtime/services/runtime.service.mjs +1 -1
  23. package/esm2020/cms/utils/element.utils.mjs +1 -1
  24. package/esm2020/cms/utils/elements-resolver.mjs +1 -1
  25. package/esm2020/core/modules/configuration/helpers.mjs +1 -1
  26. package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +2 -2
  27. package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +6 -12
  28. package/esm2020/core/types/runtime.types.mjs +1 -1
  29. package/esm2020/core/types/ui-definition.types.mjs +1 -1
  30. package/esm2020/core/utils/ui-definition.utils.mjs +1 -1
  31. package/esm2020/runtime/components/ui-runtime-preview/runtime-preview.component.mjs +2 -2
  32. package/esm2020/runtime/services/runtime-context.service.mjs +8 -5
  33. package/esm2020/runtime/services/runtime.service.mjs +1 -1
  34. package/esm2020/runtime/types/runtime.types.mjs +1 -1
  35. package/esm2020/src/components/doc-gen/doc-gen.component.mjs +2 -2
  36. package/esm2020/src/pages/assets/assets.component.mjs +2 -2
  37. package/esm2020/src/pages/catalog/catalog.component.mjs +3 -3
  38. package/esm2020/src/pages/product/product.component.mjs +2 -2
  39. package/esm2020/src/pages/remote/remote.component.mjs +1 -1
  40. package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +3 -3
  41. package/esm2020/src/types/flow-customization.types.mjs +1 -1
  42. package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
  43. package/fesm2015/veloceapps-sdk-core.mjs +5 -11
  44. package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
  45. package/fesm2015/veloceapps-sdk-runtime.mjs +7 -4
  46. package/fesm2015/veloceapps-sdk-runtime.mjs.map +1 -1
  47. package/fesm2015/veloceapps-sdk.mjs.map +1 -1
  48. package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
  49. package/fesm2020/veloceapps-sdk-core.mjs +5 -11
  50. package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
  51. package/fesm2020/veloceapps-sdk-runtime.mjs +7 -4
  52. package/fesm2020/veloceapps-sdk-runtime.mjs.map +1 -1
  53. package/fesm2020/veloceapps-sdk.mjs.map +1 -1
  54. package/package.json +1 -1
  55. package/runtime/components/ui-runtime-preview/runtime-preview.component.d.ts +3 -3
  56. package/runtime/services/runtime.service.d.ts +2 -2
  57. package/runtime/types/runtime.types.d.ts +2 -2
  58. package/src/components/doc-gen/doc-gen.component.d.ts +2 -1
  59. package/src/pages/assets/assets.component.d.ts +2 -1
  60. package/src/pages/catalog/catalog.component.d.ts +2 -1
  61. package/src/pages/product/product.component.d.ts +2 -1
  62. package/src/pages/remote/remote.component.d.ts +2 -1
  63. package/src/pages/shopping-cart/shopping-cart.component.d.ts +2 -1
  64. package/src/types/flow-customization.types.d.ts +1 -2
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, Injectable, NgModule, inject, Directive, Input, LOCALE_ID, Pipe } from '@angular/core';
3
- import { UUID, ConfigurationContext, RuntimeModel, ConfigurationContextMode, SalesforceIdUtils, ConfigurationMode, ConfigurationTranslatorUtils, ChargeGroupUtils, DEFAULT_CURRENCY_ISO_CODE, DEFAULT_CURRENCY_SYMBOL, validateDateFormat, DEFAULT_DATE_FORMAT, DEFAULT_DECIMAL_SEPARATOR, DEFAULT_THOUSANDS_SEPARATOR, getSupportedDateFormats, DEFAULT_DECIMALS_COUNT, parseJsonSafely, formatNumber } from '@veloceapps/core';
3
+ import { UUID, ConfigurationContext, RuntimeModel, isLegacyUIDefinition, ConfigurationContextMode, SalesforceIdUtils, ConfigurationMode, ConfigurationTranslatorUtils, ChargeGroupUtils, DEFAULT_CURRENCY_ISO_CODE, DEFAULT_CURRENCY_SYMBOL, validateDateFormat, DEFAULT_DATE_FORMAT, DEFAULT_DECIMAL_SEPARATOR, DEFAULT_THOUSANDS_SEPARATOR, getSupportedDateFormats, DEFAULT_DECIMALS_COUNT, parseJsonSafely, formatNumber } from '@veloceapps/core';
4
4
  import { BehaviorSubject, combineLatest, zip, noop, throwError, shareReplay as shareReplay$1, tap as tap$1, map as map$2, of, switchMap as switchMap$1, catchError as catchError$1, Subject, take as take$1, distinctUntilChanged } from 'rxjs';
5
5
  import { filter, tap, map, first, switchMap, skip, take, shareReplay, catchError, finalize } from 'rxjs/operators';
6
6
  import * as i1 from '@veloceapps/api';
@@ -112,16 +112,10 @@ class RuntimeContextService {
112
112
  }
113
113
  getUIDefinition(runtimeData) {
114
114
  var _a;
115
- let rawUiDefinitions;
116
- try {
117
- rawUiDefinitions = JSON.parse(runtimeData.uiDefinitionsSource);
118
- }
119
- catch (e) {
120
- return;
121
- }
122
- const uiDefinitions = rawUiDefinitions.filter(uiDef => uiDef.version);
123
- const uiDefinition = (_a = uiDefinitions.find(uiDef => uiDef.primary)) !== null && _a !== void 0 ? _a : uiDefinitions[0];
124
- return uiDefinition;
115
+ const uiDefinitions = runtimeData.uiDefinitions
116
+ .map(({ source }) => source)
117
+ .filter((uiDefinition) => !isLegacyUIDefinition(uiDefinition));
118
+ return (_a = uiDefinitions.find(uiDef => uiDef.primary)) !== null && _a !== void 0 ? _a : uiDefinitions[0];
125
119
  }
126
120
  }
127
121
  RuntimeContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuntimeContextService, deps: [{ token: i1.ConfigurationApiService }], target: i0.ɵɵFactoryTarget.Injectable });