@iframe-resizer/vue 5.0.0-alpha.2 → 5.0.0-alpha.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/README.md +1 -1
- package/iframe-resizer.vue +23 -22
- package/index.cjs.js +31 -23
- package/index.esm.js +32 -24
- package/index.umd.js +75 -0
- package/package.json +5 -2
package/README.md
CHANGED
package/iframe-resizer.vue
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
<
|
|
2
|
+
<div class="iframe-container">
|
|
3
|
+
<iframe ref="iframe" :src="src"></iframe>
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
|
-
<script
|
|
8
|
-
// Rollup-plug-vue blows up with the types included!
|
|
9
|
-
|
|
7
|
+
<script>
|
|
10
8
|
import connectResizer from '@iframe-resizer/core'
|
|
11
|
-
// import { Directive, DirectiveBinding } from 'vue'
|
|
12
|
-
|
|
13
|
-
// interface ResizableHTMLElement extends HTMLElement {
|
|
14
|
-
// iframeResizer?: {
|
|
15
|
-
// moveToAnchor: (string) => void
|
|
16
|
-
// resize: (x: number, y: number) => void
|
|
17
|
-
// sendMessage: (string) => void
|
|
18
|
-
// }
|
|
19
|
-
// }
|
|
20
9
|
|
|
21
|
-
|
|
22
|
-
|
|
10
|
+
export default {
|
|
11
|
+
name: 'IframeResizer',
|
|
12
|
+
props: {
|
|
13
|
+
src: {
|
|
14
|
+
type: String
|
|
15
|
+
},
|
|
16
|
+
license: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: true
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
mounted() {
|
|
23
23
|
const options = binding.value || {}
|
|
24
24
|
const connectWithOptions = connectResizer(options)
|
|
25
25
|
el.addEventListener('load', () => connectWithOptions(el))
|
|
26
|
+
//iframeResizer({}, this.$refs.iframe);
|
|
26
27
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
|
|
29
|
+
beforeDestroy() {
|
|
30
|
+
if (this.$refs.iframe.iFrameResizer) {
|
|
31
|
+
this.$refs.iframe.iFrameResizer.disconnect();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
export default iframeResizer
|
|
34
|
-
|
|
35
36
|
</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-
|
|
4
|
+
* @module iframe-resizer/vue 5.0.1 (cjs) - 2024-05-28
|
|
5
5
|
*
|
|
6
6
|
* @license GPL-3.0 for non-commercial use only.
|
|
7
7
|
* For commercial use, you must purchase a license from
|
|
@@ -22,42 +22,50 @@
|
|
|
22
22
|
const connectResizer = require('@iframe-resizer/core');
|
|
23
23
|
const vue = require('vue');
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
const script = {
|
|
26
|
+
name: 'IframeResizer',
|
|
27
|
+
props: {
|
|
28
|
+
src: {
|
|
29
|
+
type: String
|
|
30
|
+
},
|
|
31
|
+
license: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: true
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
mounted() {
|
|
37
38
|
const options = binding.value || {};
|
|
38
39
|
const connectWithOptions = connectResizer(options);
|
|
39
40
|
el.addEventListener('load', () => connectWithOptions(el));
|
|
41
|
+
//iframeResizer({}, this.$refs.iframe);
|
|
40
42
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
|
|
44
|
+
beforeDestroy() {
|
|
45
|
+
if (this.$refs.iframe.iFrameResizer) {
|
|
46
|
+
this.$refs.iframe.iFrameResizer.disconnect();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
45
49
|
};
|
|
46
50
|
|
|
47
|
-
const _hoisted_1 = {
|
|
51
|
+
const _hoisted_1 = { class: "iframe-container" };
|
|
52
|
+
const _hoisted_2 = ["src"];
|
|
48
53
|
|
|
49
54
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
50
55
|
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
51
|
-
vue.
|
|
52
|
-
|
|
56
|
+
vue.createElementVNode("iframe", {
|
|
57
|
+
ref: "iframe",
|
|
58
|
+
src: $props.src
|
|
59
|
+
}, null, 8 /* PROPS */, _hoisted_2)
|
|
60
|
+
]))
|
|
53
61
|
}
|
|
54
62
|
|
|
55
|
-
|
|
56
|
-
|
|
63
|
+
script.render = render;
|
|
64
|
+
script.__file = "./iframe-resizer.vue";
|
|
57
65
|
|
|
58
66
|
const index = {
|
|
59
67
|
install(Vue) {
|
|
60
|
-
Vue.component('IframeResizer',
|
|
68
|
+
Vue.component('IframeResizer', script);
|
|
61
69
|
},
|
|
62
70
|
};
|
|
63
71
|
|
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-
|
|
4
|
+
* @module iframe-resizer/vue 5.0.1 (esm) - 2024-05-28
|
|
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,44 +18,52 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
import connectResizer from '@iframe-resizer/core';
|
|
21
|
-
import { openBlock, createElementBlock,
|
|
21
|
+
import { openBlock, createElementBlock, createElementVNode } from 'vue';
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
const script = {
|
|
24
|
+
name: 'IframeResizer',
|
|
25
|
+
props: {
|
|
26
|
+
src: {
|
|
27
|
+
type: String
|
|
28
|
+
},
|
|
29
|
+
license: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: true
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
mounted() {
|
|
35
36
|
const options = binding.value || {};
|
|
36
37
|
const connectWithOptions = connectResizer(options);
|
|
37
38
|
el.addEventListener('load', () => connectWithOptions(el));
|
|
39
|
+
//iframeResizer({}, this.$refs.iframe);
|
|
38
40
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
|
|
42
|
+
beforeDestroy() {
|
|
43
|
+
if (this.$refs.iframe.iFrameResizer) {
|
|
44
|
+
this.$refs.iframe.iFrameResizer.disconnect();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
43
47
|
};
|
|
44
48
|
|
|
45
|
-
const _hoisted_1 = {
|
|
49
|
+
const _hoisted_1 = { class: "iframe-container" };
|
|
50
|
+
const _hoisted_2 = ["src"];
|
|
46
51
|
|
|
47
52
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
48
53
|
return (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
createElementVNode("iframe", {
|
|
55
|
+
ref: "iframe",
|
|
56
|
+
src: $props.src
|
|
57
|
+
}, null, 8 /* PROPS */, _hoisted_2)
|
|
58
|
+
]))
|
|
51
59
|
}
|
|
52
60
|
|
|
53
|
-
|
|
54
|
-
|
|
61
|
+
script.render = render;
|
|
62
|
+
script.__file = "./iframe-resizer.vue";
|
|
55
63
|
|
|
56
64
|
const index = {
|
|
57
65
|
install(Vue) {
|
|
58
|
-
Vue.component('IframeResizer',
|
|
66
|
+
Vue.component('IframeResizer', script);
|
|
59
67
|
},
|
|
60
68
|
};
|
|
61
69
|
|
package/index.umd.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @preserve
|
|
3
|
+
*
|
|
4
|
+
* @module iframe-resizer/vue 5.0.1 (umd) - 2024-05-28
|
|
5
|
+
*
|
|
6
|
+
* @license GPL-3.0 for non-commercial use only.
|
|
7
|
+
* For commercial use, you must purchase a license from
|
|
8
|
+
* https://iframe-resizer.com/pricing
|
|
9
|
+
*
|
|
10
|
+
* @desciption Keep same and cross domain iFrames sized to their content
|
|
11
|
+
*
|
|
12
|
+
* @author David J. Bradshaw <info@iframe-resizer.com>
|
|
13
|
+
*
|
|
14
|
+
* @see {@link https://iframe-resizer.com}
|
|
15
|
+
*
|
|
16
|
+
* @copyright (c) 2013 - 2024, David J. Bradshaw. All rights reserved.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
(function (global, factory) {
|
|
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
|
+
|
|
26
|
+
const script = {
|
|
27
|
+
name: 'IframeResizer',
|
|
28
|
+
props: {
|
|
29
|
+
src: {
|
|
30
|
+
type: String
|
|
31
|
+
},
|
|
32
|
+
license: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: true
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
mounted() {
|
|
39
|
+
const options = binding.value || {};
|
|
40
|
+
const connectWithOptions = connectResizer(options);
|
|
41
|
+
el.addEventListener('load', () => connectWithOptions(el));
|
|
42
|
+
//iframeResizer({}, this.$refs.iframe);
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
beforeDestroy() {
|
|
46
|
+
if (this.$refs.iframe.iFrameResizer) {
|
|
47
|
+
this.$refs.iframe.iFrameResizer.disconnect();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const _hoisted_1 = { class: "iframe-container" };
|
|
53
|
+
const _hoisted_2 = ["src"];
|
|
54
|
+
|
|
55
|
+
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
56
|
+
return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
57
|
+
vue.createElementVNode("iframe", {
|
|
58
|
+
ref: "iframe",
|
|
59
|
+
src: $props.src
|
|
60
|
+
}, null, 8 /* PROPS */, _hoisted_2)
|
|
61
|
+
]))
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
script.render = render;
|
|
65
|
+
script.__file = "./iframe-resizer.vue";
|
|
66
|
+
|
|
67
|
+
const index = {
|
|
68
|
+
install(Vue) {
|
|
69
|
+
Vue.component('IframeResizer', script);
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
return index;
|
|
74
|
+
|
|
75
|
+
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iframe-resizer/vue",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.3",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"homepage": "https://iframe-resizer.com",
|
|
6
6
|
"author": {
|
|
@@ -17,8 +17,11 @@
|
|
|
17
17
|
"type": "individual",
|
|
18
18
|
"url": "https://iframe-resizer.com/pricing/"
|
|
19
19
|
},
|
|
20
|
-
"main": "index.
|
|
20
|
+
"main": "index.umd.js",
|
|
21
21
|
"module": "index.esm.js",
|
|
22
|
+
"browser": {
|
|
23
|
+
"./sfc": "iframe-resizer.vue"
|
|
24
|
+
},
|
|
22
25
|
"peerDependencies": {
|
|
23
26
|
"vue": "^2.6.0 || ^3.0.0"
|
|
24
27
|
},
|