@masterteam/properties 0.0.34 → 0.0.36

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.
@@ -340,7 +340,7 @@ let PropertiesState = class PropertiesState extends CrudStateBase {
340
340
  key: PropertiesActionKey.GetAll,
341
341
  request$: req$,
342
342
  onSuccess: (response) => ({
343
- properties: response.data ?? [],
343
+ properties: (response.data?.properties ?? []).map(mapCatalogProperty),
344
344
  }),
345
345
  });
346
346
  }
@@ -525,7 +525,7 @@ let PropertiesState = class PropertiesState extends CrudStateBase {
525
525
  key: PropertiesActionKey.GetConfigProperties,
526
526
  request$: req$,
527
527
  onSuccess: (response) => ({
528
- configTypeProperties: response.data ?? [],
528
+ configTypeProperties: (response.data ?? []).map(mapCatalogProperty),
529
529
  }),
530
530
  });
531
531
  }
@@ -837,6 +837,21 @@ PropertiesState = __decorate([
837
837
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: PropertiesState, decorators: [{
838
838
  type: Injectable
839
839
  }], propDecorators: { getAll: [], getOne: [], getLookups: [], getGroups: [], getConfigAsType: [], getCountries: [], testApiConfiguration: [], getPropertyStatuses: [], createPropertyStatus: [], updatePropertyStatus: [], deletePropertyStatus: [], reorderPropertyStatuses: [], getPropertiesForConfigType: [], resetConfigProperties: [], resetConfigScopes: [], resetSelectedProperty: [], resetApiConfiguration: [], resetPropertyStatuses: [], setModuleInfo: [], SetPropertyTypes: [], setBreadcrumb: [], setDefaultViewType: [], createProperty: [], updateProperty: [], deleteProperty: [] } });
840
+ function mapCatalogProperty(property) {
841
+ return {
842
+ id: property.id,
843
+ key: property.key,
844
+ normalizedKey: property.normalizedKey,
845
+ viewType: property.viewType,
846
+ viewTypeLabel: property.viewType,
847
+ name: { display: property.label },
848
+ order: property.order,
849
+ isRequired: property.isRequired,
850
+ isSystem: property.isSystem,
851
+ isCalculated: property.source?.toLowerCase().includes('calculated'),
852
+ configuration: property.configuration ?? undefined,
853
+ };
854
+ }
840
855
 
841
856
  class PropertiesFacade {
842
857
  store = inject(Store);