@solidpepper/solidpepper-soliddesigner 0.2.32 → 0.3.0
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/README.md +11 -3
- package/fesm2022/solidpepper-solidpepper-soliddesigner-iframe-modal.component-DRdUzn0b.mjs +152 -0
- package/fesm2022/solidpepper-solidpepper-soliddesigner-iframe-modal.component-DRdUzn0b.mjs.map +1 -0
- package/fesm2022/{solidpepper-solidpepper-soliddesigner-image-utils-1wqPuqMD.mjs → solidpepper-solidpepper-soliddesigner-image-utils-DvchiNMO.mjs} +2 -2
- package/fesm2022/{solidpepper-solidpepper-soliddesigner-image-utils-1wqPuqMD.mjs.map → solidpepper-solidpepper-soliddesigner-image-utils-DvchiNMO.mjs.map} +1 -1
- package/fesm2022/{solidpepper-solidpepper-soliddesigner-page-grid-modal.component-DLRf7wT0.mjs → solidpepper-solidpepper-soliddesigner-page-grid-modal.component-CzgWwiAm.mjs} +220 -10
- package/fesm2022/solidpepper-solidpepper-soliddesigner-page-grid-modal.component-CzgWwiAm.mjs.map +1 -0
- package/fesm2022/{solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-DFi3bVIe.mjs → solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-DbfRWWk5.mjs} +50792 -35444
- package/fesm2022/solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-DbfRWWk5.mjs.map +1 -0
- package/fesm2022/solidpepper-solidpepper-soliddesigner.mjs +2 -1
- package/fesm2022/solidpepper-solidpepper-soliddesigner.mjs.map +1 -1
- package/index.d.ts +762 -90
- package/package.json +6 -3
- package/fesm2022/solidpepper-solidpepper-soliddesigner-page-grid-modal.component-DLRf7wT0.mjs.map +0 -1
- package/fesm2022/solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-DFi3bVIe.mjs.map +0 -1
package/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { RendererFactory2, Injector, Type, OnInit, OnChanges, EventEmitter, ElementRef, SimpleChanges } from '@angular/core';
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { RendererFactory2, Injector, Type, OnInit, OnChanges, EventEmitter, ElementRef, SimpleChanges, OnDestroy } from '@angular/core';
|
|
3
|
+
import * as _solidpepper_solidpepper_icons from '@solidpepper/solidpepper-icons';
|
|
3
4
|
import { TranslateService } from '@ngx-translate/core';
|
|
4
5
|
import { HttpClient } from '@angular/common/http';
|
|
5
6
|
import * as rxjs from 'rxjs';
|
|
6
7
|
import { Observable } from 'rxjs';
|
|
7
|
-
import { PublicationTemplate, PublicationsTemplatesService } from '@solidpepper/solidpepper-service';
|
|
8
|
+
import { PublicationTemplate, DocumentComment, PublicationsTemplatesService, SettingsService, PublicationsService } from '@solidpepper/solidpepper-service';
|
|
8
9
|
import * as signalR from '@microsoft/signalr';
|
|
9
10
|
import { Router } from '@angular/router';
|
|
11
|
+
export * from '@solidpepper/solidpepper-component';
|
|
10
12
|
|
|
11
13
|
declare class TranslationService {
|
|
12
14
|
translate: TranslateService;
|
|
@@ -19,8 +21,8 @@ declare class TranslationService {
|
|
|
19
21
|
code: string;
|
|
20
22
|
text: string;
|
|
21
23
|
}[];
|
|
22
|
-
static ɵfac:
|
|
23
|
-
static ɵprov:
|
|
24
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TranslationService, never>;
|
|
25
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TranslationService>;
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
declare enum DocumentType {
|
|
@@ -29,7 +31,9 @@ declare enum DocumentType {
|
|
|
29
31
|
MARKETING = "marketing",
|
|
30
32
|
PRODUCTBLOCK = "productblock",
|
|
31
33
|
DOCUMENT = "document",
|
|
32
|
-
|
|
34
|
+
YOUBOOKY = "youbooky",
|
|
35
|
+
TEMPLATE = "template",
|
|
36
|
+
CALLOUT = "callout"
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
interface AppParams {
|
|
@@ -43,10 +47,66 @@ interface AppParams {
|
|
|
43
47
|
documentData?: any[];
|
|
44
48
|
documentName?: string;
|
|
45
49
|
productSheetAssetGuid?: string | null;
|
|
50
|
+
productSheetGuid?: string | null;
|
|
51
|
+
documentPublicationGuid?: string | null;
|
|
46
52
|
}
|
|
47
53
|
declare class AppParamsService {
|
|
48
|
-
readonly params:
|
|
49
|
-
readonly pageGuid:
|
|
54
|
+
readonly params: _angular_core.WritableSignal<AppParams>;
|
|
55
|
+
readonly pageGuid: _angular_core.WritableSignal<string>;
|
|
56
|
+
readonly commentsModeActive: _angular_core.WritableSignal<boolean>;
|
|
57
|
+
readonly isWaitingForCanvasClick: _angular_core.WritableSignal<boolean>;
|
|
58
|
+
readonly activeCommentGuid: _angular_core.WritableSignal<string | null>;
|
|
59
|
+
readonly commentsPanelCollapsed: _angular_core.WritableSignal<boolean>;
|
|
60
|
+
readonly propertiesPanelCollapsed: _angular_core.WritableSignal<boolean>;
|
|
61
|
+
readonly showCanvasPropertiesPanel: _angular_core.WritableSignal<boolean>;
|
|
62
|
+
readonly showPositionGeometryPanel: _angular_core.WritableSignal<boolean>;
|
|
63
|
+
readonly showAdvancedPropertiesPanel: _angular_core.WritableSignal<boolean>;
|
|
64
|
+
readonly showVariablePropertiesPanel: _angular_core.WritableSignal<boolean>;
|
|
65
|
+
readonly globalPanelCollapsed: _angular_core.WritableSignal<boolean>;
|
|
66
|
+
readonly layersWindowOpen: _angular_core.WritableSignal<boolean>;
|
|
67
|
+
readonly modelSelectorOpen: _angular_core.WritableSignal<boolean>;
|
|
68
|
+
readonly modelSelectorMode: _angular_core.WritableSignal<"template" | "callout">;
|
|
69
|
+
readonly modelSelectorSelectedGuid: _angular_core.WritableSignal<string | null>;
|
|
70
|
+
readonly modelSelectorOnSelect: _angular_core.WritableSignal<((model: any) => void) | null>;
|
|
71
|
+
readonly productSelectorOpen: _angular_core.WritableSignal<boolean>;
|
|
72
|
+
readonly productSelectorOnSelect: _angular_core.WritableSignal<((product: any) => void) | null>;
|
|
73
|
+
readonly attributeSelectorOpen: _angular_core.WritableSignal<boolean>;
|
|
74
|
+
readonly attributeSelectorTitle: _angular_core.WritableSignal<string>;
|
|
75
|
+
readonly attributeSelectorOnSelect: _angular_core.WritableSignal<((attribute: {
|
|
76
|
+
key: string;
|
|
77
|
+
label: string;
|
|
78
|
+
}) => void) | null>;
|
|
79
|
+
readonly attributeSelectorAutoClose: _angular_core.WritableSignal<boolean>;
|
|
80
|
+
readonly attributeSelectorPosition: _angular_core.WritableSignal<{
|
|
81
|
+
x: number;
|
|
82
|
+
y: number;
|
|
83
|
+
} | null>;
|
|
84
|
+
readonly draftComment: _angular_core.WritableSignal<{
|
|
85
|
+
pageGuid: string;
|
|
86
|
+
x: number;
|
|
87
|
+
y: number;
|
|
88
|
+
} | null>;
|
|
89
|
+
readonly commentsList: _angular_core.WritableSignal<DocumentComment[]>;
|
|
90
|
+
readonly activeCommentTool: _angular_core.WritableSignal<"point" | "text" | "drawing" | "shape-rect" | "shape-line" | "highlight">;
|
|
91
|
+
readonly commentColor: _angular_core.WritableSignal<string>;
|
|
92
|
+
readonly draftDrawing: _angular_core.WritableSignal<{
|
|
93
|
+
pageGuid: string;
|
|
94
|
+
type: string;
|
|
95
|
+
pathData: string;
|
|
96
|
+
color: string;
|
|
97
|
+
} | null>;
|
|
98
|
+
openModelSelector(mode: 'template' | 'callout', selectedGuid: string | null, onSelect: (model: any) => void): void;
|
|
99
|
+
closeModelSelector(): void;
|
|
100
|
+
openProductSelector(onSelect: (product: any) => void): void;
|
|
101
|
+
closeProductSelector(): void;
|
|
102
|
+
openAttributeSelector(onSelect: (attribute: {
|
|
103
|
+
key: string;
|
|
104
|
+
label: string;
|
|
105
|
+
}) => void, title?: string, autoClose?: boolean, position?: {
|
|
106
|
+
x: number;
|
|
107
|
+
y: number;
|
|
108
|
+
} | null): void;
|
|
109
|
+
closeAttributeSelector(): void;
|
|
50
110
|
setParams(params: Partial<AppParams>): void;
|
|
51
111
|
updateTemplateName(newName: string): void;
|
|
52
112
|
updateDocumentName(newName: string): void;
|
|
@@ -58,8 +118,10 @@ declare class AppParamsService {
|
|
|
58
118
|
get templateData(): PublicationTemplate | undefined;
|
|
59
119
|
get documentData(): any[] | undefined;
|
|
60
120
|
get productSheetAssetGuid(): string | null | undefined;
|
|
61
|
-
|
|
62
|
-
|
|
121
|
+
get productSheetGuid(): string | null | undefined;
|
|
122
|
+
get documentPublicationGuid(): string | null | undefined;
|
|
123
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppParamsService, never>;
|
|
124
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppParamsService>;
|
|
63
125
|
}
|
|
64
126
|
|
|
65
127
|
declare class FontApiService {
|
|
@@ -72,8 +134,8 @@ declare class FontApiService {
|
|
|
72
134
|
updateFont(font: any): Observable<any>;
|
|
73
135
|
deleteFont(fontId: number | string): Observable<any>;
|
|
74
136
|
getFontAsBase64(fontName: string, fontUrl: string, fontFilename: string): Observable<any>;
|
|
75
|
-
static ɵfac:
|
|
76
|
-
static ɵprov:
|
|
137
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FontApiService, never>;
|
|
138
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FontApiService>;
|
|
77
139
|
}
|
|
78
140
|
|
|
79
141
|
interface FontDefinition {
|
|
@@ -88,8 +150,8 @@ interface FontDefinition {
|
|
|
88
150
|
}
|
|
89
151
|
declare class FontService {
|
|
90
152
|
private fontApiService;
|
|
91
|
-
fontsNames:
|
|
92
|
-
availableFonts:
|
|
153
|
+
fontsNames: _angular_core.WritableSignal<string[]>;
|
|
154
|
+
availableFonts: _angular_core.WritableSignal<{
|
|
93
155
|
[key: string]: FontDefinition;
|
|
94
156
|
}>;
|
|
95
157
|
private fontsImported;
|
|
@@ -109,8 +171,8 @@ declare class FontService {
|
|
|
109
171
|
private injectDocumentFonts;
|
|
110
172
|
isGoogleFont(fontName: string): boolean;
|
|
111
173
|
getCustomFontUrlFace(fontName: string): string | null;
|
|
112
|
-
static ɵfac:
|
|
113
|
-
static ɵprov:
|
|
174
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FontService, never>;
|
|
175
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FontService>;
|
|
114
176
|
}
|
|
115
177
|
|
|
116
178
|
type NotificationType = 'info' | 'success' | 'warning' | 'error';
|
|
@@ -123,7 +185,7 @@ interface Notification {
|
|
|
123
185
|
declare class NotificationService {
|
|
124
186
|
private http;
|
|
125
187
|
private _settingsService;
|
|
126
|
-
notifications:
|
|
188
|
+
notifications: _angular_core.WritableSignal<Notification[]>;
|
|
127
189
|
private quantity;
|
|
128
190
|
show(message: string, type?: NotificationType, duration?: number): void;
|
|
129
191
|
success(message: string, duration?: number): void;
|
|
@@ -134,8 +196,8 @@ declare class NotificationService {
|
|
|
134
196
|
sendUpdate(message: number): void;
|
|
135
197
|
getUpdate(): Observable<any>;
|
|
136
198
|
getNotifications(start?: any, limit?: any): Observable<Object>;
|
|
137
|
-
static ɵfac:
|
|
138
|
-
static ɵprov:
|
|
199
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NotificationService, never>;
|
|
200
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NotificationService>;
|
|
139
201
|
}
|
|
140
202
|
|
|
141
203
|
declare class WebsocketService {
|
|
@@ -160,8 +222,8 @@ declare class WebsocketService {
|
|
|
160
222
|
listeners(): void;
|
|
161
223
|
listenersOnClose(): void;
|
|
162
224
|
disconnect(): void;
|
|
163
|
-
static ɵfac:
|
|
164
|
-
static ɵprov:
|
|
225
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WebsocketService, never>;
|
|
226
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<WebsocketService>;
|
|
165
227
|
}
|
|
166
228
|
|
|
167
229
|
declare class AssetsService {
|
|
@@ -173,6 +235,7 @@ declare class AssetsService {
|
|
|
173
235
|
getSVGTemplate(guid: string): Observable<PublicationTemplate>;
|
|
174
236
|
getTemplateBackgroundsList(templateGuid: string): Observable<any>;
|
|
175
237
|
getTemplateProductBlocks(templateGuid: string): Observable<PublicationTemplate[]>;
|
|
238
|
+
getTemplateCallouts(templateGuid: string): Observable<PublicationTemplate[]>;
|
|
176
239
|
getSVGDocumentPages(guid: string): Observable<any>;
|
|
177
240
|
getTemplateDimensions(): Observable<any>;
|
|
178
241
|
saveDocument(type: string, formData: FormData): Observable<any>;
|
|
@@ -183,36 +246,40 @@ declare class AssetsService {
|
|
|
183
246
|
deleteDocumentPage(assetGuid: string, pageGuid: string): Observable<any>;
|
|
184
247
|
updateTemplateField(fieldName: string, fieldValue: string): Observable<any>;
|
|
185
248
|
getTemplates(): Observable<any[]>;
|
|
186
|
-
publishYoubooky(): Observable<any>;
|
|
187
249
|
checkPdfExistence(): Observable<any>;
|
|
188
|
-
generatePdf(highDefinition?: boolean, imageColorProfile?: string, bleedMargin?: boolean, cuttingLines?: boolean, bleedMarginCustom?: boolean, bleedMarginValue?: number): Observable<any>;
|
|
189
|
-
|
|
250
|
+
generatePdf(highDefinition?: boolean, imageColorProfile?: string, bleedMargin?: boolean, cuttingLines?: boolean, bleedMarginCustom?: boolean, bleedMarginValue?: number, compressPdf?: boolean): Observable<any>;
|
|
251
|
+
getFoldersWithParent(parentGuid?: string, folderType?: string): Observable<any[]>;
|
|
252
|
+
getAssetsTemplates(folderGuid?: string): Observable<any[]>;
|
|
253
|
+
getAssetsCallouts(folderGuid?: string): Observable<any[]>;
|
|
190
254
|
getTemplateGuidFromAssetGuid(assetGuid: string): Observable<string | null>;
|
|
191
|
-
static ɵfac:
|
|
192
|
-
static ɵprov:
|
|
255
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AssetsService, never>;
|
|
256
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AssetsService>;
|
|
193
257
|
}
|
|
194
258
|
|
|
195
259
|
declare class CanvasService {
|
|
196
260
|
private _svgElement;
|
|
197
261
|
private _wrapperElement;
|
|
262
|
+
private _transitionTimeout;
|
|
198
263
|
private readonly _transform;
|
|
199
|
-
readonly zoomLevel:
|
|
200
|
-
readonly panOffset:
|
|
264
|
+
readonly zoomLevel: _angular_core.WritableSignal<number>;
|
|
265
|
+
readonly panOffset: _angular_core.WritableSignal<{
|
|
201
266
|
x: number;
|
|
202
267
|
y: number;
|
|
203
268
|
}>;
|
|
204
|
-
readonly baseScale:
|
|
205
|
-
readonly isReady:
|
|
206
|
-
readonly currentContext:
|
|
207
|
-
readonly modifiedPulse:
|
|
208
|
-
readonly isSilent:
|
|
209
|
-
readonly versionUpgraded:
|
|
269
|
+
readonly baseScale: _angular_core.WritableSignal<number>;
|
|
270
|
+
readonly isReady: _angular_core.WritableSignal<boolean>;
|
|
271
|
+
readonly currentContext: _angular_core.WritableSignal<SVGSVGElement | SVGGElement | null>;
|
|
272
|
+
readonly modifiedPulse: _angular_core.WritableSignal<number>;
|
|
273
|
+
readonly isSilent: _angular_core.WritableSignal<boolean>;
|
|
274
|
+
readonly versionUpgraded: _angular_core.WritableSignal<boolean>;
|
|
210
275
|
private disabledElems;
|
|
211
276
|
private readonly docService;
|
|
212
277
|
private readonly eventsService;
|
|
213
278
|
private readonly selectionStore;
|
|
214
279
|
private readonly colorService;
|
|
280
|
+
private readonly appParams;
|
|
215
281
|
private injector;
|
|
282
|
+
private get historyService();
|
|
216
283
|
constructor();
|
|
217
284
|
get svgElement(): SVGSVGElement;
|
|
218
285
|
get wrapperElement(): HTMLElement;
|
|
@@ -266,6 +333,10 @@ declare class CanvasService {
|
|
|
266
333
|
* Pan the canvas
|
|
267
334
|
*/
|
|
268
335
|
pan(dx: number, dy: number): void;
|
|
336
|
+
/**
|
|
337
|
+
* Smoothly shift the canvas offset with CSS animation (used during panel open/close)
|
|
338
|
+
*/
|
|
339
|
+
smoothShift(dx: number, dy?: number): void;
|
|
269
340
|
/**
|
|
270
341
|
* Apply transform to the SVG element
|
|
271
342
|
*/
|
|
@@ -300,6 +371,10 @@ declare class CanvasService {
|
|
|
300
371
|
* Moving current content into a left dataside group and cloning it into a right dataside group.
|
|
301
372
|
*/
|
|
302
373
|
migrateLegacyToDoublePage(): void;
|
|
374
|
+
/**
|
|
375
|
+
* Updates visibility and pointer-events for double-page side groups
|
|
376
|
+
*/
|
|
377
|
+
updateSideVisibility(): void;
|
|
303
378
|
/**
|
|
304
379
|
* Delete the currently selected elements
|
|
305
380
|
*/
|
|
@@ -356,8 +431,8 @@ declare class CanvasService {
|
|
|
356
431
|
* Cached based on modifiedPulse for performance.
|
|
357
432
|
*/
|
|
358
433
|
getMostUsedColors(limit?: number): string[];
|
|
359
|
-
static ɵfac:
|
|
360
|
-
static ɵprov:
|
|
434
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CanvasService, never>;
|
|
435
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CanvasService>;
|
|
361
436
|
}
|
|
362
437
|
|
|
363
438
|
interface EditorEvent {
|
|
@@ -385,8 +460,8 @@ declare class EventsService {
|
|
|
385
460
|
private handlePaste;
|
|
386
461
|
private handleKeyDown;
|
|
387
462
|
private handleKeyUp;
|
|
388
|
-
static ɵfac:
|
|
389
|
-
static ɵprov:
|
|
463
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EventsService, never>;
|
|
464
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<EventsService>;
|
|
390
465
|
}
|
|
391
466
|
|
|
392
467
|
interface DocumentProperties {
|
|
@@ -408,23 +483,23 @@ interface DocumentProperties {
|
|
|
408
483
|
}
|
|
409
484
|
declare class DocumentService {
|
|
410
485
|
private appParams;
|
|
411
|
-
readonly properties:
|
|
486
|
+
readonly properties: _angular_core.WritableSignal<DocumentProperties>;
|
|
412
487
|
private getInitialUnit;
|
|
413
488
|
constructor();
|
|
414
|
-
get dimensions():
|
|
489
|
+
get dimensions(): _angular_core.WritableSignal<DocumentProperties>;
|
|
415
490
|
updateDimensions(width: number, height: number): void;
|
|
416
491
|
updateUnit(unit: DocumentProperties['unit']): void;
|
|
417
492
|
updateProperty<K extends keyof DocumentProperties>(key: K, value: DocumentProperties[K]): void;
|
|
418
|
-
static ɵfac:
|
|
419
|
-
static ɵprov:
|
|
493
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DocumentService, never>;
|
|
494
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DocumentService>;
|
|
420
495
|
}
|
|
421
496
|
|
|
422
497
|
declare class SelectionStore {
|
|
423
|
-
readonly selectedElements:
|
|
424
|
-
readonly updated:
|
|
425
|
-
readonly count:
|
|
426
|
-
readonly isEmpty:
|
|
427
|
-
readonly first:
|
|
498
|
+
readonly selectedElements: _angular_core.WritableSignal<SVGElement[]>;
|
|
499
|
+
readonly updated: _angular_core.WritableSignal<number>;
|
|
500
|
+
readonly count: _angular_core.Signal<number>;
|
|
501
|
+
readonly isEmpty: _angular_core.Signal<boolean>;
|
|
502
|
+
readonly first: _angular_core.Signal<SVGElement>;
|
|
428
503
|
select(elements: SVGElement[]): void;
|
|
429
504
|
add(element: SVGElement): void;
|
|
430
505
|
toggle(element: SVGElement): void;
|
|
@@ -435,8 +510,8 @@ declare class SelectionStore {
|
|
|
435
510
|
* but the selection reference itself remains the same.
|
|
436
511
|
*/
|
|
437
512
|
triggerUpdate(): void;
|
|
438
|
-
static ɵfac:
|
|
439
|
-
static ɵprov:
|
|
513
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectionStore, never>;
|
|
514
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SelectionStore>;
|
|
440
515
|
}
|
|
441
516
|
|
|
442
517
|
interface HSLA {
|
|
@@ -508,8 +583,8 @@ declare class ColorService {
|
|
|
508
583
|
parseHslString(str: string): RGBA;
|
|
509
584
|
parseHsvString(str: string): RGBA;
|
|
510
585
|
parseCmykString(str: string): RGBA;
|
|
511
|
-
static ɵfac:
|
|
512
|
-
static ɵprov:
|
|
586
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColorService, never>;
|
|
587
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ColorService>;
|
|
513
588
|
}
|
|
514
589
|
|
|
515
590
|
interface TableSize {
|
|
@@ -519,8 +594,9 @@ interface TableSize {
|
|
|
519
594
|
declare class TableElementService {
|
|
520
595
|
private readonly canvasService;
|
|
521
596
|
private colorService;
|
|
597
|
+
private readonly eventsService;
|
|
522
598
|
private readonly renderer;
|
|
523
|
-
constructor(rendererFactory: RendererFactory2, canvasService: CanvasService, colorService: ColorService);
|
|
599
|
+
constructor(rendererFactory: RendererFactory2, canvasService: CanvasService, colorService: ColorService, eventsService: EventsService);
|
|
524
600
|
/**
|
|
525
601
|
* Create a product table foreignObject element on the canvas.
|
|
526
602
|
*/
|
|
@@ -559,6 +635,7 @@ declare class TableElementService {
|
|
|
559
635
|
getTableSize(container: Element): TableSize;
|
|
560
636
|
setTableSize(container: Element, targetRows: number, targetCols: number): void;
|
|
561
637
|
setEditInput(cell: HTMLElement): void;
|
|
638
|
+
private handleCellInsertParagraph;
|
|
562
639
|
removeEditInput(cell: HTMLElement): void;
|
|
563
640
|
selectCells(container: Element, cells: Element[]): void;
|
|
564
641
|
deselectAllCells(container: Element): void;
|
|
@@ -576,8 +653,8 @@ declare class TableElementService {
|
|
|
576
653
|
/** Get all elements in a given column (across all rows). */
|
|
577
654
|
_getColumnByIndex(table: Element, colIndex: number): Element[];
|
|
578
655
|
exportVariantsTableSettings(tableElement: HTMLElement): any;
|
|
579
|
-
static ɵfac:
|
|
580
|
-
static ɵprov:
|
|
656
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableElementService, never>;
|
|
657
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TableElementService>;
|
|
581
658
|
}
|
|
582
659
|
|
|
583
660
|
declare enum LoadingError {
|
|
@@ -587,12 +664,12 @@ declare enum LoadingError {
|
|
|
587
664
|
TOKEN = "LOADER.ERRORS.TOKEN"
|
|
588
665
|
}
|
|
589
666
|
declare class LoadingService {
|
|
590
|
-
readonly isLoading:
|
|
591
|
-
readonly hasError:
|
|
592
|
-
readonly errorKey:
|
|
593
|
-
readonly isCanvasLoading:
|
|
594
|
-
readonly canvasHasError:
|
|
595
|
-
readonly canvasErrorKey:
|
|
667
|
+
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
668
|
+
readonly hasError: _angular_core.WritableSignal<boolean>;
|
|
669
|
+
readonly errorKey: _angular_core.WritableSignal<LoadingError>;
|
|
670
|
+
readonly isCanvasLoading: _angular_core.WritableSignal<boolean>;
|
|
671
|
+
readonly canvasHasError: _angular_core.WritableSignal<boolean>;
|
|
672
|
+
readonly canvasErrorKey: _angular_core.WritableSignal<LoadingError>;
|
|
596
673
|
showLoader(): void;
|
|
597
674
|
hideLoader(): void;
|
|
598
675
|
showError(error: LoadingError): void;
|
|
@@ -600,8 +677,8 @@ declare class LoadingService {
|
|
|
600
677
|
hideCanvasLoader(): void;
|
|
601
678
|
showCanvasError(error: LoadingError): void;
|
|
602
679
|
reset(): void;
|
|
603
|
-
static ɵfac:
|
|
604
|
-
static ɵprov:
|
|
680
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LoadingService, never>;
|
|
681
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<LoadingService>;
|
|
605
682
|
}
|
|
606
683
|
|
|
607
684
|
declare class SaveService {
|
|
@@ -614,8 +691,8 @@ declare class SaveService {
|
|
|
614
691
|
private fontService;
|
|
615
692
|
private tableService;
|
|
616
693
|
private loadingService;
|
|
617
|
-
isDirty:
|
|
618
|
-
saveSuccessPulse:
|
|
694
|
+
isDirty: _angular_core.WritableSignal<boolean>;
|
|
695
|
+
saveSuccessPulse: _angular_core.WritableSignal<{
|
|
619
696
|
guid: string;
|
|
620
697
|
count: number;
|
|
621
698
|
}>;
|
|
@@ -631,8 +708,8 @@ declare class SaveService {
|
|
|
631
708
|
* Trigger a download/upload of the current SVG
|
|
632
709
|
*/
|
|
633
710
|
save(): Promise<void>;
|
|
634
|
-
static ɵfac:
|
|
635
|
-
static ɵprov:
|
|
711
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SaveService, never>;
|
|
712
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SaveService>;
|
|
636
713
|
}
|
|
637
714
|
|
|
638
715
|
declare class OpenService {
|
|
@@ -661,8 +738,8 @@ declare class OpenService {
|
|
|
661
738
|
* Import an SVG element (Delegate to processImportedSvg if root)
|
|
662
739
|
*/
|
|
663
740
|
importSvgElement(svgEl: SVGElement): void;
|
|
664
|
-
static ɵfac:
|
|
665
|
-
static ɵprov:
|
|
741
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OpenService, never>;
|
|
742
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<OpenService>;
|
|
666
743
|
}
|
|
667
744
|
|
|
668
745
|
declare abstract class Command {
|
|
@@ -692,7 +769,7 @@ declare class HistoryService {
|
|
|
692
769
|
private debounceTimer;
|
|
693
770
|
private complexStateCache;
|
|
694
771
|
private accumulatedChanges;
|
|
695
|
-
readonly historyChanged:
|
|
772
|
+
readonly historyChanged: _angular_core.WritableSignal<number>;
|
|
696
773
|
constructor();
|
|
697
774
|
private initKeyboardShortcuts;
|
|
698
775
|
canUndo(): boolean;
|
|
@@ -717,8 +794,8 @@ declare class HistoryService {
|
|
|
717
794
|
private recordChanges;
|
|
718
795
|
private scheduleFlush;
|
|
719
796
|
private flushChanges;
|
|
720
|
-
static ɵfac:
|
|
721
|
-
static ɵprov:
|
|
797
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HistoryService, never>;
|
|
798
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<HistoryService>;
|
|
722
799
|
}
|
|
723
800
|
|
|
724
801
|
declare class BackgroundPreviewService {
|
|
@@ -727,10 +804,12 @@ declare class BackgroundPreviewService {
|
|
|
727
804
|
private backgroundsSignal;
|
|
728
805
|
private activeBackgroundIndexSignal;
|
|
729
806
|
private isPreviewHiddenSignal;
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
807
|
+
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
808
|
+
private lastLoadedKey;
|
|
809
|
+
backgrounds: _angular_core.Signal<PublicationTemplate[]>;
|
|
810
|
+
activeBackgroundIndex: _angular_core.Signal<number>;
|
|
811
|
+
isPreviewHidden: _angular_core.Signal<boolean>;
|
|
812
|
+
activeBackground: _angular_core.Signal<PublicationTemplate | null>;
|
|
734
813
|
constructor(assetsService: AssetsService, appParams: AppParamsService);
|
|
735
814
|
/**
|
|
736
815
|
* Loads the background templates and fetches their SVG contents
|
|
@@ -738,8 +817,8 @@ declare class BackgroundPreviewService {
|
|
|
738
817
|
loadBackgrounds(): Promise<void>;
|
|
739
818
|
setActiveBackground(index: number): void;
|
|
740
819
|
setPreviewHidden(hidden: boolean): void;
|
|
741
|
-
static ɵfac:
|
|
742
|
-
static ɵprov:
|
|
820
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BackgroundPreviewService, never>;
|
|
821
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<BackgroundPreviewService>;
|
|
743
822
|
}
|
|
744
823
|
|
|
745
824
|
interface ModalOptions {
|
|
@@ -751,8 +830,8 @@ declare class ModalService {
|
|
|
751
830
|
modalState$: rxjs.Observable<ModalOptions | null>;
|
|
752
831
|
open(component: Type<any>, data?: any): void;
|
|
753
832
|
close(): void;
|
|
754
|
-
static ɵfac:
|
|
755
|
-
static ɵprov:
|
|
833
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ModalService, never>;
|
|
834
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ModalService>;
|
|
756
835
|
}
|
|
757
836
|
|
|
758
837
|
interface EditorConfig {
|
|
@@ -764,19 +843,19 @@ interface EditorConfig {
|
|
|
764
843
|
theme: 'light' | 'dark';
|
|
765
844
|
}
|
|
766
845
|
declare class ConfigService {
|
|
767
|
-
readonly config:
|
|
846
|
+
readonly config: _angular_core.WritableSignal<EditorConfig>;
|
|
768
847
|
updateConfig(partialConfig: Partial<EditorConfig>): void;
|
|
769
848
|
toggleGrid(): void;
|
|
770
849
|
toggleRulers(): void;
|
|
771
850
|
toggleWireframe(): void;
|
|
772
851
|
toggleMargins(): void;
|
|
773
|
-
static ɵfac:
|
|
774
|
-
static ɵprov:
|
|
852
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfigService, never>;
|
|
853
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ConfigService>;
|
|
775
854
|
}
|
|
776
855
|
|
|
777
856
|
declare class AppComponent implements OnInit, OnChanges {
|
|
778
857
|
private translationService;
|
|
779
|
-
|
|
858
|
+
appParamsService: AppParamsService;
|
|
780
859
|
private assetsService;
|
|
781
860
|
private openService;
|
|
782
861
|
private canvasService;
|
|
@@ -790,24 +869,617 @@ declare class AppComponent implements OnInit, OnChanges {
|
|
|
790
869
|
private saveService;
|
|
791
870
|
loadingService: LoadingService;
|
|
792
871
|
private websocketService;
|
|
872
|
+
private libSettingsService;
|
|
873
|
+
private publicationsService;
|
|
874
|
+
readonly spIconLayers: _solidpepper_solidpepper_icons.SpIcon;
|
|
875
|
+
readonly spIconLayout: _solidpepper_solidpepper_icons.SpIcon;
|
|
876
|
+
readonly spIconCallout: _solidpepper_solidpepper_icons.SpIcon;
|
|
877
|
+
readonly spIconLink: _solidpepper_solidpepper_icons.SpIcon;
|
|
878
|
+
readonly spIconZap: _solidpepper_solidpepper_icons.SpIcon;
|
|
793
879
|
token?: string;
|
|
794
|
-
type: DocumentType.BACKGROUND | DocumentType.COVERPAGE | DocumentType.MARKETING | DocumentType.PRODUCTBLOCK | DocumentType.DOCUMENT | DocumentType.TEMPLATE;
|
|
880
|
+
type: DocumentType.BACKGROUND | DocumentType.COVERPAGE | DocumentType.MARKETING | DocumentType.PRODUCTBLOCK | DocumentType.DOCUMENT | DocumentType.YOUBOOKY | DocumentType.TEMPLATE | DocumentType.CALLOUT | string;
|
|
795
881
|
guid?: string;
|
|
796
882
|
apiUrl: string;
|
|
797
883
|
language: string;
|
|
798
884
|
unit?: string;
|
|
885
|
+
pageNumber?: number;
|
|
886
|
+
pageGuid?: string;
|
|
799
887
|
exitEditor: EventEmitter<void>;
|
|
800
|
-
isSafari:
|
|
888
|
+
isSafari: _angular_core.WritableSignal<boolean>;
|
|
801
889
|
isInitialized: boolean;
|
|
802
|
-
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);
|
|
890
|
+
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);
|
|
803
891
|
ngOnInit(): void;
|
|
804
892
|
ngOnChanges(changes: SimpleChanges): void;
|
|
805
893
|
private tryInitialize;
|
|
806
894
|
private initShortcutListeners;
|
|
895
|
+
onExitEditor(): void;
|
|
896
|
+
private resizeTimeout;
|
|
897
|
+
onWindowResize(): void;
|
|
807
898
|
private checkBrowser;
|
|
808
|
-
static ɵfac:
|
|
809
|
-
static ɵcmp:
|
|
899
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppComponent, never>;
|
|
900
|
+
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>;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Structure principale du document SolidDesigner en JSON
|
|
905
|
+
*/
|
|
906
|
+
interface SolidDesignerDocument {
|
|
907
|
+
spVersion: string;
|
|
908
|
+
metadata?: DocumentMetadata;
|
|
909
|
+
document: DocumentSettings;
|
|
910
|
+
defs?: DocumentDefs;
|
|
911
|
+
pages: DocumentPage[];
|
|
912
|
+
}
|
|
913
|
+
interface DocumentMetadata {
|
|
914
|
+
title?: string;
|
|
915
|
+
documentType: DocumentType | string;
|
|
916
|
+
createdAt?: string;
|
|
917
|
+
updatedAt?: string;
|
|
918
|
+
author?: string;
|
|
919
|
+
customData?: Record<string, any>;
|
|
920
|
+
}
|
|
921
|
+
interface DocumentSettings {
|
|
922
|
+
width: number;
|
|
923
|
+
height: number;
|
|
924
|
+
unit: 'mm' | 'cm' | 'px' | 'in';
|
|
925
|
+
viewBox?: string;
|
|
926
|
+
backgroundColor?: string;
|
|
927
|
+
margins: DocumentMargins;
|
|
928
|
+
doublePage: DoublePageSettings;
|
|
929
|
+
}
|
|
930
|
+
interface DocumentMargins {
|
|
931
|
+
top: number;
|
|
932
|
+
bottom: number;
|
|
933
|
+
left: number;
|
|
934
|
+
right: number;
|
|
935
|
+
vertical?: number;
|
|
936
|
+
horizontal?: number;
|
|
937
|
+
headerHeight?: number;
|
|
938
|
+
footerHeight?: number;
|
|
939
|
+
bleed: BleedMargins;
|
|
940
|
+
}
|
|
941
|
+
interface BleedMargins {
|
|
942
|
+
top: number;
|
|
943
|
+
bottom: number;
|
|
944
|
+
left: number;
|
|
945
|
+
right: number;
|
|
946
|
+
}
|
|
947
|
+
interface DoublePageSettings {
|
|
948
|
+
enabled: boolean;
|
|
949
|
+
activeSide?: 'left' | 'right';
|
|
950
|
+
}
|
|
951
|
+
interface DocumentDefs {
|
|
952
|
+
linearGradients?: LinearGradientDef[];
|
|
953
|
+
radialGradients?: RadialGradientDef[];
|
|
954
|
+
patterns?: PatternDef[];
|
|
955
|
+
rawDefs?: string[];
|
|
956
|
+
}
|
|
957
|
+
interface LinearGradientDef {
|
|
958
|
+
id: string;
|
|
959
|
+
x1?: string;
|
|
960
|
+
y1?: string;
|
|
961
|
+
x2?: string;
|
|
962
|
+
y2?: string;
|
|
963
|
+
gradientTransform?: string;
|
|
964
|
+
stops: Array<{
|
|
965
|
+
offset: string;
|
|
966
|
+
color: string;
|
|
967
|
+
opacity?: number;
|
|
968
|
+
}>;
|
|
969
|
+
}
|
|
970
|
+
interface RadialGradientDef {
|
|
971
|
+
id: string;
|
|
972
|
+
cx?: string;
|
|
973
|
+
cy?: string;
|
|
974
|
+
r?: string;
|
|
975
|
+
gradientTransform?: string;
|
|
976
|
+
stops: Array<{
|
|
977
|
+
offset: string;
|
|
978
|
+
color: string;
|
|
979
|
+
opacity?: number;
|
|
980
|
+
}>;
|
|
981
|
+
}
|
|
982
|
+
interface PatternDef {
|
|
983
|
+
id: string;
|
|
984
|
+
x?: string;
|
|
985
|
+
y?: string;
|
|
986
|
+
width: number | string;
|
|
987
|
+
height: number | string;
|
|
988
|
+
patternUnits?: string;
|
|
989
|
+
patternContentHtml: string;
|
|
990
|
+
}
|
|
991
|
+
interface DocumentPage {
|
|
992
|
+
id: string;
|
|
993
|
+
side: 'left' | 'right' | 'single';
|
|
994
|
+
elements: DesignerElement[];
|
|
995
|
+
}
|
|
996
|
+
interface ConditionalHideRule {
|
|
997
|
+
enabled: boolean;
|
|
998
|
+
attribute?: string;
|
|
999
|
+
operator?: 'is_null' | 'is_not_null' | 'equals' | 'not_equals' | 'variant_exists' | 'variant_not_exists' | string;
|
|
1000
|
+
value?: string;
|
|
1001
|
+
variant?: number;
|
|
1002
|
+
}
|
|
1003
|
+
interface StrokeStyle {
|
|
1004
|
+
color: string;
|
|
1005
|
+
width: number;
|
|
1006
|
+
style?: 'solid' | 'dashed' | 'dotted' | string;
|
|
1007
|
+
dashArray?: string;
|
|
1008
|
+
lineCap?: 'butt' | 'round' | 'square' | string;
|
|
1009
|
+
lineJoin?: 'miter' | 'round' | 'bevel' | string;
|
|
1010
|
+
}
|
|
1011
|
+
interface ElementBorder {
|
|
1012
|
+
width?: string | number;
|
|
1013
|
+
color?: string;
|
|
1014
|
+
style?: string;
|
|
1015
|
+
radius?: number;
|
|
1016
|
+
}
|
|
1017
|
+
interface BaseElement {
|
|
1018
|
+
id: string;
|
|
1019
|
+
name?: string;
|
|
1020
|
+
type: ElementType;
|
|
1021
|
+
x: number;
|
|
1022
|
+
y: number;
|
|
1023
|
+
width?: number;
|
|
1024
|
+
height?: number;
|
|
1025
|
+
rotation?: number;
|
|
1026
|
+
opacity?: number;
|
|
1027
|
+
side?: 'left' | 'right';
|
|
1028
|
+
conditionalHide?: ConditionalHideRule;
|
|
1029
|
+
customDataAttributes?: Record<string, string>;
|
|
1030
|
+
}
|
|
1031
|
+
type ElementType = 'text' | 'image' | 'dynamicImage' | 'qrcode' | 'barcode' | 'productTable' | 'variantsTable' | 'rect' | 'circle' | 'ellipse' | 'line' | 'polyline' | 'path' | 'template' | 'callout' | 'group' | 'svg';
|
|
1032
|
+
interface TextElement extends BaseElement {
|
|
1033
|
+
type: 'text';
|
|
1034
|
+
content: TextElementLine[];
|
|
1035
|
+
style: {
|
|
1036
|
+
fontFamily: string;
|
|
1037
|
+
fontSize: number;
|
|
1038
|
+
fontWeight?: string | number;
|
|
1039
|
+
fontStyle?: string;
|
|
1040
|
+
textDecoration?: string;
|
|
1041
|
+
textAlign: 'left' | 'center' | 'right' | 'justify' | string;
|
|
1042
|
+
lineHeight?: string;
|
|
1043
|
+
color: string;
|
|
1044
|
+
backgroundColor?: string;
|
|
1045
|
+
padding?: {
|
|
1046
|
+
top?: number;
|
|
1047
|
+
right?: number;
|
|
1048
|
+
bottom?: number;
|
|
1049
|
+
left?: number;
|
|
1050
|
+
};
|
|
1051
|
+
border?: ElementBorder;
|
|
1052
|
+
};
|
|
1053
|
+
}
|
|
1054
|
+
interface TextElementLine {
|
|
1055
|
+
textElements: TextElementPart[];
|
|
1056
|
+
}
|
|
1057
|
+
interface TextElementPart {
|
|
1058
|
+
/**
|
|
1059
|
+
* Text element part, isVariable = true for a variable, false for a normal text. Only use text variables listed above
|
|
1060
|
+
*/
|
|
1061
|
+
isVariable: boolean;
|
|
1062
|
+
content: string;
|
|
1063
|
+
color?: string;
|
|
1064
|
+
bold?: boolean;
|
|
1065
|
+
italic?: boolean;
|
|
1066
|
+
underline?: boolean;
|
|
1067
|
+
strikethrough?: boolean;
|
|
1068
|
+
highlightedColor?: string;
|
|
1069
|
+
}
|
|
1070
|
+
interface ImageElement extends BaseElement {
|
|
1071
|
+
type: 'image' | 'dynamicImage';
|
|
1072
|
+
isDynamic: boolean;
|
|
1073
|
+
source: {
|
|
1074
|
+
src?: string;
|
|
1075
|
+
assetGuid?: string;
|
|
1076
|
+
hdUrl?: string;
|
|
1077
|
+
sdUrl?: string;
|
|
1078
|
+
selectedImageField?: string;
|
|
1079
|
+
imageIndex?: number;
|
|
1080
|
+
};
|
|
1081
|
+
display: {
|
|
1082
|
+
objectFit: 'contain' | 'cover' | 'fill' | 'none' | string;
|
|
1083
|
+
filter?: string;
|
|
1084
|
+
internalRotation?: number;
|
|
1085
|
+
crop?: {
|
|
1086
|
+
top: number;
|
|
1087
|
+
right: number;
|
|
1088
|
+
bottom: number;
|
|
1089
|
+
left: number;
|
|
1090
|
+
};
|
|
1091
|
+
};
|
|
1092
|
+
border?: ElementBorder;
|
|
1093
|
+
}
|
|
1094
|
+
interface QrCodeElement extends BaseElement {
|
|
1095
|
+
type: 'qrcode';
|
|
1096
|
+
field: string;
|
|
1097
|
+
codeDimensions: {
|
|
1098
|
+
width: number;
|
|
1099
|
+
height: number;
|
|
1100
|
+
margin: number;
|
|
1101
|
+
};
|
|
1102
|
+
style: {
|
|
1103
|
+
dotType: 'square' | 'dots' | 'rounded';
|
|
1104
|
+
dotColor: string;
|
|
1105
|
+
cornersSquareType: 'square' | 'extra-rounded' | 'rounded';
|
|
1106
|
+
cornersSquareColor: string;
|
|
1107
|
+
cornersDotType: 'square' | 'dots' | 'rounded';
|
|
1108
|
+
cornersDotColor: string;
|
|
1109
|
+
backgroundColor: string;
|
|
1110
|
+
};
|
|
1111
|
+
logo?: {
|
|
1112
|
+
url?: string;
|
|
1113
|
+
size: number;
|
|
1114
|
+
margin: number;
|
|
1115
|
+
hideBackgroundDots: boolean;
|
|
1116
|
+
};
|
|
1117
|
+
}
|
|
1118
|
+
interface BarcodeElement extends BaseElement {
|
|
1119
|
+
type: 'barcode';
|
|
1120
|
+
field: string;
|
|
1121
|
+
format: 'EAN13' | 'EAN8' | 'EAN5' | 'EAN2' | 'UPC' | 'CODE128' | 'CODE128A' | 'CODE128C' | 'CODE39' | 'ITF' | 'MSI' | 'pharmacode';
|
|
1122
|
+
barWidth: 1 | 2 | 3 | 4;
|
|
1123
|
+
barHeight: 100;
|
|
1124
|
+
margin: 10;
|
|
1125
|
+
displayValue: boolean;
|
|
1126
|
+
textStyle?: {
|
|
1127
|
+
position?: 'bottom';
|
|
1128
|
+
align?: 'center';
|
|
1129
|
+
fontFamily?: string;
|
|
1130
|
+
fontSize?: number;
|
|
1131
|
+
};
|
|
1132
|
+
lineColor: string;
|
|
1133
|
+
backgroundColor: string;
|
|
1134
|
+
}
|
|
1135
|
+
interface TableElement extends BaseElement {
|
|
1136
|
+
type: 'productTable' | 'variantsTable';
|
|
1137
|
+
tableStyle: {
|
|
1138
|
+
verticalPadding: string;
|
|
1139
|
+
horizontalPadding: string;
|
|
1140
|
+
borderCollapse?: string;
|
|
1141
|
+
};
|
|
1142
|
+
columns: Array<{
|
|
1143
|
+
width: string;
|
|
1144
|
+
maxWidth?: string;
|
|
1145
|
+
}>;
|
|
1146
|
+
rows: Array<{
|
|
1147
|
+
isHeader?: boolean;
|
|
1148
|
+
minHeight?: string;
|
|
1149
|
+
cells: TableCell[];
|
|
1150
|
+
}>;
|
|
1151
|
+
}
|
|
1152
|
+
interface TableCell {
|
|
1153
|
+
content: string;
|
|
1154
|
+
colSpan?: number;
|
|
1155
|
+
rowSpan?: number;
|
|
1156
|
+
parentColIndex?: number;
|
|
1157
|
+
parentRowIndex?: number;
|
|
1158
|
+
styles?: {
|
|
1159
|
+
fontFamily?: string;
|
|
1160
|
+
fontSize?: string;
|
|
1161
|
+
fontWeight?: string;
|
|
1162
|
+
fontStyle?: string;
|
|
1163
|
+
textDecoration?: string;
|
|
1164
|
+
color?: string;
|
|
1165
|
+
backgroundColor?: string;
|
|
1166
|
+
textAlign?: string;
|
|
1167
|
+
alignItems?: string;
|
|
1168
|
+
justifyContent?: string;
|
|
1169
|
+
borders?: {
|
|
1170
|
+
top?: BorderSide;
|
|
1171
|
+
right?: BorderSide;
|
|
1172
|
+
bottom?: BorderSide;
|
|
1173
|
+
left?: BorderSide;
|
|
1174
|
+
};
|
|
1175
|
+
padding?: {
|
|
1176
|
+
top?: string;
|
|
1177
|
+
right?: string;
|
|
1178
|
+
bottom?: string;
|
|
1179
|
+
left?: string;
|
|
1180
|
+
};
|
|
1181
|
+
};
|
|
1182
|
+
}
|
|
1183
|
+
interface BorderSide {
|
|
1184
|
+
width: string;
|
|
1185
|
+
color: string;
|
|
1186
|
+
style: 'dash' | 'solid' | 'dotted' | 'none';
|
|
1187
|
+
}
|
|
1188
|
+
interface RectElement extends BaseElement {
|
|
1189
|
+
type: 'rect';
|
|
1190
|
+
rx?: number;
|
|
1191
|
+
ry?: number;
|
|
1192
|
+
fill: string;
|
|
1193
|
+
stroke?: StrokeStyle;
|
|
1194
|
+
}
|
|
1195
|
+
interface EllipseElement extends BaseElement {
|
|
1196
|
+
type: 'ellipse' | 'circle';
|
|
1197
|
+
cx: number;
|
|
1198
|
+
cy: number;
|
|
1199
|
+
rx: number;
|
|
1200
|
+
ry: number;
|
|
1201
|
+
fill: string;
|
|
1202
|
+
stroke?: StrokeStyle;
|
|
1203
|
+
}
|
|
1204
|
+
interface LineElement extends BaseElement {
|
|
1205
|
+
type: 'line';
|
|
1206
|
+
x1: number;
|
|
1207
|
+
y1: number;
|
|
1208
|
+
x2: number;
|
|
1209
|
+
y2: number;
|
|
1210
|
+
stroke: StrokeStyle;
|
|
1211
|
+
}
|
|
1212
|
+
interface PathElement extends BaseElement {
|
|
1213
|
+
type: 'path' | 'polyline';
|
|
1214
|
+
d: string;
|
|
1215
|
+
fill?: string;
|
|
1216
|
+
stroke?: StrokeStyle;
|
|
1217
|
+
originalBBox?: {
|
|
1218
|
+
x: number;
|
|
1219
|
+
y: number;
|
|
1220
|
+
width: number;
|
|
1221
|
+
height: number;
|
|
1222
|
+
};
|
|
1223
|
+
}
|
|
1224
|
+
interface TemplateElement extends BaseElement {
|
|
1225
|
+
type: 'template' | 'callout';
|
|
1226
|
+
templateGuid?: string;
|
|
1227
|
+
blockGuid?: string;
|
|
1228
|
+
skuGuid?: string;
|
|
1229
|
+
skuRef?: string;
|
|
1230
|
+
productSheetGuid?: string;
|
|
1231
|
+
isPlaceholder: boolean;
|
|
1232
|
+
children?: DesignerElement[];
|
|
1233
|
+
}
|
|
1234
|
+
interface GroupElement extends BaseElement {
|
|
1235
|
+
type: 'group';
|
|
1236
|
+
children: DesignerElement[];
|
|
1237
|
+
}
|
|
1238
|
+
type DesignerElement = TextElement | ImageElement | QrCodeElement | BarcodeElement | TableElement | RectElement | EllipseElement | LineElement | PathElement | TemplateElement | GroupElement;
|
|
1239
|
+
|
|
1240
|
+
declare class SvgJsonService {
|
|
1241
|
+
private canvasService;
|
|
1242
|
+
private openService;
|
|
1243
|
+
private docService;
|
|
1244
|
+
private appParamsService;
|
|
1245
|
+
private imageElementService;
|
|
1246
|
+
private qrCodeElementService;
|
|
1247
|
+
private barcodeElementService;
|
|
1248
|
+
private readonly SVG_NS;
|
|
1249
|
+
private readonly XLINK_NS;
|
|
1250
|
+
private readonly XHTML_NS;
|
|
1251
|
+
/**
|
|
1252
|
+
* Convertit une chaîne SVG ou un élément SVGSVGElement en objet JSON structuré
|
|
1253
|
+
*/
|
|
1254
|
+
svgToJson(svgInput: string | SVGSVGElement): SolidDesignerDocument;
|
|
1255
|
+
/**
|
|
1256
|
+
* Extrait les propriétés globales du document depuis la balise <svg>
|
|
1257
|
+
*/
|
|
1258
|
+
private extractDocumentSettings;
|
|
1259
|
+
/**
|
|
1260
|
+
* Extrait les définitions SVG (<defs>)
|
|
1261
|
+
*/
|
|
1262
|
+
private extractDefs;
|
|
1263
|
+
/**
|
|
1264
|
+
* Parse récursivement un élément SVG en DesignerElement
|
|
1265
|
+
*/
|
|
1266
|
+
parseElement(el: SVGElement): DesignerElement | null;
|
|
1267
|
+
/**
|
|
1268
|
+
* Extrait les propriétés communes de BaseElement
|
|
1269
|
+
*/
|
|
1270
|
+
private extractBaseElementProps;
|
|
1271
|
+
private normalizeElementType;
|
|
1272
|
+
private parseTextElement;
|
|
1273
|
+
private parseTextLinesFromElement;
|
|
1274
|
+
private parseImageElement;
|
|
1275
|
+
private parseQrCodeElement;
|
|
1276
|
+
private parseBarcodeElement;
|
|
1277
|
+
private parseTableElement;
|
|
1278
|
+
private parseRectElement;
|
|
1279
|
+
private parseEllipseElement;
|
|
1280
|
+
private parseLineElement;
|
|
1281
|
+
private parsePathElement;
|
|
1282
|
+
private parseTemplateElement;
|
|
1283
|
+
private parseGroupElement;
|
|
1284
|
+
private extractStroke;
|
|
1285
|
+
private shouldIgnoreElement;
|
|
1286
|
+
/**
|
|
1287
|
+
* Convertit un document JSON SolidDesigner en élément DOM SVGSVGElement
|
|
1288
|
+
*/
|
|
1289
|
+
jsonToSvg(doc: SolidDesignerDocument): SVGSVGElement;
|
|
1290
|
+
/**
|
|
1291
|
+
* Convertit un document JSON en chaîne SVG XML complète
|
|
1292
|
+
*/
|
|
1293
|
+
jsonToSvgString(doc: SolidDesignerDocument): string;
|
|
1294
|
+
/**
|
|
1295
|
+
* Reconstruit la balise <defs>
|
|
1296
|
+
*/
|
|
1297
|
+
private buildDefs;
|
|
1298
|
+
/**
|
|
1299
|
+
* Construit un élément SVG DOM à partir de sa définition JSON
|
|
1300
|
+
*/
|
|
1301
|
+
buildElement(elData: DesignerElement, sideOverride?: 'left' | 'right' | 'both'): SVGElement | null;
|
|
1302
|
+
/**
|
|
1303
|
+
* Applique les attributs et styles communs (id, name, side, visibility, locks, hide-if)
|
|
1304
|
+
*/
|
|
1305
|
+
private applyBaseElementProps;
|
|
1306
|
+
private buildTextElement;
|
|
1307
|
+
private buildTextHtmlFromLines;
|
|
1308
|
+
private buildImageElement;
|
|
1309
|
+
private buildQrCodeElement;
|
|
1310
|
+
private buildBarcodeElement;
|
|
1311
|
+
private buildTableElement;
|
|
1312
|
+
private buildRectElement;
|
|
1313
|
+
private buildEllipseElement;
|
|
1314
|
+
private buildLineElement;
|
|
1315
|
+
private buildPathElement;
|
|
1316
|
+
private buildTemplateElement;
|
|
1317
|
+
private buildGroupElement;
|
|
1318
|
+
private applyStroke;
|
|
1319
|
+
/**
|
|
1320
|
+
* Exporte le contenu actuel du canvas en document JSON
|
|
1321
|
+
*/
|
|
1322
|
+
exportCurrentCanvasToJson(): SolidDesignerDocument | null;
|
|
1323
|
+
/**
|
|
1324
|
+
* Charge un document JSON directement dans le canvas du designer
|
|
1325
|
+
*/
|
|
1326
|
+
loadJsonToCanvas(doc: SolidDesignerDocument): void;
|
|
1327
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SvgJsonService, never>;
|
|
1328
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SvgJsonService>;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
declare class ThemeService {
|
|
1332
|
+
isDarkMode: _angular_core.WritableSignal<boolean>;
|
|
1333
|
+
constructor();
|
|
1334
|
+
toggleTheme(): void;
|
|
1335
|
+
private applyTheme;
|
|
1336
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
1337
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeService>;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
declare class TopBarComponent implements OnInit, OnDestroy {
|
|
1341
|
+
exit: EventEmitter<void>;
|
|
1342
|
+
private appParams;
|
|
1343
|
+
private eventsService;
|
|
1344
|
+
private saveService;
|
|
1345
|
+
private docService;
|
|
1346
|
+
private canvasService;
|
|
1347
|
+
configService: ConfigService;
|
|
1348
|
+
themeService: ThemeService;
|
|
1349
|
+
private modalService;
|
|
1350
|
+
private selectionStore;
|
|
1351
|
+
private elementRef;
|
|
1352
|
+
private assetsService;
|
|
1353
|
+
private openService;
|
|
1354
|
+
private unitService;
|
|
1355
|
+
private notificationService;
|
|
1356
|
+
private loadingService;
|
|
1357
|
+
private translate;
|
|
1358
|
+
isFileMenuOpen: _angular_core.WritableSignal<boolean>;
|
|
1359
|
+
isSettingsMenuOpen: _angular_core.WritableSignal<boolean>;
|
|
1360
|
+
isMoreMenuOpen: _angular_core.WritableSignal<boolean>;
|
|
1361
|
+
isShareMenuOpen: _angular_core.WritableSignal<boolean>;
|
|
1362
|
+
isDownloadMenuOpen: _angular_core.WritableSignal<boolean>;
|
|
1363
|
+
showGenerationOptions: _angular_core.WritableSignal<boolean>;
|
|
1364
|
+
selectedColorProfile: _angular_core.WritableSignal<string>;
|
|
1365
|
+
highDefinition: _angular_core.WritableSignal<boolean>;
|
|
1366
|
+
compressPdf: _angular_core.WritableSignal<boolean>;
|
|
1367
|
+
bleedMargin: _angular_core.WritableSignal<boolean>;
|
|
1368
|
+
cuttingLines: _angular_core.WritableSignal<boolean>;
|
|
1369
|
+
applyBleedToAllPages: _angular_core.WritableSignal<boolean>;
|
|
1370
|
+
customBleedValue: _angular_core.WritableSignal<number>;
|
|
1371
|
+
customBleedUnit: _angular_core.WritableSignal<string>;
|
|
1372
|
+
isGeneratingSd: _angular_core.WritableSignal<boolean>;
|
|
1373
|
+
isGeneratingHd: _angular_core.WritableSignal<boolean>;
|
|
1374
|
+
pdfUrlSd: _angular_core.WritableSignal<string | null>;
|
|
1375
|
+
pdfUrlHd: _angular_core.WritableSignal<string | null>;
|
|
1376
|
+
private notificationsSubscription;
|
|
1377
|
+
isSaving: _angular_core.WritableSignal<boolean>;
|
|
1378
|
+
isAutosaveEnabled: _angular_core.WritableSignal<boolean>;
|
|
1379
|
+
isFullscreen: _angular_core.WritableSignal<boolean>;
|
|
1380
|
+
readonly spIconSettings: _solidpepper_solidpepper_icons.SpIcon;
|
|
1381
|
+
readonly spIconHelpCircle: _solidpepper_solidpepper_icons.SpIcon;
|
|
1382
|
+
readonly spIconSun: _solidpepper_solidpepper_icons.SpIcon;
|
|
1383
|
+
readonly spIconMoon: _solidpepper_solidpepper_icons.SpIcon;
|
|
1384
|
+
readonly spIconSave: _solidpepper_solidpepper_icons.SpIcon;
|
|
1385
|
+
readonly spIconResize: _solidpepper_solidpepper_icons.SpIcon;
|
|
1386
|
+
readonly spIconArrowLeft: _solidpepper_solidpepper_icons.SpIcon;
|
|
1387
|
+
readonly spIconChevronDown: _solidpepper_solidpepper_icons.SpIcon;
|
|
1388
|
+
readonly spIconMessageSquare: _solidpepper_solidpepper_icons.SpIcon;
|
|
1389
|
+
readonly spIconMoreVertical: _solidpepper_solidpepper_icons.SpIcon;
|
|
1390
|
+
readonly spIconShare: _solidpepper_solidpepper_icons.SpIcon;
|
|
1391
|
+
readonly spIconMaximize: _solidpepper_solidpepper_icons.SpIcon;
|
|
1392
|
+
readonly spIconMinimize: _solidpepper_solidpepper_icons.SpIcon;
|
|
1393
|
+
readonly spIconLayers: _solidpepper_solidpepper_icons.SpIcon;
|
|
1394
|
+
readonly spIconType: _solidpepper_solidpepper_icons.SpIcon;
|
|
1395
|
+
readonly spIconRuler: _solidpepper_solidpepper_icons.SpIcon;
|
|
1396
|
+
readonly spIconLayout: _solidpepper_solidpepper_icons.SpIcon;
|
|
1397
|
+
readonly spIconEye: _solidpepper_solidpepper_icons.SpIcon;
|
|
1398
|
+
readonly spIconCompass: _solidpepper_solidpepper_icons.SpIcon;
|
|
1399
|
+
readonly spIconRefresh: _solidpepper_solidpepper_icons.SpIcon;
|
|
1400
|
+
readonly spIconZap: _solidpepper_solidpepper_icons.SpIcon;
|
|
1401
|
+
readonly spIconDownload: _solidpepper_solidpepper_icons.SpIcon;
|
|
1402
|
+
readonly spIconPdf: _solidpepper_solidpepper_icons.SpIcon;
|
|
1403
|
+
readonly spIconBookOpen: _solidpepper_solidpepper_icons.SpIcon;
|
|
1404
|
+
readonly spIconSliders: _solidpepper_solidpepper_icons.SpIcon;
|
|
1405
|
+
readonly spIconCheck: _solidpepper_solidpepper_icons.SpIcon;
|
|
1406
|
+
readonly spIconClose: _solidpepper_solidpepper_icons.SpIcon;
|
|
1407
|
+
readonly spIconSparkles: _solidpepper_solidpepper_icons.SpIcon;
|
|
1408
|
+
readonly isDevMode: boolean;
|
|
1409
|
+
get colorProfileOptions(): {
|
|
1410
|
+
label: any;
|
|
1411
|
+
value: string;
|
|
1412
|
+
}[];
|
|
1413
|
+
get bleedUnitOptions(): {
|
|
1414
|
+
label: any;
|
|
1415
|
+
value: string;
|
|
1416
|
+
}[];
|
|
1417
|
+
isDirty: _angular_core.Signal<boolean>;
|
|
1418
|
+
editorConfig: _angular_core.Signal<EditorConfig>;
|
|
1419
|
+
isDocument: _angular_core.Signal<boolean>;
|
|
1420
|
+
isCommentsActive: _angular_core.Signal<boolean>;
|
|
1421
|
+
isLayersOpen: _angular_core.Signal<boolean>;
|
|
1422
|
+
isResizeOpen: _angular_core.Signal<boolean>;
|
|
1423
|
+
currentUnit: _angular_core.Signal<"px" | "mm" | "cm" | "in">;
|
|
1424
|
+
currentPageNumber: _angular_core.Signal<number>;
|
|
1425
|
+
totalPages: _angular_core.Signal<number>;
|
|
1426
|
+
pageIndicator: _angular_core.Signal<string>;
|
|
1427
|
+
zoomLevelValue: _angular_core.Signal<number>;
|
|
1428
|
+
get zoomOptions(): ({
|
|
1429
|
+
label: any;
|
|
1430
|
+
value: string;
|
|
1431
|
+
action: boolean;
|
|
1432
|
+
} | {
|
|
1433
|
+
label: string;
|
|
1434
|
+
value: number;
|
|
1435
|
+
action?: undefined;
|
|
1436
|
+
})[];
|
|
1437
|
+
formatZoom: (val: any) => string;
|
|
1438
|
+
setZoom(val: any): void;
|
|
1439
|
+
fitToScreen(): void;
|
|
1440
|
+
toggleShareMenu(event?: MouseEvent): void;
|
|
1441
|
+
checkPdfStatus(): Observable<any>;
|
|
1442
|
+
onBleedChange(checked: boolean): void;
|
|
1443
|
+
onBleedValueInput(event: any): void;
|
|
1444
|
+
getConvertedBleedPx(): number;
|
|
1445
|
+
generatePdf(): void;
|
|
1446
|
+
previewPdf(): void;
|
|
1447
|
+
goToPage(index: number): void;
|
|
1448
|
+
downloadPdf(quality: 'sd' | 'hd'): Promise<void>;
|
|
1449
|
+
private addTimestamp;
|
|
1450
|
+
toggleDownloadMenu(): void;
|
|
1451
|
+
generateSpecific(quality: 'sd' | 'hd'): void;
|
|
1452
|
+
openIframeModal(moduleType?: string): void;
|
|
1453
|
+
private initNotificationSubscription;
|
|
1454
|
+
setUnit(unit: string): void;
|
|
1455
|
+
toggleCommentsMode(): void;
|
|
1456
|
+
toggleLayersWindow(): void;
|
|
1457
|
+
documentName: _angular_core.Signal<any>;
|
|
1458
|
+
ngOnInit(): void;
|
|
1459
|
+
ngOnDestroy(): void;
|
|
1460
|
+
onExit(): void;
|
|
1461
|
+
onSave(): Promise<void>;
|
|
1462
|
+
triggerSave(): void;
|
|
1463
|
+
toggleTheme(): void;
|
|
1464
|
+
toggleFileMenu(event: MouseEvent): void;
|
|
1465
|
+
toggleSettingsMenu(event: MouseEvent): void;
|
|
1466
|
+
toggleMoreMenu(event: MouseEvent): void;
|
|
1467
|
+
openShortcuts(): void;
|
|
1468
|
+
manageFonts(): void;
|
|
1469
|
+
editTemplateDimensions(): void;
|
|
1470
|
+
toggleAutosave(): void;
|
|
1471
|
+
toggleFullscreen(): void;
|
|
1472
|
+
private fallbackFullscreen;
|
|
1473
|
+
private exitFallbackFullscreen;
|
|
1474
|
+
onFullscreenChange(): void;
|
|
1475
|
+
openSvgJsonLiveModal(): void;
|
|
1476
|
+
openComponentsShowcaseModal(): void;
|
|
1477
|
+
private closeAllMenus;
|
|
1478
|
+
onDocumentClick(event: MouseEvent): void;
|
|
1479
|
+
onEscape(): void;
|
|
1480
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TopBarComponent, never>;
|
|
1481
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TopBarComponent, "app-top-bar", never, {}, { "exit": "exit"; }, never, never, true, never>;
|
|
810
1482
|
}
|
|
811
1483
|
|
|
812
|
-
export { AppParamsService, AppComponent as SolidDesignerComponent };
|
|
813
|
-
export type { AppParams };
|
|
1484
|
+
export { AppParamsService, DocumentType, AppComponent as SolidDesignerComponent, SvgJsonService, TopBarComponent };
|
|
1485
|
+
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 };
|