@etsoo/notificationbase 1.1.27 → 1.1.28

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.
@@ -68,7 +68,7 @@ export interface NotificationDismiss {
68
68
  * Notification reander setup
69
69
  */
70
70
  export interface NotifictionRenderSetup {
71
- (options: any): void;
71
+ (options: any): any;
72
72
  }
73
73
  /**
74
74
  * On return callback
@@ -91,13 +91,10 @@ export interface INotifier<UI, C extends NotificationCallProps> {
91
91
  /**
92
92
  * Popup component as modal
93
93
  * @param component Component to popup
94
- * @param anchor Position anchor
94
+ * @param properties Popup properties
95
95
  * @returns Result
96
96
  */
97
- popup(component: NotificationContent<UI>, anchor?: HTMLElement | string | {
98
- left: number;
99
- top: number;
100
- }): INotification<UI, C>;
97
+ popup(component: NotificationContent<UI>, properties: any): INotification<UI, C>;
101
98
  /**
102
99
  * Prompt action
103
100
  * @param message Message
@@ -237,13 +234,10 @@ export declare abstract class NotificationContainer<UI, C extends NotificationCa
237
234
  /**
238
235
  * Popup component as modal
239
236
  * @param component Component to popup
240
- * @param anchor Position anchor
237
+ * @param properties Popup properties
241
238
  * @returns Result
242
239
  */
243
- popup(component: NotificationContent<UI>, anchor?: HTMLElement | string | {
244
- left: number;
245
- top: number;
246
- }): INotification<UI, C>;
240
+ popup(component: NotificationContent<UI>, properties: any): INotification<UI, C>;
247
241
  /**
248
242
  * Show a success message
249
243
  * @param message Message
@@ -262,16 +262,16 @@ export class NotificationContainer {
262
262
  /**
263
263
  * Popup component as modal
264
264
  * @param component Component to popup
265
- * @param anchor Position anchor
265
+ * @param properties Popup properties
266
266
  * @returns Result
267
267
  */
268
- popup(component, anchor) {
268
+ popup(component, properties) {
269
269
  // Setup
270
270
  const n = {
271
271
  type: NotificationType.Popup,
272
272
  content: component,
273
- renderSetup: (options) => {
274
- options.anchor = anchor;
273
+ renderSetup: (_options) => {
274
+ return properties;
275
275
  }
276
276
  };
277
277
  // Add to the collection
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/notificationbase",
3
- "version": "1.1.27",
3
+ "version": "1.1.28",
4
4
  "description": "TypeScript notification component for extending with all features described and partially implemented",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -71,7 +71,7 @@ export interface NotificationDismiss {
71
71
  * Notification reander setup
72
72
  */
73
73
  export interface NotifictionRenderSetup {
74
- (options: any): void;
74
+ (options: any): any;
75
75
  }
76
76
 
77
77
  /**
@@ -136,12 +136,12 @@ export interface INotifier<UI, C extends NotificationCallProps> {
136
136
  /**
137
137
  * Popup component as modal
138
138
  * @param component Component to popup
139
- * @param anchor Position anchor
139
+ * @param properties Popup properties
140
140
  * @returns Result
141
141
  */
142
142
  popup(
143
143
  component: NotificationContent<UI>,
144
- anchor?: HTMLElement | string | { left: number; top: number }
144
+ properties: any
145
145
  ): INotification<UI, C>;
146
146
 
147
147
  /**
@@ -524,19 +524,16 @@ export abstract class NotificationContainer<UI, C extends NotificationCallProps>
524
524
  /**
525
525
  * Popup component as modal
526
526
  * @param component Component to popup
527
- * @param anchor Position anchor
527
+ * @param properties Popup properties
528
528
  * @returns Result
529
529
  */
530
- popup(
531
- component: NotificationContent<UI>,
532
- anchor?: HTMLElement | string | { left: number; top: number }
533
- ) {
530
+ popup(component: NotificationContent<UI>, properties: any) {
534
531
  // Setup
535
532
  const n: INotificaseBase<UI, C> = {
536
533
  type: NotificationType.Popup,
537
534
  content: component,
538
- renderSetup: (options) => {
539
- options.anchor = anchor;
535
+ renderSetup: (_options) => {
536
+ return properties;
540
537
  }
541
538
  };
542
539