pukaad-ui-lib 1.263.0 → 1.265.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-blog.d.vue.ts +39 -0
- package/dist/runtime/components/card/card-blog.vue +72 -0
- package/dist/runtime/components/card/card-blog.vue.d.ts +39 -0
- package/dist/runtime/components/input/input-address.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-address.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-file.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-file.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-password.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-password.vue.d.ts +1 -1
- package/dist/runtime/components/modal/modal-password-confirmed.d.vue.ts +1 -1
- package/dist/runtime/components/modal/modal-password-confirmed.vue.d.ts +1 -1
- package/dist/runtime/components/modal/modal-password-verify.d.vue.ts +1 -1
- package/dist/runtime/components/modal/modal-password-verify.vue.d.ts +1 -1
- package/dist/runtime/components/ui/input/Input.vue +1 -0
- package/dist/runtime/components/ui/tabs/TabsList.vue +1 -1
- package/dist/runtime/composables/useApi.js +6 -2
- package/package.json +1 -1
- /package/dist/runtime/assets/svg/socials/{Whatsapp.svg → WhatsApp.svg} +0 -0
package/dist/module.json
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
interface User {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
avatar: string;
|
|
5
|
+
path_name: string;
|
|
6
|
+
}
|
|
7
|
+
interface CardBlogProps {
|
|
8
|
+
id: string;
|
|
9
|
+
is_pinned?: boolean;
|
|
10
|
+
user: User;
|
|
11
|
+
create_at: string;
|
|
12
|
+
title: string;
|
|
13
|
+
description: string;
|
|
14
|
+
image?: string;
|
|
15
|
+
like_count: number;
|
|
16
|
+
comment_count: number;
|
|
17
|
+
share_count: number;
|
|
18
|
+
}
|
|
19
|
+
type __VLS_Props = {
|
|
20
|
+
item: CardBlogProps;
|
|
21
|
+
isMyProfile?: boolean;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
24
|
+
"blog-edit": () => any;
|
|
25
|
+
"blog-pinned": (id: string) => any;
|
|
26
|
+
"blog-unpinned": (id: string) => any;
|
|
27
|
+
"blog-updated": (id: string, data: any) => any;
|
|
28
|
+
"blog-deleted": (id: string) => any;
|
|
29
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
|
+
"onBlog-edit"?: (() => any) | undefined;
|
|
31
|
+
"onBlog-pinned"?: ((id: string) => any) | undefined;
|
|
32
|
+
"onBlog-unpinned"?: ((id: string) => any) | undefined;
|
|
33
|
+
"onBlog-updated"?: ((id: string, data: any) => any) | undefined;
|
|
34
|
+
"onBlog-deleted"?: ((id: string) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
isMyProfile: boolean;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const _default: typeof __VLS_export;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex gap-[16px] cursor-pointer items-start" @click="onClick">
|
|
3
|
+
<Image v-if="props.item.image" :src="props.item.image" :width="227" :height="128" class="rounded-[4px]"
|
|
4
|
+
fit="cover" />
|
|
5
|
+
<div class="flex flex-col gap-[4px] w-full">
|
|
6
|
+
<div class="font-title-small-prominent line-clamp-2">
|
|
7
|
+
{{ props.item.title }}
|
|
8
|
+
</div>
|
|
9
|
+
<div class="flex gap-[4px] text-body-medium items-center flex-wrap">
|
|
10
|
+
<div class="flex gap-[4px] items-center">
|
|
11
|
+
<div>{{ props.item.user.name }}</div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="text-gray flex gap-[4px] items-center">
|
|
14
|
+
<div>•</div>
|
|
15
|
+
<div>{{ convertDateTorelativeText(props.item.create_at) }}</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="text-body-large text-gray line-clamp-2">
|
|
19
|
+
{{ props.item.description }}
|
|
20
|
+
</div>
|
|
21
|
+
<div class="flex justify-between">
|
|
22
|
+
<div class="flex gap-[24px] text-body-large text-gray">
|
|
23
|
+
<div class="flex items-center gap-[4px]">
|
|
24
|
+
<Icon name="pukaad:thumbs-up-regular" :size="20" />
|
|
25
|
+
<div>{{ convertNumber(props.item.like_count) }}</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="flex items-center gap-[4px]">
|
|
28
|
+
<Icon name="lucide:message-circle-more" :size="20" />
|
|
29
|
+
<div>{{ convertNumber(props.item.comment_count) }}</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="flex items-center gap-[4px]">
|
|
32
|
+
<Icon name="uil:share" :size="20" />
|
|
33
|
+
<div>{{ convertNumber(props.item.share_count) }}</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div class="flex items-center gap-[8px] text-gray" @click.stop>
|
|
38
|
+
<Icon v-if="isPinned" name="mage:pin-fill" :size="20" />
|
|
39
|
+
<PickerOptionMenuUser :state="
|
|
40
|
+
props.isMyProfile ? isPinned ? 'my-blog-pined' : 'my-blog' : 'report-announce'
|
|
41
|
+
" disabled-padding @blog-unpin="$emit('blog-unpinned', props.item.id)"
|
|
42
|
+
@blog-pin="$emit('blog-pinned', props.item.id)" @blog-edit="$emit('blog-edit')"
|
|
43
|
+
@blog-delete="$emit('blog-deleted', props.item.id)" />
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script setup>
|
|
52
|
+
import { useConvert } from "#pukaad-ui/runtime/composables/useConvert";
|
|
53
|
+
import { useRouter } from "vue-router";
|
|
54
|
+
import { ref, watch } from "vue";
|
|
55
|
+
const { convertNumber, convertDateTorelativeText } = useConvert();
|
|
56
|
+
const router = useRouter();
|
|
57
|
+
const props = defineProps({
|
|
58
|
+
item: { type: Object, required: true },
|
|
59
|
+
isMyProfile: { type: Boolean, required: false, default: false }
|
|
60
|
+
});
|
|
61
|
+
const emit = defineEmits(["blog-edit", "blog-pinned", "blog-unpinned", "blog-updated", "blog-deleted"]);
|
|
62
|
+
const isPinned = ref(props.item.is_pinned);
|
|
63
|
+
watch(
|
|
64
|
+
() => props.item.is_pinned,
|
|
65
|
+
(val) => {
|
|
66
|
+
isPinned.value = !!val;
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
const onClick = () => {
|
|
70
|
+
router.push(`/blog/${props.item.id}`);
|
|
71
|
+
};
|
|
72
|
+
</script>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
interface User {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
avatar: string;
|
|
5
|
+
path_name: string;
|
|
6
|
+
}
|
|
7
|
+
interface CardBlogProps {
|
|
8
|
+
id: string;
|
|
9
|
+
is_pinned?: boolean;
|
|
10
|
+
user: User;
|
|
11
|
+
create_at: string;
|
|
12
|
+
title: string;
|
|
13
|
+
description: string;
|
|
14
|
+
image?: string;
|
|
15
|
+
like_count: number;
|
|
16
|
+
comment_count: number;
|
|
17
|
+
share_count: number;
|
|
18
|
+
}
|
|
19
|
+
type __VLS_Props = {
|
|
20
|
+
item: CardBlogProps;
|
|
21
|
+
isMyProfile?: boolean;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
24
|
+
"blog-edit": () => any;
|
|
25
|
+
"blog-pinned": (id: string) => any;
|
|
26
|
+
"blog-unpinned": (id: string) => any;
|
|
27
|
+
"blog-updated": (id: string, data: any) => any;
|
|
28
|
+
"blog-deleted": (id: string) => any;
|
|
29
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
|
+
"onBlog-edit"?: (() => any) | undefined;
|
|
31
|
+
"onBlog-pinned"?: ((id: string) => any) | undefined;
|
|
32
|
+
"onBlog-unpinned"?: ((id: string) => any) | undefined;
|
|
33
|
+
"onBlog-updated"?: ((id: string, data: any) => any) | undefined;
|
|
34
|
+
"onBlog-deleted"?: ((id: string) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
isMyProfile: boolean;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const _default: typeof __VLS_export;
|
|
39
|
+
export default _default;
|
|
@@ -48,11 +48,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
48
48
|
label: string;
|
|
49
49
|
required: boolean;
|
|
50
50
|
name: string;
|
|
51
|
-
gap: string;
|
|
52
51
|
placeholder: string;
|
|
53
52
|
labelDetail: string;
|
|
54
53
|
placeholderDetail: string;
|
|
55
54
|
requiredDetail: boolean;
|
|
55
|
+
gap: string;
|
|
56
56
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
57
57
|
declare const _default: typeof __VLS_export;
|
|
58
58
|
export default _default;
|
|
@@ -48,11 +48,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
48
48
|
label: string;
|
|
49
49
|
required: boolean;
|
|
50
50
|
name: string;
|
|
51
|
-
gap: string;
|
|
52
51
|
placeholder: string;
|
|
53
52
|
labelDetail: string;
|
|
54
53
|
placeholderDetail: string;
|
|
55
54
|
requiredDetail: boolean;
|
|
55
|
+
gap: string;
|
|
56
56
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
57
57
|
declare const _default: typeof __VLS_export;
|
|
58
58
|
export default _default;
|
|
@@ -35,8 +35,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
35
35
|
fullHeight: boolean;
|
|
36
36
|
name: string;
|
|
37
37
|
limit: number;
|
|
38
|
-
accept: string;
|
|
39
38
|
disabledErrorMessage: boolean;
|
|
39
|
+
accept: string;
|
|
40
40
|
labelIcon: string;
|
|
41
41
|
disabledDrop: boolean;
|
|
42
42
|
column: boolean;
|
|
@@ -35,8 +35,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
35
35
|
fullHeight: boolean;
|
|
36
36
|
name: string;
|
|
37
37
|
limit: number;
|
|
38
|
-
accept: string;
|
|
39
38
|
disabledErrorMessage: boolean;
|
|
39
|
+
accept: string;
|
|
40
40
|
labelIcon: string;
|
|
41
41
|
disabledDrop: boolean;
|
|
42
42
|
column: boolean;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
22
22
|
}>, {
|
|
23
23
|
id: string;
|
|
24
24
|
name: string;
|
|
25
|
-
disabledForgotPassword: boolean;
|
|
26
25
|
new: boolean;
|
|
26
|
+
disabledForgotPassword: boolean;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
29
29
|
export default _default;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
22
22
|
}>, {
|
|
23
23
|
id: string;
|
|
24
24
|
name: string;
|
|
25
|
-
disabledForgotPassword: boolean;
|
|
26
25
|
new: boolean;
|
|
26
|
+
disabledForgotPassword: boolean;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
29
29
|
export default _default;
|
|
@@ -24,8 +24,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
24
24
|
}) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
26
|
title: string;
|
|
27
|
-
confirmText: string;
|
|
28
27
|
disabledForgotPassword: boolean;
|
|
28
|
+
confirmText: string;
|
|
29
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
declare const _default: typeof __VLS_export;
|
|
31
31
|
export default _default;
|
|
@@ -24,8 +24,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
24
24
|
}) => any) | undefined;
|
|
25
25
|
}>, {
|
|
26
26
|
title: string;
|
|
27
|
-
confirmText: string;
|
|
28
27
|
disabledForgotPassword: boolean;
|
|
28
|
+
confirmText: string;
|
|
29
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
declare const _default: typeof __VLS_export;
|
|
31
31
|
export default _default;
|
|
@@ -28,8 +28,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
28
28
|
}>, {
|
|
29
29
|
title: string;
|
|
30
30
|
mode: "login" | "secure";
|
|
31
|
-
confirmText: string;
|
|
32
31
|
disabledForgotPassword: boolean;
|
|
32
|
+
confirmText: string;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const _default: typeof __VLS_export;
|
|
35
35
|
export default _default;
|
|
@@ -28,8 +28,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
28
28
|
}>, {
|
|
29
29
|
title: string;
|
|
30
30
|
mode: "login" | "secure";
|
|
31
|
-
confirmText: string;
|
|
32
31
|
disabledForgotPassword: boolean;
|
|
32
|
+
confirmText: string;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const _default: typeof __VLS_export;
|
|
35
35
|
export default _default;
|
|
@@ -17,7 +17,7 @@ const delegatedProps = reactiveOmit(props, "class");
|
|
|
17
17
|
v-bind="delegatedProps"
|
|
18
18
|
:class="
|
|
19
19
|
cn(
|
|
20
|
-
'bg-muted
|
|
20
|
+
'bg-muted font-body-medium dark:text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[4px]',
|
|
21
21
|
props.class
|
|
22
22
|
)
|
|
23
23
|
"
|
|
@@ -14,12 +14,16 @@ export const useApi = () => {
|
|
|
14
14
|
},
|
|
15
15
|
// Interceptors
|
|
16
16
|
onRequest({ request, options }) {
|
|
17
|
+
const headers = new Headers(options.headers);
|
|
17
18
|
const token = secId.value;
|
|
18
19
|
if (token) {
|
|
19
|
-
const headers = new Headers(options.headers);
|
|
20
20
|
headers.set("Authorization", `Bearer ${token}`);
|
|
21
|
-
options.headers = headers;
|
|
22
21
|
}
|
|
22
|
+
const provinceId = config.public.APP_PROVINCE_ID;
|
|
23
|
+
if (provinceId) {
|
|
24
|
+
headers.set("X-Province-ID", provinceId);
|
|
25
|
+
}
|
|
26
|
+
options.headers = headers;
|
|
23
27
|
},
|
|
24
28
|
onResponseError({ response }) {
|
|
25
29
|
}
|
package/package.json
CHANGED
|
File without changes
|