@iframe-resizer/vue 5.0.0-beta.1 → 5.0.1-beta.1

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/README.md CHANGED
@@ -22,4 +22,4 @@ yarn add @iframe-resizer/vue
22
22
 
23
23
  ---
24
24
 
25
- _iframe-resizer version 5.0.1 2024-05-28 - 19:45:39.232Z_
25
+ _iframe-resizer version 5.0.1 2024-05-29 - 15:28:21.014Z_
@@ -2,12 +2,13 @@
2
2
  <iframe ref="iframe" v-bind="$attrs"></iframe>
3
3
  </template>
4
4
 
5
- <script setup>
5
+ <script>
6
6
  import connectResizer from '@iframe-resizer/core'
7
7
 
8
- const emit = defineEmits(['onReady', 'onMessage', 'onResized'])
8
+ export default {
9
+ name: 'IframeResizer',
9
10
 
10
- defineProps({
11
+ props: {
11
12
  license: {
12
13
  type: String,
13
14
  required: true
@@ -43,10 +44,7 @@
43
44
  warningTimeout: {
44
45
  type: Number,
45
46
  },
46
- })
47
-
48
- defineOptions({
49
- name: 'IframeResizer',
47
+ },
50
48
 
51
49
  mounted() {
52
50
  const self = this
@@ -58,7 +56,7 @@
58
56
  .filter(([key, value]) => value !== undefined)
59
57
  ),
60
58
 
61
- onClose:() => false, // Disable close methods, use Vue to remove iframe
59
+ onClose: () => false, // Disable close methods, use Vue to remove iframe
62
60
  onReady: (...args) => self.$emit('onReady', ...args),
63
61
  onMessage: (...args) => self.$emit('onMessage', ...args),
64
62
  onResized: (...args) => self.$emit('onResized', ...args),
@@ -66,14 +64,26 @@
66
64
 
67
65
  const connectWithOptions = connectResizer(options)
68
66
 
69
- iframe.addEventListener("load", () => connectWithOptions(iframe))
67
+ iframe.addEventListener("load", () => {
68
+ self.resizer = connectWithOptions(iframe)
69
+ })
70
70
  },
71
71
 
72
- beforeDestroy() {
73
- if (this.$refs.iframe.iFrameResizer) {
74
- this.$refs.iframe.iFrameResizer.disconnect();
75
- }
76
- }
77
- })
72
+ beforeUnmount() {
73
+ this.resizer?.disconnect()
74
+ },
75
+
76
+ methods: {
77
+ moveToAnchor(anchor) {
78
+ this.resizer.moveToAnchor(anchor)
79
+ },
80
+ resize() {
81
+ this.resizer.resize()
82
+ },
83
+ sendMessage(msg, target) {
84
+ this.resizer.sendMessage(msg, target)
85
+ },
86
+ },
87
+ }
78
88
 
79
89
  </script>
package/index.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/vue 5.0.1 (cjs) - 2024-05-28
4
+ * @module iframe-resizer/vue 5.0.1 (cjs) - 2024-05-29
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -19,41 +19,13 @@
19
19
 
20
20
  'use strict';
21
21
 
22
- const vue = require('vue');
23
22
  const connectResizer = require('@iframe-resizer/core');
23
+ const vue = require('vue');
24
24
 
25
- const script = /*#__PURE__*/Object.assign({
25
+ const script = {
26
26
  name: 'IframeResizer',
27
-
28
- mounted() {
29
- const self = this;
30
- const { iframe } = this.$refs;
31
- const options = {
32
- ...Object.fromEntries(
33
- Object
34
- .entries(this.$props)
35
- .filter(([key, value]) => value !== undefined)
36
- ),
37
27
 
38
- onClose:() => false, // Disable close methods, use Vue to remove iframe
39
- onReady: (...args) => self.$emit('onReady', ...args),
40
- onMessage: (...args) => self.$emit('onMessage', ...args),
41
- onResized: (...args) => self.$emit('onResized', ...args),
42
- };
43
-
44
- const connectWithOptions = connectResizer(options);
45
-
46
- iframe.addEventListener("load", () => connectWithOptions(iframe));
47
- },
48
-
49
- beforeDestroy() {
50
- if (this.$refs.iframe.iFrameResizer) {
51
- this.$refs.iframe.iFrameResizer.disconnect();
52
- }
53
- }
54
- }, {
55
- __name: 'iframe-resizer',
56
- props: {
28
+ props: {
57
29
  license: {
58
30
  type: String,
59
31
  required: true
@@ -90,21 +62,52 @@ const script = /*#__PURE__*/Object.assign({
90
62
  type: Number,
91
63
  },
92
64
  },
93
- emits: ['onReady', 'onMessage', 'onResized'],
94
- setup(__props, { emit: __emit }) {
65
+
66
+ mounted() {
67
+ const self = this;
68
+ const { iframe } = this.$refs;
69
+ const options = {
70
+ ...Object.fromEntries(
71
+ Object
72
+ .entries(this.$props)
73
+ .filter(([key, value]) => value !== undefined)
74
+ ),
95
75
 
96
-
76
+ onClose: () => false, // Disable close methods, use Vue to remove iframe
77
+ onReady: (...args) => self.$emit('onReady', ...args),
78
+ onMessage: (...args) => self.$emit('onMessage', ...args),
79
+ onResized: (...args) => self.$emit('onResized', ...args),
80
+ };
97
81
 
98
-
82
+ const connectWithOptions = connectResizer(options);
99
83
 
84
+ iframe.addEventListener("load", () => {
85
+ self.resizer = connectWithOptions(iframe);
86
+ });
87
+ },
88
+
89
+ beforeUnmount() {
90
+ this.resizer?.disconnect();
91
+ },
100
92
 
101
- return (_ctx, _cache) => {
93
+ methods: {
94
+ moveToAnchor(anchor) {
95
+ this.resizer.moveToAnchor(anchor);
96
+ },
97
+ resize() {
98
+ this.resizer.resize();
99
+ },
100
+ sendMessage(msg, target) {
101
+ this.resizer.sendMessage(msg, target);
102
+ },
103
+ },
104
+ };
105
+
106
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
102
107
  return (vue.openBlock(), vue.createElementBlock("iframe", vue.mergeProps({ ref: "iframe" }, _ctx.$attrs), null, 16 /* FULL_PROPS */))
103
108
  }
104
- }
105
-
106
- });
107
109
 
110
+ script.render = render;
108
111
  script.__file = "./iframe-resizer.vue";
109
112
 
110
113
  const index = {
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/vue 5.0.1 (esm) - 2024-05-28
4
+ * @module iframe-resizer/vue 5.0.1 (esm) - 2024-05-29
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -17,41 +17,13 @@
17
17
  */
18
18
 
19
19
 
20
- import { openBlock, createElementBlock, mergeProps } from 'vue';
21
20
  import connectResizer from '@iframe-resizer/core';
21
+ import { openBlock, createElementBlock, mergeProps } from 'vue';
22
22
 
23
- const script = /*#__PURE__*/Object.assign({
23
+ const script = {
24
24
  name: 'IframeResizer',
25
-
26
- mounted() {
27
- const self = this;
28
- const { iframe } = this.$refs;
29
- const options = {
30
- ...Object.fromEntries(
31
- Object
32
- .entries(this.$props)
33
- .filter(([key, value]) => value !== undefined)
34
- ),
35
25
 
36
- onClose:() => false, // Disable close methods, use Vue to remove iframe
37
- onReady: (...args) => self.$emit('onReady', ...args),
38
- onMessage: (...args) => self.$emit('onMessage', ...args),
39
- onResized: (...args) => self.$emit('onResized', ...args),
40
- };
41
-
42
- const connectWithOptions = connectResizer(options);
43
-
44
- iframe.addEventListener("load", () => connectWithOptions(iframe));
45
- },
46
-
47
- beforeDestroy() {
48
- if (this.$refs.iframe.iFrameResizer) {
49
- this.$refs.iframe.iFrameResizer.disconnect();
50
- }
51
- }
52
- }, {
53
- __name: 'iframe-resizer',
54
- props: {
26
+ props: {
55
27
  license: {
56
28
  type: String,
57
29
  required: true
@@ -88,21 +60,52 @@ const script = /*#__PURE__*/Object.assign({
88
60
  type: Number,
89
61
  },
90
62
  },
91
- emits: ['onReady', 'onMessage', 'onResized'],
92
- setup(__props, { emit: __emit }) {
63
+
64
+ mounted() {
65
+ const self = this;
66
+ const { iframe } = this.$refs;
67
+ const options = {
68
+ ...Object.fromEntries(
69
+ Object
70
+ .entries(this.$props)
71
+ .filter(([key, value]) => value !== undefined)
72
+ ),
93
73
 
94
-
74
+ onClose: () => false, // Disable close methods, use Vue to remove iframe
75
+ onReady: (...args) => self.$emit('onReady', ...args),
76
+ onMessage: (...args) => self.$emit('onMessage', ...args),
77
+ onResized: (...args) => self.$emit('onResized', ...args),
78
+ };
95
79
 
96
-
80
+ const connectWithOptions = connectResizer(options);
97
81
 
82
+ iframe.addEventListener("load", () => {
83
+ self.resizer = connectWithOptions(iframe);
84
+ });
85
+ },
86
+
87
+ beforeUnmount() {
88
+ this.resizer?.disconnect();
89
+ },
98
90
 
99
- return (_ctx, _cache) => {
91
+ methods: {
92
+ moveToAnchor(anchor) {
93
+ this.resizer.moveToAnchor(anchor);
94
+ },
95
+ resize() {
96
+ this.resizer.resize();
97
+ },
98
+ sendMessage(msg, target) {
99
+ this.resizer.sendMessage(msg, target);
100
+ },
101
+ },
102
+ };
103
+
104
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
100
105
  return (openBlock(), createElementBlock("iframe", mergeProps({ ref: "iframe" }, _ctx.$attrs), null, 16 /* FULL_PROPS */))
101
106
  }
102
- }
103
-
104
- });
105
107
 
108
+ script.render = render;
106
109
  script.__file = "./iframe-resizer.vue";
107
110
 
108
111
  const index = {
package/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/vue 5.0.1 (umd) - 2024-05-28
4
+ * @module iframe-resizer/vue 5.0.1 (umd) - 2024-05-29
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -18,43 +18,15 @@
18
18
 
19
19
 
20
20
  (function (global, factory) {
21
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue'), require('@iframe-resizer/core')) :
22
- typeof define === 'function' && define.amd ? define(['vue', '@iframe-resizer/core'], factory) :
23
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.IframeResizer = factory(global.vue, global.connectResizer));
24
- })(this, (function (vue, connectResizer) { 'use strict';
21
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@iframe-resizer/core'), require('vue')) :
22
+ typeof define === 'function' && define.amd ? define(['@iframe-resizer/core', 'vue'], factory) :
23
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.IframeResizer = factory(global.connectResizer, global.vue));
24
+ })(this, (function (connectResizer, vue) { 'use strict';
25
25
 
26
- const script = /*#__PURE__*/Object.assign({
26
+ const script = {
27
27
  name: 'IframeResizer',
28
-
29
- mounted() {
30
- const self = this;
31
- const { iframe } = this.$refs;
32
- const options = {
33
- ...Object.fromEntries(
34
- Object
35
- .entries(this.$props)
36
- .filter(([key, value]) => value !== undefined)
37
- ),
38
-
39
- onClose:() => false, // Disable close methods, use Vue to remove iframe
40
- onReady: (...args) => self.$emit('onReady', ...args),
41
- onMessage: (...args) => self.$emit('onMessage', ...args),
42
- onResized: (...args) => self.$emit('onResized', ...args),
43
- };
44
-
45
- const connectWithOptions = connectResizer(options);
46
28
 
47
- iframe.addEventListener("load", () => connectWithOptions(iframe));
48
- },
49
-
50
- beforeDestroy() {
51
- if (this.$refs.iframe.iFrameResizer) {
52
- this.$refs.iframe.iFrameResizer.disconnect();
53
- }
54
- }
55
- }, {
56
- __name: 'iframe-resizer',
57
- props: {
29
+ props: {
58
30
  license: {
59
31
  type: String,
60
32
  required: true
@@ -91,21 +63,52 @@
91
63
  type: Number,
92
64
  },
93
65
  },
94
- emits: ['onReady', 'onMessage', 'onResized'],
95
- setup(__props, { emit: __emit }) {
66
+
67
+ mounted() {
68
+ const self = this;
69
+ const { iframe } = this.$refs;
70
+ const options = {
71
+ ...Object.fromEntries(
72
+ Object
73
+ .entries(this.$props)
74
+ .filter(([key, value]) => value !== undefined)
75
+ ),
76
+
77
+ onClose: () => false, // Disable close methods, use Vue to remove iframe
78
+ onReady: (...args) => self.$emit('onReady', ...args),
79
+ onMessage: (...args) => self.$emit('onMessage', ...args),
80
+ onResized: (...args) => self.$emit('onResized', ...args),
81
+ };
96
82
 
97
-
83
+ const connectWithOptions = connectResizer(options);
98
84
 
99
-
85
+ iframe.addEventListener("load", () => {
86
+ self.resizer = connectWithOptions(iframe);
87
+ });
88
+ },
89
+
90
+ beforeUnmount() {
91
+ this.resizer?.disconnect();
92
+ },
100
93
 
94
+ methods: {
95
+ moveToAnchor(anchor) {
96
+ this.resizer.moveToAnchor(anchor);
97
+ },
98
+ resize() {
99
+ this.resizer.resize();
100
+ },
101
+ sendMessage(msg, target) {
102
+ this.resizer.sendMessage(msg, target);
103
+ },
104
+ },
105
+ };
101
106
 
102
- return (_ctx, _cache) => {
107
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
103
108
  return (vue.openBlock(), vue.createElementBlock("iframe", vue.mergeProps({ ref: "iframe" }, _ctx.$attrs), null, 16 /* FULL_PROPS */))
104
109
  }
105
- }
106
-
107
- });
108
110
 
111
+ script.render = render;
109
112
  script.__file = "./iframe-resizer.vue";
110
113
 
111
114
  const index = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iframe-resizer/vue",
3
- "version": "5.0.0-beta.1",
3
+ "version": "5.0.1-beta.1",
4
4
  "license": "GPL-3.0",
5
5
  "homepage": "https://iframe-resizer.com",
6
6
  "author": {