pukaad-ui-lib 1.237.0 → 1.239.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/dist/module.json +1 -1
- package/dist/runtime/components/card/card-user-blog.d.vue.ts +10 -4
- package/dist/runtime/components/card/card-user-blog.vue +19 -15
- package/dist/runtime/components/card/card-user-blog.vue.d.ts +10 -4
- package/dist/runtime/components/picker/picker-option-menu/picker-option-menu-user.d.vue.ts +2 -2
- package/dist/runtime/components/picker/picker-option-menu/picker-option-menu-user.vue.d.ts +2 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -24,11 +24,17 @@ type __VLS_Props = {
|
|
|
24
24
|
isMyProfile?: boolean;
|
|
25
25
|
};
|
|
26
26
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
27
|
-
"blog-
|
|
28
|
-
"blog-
|
|
27
|
+
"blog-edit": () => any;
|
|
28
|
+
"blog-pinned": (id: string) => any;
|
|
29
|
+
"blog-unpinned": (id: string) => any;
|
|
30
|
+
"blog-updated": (id: string, data: any) => any;
|
|
31
|
+
"blog-deleted": (id: string) => any;
|
|
29
32
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
|
-
"onBlog-
|
|
31
|
-
"onBlog-
|
|
33
|
+
"onBlog-edit"?: (() => any) | undefined;
|
|
34
|
+
"onBlog-pinned"?: ((id: string) => any) | undefined;
|
|
35
|
+
"onBlog-unpinned"?: ((id: string) => any) | undefined;
|
|
36
|
+
"onBlog-updated"?: ((id: string, data: any) => any) | undefined;
|
|
37
|
+
"onBlog-deleted"?: ((id: string) => any) | undefined;
|
|
32
38
|
}>, {
|
|
33
39
|
isMyProfile: boolean;
|
|
34
40
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -74,15 +74,15 @@
|
|
|
74
74
|
}"
|
|
75
75
|
state="blog"
|
|
76
76
|
/>
|
|
77
|
-
</div>
|
|
78
77
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
78
|
+
<!-- Edit Blog Drawer — อยู่ใน root เดียวกันเพื่อหลีกเลี่ยง fragment -->
|
|
79
|
+
<DrawerPostBlog
|
|
80
|
+
v-if="editBlogItem"
|
|
81
|
+
v-model="isEditDrawerOpen"
|
|
82
|
+
:item="editBlogItem"
|
|
83
|
+
@success="onEditSuccess"
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
86
|
</template>
|
|
87
87
|
|
|
88
88
|
<script setup>
|
|
@@ -99,7 +99,7 @@ const props = defineProps({
|
|
|
99
99
|
isMyProfile: { type: Boolean, required: false, default: false }
|
|
100
100
|
});
|
|
101
101
|
const router = useRouter();
|
|
102
|
-
const emit = defineEmits(["blog-updated", "blog-deleted"]);
|
|
102
|
+
const emit = defineEmits(["blog-edit", "blog-pinned", "blog-unpinned", "blog-updated", "blog-deleted"]);
|
|
103
103
|
const isPinned = ref(props.item.is_pinned);
|
|
104
104
|
const isEditDrawerOpen = ref(false);
|
|
105
105
|
const editBlogItem = ref(null);
|
|
@@ -117,6 +117,7 @@ const onBlogPin = async () => {
|
|
|
117
117
|
await api(`/blogs/${props.item.id}/pin`, { method: "POST" });
|
|
118
118
|
isPinned.value = true;
|
|
119
119
|
$toast.success("\u0E1B\u0E31\u0E01\u0E2B\u0E21\u0E38\u0E14\u0E1A\u0E17\u0E04\u0E27\u0E32\u0E21\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08");
|
|
120
|
+
emit("blog-pinned", props.item.id);
|
|
120
121
|
} catch (e) {
|
|
121
122
|
$toast.error(e?.data?.message?.description || "\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E1B\u0E31\u0E01\u0E2B\u0E21\u0E38\u0E14\u0E44\u0E14\u0E49");
|
|
122
123
|
}
|
|
@@ -126,6 +127,7 @@ const onBlogUnpin = async () => {
|
|
|
126
127
|
await api(`/blogs/${props.item.id}/pin`, { method: "DELETE" });
|
|
127
128
|
isPinned.value = false;
|
|
128
129
|
$toast.success("\u0E40\u0E2D\u0E32\u0E2B\u0E21\u0E38\u0E14\u0E2D\u0E2D\u0E01\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08");
|
|
130
|
+
emit("blog-unpinned", props.item.id);
|
|
129
131
|
} catch (e) {
|
|
130
132
|
$toast.error(e?.data?.message?.description || "\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E2D\u0E32\u0E2B\u0E21\u0E38\u0E14\u0E2D\u0E2D\u0E01\u0E44\u0E14\u0E49");
|
|
131
133
|
}
|
|
@@ -149,17 +151,19 @@ const onBlogEdit = async () => {
|
|
|
149
151
|
};
|
|
150
152
|
isEditDrawerOpen.value = true;
|
|
151
153
|
} catch (e) {
|
|
152
|
-
$toast.error(
|
|
154
|
+
$toast.error(
|
|
155
|
+
e?.data?.message?.description || "\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E42\u0E2B\u0E25\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E1A\u0E17\u0E04\u0E27\u0E32\u0E21\u0E44\u0E14\u0E49"
|
|
156
|
+
);
|
|
153
157
|
}
|
|
154
158
|
};
|
|
155
|
-
const onEditSuccess = () => {
|
|
156
|
-
emit("blog-updated");
|
|
159
|
+
const onEditSuccess = (data) => {
|
|
160
|
+
emit("blog-updated", props.item.id, data);
|
|
157
161
|
};
|
|
158
162
|
const onBlogDelete = async () => {
|
|
159
163
|
const { isConfirmed } = await $alert.show({
|
|
160
164
|
type: "warning",
|
|
161
|
-
title: "\u0E25\u0E1A\u0E1A\
|
|
162
|
-
description: "\
|
|
165
|
+
title: "\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E25\u0E1A\u0E1A\u0E25\u0E47\u0E2D\u0E01\u0E19\u0E35\u0E49\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48 ?",
|
|
166
|
+
description: "\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E01\u0E39\u0E49\u0E04\u0E37\u0E19\u0E42\u0E1E\u0E2A\u0E15\u0E4C\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E25\u0E1A\u0E44\u0E1B\u0E41\u0E25\u0E49\u0E27\u0E44\u0E14\u0E49",
|
|
163
167
|
confirmText: "\u0E25\u0E1A",
|
|
164
168
|
cancelText: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",
|
|
165
169
|
showCancelBtn: true
|
|
@@ -168,7 +172,7 @@ const onBlogDelete = async () => {
|
|
|
168
172
|
try {
|
|
169
173
|
await api(`/blogs/${props.item.id}`, { method: "DELETE" });
|
|
170
174
|
$toast.success("\u0E25\u0E1A\u0E1A\u0E17\u0E04\u0E27\u0E32\u0E21\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08");
|
|
171
|
-
emit("blog-deleted");
|
|
175
|
+
emit("blog-deleted", props.item.id);
|
|
172
176
|
} catch (e) {
|
|
173
177
|
$toast.error(e?.data?.message?.description || "\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E25\u0E1A\u0E1A\u0E17\u0E04\u0E27\u0E32\u0E21\u0E44\u0E14\u0E49");
|
|
174
178
|
}
|
|
@@ -24,11 +24,17 @@ type __VLS_Props = {
|
|
|
24
24
|
isMyProfile?: boolean;
|
|
25
25
|
};
|
|
26
26
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
27
|
-
"blog-
|
|
28
|
-
"blog-
|
|
27
|
+
"blog-edit": () => any;
|
|
28
|
+
"blog-pinned": (id: string) => any;
|
|
29
|
+
"blog-unpinned": (id: string) => any;
|
|
30
|
+
"blog-updated": (id: string, data: any) => any;
|
|
31
|
+
"blog-deleted": (id: string) => any;
|
|
29
32
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
|
-
"onBlog-
|
|
31
|
-
"onBlog-
|
|
33
|
+
"onBlog-edit"?: (() => any) | undefined;
|
|
34
|
+
"onBlog-pinned"?: ((id: string) => any) | undefined;
|
|
35
|
+
"onBlog-unpinned"?: ((id: string) => any) | undefined;
|
|
36
|
+
"onBlog-updated"?: ((id: string, data: any) => any) | undefined;
|
|
37
|
+
"onBlog-deleted"?: ((id: string) => any) | undefined;
|
|
32
38
|
}>, {
|
|
33
39
|
isMyProfile: boolean;
|
|
34
40
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { PickerOptionMenuUserProps } from "@/types/components/picker/picker-option-menu/picker-option-menu-user";
|
|
2
2
|
declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
|
+
"blog-edit": () => any;
|
|
3
4
|
"report-announce": () => any;
|
|
4
5
|
"blog-unpin": () => any;
|
|
5
6
|
"blog-pin": () => any;
|
|
6
|
-
"blog-edit": () => any;
|
|
7
7
|
"blog-delete": () => any;
|
|
8
8
|
"profile-name-updated": (name: string) => any;
|
|
9
9
|
"profile-edit": () => any;
|
|
@@ -19,10 +19,10 @@ declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserPr
|
|
|
19
19
|
"review-delete": () => any;
|
|
20
20
|
archive: () => any;
|
|
21
21
|
}, string, import("vue").PublicProps, Readonly<PickerOptionMenuUserProps> & Readonly<{
|
|
22
|
+
"onBlog-edit"?: (() => any) | undefined;
|
|
22
23
|
"onReport-announce"?: (() => any) | undefined;
|
|
23
24
|
"onBlog-unpin"?: (() => any) | undefined;
|
|
24
25
|
"onBlog-pin"?: (() => any) | undefined;
|
|
25
|
-
"onBlog-edit"?: (() => any) | undefined;
|
|
26
26
|
"onBlog-delete"?: (() => any) | undefined;
|
|
27
27
|
"onProfile-name-updated"?: ((name: string) => any) | undefined;
|
|
28
28
|
"onProfile-edit"?: (() => any) | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { PickerOptionMenuUserProps } from "@/types/components/picker/picker-option-menu/picker-option-menu-user";
|
|
2
2
|
declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
|
+
"blog-edit": () => any;
|
|
3
4
|
"report-announce": () => any;
|
|
4
5
|
"blog-unpin": () => any;
|
|
5
6
|
"blog-pin": () => any;
|
|
6
|
-
"blog-edit": () => any;
|
|
7
7
|
"blog-delete": () => any;
|
|
8
8
|
"profile-name-updated": (name: string) => any;
|
|
9
9
|
"profile-edit": () => any;
|
|
@@ -19,10 +19,10 @@ declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserPr
|
|
|
19
19
|
"review-delete": () => any;
|
|
20
20
|
archive: () => any;
|
|
21
21
|
}, string, import("vue").PublicProps, Readonly<PickerOptionMenuUserProps> & Readonly<{
|
|
22
|
+
"onBlog-edit"?: (() => any) | undefined;
|
|
22
23
|
"onReport-announce"?: (() => any) | undefined;
|
|
23
24
|
"onBlog-unpin"?: (() => any) | undefined;
|
|
24
25
|
"onBlog-pin"?: (() => any) | undefined;
|
|
25
|
-
"onBlog-edit"?: (() => any) | undefined;
|
|
26
26
|
"onBlog-delete"?: (() => any) | undefined;
|
|
27
27
|
"onProfile-name-updated"?: ((name: string) => any) | undefined;
|
|
28
28
|
"onProfile-edit"?: (() => any) | undefined;
|