pukaad-ui-lib 1.279.0 → 1.280.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.280.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -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 () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pukaad-ui-lib",
3
- "version": "1.279.0",
3
+ "version": "1.280.0",
4
4
  "description": "pukaad-ui for MeMSG",
5
5
  "repository": {
6
6
  "type": "git",