pukaad-ui-lib 1.289.0 → 1.290.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
3
  "configKey": "pukaadUI",
4
- "version": "1.289.0",
4
+ "version": "1.290.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,14 +1,13 @@
1
- export interface PlaceAddress {
2
- full_address?: string;
3
- }
4
1
  export interface PlaceItem {
5
2
  id?: string;
3
+ name?: string;
4
+ cover_image?: string;
5
+ address?: string;
6
6
  business_name?: string;
7
+ image_cover?: string;
8
+ full_address?: string;
7
9
  description?: string;
8
- address?: PlaceAddress;
9
10
  rating?: number;
10
- image_cover?: string;
11
- review_count?: number;
12
11
  like_count?: number;
13
12
  }
14
13
  type __VLS_Props = {
@@ -1,28 +1,27 @@
1
1
  <template>
2
2
  <div class="flex gap-[16px] items-center">
3
- <Image v-if="props.item?.image_cover" :src="props.item.image_cover" width="227" height="128"
3
+ <Image v-if="coverImage" :src="coverImage" width="227" height="128"
4
4
  class="rounded-[4px] flex-shrink-0 object-cover" />
5
5
  <div v-else class="w-[227px] h-[128px] rounded-[4px] flex-shrink-0 bg-cloud flex items-center justify-center">
6
6
  <Icon name="pukaad:map-location-dot" :size="36" class="text-gray" />
7
7
  </div>
8
8
  <div class="flex flex-col gap-[4px]">
9
- <div v-if="props.item?.business_name" class="font-title-small-promient">
10
- {{ props.item.business_name }}
9
+ <div v-if="placeName" class="font-title-small-promient">
10
+ {{ placeName }}
11
11
  </div>
12
12
 
13
13
  <div class="flex items-center gap-[4px] font-body-medium text-gray">
14
- <InputRating :size="10" readonly :model-value="props.item.rating || 0" />
15
- <span v-if="props.item.review_count !== void 0" class="ml-[4px]">{{
16
- convertNumber(props.item.review_count) }}</span>
17
- <span v-if="props.item.review_count !== void 0 && props.item.like_count !== void 0">•</span>
18
- <span v-if="props.item.like_count !== void 0">ถูกใจ {{ convertNumber(props.item.like_count)
19
- }}</span>
14
+ <InputRating :size="10" readonly :model-value="props.item?.rating || 0" />
15
+ <template v-if="props.item?.like_count !== void 0">
16
+ <span>•</span>
17
+ <span>ถูกใจ {{ convertNumber(props.item.like_count) }}</span>
18
+ </template>
20
19
  </div>
21
20
 
22
- <div v-if="props.item.address?.full_address" class="font-body-medium text-gray">
23
- {{ props.item.address.full_address }}
21
+ <div v-if="placeAddress" class="font-body-medium text-gray">
22
+ {{ placeAddress }}
24
23
  </div>
25
- <div v-if="props.item.description" class="font-body-medium text-gray line-clamp-2">
24
+ <div v-if="props.item?.description" class="font-body-medium text-gray line-clamp-2">
26
25
  {{ props.item.description }}
27
26
  </div>
28
27
  </div>
@@ -35,4 +34,10 @@ const { convertNumber } = useConvert();
35
34
  const props = defineProps({
36
35
  item: { type: Object, required: false, default: () => ({}) }
37
36
  });
37
+ const coverImage = computed(() => props.item?.cover_image || props.item?.image_cover || "");
38
+ const placeName = computed(() => props.item?.name || props.item?.business_name || "");
39
+ const placeAddress = computed(() => {
40
+ if (typeof props.item?.address === "string") return props.item.address;
41
+ return props.item?.full_address || "";
42
+ });
38
43
  </script>
@@ -1,14 +1,13 @@
1
- export interface PlaceAddress {
2
- full_address?: string;
3
- }
4
1
  export interface PlaceItem {
5
2
  id?: string;
3
+ name?: string;
4
+ cover_image?: string;
5
+ address?: string;
6
6
  business_name?: string;
7
+ image_cover?: string;
8
+ full_address?: string;
7
9
  description?: string;
8
- address?: PlaceAddress;
9
10
  rating?: number;
10
- image_cover?: string;
11
- review_count?: number;
12
11
  like_count?: number;
13
12
  }
14
13
  type __VLS_Props = {
@@ -64,15 +64,15 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
64
64
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageCropperProps> & Readonly<{}>, {
65
65
  src: string;
66
66
  center: boolean;
67
- background: boolean;
68
- modal: boolean;
69
67
  responsive: boolean;
70
68
  restore: boolean;
71
69
  checkCrossOrigin: boolean;
72
70
  checkOrientation: boolean;
73
71
  crossorigin: "" | "anonymous" | "use-credentials";
72
+ modal: boolean;
74
73
  guides: boolean;
75
74
  highlight: boolean;
75
+ background: boolean;
76
76
  autoCrop: boolean;
77
77
  movable: boolean;
78
78
  rotatable: boolean;
@@ -64,15 +64,15 @@ declare const __VLS_export: import("vue").DefineComponent<ImageCropperProps, {
64
64
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageCropperProps> & Readonly<{}>, {
65
65
  src: string;
66
66
  center: boolean;
67
- background: boolean;
68
- modal: boolean;
69
67
  responsive: boolean;
70
68
  restore: boolean;
71
69
  checkCrossOrigin: boolean;
72
70
  checkOrientation: boolean;
73
71
  crossorigin: "" | "anonymous" | "use-credentials";
72
+ modal: boolean;
74
73
  guides: boolean;
75
74
  highlight: boolean;
75
+ background: boolean;
76
76
  autoCrop: boolean;
77
77
  movable: boolean;
78
78
  rotatable: boolean;
@@ -49,11 +49,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
49
49
  label: string;
50
50
  required: boolean;
51
51
  name: string;
52
+ gap: string;
52
53
  placeholder: string;
53
54
  labelDetail: string;
54
55
  placeholderDetail: string;
55
56
  requiredDetail: boolean;
56
- gap: string;
57
57
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
58
58
  declare const _default: typeof __VLS_export;
59
59
  export default _default;
@@ -49,11 +49,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
49
49
  label: string;
50
50
  required: boolean;
51
51
  name: string;
52
+ gap: string;
52
53
  placeholder: string;
53
54
  labelDetail: string;
54
55
  placeholderDetail: string;
55
56
  requiredDetail: boolean;
56
- gap: string;
57
57
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
58
58
  declare const _default: typeof __VLS_export;
59
59
  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
- disabledErrorMessage: boolean;
39
38
  accept: string;
39
+ disabledErrorMessage: boolean;
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
- disabledErrorMessage: boolean;
39
38
  accept: string;
39
+ disabledErrorMessage: boolean;
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
- new: boolean;
26
25
  disabledForgotPassword: boolean;
26
+ new: 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
- new: boolean;
26
25
  disabledForgotPassword: boolean;
26
+ new: 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
- disabledForgotPassword: boolean;
28
27
  confirmText: string;
28
+ disabledForgotPassword: boolean;
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
- disabledForgotPassword: boolean;
28
27
  confirmText: string;
28
+ disabledForgotPassword: boolean;
29
29
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
30
  declare const _default: typeof __VLS_export;
31
31
  export default _default;
@@ -32,8 +32,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
32
32
  }>, {
33
33
  title: string;
34
34
  mode: "login" | "secure";
35
- disabledForgotPassword: boolean;
36
35
  confirmText: string;
36
+ disabledForgotPassword: boolean;
37
37
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
38
38
  declare const _default: typeof __VLS_export;
39
39
  export default _default;
@@ -32,8 +32,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
32
32
  }>, {
33
33
  title: string;
34
34
  mode: "login" | "secure";
35
- disabledForgotPassword: boolean;
36
35
  confirmText: string;
36
+ disabledForgotPassword: boolean;
37
37
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
38
38
  declare const _default: typeof __VLS_export;
39
39
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.289.0",
3
+ "version": "1.290.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",