pukaad-ui-lib 1.358.0 → 1.360.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/display/display-image-place.vue +4 -0
- package/dist/runtime/components/input/input-autocomplete.d.vue.ts +2 -2
- package/dist/runtime/components/input/input-autocomplete.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-suggest.d.vue.ts +1 -1
- package/dist/runtime/components/input/input-suggest.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/modal/modal-media-view.d.vue.ts +3 -0
- package/dist/runtime/components/modal/modal-media-view.vue +3 -2
- package/dist/runtime/components/modal/modal-media-view.vue.d.ts +3 -0
- package/dist/runtime/components/timeline.d.vue.ts +26 -0
- package/dist/runtime/components/timeline.vue +48 -0
- package/dist/runtime/components/timeline.vue.d.ts +26 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -221,6 +221,7 @@
|
|
|
221
221
|
:items="mediaItems"
|
|
222
222
|
:title="props.title"
|
|
223
223
|
:start-index="mediaStartIndex"
|
|
224
|
+
:uploader-label="uploaderLabel"
|
|
224
225
|
/>
|
|
225
226
|
</template>
|
|
226
227
|
|
|
@@ -240,6 +241,9 @@ const layoutMode = computed(() => {
|
|
|
240
241
|
if (props.state === "office" || props.state === "business") return "album";
|
|
241
242
|
return "featured";
|
|
242
243
|
});
|
|
244
|
+
const uploaderLabel = computed(
|
|
245
|
+
() => props.state === "business" ? "\u0E1D\u0E48\u0E32\u0E22\u0E08\u0E31\u0E14\u0E01\u0E32\u0E23" : "\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E23\u0E30\u0E1A\u0E1A"
|
|
246
|
+
);
|
|
243
247
|
const photos = computed(() => props.photos.filter((p) => !!p.url));
|
|
244
248
|
const videos = computed(() => props.videos.filter((p) => !!p.url));
|
|
245
249
|
const featuredPhoto2Overflow = computed(() => {
|
|
@@ -48,10 +48,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
48
48
|
id: string;
|
|
49
49
|
name: string;
|
|
50
50
|
required: boolean;
|
|
51
|
-
options: AutocompleteOption[] | string[] | number[];
|
|
52
|
-
description: string;
|
|
53
51
|
labelKey: string;
|
|
54
52
|
placeholder: string;
|
|
53
|
+
options: AutocompleteOption[] | string[] | number[];
|
|
54
|
+
description: string;
|
|
55
55
|
limit: number;
|
|
56
56
|
disabledErrorMessage: boolean;
|
|
57
57
|
disabledBorder: boolean;
|
|
@@ -48,10 +48,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
48
48
|
id: string;
|
|
49
49
|
name: string;
|
|
50
50
|
required: boolean;
|
|
51
|
-
options: AutocompleteOption[] | string[] | number[];
|
|
52
|
-
description: string;
|
|
53
51
|
labelKey: string;
|
|
54
52
|
placeholder: string;
|
|
53
|
+
options: AutocompleteOption[] | string[] | number[];
|
|
54
|
+
description: string;
|
|
55
55
|
limit: number;
|
|
56
56
|
disabledErrorMessage: boolean;
|
|
57
57
|
disabledBorder: 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
|
-
options: InputSelectItem[];
|
|
15
14
|
placeholder: string;
|
|
15
|
+
options: InputSelectItem[];
|
|
16
16
|
limit: number;
|
|
17
17
|
showCounter: boolean;
|
|
18
18
|
addLabel: string;
|
|
@@ -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
|
-
options: InputSelectItem[];
|
|
15
14
|
placeholder: string;
|
|
15
|
+
options: InputSelectItem[];
|
|
16
16
|
limit: number;
|
|
17
17
|
showCounter: boolean;
|
|
18
18
|
addLabel: string;
|
|
@@ -19,9 +19,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
19
19
|
id: string;
|
|
20
20
|
name: string;
|
|
21
21
|
required: boolean;
|
|
22
|
-
description: string;
|
|
23
22
|
labelKey: string;
|
|
24
23
|
placeholder: string;
|
|
24
|
+
description: string;
|
|
25
25
|
limit: number;
|
|
26
26
|
disabledErrorMessage: boolean;
|
|
27
27
|
disabledBorder: boolean;
|
|
@@ -19,9 +19,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
19
19
|
id: string;
|
|
20
20
|
name: string;
|
|
21
21
|
required: boolean;
|
|
22
|
-
description: string;
|
|
23
22
|
labelKey: string;
|
|
24
23
|
placeholder: string;
|
|
24
|
+
description: string;
|
|
25
25
|
limit: number;
|
|
26
26
|
disabledErrorMessage: boolean;
|
|
27
27
|
disabledBorder: boolean;
|
|
@@ -25,8 +25,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
25
25
|
"onUpdate:modelValue"?: ((value: SelectedTag[]) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
name: string;
|
|
28
|
-
state: "user" | "admin";
|
|
29
28
|
placeholder: string;
|
|
29
|
+
state: "user" | "admin";
|
|
30
30
|
limit: number;
|
|
31
31
|
ignore: string[];
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -25,8 +25,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
25
25
|
"onUpdate:modelValue"?: ((value: SelectedTag[]) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
name: string;
|
|
28
|
-
state: "user" | "admin";
|
|
29
28
|
placeholder: string;
|
|
29
|
+
state: "user" | "admin";
|
|
30
30
|
limit: number;
|
|
31
31
|
ignore: string[];
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -6,6 +6,8 @@ export interface ModalMediaViewProps {
|
|
|
6
6
|
startIndex?: number;
|
|
7
7
|
/** ข้อมูล review เต็ม สำหรับแสดง overlay รีวิว */
|
|
8
8
|
review?: CardReviewProps;
|
|
9
|
+
/** ป้ายชื่อผู้ดูแลสื่อนี้ ที่แสดงใน overlay (โหมดไม่ใช่ review) — office = "ผู้ดูแลระบบ", business = "ฝ่ายจัดการ" */
|
|
10
|
+
uploaderLabel?: string;
|
|
9
11
|
}
|
|
10
12
|
type __VLS_Props = ModalMediaViewProps;
|
|
11
13
|
type __VLS_ModelProps = {
|
|
@@ -20,6 +22,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
20
22
|
title: string;
|
|
21
23
|
items: CarouselItem[];
|
|
22
24
|
startIndex: number;
|
|
25
|
+
uploaderLabel: string;
|
|
23
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
27
|
declare const _default: typeof __VLS_export;
|
|
25
28
|
export default _default;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
class="p-[16px] h-[125px] flex flex-col gap-[8px] text-white font-body-large"
|
|
28
28
|
>
|
|
29
29
|
<div class="flex justify-between items-center">
|
|
30
|
-
<div class="font-body-large-prominent"
|
|
30
|
+
<div class="font-body-large-prominent">{{ props.uploaderLabel }}</div>
|
|
31
31
|
<Icon
|
|
32
32
|
name="lucide:flag"
|
|
33
33
|
class="cursor-pointer"
|
|
@@ -180,7 +180,8 @@ const props = defineProps({
|
|
|
180
180
|
items: { type: Array, required: false, default: () => [] },
|
|
181
181
|
title: { type: String, required: false, default: "" },
|
|
182
182
|
startIndex: { type: Number, required: false, default: 0 },
|
|
183
|
-
review: { type: Object, required: false }
|
|
183
|
+
review: { type: Object, required: false },
|
|
184
|
+
uploaderLabel: { type: String, required: false, default: "\u0E1C\u0E39\u0E49\u0E14\u0E39\u0E41\u0E25\u0E23\u0E30\u0E1A\u0E1A" }
|
|
184
185
|
});
|
|
185
186
|
const isOpen = defineModel({ type: Boolean, ...{ default: false } });
|
|
186
187
|
const showMoreDescription = ref(false);
|
|
@@ -6,6 +6,8 @@ export interface ModalMediaViewProps {
|
|
|
6
6
|
startIndex?: number;
|
|
7
7
|
/** ข้อมูล review เต็ม สำหรับแสดง overlay รีวิว */
|
|
8
8
|
review?: CardReviewProps;
|
|
9
|
+
/** ป้ายชื่อผู้ดูแลสื่อนี้ ที่แสดงใน overlay (โหมดไม่ใช่ review) — office = "ผู้ดูแลระบบ", business = "ฝ่ายจัดการ" */
|
|
10
|
+
uploaderLabel?: string;
|
|
9
11
|
}
|
|
10
12
|
type __VLS_Props = ModalMediaViewProps;
|
|
11
13
|
type __VLS_ModelProps = {
|
|
@@ -20,6 +22,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
20
22
|
title: string;
|
|
21
23
|
items: CarouselItem[];
|
|
22
24
|
startIndex: number;
|
|
25
|
+
uploaderLabel: string;
|
|
23
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
27
|
declare const _default: typeof __VLS_export;
|
|
25
28
|
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface TimelineItem {
|
|
2
|
+
id?: string | number;
|
|
3
|
+
avatar?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
time?: string | Date;
|
|
6
|
+
description?: string;
|
|
7
|
+
}
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
items: TimelineItem[];
|
|
10
|
+
};
|
|
11
|
+
declare var __VLS_1: {
|
|
12
|
+
item: TimelineItem;
|
|
13
|
+
index: number;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_Slots = {} & {
|
|
16
|
+
content?: (props: typeof __VLS_1) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex flex-col">
|
|
3
|
+
<div
|
|
4
|
+
v-for="(item, index) in props.items"
|
|
5
|
+
:key="item.id ?? index"
|
|
6
|
+
class="flex gap-[8px]"
|
|
7
|
+
>
|
|
8
|
+
<!-- dot + connecting line (โครงของ component เอง) -->
|
|
9
|
+
<div class="flex flex-col items-center w-[8px]">
|
|
10
|
+
<div class="w-[20px] h-[26px] flex items-center justify-center">
|
|
11
|
+
<div class="w-[10px] h-[10px] rounded-full bg-black shrink-0" />
|
|
12
|
+
</div>
|
|
13
|
+
<div class="w-[2px] flex-1 bg-bright" />
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<!-- เนื้อหา — ปล่อยให้ผู้ใช้ครอบเองผ่าน slot ได้ ถ้าไม่ส่งมาใช้ default นี้ -->
|
|
17
|
+
<div
|
|
18
|
+
class="flex flex-col gap-[8px]"
|
|
19
|
+
:class="index < props.items.length - 1 ? 'pb-[16px]' : ''"
|
|
20
|
+
>
|
|
21
|
+
<slot name="content" :item="item" :index="index">
|
|
22
|
+
<div class="flex gap-[8px]">
|
|
23
|
+
<Avatar :src="item.avatar" :alt="item.name" :size="30" />
|
|
24
|
+
<div class="flex flex-col gap-[8px]">
|
|
25
|
+
<div class="flex flex-col gap-[4px]">
|
|
26
|
+
<span class="font-body-large text-gray">{{ item.name }}</span>
|
|
27
|
+
<span class="font-body-small text-gray"
|
|
28
|
+
>{{ convertDateTime(item.time) }} น.</span
|
|
29
|
+
>
|
|
30
|
+
</div>
|
|
31
|
+
<p class="font-body-large text-gray">
|
|
32
|
+
{{ item.description }}
|
|
33
|
+
</p>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</slot>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script setup>
|
|
43
|
+
import { useConvert } from "#pukaad-ui/runtime/composables/useConvert";
|
|
44
|
+
const props = defineProps({
|
|
45
|
+
items: { type: Array, required: true }
|
|
46
|
+
});
|
|
47
|
+
const { convertDateTime } = useConvert();
|
|
48
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface TimelineItem {
|
|
2
|
+
id?: string | number;
|
|
3
|
+
avatar?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
time?: string | Date;
|
|
6
|
+
description?: string;
|
|
7
|
+
}
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
items: TimelineItem[];
|
|
10
|
+
};
|
|
11
|
+
declare var __VLS_1: {
|
|
12
|
+
item: TimelineItem;
|
|
13
|
+
index: number;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_Slots = {} & {
|
|
16
|
+
content?: (props: typeof __VLS_1) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|