pukaad-ui-lib 1.283.0 → 1.285.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.283.0",
4
+ "version": "1.285.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -22,8 +22,7 @@ let marker = null;
22
22
  let L = null;
23
23
  let drawDebounceTimer = null;
24
24
  const geoFeatureCache = /* @__PURE__ */ new Map();
25
- const config = useRuntimeConfig();
26
- const appBaseURL = config.app.baseURL.endsWith("/") ? config.app.baseURL.slice(0, -1) : config.app.baseURL;
25
+ let appBaseURL = "";
27
26
  const normalizeCode = (id) => String(id);
28
27
  const getProvinceCode = (provinceId, amphurId) => provinceId ? normalizeCode(provinceId) : amphurId ? normalizeCode(amphurId).slice(0, 2) : "";
29
28
  const getDistrictCode = (amphurId, tambonId) => amphurId ? normalizeCode(amphurId) : tambonId ? normalizeCode(tambonId).slice(0, 4) : "";
@@ -58,6 +57,13 @@ const findFeature = (geoJson, key, value) => {
58
57
  ) ?? null;
59
58
  };
60
59
  onMounted(async () => {
60
+ try {
61
+ const config = useRuntimeConfig();
62
+ const baseURL = config?.app?.baseURL ?? "";
63
+ appBaseURL = baseURL.endsWith("/") ? baseURL.slice(0, -1) : baseURL;
64
+ } catch {
65
+ appBaseURL = "";
66
+ }
61
67
  const leafletModule = await import("leaflet");
62
68
  L = leafletModule.default ?? leafletModule;
63
69
  if (mapContainer.value) {
@@ -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,11 +50,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
50
50
  name: string;
51
51
  description: string;
52
52
  options: AutocompleteOption[] | string[] | number[];
53
- limit: number;
54
53
  placeholder: string;
55
54
  disabledErrorMessage: boolean;
56
55
  disabledBorder: boolean;
57
56
  showCounter: boolean;
57
+ limit: number;
58
58
  returnObject: boolean;
59
59
  freeText: boolean;
60
60
  valueKey: string;
@@ -50,11 +50,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
50
50
  name: string;
51
51
  description: string;
52
52
  options: AutocompleteOption[] | string[] | number[];
53
- limit: number;
54
53
  placeholder: string;
55
54
  disabledErrorMessage: boolean;
56
55
  disabledBorder: boolean;
57
56
  showCounter: boolean;
57
+ limit: number;
58
58
  returnObject: boolean;
59
59
  freeText: boolean;
60
60
  valueKey: string;
@@ -34,8 +34,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
34
34
  fullWidth: boolean;
35
35
  fullHeight: boolean;
36
36
  name: string;
37
- limit: number;
38
37
  disabledErrorMessage: boolean;
38
+ limit: number;
39
39
  accept: string;
40
40
  labelIcon: string;
41
41
  disabledDrop: boolean;
@@ -34,8 +34,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
34
34
  fullWidth: boolean;
35
35
  fullHeight: boolean;
36
36
  name: string;
37
- limit: number;
38
37
  disabledErrorMessage: boolean;
38
+ limit: number;
39
39
  accept: string;
40
40
  labelIcon: string;
41
41
  disabledDrop: boolean;
@@ -26,8 +26,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
26
26
  }>, {
27
27
  name: string;
28
28
  state: "user" | "admin";
29
- limit: number;
30
29
  placeholder: string;
30
+ limit: number;
31
31
  ignore: string[];
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
33
  declare const _default: typeof __VLS_export;
@@ -26,8 +26,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
26
26
  }>, {
27
27
  name: string;
28
28
  state: "user" | "admin";
29
- limit: number;
30
29
  placeholder: string;
30
+ limit: number;
31
31
  ignore: string[];
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
33
  declare const _default: typeof __VLS_export;
@@ -59,10 +59,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
59
59
  required: boolean;
60
60
  id: string;
61
61
  name: string;
62
- limit: number;
63
62
  disabledErrorMessage: boolean;
64
63
  disabledBorder: boolean;
65
64
  showCounter: boolean;
65
+ limit: number;
66
66
  readonly: boolean;
67
67
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
68
68
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -59,10 +59,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
59
59
  required: boolean;
60
60
  id: string;
61
61
  name: string;
62
- limit: number;
63
62
  disabledErrorMessage: boolean;
64
63
  disabledBorder: boolean;
65
64
  showCounter: boolean;
65
+ limit: number;
66
66
  readonly: boolean;
67
67
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
68
68
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -46,10 +46,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
46
46
  id: string;
47
47
  name: string;
48
48
  resize: "none" | "both" | "horizontal" | "vertical";
49
- limit: number;
50
49
  disabledErrorMessage: boolean;
51
50
  disabledBorder: boolean;
52
51
  showCounter: boolean;
52
+ limit: number;
53
53
  readonly: boolean;
54
54
  rows: number;
55
55
  heightScroll: boolean;
@@ -46,10 +46,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
46
46
  id: string;
47
47
  name: string;
48
48
  resize: "none" | "both" | "horizontal" | "vertical";
49
- limit: number;
50
49
  disabledErrorMessage: boolean;
51
50
  disabledBorder: boolean;
52
51
  showCounter: boolean;
52
+ limit: number;
53
53
  readonly: boolean;
54
54
  rows: number;
55
55
  heightScroll: boolean;
@@ -1,14 +1,34 @@
1
1
  <template>
2
- <Modal :title="props.title" :loading="loading" v-model="isOpen" @close="emit('close')" @submit="handleSubmit"
3
- width="425px">
2
+ <Modal
3
+ :title="props.title"
4
+ :loading="loading"
5
+ v-model="isOpen"
6
+ @close="emit('close')"
7
+ @submit="handleSubmit"
8
+ width="425px"
9
+ >
4
10
  <div class="flex flex-col gap-2">
5
- <InputPassword disabled-forgot-password new required label="รหัสผ่าน" placeholder="กรอกรหัสผ่าน"
6
- v-model="password" />
7
- <InputCheckbox v-if="!props.disabledForceLogout" label="ออกจากระบบ Pukaad ในอุปกรณ์อื่นๆทั้งหมด"
8
- v-model="logoutAll" />
11
+ <InputPassword
12
+ disabled-forgot-password
13
+ new
14
+ required
15
+ label="รหัสผ่าน"
16
+ placeholder="กรอกรหัสผ่าน"
17
+ v-model="password"
18
+ />
19
+ <InputCheckbox
20
+ v-if="!props.disabledForceLogout"
21
+ label="ออกจากระบบ Pukaad ในอุปกรณ์อื่นๆทั้งหมด"
22
+ v-model="logoutAll"
23
+ />
9
24
  </div>
10
25
  <template #footer="{ meta }">
11
- <Button type="submit" color="primary" class="w-full" :disabled="!meta.valid">
26
+ <Button
27
+ type="submit"
28
+ color="primary"
29
+ class="w-full"
30
+ :disabled="!meta.valid"
31
+ >
12
32
  {{ props.confirmText }}
13
33
  </Button>
14
34
  </template>
@@ -92,9 +112,6 @@ const handleSubmit = async () => {
92
112
  } else if (!props.loginToken) {
93
113
  $toast?.error?.("\u0E44\u0E21\u0E48\u0E1E\u0E1A login token");
94
114
  return;
95
- } else if (!props.oldPassword) {
96
- $toast?.error?.("\u0E44\u0E21\u0E48\u0E1E\u0E1A \u0E23\u0E2B\u0E31\u0E2A\u0E1C\u0E48\u0E32\u0E19\u0E40\u0E14\u0E34\u0E21");
97
- return;
98
115
  }
99
116
  loading.value = true;
100
117
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.283.0",
3
+ "version": "1.285.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",