@solidpepper/solidpepper-soliddesigner 0.3.2 → 0.3.3
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-confirm-save-before-pdf-modal.component-dmrHYZ_G.mjs +165 -0
- package/fesm2022/solidpepper-solidpepper-soliddesigner-confirm-save-before-pdf-modal.component-dmrHYZ_G.mjs.map +1 -0
- package/fesm2022/{solidpepper-solidpepper-soliddesigner-iframe-modal.component-C9bBywd4.mjs → solidpepper-solidpepper-soliddesigner-iframe-modal.component-D-ajn-z9.mjs} +381 -128
- package/fesm2022/solidpepper-solidpepper-soliddesigner-iframe-modal.component-D-ajn-z9.mjs.map +1 -0
- package/fesm2022/{solidpepper-solidpepper-soliddesigner-image-utils-CAk9N60P.mjs → solidpepper-solidpepper-soliddesigner-image-utils-S3Asxx7t.mjs} +2 -2
- package/fesm2022/{solidpepper-solidpepper-soliddesigner-image-utils-CAk9N60P.mjs.map → solidpepper-solidpepper-soliddesigner-image-utils-S3Asxx7t.mjs.map} +1 -1
- package/fesm2022/{solidpepper-solidpepper-soliddesigner-page-grid-modal.component-CX9XUnS3.mjs → solidpepper-solidpepper-soliddesigner-page-grid-modal.component-BFBuR2rJ.mjs} +127 -40
- package/fesm2022/solidpepper-solidpepper-soliddesigner-page-grid-modal.component-BFBuR2rJ.mjs.map +1 -0
- package/fesm2022/{solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-C0NEE_3w.mjs → solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-Dg1wqw7b.mjs} +4782 -2450
- package/fesm2022/solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-Dg1wqw7b.mjs.map +1 -0
- package/fesm2022/solidpepper-solidpepper-soliddesigner.mjs +1 -1
- package/index.d.ts +61 -25
- package/package.json +8 -9
- package/fesm2022/solidpepper-solidpepper-soliddesigner-iframe-modal.component-C9bBywd4.mjs.map +0 -1
- package/fesm2022/solidpepper-solidpepper-soliddesigner-page-grid-modal.component-CX9XUnS3.mjs.map +0 -1
- package/fesm2022/solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-C0NEE_3w.mjs.map +0 -1
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Input, Component } from '@angular/core';
|
|
2
|
+
import { inject, ViewChild, Input, Component } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import * as i2 from '@angular/forms';
|
|
5
5
|
import { FormsModule } from '@angular/forms';
|
|
6
6
|
import * as i2$1 from '@ngx-translate/core';
|
|
7
7
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
8
|
-
import { M as ModalService, A as AppParamsService, N as NotificationService, B as BasicModalComponent } from './solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-
|
|
8
|
+
import { M as ModalService, A as AppParamsService, N as NotificationService, B as BasicModalComponent } from './solidpepper-solidpepper-soliddesigner-solidpepper-solidpepper-soliddesigner-Dg1wqw7b.mjs';
|
|
9
9
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
10
10
|
import { DocumentsService } from '@solidpepper/solidpepper-service';
|
|
11
11
|
import { SpButtonComponent } from '@solidpepper/solidpepper-component';
|
|
12
|
-
import { spIconBookOpen, spIconMessageSquare, spIconCopy, spIconCheck, spIconLock, spIconEye, spIconExternalLink, SpIconComponent } from '@solidpepper/solidpepper-icons';
|
|
12
|
+
import { spIconBookOpen, spIconMessageSquare, spIconCopy, spIconCheck, spIconLock, spIconEye, spIconExternalLink, spIconAlert, SpIconComponent } from '@solidpepper/solidpepper-icons';
|
|
13
|
+
import QRCodeStyling from 'qr-code-styling';
|
|
13
14
|
|
|
14
15
|
class IframeModalComponent {
|
|
15
16
|
constructor() {
|
|
@@ -20,6 +21,8 @@ class IframeModalComponent {
|
|
|
20
21
|
this.notificationService = inject(NotificationService);
|
|
21
22
|
this.translate = inject(TranslateService);
|
|
22
23
|
this.moduleType = 'flipbook';
|
|
24
|
+
this.isOutOfDate = false;
|
|
25
|
+
this.lastGeneratedAt = null;
|
|
23
26
|
this.activeTab = 'flipbook';
|
|
24
27
|
this.flipbookAccessMode = 'public';
|
|
25
28
|
this.flipbookIsPassword = false;
|
|
@@ -41,13 +44,36 @@ class IframeModalComponent {
|
|
|
41
44
|
this.spIconLock = spIconLock;
|
|
42
45
|
this.spIconEye = spIconEye;
|
|
43
46
|
this.spIconExternalLink = spIconExternalLink;
|
|
47
|
+
this.spIconAlert = spIconAlert;
|
|
44
48
|
this.cachedUrl = '';
|
|
45
49
|
this.cachedSafeUrl = null;
|
|
46
50
|
}
|
|
51
|
+
formatFlipbookDate(dateStr) {
|
|
52
|
+
if (!dateStr)
|
|
53
|
+
return '';
|
|
54
|
+
try {
|
|
55
|
+
const d = new Date(dateStr);
|
|
56
|
+
if (isNaN(d.getTime()))
|
|
57
|
+
return '';
|
|
58
|
+
return new Intl.DateTimeFormat(this.translate.currentLang || 'fr', {
|
|
59
|
+
day: '2-digit',
|
|
60
|
+
month: '2-digit',
|
|
61
|
+
year: 'numeric',
|
|
62
|
+
hour: '2-digit',
|
|
63
|
+
minute: '2-digit',
|
|
64
|
+
}).format(d);
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
return '';
|
|
68
|
+
}
|
|
69
|
+
}
|
|
47
70
|
ngOnInit() {
|
|
48
71
|
this.activeTab = this.moduleType === 'reviewer' ? 'reviewer' : 'flipbook';
|
|
49
72
|
this.loadSecurity();
|
|
50
73
|
}
|
|
74
|
+
ngAfterViewInit() {
|
|
75
|
+
setTimeout(() => this.updateQrCode(), 100);
|
|
76
|
+
}
|
|
51
77
|
get currentLink() {
|
|
52
78
|
return this.getModuleLink(this.activeTab, false);
|
|
53
79
|
}
|
|
@@ -67,6 +93,43 @@ class IframeModalComponent {
|
|
|
67
93
|
}
|
|
68
94
|
setTab(tab) {
|
|
69
95
|
this.activeTab = tab;
|
|
96
|
+
setTimeout(() => this.updateQrCode(), 50);
|
|
97
|
+
}
|
|
98
|
+
updateQrCode() {
|
|
99
|
+
const url = this.currentLink;
|
|
100
|
+
if (!url)
|
|
101
|
+
return;
|
|
102
|
+
const isReviewer = this.activeTab === 'reviewer';
|
|
103
|
+
const size = isReviewer ? 180 : 96;
|
|
104
|
+
this.qrCode = new QRCodeStyling({
|
|
105
|
+
width: size,
|
|
106
|
+
height: size,
|
|
107
|
+
type: 'svg',
|
|
108
|
+
margin: 0,
|
|
109
|
+
data: url,
|
|
110
|
+
qrOptions: {
|
|
111
|
+
errorCorrectionLevel: 'M',
|
|
112
|
+
},
|
|
113
|
+
dotsOptions: {
|
|
114
|
+
color: '#1e293b',
|
|
115
|
+
type: 'rounded',
|
|
116
|
+
roundSize: false,
|
|
117
|
+
},
|
|
118
|
+
backgroundOptions: {
|
|
119
|
+
color: '#ffffff',
|
|
120
|
+
},
|
|
121
|
+
cornersSquareOptions: {
|
|
122
|
+
type: 'extra-rounded',
|
|
123
|
+
color: '#1e293b',
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
const targetContainer = isReviewer
|
|
127
|
+
? this.qrContainerReviewer?.nativeElement
|
|
128
|
+
: this.qrContainerFlipbook?.nativeElement;
|
|
129
|
+
if (targetContainer) {
|
|
130
|
+
targetContainer.innerHTML = '';
|
|
131
|
+
this.qrCode.append(targetContainer);
|
|
132
|
+
}
|
|
70
133
|
}
|
|
71
134
|
getModuleLink(module, includePassword = false) {
|
|
72
135
|
const guid = this.appParamsService.guid;
|
|
@@ -177,9 +240,9 @@ class IframeModalComponent {
|
|
|
177
240
|
this.modalService.close();
|
|
178
241
|
}
|
|
179
242
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: IframeModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
180
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: IframeModalComponent, isStandalone: true, selector: "app-iframe-modal", inputs: { moduleType: "moduleType" }, ngImport: i0, template: `
|
|
243
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: IframeModalComponent, isStandalone: true, selector: "app-iframe-modal", inputs: { moduleType: "moduleType", isOutOfDate: "isOutOfDate", lastGeneratedAt: "lastGeneratedAt" }, viewQueries: [{ propertyName: "qrContainerReviewer", first: true, predicate: ["qrContainerReviewer"], descendants: true }, { propertyName: "qrContainerFlipbook", first: true, predicate: ["qrContainerFlipbook"], descendants: true }], ngImport: i0, template: `
|
|
181
244
|
<app-basic-modal
|
|
182
|
-
[title]="'IFRAME_MODAL.TITLE' | translate"
|
|
245
|
+
[title]="(activeTab === 'reviewer' ? ('IFRAME_MODAL.REVIEWER_TAB' | translate) : ('IFRAME_MODAL.FLIPBOOK_TAB' | translate)) || ('SHARE.TITLE' | translate)"
|
|
183
246
|
[isOpen]="true"
|
|
184
247
|
[showFooter]="false"
|
|
185
248
|
(closeEvent)="close()"
|
|
@@ -206,77 +269,167 @@ class IframeModalComponent {
|
|
|
206
269
|
</button>
|
|
207
270
|
</div>
|
|
208
271
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
272
|
+
@if (activeTab === 'flipbook') {
|
|
273
|
+
<button
|
|
274
|
+
type="button"
|
|
275
|
+
class="btn btn-xs btn-ghost gap-1 text-xs"
|
|
276
|
+
(click)="openInNewTab()"
|
|
277
|
+
[title]="'IFRAME_MODAL.FULLSCREEN' | translate">
|
|
278
|
+
<sp-icon [icon]="spIconExternalLink" [size]="13"></sp-icon>
|
|
279
|
+
<span>{{ 'IFRAME_MODAL.FULLSCREEN' | translate }}</span>
|
|
280
|
+
</button>
|
|
281
|
+
}
|
|
216
282
|
</div>
|
|
217
283
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
<
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
</
|
|
284
|
+
@if (activeTab === 'flipbook' && isOutOfDate) {
|
|
285
|
+
<div class="flex items-center gap-2.5 p-3 bg-warning/15 border border-warning/30 rounded-xl text-xs text-warning-content">
|
|
286
|
+
<sp-icon [icon]="spIconAlert" [size]="16" class="text-warning shrink-0"></sp-icon>
|
|
287
|
+
<div class="leading-snug">
|
|
288
|
+
<p class="font-semibold">{{ 'SHARE.FLIPBOOK_OUT_OF_DATE' | translate }}</p>
|
|
289
|
+
@if (lastGeneratedAt) {
|
|
290
|
+
<p class="text-[11px] opacity-80">{{ 'SHARE.FLIPBOOK_LAST_UPDATE' | translate: { date: formatFlipbookDate(lastGeneratedAt) } }}</p>
|
|
291
|
+
}
|
|
292
|
+
</div>
|
|
227
293
|
</div>
|
|
294
|
+
}
|
|
228
295
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
296
|
+
@if (activeTab === 'reviewer') {
|
|
297
|
+
<!-- Reviewer: QR Code on Left, Link & Actions on Right -->
|
|
298
|
+
<div class="flex flex-col md:flex-row items-center gap-6 p-4 bg-base-100 rounded-2xl border border-base-200 shadow-sm">
|
|
299
|
+
<!-- Left: QR Code -->
|
|
300
|
+
<div class="flex flex-col items-center text-center gap-2 w-full md:w-5/12">
|
|
301
|
+
<div class="p-2 bg-white rounded-xl border border-base-300 shadow-sm flex items-center justify-center">
|
|
302
|
+
<div #qrContainerReviewer class="flex items-center justify-center"></div>
|
|
303
|
+
</div>
|
|
304
|
+
<p class="text-xs text-base-content/65 max-w-[220px] leading-tight">
|
|
305
|
+
{{ 'IFRAME_MODAL.QR_CODE_REVIEWER_DESC' | translate }}
|
|
306
|
+
</p>
|
|
307
|
+
</div>
|
|
308
|
+
|
|
309
|
+
<!-- Right: Link & Actions -->
|
|
310
|
+
<div class="flex flex-col gap-3 w-full md:w-7/12">
|
|
311
|
+
<div>
|
|
312
|
+
<label class="font-medium text-xs text-base-content/75 uppercase tracking-wider block mb-1.5">
|
|
313
|
+
{{ 'IFRAME_MODAL.LINK_TO_ANNOTATE' | translate }}
|
|
314
|
+
</label>
|
|
315
|
+
<div class="flex gap-2">
|
|
316
|
+
<input
|
|
317
|
+
type="text"
|
|
318
|
+
[value]="currentLink"
|
|
319
|
+
readonly
|
|
320
|
+
class="input input-sm input-bordered w-full font-mono text-xs bg-base-200" />
|
|
321
|
+
<sp-button
|
|
322
|
+
[variant]="copiedLink ? 'success' : 'primary'"
|
|
323
|
+
size="sm"
|
|
324
|
+
(clicked)="copyLink(false)">
|
|
325
|
+
<sp-icon [icon]="copiedLink ? spIconCheck : spIconCopy" [size]="12"></sp-icon>
|
|
326
|
+
<span>{{ (copiedLink ? 'SHARE.COPIED' : 'IFRAME_MODAL.COPY_LINK') | translate }}</span>
|
|
327
|
+
</sp-button>
|
|
328
|
+
</div>
|
|
329
|
+
|
|
330
|
+
@if (reviewerIsPassword && reviewerPassword) {
|
|
331
|
+
<button
|
|
332
|
+
type="button"
|
|
333
|
+
class="btn btn-xs btn-outline btn-neutral mt-2 w-full gap-1.5 justify-start text-[11px]"
|
|
334
|
+
(click)="copyLink(true)">
|
|
335
|
+
<sp-icon [icon]="spIconLock" [size]="12"></sp-icon>
|
|
336
|
+
<span>{{ 'IFRAME_MODAL.COPY_WITH_PASSWORD' | translate }}</span>
|
|
337
|
+
</button>
|
|
338
|
+
}
|
|
339
|
+
</div>
|
|
340
|
+
|
|
341
|
+
<div class="pt-1">
|
|
241
342
|
<sp-button
|
|
242
|
-
|
|
243
|
-
size="
|
|
244
|
-
(clicked)="
|
|
245
|
-
<sp-icon [icon]="
|
|
246
|
-
<span>{{
|
|
343
|
+
variant="primary"
|
|
344
|
+
size="sm"
|
|
345
|
+
(clicked)="openInNewTab()">
|
|
346
|
+
<sp-icon [icon]="spIconExternalLink" [size]="14"></sp-icon>
|
|
347
|
+
<span>{{ 'IFRAME_MODAL.OPEN_REVIEWER' | translate }}</span>
|
|
247
348
|
</sp-button>
|
|
248
349
|
</div>
|
|
249
|
-
|
|
250
|
-
@if ((activeTab === 'flipbook' && flipbookIsPassword && flipbookPassword) || (activeTab === 'reviewer' && reviewerIsPassword && reviewerPassword)) {
|
|
251
|
-
<button
|
|
252
|
-
type="button"
|
|
253
|
-
class="btn btn-xs btn-outline btn-neutral mt-1 w-full gap-1.5 justify-start text-[11px]"
|
|
254
|
-
(click)="copyLink(true)">
|
|
255
|
-
<sp-icon [icon]="spIconLock" [size]="12"></sp-icon>
|
|
256
|
-
<span>{{ 'IFRAME_MODAL.COPY_WITH_PASSWORD' | translate }}</span>
|
|
257
|
-
</button>
|
|
258
|
-
}
|
|
259
350
|
</div>
|
|
351
|
+
</div>
|
|
352
|
+
} @else {
|
|
353
|
+
<!-- Flipbook: Iframe preview on Left, Link + QR + Embed on Right -->
|
|
354
|
+
<div class="flex flex-col md:flex-row gap-6 text-sm text-base-content min-h-[300px]">
|
|
355
|
+
<!-- Preview Section (Left) -->
|
|
356
|
+
<div class="flex-1 border border-base-300 rounded-xl overflow-hidden bg-base-200/50 flex items-center justify-center min-h-[280px]">
|
|
357
|
+
<iframe
|
|
358
|
+
[src]="currentSafeUrl"
|
|
359
|
+
frameborder="0"
|
|
360
|
+
allowfullscreen
|
|
361
|
+
class="w-full h-full min-h-[280px] bg-white rounded-xl shadow-inner">
|
|
362
|
+
</iframe>
|
|
363
|
+
</div>
|
|
364
|
+
|
|
365
|
+
<!-- Code & Link Section (Right) -->
|
|
366
|
+
<div class="w-full md:w-80 flex flex-col gap-3 justify-between">
|
|
367
|
+
<div class="flex flex-col gap-1.5">
|
|
368
|
+
<label class="font-medium text-xs text-base-content/75 uppercase tracking-wider">
|
|
369
|
+
{{ 'IFRAME_MODAL.LINK_LABEL' | translate }}
|
|
370
|
+
</label>
|
|
371
|
+
<div class="flex gap-2">
|
|
372
|
+
<input
|
|
373
|
+
type="text"
|
|
374
|
+
[value]="currentLink"
|
|
375
|
+
readonly
|
|
376
|
+
class="input input-sm input-bordered w-full font-mono text-xs bg-base-200" />
|
|
377
|
+
<sp-button
|
|
378
|
+
[variant]="copiedLink ? 'success' : 'primary'"
|
|
379
|
+
size="sm"
|
|
380
|
+
(clicked)="copyLink(false)">
|
|
381
|
+
<sp-icon [icon]="copiedLink ? spIconCheck : spIconCopy" [size]="12"></sp-icon>
|
|
382
|
+
<span>{{ (copiedLink ? 'SHARE.COPIED' : 'IFRAME_MODAL.COPY_LINK') | translate }}</span>
|
|
383
|
+
</sp-button>
|
|
384
|
+
</div>
|
|
385
|
+
|
|
386
|
+
@if (flipbookIsPassword && flipbookPassword) {
|
|
387
|
+
<button
|
|
388
|
+
type="button"
|
|
389
|
+
class="btn btn-xs btn-outline btn-neutral mt-1 w-full gap-1.5 justify-start text-[11px]"
|
|
390
|
+
(click)="copyLink(true)">
|
|
391
|
+
<sp-icon [icon]="spIconLock" [size]="12"></sp-icon>
|
|
392
|
+
<span>{{ 'IFRAME_MODAL.COPY_WITH_PASSWORD' | translate }}</span>
|
|
393
|
+
</button>
|
|
394
|
+
}
|
|
395
|
+
</div>
|
|
260
396
|
|
|
261
|
-
|
|
262
|
-
<
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
397
|
+
<!-- QR Code Section -->
|
|
398
|
+
<div class="flex items-center gap-3 p-2.5 bg-base-100 rounded-xl border border-base-200 shadow-sm">
|
|
399
|
+
<div class="p-1 bg-white rounded-lg border border-base-300 shrink-0 flex items-center justify-center">
|
|
400
|
+
<div #qrContainerFlipbook class="flex items-center justify-center"></div>
|
|
401
|
+
</div>
|
|
402
|
+
<div class="flex flex-col gap-1">
|
|
403
|
+
<span class="font-semibold text-xs text-base-content flex items-center gap-1.5">
|
|
404
|
+
<sp-icon [icon]="spIconBookOpen" [size]="13" class="text-primary"></sp-icon>
|
|
405
|
+
{{ 'IFRAME_MODAL.QR_CODE_TITLE' | translate }}
|
|
406
|
+
</span>
|
|
407
|
+
<p class="text-[11px] text-base-content/60 leading-tight">
|
|
408
|
+
{{ 'IFRAME_MODAL.QR_CODE_DESC' | translate }}
|
|
409
|
+
</p>
|
|
410
|
+
</div>
|
|
411
|
+
</div>
|
|
412
|
+
|
|
413
|
+
<div class="flex flex-col gap-1.5">
|
|
414
|
+
<label class="font-medium text-xs text-base-content/75 uppercase tracking-wider">
|
|
415
|
+
{{ 'IFRAME_MODAL.INTEGRATE' | translate }}
|
|
416
|
+
</label>
|
|
417
|
+
<textarea
|
|
418
|
+
readonly
|
|
419
|
+
rows="2"
|
|
420
|
+
class="textarea textarea-bordered font-mono text-xs bg-base-200 resize-none w-full min-h-[60px]">{{ currentIframeCode }}</textarea>
|
|
421
|
+
<sp-button
|
|
422
|
+
[variant]="copiedCode ? 'success' : 'primary'"
|
|
423
|
+
size="sm"
|
|
424
|
+
customClass="w-full"
|
|
425
|
+
(clicked)="copyCode()">
|
|
426
|
+
<sp-icon [icon]="copiedCode ? spIconCheck : spIconCopy" [size]="12"></sp-icon>
|
|
427
|
+
<span>{{ (copiedCode ? 'SHARE.COPIED' : 'IFRAME_MODAL.COPY_CODE') | translate }}</span>
|
|
428
|
+
</sp-button>
|
|
429
|
+
</div>
|
|
277
430
|
</div>
|
|
278
431
|
</div>
|
|
279
|
-
|
|
432
|
+
}
|
|
280
433
|
|
|
281
434
|
<!-- Security & Access Section -->
|
|
282
435
|
<div class="p-3.5 rounded-xl bg-base-200/60 border border-base-300">
|
|
@@ -385,7 +538,7 @@ class IframeModalComponent {
|
|
|
385
538
|
</div>
|
|
386
539
|
</div>
|
|
387
540
|
</app-basic-modal>
|
|
388
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: BasicModalComponent, selector: "app-basic-modal", inputs: ["title", "isOpen", "showFooter", "isSubmitDisabled"], outputs: ["closeEvent", "submitEvent"] }, { kind: "component", type: SpButtonComponent, selector: "sp-button", inputs: ["variant", "size", "type", "disabled", "loading", "active", "tooltip", "customClass", "fullWidth", "showTextWhileLoading"], outputs: ["clicked"] }, { kind: "component", type: SpIconComponent, selector: "sp-icon", inputs: ["icon", "name", "size", "color", "fill", "strokeWidth", "class", "ariaLabel"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] }); }
|
|
541
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: BasicModalComponent, selector: "app-basic-modal", inputs: ["title", "isOpen", "showFooter", "isSubmitDisabled"], outputs: ["closeEvent", "submitEvent"] }, { kind: "component", type: SpButtonComponent, selector: "sp-button", inputs: ["variant", "size", "type", "disabled", "loading", "active", "tooltip", "customClass", "fullWidth", "showTextWhileLoading"], outputs: ["clicked", "buttonClick"] }, { kind: "component", type: SpIconComponent, selector: "sp-icon", inputs: ["icon", "name", "size", "color", "fill", "strokeWidth", "class", "ariaLabel"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] }); }
|
|
389
542
|
}
|
|
390
543
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: IframeModalComponent, decorators: [{
|
|
391
544
|
type: Component,
|
|
@@ -402,7 +555,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
402
555
|
],
|
|
403
556
|
template: `
|
|
404
557
|
<app-basic-modal
|
|
405
|
-
[title]="'IFRAME_MODAL.TITLE' | translate"
|
|
558
|
+
[title]="(activeTab === 'reviewer' ? ('IFRAME_MODAL.REVIEWER_TAB' | translate) : ('IFRAME_MODAL.FLIPBOOK_TAB' | translate)) || ('SHARE.TITLE' | translate)"
|
|
406
559
|
[isOpen]="true"
|
|
407
560
|
[showFooter]="false"
|
|
408
561
|
(closeEvent)="close()"
|
|
@@ -429,77 +582,167 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
429
582
|
</button>
|
|
430
583
|
</div>
|
|
431
584
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
585
|
+
@if (activeTab === 'flipbook') {
|
|
586
|
+
<button
|
|
587
|
+
type="button"
|
|
588
|
+
class="btn btn-xs btn-ghost gap-1 text-xs"
|
|
589
|
+
(click)="openInNewTab()"
|
|
590
|
+
[title]="'IFRAME_MODAL.FULLSCREEN' | translate">
|
|
591
|
+
<sp-icon [icon]="spIconExternalLink" [size]="13"></sp-icon>
|
|
592
|
+
<span>{{ 'IFRAME_MODAL.FULLSCREEN' | translate }}</span>
|
|
593
|
+
</button>
|
|
594
|
+
}
|
|
439
595
|
</div>
|
|
440
596
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
<
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
</
|
|
597
|
+
@if (activeTab === 'flipbook' && isOutOfDate) {
|
|
598
|
+
<div class="flex items-center gap-2.5 p-3 bg-warning/15 border border-warning/30 rounded-xl text-xs text-warning-content">
|
|
599
|
+
<sp-icon [icon]="spIconAlert" [size]="16" class="text-warning shrink-0"></sp-icon>
|
|
600
|
+
<div class="leading-snug">
|
|
601
|
+
<p class="font-semibold">{{ 'SHARE.FLIPBOOK_OUT_OF_DATE' | translate }}</p>
|
|
602
|
+
@if (lastGeneratedAt) {
|
|
603
|
+
<p class="text-[11px] opacity-80">{{ 'SHARE.FLIPBOOK_LAST_UPDATE' | translate: { date: formatFlipbookDate(lastGeneratedAt) } }}</p>
|
|
604
|
+
}
|
|
605
|
+
</div>
|
|
450
606
|
</div>
|
|
607
|
+
}
|
|
451
608
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
609
|
+
@if (activeTab === 'reviewer') {
|
|
610
|
+
<!-- Reviewer: QR Code on Left, Link & Actions on Right -->
|
|
611
|
+
<div class="flex flex-col md:flex-row items-center gap-6 p-4 bg-base-100 rounded-2xl border border-base-200 shadow-sm">
|
|
612
|
+
<!-- Left: QR Code -->
|
|
613
|
+
<div class="flex flex-col items-center text-center gap-2 w-full md:w-5/12">
|
|
614
|
+
<div class="p-2 bg-white rounded-xl border border-base-300 shadow-sm flex items-center justify-center">
|
|
615
|
+
<div #qrContainerReviewer class="flex items-center justify-center"></div>
|
|
616
|
+
</div>
|
|
617
|
+
<p class="text-xs text-base-content/65 max-w-[220px] leading-tight">
|
|
618
|
+
{{ 'IFRAME_MODAL.QR_CODE_REVIEWER_DESC' | translate }}
|
|
619
|
+
</p>
|
|
620
|
+
</div>
|
|
621
|
+
|
|
622
|
+
<!-- Right: Link & Actions -->
|
|
623
|
+
<div class="flex flex-col gap-3 w-full md:w-7/12">
|
|
624
|
+
<div>
|
|
625
|
+
<label class="font-medium text-xs text-base-content/75 uppercase tracking-wider block mb-1.5">
|
|
626
|
+
{{ 'IFRAME_MODAL.LINK_TO_ANNOTATE' | translate }}
|
|
627
|
+
</label>
|
|
628
|
+
<div class="flex gap-2">
|
|
629
|
+
<input
|
|
630
|
+
type="text"
|
|
631
|
+
[value]="currentLink"
|
|
632
|
+
readonly
|
|
633
|
+
class="input input-sm input-bordered w-full font-mono text-xs bg-base-200" />
|
|
634
|
+
<sp-button
|
|
635
|
+
[variant]="copiedLink ? 'success' : 'primary'"
|
|
636
|
+
size="sm"
|
|
637
|
+
(clicked)="copyLink(false)">
|
|
638
|
+
<sp-icon [icon]="copiedLink ? spIconCheck : spIconCopy" [size]="12"></sp-icon>
|
|
639
|
+
<span>{{ (copiedLink ? 'SHARE.COPIED' : 'IFRAME_MODAL.COPY_LINK') | translate }}</span>
|
|
640
|
+
</sp-button>
|
|
641
|
+
</div>
|
|
642
|
+
|
|
643
|
+
@if (reviewerIsPassword && reviewerPassword) {
|
|
644
|
+
<button
|
|
645
|
+
type="button"
|
|
646
|
+
class="btn btn-xs btn-outline btn-neutral mt-2 w-full gap-1.5 justify-start text-[11px]"
|
|
647
|
+
(click)="copyLink(true)">
|
|
648
|
+
<sp-icon [icon]="spIconLock" [size]="12"></sp-icon>
|
|
649
|
+
<span>{{ 'IFRAME_MODAL.COPY_WITH_PASSWORD' | translate }}</span>
|
|
650
|
+
</button>
|
|
651
|
+
}
|
|
652
|
+
</div>
|
|
653
|
+
|
|
654
|
+
<div class="pt-1">
|
|
464
655
|
<sp-button
|
|
465
|
-
|
|
466
|
-
size="
|
|
467
|
-
(clicked)="
|
|
468
|
-
<sp-icon [icon]="
|
|
469
|
-
<span>{{
|
|
656
|
+
variant="primary"
|
|
657
|
+
size="sm"
|
|
658
|
+
(clicked)="openInNewTab()">
|
|
659
|
+
<sp-icon [icon]="spIconExternalLink" [size]="14"></sp-icon>
|
|
660
|
+
<span>{{ 'IFRAME_MODAL.OPEN_REVIEWER' | translate }}</span>
|
|
470
661
|
</sp-button>
|
|
471
662
|
</div>
|
|
472
|
-
|
|
473
|
-
@if ((activeTab === 'flipbook' && flipbookIsPassword && flipbookPassword) || (activeTab === 'reviewer' && reviewerIsPassword && reviewerPassword)) {
|
|
474
|
-
<button
|
|
475
|
-
type="button"
|
|
476
|
-
class="btn btn-xs btn-outline btn-neutral mt-1 w-full gap-1.5 justify-start text-[11px]"
|
|
477
|
-
(click)="copyLink(true)">
|
|
478
|
-
<sp-icon [icon]="spIconLock" [size]="12"></sp-icon>
|
|
479
|
-
<span>{{ 'IFRAME_MODAL.COPY_WITH_PASSWORD' | translate }}</span>
|
|
480
|
-
</button>
|
|
481
|
-
}
|
|
482
663
|
</div>
|
|
664
|
+
</div>
|
|
665
|
+
} @else {
|
|
666
|
+
<!-- Flipbook: Iframe preview on Left, Link + QR + Embed on Right -->
|
|
667
|
+
<div class="flex flex-col md:flex-row gap-6 text-sm text-base-content min-h-[300px]">
|
|
668
|
+
<!-- Preview Section (Left) -->
|
|
669
|
+
<div class="flex-1 border border-base-300 rounded-xl overflow-hidden bg-base-200/50 flex items-center justify-center min-h-[280px]">
|
|
670
|
+
<iframe
|
|
671
|
+
[src]="currentSafeUrl"
|
|
672
|
+
frameborder="0"
|
|
673
|
+
allowfullscreen
|
|
674
|
+
class="w-full h-full min-h-[280px] bg-white rounded-xl shadow-inner">
|
|
675
|
+
</iframe>
|
|
676
|
+
</div>
|
|
677
|
+
|
|
678
|
+
<!-- Code & Link Section (Right) -->
|
|
679
|
+
<div class="w-full md:w-80 flex flex-col gap-3 justify-between">
|
|
680
|
+
<div class="flex flex-col gap-1.5">
|
|
681
|
+
<label class="font-medium text-xs text-base-content/75 uppercase tracking-wider">
|
|
682
|
+
{{ 'IFRAME_MODAL.LINK_LABEL' | translate }}
|
|
683
|
+
</label>
|
|
684
|
+
<div class="flex gap-2">
|
|
685
|
+
<input
|
|
686
|
+
type="text"
|
|
687
|
+
[value]="currentLink"
|
|
688
|
+
readonly
|
|
689
|
+
class="input input-sm input-bordered w-full font-mono text-xs bg-base-200" />
|
|
690
|
+
<sp-button
|
|
691
|
+
[variant]="copiedLink ? 'success' : 'primary'"
|
|
692
|
+
size="sm"
|
|
693
|
+
(clicked)="copyLink(false)">
|
|
694
|
+
<sp-icon [icon]="copiedLink ? spIconCheck : spIconCopy" [size]="12"></sp-icon>
|
|
695
|
+
<span>{{ (copiedLink ? 'SHARE.COPIED' : 'IFRAME_MODAL.COPY_LINK') | translate }}</span>
|
|
696
|
+
</sp-button>
|
|
697
|
+
</div>
|
|
698
|
+
|
|
699
|
+
@if (flipbookIsPassword && flipbookPassword) {
|
|
700
|
+
<button
|
|
701
|
+
type="button"
|
|
702
|
+
class="btn btn-xs btn-outline btn-neutral mt-1 w-full gap-1.5 justify-start text-[11px]"
|
|
703
|
+
(click)="copyLink(true)">
|
|
704
|
+
<sp-icon [icon]="spIconLock" [size]="12"></sp-icon>
|
|
705
|
+
<span>{{ 'IFRAME_MODAL.COPY_WITH_PASSWORD' | translate }}</span>
|
|
706
|
+
</button>
|
|
707
|
+
}
|
|
708
|
+
</div>
|
|
483
709
|
|
|
484
|
-
|
|
485
|
-
<
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
710
|
+
<!-- QR Code Section -->
|
|
711
|
+
<div class="flex items-center gap-3 p-2.5 bg-base-100 rounded-xl border border-base-200 shadow-sm">
|
|
712
|
+
<div class="p-1 bg-white rounded-lg border border-base-300 shrink-0 flex items-center justify-center">
|
|
713
|
+
<div #qrContainerFlipbook class="flex items-center justify-center"></div>
|
|
714
|
+
</div>
|
|
715
|
+
<div class="flex flex-col gap-1">
|
|
716
|
+
<span class="font-semibold text-xs text-base-content flex items-center gap-1.5">
|
|
717
|
+
<sp-icon [icon]="spIconBookOpen" [size]="13" class="text-primary"></sp-icon>
|
|
718
|
+
{{ 'IFRAME_MODAL.QR_CODE_TITLE' | translate }}
|
|
719
|
+
</span>
|
|
720
|
+
<p class="text-[11px] text-base-content/60 leading-tight">
|
|
721
|
+
{{ 'IFRAME_MODAL.QR_CODE_DESC' | translate }}
|
|
722
|
+
</p>
|
|
723
|
+
</div>
|
|
724
|
+
</div>
|
|
725
|
+
|
|
726
|
+
<div class="flex flex-col gap-1.5">
|
|
727
|
+
<label class="font-medium text-xs text-base-content/75 uppercase tracking-wider">
|
|
728
|
+
{{ 'IFRAME_MODAL.INTEGRATE' | translate }}
|
|
729
|
+
</label>
|
|
730
|
+
<textarea
|
|
731
|
+
readonly
|
|
732
|
+
rows="2"
|
|
733
|
+
class="textarea textarea-bordered font-mono text-xs bg-base-200 resize-none w-full min-h-[60px]">{{ currentIframeCode }}</textarea>
|
|
734
|
+
<sp-button
|
|
735
|
+
[variant]="copiedCode ? 'success' : 'primary'"
|
|
736
|
+
size="sm"
|
|
737
|
+
customClass="w-full"
|
|
738
|
+
(clicked)="copyCode()">
|
|
739
|
+
<sp-icon [icon]="copiedCode ? spIconCheck : spIconCopy" [size]="12"></sp-icon>
|
|
740
|
+
<span>{{ (copiedCode ? 'SHARE.COPIED' : 'IFRAME_MODAL.COPY_CODE') | translate }}</span>
|
|
741
|
+
</sp-button>
|
|
742
|
+
</div>
|
|
500
743
|
</div>
|
|
501
744
|
</div>
|
|
502
|
-
|
|
745
|
+
}
|
|
503
746
|
|
|
504
747
|
<!-- Security & Access Section -->
|
|
505
748
|
<div class="p-3.5 rounded-xl bg-base-200/60 border border-base-300">
|
|
@@ -612,7 +855,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
612
855
|
}]
|
|
613
856
|
}], propDecorators: { moduleType: [{
|
|
614
857
|
type: Input
|
|
858
|
+
}], isOutOfDate: [{
|
|
859
|
+
type: Input
|
|
860
|
+
}], lastGeneratedAt: [{
|
|
861
|
+
type: Input
|
|
862
|
+
}], qrContainerReviewer: [{
|
|
863
|
+
type: ViewChild,
|
|
864
|
+
args: ['qrContainerReviewer']
|
|
865
|
+
}], qrContainerFlipbook: [{
|
|
866
|
+
type: ViewChild,
|
|
867
|
+
args: ['qrContainerFlipbook']
|
|
615
868
|
}] } });
|
|
616
869
|
|
|
617
870
|
export { IframeModalComponent };
|
|
618
|
-
//# sourceMappingURL=solidpepper-solidpepper-soliddesigner-iframe-modal.component-
|
|
871
|
+
//# sourceMappingURL=solidpepper-solidpepper-soliddesigner-iframe-modal.component-D-ajn-z9.mjs.map
|