cloudsponge-vue
Advanced tools
Comparing version
@@ -1,18 +0,3 @@ | ||
import Vue from 'vue'; | ||
import { defineComponent, ref, onMounted, nextTick, pushScopeId, popScopeId, openBlock, createBlock, renderSlot, withScopeId } from 'vue'; | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
@@ -23,5 +8,9 @@ var keys = Object.keys(object); | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
if (enumerableOnly) { | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
} | ||
keys.push.apply(keys, symbols); | ||
@@ -53,3 +42,18 @@ } | ||
var script = Vue.extend({ | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
var script = defineComponent({ | ||
name: 'CloudspongeVue', | ||
@@ -70,166 +74,60 @@ props: { | ||
}, | ||
data: function data() { | ||
return { | ||
isLoading: true | ||
setup: function setup(props) { | ||
var isLoading = ref(true); | ||
var afterInit = function afterInit() { | ||
isLoading.value = false; | ||
}; | ||
}, | ||
mounted: function mounted() { | ||
var _this = this; | ||
this.$nextTick(function () { | ||
var externalScript = document.createElement('script'); | ||
externalScript.setAttribute('src', "https://api.cloudsponge.com/widget/".concat(_this.apiKey, ".js")); | ||
externalScript.async = true; | ||
onMounted(function () { | ||
nextTick(function () { | ||
var externalScript = document.createElement('script'); | ||
externalScript.setAttribute('src', "https://api.cloudsponge.com/widget/".concat(props.apiKey, ".js")); | ||
externalScript.async = true; | ||
externalScript.onload = function () { | ||
var _window$cloudsponge; | ||
externalScript.onload = function () { | ||
var _window$cloudsponge; | ||
(_window$cloudsponge = window.cloudsponge) === null || _window$cloudsponge === void 0 ? void 0 : _window$cloudsponge.init(_objectSpread2(_objectSpread2({}, _this.config), {}, { | ||
afterSubmitContacts: _this.afterSubmit, | ||
afterInit: _this.afterInit | ||
})); | ||
}; | ||
(_window$cloudsponge = window.cloudsponge) === null || _window$cloudsponge === void 0 ? void 0 : _window$cloudsponge.init(_objectSpread2(_objectSpread2({}, props.config), {}, { | ||
afterSubmitContacts: props.afterSubmit, | ||
afterInit: afterInit() | ||
})); | ||
}; | ||
document.head.appendChild(externalScript); | ||
document.head.appendChild(externalScript); | ||
}); | ||
}); | ||
}, | ||
methods: { | ||
afterInit: function afterInit() { | ||
this.isLoading = false; | ||
} | ||
return { | ||
isLoading: isLoading | ||
}; | ||
} | ||
}); | ||
function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { | ||
if (typeof shadowMode !== 'boolean') { | ||
createInjectorSSR = createInjector; | ||
createInjector = shadowMode; | ||
shadowMode = false; | ||
} | ||
// Vue.extend constructor export interop. | ||
const options = typeof script === 'function' ? script.options : script; | ||
// render functions | ||
if (template && template.render) { | ||
options.render = template.render; | ||
options.staticRenderFns = template.staticRenderFns; | ||
options._compiled = true; | ||
// functional template | ||
if (isFunctionalTemplate) { | ||
options.functional = true; | ||
} | ||
} | ||
// scopedId | ||
if (scopeId) { | ||
options._scopeId = scopeId; | ||
} | ||
let hook; | ||
if (moduleIdentifier) { | ||
// server build | ||
hook = function (context) { | ||
// 2.3 injection | ||
context = | ||
context || // cached call | ||
(this.$vnode && this.$vnode.ssrContext) || // stateful | ||
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional | ||
// 2.2 with runInNewContext: true | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { | ||
context = __VUE_SSR_CONTEXT__; | ||
} | ||
// inject component styles | ||
if (style) { | ||
style.call(this, createInjectorSSR(context)); | ||
} | ||
// register component module identifier for async chunk inference | ||
if (context && context._registeredComponents) { | ||
context._registeredComponents.add(moduleIdentifier); | ||
} | ||
}; | ||
// used by ssr in case component is cached and beforeCreate | ||
// never gets called | ||
options._ssrRegister = hook; | ||
} | ||
else if (style) { | ||
hook = shadowMode | ||
? function (context) { | ||
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot)); | ||
} | ||
: function (context) { | ||
style.call(this, createInjector(context)); | ||
}; | ||
} | ||
if (hook) { | ||
if (options.functional) { | ||
// register for functional component in vue file | ||
const originalRender = options.render; | ||
options.render = function renderWithStyleInjection(h, context) { | ||
hook.call(context); | ||
return originalRender(h, context); | ||
}; | ||
} | ||
else { | ||
// inject component registration as beforeCreate hook | ||
const existing = options.beforeCreate; | ||
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; | ||
} | ||
} | ||
return script; | ||
} | ||
var _withId = /*#__PURE__*/withScopeId("data-v-54d41578"); | ||
/* script */ | ||
var __vue_script__ = script; | ||
/* template */ | ||
pushScopeId("data-v-54d41578"); | ||
var __vue_render__ = function __vue_render__() { | ||
var _vm = this; | ||
var _h = _vm.$createElement; | ||
var _c = _vm._self._c || _h; | ||
return _c('div', { | ||
staticClass: "cloudsponge-launch" | ||
}, [_vm.isLoading ? _vm._t("loading") : _vm._t("body")], 2); | ||
var _hoisted_1 = { | ||
class: "cloudsponge-launch" | ||
}; | ||
var __vue_staticRenderFns__ = []; | ||
/* style */ | ||
popScopeId(); | ||
var __vue_inject_styles__ = undefined; | ||
/* scoped */ | ||
var render = /*#__PURE__*/_withId(function (_ctx, _cache, $props, $setup, $data, $options) { | ||
return openBlock(), createBlock("div", _hoisted_1, [_ctx.isLoading ? renderSlot(_ctx.$slots, "loading", { | ||
key: 0 | ||
}) : renderSlot(_ctx.$slots, "body", { | ||
key: 1 | ||
})]); | ||
}); | ||
var __vue_scope_id__ = "data-v-2fa8e188"; | ||
/* module identifier */ | ||
script.render = render; | ||
script.__scopeId = "data-v-54d41578"; | ||
var __vue_module_identifier__ = undefined; | ||
/* functional template */ | ||
var entry = { | ||
install: function install(app, _options) { | ||
app.component('CloudspongeVue', script); | ||
} | ||
}; | ||
var __vue_is_functional_template__ = false; | ||
/* style inject */ | ||
/* style inject SSR */ | ||
/* style inject shadow dom */ | ||
var __vue_component__ = /*#__PURE__*/normalizeComponent({ | ||
render: __vue_render__, | ||
staticRenderFns: __vue_staticRenderFns__ | ||
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined); | ||
// Import vue component | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
// install function executed by Vue.use() | ||
var install = function installCloudspongeVue(Vue) { | ||
if (install.installed) return; | ||
install.installed = true; | ||
Vue.component('CloudspongeVue', __vue_component__); | ||
}; // Create module definition for Vue.use() | ||
// to be registered via Vue.use() as well as Vue.component() | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
__vue_component__.install = install; // Export component by default | ||
// also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo'; | ||
// export const RollupDemoDirective = component; | ||
export default __vue_component__; | ||
export default entry; |
@@ -1,1 +0,1 @@ | ||
var CloudspongeVue=function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n,o,r,i,c,a,s,u){"boolean"!=typeof c&&(s=a,a=c,c=!1);const d="function"==typeof n?n.options:n;let f;if(e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,r&&(d.functional=!0)),o&&(d._scopeId=o),i?(f=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,s(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},d._ssrRegister=f):t&&(f=c?function(e){t.call(this,u(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,a(e))}),f)if(d.functional){const e=d.render;d.render=function(t,n){return f.call(n),e(t,n)}}else{const e=d.beforeCreate;d.beforeCreate=e?[].concat(e,f):[f]}return n}var a=c({render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"cloudsponge-launch"},[e.isLoading?e._t("loading"):e._t("body")],2)},staticRenderFns:[]},undefined,n(t).default.extend({name:"CloudspongeVue",props:{apiKey:{type:String,default:""},afterSubmit:{type:Function,default:function(){}},config:{type:Object,default:function(){}}},data:function(){return{isLoading:!0}},mounted:function(){var e=this;this.$nextTick((function(){var t=document.createElement("script");t.setAttribute("src","https://api.cloudsponge.com/widget/".concat(e.apiKey,".js")),t.async=!0,t.onload=function(){var t;null===(t=window.cloudsponge)||void 0===t||t.init(i(i({},e.config),{},{afterSubmitContacts:e.afterSubmit,afterInit:e.afterInit}))},document.head.appendChild(t)}))},methods:{afterInit:function(){this.isLoading=!1}}}),"data-v-2fa8e188",false,undefined,!1,void 0,void 0,void 0),s=function(e){s.installed||(s.installed=!0,e.component("CloudspongeVue",a))},u={install:s},d=null;return"undefined"!=typeof window?d=window.Vue:"undefined"!=typeof global&&(d=global.Vue),d&&d.use(u),a.install=s,e.default=a,Object.defineProperty(e,"__esModule",{value:!0}),e}({},Vue); | ||
var CloudspongeVue=function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=t.defineComponent({name:"CloudspongeVue",props:{apiKey:{type:String,default:""},afterSubmit:{type:Function,default:function(){}},config:{type:Object,default:function(){}}},setup:function(e){var n=t.ref(!0);return t.onMounted((function(){t.nextTick((function(){var t=document.createElement("script");t.setAttribute("src","https://api.cloudsponge.com/widget/".concat(e.apiKey,".js")),t.async=!0,t.onload=function(){var t;null===(t=window.cloudsponge)||void 0===t||t.init(o(o({},e.config),{},{afterSubmitContacts:e.afterSubmit,afterInit:void(n.value=!1)}))},document.head.appendChild(t)}))})),{isLoading:n}}}),i=t.withScopeId("data-v-54d41578");t.pushScopeId("data-v-54d41578");var u={class:"cloudsponge-launch"};t.popScopeId();var a=i((function(e,n,o,r,c,i){return t.openBlock(),t.createBlock("div",u,[e.isLoading?t.renderSlot(e.$slots,"loading",{key:0}):t.renderSlot(e.$slots,"body",{key:1})])}));c.render=a,c.__scopeId="data-v-54d41578";var p={install:function(e,t){e.component("CloudspongeVue",c)}};return e.default=p,Object.defineProperty(e,"__esModule",{value:!0}),e}({},Vue); |
@@ -1,17 +0,2 @@ | ||
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var Vue=require('vue');function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}}var Vue__default=/*#__PURE__*/_interopDefaultLegacy(Vue);function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function ownKeys(object, enumerableOnly) { | ||
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var vue=require('vue');function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
@@ -21,5 +6,9 @@ | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
if (enumerableOnly) { | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
} | ||
keys.push.apply(keys, symbols); | ||
@@ -49,3 +38,18 @@ } | ||
return target; | ||
}var script = Vue__default['default'].extend({ | ||
} | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
}var script = vue.defineComponent({ | ||
name: 'CloudspongeVue', | ||
@@ -66,182 +70,52 @@ props: { | ||
}, | ||
data: function data() { | ||
return { | ||
isLoading: true | ||
setup: function setup(props) { | ||
var isLoading = vue.ref(true); | ||
var afterInit = function afterInit() { | ||
isLoading.value = false; | ||
}; | ||
}, | ||
mounted: function mounted() { | ||
var _this = this; | ||
this.$nextTick(function () { | ||
var externalScript = document.createElement('script'); | ||
externalScript.setAttribute('src', "https://api.cloudsponge.com/widget/".concat(_this.apiKey, ".js")); | ||
externalScript.async = true; | ||
vue.onMounted(function () { | ||
vue.nextTick(function () { | ||
var externalScript = document.createElement('script'); | ||
externalScript.setAttribute('src', "https://api.cloudsponge.com/widget/".concat(props.apiKey, ".js")); | ||
externalScript.async = true; | ||
externalScript.onload = function () { | ||
var _window$cloudsponge; | ||
externalScript.onload = function () { | ||
var _window$cloudsponge; | ||
(_window$cloudsponge = window.cloudsponge) === null || _window$cloudsponge === void 0 ? void 0 : _window$cloudsponge.init(_objectSpread2(_objectSpread2({}, _this.config), {}, { | ||
afterSubmitContacts: _this.afterSubmit, | ||
afterInit: _this.afterInit | ||
})); | ||
}; | ||
(_window$cloudsponge = window.cloudsponge) === null || _window$cloudsponge === void 0 ? void 0 : _window$cloudsponge.init(_objectSpread2(_objectSpread2({}, props.config), {}, { | ||
afterSubmitContacts: props.afterSubmit, | ||
afterInit: afterInit() | ||
})); | ||
}; | ||
document.head.appendChild(externalScript); | ||
document.head.appendChild(externalScript); | ||
}); | ||
}); | ||
}, | ||
methods: { | ||
afterInit: function afterInit() { | ||
this.isLoading = false; | ||
} | ||
return { | ||
isLoading: isLoading | ||
}; | ||
} | ||
});function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { | ||
if (typeof shadowMode !== 'boolean') { | ||
createInjectorSSR = createInjector; | ||
createInjector = shadowMode; | ||
shadowMode = false; | ||
} | ||
// Vue.extend constructor export interop. | ||
const options = typeof script === 'function' ? script.options : script; | ||
// render functions | ||
if (template && template.render) { | ||
options.render = template.render; | ||
options.staticRenderFns = template.staticRenderFns; | ||
options._compiled = true; | ||
// functional template | ||
if (isFunctionalTemplate) { | ||
options.functional = true; | ||
} | ||
} | ||
// scopedId | ||
if (scopeId) { | ||
options._scopeId = scopeId; | ||
} | ||
let hook; | ||
if (moduleIdentifier) { | ||
// server build | ||
hook = function (context) { | ||
// 2.3 injection | ||
context = | ||
context || // cached call | ||
(this.$vnode && this.$vnode.ssrContext) || // stateful | ||
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional | ||
// 2.2 with runInNewContext: true | ||
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { | ||
context = __VUE_SSR_CONTEXT__; | ||
} | ||
// inject component styles | ||
if (style) { | ||
style.call(this, createInjectorSSR(context)); | ||
} | ||
// register component module identifier for async chunk inference | ||
if (context && context._registeredComponents) { | ||
context._registeredComponents.add(moduleIdentifier); | ||
} | ||
}; | ||
// used by ssr in case component is cached and beforeCreate | ||
// never gets called | ||
options._ssrRegister = hook; | ||
} | ||
else if (style) { | ||
hook = shadowMode | ||
? function (context) { | ||
style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot)); | ||
} | ||
: function (context) { | ||
style.call(this, createInjector(context)); | ||
}; | ||
} | ||
if (hook) { | ||
if (options.functional) { | ||
// register for functional component in vue file | ||
const originalRender = options.render; | ||
options.render = function renderWithStyleInjection(h, context) { | ||
hook.call(context); | ||
return originalRender(h, context); | ||
}; | ||
} | ||
else { | ||
// inject component registration as beforeCreate hook | ||
const existing = options.beforeCreate; | ||
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; | ||
} | ||
} | ||
return script; | ||
}/* script */ | ||
var __vue_script__ = script; | ||
/* template */ | ||
});var _withId = /*#__PURE__*/vue.withScopeId("data-v-54d41578"); | ||
var __vue_render__ = function __vue_render__() { | ||
var _vm = this; | ||
vue.pushScopeId("data-v-54d41578"); | ||
var _h = _vm.$createElement; | ||
var _c = _vm._self._c || _h; | ||
return _c('div', { | ||
staticClass: "cloudsponge-launch" | ||
}, [_vm.isLoading ? _vm._t("loading") : _vm._t("body")], 2); | ||
var _hoisted_1 = { | ||
class: "cloudsponge-launch" | ||
}; | ||
var __vue_staticRenderFns__ = []; | ||
/* style */ | ||
vue.popScopeId(); | ||
var __vue_inject_styles__ = undefined; | ||
/* scoped */ | ||
var __vue_scope_id__ = "data-v-2fa8e188"; | ||
/* module identifier */ | ||
var __vue_module_identifier__ = "data-v-2fa8e188"; | ||
/* functional template */ | ||
var __vue_is_functional_template__ = false; | ||
/* style inject */ | ||
/* style inject SSR */ | ||
/* style inject shadow dom */ | ||
var __vue_component__ = /*#__PURE__*/normalizeComponent({ | ||
render: __vue_render__, | ||
staticRenderFns: __vue_staticRenderFns__ | ||
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);// Import vue component | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
// install function executed by Vue.use() | ||
var install = function installCloudspongeVue(Vue) { | ||
if (install.installed) return; | ||
install.installed = true; | ||
Vue.component('CloudspongeVue', __vue_component__); | ||
}; // Create module definition for Vue.use() | ||
var plugin = { | ||
install: install | ||
}; // To auto-install on non-es builds, when vue is found | ||
// eslint-disable-next-line no-redeclare | ||
/* global window, global */ | ||
{ | ||
var GlobalVue = null; | ||
if (typeof window !== 'undefined') { | ||
GlobalVue = window.Vue; | ||
} else if (typeof global !== 'undefined') { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
GlobalVue = global.Vue; | ||
var render = /*#__PURE__*/_withId(function (_ctx, _cache, $props, $setup, $data, $options) { | ||
return vue.openBlock(), vue.createBlock("div", _hoisted_1, [_ctx.isLoading ? vue.renderSlot(_ctx.$slots, "loading", { | ||
key: 0 | ||
}) : vue.renderSlot(_ctx.$slots, "body", { | ||
key: 1 | ||
})]); | ||
});script.render = render; | ||
script.__scopeId = "data-v-54d41578";var entry = { | ||
install: function install(app, _options) { | ||
app.component('CloudspongeVue', script); | ||
} | ||
if (GlobalVue) { | ||
GlobalVue.use(plugin); | ||
} | ||
} // Inject install function into component - allows component | ||
// to be registered via Vue.use() as well as Vue.component() | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
__vue_component__.install = install; // Export component by default | ||
// also be used as directives, etc. - eg. import { RollupDemoDirective } from 'rollup-demo'; | ||
// export const RollupDemoDirective = component; | ||
exports.default=__vue_component__; | ||
};exports.default=entry; |
{ | ||
"name": "cloudsponge-vue", | ||
"version": "0.0.11", | ||
"version": "1.0.0", | ||
"description": "Vue component to launch the Cloudsponge address book", | ||
@@ -26,27 +26,27 @@ "license": "MIT", | ||
"dependencies": { | ||
"vue": "^2.6.12", | ||
"vue-template-compiler": "^2.6.12" | ||
"vue": "^3.1.2", | ||
"vue-template-compiler": "^2.6.14" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.13.16", | ||
"@babel/preset-env": "^7.13.15", | ||
"@babel/preset-typescript": "^7.13.0", | ||
"@babel/core": "^7.14.6", | ||
"@babel/preset-env": "^7.14.7", | ||
"@babel/preset-typescript": "^7.14.5", | ||
"@rollup/plugin-alias": "^3.1.2", | ||
"@rollup/plugin-commonjs": "^18.0.0", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^19.0.0", | ||
"@rollup/plugin-replace": "^2.4.2", | ||
"@vue/cli-plugin-babel": "^4.5.12", | ||
"@vue/cli-plugin-typescript": "^4.5.12", | ||
"@vue/cli-service": "^4.5.12", | ||
"core-js": "^3.10.2", | ||
"cross-env": "^7.0.2", | ||
"@vue/cli-plugin-babel": "^5.0.0-beta.2", | ||
"@vue/cli-plugin-typescript": "^5.0.0-beta.2", | ||
"@vue/cli-service": "^5.0.0-beta.2", | ||
"core-js": "^3.15.2", | ||
"cross-env": "^7.0.3", | ||
"minimist": "^1.2.5", | ||
"rollup": "^2.33.0", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"rollup": "^2.52.3", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-vue": "^5.1.9", | ||
"standard-version": "^9.2.0", | ||
"typescript": "^4.2.4" | ||
"rollup-plugin-vue": "^6.0.0", | ||
"standard-version": "^9.3.0", | ||
"typescript": "^4.3.4" | ||
}, | ||
"peerDependencies": { | ||
"vue": "^2.6.12" | ||
"vue": "^3.1.2" | ||
}, | ||
@@ -53,0 +53,0 @@ "engines": { |
@@ -8,3 +8,3 @@ # cloudsponge-vue | ||
``` | ||
yarn add cloudsponge-vue | ||
yarn add cloudsponge-vue@next | ||
``` | ||
@@ -15,3 +15,3 @@ | ||
``` | ||
npm i --save cloudsponge-vue | ||
npm i --save cloudsponge-vue@next | ||
``` | ||
@@ -30,3 +30,3 @@ | ||
## Usage | ||
## Usage (Vue3) | ||
@@ -37,4 +37,6 @@ main: | ||
// main.ts | ||
const app = createApp({ ... }); | ||
import Cloudsponge from 'cloudsponge-vue'; | ||
Vue.use(Cloudsponge); | ||
app.use(Cloudsponge); | ||
``` | ||
@@ -59,11 +61,13 @@ | ||
<script lang="ts"> | ||
import Vue from 'vue'; | ||
import { defineComponent } from 'vue'; | ||
export default Vue.extend({ | ||
export default defineComponent({ | ||
name: 'MyComponent', | ||
methods: { | ||
submittedContacts(contacts) { | ||
setup() { | ||
const submittedContacts = (contacts) => { | ||
console.log('Cloudsponge: submitted contacts'); | ||
const emails = contacts.map((c) => c.selectedEmail()); | ||
console.log('Emails are:', emails); | ||
} | ||
return { submittedContacts }; | ||
} | ||
@@ -70,0 +74,0 @@ }); |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
-50%72
5.88%14263
-42.62%8
-11.11%214
-49.17%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
Updated