@car-cutter/vue-webplayer 3.1.0 → 3.1.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/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),e=require("./utils-Bfc4MSUL.cjs"),i=require("@car-cutter/wc-webplayer"),S=n.defineComponent({__name:"WebPlayer",props:{compositionUrl:{},integration:{type:Boolean},maxItemsShown:{},hideCategoriesNav:{type:Boolean},infiniteCarrousel:{type:Boolean},permanentGallery:{type:Boolean},mediaLoadStrategy:{},minMediaWidth:{},maxMediaWidth:{},preloadRange:{},autoLoad360:{type:Boolean},autoLoadInterior360:{type:Boolean},categoriesFilter:{},extendBehavior:{},eventPrefix:{},demoSpin:{type:Boolean},reverse360:{type:Boolean},analyticsEventPrefix:{},analyticsUrl:{},analyticsBearer:{},analyticsSimpleRequestsOnly:{type:Boolean},analyticsDryRun:{type:Boolean},analyticsDebug:{type:Boolean},class:{},style:{}},emits:["compositionLoading","compositionLoaded","compositionLoadError","itemChange","extendModeOn","extendModeOff","hotspotsOn","hotspotsOff","galleryOpen","galleryClose","analyticsIdentify","analyticsPage","analyticsTrack"],setup(r,{emit:s}){i.ensureCustomElementsDefinition();const a=r,{class:_,style:c,...A}=a,d={display:"block",...c??{}},L=i.webPlayerPropsToAttributes(A),E=s,m=a.eventPrefix??e.DEFAULT_EVENT_PREFIX,y=a.analyticsEventPrefix??e.DEFAULT_ANALYTICS_EVENT_PREFIX,P=t=>`${m}${t}`,C=t=>`${y}${t}`,I={[e.EVENT_COMPOSITION_LOADING]:t=>E("compositionLoading",t),[e.EVENT_COMPOSITION_LOADED]:t=>E("compositionLoaded",t),[e.EVENT_COMPOSITION_LOAD_ERROR]:t=>E("compositionLoadError",t),[e.EVENT_ITEM_CHANGE]:t=>E("itemChange",t),[e.EVENT_EXTEND_MODE_ON]:()=>E("extendModeOn"),[e.EVENT_EXTEND_MODE_OFF]:()=>E("extendModeOff"),[e.EVENT_HOTSPOTS_ON]:()=>E("hotspotsOn"),[e.EVENT_HOTSPOTS_OFF]:()=>E("hotspotsOff"),[e.EVENT_GALLERY_OPEN]:()=>E("galleryOpen"),[e.EVENT_GALLERY_CLOSE]:()=>E("galleryClose")},u={[e.ANALYTICS_EVENT_IDENTIFY]:t=>E("analyticsIdentify",t),[e.ANALYTICS_EVENT_PAGE]:t=>E("analyticsPage",t),[e.ANALYTICS_EVENT_TRACK]:t=>E("analyticsTrack",t)},T=new Map,l=new Map;return Object.entries(I).forEach(([t,o])=>{if(!o)return;const N=P(t),O=p=>o(p.detail);T.set(N,O)}),Object.entries(u).forEach(([t,o])=>{if(!o)return;const N=C(t),O=p=>o(p.detail);l.set(N,O)}),n.onMounted(()=>{T.forEach((t,o)=>{document.addEventListener(o,t)}),l.forEach((t,o)=>{document.addEventListener(o,t)})}),n.onUnmounted(()=>{T.forEach((t,o)=>{document.removeEventListener(o,t)}),l.forEach((t,o)=>{document.removeEventListener(o,t)})}),(t,o)=>(n.openBlock(),n.createElementBlock("cc-webplayer",n.mergeProps(n.unref(L),{class:n.unref(_),style:d}),[n.renderSlot(t.$slots,"default")],16))}}),V=n.defineComponent({__name:"WebPlayerCustomMedia",props:{index:{},thumbnailSrc:{}},setup(r){const s=r,a=i.webPlayerCustomMediaPropsToAttributes(s);return(_,c)=>(n.openBlock(),n.createElementBlock("cc-webplayer-custom-media",n.normalizeProps(n.guardReactiveProps(n.unref(a))),[n.renderSlot(_.$slots,"default")],16))}}),f=n.defineComponent({__name:"WebPlayerIcon",props:{name:{}},setup(r){const s=r,a=i.webPlayerIconPropsToAttributes(s);return(_,c)=>(n.openBlock(),n.createElementBlock("cc-webplayer-icon",n.normalizeProps(n.guardReactiveProps(n.unref(a))),[n.renderSlot(_.$slots,"default")],16))}});exports.ANALYTICS_EVENT_IDENTIFY=e.ANALYTICS_EVENT_IDENTIFY;exports.ANALYTICS_EVENT_PAGE=e.ANALYTICS_EVENT_PAGE;exports.ANALYTICS_EVENT_TRACK=e.ANALYTICS_EVENT_TRACK;exports.DEFAULT_EVENT_PREFIX=e.DEFAULT_EVENT_PREFIX;exports.EVENT_COMPOSITION_LOADED=e.EVENT_COMPOSITION_LOADED;exports.EVENT_COMPOSITION_LOADING=e.EVENT_COMPOSITION_LOADING;exports.EVENT_COMPOSITION_LOAD_ERROR=e.EVENT_COMPOSITION_LOAD_ERROR;exports.EVENT_EXTEND_MODE_OFF=e.EVENT_EXTEND_MODE_OFF;exports.EVENT_EXTEND_MODE_ON=e.EVENT_EXTEND_MODE_ON;exports.EVENT_GALLERY_CLOSE=e.EVENT_GALLERY_CLOSE;exports.EVENT_GALLERY_OPEN=e.EVENT_GALLERY_OPEN;exports.EVENT_HOTSPOTS_OFF=e.EVENT_HOTSPOTS_OFF;exports.EVENT_HOTSPOTS_ON=e.EVENT_HOTSPOTS_ON;exports.EVENT_ITEM_CHANGE=e.EVENT_ITEM_CHANGE;exports.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG=e.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG;exports.WEB_PLAYER_ICON_WC_TAG=e.WEB_PLAYER_ICON_WC_TAG;exports.WEB_PLAYER_WC_TAG=e.WEB_PLAYER_WC_TAG;exports.generateCompositionUrl=e.generateCompositionUrl;exports.WebPlayer=S;exports.WebPlayerCustomMedia=V;exports.WebPlayerIcon=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),e=require("./utils-Bfc4MSUL.cjs"),i=require("@car-cutter/wc-webplayer"),S=n.defineComponent({__name:"WebPlayer",props:{compositionUrl:{},integration:{type:Boolean},maxItemsShown:{},hideCategoriesNav:{type:Boolean},infiniteCarrousel:{type:Boolean},permanentGallery:{type:Boolean},mediaLoadStrategy:{},minMediaWidth:{},maxMediaWidth:{},preloadRange:{},autoLoad360:{type:Boolean},autoLoadInterior360:{type:Boolean},categoriesFilter:{},extendBehavior:{},eventPrefix:{},demoSpin:{type:Boolean},reverse360:{type:Boolean},spinCursor:{},analyticsEventPrefix:{},analyticsUrl:{},analyticsBearer:{},analyticsSimpleRequestsOnly:{type:Boolean},analyticsDryRun:{type:Boolean},analyticsDebug:{type:Boolean},class:{},style:{}},emits:["compositionLoading","compositionLoaded","compositionLoadError","itemChange","extendModeOn","extendModeOff","hotspotsOn","hotspotsOff","galleryOpen","galleryClose","analyticsIdentify","analyticsPage","analyticsTrack"],setup(r,{emit:s}){i.ensureCustomElementsDefinition();const a=r,{class:_,style:c,...A}=a,d={display:"block",...c??{}},L=i.webPlayerPropsToAttributes(A),E=s,m=a.eventPrefix??e.DEFAULT_EVENT_PREFIX,y=a.analyticsEventPrefix??e.DEFAULT_ANALYTICS_EVENT_PREFIX,P=t=>`${m}${t}`,C=t=>`${y}${t}`,I={[e.EVENT_COMPOSITION_LOADING]:t=>E("compositionLoading",t),[e.EVENT_COMPOSITION_LOADED]:t=>E("compositionLoaded",t),[e.EVENT_COMPOSITION_LOAD_ERROR]:t=>E("compositionLoadError",t),[e.EVENT_ITEM_CHANGE]:t=>E("itemChange",t),[e.EVENT_EXTEND_MODE_ON]:()=>E("extendModeOn"),[e.EVENT_EXTEND_MODE_OFF]:()=>E("extendModeOff"),[e.EVENT_HOTSPOTS_ON]:()=>E("hotspotsOn"),[e.EVENT_HOTSPOTS_OFF]:()=>E("hotspotsOff"),[e.EVENT_GALLERY_OPEN]:()=>E("galleryOpen"),[e.EVENT_GALLERY_CLOSE]:()=>E("galleryClose")},u={[e.ANALYTICS_EVENT_IDENTIFY]:t=>E("analyticsIdentify",t),[e.ANALYTICS_EVENT_PAGE]:t=>E("analyticsPage",t),[e.ANALYTICS_EVENT_TRACK]:t=>E("analyticsTrack",t)},T=new Map,l=new Map;return Object.entries(I).forEach(([t,o])=>{if(!o)return;const N=P(t),O=p=>o(p.detail);T.set(N,O)}),Object.entries(u).forEach(([t,o])=>{if(!o)return;const N=C(t),O=p=>o(p.detail);l.set(N,O)}),n.onMounted(()=>{T.forEach((t,o)=>{document.addEventListener(o,t)}),l.forEach((t,o)=>{document.addEventListener(o,t)})}),n.onUnmounted(()=>{T.forEach((t,o)=>{document.removeEventListener(o,t)}),l.forEach((t,o)=>{document.removeEventListener(o,t)})}),(t,o)=>(n.openBlock(),n.createElementBlock("cc-webplayer",n.mergeProps(n.unref(L),{class:n.unref(_),style:d}),[n.renderSlot(t.$slots,"default")],16))}}),V=n.defineComponent({__name:"WebPlayerCustomMedia",props:{index:{},thumbnailSrc:{}},setup(r){const s=r,a=i.webPlayerCustomMediaPropsToAttributes(s);return(_,c)=>(n.openBlock(),n.createElementBlock("cc-webplayer-custom-media",n.normalizeProps(n.guardReactiveProps(n.unref(a))),[n.renderSlot(_.$slots,"default")],16))}}),f=n.defineComponent({__name:"WebPlayerIcon",props:{name:{}},setup(r){const s=r,a=i.webPlayerIconPropsToAttributes(s);return(_,c)=>(n.openBlock(),n.createElementBlock("cc-webplayer-icon",n.normalizeProps(n.guardReactiveProps(n.unref(a))),[n.renderSlot(_.$slots,"default")],16))}});exports.ANALYTICS_EVENT_IDENTIFY=e.ANALYTICS_EVENT_IDENTIFY;exports.ANALYTICS_EVENT_PAGE=e.ANALYTICS_EVENT_PAGE;exports.ANALYTICS_EVENT_TRACK=e.ANALYTICS_EVENT_TRACK;exports.DEFAULT_EVENT_PREFIX=e.DEFAULT_EVENT_PREFIX;exports.EVENT_COMPOSITION_LOADED=e.EVENT_COMPOSITION_LOADED;exports.EVENT_COMPOSITION_LOADING=e.EVENT_COMPOSITION_LOADING;exports.EVENT_COMPOSITION_LOAD_ERROR=e.EVENT_COMPOSITION_LOAD_ERROR;exports.EVENT_EXTEND_MODE_OFF=e.EVENT_EXTEND_MODE_OFF;exports.EVENT_EXTEND_MODE_ON=e.EVENT_EXTEND_MODE_ON;exports.EVENT_GALLERY_CLOSE=e.EVENT_GALLERY_CLOSE;exports.EVENT_GALLERY_OPEN=e.EVENT_GALLERY_OPEN;exports.EVENT_HOTSPOTS_OFF=e.EVENT_HOTSPOTS_OFF;exports.EVENT_HOTSPOTS_ON=e.EVENT_HOTSPOTS_ON;exports.EVENT_ITEM_CHANGE=e.EVENT_ITEM_CHANGE;exports.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG=e.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG;exports.WEB_PLAYER_ICON_WC_TAG=e.WEB_PLAYER_ICON_WC_TAG;exports.WEB_PLAYER_WC_TAG=e.WEB_PLAYER_WC_TAG;exports.generateCompositionUrl=e.generateCompositionUrl;exports.WebPlayer=S;exports.WebPlayerCustomMedia=V;exports.WebPlayerIcon=f;
package/dist/index.d.ts CHANGED
@@ -397,6 +397,7 @@ declare type WebPlayerProps_2 = {
397
397
  eventPrefix?: string;
398
398
  demoSpin?: boolean;
399
399
  reverse360?: boolean;
400
+ spinCursor?: string;
400
401
 
401
402
  // Analytics
402
403
  analyticsEventPrefix?: string;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as d, onMounted as g, onUnmounted as h, openBlock as y, createElementBlock as T, mergeProps as S, unref as r, renderSlot as u, normalizeProps as O, guardReactiveProps as f } from "vue";
1
+ import { defineComponent as d, onMounted as g, onUnmounted as h, openBlock as y, createElementBlock as u, mergeProps as S, unref as r, renderSlot as T, normalizeProps as O, guardReactiveProps as f } from "vue";
2
2
  import { D as B, a as x, E as D, b as R, c as V, d as W, e as w, f as F, g as Y, h as G, i as $, j as U, A as k, k as X, l as j } from "./utils-DkJWyyJQ.js";
3
3
  import { W as se, m as re, n as ie, o as ce } from "./utils-DkJWyyJQ.js";
4
4
  import { ensureCustomElementsDefinition as H, webPlayerPropsToAttributes as q, webPlayerCustomMediaPropsToAttributes as z, webPlayerIconPropsToAttributes as K } from "@car-cutter/wc-webplayer";
@@ -22,6 +22,7 @@ const ee = /* @__PURE__ */ d({
22
22
  eventPrefix: {},
23
23
  demoSpin: { type: Boolean },
24
24
  reverse360: { type: Boolean },
25
+ spinCursor: {},
25
26
  analyticsEventPrefix: {},
26
27
  analyticsUrl: {},
27
28
  analyticsBearer: {},
@@ -72,11 +73,11 @@ const ee = /* @__PURE__ */ d({
72
73
  }), E.forEach((e, t) => {
73
74
  document.removeEventListener(t, e);
74
75
  });
75
- }), (e, t) => (y(), T("cc-webplayer", S(r(L), {
76
+ }), (e, t) => (y(), u("cc-webplayer", S(r(L), {
76
77
  class: r(s),
77
78
  style: P
78
79
  }), [
79
- u(e.$slots, "default")
80
+ T(e.$slots, "default")
80
81
  ], 16));
81
82
  }
82
83
  }), te = /* @__PURE__ */ d({
@@ -87,8 +88,8 @@ const ee = /* @__PURE__ */ d({
87
88
  },
88
89
  setup(n) {
89
90
  const a = z(n);
90
- return (s, c) => (y(), T("cc-webplayer-custom-media", O(f(r(a))), [
91
- u(s.$slots, "default")
91
+ return (s, c) => (y(), u("cc-webplayer-custom-media", O(f(r(a))), [
92
+ T(s.$slots, "default")
92
93
  ], 16));
93
94
  }
94
95
  }), oe = /* @__PURE__ */ d({
@@ -98,8 +99,8 @@ const ee = /* @__PURE__ */ d({
98
99
  },
99
100
  setup(n) {
100
101
  const a = K(n);
101
- return (s, c) => (y(), T("cc-webplayer-icon", O(f(r(a))), [
102
- u(s.$slots, "default")
102
+ return (s, c) => (y(), u("cc-webplayer-icon", O(f(r(a))), [
103
+ T(s.$slots, "default")
103
104
  ], 16));
104
105
  }
105
106
  });
package/dist/vue2.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),e=require("./utils-Bfc4MSUL.cjs"),a=require("@car-cutter/wc-webplayer");a.ensureCustomElementsDefinition();const T=r.defineComponent({props:{compositionUrl:{type:String,required:!0},hideCategoriesNav:Boolean,infiniteCarrousel:Boolean,permanentGallery:Boolean,mediaLoadStrategy:String,minMediaWidth:Number,maxMediaWidth:Number,preloadRange:Number,autoLoad360:Boolean,autoLoadInterior360:Boolean,categoriesFilter:String,extendBehavior:String,eventPrefix:String,demoSpin:Boolean,reverse360:Boolean,analyticsEventPrefix:String,analyticsUrl:String,analyticsBearer:String,analyticsSimpleRequestsOnly:Boolean,analyticsDryRun:Boolean,analyticsDebug:Boolean},data(){return{eventCbMap:new Map,analyticsEventCbMap:new Map}},computed:{attributes(){return a.webPlayerPropsToAttributes(this.$props)}},methods:{generateEventName(n){return`${this.eventPrefix||e.DEFAULT_EVENT_PREFIX}${n}`},setupEventListeners(){const n={[e.EVENT_COMPOSITION_LOADING]:t=>this.$emit("compositionLoading",t),[e.EVENT_COMPOSITION_LOADED]:t=>this.$emit("compositionLoaded",t),[e.EVENT_COMPOSITION_LOAD_ERROR]:t=>this.$emit("compositionLoadError",t),[e.EVENT_ITEM_CHANGE]:t=>this.$emit("itemChange",t),[e.EVENT_EXTEND_MODE_ON]:()=>this.$emit("extendModeOn"),[e.EVENT_EXTEND_MODE_OFF]:()=>this.$emit("extendModeOff"),[e.EVENT_HOTSPOTS_ON]:()=>this.$emit("hotspotsOn"),[e.EVENT_HOTSPOTS_OFF]:()=>this.$emit("hotspotsOff"),[e.EVENT_GALLERY_OPEN]:()=>this.$emit("galleryOpen"),[e.EVENT_GALLERY_CLOSE]:()=>this.$emit("galleryClose")};Object.entries(n).forEach(([t,E])=>{if(!E)return;const i=this.generateEventName(t),o=s=>E(s.detail);this.eventCbMap.set(i,o),document.addEventListener(i,o)})},generateAnalyticsEventName(n){return`${this.analyticsEventPrefix||e.DEFAULT_ANALYTICS_EVENT_PREFIX}${n}`},setupAnalyticsEventListeners(){const n={[e.ANALYTICS_EVENT_IDENTIFY]:t=>this.$emit("analyticsIdentify",t),[e.ANALYTICS_EVENT_PAGE]:t=>this.$emit("analyticsPage",t),[e.ANALYTICS_EVENT_TRACK]:t=>this.$emit("analyticsTrack",t)};Object.entries(n).forEach(([t,E])=>{if(!E)return;const i=this.generateAnalyticsEventName(t),o=s=>E(s.detail);this.analyticsEventCbMap.set(i,o),document.addEventListener(i,o)})}},mounted(){this.setupEventListeners(),this.setupAnalyticsEventListeners()},beforeDestroy(){this.eventCbMap.forEach((n,t)=>{document.removeEventListener(t,n)}),this.analyticsEventCbMap.forEach((n,t)=>{document.removeEventListener(t,n)})}}),_=(n,t)=>{const E=n.__vccOpts||n;for(const[i,o]of t)E[i]=o;return E};function N(n,t,E,i,o,s){return r.openBlock(),r.createElementBlock("cc-webplayer",r.normalizeProps(r.guardReactiveProps(n.attributes)),[r.renderSlot(n.$slots,"default")],16)}const c=_(T,[["render",N]]),O=r.defineComponent({props:{index:{type:Number,required:!0},thumbnailSrc:String},computed:{attributes(){return a.webPlayerCustomMediaPropsToAttributes(this.$props)}}});function l(n,t,E,i,o,s){return r.openBlock(),r.createElementBlock("cc-webplayer-custom-media",r.normalizeProps(r.guardReactiveProps(n.attributes)),[r.renderSlot(n.$slots,"default")],16)}const p=_(O,[["render",l]]),u=r.defineComponent({props:{name:{type:String,required:!0}},computed:{attributes(){return a.webPlayerIconPropsToAttributes(this.$props)}}});function m(n,t,E,i,o,s){return r.openBlock(),r.createElementBlock("cc-webplayer-icon",r.normalizeProps(r.guardReactiveProps(n.attributes)),[r.renderSlot(n.$slots,"default")],16)}const A=_(u,[["render",m]]);exports.ANALYTICS_EVENT_IDENTIFY=e.ANALYTICS_EVENT_IDENTIFY;exports.ANALYTICS_EVENT_PAGE=e.ANALYTICS_EVENT_PAGE;exports.ANALYTICS_EVENT_TRACK=e.ANALYTICS_EVENT_TRACK;exports.DEFAULT_EVENT_PREFIX=e.DEFAULT_EVENT_PREFIX;exports.EVENT_COMPOSITION_LOADED=e.EVENT_COMPOSITION_LOADED;exports.EVENT_COMPOSITION_LOADING=e.EVENT_COMPOSITION_LOADING;exports.EVENT_COMPOSITION_LOAD_ERROR=e.EVENT_COMPOSITION_LOAD_ERROR;exports.EVENT_EXTEND_MODE_OFF=e.EVENT_EXTEND_MODE_OFF;exports.EVENT_EXTEND_MODE_ON=e.EVENT_EXTEND_MODE_ON;exports.EVENT_GALLERY_CLOSE=e.EVENT_GALLERY_CLOSE;exports.EVENT_GALLERY_OPEN=e.EVENT_GALLERY_OPEN;exports.EVENT_HOTSPOTS_OFF=e.EVENT_HOTSPOTS_OFF;exports.EVENT_HOTSPOTS_ON=e.EVENT_HOTSPOTS_ON;exports.EVENT_ITEM_CHANGE=e.EVENT_ITEM_CHANGE;exports.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG=e.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG;exports.WEB_PLAYER_ICON_WC_TAG=e.WEB_PLAYER_ICON_WC_TAG;exports.WEB_PLAYER_WC_TAG=e.WEB_PLAYER_WC_TAG;exports.generateCompositionUrl=e.generateCompositionUrl;exports.WebPlayer=c;exports.WebPlayerCustomMedia=p;exports.WebPlayerIcon=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),e=require("./utils-Bfc4MSUL.cjs"),a=require("@car-cutter/wc-webplayer");a.ensureCustomElementsDefinition();const T=r.defineComponent({props:{compositionUrl:{type:String,required:!0},hideCategoriesNav:Boolean,infiniteCarrousel:Boolean,permanentGallery:Boolean,mediaLoadStrategy:String,minMediaWidth:Number,maxMediaWidth:Number,preloadRange:Number,autoLoad360:Boolean,autoLoadInterior360:Boolean,categoriesFilter:String,extendBehavior:String,eventPrefix:String,demoSpin:Boolean,reverse360:Boolean,spinCursor:String,analyticsEventPrefix:String,analyticsUrl:String,analyticsBearer:String,analyticsSimpleRequestsOnly:Boolean,analyticsDryRun:Boolean,analyticsDebug:Boolean},data(){return{eventCbMap:new Map,analyticsEventCbMap:new Map}},computed:{attributes(){return a.webPlayerPropsToAttributes(this.$props)}},methods:{generateEventName(n){return`${this.eventPrefix||e.DEFAULT_EVENT_PREFIX}${n}`},setupEventListeners(){const n={[e.EVENT_COMPOSITION_LOADING]:t=>this.$emit("compositionLoading",t),[e.EVENT_COMPOSITION_LOADED]:t=>this.$emit("compositionLoaded",t),[e.EVENT_COMPOSITION_LOAD_ERROR]:t=>this.$emit("compositionLoadError",t),[e.EVENT_ITEM_CHANGE]:t=>this.$emit("itemChange",t),[e.EVENT_EXTEND_MODE_ON]:()=>this.$emit("extendModeOn"),[e.EVENT_EXTEND_MODE_OFF]:()=>this.$emit("extendModeOff"),[e.EVENT_HOTSPOTS_ON]:()=>this.$emit("hotspotsOn"),[e.EVENT_HOTSPOTS_OFF]:()=>this.$emit("hotspotsOff"),[e.EVENT_GALLERY_OPEN]:()=>this.$emit("galleryOpen"),[e.EVENT_GALLERY_CLOSE]:()=>this.$emit("galleryClose")};Object.entries(n).forEach(([t,E])=>{if(!E)return;const i=this.generateEventName(t),o=s=>E(s.detail);this.eventCbMap.set(i,o),document.addEventListener(i,o)})},generateAnalyticsEventName(n){return`${this.analyticsEventPrefix||e.DEFAULT_ANALYTICS_EVENT_PREFIX}${n}`},setupAnalyticsEventListeners(){const n={[e.ANALYTICS_EVENT_IDENTIFY]:t=>this.$emit("analyticsIdentify",t),[e.ANALYTICS_EVENT_PAGE]:t=>this.$emit("analyticsPage",t),[e.ANALYTICS_EVENT_TRACK]:t=>this.$emit("analyticsTrack",t)};Object.entries(n).forEach(([t,E])=>{if(!E)return;const i=this.generateAnalyticsEventName(t),o=s=>E(s.detail);this.analyticsEventCbMap.set(i,o),document.addEventListener(i,o)})}},mounted(){this.setupEventListeners(),this.setupAnalyticsEventListeners()},beforeDestroy(){this.eventCbMap.forEach((n,t)=>{document.removeEventListener(t,n)}),this.analyticsEventCbMap.forEach((n,t)=>{document.removeEventListener(t,n)})}}),_=(n,t)=>{const E=n.__vccOpts||n;for(const[i,o]of t)E[i]=o;return E};function N(n,t,E,i,o,s){return r.openBlock(),r.createElementBlock("cc-webplayer",r.normalizeProps(r.guardReactiveProps(n.attributes)),[r.renderSlot(n.$slots,"default")],16)}const c=_(T,[["render",N]]),O=r.defineComponent({props:{index:{type:Number,required:!0},thumbnailSrc:String},computed:{attributes(){return a.webPlayerCustomMediaPropsToAttributes(this.$props)}}});function l(n,t,E,i,o,s){return r.openBlock(),r.createElementBlock("cc-webplayer-custom-media",r.normalizeProps(r.guardReactiveProps(n.attributes)),[r.renderSlot(n.$slots,"default")],16)}const p=_(O,[["render",l]]),u=r.defineComponent({props:{name:{type:String,required:!0}},computed:{attributes(){return a.webPlayerIconPropsToAttributes(this.$props)}}});function m(n,t,E,i,o,s){return r.openBlock(),r.createElementBlock("cc-webplayer-icon",r.normalizeProps(r.guardReactiveProps(n.attributes)),[r.renderSlot(n.$slots,"default")],16)}const A=_(u,[["render",m]]);exports.ANALYTICS_EVENT_IDENTIFY=e.ANALYTICS_EVENT_IDENTIFY;exports.ANALYTICS_EVENT_PAGE=e.ANALYTICS_EVENT_PAGE;exports.ANALYTICS_EVENT_TRACK=e.ANALYTICS_EVENT_TRACK;exports.DEFAULT_EVENT_PREFIX=e.DEFAULT_EVENT_PREFIX;exports.EVENT_COMPOSITION_LOADED=e.EVENT_COMPOSITION_LOADED;exports.EVENT_COMPOSITION_LOADING=e.EVENT_COMPOSITION_LOADING;exports.EVENT_COMPOSITION_LOAD_ERROR=e.EVENT_COMPOSITION_LOAD_ERROR;exports.EVENT_EXTEND_MODE_OFF=e.EVENT_EXTEND_MODE_OFF;exports.EVENT_EXTEND_MODE_ON=e.EVENT_EXTEND_MODE_ON;exports.EVENT_GALLERY_CLOSE=e.EVENT_GALLERY_CLOSE;exports.EVENT_GALLERY_OPEN=e.EVENT_GALLERY_OPEN;exports.EVENT_HOTSPOTS_OFF=e.EVENT_HOTSPOTS_OFF;exports.EVENT_HOTSPOTS_ON=e.EVENT_HOTSPOTS_ON;exports.EVENT_ITEM_CHANGE=e.EVENT_ITEM_CHANGE;exports.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG=e.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG;exports.WEB_PLAYER_ICON_WC_TAG=e.WEB_PLAYER_ICON_WC_TAG;exports.WEB_PLAYER_WC_TAG=e.WEB_PLAYER_WC_TAG;exports.generateCompositionUrl=e.generateCompositionUrl;exports.WebPlayer=c;exports.WebPlayerCustomMedia=p;exports.WebPlayerIcon=A;
package/dist/vue2.d.ts CHANGED
@@ -154,6 +154,7 @@ extendBehavior: StringConstructor;
154
154
  eventPrefix: StringConstructor;
155
155
  demoSpin: BooleanConstructor;
156
156
  reverse360: BooleanConstructor;
157
+ spinCursor: StringConstructor;
157
158
  analyticsEventPrefix: StringConstructor;
158
159
  analyticsUrl: StringConstructor;
159
160
  analyticsBearer: StringConstructor;
@@ -189,6 +190,7 @@ extendBehavior: StringConstructor;
189
190
  eventPrefix: StringConstructor;
190
191
  demoSpin: BooleanConstructor;
191
192
  reverse360: BooleanConstructor;
193
+ spinCursor: StringConstructor;
192
194
  analyticsEventPrefix: StringConstructor;
193
195
  analyticsUrl: StringConstructor;
194
196
  analyticsBearer: StringConstructor;
@@ -297,6 +299,7 @@ export declare type WebPlayerProps = {
297
299
  eventPrefix?: string;
298
300
  demoSpin?: boolean;
299
301
  reverse360?: boolean;
302
+ spinCursor?: string;
300
303
 
301
304
  // Analytics
302
305
  analyticsEventPrefix?: string;
package/dist/vue2.js CHANGED
@@ -20,6 +20,7 @@ const I = i({
20
20
  eventPrefix: String,
21
21
  demoSpin: Boolean,
22
22
  reverse360: Boolean,
23
+ spinCursor: String,
23
24
  analyticsEventPrefix: String,
24
25
  analyticsUrl: String,
25
26
  analyticsBearer: String,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@car-cutter/vue-webplayer",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "license": "Apache-2.0",
5
5
  "author": {
6
6
  "name": "CarCutter",
@@ -45,7 +45,7 @@
45
45
  "analyze": "vite-bundle-visualizer"
46
46
  },
47
47
  "dependencies": {
48
- "@car-cutter/wc-webplayer": "3.1.0"
48
+ "@car-cutter/wc-webplayer": "3.1.1"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "vue": ">=2"