epub-flow 0.0.1

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,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class EpubLoaderComponent {
3
+ loadPercentage: import("@angular/core").InputSignal<any>;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpubLoaderComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<EpubLoaderComponent, "app-epub-loader", never, { "loadPercentage": { "alias": "loadPercentage"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
6
+ }
@@ -0,0 +1,22 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./reader-main/reader-main.component";
3
+ import * as i2 from "./add-notes/add-notes.component";
4
+ import * as i3 from "./epub-common-popup/epub-common-popup.component";
5
+ import * as i4 from "./chapterlist/chapterlist.component";
6
+ import * as i5 from "./epub-loader/epub-loader.component";
7
+ import * as i6 from "@angular/common";
8
+ import * as i7 from "@angular/router";
9
+ import * as i8 from "ngx-editor";
10
+ import * as i9 from "@angular/forms";
11
+ import * as i10 from "primeng/tabview";
12
+ import * as i11 from "primeng/progressbar";
13
+ import * as i12 from "primeng/table";
14
+ import * as i13 from "primeng/button";
15
+ import * as i14 from "./shared-mocks/no-data-found.component";
16
+ import * as i15 from "@angular/common/http";
17
+ import * as i16 from "./shared-mocks/skeleton-loader.component";
18
+ export declare class EpubReaderModule {
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpubReaderModule, never>;
20
+ static ɵmod: i0.ɵɵNgModuleDeclaration<EpubReaderModule, [typeof i1.ReaderMainComponent, typeof i2.AddNotesComponent, typeof i3.EpubCommonPopupComponent, typeof i4.ChapterlistComponent, typeof i5.EpubLoaderComponent], [typeof i6.CommonModule, typeof i7.RouterModule, typeof i8.NgxEditorModule, typeof i9.FormsModule, typeof i9.ReactiveFormsModule, typeof i10.TabViewModule, typeof i11.ProgressBarModule, typeof i12.TableModule, typeof i13.ButtonModule, typeof i14.NoDataFoundComponent, typeof i15.HttpClientModule, typeof i16.SkeletonLoaderComponent], [typeof i1.ReaderMainComponent, typeof i2.AddNotesComponent, typeof i3.EpubCommonPopupComponent, typeof i4.ChapterlistComponent, typeof i5.EpubLoaderComponent, typeof i16.SkeletonLoaderComponent]>;
21
+ static ɵinj: i0.ɵɵInjectorDeclaration<EpubReaderModule>;
22
+ }
@@ -0,0 +1,20 @@
1
+ import { EpubChapter, SearchResponseModel } from './shared-mocks/models-mocks';
2
+ import { Observable } from 'rxjs';
3
+ import { HttpClient } from '@angular/common/http';
4
+ import * as i0 from "@angular/core";
5
+ export declare class EpubReaderService {
6
+ private http;
7
+ ePubChapters: import("@angular/core").WritableSignal<any>;
8
+ noteToEdit: import("@angular/core").WritableSignal<any>;
9
+ searchKey: import("@angular/core").WritableSignal<string>;
10
+ searchResponseData: import("@angular/core").WritableSignal<any[] | null>;
11
+ constructor(http: HttpClient);
12
+ updateChapters(data: EpubChapter): void;
13
+ toUpdateSearchKey(data: string): void;
14
+ updateSearchData(data: SearchResponseModel[] | null): void;
15
+ setNote(data: any): void;
16
+ getNote(): any;
17
+ getDefinition(payload: any): Observable<any>;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<EpubReaderService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<EpubReaderService>;
20
+ }
@@ -0,0 +1,136 @@
1
+ import { ChangeDetectorRef, EventEmitter, NgZone, OnDestroy, OnInit, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { SharedService, HttpApiService } from '../shared-mocks/services-mocks';
3
+ import { EpubReaderService } from '../epub-reader.service';
4
+ import { CustomDialogService } from '../custom-dialog.service';
5
+ import { Overlay } from '@angular/cdk/overlay';
6
+ import { EpubChapter, AnnotationModel } from '../shared-mocks/models-mocks';
7
+ import { MessageService } from 'primeng/api';
8
+ import { Location } from '@angular/common';
9
+ import { ActivatedRoute, Router } from '@angular/router';
10
+ import * as i0 from "@angular/core";
11
+ export declare class ReaderMainComponent implements OnInit, OnDestroy, OnChanges {
12
+ private ngZone;
13
+ private httpService;
14
+ private sharedService;
15
+ private epubService;
16
+ private cdr;
17
+ private route;
18
+ dialog: CustomDialogService;
19
+ private messageService;
20
+ private location;
21
+ private platformId;
22
+ private router;
23
+ private overlay;
24
+ epubUrl: string | null;
25
+ epubBlob: Blob | null;
26
+ coverPage: string | null;
27
+ enableDarkMode: boolean;
28
+ enableSearch: boolean;
29
+ enableHighlights: boolean;
30
+ enableBookmarks: boolean;
31
+ enableChapterList: boolean;
32
+ enableTextSelection: boolean;
33
+ enableFontSize: boolean;
34
+ enableNotes: boolean;
35
+ underlineRemoveRequest: EventEmitter<{
36
+ cfi: string;
37
+ annotationId?: string;
38
+ }>;
39
+ book: any;
40
+ bookId: string | number;
41
+ rendition: any;
42
+ readPercentage: {
43
+ roudedOff: number;
44
+ numberFormat: number;
45
+ };
46
+ bookDwnldPerctge: number;
47
+ showDwndLoader: boolean;
48
+ mainOvelay: boolean;
49
+ showHighlightOverlay: boolean;
50
+ showhightLightColor: boolean;
51
+ audioNarrations: boolean;
52
+ toggleDarkMode: boolean;
53
+ curentPageEndCfi: string;
54
+ chaptersData: EpubChapter;
55
+ selectedData: {
56
+ selectedCfiRange: string;
57
+ selectedText: string;
58
+ };
59
+ fontSize: number;
60
+ highlightList: AnnotationModel[];
61
+ underlineList: AnnotationModel[];
62
+ searchData: any;
63
+ searchKeyword: string;
64
+ newSentence: string;
65
+ colourCodeList: Array<string>;
66
+ readCfi: string;
67
+ annotedList: any;
68
+ readPercentagegetbyApi: any;
69
+ freeSample: string;
70
+ showOverlay: boolean;
71
+ showBookPageLoader: boolean;
72
+ showPreviewModal: boolean;
73
+ hasShownPreviewMessage: boolean;
74
+ maxPreviewClicks: number;
75
+ coverImg: string | null;
76
+ isMenuOpen: boolean;
77
+ selectionPosition: {
78
+ top: number;
79
+ left: number;
80
+ };
81
+ private onDestroy$;
82
+ private readProgressSub;
83
+ private overlayRef?;
84
+ handleKeyUp(event: KeyboardEvent): void;
85
+ onKeyDown(event: KeyboardEvent): void;
86
+ constructor(ngZone: NgZone, httpService: HttpApiService, sharedService: SharedService, epubService: EpubReaderService, cdr: ChangeDetectorRef, route: ActivatedRoute, dialog: CustomDialogService, messageService: MessageService, location: Location, platformId: Object, router: Router, overlay: Overlay);
87
+ ngOnInit(): void;
88
+ ngOnChanges(changes: SimpleChanges): void;
89
+ loadDotLottieIfNeeded(): void;
90
+ initialization(): void;
91
+ goBack(): void;
92
+ audioNarration(): void;
93
+ getBookData(): void;
94
+ loadBookFromUrl(url: string): void;
95
+ loadBookFromBlob(blob: Blob): void;
96
+ handleBookLoadError(message: string): void;
97
+ renderBook(): void;
98
+ onProgressChange(event: Event): void;
99
+ mainOverlay(): void;
100
+ showHighlightOverlaymethod(): void;
101
+ showhightLightColormethod(): void;
102
+ handleCloseButtonClick(): void;
103
+ nextClick(): void;
104
+ prevClick(): void;
105
+ darkMode(): void;
106
+ changeFontSize(check: string): void;
107
+ handleSelection(cfiRange: any, selectedText: string): void;
108
+ showChapterList: boolean;
109
+ showChapterPopup(): void;
110
+ onChapterSelect(href: string): void;
111
+ addNotes(): void;
112
+ searchBook(): void;
113
+ addUnderline(): void;
114
+ applyUnderline(): Promise<void>;
115
+ addUnderlineClass(cfi?: string | null): void;
116
+ removeUnderline(cfi: string): void;
117
+ addStyleToUnderline(): void;
118
+ getunderlineList(): void;
119
+ addHighlight(colourCode: string): void;
120
+ applyHighlights(): Promise<void>;
121
+ removeHighlight(cfi: string): void;
122
+ addHighlightClass(cfi?: string | null, colourCode?: string | null): void;
123
+ addColorToHighLights(colourCode: string): void;
124
+ getHighlightlist(): void;
125
+ addBookMark(): void;
126
+ getBookMarkList(): void;
127
+ saveReadProgreess(): void;
128
+ openCommonPopup(data: any): void;
129
+ deleteAnnotations(typeId: number, id: number): void;
130
+ addNoteToPage(): void;
131
+ get getRandomHexColor(): string;
132
+ toggleAllMenus(): void;
133
+ ngOnDestroy(): void;
134
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReaderMainComponent, never>;
135
+ static ɵcmp: i0.ɵɵComponentDeclaration<ReaderMainComponent, "epub-flow", never, { "epubUrl": { "alias": "epubUrl"; "required": false; }; "epubBlob": { "alias": "epubBlob"; "required": false; }; "coverPage": { "alias": "coverPage"; "required": false; }; "enableDarkMode": { "alias": "enableDarkMode"; "required": false; }; "enableSearch": { "alias": "enableSearch"; "required": false; }; "enableHighlights": { "alias": "enableHighlights"; "required": false; }; "enableBookmarks": { "alias": "enableBookmarks"; "required": false; }; "enableChapterList": { "alias": "enableChapterList"; "required": false; }; "enableTextSelection": { "alias": "enableTextSelection"; "required": false; }; "enableFontSize": { "alias": "enableFontSize"; "required": false; }; "enableNotes": { "alias": "enableNotes"; "required": false; }; }, { "underlineRemoveRequest": "underlineRemoveRequest"; }, never, never, false, never>;
136
+ }
@@ -0,0 +1,10 @@
1
+ import { CustomDialogRef } from '../custom-dialog.service';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ConfirmPopupComponent {
4
+ private ref;
5
+ data: any;
6
+ constructor(ref: CustomDialogRef);
7
+ close(result: boolean): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmPopupComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmPopupComponent, "app-confirm-popup", never, {}, {}, never, never, true, never>;
10
+ }
@@ -0,0 +1,4 @@
1
+ export type EpubChapter = any;
2
+ export type AnnotationModel = any;
3
+ export type SearchResponseModel = any;
4
+ export type notModel = any;
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class NoDataFoundComponent {
3
+ message: string;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<NoDataFoundComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<NoDataFoundComponent, "app-no-data-found", never, { "message": { "alias": "message"; "required": false; }; }, {}, never, never, true, never>;
6
+ }
@@ -0,0 +1,24 @@
1
+ import { Observable } from 'rxjs';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SharedService {
4
+ showHide(val: boolean): void;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<SharedService, never>;
6
+ static ɵprov: i0.ɵɵInjectableDeclaration<SharedService>;
7
+ }
8
+ export declare class HttpApiService {
9
+ getAnnotations(params: any): Observable<any>;
10
+ getReadProgress(params: any): Observable<any>;
11
+ getFreeSample(id: any): Observable<any>;
12
+ getBook(id: any): Observable<any>;
13
+ saveAnnotations(params: any): Observable<any>;
14
+ saveReadProgress(params: any): Observable<any>;
15
+ deleteNotes(id: any): Observable<any>;
16
+ updateSearchData(data: any): void;
17
+ addorEditeNote(payload: any): Observable<any>;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<HttpApiService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<HttpApiService>;
20
+ }
21
+ export declare class AuthService {
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
24
+ }
@@ -0,0 +1,10 @@
1
+ import { OnChanges } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SkeletonLoaderComponent implements OnChanges {
4
+ count: number;
5
+ type: 'list' | 'text';
6
+ items: any[];
7
+ ngOnChanges(): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonLoaderComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonLoaderComponent, "app-skeleton-loader", never, { "count": { "alias": "count"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, {}, never, never, true, never>;
10
+ }
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "epub-flow",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^19.2.0",
6
+ "@angular/core": "^19.2.0",
7
+ "@angular/cdk": "^19.0.0"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0",
11
+ "epubjs": "^0.3.93",
12
+ "ngx-editor": "^19.0.0-beta.1",
13
+ "primeicons": "^7.0.0",
14
+ "primeng": "^17.18.15"
15
+ },
16
+ "sideEffects": false,
17
+ "module": "fesm2022/epub-flow.mjs",
18
+ "typings": "index.d.ts",
19
+ "exports": {
20
+ "./package.json": {
21
+ "default": "./package.json"
22
+ },
23
+ ".": {
24
+ "types": "./index.d.ts",
25
+ "default": "./fesm2022/epub-flow.mjs"
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,8 @@
1
+ export * from './lib/epub-reader.service';
2
+ export * from './lib/epub-reader.module';
3
+ export * from './lib/reader-main/reader-main.component';
4
+ export * from './lib/chapterlist/chapterlist.component';
5
+ export * from './lib/add-notes/add-notes.component';
6
+ export * from './lib/epub-common-popup/epub-common-popup.component';
7
+ export * from './lib/epub-loader/epub-loader.component';
8
+ export * from './lib/shared-mocks/skeleton-loader.component';