pukaad-ui-lib 1.389.0 → 1.391.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.
Files changed (46) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/card/card-blog.vue +1 -1
  3. package/dist/runtime/components/card/card-content/card-content-disable.d.vue.ts +3 -0
  4. package/dist/runtime/components/card/card-content/card-content-disable.vue +3 -0
  5. package/dist/runtime/components/card/card-content/card-content-disable.vue.d.ts +3 -0
  6. package/dist/runtime/components/card/card-content/card-content.d.vue.ts +1 -0
  7. package/dist/runtime/components/card/card-content/card-content.vue +19 -4
  8. package/dist/runtime/components/card/card-content/card-content.vue.d.ts +1 -0
  9. package/dist/runtime/components/card/card-user/card-user-blog.vue +1 -1
  10. package/dist/runtime/components/image/image-cropper.d.vue.ts +2 -2
  11. package/dist/runtime/components/image/image-cropper.vue.d.ts +2 -2
  12. package/dist/runtime/components/input/input-address.d.vue.ts +1 -1
  13. package/dist/runtime/components/input/input-address.vue.d.ts +1 -1
  14. package/dist/runtime/components/input/input-autocomplete.d.vue.ts +2 -2
  15. package/dist/runtime/components/input/input-autocomplete.vue.d.ts +2 -2
  16. package/dist/runtime/components/input/input-file.d.vue.ts +1 -1
  17. package/dist/runtime/components/input/input-file.vue.d.ts +1 -1
  18. package/dist/runtime/components/input/input-link.d.vue.ts +1 -1
  19. package/dist/runtime/components/input/input-link.vue.d.ts +1 -1
  20. package/dist/runtime/components/input/input-localized-name.d.vue.ts +2 -2
  21. package/dist/runtime/components/input/input-localized-name.vue.d.ts +2 -2
  22. package/dist/runtime/components/input/input-password.d.vue.ts +1 -1
  23. package/dist/runtime/components/input/input-password.vue.d.ts +1 -1
  24. package/dist/runtime/components/input/input-personal-card-id.d.vue.ts +2 -2
  25. package/dist/runtime/components/input/input-personal-card-id.vue.d.ts +2 -2
  26. package/dist/runtime/components/input/input-select-place.d.vue.ts +1 -0
  27. package/dist/runtime/components/input/input-select-place.vue +17 -8
  28. package/dist/runtime/components/input/input-select-place.vue.d.ts +1 -0
  29. package/dist/runtime/components/input/input-suggest.d.vue.ts +1 -1
  30. package/dist/runtime/components/input/input-suggest.vue.d.ts +1 -1
  31. package/dist/runtime/components/input/input-tag.d.vue.ts +1 -1
  32. package/dist/runtime/components/input/input-tag.vue.d.ts +1 -1
  33. package/dist/runtime/components/input/input-text-field.d.vue.ts +1 -1
  34. package/dist/runtime/components/input/input-text-field.vue.d.ts +1 -1
  35. package/dist/runtime/components/input/input-textarea.d.vue.ts +1 -1
  36. package/dist/runtime/components/input/input-textarea.vue.d.ts +1 -1
  37. package/dist/runtime/components/input/input-typed-field.d.vue.ts +1 -1
  38. package/dist/runtime/components/input/input-typed-field.vue.d.ts +1 -1
  39. package/dist/runtime/components/modal/modal-password-confirmed.d.vue.ts +1 -1
  40. package/dist/runtime/components/modal/modal-password-confirmed.vue.d.ts +1 -1
  41. package/dist/runtime/components/modal/modal-password-verify.d.vue.ts +1 -1
  42. package/dist/runtime/components/modal/modal-password-verify.vue.d.ts +1 -1
  43. package/dist/runtime/components/picker/picker-option-menu/picker-option-menu-user.d.vue.ts +2 -45
  44. package/dist/runtime/components/picker/picker-option-menu/picker-option-menu-user.vue +22 -7
  45. package/dist/runtime/components/picker/picker-option-menu/picker-option-menu-user.vue.d.ts +2 -45
  46. package/package.json +1 -1
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
3
  "configKey": "pukaadUI",
4
- "version": "1.389.0",
4
+ "version": "1.391.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -39,7 +39,7 @@
39
39
  <div v-if="!props.disabledMenu" class="flex items-center gap-[8px] text-gray" @click.stop>
40
40
  <Icon v-if="isPinned" name="mage:pin-fill" :size="20" />
41
41
  <PickerOptionMenuUser v-if="props.item.author" :state="
42
- props.isMyProfile ? isPinned ? 'my-blog-pined' : 'my-blog' : 'report-announce'
42
+ props.isMyProfile ? isPinned ? 'my-blog-pined' : 'my-blog' : 'blog'
43
43
  " disabled-padding @blog-unpin="$emit('blog-unpinned', props.item.id)"
44
44
  @blog-pin="$emit('blog-pinned', props.item.id)" @blog-edit="$emit('blog-edit')"
45
45
  @blog-delete="$emit('blog-deleted', props.item.id)" />
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <div class="absolute inset-0 bg-cloud/80 z-content" />
3
+ </template>
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -16,6 +16,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
16
16
  onAction?: ((name: string, item: CardContentItem) => any) | undefined;
17
17
  }>, {
18
18
  selectable: boolean;
19
+ disable: boolean;
19
20
  disabledNavigate: boolean;
20
21
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
22
  declare const _default: typeof __VLS_export;
@@ -8,7 +8,7 @@
8
8
  <div
9
9
  :class="[
10
10
  'relative h-[345px] w-[194px] overflow-hidden rounded-[4px] bg-white outline outline-offset-0',
11
- props.disabledNavigate && !props.selectable ? 'cursor-default' : 'cursor-pointer',
11
+ props.disable || props.disabledNavigate && !props.selectable ? 'cursor-default' : 'cursor-pointer',
12
12
  props.selectable || selected ? 'outline-2 outline-gray' : 'outline-1 outline-silver'
13
13
  ]"
14
14
  @mouseenter="hovering = true"
@@ -17,6 +17,8 @@
17
17
  >
18
18
  <component :is="bodyComponent" v-if="bodyComponent" :item="props.item" />
19
19
 
20
+ <CardContentDisable v-if="props.disable" />
21
+
20
22
  <div v-if="showTime" class="absolute left-[8px] top-[8px] z-content">
21
23
  <CardContentTime :item="props.item" />
22
24
  </div>
@@ -26,7 +28,7 @@
26
28
  :state="props.state"
27
29
  :is-pinned="!!props.item.pinned"
28
30
  :is-bookmarked="!!props.item.bookmarked"
29
- :is-show="hovering"
31
+ :is-show="isMenuShow"
30
32
  @action="onMenuAction"
31
33
  />
32
34
  </div>
@@ -49,16 +51,19 @@ import CardContentVideo from "./card-content-video.vue";
49
51
  import CardContentTime from "./card-content-time.vue";
50
52
  import CardContentMenu from "./card-content-menu.vue";
51
53
  import CardContentSelect from "./card-content-select.vue";
54
+ import CardContentDisable from "./card-content-disable.vue";
52
55
  const router = useRouter();
53
56
  const props = defineProps({
54
57
  item: { type: Object, required: true },
55
58
  state: { type: String, required: false },
56
59
  selectable: { type: Boolean, required: false, default: false },
57
- disabledNavigate: { type: Boolean, required: false, default: false }
60
+ disabledNavigate: { type: Boolean, required: false, default: false },
61
+ disable: { type: Boolean, required: false, default: false }
58
62
  });
59
63
  const emit = defineEmits(["click", "action"]);
60
64
  const selected = defineModel("selected", { type: Boolean, ...{ default: false } });
61
65
  const handleClick = () => {
66
+ if (props.disable) return;
62
67
  if (props.selectable) {
63
68
  selected.value = !selected.value;
64
69
  emit("click", props.item);
@@ -70,6 +75,10 @@ const handleClick = () => {
70
75
  }
71
76
  };
72
77
  const hovering = ref(false);
78
+ const isMenuShow = computed(() => {
79
+ if (props.disable) return false;
80
+ return hovering.value;
81
+ });
73
82
  const BODY = {
74
83
  postIt: CardContentPostIt,
75
84
  image: CardContentImage,
@@ -77,7 +86,13 @@ const BODY = {
77
86
  };
78
87
  const bodyComponent = computed(() => BODY[props.item.type]);
79
88
  const showTime = computed(() => !!props.item.expireAt);
80
- const hasMenu = computed(() => !props.selectable && !!props.state);
89
+ const hasMenu = computed(() => {
90
+ if (props.selectable || !props.state) return false;
91
+ if (props.disable) {
92
+ return !!(props.item.pinned || props.item.bookmarked);
93
+ }
94
+ return true;
95
+ });
81
96
  const onMenuAction = (name) => {
82
97
  emit("action", name, props.item);
83
98
  };
@@ -16,6 +16,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
16
16
  onAction?: ((name: string, item: CardContentItem) => any) | undefined;
17
17
  }>, {
18
18
  selectable: boolean;
19
+ disable: boolean;
19
20
  disabledNavigate: boolean;
20
21
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
22
  declare const _default: typeof __VLS_export;
@@ -33,7 +33,7 @@
33
33
  <Icon v-if="isPinned" name="lucide:pin" :size="20" />
34
34
  <PickerOptionMenuUser
35
35
  :state="
36
- props.isMyProfile ? isPinned ? 'my-blog-pined' : 'my-blog' : 'report-announce'
36
+ props.isMyProfile ? isPinned ? 'my-blog-pined' : 'my-blog' : 'blog'
37
37
  "
38
38
  disabled-padding
39
39
  @blog-unpin="onBlogUnpin"
@@ -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;
67
69
  responsive: boolean;
68
70
  restore: boolean;
69
71
  checkCrossOrigin: boolean;
70
72
  checkOrientation: boolean;
71
73
  crossorigin: "" | "anonymous" | "use-credentials";
72
- modal: boolean;
73
74
  guides: boolean;
74
75
  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;
67
69
  responsive: boolean;
68
70
  restore: boolean;
69
71
  checkCrossOrigin: boolean;
70
72
  checkOrientation: boolean;
71
73
  crossorigin: "" | "anonymous" | "use-credentials";
72
- modal: boolean;
73
74
  guides: boolean;
74
75
  highlight: boolean;
75
- background: boolean;
76
76
  autoCrop: boolean;
77
77
  movable: boolean;
78
78
  rotatable: boolean;
@@ -50,10 +50,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
50
50
  name: string;
51
51
  required: boolean;
52
52
  placeholder: string;
53
- gap: string;
54
53
  labelDetail: string;
55
54
  placeholderDetail: string;
56
55
  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;
@@ -50,10 +50,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
50
50
  name: string;
51
51
  required: boolean;
52
52
  placeholder: string;
53
- gap: string;
54
53
  labelDetail: string;
55
54
  placeholderDetail: string;
56
55
  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,13 +49,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
49
49
  name: string;
50
50
  required: boolean;
51
51
  description: string;
52
+ options: AutocompleteOption[] | string[] | number[];
52
53
  labelKey: string;
53
54
  placeholder: string;
54
- options: AutocompleteOption[] | string[] | number[];
55
- limit: number;
56
55
  disabledErrorMessage: boolean;
57
56
  disabledBorder: boolean;
58
57
  showCounter: boolean;
58
+ limit: number;
59
59
  returnObject: boolean;
60
60
  freeText: boolean;
61
61
  valueKey: string;
@@ -49,13 +49,13 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
49
49
  name: string;
50
50
  required: boolean;
51
51
  description: string;
52
+ options: AutocompleteOption[] | string[] | number[];
52
53
  labelKey: string;
53
54
  placeholder: string;
54
- options: AutocompleteOption[] | string[] | number[];
55
- limit: number;
56
55
  disabledErrorMessage: boolean;
57
56
  disabledBorder: boolean;
58
57
  showCounter: boolean;
58
+ limit: number;
59
59
  returnObject: boolean;
60
60
  freeText: boolean;
61
61
  valueKey: string;
@@ -34,9 +34,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
34
34
  name: string;
35
35
  fullHeight: boolean;
36
36
  fullWidth: boolean;
37
+ disabledErrorMessage: boolean;
37
38
  limit: number;
38
39
  accept: string;
39
- disabledErrorMessage: boolean;
40
40
  labelIcon: string;
41
41
  disabledDrop: boolean;
42
42
  column: boolean;
@@ -34,9 +34,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
34
34
  name: string;
35
35
  fullHeight: boolean;
36
36
  fullWidth: boolean;
37
+ disabledErrorMessage: boolean;
37
38
  limit: number;
38
39
  accept: string;
39
- disabledErrorMessage: boolean;
40
40
  labelIcon: string;
41
41
  disabledDrop: boolean;
42
42
  column: boolean;
@@ -17,8 +17,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
17
17
  label: string;
18
18
  name: string;
19
19
  modelValue: InputLinkItem[] | ContactChannel[];
20
- limit: number;
21
20
  showCounter: boolean;
21
+ limit: number;
22
22
  format: "legacy" | "contact_channel";
23
23
  hideType: boolean;
24
24
  hideAddButton: boolean;
@@ -17,8 +17,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
17
17
  label: string;
18
18
  name: string;
19
19
  modelValue: InputLinkItem[] | ContactChannel[];
20
- limit: number;
21
20
  showCounter: boolean;
21
+ limit: number;
22
22
  format: "legacy" | "contact_channel";
23
23
  hideType: boolean;
24
24
  hideAddButton: boolean;
@@ -11,10 +11,10 @@ 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[];
16
- limit: number;
15
+ placeholder: string;
17
16
  showCounter: boolean;
17
+ limit: number;
18
18
  addLabel: string;
19
19
  removable: boolean;
20
20
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -11,10 +11,10 @@ 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[];
16
- limit: number;
15
+ placeholder: string;
17
16
  showCounter: boolean;
17
+ limit: number;
18
18
  addLabel: string;
19
19
  removable: boolean;
20
20
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -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;
@@ -11,12 +11,12 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
11
11
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
12
  "update:modelValue": (value: File | null) => any;
13
13
  } & {
14
- complete: (file: File) => any;
15
14
  remove: () => any;
15
+ complete: (file: File) => any;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
17
  "onUpdate:modelValue"?: ((value: File | null) => any) | undefined;
18
- onComplete?: ((file: File) => any) | undefined;
19
18
  onRemove?: (() => any) | undefined;
19
+ onComplete?: ((file: File) => any) | undefined;
20
20
  }>, {
21
21
  name: string;
22
22
  disabledErrorMessage: boolean;
@@ -11,12 +11,12 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
11
11
  declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
12
  "update:modelValue": (value: File | null) => any;
13
13
  } & {
14
- complete: (file: File) => any;
15
14
  remove: () => any;
15
+ complete: (file: File) => any;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
17
17
  "onUpdate:modelValue"?: ((value: File | null) => any) | undefined;
18
- onComplete?: ((file: File) => any) | undefined;
19
18
  onRemove?: (() => any) | undefined;
19
+ onComplete?: ((file: File) => any) | undefined;
20
20
  }>, {
21
21
  name: string;
22
22
  disabledErrorMessage: boolean;
@@ -3,6 +3,7 @@ export interface SelectPlaceItem {
3
3
  name: string;
4
4
  address: string;
5
5
  image: string;
6
+ post_count?: number;
6
7
  }
7
8
  interface InputSelectPlaceProps {
8
9
  label?: string;
@@ -21,13 +21,13 @@
21
21
  <Image
22
22
  v-if="place.image"
23
23
  :src="place.image"
24
- :width="70"
25
- :height="40"
24
+ :width="105"
25
+ :height="60"
26
26
  class="shrink-0 rounded-[4px]"
27
27
  />
28
28
  <div
29
29
  v-else
30
- class="w-[70px] h-[40px] bg-cloud flex items-center justify-center rounded-[4px]"
30
+ class="w-[105px] h-[60px] bg-cloud flex items-center justify-center rounded-[4px]"
31
31
  >
32
32
  <Icon
33
33
  name="pukaad:map-location-dot"
@@ -40,6 +40,9 @@
40
40
  <div class="font-body-small text-gray truncate">
41
41
  {{ place.address }}
42
42
  </div>
43
+ <div class="font-body-small text-gray">
44
+ {{ $convert.convertNumber(place.post_count ?? 0) }} โพสต์
45
+ </div>
43
46
  </div>
44
47
  <Icon
45
48
  v-if="isSelected(place.id)"
@@ -84,13 +87,13 @@
84
87
  <Image
85
88
  v-if="item.image"
86
89
  :src="item.image"
87
- :width="70"
88
- :height="40"
90
+ :width="105"
91
+ :height="60"
89
92
  class="shrink-0 rounded-[4px]"
90
93
  />
91
94
  <div
92
95
  v-else
93
- class="w-[70px] h-[40px] bg-cloud flex items-center justify-center rounded-[4px]"
96
+ class="w-[105px] h-[60px] bg-cloud flex items-center justify-center rounded-[4px]"
94
97
  >
95
98
  <Icon
96
99
  name="pukaad:map-location-dot"
@@ -103,6 +106,9 @@
103
106
  <div class="font-body-small text-gray w-full truncate">
104
107
  {{ item.address }}
105
108
  </div>
109
+ <div class="font-body-small text-gray">
110
+ {{ $convert.convertNumber(item.post_count ?? 0) }} โพสต์
111
+ </div>
106
112
  </div>
107
113
  <Icon
108
114
  name="lucide:x"
@@ -138,7 +144,8 @@ const mapPlace = (raw) => ({
138
144
  id: raw.id,
139
145
  name: raw.name,
140
146
  address: raw.address,
141
- image: raw.cover_image
147
+ image: raw.cover_image,
148
+ post_count: raw.post_count ?? 0
142
149
  });
143
150
  const performSearch = async (q) => {
144
151
  isSearching.value = true;
@@ -205,7 +212,9 @@ const handleSuggestPlaceCreated = (_data, record) => {
205
212
  id,
206
213
  name: String(record.business_name ?? ""),
207
214
  address: address?.full_address ?? "",
208
- image: String(record.image_cover ?? "")
215
+ image: String(record.image_cover ?? ""),
216
+ post_count: 0
217
+ // สถานที่เพิ่งสร้างใหม่ ยังไม่มีโพสต์ผูกแน่นอน
209
218
  };
210
219
  selectedCache.value.set(id, item);
211
220
  if (!selectedIds.value.includes(id)) {
@@ -3,6 +3,7 @@ export interface SelectPlaceItem {
3
3
  name: string;
4
4
  address: string;
5
5
  image: string;
6
+ post_count?: number;
6
7
  }
7
8
  interface InputSelectPlaceProps {
8
9
  label?: string;
@@ -22,10 +22,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
22
22
  description: string;
23
23
  labelKey: string;
24
24
  placeholder: string;
25
- limit: number;
26
25
  disabledErrorMessage: boolean;
27
26
  disabledBorder: boolean;
28
27
  showCounter: boolean;
28
+ limit: number;
29
29
  descriptionKey: string;
30
30
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
31
  declare const _default: typeof __VLS_export;
@@ -22,10 +22,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
22
22
  description: string;
23
23
  labelKey: string;
24
24
  placeholder: string;
25
- limit: number;
26
25
  disabledErrorMessage: boolean;
27
26
  disabledBorder: boolean;
28
27
  showCounter: boolean;
28
+ limit: number;
29
29
  descriptionKey: string;
30
30
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
31
  declare const _default: typeof __VLS_export;
@@ -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
- placeholder: string;
29
28
  state: "user" | "admin";
29
+ placeholder: string;
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
- placeholder: string;
29
28
  state: "user" | "admin";
29
+ placeholder: string;
30
30
  limit: number;
31
31
  ignore: string[];
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -59,11 +59,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
59
59
  id: string;
60
60
  name: string;
61
61
  required: boolean;
62
- limit: number;
63
62
  readonly: boolean;
64
63
  disabledErrorMessage: boolean;
65
64
  disabledBorder: boolean;
66
65
  showCounter: boolean;
66
+ limit: number;
67
67
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
68
68
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
69
69
  declare const _default: typeof __VLS_export;
@@ -59,11 +59,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
59
59
  id: string;
60
60
  name: string;
61
61
  required: boolean;
62
- limit: number;
63
62
  readonly: boolean;
64
63
  disabledErrorMessage: boolean;
65
64
  disabledBorder: boolean;
66
65
  showCounter: boolean;
66
+ limit: number;
67
67
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
68
68
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
69
69
  declare const _default: typeof __VLS_export;
@@ -47,11 +47,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
47
47
  fullHeight: boolean;
48
48
  fullWidth: boolean;
49
49
  rows: number;
50
- limit: number;
51
50
  readonly: boolean;
52
51
  disabledErrorMessage: boolean;
53
52
  disabledBorder: boolean;
54
53
  showCounter: boolean;
54
+ limit: number;
55
55
  heightScroll: boolean;
56
56
  spaceToComma: boolean;
57
57
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -47,11 +47,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
47
47
  fullHeight: boolean;
48
48
  fullWidth: boolean;
49
49
  rows: number;
50
- limit: number;
51
50
  readonly: boolean;
52
51
  disabledErrorMessage: boolean;
53
52
  disabledBorder: boolean;
54
53
  showCounter: boolean;
54
+ limit: number;
55
55
  heightScroll: boolean;
56
56
  spaceToComma: boolean;
57
57
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
22
22
  name: string;
23
23
  required: boolean;
24
24
  options: import("../../../types/components/input/input-select.js").InputSelectItem[];
25
- limit: number;
26
25
  showCounter: boolean;
26
+ limit: number;
27
27
  removable: boolean;
28
28
  selectClass: import("vue").HTMLAttributes["class"];
29
29
  resetOnTypeChange: boolean;
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
22
22
  name: string;
23
23
  required: boolean;
24
24
  options: import("../../../types/components/input/input-select.js").InputSelectItem[];
25
- limit: number;
26
25
  showCounter: boolean;
26
+ limit: number;
27
27
  removable: boolean;
28
28
  selectClass: import("vue").HTMLAttributes["class"];
29
29
  resetOnTypeChange: boolean;
@@ -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;
@@ -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
- confirmText: string;
36
35
  disabledForgotPassword: boolean;
36
+ confirmText: string;
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
- confirmText: string;
36
35
  disabledForgotPassword: boolean;
36
+ confirmText: string;
37
37
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
38
38
  declare const _default: typeof __VLS_export;
39
39
  export default _default;
@@ -1,51 +1,8 @@
1
1
  import type { PickerOptionMenuUserProps } from "#pukaad-ui/types/components/picker/picker-option-menu/picker-option-menu-user";
2
- import type { ModalReportSubmitPayload } from "#pukaad-ui/types/components/modal/modal-report";
3
2
  declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
4
- "blog-edit": () => any;
5
- "report-announce": () => any;
6
- "blog-unpin": () => any;
7
- "blog-pin": () => any;
8
- "blog-delete": () => any;
9
- "reply-delete": () => any;
10
- "report-review": () => any;
11
- "review-edit": () => any;
12
- "review-delete": () => any;
13
- "review-reply": () => any;
14
- "reply-edit": () => any;
15
- "profile-name-updated": (name: string) => any;
16
- "profile-edit": () => any;
17
- "profile-share": () => any;
18
- "profile-follower-delete": () => any;
19
- "profile-block": () => any;
20
- "report-blog": () => any;
21
- "report-place": () => any;
22
- "report-profile": () => any;
23
- "place-close-duplicate": () => any;
24
- archive: () => any;
25
- "report-submit": (payload: ModalReportSubmitPayload) => any;
3
+ [x: string]: any;
26
4
  }, string, import("vue").PublicProps, Readonly<PickerOptionMenuUserProps> & Readonly<{
27
- "onBlog-edit"?: (() => any) | undefined;
28
- "onReport-announce"?: (() => any) | undefined;
29
- "onBlog-unpin"?: (() => any) | undefined;
30
- "onBlog-pin"?: (() => any) | undefined;
31
- "onBlog-delete"?: (() => any) | undefined;
32
- "onReply-delete"?: (() => any) | undefined;
33
- "onReport-review"?: (() => any) | undefined;
34
- "onReview-edit"?: (() => any) | undefined;
35
- "onReview-delete"?: (() => any) | undefined;
36
- "onReview-reply"?: (() => any) | undefined;
37
- "onReply-edit"?: (() => any) | undefined;
38
- "onProfile-name-updated"?: ((name: string) => any) | undefined;
39
- "onProfile-edit"?: (() => any) | undefined;
40
- "onProfile-share"?: (() => any) | undefined;
41
- "onProfile-follower-delete"?: (() => any) | undefined;
42
- "onProfile-block"?: (() => any) | undefined;
43
- "onReport-blog"?: (() => any) | undefined;
44
- "onReport-place"?: (() => any) | undefined;
45
- "onReport-profile"?: (() => any) | undefined;
46
- "onPlace-close-duplicate"?: (() => any) | undefined;
47
- onArchive?: (() => any) | undefined;
48
- "onReport-submit"?: ((payload: ModalReportSubmitPayload) => any) | undefined;
5
+ [x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
49
6
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
50
7
  declare const _default: typeof __VLS_export;
51
8
  export default _default;
@@ -25,7 +25,7 @@
25
25
 
26
26
  <script setup>
27
27
  import { computed, ref } from "vue";
28
- const emit = defineEmits(["profile-edit", "profile-share", "profile-follower-delete", "profile-block", "blog-pin", "blog-unpin", "blog-edit", "blog-delete", "report-blog", "report-place", "report-profile", "report-announce", "report-review", "place-close-duplicate", "review-edit", "review-delete", "review-reply", "reply-edit", "reply-delete", "archive", "profile-name-updated", "report-submit"]);
28
+ const emit = defineEmits(["profile-edit", "profile-share", "profile-follower-delete", "profile-block", "blog-pin", "blog-unpin", "blog-edit", "blog-delete", "report-blog", "report-place", "report-profile", "delete", "report", "report-review", "place-close-duplicate", "review-edit", "review-delete", "review-reply", "reply-edit", "reply-delete", "archive", "profile-name-updated", "report-submit"]);
29
29
  const props = defineProps({
30
30
  state: { type: String, required: false },
31
31
  profileDetail: { type: Object, required: false },
@@ -161,13 +161,23 @@ const menu = [
161
161
  }
162
162
  },
163
163
  {
164
- label: "\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19\u0E40\u0E19\u0E37\u0E49\u0E2D\u0E2B\u0E32\u0E19\u0E35\u0E49",
165
- name: "report-announce",
164
+ label: "\u0E23\u0E32\u0E22\u0E07\u0E32\u0E19",
165
+ name: "report",
166
166
  icon: "fa6-regular:flag",
167
167
  action: () => {
168
168
  isOpenModalReport.value = true;
169
- reportState.value = "announce";
170
- emit("report-announce");
169
+ reportState.value = "content";
170
+ emit("report");
171
+ emit("report-blog");
172
+ }
173
+ },
174
+ {
175
+ label: "\u0E25\u0E1A",
176
+ name: "delete",
177
+ icon: "lucide:trash-2",
178
+ action: () => {
179
+ emit("delete");
180
+ emit("blog-delete");
171
181
  }
172
182
  },
173
183
  // ลำดับใน array นี้ = ลำดับที่แสดงในเมนู (items ใช้ menu.filter ซึ่งคงลำดับเดิมไว้)
@@ -279,9 +289,14 @@ const items = computed(() => {
279
289
  }
280
290
  ];
281
291
  }
282
- if (props.state === "report-announce") {
292
+ if (props.state === "report") {
293
+ return menu.filter(
294
+ (item) => ["report"].includes(item.name)
295
+ );
296
+ }
297
+ if (props.state === "delete") {
283
298
  return menu.filter(
284
- (item) => ["report-announce"].includes(item.name)
299
+ (item) => ["delete"].includes(item.name)
285
300
  );
286
301
  }
287
302
  return [];
@@ -1,51 +1,8 @@
1
1
  import type { PickerOptionMenuUserProps } from "#pukaad-ui/types/components/picker/picker-option-menu/picker-option-menu-user";
2
- import type { ModalReportSubmitPayload } from "#pukaad-ui/types/components/modal/modal-report";
3
2
  declare const __VLS_export: import("vue").DefineComponent<PickerOptionMenuUserProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
4
- "blog-edit": () => any;
5
- "report-announce": () => any;
6
- "blog-unpin": () => any;
7
- "blog-pin": () => any;
8
- "blog-delete": () => any;
9
- "reply-delete": () => any;
10
- "report-review": () => any;
11
- "review-edit": () => any;
12
- "review-delete": () => any;
13
- "review-reply": () => any;
14
- "reply-edit": () => any;
15
- "profile-name-updated": (name: string) => any;
16
- "profile-edit": () => any;
17
- "profile-share": () => any;
18
- "profile-follower-delete": () => any;
19
- "profile-block": () => any;
20
- "report-blog": () => any;
21
- "report-place": () => any;
22
- "report-profile": () => any;
23
- "place-close-duplicate": () => any;
24
- archive: () => any;
25
- "report-submit": (payload: ModalReportSubmitPayload) => any;
3
+ [x: string]: any;
26
4
  }, string, import("vue").PublicProps, Readonly<PickerOptionMenuUserProps> & Readonly<{
27
- "onBlog-edit"?: (() => any) | undefined;
28
- "onReport-announce"?: (() => any) | undefined;
29
- "onBlog-unpin"?: (() => any) | undefined;
30
- "onBlog-pin"?: (() => any) | undefined;
31
- "onBlog-delete"?: (() => any) | undefined;
32
- "onReply-delete"?: (() => any) | undefined;
33
- "onReport-review"?: (() => any) | undefined;
34
- "onReview-edit"?: (() => any) | undefined;
35
- "onReview-delete"?: (() => any) | undefined;
36
- "onReview-reply"?: (() => any) | undefined;
37
- "onReply-edit"?: (() => any) | undefined;
38
- "onProfile-name-updated"?: ((name: string) => any) | undefined;
39
- "onProfile-edit"?: (() => any) | undefined;
40
- "onProfile-share"?: (() => any) | undefined;
41
- "onProfile-follower-delete"?: (() => any) | undefined;
42
- "onProfile-block"?: (() => any) | undefined;
43
- "onReport-blog"?: (() => any) | undefined;
44
- "onReport-place"?: (() => any) | undefined;
45
- "onReport-profile"?: (() => any) | undefined;
46
- "onPlace-close-duplicate"?: (() => any) | undefined;
47
- onArchive?: (() => any) | undefined;
48
- "onReport-submit"?: ((payload: ModalReportSubmitPayload) => any) | undefined;
5
+ [x: `on${Capitalize<any>}`]: ((...args: any) => any) | undefined;
49
6
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
50
7
  declare const _default: typeof __VLS_export;
51
8
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.389.0",
3
+ "version": "1.391.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",