@solidpepper/solidpepper-flipbook 0.1.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.
|
@@ -0,0 +1,2893 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Input, Component, isDevMode, signal, Injectable, effect, inject, EventEmitter, Output, HostListener, ViewChild, ViewEncapsulation } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i1$1 from '@ngx-translate/core';
|
|
6
|
+
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
7
|
+
import { BehaviorSubject, lastValueFrom, Subject } from 'rxjs';
|
|
8
|
+
import * as i1$2 from '@angular/common/http';
|
|
9
|
+
import { debounceTime } from 'rxjs/operators';
|
|
10
|
+
import { PageFlip } from 'page-flip';
|
|
11
|
+
import * as pdfjsLib from 'pdfjs-dist';
|
|
12
|
+
|
|
13
|
+
class GlobalLoaderComponent {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.isLoading = false;
|
|
16
|
+
this.hasError = false;
|
|
17
|
+
this.isSafari = false;
|
|
18
|
+
this.isInitialized = false;
|
|
19
|
+
this.errorKey = '';
|
|
20
|
+
this.progress = 0;
|
|
21
|
+
this.isDemo = false;
|
|
22
|
+
// MESSAGE
|
|
23
|
+
this.loadingMessages = [
|
|
24
|
+
'LOADER.MESSAGES.OPENING',
|
|
25
|
+
'LOADER.MESSAGES.RESOURCES',
|
|
26
|
+
'LOADER.MESSAGES.WORKSPACE',
|
|
27
|
+
'LOADER.MESSAGES.TOOLS',
|
|
28
|
+
];
|
|
29
|
+
this.currentMessageIndex = 0;
|
|
30
|
+
}
|
|
31
|
+
ngOnInit() {
|
|
32
|
+
this.messageInterval = setInterval(() => {
|
|
33
|
+
this.currentMessageIndex =
|
|
34
|
+
(this.currentMessageIndex + 1) % this.loadingMessages.length;
|
|
35
|
+
}, 2000);
|
|
36
|
+
}
|
|
37
|
+
ngOnDestroy() {
|
|
38
|
+
if (this.messageInterval) {
|
|
39
|
+
clearInterval(this.messageInterval);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: GlobalLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
43
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: GlobalLoaderComponent, isStandalone: true, selector: "app-global-loader", inputs: { isLoading: "isLoading", hasError: "hasError", isSafari: "isSafari", isInitialized: "isInitialized", errorKey: "errorKey", progress: "progress", isDemo: "isDemo" }, ngImport: i0, template: `
|
|
44
|
+
<div class="global-loader-overlay">
|
|
45
|
+
<div class="loader-logo-container">
|
|
46
|
+
<h1 class="wave-text" [class.is-error]="hasError" data-text="Flipbook">
|
|
47
|
+
Flipbook
|
|
48
|
+
</h1>
|
|
49
|
+
|
|
50
|
+
<div class="powered-by">
|
|
51
|
+
<span class="powered-by-content">
|
|
52
|
+
Powered by
|
|
53
|
+
<a
|
|
54
|
+
href="https://www.solidpepper.com/"
|
|
55
|
+
target="_blank"
|
|
56
|
+
rel="noopener noreferrer"
|
|
57
|
+
class="powered-link"
|
|
58
|
+
>
|
|
59
|
+
<svg
|
|
60
|
+
width="22"
|
|
61
|
+
height="22"
|
|
62
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
63
|
+
viewBox="0 0 144.35 138.5"
|
|
64
|
+
>
|
|
65
|
+
<g id="Calque_1-2" data-name="Calque 1">
|
|
66
|
+
<g>
|
|
67
|
+
<path
|
|
68
|
+
d="M71.83,12.3c-14.3,5.69-20.92,29.2-24.8,38.25-12.44,27.41-27.4,52.11-44.54,74.47,0,0-3.94,3.37-1.92,8.99,2.02,5.62,7.21,4.38,7.21,4.38,39.83-7.97,72.03-23.26,93.5-48.86,4.24-4.83,10.96-12.1,9.23-24.29-1.03-24.52-26.1-57.95-38.68-52.94Z"
|
|
69
|
+
fill="#e30613"
|
|
70
|
+
></path>
|
|
71
|
+
<path
|
|
72
|
+
d="M135.9,.15c-9.61-1.62-22,10.47-24.59,12.09-2.9,1.81-7.16,3.56-10.17,1.27-7.67-5.84-13.61-2.04-13.61-2.04l.12,.2c.09,.09,.18,.19,.28,.27,9.36,7.91,19.38,20.84,24.85,41.65,.53-.92,4.72-8.61,1.54-16.72-3.39-8.63,2.14-15.09,6.22-18.88,4.08-3.79,6.79-5.78,6.79-5.78,3.15-2.14,5.48-2.89,5.48-2.89,5.52-2.5,6.32,7.91,6.32,7.91,9.98-2.69,3.83-15.91-3.22-17.1Z"
|
|
73
|
+
fill="#e30613"
|
|
74
|
+
></path>
|
|
75
|
+
<path
|
|
76
|
+
d="M58.28,41.08c.2-1.44,.51-2.86,.91-4.26,.41-1.39,.92-2.76,1.52-4.09,1.19-2.66,2.76-5.14,4.69-7.32,.96-1.09,2.03-2.09,3.18-2.98,1.16-.87,2.42-1.67,3.8-2.17,1.38-.51,2.89-.74,4.38-.53,1.48,.19,2.93,.9,3.92,2.04l-.21,.48c-1.36-.05-2.52,.06-3.64,.37-1.11,.28-2.16,.71-3.2,1.23-1.03,.53-2.07,1.11-3.05,1.83-.99,.71-1.93,1.54-2.83,2.42-1.8,1.78-3.44,3.82-4.92,6.04-1.49,2.22-2.81,4.61-4.1,7.11l-.46-.17Z"
|
|
77
|
+
fill="#fff"
|
|
78
|
+
></path>
|
|
79
|
+
<path
|
|
80
|
+
d="M13.47,128.6c.92-.5,1.84-.96,2.76-1.43,.92-.48,1.86-.9,2.77-1.39,1.82-.99,3.68-1.85,5.5-2.84,3.65-1.92,7.28-3.85,10.89-5.82,7.21-3.96,14.34-8.04,21.35-12.35,7.01-4.31,13.91-8.81,20.68-13.54l5.06-3.6,5.01-3.7c1.65-1.26,3.28-2.56,4.96-3.82,.83-.64,1.63-1.32,2.45-1.98,.83-.65,1.65-1.31,2.49-1.95l.34,.38c-1.29,1.75-2.62,3.46-3.99,5.14-1.43,1.61-2.85,3.24-4.34,4.8-1.52,1.51-3.03,3.04-4.6,4.5-1.59,1.42-3.18,2.86-4.8,4.23-6.53,5.48-13.5,10.28-20.7,14.56-7.2,4.29-14.63,8.11-22.24,11.38-3.8,1.65-7.66,3.14-11.56,4.48-.97,.35-1.95,.66-2.94,.97-.98,.32-1.96,.62-2.95,.91-1.97,.59-3.97,1.09-5.96,1.57l-.15-.51Z"
|
|
81
|
+
fill="#fff"
|
|
82
|
+
></path>
|
|
83
|
+
<path
|
|
84
|
+
d="M99.27,17.04c.9,.63,1.77,1.14,2.67,1.5,.9,.35,1.82,.55,2.75,.57,.94,.03,1.88-.14,2.83-.43,.95-.29,1.88-.73,2.87-1.18l.29,.43c-.73,.9-1.63,1.65-2.65,2.2-1.02,.55-2.18,.87-3.36,.87-1.18,0-2.37-.33-3.38-.97-1.01-.63-1.86-1.54-2.39-2.62l.36-.36Z"
|
|
85
|
+
fill="#fff"
|
|
86
|
+
></path>
|
|
87
|
+
</g>
|
|
88
|
+
</g>
|
|
89
|
+
</svg>
|
|
90
|
+
<b>Solid <span class="brand-highlight">Pepper</span></b>
|
|
91
|
+
</a>
|
|
92
|
+
</span>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div *ngIf="!hasError" class="loading-message-container">
|
|
97
|
+
<p class="loading-message">
|
|
98
|
+
{{ loadingMessages[currentMessageIndex] | translate }}
|
|
99
|
+
</p>
|
|
100
|
+
|
|
101
|
+
<!-- Progress Bar -->
|
|
102
|
+
<div *ngIf="progress > 0" class="progress-container">
|
|
103
|
+
<div class="progress-track">
|
|
104
|
+
<div class="progress-fill" [style.width.%]="progress"></div>
|
|
105
|
+
</div>
|
|
106
|
+
<span class="progress-text">{{ progress }}%</span>
|
|
107
|
+
<p *ngIf="isDemo" class="demo-disclaimer">
|
|
108
|
+
{{ 'LOADER.DEMO_DISCLAIMER' | translate }}
|
|
109
|
+
</p>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<div
|
|
114
|
+
*ngIf="hasError || isSafari"
|
|
115
|
+
class="loader-error-box"
|
|
116
|
+
[class.is-safari]="isSafari"
|
|
117
|
+
>
|
|
118
|
+
<div class="error-icon">
|
|
119
|
+
<svg
|
|
120
|
+
*ngIf="!isSafari"
|
|
121
|
+
width="32"
|
|
122
|
+
height="32"
|
|
123
|
+
viewBox="0 0 24 24"
|
|
124
|
+
fill="none"
|
|
125
|
+
stroke="#ff4444"
|
|
126
|
+
stroke-width="2"
|
|
127
|
+
stroke-linecap="round"
|
|
128
|
+
stroke-linejoin="round"
|
|
129
|
+
>
|
|
130
|
+
<path
|
|
131
|
+
d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
|
|
132
|
+
></path>
|
|
133
|
+
<line x1="12" y1="9" x2="12" y2="13"></line>
|
|
134
|
+
<line x1="12" y1="17" x2="12.01" y2="17"></line>
|
|
135
|
+
</svg>
|
|
136
|
+
<svg
|
|
137
|
+
*ngIf="isSafari"
|
|
138
|
+
width="32"
|
|
139
|
+
height="32"
|
|
140
|
+
viewBox="0 0 24 24"
|
|
141
|
+
fill="none"
|
|
142
|
+
stroke="var(--warning)"
|
|
143
|
+
stroke-width="2"
|
|
144
|
+
stroke-linecap="round"
|
|
145
|
+
stroke-linejoin="round"
|
|
146
|
+
>
|
|
147
|
+
<circle cx="12" cy="12" r="10"></circle>
|
|
148
|
+
<line x1="12" y1="8" x2="12" y2="12"></line>
|
|
149
|
+
<line x1="12" y1="16" x2="12.01" y2="16"></line>
|
|
150
|
+
</svg>
|
|
151
|
+
</div>
|
|
152
|
+
<div class="error-content">
|
|
153
|
+
<h3>
|
|
154
|
+
{{
|
|
155
|
+
(isSafari ? 'BROWSER_NOT_SUPPORTED.TITLE' : 'GLOBAL.ERROR')
|
|
156
|
+
| translate
|
|
157
|
+
}}
|
|
158
|
+
</h3>
|
|
159
|
+
<p *ngIf="!isSafari">{{ errorKey | translate }}</p>
|
|
160
|
+
<div *ngIf="isSafari" class="safari-content">
|
|
161
|
+
<p class="message">
|
|
162
|
+
{{ 'BROWSER_NOT_SUPPORTED.MESSAGE' | translate }}
|
|
163
|
+
</p>
|
|
164
|
+
<p class="suggestion">
|
|
165
|
+
{{ 'BROWSER_NOT_SUPPORTED.SUGGESTION' | translate }}
|
|
166
|
+
</p>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
`, isInline: true, styles: [":host{display:block;position:absolute;inset:0;z-index:999999}.global-loader-overlay{width:100%;height:100%;background-color:var(--gray-4, #2a2a2e);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2rem}.loader-logo-container{display:flex;flex-direction:column;align-items:flex-end;animation:float 4s ease-in-out infinite}@keyframes float{0%,to{transform:translateY(0)}50%{transform:translateY(-12px)}}.wave-text{position:relative;font-family:Arial Black,Impact,system-ui,sans-serif;font-size:clamp(2.5rem,6vw,4rem);font-weight:900;letter-spacing:2px;color:transparent;z-index:1;-webkit-text-stroke:1px rgba(255,255,255,.4);margin:0}.wave-text:before,.wave-text:after{content:attr(data-text);position:absolute;left:0;top:0;width:100%;height:100%;z-index:-1;-webkit-text-stroke:1px rgba(255,255,255,.4)}.wave-text:before{color:var(--active);opacity:.35;animation:wave-fill-back 5s ease-in-out infinite alternate}.wave-text:after{color:var(--active);opacity:.95;animation:wave-fill-front 4s ease-in-out infinite alternate}.wave-text.is-error:before,.wave-text.is-error:after{color:#f44}.powered-by{margin-top:0;margin-right:.5rem;opacity:0;animation:fadeIn 1s ease-out .5s forwards}.powered-by-content{display:flex;align-items:center;gap:.5rem;font-family:system-ui,sans-serif;font-size:.85rem;color:var(--gray-1, #aaa)}.powered-link{display:flex;align-items:center;text-decoration:none;color:#fff;transition:transform .2s ease,opacity .2s ease}.powered-link:hover{transform:scale(1.05);opacity:.8}.brand-highlight{color:#e30613}@keyframes pulseText{0%,to{opacity:.5}50%{opacity:1}}.loading-message-container{display:flex;flex-direction:column;align-items:center;min-height:80px;margin-top:-1rem;opacity:0;animation:fadeIn .5s ease-out .5s forwards}.loading-message{margin:0;font-family:system-ui,sans-serif;font-size:1rem;font-weight:500;color:var(--gray-1, #ccc);animation:pulseText 2s infinite ease-in-out}.progress-container{margin-top:1.5rem;width:300px;display:flex;flex-direction:column;align-items:center;gap:.5rem}.progress-track{width:100%;height:6px;background:#ffffff0d;border-radius:100px;overflow:hidden}.progress-fill{height:100%;background:var(--active, #007bff);border-radius:100px;transition:width .3s cubic-bezier(.4,0,.2,1);box-shadow:0 0 10px var(--active-alpha-medium, rgba(0, 123, 255, .5))}.progress-text{font-family:Inter,system-ui,sans-serif;font-size:.85rem;font-weight:600;color:var(--active, #007bff)}.demo-disclaimer{margin-top:.5rem;font-size:.75rem;color:var(--gray-1, #888);text-align:center;max-width:250px;line-height:1.3;font-style:italic;opacity:.8}.loader-error-box{background:#1e1e22f2;border-left:4px solid #ff4444;box-shadow:0 10px 25px #0006;border-radius:6px;padding:1.2rem 1.5rem;display:flex;align-items:flex-start;gap:1.5rem;text-align:left;max-width:500px;animation:slideUp .4s ease-out forwards}.loader-error-box.is-safari{border-left-color:var(--warning, #ffaa2c)}.error-icon{display:flex;align-items:center;justify-content:center;margin-top:4px;flex-shrink:0}.error-content{flex:1}.error-content h3{margin:0 0 .6rem;font-size:1.2rem;color:#f44;font-weight:700}.is-safari h3{color:var(--warning, #ffaa2c)}.error-content p{margin:0;font-size:.95rem;color:#eee;line-height:1.5}.safari-content .suggestion{color:#aaa;font-size:.85rem;margin-top:.5rem;margin-bottom:1.2rem}.browser-logos{display:flex;align-items:center;gap:1.5rem;margin-top:.5rem}.browser-item{display:flex;align-items:center;gap:.5rem}.browser-item img{width:24px;height:24px;object-fit:contain}.browser-item span{font-size:.85rem;color:#fff;font-weight:500}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes wave-fill-front{0%{clip-path:polygon(0% 110%,20% 105%,40% 112%,60% 105%,80% 110%,100% 105%,100% 100%,0% 100%)}50%{clip-path:polygon(0% 55%,20% 62%,40% 53%,60% 60%,80% 54%,100% 61%,100% 100%,0% 100%)}to{clip-path:polygon(0% -10%,20% -5%,40% -12%,60% -5%,80% -10%,100% -5%,100% 100%,0% 100%)}}@keyframes wave-fill-back{0%{clip-path:polygon(0% 105%,20% 110%,40% 105%,60% 112%,80% 105%,100% 110%,100% 100%,0% 100%)}50%{clip-path:polygon(0% 61%,20% 54%,40% 60%,60% 53%,80% 62%,100% 55%,100% 100%,0% 100%)}to{clip-path:polygon(0% -5%,20% -10%,40% -5%,60% -12%,80% -5%,100% -10%,100% 100%,0% 100%)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
172
|
+
}
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: GlobalLoaderComponent, decorators: [{
|
|
174
|
+
type: Component,
|
|
175
|
+
args: [{ selector: 'app-global-loader', standalone: true, imports: [CommonModule, TranslateModule], template: `
|
|
176
|
+
<div class="global-loader-overlay">
|
|
177
|
+
<div class="loader-logo-container">
|
|
178
|
+
<h1 class="wave-text" [class.is-error]="hasError" data-text="Flipbook">
|
|
179
|
+
Flipbook
|
|
180
|
+
</h1>
|
|
181
|
+
|
|
182
|
+
<div class="powered-by">
|
|
183
|
+
<span class="powered-by-content">
|
|
184
|
+
Powered by
|
|
185
|
+
<a
|
|
186
|
+
href="https://www.solidpepper.com/"
|
|
187
|
+
target="_blank"
|
|
188
|
+
rel="noopener noreferrer"
|
|
189
|
+
class="powered-link"
|
|
190
|
+
>
|
|
191
|
+
<svg
|
|
192
|
+
width="22"
|
|
193
|
+
height="22"
|
|
194
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
195
|
+
viewBox="0 0 144.35 138.5"
|
|
196
|
+
>
|
|
197
|
+
<g id="Calque_1-2" data-name="Calque 1">
|
|
198
|
+
<g>
|
|
199
|
+
<path
|
|
200
|
+
d="M71.83,12.3c-14.3,5.69-20.92,29.2-24.8,38.25-12.44,27.41-27.4,52.11-44.54,74.47,0,0-3.94,3.37-1.92,8.99,2.02,5.62,7.21,4.38,7.21,4.38,39.83-7.97,72.03-23.26,93.5-48.86,4.24-4.83,10.96-12.1,9.23-24.29-1.03-24.52-26.1-57.95-38.68-52.94Z"
|
|
201
|
+
fill="#e30613"
|
|
202
|
+
></path>
|
|
203
|
+
<path
|
|
204
|
+
d="M135.9,.15c-9.61-1.62-22,10.47-24.59,12.09-2.9,1.81-7.16,3.56-10.17,1.27-7.67-5.84-13.61-2.04-13.61-2.04l.12,.2c.09,.09,.18,.19,.28,.27,9.36,7.91,19.38,20.84,24.85,41.65,.53-.92,4.72-8.61,1.54-16.72-3.39-8.63,2.14-15.09,6.22-18.88,4.08-3.79,6.79-5.78,6.79-5.78,3.15-2.14,5.48-2.89,5.48-2.89,5.52-2.5,6.32,7.91,6.32,7.91,9.98-2.69,3.83-15.91-3.22-17.1Z"
|
|
205
|
+
fill="#e30613"
|
|
206
|
+
></path>
|
|
207
|
+
<path
|
|
208
|
+
d="M58.28,41.08c.2-1.44,.51-2.86,.91-4.26,.41-1.39,.92-2.76,1.52-4.09,1.19-2.66,2.76-5.14,4.69-7.32,.96-1.09,2.03-2.09,3.18-2.98,1.16-.87,2.42-1.67,3.8-2.17,1.38-.51,2.89-.74,4.38-.53,1.48,.19,2.93,.9,3.92,2.04l-.21,.48c-1.36-.05-2.52,.06-3.64,.37-1.11,.28-2.16,.71-3.2,1.23-1.03,.53-2.07,1.11-3.05,1.83-.99,.71-1.93,1.54-2.83,2.42-1.8,1.78-3.44,3.82-4.92,6.04-1.49,2.22-2.81,4.61-4.1,7.11l-.46-.17Z"
|
|
209
|
+
fill="#fff"
|
|
210
|
+
></path>
|
|
211
|
+
<path
|
|
212
|
+
d="M13.47,128.6c.92-.5,1.84-.96,2.76-1.43,.92-.48,1.86-.9,2.77-1.39,1.82-.99,3.68-1.85,5.5-2.84,3.65-1.92,7.28-3.85,10.89-5.82,7.21-3.96,14.34-8.04,21.35-12.35,7.01-4.31,13.91-8.81,20.68-13.54l5.06-3.6,5.01-3.7c1.65-1.26,3.28-2.56,4.96-3.82,.83-.64,1.63-1.32,2.45-1.98,.83-.65,1.65-1.31,2.49-1.95l.34,.38c-1.29,1.75-2.62,3.46-3.99,5.14-1.43,1.61-2.85,3.24-4.34,4.8-1.52,1.51-3.03,3.04-4.6,4.5-1.59,1.42-3.18,2.86-4.8,4.23-6.53,5.48-13.5,10.28-20.7,14.56-7.2,4.29-14.63,8.11-22.24,11.38-3.8,1.65-7.66,3.14-11.56,4.48-.97,.35-1.95,.66-2.94,.97-.98,.32-1.96,.62-2.95,.91-1.97,.59-3.97,1.09-5.96,1.57l-.15-.51Z"
|
|
213
|
+
fill="#fff"
|
|
214
|
+
></path>
|
|
215
|
+
<path
|
|
216
|
+
d="M99.27,17.04c.9,.63,1.77,1.14,2.67,1.5,.9,.35,1.82,.55,2.75,.57,.94,.03,1.88-.14,2.83-.43,.95-.29,1.88-.73,2.87-1.18l.29,.43c-.73,.9-1.63,1.65-2.65,2.2-1.02,.55-2.18,.87-3.36,.87-1.18,0-2.37-.33-3.38-.97-1.01-.63-1.86-1.54-2.39-2.62l.36-.36Z"
|
|
217
|
+
fill="#fff"
|
|
218
|
+
></path>
|
|
219
|
+
</g>
|
|
220
|
+
</g>
|
|
221
|
+
</svg>
|
|
222
|
+
<b>Solid <span class="brand-highlight">Pepper</span></b>
|
|
223
|
+
</a>
|
|
224
|
+
</span>
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
|
|
228
|
+
<div *ngIf="!hasError" class="loading-message-container">
|
|
229
|
+
<p class="loading-message">
|
|
230
|
+
{{ loadingMessages[currentMessageIndex] | translate }}
|
|
231
|
+
</p>
|
|
232
|
+
|
|
233
|
+
<!-- Progress Bar -->
|
|
234
|
+
<div *ngIf="progress > 0" class="progress-container">
|
|
235
|
+
<div class="progress-track">
|
|
236
|
+
<div class="progress-fill" [style.width.%]="progress"></div>
|
|
237
|
+
</div>
|
|
238
|
+
<span class="progress-text">{{ progress }}%</span>
|
|
239
|
+
<p *ngIf="isDemo" class="demo-disclaimer">
|
|
240
|
+
{{ 'LOADER.DEMO_DISCLAIMER' | translate }}
|
|
241
|
+
</p>
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
|
|
245
|
+
<div
|
|
246
|
+
*ngIf="hasError || isSafari"
|
|
247
|
+
class="loader-error-box"
|
|
248
|
+
[class.is-safari]="isSafari"
|
|
249
|
+
>
|
|
250
|
+
<div class="error-icon">
|
|
251
|
+
<svg
|
|
252
|
+
*ngIf="!isSafari"
|
|
253
|
+
width="32"
|
|
254
|
+
height="32"
|
|
255
|
+
viewBox="0 0 24 24"
|
|
256
|
+
fill="none"
|
|
257
|
+
stroke="#ff4444"
|
|
258
|
+
stroke-width="2"
|
|
259
|
+
stroke-linecap="round"
|
|
260
|
+
stroke-linejoin="round"
|
|
261
|
+
>
|
|
262
|
+
<path
|
|
263
|
+
d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
|
|
264
|
+
></path>
|
|
265
|
+
<line x1="12" y1="9" x2="12" y2="13"></line>
|
|
266
|
+
<line x1="12" y1="17" x2="12.01" y2="17"></line>
|
|
267
|
+
</svg>
|
|
268
|
+
<svg
|
|
269
|
+
*ngIf="isSafari"
|
|
270
|
+
width="32"
|
|
271
|
+
height="32"
|
|
272
|
+
viewBox="0 0 24 24"
|
|
273
|
+
fill="none"
|
|
274
|
+
stroke="var(--warning)"
|
|
275
|
+
stroke-width="2"
|
|
276
|
+
stroke-linecap="round"
|
|
277
|
+
stroke-linejoin="round"
|
|
278
|
+
>
|
|
279
|
+
<circle cx="12" cy="12" r="10"></circle>
|
|
280
|
+
<line x1="12" y1="8" x2="12" y2="12"></line>
|
|
281
|
+
<line x1="12" y1="16" x2="12.01" y2="16"></line>
|
|
282
|
+
</svg>
|
|
283
|
+
</div>
|
|
284
|
+
<div class="error-content">
|
|
285
|
+
<h3>
|
|
286
|
+
{{
|
|
287
|
+
(isSafari ? 'BROWSER_NOT_SUPPORTED.TITLE' : 'GLOBAL.ERROR')
|
|
288
|
+
| translate
|
|
289
|
+
}}
|
|
290
|
+
</h3>
|
|
291
|
+
<p *ngIf="!isSafari">{{ errorKey | translate }}</p>
|
|
292
|
+
<div *ngIf="isSafari" class="safari-content">
|
|
293
|
+
<p class="message">
|
|
294
|
+
{{ 'BROWSER_NOT_SUPPORTED.MESSAGE' | translate }}
|
|
295
|
+
</p>
|
|
296
|
+
<p class="suggestion">
|
|
297
|
+
{{ 'BROWSER_NOT_SUPPORTED.SUGGESTION' | translate }}
|
|
298
|
+
</p>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
</div>
|
|
302
|
+
</div>
|
|
303
|
+
`, styles: [":host{display:block;position:absolute;inset:0;z-index:999999}.global-loader-overlay{width:100%;height:100%;background-color:var(--gray-4, #2a2a2e);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2rem}.loader-logo-container{display:flex;flex-direction:column;align-items:flex-end;animation:float 4s ease-in-out infinite}@keyframes float{0%,to{transform:translateY(0)}50%{transform:translateY(-12px)}}.wave-text{position:relative;font-family:Arial Black,Impact,system-ui,sans-serif;font-size:clamp(2.5rem,6vw,4rem);font-weight:900;letter-spacing:2px;color:transparent;z-index:1;-webkit-text-stroke:1px rgba(255,255,255,.4);margin:0}.wave-text:before,.wave-text:after{content:attr(data-text);position:absolute;left:0;top:0;width:100%;height:100%;z-index:-1;-webkit-text-stroke:1px rgba(255,255,255,.4)}.wave-text:before{color:var(--active);opacity:.35;animation:wave-fill-back 5s ease-in-out infinite alternate}.wave-text:after{color:var(--active);opacity:.95;animation:wave-fill-front 4s ease-in-out infinite alternate}.wave-text.is-error:before,.wave-text.is-error:after{color:#f44}.powered-by{margin-top:0;margin-right:.5rem;opacity:0;animation:fadeIn 1s ease-out .5s forwards}.powered-by-content{display:flex;align-items:center;gap:.5rem;font-family:system-ui,sans-serif;font-size:.85rem;color:var(--gray-1, #aaa)}.powered-link{display:flex;align-items:center;text-decoration:none;color:#fff;transition:transform .2s ease,opacity .2s ease}.powered-link:hover{transform:scale(1.05);opacity:.8}.brand-highlight{color:#e30613}@keyframes pulseText{0%,to{opacity:.5}50%{opacity:1}}.loading-message-container{display:flex;flex-direction:column;align-items:center;min-height:80px;margin-top:-1rem;opacity:0;animation:fadeIn .5s ease-out .5s forwards}.loading-message{margin:0;font-family:system-ui,sans-serif;font-size:1rem;font-weight:500;color:var(--gray-1, #ccc);animation:pulseText 2s infinite ease-in-out}.progress-container{margin-top:1.5rem;width:300px;display:flex;flex-direction:column;align-items:center;gap:.5rem}.progress-track{width:100%;height:6px;background:#ffffff0d;border-radius:100px;overflow:hidden}.progress-fill{height:100%;background:var(--active, #007bff);border-radius:100px;transition:width .3s cubic-bezier(.4,0,.2,1);box-shadow:0 0 10px var(--active-alpha-medium, rgba(0, 123, 255, .5))}.progress-text{font-family:Inter,system-ui,sans-serif;font-size:.85rem;font-weight:600;color:var(--active, #007bff)}.demo-disclaimer{margin-top:.5rem;font-size:.75rem;color:var(--gray-1, #888);text-align:center;max-width:250px;line-height:1.3;font-style:italic;opacity:.8}.loader-error-box{background:#1e1e22f2;border-left:4px solid #ff4444;box-shadow:0 10px 25px #0006;border-radius:6px;padding:1.2rem 1.5rem;display:flex;align-items:flex-start;gap:1.5rem;text-align:left;max-width:500px;animation:slideUp .4s ease-out forwards}.loader-error-box.is-safari{border-left-color:var(--warning, #ffaa2c)}.error-icon{display:flex;align-items:center;justify-content:center;margin-top:4px;flex-shrink:0}.error-content{flex:1}.error-content h3{margin:0 0 .6rem;font-size:1.2rem;color:#f44;font-weight:700}.is-safari h3{color:var(--warning, #ffaa2c)}.error-content p{margin:0;font-size:.95rem;color:#eee;line-height:1.5}.safari-content .suggestion{color:#aaa;font-size:.85rem;margin-top:.5rem;margin-bottom:1.2rem}.browser-logos{display:flex;align-items:center;gap:1.5rem;margin-top:.5rem}.browser-item{display:flex;align-items:center;gap:.5rem}.browser-item img{width:24px;height:24px;object-fit:contain}.browser-item span{font-size:.85rem;color:#fff;font-weight:500}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes wave-fill-front{0%{clip-path:polygon(0% 110%,20% 105%,40% 112%,60% 105%,80% 110%,100% 105%,100% 100%,0% 100%)}50%{clip-path:polygon(0% 55%,20% 62%,40% 53%,60% 60%,80% 54%,100% 61%,100% 100%,0% 100%)}to{clip-path:polygon(0% -10%,20% -5%,40% -12%,60% -5%,80% -10%,100% -5%,100% 100%,0% 100%)}}@keyframes wave-fill-back{0%{clip-path:polygon(0% 105%,20% 110%,40% 105%,60% 112%,80% 105%,100% 110%,100% 100%,0% 100%)}50%{clip-path:polygon(0% 61%,20% 54%,40% 60%,60% 53%,80% 62%,100% 55%,100% 100%,0% 100%)}to{clip-path:polygon(0% -5%,20% -10%,40% -5%,60% -12%,80% -5%,100% -10%,100% 100%,0% 100%)}}\n"] }]
|
|
304
|
+
}], propDecorators: { isLoading: [{
|
|
305
|
+
type: Input
|
|
306
|
+
}], hasError: [{
|
|
307
|
+
type: Input
|
|
308
|
+
}], isSafari: [{
|
|
309
|
+
type: Input
|
|
310
|
+
}], isInitialized: [{
|
|
311
|
+
type: Input
|
|
312
|
+
}], errorKey: [{
|
|
313
|
+
type: Input
|
|
314
|
+
}], progress: [{
|
|
315
|
+
type: Input
|
|
316
|
+
}], isDemo: [{
|
|
317
|
+
type: Input
|
|
318
|
+
}] } });
|
|
319
|
+
|
|
320
|
+
class SolidLog {
|
|
321
|
+
static { this.prefix = '[SolidLog]'; }
|
|
322
|
+
/**
|
|
323
|
+
* Logs a message to the console in development mode.
|
|
324
|
+
* @param message The message to log.
|
|
325
|
+
* @param optionalParams Additional parameters to log.
|
|
326
|
+
*/
|
|
327
|
+
static log(message, ...optionalParams) {
|
|
328
|
+
if (isDevMode()) {
|
|
329
|
+
console.log(`%c${this.prefix}`, 'color: #4CAF50; font-weight: bold;', message, ...optionalParams);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Logs an info message to the console in development mode.
|
|
334
|
+
* @param message The message to log.
|
|
335
|
+
* @param optionalParams Additional parameters to log.
|
|
336
|
+
*/
|
|
337
|
+
static info(message, ...optionalParams) {
|
|
338
|
+
if (isDevMode()) {
|
|
339
|
+
console.info(`%c${this.prefix}`, 'color: #2196F3; font-weight: bold;', message, ...optionalParams);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Logs a warning message to the console in development mode.
|
|
344
|
+
* @param message The message to log.
|
|
345
|
+
* @param optionalParams Additional parameters to log.
|
|
346
|
+
*/
|
|
347
|
+
static warn(message, ...optionalParams) {
|
|
348
|
+
if (isDevMode()) {
|
|
349
|
+
console.warn(`%c${this.prefix}`, 'color: #FFC107; font-weight: bold;', message, ...optionalParams);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Logs an error message to the console in development mode.
|
|
354
|
+
* @param message The message to log.
|
|
355
|
+
* @param optionalParams Additional parameters to log.
|
|
356
|
+
*/
|
|
357
|
+
static error(message, ...optionalParams) {
|
|
358
|
+
if (isDevMode()) {
|
|
359
|
+
console.error(`%c${this.prefix}`, 'color: #F44336; font-weight: bold;', message, ...optionalParams);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Logs a debug message to the console in development mode.
|
|
364
|
+
* @param message The message to log.
|
|
365
|
+
* @param optionalParams Additional parameters to log.
|
|
366
|
+
*/
|
|
367
|
+
static debug(message, ...optionalParams) {
|
|
368
|
+
if (isDevMode()) {
|
|
369
|
+
console.debug(`%c${this.prefix}`, 'color: #9E9E9E; font-weight: bold;', message, ...optionalParams);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
var LoadingError;
|
|
375
|
+
(function (LoadingError) {
|
|
376
|
+
LoadingError["NONE"] = "";
|
|
377
|
+
LoadingError["DOCUMENT"] = "LOADER.ERRORS.DOCUMENT";
|
|
378
|
+
LoadingError["PAGE"] = "LOADER.ERRORS.PAGE";
|
|
379
|
+
})(LoadingError || (LoadingError = {}));
|
|
380
|
+
class LoadingService {
|
|
381
|
+
constructor() {
|
|
382
|
+
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
383
|
+
this.hasError = signal(false, ...(ngDevMode ? [{ debugName: "hasError" }] : []));
|
|
384
|
+
this.errorKey = signal(LoadingError.NONE, ...(ngDevMode ? [{ debugName: "errorKey" }] : []));
|
|
385
|
+
this.isCanvasLoading = signal(false, ...(ngDevMode ? [{ debugName: "isCanvasLoading" }] : []));
|
|
386
|
+
this.canvasHasError = signal(false, ...(ngDevMode ? [{ debugName: "canvasHasError" }] : []));
|
|
387
|
+
this.canvasErrorKey = signal(LoadingError.NONE, ...(ngDevMode ? [{ debugName: "canvasErrorKey" }] : []));
|
|
388
|
+
}
|
|
389
|
+
showLoader() {
|
|
390
|
+
this.isLoading.set(true);
|
|
391
|
+
this.hasError.set(false);
|
|
392
|
+
this.errorKey.set(LoadingError.NONE);
|
|
393
|
+
}
|
|
394
|
+
hideLoader() {
|
|
395
|
+
this.isLoading.set(false);
|
|
396
|
+
}
|
|
397
|
+
showError(error) {
|
|
398
|
+
this.isLoading.set(false);
|
|
399
|
+
this.hasError.set(true);
|
|
400
|
+
this.errorKey.set(error);
|
|
401
|
+
}
|
|
402
|
+
showCanvasLoader() {
|
|
403
|
+
this.isCanvasLoading.set(true);
|
|
404
|
+
this.canvasHasError.set(false);
|
|
405
|
+
this.canvasErrorKey.set(LoadingError.NONE);
|
|
406
|
+
}
|
|
407
|
+
hideCanvasLoader() {
|
|
408
|
+
this.isCanvasLoading.set(false);
|
|
409
|
+
}
|
|
410
|
+
showCanvasError(error) {
|
|
411
|
+
this.isCanvasLoading.set(false);
|
|
412
|
+
this.canvasHasError.set(true);
|
|
413
|
+
this.canvasErrorKey.set(error);
|
|
414
|
+
}
|
|
415
|
+
reset() {
|
|
416
|
+
this.isLoading.set(false);
|
|
417
|
+
this.hasError.set(false);
|
|
418
|
+
this.errorKey.set(LoadingError.NONE);
|
|
419
|
+
this.isCanvasLoading.set(false);
|
|
420
|
+
this.canvasHasError.set(false);
|
|
421
|
+
this.canvasErrorKey.set(LoadingError.NONE);
|
|
422
|
+
}
|
|
423
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LoadingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
424
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LoadingService, providedIn: 'root' }); }
|
|
425
|
+
}
|
|
426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LoadingService, decorators: [{
|
|
427
|
+
type: Injectable,
|
|
428
|
+
args: [{
|
|
429
|
+
providedIn: 'root',
|
|
430
|
+
}]
|
|
431
|
+
}] });
|
|
432
|
+
|
|
433
|
+
class PoweredByComponent {
|
|
434
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PoweredByComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
435
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: PoweredByComponent, isStandalone: true, selector: "app-powered-by", ngImport: i0, template: `
|
|
436
|
+
<div id="powered-by">
|
|
437
|
+
<span class="powered-text">Powered by</span>
|
|
438
|
+
<a
|
|
439
|
+
href="https://www.solidpepper.com/"
|
|
440
|
+
target="_blank"
|
|
441
|
+
rel="noopener noreferrer"
|
|
442
|
+
class="d-flex align-items-center"
|
|
443
|
+
>
|
|
444
|
+
<svg
|
|
445
|
+
width="30"
|
|
446
|
+
height="30"
|
|
447
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
448
|
+
viewBox="0 0 144.35 138.5"
|
|
449
|
+
>
|
|
450
|
+
<defs>
|
|
451
|
+
<style>
|
|
452
|
+
.cls-1 {
|
|
453
|
+
fill: #fff;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.cls-2 {
|
|
457
|
+
fill: #e30613;
|
|
458
|
+
}
|
|
459
|
+
</style>
|
|
460
|
+
</defs>
|
|
461
|
+
<g id="Calque_1-2" data-name="Calque 1">
|
|
462
|
+
<g>
|
|
463
|
+
<path
|
|
464
|
+
class="cls-2"
|
|
465
|
+
d="M71.83,12.3c-14.3,5.69-20.92,29.2-24.8,38.25-12.44,27.41-27.4,52.11-44.54,74.47,0,0-3.94,3.37-1.92,8.99,2.02,5.62,7.21,4.38,7.21,4.38,39.83-7.97,72.03-23.26,93.5-48.86,4.24-4.83,10.96-12.1,9.23-24.29-1.03-24.52-26.1-57.95-38.68-52.94Z"
|
|
466
|
+
></path>
|
|
467
|
+
<path
|
|
468
|
+
class="cls-2"
|
|
469
|
+
d="M135.9,.15c-9.61-1.62-22,10.47-24.59,12.09-2.9,1.81-7.16,3.56-10.17,1.27-7.67-5.84-13.61-2.04-13.61-2.04l.12,.2c.09,.09,.18,.19,.28,.27,9.36,7.91,19.38,20.84,24.85,41.65,.53-.92,4.72-8.61,1.54-16.72-3.39-8.63,2.14-15.09,6.22-18.88,4.08-3.79,6.79-5.78,6.79-5.78,3.15-2.14,5.48-2.89,5.48-2.89,5.52-2.5,6.32,7.91,6.32,7.91,9.98-2.69,3.83-15.91-3.22-17.1Z"
|
|
470
|
+
></path>
|
|
471
|
+
<path
|
|
472
|
+
class="cls-1"
|
|
473
|
+
d="M58.28,41.08c.2-1.44,.51-2.86,.91-4.26,.41-1.39,.92-2.76,1.52-4.09,1.19-2.66,2.76-5.14,4.69-7.32,.96-1.09,2.03-2.09,3.18-2.98,1.16-.87,2.42-1.67,3.8-2.17,1.38-.51,2.89-.74,4.38-.53,1.48,.19,2.93,.9,3.92,2.04l-.21,.48c-1.36-.05-2.52,.06-3.64,.37-1.11,.28-2.16,.71-3.2,1.23-1.03,.53-2.07,1.11-3.05,1.83-.99,.71-1.93,1.54-2.83,2.42-1.8,1.78-3.44,3.82-4.92,6.04-1.49,2.22-2.81,4.61-4.1,7.11l-.46-.17Z"
|
|
474
|
+
></path>
|
|
475
|
+
<path
|
|
476
|
+
class="cls-1"
|
|
477
|
+
d="M13.47,128.6c.92-.5,1.84-.96,2.76-1.43,.92-.48,1.86-.9,2.77-1.39,1.82-.99,3.68-1.85,5.5-2.84,3.65-1.92,7.28-3.85,10.89-5.82,7.21-3.96,14.34-8.04,21.35-12.35,7.01-4.31,13.91-8.81,20.68-13.54l5.06-3.6,5.01-3.7c1.65-1.26,3.28-2.56,4.96-3.82,.83-.64,1.63-1.32,2.45-1.98,.83-.65,1.65-1.31,2.49-1.95l.34,.38c-1.29,1.75-2.62,3.46-3.99,5.14-1.43,1.61-2.85,3.24-4.34,4.8-1.52,1.51-3.03,3.04-4.6,4.5-1.59,1.42-3.18,2.86-4.8,4.23-6.53,5.48-13.5,10.28-20.7,14.56-7.2,4.29-14.63,8.11-22.24,11.38-3.8,1.65-7.66,3.14-11.56,4.48-.97,.35-1.95,.66-2.94,.97-.98,.32-1.96,.62-2.95,.91-1.97,.59-3.97,1.09-5.96,1.57l-.15-.51Z"
|
|
478
|
+
></path>
|
|
479
|
+
<path
|
|
480
|
+
class="cls-1"
|
|
481
|
+
d="M99.27,17.04c.9,.63,1.77,1.14,2.67,1.5,.9,.35,1.82,.55,2.75,.57,.94,.03,1.88-.14,2.83-.43,.95-.29,1.88-.73,2.87-1.18l.29,.43c-.73,.9-1.63,1.65-2.65,2.2-1.02,.55-2.18,.87-3.36,.87-1.18,0-2.37-.33-3.38-.97-1.01-.63-1.86-1.54-2.39-2.62l.36-.36Z"
|
|
482
|
+
></path>
|
|
483
|
+
</g>
|
|
484
|
+
</g>
|
|
485
|
+
</svg>
|
|
486
|
+
<b class="mb-1">
|
|
487
|
+
Solid
|
|
488
|
+
<span style="color: #e30613">Pepper</span>
|
|
489
|
+
</b>
|
|
490
|
+
</a>
|
|
491
|
+
</div>
|
|
492
|
+
`, isInline: true, styles: ["#powered-by{position:absolute;color:var(--white);bottom:calc(var(--spacing-s) + env(safe-area-inset-bottom));right:var(--spacing-xl);width:auto;display:flex;padding:var(--spacing-xxs);z-index:50;font-size:11px}#powered-by{flex-direction:row;align-items:center;gap:6px}@media (max-width: 600px){#powered-by{flex-direction:column;align-items:flex-end;right:var(--spacing-s);bottom:12px;font-size:10px;gap:2px}}.powered-text{opacity:.8}.d-flex{display:flex;text-decoration:none;color:inherit;align-items:center}.mb-1{margin-bottom:0}a{text-decoration:none;color:inherit;display:flex;align-items:center;gap:4px}a:hover{opacity:.8}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
493
|
+
}
|
|
494
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PoweredByComponent, decorators: [{
|
|
495
|
+
type: Component,
|
|
496
|
+
args: [{ selector: 'app-powered-by', standalone: true, imports: [CommonModule], template: `
|
|
497
|
+
<div id="powered-by">
|
|
498
|
+
<span class="powered-text">Powered by</span>
|
|
499
|
+
<a
|
|
500
|
+
href="https://www.solidpepper.com/"
|
|
501
|
+
target="_blank"
|
|
502
|
+
rel="noopener noreferrer"
|
|
503
|
+
class="d-flex align-items-center"
|
|
504
|
+
>
|
|
505
|
+
<svg
|
|
506
|
+
width="30"
|
|
507
|
+
height="30"
|
|
508
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
509
|
+
viewBox="0 0 144.35 138.5"
|
|
510
|
+
>
|
|
511
|
+
<defs>
|
|
512
|
+
<style>
|
|
513
|
+
.cls-1 {
|
|
514
|
+
fill: #fff;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.cls-2 {
|
|
518
|
+
fill: #e30613;
|
|
519
|
+
}
|
|
520
|
+
</style>
|
|
521
|
+
</defs>
|
|
522
|
+
<g id="Calque_1-2" data-name="Calque 1">
|
|
523
|
+
<g>
|
|
524
|
+
<path
|
|
525
|
+
class="cls-2"
|
|
526
|
+
d="M71.83,12.3c-14.3,5.69-20.92,29.2-24.8,38.25-12.44,27.41-27.4,52.11-44.54,74.47,0,0-3.94,3.37-1.92,8.99,2.02,5.62,7.21,4.38,7.21,4.38,39.83-7.97,72.03-23.26,93.5-48.86,4.24-4.83,10.96-12.1,9.23-24.29-1.03-24.52-26.1-57.95-38.68-52.94Z"
|
|
527
|
+
></path>
|
|
528
|
+
<path
|
|
529
|
+
class="cls-2"
|
|
530
|
+
d="M135.9,.15c-9.61-1.62-22,10.47-24.59,12.09-2.9,1.81-7.16,3.56-10.17,1.27-7.67-5.84-13.61-2.04-13.61-2.04l.12,.2c.09,.09,.18,.19,.28,.27,9.36,7.91,19.38,20.84,24.85,41.65,.53-.92,4.72-8.61,1.54-16.72-3.39-8.63,2.14-15.09,6.22-18.88,4.08-3.79,6.79-5.78,6.79-5.78,3.15-2.14,5.48-2.89,5.48-2.89,5.52-2.5,6.32,7.91,6.32,7.91,9.98-2.69,3.83-15.91-3.22-17.1Z"
|
|
531
|
+
></path>
|
|
532
|
+
<path
|
|
533
|
+
class="cls-1"
|
|
534
|
+
d="M58.28,41.08c.2-1.44,.51-2.86,.91-4.26,.41-1.39,.92-2.76,1.52-4.09,1.19-2.66,2.76-5.14,4.69-7.32,.96-1.09,2.03-2.09,3.18-2.98,1.16-.87,2.42-1.67,3.8-2.17,1.38-.51,2.89-.74,4.38-.53,1.48,.19,2.93,.9,3.92,2.04l-.21,.48c-1.36-.05-2.52,.06-3.64,.37-1.11,.28-2.16,.71-3.2,1.23-1.03,.53-2.07,1.11-3.05,1.83-.99,.71-1.93,1.54-2.83,2.42-1.8,1.78-3.44,3.82-4.92,6.04-1.49,2.22-2.81,4.61-4.1,7.11l-.46-.17Z"
|
|
535
|
+
></path>
|
|
536
|
+
<path
|
|
537
|
+
class="cls-1"
|
|
538
|
+
d="M13.47,128.6c.92-.5,1.84-.96,2.76-1.43,.92-.48,1.86-.9,2.77-1.39,1.82-.99,3.68-1.85,5.5-2.84,3.65-1.92,7.28-3.85,10.89-5.82,7.21-3.96,14.34-8.04,21.35-12.35,7.01-4.31,13.91-8.81,20.68-13.54l5.06-3.6,5.01-3.7c1.65-1.26,3.28-2.56,4.96-3.82,.83-.64,1.63-1.32,2.45-1.98,.83-.65,1.65-1.31,2.49-1.95l.34,.38c-1.29,1.75-2.62,3.46-3.99,5.14-1.43,1.61-2.85,3.24-4.34,4.8-1.52,1.51-3.03,3.04-4.6,4.5-1.59,1.42-3.18,2.86-4.8,4.23-6.53,5.48-13.5,10.28-20.7,14.56-7.2,4.29-14.63,8.11-22.24,11.38-3.8,1.65-7.66,3.14-11.56,4.48-.97,.35-1.95,.66-2.94,.97-.98,.32-1.96,.62-2.95,.91-1.97,.59-3.97,1.09-5.96,1.57l-.15-.51Z"
|
|
539
|
+
></path>
|
|
540
|
+
<path
|
|
541
|
+
class="cls-1"
|
|
542
|
+
d="M99.27,17.04c.9,.63,1.77,1.14,2.67,1.5,.9,.35,1.82,.55,2.75,.57,.94,.03,1.88-.14,2.83-.43,.95-.29,1.88-.73,2.87-1.18l.29,.43c-.73,.9-1.63,1.65-2.65,2.2-1.02,.55-2.18,.87-3.36,.87-1.18,0-2.37-.33-3.38-.97-1.01-.63-1.86-1.54-2.39-2.62l.36-.36Z"
|
|
543
|
+
></path>
|
|
544
|
+
</g>
|
|
545
|
+
</g>
|
|
546
|
+
</svg>
|
|
547
|
+
<b class="mb-1">
|
|
548
|
+
Solid
|
|
549
|
+
<span style="color: #e30613">Pepper</span>
|
|
550
|
+
</b>
|
|
551
|
+
</a>
|
|
552
|
+
</div>
|
|
553
|
+
`, styles: ["#powered-by{position:absolute;color:var(--white);bottom:calc(var(--spacing-s) + env(safe-area-inset-bottom));right:var(--spacing-xl);width:auto;display:flex;padding:var(--spacing-xxs);z-index:50;font-size:11px}#powered-by{flex-direction:row;align-items:center;gap:6px}@media (max-width: 600px){#powered-by{flex-direction:column;align-items:flex-end;right:var(--spacing-s);bottom:12px;font-size:10px;gap:2px}}.powered-text{opacity:.8}.d-flex{display:flex;text-decoration:none;color:inherit;align-items:center}.mb-1{margin-bottom:0}a{text-decoration:none;color:inherit;display:flex;align-items:center;gap:4px}a:hover{opacity:.8}\n"] }]
|
|
554
|
+
}] });
|
|
555
|
+
|
|
556
|
+
class ThemeService {
|
|
557
|
+
constructor() {
|
|
558
|
+
this.isDarkMode = signal(true, ...(ngDevMode ? [{ debugName: "isDarkMode" }] : []));
|
|
559
|
+
// Automatically keep the body classes in sync with the signal
|
|
560
|
+
effect(() => {
|
|
561
|
+
const isDark = this.isDarkMode();
|
|
562
|
+
this.applyTheme(isDark);
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
toggleTheme() {
|
|
566
|
+
this.isDarkMode.update((v) => !v);
|
|
567
|
+
}
|
|
568
|
+
applyTheme(isDark) {
|
|
569
|
+
if (isDark) {
|
|
570
|
+
document.body.classList.add('dark-mode');
|
|
571
|
+
document.body.classList.remove('light-mode');
|
|
572
|
+
}
|
|
573
|
+
else {
|
|
574
|
+
document.body.classList.add('light-mode');
|
|
575
|
+
document.body.classList.remove('dark-mode');
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
579
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ThemeService, providedIn: 'root' }); }
|
|
580
|
+
}
|
|
581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ThemeService, decorators: [{
|
|
582
|
+
type: Injectable,
|
|
583
|
+
args: [{
|
|
584
|
+
providedIn: 'root',
|
|
585
|
+
}]
|
|
586
|
+
}], ctorParameters: () => [] });
|
|
587
|
+
|
|
588
|
+
class AppParamsService {
|
|
589
|
+
constructor() {
|
|
590
|
+
this.params = signal({}, ...(ngDevMode ? [{ debugName: "params" }] : []));
|
|
591
|
+
this.pageGuid = signal('', ...(ngDevMode ? [{ debugName: "pageGuid" }] : []));
|
|
592
|
+
}
|
|
593
|
+
setParams(params) {
|
|
594
|
+
this.params.update((current) => ({ ...current, ...params }));
|
|
595
|
+
}
|
|
596
|
+
updateTemplateName(newName) {
|
|
597
|
+
this.params.update((current) => {
|
|
598
|
+
const templateData = current.templateData
|
|
599
|
+
? { ...current.templateData, publicationTemplateName: newName }
|
|
600
|
+
: { publicationTemplateName: newName };
|
|
601
|
+
return { ...current, templateData };
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
get guid() {
|
|
605
|
+
return this.params().guid;
|
|
606
|
+
}
|
|
607
|
+
get apiUrl() {
|
|
608
|
+
return this.params().apiUrl;
|
|
609
|
+
}
|
|
610
|
+
get language() {
|
|
611
|
+
return this.params().language;
|
|
612
|
+
}
|
|
613
|
+
get alias() {
|
|
614
|
+
return this.params().alias;
|
|
615
|
+
}
|
|
616
|
+
get isPublication() {
|
|
617
|
+
return this.params().type === 'publication';
|
|
618
|
+
}
|
|
619
|
+
get isDocument() {
|
|
620
|
+
return this.params().type === 'document';
|
|
621
|
+
}
|
|
622
|
+
get debug() {
|
|
623
|
+
return !!this.params().debug;
|
|
624
|
+
}
|
|
625
|
+
get isDemo() {
|
|
626
|
+
return !!this.params().isDemo;
|
|
627
|
+
}
|
|
628
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AppParamsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
629
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AppParamsService, providedIn: 'root' }); }
|
|
630
|
+
}
|
|
631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AppParamsService, decorators: [{
|
|
632
|
+
type: Injectable,
|
|
633
|
+
args: [{
|
|
634
|
+
providedIn: 'root',
|
|
635
|
+
}]
|
|
636
|
+
}] });
|
|
637
|
+
|
|
638
|
+
class FlipbookService {
|
|
639
|
+
constructor(http, appParams) {
|
|
640
|
+
this.http = http;
|
|
641
|
+
this.appParams = appParams;
|
|
642
|
+
}
|
|
643
|
+
getFlipbookInfo() {
|
|
644
|
+
const baseUrl = this.appParams.apiUrl?.replace(/\/$/, '') || '';
|
|
645
|
+
let url = `${baseUrl}/Dam/flipbook`;
|
|
646
|
+
const params = [];
|
|
647
|
+
SolidLog.log('[FlipbookService] Constructing URL with alias:', this.appParams.alias);
|
|
648
|
+
if (this.appParams.isPublication) {
|
|
649
|
+
params.push(`publicationId=${this.appParams.guid}`);
|
|
650
|
+
}
|
|
651
|
+
else if (this.appParams.isDocument) {
|
|
652
|
+
params.push(`documentGuid=${this.appParams.guid}`);
|
|
653
|
+
}
|
|
654
|
+
if (this.appParams.alias) {
|
|
655
|
+
params.push(`alias=${this.appParams.alias}`);
|
|
656
|
+
}
|
|
657
|
+
if (params.length > 0) {
|
|
658
|
+
url += `?${params.join('&')}`;
|
|
659
|
+
}
|
|
660
|
+
SolidLog.log('[FlipbookService] Final URL:', url);
|
|
661
|
+
return this.http.get(url);
|
|
662
|
+
}
|
|
663
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookService, deps: [{ token: i1$2.HttpClient }, { token: AppParamsService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
664
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookService, providedIn: 'root' }); }
|
|
665
|
+
}
|
|
666
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookService, decorators: [{
|
|
667
|
+
type: Injectable,
|
|
668
|
+
args: [{
|
|
669
|
+
providedIn: 'root',
|
|
670
|
+
}]
|
|
671
|
+
}], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: AppParamsService }] });
|
|
672
|
+
|
|
673
|
+
class FlipbookDataService {
|
|
674
|
+
constructor(http, flipbookService, loadingService) {
|
|
675
|
+
this.http = http;
|
|
676
|
+
this.flipbookService = flipbookService;
|
|
677
|
+
this.loadingService = loadingService;
|
|
678
|
+
this._pages = []; // Initialement vide
|
|
679
|
+
this.pages$ = new BehaviorSubject([]);
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Fetch flipbook info and initialize pages
|
|
683
|
+
*/
|
|
684
|
+
async loadFlipbookInfo() {
|
|
685
|
+
try {
|
|
686
|
+
const data = await lastValueFrom(this.flipbookService.getFlipbookInfo());
|
|
687
|
+
//SolidLog.log('[FlipbookDataService] getFlipbookInfo returned:', data);
|
|
688
|
+
if (data && data.pages) {
|
|
689
|
+
this._pages = data.pages.map((p) => ({
|
|
690
|
+
pageNumber: p.pageNumber,
|
|
691
|
+
pageThumbnail: p.pageThumbnail,
|
|
692
|
+
pageImage: p.pageImage,
|
|
693
|
+
pageDatasJson: p.pageDatasJson,
|
|
694
|
+
}));
|
|
695
|
+
}
|
|
696
|
+
else {
|
|
697
|
+
SolidLog.warn('[FlipbookDataService] Unexpected data format from getFlipbookInfo');
|
|
698
|
+
this.loadingService.showError(LoadingError.DOCUMENT);
|
|
699
|
+
}
|
|
700
|
+
this.pages$.next(this._pages);
|
|
701
|
+
}
|
|
702
|
+
catch (error) {
|
|
703
|
+
console.error('[FlipbookDataService] Error loading flipbook info:', error);
|
|
704
|
+
this.loadingService.showError(LoadingError.DOCUMENT);
|
|
705
|
+
this.pages$.next(this._pages);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* Generates a set of test pages.
|
|
710
|
+
* @param count Number of pages to generate
|
|
711
|
+
*/
|
|
712
|
+
generateTestPages(count) {
|
|
713
|
+
return Array.from({ length: count }, (_, i) => ({
|
|
714
|
+
pageNumber: i + 1,
|
|
715
|
+
pageThumbnail: `assets/catalogue/thumbnails/${i + 1}.webp`,
|
|
716
|
+
pageImage: `assets/catalogue/pages/${i + 1}.webp`,
|
|
717
|
+
pageDatasJson: `assets/catalogue/datas/${i + 1}.json`,
|
|
718
|
+
}));
|
|
719
|
+
}
|
|
720
|
+
get pages() {
|
|
721
|
+
return this._pages;
|
|
722
|
+
}
|
|
723
|
+
set pages(value) {
|
|
724
|
+
this._pages = value;
|
|
725
|
+
this.pages$.next(value);
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Lazy loads page data from JSON
|
|
729
|
+
* @param pageIndex Index of the page (0-based)
|
|
730
|
+
*/
|
|
731
|
+
async loadPageData(pageIndex) {
|
|
732
|
+
if (pageIndex < 0 || pageIndex >= this._pages.length)
|
|
733
|
+
return null;
|
|
734
|
+
const page = this._pages[pageIndex];
|
|
735
|
+
if (page.pageData)
|
|
736
|
+
return page.pageData;
|
|
737
|
+
try {
|
|
738
|
+
const url = page.pageDatasJson;
|
|
739
|
+
const tsUrl = `${url}${url.includes('?') ? '&' : '?'}t=${Date.now()}`;
|
|
740
|
+
const data = await lastValueFrom(this.http.get(tsUrl));
|
|
741
|
+
SolidLog.log(`[FlipbookData] Loaded data for page ${pageIndex + 1}:`, {
|
|
742
|
+
url: tsUrl,
|
|
743
|
+
dim: { w: data.width, h: data.height },
|
|
744
|
+
itemCount: data.datas?.length || 0,
|
|
745
|
+
firstItem: data.datas?.[0],
|
|
746
|
+
});
|
|
747
|
+
page.pageData = data;
|
|
748
|
+
return data;
|
|
749
|
+
}
|
|
750
|
+
catch (err) {
|
|
751
|
+
console.warn(`[FlipbookDataService] Error loading data for page ${pageIndex + 1}:`, err);
|
|
752
|
+
// Fill with empty data to avoid repeated failed requests
|
|
753
|
+
page.pageData = { width: 1, height: 1, datas: [] };
|
|
754
|
+
return page.pageData;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookDataService, deps: [{ token: i1$2.HttpClient }, { token: FlipbookService }, { token: LoadingService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
758
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookDataService, providedIn: 'root' }); }
|
|
759
|
+
}
|
|
760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookDataService, decorators: [{
|
|
761
|
+
type: Injectable,
|
|
762
|
+
args: [{
|
|
763
|
+
providedIn: 'root',
|
|
764
|
+
}]
|
|
765
|
+
}], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: FlipbookService }, { type: LoadingService }] });
|
|
766
|
+
|
|
767
|
+
class FlipbookNavbarComponent {
|
|
768
|
+
constructor() {
|
|
769
|
+
this.theme = inject(ThemeService);
|
|
770
|
+
this.dataService = inject(FlipbookDataService);
|
|
771
|
+
this.currentPage = 1;
|
|
772
|
+
this.scale = 1;
|
|
773
|
+
this.flipStart = new EventEmitter();
|
|
774
|
+
this.flipPrev = new EventEmitter();
|
|
775
|
+
this.flipNext = new EventEmitter();
|
|
776
|
+
this.flipEnd = new EventEmitter();
|
|
777
|
+
this.goToPage = new EventEmitter();
|
|
778
|
+
this.resetZoom = new EventEmitter();
|
|
779
|
+
this.zoomIn = new EventEmitter();
|
|
780
|
+
this.zoomOut = new EventEmitter();
|
|
781
|
+
}
|
|
782
|
+
get isFullscreenSupported() {
|
|
783
|
+
if (this.isMobile)
|
|
784
|
+
return false;
|
|
785
|
+
const docEl = document.documentElement;
|
|
786
|
+
return !!(docEl.requestFullscreen ||
|
|
787
|
+
docEl.webkitRequestFullscreen ||
|
|
788
|
+
docEl.mozRequestFullScreen ||
|
|
789
|
+
docEl.msRequestFullscreen);
|
|
790
|
+
}
|
|
791
|
+
get isMobile() {
|
|
792
|
+
return window.innerWidth < 600;
|
|
793
|
+
}
|
|
794
|
+
get totalPages() {
|
|
795
|
+
return this.dataService.pages.length;
|
|
796
|
+
}
|
|
797
|
+
onPageInput(event) {
|
|
798
|
+
const val = parseInt(event.target.value, 10);
|
|
799
|
+
if (!isNaN(val)) {
|
|
800
|
+
this.goToPage.emit(val);
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
toggleFullscreen() {
|
|
804
|
+
const doc = window.document;
|
|
805
|
+
const docEl = doc.documentElement;
|
|
806
|
+
const requestFullscreen = docEl.requestFullscreen ||
|
|
807
|
+
docEl.webkitRequestFullscreen ||
|
|
808
|
+
docEl.mozRequestFullScreen ||
|
|
809
|
+
docEl.msRequestFullscreen;
|
|
810
|
+
const exitFullscreen = doc.exitFullscreen ||
|
|
811
|
+
doc.webkitExitFullscreen ||
|
|
812
|
+
doc.mozCancelFullScreen ||
|
|
813
|
+
doc.msExitFullscreen;
|
|
814
|
+
const fullscreenElement = doc.fullscreenElement ||
|
|
815
|
+
doc.webkitFullscreenElement ||
|
|
816
|
+
doc.mozFullScreenElement ||
|
|
817
|
+
doc.msFullscreenElement;
|
|
818
|
+
if (!fullscreenElement) {
|
|
819
|
+
if (requestFullscreen) {
|
|
820
|
+
requestFullscreen.call(docEl).catch(() => { });
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
else {
|
|
824
|
+
if (exitFullscreen) {
|
|
825
|
+
exitFullscreen.call(doc).catch(() => { });
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
830
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: FlipbookNavbarComponent, isStandalone: true, selector: "app-flipbook-navbar", inputs: { currentPage: "currentPage", scale: "scale" }, outputs: { flipStart: "flipStart", flipPrev: "flipPrev", flipNext: "flipNext", flipEnd: "flipEnd", goToPage: "goToPage", resetZoom: "resetZoom", zoomIn: "zoomIn", zoomOut: "zoomOut" }, ngImport: i0, template: "<div class=\"navbar-flipbook container-box\">\r\n <div class=\"navbar-flipbook-left\">\r\n <button id=\"nightModeBtn\" class=\"btn-move\" (click)=\"theme.toggleTheme()\">\r\n <svg\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n class=\"icon-moon\"\r\n >\r\n <path d=\"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z\"></path>\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <div class=\"navbar-flipbook-center\">\r\n <button class=\"btn-move\" (click)=\"flipStart.emit()\">\r\n <svg\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <polyline points=\"15 18 9 12 15 6\" />\r\n <line x1=\"6\" y1=\"5\" x2=\"6\" y2=\"20\" />\r\n </svg>\r\n </button>\r\n <button class=\"btn-move\" (click)=\"flipPrev.emit()\">\r\n <svg\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <polyline points=\"15 18 9 12 15 6\" />\r\n </svg>\r\n </button>\r\n\r\n <div class=\"page-count-wrapper\">\r\n <input\r\n type=\"text\"\r\n id=\"pageNumber\"\r\n [value]=\"currentPage\"\r\n (keyup.enter)=\"onPageInput($event)\"\r\n />\r\n <span class=\"total-pages\">/ {{ totalPages }}</span>\r\n </div>\r\n\r\n <button class=\"btn-move\" (click)=\"flipNext.emit()\">\r\n <svg\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <polyline points=\"9 18 15 12 9 6\" />\r\n </svg>\r\n </button>\r\n <button class=\"btn-move\" (click)=\"flipEnd.emit()\">\r\n <svg\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <polyline points=\"9 18 15 12 9 6\" />\r\n <line x1=\"18\" y1=\"5\" x2=\"18\" y2=\"20\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <div class=\"navbar-flipbook-right\">\r\n <div class=\"zoom\">\r\n <button class=\"btn-move btn-zoom\" (click)=\"resetZoom.emit()\">\r\n <svg\r\n width=\"16\"\r\n height=\"16\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <circle cx=\"11\" cy=\"11\" r=\"8\" />\r\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\" />\r\n </svg>\r\n </button>\r\n <button class=\"btn-move\" (click)=\"zoomOut.emit()\">\r\n <svg\r\n width=\"16\"\r\n height=\"16\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\" />\r\n </svg>\r\n </button>\r\n <span class=\"text-zoom\">{{ scale | number: \"1.0-1\" }}x</span>\r\n <button class=\"btn-move\" (click)=\"zoomIn.emit()\">\r\n <svg\r\n width=\"16\"\r\n height=\"16\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\" />\r\n <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n <button *ngIf=\"isFullscreenSupported\" (click)=\"toggleFullscreen()\" class=\"btn-move\">\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n width=\"20px\"\r\n height=\"20px\"\r\n fill=\"var(--white)\"\r\n stroke=\"var(--white)\"\r\n >\r\n <path d=\"M3 3h6v2H5v4H3V3z\" />\r\n <path d=\"M21 3v6h-2V5h-4V3h6z\" />\r\n <path d=\"M3 21v-6h2v4h4v2H3z\" />\r\n <path d=\"M21 21h-6v-2h4v-4h2v6z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".navbar-flipbook{display:flex;justify-content:center;top:0;left:0;width:100%;box-sizing:border-box;max-height:70px;padding:var(--spacing-xs) var(--spacing-l)!important;background-color:var(--gray-5);color:var(--white);border-radius:var(--radius-s);box-shadow:0 4px 6px #0000001a;position:absolute;z-index:9999;flex-wrap:wrap}.navbar-flipbook-left,.navbar-flipbook-center,.navbar-flipbook-right{display:flex;align-items:center;gap:var(--spacing-s);flex:1}.navbar-flipbook-center{justify-content:center}.navbar-flipbook-right{justify-content:end}.btn-move{background:transparent;border:none;cursor:pointer;height:fit-content}#pageNumber{width:50px;border-radius:2px;height:25px;border:none;text-align:center;background:var(--gray-3);color:var(--white)}.btn-zoom{background:var(--gray-4);padding:var(--spacing-xxs);border-radius:var(--border-radius)}.text-zoom{padding:0 var(--spacing-xs)}.page-count-wrapper{display:flex;align-items:center;gap:8px;background:var(--gray-3);padding:0 12px;border-radius:var(--radius-s);height:40px}.page-count-wrapper input{width:35px;background:transparent;border:none;color:#fff;text-align:center;font-size:16px;font-weight:600;outline:none}.page-count-wrapper .total-pages{color:var(--gray-2);font-size:14px;font-weight:500;-webkit-user-select:none;user-select:none}.zoom{background:var(--gray-3);padding:var(--spacing-xxs);border-radius:var(--border-radius);display:flex;align-items:center;border-radius:var(--spacing-xxs)}.zoom .zoom-logo{padding:5px;background:var(--gray-4);border-radius:var(--border-radius);cursor:pointer}.zoom i{cursor:pointer}@media (max-width: 600px){.navbar-flipbook{width:100%!important;left:0!important;padding:var(--spacing-xs)!important;gap:var(--spacing-xxs)!important;max-height:none;flex-direction:row;justify-content:center}.navbar-flipbook-center{width:100%;justify-content:space-around;gap:var(--spacing-xxs)}.btn-move{padding:8px}.btn-move svg{width:24px;height:24px}.page-count-wrapper{height:35px;padding:0 8px}.page-count-wrapper input{width:30px;font-size:14px}.page-count-wrapper .total-pages{font-size:12px}.zoom{display:none!important}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }] }); }
|
|
831
|
+
}
|
|
832
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookNavbarComponent, decorators: [{
|
|
833
|
+
type: Component,
|
|
834
|
+
args: [{ selector: 'app-flipbook-navbar', standalone: true, imports: [CommonModule], template: "<div class=\"navbar-flipbook container-box\">\r\n <div class=\"navbar-flipbook-left\">\r\n <button id=\"nightModeBtn\" class=\"btn-move\" (click)=\"theme.toggleTheme()\">\r\n <svg\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n class=\"icon-moon\"\r\n >\r\n <path d=\"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z\"></path>\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <div class=\"navbar-flipbook-center\">\r\n <button class=\"btn-move\" (click)=\"flipStart.emit()\">\r\n <svg\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <polyline points=\"15 18 9 12 15 6\" />\r\n <line x1=\"6\" y1=\"5\" x2=\"6\" y2=\"20\" />\r\n </svg>\r\n </button>\r\n <button class=\"btn-move\" (click)=\"flipPrev.emit()\">\r\n <svg\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <polyline points=\"15 18 9 12 15 6\" />\r\n </svg>\r\n </button>\r\n\r\n <div class=\"page-count-wrapper\">\r\n <input\r\n type=\"text\"\r\n id=\"pageNumber\"\r\n [value]=\"currentPage\"\r\n (keyup.enter)=\"onPageInput($event)\"\r\n />\r\n <span class=\"total-pages\">/ {{ totalPages }}</span>\r\n </div>\r\n\r\n <button class=\"btn-move\" (click)=\"flipNext.emit()\">\r\n <svg\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <polyline points=\"9 18 15 12 9 6\" />\r\n </svg>\r\n </button>\r\n <button class=\"btn-move\" (click)=\"flipEnd.emit()\">\r\n <svg\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <polyline points=\"9 18 15 12 9 6\" />\r\n <line x1=\"18\" y1=\"5\" x2=\"18\" y2=\"20\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <div class=\"navbar-flipbook-right\">\r\n <div class=\"zoom\">\r\n <button class=\"btn-move btn-zoom\" (click)=\"resetZoom.emit()\">\r\n <svg\r\n width=\"16\"\r\n height=\"16\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <circle cx=\"11\" cy=\"11\" r=\"8\" />\r\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\" />\r\n </svg>\r\n </button>\r\n <button class=\"btn-move\" (click)=\"zoomOut.emit()\">\r\n <svg\r\n width=\"16\"\r\n height=\"16\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\" />\r\n </svg>\r\n </button>\r\n <span class=\"text-zoom\">{{ scale | number: \"1.0-1\" }}x</span>\r\n <button class=\"btn-move\" (click)=\"zoomIn.emit()\">\r\n <svg\r\n width=\"16\"\r\n height=\"16\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\" />\r\n <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\" />\r\n </svg>\r\n </button>\r\n </div>\r\n <button *ngIf=\"isFullscreenSupported\" (click)=\"toggleFullscreen()\" class=\"btn-move\">\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n width=\"20px\"\r\n height=\"20px\"\r\n fill=\"var(--white)\"\r\n stroke=\"var(--white)\"\r\n >\r\n <path d=\"M3 3h6v2H5v4H3V3z\" />\r\n <path d=\"M21 3v6h-2V5h-4V3h6z\" />\r\n <path d=\"M3 21v-6h2v4h4v2H3z\" />\r\n <path d=\"M21 21h-6v-2h4v-4h2v6z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n</div>\r\n", styles: [".navbar-flipbook{display:flex;justify-content:center;top:0;left:0;width:100%;box-sizing:border-box;max-height:70px;padding:var(--spacing-xs) var(--spacing-l)!important;background-color:var(--gray-5);color:var(--white);border-radius:var(--radius-s);box-shadow:0 4px 6px #0000001a;position:absolute;z-index:9999;flex-wrap:wrap}.navbar-flipbook-left,.navbar-flipbook-center,.navbar-flipbook-right{display:flex;align-items:center;gap:var(--spacing-s);flex:1}.navbar-flipbook-center{justify-content:center}.navbar-flipbook-right{justify-content:end}.btn-move{background:transparent;border:none;cursor:pointer;height:fit-content}#pageNumber{width:50px;border-radius:2px;height:25px;border:none;text-align:center;background:var(--gray-3);color:var(--white)}.btn-zoom{background:var(--gray-4);padding:var(--spacing-xxs);border-radius:var(--border-radius)}.text-zoom{padding:0 var(--spacing-xs)}.page-count-wrapper{display:flex;align-items:center;gap:8px;background:var(--gray-3);padding:0 12px;border-radius:var(--radius-s);height:40px}.page-count-wrapper input{width:35px;background:transparent;border:none;color:#fff;text-align:center;font-size:16px;font-weight:600;outline:none}.page-count-wrapper .total-pages{color:var(--gray-2);font-size:14px;font-weight:500;-webkit-user-select:none;user-select:none}.zoom{background:var(--gray-3);padding:var(--spacing-xxs);border-radius:var(--border-radius);display:flex;align-items:center;border-radius:var(--spacing-xxs)}.zoom .zoom-logo{padding:5px;background:var(--gray-4);border-radius:var(--border-radius);cursor:pointer}.zoom i{cursor:pointer}@media (max-width: 600px){.navbar-flipbook{width:100%!important;left:0!important;padding:var(--spacing-xs)!important;gap:var(--spacing-xxs)!important;max-height:none;flex-direction:row;justify-content:center}.navbar-flipbook-center{width:100%;justify-content:space-around;gap:var(--spacing-xxs)}.btn-move{padding:8px}.btn-move svg{width:24px;height:24px}.page-count-wrapper{height:35px;padding:0 8px}.page-count-wrapper input{width:30px;font-size:14px}.page-count-wrapper .total-pages{font-size:12px}.zoom{display:none!important}}\n"] }]
|
|
835
|
+
}], propDecorators: { currentPage: [{
|
|
836
|
+
type: Input
|
|
837
|
+
}], scale: [{
|
|
838
|
+
type: Input
|
|
839
|
+
}], flipStart: [{
|
|
840
|
+
type: Output
|
|
841
|
+
}], flipPrev: [{
|
|
842
|
+
type: Output
|
|
843
|
+
}], flipNext: [{
|
|
844
|
+
type: Output
|
|
845
|
+
}], flipEnd: [{
|
|
846
|
+
type: Output
|
|
847
|
+
}], goToPage: [{
|
|
848
|
+
type: Output
|
|
849
|
+
}], resetZoom: [{
|
|
850
|
+
type: Output
|
|
851
|
+
}], zoomIn: [{
|
|
852
|
+
type: Output
|
|
853
|
+
}], zoomOut: [{
|
|
854
|
+
type: Output
|
|
855
|
+
}] } });
|
|
856
|
+
|
|
857
|
+
class FlipbookSidebarComponent {
|
|
858
|
+
constructor(dataService) {
|
|
859
|
+
this.dataService = dataService;
|
|
860
|
+
this.pages = [];
|
|
861
|
+
this.isOpen = false;
|
|
862
|
+
// On informe le parent qu'une page a été cliquée
|
|
863
|
+
this.pageSelected = new EventEmitter();
|
|
864
|
+
this.close = new EventEmitter();
|
|
865
|
+
}
|
|
866
|
+
ngOnInit() {
|
|
867
|
+
this.dataService.pages$.subscribe((pages) => {
|
|
868
|
+
this.pages = pages;
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
onPageClick(pageNumber) {
|
|
872
|
+
this.pageSelected.emit(pageNumber);
|
|
873
|
+
}
|
|
874
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookSidebarComponent, deps: [{ token: FlipbookDataService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
875
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: FlipbookSidebarComponent, isStandalone: true, selector: "app-flipbook-sidebar", inputs: { isOpen: "isOpen" }, outputs: { pageSelected: "pageSelected", close: "close" }, ngImport: i0, template: "<div\r\n class=\"sidebar-flipbook\"\r\n [ngClass]=\"{ collapsed: !isOpen }\"\r\n id=\"sidebar-flipbook\"\r\n>\r\n <div class=\"sidebar-flipbook-header\">\r\n <h4>Pages</h4>\r\n <button class=\"btn-close-sidebar\" (click)=\"close.emit()\" title=\"Fermer\">\r\n <i class=\"bi bi-x-lg\"></i>\r\n </button>\r\n </div>\r\n <div class=\"sidebar-flipbook-content\">\r\n <div id=\"pages-list\">\r\n <div></div>\r\n @for (p of pages; track p.pageNumber) {\r\n <div class=\"page\" (click)=\"onPageClick(p.pageNumber)\">\r\n <img class=\"w-100\" [src]=\"p.pageThumbnail\" [alt]=\"'Page ' + p.pageNumber\" />\r\n <div class=\"page-number\">{{ p.pageNumber }}</div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sidebar-flipbook{width:300px;height:100%;background-color:var(--gray-4);box-shadow:2px 0 5px #0000001a;z-index:100;transition:width .3s ease;overflow:hidden;position:absolute;pointer-events:auto}.sidebar-flipbook.collapsed{width:0;padding:0;pointer-events:none}.sidebar-flipbook-header{margin-top:calc(4 * var(--spacing-l));bottom:calc(var(--spacing-s) + env(safe-area-inset-bottom));padding:0 var(--spacing-xl);display:flex;justify-content:space-between;align-items:center}.sidebar-flipbook-header h4{color:var(--white);margin:0}.sidebar-flipbook-header .btn-close-sidebar{background:transparent;border:none;color:var(--white-alpha-high);cursor:pointer;padding:var(--spacing-s);border-radius:50%;display:flex;align-items:center;justify-content:center;transition:all .2s ease;width:24px;height:24px}.sidebar-flipbook-header .btn-close-sidebar:hover{background:var(--white-alpha-light);color:var(--white);transform:scale(1.1)}.sidebar-flipbook-header .btn-close-sidebar:active{transform:scale(.9)}.sidebar-flipbook-header .btn-close-sidebar i{font-size:.9rem}.sidebar-flipbook-content{display:flex;flex-direction:column;gap:var(--spacing-s);overflow-y:auto;height:calc(100% - 100px)}#pages-list{display:grid;grid-template-columns:repeat(2,1fr);padding:0 var(--spacing-s);list-style-type:none}#pages-list .page{text-align:center;cursor:pointer;transition:transform .2s ease;background:var(--white-alpha-light);border-radius:4px;display:flex;flex-direction:column;align-items:center}#pages-list .page:nth-child(2n){padding:5px 5px 5px 0}#pages-list .page:nth-child(2n) img{background:var(--gray-2);padding:5px 5px 5px 0}#pages-list .page:nth-child(odd){padding:5px 0 5px 5px}#pages-list .page:nth-child(odd) img{background:var(--gray-2);padding:5px 0 5px 5px}#pages-list .page:hover{transform:scale(1.05);background:var(--active-alpha-light-2)}#pages-list .page img{width:100%;height:auto;aspect-ratio:1/1.41;object-fit:contain;border-radius:2px;border:1px solid var(--gray-2);background:#fff}#pages-list .page .page-number{font-size:var(--font-size-tiny);color:var(--white);margin-top:8px;font-weight:var(--font-weight-medium)}.w-100{width:100%}::-webkit-scrollbar{width:var(--spacing-xxs);height:var(--spacing-xxs);background:transparent;position:absolute}::-webkit-scrollbar-track{border-radius:10px;background:transparent}::-webkit-scrollbar-thumb{border-radius:10px;background:var(--gray-2)}::-webkit-scrollbar-corner{background:transparent}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
876
|
+
}
|
|
877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookSidebarComponent, decorators: [{
|
|
878
|
+
type: Component,
|
|
879
|
+
args: [{ selector: 'app-flipbook-sidebar', standalone: true, imports: [CommonModule], template: "<div\r\n class=\"sidebar-flipbook\"\r\n [ngClass]=\"{ collapsed: !isOpen }\"\r\n id=\"sidebar-flipbook\"\r\n>\r\n <div class=\"sidebar-flipbook-header\">\r\n <h4>Pages</h4>\r\n <button class=\"btn-close-sidebar\" (click)=\"close.emit()\" title=\"Fermer\">\r\n <i class=\"bi bi-x-lg\"></i>\r\n </button>\r\n </div>\r\n <div class=\"sidebar-flipbook-content\">\r\n <div id=\"pages-list\">\r\n <div></div>\r\n @for (p of pages; track p.pageNumber) {\r\n <div class=\"page\" (click)=\"onPageClick(p.pageNumber)\">\r\n <img class=\"w-100\" [src]=\"p.pageThumbnail\" [alt]=\"'Page ' + p.pageNumber\" />\r\n <div class=\"page-number\">{{ p.pageNumber }}</div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".sidebar-flipbook{width:300px;height:100%;background-color:var(--gray-4);box-shadow:2px 0 5px #0000001a;z-index:100;transition:width .3s ease;overflow:hidden;position:absolute;pointer-events:auto}.sidebar-flipbook.collapsed{width:0;padding:0;pointer-events:none}.sidebar-flipbook-header{margin-top:calc(4 * var(--spacing-l));bottom:calc(var(--spacing-s) + env(safe-area-inset-bottom));padding:0 var(--spacing-xl);display:flex;justify-content:space-between;align-items:center}.sidebar-flipbook-header h4{color:var(--white);margin:0}.sidebar-flipbook-header .btn-close-sidebar{background:transparent;border:none;color:var(--white-alpha-high);cursor:pointer;padding:var(--spacing-s);border-radius:50%;display:flex;align-items:center;justify-content:center;transition:all .2s ease;width:24px;height:24px}.sidebar-flipbook-header .btn-close-sidebar:hover{background:var(--white-alpha-light);color:var(--white);transform:scale(1.1)}.sidebar-flipbook-header .btn-close-sidebar:active{transform:scale(.9)}.sidebar-flipbook-header .btn-close-sidebar i{font-size:.9rem}.sidebar-flipbook-content{display:flex;flex-direction:column;gap:var(--spacing-s);overflow-y:auto;height:calc(100% - 100px)}#pages-list{display:grid;grid-template-columns:repeat(2,1fr);padding:0 var(--spacing-s);list-style-type:none}#pages-list .page{text-align:center;cursor:pointer;transition:transform .2s ease;background:var(--white-alpha-light);border-radius:4px;display:flex;flex-direction:column;align-items:center}#pages-list .page:nth-child(2n){padding:5px 5px 5px 0}#pages-list .page:nth-child(2n) img{background:var(--gray-2);padding:5px 5px 5px 0}#pages-list .page:nth-child(odd){padding:5px 0 5px 5px}#pages-list .page:nth-child(odd) img{background:var(--gray-2);padding:5px 0 5px 5px}#pages-list .page:hover{transform:scale(1.05);background:var(--active-alpha-light-2)}#pages-list .page img{width:100%;height:auto;aspect-ratio:1/1.41;object-fit:contain;border-radius:2px;border:1px solid var(--gray-2);background:#fff}#pages-list .page .page-number{font-size:var(--font-size-tiny);color:var(--white);margin-top:8px;font-weight:var(--font-weight-medium)}.w-100{width:100%}::-webkit-scrollbar{width:var(--spacing-xxs);height:var(--spacing-xxs);background:transparent;position:absolute}::-webkit-scrollbar-track{border-radius:10px;background:transparent}::-webkit-scrollbar-thumb{border-radius:10px;background:var(--gray-2)}::-webkit-scrollbar-corner{background:transparent}\n"] }]
|
|
880
|
+
}], ctorParameters: () => [{ type: FlipbookDataService }], propDecorators: { isOpen: [{
|
|
881
|
+
type: Input
|
|
882
|
+
}], pageSelected: [{
|
|
883
|
+
type: Output
|
|
884
|
+
}], close: [{
|
|
885
|
+
type: Output
|
|
886
|
+
}] } });
|
|
887
|
+
|
|
888
|
+
class FlipbookControlsComponent {
|
|
889
|
+
constructor() {
|
|
890
|
+
this.sidebarOpen = false;
|
|
891
|
+
this.mapOpen = false;
|
|
892
|
+
this.toggleSidebar = new EventEmitter();
|
|
893
|
+
this.toggleMap = new EventEmitter();
|
|
894
|
+
}
|
|
895
|
+
get isMobile() {
|
|
896
|
+
return window.innerWidth < 600;
|
|
897
|
+
}
|
|
898
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
899
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: FlipbookControlsComponent, isStandalone: true, selector: "app-flipbook-controls", inputs: { sidebarOpen: "sidebarOpen", mapOpen: "mapOpen" }, outputs: { toggleSidebar: "toggleSidebar", toggleMap: "toggleMap" }, ngImport: i0, template: "<div class=\"switch-container container-box\">\r\n <button\r\n id=\"showSidebarBtn\"\r\n class=\"btn-switch btn-show-sidebar border-0\"\r\n (click)=\"toggleSidebar.emit()\"\r\n [class.active]=\"sidebarOpen\"\r\n >\r\n <svg\r\n width=\"30\"\r\n height=\"30\"\r\n viewBox=\"0 0 16 16\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n style=\"display: block\"\r\n >\r\n <line\r\n x1=\"4\"\r\n y1=\"4\"\r\n x2=\"12\"\r\n y2=\"4\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n ></line>\r\n <line\r\n x1=\"4\"\r\n y1=\"8\"\r\n x2=\"12\"\r\n y2=\"8\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n ></line>\r\n <line\r\n x1=\"4\"\r\n y1=\"12\"\r\n x2=\"12\"\r\n y2=\"12\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n ></line>\r\n </svg>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"!isMobile\"\r\n id=\"showMapBtn\"\r\n class=\"btn-switch btn-show-sidebar border-0\"\r\n (click)=\"toggleMap.emit()\"\r\n [class.active]=\"mapOpen\"\r\n >\r\n <svg\r\n width=\"30\"\r\n height=\"30\"\r\n viewBox=\"0 0 30 30\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n style=\"display: block\"\r\n >\r\n <rect\r\n x=\"2\"\r\n y=\"2\"\r\n width=\"10\"\r\n height=\"10\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n ></rect>\r\n <rect\r\n x=\"18\"\r\n y=\"18\"\r\n width=\"10\"\r\n height=\"10\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n ></rect>\r\n <rect\r\n x=\"2\"\r\n y=\"18\"\r\n width=\"10\"\r\n height=\"10\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n ></rect>\r\n <rect\r\n x=\"18\"\r\n y=\"2\"\r\n width=\"10\"\r\n height=\"10\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n ></rect>\r\n </svg>\r\n </button>\r\n</div>\r\n", styles: [".switch-container{position:absolute;left:50%;bottom:calc(var(--spacing-s) + env(safe-area-inset-bottom));transform:translate(-50%);background-color:transparent;box-shadow:none;display:flex;gap:var(--spacing-s);z-index:5000}.btn-switch{background:var(--gray-4);width:50px;height:50px;display:flex;justify-content:center;align-items:center;border-radius:var(--border-radius);cursor:pointer;transition:background-color .2s ease;border:none;border-radius:var(--spacing-s)}.btn-switch:hover{background:var(--gray-3)}.btn-switch.active{background:var(--active)}.btn-switch.active svg line,.btn-switch.active svg rect{stroke:#fff}.container-box{padding:var(--spacing-m) 0;border-radius:var(--radius-s)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
900
|
+
}
|
|
901
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookControlsComponent, decorators: [{
|
|
902
|
+
type: Component,
|
|
903
|
+
args: [{ selector: 'app-flipbook-controls', standalone: true, imports: [CommonModule], template: "<div class=\"switch-container container-box\">\r\n <button\r\n id=\"showSidebarBtn\"\r\n class=\"btn-switch btn-show-sidebar border-0\"\r\n (click)=\"toggleSidebar.emit()\"\r\n [class.active]=\"sidebarOpen\"\r\n >\r\n <svg\r\n width=\"30\"\r\n height=\"30\"\r\n viewBox=\"0 0 16 16\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n style=\"display: block\"\r\n >\r\n <line\r\n x1=\"4\"\r\n y1=\"4\"\r\n x2=\"12\"\r\n y2=\"4\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n ></line>\r\n <line\r\n x1=\"4\"\r\n y1=\"8\"\r\n x2=\"12\"\r\n y2=\"8\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n ></line>\r\n <line\r\n x1=\"4\"\r\n y1=\"12\"\r\n x2=\"12\"\r\n y2=\"12\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n ></line>\r\n </svg>\r\n </button>\r\n\r\n <button\r\n *ngIf=\"!isMobile\"\r\n id=\"showMapBtn\"\r\n class=\"btn-switch btn-show-sidebar border-0\"\r\n (click)=\"toggleMap.emit()\"\r\n [class.active]=\"mapOpen\"\r\n >\r\n <svg\r\n width=\"30\"\r\n height=\"30\"\r\n viewBox=\"0 0 30 30\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n style=\"display: block\"\r\n >\r\n <rect\r\n x=\"2\"\r\n y=\"2\"\r\n width=\"10\"\r\n height=\"10\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n ></rect>\r\n <rect\r\n x=\"18\"\r\n y=\"18\"\r\n width=\"10\"\r\n height=\"10\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n ></rect>\r\n <rect\r\n x=\"2\"\r\n y=\"18\"\r\n width=\"10\"\r\n height=\"10\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n ></rect>\r\n <rect\r\n x=\"18\"\r\n y=\"2\"\r\n width=\"10\"\r\n height=\"10\"\r\n stroke=\"var(--white)\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n ></rect>\r\n </svg>\r\n </button>\r\n</div>\r\n", styles: [".switch-container{position:absolute;left:50%;bottom:calc(var(--spacing-s) + env(safe-area-inset-bottom));transform:translate(-50%);background-color:transparent;box-shadow:none;display:flex;gap:var(--spacing-s);z-index:5000}.btn-switch{background:var(--gray-4);width:50px;height:50px;display:flex;justify-content:center;align-items:center;border-radius:var(--border-radius);cursor:pointer;transition:background-color .2s ease;border:none;border-radius:var(--spacing-s)}.btn-switch:hover{background:var(--gray-3)}.btn-switch.active{background:var(--active)}.btn-switch.active svg line,.btn-switch.active svg rect{stroke:#fff}.container-box{padding:var(--spacing-m) 0;border-radius:var(--radius-s)}\n"] }]
|
|
904
|
+
}], propDecorators: { sidebarOpen: [{
|
|
905
|
+
type: Input
|
|
906
|
+
}], mapOpen: [{
|
|
907
|
+
type: Input
|
|
908
|
+
}], toggleSidebar: [{
|
|
909
|
+
type: Output
|
|
910
|
+
}], toggleMap: [{
|
|
911
|
+
type: Output
|
|
912
|
+
}] } });
|
|
913
|
+
|
|
914
|
+
class OverlayLinkComponent {
|
|
915
|
+
constructor() {
|
|
916
|
+
this.linkClicked = new EventEmitter();
|
|
917
|
+
}
|
|
918
|
+
ngOnInit() {
|
|
919
|
+
SolidLog.log('[OverlayLink] Element initialized:', {
|
|
920
|
+
type: this.item.type,
|
|
921
|
+
coords: {
|
|
922
|
+
x: this.item.x,
|
|
923
|
+
y: this.item.y,
|
|
924
|
+
w: this.item.width,
|
|
925
|
+
h: this.item.height,
|
|
926
|
+
},
|
|
927
|
+
page: { w: this.pageWidth, h: this.pageHeight },
|
|
928
|
+
calculated: {
|
|
929
|
+
left: (this.item.x / this.pageWidth) * 100 + '%',
|
|
930
|
+
top: (this.item.y / this.pageHeight) * 100 + '%',
|
|
931
|
+
},
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: OverlayLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
935
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: OverlayLinkComponent, isStandalone: true, selector: "app-overlay-link", inputs: { item: "item", pageWidth: "pageWidth", pageHeight: "pageHeight" }, outputs: { linkClicked: "linkClicked" }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: `
|
|
936
|
+
<a
|
|
937
|
+
[href]="item.src"
|
|
938
|
+
target="_blank"
|
|
939
|
+
class="overlay-link"
|
|
940
|
+
[class.show-box]="item.showBox"
|
|
941
|
+
[style.left]="(item.x / pageWidth) * 100 + '%'"
|
|
942
|
+
[style.top]="(item.y / pageHeight) * 100 + '%'"
|
|
943
|
+
[style.width]="(item.width / pageWidth) * 100 + '%'"
|
|
944
|
+
[style.height]="(item.height / pageHeight) * 100 + '%'"
|
|
945
|
+
[attr.title]="item.tooltip"
|
|
946
|
+
(click)="$event.stopPropagation()"
|
|
947
|
+
(mousedown)="$event.stopPropagation()"
|
|
948
|
+
(touchstart)="$event.stopPropagation()"
|
|
949
|
+
></a>
|
|
950
|
+
`, isInline: true, styles: [".overlay-link{position:absolute;pointer-events:auto;display:flex;box-sizing:border-box;transition:all .2s ease;cursor:pointer;z-index:10}.overlay-link.show-box{background-color:#006eff26;border:1px solid rgba(0,110,255,.3);border-radius:4px}.overlay-link.show-box:hover{background-color:#006eff40;border-color:#006eff80}.overlay-link:not(.show-box):hover{background-color:#ffffff26}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
951
|
+
}
|
|
952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: OverlayLinkComponent, decorators: [{
|
|
953
|
+
type: Component,
|
|
954
|
+
args: [{ selector: 'app-overlay-link', standalone: true, imports: [CommonModule], host: { style: 'display: contents' }, template: `
|
|
955
|
+
<a
|
|
956
|
+
[href]="item.src"
|
|
957
|
+
target="_blank"
|
|
958
|
+
class="overlay-link"
|
|
959
|
+
[class.show-box]="item.showBox"
|
|
960
|
+
[style.left]="(item.x / pageWidth) * 100 + '%'"
|
|
961
|
+
[style.top]="(item.y / pageHeight) * 100 + '%'"
|
|
962
|
+
[style.width]="(item.width / pageWidth) * 100 + '%'"
|
|
963
|
+
[style.height]="(item.height / pageHeight) * 100 + '%'"
|
|
964
|
+
[attr.title]="item.tooltip"
|
|
965
|
+
(click)="$event.stopPropagation()"
|
|
966
|
+
(mousedown)="$event.stopPropagation()"
|
|
967
|
+
(touchstart)="$event.stopPropagation()"
|
|
968
|
+
></a>
|
|
969
|
+
`, styles: [".overlay-link{position:absolute;pointer-events:auto;display:flex;box-sizing:border-box;transition:all .2s ease;cursor:pointer;z-index:10}.overlay-link.show-box{background-color:#006eff26;border:1px solid rgba(0,110,255,.3);border-radius:4px}.overlay-link.show-box:hover{background-color:#006eff40;border-color:#006eff80}.overlay-link:not(.show-box):hover{background-color:#ffffff26}\n"] }]
|
|
970
|
+
}], propDecorators: { item: [{
|
|
971
|
+
type: Input
|
|
972
|
+
}], pageWidth: [{
|
|
973
|
+
type: Input
|
|
974
|
+
}], pageHeight: [{
|
|
975
|
+
type: Input
|
|
976
|
+
}], linkClicked: [{
|
|
977
|
+
type: Output
|
|
978
|
+
}] } });
|
|
979
|
+
|
|
980
|
+
class OverlayProductComponent {
|
|
981
|
+
constructor() {
|
|
982
|
+
this.productClicked = new EventEmitter();
|
|
983
|
+
}
|
|
984
|
+
ngOnInit() {
|
|
985
|
+
SolidLog.log('[OverlayProduct] Element initialized:', {
|
|
986
|
+
type: this.item.type,
|
|
987
|
+
coords: { x: this.item.x, y: this.item.y, w: this.item.width, h: this.item.height },
|
|
988
|
+
page: { w: this.pageWidth, h: this.pageHeight },
|
|
989
|
+
calculated: {
|
|
990
|
+
left: (this.item.x / this.pageWidth) * 100 + '%',
|
|
991
|
+
top: (this.item.y / this.pageHeight) * 100 + '%',
|
|
992
|
+
}
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
onClick() {
|
|
996
|
+
if (this.item.tooltip) {
|
|
997
|
+
this.productClicked.emit(this.item.tooltip);
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: OverlayProductComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1001
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: OverlayProductComponent, isStandalone: true, selector: "app-overlay-product", inputs: { item: "item", pageWidth: "pageWidth", pageHeight: "pageHeight" }, outputs: { productClicked: "productClicked" }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: `
|
|
1002
|
+
<div
|
|
1003
|
+
class="overlay-product"
|
|
1004
|
+
[class.show-box]="item.showBox"
|
|
1005
|
+
[class.clickable-box]="item.clickBox"
|
|
1006
|
+
[style.left]="(item.x / pageWidth) * 100 + '%'"
|
|
1007
|
+
[style.top]="(item.y / pageHeight) * 100 + '%'"
|
|
1008
|
+
[style.width]="(item.width / pageWidth) * 100 + '%'"
|
|
1009
|
+
[style.height]="(item.height / pageHeight) * 100 + '%'"
|
|
1010
|
+
[attr.title]="item.tooltip"
|
|
1011
|
+
(click)="item.clickBox ? onClick() : null; $event.stopPropagation()"
|
|
1012
|
+
(mousedown)="$event.stopPropagation()"
|
|
1013
|
+
(touchstart)="$event.stopPropagation()"
|
|
1014
|
+
>
|
|
1015
|
+
<div
|
|
1016
|
+
*ngIf="item.showIcon"
|
|
1017
|
+
class="product-icon-container"
|
|
1018
|
+
[style.align-items]="
|
|
1019
|
+
item['icon-align'] === 'end'
|
|
1020
|
+
? 'flex-end'
|
|
1021
|
+
: item['icon-align'] === 'center'
|
|
1022
|
+
? 'center'
|
|
1023
|
+
: 'flex-start'
|
|
1024
|
+
"
|
|
1025
|
+
[style.justify-content]="
|
|
1026
|
+
item['icon-justify'] === 'end'
|
|
1027
|
+
? 'flex-end'
|
|
1028
|
+
: item['icon-justify'] === 'center'
|
|
1029
|
+
? 'center'
|
|
1030
|
+
: 'flex-start'
|
|
1031
|
+
"
|
|
1032
|
+
>
|
|
1033
|
+
<button
|
|
1034
|
+
class="product-icon-btn"
|
|
1035
|
+
(click)="onClick(); $event.stopPropagation()"
|
|
1036
|
+
>
|
|
1037
|
+
<i class="bi bi-eye"></i>
|
|
1038
|
+
</button>
|
|
1039
|
+
</div>
|
|
1040
|
+
</div>
|
|
1041
|
+
`, isInline: true, styles: [".overlay-product{position:absolute;pointer-events:auto;display:flex;box-sizing:border-box;transition:all .2s ease;z-index:10}.overlay-product.clickable-box{cursor:pointer}.product-icon-container{display:flex;width:100%;height:100%;padding:6px;box-sizing:border-box;pointer-events:none}.product-icon-container>*{pointer-events:auto}.product-icon-btn{width:16px;height:16px;border-radius:50%;background:#fffffff2;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1.5px solid rgba(255,255,255,.6);display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #00000040;cursor:pointer;transition:all .3s cubic-bezier(.175,.885,.32,1.275);color:#1a1a1a;padding:0;position:relative;z-index:5}.product-icon-btn:hover{transform:scale(1.15) translateY(-2px);background:#fff}.product-icon-btn:active{transform:scale(.9)}.product-icon-btn i{font-size:10px;display:flex;align-items:center;justify-content:center;line-height:1}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
1042
|
+
}
|
|
1043
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: OverlayProductComponent, decorators: [{
|
|
1044
|
+
type: Component,
|
|
1045
|
+
args: [{ selector: 'app-overlay-product', standalone: true, imports: [CommonModule], host: { style: 'display: contents' }, template: `
|
|
1046
|
+
<div
|
|
1047
|
+
class="overlay-product"
|
|
1048
|
+
[class.show-box]="item.showBox"
|
|
1049
|
+
[class.clickable-box]="item.clickBox"
|
|
1050
|
+
[style.left]="(item.x / pageWidth) * 100 + '%'"
|
|
1051
|
+
[style.top]="(item.y / pageHeight) * 100 + '%'"
|
|
1052
|
+
[style.width]="(item.width / pageWidth) * 100 + '%'"
|
|
1053
|
+
[style.height]="(item.height / pageHeight) * 100 + '%'"
|
|
1054
|
+
[attr.title]="item.tooltip"
|
|
1055
|
+
(click)="item.clickBox ? onClick() : null; $event.stopPropagation()"
|
|
1056
|
+
(mousedown)="$event.stopPropagation()"
|
|
1057
|
+
(touchstart)="$event.stopPropagation()"
|
|
1058
|
+
>
|
|
1059
|
+
<div
|
|
1060
|
+
*ngIf="item.showIcon"
|
|
1061
|
+
class="product-icon-container"
|
|
1062
|
+
[style.align-items]="
|
|
1063
|
+
item['icon-align'] === 'end'
|
|
1064
|
+
? 'flex-end'
|
|
1065
|
+
: item['icon-align'] === 'center'
|
|
1066
|
+
? 'center'
|
|
1067
|
+
: 'flex-start'
|
|
1068
|
+
"
|
|
1069
|
+
[style.justify-content]="
|
|
1070
|
+
item['icon-justify'] === 'end'
|
|
1071
|
+
? 'flex-end'
|
|
1072
|
+
: item['icon-justify'] === 'center'
|
|
1073
|
+
? 'center'
|
|
1074
|
+
: 'flex-start'
|
|
1075
|
+
"
|
|
1076
|
+
>
|
|
1077
|
+
<button
|
|
1078
|
+
class="product-icon-btn"
|
|
1079
|
+
(click)="onClick(); $event.stopPropagation()"
|
|
1080
|
+
>
|
|
1081
|
+
<i class="bi bi-eye"></i>
|
|
1082
|
+
</button>
|
|
1083
|
+
</div>
|
|
1084
|
+
</div>
|
|
1085
|
+
`, styles: [".overlay-product{position:absolute;pointer-events:auto;display:flex;box-sizing:border-box;transition:all .2s ease;z-index:10}.overlay-product.clickable-box{cursor:pointer}.product-icon-container{display:flex;width:100%;height:100%;padding:6px;box-sizing:border-box;pointer-events:none}.product-icon-container>*{pointer-events:auto}.product-icon-btn{width:16px;height:16px;border-radius:50%;background:#fffffff2;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1.5px solid rgba(255,255,255,.6);display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #00000040;cursor:pointer;transition:all .3s cubic-bezier(.175,.885,.32,1.275);color:#1a1a1a;padding:0;position:relative;z-index:5}.product-icon-btn:hover{transform:scale(1.15) translateY(-2px);background:#fff}.product-icon-btn:active{transform:scale(.9)}.product-icon-btn i{font-size:10px;display:flex;align-items:center;justify-content:center;line-height:1}\n"] }]
|
|
1086
|
+
}], propDecorators: { item: [{
|
|
1087
|
+
type: Input
|
|
1088
|
+
}], pageWidth: [{
|
|
1089
|
+
type: Input
|
|
1090
|
+
}], pageHeight: [{
|
|
1091
|
+
type: Input
|
|
1092
|
+
}], productClicked: [{
|
|
1093
|
+
type: Output
|
|
1094
|
+
}] } });
|
|
1095
|
+
|
|
1096
|
+
class FlipbookViewerComponent {
|
|
1097
|
+
get transformStyle() {
|
|
1098
|
+
return `translate(${this.offsetX}px, ${this.offsetY}px) scale(${this.scale})`;
|
|
1099
|
+
}
|
|
1100
|
+
constructor(dataService, paramsService) {
|
|
1101
|
+
this.dataService = dataService;
|
|
1102
|
+
this.paramsService = paramsService;
|
|
1103
|
+
this.pages = [];
|
|
1104
|
+
this.images = [];
|
|
1105
|
+
this.pagesLoaded = new EventEmitter();
|
|
1106
|
+
this.pageChanged = new EventEmitter();
|
|
1107
|
+
this.toggleSidebar = new EventEmitter();
|
|
1108
|
+
this.toggleMap = new EventEmitter();
|
|
1109
|
+
this.zoomChanged = new EventEmitter();
|
|
1110
|
+
this.pageFlip = null;
|
|
1111
|
+
this.isInitializing = false;
|
|
1112
|
+
this.isBookVisible = true;
|
|
1113
|
+
this.isFlipping = false;
|
|
1114
|
+
this.resizeSubject = new Subject();
|
|
1115
|
+
// ZOOM & DRAG State
|
|
1116
|
+
this.scale = 1;
|
|
1117
|
+
this.offsetX = 0;
|
|
1118
|
+
this.offsetY = 0;
|
|
1119
|
+
this.lastX = 0;
|
|
1120
|
+
this.lastY = 0;
|
|
1121
|
+
this.isDragging = false;
|
|
1122
|
+
this.isPinching = false;
|
|
1123
|
+
this.lastDistance = 0;
|
|
1124
|
+
this.lastTapTime = 0;
|
|
1125
|
+
this.touchStartX = 0;
|
|
1126
|
+
this.touchStartY = 0;
|
|
1127
|
+
this.manualSwipeThreshold = 0.2; // 50% de la largeur de l'écran
|
|
1128
|
+
this.scaleStep = 0.2; // Un peu plus rapide
|
|
1129
|
+
this.scaleMin = 1.0; // Bloqué à 1x pour éviter le de-zoom trop petit qui casse le layout mobile
|
|
1130
|
+
this.scaleMax = 5;
|
|
1131
|
+
this.lastFlipTime = 0;
|
|
1132
|
+
}
|
|
1133
|
+
ngOnInit() {
|
|
1134
|
+
this.dataService.pages$.subscribe((pages) => {
|
|
1135
|
+
if (pages.length > 0) {
|
|
1136
|
+
this.pages = pages;
|
|
1137
|
+
this.images = this.pages.map((p) => p.pageImage);
|
|
1138
|
+
SolidLog.log('[FlipbookViewer] Pages updated, re-initializing...', {
|
|
1139
|
+
count: this.images.length,
|
|
1140
|
+
});
|
|
1141
|
+
this.initBook();
|
|
1142
|
+
}
|
|
1143
|
+
});
|
|
1144
|
+
// Setup debounced resize
|
|
1145
|
+
this.resizeSubject.pipe(debounceTime(300)).subscribe(() => {
|
|
1146
|
+
const currentPage = this.getCurrentPageIndex();
|
|
1147
|
+
SolidLog.log('[FlipbookViewer] Regenerating book for new size...', {
|
|
1148
|
+
currentPage,
|
|
1149
|
+
});
|
|
1150
|
+
this.initBook(currentPage);
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1153
|
+
async ngAfterViewInit() {
|
|
1154
|
+
if (this.images.length > 0) {
|
|
1155
|
+
await this.initBook();
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
getImageDimensions(url) {
|
|
1159
|
+
return new Promise((resolve) => {
|
|
1160
|
+
const img = new Image();
|
|
1161
|
+
img.onload = () => resolve({ width: img.naturalWidth, height: img.naturalHeight });
|
|
1162
|
+
img.onerror = () => resolve({ width: 550, height: 733 });
|
|
1163
|
+
img.src = url;
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
async initBook(targetPage = 0) {
|
|
1167
|
+
if (this.isInitializing)
|
|
1168
|
+
return;
|
|
1169
|
+
this.isInitializing = true;
|
|
1170
|
+
// --- ULTRA ROBUST RESET ---
|
|
1171
|
+
// 1. On démonte le livre du DOM via *ngIf pour repartir sur un DOM propre
|
|
1172
|
+
this.isBookVisible = false;
|
|
1173
|
+
// 2. On nettoie l'instance précédente
|
|
1174
|
+
if (this.pageFlip) {
|
|
1175
|
+
try {
|
|
1176
|
+
this.pageFlip.destroy();
|
|
1177
|
+
}
|
|
1178
|
+
catch (err) {
|
|
1179
|
+
console.warn('[FlipbookViewer] Erreur destruction book :', err);
|
|
1180
|
+
}
|
|
1181
|
+
this.pageFlip = null;
|
|
1182
|
+
}
|
|
1183
|
+
// 3. On attend un tick pour que Angular détruise le DOM
|
|
1184
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
1185
|
+
// 4. On remonte le livre
|
|
1186
|
+
this.isBookVisible = true;
|
|
1187
|
+
// 5. On attend le rendu du nouveau DOM
|
|
1188
|
+
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
1189
|
+
try {
|
|
1190
|
+
if (!this.bookContainer) {
|
|
1191
|
+
this.isInitializing = false;
|
|
1192
|
+
return;
|
|
1193
|
+
}
|
|
1194
|
+
// Récupération des dimensions de la première image
|
|
1195
|
+
const dims = await this.getImageDimensions(this.images[0]);
|
|
1196
|
+
const bookElement = this.bookContainer.nativeElement;
|
|
1197
|
+
// --- CALCUL DU SMART SCALING (80% viewport) ---
|
|
1198
|
+
const winW = window.innerWidth;
|
|
1199
|
+
const winH = window.innerHeight;
|
|
1200
|
+
// Seulement en mode "vrai" mobile ou si l'écran est vraiment très étroit/vertical
|
|
1201
|
+
const isPortrait = winW < 600;
|
|
1202
|
+
const maxW = isPortrait ? winW * 0.94 : winW * 0.8;
|
|
1203
|
+
const maxH = isPortrait ? winH * 0.9 : winH * 0.8;
|
|
1204
|
+
// En portrait on veut fitter une seule page, sinon deux
|
|
1205
|
+
const naturalBookW = isPortrait ? dims.width : dims.width * 2;
|
|
1206
|
+
const naturalBookH = dims.height;
|
|
1207
|
+
const scale = Math.min(maxW / naturalBookW, maxH / naturalBookH);
|
|
1208
|
+
const finalPageW = Math.floor(dims.width * scale);
|
|
1209
|
+
const finalPageH = Math.floor(dims.height * scale);
|
|
1210
|
+
SolidLog.log('[FlipbookViewer] Dimensions calculées:', {
|
|
1211
|
+
scale,
|
|
1212
|
+
finalPageW,
|
|
1213
|
+
finalPageH,
|
|
1214
|
+
isPortrait,
|
|
1215
|
+
});
|
|
1216
|
+
bookElement.style.width = isPortrait
|
|
1217
|
+
? `${finalPageW}px`
|
|
1218
|
+
: `${finalPageW * 2}px`;
|
|
1219
|
+
bookElement.style.height = `${finalPageH}px`;
|
|
1220
|
+
this.pageFlip = new PageFlip(bookElement, {
|
|
1221
|
+
width: finalPageW,
|
|
1222
|
+
height: finalPageH,
|
|
1223
|
+
size: 'fixed',
|
|
1224
|
+
minWidth: 100,
|
|
1225
|
+
maxWidth: 3000,
|
|
1226
|
+
minHeight: 100,
|
|
1227
|
+
maxHeight: 3000,
|
|
1228
|
+
maxShadowOpacity: 0.5,
|
|
1229
|
+
showCover: !isPortrait,
|
|
1230
|
+
mobileScrollSupport: true,
|
|
1231
|
+
flippingTime: 800,
|
|
1232
|
+
usePortrait: isPortrait,
|
|
1233
|
+
disableFlipByClick: true,
|
|
1234
|
+
showPageCorners: true,
|
|
1235
|
+
swipeDistance: 10000, // Disabled because don't work for previous page
|
|
1236
|
+
clickEventForward: true,
|
|
1237
|
+
});
|
|
1238
|
+
// Event: Flip
|
|
1239
|
+
this.pageFlip.on('flip', (e) => {
|
|
1240
|
+
this.pageChanged.emit(e.data);
|
|
1241
|
+
this.loadImages(e.data);
|
|
1242
|
+
this.isFlipping = false;
|
|
1243
|
+
this.lastFlipTime = Date.now();
|
|
1244
|
+
});
|
|
1245
|
+
// Event: State Change (to manage animations during flip)
|
|
1246
|
+
this.pageFlip.on('changeState', (e) => {
|
|
1247
|
+
this.isFlipping = e.data === 'flipping';
|
|
1248
|
+
});
|
|
1249
|
+
// Event: Init
|
|
1250
|
+
this.pageFlip.on('init', () => {
|
|
1251
|
+
if (targetPage === 0) {
|
|
1252
|
+
const pagesData = this.images.map((src, i) => ({
|
|
1253
|
+
src,
|
|
1254
|
+
number: i + 1,
|
|
1255
|
+
}));
|
|
1256
|
+
this.pagesLoaded.emit(pagesData);
|
|
1257
|
+
}
|
|
1258
|
+
this.pageChanged.emit(targetPage);
|
|
1259
|
+
});
|
|
1260
|
+
const pagesEl = bookElement.querySelectorAll('.page');
|
|
1261
|
+
if (pagesEl.length > 0) {
|
|
1262
|
+
this.pageFlip.loadFromHTML(pagesEl);
|
|
1263
|
+
if (targetPage > 0) {
|
|
1264
|
+
setTimeout(() => {
|
|
1265
|
+
try {
|
|
1266
|
+
this.pageFlip?.turnToPage(targetPage);
|
|
1267
|
+
this.loadImages(targetPage);
|
|
1268
|
+
}
|
|
1269
|
+
catch (e) {
|
|
1270
|
+
console.warn('[FlipbookViewer] Erreur turnToPage:', e);
|
|
1271
|
+
}
|
|
1272
|
+
}, 150);
|
|
1273
|
+
}
|
|
1274
|
+
else {
|
|
1275
|
+
this.loadImages(0);
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
catch (err) {
|
|
1280
|
+
console.error('[FlipbookViewer] Erreur initialisation :', err);
|
|
1281
|
+
}
|
|
1282
|
+
finally {
|
|
1283
|
+
this.isInitializing = false;
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
loadImages(index) {
|
|
1287
|
+
if (!this.isBookVisible || !this.bookContainer)
|
|
1288
|
+
return;
|
|
1289
|
+
const pagesToLoad = [
|
|
1290
|
+
index - 2,
|
|
1291
|
+
index - 1,
|
|
1292
|
+
index,
|
|
1293
|
+
index + 1,
|
|
1294
|
+
index + 2,
|
|
1295
|
+
index + 3,
|
|
1296
|
+
];
|
|
1297
|
+
const pageElements = this.bookContainer.nativeElement.querySelectorAll('.page');
|
|
1298
|
+
pagesToLoad.forEach((idx) => {
|
|
1299
|
+
if (idx >= 0 && idx < pageElements.length) {
|
|
1300
|
+
const img = pageElements[idx].querySelector('img');
|
|
1301
|
+
if (img && img.getAttribute('data-src')) {
|
|
1302
|
+
img.setAttribute('src', img.getAttribute('data-src'));
|
|
1303
|
+
img.removeAttribute('data-src');
|
|
1304
|
+
}
|
|
1305
|
+
this.dataService.loadPageData(idx);
|
|
1306
|
+
}
|
|
1307
|
+
});
|
|
1308
|
+
}
|
|
1309
|
+
onLinkClick(url) {
|
|
1310
|
+
if (url) {
|
|
1311
|
+
window.open(url, '_blank');
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
onProductClick(sku) {
|
|
1315
|
+
SolidLog.log('[FlipbookViewer] Product clicked:', sku);
|
|
1316
|
+
alert(`Produit cliqué : ${sku || 'SKU'}`);
|
|
1317
|
+
}
|
|
1318
|
+
// Navigation API
|
|
1319
|
+
flipPrev() {
|
|
1320
|
+
if (!this.pageFlip)
|
|
1321
|
+
return;
|
|
1322
|
+
if (this.isZoomed)
|
|
1323
|
+
this.resetZoom();
|
|
1324
|
+
const curr = this.getCurrentPageIndex();
|
|
1325
|
+
if (curr <= 0) {
|
|
1326
|
+
SolidLog.log('[FlipbookViewer] flipPrev ignored: already at start');
|
|
1327
|
+
return;
|
|
1328
|
+
}
|
|
1329
|
+
const isPortrait = this.pageFlip.getOrientation() === 'portrait';
|
|
1330
|
+
const step = isPortrait ? 1 : 2;
|
|
1331
|
+
let target = curr - step;
|
|
1332
|
+
if (target < 0)
|
|
1333
|
+
target = 0;
|
|
1334
|
+
SolidLog.log('[FlipbookViewer] flipPrev', { curr, target, isPortrait });
|
|
1335
|
+
this.loadImages(target);
|
|
1336
|
+
try {
|
|
1337
|
+
// Use turnToPage for back navigation on mobile as it's more reliable
|
|
1338
|
+
if (isPortrait) {
|
|
1339
|
+
this.pageFlip.turnToPage(target);
|
|
1340
|
+
}
|
|
1341
|
+
else {
|
|
1342
|
+
this.pageFlip.flip(target);
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
catch (e) {
|
|
1346
|
+
console.warn('[FlipbookViewer] flip failed, using flipPrev()', e);
|
|
1347
|
+
this.pageFlip.flipPrev();
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
flipNext() {
|
|
1351
|
+
if (!this.pageFlip)
|
|
1352
|
+
return;
|
|
1353
|
+
if (this.isZoomed)
|
|
1354
|
+
this.resetZoom();
|
|
1355
|
+
const curr = this.getCurrentPageIndex();
|
|
1356
|
+
const total = this.pageFlip.getPageCount();
|
|
1357
|
+
if (curr >= total - 1) {
|
|
1358
|
+
SolidLog.log('[FlipbookViewer] flipNext ignored: already at end');
|
|
1359
|
+
return;
|
|
1360
|
+
}
|
|
1361
|
+
const isPortrait = this.pageFlip.getOrientation() === 'portrait';
|
|
1362
|
+
const step = isPortrait ? 1 : 2;
|
|
1363
|
+
let target = curr + step;
|
|
1364
|
+
if (target >= total)
|
|
1365
|
+
target = total - 1;
|
|
1366
|
+
SolidLog.log('[FlipbookViewer] flipNext', { curr, target, isPortrait });
|
|
1367
|
+
this.loadImages(target);
|
|
1368
|
+
try {
|
|
1369
|
+
this.pageFlip.flip(target);
|
|
1370
|
+
}
|
|
1371
|
+
catch (e) {
|
|
1372
|
+
console.warn('[FlipbookViewer] flip(target) failed, using flipNext()', e);
|
|
1373
|
+
this.pageFlip.flipNext();
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
flip(page) {
|
|
1377
|
+
if (!this.pageFlip)
|
|
1378
|
+
return;
|
|
1379
|
+
if (this.isZoomed)
|
|
1380
|
+
this.resetZoom();
|
|
1381
|
+
SolidLog.log('[FlipbookViewer] flip to page index', { page });
|
|
1382
|
+
this.loadImages(page);
|
|
1383
|
+
try {
|
|
1384
|
+
this.pageFlip.flip(page);
|
|
1385
|
+
}
|
|
1386
|
+
catch (e) {
|
|
1387
|
+
this.pageFlip.turnToPage(page);
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
flipEnd() {
|
|
1391
|
+
if (!this.pageFlip)
|
|
1392
|
+
return;
|
|
1393
|
+
if (this.isZoomed)
|
|
1394
|
+
this.resetZoom();
|
|
1395
|
+
const lastIdx = (this.pageFlip?.getPageCount() ?? 1) - 1;
|
|
1396
|
+
this.loadImages(lastIdx - 1);
|
|
1397
|
+
this.pageFlip?.flip(lastIdx);
|
|
1398
|
+
}
|
|
1399
|
+
goToPage(pageNumber) {
|
|
1400
|
+
if (!this.pageFlip)
|
|
1401
|
+
return;
|
|
1402
|
+
if (this.isZoomed)
|
|
1403
|
+
this.resetZoom();
|
|
1404
|
+
const targetIdx = pageNumber - 1;
|
|
1405
|
+
SolidLog.log('[FlipbookViewer] goToPage', { pageNumber, targetIdx });
|
|
1406
|
+
this.loadImages(targetIdx);
|
|
1407
|
+
try {
|
|
1408
|
+
this.pageFlip.turnToPage(targetIdx);
|
|
1409
|
+
}
|
|
1410
|
+
catch (e) {
|
|
1411
|
+
this.pageFlip.flip(targetIdx);
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
getCurrentPageIndex() {
|
|
1415
|
+
if (!this.pageFlip)
|
|
1416
|
+
return 0;
|
|
1417
|
+
try {
|
|
1418
|
+
return this.pageFlip.getCurrentPageIndex() ?? 0;
|
|
1419
|
+
}
|
|
1420
|
+
catch (err) {
|
|
1421
|
+
return 0;
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
get isDebugVisible() {
|
|
1425
|
+
const isLocal = () => {
|
|
1426
|
+
const hn = window.location.hostname;
|
|
1427
|
+
return (hn === 'localhost' ||
|
|
1428
|
+
hn === '127.0.0.1' ||
|
|
1429
|
+
hn.startsWith('192.168.') ||
|
|
1430
|
+
hn.startsWith('10.'));
|
|
1431
|
+
};
|
|
1432
|
+
return this.paramsService.params().debug === true && isLocal();
|
|
1433
|
+
}
|
|
1434
|
+
get debugInfo() {
|
|
1435
|
+
const idx = this.getCurrentPageIndex();
|
|
1436
|
+
const page = this.pages[idx];
|
|
1437
|
+
if (!page)
|
|
1438
|
+
return 'No Page';
|
|
1439
|
+
const status = page.pageData
|
|
1440
|
+
? page.pageData.datas.length > 0
|
|
1441
|
+
? 'OK'
|
|
1442
|
+
: 'EMPTY'
|
|
1443
|
+
: 'PENDING';
|
|
1444
|
+
const links = page.pageData?.datas?.length ?? 0;
|
|
1445
|
+
return `Pg: ${idx + 1} | JSON: ${status} | Links: ${links}`;
|
|
1446
|
+
}
|
|
1447
|
+
// ZOOM
|
|
1448
|
+
get isZoomed() {
|
|
1449
|
+
return this.scale > 1.01;
|
|
1450
|
+
}
|
|
1451
|
+
onWheelZoom(event) {
|
|
1452
|
+
event.preventDefault();
|
|
1453
|
+
const delta = event.deltaY < 0 ? this.scaleStep : -this.scaleStep;
|
|
1454
|
+
const newScale = Math.max(this.scaleMin, Math.min(this.scaleMax, this.scale + delta));
|
|
1455
|
+
this.applyZoomAt(newScale, event.clientX, event.clientY);
|
|
1456
|
+
}
|
|
1457
|
+
onDoubleClick(event) {
|
|
1458
|
+
if (this.isFlipping || Date.now() - this.lastFlipTime < 500) {
|
|
1459
|
+
return;
|
|
1460
|
+
}
|
|
1461
|
+
if (this.scale > 1.01) {
|
|
1462
|
+
this.resetZoom();
|
|
1463
|
+
return;
|
|
1464
|
+
}
|
|
1465
|
+
const targetScale = 2.5;
|
|
1466
|
+
this.applyZoomAt(targetScale, event.clientX, event.clientY);
|
|
1467
|
+
event.stopPropagation();
|
|
1468
|
+
}
|
|
1469
|
+
handleDoubleTap(touch) {
|
|
1470
|
+
if (this.isFlipping || Date.now() - this.lastFlipTime < 500) {
|
|
1471
|
+
return;
|
|
1472
|
+
}
|
|
1473
|
+
if (this.scale > 1.01) {
|
|
1474
|
+
this.resetZoom();
|
|
1475
|
+
return;
|
|
1476
|
+
}
|
|
1477
|
+
const targetScale = 2.5;
|
|
1478
|
+
this.applyZoomAt(targetScale, touch.clientX, touch.clientY);
|
|
1479
|
+
}
|
|
1480
|
+
resetZoom() {
|
|
1481
|
+
this.scale = 1;
|
|
1482
|
+
this.zoomChanged.emit(this.scale);
|
|
1483
|
+
this.offsetX = 0;
|
|
1484
|
+
this.offsetY = 0;
|
|
1485
|
+
}
|
|
1486
|
+
onZoomIn() {
|
|
1487
|
+
if (!this.flipbookRef)
|
|
1488
|
+
return;
|
|
1489
|
+
const rect = this.flipbookRef.nativeElement.getBoundingClientRect();
|
|
1490
|
+
const centerX = rect.left + rect.width / 2;
|
|
1491
|
+
const centerY = rect.top + rect.height / 2;
|
|
1492
|
+
this.applyZoomAt(Math.min(this.scaleMax, this.scale + this.scaleStep), centerX, centerY);
|
|
1493
|
+
}
|
|
1494
|
+
onZoomOut() {
|
|
1495
|
+
if (!this.flipbookRef)
|
|
1496
|
+
return;
|
|
1497
|
+
const rect = this.flipbookRef.nativeElement.getBoundingClientRect();
|
|
1498
|
+
const centerX = rect.left + rect.width / 2;
|
|
1499
|
+
const centerY = rect.top + rect.height / 2;
|
|
1500
|
+
this.applyZoomAt(Math.max(this.scaleMin, this.scale - this.scaleStep), centerX, centerY);
|
|
1501
|
+
}
|
|
1502
|
+
applyZoomAt(newScale, clientX, clientY) {
|
|
1503
|
+
if (!this.flipbookRef)
|
|
1504
|
+
return;
|
|
1505
|
+
const oldScale = this.scale;
|
|
1506
|
+
if (Math.abs(newScale - oldScale) < 0.001)
|
|
1507
|
+
return;
|
|
1508
|
+
const rect = this.flipbookRef.nativeElement.getBoundingClientRect();
|
|
1509
|
+
const centerX = rect.left + rect.width / 2;
|
|
1510
|
+
const centerY = rect.top + rect.height / 2;
|
|
1511
|
+
const mx = clientX - centerX;
|
|
1512
|
+
const my = clientY - centerY;
|
|
1513
|
+
// Formula to keep the point (mx, my) fixed under the transform:
|
|
1514
|
+
// offsetX_new = mx - (mx - offsetX_old) * (scale_new / scale_old)
|
|
1515
|
+
this.offsetX = mx - (mx - this.offsetX) * (newScale / oldScale);
|
|
1516
|
+
this.offsetY = my - (my - this.offsetY) * (newScale / oldScale);
|
|
1517
|
+
this.scale = newScale;
|
|
1518
|
+
this.zoomChanged.emit(this.scale);
|
|
1519
|
+
if (this.scale <= this.scaleMin + 0.01) {
|
|
1520
|
+
this.resetZoom();
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
// DRAG
|
|
1524
|
+
startDrag(event) {
|
|
1525
|
+
if (this.isZoomed) {
|
|
1526
|
+
event.preventDefault(); // Empêche le "fantôme" de drag de l'image du navigateur
|
|
1527
|
+
event.stopPropagation();
|
|
1528
|
+
}
|
|
1529
|
+
else if (event.target.closest('#book') &&
|
|
1530
|
+
event.button === 0) {
|
|
1531
|
+
return;
|
|
1532
|
+
}
|
|
1533
|
+
this.isDragging = true;
|
|
1534
|
+
this.lastX = event.clientX;
|
|
1535
|
+
this.lastY = event.clientY;
|
|
1536
|
+
document.body.style.cursor = 'grabbing';
|
|
1537
|
+
}
|
|
1538
|
+
onDrag(event) {
|
|
1539
|
+
if (!this.isDragging || !this.isZoomed)
|
|
1540
|
+
return;
|
|
1541
|
+
event.stopPropagation();
|
|
1542
|
+
this.offsetX += event.clientX - this.lastX;
|
|
1543
|
+
this.offsetY += event.clientY - this.lastY;
|
|
1544
|
+
this.lastX = event.clientX;
|
|
1545
|
+
this.lastY = event.clientY;
|
|
1546
|
+
}
|
|
1547
|
+
stopDrag() {
|
|
1548
|
+
this.isDragging = false;
|
|
1549
|
+
document.body.style.cursor = '';
|
|
1550
|
+
}
|
|
1551
|
+
// TOUCH
|
|
1552
|
+
startTouch(event) {
|
|
1553
|
+
if (this.isZoomed) {
|
|
1554
|
+
event.stopPropagation();
|
|
1555
|
+
}
|
|
1556
|
+
if (event.touches.length === 1) {
|
|
1557
|
+
const now = Date.now();
|
|
1558
|
+
const timeSinceLastTap = now - this.lastTapTime;
|
|
1559
|
+
this.touchStartX = event.touches[0].clientX;
|
|
1560
|
+
this.touchStartY = event.touches[0].clientY;
|
|
1561
|
+
if (timeSinceLastTap < 300) {
|
|
1562
|
+
// Double tap detected
|
|
1563
|
+
this.handleDoubleTap(event.touches[0]);
|
|
1564
|
+
this.lastTapTime = 0; // Reset
|
|
1565
|
+
return;
|
|
1566
|
+
}
|
|
1567
|
+
this.lastTapTime = now;
|
|
1568
|
+
if (!this.isZoomed && event.target.closest('#book'))
|
|
1569
|
+
return;
|
|
1570
|
+
this.isDragging = true;
|
|
1571
|
+
this.isPinching = false;
|
|
1572
|
+
this.lastX = event.touches[0].clientX;
|
|
1573
|
+
this.lastY = event.touches[0].clientY;
|
|
1574
|
+
}
|
|
1575
|
+
else if (event.touches.length === 2) {
|
|
1576
|
+
this.isDragging = false;
|
|
1577
|
+
this.isPinching = true;
|
|
1578
|
+
this.lastDistance = this.getDistance(event.touches[0], event.touches[1]);
|
|
1579
|
+
event.preventDefault(); // Prevents browser zoom
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
getDistance(t1, t2) {
|
|
1583
|
+
return Math.sqrt((t2.clientX - t1.clientX) ** 2 + (t2.clientY - t1.clientY) ** 2);
|
|
1584
|
+
}
|
|
1585
|
+
onTouchMove(event) {
|
|
1586
|
+
if (event.touches.length === 1 && this.isDragging) {
|
|
1587
|
+
if (!this.isZoomed)
|
|
1588
|
+
return;
|
|
1589
|
+
event.stopPropagation();
|
|
1590
|
+
this.offsetX += event.touches[0].clientX - this.lastX;
|
|
1591
|
+
this.offsetY += event.touches[0].clientY - this.lastY;
|
|
1592
|
+
this.lastX = event.touches[0].clientX;
|
|
1593
|
+
this.lastY = event.touches[0].clientY;
|
|
1594
|
+
}
|
|
1595
|
+
else if (event.touches.length === 2 && this.isPinching) {
|
|
1596
|
+
event.preventDefault();
|
|
1597
|
+
event.stopPropagation();
|
|
1598
|
+
const t1 = event.touches[0];
|
|
1599
|
+
const t2 = event.touches[1];
|
|
1600
|
+
const d = this.getDistance(t1, t2);
|
|
1601
|
+
if (this.lastDistance > 0) {
|
|
1602
|
+
const ratio = d / this.lastDistance;
|
|
1603
|
+
const newScale = Math.max(this.scaleMin, Math.min(this.scaleMax, this.scale * ratio));
|
|
1604
|
+
const midX = (t1.clientX + t2.clientX) / 2;
|
|
1605
|
+
const midY = (t1.clientY + t2.clientY) / 2;
|
|
1606
|
+
this.applyZoomAt(newScale, midX, midY);
|
|
1607
|
+
}
|
|
1608
|
+
this.lastDistance = d;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
stopTouch(event) {
|
|
1612
|
+
if (!this.isZoomed && this.touchStartX !== 0) {
|
|
1613
|
+
const touchEndX = event.changedTouches[0].clientX;
|
|
1614
|
+
const dx = touchEndX - this.touchStartX;
|
|
1615
|
+
const width = window.innerWidth;
|
|
1616
|
+
// Threshold: at least 50% of the screen width
|
|
1617
|
+
if (Math.abs(dx) > width * this.manualSwipeThreshold) {
|
|
1618
|
+
SolidLog.log('[FlipbookViewer] Manual swipe detected', {
|
|
1619
|
+
dx,
|
|
1620
|
+
threshold: this.manualSwipeThreshold,
|
|
1621
|
+
});
|
|
1622
|
+
if (dx < 0) {
|
|
1623
|
+
// LEFT swipe -> NEXT (standard LTR)
|
|
1624
|
+
this.flipNext();
|
|
1625
|
+
}
|
|
1626
|
+
else {
|
|
1627
|
+
// RIGHT swipe -> PREV (standard LTR)
|
|
1628
|
+
this.flipPrev();
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
this.isDragging = false;
|
|
1633
|
+
this.isPinching = false;
|
|
1634
|
+
this.lastDistance = 0;
|
|
1635
|
+
this.touchStartX = 0;
|
|
1636
|
+
this.touchStartY = 0;
|
|
1637
|
+
}
|
|
1638
|
+
handleOverlayStart(event) {
|
|
1639
|
+
// Stop propagation to prevent PageFlip from capturing the start of an interaction
|
|
1640
|
+
// which would trigger a page flip animation.
|
|
1641
|
+
event.stopPropagation();
|
|
1642
|
+
if (this.isMouseEvent(event)) {
|
|
1643
|
+
this.startDrag(event);
|
|
1644
|
+
}
|
|
1645
|
+
else {
|
|
1646
|
+
this.startTouch(event);
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
isMouseEvent(event) {
|
|
1650
|
+
return event instanceof MouseEvent || 'button' in event;
|
|
1651
|
+
}
|
|
1652
|
+
handleKeyDown(event) {
|
|
1653
|
+
if (event.key === 'ArrowLeft') {
|
|
1654
|
+
this.flipPrev();
|
|
1655
|
+
}
|
|
1656
|
+
else if (event.key === 'ArrowRight') {
|
|
1657
|
+
this.flipNext();
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
resize() {
|
|
1661
|
+
this.resizeSubject.next();
|
|
1662
|
+
}
|
|
1663
|
+
ngOnDestroy() {
|
|
1664
|
+
if (this.pageFlip) {
|
|
1665
|
+
this.pageFlip.destroy();
|
|
1666
|
+
this.pageFlip = null;
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookViewerComponent, deps: [{ token: FlipbookDataService }, { token: AppParamsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1670
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: FlipbookViewerComponent, isStandalone: true, selector: "app-flipbook-viewer", outputs: { pagesLoaded: "pagesLoaded", pageChanged: "pageChanged", toggleSidebar: "toggleSidebar", toggleMap: "toggleMap", zoomChanged: "zoomChanged" }, host: { listeners: { "window:keydown": "handleKeyDown($event)", "window:resize": "resize()" } }, viewQueries: [{ propertyName: "flipbookRef", first: true, predicate: ["flipbookRef"], descendants: true }, { propertyName: "bookContainer", first: true, predicate: ["bookContainer"], descendants: true }], ngImport: i0, template: "<div\r\n class=\"viewer-container\"\r\n [class.is-zoomed]=\"isZoomed\"\r\n #flipbookRef\r\n (wheel)=\"onWheelZoom($event)\"\r\n (mousedown)=\"startDrag($event)\"\r\n (mousemove)=\"onDrag($event)\"\r\n (mouseup)=\"stopDrag()\"\r\n (mouseleave)=\"stopDrag()\"\r\n (touchstart)=\"startTouch($event)\"\r\n (touchmove)=\"onTouchMove($event)\"\r\n (touchend)=\"stopTouch($event)\"\r\n (dblclick)=\"onDoubleClick($event)\"\r\n>\r\n <div \r\n *ngIf=\"isBookVisible\" \r\n class=\"zoom-wrapper\" \r\n [style.transform]=\"transformStyle\" \r\n [class.is-zoomed-parent]=\"isZoomed\"\r\n [class.is-interactive]=\"isDragging || isPinching\"\r\n >\r\n <div id=\"book\" #bookContainer [class.is-zoomed]=\"isZoomed\" [class.is-flipping]=\"isFlipping\">\r\n <div\r\n class=\"page shadow\"\r\n *ngFor=\"let image of images; let i = index\"\r\n [attr.data-density]=\"\r\n i === 0 || i === images.length - 1 ? 'hard' : 'soft'\r\n \"\r\n >\r\n <div class=\"page-content bg-image\">\r\n <img\r\n [attr.data-src]=\"image\"\r\n [alt]=\"'Page ' + (i + 1)\"\r\n class=\"page-img\"\r\n draggable=\"false\"\r\n (dragstart)=\"$event.preventDefault()\"\r\n />\r\n\r\n <!-- Overlays layer -->\r\n <div \r\n class=\"overlays-container\" \r\n *ngIf=\"pages[i]?.pageData?.datas?.length\"\r\n (mousedown)=\"handleOverlayStart($event)\"\r\n (touchstart)=\"handleOverlayStart($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (mouseover)=\"$event.stopPropagation()\"\r\n (mousemove)=\"!isDragging && $event.stopPropagation()\"\r\n (mouseup)=\"!isDragging && $event.stopPropagation()\"\r\n >\r\n <ng-container *ngFor=\"let item of pages[i].pageData.datas\">\r\n <app-overlay-link \r\n *ngIf=\"item.type === 'link'\"\r\n [item]=\"item\"\r\n [pageWidth]=\"pages[i].pageData.width\"\r\n [pageHeight]=\"pages[i].pageData.height\"\r\n (linkClicked)=\"onLinkClick($event)\"\r\n ></app-overlay-link>\r\n\r\n <app-overlay-product \r\n *ngIf=\"item.type === 'product'\"\r\n [item]=\"item\"\r\n [pageWidth]=\"pages[i].pageData.width\"\r\n [pageHeight]=\"pages[i].pageData.height\"\r\n (productClicked)=\"onProductClick($event)\"\r\n ></app-overlay-product>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Bouton de r\u00E9initialisation du Zoom -->\r\n <div class=\"zoom-controls\" *ngIf=\"isZoomed\">\r\n <button class=\"btn-reset\" (click)=\"resetZoom()\" title=\"Reset Zoom\">\r\n <svg\r\n width=\"15\"\r\n height=\"15\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <path d=\"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7\" />\r\n </svg>\r\n <span>{{ 'VIEWER.NORMAL_VIEW' | translate }}</span>\r\n </button>\r\n </div>\r\n <!-- Debug Overlay -->\r\n <div class=\"debug-overlay\" *ngIf=\"isDebugVisible\">\r\n {{ debugInfo }}\r\n </div>\r\n</div>\r\n", styles: [".viewer-container{width:100vw;height:100vh;height:100dvh;display:flex;justify-content:center;align-items:center;background-color:var(--gray-3);overflow:hidden;position:relative;touch-action:none}.zoom-wrapper{transform-origin:center center;transition:transform .3s ease-out;display:flex;justify-content:center;align-items:center;pointer-events:none}.zoom-wrapper.is-interactive{transition:none!important}.zoom-wrapper>*{pointer-events:auto}.zoom-wrapper.is-zoomed-parent{pointer-events:auto}.zoom-wrapper.is-zoomed-parent *{pointer-events:none!important}.zoom-wrapper.is-zoomed-parent .overlays-container,.zoom-wrapper.is-zoomed-parent .overlays-container *{pointer-events:auto!important}#book.is-zoomed{pointer-events:none}#book.is-flipping .page,#book.is-flipping .page *,#book.is-flipping .page-img{transition:none!important;animation:none!important}.zoom-controls{position:absolute;bottom:90px;left:50%;transform:translate(-50%);z-index:2000;display:flex;gap:10px;animation:slideInUp .4s cubic-bezier(.165,.84,.44,1)}.btn-reset{display:flex;align-items:center;gap:10px;padding:10px 24px;background:var(--gray-3);background:#1e1e1ecc;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.1);border-radius:12px;color:#fff;font-family:inherit;font-size:13px;font-weight:500;letter-spacing:.5px;text-transform:uppercase;cursor:pointer;transition:all .25s cubic-bezier(.4,0,.2,1);box-shadow:0 10px 30px #0006,inset 0 1px 1px #ffffff1a}.btn-reset:hover{background:#2a2a2a;border-color:#ffffff4d;transform:translateY(-4px);box-shadow:0 15px 40px #00000080,inset 0 1px 1px #ffffff26}.btn-reset:hover svg{transform:scale(1.1) rotate(-10deg)}.btn-reset:active{transform:translateY(-1px);box-shadow:0 5px 20px #0006}.btn-reset svg{transition:transform .3s ease;opacity:.9}@keyframes slideInUp{0%{opacity:0;transform:translate(-50%,20px)}to{opacity:1;transform:translate(-50%)}}.page-content{padding:0;width:100%;height:100%;display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;position:relative}.overlays-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:1000}.page-img{width:100%;height:100%;object-fit:cover;display:block;-webkit-user-select:none;user-select:none;transition:opacity .3s ease;-webkit-user-drag:none}.page-img[data-src]{opacity:0}.page-img:not([data-src]){opacity:1}.debug-overlay{position:absolute;bottom:25px;right:140px;background:#000000bf;color:#0f0;padding:4px 8px;font-family:monospace;font-size:10px;pointer-events:none;z-index:1000;border-radius:4px;border:1px solid rgba(255,255,255,.1)}@media (max-width: 600px){.debug-overlay{right:5px;bottom:35px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: OverlayLinkComponent, selector: "app-overlay-link", inputs: ["item", "pageWidth", "pageHeight"], outputs: ["linkClicked"] }, { kind: "component", type: OverlayProductComponent, selector: "app-overlay-product", inputs: ["item", "pageWidth", "pageHeight"], outputs: ["productClicked"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
1671
|
+
}
|
|
1672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookViewerComponent, decorators: [{
|
|
1673
|
+
type: Component,
|
|
1674
|
+
args: [{ selector: 'app-flipbook-viewer', standalone: true, imports: [CommonModule, OverlayLinkComponent, OverlayProductComponent, TranslateModule], template: "<div\r\n class=\"viewer-container\"\r\n [class.is-zoomed]=\"isZoomed\"\r\n #flipbookRef\r\n (wheel)=\"onWheelZoom($event)\"\r\n (mousedown)=\"startDrag($event)\"\r\n (mousemove)=\"onDrag($event)\"\r\n (mouseup)=\"stopDrag()\"\r\n (mouseleave)=\"stopDrag()\"\r\n (touchstart)=\"startTouch($event)\"\r\n (touchmove)=\"onTouchMove($event)\"\r\n (touchend)=\"stopTouch($event)\"\r\n (dblclick)=\"onDoubleClick($event)\"\r\n>\r\n <div \r\n *ngIf=\"isBookVisible\" \r\n class=\"zoom-wrapper\" \r\n [style.transform]=\"transformStyle\" \r\n [class.is-zoomed-parent]=\"isZoomed\"\r\n [class.is-interactive]=\"isDragging || isPinching\"\r\n >\r\n <div id=\"book\" #bookContainer [class.is-zoomed]=\"isZoomed\" [class.is-flipping]=\"isFlipping\">\r\n <div\r\n class=\"page shadow\"\r\n *ngFor=\"let image of images; let i = index\"\r\n [attr.data-density]=\"\r\n i === 0 || i === images.length - 1 ? 'hard' : 'soft'\r\n \"\r\n >\r\n <div class=\"page-content bg-image\">\r\n <img\r\n [attr.data-src]=\"image\"\r\n [alt]=\"'Page ' + (i + 1)\"\r\n class=\"page-img\"\r\n draggable=\"false\"\r\n (dragstart)=\"$event.preventDefault()\"\r\n />\r\n\r\n <!-- Overlays layer -->\r\n <div \r\n class=\"overlays-container\" \r\n *ngIf=\"pages[i]?.pageData?.datas?.length\"\r\n (mousedown)=\"handleOverlayStart($event)\"\r\n (touchstart)=\"handleOverlayStart($event)\"\r\n (click)=\"$event.stopPropagation()\"\r\n (mouseover)=\"$event.stopPropagation()\"\r\n (mousemove)=\"!isDragging && $event.stopPropagation()\"\r\n (mouseup)=\"!isDragging && $event.stopPropagation()\"\r\n >\r\n <ng-container *ngFor=\"let item of pages[i].pageData.datas\">\r\n <app-overlay-link \r\n *ngIf=\"item.type === 'link'\"\r\n [item]=\"item\"\r\n [pageWidth]=\"pages[i].pageData.width\"\r\n [pageHeight]=\"pages[i].pageData.height\"\r\n (linkClicked)=\"onLinkClick($event)\"\r\n ></app-overlay-link>\r\n\r\n <app-overlay-product \r\n *ngIf=\"item.type === 'product'\"\r\n [item]=\"item\"\r\n [pageWidth]=\"pages[i].pageData.width\"\r\n [pageHeight]=\"pages[i].pageData.height\"\r\n (productClicked)=\"onProductClick($event)\"\r\n ></app-overlay-product>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Bouton de r\u00E9initialisation du Zoom -->\r\n <div class=\"zoom-controls\" *ngIf=\"isZoomed\">\r\n <button class=\"btn-reset\" (click)=\"resetZoom()\" title=\"Reset Zoom\">\r\n <svg\r\n width=\"15\"\r\n height=\"15\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n >\r\n <path d=\"M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7\" />\r\n </svg>\r\n <span>{{ 'VIEWER.NORMAL_VIEW' | translate }}</span>\r\n </button>\r\n </div>\r\n <!-- Debug Overlay -->\r\n <div class=\"debug-overlay\" *ngIf=\"isDebugVisible\">\r\n {{ debugInfo }}\r\n </div>\r\n</div>\r\n", styles: [".viewer-container{width:100vw;height:100vh;height:100dvh;display:flex;justify-content:center;align-items:center;background-color:var(--gray-3);overflow:hidden;position:relative;touch-action:none}.zoom-wrapper{transform-origin:center center;transition:transform .3s ease-out;display:flex;justify-content:center;align-items:center;pointer-events:none}.zoom-wrapper.is-interactive{transition:none!important}.zoom-wrapper>*{pointer-events:auto}.zoom-wrapper.is-zoomed-parent{pointer-events:auto}.zoom-wrapper.is-zoomed-parent *{pointer-events:none!important}.zoom-wrapper.is-zoomed-parent .overlays-container,.zoom-wrapper.is-zoomed-parent .overlays-container *{pointer-events:auto!important}#book.is-zoomed{pointer-events:none}#book.is-flipping .page,#book.is-flipping .page *,#book.is-flipping .page-img{transition:none!important;animation:none!important}.zoom-controls{position:absolute;bottom:90px;left:50%;transform:translate(-50%);z-index:2000;display:flex;gap:10px;animation:slideInUp .4s cubic-bezier(.165,.84,.44,1)}.btn-reset{display:flex;align-items:center;gap:10px;padding:10px 24px;background:var(--gray-3);background:#1e1e1ecc;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.1);border-radius:12px;color:#fff;font-family:inherit;font-size:13px;font-weight:500;letter-spacing:.5px;text-transform:uppercase;cursor:pointer;transition:all .25s cubic-bezier(.4,0,.2,1);box-shadow:0 10px 30px #0006,inset 0 1px 1px #ffffff1a}.btn-reset:hover{background:#2a2a2a;border-color:#ffffff4d;transform:translateY(-4px);box-shadow:0 15px 40px #00000080,inset 0 1px 1px #ffffff26}.btn-reset:hover svg{transform:scale(1.1) rotate(-10deg)}.btn-reset:active{transform:translateY(-1px);box-shadow:0 5px 20px #0006}.btn-reset svg{transition:transform .3s ease;opacity:.9}@keyframes slideInUp{0%{opacity:0;transform:translate(-50%,20px)}to{opacity:1;transform:translate(-50%)}}.page-content{padding:0;width:100%;height:100%;display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;position:relative}.overlays-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:1000}.page-img{width:100%;height:100%;object-fit:cover;display:block;-webkit-user-select:none;user-select:none;transition:opacity .3s ease;-webkit-user-drag:none}.page-img[data-src]{opacity:0}.page-img:not([data-src]){opacity:1}.debug-overlay{position:absolute;bottom:25px;right:140px;background:#000000bf;color:#0f0;padding:4px 8px;font-family:monospace;font-size:10px;pointer-events:none;z-index:1000;border-radius:4px;border:1px solid rgba(255,255,255,.1)}@media (max-width: 600px){.debug-overlay{right:5px;bottom:35px}}\n"] }]
|
|
1675
|
+
}], ctorParameters: () => [{ type: FlipbookDataService }, { type: AppParamsService }], propDecorators: { flipbookRef: [{
|
|
1676
|
+
type: ViewChild,
|
|
1677
|
+
args: ['flipbookRef']
|
|
1678
|
+
}], bookContainer: [{
|
|
1679
|
+
type: ViewChild,
|
|
1680
|
+
args: ['bookContainer']
|
|
1681
|
+
}], pagesLoaded: [{
|
|
1682
|
+
type: Output
|
|
1683
|
+
}], pageChanged: [{
|
|
1684
|
+
type: Output
|
|
1685
|
+
}], toggleSidebar: [{
|
|
1686
|
+
type: Output
|
|
1687
|
+
}], toggleMap: [{
|
|
1688
|
+
type: Output
|
|
1689
|
+
}], zoomChanged: [{
|
|
1690
|
+
type: Output
|
|
1691
|
+
}], handleKeyDown: [{
|
|
1692
|
+
type: HostListener,
|
|
1693
|
+
args: ['window:keydown', ['$event']]
|
|
1694
|
+
}], resize: [{
|
|
1695
|
+
type: HostListener,
|
|
1696
|
+
args: ['window:resize']
|
|
1697
|
+
}] } });
|
|
1698
|
+
|
|
1699
|
+
class FlipbookGridComponent {
|
|
1700
|
+
constructor(dataService) {
|
|
1701
|
+
this.dataService = dataService;
|
|
1702
|
+
this.pages = [];
|
|
1703
|
+
this.pageSelected = new EventEmitter();
|
|
1704
|
+
this.close = new EventEmitter();
|
|
1705
|
+
}
|
|
1706
|
+
ngOnInit() {
|
|
1707
|
+
this.dataService.pages$.subscribe((pages) => {
|
|
1708
|
+
this.pages = pages;
|
|
1709
|
+
});
|
|
1710
|
+
}
|
|
1711
|
+
onPageClick(pageNumber) {
|
|
1712
|
+
this.pageSelected.emit(pageNumber);
|
|
1713
|
+
this.close.emit();
|
|
1714
|
+
}
|
|
1715
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookGridComponent, deps: [{ token: FlipbookDataService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1716
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: FlipbookGridComponent, isStandalone: true, selector: "app-flipbook-grid", outputs: { pageSelected: "pageSelected", close: "close" }, ngImport: i0, template: "<div class=\"map-container container-box\" id=\"map-flipbook\">\r\n <div id=\"page-grid-title\">\r\n <span class=\"icon icon-page-grid\" id=\"icon-page-grid\" (click)=\"close.emit()\">\r\n <svg width=\"20px\" height=\"20px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 13 10\" fill=\"none\">\r\n <path d=\"M4.75 1.25L1 5M1 5L4.75 8.75M1 5L12.25 5\" stroke=\"var(--white, white)\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\r\n </svg>\r\n </span>\r\n <h4 id=\"title-page-grid\">Pages</h4>\r\n <div id=\"close-page-grid\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" (click)=\"close.emit()\" style=\"cursor:pointer\">\r\n <path d=\"M2 14.5L14 2.5M14 14.5L2 2.5\" stroke=\"var(--white)\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\r\n </svg>\r\n </div>\r\n </div>\r\n <div id=\"page-grid\">\r\n <div class=\"page-grid-item\"></div>\r\n @for (p of pages; track p.pageNumber) {\r\n <div class=\"page-grid-item\" (click)=\"onPageClick(p.pageNumber)\">\r\n <img class=\"page-minimap-img\" [src]=\"p.pageThumbnail\" [alt]=\"'Page ' + p.pageNumber\" />\r\n <div class=\"page-number\">{{ p.pageNumber }}</div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".map-container{position:absolute;top:calc(var(--spacing-xl) + 30px);left:var(--spacing-xl);width:calc(100% - 2 * var(--spacing-xl));height:calc(100% - var(--spacing-xl) - 100px - 30px);z-index:99999;display:flex;flex-direction:column;box-shadow:0 -1px 20px #0000001a;background:var(--gray-5);border-radius:var(--radius-s);overflow:hidden}#page-grid-title{display:flex;align-items:center;padding:var(--spacing-m) var(--spacing-xxl);gap:var(--spacing-s)}#title-page-grid{margin-left:var(--spacing-xs);color:var(--white)}#close-page-grid{margin-left:auto;cursor:pointer}#page-grid{display:flex;flex-wrap:wrap;padding:0 20px;gap:var(--spacing-s) 0;overflow-y:auto;align-content:flex-start}#page-grid>div:nth-child(2n){margin-right:var(--spacing-s)}.page-grid-item{background-color:var(--gray-4);border-radius:var(--radius-xs);padding:var(--spacing-xs);display:flex;flex-direction:column;gap:var(--spacing-xs);width:calc(160px - 2 * var(--spacing-xs));min-height:230px;border:1px solid var(--gray-3);align-items:center;cursor:pointer;transition:transform .2s ease}.page-grid-item:hover{transform:scale(1.02)}.page-minimap-img{width:90%;max-width:calc(160px - 2 * var(--spacing-xs));max-height:190px;object-fit:contain;border-radius:2px}.page-number{font-size:var(--font-size-tiny);color:var(--white);margin-top:4px}::-webkit-scrollbar{width:var(--spacing-xxs);height:var(--spacing-xxs);background:transparent;position:absolute}::-webkit-scrollbar-track{border-radius:10px;background:transparent}::-webkit-scrollbar-thumb{border-radius:10px;background:var(--gray-2)}::-webkit-scrollbar-corner{background:transparent}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
1717
|
+
}
|
|
1718
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: FlipbookGridComponent, decorators: [{
|
|
1719
|
+
type: Component,
|
|
1720
|
+
args: [{ selector: 'app-flipbook-grid', standalone: true, imports: [CommonModule], template: "<div class=\"map-container container-box\" id=\"map-flipbook\">\r\n <div id=\"page-grid-title\">\r\n <span class=\"icon icon-page-grid\" id=\"icon-page-grid\" (click)=\"close.emit()\">\r\n <svg width=\"20px\" height=\"20px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 13 10\" fill=\"none\">\r\n <path d=\"M4.75 1.25L1 5M1 5L4.75 8.75M1 5L12.25 5\" stroke=\"var(--white, white)\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\r\n </svg>\r\n </span>\r\n <h4 id=\"title-page-grid\">Pages</h4>\r\n <div id=\"close-page-grid\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" (click)=\"close.emit()\" style=\"cursor:pointer\">\r\n <path d=\"M2 14.5L14 2.5M14 14.5L2 2.5\" stroke=\"var(--white)\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\r\n </svg>\r\n </div>\r\n </div>\r\n <div id=\"page-grid\">\r\n <div class=\"page-grid-item\"></div>\r\n @for (p of pages; track p.pageNumber) {\r\n <div class=\"page-grid-item\" (click)=\"onPageClick(p.pageNumber)\">\r\n <img class=\"page-minimap-img\" [src]=\"p.pageThumbnail\" [alt]=\"'Page ' + p.pageNumber\" />\r\n <div class=\"page-number\">{{ p.pageNumber }}</div>\r\n </div>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".map-container{position:absolute;top:calc(var(--spacing-xl) + 30px);left:var(--spacing-xl);width:calc(100% - 2 * var(--spacing-xl));height:calc(100% - var(--spacing-xl) - 100px - 30px);z-index:99999;display:flex;flex-direction:column;box-shadow:0 -1px 20px #0000001a;background:var(--gray-5);border-radius:var(--radius-s);overflow:hidden}#page-grid-title{display:flex;align-items:center;padding:var(--spacing-m) var(--spacing-xxl);gap:var(--spacing-s)}#title-page-grid{margin-left:var(--spacing-xs);color:var(--white)}#close-page-grid{margin-left:auto;cursor:pointer}#page-grid{display:flex;flex-wrap:wrap;padding:0 20px;gap:var(--spacing-s) 0;overflow-y:auto;align-content:flex-start}#page-grid>div:nth-child(2n){margin-right:var(--spacing-s)}.page-grid-item{background-color:var(--gray-4);border-radius:var(--radius-xs);padding:var(--spacing-xs);display:flex;flex-direction:column;gap:var(--spacing-xs);width:calc(160px - 2 * var(--spacing-xs));min-height:230px;border:1px solid var(--gray-3);align-items:center;cursor:pointer;transition:transform .2s ease}.page-grid-item:hover{transform:scale(1.02)}.page-minimap-img{width:90%;max-width:calc(160px - 2 * var(--spacing-xs));max-height:190px;object-fit:contain;border-radius:2px}.page-number{font-size:var(--font-size-tiny);color:var(--white);margin-top:4px}::-webkit-scrollbar{width:var(--spacing-xxs);height:var(--spacing-xxs);background:transparent;position:absolute}::-webkit-scrollbar-track{border-radius:10px;background:transparent}::-webkit-scrollbar-thumb{border-radius:10px;background:var(--gray-2)}::-webkit-scrollbar-corner{background:transparent}\n"] }]
|
|
1721
|
+
}], ctorParameters: () => [{ type: FlipbookDataService }], propDecorators: { pageSelected: [{
|
|
1722
|
+
type: Output
|
|
1723
|
+
}], close: [{
|
|
1724
|
+
type: Output
|
|
1725
|
+
}] } });
|
|
1726
|
+
|
|
1727
|
+
class ModalDemoComponent {
|
|
1728
|
+
constructor() {
|
|
1729
|
+
this.pdfSelected = new EventEmitter();
|
|
1730
|
+
this.mockSelected = new EventEmitter();
|
|
1731
|
+
this.translate = inject(TranslateService);
|
|
1732
|
+
this.isDragging = signal(false, ...(ngDevMode ? [{ debugName: "isDragging" }] : []));
|
|
1733
|
+
this.rotatingPhrases = signal([], ...(ngDevMode ? [{ debugName: "rotatingPhrases" }] : []));
|
|
1734
|
+
this.currentIndex = signal(0, ...(ngDevMode ? [{ debugName: "currentIndex" }] : []));
|
|
1735
|
+
this.currentPhrase = signal('', ...(ngDevMode ? [{ debugName: "currentPhrase" }] : []));
|
|
1736
|
+
this.isChanging = signal(false, ...(ngDevMode ? [{ debugName: "isChanging" }] : []));
|
|
1737
|
+
this.isWriting = signal(false, ...(ngDevMode ? [{ debugName: "isWriting" }] : []));
|
|
1738
|
+
}
|
|
1739
|
+
ngOnInit() {
|
|
1740
|
+
// Load phrases and suffix
|
|
1741
|
+
this.translate.get('DEMO.ROTATING_PHRASES').subscribe((phrases) => {
|
|
1742
|
+
if (Array.isArray(phrases)) {
|
|
1743
|
+
this.rotatingPhrases.set(phrases);
|
|
1744
|
+
if (phrases.length > 0) {
|
|
1745
|
+
this.currentPhrase.set(phrases[0]);
|
|
1746
|
+
this.startRotation();
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
});
|
|
1750
|
+
}
|
|
1751
|
+
startRotation() {
|
|
1752
|
+
this.timer = setInterval(() => {
|
|
1753
|
+
this.isChanging.set(true); // Trigger Erase
|
|
1754
|
+
setTimeout(() => {
|
|
1755
|
+
const nextIndex = (this.currentIndex() + 1) % this.rotatingPhrases().length;
|
|
1756
|
+
this.currentIndex.set(nextIndex);
|
|
1757
|
+
this.currentPhrase.set(this.rotatingPhrases()[nextIndex]);
|
|
1758
|
+
// Wait a tiny bit for the text to update before revealing
|
|
1759
|
+
setTimeout(() => {
|
|
1760
|
+
this.isChanging.set(false); // Stop Erase
|
|
1761
|
+
this.isWriting.set(true); // Start Writing
|
|
1762
|
+
setTimeout(() => {
|
|
1763
|
+
this.isWriting.set(false);
|
|
1764
|
+
}, 800); // Duration of reveal
|
|
1765
|
+
}, 50);
|
|
1766
|
+
}, 700); // Time for Erase animation
|
|
1767
|
+
}, 5500); // Longer interval between rotations
|
|
1768
|
+
}
|
|
1769
|
+
ngOnDestroy() {
|
|
1770
|
+
if (this.timer)
|
|
1771
|
+
clearInterval(this.timer);
|
|
1772
|
+
}
|
|
1773
|
+
onFileSelected(event) {
|
|
1774
|
+
const input = event.target;
|
|
1775
|
+
const file = input.files?.[0];
|
|
1776
|
+
this.processFile(file);
|
|
1777
|
+
}
|
|
1778
|
+
onDragOver(event) {
|
|
1779
|
+
event.preventDefault();
|
|
1780
|
+
event.stopPropagation();
|
|
1781
|
+
this.isDragging.set(true);
|
|
1782
|
+
}
|
|
1783
|
+
onDragLeave(event) {
|
|
1784
|
+
event.preventDefault();
|
|
1785
|
+
event.stopPropagation();
|
|
1786
|
+
this.isDragging.set(false);
|
|
1787
|
+
}
|
|
1788
|
+
onDrop(event) {
|
|
1789
|
+
event.preventDefault();
|
|
1790
|
+
event.stopPropagation();
|
|
1791
|
+
this.isDragging.set(false);
|
|
1792
|
+
const file = event.dataTransfer?.files[0];
|
|
1793
|
+
this.processFile(file);
|
|
1794
|
+
}
|
|
1795
|
+
processFile(file) {
|
|
1796
|
+
if (file && file.type === 'application/pdf') {
|
|
1797
|
+
this.pdfSelected.emit(file);
|
|
1798
|
+
}
|
|
1799
|
+
}
|
|
1800
|
+
onSelectMock() {
|
|
1801
|
+
this.mockSelected.emit();
|
|
1802
|
+
}
|
|
1803
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ModalDemoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1804
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: ModalDemoComponent, isStandalone: true, selector: "app-modal-demo", outputs: { pdfSelected: "pdfSelected", mockSelected: "mockSelected" }, ngImport: i0, template: `
|
|
1805
|
+
<div class="demo-overlay">
|
|
1806
|
+
<div class="demo-card-container">
|
|
1807
|
+
<header class="demo-header">
|
|
1808
|
+
<h2>{{ 'DEMO.TITLE' | translate }}</h2>
|
|
1809
|
+
<p class="demo-subtitle">
|
|
1810
|
+
<span class="rotating-wrapper" [class.erasing]="isChanging()" [class.writing]="isWriting()">
|
|
1811
|
+
<span class="phrase-container">
|
|
1812
|
+
{{ currentPhrase() }}
|
|
1813
|
+
</span>
|
|
1814
|
+
<span class="wipe-cursor"></span>
|
|
1815
|
+
</span>
|
|
1816
|
+
<span class="static-suffix">{{ 'DEMO.SUFFIX' | translate }}</span>
|
|
1817
|
+
</p>
|
|
1818
|
+
</header>
|
|
1819
|
+
|
|
1820
|
+
<div class="demo-options">
|
|
1821
|
+
<!-- Option 1: PDF Import -->
|
|
1822
|
+
<div class="demo-option-card import-card">
|
|
1823
|
+
<div class="card-header">
|
|
1824
|
+
<div class="icon-wrapper pdf">
|
|
1825
|
+
<i class="bi bi-file-earmark-pdf"></i>
|
|
1826
|
+
</div>
|
|
1827
|
+
<h3>{{ 'DEMO.PDF_TITLE' | translate }}</h3>
|
|
1828
|
+
</div>
|
|
1829
|
+
|
|
1830
|
+
<div
|
|
1831
|
+
class="action-zone drop-zone"
|
|
1832
|
+
[class.dragging]="isDragging()"
|
|
1833
|
+
(click)="fileInput.click()"
|
|
1834
|
+
(dragover)="onDragOver($event)"
|
|
1835
|
+
(dragleave)="onDragLeave($event)"
|
|
1836
|
+
(drop)="onDrop($event)"
|
|
1837
|
+
>
|
|
1838
|
+
<i class="bi bi-cloud-arrow-up"></i>
|
|
1839
|
+
<span>{{ 'DEMO.PDF_DRAG_DROP' | translate }}</span>
|
|
1840
|
+
<input
|
|
1841
|
+
#fileInput
|
|
1842
|
+
type="file"
|
|
1843
|
+
accept="application/pdf"
|
|
1844
|
+
(change)="onFileSelected($event)"
|
|
1845
|
+
style="display: none"
|
|
1846
|
+
/>
|
|
1847
|
+
</div>
|
|
1848
|
+
|
|
1849
|
+
<div class="card-footer">
|
|
1850
|
+
<p>{{ 'DEMO.PDF_DESC' | translate }}</p>
|
|
1851
|
+
</div>
|
|
1852
|
+
</div>
|
|
1853
|
+
|
|
1854
|
+
<!-- Option 2: Mock Catalog -->
|
|
1855
|
+
<div class="demo-option-card catalog-card" (click)="onSelectMock()">
|
|
1856
|
+
<div class="card-header">
|
|
1857
|
+
<div class="icon-wrapper catalog">
|
|
1858
|
+
<i class="bi bi-journals"></i>
|
|
1859
|
+
</div>
|
|
1860
|
+
<h3>{{ 'DEMO.CATALOG_TITLE' | translate }}</h3>
|
|
1861
|
+
</div>
|
|
1862
|
+
|
|
1863
|
+
<div class="action-zone explore-box">
|
|
1864
|
+
<i class="bi bi-play-circle-fill"></i>
|
|
1865
|
+
<span>{{ 'DEMO.CATALOG_TITLE' | translate }}</span>
|
|
1866
|
+
</div>
|
|
1867
|
+
|
|
1868
|
+
<div class="card-footer">
|
|
1869
|
+
<p>{{ 'DEMO.CATALOG_DESC' | translate }}</p>
|
|
1870
|
+
</div>
|
|
1871
|
+
</div>
|
|
1872
|
+
</div>
|
|
1873
|
+
|
|
1874
|
+
<footer class="demo-footer-internal">
|
|
1875
|
+
<div class="powered-by">
|
|
1876
|
+
<span>Powered by</span>
|
|
1877
|
+
<svg
|
|
1878
|
+
width="16"
|
|
1879
|
+
height="16"
|
|
1880
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1881
|
+
viewBox="0 0 144.35 138.5"
|
|
1882
|
+
>
|
|
1883
|
+
<g>
|
|
1884
|
+
<path
|
|
1885
|
+
d="M71.83,12.3c-14.3,5.69-20.92,29.2-24.8,38.25-12.44,27.41-27.4,52.11-44.54,74.47,0,0-3.94,3.37-1.92,8.99,2.02,5.62,7.21,4.38,7.21,4.38,39.83-7.97,72.03-23.26,93.5-48.86,4.24-4.83,10.96-12.1,9.23-24.29-1.03-24.52-26.1-57.95-38.68-52.94Z"
|
|
1886
|
+
fill="#e30613"
|
|
1887
|
+
></path>
|
|
1888
|
+
<path
|
|
1889
|
+
d="M135.9,.15c-9.61-1.62-22,10.47-24.59,12.09-2.9,1.81-7.16,3.56-10.17,1.27-7.67-5.84-13.61-2.04-13.61-2.04l.12,.2c.09,.09,.18,.19,.28,.27,9.36,7.91,19.38,20.84,24.85,41.65,.53-.92,4.72-8.61,1.54-16.72-3.39-8.63,2.14-15.09,6.22-18.88,4.08-3.79,6.79-5.78,6.79-5.78,3.15-2.14,5.48-2.89,5.48-2.89,5.52-2.5,6.32,7.91,6.32,7.91,9.98-2.69,3.83-15.91-3.22-17.1Z"
|
|
1890
|
+
fill="#e30613"
|
|
1891
|
+
></path>
|
|
1892
|
+
<path
|
|
1893
|
+
d="M58.28,41.08c.2-1.44,.51-2.86,.91-4.26,.41-1.39,.92-2.76,1.52-4.09,1.19-2.66,2.76-5.14,4.69-7.32,.96-1.09,2.03-2.09,3.18-2.98,1.16-.87,2.42-1.67,3.8-2.17,1.38-.51,2.89-.74,4.38-.53,1.48,.19,2.93,.9,3.92,2.04l-.21,.48c-1.36-.05-2.52,.06-3.64,.37-1.11,.28-2.16,.71-3.2,1.23-1.03,.53-2.07,1.11-3.05,1.83-.99,.71-1.93,1.54-2.83,2.42-1.8,1.78-3.44,3.82-4.92,6.04-1.49,2.22-2.81,4.61-4.1,7.11l-.46-.17Z"
|
|
1894
|
+
fill="#fff"
|
|
1895
|
+
></path>
|
|
1896
|
+
<path
|
|
1897
|
+
d="M13.47,128.6c.92-.5,1.84-.96,2.76-1.43,.92-.48,1.86-.9,2.77-1.39,1.82-.99,3.68-1.85,5.5-2.84,3.65-1.92,7.28-3.85,10.89-5.82,7.21-3.96,14.34-8.04,21.35-12.35,7.01-4.31,13.91-8.81,20.68-13.54l5.06-3.6,5.01-3.7c1.65-1.26,3.28-2.56,4.96-3.82,.83-.64,1.63-1.32,2.45-1.98,.83-.65,1.65-1.31,2.49-1.95l.34,.38c-1.29,1.75-2.62,3.46-3.99,5.14-1.43,1.61-2.85,3.24-4.34,4.8-1.52,1.51-3.03,3.04-4.6,4.5-1.59,1.42-3.18,2.86-4.8,4.23-6.53,5.48-13.5,10.28-20.7,14.56-7.2,4.29-14.63,8.11-22.24,11.38-3.8,1.65-7.66,3.14-11.56,4.48-.97,.35-1.95,.66-2.94,.97-.98,.32-1.96,.62-2.95,.91-1.97,.59-3.97,1.09-5.96,1.57l-.15-.51Z"
|
|
1898
|
+
fill="#fff"
|
|
1899
|
+
></path>
|
|
1900
|
+
<path
|
|
1901
|
+
d="M99.27,17.04c.9,.63,1.77,1.14,2.67,1.5,.9,.35,1.82,.55,2.75,.57,.94,.03,1.88-.14,2.83-.43,.95-.29,1.88-.73,2.87-1.18l.29,.43c-.73,.9-1.63,1.65-2.65,2.2-1.02,.55-2.18,.87-3.36,.87-1.18,0-2.37-.33-3.38-.97-1.01-.63-1.86-1.54-2.39-2.62l.36-.36Z"
|
|
1902
|
+
fill="#fff"
|
|
1903
|
+
></path>
|
|
1904
|
+
</g>
|
|
1905
|
+
</svg>
|
|
1906
|
+
<b>Solid <span class="pepper-text">Pepper</span></b>
|
|
1907
|
+
</div>
|
|
1908
|
+
</footer>
|
|
1909
|
+
</div>
|
|
1910
|
+
</div>
|
|
1911
|
+
`, isInline: true, styles: [".demo-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#0a0a0cf0;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);z-index:1000000;display:flex;justify-content:center;align-items:center;padding:2rem;overflow-y:auto}.demo-card-container{background:#1e1e23b3;border:1px solid rgba(255,255,255,.1);border-radius:28px;padding:2rem 2rem 1.5rem;max-width:780px;width:100%;text-align:center;box-shadow:0 40px 80px #0009;animation:slideUp .5s cubic-bezier(.16,1,.3,1);margin:auto;display:flex;flex-direction:column}.demo-header h2{font-size:1.8rem;margin-bottom:.5rem;color:#fff;font-weight:800;letter-spacing:-.5px}.demo-header p{color:#fffc;font-size:1.2rem;margin-bottom:2rem;display:flex;align-items:baseline;justify-content:center;flex-wrap:wrap;gap:8px;min-height:1.6em}.rotating-wrapper{display:inline-flex;align-items:center;height:1.4em;position:relative;padding:0 4px;margin-bottom:-.2em}.phrase-container{display:inline-block;background:linear-gradient(120deg,var(--active, #582eff) 0%,var(--active-hover, #b6a3ff) 50%,var(--active, #582eff) 100%);background-size:200% auto;animation:shimmer 4s linear infinite;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-weight:800;letter-spacing:-.02em;transition:clip-path .6s cubic-bezier(.65,0,.35,1);clip-path:inset(0 0 0 0);opacity:1;position:relative;filter:drop-shadow(0 4px 8px rgba(0,0,0,.2))}.wipe-cursor{position:absolute;top:10%;left:0;width:2px;height:80%;background:var(--active, #582eff);box-shadow:0 0 15px var(--active, #582eff);transition:left .6s cubic-bezier(.65,0,.35,1),opacity .2s;opacity:0;z-index:2}.rotating-wrapper.erasing .phrase-container{clip-path:inset(0 0 0 100%)}.rotating-wrapper.erasing .wipe-cursor{left:100%;opacity:1}.rotating-wrapper.writing .phrase-container{clip-path:inset(0 0 0 0);transition:clip-path .8s cubic-bezier(.16,1,.3,1)}.rotating-wrapper.writing .wipe-cursor{animation:writeCursor .8s cubic-bezier(.16,1,.3,1) forwards;opacity:1}@keyframes writeCursor{0%{left:0}to{left:100%}}.rotating-wrapper:not(.erasing):not(.writing) .wipe-cursor{left:0;opacity:0;transition:opacity .3s}@keyframes shimmer{0%{background-position:-200% center}to{background-position:200% center}}.static-suffix{color:#fff6;font-weight:500;letter-spacing:.02em;font-size:.95em}.demo-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1.5rem;align-items:stretch;margin-bottom:1.5rem}.demo-option-card{background:#ffffff05;border:1px solid rgba(255,255,255,.06);border-radius:20px;padding:1.25rem;display:flex;flex-direction:column;transition:all .3s ease;height:100%}.demo-option-card:hover{background:#ffffff0a;border-color:#ffffff26;transform:translateY(-5px)}.card-header{margin-bottom:.75rem;min-height:90px;display:flex;flex-direction:column;justify-content:center}.icon-wrapper{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:1.6rem;margin-bottom:.5rem;margin-left:auto;margin-right:auto}.icon-wrapper.pdf{background:#e306131f;color:#ff4d4d;border:1px solid rgba(227,6,19,.2)}.icon-wrapper.catalog{background:#007bff1f;color:#4dabff;border:1px solid rgba(0,123,255,.2)}.demo-option-card h3{font-size:1.15rem;color:#fff;font-weight:700;margin:0}.action-zone{flex-grow:1;min-height:140px;border:2px dashed rgba(255,255,255,.1);border-radius:14px;padding:1rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;transition:all .3s ease;background:#ffffff03;cursor:pointer}.action-zone i{font-size:1.8rem;opacity:.7}.drop-zone i{color:#ff4d4d}.explore-box i{color:#4dabff}.action-zone span{font-size:.8rem;font-weight:500;color:#fff9}.drop-zone:hover,.drop-zone.dragging{border-color:#ff4d4d;background:#e306130d;border-style:solid}.catalog-card:hover .explore-box{border-color:#4dabff;background:#007bff0d;border-style:solid}.card-footer{margin-top:1rem;padding-top:.75rem;border-top:1px solid rgba(255,255,255,.05);min-height:50px;display:flex;align-items:center;justify-content:center}.card-footer p{color:#fff6;font-size:.75rem;line-height:1.3;margin:0;font-style:italic}.demo-footer-internal{margin-top:var(--spacing-xxl);display:flex;justify-content:center;align-items:center;padding-top:1rem;opacity:.6}.powered-by{display:flex;align-items:center;gap:8px;font-size:.7rem;color:#ffffff80}.pepper-text{color:#e30613}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media (max-width: 600px){.demo-options{grid-template-columns:1fr}.demo-overlay{padding:1rem}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
1912
|
+
}
|
|
1913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ModalDemoComponent, decorators: [{
|
|
1914
|
+
type: Component,
|
|
1915
|
+
args: [{ selector: 'app-modal-demo', standalone: true, imports: [CommonModule, TranslateModule], template: `
|
|
1916
|
+
<div class="demo-overlay">
|
|
1917
|
+
<div class="demo-card-container">
|
|
1918
|
+
<header class="demo-header">
|
|
1919
|
+
<h2>{{ 'DEMO.TITLE' | translate }}</h2>
|
|
1920
|
+
<p class="demo-subtitle">
|
|
1921
|
+
<span class="rotating-wrapper" [class.erasing]="isChanging()" [class.writing]="isWriting()">
|
|
1922
|
+
<span class="phrase-container">
|
|
1923
|
+
{{ currentPhrase() }}
|
|
1924
|
+
</span>
|
|
1925
|
+
<span class="wipe-cursor"></span>
|
|
1926
|
+
</span>
|
|
1927
|
+
<span class="static-suffix">{{ 'DEMO.SUFFIX' | translate }}</span>
|
|
1928
|
+
</p>
|
|
1929
|
+
</header>
|
|
1930
|
+
|
|
1931
|
+
<div class="demo-options">
|
|
1932
|
+
<!-- Option 1: PDF Import -->
|
|
1933
|
+
<div class="demo-option-card import-card">
|
|
1934
|
+
<div class="card-header">
|
|
1935
|
+
<div class="icon-wrapper pdf">
|
|
1936
|
+
<i class="bi bi-file-earmark-pdf"></i>
|
|
1937
|
+
</div>
|
|
1938
|
+
<h3>{{ 'DEMO.PDF_TITLE' | translate }}</h3>
|
|
1939
|
+
</div>
|
|
1940
|
+
|
|
1941
|
+
<div
|
|
1942
|
+
class="action-zone drop-zone"
|
|
1943
|
+
[class.dragging]="isDragging()"
|
|
1944
|
+
(click)="fileInput.click()"
|
|
1945
|
+
(dragover)="onDragOver($event)"
|
|
1946
|
+
(dragleave)="onDragLeave($event)"
|
|
1947
|
+
(drop)="onDrop($event)"
|
|
1948
|
+
>
|
|
1949
|
+
<i class="bi bi-cloud-arrow-up"></i>
|
|
1950
|
+
<span>{{ 'DEMO.PDF_DRAG_DROP' | translate }}</span>
|
|
1951
|
+
<input
|
|
1952
|
+
#fileInput
|
|
1953
|
+
type="file"
|
|
1954
|
+
accept="application/pdf"
|
|
1955
|
+
(change)="onFileSelected($event)"
|
|
1956
|
+
style="display: none"
|
|
1957
|
+
/>
|
|
1958
|
+
</div>
|
|
1959
|
+
|
|
1960
|
+
<div class="card-footer">
|
|
1961
|
+
<p>{{ 'DEMO.PDF_DESC' | translate }}</p>
|
|
1962
|
+
</div>
|
|
1963
|
+
</div>
|
|
1964
|
+
|
|
1965
|
+
<!-- Option 2: Mock Catalog -->
|
|
1966
|
+
<div class="demo-option-card catalog-card" (click)="onSelectMock()">
|
|
1967
|
+
<div class="card-header">
|
|
1968
|
+
<div class="icon-wrapper catalog">
|
|
1969
|
+
<i class="bi bi-journals"></i>
|
|
1970
|
+
</div>
|
|
1971
|
+
<h3>{{ 'DEMO.CATALOG_TITLE' | translate }}</h3>
|
|
1972
|
+
</div>
|
|
1973
|
+
|
|
1974
|
+
<div class="action-zone explore-box">
|
|
1975
|
+
<i class="bi bi-play-circle-fill"></i>
|
|
1976
|
+
<span>{{ 'DEMO.CATALOG_TITLE' | translate }}</span>
|
|
1977
|
+
</div>
|
|
1978
|
+
|
|
1979
|
+
<div class="card-footer">
|
|
1980
|
+
<p>{{ 'DEMO.CATALOG_DESC' | translate }}</p>
|
|
1981
|
+
</div>
|
|
1982
|
+
</div>
|
|
1983
|
+
</div>
|
|
1984
|
+
|
|
1985
|
+
<footer class="demo-footer-internal">
|
|
1986
|
+
<div class="powered-by">
|
|
1987
|
+
<span>Powered by</span>
|
|
1988
|
+
<svg
|
|
1989
|
+
width="16"
|
|
1990
|
+
height="16"
|
|
1991
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1992
|
+
viewBox="0 0 144.35 138.5"
|
|
1993
|
+
>
|
|
1994
|
+
<g>
|
|
1995
|
+
<path
|
|
1996
|
+
d="M71.83,12.3c-14.3,5.69-20.92,29.2-24.8,38.25-12.44,27.41-27.4,52.11-44.54,74.47,0,0-3.94,3.37-1.92,8.99,2.02,5.62,7.21,4.38,7.21,4.38,39.83-7.97,72.03-23.26,93.5-48.86,4.24-4.83,10.96-12.1,9.23-24.29-1.03-24.52-26.1-57.95-38.68-52.94Z"
|
|
1997
|
+
fill="#e30613"
|
|
1998
|
+
></path>
|
|
1999
|
+
<path
|
|
2000
|
+
d="M135.9,.15c-9.61-1.62-22,10.47-24.59,12.09-2.9,1.81-7.16,3.56-10.17,1.27-7.67-5.84-13.61-2.04-13.61-2.04l.12,.2c.09,.09,.18,.19,.28,.27,9.36,7.91,19.38,20.84,24.85,41.65,.53-.92,4.72-8.61,1.54-16.72-3.39-8.63,2.14-15.09,6.22-18.88,4.08-3.79,6.79-5.78,6.79-5.78,3.15-2.14,5.48-2.89,5.48-2.89,5.52-2.5,6.32,7.91,6.32,7.91,9.98-2.69,3.83-15.91-3.22-17.1Z"
|
|
2001
|
+
fill="#e30613"
|
|
2002
|
+
></path>
|
|
2003
|
+
<path
|
|
2004
|
+
d="M58.28,41.08c.2-1.44,.51-2.86,.91-4.26,.41-1.39,.92-2.76,1.52-4.09,1.19-2.66,2.76-5.14,4.69-7.32,.96-1.09,2.03-2.09,3.18-2.98,1.16-.87,2.42-1.67,3.8-2.17,1.38-.51,2.89-.74,4.38-.53,1.48,.19,2.93,.9,3.92,2.04l-.21,.48c-1.36-.05-2.52,.06-3.64,.37-1.11,.28-2.16,.71-3.2,1.23-1.03,.53-2.07,1.11-3.05,1.83-.99,.71-1.93,1.54-2.83,2.42-1.8,1.78-3.44,3.82-4.92,6.04-1.49,2.22-2.81,4.61-4.1,7.11l-.46-.17Z"
|
|
2005
|
+
fill="#fff"
|
|
2006
|
+
></path>
|
|
2007
|
+
<path
|
|
2008
|
+
d="M13.47,128.6c.92-.5,1.84-.96,2.76-1.43,.92-.48,1.86-.9,2.77-1.39,1.82-.99,3.68-1.85,5.5-2.84,3.65-1.92,7.28-3.85,10.89-5.82,7.21-3.96,14.34-8.04,21.35-12.35,7.01-4.31,13.91-8.81,20.68-13.54l5.06-3.6,5.01-3.7c1.65-1.26,3.28-2.56,4.96-3.82,.83-.64,1.63-1.32,2.45-1.98,.83-.65,1.65-1.31,2.49-1.95l.34,.38c-1.29,1.75-2.62,3.46-3.99,5.14-1.43,1.61-2.85,3.24-4.34,4.8-1.52,1.51-3.03,3.04-4.6,4.5-1.59,1.42-3.18,2.86-4.8,4.23-6.53,5.48-13.5,10.28-20.7,14.56-7.2,4.29-14.63,8.11-22.24,11.38-3.8,1.65-7.66,3.14-11.56,4.48-.97,.35-1.95,.66-2.94,.97-.98,.32-1.96,.62-2.95,.91-1.97,.59-3.97,1.09-5.96,1.57l-.15-.51Z"
|
|
2009
|
+
fill="#fff"
|
|
2010
|
+
></path>
|
|
2011
|
+
<path
|
|
2012
|
+
d="M99.27,17.04c.9,.63,1.77,1.14,2.67,1.5,.9,.35,1.82,.55,2.75,.57,.94,.03,1.88-.14,2.83-.43,.95-.29,1.88-.73,2.87-1.18l.29,.43c-.73,.9-1.63,1.65-2.65,2.2-1.02,.55-2.18,.87-3.36,.87-1.18,0-2.37-.33-3.38-.97-1.01-.63-1.86-1.54-2.39-2.62l.36-.36Z"
|
|
2013
|
+
fill="#fff"
|
|
2014
|
+
></path>
|
|
2015
|
+
</g>
|
|
2016
|
+
</svg>
|
|
2017
|
+
<b>Solid <span class="pepper-text">Pepper</span></b>
|
|
2018
|
+
</div>
|
|
2019
|
+
</footer>
|
|
2020
|
+
</div>
|
|
2021
|
+
</div>
|
|
2022
|
+
`, styles: [".demo-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#0a0a0cf0;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);z-index:1000000;display:flex;justify-content:center;align-items:center;padding:2rem;overflow-y:auto}.demo-card-container{background:#1e1e23b3;border:1px solid rgba(255,255,255,.1);border-radius:28px;padding:2rem 2rem 1.5rem;max-width:780px;width:100%;text-align:center;box-shadow:0 40px 80px #0009;animation:slideUp .5s cubic-bezier(.16,1,.3,1);margin:auto;display:flex;flex-direction:column}.demo-header h2{font-size:1.8rem;margin-bottom:.5rem;color:#fff;font-weight:800;letter-spacing:-.5px}.demo-header p{color:#fffc;font-size:1.2rem;margin-bottom:2rem;display:flex;align-items:baseline;justify-content:center;flex-wrap:wrap;gap:8px;min-height:1.6em}.rotating-wrapper{display:inline-flex;align-items:center;height:1.4em;position:relative;padding:0 4px;margin-bottom:-.2em}.phrase-container{display:inline-block;background:linear-gradient(120deg,var(--active, #582eff) 0%,var(--active-hover, #b6a3ff) 50%,var(--active, #582eff) 100%);background-size:200% auto;animation:shimmer 4s linear infinite;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-weight:800;letter-spacing:-.02em;transition:clip-path .6s cubic-bezier(.65,0,.35,1);clip-path:inset(0 0 0 0);opacity:1;position:relative;filter:drop-shadow(0 4px 8px rgba(0,0,0,.2))}.wipe-cursor{position:absolute;top:10%;left:0;width:2px;height:80%;background:var(--active, #582eff);box-shadow:0 0 15px var(--active, #582eff);transition:left .6s cubic-bezier(.65,0,.35,1),opacity .2s;opacity:0;z-index:2}.rotating-wrapper.erasing .phrase-container{clip-path:inset(0 0 0 100%)}.rotating-wrapper.erasing .wipe-cursor{left:100%;opacity:1}.rotating-wrapper.writing .phrase-container{clip-path:inset(0 0 0 0);transition:clip-path .8s cubic-bezier(.16,1,.3,1)}.rotating-wrapper.writing .wipe-cursor{animation:writeCursor .8s cubic-bezier(.16,1,.3,1) forwards;opacity:1}@keyframes writeCursor{0%{left:0}to{left:100%}}.rotating-wrapper:not(.erasing):not(.writing) .wipe-cursor{left:0;opacity:0;transition:opacity .3s}@keyframes shimmer{0%{background-position:-200% center}to{background-position:200% center}}.static-suffix{color:#fff6;font-weight:500;letter-spacing:.02em;font-size:.95em}.demo-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1.5rem;align-items:stretch;margin-bottom:1.5rem}.demo-option-card{background:#ffffff05;border:1px solid rgba(255,255,255,.06);border-radius:20px;padding:1.25rem;display:flex;flex-direction:column;transition:all .3s ease;height:100%}.demo-option-card:hover{background:#ffffff0a;border-color:#ffffff26;transform:translateY(-5px)}.card-header{margin-bottom:.75rem;min-height:90px;display:flex;flex-direction:column;justify-content:center}.icon-wrapper{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:1.6rem;margin-bottom:.5rem;margin-left:auto;margin-right:auto}.icon-wrapper.pdf{background:#e306131f;color:#ff4d4d;border:1px solid rgba(227,6,19,.2)}.icon-wrapper.catalog{background:#007bff1f;color:#4dabff;border:1px solid rgba(0,123,255,.2)}.demo-option-card h3{font-size:1.15rem;color:#fff;font-weight:700;margin:0}.action-zone{flex-grow:1;min-height:140px;border:2px dashed rgba(255,255,255,.1);border-radius:14px;padding:1rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;transition:all .3s ease;background:#ffffff03;cursor:pointer}.action-zone i{font-size:1.8rem;opacity:.7}.drop-zone i{color:#ff4d4d}.explore-box i{color:#4dabff}.action-zone span{font-size:.8rem;font-weight:500;color:#fff9}.drop-zone:hover,.drop-zone.dragging{border-color:#ff4d4d;background:#e306130d;border-style:solid}.catalog-card:hover .explore-box{border-color:#4dabff;background:#007bff0d;border-style:solid}.card-footer{margin-top:1rem;padding-top:.75rem;border-top:1px solid rgba(255,255,255,.05);min-height:50px;display:flex;align-items:center;justify-content:center}.card-footer p{color:#fff6;font-size:.75rem;line-height:1.3;margin:0;font-style:italic}.demo-footer-internal{margin-top:var(--spacing-xxl);display:flex;justify-content:center;align-items:center;padding-top:1rem;opacity:.6}.powered-by{display:flex;align-items:center;gap:8px;font-size:.7rem;color:#ffffff80}.pepper-text{color:#e30613}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media (max-width: 600px){.demo-options{grid-template-columns:1fr}.demo-overlay{padding:1rem}}\n"] }]
|
|
2023
|
+
}], propDecorators: { pdfSelected: [{
|
|
2024
|
+
type: Output
|
|
2025
|
+
}], mockSelected: [{
|
|
2026
|
+
type: Output
|
|
2027
|
+
}] } });
|
|
2028
|
+
|
|
2029
|
+
class ModalPricingComponent {
|
|
2030
|
+
constructor() {
|
|
2031
|
+
this.close = new EventEmitter();
|
|
2032
|
+
this.start = new EventEmitter();
|
|
2033
|
+
this.isYearly = signal(true, ...(ngDevMode ? [{ debugName: "isYearly" }] : []));
|
|
2034
|
+
}
|
|
2035
|
+
togglePricing() {
|
|
2036
|
+
this.isYearly.update(v => !v);
|
|
2037
|
+
}
|
|
2038
|
+
onClose() {
|
|
2039
|
+
this.close.emit();
|
|
2040
|
+
}
|
|
2041
|
+
onStart() {
|
|
2042
|
+
this.start.emit();
|
|
2043
|
+
}
|
|
2044
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ModalPricingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2045
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: ModalPricingComponent, isStandalone: true, selector: "app-modal-pricing", outputs: { close: "close", start: "start" }, ngImport: i0, template: `
|
|
2046
|
+
<div class="pricing-overlay">
|
|
2047
|
+
<div class="pricing-card-container">
|
|
2048
|
+
<div class="pricing-top-bar">
|
|
2049
|
+
<header class="pricing-header">
|
|
2050
|
+
<h2>{{ 'PRICING.TITLE' | translate }}</h2>
|
|
2051
|
+
<p>{{ 'PRICING.SUBTITLE' | translate }}</p>
|
|
2052
|
+
</header>
|
|
2053
|
+
|
|
2054
|
+
<div class="pricing-toggle-container">
|
|
2055
|
+
<div class="pricing-toggle" (click)="togglePricing()">
|
|
2056
|
+
<div class="toggle-track" [class.is-monthly]="!isYearly()">
|
|
2057
|
+
<div class="toggle-thumb"></div>
|
|
2058
|
+
</div>
|
|
2059
|
+
<span class="toggle-label" [class.active]="isYearly()">Annuel</span>
|
|
2060
|
+
<span class="toggle-label" [class.active]="!isYearly()">Mensuel</span>
|
|
2061
|
+
</div>
|
|
2062
|
+
</div>
|
|
2063
|
+
</div>
|
|
2064
|
+
|
|
2065
|
+
<div class="table-scroll-wrapper">
|
|
2066
|
+
<div class="table-header-static">
|
|
2067
|
+
<table class="pricing-table">
|
|
2068
|
+
<thead>
|
|
2069
|
+
<tr>
|
|
2070
|
+
<th class="feature-col">FONCTIONNALITÉS</th>
|
|
2071
|
+
<th>
|
|
2072
|
+
<div class="plan-header">
|
|
2073
|
+
<span class="plan-name">Free</span>
|
|
2074
|
+
<span class="plan-price">0€</span>
|
|
2075
|
+
</div>
|
|
2076
|
+
</th>
|
|
2077
|
+
<th>
|
|
2078
|
+
<div class="plan-header">
|
|
2079
|
+
<span class="plan-name">Starter</span>
|
|
2080
|
+
<span class="plan-price">{{ isYearly() ? '15€' : '25€' }}<small>/mois</small></span>
|
|
2081
|
+
<span *ngIf="isYearly()" class="save-badge">Économisez 40%</span>
|
|
2082
|
+
</div>
|
|
2083
|
+
</th>
|
|
2084
|
+
<th class="highlight">
|
|
2085
|
+
<div class="plan-header">
|
|
2086
|
+
<span class="plan-name">Medium</span>
|
|
2087
|
+
<span class="plan-price">{{ isYearly() ? '49€' : '79€' }}<small>/mois</small></span>
|
|
2088
|
+
<span *ngIf="isYearly()" class="save-badge">Économisez 38%</span>
|
|
2089
|
+
</div>
|
|
2090
|
+
</th>
|
|
2091
|
+
<th class="highlight boost">
|
|
2092
|
+
<div class="plan-header">
|
|
2093
|
+
<span class="plan-name">Boost</span>
|
|
2094
|
+
<span class="plan-price">{{ isYearly() ? '149€' : '200€' }}<small>/mois</small></span>
|
|
2095
|
+
<span *ngIf="isYearly()" class="save-badge">Économisez 26%</span>
|
|
2096
|
+
</div>
|
|
2097
|
+
</th>
|
|
2098
|
+
</tr>
|
|
2099
|
+
</thead>
|
|
2100
|
+
</table>
|
|
2101
|
+
</div>
|
|
2102
|
+
|
|
2103
|
+
<div class="table-body-scrollable">
|
|
2104
|
+
<table class="pricing-table">
|
|
2105
|
+
<tbody>
|
|
2106
|
+
<!-- Hidden row to define column widths -->
|
|
2107
|
+
<tr class="sizing-row">
|
|
2108
|
+
<td class="feature-col"></td>
|
|
2109
|
+
<td></td>
|
|
2110
|
+
<td></td>
|
|
2111
|
+
<td></td>
|
|
2112
|
+
<td></td>
|
|
2113
|
+
</tr>
|
|
2114
|
+
<!-- Category: Pour vos clients -->
|
|
2115
|
+
<tr class="category-row">
|
|
2116
|
+
<td colspan="5">POUR VOS CLIENTS</td>
|
|
2117
|
+
</tr>
|
|
2118
|
+
<tr>
|
|
2119
|
+
<td class="feature-name">Flipbooks</td>
|
|
2120
|
+
<td>5</td>
|
|
2121
|
+
<td>Illimité</td>
|
|
2122
|
+
<td>Illimité</td>
|
|
2123
|
+
<td>Illimité</td>
|
|
2124
|
+
</tr>
|
|
2125
|
+
<tr>
|
|
2126
|
+
<td class="feature-name">Flipbook Dynamique</td>
|
|
2127
|
+
<td></td>
|
|
2128
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2129
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2130
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2131
|
+
</tr>
|
|
2132
|
+
<tr>
|
|
2133
|
+
<td class="feature-name">Intégration site web</td>
|
|
2134
|
+
<td></td>
|
|
2135
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2136
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2137
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2138
|
+
</tr>
|
|
2139
|
+
|
|
2140
|
+
<!-- Category: Pour vous -->
|
|
2141
|
+
<tr class="category-row">
|
|
2142
|
+
<td colspan="5">POUR VOUS</td>
|
|
2143
|
+
</tr>
|
|
2144
|
+
<tr>
|
|
2145
|
+
<td class="feature-name">Statistiques</td>
|
|
2146
|
+
<td></td>
|
|
2147
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2148
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2149
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2150
|
+
</tr>
|
|
2151
|
+
<tr>
|
|
2152
|
+
<td class="feature-name">Édition du document</td>
|
|
2153
|
+
<td></td>
|
|
2154
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2155
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2156
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2157
|
+
</tr>
|
|
2158
|
+
<tr>
|
|
2159
|
+
<td class="feature-name">Import données produits</td>
|
|
2160
|
+
<td></td>
|
|
2161
|
+
<td></td>
|
|
2162
|
+
<td>1</td>
|
|
2163
|
+
<td>15 feuilles</td>
|
|
2164
|
+
</tr>
|
|
2165
|
+
<tr>
|
|
2166
|
+
<td class="feature-name">Médiathèque</td>
|
|
2167
|
+
<td></td>
|
|
2168
|
+
<td></td>
|
|
2169
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2170
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2171
|
+
</tr>
|
|
2172
|
+
<tr>
|
|
2173
|
+
<td class="feature-name">Templates</td>
|
|
2174
|
+
<td></td>
|
|
2175
|
+
<td></td>
|
|
2176
|
+
<td>1</td>
|
|
2177
|
+
<td>3</td>
|
|
2178
|
+
</tr>
|
|
2179
|
+
<tr>
|
|
2180
|
+
<td class="feature-name">Génération automatique</td>
|
|
2181
|
+
<td></td>
|
|
2182
|
+
<td></td>
|
|
2183
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2184
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2185
|
+
</tr>
|
|
2186
|
+
</tbody>
|
|
2187
|
+
</table>
|
|
2188
|
+
</div>
|
|
2189
|
+
</div>
|
|
2190
|
+
|
|
2191
|
+
<div class="pricing-actions">
|
|
2192
|
+
<div class="main-actions">
|
|
2193
|
+
<button class="btn-primary" (click)="onStart()">
|
|
2194
|
+
Démarrez dès maintenant
|
|
2195
|
+
</button>
|
|
2196
|
+
<button class="btn-secondary" (click)="onClose()">
|
|
2197
|
+
Continuer la démo
|
|
2198
|
+
</button>
|
|
2199
|
+
</div>
|
|
2200
|
+
|
|
2201
|
+
<div class="enterprise-mention">
|
|
2202
|
+
Besoin d’une offre <span>Entreprise</span> qui brise encore plus les limites ?
|
|
2203
|
+
<a href="mailto:contact@solidpepper.com">Contactez-nous</a>
|
|
2204
|
+
</div>
|
|
2205
|
+
</div>
|
|
2206
|
+
</div>
|
|
2207
|
+
</div>
|
|
2208
|
+
`, isInline: true, styles: [".pricing-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;z-index:2000000;display:flex;justify-content:center;align-items:center;padding:2rem;overflow-y:auto}.pricing-card-container{background:var(--gray-4, #1e1e23);border:1px solid var(--gray-3, rgba(255, 255, 255, .15));border-radius:32px;padding:1.5rem 2.5rem 2rem;max-width:800px;width:100%;max-height:90vh;display:flex;flex-direction:column;text-align:center;box-shadow:0 50px 100px #000000e6;animation:slideUp .6s cubic-bezier(.16,1,.3,1);margin:auto;position:relative}.close-btn{position:absolute;top:20px;right:20px;background:var(--gray-3, rgba(255, 255, 255, .05));border:none;color:var(--gray-1, rgba(255, 255, 255, .5));width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease}.close-btn:hover{background:var(--gray-2, rgba(255, 255, 255, .1));color:var(--white, #fff);transform:rotate(90deg)}.pricing-top-bar{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:.8rem;gap:2rem;text-align:left}.pricing-header{flex:1;flex-shrink:0;margin-bottom:0}.pricing-header h2{font-size:1.8rem;color:var(--white, #fff);font-weight:800;margin-bottom:.4rem;letter-spacing:-.5px}.pricing-header p{color:var(--gray-1, rgba(255, 255, 255, .5));font-size:.95rem;margin-bottom:.5rem}.pricing-toggle-container{display:flex;justify-content:flex-end;margin-bottom:0;flex-shrink:0}.pricing-toggle{display:flex;align-items:center;background:var(--gray-3, rgba(255, 255, 255, .05));padding:4px 16px 4px 4px;border-radius:100px;cursor:pointer;gap:12px;border:1px solid var(--gray-2, rgba(255, 255, 255, .1))}.toggle-track{width:44px;height:24px;background:var(--gray-2, rgba(255, 255, 255, .1));border-radius:100px;position:relative;transition:all .3s ease}.toggle-thumb{position:absolute;top:2px;left:2px;width:20px;height:20px;background:var(--white, #fff);border-radius:50%;transition:all .3s cubic-bezier(.68,-.55,.265,1.55);box-shadow:0 2px 4px #0003}.toggle-track.is-monthly{background:var(--active)}.toggle-track.is-monthly .toggle-thumb{left:22px}.toggle-label{font-size:.8rem;font-weight:600;color:var(--gray-1, rgba(255, 255, 255, .4));transition:color .3s ease}.toggle-label.active{color:var(--white, #fff)}.plan-header{display:flex;flex-direction:column;align-items:center;gap:4px;padding:4px 0}.plan-name{font-size:.75rem;opacity:.8}.plan-price{font-size:1.2rem;font-weight:800;color:var(--white, #fff)}.plan-price small{font-size:.7rem;color:var(--gray-1, rgba(255, 255, 255, .5));font-weight:400}.save-badge{font-size:.65rem;background:#22c55e26;color:#22c55e;padding:2px 8px;border-radius:100px;font-weight:700;border:1px solid rgba(34,197,94,.2)}.table-scroll-wrapper{width:100%;margin-bottom:2rem;border-radius:16px;background:#ffffff05;border:1px solid rgba(255,255,255,.05);display:flex;flex-direction:column;overflow:hidden}.table-header-static{flex-shrink:0;background:var(--gray-4, #1e1e23);border-bottom:1px solid var(--gray-3, rgba(255, 255, 255, .1));overflow-y:scroll;scrollbar-width:thin;scrollbar-color:transparent transparent}.table-header-static::-webkit-scrollbar{width:4px}.table-header-static::-webkit-scrollbar-thumb{background:transparent}.table-body-scrollable{overflow-y:auto;overflow-x:hidden;flex-grow:1}.table-body-scrollable::-webkit-scrollbar{width:4px}.table-body-scrollable::-webkit-scrollbar-track{background:transparent}.table-body-scrollable::-webkit-scrollbar-thumb{background:var(--active-alpha-light, rgba(211, 200, 255, .3));border-radius:10px}.pricing-table{width:100%;border-collapse:collapse;color:var(--white, #eee);font-size:.8rem;table-layout:fixed}.pricing-table th,.pricing-table td{padding:.75rem;text-align:center;border-bottom:1px solid var(--gray-3, rgba(255, 255, 255, .05))}.pricing-table .feature-col{text-align:left;width:35%!important}.pricing-table th:not(.feature-col),.pricing-table td:not(.feature-col){width:16.25%!important}.sizing-row td{padding:0!important;height:0!important;border:none!important;visibility:hidden}.pricing-table thead{top:0;z-index:10;background:var(--gray-4, #1e1e23)}.pricing-table th{background:var(--gray-3, rgba(255, 255, 255, .03));font-weight:700;color:var(--white, #fff);text-transform:uppercase;font-size:.75rem;letter-spacing:1px;border-bottom:1px solid var(--gray-2, rgba(255, 255, 255, .1))}.pricing-table .feature-col{text-align:left;width:30%}.pricing-table .feature-name{text-align:left;color:var(--white, rgba(255, 255, 255, .7));font-weight:500}.highlight{color:var(--active, #582eff)!important;background:#582eff0d!important}.boost{color:#ffaa2c!important;background:#ffaa2c0d!important}.category-row td{background:var(--gray-5, rgba(255, 255, 255, .02));color:var(--active, #582eff);font-weight:800;font-size:.7rem;letter-spacing:2px;padding:.5rem 1rem;text-align:left;border-bottom:1px solid var(--active-alpha-light, rgba(88, 46, 255, .2))}.pricing-actions{flex-shrink:0;display:flex;flex-direction:column;align-items:center;gap:1.2rem;padding-top:1rem;border-top:1px solid var(--gray-3, rgba(255, 255, 255, .05))}.btn-primary{background:linear-gradient(135deg,var(--active-hover, #6c47ff) 0%,var(--active, #582eff) 100%);color:#fff;border:none;padding:.85rem 1.8rem;border-radius:12px;font-weight:700;font-size:1.05rem;cursor:pointer;transition:all .3s ease;box-shadow:0 10px 20px #582eff4d;flex:1;white-space:nowrap}.btn-primary:hover{transform:translateY(-2px);box-shadow:0 15px 30px #582eff66}.main-actions{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem;width:100%;max-width:500px}.btn-secondary{background:var(--gray-3, rgba(255, 255, 255, .05));color:var(--gray-1, rgba(255, 255, 255, .7));border:1px solid var(--gray-2, rgba(255, 255, 255, .1));padding:.85rem 1.8rem;border-radius:12px;font-weight:600;cursor:pointer;transition:all .3s ease;flex:1;white-space:nowrap}.btn-secondary:hover{background:var(--gray-2, rgba(255, 255, 255, .1));color:var(--white, #fff)}.enterprise-mention{font-size:.85rem;color:var(--gray-1, rgba(255, 255, 255, .4))}.enterprise-mention span{color:var(--white, #fff);font-weight:700}.enterprise-mention a{color:var(--active, #582eff);text-decoration:none;font-weight:600;margin-left:5px}@keyframes slideUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}@media (max-width: 600px){.pricing-card-container{padding:1.5rem}.pricing-header h2{font-size:1.5rem}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] }); }
|
|
2209
|
+
}
|
|
2210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: ModalPricingComponent, decorators: [{
|
|
2211
|
+
type: Component,
|
|
2212
|
+
args: [{ selector: 'app-modal-pricing', standalone: true, imports: [CommonModule, TranslateModule], template: `
|
|
2213
|
+
<div class="pricing-overlay">
|
|
2214
|
+
<div class="pricing-card-container">
|
|
2215
|
+
<div class="pricing-top-bar">
|
|
2216
|
+
<header class="pricing-header">
|
|
2217
|
+
<h2>{{ 'PRICING.TITLE' | translate }}</h2>
|
|
2218
|
+
<p>{{ 'PRICING.SUBTITLE' | translate }}</p>
|
|
2219
|
+
</header>
|
|
2220
|
+
|
|
2221
|
+
<div class="pricing-toggle-container">
|
|
2222
|
+
<div class="pricing-toggle" (click)="togglePricing()">
|
|
2223
|
+
<div class="toggle-track" [class.is-monthly]="!isYearly()">
|
|
2224
|
+
<div class="toggle-thumb"></div>
|
|
2225
|
+
</div>
|
|
2226
|
+
<span class="toggle-label" [class.active]="isYearly()">Annuel</span>
|
|
2227
|
+
<span class="toggle-label" [class.active]="!isYearly()">Mensuel</span>
|
|
2228
|
+
</div>
|
|
2229
|
+
</div>
|
|
2230
|
+
</div>
|
|
2231
|
+
|
|
2232
|
+
<div class="table-scroll-wrapper">
|
|
2233
|
+
<div class="table-header-static">
|
|
2234
|
+
<table class="pricing-table">
|
|
2235
|
+
<thead>
|
|
2236
|
+
<tr>
|
|
2237
|
+
<th class="feature-col">FONCTIONNALITÉS</th>
|
|
2238
|
+
<th>
|
|
2239
|
+
<div class="plan-header">
|
|
2240
|
+
<span class="plan-name">Free</span>
|
|
2241
|
+
<span class="plan-price">0€</span>
|
|
2242
|
+
</div>
|
|
2243
|
+
</th>
|
|
2244
|
+
<th>
|
|
2245
|
+
<div class="plan-header">
|
|
2246
|
+
<span class="plan-name">Starter</span>
|
|
2247
|
+
<span class="plan-price">{{ isYearly() ? '15€' : '25€' }}<small>/mois</small></span>
|
|
2248
|
+
<span *ngIf="isYearly()" class="save-badge">Économisez 40%</span>
|
|
2249
|
+
</div>
|
|
2250
|
+
</th>
|
|
2251
|
+
<th class="highlight">
|
|
2252
|
+
<div class="plan-header">
|
|
2253
|
+
<span class="plan-name">Medium</span>
|
|
2254
|
+
<span class="plan-price">{{ isYearly() ? '49€' : '79€' }}<small>/mois</small></span>
|
|
2255
|
+
<span *ngIf="isYearly()" class="save-badge">Économisez 38%</span>
|
|
2256
|
+
</div>
|
|
2257
|
+
</th>
|
|
2258
|
+
<th class="highlight boost">
|
|
2259
|
+
<div class="plan-header">
|
|
2260
|
+
<span class="plan-name">Boost</span>
|
|
2261
|
+
<span class="plan-price">{{ isYearly() ? '149€' : '200€' }}<small>/mois</small></span>
|
|
2262
|
+
<span *ngIf="isYearly()" class="save-badge">Économisez 26%</span>
|
|
2263
|
+
</div>
|
|
2264
|
+
</th>
|
|
2265
|
+
</tr>
|
|
2266
|
+
</thead>
|
|
2267
|
+
</table>
|
|
2268
|
+
</div>
|
|
2269
|
+
|
|
2270
|
+
<div class="table-body-scrollable">
|
|
2271
|
+
<table class="pricing-table">
|
|
2272
|
+
<tbody>
|
|
2273
|
+
<!-- Hidden row to define column widths -->
|
|
2274
|
+
<tr class="sizing-row">
|
|
2275
|
+
<td class="feature-col"></td>
|
|
2276
|
+
<td></td>
|
|
2277
|
+
<td></td>
|
|
2278
|
+
<td></td>
|
|
2279
|
+
<td></td>
|
|
2280
|
+
</tr>
|
|
2281
|
+
<!-- Category: Pour vos clients -->
|
|
2282
|
+
<tr class="category-row">
|
|
2283
|
+
<td colspan="5">POUR VOS CLIENTS</td>
|
|
2284
|
+
</tr>
|
|
2285
|
+
<tr>
|
|
2286
|
+
<td class="feature-name">Flipbooks</td>
|
|
2287
|
+
<td>5</td>
|
|
2288
|
+
<td>Illimité</td>
|
|
2289
|
+
<td>Illimité</td>
|
|
2290
|
+
<td>Illimité</td>
|
|
2291
|
+
</tr>
|
|
2292
|
+
<tr>
|
|
2293
|
+
<td class="feature-name">Flipbook Dynamique</td>
|
|
2294
|
+
<td></td>
|
|
2295
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2296
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2297
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2298
|
+
</tr>
|
|
2299
|
+
<tr>
|
|
2300
|
+
<td class="feature-name">Intégration site web</td>
|
|
2301
|
+
<td></td>
|
|
2302
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2303
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2304
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2305
|
+
</tr>
|
|
2306
|
+
|
|
2307
|
+
<!-- Category: Pour vous -->
|
|
2308
|
+
<tr class="category-row">
|
|
2309
|
+
<td colspan="5">POUR VOUS</td>
|
|
2310
|
+
</tr>
|
|
2311
|
+
<tr>
|
|
2312
|
+
<td class="feature-name">Statistiques</td>
|
|
2313
|
+
<td></td>
|
|
2314
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2315
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2316
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2317
|
+
</tr>
|
|
2318
|
+
<tr>
|
|
2319
|
+
<td class="feature-name">Édition du document</td>
|
|
2320
|
+
<td></td>
|
|
2321
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2322
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2323
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2324
|
+
</tr>
|
|
2325
|
+
<tr>
|
|
2326
|
+
<td class="feature-name">Import données produits</td>
|
|
2327
|
+
<td></td>
|
|
2328
|
+
<td></td>
|
|
2329
|
+
<td>1</td>
|
|
2330
|
+
<td>15 feuilles</td>
|
|
2331
|
+
</tr>
|
|
2332
|
+
<tr>
|
|
2333
|
+
<td class="feature-name">Médiathèque</td>
|
|
2334
|
+
<td></td>
|
|
2335
|
+
<td></td>
|
|
2336
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2337
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2338
|
+
</tr>
|
|
2339
|
+
<tr>
|
|
2340
|
+
<td class="feature-name">Templates</td>
|
|
2341
|
+
<td></td>
|
|
2342
|
+
<td></td>
|
|
2343
|
+
<td>1</td>
|
|
2344
|
+
<td>3</td>
|
|
2345
|
+
</tr>
|
|
2346
|
+
<tr>
|
|
2347
|
+
<td class="feature-name">Génération automatique</td>
|
|
2348
|
+
<td></td>
|
|
2349
|
+
<td></td>
|
|
2350
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2351
|
+
<td><i class="bi bi-check2 text-success"></i></td>
|
|
2352
|
+
</tr>
|
|
2353
|
+
</tbody>
|
|
2354
|
+
</table>
|
|
2355
|
+
</div>
|
|
2356
|
+
</div>
|
|
2357
|
+
|
|
2358
|
+
<div class="pricing-actions">
|
|
2359
|
+
<div class="main-actions">
|
|
2360
|
+
<button class="btn-primary" (click)="onStart()">
|
|
2361
|
+
Démarrez dès maintenant
|
|
2362
|
+
</button>
|
|
2363
|
+
<button class="btn-secondary" (click)="onClose()">
|
|
2364
|
+
Continuer la démo
|
|
2365
|
+
</button>
|
|
2366
|
+
</div>
|
|
2367
|
+
|
|
2368
|
+
<div class="enterprise-mention">
|
|
2369
|
+
Besoin d’une offre <span>Entreprise</span> qui brise encore plus les limites ?
|
|
2370
|
+
<a href="mailto:contact@solidpepper.com">Contactez-nous</a>
|
|
2371
|
+
</div>
|
|
2372
|
+
</div>
|
|
2373
|
+
</div>
|
|
2374
|
+
</div>
|
|
2375
|
+
`, styles: [".pricing-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;z-index:2000000;display:flex;justify-content:center;align-items:center;padding:2rem;overflow-y:auto}.pricing-card-container{background:var(--gray-4, #1e1e23);border:1px solid var(--gray-3, rgba(255, 255, 255, .15));border-radius:32px;padding:1.5rem 2.5rem 2rem;max-width:800px;width:100%;max-height:90vh;display:flex;flex-direction:column;text-align:center;box-shadow:0 50px 100px #000000e6;animation:slideUp .6s cubic-bezier(.16,1,.3,1);margin:auto;position:relative}.close-btn{position:absolute;top:20px;right:20px;background:var(--gray-3, rgba(255, 255, 255, .05));border:none;color:var(--gray-1, rgba(255, 255, 255, .5));width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease}.close-btn:hover{background:var(--gray-2, rgba(255, 255, 255, .1));color:var(--white, #fff);transform:rotate(90deg)}.pricing-top-bar{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:.8rem;gap:2rem;text-align:left}.pricing-header{flex:1;flex-shrink:0;margin-bottom:0}.pricing-header h2{font-size:1.8rem;color:var(--white, #fff);font-weight:800;margin-bottom:.4rem;letter-spacing:-.5px}.pricing-header p{color:var(--gray-1, rgba(255, 255, 255, .5));font-size:.95rem;margin-bottom:.5rem}.pricing-toggle-container{display:flex;justify-content:flex-end;margin-bottom:0;flex-shrink:0}.pricing-toggle{display:flex;align-items:center;background:var(--gray-3, rgba(255, 255, 255, .05));padding:4px 16px 4px 4px;border-radius:100px;cursor:pointer;gap:12px;border:1px solid var(--gray-2, rgba(255, 255, 255, .1))}.toggle-track{width:44px;height:24px;background:var(--gray-2, rgba(255, 255, 255, .1));border-radius:100px;position:relative;transition:all .3s ease}.toggle-thumb{position:absolute;top:2px;left:2px;width:20px;height:20px;background:var(--white, #fff);border-radius:50%;transition:all .3s cubic-bezier(.68,-.55,.265,1.55);box-shadow:0 2px 4px #0003}.toggle-track.is-monthly{background:var(--active)}.toggle-track.is-monthly .toggle-thumb{left:22px}.toggle-label{font-size:.8rem;font-weight:600;color:var(--gray-1, rgba(255, 255, 255, .4));transition:color .3s ease}.toggle-label.active{color:var(--white, #fff)}.plan-header{display:flex;flex-direction:column;align-items:center;gap:4px;padding:4px 0}.plan-name{font-size:.75rem;opacity:.8}.plan-price{font-size:1.2rem;font-weight:800;color:var(--white, #fff)}.plan-price small{font-size:.7rem;color:var(--gray-1, rgba(255, 255, 255, .5));font-weight:400}.save-badge{font-size:.65rem;background:#22c55e26;color:#22c55e;padding:2px 8px;border-radius:100px;font-weight:700;border:1px solid rgba(34,197,94,.2)}.table-scroll-wrapper{width:100%;margin-bottom:2rem;border-radius:16px;background:#ffffff05;border:1px solid rgba(255,255,255,.05);display:flex;flex-direction:column;overflow:hidden}.table-header-static{flex-shrink:0;background:var(--gray-4, #1e1e23);border-bottom:1px solid var(--gray-3, rgba(255, 255, 255, .1));overflow-y:scroll;scrollbar-width:thin;scrollbar-color:transparent transparent}.table-header-static::-webkit-scrollbar{width:4px}.table-header-static::-webkit-scrollbar-thumb{background:transparent}.table-body-scrollable{overflow-y:auto;overflow-x:hidden;flex-grow:1}.table-body-scrollable::-webkit-scrollbar{width:4px}.table-body-scrollable::-webkit-scrollbar-track{background:transparent}.table-body-scrollable::-webkit-scrollbar-thumb{background:var(--active-alpha-light, rgba(211, 200, 255, .3));border-radius:10px}.pricing-table{width:100%;border-collapse:collapse;color:var(--white, #eee);font-size:.8rem;table-layout:fixed}.pricing-table th,.pricing-table td{padding:.75rem;text-align:center;border-bottom:1px solid var(--gray-3, rgba(255, 255, 255, .05))}.pricing-table .feature-col{text-align:left;width:35%!important}.pricing-table th:not(.feature-col),.pricing-table td:not(.feature-col){width:16.25%!important}.sizing-row td{padding:0!important;height:0!important;border:none!important;visibility:hidden}.pricing-table thead{top:0;z-index:10;background:var(--gray-4, #1e1e23)}.pricing-table th{background:var(--gray-3, rgba(255, 255, 255, .03));font-weight:700;color:var(--white, #fff);text-transform:uppercase;font-size:.75rem;letter-spacing:1px;border-bottom:1px solid var(--gray-2, rgba(255, 255, 255, .1))}.pricing-table .feature-col{text-align:left;width:30%}.pricing-table .feature-name{text-align:left;color:var(--white, rgba(255, 255, 255, .7));font-weight:500}.highlight{color:var(--active, #582eff)!important;background:#582eff0d!important}.boost{color:#ffaa2c!important;background:#ffaa2c0d!important}.category-row td{background:var(--gray-5, rgba(255, 255, 255, .02));color:var(--active, #582eff);font-weight:800;font-size:.7rem;letter-spacing:2px;padding:.5rem 1rem;text-align:left;border-bottom:1px solid var(--active-alpha-light, rgba(88, 46, 255, .2))}.pricing-actions{flex-shrink:0;display:flex;flex-direction:column;align-items:center;gap:1.2rem;padding-top:1rem;border-top:1px solid var(--gray-3, rgba(255, 255, 255, .05))}.btn-primary{background:linear-gradient(135deg,var(--active-hover, #6c47ff) 0%,var(--active, #582eff) 100%);color:#fff;border:none;padding:.85rem 1.8rem;border-radius:12px;font-weight:700;font-size:1.05rem;cursor:pointer;transition:all .3s ease;box-shadow:0 10px 20px #582eff4d;flex:1;white-space:nowrap}.btn-primary:hover{transform:translateY(-2px);box-shadow:0 15px 30px #582eff66}.main-actions{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem;width:100%;max-width:500px}.btn-secondary{background:var(--gray-3, rgba(255, 255, 255, .05));color:var(--gray-1, rgba(255, 255, 255, .7));border:1px solid var(--gray-2, rgba(255, 255, 255, .1));padding:.85rem 1.8rem;border-radius:12px;font-weight:600;cursor:pointer;transition:all .3s ease;flex:1;white-space:nowrap}.btn-secondary:hover{background:var(--gray-2, rgba(255, 255, 255, .1));color:var(--white, #fff)}.enterprise-mention{font-size:.85rem;color:var(--gray-1, rgba(255, 255, 255, .4))}.enterprise-mention span{color:var(--white, #fff);font-weight:700}.enterprise-mention a{color:var(--active, #582eff);text-decoration:none;font-weight:600;margin-left:5px}@keyframes slideUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}@media (max-width: 600px){.pricing-card-container{padding:1.5rem}.pricing-header h2{font-size:1.5rem}}\n"] }]
|
|
2376
|
+
}], propDecorators: { close: [{
|
|
2377
|
+
type: Output
|
|
2378
|
+
}], start: [{
|
|
2379
|
+
type: Output
|
|
2380
|
+
}] } });
|
|
2381
|
+
|
|
2382
|
+
var en = {
|
|
2383
|
+
"LOADER": {
|
|
2384
|
+
"MESSAGES": {
|
|
2385
|
+
"OPENING": "Opening...",
|
|
2386
|
+
"RESOURCES": "Loading resources...",
|
|
2387
|
+
"WORKSPACE": "Preparing flipbook...",
|
|
2388
|
+
"TOOLS": "Initializing tools..."
|
|
2389
|
+
},
|
|
2390
|
+
"ERRORS": {
|
|
2391
|
+
"DOCUMENT": "Could not retrieve the flipbook.",
|
|
2392
|
+
"PAGE": "Error while opening the page.",
|
|
2393
|
+
"TOKEN": "No token provided, please provide a valid token."
|
|
2394
|
+
},
|
|
2395
|
+
"DEMO_DISCLAIMER": "Demo version: processing time may be longer."
|
|
2396
|
+
},
|
|
2397
|
+
"BROWSER_NOT_SUPPORTED": {
|
|
2398
|
+
"TITLE": "Browser not supported",
|
|
2399
|
+
"MESSAGE": "Flipbook is not yet available on Safari.",
|
|
2400
|
+
"SUGGESTION": "Please use Chrome or Firefox for the best experience."
|
|
2401
|
+
},
|
|
2402
|
+
"VIEWER": {
|
|
2403
|
+
"NORMAL_VIEW": "Normal view"
|
|
2404
|
+
},
|
|
2405
|
+
"DEMO": {
|
|
2406
|
+
"TITLE": "Test our solution",
|
|
2407
|
+
"SUBTITLE": "Discover the power of Solidpepper Flipbook in just a few clicks",
|
|
2408
|
+
"ROTATING_PHRASES": [
|
|
2409
|
+
"Discover our Flipbook solution",
|
|
2410
|
+
"Boost your catalog",
|
|
2411
|
+
"Digitize your PDF documents",
|
|
2412
|
+
"Optimize your communication",
|
|
2413
|
+
"Transform your PDFs into interactive experiences"
|
|
2414
|
+
],
|
|
2415
|
+
"SUFFIX": "in a few clicks",
|
|
2416
|
+
"PDF_TITLE": "Test with my document",
|
|
2417
|
+
"PDF_DESC": "Test more limited features (free offer)",
|
|
2418
|
+
"PDF_DRAG_DROP": "Drag & drop your PDF here",
|
|
2419
|
+
"CATALOG_TITLE": "Test with a pre-made catalog",
|
|
2420
|
+
"CATALOG_DESC": "Test more advanced features through our offers"
|
|
2421
|
+
},
|
|
2422
|
+
"PRICING": {
|
|
2423
|
+
"TITLE": "Did you like this demo?",
|
|
2424
|
+
"SUBTITLE": "Go further with our different offers"
|
|
2425
|
+
}
|
|
2426
|
+
};
|
|
2427
|
+
|
|
2428
|
+
var es = {
|
|
2429
|
+
"LOADER": {
|
|
2430
|
+
"MESSAGES": {
|
|
2431
|
+
"OPENING": "Abriendo...",
|
|
2432
|
+
"RESOURCES": "Cargando recursos...",
|
|
2433
|
+
"WORKSPACE": "Preparando el flipbook...",
|
|
2434
|
+
"TOOLS": "Inicializando herramientas..."
|
|
2435
|
+
},
|
|
2436
|
+
"ERRORS": {
|
|
2437
|
+
"DOCUMENT": "No se pudo recuperar el flipbook.",
|
|
2438
|
+
"PAGE": "Error al abrir la página.",
|
|
2439
|
+
"TOKEN": "No se proporcionó ningún token, por favor proporcione un token válido."
|
|
2440
|
+
},
|
|
2441
|
+
"DEMO_DISCLAIMER": "Versión de demostración: el tiempo de procesamiento puede ser más largo."
|
|
2442
|
+
},
|
|
2443
|
+
"BROWSER_NOT_SUPPORTED": {
|
|
2444
|
+
"TITLE": "Navegador no soportado",
|
|
2445
|
+
"MESSAGE": "Flipbook aún no está disponible en Safari.",
|
|
2446
|
+
"SUGGESTION": "Por favor, utiliza Chrome o Firefox para la mejor experiencia."
|
|
2447
|
+
},
|
|
2448
|
+
"VIEWER": {
|
|
2449
|
+
"NORMAL_VIEW": "Vista normal"
|
|
2450
|
+
},
|
|
2451
|
+
"DEMO": {
|
|
2452
|
+
"TITLE": "Pruebe nuestra solución",
|
|
2453
|
+
"SUBTITLE": "Descubra la potencia de Solidpepper Flipbook en solo unos clics",
|
|
2454
|
+
"ROTATING_PHRASES": [
|
|
2455
|
+
"Descubra nuestra solución Flipbook",
|
|
2456
|
+
"Potencie su catálogo",
|
|
2457
|
+
"Digitalice sus documentos PDF",
|
|
2458
|
+
"Optimice su comunicación",
|
|
2459
|
+
"Transforme sus PDF en experiencias interactivas"
|
|
2460
|
+
],
|
|
2461
|
+
"SUFFIX": "en unos pocos clics",
|
|
2462
|
+
"PDF_TITLE": "Probar con mi documento",
|
|
2463
|
+
"PDF_DESC": "Pruebe funcionalidades más limitadas (oferta gratuita)",
|
|
2464
|
+
"PDF_DRAG_DROP": "Arrastre y suelte su PDF aquí",
|
|
2465
|
+
"CATALOG_TITLE": "Probar con un catálogo predefinido",
|
|
2466
|
+
"CATALOG_DESC": "Pruebe funcionalidades más avanzadas a través de nuestras ofertas"
|
|
2467
|
+
},
|
|
2468
|
+
"PRICING": {
|
|
2469
|
+
"TITLE": "¿Le ha gustado esta demo?",
|
|
2470
|
+
"SUBTITLE": "Vaya más allá con nuestras diferentes ofertas"
|
|
2471
|
+
}
|
|
2472
|
+
};
|
|
2473
|
+
|
|
2474
|
+
var fr = {
|
|
2475
|
+
"LOADER": {
|
|
2476
|
+
"MESSAGES": {
|
|
2477
|
+
"OPENING": "Ouverture en cours...",
|
|
2478
|
+
"RESOURCES": "Chargement des ressources...",
|
|
2479
|
+
"WORKSPACE": "Préparation du flipbook...",
|
|
2480
|
+
"TOOLS": "Initialisation des outils..."
|
|
2481
|
+
},
|
|
2482
|
+
"ERRORS": {
|
|
2483
|
+
"DOCUMENT": "Impossible de récupérer le flipbook.",
|
|
2484
|
+
"PAGE": "Erreur lors de l'ouverture de la page."
|
|
2485
|
+
},
|
|
2486
|
+
"DEMO_DISCLAIMER": "Version de démonstration : le temps de traitement peut être plus long."
|
|
2487
|
+
},
|
|
2488
|
+
"BROWSER_NOT_SUPPORTED": {
|
|
2489
|
+
"TITLE": "Navigateur non supporté",
|
|
2490
|
+
"MESSAGE": "Flipbook n'est pas encore disponible sur Safari.",
|
|
2491
|
+
"SUGGESTION": "Veuillez utiliser Chrome ou Firefox pour une expérience optimale."
|
|
2492
|
+
},
|
|
2493
|
+
"VIEWER": {
|
|
2494
|
+
"NORMAL_VIEW": "Vue normale"
|
|
2495
|
+
},
|
|
2496
|
+
"DEMO": {
|
|
2497
|
+
"TITLE": "Testez notre solution",
|
|
2498
|
+
"SUBTITLE": "Découvrez la puissance de Solidpepper Flipbook en quelques clics",
|
|
2499
|
+
"ROTATING_PHRASES": [
|
|
2500
|
+
"Découvrez notre solution Flipbook",
|
|
2501
|
+
"Propulsez votre catalogue",
|
|
2502
|
+
"Digitalisez vos documents PDF",
|
|
2503
|
+
"Optimisez votre communication",
|
|
2504
|
+
"Transformez vos PDF en expériences interactives"
|
|
2505
|
+
],
|
|
2506
|
+
"SUFFIX": "en quelques clics",
|
|
2507
|
+
"PDF_TITLE": "Tester avec mon document",
|
|
2508
|
+
"PDF_DESC": "Testez des fonctionnalités plus limités (offre gratuite)",
|
|
2509
|
+
"PDF_DRAG_DROP": "Glissez-déposez votre PDF ici",
|
|
2510
|
+
"CATALOG_TITLE": "Tester avec un catalogue pré-fait",
|
|
2511
|
+
"CATALOG_DESC": "Testez des fonctionnalités plus poussées grâce à nos offres"
|
|
2512
|
+
},
|
|
2513
|
+
"PRICING": {
|
|
2514
|
+
"TITLE": "Cette démo vous plaît ?",
|
|
2515
|
+
"SUBTITLE": "Allez plus loin avec nos différentes offres"
|
|
2516
|
+
}
|
|
2517
|
+
};
|
|
2518
|
+
|
|
2519
|
+
class TranslationService {
|
|
2520
|
+
constructor(translate) {
|
|
2521
|
+
this.translate = translate;
|
|
2522
|
+
this.defaultLanguage = 'en';
|
|
2523
|
+
this.availablelangs = [
|
|
2524
|
+
{ code: 'en', text: 'English' },
|
|
2525
|
+
{ code: 'es', text: 'Spanish' },
|
|
2526
|
+
{ code: 'fr', text: 'Français' },
|
|
2527
|
+
];
|
|
2528
|
+
this.translate.setTranslation('en', en, true);
|
|
2529
|
+
this.translate.setTranslation('es', es, true);
|
|
2530
|
+
this.translate.setTranslation('fr', fr, true);
|
|
2531
|
+
// Default configuration
|
|
2532
|
+
let lang = navigator.language.split('-')[0];
|
|
2533
|
+
if (!this.availablelangs.some((l) => l.code === lang)) {
|
|
2534
|
+
lang = 'en';
|
|
2535
|
+
}
|
|
2536
|
+
this.translate.setDefaultLang(lang);
|
|
2537
|
+
this.translate.use(lang);
|
|
2538
|
+
}
|
|
2539
|
+
setDefaultLang(lang) {
|
|
2540
|
+
this.translate.setDefaultLang(lang);
|
|
2541
|
+
}
|
|
2542
|
+
useLanguage(lang) {
|
|
2543
|
+
if (lang && this.availablelangs.some((l) => l.code === lang)) {
|
|
2544
|
+
this.translate.use(lang);
|
|
2545
|
+
}
|
|
2546
|
+
}
|
|
2547
|
+
getAvailableLanguages() {
|
|
2548
|
+
return this.availablelangs;
|
|
2549
|
+
}
|
|
2550
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: TranslationService, deps: [{ token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2551
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: TranslationService, providedIn: 'root' }); }
|
|
2552
|
+
}
|
|
2553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: TranslationService, decorators: [{
|
|
2554
|
+
type: Injectable,
|
|
2555
|
+
args: [{
|
|
2556
|
+
providedIn: 'root',
|
|
2557
|
+
}]
|
|
2558
|
+
}], ctorParameters: () => [{ type: i1$1.TranslateService }] });
|
|
2559
|
+
|
|
2560
|
+
class PDFService {
|
|
2561
|
+
constructor() {
|
|
2562
|
+
pdfjsLib.GlobalWorkerOptions.workerSrc =
|
|
2563
|
+
window.pdfjsWorkerSrc ||
|
|
2564
|
+
new URL('pdfjs-dist/build/pdf.worker.min.mjs', import.meta.url).toString();
|
|
2565
|
+
}
|
|
2566
|
+
/**
|
|
2567
|
+
* Convertit un fichier PDF en un tableau de DataURLs d'images.
|
|
2568
|
+
* @param file Le fichier PDF à convertir
|
|
2569
|
+
* @param scale Le facteur d'échelle (1.5 par défaut pour la démo)
|
|
2570
|
+
* @param onProgress Callback de progression
|
|
2571
|
+
*/
|
|
2572
|
+
async convertPDFToImages(file, scale = 1.5, onProgress) {
|
|
2573
|
+
const arrayBuffer = await file.arrayBuffer();
|
|
2574
|
+
const loadingTask = pdfjsLib.getDocument({ data: arrayBuffer });
|
|
2575
|
+
const pdf = await loadingTask.promise;
|
|
2576
|
+
const numPages = pdf.numPages;
|
|
2577
|
+
const images = [];
|
|
2578
|
+
for (let i = 1; i <= numPages; i++) {
|
|
2579
|
+
if (onProgress) {
|
|
2580
|
+
onProgress({
|
|
2581
|
+
current: i,
|
|
2582
|
+
total: numPages,
|
|
2583
|
+
message: `Conversion de la page ${i} sur ${numPages}...`,
|
|
2584
|
+
});
|
|
2585
|
+
}
|
|
2586
|
+
const page = await pdf.getPage(i);
|
|
2587
|
+
const viewport = page.getViewport({ scale });
|
|
2588
|
+
const canvas = document.createElement('canvas');
|
|
2589
|
+
const context = canvas.getContext('2d');
|
|
2590
|
+
if (!context) {
|
|
2591
|
+
throw new Error('Impossible de créer le contexte 2D du canvas');
|
|
2592
|
+
}
|
|
2593
|
+
canvas.height = viewport.height;
|
|
2594
|
+
canvas.width = viewport.width;
|
|
2595
|
+
const renderContext = {
|
|
2596
|
+
canvasContext: context,
|
|
2597
|
+
viewport: viewport,
|
|
2598
|
+
canvas: canvas,
|
|
2599
|
+
};
|
|
2600
|
+
await page.render(renderContext).promise;
|
|
2601
|
+
images.push(canvas.toDataURL('image/webp', 0.8));
|
|
2602
|
+
// Nettoyage pour économiser la mémoire
|
|
2603
|
+
canvas.width = 0;
|
|
2604
|
+
canvas.height = 0;
|
|
2605
|
+
}
|
|
2606
|
+
return images;
|
|
2607
|
+
}
|
|
2608
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PDFService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2609
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PDFService, providedIn: 'root' }); }
|
|
2610
|
+
}
|
|
2611
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PDFService, decorators: [{
|
|
2612
|
+
type: Injectable,
|
|
2613
|
+
args: [{
|
|
2614
|
+
providedIn: 'root',
|
|
2615
|
+
}]
|
|
2616
|
+
}], ctorParameters: () => [] });
|
|
2617
|
+
|
|
2618
|
+
class AppComponent {
|
|
2619
|
+
set apiUrl1(v) {
|
|
2620
|
+
this._apiUrl = v;
|
|
2621
|
+
}
|
|
2622
|
+
set apiUrl2(v) {
|
|
2623
|
+
this._apiUrl = v;
|
|
2624
|
+
}
|
|
2625
|
+
get apiUrl() {
|
|
2626
|
+
return this._apiUrl;
|
|
2627
|
+
}
|
|
2628
|
+
set isDemo1(v) {
|
|
2629
|
+
this.isDemoAlias = v;
|
|
2630
|
+
}
|
|
2631
|
+
set isDemo2(v) {
|
|
2632
|
+
this.isDemoAlias = v;
|
|
2633
|
+
}
|
|
2634
|
+
set isDemo3(v) {
|
|
2635
|
+
this.isDemoAlias = v;
|
|
2636
|
+
}
|
|
2637
|
+
set isDemoAlias(v) {
|
|
2638
|
+
SolidLog.log('[AppComponent] isDemo setter called with:', v);
|
|
2639
|
+
this._isDemo = v === true || v === 'true' || v === '';
|
|
2640
|
+
}
|
|
2641
|
+
get isDemo() {
|
|
2642
|
+
return this._isDemo;
|
|
2643
|
+
}
|
|
2644
|
+
constructor(translationService, appParamsService, loadingService, flipbookDataService, pdfService) {
|
|
2645
|
+
this.translationService = translationService;
|
|
2646
|
+
this.appParamsService = appParamsService;
|
|
2647
|
+
this.loadingService = loadingService;
|
|
2648
|
+
this.flipbookDataService = flipbookDataService;
|
|
2649
|
+
this.pdfService = pdfService;
|
|
2650
|
+
this.type = 'document';
|
|
2651
|
+
this._apiUrl = 'http://localhost/centralstationservice/api/';
|
|
2652
|
+
this.language = 'en';
|
|
2653
|
+
this._isDemo = false;
|
|
2654
|
+
this.initializationCount = 0;
|
|
2655
|
+
this.exitEditor = new EventEmitter();
|
|
2656
|
+
this.isSafari = signal(false, ...(ngDevMode ? [{ debugName: "isSafari" }] : []));
|
|
2657
|
+
this.isMobile = signal(false, ...(ngDevMode ? [{ debugName: "isMobile" }] : []));
|
|
2658
|
+
this.isInitialized = false;
|
|
2659
|
+
// État UI
|
|
2660
|
+
this.currentPageIndex = 0;
|
|
2661
|
+
this.showSidebar = false;
|
|
2662
|
+
this.showMap = false;
|
|
2663
|
+
// Zoom (coordonné avec le viewer)
|
|
2664
|
+
this.scale = 1;
|
|
2665
|
+
this.showDemoModal = signal(false, ...(ngDevMode ? [{ debugName: "showDemoModal" }] : []));
|
|
2666
|
+
this.showPricingModal = signal(false, ...(ngDevMode ? [{ debugName: "showPricingModal" }] : []));
|
|
2667
|
+
this.isDemoLoading = signal(false, ...(ngDevMode ? [{ debugName: "isDemoLoading" }] : []));
|
|
2668
|
+
this.conversionProgress = signal(0, ...(ngDevMode ? [{ debugName: "conversionProgress" }] : []));
|
|
2669
|
+
}
|
|
2670
|
+
ngOnInit() {
|
|
2671
|
+
this.checkBrowser();
|
|
2672
|
+
this.checkMobile();
|
|
2673
|
+
SolidLog.info('v0.1.8 Initiation solidpepper-flipbook...');
|
|
2674
|
+
this.tryInitialize();
|
|
2675
|
+
}
|
|
2676
|
+
onResize() {
|
|
2677
|
+
this.checkMobile();
|
|
2678
|
+
}
|
|
2679
|
+
checkMobile() {
|
|
2680
|
+
// Breakpoint mobile strict (600px)
|
|
2681
|
+
this.isMobile.set(window.innerWidth < 600);
|
|
2682
|
+
}
|
|
2683
|
+
ngOnChanges(changes) {
|
|
2684
|
+
this.tryInitialize();
|
|
2685
|
+
}
|
|
2686
|
+
async tryInitialize() {
|
|
2687
|
+
if (this.isInitialized) {
|
|
2688
|
+
SolidLog.log('[AppComponent] tryInitialize - already initialized, ignoring');
|
|
2689
|
+
return;
|
|
2690
|
+
}
|
|
2691
|
+
const demoMode = this.isDemo;
|
|
2692
|
+
SolidLog.log('[AppComponent] tryInitialize attempt', {
|
|
2693
|
+
isDemo: demoMode,
|
|
2694
|
+
guid: this.guid,
|
|
2695
|
+
alias: this.alias,
|
|
2696
|
+
apiUrl: this.apiUrl,
|
|
2697
|
+
});
|
|
2698
|
+
if (!demoMode && !this.guid) {
|
|
2699
|
+
SolidLog.warn('[AppComponent] tryInitialize - No guid and not in demoMode');
|
|
2700
|
+
this.loadingService.showError(LoadingError.DOCUMENT);
|
|
2701
|
+
return;
|
|
2702
|
+
}
|
|
2703
|
+
this.isInitialized = true;
|
|
2704
|
+
this.initializationCount++;
|
|
2705
|
+
SolidLog.log('[AppComponent] Initializing state for the first time');
|
|
2706
|
+
this.appParamsService.setParams({
|
|
2707
|
+
guid: this.guid,
|
|
2708
|
+
alias: this.alias,
|
|
2709
|
+
type: this.type,
|
|
2710
|
+
apiUrl: this.apiUrl,
|
|
2711
|
+
language: this.language,
|
|
2712
|
+
debug: false,
|
|
2713
|
+
isDemo: demoMode,
|
|
2714
|
+
});
|
|
2715
|
+
this.translationService.useLanguage(this.language);
|
|
2716
|
+
if (demoMode) {
|
|
2717
|
+
SolidLog.log('[AppComponent] Entering Demo Mode');
|
|
2718
|
+
this.loadingService.hideLoader();
|
|
2719
|
+
this.showDemoModal.set(true);
|
|
2720
|
+
return;
|
|
2721
|
+
}
|
|
2722
|
+
// Load flipbook data from API
|
|
2723
|
+
SolidLog.log('[AppComponent] Initial data load...');
|
|
2724
|
+
this.loadingService.showLoader();
|
|
2725
|
+
await this.flipbookDataService.loadFlipbookInfo();
|
|
2726
|
+
this.loadingService.hideLoader();
|
|
2727
|
+
}
|
|
2728
|
+
async onPDFSelected(file) {
|
|
2729
|
+
this.showDemoModal.set(false);
|
|
2730
|
+
this.loadingService.showLoader();
|
|
2731
|
+
this.isDemoLoading.set(true);
|
|
2732
|
+
try {
|
|
2733
|
+
const images = await this.pdfService.convertPDFToImages(file, 1.5, (p) => {
|
|
2734
|
+
// Calcul du pourcentage
|
|
2735
|
+
const percent = Math.round((p.current / p.total) * 100);
|
|
2736
|
+
this.conversionProgress.set(percent);
|
|
2737
|
+
SolidLog.log(`[Demo] PDF Conversion: ${p.message} (${percent}%)`);
|
|
2738
|
+
});
|
|
2739
|
+
this.flipbookDataService.pages = images.map((img, i) => ({
|
|
2740
|
+
pageNumber: i + 1,
|
|
2741
|
+
pageThumbnail: img,
|
|
2742
|
+
pageImage: img,
|
|
2743
|
+
pageDatasJson: '', // Pas de données interactives en démo
|
|
2744
|
+
}));
|
|
2745
|
+
}
|
|
2746
|
+
catch (error) {
|
|
2747
|
+
console.error('[Demo] PDF conversion failed:', error);
|
|
2748
|
+
this.loadingService.showError(LoadingError.DOCUMENT);
|
|
2749
|
+
}
|
|
2750
|
+
finally {
|
|
2751
|
+
this.isDemoLoading.set(false);
|
|
2752
|
+
this.conversionProgress.set(0);
|
|
2753
|
+
this.loadingService.hideLoader();
|
|
2754
|
+
this.startPricingTimer();
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
async onMockSelected() {
|
|
2758
|
+
this.showDemoModal.set(false);
|
|
2759
|
+
this.loadingService.showLoader();
|
|
2760
|
+
this.isDemoLoading.set(true);
|
|
2761
|
+
try {
|
|
2762
|
+
// Simuler un petit délai pour l'animation
|
|
2763
|
+
await new Promise((resolve) => setTimeout(resolve, 800));
|
|
2764
|
+
// Charger les données réelles du catalogue fourni en paramètre
|
|
2765
|
+
await this.flipbookDataService.loadFlipbookInfo();
|
|
2766
|
+
}
|
|
2767
|
+
finally {
|
|
2768
|
+
this.isDemoLoading.set(false);
|
|
2769
|
+
this.loadingService.hideLoader();
|
|
2770
|
+
this.startPricingTimer();
|
|
2771
|
+
}
|
|
2772
|
+
}
|
|
2773
|
+
startPricingTimer() {
|
|
2774
|
+
if (this.isDemo) {
|
|
2775
|
+
if (this.pricingTimer)
|
|
2776
|
+
clearTimeout(this.pricingTimer);
|
|
2777
|
+
this.pricingTimer = setTimeout(() => {
|
|
2778
|
+
this.showPricingModal.set(true);
|
|
2779
|
+
}, 10000);
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
openPricing() {
|
|
2783
|
+
this.showPricingModal.set(true);
|
|
2784
|
+
if (this.pricingTimer)
|
|
2785
|
+
clearTimeout(this.pricingTimer);
|
|
2786
|
+
}
|
|
2787
|
+
checkBrowser() {
|
|
2788
|
+
const isSafariBrowser = /^((?!chrome|android).)*safari/i.test(navigator.userAgent) &&
|
|
2789
|
+
!window.chrome;
|
|
2790
|
+
// this.isSafari.set(isSafariBrowser);
|
|
2791
|
+
this.isSafari.set(false);
|
|
2792
|
+
}
|
|
2793
|
+
// Callbacks viewer
|
|
2794
|
+
onPageChanged(index) {
|
|
2795
|
+
this.currentPageIndex = index;
|
|
2796
|
+
}
|
|
2797
|
+
onPageSelected(pageNumber) {
|
|
2798
|
+
this.viewerRef?.goToPage(pageNumber);
|
|
2799
|
+
this.showSidebar = false;
|
|
2800
|
+
this.showMap = false;
|
|
2801
|
+
}
|
|
2802
|
+
// Zoom
|
|
2803
|
+
onResetZoom() {
|
|
2804
|
+
this.viewerRef?.resetZoom();
|
|
2805
|
+
}
|
|
2806
|
+
onZoomIn() {
|
|
2807
|
+
this.viewerRef?.onZoomIn();
|
|
2808
|
+
}
|
|
2809
|
+
onZoomOut() {
|
|
2810
|
+
this.viewerRef?.onZoomOut();
|
|
2811
|
+
}
|
|
2812
|
+
toggleSidebar() {
|
|
2813
|
+
this.showSidebar = !this.showSidebar;
|
|
2814
|
+
}
|
|
2815
|
+
// Navigation Proxy pour Navbar
|
|
2816
|
+
flipStart() {
|
|
2817
|
+
this.viewerRef?.goToPage(1);
|
|
2818
|
+
}
|
|
2819
|
+
flipPrev() {
|
|
2820
|
+
this.viewerRef?.flipPrev();
|
|
2821
|
+
}
|
|
2822
|
+
flipNext() {
|
|
2823
|
+
this.viewerRef?.flipNext();
|
|
2824
|
+
}
|
|
2825
|
+
flipEnd() {
|
|
2826
|
+
const total = this.flipbookDataService.pages.length;
|
|
2827
|
+
if (total > 0) {
|
|
2828
|
+
this.viewerRef?.goToPage(total);
|
|
2829
|
+
}
|
|
2830
|
+
}
|
|
2831
|
+
goToPage(page) {
|
|
2832
|
+
this.viewerRef?.goToPage(page);
|
|
2833
|
+
}
|
|
2834
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AppComponent, deps: [{ token: TranslationService }, { token: AppParamsService }, { token: LoadingService }, { token: FlipbookDataService }, { token: PDFService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2835
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AppComponent, isStandalone: true, selector: "solidpepper-flipbook", inputs: { guid: "guid", alias: "alias", type: "type", apiUrl1: ["apiurl", "apiUrl1"], apiUrl2: ["api-url", "apiUrl2"], language: "language", isDemo1: ["isDemo", "isDemo1"], isDemo2: ["isdemo", "isDemo2"], isDemo3: ["is-demo", "isDemo3"] }, outputs: { exitEditor: "exitEditor" }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "viewerRef", first: true, predicate: ["viewerRef"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<app-global-loader\r\n *ngIf=\"loadingService.isLoading() || loadingService.hasError() || isSafari()\"\r\n [isLoading]=\"loadingService.isLoading()\"\r\n [hasError]=\"loadingService.hasError()\"\r\n [isSafari]=\"isSafari()\"\r\n [errorKey]=\"loadingService.errorKey()\"\r\n [isInitialized]=\"isInitialized\"\r\n [progress]=\"conversionProgress()\"\r\n [isDemo]=\"isDemo\"\r\n>\r\n</app-global-loader>\r\n\r\n<app-modal-demo\r\n *ngIf=\"showDemoModal()\"\r\n (pdfSelected)=\"onPDFSelected($event)\"\r\n (mockSelected)=\"onMockSelected()\"\r\n></app-modal-demo>\r\n\r\n<app-modal-pricing\r\n *ngIf=\"showPricingModal()\"\r\n (close)=\"showPricingModal.set(false)\"\r\n></app-modal-pricing>\r\n\r\n<div\r\n *ngIf=\"!isSafari()\"\r\n id=\"method-draw\"\r\n class=\"svg-editor-container\"\r\n [style.visibility]=\"\r\n loadingService.isLoading() || loadingService.hasError()\r\n ? 'hidden'\r\n : 'visible'\r\n \"\r\n>\r\n <div class=\"zone\" id=\"flipbook-zone\">\r\n <app-flipbook-sidebar\r\n [class.sidebar-open]=\"showSidebar\"\r\n [isOpen]=\"showSidebar\"\r\n (pageSelected)=\"onPageSelected($event)\"\r\n (close)=\"toggleSidebar()\"\r\n ></app-flipbook-sidebar>\r\n\r\n <div class=\"main-viewer\">\r\n <app-flipbook-navbar\r\n [currentPage]=\"currentPageIndex + 1\"\r\n [scale]=\"scale\"\r\n (flipStart)=\"flipStart()\"\r\n (flipPrev)=\"flipPrev()\"\r\n (flipNext)=\"flipNext()\"\r\n (flipEnd)=\"flipEnd()\"\r\n (goToPage)=\"goToPage($event)\"\r\n (resetZoom)=\"onResetZoom()\"\r\n (zoomIn)=\"onZoomIn()\"\r\n (zoomOut)=\"onZoomOut()\"\r\n ></app-flipbook-navbar>\r\n \r\n <app-flipbook-viewer\r\n #viewerRef\r\n (pageChanged)=\"onPageChanged($event)\"\r\n (zoomChanged)=\"scale = $event\"\r\n (toggleSidebar)=\"toggleSidebar()\"\r\n (toggleMap)=\"showMap = !showMap\"\r\n ></app-flipbook-viewer>\r\n\r\n <app-flipbook-controls\r\n [sidebarOpen]=\"showSidebar\"\r\n [mapOpen]=\"showMap\"\r\n (toggleSidebar)=\"toggleSidebar()\"\r\n (toggleMap)=\"showMap = !showMap\"\r\n ></app-flipbook-controls>\r\n\r\n <button *ngIf=\"isDemo\" class=\"btn-view-offers\" (click)=\"openPricing()\">\r\n <i class=\"bi bi-tags\"></i> Voir les offres\r\n </button>\r\n\r\n <app-powered-by></app-powered-by>\r\n </div>\r\n\r\n <app-flipbook-grid\r\n *ngIf=\"showMap\"\r\n (pageSelected)=\"onPageSelected($event)\"\r\n (close)=\"showMap = false\"\r\n ></app-flipbook-grid>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{--safe-area-bottom: env(safe-area-inset-bottom);--white: #242429;--white-alpha-medium: #ffffff80;--white-alpha-light: #ffffff40;--active-hover: #b6a3ff;--active: #d3c8ff;--active-alpha-medium: #d3c8ffbf;--active-alpha-light: #d3c8ff80;--active-alpha-light-2: #d3c8ff40;--active-alpha-medium-full-opacity: #d7d0f5;--gray-00: #e4e4e4;--gray-0: #c9c9c9;--gray-05: #b2b2b2;--gray-1: #80808e;--gray-15: #bfbfbf;--gray-2: #cccccc;--gray-3: #e0e0e0;--gray-4: #ebebeb;--gray-5: #f2f2f2;--success: #00d68f;--warning: #ffaa2c;--info: #3d7afd;--error: #b00020;--font-family: \"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;--font-size-large: 20px;--font-size-medium: 18px;--font-size-regular: 16px;--font-size-small: 14px;--font-size-tiny: 12px;--font-weight-extra-bold: 800;--font-weight-bold: 700;--font-weight-semi-bold: 600;--font-weight-medium: 500;--font-weight-normal: 400;--font-weight-light: 300;--spacing-xxs: 4px;--spacing-xs: 8px;--spacing-s: 12px;--spacing-m: 16px;--spacing-l: 20px;--spacing-xl: 24px;--spacing-xxl: 32px;--container-width: 300px;--radius-xxs: .5px;--radius-xs: 2px;--radius-s: 4px;--radius-m: 8px;--radius-l: 16px;--radius-xl: 32px;--radius-xxl: 64px;display:block;width:100%;height:100vh;height:100dvh;overflow:hidden;font-family:var(--font-family);color:var(--white);margin:0}:host-context(body.dark-mode),:host(.dark-mode){--white: #ffffff;--white-alpha-medium: #323232cc;--white-alpha-light: #32323240;--active-hover: #6c47ff;--active: #582eff;--active-alpha-medium: #582effbf;--active-alpha-light: #582eff80;--active-alpha-light-2: #582eff40;--active-alpha-medium-full-opacity: #4c2dc9;--gray-00: #e4e4e4;--gray-0: #c9c9c9;--gray-05: #c9c9c9;--gray-1: #80808e;--gray-15: #676774;--gray-2: #4f4f59;--gray-3: #38383f;--gray-4: #303036;--gray-5: #242429;--shadow: 0 var(--spacing-xxs) var(--spacing-xxl) rgba(0, 0, 0, .4);--success-background: #5ffb8480;--success-border: #66ff66;--warning-background: #ff542e40;--warning-border: #ff542e;--error-background: #c924335c;--error-border: #ff3d52;--info-background: #77baff78;--info-border: #b8daff}:host-context(body.light-mode),:host(.light-mode){--white: #242429;--white-alpha-medium: #ffffff80;--white-alpha-light: #ffffff40;--active-hover: #b6a3ff;--active: #d3c8ff;--active-alpha-medium: #d3c8ffbf;--active-alpha-light: #d3c8ff80;--active-alpha-light-2: #d3c8ff40;--active-alpha-medium-full-opacity: #d7d0f5;--gray-00: #e4e4e4;--gray-0: #c9c9c9;--gray-05: #b2b2b2;--gray-1: #80808e;--gray-15: #bfbfbf;--gray-2: #cccccc;--gray-3: #e0e0e0;--gray-4: #ebebeb;--gray-5: #f2f2f2;--shadow: 0 var(--spacing-xxs) var(--spacing-xxl) rgba(0, 0, 0, .1);--success-background: #5ffb8480;--success-border: #66ff66;--warning-background: #ff542e40;--warning-border: #ff542e;--error-background: #c924335c;--error-border: #ff3d52;--info-background: #77baff78;--info-border: #b8daff}.svg-editor-container{display:flex;width:100%;height:100%;background-color:var(--gray-3);position:relative}app-global-panel{position:absolute;left:var(--spacing-s);top:var(--spacing-s);z-index:100}.editor-center{flex:1;display:flex;flex-direction:column;position:relative;height:100%}app-properties-panel{position:absolute;right:var(--spacing-s);top:var(--spacing-s);width:var(--container-width);z-index:100}app-tool-bar{position:absolute;top:calc(var(--spacing-s) + var(--spacing-xxl));left:50%;transform:translate(-50%);z-index:200}app-context-bar{margin-bottom:var(--spacing-xs)}app-svg-canvas{flex:1;overflow:hidden;background-color:var(--gray-3)}.app-overlay-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:1rem;z-index:10000;color:var(--gray-01);background:var(--gray-3);padding:2rem;border-radius:8px;box-shadow:0 4px 6px #0006}.spinner{width:40px;height:40px;border:4px solid var(--gray-4);border-top:4px solid var(--primary);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.error-state{border:1px solid var(--error, red)}.error-icon{font-size:2rem}*,*:before,*:after{box-sizing:border-box}table{--indexTabSize: 29px}table.product-table{border-collapse:collapse;word-break:break-word;table-layout:fixed}.columns-index-row{height:30px}colgroup col{min-width:10px}.row-index-cell{width:20px;position:relative;border-bottom:1px solid white!important;border-top:1px solid white!important}.col-resize{display:inline-block;width:8px;cursor:col-resize;content:\"\";position:absolute;right:-4px;top:0;bottom:0;z-index:5}.col-index-cell:hover .index-view{opacity:.5}.row-resize{height:var(--spacing-xs);display:inline-block;cursor:row-resize;position:absolute;bottom:-4px;left:0;right:0;z-index:5;min-height:var(--spacing-xs)!important}.row-index-cell .index-view{display:flex;justify-content:center;align-items:center;min-height:inherit}.index-view{cursor:pointer;text-align:center;width:100%;margin:auto}table.product-table:not(:has(.resizing)) td:has(.index-view):hover,tr:has(.selected) td:has(.index-view),.selected-column{background-color:#efefef!important}table.product-table td:has(.index-view){border:none;text-align:center;color:#666;padding:.25em 0;position:relative;background-color:#fff;min-height:inherit}table.product-table td.selectAll{border:none!important;width:var(--indexSize);height:var(--indexSize)}.lockIcon{position:absolute;top:2px;right:2px;align-items:center;justify-content:center;cursor:pointer;display:none;max-width:fit-content}.lockIcon svg{display:none;width:var(--spacing-s);height:var(--spacing-s)}table.product-table td:hover .lockIcon{display:flex}table.product-table td.fixed-width .lockIcon .close{display:block}table.product-table td:not(.fixed-width) .lockIcon .open{display:block}table.product-table td:not(:has(.index-view)){line-height:120%;cursor:cell;overflow:hidden;color:#000;font-size:16px;font-family:serif;text-align:left;min-height:inherit;padding:5px;border-width:.8px;border-color:#000;border-style:solid;font-style:normal;font-weight:400;text-decoration:none solid rgb(0,0,0)}table.product-table td:not(:has(.index-view)) .wrap{height:100%;display:flex;align-items:inherit;justify-content:inherit;white-space:nowrap;max-width:100%;text-align:inherit;min-height:inherit;font-family:inherit!important}table.product-table:not(.changingColor) .selected .wrap{background-color:var(--active-alpha-light-2)}.cell-edit-input{background-color:transparent;resize:none;padding:0;border:none;font-size:inherit;border-radius:1px;text-decoration:inherit;color:inherit;font-weight:inherit;font-style:inherit;font-family:inherit;width:100%}.cellContent{max-width:100%;font-family:inherit!important;text-align:inherit;width:100%}.fixed-width .cellContent{white-space:pre-wrap}.cell-edit-input:focus{outline:none}table.product-table td:has(.cell-edit-input){cursor:text}.edit-mode .spacing-row{height:3px}.hidden{display:none}table.product-table:not(.edit-mode) :is(.columns-index-row,.row-index-cell){opacity:0;pointer-events:none;-webkit-user-select:none;user-select:none}table.product-table:not(.edit-mode){pointer-events:none;-webkit-user-select:none;user-select:none}.spacing-row{height:8px}.fake-textarea .textAttribute{background-color:var(--active);color:var(--gray-00);border-radius:var(--radius-s);padding-left:5px;padding-right:5px;text-wrap-mode:nowrap;-webkit-user-select:none;user-select:none}.textAttribute.warning{background-color:var(--warning)}.fake-textarea .textAttribute::selection{background-color:var(--active-hover);color:var(--white)}table .textAttribute{background-color:var(--active);color:var(--gray-00);border-radius:var(--radius-s);padding-left:5px;padding-right:5px;text-wrap-mode:wrap}.cdk-drag-preview.attribute-field{background:#303036;border-radius:4px;box-shadow:0 8px 24px #00000080;color:#fff;display:flex;flex-direction:column;min-width:300px;max-width:400px;opacity:.96;border:1px solid rgba(255,255,255,.1);overflow:hidden;font-size:13px;font-family:Inter,-apple-system,sans-serif}.cdk-drag-preview.attribute-field .attribute-header{display:flex;align-items:center;padding:8px 12px;gap:12px;min-height:48px}.cdk-drag-preview.attribute-field .attribute-header .variable-drag-handle{cursor:grabbing;color:#fff6;display:flex;align-items:center}.cdk-drag-preview.attribute-field .attribute-header .attribute-name{flex:1;font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cdk-drag-preview.attribute-field .attribute-header .attribute-icons,.cdk-drag-preview.attribute-field .attribute-header .attribute-actions{display:none}#flipbook-zone{flex:1;display:flex;position:relative;height:100%;width:100%;overflow:hidden}app-flipbook-sidebar{display:block;height:100%;position:absolute;left:0;top:0;z-index:1000;pointer-events:none}.main-viewer{flex:1;display:flex;flex-direction:column;position:relative;height:100%;width:100%;background:var(--gray-3);overflow:hidden}.main-viewer app-flipbook-viewer{flex:1;display:flex;height:100%;width:100%;overflow:hidden}@media (max-width: 600px){app-flipbook-sidebar{width:0;max-width:100%;pointer-events:none}app-flipbook-sidebar.sidebar-open{width:100%!important}app-flipbook-sidebar ::ng-deep .sidebar-flipbook:not(.collapsed){pointer-events:auto}.main-viewer{width:100%}}::-webkit-scrollbar{width:var(--spacing-xxs);height:var(--spacing-xxs);background:transparent;position:absolute}::-webkit-scrollbar-track{border-radius:10px;background:transparent}::-webkit-scrollbar-thumb{border-radius:10px;background:var(--gray-2)}::-webkit-scrollbar-corner{background:transparent}.btn-view-offers{position:absolute;bottom:20px;left:20px;z-index:1000;background:var(--active, #582eff);border:1px solid rgba(255,255,255,.1);color:#fff;padding:8px 16px;border-radius:8px;font-size:.85rem;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:8px;transition:all .2s ease;box-shadow:0 4px 12px #0003}.btn-view-offers i{font-size:1rem;color:#fff}.btn-view-offers:hover{background:var(--active-hover, #6c47ff);transform:translateY(-2px);box-shadow:0 6px 16px #0000004d}.btn-view-offers:active{transform:translateY(0)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: GlobalLoaderComponent, selector: "app-global-loader", inputs: ["isLoading", "hasError", "isSafari", "isInitialized", "errorKey", "progress", "isDemo"] }, { kind: "component", type: PoweredByComponent, selector: "app-powered-by" }, { kind: "component", type: FlipbookNavbarComponent, selector: "app-flipbook-navbar", inputs: ["currentPage", "scale"], outputs: ["flipStart", "flipPrev", "flipNext", "flipEnd", "goToPage", "resetZoom", "zoomIn", "zoomOut"] }, { kind: "component", type: FlipbookSidebarComponent, selector: "app-flipbook-sidebar", inputs: ["isOpen"], outputs: ["pageSelected", "close"] }, { kind: "component", type: FlipbookControlsComponent, selector: "app-flipbook-controls", inputs: ["sidebarOpen", "mapOpen"], outputs: ["toggleSidebar", "toggleMap"] }, { kind: "component", type: FlipbookViewerComponent, selector: "app-flipbook-viewer", outputs: ["pagesLoaded", "pageChanged", "toggleSidebar", "toggleMap", "zoomChanged"] }, { kind: "component", type: FlipbookGridComponent, selector: "app-flipbook-grid", outputs: ["pageSelected", "close"] }, { kind: "component", type: ModalDemoComponent, selector: "app-modal-demo", outputs: ["pdfSelected", "mockSelected"] }, { kind: "component", type: ModalPricingComponent, selector: "app-modal-pricing", outputs: ["close", "start"] }] }); }
|
|
2836
|
+
}
|
|
2837
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AppComponent, decorators: [{
|
|
2838
|
+
type: Component,
|
|
2839
|
+
args: [{ selector: 'solidpepper-flipbook', standalone: true, imports: [
|
|
2840
|
+
CommonModule,
|
|
2841
|
+
TranslateModule,
|
|
2842
|
+
GlobalLoaderComponent,
|
|
2843
|
+
PoweredByComponent,
|
|
2844
|
+
FlipbookNavbarComponent,
|
|
2845
|
+
FlipbookSidebarComponent,
|
|
2846
|
+
FlipbookControlsComponent,
|
|
2847
|
+
FlipbookViewerComponent,
|
|
2848
|
+
FlipbookGridComponent,
|
|
2849
|
+
ModalDemoComponent,
|
|
2850
|
+
ModalPricingComponent,
|
|
2851
|
+
], encapsulation: ViewEncapsulation.Emulated, template: "<app-global-loader\r\n *ngIf=\"loadingService.isLoading() || loadingService.hasError() || isSafari()\"\r\n [isLoading]=\"loadingService.isLoading()\"\r\n [hasError]=\"loadingService.hasError()\"\r\n [isSafari]=\"isSafari()\"\r\n [errorKey]=\"loadingService.errorKey()\"\r\n [isInitialized]=\"isInitialized\"\r\n [progress]=\"conversionProgress()\"\r\n [isDemo]=\"isDemo\"\r\n>\r\n</app-global-loader>\r\n\r\n<app-modal-demo\r\n *ngIf=\"showDemoModal()\"\r\n (pdfSelected)=\"onPDFSelected($event)\"\r\n (mockSelected)=\"onMockSelected()\"\r\n></app-modal-demo>\r\n\r\n<app-modal-pricing\r\n *ngIf=\"showPricingModal()\"\r\n (close)=\"showPricingModal.set(false)\"\r\n></app-modal-pricing>\r\n\r\n<div\r\n *ngIf=\"!isSafari()\"\r\n id=\"method-draw\"\r\n class=\"svg-editor-container\"\r\n [style.visibility]=\"\r\n loadingService.isLoading() || loadingService.hasError()\r\n ? 'hidden'\r\n : 'visible'\r\n \"\r\n>\r\n <div class=\"zone\" id=\"flipbook-zone\">\r\n <app-flipbook-sidebar\r\n [class.sidebar-open]=\"showSidebar\"\r\n [isOpen]=\"showSidebar\"\r\n (pageSelected)=\"onPageSelected($event)\"\r\n (close)=\"toggleSidebar()\"\r\n ></app-flipbook-sidebar>\r\n\r\n <div class=\"main-viewer\">\r\n <app-flipbook-navbar\r\n [currentPage]=\"currentPageIndex + 1\"\r\n [scale]=\"scale\"\r\n (flipStart)=\"flipStart()\"\r\n (flipPrev)=\"flipPrev()\"\r\n (flipNext)=\"flipNext()\"\r\n (flipEnd)=\"flipEnd()\"\r\n (goToPage)=\"goToPage($event)\"\r\n (resetZoom)=\"onResetZoom()\"\r\n (zoomIn)=\"onZoomIn()\"\r\n (zoomOut)=\"onZoomOut()\"\r\n ></app-flipbook-navbar>\r\n \r\n <app-flipbook-viewer\r\n #viewerRef\r\n (pageChanged)=\"onPageChanged($event)\"\r\n (zoomChanged)=\"scale = $event\"\r\n (toggleSidebar)=\"toggleSidebar()\"\r\n (toggleMap)=\"showMap = !showMap\"\r\n ></app-flipbook-viewer>\r\n\r\n <app-flipbook-controls\r\n [sidebarOpen]=\"showSidebar\"\r\n [mapOpen]=\"showMap\"\r\n (toggleSidebar)=\"toggleSidebar()\"\r\n (toggleMap)=\"showMap = !showMap\"\r\n ></app-flipbook-controls>\r\n\r\n <button *ngIf=\"isDemo\" class=\"btn-view-offers\" (click)=\"openPricing()\">\r\n <i class=\"bi bi-tags\"></i> Voir les offres\r\n </button>\r\n\r\n <app-powered-by></app-powered-by>\r\n </div>\r\n\r\n <app-flipbook-grid\r\n *ngIf=\"showMap\"\r\n (pageSelected)=\"onPageSelected($event)\"\r\n (close)=\"showMap = false\"\r\n ></app-flipbook-grid>\r\n </div>\r\n</div>\r\n", styles: ["@charset \"UTF-8\";:host{--safe-area-bottom: env(safe-area-inset-bottom);--white: #242429;--white-alpha-medium: #ffffff80;--white-alpha-light: #ffffff40;--active-hover: #b6a3ff;--active: #d3c8ff;--active-alpha-medium: #d3c8ffbf;--active-alpha-light: #d3c8ff80;--active-alpha-light-2: #d3c8ff40;--active-alpha-medium-full-opacity: #d7d0f5;--gray-00: #e4e4e4;--gray-0: #c9c9c9;--gray-05: #b2b2b2;--gray-1: #80808e;--gray-15: #bfbfbf;--gray-2: #cccccc;--gray-3: #e0e0e0;--gray-4: #ebebeb;--gray-5: #f2f2f2;--success: #00d68f;--warning: #ffaa2c;--info: #3d7afd;--error: #b00020;--font-family: \"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif;--font-size-large: 20px;--font-size-medium: 18px;--font-size-regular: 16px;--font-size-small: 14px;--font-size-tiny: 12px;--font-weight-extra-bold: 800;--font-weight-bold: 700;--font-weight-semi-bold: 600;--font-weight-medium: 500;--font-weight-normal: 400;--font-weight-light: 300;--spacing-xxs: 4px;--spacing-xs: 8px;--spacing-s: 12px;--spacing-m: 16px;--spacing-l: 20px;--spacing-xl: 24px;--spacing-xxl: 32px;--container-width: 300px;--radius-xxs: .5px;--radius-xs: 2px;--radius-s: 4px;--radius-m: 8px;--radius-l: 16px;--radius-xl: 32px;--radius-xxl: 64px;display:block;width:100%;height:100vh;height:100dvh;overflow:hidden;font-family:var(--font-family);color:var(--white);margin:0}:host-context(body.dark-mode),:host(.dark-mode){--white: #ffffff;--white-alpha-medium: #323232cc;--white-alpha-light: #32323240;--active-hover: #6c47ff;--active: #582eff;--active-alpha-medium: #582effbf;--active-alpha-light: #582eff80;--active-alpha-light-2: #582eff40;--active-alpha-medium-full-opacity: #4c2dc9;--gray-00: #e4e4e4;--gray-0: #c9c9c9;--gray-05: #c9c9c9;--gray-1: #80808e;--gray-15: #676774;--gray-2: #4f4f59;--gray-3: #38383f;--gray-4: #303036;--gray-5: #242429;--shadow: 0 var(--spacing-xxs) var(--spacing-xxl) rgba(0, 0, 0, .4);--success-background: #5ffb8480;--success-border: #66ff66;--warning-background: #ff542e40;--warning-border: #ff542e;--error-background: #c924335c;--error-border: #ff3d52;--info-background: #77baff78;--info-border: #b8daff}:host-context(body.light-mode),:host(.light-mode){--white: #242429;--white-alpha-medium: #ffffff80;--white-alpha-light: #ffffff40;--active-hover: #b6a3ff;--active: #d3c8ff;--active-alpha-medium: #d3c8ffbf;--active-alpha-light: #d3c8ff80;--active-alpha-light-2: #d3c8ff40;--active-alpha-medium-full-opacity: #d7d0f5;--gray-00: #e4e4e4;--gray-0: #c9c9c9;--gray-05: #b2b2b2;--gray-1: #80808e;--gray-15: #bfbfbf;--gray-2: #cccccc;--gray-3: #e0e0e0;--gray-4: #ebebeb;--gray-5: #f2f2f2;--shadow: 0 var(--spacing-xxs) var(--spacing-xxl) rgba(0, 0, 0, .1);--success-background: #5ffb8480;--success-border: #66ff66;--warning-background: #ff542e40;--warning-border: #ff542e;--error-background: #c924335c;--error-border: #ff3d52;--info-background: #77baff78;--info-border: #b8daff}.svg-editor-container{display:flex;width:100%;height:100%;background-color:var(--gray-3);position:relative}app-global-panel{position:absolute;left:var(--spacing-s);top:var(--spacing-s);z-index:100}.editor-center{flex:1;display:flex;flex-direction:column;position:relative;height:100%}app-properties-panel{position:absolute;right:var(--spacing-s);top:var(--spacing-s);width:var(--container-width);z-index:100}app-tool-bar{position:absolute;top:calc(var(--spacing-s) + var(--spacing-xxl));left:50%;transform:translate(-50%);z-index:200}app-context-bar{margin-bottom:var(--spacing-xs)}app-svg-canvas{flex:1;overflow:hidden;background-color:var(--gray-3)}.app-overlay-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:1rem;z-index:10000;color:var(--gray-01);background:var(--gray-3);padding:2rem;border-radius:8px;box-shadow:0 4px 6px #0006}.spinner{width:40px;height:40px;border:4px solid var(--gray-4);border-top:4px solid var(--primary);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.error-state{border:1px solid var(--error, red)}.error-icon{font-size:2rem}*,*:before,*:after{box-sizing:border-box}table{--indexTabSize: 29px}table.product-table{border-collapse:collapse;word-break:break-word;table-layout:fixed}.columns-index-row{height:30px}colgroup col{min-width:10px}.row-index-cell{width:20px;position:relative;border-bottom:1px solid white!important;border-top:1px solid white!important}.col-resize{display:inline-block;width:8px;cursor:col-resize;content:\"\";position:absolute;right:-4px;top:0;bottom:0;z-index:5}.col-index-cell:hover .index-view{opacity:.5}.row-resize{height:var(--spacing-xs);display:inline-block;cursor:row-resize;position:absolute;bottom:-4px;left:0;right:0;z-index:5;min-height:var(--spacing-xs)!important}.row-index-cell .index-view{display:flex;justify-content:center;align-items:center;min-height:inherit}.index-view{cursor:pointer;text-align:center;width:100%;margin:auto}table.product-table:not(:has(.resizing)) td:has(.index-view):hover,tr:has(.selected) td:has(.index-view),.selected-column{background-color:#efefef!important}table.product-table td:has(.index-view){border:none;text-align:center;color:#666;padding:.25em 0;position:relative;background-color:#fff;min-height:inherit}table.product-table td.selectAll{border:none!important;width:var(--indexSize);height:var(--indexSize)}.lockIcon{position:absolute;top:2px;right:2px;align-items:center;justify-content:center;cursor:pointer;display:none;max-width:fit-content}.lockIcon svg{display:none;width:var(--spacing-s);height:var(--spacing-s)}table.product-table td:hover .lockIcon{display:flex}table.product-table td.fixed-width .lockIcon .close{display:block}table.product-table td:not(.fixed-width) .lockIcon .open{display:block}table.product-table td:not(:has(.index-view)){line-height:120%;cursor:cell;overflow:hidden;color:#000;font-size:16px;font-family:serif;text-align:left;min-height:inherit;padding:5px;border-width:.8px;border-color:#000;border-style:solid;font-style:normal;font-weight:400;text-decoration:none solid rgb(0,0,0)}table.product-table td:not(:has(.index-view)) .wrap{height:100%;display:flex;align-items:inherit;justify-content:inherit;white-space:nowrap;max-width:100%;text-align:inherit;min-height:inherit;font-family:inherit!important}table.product-table:not(.changingColor) .selected .wrap{background-color:var(--active-alpha-light-2)}.cell-edit-input{background-color:transparent;resize:none;padding:0;border:none;font-size:inherit;border-radius:1px;text-decoration:inherit;color:inherit;font-weight:inherit;font-style:inherit;font-family:inherit;width:100%}.cellContent{max-width:100%;font-family:inherit!important;text-align:inherit;width:100%}.fixed-width .cellContent{white-space:pre-wrap}.cell-edit-input:focus{outline:none}table.product-table td:has(.cell-edit-input){cursor:text}.edit-mode .spacing-row{height:3px}.hidden{display:none}table.product-table:not(.edit-mode) :is(.columns-index-row,.row-index-cell){opacity:0;pointer-events:none;-webkit-user-select:none;user-select:none}table.product-table:not(.edit-mode){pointer-events:none;-webkit-user-select:none;user-select:none}.spacing-row{height:8px}.fake-textarea .textAttribute{background-color:var(--active);color:var(--gray-00);border-radius:var(--radius-s);padding-left:5px;padding-right:5px;text-wrap-mode:nowrap;-webkit-user-select:none;user-select:none}.textAttribute.warning{background-color:var(--warning)}.fake-textarea .textAttribute::selection{background-color:var(--active-hover);color:var(--white)}table .textAttribute{background-color:var(--active);color:var(--gray-00);border-radius:var(--radius-s);padding-left:5px;padding-right:5px;text-wrap-mode:wrap}.cdk-drag-preview.attribute-field{background:#303036;border-radius:4px;box-shadow:0 8px 24px #00000080;color:#fff;display:flex;flex-direction:column;min-width:300px;max-width:400px;opacity:.96;border:1px solid rgba(255,255,255,.1);overflow:hidden;font-size:13px;font-family:Inter,-apple-system,sans-serif}.cdk-drag-preview.attribute-field .attribute-header{display:flex;align-items:center;padding:8px 12px;gap:12px;min-height:48px}.cdk-drag-preview.attribute-field .attribute-header .variable-drag-handle{cursor:grabbing;color:#fff6;display:flex;align-items:center}.cdk-drag-preview.attribute-field .attribute-header .attribute-name{flex:1;font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cdk-drag-preview.attribute-field .attribute-header .attribute-icons,.cdk-drag-preview.attribute-field .attribute-header .attribute-actions{display:none}#flipbook-zone{flex:1;display:flex;position:relative;height:100%;width:100%;overflow:hidden}app-flipbook-sidebar{display:block;height:100%;position:absolute;left:0;top:0;z-index:1000;pointer-events:none}.main-viewer{flex:1;display:flex;flex-direction:column;position:relative;height:100%;width:100%;background:var(--gray-3);overflow:hidden}.main-viewer app-flipbook-viewer{flex:1;display:flex;height:100%;width:100%;overflow:hidden}@media (max-width: 600px){app-flipbook-sidebar{width:0;max-width:100%;pointer-events:none}app-flipbook-sidebar.sidebar-open{width:100%!important}app-flipbook-sidebar ::ng-deep .sidebar-flipbook:not(.collapsed){pointer-events:auto}.main-viewer{width:100%}}::-webkit-scrollbar{width:var(--spacing-xxs);height:var(--spacing-xxs);background:transparent;position:absolute}::-webkit-scrollbar-track{border-radius:10px;background:transparent}::-webkit-scrollbar-thumb{border-radius:10px;background:var(--gray-2)}::-webkit-scrollbar-corner{background:transparent}.btn-view-offers{position:absolute;bottom:20px;left:20px;z-index:1000;background:var(--active, #582eff);border:1px solid rgba(255,255,255,.1);color:#fff;padding:8px 16px;border-radius:8px;font-size:.85rem;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:8px;transition:all .2s ease;box-shadow:0 4px 12px #0003}.btn-view-offers i{font-size:1rem;color:#fff}.btn-view-offers:hover{background:var(--active-hover, #6c47ff);transform:translateY(-2px);box-shadow:0 6px 16px #0000004d}.btn-view-offers:active{transform:translateY(0)}\n"] }]
|
|
2852
|
+
}], ctorParameters: () => [{ type: TranslationService }, { type: AppParamsService }, { type: LoadingService }, { type: FlipbookDataService }, { type: PDFService }], propDecorators: { guid: [{
|
|
2853
|
+
type: Input,
|
|
2854
|
+
args: ['guid']
|
|
2855
|
+
}], alias: [{
|
|
2856
|
+
type: Input,
|
|
2857
|
+
args: ['alias']
|
|
2858
|
+
}], type: [{
|
|
2859
|
+
type: Input,
|
|
2860
|
+
args: ['type']
|
|
2861
|
+
}], apiUrl1: [{
|
|
2862
|
+
type: Input,
|
|
2863
|
+
args: ['apiurl']
|
|
2864
|
+
}], apiUrl2: [{
|
|
2865
|
+
type: Input,
|
|
2866
|
+
args: ['api-url']
|
|
2867
|
+
}], language: [{
|
|
2868
|
+
type: Input
|
|
2869
|
+
}], isDemo1: [{
|
|
2870
|
+
type: Input,
|
|
2871
|
+
args: ['isDemo']
|
|
2872
|
+
}], isDemo2: [{
|
|
2873
|
+
type: Input,
|
|
2874
|
+
args: ['isdemo']
|
|
2875
|
+
}], isDemo3: [{
|
|
2876
|
+
type: Input,
|
|
2877
|
+
args: ['is-demo']
|
|
2878
|
+
}], exitEditor: [{
|
|
2879
|
+
type: Output
|
|
2880
|
+
}], viewerRef: [{
|
|
2881
|
+
type: ViewChild,
|
|
2882
|
+
args: ['viewerRef']
|
|
2883
|
+
}], onResize: [{
|
|
2884
|
+
type: HostListener,
|
|
2885
|
+
args: ['window:resize']
|
|
2886
|
+
}] } });
|
|
2887
|
+
|
|
2888
|
+
/**
|
|
2889
|
+
* Generated bundle index. Do not edit.
|
|
2890
|
+
*/
|
|
2891
|
+
|
|
2892
|
+
export { AppParamsService, AppComponent as FlipbookComponent, FlipbookDataService };
|
|
2893
|
+
//# sourceMappingURL=solidpepper-solidpepper-flipbook.mjs.map
|