pukaad-ui-lib 1.279.0 → 1.281.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.279.0",
4
+ "version": "1.281.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -34,7 +34,7 @@
34
34
  />
35
35
 
36
36
  <!-- <InputCheckbox
37
- name="disableComment"โโห
37
+ name="disableComment"
38
38
  label="ไม่อนุญาตให้แสดงความคิดเห็น"
39
39
  v-model="form.disableComment"
40
40
  /> -->
@@ -87,7 +87,14 @@ const props = defineProps({
87
87
  coverImage: []
88
88
  }) }
89
89
  });
90
- const form = ref(JSON.parse(JSON.stringify(props.item)));
90
+ function cloneItem(item) {
91
+ const { coverImage, ...rest } = item;
92
+ return {
93
+ ...JSON.parse(JSON.stringify(rest)),
94
+ coverImage: coverImage?.map((img) => ({ ...img })) ?? []
95
+ };
96
+ }
97
+ const form = ref(cloneItem(props.item));
91
98
  const isLoading = ref(false);
92
99
  const isOpen = defineModel({ type: Boolean, ...{
93
100
  default: false
@@ -98,7 +105,7 @@ const drawerTitle = computed(() => {
98
105
  });
99
106
  watch(isOpen, (newVal) => {
100
107
  if (newVal) {
101
- form.value = JSON.parse(JSON.stringify(props.item));
108
+ form.value = cloneItem(props.item);
102
109
  }
103
110
  });
104
111
  const onClose = async () => {
@@ -181,7 +188,7 @@ const onSaveDraft = async () => {
181
188
  const store = tx.objectStore("blogDrafts");
182
189
  store.put(draftData);
183
190
  tx.oncomplete = () => {
184
- $toast.success("\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E41\u0E1A\u0E1A\u0E23\u0E48\u0E32\u0E07\u0E44\u0E27\u0E49\u0E43\u0E19\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08");
191
+ $toast.success("\u0E1A\u0E31\u0E19\u0E17\u0E36\u0E01\u0E41\u0E1A\u0E1A\u0E23\u0E48\u0E32\u0E07\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08 !");
185
192
  emit("saveDraft", form.value);
186
193
  isOpen.value = false;
187
194
  };
@@ -226,7 +233,6 @@ const uploadImage = async (file) => {
226
233
  throw new Error("\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2A\u0E23\u0E49\u0E32\u0E07 upload URL \u0E44\u0E14\u0E49");
227
234
  }
228
235
  const item = res.data.items[0];
229
- console.log("Uploading to S3:", item.upload_url);
230
236
  await fetch(item.upload_url, {
231
237
  method: "PUT",
232
238
  body: file,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.279.0",
3
+ "version": "1.281.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",