nuxt-users 1.28.0 → 1.28.2
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 +42 -0
- package/dist/cli.mjs +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/components/NUsersList.vue +13 -13
- package/dist/runtime/components/NUsersLogoutLink.vue.d.ts +2 -2
- package/dist/runtime/components/NUsersProfileInfo.vue +10 -4
- package/dist/runtime/components/NUsersUserCard.vue +5 -5
- package/dist/runtime/components/NUsersUserForm.vue.d.ts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,48 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## v1.28.2
|
|
5
|
+
|
|
6
|
+
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.28.1...v1.28.2)
|
|
7
|
+
|
|
8
|
+
### 🩹 Fixes
|
|
9
|
+
|
|
10
|
+
- Lost reactivity ([8049526](https://github.com/rrd108/nuxt-users/commit/8049526))
|
|
11
|
+
- Lost reactivity for user ([742cd1e](https://github.com/rrd108/nuxt-users/commit/742cd1e))
|
|
12
|
+
|
|
13
|
+
### 🏡 Chore
|
|
14
|
+
|
|
15
|
+
- Rename default to users ([4f5345a](https://github.com/rrd108/nuxt-users/commit/4f5345a))
|
|
16
|
+
- Change info comment ([56c3d35](https://github.com/rrd108/nuxt-users/commit/56c3d35))
|
|
17
|
+
- Comment out ([2534222](https://github.com/rrd108/nuxt-users/commit/2534222))
|
|
18
|
+
- Remove unsused import ([cddaf9c](https://github.com/rrd108/nuxt-users/commit/cddaf9c))
|
|
19
|
+
- **release:** V1.28.1 ([d7d33d2](https://github.com/rrd108/nuxt-users/commit/d7d33d2))
|
|
20
|
+
|
|
21
|
+
### ❤️ Contributors
|
|
22
|
+
|
|
23
|
+
- Rrd108 ([@rrd108](https://github.com/rrd108))
|
|
24
|
+
|
|
25
|
+
## v1.28.1
|
|
26
|
+
|
|
27
|
+
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.28.0...v1.28.1)
|
|
28
|
+
|
|
29
|
+
### 🩹 Fixes
|
|
30
|
+
|
|
31
|
+
- Composables are initialized on mount ([b25eb95](https://github.com/rrd108/nuxt-users/commit/b25eb95))
|
|
32
|
+
- Lost reactivity ([8049526](https://github.com/rrd108/nuxt-users/commit/8049526))
|
|
33
|
+
|
|
34
|
+
### 🏡 Chore
|
|
35
|
+
|
|
36
|
+
- **release:** V1.28.0 ([4f6370d](https://github.com/rrd108/nuxt-users/commit/4f6370d))
|
|
37
|
+
- Rename default to users ([4f5345a](https://github.com/rrd108/nuxt-users/commit/4f5345a))
|
|
38
|
+
- Change info comment ([56c3d35](https://github.com/rrd108/nuxt-users/commit/56c3d35))
|
|
39
|
+
- Comment out ([2534222](https://github.com/rrd108/nuxt-users/commit/2534222))
|
|
40
|
+
- Remove unsused import ([cddaf9c](https://github.com/rrd108/nuxt-users/commit/cddaf9c))
|
|
41
|
+
|
|
42
|
+
### ❤️ Contributors
|
|
43
|
+
|
|
44
|
+
- Rrd108 ([@rrd108](https://github.com/rrd108))
|
|
45
|
+
|
|
4
46
|
## v1.28.0
|
|
5
47
|
|
|
6
48
|
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.27.0...v1.28.0)
|
package/dist/cli.mjs
CHANGED
package/dist/module.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { onMounted, computed } from "vue";
|
|
2
|
+
import { onMounted, computed, ref } from "vue";
|
|
3
3
|
import { useUsers } from "../composables/useUsers";
|
|
4
4
|
import { defaultDisplayFields, defaultFieldLabels } from "nuxt-users/utils";
|
|
5
5
|
defineProps({
|
|
@@ -7,26 +7,26 @@ defineProps({
|
|
|
7
7
|
fieldLabels: { type: Object, required: false, default: () => defaultFieldLabels }
|
|
8
8
|
});
|
|
9
9
|
const emit = defineEmits(["editClick", "delete"]);
|
|
10
|
-
|
|
11
|
-
const users = computed(() => usersComposable?.users
|
|
12
|
-
const pagination = computed(() => usersComposable?.pagination
|
|
13
|
-
const loading = computed(() => usersComposable?.loading
|
|
14
|
-
const error = computed(() => usersComposable?.error
|
|
15
|
-
onMounted(() => {
|
|
16
|
-
usersComposable = useUsers();
|
|
10
|
+
const usersComposable = ref(null);
|
|
11
|
+
const users = computed(() => usersComposable.value?.users ?? []);
|
|
12
|
+
const pagination = computed(() => usersComposable.value?.pagination ?? null);
|
|
13
|
+
const loading = computed(() => usersComposable.value?.loading ?? false);
|
|
14
|
+
const error = computed(() => usersComposable.value?.error ?? null);
|
|
15
|
+
onMounted(async () => {
|
|
16
|
+
usersComposable.value = useUsers();
|
|
17
17
|
if (users.value.length === 0) {
|
|
18
|
-
usersComposable.fetchUsers();
|
|
18
|
+
usersComposable.value?.fetchUsers();
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
const handleDelete = (user) => {
|
|
22
|
-
if (usersComposable) {
|
|
23
|
-
usersComposable.removeUser(user.id);
|
|
22
|
+
if (usersComposable.value) {
|
|
23
|
+
usersComposable.value?.removeUser(user.id);
|
|
24
24
|
}
|
|
25
25
|
emit("delete", user);
|
|
26
26
|
};
|
|
27
27
|
const handleFetchUsers = (page, limit) => {
|
|
28
|
-
if (usersComposable) {
|
|
29
|
-
usersComposable.fetchUsers(page, limit);
|
|
28
|
+
if (usersComposable.value) {
|
|
29
|
+
usersComposable.value.fetchUsers(page, limit);
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
</script>
|
|
@@ -16,12 +16,12 @@ type __VLS_Slots = {} & {
|
|
|
16
16
|
default?: (props: typeof __VLS_1) => any;
|
|
17
17
|
};
|
|
18
18
|
declare const __VLS_component: import("vue").DefineComponent<LogoutLinkProps, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
19
|
-
click: () => any;
|
|
20
19
|
error: (error: string) => any;
|
|
20
|
+
click: () => any;
|
|
21
21
|
success: () => any;
|
|
22
22
|
}, string, import("vue").PublicProps, Readonly<LogoutLinkProps> & Readonly<{
|
|
23
|
-
onClick?: (() => any) | undefined;
|
|
24
23
|
onError?: ((error: string) => any) | undefined;
|
|
24
|
+
onClick?: (() => any) | undefined;
|
|
25
25
|
onSuccess?: (() => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
redirectTo: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed, onMounted } from "vue";
|
|
2
|
+
import { computed, onMounted, ref } from "vue";
|
|
3
3
|
import { useAuthentication } from "../composables/useAuthentication";
|
|
4
|
-
|
|
5
|
-
const user = computed(() => authComposable?.user
|
|
4
|
+
const authComposable = ref(null);
|
|
5
|
+
const user = computed(() => authComposable.value?.user ?? null);
|
|
6
6
|
onMounted(() => {
|
|
7
|
-
authComposable = useAuthentication();
|
|
7
|
+
authComposable.value = useAuthentication();
|
|
8
8
|
});
|
|
9
9
|
</script>
|
|
10
10
|
|
|
@@ -31,6 +31,12 @@ onMounted(() => {
|
|
|
31
31
|
|
|
32
32
|
<dt>Last updated:</dt>
|
|
33
33
|
<dd>{{ Intl.DateTimeFormat().format(new Date(user.updated_at)) }}</dd>
|
|
34
|
+
|
|
35
|
+
<dt>Active:</dt>
|
|
36
|
+
<dd>{{ user.active ? "Yes" : "No" }}</dd>
|
|
37
|
+
|
|
38
|
+
<dt>ID:</dt>
|
|
39
|
+
<dd>{{ user.id }}</dd>
|
|
34
40
|
</dl>
|
|
35
41
|
</div>
|
|
36
42
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed, onMounted } from "vue";
|
|
2
|
+
import { computed, onMounted, ref } from "vue";
|
|
3
3
|
import { useAuthentication } from "../composables/useAuthentication";
|
|
4
4
|
import { useRuntimeConfig } from "#imports";
|
|
5
5
|
import { defaultDisplayFields, defaultFieldLabels } from "nuxt-users/utils";
|
|
@@ -11,10 +11,10 @@ const props = defineProps({
|
|
|
11
11
|
});
|
|
12
12
|
const emit = defineEmits(["delete", "editClick"]);
|
|
13
13
|
const { public: { nuxtUsers } } = useRuntimeConfig();
|
|
14
|
-
|
|
15
|
-
const currentUser = computed(() => authComposable?.user
|
|
16
|
-
onMounted(() => {
|
|
17
|
-
authComposable = useAuthentication();
|
|
14
|
+
const authComposable = ref(null);
|
|
15
|
+
const currentUser = computed(() => authComposable.value?.user ?? null);
|
|
16
|
+
onMounted(async () => {
|
|
17
|
+
authComposable.value = useAuthentication();
|
|
18
18
|
});
|
|
19
19
|
const canEdit = computed(() => {
|
|
20
20
|
if (!currentUser.value) return false;
|
|
@@ -3,12 +3,12 @@ interface Props {
|
|
|
3
3
|
user?: User | null;
|
|
4
4
|
}
|
|
5
5
|
declare const _default: import("vue").DefineComponent<Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
-
cancel: () => any;
|
|
7
6
|
error: (error: unknown) => any;
|
|
7
|
+
cancel: () => any;
|
|
8
8
|
submit: (userData: User) => any;
|
|
9
9
|
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
10
|
-
onCancel?: (() => any) | undefined;
|
|
11
10
|
onError?: ((error: unknown) => any) | undefined;
|
|
11
|
+
onCancel?: (() => any) | undefined;
|
|
12
12
|
onSubmit?: ((userData: User) => any) | undefined;
|
|
13
13
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
export default _default;
|
package/package.json
CHANGED