@getspot/spot-widget-vue 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/VueSpotWidget.vue +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @getspot/spot-widget-vue@1.
|
|
2
|
+
> @getspot/spot-widget-vue@1.3.0 build /builds/getspot/spot-widget/packages/vue
|
|
3
3
|
> vite build
|
|
4
4
|
|
|
5
5
|
[33mThe CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.[39m
|
|
@@ -9,6 +9,6 @@ transforming...
|
|
|
9
9
|
No name was provided for external module "@getspot/spot-widget" in "output.globals" – guessing "SpotWidget".
|
|
10
10
|
rendering chunks...
|
|
11
11
|
computing gzip size...
|
|
12
|
-
[2mdist/[22m[36mindex.umd.js [39m[1m[2m3.65 kB[22m[1m[22m[2m │ gzip: 1.
|
|
13
|
-
[2mdist/[22m[36mindex.es.js [39m[1m[2m4.
|
|
14
|
-
[32m✓ built in
|
|
12
|
+
[2mdist/[22m[36mindex.umd.js [39m[1m[2m3.65 kB[22m[1m[22m[2m │ gzip: 1.19 kB[22m
|
|
13
|
+
[2mdist/[22m[36mindex.es.js [39m[1m[2m4.99 kB[22m[1m[22m[2m │ gzip: 1.30 kB[22m
|
|
14
|
+
[32m✓ built in 537ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @getspot/spot-widget-vue
|
|
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(n,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("@getspot/spot-widget"),require("vue")):typeof define=="function"&&define.amd?define(["@getspot/spot-widget","vue"],o):(n=typeof globalThis<"u"?globalThis:n||self,n.VueSpotWidget=o(n.SpotWidget,n.Vue))})(this,function(n,o){"use strict";const r=(t,e)=>{const i=t.__vccOpts||t;for(const[s,d]of e)i[s]=d;return i},u={name:"VueSpotWidget",props:{apiConfig:{type:Object,default:void 0},quoteRequestData:{type:Object,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=>{var e,i;(e=this.onOptIn)==null||e.call(this,t),(i=this.onSelectionChange)==null||i.call(this,t)}},...this.onOptOut&&{onOptOut:t=>{var e,i;(e=this.onOptOut)==null||e.call(this,t),(i=this.onSelectionChange)==null||i.call(this,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(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(){this.reinitializeWidget()},deep:!0},showTable(t,e){t!==e&&this.reinitializeWidget()},optInSelected(t,e){t!==e&&this.reinitializeWidget()},theme:{handler(t,e){this.widget&&JSON.stringify(t)!==JSON.stringify(e)&&this.updateTheme(t)},deep:!0},mergedCallbacks:{handler(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(()=>{var t;try{this.widget=new n({...this.widgetOptions,location:this.$refs.container})}catch(e){this.$emit("error",e),(t=this.onError)==null||t.call(this,e)}})},reinitializeWidget(){this.widget&&(this.widget.destroy(),this.widget=null),this.initializeWidget()},async updateQuote(t){var e;return(e=this.widget)==null?void 0:e.updateQuote(t)},getSelection(){var t;return(t=this.widget)==null?void 0:t.getSelection()},validateSelection(){var t;return(t=this.widget)==null?void 0:t.validateSelection()},updateTheme(t){!this.widget||!this.widget.container||Object.entries(t||{}).forEach(([e,i])=>{const s=`--${e}`;this.widget.container.style.setProperty(s,i)})},updateCallbacks(t){this.widget&&(this.widget.options.callbacks=t)},destroy(){this.widget&&typeof this.widget.destroy=="function"&&(this.widget.destroy(),this.widget=null)}},beforeUnmount(){this.reinitTimeout&&clearTimeout(this.reinitTimeout),this.widget&&typeof this.widget.destroy=="function"&&this.widget.destroy()}},h={ref:"container"};function a(t,e,i,s,d,c){return o.openBlock(),o.createElementBlock("div",h,null,512)}return r(u,[["render",a]])});
|
|
1
|
+
(function(n,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("@getspot/spot-widget"),require("vue")):typeof define=="function"&&define.amd?define(["@getspot/spot-widget","vue"],o):(n=typeof globalThis<"u"?globalThis:n||self,n.VueSpotWidget=o(n.SpotWidget,n.Vue))})(this,function(n,o){"use strict";const r=(t,e)=>{const i=t.__vccOpts||t;for(const[s,d]of e)i[s]=d;return i},u={name:"VueSpotWidget",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=>{var e,i;(e=this.onOptIn)==null||e.call(this,t),(i=this.onSelectionChange)==null||i.call(this,t)}},...this.onOptOut&&{onOptOut:t=>{var e,i;(e=this.onOptOut)==null||e.call(this,t),(i=this.onSelectionChange)==null||i.call(this,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(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(){this.reinitializeWidget()},deep:!0},showTable(t,e){t!==e&&this.reinitializeWidget()},optInSelected(t,e){t!==e&&this.reinitializeWidget()},theme:{handler(t,e){this.widget&&JSON.stringify(t)!==JSON.stringify(e)&&this.updateTheme(t)},deep:!0},mergedCallbacks:{handler(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(()=>{var t;try{this.widget=new n({...this.widgetOptions,location:this.$refs.container})}catch(e){this.$emit("error",e),(t=this.onError)==null||t.call(this,e)}})},reinitializeWidget(){this.widget&&(this.widget.destroy(),this.widget=null),this.initializeWidget()},async updateQuote(t){var e;return(e=this.widget)==null?void 0:e.updateQuote(t)},getSelection(){var t;return(t=this.widget)==null?void 0:t.getSelection()},validateSelection(){var t;return(t=this.widget)==null?void 0:t.validateSelection()},updateTheme(t){!this.widget||!this.widget.container||Object.entries(t||{}).forEach(([e,i])=>{const s=`--${e}`;this.widget.container.style.setProperty(s,i)})},updateCallbacks(t){this.widget&&(this.widget.options.callbacks=t)},destroy(){this.widget&&typeof this.widget.destroy=="function"&&(this.widget.destroy(),this.widget=null)}},beforeUnmount(){this.reinitTimeout&&clearTimeout(this.reinitTimeout),this.widget&&typeof this.widget.destroy=="function"&&this.widget.destroy()}},h={ref:"container"};function a(t,e,i,s,d,c){return o.openBlock(),o.createElementBlock("div",h,null,512)}return r(u,[["render",a]])});
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getspot/spot-widget-vue",
|
|
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": "^3.0.0"
|