@veloceapps/api 10.0.0-50 → 10.0.0-51

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.
@@ -2956,9 +2956,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2956
2956
  type: Injectable
2957
2957
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2958
2958
 
2959
- const fromUIComponentStoryDTO = (dto, attachments) => {
2959
+ const fromUIComponentStoryDTO = (dto, templateId, attachments) => {
2960
2960
  return {
2961
2961
  id: dto.id,
2962
+ templateId,
2962
2963
  name: dto.name,
2963
2964
  uiComponentId: dto.uiComponentId,
2964
2965
  description: dto.description,
@@ -3096,7 +3097,7 @@ class UITemplatesApiService {
3096
3097
  this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'js'),
3097
3098
  this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'css'),
3098
3099
  this.fetchStoryAttachment(templateId, componentId, storyDto.id, 'json'),
3099
- ]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })), map$1(attachments => fromUIComponentStoryDTO(storyDto, attachments)));
3100
+ ]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })), map$1(attachments => fromUIComponentStoryDTO(storyDto, templateId, attachments)));
3100
3101
  };
3101
3102
  this.fetchStories$ = (templateId, componentId, name) => {
3102
3103
  let params = new HttpParams();
@@ -3137,12 +3138,12 @@ class UITemplatesApiService {
3137
3138
  url: `${this.serviceUrl}/${templateId}/components/${story.uiComponentId}/stories/${story.id}`,
3138
3139
  body: rest,
3139
3140
  })
3140
- .pipe(map$1(dto => fromUIComponentStoryDTO(dto, { html: template, js: script, css: styles, json: section })));
3141
+ .pipe(map$1(dto => fromUIComponentStoryDTO(dto, templateId, { html: template, js: script, css: styles, json: section })));
3141
3142
  };
3142
3143
  this.duplicateComponentStory$ = (story, cloneRequest) => {
3143
3144
  return this.baseHttpService
3144
3145
  .api({
3145
- url: `${this.serviceUrl}/${story.template}/components/${story.uiComponentId}/stories/${story.id}/clone`,
3146
+ url: `${this.serviceUrl}/${story.templateId}/components/${story.uiComponentId}/stories/${story.id}/clone`,
3146
3147
  method: 'post',
3147
3148
  body: cloneRequest,
3148
3149
  })