inviton-powerduck 0.0.76 → 0.0.77

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.
@@ -50,6 +50,11 @@ export enum NotificationAnimation {
50
50
  FadeOutLeft = 'animate__animated animate__fadeOutLeft',
51
51
  }
52
52
 
53
+ export class NotificationProviderConfig {
54
+ static defaultTimeout = 1000;
55
+ static defaultDelay = 4000;
56
+ }
57
+
53
58
  interface NotificationDisplayArgs {
54
59
  /**
55
60
  * Notification message HTML, will not be escaped, ensure proper escaping if needed
@@ -82,12 +87,12 @@ interface NotificationDisplayArgs {
82
87
  newestTop?: boolean;
83
88
 
84
89
  /**
85
- * If not closed manually, after this timeout [in ms] ellapses, notification automatically hides (default 4000ms)
90
+ * If not closed manually, after this timeout [in ms] ellapses, notification automatically hides (default 1000ms)
86
91
  */
87
92
  timeout?: number;
88
93
 
89
94
  /**
90
- * After this delay [in ms], timeout starts. (default 5000ms) (0 to disable)
95
+ * After this delay [in ms], timeout starts. (default 4000ms) (0 to disable)
91
96
  */
92
97
  delay?: number;
93
98
 
@@ -162,8 +167,8 @@ var NotificationUtils = (function () {
162
167
  },
163
168
  {
164
169
  type: args.type || "primary",
165
- timer: args.timeout || 4000,
166
- delay: args.delay || 5000,
170
+ timer: args.timeout > -1 ? args.timeout : NotificationProviderConfig.defaultTimeout,
171
+ delay: args.delay > -1 ? args.delay : NotificationProviderConfig.defaultTimeout,
167
172
  placement: getPlacement(args),
168
173
  z_index: 99999,
169
174
  newest_on_top: (args.newestTop || false),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inviton-powerduck",
3
- "version": "0.0.76",
3
+ "version": "0.0.77",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": " vite build && vue-tsc --declaration --emitDeclarationOnly",