epub-flow 0.0.1 → 0.0.3

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.
@@ -3,7 +3,7 @@ import { CustomDialogRef, CustomDialogService } from '../custom-dialog.service';
3
3
  import { Editor, Toolbar } from 'ngx-editor';
4
4
  import { SharedService, HttpApiService } from '../shared-mocks/services-mocks';
5
5
  import { EpubReaderService } from '../epub-reader.service';
6
- import { MessageService } from 'primeng/api';
6
+ import { NotificationService } from '../epub-notification/notification.service';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class AddNotesComponent {
9
9
  dialog: CustomDialogService;
@@ -11,7 +11,7 @@ export declare class AddNotesComponent {
11
11
  private epubReader;
12
12
  private userApi;
13
13
  dialogRef: CustomDialogRef;
14
- private messageService;
14
+ private notificationService;
15
15
  editor: Editor;
16
16
  textToAddorEdit: string;
17
17
  toolbar: Toolbar;
@@ -22,7 +22,7 @@ export declare class AddNotesComponent {
22
22
  data: any;
23
23
  get editorContent(): AbstractControl;
24
24
  private onDestroy$;
25
- constructor(dialog: CustomDialogService, sharedService: SharedService, epubReader: EpubReaderService, userApi: HttpApiService, dialogRef: CustomDialogRef, messageService: MessageService);
25
+ constructor(dialog: CustomDialogService, sharedService: SharedService, epubReader: EpubReaderService, userApi: HttpApiService, dialogRef: CustomDialogRef, notificationService: NotificationService);
26
26
  ngOnInit(): void;
27
27
  onSubmit(): void;
28
28
  close(): void;
@@ -1,7 +1,7 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
3
3
  import { HttpApiService } from '../shared-mocks/services-mocks';
4
- import { MessageService } from 'primeng/api';
4
+ import { NotificationService } from '../epub-notification/notification.service';
5
5
  import { CustomDialogRef, CustomDialogService } from '../custom-dialog.service';
6
6
  import { EpubReaderService } from '../epub-reader.service';
7
7
  import { SharedService } from '../shared-mocks/services-mocks';
@@ -10,7 +10,7 @@ import * as i0 from "@angular/core";
10
10
  export declare class EpubCommonPopupComponent implements OnInit {
11
11
  private sanitizer;
12
12
  private userApi;
13
- private messageService;
13
+ private notificationService;
14
14
  dialog: CustomDialogService;
15
15
  dialogRef: CustomDialogRef;
16
16
  private loaderService;
@@ -58,13 +58,13 @@ export declare class EpubCommonPopupComponent implements OnInit {
58
58
  searchData: SearchResponseModel[] | null;
59
59
  searchCharaSmall: boolean;
60
60
  private onDestroy$;
61
- tabviewIndex: any;
61
+ activeTab: number;
62
62
  Definition: any;
63
63
  isLoading: boolean;
64
64
  isSearchDataAvailable: boolean;
65
- constructor(sanitizer: DomSanitizer, userApi: HttpApiService, messageService: MessageService, dialog: CustomDialogService, dialogRef: CustomDialogRef, loaderService: SharedService, epubService: EpubReaderService, sharedService: SharedService);
65
+ constructor(sanitizer: DomSanitizer, userApi: HttpApiService, notificationService: NotificationService, dialog: CustomDialogService, dialogRef: CustomDialogRef, loaderService: SharedService, epubService: EpubReaderService, sharedService: SharedService);
66
66
  ngOnInit(): void;
67
- onTabChange(data: any): void;
67
+ setActiveTab(index: number): void;
68
68
  getHighlightNotes(): void;
69
69
  getBookmark(): void;
70
70
  getDefinition(): void;
@@ -0,0 +1,14 @@
1
+ import { OnInit, OnDestroy } from '@angular/core';
2
+ import { NotificationService, EpubNotification } from './notification.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class NotificationToastComponent implements OnInit, OnDestroy {
5
+ private notificationService;
6
+ toasts: EpubNotification[];
7
+ private subscription;
8
+ constructor(notificationService: NotificationService);
9
+ ngOnInit(): void;
10
+ removeToast(id: number): void;
11
+ ngOnDestroy(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationToastComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<NotificationToastComponent, "epub-notification-toast", never, {}, {}, never, never, true, never>;
14
+ }
@@ -0,0 +1,21 @@
1
+ import * as i0 from "@angular/core";
2
+ export type NotificationType = 'success' | 'error' | 'info' | 'warning';
3
+ export interface EpubNotification {
4
+ id: number;
5
+ message: string;
6
+ type: NotificationType;
7
+ title?: string;
8
+ duration?: number;
9
+ }
10
+ export declare class NotificationService {
11
+ private notificationSubject;
12
+ notifications$: import("rxjs").Observable<EpubNotification>;
13
+ private counter;
14
+ show(message: string, type?: NotificationType, title?: string, duration?: number): void;
15
+ success(message: string, title?: string, duration?: number): void;
16
+ error(message: string, title?: string, duration?: number): void;
17
+ info(message: string, title?: string, duration?: number): void;
18
+ warn(message: string, title?: string, duration?: number): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
20
+ static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
21
+ }
@@ -8,15 +8,12 @@ import * as i6 from "@angular/common";
8
8
  import * as i7 from "@angular/router";
9
9
  import * as i8 from "ngx-editor";
10
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";
11
+ import * as i10 from "./shared-mocks/no-data-found.component";
12
+ import * as i11 from "@angular/common/http";
13
+ import * as i12 from "./shared-mocks/skeleton-loader.component";
14
+ import * as i13 from "./epub-notification/notification-toast.component";
18
15
  export declare class EpubReaderModule {
19
16
  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]>;
17
+ 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 i9.ReactiveFormsModule, typeof i10.NoDataFoundComponent, typeof i11.HttpClientModule, typeof i12.SkeletonLoaderComponent, typeof i13.NotificationToastComponent], [typeof i1.ReaderMainComponent, typeof i2.AddNotesComponent, typeof i3.EpubCommonPopupComponent, typeof i4.ChapterlistComponent, typeof i5.EpubLoaderComponent, typeof i12.SkeletonLoaderComponent, typeof i13.NotificationToastComponent]>;
21
18
  static ɵinj: i0.ɵɵInjectorDeclaration<EpubReaderModule>;
22
19
  }
@@ -4,7 +4,7 @@ import { EpubReaderService } from '../epub-reader.service';
4
4
  import { CustomDialogService } from '../custom-dialog.service';
5
5
  import { Overlay } from '@angular/cdk/overlay';
6
6
  import { EpubChapter, AnnotationModel } from '../shared-mocks/models-mocks';
7
- import { MessageService } from 'primeng/api';
7
+ import { NotificationService } from '../epub-notification/notification.service';
8
8
  import { Location } from '@angular/common';
9
9
  import { ActivatedRoute, Router } from '@angular/router';
10
10
  import * as i0 from "@angular/core";
@@ -16,7 +16,7 @@ export declare class ReaderMainComponent implements OnInit, OnDestroy, OnChanges
16
16
  private cdr;
17
17
  private route;
18
18
  dialog: CustomDialogService;
19
- private messageService;
19
+ private notificationService;
20
20
  private location;
21
21
  private platformId;
22
22
  private router;
@@ -83,7 +83,7 @@ export declare class ReaderMainComponent implements OnInit, OnDestroy, OnChanges
83
83
  private overlayRef?;
84
84
  handleKeyUp(event: KeyboardEvent): void;
85
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);
86
+ constructor(ngZone: NgZone, httpService: HttpApiService, sharedService: SharedService, epubService: EpubReaderService, cdr: ChangeDetectorRef, route: ActivatedRoute, dialog: CustomDialogService, notificationService: NotificationService, location: Location, platformId: Object, router: Router, overlay: Overlay);
87
87
  ngOnInit(): void;
88
88
  ngOnChanges(changes: SimpleChanges): void;
89
89
  loadDotLottieIfNeeded(): void;
@@ -132,5 +132,5 @@ export declare class ReaderMainComponent implements OnInit, OnDestroy, OnChanges
132
132
  toggleAllMenus(): void;
133
133
  ngOnDestroy(): void;
134
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>;
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; }; "bookId": { "alias": "bookId"; "required": false; }; }, { "underlineRemoveRequest": "underlineRemoveRequest"; }, never, never, false, never>;
136
136
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "epub-flow",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.0",
6
6
  "@angular/core": "^19.2.0",
@@ -9,9 +9,7 @@
9
9
  "dependencies": {
10
10
  "tslib": "^2.3.0",
11
11
  "epubjs": "^0.3.93",
12
- "ngx-editor": "^19.0.0-beta.1",
13
- "primeicons": "^7.0.0",
14
- "primeng": "^17.18.15"
12
+ "ngx-editor": "^19.0.0-beta.1"
15
13
  },
16
14
  "sideEffects": false,
17
15
  "module": "fesm2022/epub-flow.mjs",
package/public-api.d.ts CHANGED
@@ -6,3 +6,5 @@ export * from './lib/add-notes/add-notes.component';
6
6
  export * from './lib/epub-common-popup/epub-common-popup.component';
7
7
  export * from './lib/epub-loader/epub-loader.component';
8
8
  export * from './lib/shared-mocks/skeleton-loader.component';
9
+ export * from './lib/epub-notification/notification.service';
10
+ export * from './lib/epub-notification/notification-toast.component';
Binary file