@solidpepper/solidpepper-soliddesigner 0.2.30 → 0.2.32

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.
@@ -1,2 +1,2 @@
1
- export { A as AppParamsService, c as SolidDesignerComponent } from './solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-escB6nIY.mjs';
1
+ export { A as AppParamsService, c as SolidDesignerComponent } from './solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-DFi3bVIe.mjs';
2
2
  //# sourceMappingURL=solidpepper-solidpepper-soliddesigner.mjs.map
package/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { TranslateService } from '@ngx-translate/core';
4
4
  import { HttpClient } from '@angular/common/http';
5
5
  import * as rxjs from 'rxjs';
6
6
  import { Observable } from 'rxjs';
7
+ import { PublicationTemplate, PublicationsTemplatesService } from '@solidpepper/solidpepper-service';
7
8
  import * as signalR from '@microsoft/signalr';
8
9
  import { Router } from '@angular/router';
9
10
 
@@ -38,9 +39,10 @@ interface AppParams {
38
39
  apiUrl?: string;
39
40
  language?: string;
40
41
  unit?: string;
41
- templateData?: any;
42
+ templateData?: PublicationTemplate;
42
43
  documentData?: any[];
43
44
  documentName?: string;
45
+ productSheetAssetGuid?: string | null;
44
46
  }
45
47
  declare class AppParamsService {
46
48
  readonly params: i0.WritableSignal<AppParams>;
@@ -53,8 +55,9 @@ declare class AppParamsService {
53
55
  get guid(): string | undefined;
54
56
  get apiUrl(): string | undefined;
55
57
  get language(): string | undefined;
56
- get templateData(): any;
58
+ get templateData(): PublicationTemplate | undefined;
57
59
  get documentData(): any[] | undefined;
60
+ get productSheetAssetGuid(): string | null | undefined;
58
61
  static ɵfac: i0.ɵɵFactoryDeclaration<AppParamsService, never>;
59
62
  static ɵprov: i0.ɵɵInjectableDeclaration<AppParamsService>;
60
63
  }
@@ -164,11 +167,12 @@ declare class WebsocketService {
164
167
  declare class AssetsService {
165
168
  private http;
166
169
  private appParams;
167
- constructor(http: HttpClient, appParams: AppParamsService);
170
+ private templatesService;
171
+ constructor(http: HttpClient, appParams: AppParamsService, templatesService: PublicationsTemplatesService);
168
172
  getAssetByGuid(assetGuid: string): Observable<any>;
169
- getSVGTemplate(guid: string): Observable<any>;
173
+ getSVGTemplate(guid: string): Observable<PublicationTemplate>;
170
174
  getTemplateBackgroundsList(templateGuid: string): Observable<any>;
171
- getTemplateProductBlocks(templateGuid: string): Observable<any[]>;
175
+ getTemplateProductBlocks(templateGuid: string): Observable<PublicationTemplate[]>;
172
176
  getSVGDocumentPages(guid: string): Observable<any>;
173
177
  getTemplateDimensions(): Observable<any>;
174
178
  saveDocument(type: string, formData: FormData): Observable<any>;
@@ -390,15 +394,17 @@ interface DocumentProperties {
390
394
  height: number;
391
395
  unit: 'px' | 'cm' | 'mm' | 'in';
392
396
  backgroundColor: string;
393
- marginVertical: number;
394
- headerHeight: number;
395
- footerHeight: number;
397
+ marginTop: number;
398
+ marginBottom: number;
396
399
  marginLeft: number;
397
400
  marginRight: number;
398
401
  bleedMargin: number;
399
402
  viewBox?: string;
400
403
  doublePage?: boolean;
401
404
  side?: 'left' | 'right';
405
+ marginVertical: number;
406
+ headerHeight: number;
407
+ footerHeight: number;
402
408
  }
403
409
  declare class DocumentService {
404
410
  private appParams;
@@ -636,7 +642,8 @@ declare class OpenService {
636
642
  private injector;
637
643
  private selectionStore;
638
644
  private saveService;
639
- constructor(canvasService: CanvasService, eventsService: EventsService, docService: DocumentService, injector: Injector, selectionStore: SelectionStore, saveService: SaveService);
645
+ private translate;
646
+ constructor(canvasService: CanvasService, eventsService: EventsService, docService: DocumentService, injector: Injector, selectionStore: SelectionStore, saveService: SaveService, translate: TranslateService);
640
647
  /**
641
648
  * Load SVG content string into the canvas
642
649
  */
@@ -704,6 +711,7 @@ declare class HistoryService {
704
711
  private getComplexRoot;
705
712
  private updateComplexCache;
706
713
  private initializeCache;
714
+ private stopMonitoring;
707
715
  private startMonitoring;
708
716
  private handleMutations;
709
717
  private recordChanges;
@@ -713,30 +721,16 @@ declare class HistoryService {
713
721
  static ɵprov: i0.ɵɵInjectableDeclaration<HistoryService>;
714
722
  }
715
723
 
716
- interface BackgroundTemplate {
717
- backgroundGuid: string;
718
- backgroundName: string;
719
- backgroundUrl: string;
720
- backgroundFormatName: string;
721
- backgroundIsDefault: boolean;
722
- svgContent?: string;
723
- svgUrl?: string;
724
- width?: number;
725
- height?: number;
726
- marginHorizontal?: number;
727
- headerHeight?: number;
728
- footerHeight?: number;
729
- }
730
724
  declare class BackgroundPreviewService {
731
725
  private assetsService;
732
726
  private appParams;
733
727
  private backgroundsSignal;
734
728
  private activeBackgroundIndexSignal;
735
729
  private isPreviewHiddenSignal;
736
- backgrounds: i0.Signal<BackgroundTemplate[]>;
730
+ backgrounds: i0.Signal<PublicationTemplate[]>;
737
731
  activeBackgroundIndex: i0.Signal<number>;
738
732
  isPreviewHidden: i0.Signal<boolean>;
739
- activeBackground: i0.Signal<BackgroundTemplate | null>;
733
+ activeBackground: i0.Signal<PublicationTemplate | null>;
740
734
  constructor(assetsService: AssetsService, appParams: AppParamsService);
741
735
  /**
742
736
  * Loads the background templates and fetches their SVG contents
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidpepper/solidpepper-soliddesigner",
3
- "version": "0.2.30",
3
+ "version": "0.2.32",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.1.6",
6
6
  "@angular/core": "^20.1.6",
@@ -11,7 +11,7 @@
11
11
  "rxjs": "^7.8.0",
12
12
  "@microsoft/signalr": "^8.0.7",
13
13
  "@solidpepper/solidpepper-modal-media-selection": "^1.0.5",
14
- "@solidpepper/solidpepper-solidgeneration": "^0.1.4"
14
+ "@solidpepper/solidpepper-solidgeneration": "^0.1.8"
15
15
  },
16
16
  "dependencies": {
17
17
  "tslib": "^2.3.0"