@solidpepper/solidpepper-flipbook 0.1.2 → 0.1.4

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,5 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { OnInit, AfterViewInit, OnDestroy, ElementRef, EventEmitter, ChangeDetectorRef, OnChanges, SimpleChanges } from '@angular/core';
3
+ import * as _solidpepper_solidpepper_icons from '@solidpepper/solidpepper-icons';
3
4
  import { TranslateService } from '@ngx-translate/core';
4
5
  import { PageFlip } from 'page-flip';
5
6
  import { HttpClient } from '@angular/common/http';
@@ -53,6 +54,7 @@ interface AppParams {
53
54
  documentData?: any[];
54
55
  debug?: boolean;
55
56
  isDemo?: boolean;
57
+ interactiveColor?: string;
56
58
  }
57
59
  declare class AppParamsService {
58
60
  readonly params: i0.WritableSignal<AppParams>;
@@ -67,6 +69,7 @@ declare class AppParamsService {
67
69
  get isDocument(): boolean;
68
70
  get debug(): boolean;
69
71
  get isDemo(): boolean;
72
+ get interactiveColor(): string | undefined;
70
73
  static ɵfac: i0.ɵɵFactoryDeclaration<AppParamsService, never>;
71
74
  static ɵprov: i0.ɵɵInjectableDeclaration<AppParamsService>;
72
75
  }
@@ -81,16 +84,22 @@ declare class FlipbookService {
81
84
  }
82
85
 
83
86
  interface InteractiveData {
84
- type: 'link' | 'product';
87
+ type: 'link' | 'product' | 'page';
88
+ shape?: 'rect' | 'point';
85
89
  x: number;
86
90
  y: number;
87
91
  width: number;
88
92
  height: number;
89
93
  tooltip?: string;
90
94
  src?: string;
95
+ linkType?: 'url' | 'page' | 'dynamic';
96
+ pageTarget?: number;
91
97
  showBox?: boolean;
92
98
  clickBox?: boolean;
93
99
  showIcon?: boolean;
100
+ color?: string;
101
+ icon?: string;
102
+ size?: 'sm' | 'md' | 'lg' | number;
94
103
  'icon-align'?: 'start' | 'center' | 'end';
95
104
  'icon-justify'?: 'start' | 'center' | 'end';
96
105
  }
@@ -106,12 +115,18 @@ interface FlipbookPage {
106
115
  pageDatasJson: string;
107
116
  pageData?: PageData;
108
117
  }
118
+ interface FlipbookSpread {
119
+ spreadIndex: number;
120
+ leftPage?: FlipbookPage;
121
+ rightPage?: FlipbookPage;
122
+ }
109
123
  declare class FlipbookDataService {
110
124
  private http;
111
125
  private flipbookService;
112
126
  private loadingService;
113
127
  private _pages;
114
128
  pages$: BehaviorSubject<FlipbookPage[]>;
129
+ getSpreads(pages: FlipbookPage[]): FlipbookSpread[];
115
130
  constructor(http: HttpClient, flipbookService: FlipbookService, loadingService: LoadingService);
116
131
  /**
117
132
  * Fetch flipbook info and initialize pages
@@ -137,6 +152,7 @@ declare class FlipbookViewerComponent implements OnInit, AfterViewInit, OnDestro
137
152
  private dataService;
138
153
  private paramsService;
139
154
  private cdr;
155
+ readonly spIconCollapse: _solidpepper_solidpepper_icons.SpIcon;
140
156
  pages: any[];
141
157
  images: string[];
142
158
  flipbookRef: ElementRef<HTMLDivElement>;
@@ -187,6 +203,9 @@ declare class FlipbookViewerComponent implements OnInit, AfterViewInit, OnDestro
187
203
  flipEnd(): void;
188
204
  goToPage(pageNumber: number): void;
189
205
  getCurrentPageIndex(): number;
206
+ get isPortrait(): boolean;
207
+ get isSpreadMode(): boolean;
208
+ get hasSlider(): boolean;
190
209
  get isDebugVisible(): boolean;
191
210
  get debugInfo(): string;
192
211
  get isZoomed(): boolean;
@@ -197,6 +216,7 @@ declare class FlipbookViewerComponent implements OnInit, AfterViewInit, OnDestro
197
216
  resetZoom(): void;
198
217
  onZoomIn(): void;
199
218
  onZoomOut(): void;
219
+ setZoom(targetScale: number): void;
200
220
  private applyZoomAt;
201
221
  startDrag(event: MouseEvent): void;
202
222
  onDrag(event: MouseEvent): void;
@@ -208,6 +228,8 @@ declare class FlipbookViewerComponent implements OnInit, AfterViewInit, OnDestro
208
228
  handleOverlayStart(event: MouseEvent | TouchEvent): void;
209
229
  private isMouseEvent;
210
230
  handleKeyDown(event: KeyboardEvent): void;
231
+ toggleFullscreen(): void;
232
+ onFullscreenChange(): void;
211
233
  resize(): void;
212
234
  ngOnDestroy(): void;
213
235
  static ɵfac: i0.ɵɵFactoryDeclaration<FlipbookViewerComponent, never>;
@@ -245,9 +267,10 @@ declare class AppComponent implements OnInit, OnChanges, OnDestroy {
245
267
  private translationService;
246
268
  private appParamsService;
247
269
  loadingService: LoadingService;
248
- private flipbookDataService;
270
+ flipbookDataService: FlipbookDataService;
249
271
  private pdfService;
250
272
  themeService: ThemeService;
273
+ readonly spIconTags: _solidpepper_solidpepper_icons.SpIcon;
251
274
  guid?: string;
252
275
  alias?: string;
253
276
  type?: string;
@@ -257,6 +280,11 @@ declare class AppComponent implements OnInit, OnChanges, OnDestroy {
257
280
  private _apiUrl;
258
281
  language: string;
259
282
  disableModals: boolean;
283
+ interactiveColor?: string;
284
+ set interactiveColorHyphen(v: string);
285
+ set linkColorInput(v: string);
286
+ set linkColorHyphen(v: string);
287
+ set colorInput(v: string);
260
288
  set isDemo1(v: any);
261
289
  set isDemo2(v: any);
262
290
  set isDemo3(v: any);
@@ -295,15 +323,17 @@ declare class AppComponent implements OnInit, OnChanges, OnDestroy {
295
323
  onResetZoom(): void;
296
324
  onZoomIn(): void;
297
325
  onZoomOut(): void;
326
+ onSetZoom(targetScale: number): void;
298
327
  toggleSidebar(): void;
328
+ toggleMap(): void;
299
329
  flipStart(): void;
300
330
  flipPrev(): void;
301
331
  flipNext(): void;
302
332
  flipEnd(): void;
303
333
  goToPage(page: number): void;
304
334
  static ɵfac: i0.ɵɵFactoryDeclaration<AppComponent, never>;
305
- static ɵcmp: i0.ɵɵ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; }; "isDemo1": { "alias": "isDemo"; "required": false; }; "isDemo2": { "alias": "isdemo"; "required": false; }; "isDemo3": { "alias": "is-demo"; "required": false; }; }, { "exitEditor": "exitEditor"; }, never, never, true, never>;
335
+ static ɵcmp: i0.ɵɵ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>;
306
336
  }
307
337
 
308
338
  export { AppParamsService, AppComponent as FlipbookComponent, FlipbookDataService };
309
- export type { AppParams, FlipbookPage, InteractiveData, PageData };
339
+ export type { AppParams, FlipbookPage, FlipbookSpread, InteractiveData, PageData };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidpepper/solidpepper-flipbook",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Solidpepper - flipbook library",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^20.3.12",