nuxt-users 1.31.2 → 1.33.0
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## v1.33.0
|
|
5
|
+
|
|
6
|
+
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.32.0...v1.33.0)
|
|
7
|
+
|
|
8
|
+
### 🚀 Enhancements
|
|
9
|
+
|
|
10
|
+
- Extends NUsersList component with function filters ([be9a730](https://github.com/rrd108/nuxt-users/commit/be9a730))
|
|
11
|
+
|
|
12
|
+
### 🩹 Fixes
|
|
13
|
+
|
|
14
|
+
- Register date issue with MySQL ([28a5c00](https://github.com/rrd108/nuxt-users/commit/28a5c00))
|
|
15
|
+
|
|
16
|
+
### 💅 Refactors
|
|
17
|
+
|
|
18
|
+
- Remove unused code ([cbff5a0](https://github.com/rrd108/nuxt-users/commit/cbff5a0))
|
|
19
|
+
|
|
20
|
+
### 🏡 Chore
|
|
21
|
+
|
|
22
|
+
- **release:** V1.32.0 ([7021fb7](https://github.com/rrd108/nuxt-users/commit/7021fb7))
|
|
23
|
+
|
|
24
|
+
### ❤️ Contributors
|
|
25
|
+
|
|
26
|
+
- Rrd108 ([@rrd108](https://github.com/rrd108))
|
|
27
|
+
|
|
28
|
+
## v1.32.0
|
|
29
|
+
|
|
30
|
+
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.31.2...v1.32.0)
|
|
31
|
+
|
|
32
|
+
### 🚀 Enhancements
|
|
33
|
+
|
|
34
|
+
- Extends NUsersList component with function filters ([be9a730](https://github.com/rrd108/nuxt-users/commit/be9a730))
|
|
35
|
+
|
|
36
|
+
### 🩹 Fixes
|
|
37
|
+
|
|
38
|
+
- Usercard shows action buttons by default ([d824b1e](https://github.com/rrd108/nuxt-users/commit/d824b1e))
|
|
39
|
+
|
|
40
|
+
### 💅 Refactors
|
|
41
|
+
|
|
42
|
+
- Remove unused code ([cbff5a0](https://github.com/rrd108/nuxt-users/commit/cbff5a0))
|
|
43
|
+
|
|
44
|
+
### 🏡 Chore
|
|
45
|
+
|
|
46
|
+
- **release:** V1.31.2 ([8136322](https://github.com/rrd108/nuxt-users/commit/8136322))
|
|
47
|
+
|
|
48
|
+
### ❤️ Contributors
|
|
49
|
+
|
|
50
|
+
- Rrd108 ([@rrd108](https://github.com/rrd108))
|
|
51
|
+
|
|
4
52
|
## v1.31.2
|
|
5
53
|
|
|
6
54
|
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.31.1...v1.31.2)
|
package/dist/module.json
CHANGED
|
@@ -5,7 +5,7 @@ import { defaultDisplayFields, defaultFieldLabels } from "nuxt-users/utils";
|
|
|
5
5
|
const props = defineProps({
|
|
6
6
|
displayFields: { type: Array, required: false, default: () => defaultDisplayFields },
|
|
7
7
|
fieldLabels: { type: Object, required: false, default: () => defaultFieldLabels },
|
|
8
|
-
filter: { type: Object, required: false, default: () => ({}) }
|
|
8
|
+
filter: { type: [Object, Function], required: false, default: () => ({}) }
|
|
9
9
|
});
|
|
10
10
|
const emit = defineEmits(["editClick", "delete"]);
|
|
11
11
|
const usersComposable = ref(null);
|
|
@@ -14,7 +14,13 @@ const pagination = computed(() => usersComposable.value?.pagination ?? null);
|
|
|
14
14
|
const loading = computed(() => usersComposable.value?.loading ?? false);
|
|
15
15
|
const error = computed(() => usersComposable.value?.error ?? null);
|
|
16
16
|
const users = computed(() => {
|
|
17
|
-
if (!props.filter
|
|
17
|
+
if (!props.filter) {
|
|
18
|
+
return allUsers.value;
|
|
19
|
+
}
|
|
20
|
+
if (typeof props.filter === "function") {
|
|
21
|
+
return allUsers.value.filter(props.filter);
|
|
22
|
+
}
|
|
23
|
+
if (Object.keys(props.filter).length === 0) {
|
|
18
24
|
return allUsers.value;
|
|
19
25
|
}
|
|
20
26
|
return allUsers.value.filter((user) => {
|
|
@@ -147,7 +147,8 @@ export const confirmUserEmail = async (token, email, options) => {
|
|
|
147
147
|
}
|
|
148
148
|
const now = /* @__PURE__ */ new Date();
|
|
149
149
|
const currentTimeString = now.toISOString().slice(0, 19).replace("T", " ");
|
|
150
|
-
const
|
|
150
|
+
const createdAtString = validTokenRecord.created_at instanceof Date ? validTokenRecord.created_at.toISOString().slice(0, 19).replace("T", " ") : String(validTokenRecord.created_at);
|
|
151
|
+
const [datePart, timePart] = createdAtString.split(/[ T]/);
|
|
151
152
|
const [year, month, day] = datePart.split("-").map(Number);
|
|
152
153
|
const [hour, minute, second] = timePart.split(":").map(Number);
|
|
153
154
|
let expirationHour = hour + TOKEN_EXPIRATION_HOURS;
|
package/package.json
CHANGED