@solidpepper/solidpepper-soliddesigner 0.2.8 → 0.2.9
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/fesm2022/{solidpepper-solidpepper-soliddesigner-image-utils-kFzAbVaS.mjs → solidpepper-solidpepper-soliddesigner-image-utils-aRwbUdM9.mjs} +2 -2
- package/fesm2022/{solidpepper-solidpepper-soliddesigner-image-utils-kFzAbVaS.mjs.map → solidpepper-solidpepper-soliddesigner-image-utils-aRwbUdM9.mjs.map} +1 -1
- package/fesm2022/{solidpepper-solidpepper-soliddesigner-page-grid-modal.component-BpQubjKk.mjs → solidpepper-solidpepper-soliddesigner-page-grid-modal.component-DYbzfSUn.mjs} +2 -2
- package/fesm2022/{solidpepper-solidpepper-soliddesigner-page-grid-modal.component-BpQubjKk.mjs.map → solidpepper-solidpepper-soliddesigner-page-grid-modal.component-DYbzfSUn.mjs.map} +1 -1
- package/fesm2022/{solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-CrE7DUET.mjs → solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-BUgU8Zwi.mjs} +197 -39
- package/fesm2022/solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-BUgU8Zwi.mjs.map +1 -0
- package/fesm2022/solidpepper-solidpepper-soliddesigner.mjs +1 -1
- package/index.d.ts +2 -2
- package/package.json +1 -1
- package/fesm2022/solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-CrE7DUET.mjs.map +0 -1
|
@@ -2226,6 +2226,28 @@ class SolidLog {
|
|
|
2226
2226
|
}
|
|
2227
2227
|
}
|
|
2228
2228
|
|
|
2229
|
+
const DOCUMENT_VARIABLES = [
|
|
2230
|
+
{
|
|
2231
|
+
key: 'page',
|
|
2232
|
+
fr: 'page',
|
|
2233
|
+
en: 'page',
|
|
2234
|
+
es: 'page',
|
|
2235
|
+
nl: 'page',
|
|
2236
|
+
type: 'text',
|
|
2237
|
+
aliases: ['Page'],
|
|
2238
|
+
isDocumentVariable: true,
|
|
2239
|
+
},
|
|
2240
|
+
{
|
|
2241
|
+
key: 'pageTotal',
|
|
2242
|
+
fr: 'pageTotal',
|
|
2243
|
+
en: 'pageTotal',
|
|
2244
|
+
es: 'pageTotal',
|
|
2245
|
+
nl: 'pageTotal',
|
|
2246
|
+
type: 'text',
|
|
2247
|
+
aliases: ['PageTotal', 'pagetotal'],
|
|
2248
|
+
isDocumentVariable: true,
|
|
2249
|
+
},
|
|
2250
|
+
];
|
|
2229
2251
|
class AttributeService {
|
|
2230
2252
|
constructor(http, appParams) {
|
|
2231
2253
|
this.http = http;
|
|
@@ -2235,6 +2257,39 @@ class AttributeService {
|
|
|
2235
2257
|
this._cachedProductSheetAssetGuid = null;
|
|
2236
2258
|
this._cachedProductSheetColumns = null;
|
|
2237
2259
|
}
|
|
2260
|
+
ensureDocumentVariables(data) {
|
|
2261
|
+
if (!data || !Array.isArray(data.fields))
|
|
2262
|
+
return;
|
|
2263
|
+
const missingVars = DOCUMENT_VARIABLES.filter((docVar) => !data.fields.some((g) => g.fields?.some((f) => f.key?.toLowerCase() === docVar.key.toLowerCase())));
|
|
2264
|
+
if (missingVars.length === 0)
|
|
2265
|
+
return;
|
|
2266
|
+
let docGroup = data.fields.find((g) => g.fr === 'Document' ||
|
|
2267
|
+
g.en === 'Document' ||
|
|
2268
|
+
g.fieldsGroup?.fr === 'Document' ||
|
|
2269
|
+
g.fieldsGroup?.en === 'Document');
|
|
2270
|
+
if (!docGroup) {
|
|
2271
|
+
docGroup = {
|
|
2272
|
+
fr: 'Document',
|
|
2273
|
+
en: 'Document',
|
|
2274
|
+
es: 'Documento',
|
|
2275
|
+
nl: 'Document',
|
|
2276
|
+
fieldsGroup: {
|
|
2277
|
+
fr: 'Document',
|
|
2278
|
+
en: 'Document',
|
|
2279
|
+
es: 'Documento',
|
|
2280
|
+
nl: 'Document',
|
|
2281
|
+
},
|
|
2282
|
+
fields: [],
|
|
2283
|
+
};
|
|
2284
|
+
data.fields.push(docGroup);
|
|
2285
|
+
}
|
|
2286
|
+
if (!Array.isArray(docGroup.fields)) {
|
|
2287
|
+
docGroup.fields = [];
|
|
2288
|
+
}
|
|
2289
|
+
for (const v of missingVars) {
|
|
2290
|
+
docGroup.fields.push({ ...v });
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2238
2293
|
getProductSheetColumnsFromApi(assetGuid) {
|
|
2239
2294
|
if (!assetGuid)
|
|
2240
2295
|
return of([]);
|
|
@@ -2295,10 +2350,17 @@ class AttributeService {
|
|
|
2295
2350
|
{
|
|
2296
2351
|
fr: 'Fiche Produit',
|
|
2297
2352
|
en: 'Product Sheet',
|
|
2353
|
+
fieldsGroup: {
|
|
2354
|
+
fr: 'Fiche Produit',
|
|
2355
|
+
en: 'Product Sheet',
|
|
2356
|
+
es: 'Ficha de producto',
|
|
2357
|
+
nl: 'Product Sheet',
|
|
2358
|
+
},
|
|
2298
2359
|
fields: textFields,
|
|
2299
2360
|
},
|
|
2300
2361
|
],
|
|
2301
2362
|
};
|
|
2363
|
+
this.ensureDocumentVariables(data);
|
|
2302
2364
|
this._cachedTextElements = data;
|
|
2303
2365
|
return data;
|
|
2304
2366
|
}));
|
|
@@ -2376,6 +2438,7 @@ class AttributeService {
|
|
|
2376
2438
|
],
|
|
2377
2439
|
});
|
|
2378
2440
|
}
|
|
2441
|
+
this.ensureDocumentVariables(data);
|
|
2379
2442
|
}
|
|
2380
2443
|
return data;
|
|
2381
2444
|
}
|
|
@@ -2514,15 +2577,55 @@ class AttributesListPopupComponent {
|
|
|
2514
2577
|
Object.entries(attr).find(([k, v]) => k !== 'key' && typeof v === 'string')?.[1] ||
|
|
2515
2578
|
attr.key;
|
|
2516
2579
|
if (label) {
|
|
2517
|
-
attrs.push({
|
|
2580
|
+
attrs.push({
|
|
2581
|
+
key: attr.key,
|
|
2582
|
+
label,
|
|
2583
|
+
isDocumentVariable: !!attr.isDocumentVariable,
|
|
2584
|
+
});
|
|
2518
2585
|
}
|
|
2519
2586
|
}
|
|
2520
2587
|
}
|
|
2521
2588
|
}
|
|
2522
2589
|
}
|
|
2523
|
-
// Deduplicate
|
|
2524
|
-
const uniqueAttrs = attrs.filter((attr, index, self) => index ===
|
|
2525
|
-
|
|
2590
|
+
// Deduplicate
|
|
2591
|
+
const uniqueAttrs = attrs.filter((attr, index, self) => index ===
|
|
2592
|
+
self.findIndex((t) => t.key.toLowerCase() === attr.key.toLowerCase()));
|
|
2593
|
+
const type = (this.appParams.type || '').toString().toLowerCase();
|
|
2594
|
+
const isDocument = type === DocumentType.DOCUMENT || type === 'documents';
|
|
2595
|
+
if (isDocument) {
|
|
2596
|
+
const priorityKeys = DOCUMENT_VARIABLES.map((v) => v.key.toLowerCase());
|
|
2597
|
+
const docAttrs = [];
|
|
2598
|
+
const otherAttrs = [];
|
|
2599
|
+
for (const attr of uniqueAttrs) {
|
|
2600
|
+
if (attr.isDocumentVariable ||
|
|
2601
|
+
priorityKeys.includes(attr.key.toLowerCase())) {
|
|
2602
|
+
docAttrs.push(attr);
|
|
2603
|
+
}
|
|
2604
|
+
else {
|
|
2605
|
+
otherAttrs.push(attr);
|
|
2606
|
+
}
|
|
2607
|
+
}
|
|
2608
|
+
// Sort document variables by order in DOCUMENT_VARIABLES
|
|
2609
|
+
docAttrs.sort((a, b) => {
|
|
2610
|
+
const idxA = priorityKeys.indexOf(a.key.toLowerCase());
|
|
2611
|
+
const idxB = priorityKeys.indexOf(b.key.toLowerCase());
|
|
2612
|
+
if (idxA !== -1 && idxB !== -1)
|
|
2613
|
+
return idxA - idxB;
|
|
2614
|
+
if (idxA !== -1)
|
|
2615
|
+
return -1;
|
|
2616
|
+
if (idxB !== -1)
|
|
2617
|
+
return 1;
|
|
2618
|
+
return a.label.localeCompare(b.label);
|
|
2619
|
+
});
|
|
2620
|
+
// Sort other attributes alphabetically by label
|
|
2621
|
+
otherAttrs.sort((a, b) => a.label.localeCompare(b.label));
|
|
2622
|
+
this.allAttributes.set([...docAttrs, ...otherAttrs]);
|
|
2623
|
+
}
|
|
2624
|
+
else {
|
|
2625
|
+
// Sort all alphabetically by label
|
|
2626
|
+
uniqueAttrs.sort((a, b) => a.label.localeCompare(b.label));
|
|
2627
|
+
this.allAttributes.set(uniqueAttrs);
|
|
2628
|
+
}
|
|
2526
2629
|
});
|
|
2527
2630
|
}
|
|
2528
2631
|
select(attr) {
|
|
@@ -6551,15 +6654,30 @@ class SaveService {
|
|
|
6551
6654
|
//set double page attribute
|
|
6552
6655
|
const doublePage = this.docService.properties().doublePage || false;
|
|
6553
6656
|
clone.setAttribute('data-double-page', String(doublePage));
|
|
6554
|
-
//
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
el
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6657
|
+
// Handle visibility of double-page side groups on save:
|
|
6658
|
+
// When doublePage is true, left side is visible by default and right side is hidden via visibility:hidden & pointer-events:none
|
|
6659
|
+
if (doublePage) {
|
|
6660
|
+
clone.querySelectorAll('[data-side="left"]').forEach((el) => {
|
|
6661
|
+
if (el instanceof SVGElement || el instanceof HTMLElement) {
|
|
6662
|
+
el.style.removeProperty('visibility');
|
|
6663
|
+
el.style.removeProperty('pointer-events');
|
|
6664
|
+
}
|
|
6665
|
+
});
|
|
6666
|
+
clone.querySelectorAll('[data-side="right"]').forEach((el) => {
|
|
6667
|
+
if (el instanceof SVGElement || el instanceof HTMLElement) {
|
|
6668
|
+
el.style.visibility = 'hidden';
|
|
6669
|
+
el.style.pointerEvents = 'none';
|
|
6670
|
+
}
|
|
6671
|
+
});
|
|
6672
|
+
}
|
|
6673
|
+
else {
|
|
6674
|
+
clone.querySelectorAll('[data-side]').forEach((el) => {
|
|
6675
|
+
if (el instanceof SVGElement || el instanceof HTMLElement) {
|
|
6676
|
+
el.style.removeProperty('visibility');
|
|
6677
|
+
el.style.removeProperty('pointer-events');
|
|
6678
|
+
}
|
|
6679
|
+
});
|
|
6680
|
+
}
|
|
6563
6681
|
//remove editor specific controls
|
|
6564
6682
|
clone
|
|
6565
6683
|
.querySelectorAll('.se-selection-box, .se-handler, #canvasGrid, #selection-outline, .page-divider, #creation-band-overlay')
|
|
@@ -8157,7 +8275,7 @@ class CanvasService {
|
|
|
8157
8275
|
this.updateSideVisibility();
|
|
8158
8276
|
}
|
|
8159
8277
|
/**
|
|
8160
|
-
* Updates
|
|
8278
|
+
* Updates visibility and pointer-events for double-page side groups
|
|
8161
8279
|
*/
|
|
8162
8280
|
updateSideVisibility() {
|
|
8163
8281
|
const drawingLayer = this.drawingGroup;
|
|
@@ -8172,23 +8290,20 @@ class CanvasService {
|
|
|
8172
8290
|
sideNodes.forEach((node) => {
|
|
8173
8291
|
if (node instanceof SVGElement || node instanceof HTMLElement) {
|
|
8174
8292
|
const side = node.getAttribute('data-side');
|
|
8293
|
+
// Clean display styles and attributes (double page uses only visibility and pointer-events)
|
|
8294
|
+
node.style.removeProperty('display');
|
|
8295
|
+
node.removeAttribute('display');
|
|
8175
8296
|
if (isDoublePage) {
|
|
8176
8297
|
if (side === currentSide) {
|
|
8177
|
-
node.style.removeProperty('display');
|
|
8178
|
-
node.removeAttribute('display');
|
|
8179
8298
|
node.style.removeProperty('visibility');
|
|
8180
8299
|
node.style.removeProperty('pointer-events');
|
|
8181
8300
|
}
|
|
8182
8301
|
else {
|
|
8183
|
-
node.style.display = 'none';
|
|
8184
|
-
node.setAttribute('display', 'none');
|
|
8185
8302
|
node.style.visibility = 'hidden';
|
|
8186
8303
|
node.style.pointerEvents = 'none';
|
|
8187
8304
|
}
|
|
8188
8305
|
}
|
|
8189
8306
|
else {
|
|
8190
|
-
node.style.removeProperty('display');
|
|
8191
|
-
node.removeAttribute('display');
|
|
8192
8307
|
node.style.removeProperty('visibility');
|
|
8193
8308
|
node.style.removeProperty('pointer-events');
|
|
8194
8309
|
}
|
|
@@ -12488,7 +12603,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
12488
12603
|
class ImageElementService {
|
|
12489
12604
|
constructor(rendererFactory, canvasService) {
|
|
12490
12605
|
this.canvasService = canvasService;
|
|
12491
|
-
this.defaultImg = 'assets/svg-editor/images/default-product-img.png';
|
|
12606
|
+
this.defaultImg = 'https://nd.solidpim.com/assets/svg-editor/images/default-product-img.png';
|
|
12492
12607
|
this.renderer = rendererFactory.createRenderer(null, null);
|
|
12493
12608
|
}
|
|
12494
12609
|
addImage(x, y, width = 200, height = 200, isDynamic = true, customSrc) {
|
|
@@ -20415,12 +20530,38 @@ class ContextMenuComponent {
|
|
|
20415
20530
|
this.action = new EventEmitter();
|
|
20416
20531
|
this.closeMenu = new EventEmitter();
|
|
20417
20532
|
this.isMac = false;
|
|
20533
|
+
this.cachedHeight = 0;
|
|
20534
|
+
this.cachedWidth = 0;
|
|
20418
20535
|
}
|
|
20419
20536
|
ngOnInit() {
|
|
20420
20537
|
this.isMac =
|
|
20421
20538
|
navigator.platform.toUpperCase().indexOf('MAC') >= 0 ||
|
|
20422
20539
|
navigator.userAgent.toUpperCase().indexOf('MAC') >= 0;
|
|
20423
20540
|
}
|
|
20541
|
+
get openUpward() {
|
|
20542
|
+
const height = this.getMenuHeight();
|
|
20543
|
+
// Only flip upward if it would overflow the bottom AND there is enough room above
|
|
20544
|
+
return height > 0 && (this.position.y + height > window.innerHeight);
|
|
20545
|
+
}
|
|
20546
|
+
get openLeftward() {
|
|
20547
|
+
const width = this.getMenuWidth();
|
|
20548
|
+
return width > 0 && (this.position.x + width > window.innerWidth);
|
|
20549
|
+
}
|
|
20550
|
+
getMenuHeight() {
|
|
20551
|
+
const menuEl = this.elementRef.nativeElement.querySelector('.context-menu');
|
|
20552
|
+
if (menuEl && menuEl.offsetHeight > 0) {
|
|
20553
|
+
this.cachedHeight = menuEl.offsetHeight;
|
|
20554
|
+
}
|
|
20555
|
+
// Fallback based on typical context menu height (~300px) if not yet rendered
|
|
20556
|
+
return this.cachedHeight || 300;
|
|
20557
|
+
}
|
|
20558
|
+
getMenuWidth() {
|
|
20559
|
+
const menuEl = this.elementRef.nativeElement.querySelector('.context-menu');
|
|
20560
|
+
if (menuEl && menuEl.offsetWidth > 0) {
|
|
20561
|
+
this.cachedWidth = menuEl.offsetWidth;
|
|
20562
|
+
}
|
|
20563
|
+
return this.cachedWidth || 220;
|
|
20564
|
+
}
|
|
20424
20565
|
getShortcut(action) {
|
|
20425
20566
|
switch (action) {
|
|
20426
20567
|
case 'cut':
|
|
@@ -20467,7 +20608,9 @@ class ContextMenuComponent {
|
|
|
20467
20608
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: ContextMenuComponent, isStandalone: true, selector: "app-context-menu", inputs: { visible: "visible", position: "position", hasSelection: "hasSelection", canGroup: "canGroup", canUngroup: "canUngroup", canPaste: "canPaste" }, outputs: { action: "action", closeMenu: "closeMenu" }, host: { listeners: { "document:click": "onDocumentClick($event)", "document:contextmenu": "onDocumentClick($event)" } }, ngImport: i0, template: `
|
|
20468
20609
|
<div
|
|
20469
20610
|
class="context-menu"
|
|
20470
|
-
|
|
20611
|
+
[class.visible]="visible"
|
|
20612
|
+
[class.open-upward]="openUpward"
|
|
20613
|
+
[class.open-leftward]="openLeftward"
|
|
20471
20614
|
[style.top.px]="position.y"
|
|
20472
20615
|
[style.left.px]="position.x"
|
|
20473
20616
|
(contextmenu)="$event.preventDefault()"
|
|
@@ -20556,14 +20699,16 @@ class ContextMenuComponent {
|
|
|
20556
20699
|
<span class="shortcut">{{ getShortcut('move-back') }}</span>
|
|
20557
20700
|
</div>
|
|
20558
20701
|
</div>
|
|
20559
|
-
`, isInline: true, styles: [".context-menu{position:fixed;background:var(--gray-4);border:1px solid var(--gray-3);border-radius:var(--radius-m);box-shadow:var(--shadow);z-index:1000;min-width:220px;padding:var(--spacing-xxs) 0;color:var(--white);-webkit-user-select:none;user-select:none}.menu-item{padding:var(--spacing-xs) var(--spacing-m);cursor:pointer;display:flex;justify-content:space-between;align-items:center;font-size:var(--font-size-small);transition:background-color .1s ease}.menu-item:hover{background:var(--active);color:var(--white)}.menu-item.disabled{opacity:.5;cursor:not-allowed}.menu-item.disabled:hover{background:transparent;color:var(--white)}.menu-item.disabled:hover .shortcut{color:var(--gray-1)}.shortcut{color:var(--gray-1);font-size:var(--font-size-tiny)}.menu-item:not(.disabled):hover .shortcut{color:var(--white)}.separator{height:1px;background-color:var(--gray-3);margin:var(--spacing-xxs) 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "
|
|
20702
|
+
`, isInline: true, styles: [".context-menu{position:fixed;background:var(--gray-4);border:1px solid var(--gray-3);border-radius:var(--radius-m);box-shadow:var(--shadow);z-index:1000;min-width:220px;padding:var(--spacing-xxs) 0;color:var(--white);-webkit-user-select:none;user-select:none;display:none;pointer-events:none}.context-menu.visible{display:block;pointer-events:auto}.context-menu.open-upward{transform:translateY(-100%)}.context-menu.open-leftward{transform:translate(-100%)}.context-menu.open-upward.open-leftward{transform:translate(-100%,-100%)}.menu-item{padding:var(--spacing-xs) var(--spacing-m);cursor:pointer;display:flex;justify-content:space-between;align-items:center;font-size:var(--font-size-small);transition:background-color .1s ease}.menu-item:hover{background:var(--active);color:var(--white)}.menu-item.disabled{opacity:.5;cursor:not-allowed}.menu-item.disabled:hover{background:transparent;color:var(--white)}.menu-item.disabled:hover .shortcut{color:var(--gray-1)}.shortcut{color:var(--gray-1);font-size:var(--font-size-tiny)}.menu-item:not(.disabled):hover .shortcut{color:var(--white)}.separator{height:1px;background-color:var(--gray-3);margin:var(--spacing-xxs) 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] }); }
|
|
20560
20703
|
}
|
|
20561
20704
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ContextMenuComponent, decorators: [{
|
|
20562
20705
|
type: Component,
|
|
20563
20706
|
args: [{ selector: 'app-context-menu', standalone: true, imports: [CommonModule, TranslateModule], template: `
|
|
20564
20707
|
<div
|
|
20565
20708
|
class="context-menu"
|
|
20566
|
-
|
|
20709
|
+
[class.visible]="visible"
|
|
20710
|
+
[class.open-upward]="openUpward"
|
|
20711
|
+
[class.open-leftward]="openLeftward"
|
|
20567
20712
|
[style.top.px]="position.y"
|
|
20568
20713
|
[style.left.px]="position.x"
|
|
20569
20714
|
(contextmenu)="$event.preventDefault()"
|
|
@@ -20652,7 +20797,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
20652
20797
|
<span class="shortcut">{{ getShortcut('move-back') }}</span>
|
|
20653
20798
|
</div>
|
|
20654
20799
|
</div>
|
|
20655
|
-
`, styles: [".context-menu{position:fixed;background:var(--gray-4);border:1px solid var(--gray-3);border-radius:var(--radius-m);box-shadow:var(--shadow);z-index:1000;min-width:220px;padding:var(--spacing-xxs) 0;color:var(--white);-webkit-user-select:none;user-select:none}.menu-item{padding:var(--spacing-xs) var(--spacing-m);cursor:pointer;display:flex;justify-content:space-between;align-items:center;font-size:var(--font-size-small);transition:background-color .1s ease}.menu-item:hover{background:var(--active);color:var(--white)}.menu-item.disabled{opacity:.5;cursor:not-allowed}.menu-item.disabled:hover{background:transparent;color:var(--white)}.menu-item.disabled:hover .shortcut{color:var(--gray-1)}.shortcut{color:var(--gray-1);font-size:var(--font-size-tiny)}.menu-item:not(.disabled):hover .shortcut{color:var(--white)}.separator{height:1px;background-color:var(--gray-3);margin:var(--spacing-xxs) 0}\n"] }]
|
|
20800
|
+
`, styles: [".context-menu{position:fixed;background:var(--gray-4);border:1px solid var(--gray-3);border-radius:var(--radius-m);box-shadow:var(--shadow);z-index:1000;min-width:220px;padding:var(--spacing-xxs) 0;color:var(--white);-webkit-user-select:none;user-select:none;display:none;pointer-events:none}.context-menu.visible{display:block;pointer-events:auto}.context-menu.open-upward{transform:translateY(-100%)}.context-menu.open-leftward{transform:translate(-100%)}.context-menu.open-upward.open-leftward{transform:translate(-100%,-100%)}.menu-item{padding:var(--spacing-xs) var(--spacing-m);cursor:pointer;display:flex;justify-content:space-between;align-items:center;font-size:var(--font-size-small);transition:background-color .1s ease}.menu-item:hover{background:var(--active);color:var(--white)}.menu-item.disabled{opacity:.5;cursor:not-allowed}.menu-item.disabled:hover{background:transparent;color:var(--white)}.menu-item.disabled:hover .shortcut{color:var(--gray-1)}.shortcut{color:var(--gray-1);font-size:var(--font-size-tiny)}.menu-item:not(.disabled):hover .shortcut{color:var(--white)}.separator{height:1px;background-color:var(--gray-3);margin:var(--spacing-xxs) 0}\n"] }]
|
|
20656
20801
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { visible: [{
|
|
20657
20802
|
type: Input
|
|
20658
20803
|
}], position: [{
|
|
@@ -21311,7 +21456,7 @@ class ClipboardService {
|
|
|
21311
21456
|
// TODO: Internal clipboard for fallback?
|
|
21312
21457
|
async pasteImageFromBlob(blob, forceCompress = false) {
|
|
21313
21458
|
try {
|
|
21314
|
-
const { ImageUtils } = await import('./solidpepper-solidpepper-soliddesigner-image-utils-
|
|
21459
|
+
const { ImageUtils } = await import('./solidpepper-solidpepper-soliddesigner-image-utils-aRwbUdM9.mjs');
|
|
21315
21460
|
let compressedDataUrl;
|
|
21316
21461
|
if (forceCompress || blob.size > MAX_IMAGE_SIZE_EXTERNAL) {
|
|
21317
21462
|
compressedDataUrl = await ImageUtils.compressUntilSize(blob, MAX_IMAGE_SIZE_EXTERNAL / 1024);
|
|
@@ -22294,7 +22439,7 @@ class SvgCanvasComponent {
|
|
|
22294
22439
|
}
|
|
22295
22440
|
async processDropFile(file, event, forceCompress = false) {
|
|
22296
22441
|
try {
|
|
22297
|
-
const { ImageUtils } = await import('./solidpepper-solidpepper-soliddesigner-image-utils-
|
|
22442
|
+
const { ImageUtils } = await import('./solidpepper-solidpepper-soliddesigner-image-utils-aRwbUdM9.mjs');
|
|
22298
22443
|
let compressedDataUrl;
|
|
22299
22444
|
if (forceCompress || file.size > SETTINGS.MAX_IMAGE_SIZE_EXTERNAL) {
|
|
22300
22445
|
compressedDataUrl = await ImageUtils.compressUntilSize(file, SETTINGS.MAX_IMAGE_SIZE_EXTERNAL / 1024);
|
|
@@ -30126,6 +30271,11 @@ class VariablePropertiesPanelComponent {
|
|
|
30126
30271
|
for (const attr of group.fields) {
|
|
30127
30272
|
if (attr.key)
|
|
30128
30273
|
attrs.add(attr.key);
|
|
30274
|
+
if (Array.isArray(attr.aliases)) {
|
|
30275
|
+
for (const alias of attr.aliases) {
|
|
30276
|
+
attrs.add(alias);
|
|
30277
|
+
}
|
|
30278
|
+
}
|
|
30129
30279
|
// Also add the localized label to known attributes so the isValid check doesn't show a warning
|
|
30130
30280
|
const label = attr[currentLang] ||
|
|
30131
30281
|
attr['en'] ||
|
|
@@ -31684,7 +31834,7 @@ class ImagePropertiesPanelComponent {
|
|
|
31684
31834
|
const img = elem.querySelector('img');
|
|
31685
31835
|
if (img) {
|
|
31686
31836
|
try {
|
|
31687
|
-
const { ImageUtils } = await import('./solidpepper-solidpepper-soliddesigner-image-utils-
|
|
31837
|
+
const { ImageUtils } = await import('./solidpepper-solidpepper-soliddesigner-image-utils-aRwbUdM9.mjs');
|
|
31688
31838
|
const compressedBase64 = await ImageUtils.toBase64(bigUrl);
|
|
31689
31839
|
// Reconstruct via setupImage
|
|
31690
31840
|
this.imageService.setupImage(elem, false, undefined, compressedBase64);
|
|
@@ -31736,7 +31886,7 @@ class ImagePropertiesPanelComponent {
|
|
|
31736
31886
|
const urlObj = new URL(bigUrl, window.location.origin);
|
|
31737
31887
|
urlObj.searchParams.set('t', Date.now().toString());
|
|
31738
31888
|
const refreshedSdUrl = urlObj.toString();
|
|
31739
|
-
const { ImageUtils } = await import('./solidpepper-solidpepper-soliddesigner-image-utils-
|
|
31889
|
+
const { ImageUtils } = await import('./solidpepper-solidpepper-soliddesigner-image-utils-aRwbUdM9.mjs');
|
|
31740
31890
|
const dataUrl = await ImageUtils.toBase64(refreshedSdUrl);
|
|
31741
31891
|
// Reconstruct the image inside the SVG
|
|
31742
31892
|
this.imageService.setupImage(elem, false, undefined, dataUrl);
|
|
@@ -33212,7 +33362,10 @@ class DynamicImagePropertiesPanelComponent {
|
|
|
33212
33362
|
value: label, // matching legacy behavior where value is the localized name
|
|
33213
33363
|
};
|
|
33214
33364
|
});
|
|
33215
|
-
this.
|
|
33365
|
+
if (this.appParams.productSheetAssetGuid && this.appParams.productSheetAssetGuid != '')
|
|
33366
|
+
this.imageOptions = dynamicOptions;
|
|
33367
|
+
else
|
|
33368
|
+
this.imageOptions = [...this.imageOptions, ...dynamicOptions];
|
|
33216
33369
|
});
|
|
33217
33370
|
}
|
|
33218
33371
|
toggleTransformOptions() {
|
|
@@ -33225,7 +33378,7 @@ class DynamicImagePropertiesPanelComponent {
|
|
|
33225
33378
|
this.modalService.open(AssetSelectorModalComponent, {
|
|
33226
33379
|
onSelect: async (data) => {
|
|
33227
33380
|
try {
|
|
33228
|
-
const { ImageUtils } = await import('./solidpepper-solidpepper-soliddesigner-image-utils-
|
|
33381
|
+
const { ImageUtils } = await import('./solidpepper-solidpepper-soliddesigner-image-utils-aRwbUdM9.mjs');
|
|
33229
33382
|
const dataUrl = await ImageUtils.toBase64(data.bigUrl);
|
|
33230
33383
|
this.transformToStaticImage(dataUrl);
|
|
33231
33384
|
// Apply attributes to the newly created img
|
|
@@ -33322,7 +33475,7 @@ class DynamicImagePropertiesPanelComponent {
|
|
|
33322
33475
|
}
|
|
33323
33476
|
async processFile(file, forceCompress = false) {
|
|
33324
33477
|
try {
|
|
33325
|
-
const { ImageUtils } = await import('./solidpepper-solidpepper-soliddesigner-image-utils-
|
|
33478
|
+
const { ImageUtils } = await import('./solidpepper-solidpepper-soliddesigner-image-utils-aRwbUdM9.mjs');
|
|
33326
33479
|
let compressedDataUrl;
|
|
33327
33480
|
if (forceCompress || file.size > SETTINGS.MAX_IMAGE_SIZE_EXTERNAL) {
|
|
33328
33481
|
compressedDataUrl = await ImageUtils.compressUntilSize(file, SETTINGS.MAX_IMAGE_SIZE_EXTERNAL / 1024);
|
|
@@ -34576,7 +34729,7 @@ class SharePanelComponent {
|
|
|
34576
34729
|
}
|
|
34577
34730
|
// Polling removed in favor of WebSocket/SignalR
|
|
34578
34731
|
previewPdf() {
|
|
34579
|
-
import('./solidpepper-solidpepper-soliddesigner-page-grid-modal.component-
|
|
34732
|
+
import('./solidpepper-solidpepper-soliddesigner-page-grid-modal.component-DYbzfSUn.mjs').then((m) => {
|
|
34580
34733
|
this.modalService.open(m.PageGridModalComponent, {
|
|
34581
34734
|
onPageSelect: (index) => this.goToPage(index),
|
|
34582
34735
|
});
|
|
@@ -42713,7 +42866,7 @@ class PagesGlobalPanelComponent {
|
|
|
42713
42866
|
// Data is now loaded reactively via effect() in constructor
|
|
42714
42867
|
}
|
|
42715
42868
|
openPageGridModal() {
|
|
42716
|
-
import('./solidpepper-solidpepper-soliddesigner-page-grid-modal.component-
|
|
42869
|
+
import('./solidpepper-solidpepper-soliddesigner-page-grid-modal.component-DYbzfSUn.mjs').then((m) => {
|
|
42717
42870
|
this.modalService.open(m.PageGridModalComponent, {
|
|
42718
42871
|
onPageSelect: (index) => this.goToPage(index),
|
|
42719
42872
|
});
|
|
@@ -45193,10 +45346,15 @@ class DoublePageGlobalPanelComponent {
|
|
|
45193
45346
|
drawingLayer
|
|
45194
45347
|
.querySelectorAll(`[data-side="${opposite}"]`)
|
|
45195
45348
|
.forEach((g) => g.remove());
|
|
45196
|
-
// Nettoyer le style inline du groupe conservé
|
|
45349
|
+
// Nettoyer le style inline et les attributs d'affichage du groupe conservé
|
|
45197
45350
|
drawingLayer.querySelectorAll(`[data-side="${page}"]`).forEach((g) => {
|
|
45198
|
-
g
|
|
45199
|
-
|
|
45351
|
+
if (g instanceof SVGElement || g instanceof HTMLElement) {
|
|
45352
|
+
g.style.removeProperty('display');
|
|
45353
|
+
g.style.removeProperty('visibility');
|
|
45354
|
+
g.style.removeProperty('pointer-events');
|
|
45355
|
+
g.removeAttribute('display');
|
|
45356
|
+
g.removeAttribute('visibility');
|
|
45357
|
+
}
|
|
45200
45358
|
});
|
|
45201
45359
|
// Ajouter un cache-buster aux images
|
|
45202
45360
|
const timestamp = Date.now();
|
|
@@ -46010,7 +46168,7 @@ class ContextBarComponent {
|
|
|
46010
46168
|
}
|
|
46011
46169
|
async processAndSetImage(file, forceCompress = false) {
|
|
46012
46170
|
try {
|
|
46013
|
-
const { ImageUtils } = await import('./solidpepper-solidpepper-soliddesigner-image-utils-
|
|
46171
|
+
const { ImageUtils } = await import('./solidpepper-solidpepper-soliddesigner-image-utils-aRwbUdM9.mjs');
|
|
46014
46172
|
let compressedDataUrl;
|
|
46015
46173
|
if (forceCompress || file.size > SETTINGS.MAX_IMAGE_SIZE_EXTERNAL) {
|
|
46016
46174
|
compressedDataUrl = await ImageUtils.compressUntilSize(file, SETTINGS.MAX_IMAGE_SIZE_EXTERNAL / 1024);
|
|
@@ -49948,4 +50106,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
49948
50106
|
*/
|
|
49949
50107
|
|
|
49950
50108
|
export { AppParamsService as A, ConfirmDeleteModalComponent as C, ModalService as M, PageContextMenuComponent as P, SolidLog as S, SaveService as a, AssetsService as b, AppComponent as c };
|
|
49951
|
-
//# sourceMappingURL=solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-
|
|
50109
|
+
//# sourceMappingURL=solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-BUgU8Zwi.mjs.map
|