@solidpepper/solidpepper-flipbook 0.1.4 → 0.1.5
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,17 @@ 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
80
|
constructor(http: HttpClient, appParams: AppParamsService);
|
|
81
|
-
getFlipbookInfo(): Observable<any>;
|
|
82
|
-
static ɵfac:
|
|
83
|
-
static ɵprov:
|
|
81
|
+
getFlipbookInfo(password?: string): Observable<any>;
|
|
82
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlipbookService, never>;
|
|
83
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FlipbookService>;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
interface InteractiveData {
|
|
@@ -124,14 +124,19 @@ declare class FlipbookDataService {
|
|
|
124
124
|
private http;
|
|
125
125
|
private flipbookService;
|
|
126
126
|
private loadingService;
|
|
127
|
+
private appParams;
|
|
127
128
|
private _pages;
|
|
128
129
|
pages$: BehaviorSubject<FlipbookPage[]>;
|
|
129
130
|
getSpreads(pages: FlipbookPage[]): FlipbookSpread[];
|
|
130
|
-
|
|
131
|
+
readonly authChallenge: _angular_core.WritableSignal<{
|
|
132
|
+
type: "password" | "organization";
|
|
133
|
+
isInvalid?: boolean;
|
|
134
|
+
} | null>;
|
|
135
|
+
constructor(http: HttpClient, flipbookService: FlipbookService, loadingService: LoadingService, appParams: AppParamsService);
|
|
131
136
|
/**
|
|
132
137
|
* Fetch flipbook info and initialize pages
|
|
133
138
|
*/
|
|
134
|
-
loadFlipbookInfo(): Promise<
|
|
139
|
+
loadFlipbookInfo(password?: string): Promise<boolean>;
|
|
135
140
|
/**
|
|
136
141
|
* Generates a set of test pages.
|
|
137
142
|
* @param count Number of pages to generate
|
|
@@ -144,8 +149,8 @@ declare class FlipbookDataService {
|
|
|
144
149
|
* @param pageIndex Index of the page (0-based)
|
|
145
150
|
*/
|
|
146
151
|
loadPageData(pageIndex: number): Promise<PageData | null>;
|
|
147
|
-
static ɵfac:
|
|
148
|
-
static ɵprov:
|
|
152
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlipbookDataService, never>;
|
|
153
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<FlipbookDataService>;
|
|
149
154
|
}
|
|
150
155
|
|
|
151
156
|
declare class FlipbookViewerComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
@@ -232,8 +237,8 @@ declare class FlipbookViewerComponent implements OnInit, AfterViewInit, OnDestro
|
|
|
232
237
|
onFullscreenChange(): void;
|
|
233
238
|
resize(): void;
|
|
234
239
|
ngOnDestroy(): void;
|
|
235
|
-
static ɵfac:
|
|
236
|
-
static ɵcmp:
|
|
240
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlipbookViewerComponent, never>;
|
|
241
|
+
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
242
|
}
|
|
238
243
|
|
|
239
244
|
interface PDFConversionProgress {
|
|
@@ -250,17 +255,17 @@ declare class PDFService {
|
|
|
250
255
|
* @param onProgress Callback de progression
|
|
251
256
|
*/
|
|
252
257
|
convertPDFToImages(file: File, scale?: number, onProgress?: (progress: PDFConversionProgress) => void): Promise<string[]>;
|
|
253
|
-
static ɵfac:
|
|
254
|
-
static ɵprov:
|
|
258
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PDFService, never>;
|
|
259
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PDFService>;
|
|
255
260
|
}
|
|
256
261
|
|
|
257
262
|
declare class ThemeService {
|
|
258
|
-
isDarkMode:
|
|
263
|
+
isDarkMode: _angular_core.WritableSignal<boolean>;
|
|
259
264
|
constructor();
|
|
260
265
|
toggleTheme(): void;
|
|
261
266
|
private applyTheme;
|
|
262
|
-
static ɵfac:
|
|
263
|
-
static ɵprov:
|
|
267
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeService, never>;
|
|
268
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeService>;
|
|
264
269
|
}
|
|
265
270
|
|
|
266
271
|
declare class AppComponent implements OnInit, OnChanges, OnDestroy {
|
|
@@ -270,6 +275,7 @@ declare class AppComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
270
275
|
flipbookDataService: FlipbookDataService;
|
|
271
276
|
private pdfService;
|
|
272
277
|
themeService: ThemeService;
|
|
278
|
+
private http;
|
|
273
279
|
readonly spIconTags: _solidpepper_solidpepper_icons.SpIcon;
|
|
274
280
|
guid?: string;
|
|
275
281
|
alias?: string;
|
|
@@ -294,19 +300,28 @@ declare class AppComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
294
300
|
private initializationCount;
|
|
295
301
|
exitEditor: EventEmitter<void>;
|
|
296
302
|
viewerRef: FlipbookViewerComponent;
|
|
297
|
-
isSafari:
|
|
298
|
-
isMobile:
|
|
303
|
+
isSafari: _angular_core.WritableSignal<boolean>;
|
|
304
|
+
isMobile: _angular_core.WritableSignal<boolean>;
|
|
299
305
|
isInitialized: boolean;
|
|
300
306
|
currentPageIndex: number;
|
|
301
307
|
showSidebar: boolean;
|
|
302
308
|
showMap: boolean;
|
|
303
309
|
scale: number;
|
|
304
|
-
showDemoModal:
|
|
305
|
-
showPricingModal:
|
|
306
|
-
isDemoLoading:
|
|
307
|
-
conversionProgress:
|
|
310
|
+
showDemoModal: _angular_core.WritableSignal<boolean>;
|
|
311
|
+
showPricingModal: _angular_core.WritableSignal<boolean>;
|
|
312
|
+
isDemoLoading: _angular_core.WritableSignal<boolean>;
|
|
313
|
+
conversionProgress: _angular_core.WritableSignal<number>;
|
|
308
314
|
private pricingTimer;
|
|
309
|
-
|
|
315
|
+
readonly spIconLock: _solidpepper_solidpepper_icons.SpIcon;
|
|
316
|
+
readonly spIconUser: _solidpepper_solidpepper_icons.SpIcon;
|
|
317
|
+
enteredPassword: _angular_core.WritableSignal<string>;
|
|
318
|
+
authLogin: _angular_core.WritableSignal<string>;
|
|
319
|
+
authPassword: _angular_core.WritableSignal<string>;
|
|
320
|
+
authError: _angular_core.WritableSignal<string | null>;
|
|
321
|
+
isSubmittingAuth: _angular_core.WritableSignal<boolean>;
|
|
322
|
+
constructor(translationService: TranslationService, appParamsService: AppParamsService, loadingService: LoadingService, flipbookDataService: FlipbookDataService, pdfService: PDFService, themeService: ThemeService, http: HttpClient);
|
|
323
|
+
unlockWithPassword(): Promise<void>;
|
|
324
|
+
loginOrganization(): void;
|
|
310
325
|
ngOnInit(): void;
|
|
311
326
|
ngOnDestroy(): void;
|
|
312
327
|
onResize(): void;
|
|
@@ -331,8 +346,8 @@ declare class AppComponent implements OnInit, OnChanges, OnDestroy {
|
|
|
331
346
|
flipNext(): void;
|
|
332
347
|
flipEnd(): void;
|
|
333
348
|
goToPage(page: number): void;
|
|
334
|
-
static ɵfac:
|
|
335
|
-
static ɵcmp:
|
|
349
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppComponent, never>;
|
|
350
|
+
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; }; }, { "exitEditor": "exitEditor"; }, never, never, true, never>;
|
|
336
351
|
}
|
|
337
352
|
|
|
338
353
|
export { AppParamsService, AppComponent as FlipbookComponent, FlipbookDataService };
|