@getspot/spot-widget-vue2 1.1.1 → 1.3.0
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/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +22 -0
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +2 -2
- package/src/Vue2SpotWidget.vue +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @getspot/spot-widget-vue2@1.
|
|
2
|
+
> @getspot/spot-widget-vue2@1.3.0 build /builds/getspot/spot-widget/packages/vue2
|
|
3
3
|
> vite build
|
|
4
4
|
|
|
5
5
|
[36mvite v4.5.13 [32mbuilding for production...[36m[39m
|
|
@@ -8,6 +8,6 @@ transforming...
|
|
|
8
8
|
No name was provided for external module "@getspot/spot-widget" in "output.globals" – guessing "SpotWidget".
|
|
9
9
|
rendering chunks...
|
|
10
10
|
computing gzip size...
|
|
11
|
-
[2mdist/[22m[36mindex.umd.js [39m[1m[2m4.
|
|
12
|
-
[2mdist/[22m[36mindex.es.js [39m[1m[2m5.
|
|
13
|
-
[32m✓ built in
|
|
11
|
+
[2mdist/[22m[36mindex.umd.js [39m[1m[2m4.41 kB[22m[1m[22m[2m │ gzip: 1.47 kB[22m
|
|
12
|
+
[2mdist/[22m[36mindex.es.js [39m[1m[2m5.98 kB[22m[1m[22m[2m │ gzip: 1.66 kB[22m
|
|
13
|
+
[32m✓ built in 473ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @getspot/spot-widget-vue2
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5373fa2: Fix not setting productPrice correctly for batchQuoteDetails
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [5373fa2]
|
|
12
|
+
- @getspot/spot-widget@1.3.0
|
|
13
|
+
|
|
14
|
+
## 1.2.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- cb310ad: Add batch endpoint support for multiple quotes in the widget
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [cb310ad]
|
|
23
|
+
- @getspot/spot-widget@1.2.0
|
|
24
|
+
|
|
3
25
|
## 1.1.1
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/dist/index.es.js
CHANGED
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(d,u){typeof exports=="object"&&typeof module<"u"?module.exports=u(require("@getspot/spot-widget")):typeof define=="function"&&define.amd?define(["@getspot/spot-widget"],u):(d=typeof globalThis<"u"?globalThis:d||self,d.Vue2SpotWidget=u(d.SpotWidget))})(this,function(d){"use strict";function u(t,e,s,a,r,h,f,m){var i=typeof t=="function"?t.options:t;e&&(i.render=e,i.staticRenderFns=s,i._compiled=!0),a&&(i.functional=!0),h&&(i._scopeId="data-v-"+h);var o;if(f?(o=function(n){n=n||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!n&&typeof __VUE_SSR_CONTEXT__<"u"&&(n=__VUE_SSR_CONTEXT__),r&&r.call(this,n),n&&n._registeredComponents&&n._registeredComponents.add(f)},i._ssrRegister=o):r&&(o=m?function(){r.call(this,(i.functional?this.parent:this).$root.$options.shadowRoot)}:r),o)if(i.functional){i._injectStyles=o;var _=i.render;i.render=function(O,c){return o.call(c),_(O,c)}}else{var l=i.beforeCreate;i.beforeCreate=l?[].concat(l,o):[o]}return{exports:t,options:i}}const p={name:"Vue2SpotWidget",props:{apiConfig:{type:Object,default:void 0},quoteRequestData:{type:[Object,Array],default:void 0},showTable:{type:Boolean,default:!0},optInSelected:{type:Boolean,default:!1},theme:{type:Object,default:void 0},callbacks:{type:Object,default:()=>({})},onQuoteRetrieved:{type:Function,default:void 0},onOptIn:{type:Function,default:void 0},onOptOut:{type:Function,default:void 0},onError:{type:Function,default:void 0},onNoMatchingQuote:{type:Function,default:void 0},onSelectionChange:{type:Function,default:void 0},options:{type:Object,default:()=>({})}},data(){return{widget:null,reinitTimeout:null}},computed:{mergedCallbacks(){return{...this.callbacks,...this.onQuoteRetrieved&&{onQuoteRetrieved:this.onQuoteRetrieved},...this.onOptIn&&{onOptIn:t=>{this.onOptIn&&this.onOptIn(t),this.onSelectionChange&&this.onSelectionChange(t)}},...this.onOptOut&&{onOptOut:t=>{this.onOptOut&&this.onOptOut(t),this.onSelectionChange&&this.onSelectionChange(t)}},...this.onError&&{onError:this.onError},...this.onNoMatchingQuote&&{onNoMatchingQuote:this.onNoMatchingQuote}}},widgetOptions(){return{apiConfig:this.apiConfig,quoteRequestData:this.quoteRequestData,showTable:this.showTable,optInSelected:this.optInSelected,theme:this.theme,callbacks:this.mergedCallbacks,...this.options}}},mounted(){this.initializeWidget()},watch:{quoteRequestData:{handler:function(t,e){this.widget&&t&&JSON.stringify(t)!==JSON.stringify(e)&&(this.reinitTimeout&&clearTimeout(this.reinitTimeout),this.reinitTimeout=setTimeout(()=>{this.reinitializeWidget(),this.reinitTimeout=null},100))},deep:!0},apiConfig:{handler:function(){this.reinitializeWidget()},deep:!0},showTable:function(t,e){t!==e&&this.reinitializeWidget()},optInSelected:function(t,e){t!==e&&this.reinitializeWidget()},theme:{handler:function(t,e){this.widget&&JSON.stringify(t)!==JSON.stringify(e)&&this.updateTheme(t)},deep:!0},mergedCallbacks:{handler:function(t,e){this.widget&&JSON.stringify(t)!==JSON.stringify(e)&&this.updateCallbacks(t)},deep:!0}},methods:{initializeWidget(){this.widget&&(this.widget.destroy(),this.widget=null),this.$refs.container&&(this.$refs.container.innerHTML=""),this.$nextTick(()=>{try{this.widget=new d({...this.widgetOptions,location:this.$refs.container})}catch(t){this.$emit("error",t),this.onError&&this.onError(t)}})},reinitializeWidget(){this.widget&&(this.widget.destroy(),this.widget=null),this.initializeWidget()},async updateQuote(t){return this.widget&&this.widget.updateQuote?this.widget.updateQuote(t):void 0},getSelection(){return this.widget&&this.widget.getSelection?this.widget.getSelection():void 0},validateSelection(){return this.widget&&this.widget.validateSelection?this.widget.validateSelection():void 0},updateTheme:function(t){if(!(!this.widget||!this.widget.container))for(var e=Object.keys(t||{}),s=0;s<e.length;s++){var a=e[s],r=t[a],h="--"+a;this.widget.container.style.setProperty(h,r)}},updateCallbacks:function(t){this.widget&&(this.widget.options.callbacks=t)},destroy(){this.widget&&typeof this.widget.destroy=="function"&&(this.widget.destroy(),this.widget=null)}},beforeDestroy(){this.reinitTimeout&&clearTimeout(this.reinitTimeout),this.widget&&typeof this.widget.destroy=="function"&&this.widget.destroy()}};var g=function(){var e=this,s=e._self._c;return s("div",{ref:"container"})},w=[],y=u(p,g,w,!1,null,null,null,null);return y.exports});
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getspot/spot-widget-vue2",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"main": "dist/index.umd.js",
|
|
8
8
|
"module": "dist/index.es.js",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@getspot/spot-widget": "1.
|
|
10
|
+
"@getspot/spot-widget": "1.3.0"
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
13
|
"vue": "^2.6.0"
|