pukaad-ui-lib 1.451.0 → 1.453.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 (29) hide show
  1. package/dist/module.d.mts +0 -1
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +0 -5
  4. package/dist/runtime/components/card/card-place/card-place.vue +1 -1
  5. package/dist/runtime/components/display/display-video.d.vue.ts +5 -5
  6. package/dist/runtime/components/display/display-video.vue.d.ts +5 -5
  7. package/dist/runtime/components/input/input-autocomplete.d.vue.ts +1 -1
  8. package/dist/runtime/components/input/input-autocomplete.vue.d.ts +1 -1
  9. package/dist/runtime/components/input/input-combobox.d.vue.ts +1 -1
  10. package/dist/runtime/components/input/input-combobox.vue.d.ts +1 -1
  11. package/dist/runtime/components/input/input-file.d.vue.ts +1 -1
  12. package/dist/runtime/components/input/input-file.vue.d.ts +1 -1
  13. package/dist/runtime/components/input/input-localized-name.d.vue.ts +1 -1
  14. package/dist/runtime/components/input/input-localized-name.vue.d.ts +1 -1
  15. package/dist/runtime/components/input/input-select-place.vue +2 -2
  16. package/dist/runtime/components/input/input-suggest.d.vue.ts +1 -1
  17. package/dist/runtime/components/input/input-suggest.vue.d.ts +1 -1
  18. package/dist/runtime/components/input/input-tag.d.vue.ts +1 -1
  19. package/dist/runtime/components/input/input-tag.vue.d.ts +1 -1
  20. package/dist/runtime/components/input/input-textarea.d.vue.ts +1 -1
  21. package/dist/runtime/components/input/input-textarea.vue.d.ts +1 -1
  22. package/dist/runtime/components/modal/modal-user-account-search.vue +3 -8
  23. package/dist/runtime/components/picker/picker-option-menu/picker-option-menu-user.vue +30 -4
  24. package/package.json +2 -3
  25. package/dist/runtime/components/input/input-recaptcha.d.vue.ts +0 -21
  26. package/dist/runtime/components/input/input-recaptcha.vue +0 -57
  27. package/dist/runtime/components/input/input-recaptcha.vue.d.ts +0 -21
  28. package/dist/runtime/plugins/re-captcha.d.ts +0 -2
  29. package/dist/runtime/plugins/re-captcha.js +0 -13
package/dist/module.d.mts CHANGED
@@ -21,7 +21,6 @@ type ModuleOptions = {
21
21
  rating?: boolean;
22
22
  shadcn?: boolean;
23
23
  tailwind?: boolean;
24
- recaptcha?: boolean;
25
24
  loadingPage?: boolean;
26
25
  alert?: boolean;
27
26
  toast?: boolean;
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
3
  "configKey": "pukaadUI",
4
- "version": "1.451.0",
4
+ "version": "1.453.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -56,7 +56,6 @@ const module$1 = defineNuxtModule({
56
56
  rating: true,
57
57
  shadcn: true,
58
58
  tailwind: true,
59
- recaptcha: false,
60
59
  loadingPage: true,
61
60
  alert: true,
62
61
  toast: true,
@@ -152,9 +151,6 @@ const module$1 = defineNuxtModule({
152
151
  ]
153
152
  });
154
153
  }
155
- if (isEnabled(features.recaptcha, false)) {
156
- addPlugin(resolver.resolve("./runtime/plugins/re-captcha"));
157
- }
158
154
  if (isEnabled(features.loadingPage, true)) {
159
155
  addPlugin(resolver.resolve("./runtime/plugins/loadingPage"));
160
156
  }
@@ -244,7 +240,6 @@ const module$1 = defineNuxtModule({
244
240
  }
245
241
  });
246
242
  _nuxt.options.runtimeConfig.public.BASE_URL_API ??= process.env.BASE_URL_API ?? "";
247
- _nuxt.options.runtimeConfig.public.RECAPTCHA_KEY ??= process.env.RECAPTCHA_KEY ?? "";
248
243
  _nuxt.hook("prepare:types", ({ references }) => {
249
244
  references.push({ path: resolver.resolve("./types/convert.d.ts") });
250
245
  references.push({ path: resolver.resolve("./types/google-translate.d.ts") });
@@ -9,7 +9,7 @@
9
9
  />
10
10
  <div
11
11
  v-else
12
- class="w-[227px] h-[128px] rounded-[4px] flex-shrink-0 bg-cloud flex items-center justify-center"
12
+ class="w-[227px] h-[128px] rounded-[4px] flex-shrink-0 bg-mercury flex items-center justify-center"
13
13
  >
14
14
  <Icon name="pukaad:map-location-dot" :size="36" class="text-gray" />
15
15
  </div>
@@ -81,16 +81,16 @@ declare const __VLS_base: import("vue").DefineComponent<DisplayVideoProps, {
81
81
  toggle: () => void;
82
82
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
83
83
  close: (payload: DisplayVideoAction) => any;
84
- prev: (payload: DisplayVideoAction) => any;
85
- next: (payload: DisplayVideoAction) => any;
86
84
  fullscreen: (payload: DisplayVideoAction) => any;
87
85
  "play-click": (payload: DisplayVideoAction) => any;
86
+ prev: (payload: DisplayVideoAction) => any;
87
+ next: (payload: DisplayVideoAction) => any;
88
88
  }, string, import("vue").PublicProps, Readonly<DisplayVideoProps> & Readonly<{
89
89
  onClose?: ((payload: DisplayVideoAction) => any) | undefined;
90
- onPrev?: ((payload: DisplayVideoAction) => any) | undefined;
91
- onNext?: ((payload: DisplayVideoAction) => any) | undefined;
92
90
  onFullscreen?: ((payload: DisplayVideoAction) => any) | undefined;
93
91
  "onPlay-click"?: ((payload: DisplayVideoAction) => any) | undefined;
92
+ onPrev?: ((payload: DisplayVideoAction) => any) | undefined;
93
+ onNext?: ((payload: DisplayVideoAction) => any) | undefined;
94
94
  }>, {
95
95
  src: string;
96
96
  fullWidth: boolean;
@@ -102,9 +102,9 @@ declare const __VLS_base: import("vue").DefineComponent<DisplayVideoProps, {
102
102
  loop: boolean;
103
103
  controls: boolean;
104
104
  preload: "none" | "metadata" | "auto";
105
- playsinline: boolean;
106
105
  sources: DisplayVideoSource[];
107
106
  tracks: DisplayVideoTrack[];
107
+ playsinline: boolean;
108
108
  disablePictureInPicture: boolean;
109
109
  disableRemotePlayback: boolean;
110
110
  volume: number;
@@ -81,16 +81,16 @@ declare const __VLS_base: import("vue").DefineComponent<DisplayVideoProps, {
81
81
  toggle: () => void;
82
82
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
83
83
  close: (payload: DisplayVideoAction) => any;
84
- prev: (payload: DisplayVideoAction) => any;
85
- next: (payload: DisplayVideoAction) => any;
86
84
  fullscreen: (payload: DisplayVideoAction) => any;
87
85
  "play-click": (payload: DisplayVideoAction) => any;
86
+ prev: (payload: DisplayVideoAction) => any;
87
+ next: (payload: DisplayVideoAction) => any;
88
88
  }, string, import("vue").PublicProps, Readonly<DisplayVideoProps> & Readonly<{
89
89
  onClose?: ((payload: DisplayVideoAction) => any) | undefined;
90
- onPrev?: ((payload: DisplayVideoAction) => any) | undefined;
91
- onNext?: ((payload: DisplayVideoAction) => any) | undefined;
92
90
  onFullscreen?: ((payload: DisplayVideoAction) => any) | undefined;
93
91
  "onPlay-click"?: ((payload: DisplayVideoAction) => any) | undefined;
92
+ onPrev?: ((payload: DisplayVideoAction) => any) | undefined;
93
+ onNext?: ((payload: DisplayVideoAction) => any) | undefined;
94
94
  }>, {
95
95
  src: string;
96
96
  fullWidth: boolean;
@@ -102,9 +102,9 @@ declare const __VLS_base: import("vue").DefineComponent<DisplayVideoProps, {
102
102
  loop: boolean;
103
103
  controls: boolean;
104
104
  preload: "none" | "metadata" | "auto";
105
- playsinline: boolean;
106
105
  sources: DisplayVideoSource[];
107
106
  tracks: DisplayVideoTrack[];
107
+ playsinline: boolean;
108
108
  disablePictureInPicture: boolean;
109
109
  disableRemotePlayback: boolean;
110
110
  volume: number;
@@ -70,9 +70,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
70
70
  required: boolean;
71
71
  description: string;
72
72
  options: AutocompleteOption[] | string[] | number[];
73
+ limit: number;
73
74
  labelKey: string;
74
75
  placeholder: string;
75
- limit: number;
76
76
  disabledErrorMessage: boolean;
77
77
  disabledBorder: boolean;
78
78
  showCounter: boolean;
@@ -70,9 +70,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
70
70
  required: boolean;
71
71
  description: string;
72
72
  options: AutocompleteOption[] | string[] | number[];
73
+ limit: number;
73
74
  labelKey: string;
74
75
  placeholder: string;
75
- limit: number;
76
76
  disabledErrorMessage: boolean;
77
77
  disabledBorder: boolean;
78
78
  showCounter: boolean;
@@ -60,8 +60,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
60
60
  }>, {
61
61
  pageSize: number;
62
62
  name: string;
63
- labelKey: string;
64
63
  limit: number;
64
+ labelKey: string;
65
65
  valueKey: string;
66
66
  multiple: boolean;
67
67
  placeholderSearch: string;
@@ -60,8 +60,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
60
60
  }>, {
61
61
  pageSize: number;
62
62
  name: string;
63
- labelKey: string;
64
63
  limit: number;
64
+ labelKey: string;
65
65
  valueKey: string;
66
66
  multiple: boolean;
67
67
  placeholderSearch: string;
@@ -37,8 +37,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
37
37
  fullWidth: boolean;
38
38
  fullHeight: boolean;
39
39
  limit: number;
40
- disabledErrorMessage: boolean;
41
40
  accept: string;
41
+ disabledErrorMessage: boolean;
42
42
  labelIcon: string;
43
43
  disabledDrop: boolean;
44
44
  column: boolean;
@@ -37,8 +37,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
37
37
  fullWidth: boolean;
38
38
  fullHeight: boolean;
39
39
  limit: number;
40
- disabledErrorMessage: boolean;
41
40
  accept: string;
41
+ disabledErrorMessage: boolean;
42
42
  labelIcon: string;
43
43
  disabledDrop: boolean;
44
44
  column: boolean;
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
12
12
  name: string;
13
13
  modelValue: LocalizedNameItem[];
14
14
  options: InputSelectItem[];
15
- placeholder: string;
16
15
  limit: number;
16
+ placeholder: string;
17
17
  removable: boolean;
18
18
  showCounter: boolean;
19
19
  addLabel: string;
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
12
12
  name: string;
13
13
  modelValue: LocalizedNameItem[];
14
14
  options: InputSelectItem[];
15
- placeholder: string;
16
15
  limit: number;
16
+ placeholder: string;
17
17
  removable: boolean;
18
18
  showCounter: boolean;
19
19
  addLabel: string;
@@ -36,7 +36,7 @@
36
36
  />
37
37
  <div
38
38
  v-else
39
- class="w-[105px] h-[60px] bg-cloud flex items-center justify-center rounded-[4px]"
39
+ class="w-[105px] h-[60px] bg-mercury flex items-center justify-center rounded-[4px]"
40
40
  >
41
41
  <Icon
42
42
  name="pukaad:map-location-dot"
@@ -118,7 +118,7 @@
118
118
  />
119
119
  <div
120
120
  v-else
121
- class="w-[105px] h-[60px] bg-cloud flex items-center justify-center rounded-[4px]"
121
+ class="w-[105px] h-[60px] bg-mercury flex items-center justify-center rounded-[4px]"
122
122
  >
123
123
  <Icon
124
124
  name="pukaad:map-location-dot"
@@ -20,9 +20,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
20
20
  name: string;
21
21
  required: boolean;
22
22
  description: string;
23
+ limit: number;
23
24
  labelKey: string;
24
25
  placeholder: string;
25
- limit: number;
26
26
  disabledErrorMessage: boolean;
27
27
  disabledBorder: boolean;
28
28
  showCounter: boolean;
@@ -20,9 +20,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
20
20
  name: string;
21
21
  required: boolean;
22
22
  description: string;
23
+ limit: number;
23
24
  labelKey: string;
24
25
  placeholder: string;
25
- limit: number;
26
26
  disabledErrorMessage: boolean;
27
27
  disabledBorder: boolean;
28
28
  showCounter: boolean;
@@ -27,8 +27,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
27
27
  }>, {
28
28
  name: string;
29
29
  state: "user" | "admin";
30
- placeholder: string;
31
30
  limit: number;
31
+ placeholder: string;
32
32
  profileScope: "personal" | "business";
33
33
  ignore: string[];
34
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -27,8 +27,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
27
27
  }>, {
28
28
  name: string;
29
29
  state: "user" | "admin";
30
- placeholder: string;
31
30
  limit: number;
31
+ placeholder: string;
32
32
  profileScope: "personal" | "business";
33
33
  ignore: string[];
34
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -46,8 +46,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
46
46
  resize: "none" | "both" | "horizontal" | "vertical";
47
47
  fullWidth: boolean;
48
48
  fullHeight: boolean;
49
- rows: number;
50
49
  limit: number;
50
+ rows: number;
51
51
  readonly: boolean;
52
52
  disabledErrorMessage: boolean;
53
53
  disabledBorder: boolean;
@@ -46,8 +46,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
46
46
  resize: "none" | "both" | "horizontal" | "vertical";
47
47
  fullWidth: boolean;
48
48
  fullHeight: boolean;
49
- rows: number;
50
49
  limit: number;
50
+ rows: number;
51
51
  readonly: boolean;
52
52
  disabledErrorMessage: boolean;
53
53
  disabledBorder: boolean;
@@ -5,7 +5,7 @@
5
5
  width="425px"
6
6
  :loading="isLoading"
7
7
  >
8
- <!-- Step 1: phone + recaptcha -->
8
+ <!-- Step 1: phone -->
9
9
  <div v-if="step === 'search'" class="flex flex-col gap-[24px]">
10
10
  <p class="font-body-large">
11
11
  ป้อนเบอร์โทรศัพท์ที่เชื่อมโยงกับบัญชีของคุณ เพื่อเปลี่ยนรหัสผ่าน
@@ -15,7 +15,6 @@
15
15
  placeholder="กรอกเบอร์โทรศัพท์"
16
16
  v-model="phone"
17
17
  />
18
- <InputRecaptcha ref="recaptchaRef" name="recaptcha" v-model="recaptcha" />
19
18
  </div>
20
19
 
21
20
  <!-- Step 2: select OTP method -->
@@ -48,7 +47,7 @@
48
47
  v-if="step === 'search'"
49
48
  class="w-full"
50
49
  color="primary"
51
- :disabled="!phone || !recaptcha || isLoading"
50
+ :disabled="!phone || isLoading"
52
51
  @click="onSearchNext"
53
52
  >
54
53
  ถัดไป
@@ -85,8 +84,6 @@ const modelValue = defineModel({ type: Boolean, ...{ default: false } });
85
84
  const step = ref("search");
86
85
  const isLoading = ref(false);
87
86
  const phone = ref("");
88
- const recaptcha = ref("");
89
- const recaptchaRef = ref(null);
90
87
  const maskedPhone = ref("");
91
88
  const maskedEmail = ref(null);
92
89
  const hasEmail = ref(false);
@@ -105,7 +102,7 @@ const onSearchNext = async () => {
105
102
  try {
106
103
  const res = await api("/auth/forgot-password/find-account", {
107
104
  method: "POST",
108
- body: { phone: phone.value, token: recaptcha.value }
105
+ body: { phone: phone.value }
109
106
  });
110
107
  maskedPhone.value = res.data.masked_phone;
111
108
  maskedEmail.value = res.data.masked_email;
@@ -136,7 +133,6 @@ const emitComplete = () => {
136
133
  const goBack = () => {
137
134
  step.value = "search";
138
135
  phone.value = "";
139
- recaptcha.value = "";
140
136
  selectedMethod.value = null;
141
137
  maskedPhone.value = "";
142
138
  maskedEmail.value = null;
@@ -146,7 +142,6 @@ watch(modelValue, (v) => {
146
142
  if (!v) {
147
143
  step.value = "search";
148
144
  phone.value = "";
149
- recaptcha.value = "";
150
145
  selectedMethod.value = null;
151
146
  maskedPhone.value = "";
152
147
  maskedEmail.value = null;
@@ -25,7 +25,9 @@
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-content", "report-spotlight", "report-tag", "report-label", "delete-content", "content-delete", "delete", "report", "report-review", "place-close-duplicate", "review-edit", "review-delete", "review-reply", "reply-edit", "reply-delete", "archive", "profile-name-updated", "report-submit"]);
28
+ import { useNuxtApp } from "nuxt/app";
29
+ import { useApi } from "../../../composables/useApi";
30
+ const emit = defineEmits(["profile-edit", "profile-share", "profile-follower-delete", "profile-block", "profile-blocked", "blog-pin", "blog-unpin", "blog-edit", "blog-delete", "report-blog", "report-place", "report-profile", "report-content", "report-spotlight", "report-tag", "report-label", "delete-content", "content-delete", "delete", "report", "report-review", "place-close-duplicate", "review-edit", "review-delete", "review-reply", "reply-edit", "reply-delete", "archive", "profile-name-updated", "report-submit"]);
29
31
  const props = defineProps({
30
32
  state: { type: String, required: false },
31
33
  profileDetail: { type: Object, required: false },
@@ -47,6 +49,29 @@ const onReportSubmit = (payload) => {
47
49
  emit("report-submit", payload);
48
50
  isOpenModalReport.value = false;
49
51
  };
52
+ const { $toast, $alert } = useNuxtApp();
53
+ const api = useApi();
54
+ const onProfileBlock = async () => {
55
+ const profileId = props.profileDetail?.basicId;
56
+ if (!profileId) return;
57
+ const profileName = props.profileDetail?.profileName || "\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49\u0E19\u0E35\u0E49";
58
+ const { isConfirmed } = await $alert.show({
59
+ type: "warning",
60
+ title: "\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E1A\u0E25\u0E47\u0E2D\u0E01\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49\u0E19\u0E35\u0E49\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48 ?",
61
+ description: `${profileName} \u0E08\u0E30\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E02\u0E49\u0E32\u0E16\u0E36\u0E07\u0E42\u0E1E\u0E2A\u0E15\u0E4C\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 \u0E2A\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E16\u0E36\u0E07\u0E04\u0E38\u0E13 \u0E21\u0E2D\u0E07\u0E40\u0E2B\u0E47\u0E19\u0E04\u0E27\u0E32\u0E21\u0E04\u0E34\u0E14\u0E40\u0E2B\u0E47\u0E19 \u0E2B\u0E23\u0E37\u0E2D\u0E23\u0E35\u0E27\u0E34\u0E27\u0E02\u0E2D\u0E07\u0E04\u0E38\u0E13 \u0E41\u0E25\u0E30\u0E08\u0E30\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22`,
62
+ confirmText: "\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19",
63
+ cancelText: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",
64
+ showCancelBtn: true
65
+ });
66
+ if (!isConfirmed) return;
67
+ try {
68
+ await api(`/profiles/${profileId}/block`, { method: "POST" });
69
+ $toast.success(`\u0E1A\u0E25\u0E47\u0E2D\u0E01 ${profileName} \u0E41\u0E25\u0E49\u0E27`);
70
+ emit("profile-blocked", profileId);
71
+ } catch (e) {
72
+ $toast.error(e?.data?.message?.description || "\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E1A\u0E25\u0E47\u0E2D\u0E01\u0E42\u0E1B\u0E23\u0E44\u0E1F\u0E25\u0E4C\u0E44\u0E14\u0E49");
73
+ }
74
+ };
50
75
  const menu = [
51
76
  {
52
77
  label: "\u0E41\u0E01\u0E49\u0E44\u0E02\u0E42\u0E1B\u0E23\u0E44\u0E1F\u0E25\u0E4C",
@@ -75,11 +100,12 @@ const menu = [
75
100
  }
76
101
  },
77
102
  {
78
- label: "\u0E1A\u0E25\u0E47\u0E2D\u0E04",
103
+ label: "\u0E1A\u0E25\u0E47\u0E2D\u0E04\u0E42\u0E1B\u0E23\u0E44\u0E1F\u0E25\u0E4C",
79
104
  name: "profile-block",
80
- icon: "mdi:block-helper",
105
+ icon: "lucide:ban",
81
106
  action: () => {
82
107
  emit("profile-block");
108
+ onProfileBlock();
83
109
  }
84
110
  },
85
111
  {
@@ -272,7 +298,7 @@ const menu = [
272
298
  const items = computed(() => {
273
299
  if (props.state === "profile") {
274
300
  return menu.filter(
275
- (fil) => ["profile-share", "report-profile"].includes(fil.name)
301
+ (fil) => ["profile-share", "profile-block", "report-profile"].includes(fil.name)
276
302
  );
277
303
  }
278
304
  if (props.state === "my-profile") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.451.0",
3
+ "version": "1.453.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",
@@ -65,8 +65,7 @@
65
65
  "tailwind-variants": "^3.1.1",
66
66
  "tailwindcss": "^4.3.0",
67
67
  "tw-animate-css": "^1.4.0",
68
- "vee-validate": "^4.15.1",
69
- "vue3-recaptcha-v2": "^2.1.0"
68
+ "vee-validate": "^4.15.1"
70
69
  },
71
70
  "peerDependencies": {
72
71
  "nuxt": "^3.15.0 || ^4.0.0",
@@ -1,21 +0,0 @@
1
- type __VLS_Props = {
2
- name?: string;
3
- };
4
- type __VLS_ModelProps = {
5
- modelValue?: unknown | string | null;
6
- };
7
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
9
- reset: () => void;
10
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
- "update:modelValue": (value: unknown) => any;
12
- } & {
13
- verify: (token: string) => any;
14
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
15
- "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
16
- onVerify?: ((token: string) => any) | undefined;
17
- }>, {
18
- name: string;
19
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
- declare const _default: typeof __VLS_export;
21
- export default _default;
@@ -1,57 +0,0 @@
1
- <template>
2
- <ShadFormField
3
- :name="props.name"
4
- :rules="rules"
5
- v-slot="{ componentField }"
6
- v-model="tokenValue"
7
- >
8
- <ShadFormItem>
9
- <ShadFormControl>
10
- <input v-bind="componentField" class="hidden" />
11
- <RecaptchaV2
12
- language="th"
13
- @widget-id="handleWidgetId"
14
- @load-callback="onVerify"
15
- @expired-callback="onExpired"
16
- />
17
- <ShadFormMessage />
18
- </ShadFormControl>
19
- </ShadFormItem>
20
- </ShadFormField>
21
- </template>
22
-
23
- <script setup>
24
- import { ref } from "vue";
25
- import { RecaptchaV2, useRecaptcha } from "vue3-recaptcha-v2";
26
- const { handleReset } = useRecaptcha();
27
- const emit = defineEmits(["verify"]);
28
- const props = defineProps({
29
- name: { type: String, required: false, default: "" }
30
- });
31
- const tokenValue = defineModel({ type: null, ...{
32
- default: null
33
- } });
34
- const widgetId = ref();
35
- const onVerify = (token) => {
36
- const t = token;
37
- tokenValue.value = t;
38
- emit("verify", t);
39
- };
40
- const onExpired = () => {
41
- tokenValue.value = null;
42
- };
43
- const rules = () => {
44
- if (!tokenValue.value) return "\u0E01\u0E23\u0E38\u0E13\u0E32\u0E22\u0E37\u0E19\u0E22\u0E31\u0E19\u0E15\u0E31\u0E27\u0E15\u0E19";
45
- return true;
46
- };
47
- const handleWidgetId = (id) => {
48
- widgetId.value = id;
49
- };
50
- const reset = () => {
51
- tokenValue.value = null;
52
- handleReset(widgetId.value ?? 0);
53
- };
54
- defineExpose({
55
- reset
56
- });
57
- </script>
@@ -1,21 +0,0 @@
1
- type __VLS_Props = {
2
- name?: string;
3
- };
4
- type __VLS_ModelProps = {
5
- modelValue?: unknown | string | null;
6
- };
7
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
8
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
9
- reset: () => void;
10
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
- "update:modelValue": (value: unknown) => any;
12
- } & {
13
- verify: (token: string) => any;
14
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
15
- "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
16
- onVerify?: ((token: string) => any) | undefined;
17
- }>, {
18
- name: string;
19
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
- declare const _default: typeof __VLS_export;
21
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
2
- export default _default;
@@ -1,13 +0,0 @@
1
- import { defineNuxtPlugin } from "nuxt/app";
2
- import { install as VueRecaptchaInstall } from "vue3-recaptcha-v2";
3
- export default defineNuxtPlugin((nuxtApp) => {
4
- const recaptchaKey = nuxtApp.$config.public?.RECAPTCHA_KEY;
5
- if (!recaptchaKey) {
6
- console.warn("[reCAPTCHA] RECAPTCHA_KEY is missing in runtime config");
7
- return;
8
- }
9
- nuxtApp.vueApp.use(VueRecaptchaInstall, {
10
- sitekey: String(recaptchaKey),
11
- cnDomains: false
12
- });
13
- });