@veloceapps/api 7.0.2-40 → 7.0.2-42
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.
- package/esm2020/lib/services/configuration-api.service.mjs +12 -7
- package/esm2020/lib/services/product-model-api.service.mjs +6 -1
- package/fesm2015/veloceapps-api.mjs +13 -6
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api.mjs +16 -6
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/lib/services/product-model-api.service.d.ts +5 -0
- package/package.json +1 -1
@@ -3,7 +3,7 @@ import { HttpParams, HttpErrorResponse, HttpClientModule } from '@angular/common
|
|
3
3
|
import * as i0 from '@angular/core';
|
4
4
|
import { Injectable, NgModule } from '@angular/core';
|
5
5
|
import * as i1 from '@veloceapps/core';
|
6
|
-
import { ModelTranslatorUtils, ConfigurationContextMode, isLegacyDocumentTemplate, DocxTemplater, QuoteDraft, StringUtils, Expression, Operator, ProductModelsContainer, ModelUtils, EntityUtil, RuleGroupTypes, parseJsonSafely, BaseHttpService, XrayService } from '@veloceapps/core';
|
6
|
+
import { uiDefinitionFromDTO, isLegacyUIDefinition, ModelTranslatorUtils, ConfigurationContextMode, isLegacyDocumentTemplate, DocxTemplater, QuoteDraft, StringUtils, Expression, Operator, ProductModelsContainer, ModelUtils, EntityUtil, RuleGroupTypes, parseJsonSafely, BaseHttpService, XrayService } from '@veloceapps/core';
|
7
7
|
import { throwError, of, zip, forkJoin, map as map$1, noop, catchError as catchError$1, switchMap as switchMap$1 } from 'rxjs';
|
8
8
|
import { map, catchError, tap, switchMap, defaultIfEmpty } from 'rxjs/operators';
|
9
9
|
import * as i2 from 'primeng/api';
|
@@ -366,11 +366,16 @@ class ConfigurationApiService {
|
|
366
366
|
url: `${this.SERVICE_URL}/${productId}/model` + ((offeringId && `/${offeringId}`) || ''),
|
367
367
|
})
|
368
368
|
.pipe(map(runtimeData => {
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
369
|
+
return {
|
370
|
+
...runtimeData,
|
371
|
+
uiDefinitions: runtimeData.uiDefinitions.map(dto => {
|
372
|
+
const uiDefinitionContainer = uiDefinitionFromDTO(dto);
|
373
|
+
if (isLegacyUIDefinition(uiDefinitionContainer.source)) {
|
374
|
+
ModelTranslatorUtils.toLocalUIDefinition(uiDefinitionContainer.source);
|
375
|
+
}
|
376
|
+
return uiDefinitionContainer;
|
377
|
+
}),
|
378
|
+
};
|
374
379
|
}));
|
375
380
|
}
|
376
381
|
getRuntimeDataByModelId(modelId) {
|
@@ -1669,6 +1674,11 @@ class ProductModelApiService {
|
|
1669
1674
|
return linkedModels;
|
1670
1675
|
}));
|
1671
1676
|
}
|
1677
|
+
/**
|
1678
|
+
*
|
1679
|
+
* @deprecated
|
1680
|
+
* Will be removed in next major release
|
1681
|
+
*/
|
1672
1682
|
load(id, version) {
|
1673
1683
|
return forkJoin([this.getModel(id, version), this.getLinkedModels(id, version)]).pipe(map(([model, linkedModels]) => {
|
1674
1684
|
const container = new ProductModelsContainer(model, linkedModels ?? []);
|