@skyservice-developers/vue-dev-kit 1.3.2 → 1.3.3

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": "@skyservice-developers/vue-dev-kit",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Vue 2 and Vue 3 developer toolkit - components and helpers",
5
5
  "type": "module",
6
6
  "main": "./dist/vue3/vue-dev-kit.cjs",
@@ -149,11 +149,23 @@ if (isInIframe() && props.trackPageName) {
149
149
  })
150
150
  }
151
151
 
152
- // Set rocketMode in parent
152
+ // Set rocketMode in parent, remember previous value to restore on unmount
153
+ const previousRocketMode = ref(null)
154
+
153
155
  if (isInIframe()) {
154
- sendToParent({ type: 'setRocketMode', value: true })
156
+ getParentLocalStorage('rocketMode').then((value) => {
157
+ previousRocketMode.value = value
158
+ sendToParent({ type: 'setRocketMode', value: true })
159
+ })
155
160
  }
156
161
 
162
+ onUnmounted(() => {
163
+ if (isInIframe() && previousRocketMode.value !== null) {
164
+ const restore = previousRocketMode.value === 'true'
165
+ sendToParent({ type: 'setRocketMode', value: restore })
166
+ }
167
+ })
168
+
157
169
  // Load translations from parent
158
170
  if (isInIframe()) {
159
171
  getParentWindowValue('lang').then((data) => {