@myissue/vue-website-page-builder 3.2.69 → 3.2.71

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myissue/vue-website-page-builder",
3
- "version": "v3.2.69",
3
+ "version": "v3.2.71",
4
4
  "description": "Vue 3 page builder component with drag & drop functionality.",
5
5
  "type": "module",
6
6
  "main": "./dist/vue-website-page-builder.umd.cjs",
@@ -1134,8 +1134,35 @@ class PageBuilderClass {
1134
1134
  })
1135
1135
  })
1136
1136
 
1137
- if (this.getLocalStorageItemName.value) {
1138
- localStorage.setItem(this.getLocalStorageItemName.value, JSON.stringify(componentsToSave))
1137
+ if (
1138
+ this.pageBuilderStateStore.getConfigPageBuilder &&
1139
+ this.pageBuilderStateStore.getConfigPageBuilder.updateOrCreate &&
1140
+ typeof this.pageBuilderStateStore.getConfigPageBuilder.updateOrCreate.formType === 'string' &&
1141
+ this.pageBuilderStateStore.getConfigPageBuilder.updateOrCreate.formType === 'update'
1142
+ ) {
1143
+ if (
1144
+ typeof this.getLocalStorageItemName.value === 'string' &&
1145
+ this.getLocalStorageItemName.value
1146
+ ) {
1147
+ const item = {
1148
+ components: componentsToSave,
1149
+ savedAt: new Date().toISOString(),
1150
+ }
1151
+ localStorage.setItem(this.getLocalStorageItemName.value, JSON.stringify(item))
1152
+
1153
+ return
1154
+ }
1155
+ }
1156
+
1157
+ if (
1158
+ typeof this.getLocalStorageItemName.value === 'string' &&
1159
+ this.getLocalStorageItemName.value
1160
+ ) {
1161
+ const item = {
1162
+ components: componentsToSave,
1163
+ savedAt: new Date().toISOString(),
1164
+ }
1165
+ localStorage.setItem(this.getLocalStorageItemName.value, JSON.stringify(item))
1139
1166
  }
1140
1167
 
1141
1168
  // No DOM mutation here!