@solidpepper/solidpepper-upload-youbooky 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.
package/index.d.ts ADDED
@@ -0,0 +1,415 @@
1
+ import * as _solidpepper_solidpepper_icons from '@solidpepper/solidpepper-icons';
2
+ import * as i0 from '@angular/core';
3
+ import { OnInit, OnDestroy, OnChanges, EventEmitter, ElementRef, SimpleChanges } from '@angular/core';
4
+ import { FlipbookComponent } from '@solidpepper/solidpepper-flipbook';
5
+
6
+ type YoubookyUploadStep = 'drop' | 'processing' | 'preview' | 'auth' | 'importing' | 'completed';
7
+ declare class SolidpepperUploadYoubookyComponent implements OnInit, OnDestroy, OnChanges {
8
+ readonly spIconPdf: _solidpepper_solidpepper_icons.SpIcon;
9
+ readonly spIconUpload: _solidpepper_solidpepper_icons.SpIcon;
10
+ readonly spIconUser: _solidpepper_solidpepper_icons.SpIcon;
11
+ readonly spIconBookOpen: _solidpepper_solidpepper_icons.SpIcon;
12
+ readonly spIconCheck: _solidpepper_solidpepper_icons.SpIcon;
13
+ parentFolder: string;
14
+ language: string;
15
+ initialProjectName: string;
16
+ isModal: boolean;
17
+ redirectOnComplete: boolean;
18
+ apiUrl: string;
19
+ flipbookBaseUrl: string;
20
+ reviewerBaseUrl: string;
21
+ isPim: boolean;
22
+ alias: string;
23
+ token: string;
24
+ completed: EventEmitter<{
25
+ assetGuid: string;
26
+ projectName: string;
27
+ }>;
28
+ cancelled: EventEmitter<void>;
29
+ stepChange: EventEmitter<YoubookyUploadStep>;
30
+ error: EventEmitter<any>;
31
+ loginSuccess: EventEmitter<{
32
+ user: any;
33
+ token: string;
34
+ }>;
35
+ registerSuccess: EventEmitter<{
36
+ user: any;
37
+ token: string;
38
+ }>;
39
+ flipbookRef?: FlipbookComponent;
40
+ fileInput?: ElementRef<HTMLInputElement>;
41
+ private cdr;
42
+ private router;
43
+ private http;
44
+ private documentsService;
45
+ private settingsService;
46
+ private usersService;
47
+ private translateService;
48
+ private flipbookDataService;
49
+ currentStep: YoubookyUploadStep;
50
+ projectName: string;
51
+ pdfFile: File | null;
52
+ pdfPreviews: {
53
+ url: string;
54
+ width: number;
55
+ height: number;
56
+ }[];
57
+ isLoadingPdf: boolean;
58
+ pdfProgress: number;
59
+ useHighQuality: boolean;
60
+ pdfScale: number;
61
+ isPdfProcessingCancelled: boolean;
62
+ isCreateDocumentLoading: boolean;
63
+ isCreateDocumentSuccess: boolean;
64
+ isCreateDocumentError: boolean;
65
+ uploadedPagesSet: Set<number>;
66
+ uploadingPageIndex: number | null;
67
+ pdfUploadStatusText: string;
68
+ createdAssetGuid: string | null;
69
+ serverFlipbookUrl: string;
70
+ serverReviewerUrl: string;
71
+ copiedFlipbook: boolean;
72
+ copiedReviewer: boolean;
73
+ authMode: 'otp' | 'login';
74
+ authEmail: string;
75
+ authLogin: string;
76
+ authPassword: string;
77
+ showPassword: boolean;
78
+ isAuthLoading: boolean;
79
+ authError: string;
80
+ connectedUser: any;
81
+ connectedUserToken: string;
82
+ otpSent: boolean;
83
+ otpCode: string;
84
+ otpCountdown: number;
85
+ private otpTimerInterval;
86
+ otpResendCooldown: number;
87
+ private otpResendInterval;
88
+ totalFlipPages: number;
89
+ isFlipbookReady: boolean;
90
+ constructor();
91
+ ngOnInit(): void;
92
+ ngOnChanges(changes: SimpleChanges): void;
93
+ ngOnDestroy(): void;
94
+ setStep(step: YoubookyUploadStep): void;
95
+ onDragOver(event: DragEvent): void;
96
+ onDrop(event: DragEvent): void;
97
+ onPdfSelected(event: any): void;
98
+ handleFileSelected(file: File): void;
99
+ resetSelection(): void;
100
+ updatePdfPreviews(): Promise<void>;
101
+ toggleHighQuality(): Promise<void>;
102
+ private renderPdfPreviews;
103
+ private generateSvgContent;
104
+ private getEffectiveApiUrl;
105
+ get effectiveAlias(): string;
106
+ syncToken(token: string): void;
107
+ initAuthSession(): void;
108
+ get connectedUserDisplayName(): string;
109
+ hasValidToken(): boolean;
110
+ getEffectiveToken(): string;
111
+ logout(): void;
112
+ get otpCountdownDisplay(): string;
113
+ proceedFromPreview(): void;
114
+ sendVerificationCode(): Promise<void>;
115
+ startOtpTimer(): void;
116
+ startOtpResendCooldown(seconds?: number): void;
117
+ resetOtp(): void;
118
+ verifyCodeAndProceed(): Promise<void>;
119
+ registerLead(): Promise<void>;
120
+ submitLogin(): Promise<void>;
121
+ private importDocumentFiles;
122
+ private translate;
123
+ importDocumentFromPdf(): Promise<void>;
124
+ private scrollToActivePage;
125
+ fetchDocumentLinks(assetGuid: string): Promise<void>;
126
+ get flipbookUrl(): string;
127
+ get reviewerUrl(): string;
128
+ copyLink(type: 'flipbook' | 'reviewer'): void;
129
+ openLink(type: 'flipbook' | 'reviewer'): void;
130
+ goToDetail(): void;
131
+ static ɵfac: i0.ɵɵFactoryDeclaration<SolidpepperUploadYoubookyComponent, never>;
132
+ static ɵcmp: i0.ɵɵComponentDeclaration<SolidpepperUploadYoubookyComponent, "solidpepper-upload-youbooky", never, { "parentFolder": { "alias": "parentFolder"; "required": false; }; "language": { "alias": "language"; "required": false; }; "initialProjectName": { "alias": "initialProjectName"; "required": false; }; "isModal": { "alias": "isModal"; "required": false; }; "redirectOnComplete": { "alias": "redirectOnComplete"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "flipbookBaseUrl": { "alias": "flipbookBaseUrl"; "required": false; }; "reviewerBaseUrl": { "alias": "reviewerBaseUrl"; "required": false; }; "isPim": { "alias": "isPim"; "required": false; }; "alias": { "alias": "alias"; "required": false; }; "token": { "alias": "token"; "required": false; }; }, { "completed": "completed"; "cancelled": "cancelled"; "stepChange": "stepChange"; "error": "error"; "loginSuccess": "loginSuccess"; "registerSuccess": "registerSuccess"; }, never, never, true, never>;
133
+ }
134
+
135
+ declare const _default$2: {
136
+ media: {
137
+ "dam-documents": {
138
+ "dam-documents-list": {
139
+ CLICKORDRAGPDF: string;
140
+ SUPPORTEDFORMAT: string;
141
+ PROCESSING: string;
142
+ PLEASE_WAIT: string;
143
+ DOES_IT_SUIT_YOU: string;
144
+ SUIT_YOU_DESC: string;
145
+ IMPORT_HIGH_QUALITY: string;
146
+ NEXT_STEP: string;
147
+ CHANGE_FILE: string;
148
+ IMPORT_PROGRESS_TITLE: string;
149
+ IMPORT_PROGRESS_SUBTITLE: string;
150
+ TOTAL_PROGRESS: string;
151
+ CREATING_DOCUMENT: string;
152
+ UPLOADING_PAGES: string;
153
+ UPLOADING_PAGE_PROGRESS: string;
154
+ REDIRECTING: string;
155
+ IMPORT_SUCCESS: string;
156
+ PAGE: string;
157
+ PREVIEW: string;
158
+ STATUS_COMPLETED: string;
159
+ STATUS_IN_PROGRESS: string;
160
+ STATUS_WAITING: string;
161
+ SUCCESS_TITLE: string;
162
+ FLIPBOOK_CARD_TITLE: string;
163
+ FLIPBOOK_CARD_DESC: string;
164
+ REVIEWER_CARD_TITLE: string;
165
+ REVIEWER_CARD_DESC: string;
166
+ OPEN_LINK: string;
167
+ COPY_LINK: string;
168
+ LINK_COPIED: string;
169
+ CREATE_ANOTHER: string;
170
+ GO_TO_DETAIL: string;
171
+ };
172
+ };
173
+ };
174
+ publications: {
175
+ "publications-listing": {
176
+ PROJECT_NAME: string;
177
+ NEW_PROJECT_PLACEHOLDER: string;
178
+ };
179
+ };
180
+ home: {
181
+ youbooky: {
182
+ title: string;
183
+ };
184
+ };
185
+ REVIEWER: {
186
+ PAGES: string;
187
+ };
188
+ auth: {
189
+ LOGGED_IN_AS: string;
190
+ CONTINUE_IMPORT: string;
191
+ CHANGE_ACCOUNT: string;
192
+ LOGOUT: string;
193
+ NO_ACCOUNT_TITLE: string;
194
+ NO_ACCOUNT_SUBTITLE: string;
195
+ LOGIN_TITLE: string;
196
+ LOGIN_SUBTITLE: string;
197
+ EMAIL: string;
198
+ EMAIL_PLACEHOLDER: string;
199
+ PASSWORD: string;
200
+ PASSWORD_PLACEHOLDER: string;
201
+ IDENTIFIER: string;
202
+ IDENTIFIER_PLACEHOLDER: string;
203
+ SUBMIT_LOGIN: string;
204
+ SUBMIT_REGISTER: string;
205
+ HAVE_ACCOUNT_LINK: string;
206
+ DONT_HAVE_ACCOUNT_LINK: string;
207
+ BACK_TO_PREVIEW: string;
208
+ AUTH_ERROR: string;
209
+ REGISTER_ERROR: string;
210
+ EMAIL_REQUIRED: string;
211
+ PASSWORD_REQUIRED: string;
212
+ SEND_CODE: string;
213
+ EMAIL_CODE_SENT: string;
214
+ ENTER_CODE: string;
215
+ CODE_PLACEHOLDER: string;
216
+ VERIFY_AND_IMPORT: string;
217
+ RESEND_CODE: string;
218
+ RESEND_IN: string;
219
+ RATE_LIMITED: string;
220
+ EXPIRES_IN: string;
221
+ CODE_EXPIRED: string;
222
+ INVALID_CODE: string;
223
+ CHANGE_EMAIL: string;
224
+ CODE_REQUIRED: string;
225
+ };
226
+ };
227
+
228
+ declare const _default$1: {
229
+ media: {
230
+ "dam-documents": {
231
+ "dam-documents-list": {
232
+ CLICKORDRAGPDF: string;
233
+ SUPPORTEDFORMAT: string;
234
+ PROCESSING: string;
235
+ PLEASE_WAIT: string;
236
+ DOES_IT_SUIT_YOU: string;
237
+ SUIT_YOU_DESC: string;
238
+ IMPORT_HIGH_QUALITY: string;
239
+ NEXT_STEP: string;
240
+ CHANGE_FILE: string;
241
+ IMPORT_PROGRESS_TITLE: string;
242
+ IMPORT_PROGRESS_SUBTITLE: string;
243
+ TOTAL_PROGRESS: string;
244
+ CREATING_DOCUMENT: string;
245
+ UPLOADING_PAGES: string;
246
+ UPLOADING_PAGE_PROGRESS: string;
247
+ REDIRECTING: string;
248
+ IMPORT_SUCCESS: string;
249
+ PAGE: string;
250
+ PREVIEW: string;
251
+ STATUS_COMPLETED: string;
252
+ STATUS_IN_PROGRESS: string;
253
+ STATUS_WAITING: string;
254
+ SUCCESS_TITLE: string;
255
+ FLIPBOOK_CARD_TITLE: string;
256
+ FLIPBOOK_CARD_DESC: string;
257
+ REVIEWER_CARD_TITLE: string;
258
+ REVIEWER_CARD_DESC: string;
259
+ OPEN_LINK: string;
260
+ COPY_LINK: string;
261
+ LINK_COPIED: string;
262
+ CREATE_ANOTHER: string;
263
+ GO_TO_DETAIL: string;
264
+ };
265
+ };
266
+ };
267
+ publications: {
268
+ "publications-listing": {
269
+ PROJECT_NAME: string;
270
+ NEW_PROJECT_PLACEHOLDER: string;
271
+ };
272
+ };
273
+ home: {
274
+ youbooky: {
275
+ title: string;
276
+ };
277
+ };
278
+ REVIEWER: {
279
+ PAGES: string;
280
+ };
281
+ auth: {
282
+ LOGGED_IN_AS: string;
283
+ CONTINUE_IMPORT: string;
284
+ CHANGE_ACCOUNT: string;
285
+ LOGOUT: string;
286
+ NO_ACCOUNT_TITLE: string;
287
+ NO_ACCOUNT_SUBTITLE: string;
288
+ LOGIN_TITLE: string;
289
+ LOGIN_SUBTITLE: string;
290
+ EMAIL: string;
291
+ EMAIL_PLACEHOLDER: string;
292
+ PASSWORD: string;
293
+ PASSWORD_PLACEHOLDER: string;
294
+ IDENTIFIER: string;
295
+ IDENTIFIER_PLACEHOLDER: string;
296
+ SUBMIT_LOGIN: string;
297
+ SUBMIT_REGISTER: string;
298
+ HAVE_ACCOUNT_LINK: string;
299
+ DONT_HAVE_ACCOUNT_LINK: string;
300
+ BACK_TO_PREVIEW: string;
301
+ AUTH_ERROR: string;
302
+ REGISTER_ERROR: string;
303
+ EMAIL_REQUIRED: string;
304
+ PASSWORD_REQUIRED: string;
305
+ SEND_CODE: string;
306
+ EMAIL_CODE_SENT: string;
307
+ ENTER_CODE: string;
308
+ CODE_PLACEHOLDER: string;
309
+ VERIFY_AND_IMPORT: string;
310
+ RESEND_CODE: string;
311
+ RESEND_IN: string;
312
+ RATE_LIMITED: string;
313
+ EXPIRES_IN: string;
314
+ CODE_EXPIRED: string;
315
+ INVALID_CODE: string;
316
+ CHANGE_EMAIL: string;
317
+ CODE_REQUIRED: string;
318
+ };
319
+ };
320
+
321
+ declare const _default: {
322
+ media: {
323
+ "dam-documents": {
324
+ "dam-documents-list": {
325
+ CLICKORDRAGPDF: string;
326
+ SUPPORTEDFORMAT: string;
327
+ PROCESSING: string;
328
+ PLEASE_WAIT: string;
329
+ DOES_IT_SUIT_YOU: string;
330
+ SUIT_YOU_DESC: string;
331
+ IMPORT_HIGH_QUALITY: string;
332
+ NEXT_STEP: string;
333
+ CHANGE_FILE: string;
334
+ IMPORT_PROGRESS_TITLE: string;
335
+ IMPORT_PROGRESS_SUBTITLE: string;
336
+ TOTAL_PROGRESS: string;
337
+ CREATING_DOCUMENT: string;
338
+ UPLOADING_PAGES: string;
339
+ UPLOADING_PAGE_PROGRESS: string;
340
+ REDIRECTING: string;
341
+ IMPORT_SUCCESS: string;
342
+ PAGE: string;
343
+ PREVIEW: string;
344
+ STATUS_COMPLETED: string;
345
+ STATUS_IN_PROGRESS: string;
346
+ STATUS_WAITING: string;
347
+ SUCCESS_TITLE: string;
348
+ FLIPBOOK_CARD_TITLE: string;
349
+ FLIPBOOK_CARD_DESC: string;
350
+ REVIEWER_CARD_TITLE: string;
351
+ REVIEWER_CARD_DESC: string;
352
+ OPEN_LINK: string;
353
+ COPY_LINK: string;
354
+ LINK_COPIED: string;
355
+ CREATE_ANOTHER: string;
356
+ GO_TO_DETAIL: string;
357
+ };
358
+ };
359
+ };
360
+ publications: {
361
+ "publications-listing": {
362
+ PROJECT_NAME: string;
363
+ NEW_PROJECT_PLACEHOLDER: string;
364
+ };
365
+ };
366
+ home: {
367
+ youbooky: {
368
+ title: string;
369
+ };
370
+ };
371
+ REVIEWER: {
372
+ PAGES: string;
373
+ };
374
+ auth: {
375
+ LOGGED_IN_AS: string;
376
+ CONTINUE_IMPORT: string;
377
+ CHANGE_ACCOUNT: string;
378
+ LOGOUT: string;
379
+ NO_ACCOUNT_TITLE: string;
380
+ NO_ACCOUNT_SUBTITLE: string;
381
+ LOGIN_TITLE: string;
382
+ LOGIN_SUBTITLE: string;
383
+ EMAIL: string;
384
+ EMAIL_PLACEHOLDER: string;
385
+ PASSWORD: string;
386
+ PASSWORD_PLACEHOLDER: string;
387
+ IDENTIFIER: string;
388
+ IDENTIFIER_PLACEHOLDER: string;
389
+ SUBMIT_LOGIN: string;
390
+ SUBMIT_REGISTER: string;
391
+ HAVE_ACCOUNT_LINK: string;
392
+ DONT_HAVE_ACCOUNT_LINK: string;
393
+ BACK_TO_PREVIEW: string;
394
+ AUTH_ERROR: string;
395
+ REGISTER_ERROR: string;
396
+ EMAIL_REQUIRED: string;
397
+ PASSWORD_REQUIRED: string;
398
+ SEND_CODE: string;
399
+ EMAIL_CODE_SENT: string;
400
+ ENTER_CODE: string;
401
+ CODE_PLACEHOLDER: string;
402
+ VERIFY_AND_IMPORT: string;
403
+ RESEND_CODE: string;
404
+ RESEND_IN: string;
405
+ RATE_LIMITED: string;
406
+ EXPIRES_IN: string;
407
+ CODE_EXPIRED: string;
408
+ INVALID_CODE: string;
409
+ CHANGE_EMAIL: string;
410
+ CODE_REQUIRED: string;
411
+ };
412
+ };
413
+
414
+ export { SolidpepperUploadYoubookyComponent, _default$1 as en, _default as es, _default$2 as fr };
415
+ export type { YoubookyUploadStep };
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@solidpepper/solidpepper-upload-youbooky",
3
+ "version": "0.1.0",
4
+ "description": "Solidpepper - YouBooky PDF import and upload library component",
5
+ "peerDependencies": {
6
+ "@angular/common": ">=17.0.0",
7
+ "@angular/core": ">=17.0.0",
8
+ "@angular/forms": ">=17.0.0",
9
+ "@angular/router": ">=17.0.0",
10
+ "@ngx-translate/core": ">=16.0.0",
11
+ "@solidpepper/solidpepper-flipbook": ">=0.0.1",
12
+ "@solidpepper/solidpepper-icons": ">=0.0.1",
13
+ "@solidpepper/solidpepper-service": ">=0.0.1",
14
+ "rxjs": ">=7.0.0",
15
+ "pdfjs-dist": "^4.8.69"
16
+ },
17
+ "dependencies": {
18
+ "tslib": "^2.3.0"
19
+ },
20
+ "sideEffects": false,
21
+ "module": "fesm2022/solidpepper-solidpepper-upload-youbooky.mjs",
22
+ "typings": "index.d.ts",
23
+ "exports": {
24
+ "./package.json": {
25
+ "default": "./package.json"
26
+ },
27
+ ".": {
28
+ "types": "./index.d.ts",
29
+ "default": "./fesm2022/solidpepper-solidpepper-upload-youbooky.mjs"
30
+ }
31
+ }
32
+ }