@solidpepper/solidpepper-flipbook 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { OnInit, AfterViewInit, OnDestroy, ElementRef, EventEmitter, ChangeDetectorRef, OnChanges, SimpleChanges } from '@angular/core';
|
|
3
3
|
import * as _solidpepper_solidpepper_icons from '@solidpepper/solidpepper-icons';
|
|
4
4
|
import { TranslateService } from '@ngx-translate/core';
|
|
@@ -17,8 +17,8 @@ declare class TranslationService {
|
|
|
17
17
|
code: string;
|
|
18
18
|
text: string;
|
|
19
19
|
}[];
|
|
20
|
-
static ɵfac:
|
|
21
|
-
static ɵprov:
|
|
20
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TranslationService, never>;
|
|
21
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TranslationService>;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
declare enum LoadingError {
|
|
@@ -27,12 +27,12 @@ declare enum LoadingError {
|
|
|
27
27
|
PAGE = "LOADER.ERRORS.PAGE"
|
|
28
28
|
}
|
|
29
29
|
declare class LoadingService {
|
|
30
|
-
readonly isLoading:
|
|
31
|
-
readonly hasError:
|
|
32
|
-
readonly errorKey:
|
|
33
|
-
readonly isCanvasLoading:
|
|
34
|
-
readonly canvasHasError:
|
|
35
|
-
readonly canvasErrorKey:
|
|
30
|
+
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
31
|
+
readonly hasError: _angular_core.WritableSignal<boolean>;
|
|
32
|
+
readonly errorKey: _angular_core.WritableSignal<LoadingError>;
|
|
33
|
+
readonly isCanvasLoading: _angular_core.WritableSignal<boolean>;
|
|
34
|
+
readonly canvasHasError: _angular_core.WritableSignal<boolean>;
|
|
35
|
+
readonly canvasErrorKey: _angular_core.WritableSignal<LoadingError>;
|
|
36
36
|
showLoader(): void;
|
|
37
37
|
hideLoader(): void;
|
|
38
38
|
showError(error: LoadingError): void;
|
|
@@ -40,8 +40,8 @@ declare class LoadingService {
|
|
|
40
40
|
hideCanvasLoader(): void;
|
|
41
41
|
showCanvasError(error: LoadingError): void;
|
|
42
42
|
reset(): void;
|
|
43
|
-
static ɵfac:
|
|
44
|
-
static ɵprov:
|
|
43
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LoadingService, never>;
|
|
44
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<LoadingService>;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
interface AppParams {
|
|
@@ -57,8 +57,8 @@ interface AppParams {
|
|
|
57
57
|
interactiveColor?: string;
|
|
58
58
|
}
|
|
59
59
|
declare class AppParamsService {
|
|
60
|
-
readonly params:
|
|
61
|
-
readonly pageGuid:
|
|
60
|
+
readonly params: _angular_core.WritableSignal<AppParams>;
|
|
61
|
+
readonly pageGuid: _angular_core.WritableSignal<string>;
|
|
62
62
|
setParams(params: Partial<AppParams>): void;
|
|
63
63
|
updateTemplateName(newName: string): void;
|
|
64
64
|
get guid(): string | undefined;
|
|
@@ -70,17 +70,18 @@ declare class AppParamsService {
|
|
|
70
70
|
get debug(): boolean;
|
|
71
71
|
get isDemo(): boolean;
|
|
72
72
|
get interactiveColor(): string | undefined;
|
|
73
|
-
static ɵfac:
|
|
74
|
-
static ɵprov:
|
|
73
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppParamsService, never>;
|
|
74
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AppParamsService>;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
declare class FlipbookService {
|
|
78
78
|
private http;
|
|
79
79
|
private appParams;
|
|
80
|
+
activePassword: string;
|
|
80
81
|
constructor(http: HttpClient, appParams: AppParamsService);
|
|
81
|
-
getFlipbookInfo(): Observable<any>;
|
|
82
|
-
static ɵfac:
|
|
83
|
-
static ɵprov:
|
|
82
|
+
getFlipbookInfo(password?: string): Observable<any>;
|
|
83
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlipbookService, never>;
|
|
84
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FlipbookService>;
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
interface InteractiveData {
|
|
@@ -124,14 +125,19 @@ declare class FlipbookDataService {
|
|
|
124
125
|
private http;
|
|
125
126
|
private flipbookService;
|
|
126
127
|
private loadingService;
|
|
128
|
+
private appParams;
|
|
127
129
|
private _pages;
|
|
128
130
|
pages$: BehaviorSubject<FlipbookPage[]>;
|
|
129
131
|
getSpreads(pages: FlipbookPage[]): FlipbookSpread[];
|
|
130
|
-
|
|
132
|
+
readonly authChallenge: _angular_core.WritableSignal<{
|
|
133
|
+
type: "password" | "organization";
|
|
134
|
+
isInvalid?: boolean;
|
|
135
|
+
} | null>;
|
|
136
|
+
constructor(http: HttpClient, flipbookService: FlipbookService, loadingService: LoadingService, appParams: AppParamsService);
|
|
131
137
|
/**
|
|
132
138
|
* Fetch flipbook info and initialize pages
|
|
133
139
|
*/
|
|
134
|
-
loadFlipbookInfo(): Promise<
|
|
140
|
+
loadFlipbookInfo(password?: string): Promise<boolean>;
|
|
135
141
|
/**
|
|
136
142
|
* Generates a set of test pages.
|
|
137
143
|
* @param count Number of pages to generate
|
|
@@ -144,8 +150,8 @@ declare class FlipbookDataService {
|
|
|
144
150
|
* @param pageIndex Index of the page (0-based)
|
|
145
151
|
*/
|
|
146
152
|
loadPageData(pageIndex: number): Promise<PageData | null>;
|
|
147
|
-
static ɵfac:
|
|
148
|
-
static ɵprov:
|
|
153
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlipbookDataService, never>;
|
|
154
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FlipbookDataService>;
|
|
149
155
|
}
|
|
150
156
|
|
|
151
157
|
declare class FlipbookViewerComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
@@ -232,8 +238,8 @@ declare class FlipbookViewerComponent implements OnInit, AfterViewInit, OnDestro
|
|
|
232
238
|
onFullscreenChange(): void;
|
|
233
239
|
resize(): void;
|
|
234
240
|
ngOnDestroy(): void;
|
|
235
|
-
static ɵfac:
|
|
236
|
-
static ɵcmp:
|
|
241
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlipbookViewerComponent, never>;
|
|
242
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FlipbookViewerComponent, "app-flipbook-viewer", never, {}, { "pagesLoaded": "pagesLoaded"; "pageChanged": "pageChanged"; "toggleSidebar": "toggleSidebar"; "toggleMap": "toggleMap"; "zoomChanged": "zoomChanged"; }, never, never, true, never>;
|
|
237
243
|
}
|
|
238
244
|
|
|
239
245
|
interface PDFConversionProgress {
|
|
@@ -250,17 +256,18 @@ declare class PDFService {
|
|
|
250
256
|
* @param onProgress Callback de progression
|
|
251
257
|
*/
|
|
252
258
|
convertPDFToImages(file: File, scale?: number, onProgress?: (progress: PDFConversionProgress) => void): Promise<string[]>;
|
|
253
|
-
static ɵfac:
|
|
254
|
-
static ɵprov:
|
|
259
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PDFService, never>;
|
|
260
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PDFService>;
|
|
255
261
|
}
|
|
256
262
|
|
|
257
263
|
declare class ThemeService {
|
|
258
|
-
isDarkMode:
|
|
264
|
+
isDarkMode: _angular_core.WritableSignal<boolean>;
|
|
259
265
|
constructor();
|
|
266
|
+
setDarkMode(isDark: boolean): void;
|
|
260
267
|
toggleTheme(): void;
|
|
261
268
|
private applyTheme;
|
|
262
|
-
static ɵfac:
|
|
263
|
-
static ɵprov:
|
|
269
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
270
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeService>;
|
|
264
271
|
}
|
|
265
272
|
|
|
266
273
|
declare class AppComponent implements OnInit, OnChanges, OnDestroy {
|
|
@@ -270,6 +277,7 @@ declare class AppComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
270
277
|
flipbookDataService: FlipbookDataService;
|
|
271
278
|
private pdfService;
|
|
272
279
|
themeService: ThemeService;
|
|
280
|
+
private http;
|
|
273
281
|
readonly spIconTags: _solidpepper_solidpepper_icons.SpIcon;
|
|
274
282
|
guid?: string;
|
|
275
283
|
alias?: string;
|
|
@@ -291,22 +299,38 @@ declare class AppComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
291
299
|
set isDemoAlias(v: any);
|
|
292
300
|
get isDemo(): boolean;
|
|
293
301
|
private _isDemo;
|
|
302
|
+
set nightModeInput(v: any);
|
|
303
|
+
set nightModeHyphen(v: any);
|
|
304
|
+
set nightModeLower(v: any);
|
|
305
|
+
set darkModeInput(v: any);
|
|
306
|
+
set darkModeHyphen(v: any);
|
|
307
|
+
get nightMode(): boolean;
|
|
308
|
+
private setNightMode;
|
|
294
309
|
private initializationCount;
|
|
295
310
|
exitEditor: EventEmitter<void>;
|
|
296
311
|
viewerRef: FlipbookViewerComponent;
|
|
297
|
-
isSafari:
|
|
298
|
-
isMobile:
|
|
312
|
+
isSafari: _angular_core.WritableSignal<boolean>;
|
|
313
|
+
isMobile: _angular_core.WritableSignal<boolean>;
|
|
299
314
|
isInitialized: boolean;
|
|
300
315
|
currentPageIndex: number;
|
|
301
316
|
showSidebar: boolean;
|
|
302
317
|
showMap: boolean;
|
|
303
318
|
scale: number;
|
|
304
|
-
showDemoModal:
|
|
305
|
-
showPricingModal:
|
|
306
|
-
isDemoLoading:
|
|
307
|
-
conversionProgress:
|
|
319
|
+
showDemoModal: _angular_core.WritableSignal<boolean>;
|
|
320
|
+
showPricingModal: _angular_core.WritableSignal<boolean>;
|
|
321
|
+
isDemoLoading: _angular_core.WritableSignal<boolean>;
|
|
322
|
+
conversionProgress: _angular_core.WritableSignal<number>;
|
|
308
323
|
private pricingTimer;
|
|
309
|
-
|
|
324
|
+
readonly spIconLock: _solidpepper_solidpepper_icons.SpIcon;
|
|
325
|
+
readonly spIconUser: _solidpepper_solidpepper_icons.SpIcon;
|
|
326
|
+
enteredPassword: _angular_core.WritableSignal<string>;
|
|
327
|
+
authLogin: _angular_core.WritableSignal<string>;
|
|
328
|
+
authPassword: _angular_core.WritableSignal<string>;
|
|
329
|
+
authError: _angular_core.WritableSignal<string | null>;
|
|
330
|
+
isSubmittingAuth: _angular_core.WritableSignal<boolean>;
|
|
331
|
+
constructor(translationService: TranslationService, appParamsService: AppParamsService, loadingService: LoadingService, flipbookDataService: FlipbookDataService, pdfService: PDFService, themeService: ThemeService, http: HttpClient);
|
|
332
|
+
unlockWithPassword(): Promise<void>;
|
|
333
|
+
loginOrganization(): void;
|
|
310
334
|
ngOnInit(): void;
|
|
311
335
|
ngOnDestroy(): void;
|
|
312
336
|
onResize(): void;
|
|
@@ -331,8 +355,8 @@ declare class AppComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
331
355
|
flipNext(): void;
|
|
332
356
|
flipEnd(): void;
|
|
333
357
|
goToPage(page: number): void;
|
|
334
|
-
static ɵfac:
|
|
335
|
-
static ɵcmp:
|
|
358
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppComponent, never>;
|
|
359
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppComponent, "solidpepper-flipbook", never, { "guid": { "alias": "guid"; "required": false; }; "alias": { "alias": "alias"; "required": false; }; "type": { "alias": "type"; "required": false; }; "apiUrl1": { "alias": "apiurl"; "required": false; }; "apiUrl2": { "alias": "api-url"; "required": false; }; "language": { "alias": "language"; "required": false; }; "disableModals": { "alias": "disableModals"; "required": false; }; "interactiveColor": { "alias": "interactiveColor"; "required": false; }; "interactiveColorHyphen": { "alias": "interactive-color"; "required": false; }; "linkColorInput": { "alias": "linkColor"; "required": false; }; "linkColorHyphen": { "alias": "link-color"; "required": false; }; "colorInput": { "alias": "color"; "required": false; }; "isDemo1": { "alias": "isDemo"; "required": false; }; "isDemo2": { "alias": "isdemo"; "required": false; }; "isDemo3": { "alias": "is-demo"; "required": false; }; "nightModeInput": { "alias": "nightMode"; "required": false; }; "nightModeHyphen": { "alias": "night-mode"; "required": false; }; "nightModeLower": { "alias": "nightmode"; "required": false; }; "darkModeInput": { "alias": "darkMode"; "required": false; }; "darkModeHyphen": { "alias": "dark-mode"; "required": false; }; }, { "exitEditor": "exitEditor"; }, never, never, true, never>;
|
|
336
360
|
}
|
|
337
361
|
|
|
338
362
|
export { AppParamsService, AppComponent as FlipbookComponent, FlipbookDataService };
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidpepper/solidpepper-flipbook",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Solidpepper - flipbook library",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@angular/common": "
|
|
7
|
-
"@angular/core": "
|
|
8
|
-
"@angular/platform-browser": "
|
|
9
|
-
"@ngx-translate/core": "
|
|
10
|
-
"rxjs": "
|
|
11
|
-
"page-flip": "
|
|
12
|
-
"pdfjs-dist": "
|
|
6
|
+
"@angular/common": ">=20.0.0",
|
|
7
|
+
"@angular/core": ">=20.0.0",
|
|
8
|
+
"@angular/platform-browser": ">=20.0.0",
|
|
9
|
+
"@ngx-translate/core": ">=15.0.0",
|
|
10
|
+
"rxjs": ">=7.0.0",
|
|
11
|
+
"page-flip": ">=2.0.7",
|
|
12
|
+
"pdfjs-dist": ">=4.0.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"tslib": "^2.3.0"
|