pukaad-ui-lib 1.450.0 → 1.450.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/dist/module.json +1 -1
- package/dist/runtime/components/card/card-blog.vue +2 -2
- package/dist/runtime/components/card/card-review.vue +2 -2
- package/dist/runtime/components/card/card-user/card-user-blog.vue +2 -2
- package/dist/runtime/components/comment.vue +3 -3
- package/dist/runtime/components/data-table.d.vue.ts +2 -2
- package/dist/runtime/components/data-table.vue.d.ts +2 -2
- package/dist/runtime/components/display/display-video.d.vue.ts +1 -1
- package/dist/runtime/components/display/display-video.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-address.d.vue.ts +2 -2
- package/dist/runtime/components/input/input-address.vue.d.ts +2 -2
- package/dist/runtime/components/input/input-autocomplete.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-autocomplete.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-birth-date.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-birth-date.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-chat.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-chat.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-date-picker.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-date-picker.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-file.d.vue.ts +2 -2
- package/dist/runtime/components/input/input-file.vue.d.ts +2 -2
- package/dist/runtime/components/input/input-localized-name.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-localized-name.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/input/input-radio.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-radio.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-tag-modal.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-tag-modal.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-tag.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-tag.vue.d.ts +1 -1
- package/dist/runtime/components/input/input-textarea.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-textarea.vue.d.ts +1 -1
- package/dist/runtime/components/modal/modal-media-view.vue +3 -3
- package/dist/runtime/components/table.d.vue.ts +1 -1
- package/dist/runtime/components/table.vue.d.ts +1 -1
- package/dist/runtime/components/video.d.vue.ts +1 -1
- package/dist/runtime/components/video.vue.d.ts +1 -1
- package/dist/runtime/composables/store-notification.d.ts +1 -1
- package/dist/runtime/composables/useConvert.d.ts +2 -1
- package/dist/runtime/composables/useConvert.js +2 -1
- package/package.json +1 -1
- package/dist/runtime/components/data-list.d.vue.ts +0 -55
- package/dist/runtime/components/data-list.vue +0 -78
- package/dist/runtime/components/data-list.vue.d.ts +0 -55
- package/dist/runtime/components/input/input-media.d.vue.ts +0 -22
- package/dist/runtime/components/input/input-media.vue +0 -141
- package/dist/runtime/components/input/input-media.vue.d.ts +0 -22
- package/dist/runtime/components/list/list-menu.d.vue.ts +0 -93
- package/dist/runtime/components/list/list-menu.vue +0 -33
- package/dist/runtime/components/list/list-menu.vue.d.ts +0 -93
- package/dist/runtime/components/modal/modal-review-detail.d.vue.ts +0 -21
- package/dist/runtime/components/modal/modal-review-detail.vue +0 -192
- package/dist/runtime/components/modal/modal-review-detail.vue.d.ts +0 -21
- package/dist/runtime/components/profile-cover.d.vue.ts +0 -3
- package/dist/runtime/components/profile-cover.vue +0 -86
- package/dist/runtime/components/profile-cover.vue.d.ts +0 -3
- package/dist/runtime/components/tab_old.d.vue.ts +0 -48
- package/dist/runtime/components/tab_old.vue +0 -176
- package/dist/runtime/components/tab_old.vue.d.ts +0 -48
package/dist/module.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
<div class="text-gray flex gap-[4px] items-center">
|
|
15
15
|
<div>•</div>
|
|
16
|
-
<div>{{
|
|
16
|
+
<div>{{ convertDateToRelativeText(displayDate) }}</div>
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
<div v-if="!displayImage" class="text-body-large text-gray"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
import { useConvert } from "#pukaad-ui/runtime/composables/useConvert";
|
|
55
55
|
import { useRouter } from "vue-router";
|
|
56
56
|
import { computed, ref, watch, onMounted, onBeforeUnmount } from "vue";
|
|
57
|
-
const { convertNumber,
|
|
57
|
+
const { convertNumber, convertDateToRelativeText } = useConvert();
|
|
58
58
|
const router = useRouter();
|
|
59
59
|
const props = defineProps({
|
|
60
60
|
item: { type: Object, required: true },
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
/>
|
|
62
62
|
<div class="text-gray font-body-small">
|
|
63
63
|
{{
|
|
64
|
-
|
|
64
|
+
convertDateToRelativeText(props.item.review?.created_at ?? "")
|
|
65
65
|
}}
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
@@ -146,7 +146,7 @@ import { useNuxtApp } from "nuxt/app";
|
|
|
146
146
|
import { useConvert } from "../../composables/useConvert";
|
|
147
147
|
import { useApi } from "../../composables/useApi";
|
|
148
148
|
const router = useRouter();
|
|
149
|
-
const { convertNumber,
|
|
149
|
+
const { convertNumber, convertDateToRelativeText } = useConvert();
|
|
150
150
|
const api = useApi();
|
|
151
151
|
const nuxtApp = useNuxtApp();
|
|
152
152
|
const $toast = nuxtApp.$toast;
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
<div class="text-gray font-body-small flex gap-[4px] items-center">
|
|
25
25
|
<div>
|
|
26
|
-
{{
|
|
26
|
+
{{ convertDateToRelativeText(props.item.create_at) }}
|
|
27
27
|
</div>
|
|
28
28
|
<div>•</div>
|
|
29
29
|
<div>{{ convertNumber(props.item.view_count) }} วิว</div>
|
|
@@ -91,7 +91,7 @@ import { ref, watch } from "vue";
|
|
|
91
91
|
import { useNuxtApp } from "nuxt/app";
|
|
92
92
|
import { useConvert } from "#pukaad-ui/runtime/composables/useConvert";
|
|
93
93
|
import { useApi } from "../../../composables/useApi";
|
|
94
|
-
const { convertNumber,
|
|
94
|
+
const { convertNumber, convertDateToRelativeText } = useConvert();
|
|
95
95
|
const { $toast, $alert } = useNuxtApp();
|
|
96
96
|
const api = useApi();
|
|
97
97
|
const props = defineProps({
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</div>
|
|
52
52
|
<div class="pl-[38px] flex gap-[16px] text-gray">
|
|
53
53
|
<div class="font-body-large">
|
|
54
|
-
{{
|
|
54
|
+
{{ convertDateToRelativeText(cmt.created_at) }}
|
|
55
55
|
</div>
|
|
56
56
|
<div class="flex gap-[4px] items-center cursor-pointer" @click="onToggleLikeComment(cmt)">
|
|
57
57
|
<Icon :name="
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
</div>
|
|
132
132
|
<div class="pl-[38px] flex gap-[16px] text-gray">
|
|
133
133
|
<div class="font-body-large">
|
|
134
|
-
{{
|
|
134
|
+
{{ convertDateToRelativeText(reply.created_at) }}
|
|
135
135
|
</div>
|
|
136
136
|
<div class="flex gap-[4px] items-center cursor-pointer" @click="onToggleLikeReplyComment(reply)">
|
|
137
137
|
<Icon :name="
|
|
@@ -194,7 +194,7 @@ const resolvedCommentCount = computed(
|
|
|
194
194
|
() => props.fetchFn ? internalCommentCount.value : props.commentCount ?? 0
|
|
195
195
|
);
|
|
196
196
|
const router = useRouter();
|
|
197
|
-
const {
|
|
197
|
+
const { convertDateToRelativeText } = useConvert();
|
|
198
198
|
const openedComments = ref([]);
|
|
199
199
|
const expandedContentIds = ref([]);
|
|
200
200
|
const truncatedTexts = ref({});
|
|
@@ -74,13 +74,13 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
74
74
|
}>, {
|
|
75
75
|
loading: boolean;
|
|
76
76
|
items: Record<string, any>[];
|
|
77
|
-
disabledPagination: boolean;
|
|
78
|
-
totalPage: number;
|
|
79
77
|
itemHeader: TableHeader[];
|
|
80
78
|
headerAlignment: TableHeaderAlignment;
|
|
81
79
|
cellAlignment: TableHeaderAlignment;
|
|
82
80
|
disabledHeader: boolean;
|
|
83
81
|
disabledSort: boolean;
|
|
82
|
+
disabledPagination: boolean;
|
|
83
|
+
totalPage: number;
|
|
84
84
|
selectable: boolean;
|
|
85
85
|
selectKey: string;
|
|
86
86
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -74,13 +74,13 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
74
74
|
}>, {
|
|
75
75
|
loading: boolean;
|
|
76
76
|
items: Record<string, any>[];
|
|
77
|
-
disabledPagination: boolean;
|
|
78
|
-
totalPage: number;
|
|
79
77
|
itemHeader: TableHeader[];
|
|
80
78
|
headerAlignment: TableHeaderAlignment;
|
|
81
79
|
cellAlignment: TableHeaderAlignment;
|
|
82
80
|
disabledHeader: boolean;
|
|
83
81
|
disabledSort: boolean;
|
|
82
|
+
disabledPagination: boolean;
|
|
83
|
+
totalPage: number;
|
|
84
84
|
selectable: boolean;
|
|
85
85
|
selectKey: string;
|
|
86
86
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -93,8 +93,8 @@ declare const __VLS_base: import("vue").DefineComponent<DisplayVideoProps, {
|
|
|
93
93
|
"onPlay-click"?: ((payload: DisplayVideoAction) => any) | undefined;
|
|
94
94
|
}>, {
|
|
95
95
|
src: string;
|
|
96
|
-
fullHeight: boolean;
|
|
97
96
|
fullWidth: boolean;
|
|
97
|
+
fullHeight: boolean;
|
|
98
98
|
fit: "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
99
99
|
poster: string;
|
|
100
100
|
autoplay: boolean;
|
|
@@ -93,8 +93,8 @@ declare const __VLS_base: import("vue").DefineComponent<DisplayVideoProps, {
|
|
|
93
93
|
"onPlay-click"?: ((payload: DisplayVideoAction) => any) | undefined;
|
|
94
94
|
}>, {
|
|
95
95
|
src: string;
|
|
96
|
-
fullHeight: boolean;
|
|
97
96
|
fullWidth: boolean;
|
|
97
|
+
fullHeight: boolean;
|
|
98
98
|
fit: "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
99
99
|
poster: string;
|
|
100
100
|
autoplay: boolean;
|
|
@@ -50,12 +50,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
50
50
|
label: string;
|
|
51
51
|
name: string;
|
|
52
52
|
required: boolean;
|
|
53
|
-
placeholder: string;
|
|
54
53
|
layout: "vertical" | "horizontal";
|
|
55
|
-
|
|
54
|
+
placeholder: string;
|
|
56
55
|
labelDetail: string;
|
|
57
56
|
placeholderDetail: string;
|
|
58
57
|
requiredDetail: boolean;
|
|
58
|
+
gap: number | string;
|
|
59
59
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
60
60
|
declare const _default: typeof __VLS_export;
|
|
61
61
|
export default _default;
|
|
@@ -50,12 +50,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
50
50
|
label: string;
|
|
51
51
|
name: string;
|
|
52
52
|
required: boolean;
|
|
53
|
-
placeholder: string;
|
|
54
53
|
layout: "vertical" | "horizontal";
|
|
55
|
-
|
|
54
|
+
placeholder: string;
|
|
56
55
|
labelDetail: string;
|
|
57
56
|
placeholderDetail: string;
|
|
58
57
|
requiredDetail: boolean;
|
|
58
|
+
gap: number | string;
|
|
59
59
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
60
60
|
declare const _default: typeof __VLS_export;
|
|
61
61
|
export default _default;
|
|
@@ -69,9 +69,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
69
69
|
name: string;
|
|
70
70
|
required: boolean;
|
|
71
71
|
description: string;
|
|
72
|
+
options: AutocompleteOption[] | string[] | number[];
|
|
72
73
|
labelKey: string;
|
|
73
74
|
placeholder: string;
|
|
74
|
-
options: AutocompleteOption[] | string[] | number[];
|
|
75
75
|
limit: number;
|
|
76
76
|
disabledErrorMessage: boolean;
|
|
77
77
|
disabledBorder: boolean;
|
|
@@ -69,9 +69,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
69
69
|
name: string;
|
|
70
70
|
required: boolean;
|
|
71
71
|
description: string;
|
|
72
|
+
options: AutocompleteOption[] | string[] | number[];
|
|
72
73
|
labelKey: string;
|
|
73
74
|
placeholder: string;
|
|
74
|
-
options: AutocompleteOption[] | string[] | number[];
|
|
75
75
|
limit: number;
|
|
76
76
|
disabledErrorMessage: boolean;
|
|
77
77
|
disabledBorder: boolean;
|
|
@@ -30,9 +30,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
30
30
|
id: string;
|
|
31
31
|
name: string;
|
|
32
32
|
required: boolean;
|
|
33
|
+
layout: "month-and-year" | "month-only" | "year-only";
|
|
33
34
|
locale: string;
|
|
34
35
|
placeholder: string;
|
|
35
|
-
layout: "month-and-year" | "month-only" | "year-only";
|
|
36
36
|
disabledErrorMessage: boolean;
|
|
37
37
|
dateFormat: string;
|
|
38
38
|
minAge: number;
|
|
@@ -30,9 +30,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
30
30
|
id: string;
|
|
31
31
|
name: string;
|
|
32
32
|
required: boolean;
|
|
33
|
+
layout: "month-and-year" | "month-only" | "year-only";
|
|
33
34
|
locale: string;
|
|
34
35
|
placeholder: string;
|
|
35
|
-
layout: "month-and-year" | "month-only" | "year-only";
|
|
36
36
|
disabledErrorMessage: boolean;
|
|
37
37
|
dateFormat: string;
|
|
38
38
|
minAge: number;
|
|
@@ -47,9 +47,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
47
47
|
}>, {
|
|
48
48
|
disabled: boolean;
|
|
49
49
|
name: string;
|
|
50
|
-
maxHeight: number;
|
|
51
50
|
placeholder: string;
|
|
52
51
|
maxlength: number;
|
|
52
|
+
maxHeight: number;
|
|
53
53
|
limitImage: number;
|
|
54
54
|
limitVideo: number;
|
|
55
55
|
disabledMedia: boolean;
|
|
@@ -47,9 +47,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
47
47
|
}>, {
|
|
48
48
|
disabled: boolean;
|
|
49
49
|
name: string;
|
|
50
|
-
maxHeight: number;
|
|
51
50
|
placeholder: string;
|
|
52
51
|
maxlength: number;
|
|
52
|
+
maxHeight: number;
|
|
53
53
|
limitImage: number;
|
|
54
54
|
limitVideo: number;
|
|
55
55
|
disabledMedia: boolean;
|
|
@@ -44,9 +44,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
44
44
|
id: string;
|
|
45
45
|
name: string;
|
|
46
46
|
required: boolean;
|
|
47
|
+
layout: "month-and-year" | "month-only" | "year-only";
|
|
47
48
|
locale: string;
|
|
48
49
|
placeholder: string;
|
|
49
|
-
layout: "month-and-year" | "month-only" | "year-only";
|
|
50
50
|
disabledErrorMessage: boolean;
|
|
51
51
|
dateFormat: string;
|
|
52
52
|
showTime: boolean;
|
|
@@ -44,9 +44,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
44
44
|
id: string;
|
|
45
45
|
name: string;
|
|
46
46
|
required: boolean;
|
|
47
|
+
layout: "month-and-year" | "month-only" | "year-only";
|
|
47
48
|
locale: string;
|
|
48
49
|
placeholder: string;
|
|
49
|
-
layout: "month-and-year" | "month-only" | "year-only";
|
|
50
50
|
disabledErrorMessage: boolean;
|
|
51
51
|
dateFormat: string;
|
|
52
52
|
showTime: boolean;
|
|
@@ -34,11 +34,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
34
34
|
width: number | string;
|
|
35
35
|
height: number | string;
|
|
36
36
|
name: string;
|
|
37
|
-
fullHeight: boolean;
|
|
38
37
|
fullWidth: boolean;
|
|
38
|
+
fullHeight: boolean;
|
|
39
39
|
limit: number;
|
|
40
|
-
accept: string;
|
|
41
40
|
disabledErrorMessage: boolean;
|
|
41
|
+
accept: string;
|
|
42
42
|
labelIcon: string;
|
|
43
43
|
disabledDrop: boolean;
|
|
44
44
|
column: boolean;
|
|
@@ -34,11 +34,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
34
34
|
width: number | string;
|
|
35
35
|
height: number | string;
|
|
36
36
|
name: string;
|
|
37
|
-
fullHeight: boolean;
|
|
38
37
|
fullWidth: boolean;
|
|
38
|
+
fullHeight: boolean;
|
|
39
39
|
limit: number;
|
|
40
|
-
accept: string;
|
|
41
40
|
disabledErrorMessage: boolean;
|
|
41
|
+
accept: string;
|
|
42
42
|
labelIcon: string;
|
|
43
43
|
disabledDrop: boolean;
|
|
44
44
|
column: boolean;
|
|
@@ -11,8 +11,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
11
11
|
label: string;
|
|
12
12
|
name: string;
|
|
13
13
|
modelValue: LocalizedNameItem[];
|
|
14
|
-
placeholder: string;
|
|
15
14
|
options: InputSelectItem[];
|
|
15
|
+
placeholder: string;
|
|
16
16
|
limit: number;
|
|
17
17
|
removable: boolean;
|
|
18
18
|
showCounter: boolean;
|
|
@@ -11,8 +11,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
11
11
|
label: string;
|
|
12
12
|
name: string;
|
|
13
13
|
modelValue: LocalizedNameItem[];
|
|
14
|
-
placeholder: string;
|
|
15
14
|
options: InputSelectItem[];
|
|
15
|
+
placeholder: string;
|
|
16
16
|
limit: number;
|
|
17
17
|
removable: boolean;
|
|
18
18
|
showCounter: 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;
|
|
@@ -35,11 +35,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
35
35
|
items: import("#pukaad-ui/types/components/input/input-radio").InputRadioItem[] | string[] | number[];
|
|
36
36
|
item: string | number;
|
|
37
37
|
name: string;
|
|
38
|
-
columnGap: number | string;
|
|
39
38
|
layout: "vertical" | "horizontal";
|
|
40
39
|
disabledErrorMessage: boolean;
|
|
41
40
|
labelPosition: "left" | "right";
|
|
42
41
|
layoutGap: number | string;
|
|
42
|
+
columnGap: number | string;
|
|
43
43
|
standalone: boolean;
|
|
44
44
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
45
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -35,11 +35,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
35
35
|
items: import("#pukaad-ui/types/components/input/input-radio").InputRadioItem[] | string[] | number[];
|
|
36
36
|
item: string | number;
|
|
37
37
|
name: string;
|
|
38
|
-
columnGap: number | string;
|
|
39
38
|
layout: "vertical" | "horizontal";
|
|
40
39
|
disabledErrorMessage: boolean;
|
|
41
40
|
labelPosition: "left" | "right";
|
|
42
41
|
layoutGap: number | string;
|
|
42
|
+
columnGap: number | string;
|
|
43
43
|
standalone: boolean;
|
|
44
44
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
45
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -40,9 +40,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
40
40
|
id: string;
|
|
41
41
|
name: string;
|
|
42
42
|
required: boolean;
|
|
43
|
+
options: InputTagModalOption[];
|
|
43
44
|
labelKey: string;
|
|
44
45
|
placeholder: string;
|
|
45
|
-
options: InputTagModalOption[];
|
|
46
46
|
disabledErrorMessage: boolean;
|
|
47
47
|
valueKey: string;
|
|
48
48
|
searchPlaceholder: string;
|
|
@@ -40,9 +40,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
40
40
|
id: string;
|
|
41
41
|
name: string;
|
|
42
42
|
required: boolean;
|
|
43
|
+
options: InputTagModalOption[];
|
|
43
44
|
labelKey: string;
|
|
44
45
|
placeholder: string;
|
|
45
|
-
options: InputTagModalOption[];
|
|
46
46
|
disabledErrorMessage: boolean;
|
|
47
47
|
valueKey: string;
|
|
48
48
|
searchPlaceholder: string;
|
|
@@ -26,8 +26,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
26
26
|
"onUpdate:modelValue"?: ((value: SelectedTag[]) => any) | undefined;
|
|
27
27
|
}>, {
|
|
28
28
|
name: string;
|
|
29
|
-
placeholder: string;
|
|
30
29
|
state: "user" | "admin";
|
|
30
|
+
placeholder: string;
|
|
31
31
|
limit: number;
|
|
32
32
|
profileScope: "personal" | "business";
|
|
33
33
|
ignore: string[];
|
|
@@ -26,8 +26,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
26
26
|
"onUpdate:modelValue"?: ((value: SelectedTag[]) => any) | undefined;
|
|
27
27
|
}>, {
|
|
28
28
|
name: string;
|
|
29
|
-
placeholder: string;
|
|
30
29
|
state: "user" | "admin";
|
|
30
|
+
placeholder: string;
|
|
31
31
|
limit: number;
|
|
32
32
|
profileScope: "personal" | "business";
|
|
33
33
|
ignore: string[];
|
|
@@ -44,8 +44,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
44
44
|
name: string;
|
|
45
45
|
required: boolean;
|
|
46
46
|
resize: "none" | "both" | "horizontal" | "vertical";
|
|
47
|
-
fullHeight: boolean;
|
|
48
47
|
fullWidth: boolean;
|
|
48
|
+
fullHeight: boolean;
|
|
49
49
|
rows: number;
|
|
50
50
|
limit: number;
|
|
51
51
|
readonly: boolean;
|
|
@@ -44,8 +44,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
44
44
|
name: string;
|
|
45
45
|
required: boolean;
|
|
46
46
|
resize: "none" | "both" | "horizontal" | "vertical";
|
|
47
|
-
fullHeight: boolean;
|
|
48
47
|
fullWidth: boolean;
|
|
48
|
+
fullHeight: boolean;
|
|
49
49
|
rows: number;
|
|
50
50
|
limit: number;
|
|
51
51
|
readonly: boolean;
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
/>
|
|
92
92
|
<span class="font-body-small opacity-75">
|
|
93
93
|
{{
|
|
94
|
-
|
|
94
|
+
convertDateToRelativeText(
|
|
95
95
|
props.review.review.created_at ?? ""
|
|
96
96
|
)
|
|
97
97
|
}}
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
/>
|
|
149
149
|
<span class="font-body-small opacity-75">
|
|
150
150
|
{{
|
|
151
|
-
|
|
151
|
+
convertDateToRelativeText(
|
|
152
152
|
props.review.review.created_at ?? ""
|
|
153
153
|
)
|
|
154
154
|
}}
|
|
@@ -181,7 +181,7 @@ import { ref, computed } from "vue";
|
|
|
181
181
|
import { useNuxtApp } from "nuxt/app";
|
|
182
182
|
import { useConvert } from "../../composables/useConvert";
|
|
183
183
|
import { useApi } from "../../composables/useApi";
|
|
184
|
-
const { convertNumber,
|
|
184
|
+
const { convertNumber, convertDateToRelativeText } = useConvert();
|
|
185
185
|
const api = useApi();
|
|
186
186
|
const { $alert } = useNuxtApp();
|
|
187
187
|
const props = defineProps({
|
|
@@ -40,11 +40,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
40
40
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
41
41
|
}>, {
|
|
42
42
|
items: Record<string, any>[];
|
|
43
|
-
totalPage: number;
|
|
44
43
|
itemHeader: TableHeader[];
|
|
45
44
|
headerAlignment: "start" | "center" | "end";
|
|
46
45
|
disabledHeader: false;
|
|
47
46
|
disabledSort: false;
|
|
47
|
+
totalPage: number;
|
|
48
48
|
paginationVisible: number;
|
|
49
49
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
50
50
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -40,11 +40,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
40
40
|
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
41
41
|
}>, {
|
|
42
42
|
items: Record<string, any>[];
|
|
43
|
-
totalPage: number;
|
|
44
43
|
itemHeader: TableHeader[];
|
|
45
44
|
headerAlignment: "start" | "center" | "end";
|
|
46
45
|
disabledHeader: false;
|
|
47
46
|
disabledSort: false;
|
|
47
|
+
totalPage: number;
|
|
48
48
|
paginationVisible: number;
|
|
49
49
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
50
50
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { VideoProps } from "#pukaad-ui/types/components/video";
|
|
2
2
|
declare const __VLS_export: import("vue").DefineComponent<VideoProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VideoProps> & Readonly<{}>, {
|
|
3
3
|
src: string;
|
|
4
|
-
fullHeight: boolean;
|
|
5
4
|
fullWidth: boolean;
|
|
5
|
+
fullHeight: boolean;
|
|
6
6
|
fit: import("#pukaad-ui/types/components/video").VideoFit;
|
|
7
7
|
poster: string;
|
|
8
8
|
autoplay: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { VideoProps } from "#pukaad-ui/types/components/video";
|
|
2
2
|
declare const __VLS_export: import("vue").DefineComponent<VideoProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<VideoProps> & Readonly<{}>, {
|
|
3
3
|
src: string;
|
|
4
|
-
fullHeight: boolean;
|
|
5
4
|
fullWidth: boolean;
|
|
5
|
+
fullHeight: boolean;
|
|
6
6
|
fit: import("#pukaad-ui/types/components/video").VideoFit;
|
|
7
7
|
poster: string;
|
|
8
8
|
autoplay: boolean;
|
|
@@ -71,7 +71,7 @@ export declare const useNotificationStore: import("pinia").StoreDefinition<"noti
|
|
|
71
71
|
openDrawer: () => void;
|
|
72
72
|
closeDrawer: () => void;
|
|
73
73
|
toggleDrawer: () => void;
|
|
74
|
-
}, "
|
|
74
|
+
}, "unreadCount" | "unreadByTab" | "isOpenDrawer" | "activeTab" | "lists" | "hasMore" | "isLoadingList" | "isLoadingMore">, Pick<{
|
|
75
75
|
unreadCount: import("vue").Ref<number, number>;
|
|
76
76
|
unreadByTab: {
|
|
77
77
|
general: number;
|
|
@@ -18,7 +18,8 @@ export declare class Convert {
|
|
|
18
18
|
* Convert date to relative text
|
|
19
19
|
* @example "เมื่อสักครู่", "10 นาทีที่ผ่านมา", "2 ชั่วโมงที่ผ่านมา", "17 กุมภาพันธ์ 2569, 13:19"
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
convertDateToRelativeText: (date: string | Date | null | undefined) => string;
|
|
22
22
|
convertChatRelativeText: (date: string | Date | null | undefined) => string;
|
|
23
|
+
convertDateTorelativeText: (date: string | Date | null | undefined) => string;
|
|
23
24
|
}
|
|
24
25
|
export declare function useConvert(): Convert;
|
|
@@ -43,7 +43,7 @@ export class Convert {
|
|
|
43
43
|
* Convert date to relative text
|
|
44
44
|
* @example "เมื่อสักครู่", "10 นาทีที่ผ่านมา", "2 ชั่วโมงที่ผ่านมา", "17 กุมภาพันธ์ 2569, 13:19"
|
|
45
45
|
*/
|
|
46
|
-
|
|
46
|
+
convertDateToRelativeText = (date) => {
|
|
47
47
|
if (!date) return "-";
|
|
48
48
|
const target = dayjs(date);
|
|
49
49
|
const now = dayjs();
|
|
@@ -74,6 +74,7 @@ export class Convert {
|
|
|
74
74
|
if (target.year() === now.year()) return target.format("D MMM");
|
|
75
75
|
return target.format("D MMM BB");
|
|
76
76
|
};
|
|
77
|
+
convertDateTorelativeText = (date) => this.convertDateToRelativeText(date);
|
|
77
78
|
}
|
|
78
79
|
const convertInstance = new Convert();
|
|
79
80
|
export function useConvert() {
|
package/package.json
CHANGED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
export interface DataListProps {
|
|
2
|
-
items?: Record<string, any>[];
|
|
3
|
-
height?: number | string;
|
|
4
|
-
maxHeight?: number | string;
|
|
5
|
-
fullHeight?: boolean;
|
|
6
|
-
disabledPagination?: boolean;
|
|
7
|
-
totalPage?: number;
|
|
8
|
-
}
|
|
9
|
-
type __VLS_Props = DataListProps;
|
|
10
|
-
type __VLS_ModelProps = {
|
|
11
|
-
"page"?: number;
|
|
12
|
-
};
|
|
13
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
-
declare var __VLS_7: {
|
|
15
|
-
items: Record<string, any>[];
|
|
16
|
-
}, __VLS_29: {
|
|
17
|
-
item: Record<string, any>;
|
|
18
|
-
index: number;
|
|
19
|
-
}, __VLS_31: {}, __VLS_39: {};
|
|
20
|
-
type __VLS_Slots = {} & {
|
|
21
|
-
body?: (props: typeof __VLS_7) => any;
|
|
22
|
-
} & {
|
|
23
|
-
item?: (props: typeof __VLS_29) => any;
|
|
24
|
-
} & {
|
|
25
|
-
empty?: (props: typeof __VLS_31) => any;
|
|
26
|
-
} & {
|
|
27
|
-
'empty-content'?: (props: typeof __VLS_39) => any;
|
|
28
|
-
};
|
|
29
|
-
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
-
"update:page": (value: number) => any;
|
|
31
|
-
} & {
|
|
32
|
-
"select-page": (value: number) => any;
|
|
33
|
-
"change-page": (value: number) => any;
|
|
34
|
-
"click-row": (item: Record<string, any>, index: number) => any;
|
|
35
|
-
"change-item-per-page": (value: number) => any;
|
|
36
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
37
|
-
"onSelect-page"?: ((value: number) => any) | undefined;
|
|
38
|
-
"onChange-page"?: ((value: number) => any) | undefined;
|
|
39
|
-
"onClick-row"?: ((item: Record<string, any>, index: number) => any) | undefined;
|
|
40
|
-
"onChange-item-per-page"?: ((value: number) => any) | undefined;
|
|
41
|
-
"onUpdate:page"?: ((value: number) => any) | undefined;
|
|
42
|
-
}>, {
|
|
43
|
-
items: Record<string, any>[];
|
|
44
|
-
fullHeight: boolean;
|
|
45
|
-
disabledPagination: boolean;
|
|
46
|
-
totalPage: number;
|
|
47
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
48
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
49
|
-
declare const _default: typeof __VLS_export;
|
|
50
|
-
export default _default;
|
|
51
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
52
|
-
new (): {
|
|
53
|
-
$slots: S;
|
|
54
|
-
};
|
|
55
|
-
};
|