@fy-/fws-vue 2.3.42 → 2.3.44

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.
@@ -61,18 +61,19 @@ const onCall = useDebounceFn((data: NotifProps) => {
61
61
  else if (data.type === 'secret') data.imgIcon = SparklesIcon
62
62
  }
63
63
 
64
- // Set the new notification
64
+ // Set the new notification with default time of 2000ms (2 seconds) if not specified
65
65
  currentNotif.value = {
66
66
  ...data,
67
+ time: data.time || 2000, // Set default to 2 seconds if not specified
67
68
  }
68
69
 
69
70
  // (A) Hide the notification after the specified time
70
- hideTimeout = setTimeout(() => hideNotif(), data.time)
71
+ hideTimeout = setTimeout(() => hideNotif(), currentNotif.value.time)
71
72
 
72
73
  // (B) Use requestAnimationFrame for smoother animation
73
74
  progress.value = 0
74
75
  const startTime = performance.now()
75
- const duration = Number(data.time || 5000)
76
+ const duration = Number(currentNotif.value.time)
76
77
 
77
78
  const { pause } = useRafFn((timestamp) => {
78
79
  if (isPaused.value) return
@@ -132,7 +133,7 @@ function resumeTimer() {
132
133
  // Calculate remaining time based on progress
133
134
  const remainingTime = currentNotif.value.time
134
135
  ? Math.max(currentNotif.value.time * (1 - progress.value / 100), 1000)
135
- : 5000
136
+ : 2000 // Default to 2 seconds
136
137
 
137
138
  // Reset the timeout with the remaining time
138
139
  hideTimeout = setTimeout(() => hideNotif(), remainingTime)
package/index.ts CHANGED
@@ -99,6 +99,7 @@ export {
99
99
  CmsArticleSingle,
100
100
  CollapseTransition,
101
101
  createFWS,
102
+ cropText,
102
103
  DataTable,
103
104
  DefaultBreadcrumb,
104
105
  DefaultConfirm,
@@ -109,20 +110,26 @@ export {
109
110
  DefaultInput,
110
111
  DefaultLoader,
111
112
  DefaultModal,
112
- DefaultNotif,
113
113
 
114
+ DefaultNotif,
114
115
  DefaultPaging,
115
116
  DefaultSidebar,
116
117
  DefaultTagInput,
117
118
  ExpandTransition,
118
- FadeTransition,
119
119
 
120
+ FadeTransition,
120
121
  FilterData,
122
+ formatBytes,
123
+ formatDate,
124
+ formatDatetime,
125
+ formatTimeago,
126
+ getContrastingTextColor,
121
127
  i18nextPromise,
122
128
  initVueClient,
123
129
  initVueServer,
124
130
  isServerRendered,
125
131
  ScaleTransition,
132
+
126
133
  // Components
127
134
  // UI/Transitions
128
135
  SlideTransition,
@@ -132,10 +139,10 @@ export {
132
139
  // FWS
133
140
  UserFlow,
134
141
  UserOAuth2,
135
-
136
142
  UserProfile,
137
143
  UserProfileStrict,
138
144
  useSeo,
145
+
139
146
  useServerRouter,
140
147
  useTranslation,
141
148
  useUserCheck,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fy-/fws-vue",
3
- "version": "2.3.42",
3
+ "version": "2.3.44",
4
4
  "author": "Florian 'Fy' Gasquez <m@fy.to>",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/fy-to/FWJS#readme",