@solidpepper/solidpepper-soliddesigner 0.2.12 → 0.2.31

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/index.d.ts CHANGED
@@ -1,10 +1,9 @@
1
- import * as _angular_core from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
2
  import { RendererFactory2, Injector, Type, OnInit, OnChanges, EventEmitter, ElementRef, SimpleChanges } from '@angular/core';
3
3
  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, DocumentComment, PublicationsTemplatesService, SettingsService, PublicationsService } from '@solidpepper/solidpepper-service';
8
7
  import * as signalR from '@microsoft/signalr';
9
8
  import { Router } from '@angular/router';
10
9
 
@@ -19,8 +18,8 @@ declare class TranslationService {
19
18
  code: string;
20
19
  text: string;
21
20
  }[];
22
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<TranslationService, never>;
23
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<TranslationService>;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslationService, never>;
22
+ static ɵprov: i0.ɵɵInjectableDeclaration<TranslationService>;
24
23
  }
25
24
 
26
25
  declare enum DocumentType {
@@ -29,9 +28,7 @@ declare enum DocumentType {
29
28
  MARKETING = "marketing",
30
29
  PRODUCTBLOCK = "productblock",
31
30
  DOCUMENT = "document",
32
- YOUBOOKY = "youbooky",
33
- TEMPLATE = "template",
34
- CALLOUT = "callout"
31
+ TEMPLATE = "template"
35
32
  }
36
33
 
37
34
  interface AppParams {
@@ -41,36 +38,13 @@ interface AppParams {
41
38
  apiUrl?: string;
42
39
  language?: string;
43
40
  unit?: string;
44
- templateData?: PublicationTemplate;
41
+ templateData?: any;
45
42
  documentData?: any[];
46
43
  documentName?: string;
47
- productSheetAssetGuid?: string | null;
48
- productSheetGuid?: string | null;
49
- documentPublicationGuid?: string | null;
50
44
  }
51
45
  declare class AppParamsService {
52
- readonly params: _angular_core.WritableSignal<AppParams>;
53
- readonly pageGuid: _angular_core.WritableSignal<string>;
54
- readonly commentsModeActive: _angular_core.WritableSignal<boolean>;
55
- readonly isWaitingForCanvasClick: _angular_core.WritableSignal<boolean>;
56
- readonly activeCommentGuid: _angular_core.WritableSignal<string | null>;
57
- readonly commentsPanelCollapsed: _angular_core.WritableSignal<boolean>;
58
- readonly propertiesPanelCollapsed: _angular_core.WritableSignal<boolean>;
59
- readonly globalPanelCollapsed: _angular_core.WritableSignal<boolean>;
60
- readonly draftComment: _angular_core.WritableSignal<{
61
- pageGuid: string;
62
- x: number;
63
- y: number;
64
- } | null>;
65
- readonly commentsList: _angular_core.WritableSignal<DocumentComment[]>;
66
- readonly activeCommentTool: _angular_core.WritableSignal<"point" | "text" | "drawing" | "shape-rect" | "shape-line" | "highlight">;
67
- readonly commentColor: _angular_core.WritableSignal<string>;
68
- readonly draftDrawing: _angular_core.WritableSignal<{
69
- pageGuid: string;
70
- type: string;
71
- pathData: string;
72
- color: string;
73
- } | null>;
46
+ readonly params: i0.WritableSignal<AppParams>;
47
+ readonly pageGuid: i0.WritableSignal<string>;
74
48
  setParams(params: Partial<AppParams>): void;
75
49
  updateTemplateName(newName: string): void;
76
50
  updateDocumentName(newName: string): void;
@@ -79,13 +53,10 @@ declare class AppParamsService {
79
53
  get guid(): string | undefined;
80
54
  get apiUrl(): string | undefined;
81
55
  get language(): string | undefined;
82
- get templateData(): PublicationTemplate | undefined;
56
+ get templateData(): any;
83
57
  get documentData(): any[] | undefined;
84
- get productSheetAssetGuid(): string | null | undefined;
85
- get productSheetGuid(): string | null | undefined;
86
- get documentPublicationGuid(): string | null | undefined;
87
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppParamsService, never>;
88
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppParamsService>;
58
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppParamsService, never>;
59
+ static ɵprov: i0.ɵɵInjectableDeclaration<AppParamsService>;
89
60
  }
90
61
 
91
62
  declare class FontApiService {
@@ -98,8 +69,8 @@ declare class FontApiService {
98
69
  updateFont(font: any): Observable<any>;
99
70
  deleteFont(fontId: number | string): Observable<any>;
100
71
  getFontAsBase64(fontName: string, fontUrl: string, fontFilename: string): Observable<any>;
101
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<FontApiService, never>;
102
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<FontApiService>;
72
+ static ɵfac: i0.ɵɵFactoryDeclaration<FontApiService, never>;
73
+ static ɵprov: i0.ɵɵInjectableDeclaration<FontApiService>;
103
74
  }
104
75
 
105
76
  interface FontDefinition {
@@ -114,8 +85,8 @@ interface FontDefinition {
114
85
  }
115
86
  declare class FontService {
116
87
  private fontApiService;
117
- fontsNames: _angular_core.WritableSignal<string[]>;
118
- availableFonts: _angular_core.WritableSignal<{
88
+ fontsNames: i0.WritableSignal<string[]>;
89
+ availableFonts: i0.WritableSignal<{
119
90
  [key: string]: FontDefinition;
120
91
  }>;
121
92
  private fontsImported;
@@ -135,8 +106,8 @@ declare class FontService {
135
106
  private injectDocumentFonts;
136
107
  isGoogleFont(fontName: string): boolean;
137
108
  getCustomFontUrlFace(fontName: string): string | null;
138
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<FontService, never>;
139
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<FontService>;
109
+ static ɵfac: i0.ɵɵFactoryDeclaration<FontService, never>;
110
+ static ɵprov: i0.ɵɵInjectableDeclaration<FontService>;
140
111
  }
141
112
 
142
113
  type NotificationType = 'info' | 'success' | 'warning' | 'error';
@@ -149,7 +120,7 @@ interface Notification {
149
120
  declare class NotificationService {
150
121
  private http;
151
122
  private _settingsService;
152
- notifications: _angular_core.WritableSignal<Notification[]>;
123
+ notifications: i0.WritableSignal<Notification[]>;
153
124
  private quantity;
154
125
  show(message: string, type?: NotificationType, duration?: number): void;
155
126
  success(message: string, duration?: number): void;
@@ -160,8 +131,8 @@ declare class NotificationService {
160
131
  sendUpdate(message: number): void;
161
132
  getUpdate(): Observable<any>;
162
133
  getNotifications(start?: any, limit?: any): Observable<Object>;
163
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<NotificationService, never>;
164
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<NotificationService>;
134
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
135
+ static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
165
136
  }
166
137
 
167
138
  declare class WebsocketService {
@@ -186,20 +157,18 @@ declare class WebsocketService {
186
157
  listeners(): void;
187
158
  listenersOnClose(): void;
188
159
  disconnect(): void;
189
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<WebsocketService, never>;
190
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<WebsocketService>;
160
+ static ɵfac: i0.ɵɵFactoryDeclaration<WebsocketService, never>;
161
+ static ɵprov: i0.ɵɵInjectableDeclaration<WebsocketService>;
191
162
  }
192
163
 
193
164
  declare class AssetsService {
194
165
  private http;
195
166
  private appParams;
196
- private templatesService;
197
- constructor(http: HttpClient, appParams: AppParamsService, templatesService: PublicationsTemplatesService);
167
+ constructor(http: HttpClient, appParams: AppParamsService);
198
168
  getAssetByGuid(assetGuid: string): Observable<any>;
199
- getSVGTemplate(guid: string): Observable<PublicationTemplate>;
169
+ getSVGTemplate(guid: string): Observable<any>;
200
170
  getTemplateBackgroundsList(templateGuid: string): Observable<any>;
201
- getTemplateProductBlocks(templateGuid: string): Observable<PublicationTemplate[]>;
202
- getTemplateCallouts(templateGuid: string): Observable<PublicationTemplate[]>;
171
+ getTemplateProductBlocks(templateGuid: string): Observable<any[]>;
203
172
  getSVGDocumentPages(guid: string): Observable<any>;
204
173
  getTemplateDimensions(): Observable<any>;
205
174
  saveDocument(type: string, formData: FormData): Observable<any>;
@@ -210,39 +179,36 @@ declare class AssetsService {
210
179
  deleteDocumentPage(assetGuid: string, pageGuid: string): Observable<any>;
211
180
  updateTemplateField(fieldName: string, fieldValue: string): Observable<any>;
212
181
  getTemplates(): Observable<any[]>;
182
+ publishYoubooky(): Observable<any>;
213
183
  checkPdfExistence(): Observable<any>;
214
- generatePdf(highDefinition?: boolean, imageColorProfile?: string, bleedMargin?: boolean, cuttingLines?: boolean, bleedMarginCustom?: boolean, bleedMarginValue?: number, compressPdf?: boolean): Observable<any>;
215
- getFoldersWithParent(parentGuid?: string, folderType?: string): Observable<any[]>;
216
- getAssetsTemplates(folderGuid?: string): Observable<any[]>;
217
- getAssetsCallouts(folderGuid?: string): Observable<any[]>;
184
+ generatePdf(highDefinition?: boolean, imageColorProfile?: string, bleedMargin?: boolean, cuttingLines?: boolean, bleedMarginCustom?: boolean, bleedMarginValue?: number): Observable<any>;
185
+ getAssetsTemplates(): Observable<any[]>;
218
186
  getTemplateGuidFromAssetGuid(assetGuid: string): Observable<string | null>;
219
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AssetsService, never>;
220
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AssetsService>;
187
+ static ɵfac: i0.ɵɵFactoryDeclaration<AssetsService, never>;
188
+ static ɵprov: i0.ɵɵInjectableDeclaration<AssetsService>;
221
189
  }
222
190
 
223
191
  declare class CanvasService {
224
192
  private _svgElement;
225
193
  private _wrapperElement;
226
194
  private readonly _transform;
227
- readonly zoomLevel: _angular_core.WritableSignal<number>;
228
- readonly panOffset: _angular_core.WritableSignal<{
195
+ readonly zoomLevel: i0.WritableSignal<number>;
196
+ readonly panOffset: i0.WritableSignal<{
229
197
  x: number;
230
198
  y: number;
231
199
  }>;
232
- readonly baseScale: _angular_core.WritableSignal<number>;
233
- readonly isReady: _angular_core.WritableSignal<boolean>;
234
- readonly currentContext: _angular_core.WritableSignal<SVGSVGElement | SVGGElement | null>;
235
- readonly modifiedPulse: _angular_core.WritableSignal<number>;
236
- readonly isSilent: _angular_core.WritableSignal<boolean>;
237
- readonly versionUpgraded: _angular_core.WritableSignal<boolean>;
200
+ readonly baseScale: i0.WritableSignal<number>;
201
+ readonly isReady: i0.WritableSignal<boolean>;
202
+ readonly currentContext: i0.WritableSignal<SVGSVGElement | SVGGElement | null>;
203
+ readonly modifiedPulse: i0.WritableSignal<number>;
204
+ readonly isSilent: i0.WritableSignal<boolean>;
205
+ readonly versionUpgraded: i0.WritableSignal<boolean>;
238
206
  private disabledElems;
239
207
  private readonly docService;
240
208
  private readonly eventsService;
241
209
  private readonly selectionStore;
242
210
  private readonly colorService;
243
- private readonly appParams;
244
211
  private injector;
245
- private get historyService();
246
212
  constructor();
247
213
  get svgElement(): SVGSVGElement;
248
214
  get wrapperElement(): HTMLElement;
@@ -330,10 +296,6 @@ declare class CanvasService {
330
296
  * Moving current content into a left dataside group and cloning it into a right dataside group.
331
297
  */
332
298
  migrateLegacyToDoublePage(): void;
333
- /**
334
- * Updates visibility and pointer-events for double-page side groups
335
- */
336
- updateSideVisibility(): void;
337
299
  /**
338
300
  * Delete the currently selected elements
339
301
  */
@@ -390,8 +352,8 @@ declare class CanvasService {
390
352
  * Cached based on modifiedPulse for performance.
391
353
  */
392
354
  getMostUsedColors(limit?: number): string[];
393
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<CanvasService, never>;
394
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<CanvasService>;
355
+ static ɵfac: i0.ɵɵFactoryDeclaration<CanvasService, never>;
356
+ static ɵprov: i0.ɵɵInjectableDeclaration<CanvasService>;
395
357
  }
396
358
 
397
359
  interface EditorEvent {
@@ -419,8 +381,8 @@ declare class EventsService {
419
381
  private handlePaste;
420
382
  private handleKeyDown;
421
383
  private handleKeyUp;
422
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<EventsService, never>;
423
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<EventsService>;
384
+ static ɵfac: i0.ɵɵFactoryDeclaration<EventsService, never>;
385
+ static ɵprov: i0.ɵɵInjectableDeclaration<EventsService>;
424
386
  }
425
387
 
426
388
  interface DocumentProperties {
@@ -428,37 +390,35 @@ interface DocumentProperties {
428
390
  height: number;
429
391
  unit: 'px' | 'cm' | 'mm' | 'in';
430
392
  backgroundColor: string;
431
- marginTop: number;
432
- marginBottom: number;
393
+ marginVertical: number;
394
+ headerHeight: number;
395
+ footerHeight: number;
433
396
  marginLeft: number;
434
397
  marginRight: number;
435
398
  bleedMargin: number;
436
399
  viewBox?: string;
437
400
  doublePage?: boolean;
438
401
  side?: 'left' | 'right';
439
- marginVertical: number;
440
- headerHeight: number;
441
- footerHeight: number;
442
402
  }
443
403
  declare class DocumentService {
444
404
  private appParams;
445
- readonly properties: _angular_core.WritableSignal<DocumentProperties>;
405
+ readonly properties: i0.WritableSignal<DocumentProperties>;
446
406
  private getInitialUnit;
447
407
  constructor();
448
- get dimensions(): _angular_core.WritableSignal<DocumentProperties>;
408
+ get dimensions(): i0.WritableSignal<DocumentProperties>;
449
409
  updateDimensions(width: number, height: number): void;
450
410
  updateUnit(unit: DocumentProperties['unit']): void;
451
411
  updateProperty<K extends keyof DocumentProperties>(key: K, value: DocumentProperties[K]): void;
452
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<DocumentService, never>;
453
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<DocumentService>;
412
+ static ɵfac: i0.ɵɵFactoryDeclaration<DocumentService, never>;
413
+ static ɵprov: i0.ɵɵInjectableDeclaration<DocumentService>;
454
414
  }
455
415
 
456
416
  declare class SelectionStore {
457
- readonly selectedElements: _angular_core.WritableSignal<SVGElement[]>;
458
- readonly updated: _angular_core.WritableSignal<number>;
459
- readonly count: _angular_core.Signal<number>;
460
- readonly isEmpty: _angular_core.Signal<boolean>;
461
- readonly first: _angular_core.Signal<SVGElement>;
417
+ readonly selectedElements: i0.WritableSignal<SVGElement[]>;
418
+ readonly updated: i0.WritableSignal<number>;
419
+ readonly count: i0.Signal<number>;
420
+ readonly isEmpty: i0.Signal<boolean>;
421
+ readonly first: i0.Signal<SVGElement>;
462
422
  select(elements: SVGElement[]): void;
463
423
  add(element: SVGElement): void;
464
424
  toggle(element: SVGElement): void;
@@ -469,8 +429,8 @@ declare class SelectionStore {
469
429
  * but the selection reference itself remains the same.
470
430
  */
471
431
  triggerUpdate(): void;
472
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectionStore, never>;
473
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<SelectionStore>;
432
+ static ɵfac: i0.ɵɵFactoryDeclaration<SelectionStore, never>;
433
+ static ɵprov: i0.ɵɵInjectableDeclaration<SelectionStore>;
474
434
  }
475
435
 
476
436
  interface HSLA {
@@ -542,8 +502,8 @@ declare class ColorService {
542
502
  parseHslString(str: string): RGBA;
543
503
  parseHsvString(str: string): RGBA;
544
504
  parseCmykString(str: string): RGBA;
545
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColorService, never>;
546
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<ColorService>;
505
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColorService, never>;
506
+ static ɵprov: i0.ɵɵInjectableDeclaration<ColorService>;
547
507
  }
548
508
 
549
509
  interface TableSize {
@@ -553,9 +513,8 @@ interface TableSize {
553
513
  declare class TableElementService {
554
514
  private readonly canvasService;
555
515
  private colorService;
556
- private readonly eventsService;
557
516
  private readonly renderer;
558
- constructor(rendererFactory: RendererFactory2, canvasService: CanvasService, colorService: ColorService, eventsService: EventsService);
517
+ constructor(rendererFactory: RendererFactory2, canvasService: CanvasService, colorService: ColorService);
559
518
  /**
560
519
  * Create a product table foreignObject element on the canvas.
561
520
  */
@@ -594,7 +553,6 @@ declare class TableElementService {
594
553
  getTableSize(container: Element): TableSize;
595
554
  setTableSize(container: Element, targetRows: number, targetCols: number): void;
596
555
  setEditInput(cell: HTMLElement): void;
597
- private handleCellInsertParagraph;
598
556
  removeEditInput(cell: HTMLElement): void;
599
557
  selectCells(container: Element, cells: Element[]): void;
600
558
  deselectAllCells(container: Element): void;
@@ -612,8 +570,8 @@ declare class TableElementService {
612
570
  /** Get all elements in a given column (across all rows). */
613
571
  _getColumnByIndex(table: Element, colIndex: number): Element[];
614
572
  exportVariantsTableSettings(tableElement: HTMLElement): any;
615
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableElementService, never>;
616
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<TableElementService>;
573
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableElementService, never>;
574
+ static ɵprov: i0.ɵɵInjectableDeclaration<TableElementService>;
617
575
  }
618
576
 
619
577
  declare enum LoadingError {
@@ -623,12 +581,12 @@ declare enum LoadingError {
623
581
  TOKEN = "LOADER.ERRORS.TOKEN"
624
582
  }
625
583
  declare class LoadingService {
626
- readonly isLoading: _angular_core.WritableSignal<boolean>;
627
- readonly hasError: _angular_core.WritableSignal<boolean>;
628
- readonly errorKey: _angular_core.WritableSignal<LoadingError>;
629
- readonly isCanvasLoading: _angular_core.WritableSignal<boolean>;
630
- readonly canvasHasError: _angular_core.WritableSignal<boolean>;
631
- readonly canvasErrorKey: _angular_core.WritableSignal<LoadingError>;
584
+ readonly isLoading: i0.WritableSignal<boolean>;
585
+ readonly hasError: i0.WritableSignal<boolean>;
586
+ readonly errorKey: i0.WritableSignal<LoadingError>;
587
+ readonly isCanvasLoading: i0.WritableSignal<boolean>;
588
+ readonly canvasHasError: i0.WritableSignal<boolean>;
589
+ readonly canvasErrorKey: i0.WritableSignal<LoadingError>;
632
590
  showLoader(): void;
633
591
  hideLoader(): void;
634
592
  showError(error: LoadingError): void;
@@ -636,8 +594,8 @@ declare class LoadingService {
636
594
  hideCanvasLoader(): void;
637
595
  showCanvasError(error: LoadingError): void;
638
596
  reset(): void;
639
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<LoadingService, never>;
640
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<LoadingService>;
597
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoadingService, never>;
598
+ static ɵprov: i0.ɵɵInjectableDeclaration<LoadingService>;
641
599
  }
642
600
 
643
601
  declare class SaveService {
@@ -650,8 +608,8 @@ declare class SaveService {
650
608
  private fontService;
651
609
  private tableService;
652
610
  private loadingService;
653
- isDirty: _angular_core.WritableSignal<boolean>;
654
- saveSuccessPulse: _angular_core.WritableSignal<{
611
+ isDirty: i0.WritableSignal<boolean>;
612
+ saveSuccessPulse: i0.WritableSignal<{
655
613
  guid: string;
656
614
  count: number;
657
615
  }>;
@@ -667,8 +625,8 @@ declare class SaveService {
667
625
  * Trigger a download/upload of the current SVG
668
626
  */
669
627
  save(): Promise<void>;
670
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SaveService, never>;
671
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<SaveService>;
628
+ static ɵfac: i0.ɵɵFactoryDeclaration<SaveService, never>;
629
+ static ɵprov: i0.ɵɵInjectableDeclaration<SaveService>;
672
630
  }
673
631
 
674
632
  declare class OpenService {
@@ -678,8 +636,7 @@ declare class OpenService {
678
636
  private injector;
679
637
  private selectionStore;
680
638
  private saveService;
681
- private translate;
682
- constructor(canvasService: CanvasService, eventsService: EventsService, docService: DocumentService, injector: Injector, selectionStore: SelectionStore, saveService: SaveService, translate: TranslateService);
639
+ constructor(canvasService: CanvasService, eventsService: EventsService, docService: DocumentService, injector: Injector, selectionStore: SelectionStore, saveService: SaveService);
683
640
  /**
684
641
  * Load SVG content string into the canvas
685
642
  */
@@ -697,8 +654,8 @@ declare class OpenService {
697
654
  * Import an SVG element (Delegate to processImportedSvg if root)
698
655
  */
699
656
  importSvgElement(svgEl: SVGElement): void;
700
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<OpenService, never>;
701
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<OpenService>;
657
+ static ɵfac: i0.ɵɵFactoryDeclaration<OpenService, never>;
658
+ static ɵprov: i0.ɵɵInjectableDeclaration<OpenService>;
702
659
  }
703
660
 
704
661
  declare abstract class Command {
@@ -728,7 +685,7 @@ declare class HistoryService {
728
685
  private debounceTimer;
729
686
  private complexStateCache;
730
687
  private accumulatedChanges;
731
- readonly historyChanged: _angular_core.WritableSignal<number>;
688
+ readonly historyChanged: i0.WritableSignal<number>;
732
689
  constructor();
733
690
  private initKeyboardShortcuts;
734
691
  canUndo(): boolean;
@@ -747,26 +704,39 @@ declare class HistoryService {
747
704
  private getComplexRoot;
748
705
  private updateComplexCache;
749
706
  private initializeCache;
750
- private stopMonitoring;
751
707
  private startMonitoring;
752
708
  private handleMutations;
753
709
  private recordChanges;
754
710
  private scheduleFlush;
755
711
  private flushChanges;
756
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<HistoryService, never>;
757
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<HistoryService>;
712
+ static ɵfac: i0.ɵɵFactoryDeclaration<HistoryService, never>;
713
+ static ɵprov: i0.ɵɵInjectableDeclaration<HistoryService>;
758
714
  }
759
715
 
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
+ }
760
730
  declare class BackgroundPreviewService {
761
731
  private assetsService;
762
732
  private appParams;
763
733
  private backgroundsSignal;
764
734
  private activeBackgroundIndexSignal;
765
735
  private isPreviewHiddenSignal;
766
- backgrounds: _angular_core.Signal<PublicationTemplate[]>;
767
- activeBackgroundIndex: _angular_core.Signal<number>;
768
- isPreviewHidden: _angular_core.Signal<boolean>;
769
- activeBackground: _angular_core.Signal<PublicationTemplate | null>;
736
+ backgrounds: i0.Signal<BackgroundTemplate[]>;
737
+ activeBackgroundIndex: i0.Signal<number>;
738
+ isPreviewHidden: i0.Signal<boolean>;
739
+ activeBackground: i0.Signal<BackgroundTemplate | null>;
770
740
  constructor(assetsService: AssetsService, appParams: AppParamsService);
771
741
  /**
772
742
  * Loads the background templates and fetches their SVG contents
@@ -774,8 +744,8 @@ declare class BackgroundPreviewService {
774
744
  loadBackgrounds(): Promise<void>;
775
745
  setActiveBackground(index: number): void;
776
746
  setPreviewHidden(hidden: boolean): void;
777
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<BackgroundPreviewService, never>;
778
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<BackgroundPreviewService>;
747
+ static ɵfac: i0.ɵɵFactoryDeclaration<BackgroundPreviewService, never>;
748
+ static ɵprov: i0.ɵɵInjectableDeclaration<BackgroundPreviewService>;
779
749
  }
780
750
 
781
751
  interface ModalOptions {
@@ -787,8 +757,8 @@ declare class ModalService {
787
757
  modalState$: rxjs.Observable<ModalOptions | null>;
788
758
  open(component: Type<any>, data?: any): void;
789
759
  close(): void;
790
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalService, never>;
791
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<ModalService>;
760
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
761
+ static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
792
762
  }
793
763
 
794
764
  interface EditorConfig {
@@ -800,19 +770,19 @@ interface EditorConfig {
800
770
  theme: 'light' | 'dark';
801
771
  }
802
772
  declare class ConfigService {
803
- readonly config: _angular_core.WritableSignal<EditorConfig>;
773
+ readonly config: i0.WritableSignal<EditorConfig>;
804
774
  updateConfig(partialConfig: Partial<EditorConfig>): void;
805
775
  toggleGrid(): void;
806
776
  toggleRulers(): void;
807
777
  toggleWireframe(): void;
808
778
  toggleMargins(): void;
809
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfigService, never>;
810
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<ConfigService>;
779
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfigService, never>;
780
+ static ɵprov: i0.ɵɵInjectableDeclaration<ConfigService>;
811
781
  }
812
782
 
813
783
  declare class AppComponent implements OnInit, OnChanges {
814
784
  private translationService;
815
- appParamsService: AppParamsService;
785
+ private appParamsService;
816
786
  private assetsService;
817
787
  private openService;
818
788
  private canvasService;
@@ -826,462 +796,24 @@ declare class AppComponent implements OnInit, OnChanges {
826
796
  private saveService;
827
797
  loadingService: LoadingService;
828
798
  private websocketService;
829
- private libSettingsService;
830
- private publicationsService;
831
799
  token?: string;
832
- type: DocumentType.BACKGROUND | DocumentType.COVERPAGE | DocumentType.MARKETING | DocumentType.PRODUCTBLOCK | DocumentType.DOCUMENT | DocumentType.YOUBOOKY | DocumentType.TEMPLATE | DocumentType.CALLOUT | string;
800
+ type: DocumentType.BACKGROUND | DocumentType.COVERPAGE | DocumentType.MARKETING | DocumentType.PRODUCTBLOCK | DocumentType.DOCUMENT | DocumentType.TEMPLATE;
833
801
  guid?: string;
834
802
  apiUrl: string;
835
803
  language: string;
836
804
  unit?: string;
837
- pageNumber?: number;
838
- pageGuid?: string;
839
805
  exitEditor: EventEmitter<void>;
840
- isSafari: _angular_core.WritableSignal<boolean>;
806
+ isSafari: i0.WritableSignal<boolean>;
841
807
  isInitialized: boolean;
842
- constructor(translationService: TranslationService, appParamsService: AppParamsService, assetsService: AssetsService, openService: OpenService, canvasService: CanvasService, historyService: HistoryService, backgroundService: BackgroundPreviewService, fontService: FontService, eventsService: EventsService, modalService: ModalService, hostElement: ElementRef, config: ConfigService, saveService: SaveService, loadingService: LoadingService, websocketService: WebsocketService, libSettingsService: SettingsService, publicationsService: PublicationsService);
808
+ constructor(translationService: TranslationService, appParamsService: AppParamsService, assetsService: AssetsService, openService: OpenService, canvasService: CanvasService, historyService: HistoryService, backgroundService: BackgroundPreviewService, fontService: FontService, eventsService: EventsService, modalService: ModalService, hostElement: ElementRef, config: ConfigService, saveService: SaveService, loadingService: LoadingService, websocketService: WebsocketService);
843
809
  ngOnInit(): void;
844
810
  ngOnChanges(changes: SimpleChanges): void;
845
811
  private tryInitialize;
846
812
  private initShortcutListeners;
847
813
  private checkBrowser;
848
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppComponent, never>;
849
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppComponent, "solid-designer", never, { "token": { "alias": "token"; "required": false; }; "type": { "alias": "type"; "required": false; }; "guid": { "alias": "guid"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "language": { "alias": "language"; "required": false; }; "unit": { "alias": "unit"; "required": false; }; "pageNumber": { "alias": "pageNumber"; "required": false; }; "pageGuid": { "alias": "pageGuid"; "required": false; }; }, { "exitEditor": "exitEditor"; }, never, never, true, never>;
850
- }
851
-
852
- /**
853
- * GENERATED FILE - DO NOT EDIT DIRECTLY.
854
- * Generated automatically from designer.model.ts by tools/sync-designer-model.mjs
855
- */
856
- declare const SOLID_DESIGNER_DOCUMENT_MODEL = "\n/* ========================================================================== */\n/* MODELS & INTERFACES */\n/* ========================================================================== */\n\nimport { DocumentType } from './document-type';\n\nexport { DocumentType };\n\n/**\n * Structure principale du document SolidDesigner en JSON\n */\nexport interface SolidDesignerDocument {\n spVersion: string;\n metadata?: DocumentMetadata;\n document: DocumentSettings;\n defs?: DocumentDefs;\n pages: DocumentPage[];\n}\n\nexport interface DocumentMetadata {\n title?: string;\n documentType: DocumentType | string; // document's type\n createdAt?: string;\n updatedAt?: string;\n author?: string;\n customData?: Record<string, any>;\n}\n\nexport interface DocumentSettings {\n width: number;\n height: number;\n unit: 'mm' | 'cm' | 'px' | 'in'; // even if the unit is different than px, consider it is in px for positionning, sizes, etc.\n viewBox?: string; // dimensions of the document (0 0 width height)\n backgroundColor?: string; // DON'T MODIFY IT. Use a rect element instead if you want to have a background color\n margins: DocumentMargins;\n doublePage: DoublePageSettings;\n}\n\nexport interface DocumentMargins {\n top: number;\n bottom: number;\n left: number;\n right: number;\n vertical?: number;\n horizontal?: number;\n headerHeight?: number;\n footerHeight?: number;\n bleed: BleedMargins;\n}\n\nexport interface BleedMargins {\n top: number;\n bottom: number;\n left: number;\n right: number;\n}\n\nexport interface DoublePageSettings {\n enabled: boolean;\n activeSide?: 'left' | 'right';\n}\n\nexport interface DocumentDefs {\n linearGradients?: LinearGradientDef[];\n radialGradients?: RadialGradientDef[];\n patterns?: PatternDef[];\n rawDefs?: string[];\n}\n\nexport interface LinearGradientDef {\n id: string;\n x1?: string;\n y1?: string;\n x2?: string;\n y2?: string;\n gradientTransform?: string;\n stops: Array<{ offset: string; color: string; opacity?: number }>;\n}\n\nexport interface RadialGradientDef {\n id: string;\n cx?: string;\n cy?: string;\n r?: string;\n gradientTransform?: string;\n stops: Array<{ offset: string; color: string; opacity?: number }>;\n}\n\nexport interface PatternDef {\n id: string;\n x?: string;\n y?: string;\n width: number | string;\n height: number | string;\n patternUnits?: string;\n patternContentHtml: string;\n}\n\nexport interface DocumentPage {\n id: string;\n side: 'left' | 'right' | 'single';\n elements: DesignerElement[];\n}\n\nexport interface ConditionalHideRule {\n enabled: boolean;\n attribute?: string;\n operator?: 'is_null' | 'is_not_null' | 'equals' | 'not_equals' | 'variant_exists' | 'variant_not_exists' | string;\n value?: string;\n variant?: number;\n}\n\nexport interface StrokeStyle {\n color: string;\n width: number;\n style?: 'solid' | 'dashed' | 'dotted' | string;\n dashArray?: string;\n lineCap?: 'butt' | 'round' | 'square' | string;\n lineJoin?: 'miter' | 'round' | 'bevel' | string;\n}\n\nexport interface ElementBorder {\n width?: string | number;\n color?: string;\n style?: string;\n radius?: number;\n}\n\nexport interface BaseElement {\n id: string;\n name?: string;\n type: ElementType;\n x: number;\n y: number;\n width?: number;\n height?: number;\n rotation?: number;\n opacity?: number;\n side?: 'left' | 'right';\n conditionalHide?: ConditionalHideRule;\n customDataAttributes?: Record<string, string>;\n}\n\nexport type ElementType =\n | 'text'\n | 'image'\n | 'dynamicImage'\n | 'qrcode'\n | 'barcode'\n | 'productTable'\n | 'variantsTable'\n | 'rect'\n | 'circle'\n | 'ellipse'\n | 'line'\n | 'polyline'\n | 'path'\n | 'template'\n | 'callout'\n | 'group'\n | 'svg';\n\nexport interface TextElement extends BaseElement {\n type: 'text';\n content: TextElementLine[]; // each element represent a line\n style: {\n fontFamily: string;\n fontSize: number;\n fontWeight?: string | number;\n fontStyle?: string;\n textDecoration?: string;\n textAlign: 'left' | 'center' | 'right' | 'justify' | string;\n lineHeight?: string; // Value in px (DON'T include the unit in the value). Default value is \"0\" and \"0\" mean automatic (adapt to font size). prefer using \"0\" to let the text adapt to font size.\n color: string;\n backgroundColor?: string;\n padding?: { top?: number; right?: number; bottom?: number; left?: number };\n border?: ElementBorder;\n };\n}\n\nexport interface TextElementLine {\n textElements: TextElementPart[];\n}\n\nexport interface TextElementPart {\n /**\n * Text element part, isVariable = true for a variable, false for a normal text. Only use text variables listed above\n */\n isVariable: boolean;\n content: string;\n color?: string;\n bold?: boolean;\n italic?: boolean;\n underline?: boolean;\n strikethrough?: boolean;\n highlightedColor?: string; // leave empty for no highlight\n}\n\nexport interface ImageElement extends BaseElement {\n /*\n For a dynamic image (most likely) : fill \"selectedImageField\" ONLY with image variable above.\n */\n type: 'image' | 'dynamicImage';\n isDynamic: boolean;\n source: {\n src?: string;\n assetGuid?: string;\n hdUrl?: string;\n sdUrl?: string;\n selectedImageField?: string;\n imageIndex?: number;\n };\n display: {\n objectFit: 'contain' | 'cover' | 'fill' | 'none' | string;\n filter?: string;\n internalRotation?: number;\n crop?: {\n top: number;\n right: number;\n bottom: number;\n left: number;\n };\n };\n border?: ElementBorder;\n}\n\nexport interface QrCodeElement extends BaseElement {\n type: 'qrcode';\n field: string;\n codeDimensions: {\n width: number;\n height: number;\n margin: number;\n };\n style: {\n dotType: 'square' | 'dots' | 'rounded';\n dotColor: string;\n cornersSquareType: 'square' | 'extra-rounded' | 'rounded';\n cornersSquareColor: string;\n cornersDotType: 'square' | 'dots' | 'rounded';\n cornersDotColor: string;\n backgroundColor: string;\n };\n logo?: {\n url?: string;\n size: number;\n margin: number;\n hideBackgroundDots: boolean;\n };\n}\n\nexport interface BarcodeElement extends BaseElement {\n type: 'barcode';\n field: string;\n format: 'EAN13' | 'EAN8' | 'EAN5' | 'EAN2' | 'UPC' | 'CODE128' | 'CODE128A' | 'CODE128C' | 'CODE39' | 'ITF' | 'MSI' | 'pharmacode';\n barWidth: 1 | 2 | 3 | 4;\n barHeight: 100;\n margin: 10;\n displayValue: boolean;\n textStyle?: {\n position?: 'bottom';\n align?: 'center';\n fontFamily?: string;\n fontSize?: number;\n };\n lineColor: string;\n backgroundColor: string;\n}\n\nexport interface TableElement extends BaseElement {\n type: 'productTable' | 'variantsTable';\n tableStyle: {\n verticalPadding: string;\n horizontalPadding: string;\n borderCollapse?: string;\n };\n columns: Array<{\n width: string;\n maxWidth?: string;\n }>;\n rows: Array<{\n isHeader?: boolean;\n minHeight?: string;\n cells: TableCell[];\n }>;\n}\n\nexport interface TableCell {\n content: string;\n colSpan?: number;\n rowSpan?: number;\n parentColIndex?: number;\n parentRowIndex?: number;\n styles?: {\n fontFamily?: string;\n fontSize?: string;\n fontWeight?: string;\n fontStyle?: string;\n textDecoration?: string;\n color?: string;\n backgroundColor?: string;\n textAlign?: string;\n alignItems?: string;\n justifyContent?: string;\n borders?: {\n top?: BorderSide;\n right?: BorderSide;\n bottom?: BorderSide;\n left?: BorderSide;\n };\n padding?: { top?: string; right?: string; bottom?: string; left?: string };\n };\n}\n\nexport interface BorderSide {\n width: string;\n color: string;\n style: 'dash' | 'solid' | 'dotted' | 'none';\n}\n\nexport interface RectElement extends BaseElement {\n type: 'rect';\n rx?: number;\n ry?: number;\n fill: string;\n stroke?: StrokeStyle;\n}\n\nexport interface EllipseElement extends BaseElement {\n type: 'ellipse' | 'circle';\n cx: number;\n cy: number;\n rx: number;\n ry: number;\n fill: string;\n stroke?: StrokeStyle;\n}\n\nexport interface LineElement extends BaseElement {\n type: 'line';\n x1: number;\n y1: number;\n x2: number;\n y2: number;\n stroke: StrokeStyle;\n}\n\nexport interface PathElement extends BaseElement {\n type: 'path' | 'polyline';\n d: string;\n fill?: string;\n stroke?: StrokeStyle;\n originalBBox?: { x: number; y: number; width: number; height: number };\n}\n\nexport interface TemplateElement extends BaseElement {\n type: 'template' | 'callout';\n templateGuid?: string;\n blockGuid?: string;\n skuGuid?: string;\n skuRef?: string;\n productSheetGuid?: string;\n isPlaceholder: boolean;\n children?: DesignerElement[];\n}\n\nexport interface GroupElement extends BaseElement {\n type: 'group';\n children: DesignerElement[];\n}\n\nexport type DesignerElement =\n | TextElement\n | ImageElement\n | QrCodeElement\n | BarcodeElement\n | TableElement\n | RectElement\n | EllipseElement\n | LineElement\n | PathElement\n | TemplateElement\n | GroupElement;\n";
857
-
858
- /**
859
- * Structure principale du document SolidDesigner en JSON
860
- */
861
- interface SolidDesignerDocument {
862
- spVersion: string;
863
- metadata?: DocumentMetadata;
864
- document: DocumentSettings;
865
- defs?: DocumentDefs;
866
- pages: DocumentPage[];
867
- }
868
- interface DocumentMetadata {
869
- title?: string;
870
- documentType: DocumentType | string;
871
- createdAt?: string;
872
- updatedAt?: string;
873
- author?: string;
874
- customData?: Record<string, any>;
875
- }
876
- interface DocumentSettings {
877
- width: number;
878
- height: number;
879
- unit: 'mm' | 'cm' | 'px' | 'in';
880
- viewBox?: string;
881
- backgroundColor?: string;
882
- margins: DocumentMargins;
883
- doublePage: DoublePageSettings;
884
- }
885
- interface DocumentMargins {
886
- top: number;
887
- bottom: number;
888
- left: number;
889
- right: number;
890
- vertical?: number;
891
- horizontal?: number;
892
- headerHeight?: number;
893
- footerHeight?: number;
894
- bleed: BleedMargins;
895
- }
896
- interface BleedMargins {
897
- top: number;
898
- bottom: number;
899
- left: number;
900
- right: number;
901
- }
902
- interface DoublePageSettings {
903
- enabled: boolean;
904
- activeSide?: 'left' | 'right';
905
- }
906
- interface DocumentDefs {
907
- linearGradients?: LinearGradientDef[];
908
- radialGradients?: RadialGradientDef[];
909
- patterns?: PatternDef[];
910
- rawDefs?: string[];
911
- }
912
- interface LinearGradientDef {
913
- id: string;
914
- x1?: string;
915
- y1?: string;
916
- x2?: string;
917
- y2?: string;
918
- gradientTransform?: string;
919
- stops: Array<{
920
- offset: string;
921
- color: string;
922
- opacity?: number;
923
- }>;
924
- }
925
- interface RadialGradientDef {
926
- id: string;
927
- cx?: string;
928
- cy?: string;
929
- r?: string;
930
- gradientTransform?: string;
931
- stops: Array<{
932
- offset: string;
933
- color: string;
934
- opacity?: number;
935
- }>;
936
- }
937
- interface PatternDef {
938
- id: string;
939
- x?: string;
940
- y?: string;
941
- width: number | string;
942
- height: number | string;
943
- patternUnits?: string;
944
- patternContentHtml: string;
945
- }
946
- interface DocumentPage {
947
- id: string;
948
- side: 'left' | 'right' | 'single';
949
- elements: DesignerElement[];
950
- }
951
- interface ConditionalHideRule {
952
- enabled: boolean;
953
- attribute?: string;
954
- operator?: 'is_null' | 'is_not_null' | 'equals' | 'not_equals' | 'variant_exists' | 'variant_not_exists' | string;
955
- value?: string;
956
- variant?: number;
957
- }
958
- interface StrokeStyle {
959
- color: string;
960
- width: number;
961
- style?: 'solid' | 'dashed' | 'dotted' | string;
962
- dashArray?: string;
963
- lineCap?: 'butt' | 'round' | 'square' | string;
964
- lineJoin?: 'miter' | 'round' | 'bevel' | string;
965
- }
966
- interface ElementBorder {
967
- width?: string | number;
968
- color?: string;
969
- style?: string;
970
- radius?: number;
971
- }
972
- interface BaseElement {
973
- id: string;
974
- name?: string;
975
- type: ElementType;
976
- x: number;
977
- y: number;
978
- width?: number;
979
- height?: number;
980
- rotation?: number;
981
- opacity?: number;
982
- side?: 'left' | 'right';
983
- conditionalHide?: ConditionalHideRule;
984
- customDataAttributes?: Record<string, string>;
985
- }
986
- type ElementType = 'text' | 'image' | 'dynamicImage' | 'qrcode' | 'barcode' | 'productTable' | 'variantsTable' | 'rect' | 'circle' | 'ellipse' | 'line' | 'polyline' | 'path' | 'template' | 'callout' | 'group' | 'svg';
987
- interface TextElement extends BaseElement {
988
- type: 'text';
989
- content: TextElementLine[];
990
- style: {
991
- fontFamily: string;
992
- fontSize: number;
993
- fontWeight?: string | number;
994
- fontStyle?: string;
995
- textDecoration?: string;
996
- textAlign: 'left' | 'center' | 'right' | 'justify' | string;
997
- lineHeight?: string;
998
- color: string;
999
- backgroundColor?: string;
1000
- padding?: {
1001
- top?: number;
1002
- right?: number;
1003
- bottom?: number;
1004
- left?: number;
1005
- };
1006
- border?: ElementBorder;
1007
- };
1008
- }
1009
- interface TextElementLine {
1010
- textElements: TextElementPart[];
1011
- }
1012
- interface TextElementPart {
1013
- /**
1014
- * Text element part, isVariable = true for a variable, false for a normal text. Only use text variables listed above
1015
- */
1016
- isVariable: boolean;
1017
- content: string;
1018
- color?: string;
1019
- bold?: boolean;
1020
- italic?: boolean;
1021
- underline?: boolean;
1022
- strikethrough?: boolean;
1023
- highlightedColor?: string;
1024
- }
1025
- interface ImageElement extends BaseElement {
1026
- type: 'image' | 'dynamicImage';
1027
- isDynamic: boolean;
1028
- source: {
1029
- src?: string;
1030
- assetGuid?: string;
1031
- hdUrl?: string;
1032
- sdUrl?: string;
1033
- selectedImageField?: string;
1034
- imageIndex?: number;
1035
- };
1036
- display: {
1037
- objectFit: 'contain' | 'cover' | 'fill' | 'none' | string;
1038
- filter?: string;
1039
- internalRotation?: number;
1040
- crop?: {
1041
- top: number;
1042
- right: number;
1043
- bottom: number;
1044
- left: number;
1045
- };
1046
- };
1047
- border?: ElementBorder;
1048
- }
1049
- interface QrCodeElement extends BaseElement {
1050
- type: 'qrcode';
1051
- field: string;
1052
- codeDimensions: {
1053
- width: number;
1054
- height: number;
1055
- margin: number;
1056
- };
1057
- style: {
1058
- dotType: 'square' | 'dots' | 'rounded';
1059
- dotColor: string;
1060
- cornersSquareType: 'square' | 'extra-rounded' | 'rounded';
1061
- cornersSquareColor: string;
1062
- cornersDotType: 'square' | 'dots' | 'rounded';
1063
- cornersDotColor: string;
1064
- backgroundColor: string;
1065
- };
1066
- logo?: {
1067
- url?: string;
1068
- size: number;
1069
- margin: number;
1070
- hideBackgroundDots: boolean;
1071
- };
1072
- }
1073
- interface BarcodeElement extends BaseElement {
1074
- type: 'barcode';
1075
- field: string;
1076
- format: 'EAN13' | 'EAN8' | 'EAN5' | 'EAN2' | 'UPC' | 'CODE128' | 'CODE128A' | 'CODE128C' | 'CODE39' | 'ITF' | 'MSI' | 'pharmacode';
1077
- barWidth: 1 | 2 | 3 | 4;
1078
- barHeight: 100;
1079
- margin: 10;
1080
- displayValue: boolean;
1081
- textStyle?: {
1082
- position?: 'bottom';
1083
- align?: 'center';
1084
- fontFamily?: string;
1085
- fontSize?: number;
1086
- };
1087
- lineColor: string;
1088
- backgroundColor: string;
1089
- }
1090
- interface TableElement extends BaseElement {
1091
- type: 'productTable' | 'variantsTable';
1092
- tableStyle: {
1093
- verticalPadding: string;
1094
- horizontalPadding: string;
1095
- borderCollapse?: string;
1096
- };
1097
- columns: Array<{
1098
- width: string;
1099
- maxWidth?: string;
1100
- }>;
1101
- rows: Array<{
1102
- isHeader?: boolean;
1103
- minHeight?: string;
1104
- cells: TableCell[];
1105
- }>;
1106
- }
1107
- interface TableCell {
1108
- content: string;
1109
- colSpan?: number;
1110
- rowSpan?: number;
1111
- parentColIndex?: number;
1112
- parentRowIndex?: number;
1113
- styles?: {
1114
- fontFamily?: string;
1115
- fontSize?: string;
1116
- fontWeight?: string;
1117
- fontStyle?: string;
1118
- textDecoration?: string;
1119
- color?: string;
1120
- backgroundColor?: string;
1121
- textAlign?: string;
1122
- alignItems?: string;
1123
- justifyContent?: string;
1124
- borders?: {
1125
- top?: BorderSide;
1126
- right?: BorderSide;
1127
- bottom?: BorderSide;
1128
- left?: BorderSide;
1129
- };
1130
- padding?: {
1131
- top?: string;
1132
- right?: string;
1133
- bottom?: string;
1134
- left?: string;
1135
- };
1136
- };
1137
- }
1138
- interface BorderSide {
1139
- width: string;
1140
- color: string;
1141
- style: 'dash' | 'solid' | 'dotted' | 'none';
1142
- }
1143
- interface RectElement extends BaseElement {
1144
- type: 'rect';
1145
- rx?: number;
1146
- ry?: number;
1147
- fill: string;
1148
- stroke?: StrokeStyle;
1149
- }
1150
- interface EllipseElement extends BaseElement {
1151
- type: 'ellipse' | 'circle';
1152
- cx: number;
1153
- cy: number;
1154
- rx: number;
1155
- ry: number;
1156
- fill: string;
1157
- stroke?: StrokeStyle;
1158
- }
1159
- interface LineElement extends BaseElement {
1160
- type: 'line';
1161
- x1: number;
1162
- y1: number;
1163
- x2: number;
1164
- y2: number;
1165
- stroke: StrokeStyle;
1166
- }
1167
- interface PathElement extends BaseElement {
1168
- type: 'path' | 'polyline';
1169
- d: string;
1170
- fill?: string;
1171
- stroke?: StrokeStyle;
1172
- originalBBox?: {
1173
- x: number;
1174
- y: number;
1175
- width: number;
1176
- height: number;
1177
- };
1178
- }
1179
- interface TemplateElement extends BaseElement {
1180
- type: 'template' | 'callout';
1181
- templateGuid?: string;
1182
- blockGuid?: string;
1183
- skuGuid?: string;
1184
- skuRef?: string;
1185
- productSheetGuid?: string;
1186
- isPlaceholder: boolean;
1187
- children?: DesignerElement[];
1188
- }
1189
- interface GroupElement extends BaseElement {
1190
- type: 'group';
1191
- children: DesignerElement[];
1192
- }
1193
- type DesignerElement = TextElement | ImageElement | QrCodeElement | BarcodeElement | TableElement | RectElement | EllipseElement | LineElement | PathElement | TemplateElement | GroupElement;
1194
-
1195
- declare class SvgJsonService {
1196
- private canvasService;
1197
- private openService;
1198
- private docService;
1199
- private appParamsService;
1200
- private imageElementService;
1201
- private qrCodeElementService;
1202
- private barcodeElementService;
1203
- private readonly SVG_NS;
1204
- private readonly XLINK_NS;
1205
- private readonly XHTML_NS;
1206
- /**
1207
- * Convertit une chaîne SVG ou un élément SVGSVGElement en objet JSON structuré
1208
- */
1209
- svgToJson(svgInput: string | SVGSVGElement): SolidDesignerDocument;
1210
- /**
1211
- * Extrait les propriétés globales du document depuis la balise <svg>
1212
- */
1213
- private extractDocumentSettings;
1214
- /**
1215
- * Extrait les définitions SVG (<defs>)
1216
- */
1217
- private extractDefs;
1218
- /**
1219
- * Parse récursivement un élément SVG en DesignerElement
1220
- */
1221
- parseElement(el: SVGElement): DesignerElement | null;
1222
- /**
1223
- * Extrait les propriétés communes de BaseElement
1224
- */
1225
- private extractBaseElementProps;
1226
- private normalizeElementType;
1227
- private parseTextElement;
1228
- private parseTextLinesFromElement;
1229
- private parseImageElement;
1230
- private parseQrCodeElement;
1231
- private parseBarcodeElement;
1232
- private parseTableElement;
1233
- private parseRectElement;
1234
- private parseEllipseElement;
1235
- private parseLineElement;
1236
- private parsePathElement;
1237
- private parseTemplateElement;
1238
- private parseGroupElement;
1239
- private extractStroke;
1240
- private shouldIgnoreElement;
1241
- /**
1242
- * Convertit un document JSON SolidDesigner en élément DOM SVGSVGElement
1243
- */
1244
- jsonToSvg(doc: SolidDesignerDocument): SVGSVGElement;
1245
- /**
1246
- * Convertit un document JSON en chaîne SVG XML complète
1247
- */
1248
- jsonToSvgString(doc: SolidDesignerDocument): string;
1249
- /**
1250
- * Reconstruit la balise <defs>
1251
- */
1252
- private buildDefs;
1253
- /**
1254
- * Construit un élément SVG DOM à partir de sa définition JSON
1255
- */
1256
- buildElement(elData: DesignerElement, sideOverride?: 'left' | 'right' | 'both'): SVGElement | null;
1257
- /**
1258
- * Applique les attributs et styles communs (id, name, side, visibility, locks, hide-if)
1259
- */
1260
- private applyBaseElementProps;
1261
- private buildTextElement;
1262
- private buildTextHtmlFromLines;
1263
- private buildImageElement;
1264
- private buildQrCodeElement;
1265
- private buildBarcodeElement;
1266
- private buildTableElement;
1267
- private buildRectElement;
1268
- private buildEllipseElement;
1269
- private buildLineElement;
1270
- private buildPathElement;
1271
- private buildTemplateElement;
1272
- private buildGroupElement;
1273
- private applyStroke;
1274
- /**
1275
- * Exporte le contenu actuel du canvas en document JSON
1276
- */
1277
- exportCurrentCanvasToJson(): SolidDesignerDocument | null;
1278
- /**
1279
- * Charge un document JSON directement dans le canvas du designer
1280
- */
1281
- loadJsonToCanvas(doc: SolidDesignerDocument): void;
1282
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SvgJsonService, never>;
1283
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<SvgJsonService>;
814
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppComponent, never>;
815
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppComponent, "solid-designer", never, { "token": { "alias": "token"; "required": false; }; "type": { "alias": "type"; "required": false; }; "guid": { "alias": "guid"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "language": { "alias": "language"; "required": false; }; "unit": { "alias": "unit"; "required": false; }; }, { "exitEditor": "exitEditor"; }, never, never, true, never>;
1284
816
  }
1285
817
 
1286
- export { AppParamsService, DocumentType, SOLID_DESIGNER_DOCUMENT_MODEL, AppComponent as SolidDesignerComponent, SvgJsonService };
1287
- export type { AppParams, BarcodeElement, BaseElement, BleedMargins, BorderSide, ConditionalHideRule, DesignerElement, DocumentDefs, DocumentMargins, DocumentMetadata, DocumentPage, DocumentSettings, DoublePageSettings, ElementBorder, ElementType, EllipseElement, GroupElement, ImageElement, LineElement, LinearGradientDef, PathElement, PatternDef, QrCodeElement, RadialGradientDef, RectElement, SolidDesignerDocument, StrokeStyle, TableCell, TableElement, TemplateElement, TextElement, TextElementLine, TextElementPart };
818
+ export { AppParamsService, AppComponent as SolidDesignerComponent };
819
+ export type { AppParams };