@epigraph/solutions 0.19.0-canary.5 → 0.19.0-canary.7

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.
@@ -7028,7 +7028,7 @@ Arguments: [`+B+"]"}},s.fz.prototype={k(n){return"Unsupported operation: "+this.
7028
7028
  }
7029
7029
  }
7030
7030
  }
7031
- `]}updateActiveHotspotIndex(){this.activeHotspot&&(this.activeHotspotIndex=this.hotspotsOrder.indexOf(this.activeHotspot?.hotspotId))}static setupWebComponent(){window.customElements.get(kd.webComponentName)||window.customElements.define(kd.webComponentName,kd)}firstUpdated(e){super.firstUpdated(e),this.__setupEventListeners()}updated(e){if(e.has("__cardsState")){const i=this.__currentCardsPerView,a=this.__cardsState===ji.collapsed?1.2:1.03;if(St.animateValue(i,a,500,l=>{this.__currentCardsPerView=l}),this?.cardsCarouselSwiperContainer?.swiper!==void 0){this.cardsCarouselSwiperContainer.swiper.allowTouchMove=this.__cardsState===ji.collapsed;const l=this.cardsCarouselSwiperContainer.querySelectorAll("epg-card");for(const u of l)u.showPreviousButton=this.__cardsState===ji.expanded&&!u.hasAttribute("is-first-hotspot"),u.showNextButton=this.__cardsState===ji.expanded&&!u.hasAttribute("is-last-hotspot")}}e.get("activeHotspotIndex")>=0&&this.cardsCarouselSwiperContainer.swiper.slideTo(this.activeHotspotIndex,400)}addHotspot(e){const t=new zm({config:e,appWcRef:this.appWcRef,hotspotManagerRef:this});this.hotspots.set(t.hotspotId,t)}updateHotspot(e,t){const i=this.hotspots.get(e);i&&i.updateHotspotConfig(t)}removeHotspot(e){this.hotspots.delete(e)}createHotspots(e){for(const t of e){const i=new zm({config:t,appWcRef:this.appWcRef,hotspotManagerRef:this});this.hotspots.set(i.hotspotId,i)}this.updateHotspotsOrder(Array.from(this.hotspots.keys()))}stepHotspots(e){const t=this.activeHotspotIndex;if(t===null)return;const i=this.hotspotsOrder.length;let a=t;e==="next"?(a=t+1,a>=i&&(a=0)):e==="prev"&&(a=t-1,a<0&&(a=i-1));const l=this.hotspotsOrder[a];this.setActiveHotspot({hotspotId:l})}nextHotspot(){return this.stepHotspots("next"),this.appWcRef.eventsManager.hotspotNextEvent.fire({hotspot:this.activeHotspot}),this.activeHotspot}previousHotspot(){return this.stepHotspots("prev"),this.appWcRef.eventsManager.hotspotPreviousEvent.fire({hotspot:this.activeHotspot}),this.activeHotspot}openHotspot({hotspotId:e,state:t,skipHotspotOpenEvent:i=!1}){this.appWcRef.playInteractionPrompt=!1,this.setActiveHotspot({hotspotId:e,state:t}),i||this.appWcRef.eventsManager.hotspotOpenEvent.fire({hotspot:this.activeHotspot});const a=new tr(!0,tr.PANEL_TYPE.HOTSPOT_PANEL,tr.TRIGGER_SOURCE.HOTSPOT,[]);this.appWcRef.epigraphAnalytics.sendEvent(a)}closeActiveHotspot(){const e=this.activeHotspot?.hotspotId;this.setActiveHotspot({hotspotId:null}),this.appWcRef.eventsManager.hotspotClosedEvent.fire({hotspotId:e});const t=new ir(!0,ir.PANEL_TYPE.HOTSPOT_PANEL,ir.TRIGGER_SOURCE.BUTTON,[]);this.appWcRef.epigraphAnalytics.sendEvent(t)}updateHotspots(e){for(const t of e){const i=this.hotspots.get(t.hotspotId);i&&i.updateHotspotConfig(t)}this.__resolveHotspotCardContents()}updateHotspotsOrder(e){this.hotspotsOrder=e}removeHotspots(e){this.activeHotspot&&this.closeActiveHotspot();for(const t of e)this.hotspots.delete(t);this.updateHotspotsOrder(Array.from(this.hotspots.keys()))}removeAllHotspots(){this.removeHotspots(Array.from(this.hotspots.keys()))}setActiveHotspotByIndex(e){const t=this.hotspotsOrder[e];this.setActiveHotspot({hotspotId:t,state:this.__cardsState})}setActiveHotspot({hotspotId:e,state:t=this.__cardsState}){if(this.activeHotspot?.hotspotId===e)return;if(e===null){this.activeHotspot=void 0,this.updateActiveHotspotIndex(),this.appWcRef.cameraManager.resetCurrentCameraTransformsToLastSavedState();return}this.enabled===!1&&(this.enabled=!0);const i=!this.activeHotspot;if(this.activeHotspot=this.hotspots.get(e),this.updateActiveHotspotIndex(),this.setActiveHotspotState(t),this.__resolveHotspotCardContents(),this.appWcRef.eventsManager.cameraMoveToTransform.fire({cameraTransforms:this.activeHotspot?.camera,saveFirst:i}),this.appWcRef.isPortraitOrientation){const a=this.appWcRef.cameraManager.mainCameraControls,l=new se;a.getTarget(l,!0);const u=new se;a.getPosition(u,!0),a.setLookAt(u.x-l.x,u.y,u.z-l.z,0,l.y,0,!0),a.setFocalOffset(0,.1,0,!0)}}expandCards(){this.__cardsState=ji.expanded}collapseCards(){this.__cardsState=ji.collapsed}setActiveHotspotState(e=ji.collapsed){if(this.activeHotspot)switch(this.appWcRef.clientHeight<420&&(e=ji.expanded),e){case ji.collapsed:this.collapseCards();break;case ji.expanded:this.expandCards();break}}__resolveHotspotCardContents(){this.__allCards=[];let e=0;const t=this.hotspots.size-1,i=this.hotspots.size>1;for(const a of this.hotspots.values()){const l=e===0,u=e===t,d=Ee`
7031
+ `]}updateActiveHotspotIndex(){this.activeHotspot&&(this.activeHotspotIndex=this.hotspotsOrder.indexOf(this.activeHotspot?.hotspotId))}static setupWebComponent(){window.customElements.get(kd.webComponentName)||window.customElements.define(kd.webComponentName,kd)}firstUpdated(e){super.firstUpdated(e),this.__setupEventListeners()}updated(e){if(e.has("__cardsState")){const i=this.__currentCardsPerView,a=this.__cardsState===ji.collapsed?1.2:1.03;if(St.animateValue(i,a,500,l=>{this.__currentCardsPerView=l}),this?.cardsCarouselSwiperContainer?.swiper!==void 0){this.cardsCarouselSwiperContainer.swiper.allowTouchMove=this.__cardsState===ji.collapsed;const l=this.cardsCarouselSwiperContainer.querySelectorAll("epg-card");for(const u of l)u.showPreviousButton=this.__cardsState===ji.expanded&&!u.hasAttribute("is-first-hotspot"),u.showNextButton=this.__cardsState===ji.expanded&&!u.hasAttribute("is-last-hotspot")}}e.get("activeHotspotIndex")>=0&&this.cardsCarouselSwiperContainer.swiper.slideTo(this.activeHotspotIndex,400)}addHotspot(e){const t=new zm({config:e,appWcRef:this.appWcRef,hotspotManagerRef:this});this.hotspots.set(t.hotspotId,t),this.updateHotspotsOrder(Array.from(this.hotspots.keys()))}updateHotspot(e,t){const i=this.hotspots.get(e);i&&i.updateHotspotConfig(t),this.__resolveHotspotCardContents()}removeHotspot(e){this.hotspots.delete(e),this.updateHotspotsOrder(Array.from(this.hotspots.keys()))}createHotspots(e){for(const t of e){const i=new zm({config:t,appWcRef:this.appWcRef,hotspotManagerRef:this});this.hotspots.set(i.hotspotId,i)}this.updateHotspotsOrder(Array.from(this.hotspots.keys()))}updateHotspots(e){for(const t of e){const i=this.hotspots.get(t.hotspotId);i&&i.updateHotspotConfig(t)}this.__resolveHotspotCardContents()}removeHotspots(e){this.activeHotspot&&this.closeActiveHotspot();for(const t of e)this.hotspots.delete(t);this.updateHotspotsOrder(Array.from(this.hotspots.keys()))}stepHotspots(e){const t=this.activeHotspotIndex;if(t===null)return;const i=this.hotspotsOrder.length;let a=t;e==="next"?(a=t+1,a>=i&&(a=0)):e==="prev"&&(a=t-1,a<0&&(a=i-1));const l=this.hotspotsOrder[a];this.setActiveHotspot({hotspotId:l})}nextHotspot(){return this.stepHotspots("next"),this.appWcRef.eventsManager.hotspotNextEvent.fire({hotspot:this.activeHotspot}),this.activeHotspot}previousHotspot(){return this.stepHotspots("prev"),this.appWcRef.eventsManager.hotspotPreviousEvent.fire({hotspot:this.activeHotspot}),this.activeHotspot}openHotspot({hotspotId:e,state:t,skipHotspotOpenEvent:i=!1}){this.appWcRef.playInteractionPrompt=!1,this.setActiveHotspot({hotspotId:e,state:t}),i||this.appWcRef.eventsManager.hotspotOpenEvent.fire({hotspot:this.activeHotspot});const a=new tr(!0,tr.PANEL_TYPE.HOTSPOT_PANEL,tr.TRIGGER_SOURCE.HOTSPOT,[]);this.appWcRef.epigraphAnalytics.sendEvent(a)}closeActiveHotspot(){const e=this.activeHotspot?.hotspotId;this.setActiveHotspot({hotspotId:null}),this.appWcRef.eventsManager.hotspotClosedEvent.fire({hotspotId:e});const t=new ir(!0,ir.PANEL_TYPE.HOTSPOT_PANEL,ir.TRIGGER_SOURCE.BUTTON,[]);this.appWcRef.epigraphAnalytics.sendEvent(t)}updateHotspotsOrder(e){this.hotspotsOrder=e}removeAllHotspots(){this.removeHotspots(Array.from(this.hotspots.keys()))}setActiveHotspotByIndex(e){const t=this.hotspotsOrder[e];this.setActiveHotspot({hotspotId:t,state:this.__cardsState})}setActiveHotspot({hotspotId:e,state:t=this.__cardsState}){if(this.activeHotspot?.hotspotId===e)return;if(e===null){this.activeHotspot=void 0,this.updateActiveHotspotIndex(),this.appWcRef.cameraManager.resetCurrentCameraTransformsToLastSavedState();return}this.enabled===!1&&(this.enabled=!0);const i=!this.activeHotspot;if(this.activeHotspot=this.hotspots.get(e),this.updateActiveHotspotIndex(),this.setActiveHotspotState(t),this.__resolveHotspotCardContents(),this.appWcRef.eventsManager.cameraMoveToTransform.fire({cameraTransforms:this.activeHotspot?.camera,saveFirst:i}),this.appWcRef.isPortraitOrientation){const a=this.appWcRef.cameraManager.mainCameraControls,l=new se;a.getTarget(l,!0);const u=new se;a.getPosition(u,!0),a.setLookAt(u.x-l.x,u.y,u.z-l.z,0,l.y,0,!0),a.setFocalOffset(0,.1,0,!0)}}expandCards(){this.__cardsState=ji.expanded}collapseCards(){this.__cardsState=ji.collapsed}setActiveHotspotState(e=ji.collapsed){if(this.activeHotspot)switch(this.appWcRef.clientHeight<420&&(e=ji.expanded),e){case ji.collapsed:this.collapseCards();break;case ji.expanded:this.expandCards();break}}__resolveHotspotCardContents(){this.__allCards=[];let e=0;const t=this.hotspots.size-1,i=this.hotspots.size>1;for(const a of this.hotspots.values()){const l=e===0,u=e===t,d=Ee`
7032
7032
  <swiper-slide part="swiper-slide">
7033
7033
  <style>
7034
7034
  .expand-button {
@@ -8709,4 +8709,4 @@ void main() {
8709
8709
  :host {
8710
8710
  position: relative;
8711
8711
  }
8712
- `]}static setupWebComponent(){window.customElements.get(Ta.webComponentName)||window.customElements.define(Ta.webComponentName,Ta)}getWebComponentName(){return Ta.webComponentName}firstUpdated(){const e=this.parsedUrlParams.get(Ii.identifierType),t=this.parsedUrlParams.get(Ii.identifier);e&&e&&this.setAttribute(String(e),String(t)),super.firstUpdated()}async _fetchExperienceDataConfig(){const e=new x0(St.resolveNexusEndpoint(this.apiMode),window.location.href,window.epigraph.epigraphSessionId,this.solutionVersion,this.xPath);let t=null;switch(this._identifierType){case"sku":t=await e.getViewerBySku(this._identifier,this.customVersionId);break;case"shopify_variant_id":t=await e.getViewerByShopifyVariantId(this._identifier,this.customVersionId);break;case"upc":t=await e.getViewerByUpc(this._identifier,this.customVersionId);break;case"asin":t=await e.getViewerByAsin(this._identifier,this.customVersionId);break;case"product_variant_uuid":t=await e.getTourByUuid(this._identifier,this.customVersionId);break;default:return window.epigraph.logger.error({title:`Identifier type: '${this._identifierType}' not supported!`,contextOverride:this._loggerContext}),Promise.reject()}return t}};fH([Ut("#viewInYourSpaceButton")],BT.prototype,"viewInYourSpaceButtonElem");let PT=BT;class LT extends RT{constructor(e){super(e),this._appWcRef=e}showHotspots(){this._appWcRef.showHotspots()}hideHotspots(){this._appWcRef.hideHotspots()}toggleHotspots(){this._appWcRef.toggleHotspots()}updateHotspotsOrder(e){this._appWcRef.updateHotspotsOrder(e)}openHotspot({hotspotId:e,state:t,skipHotspotOpenEvent:i=!1}){this._appWcRef.openHotspot({hotspotId:e,state:t,skipHotspotOpenEvent:i})}closeActiveHotspot(){this._appWcRef.closeActiveHotspot()}setActiveHotspotState(e){this._appWcRef.setActiveHotspotState(e)}nextHotspot(){return this._appWcRef.nextHotspot()}previousHotspot(){return this._appWcRef.previousHotspot()}getActiveHotspot(){return this._appWcRef.getActiveHotspot()}areHotspotsVisible(){return this._appWcRef.areHotspotsVisible()}getAllHotspots(){return this._appWcRef.getAllHotspots()}getAllHotspotIds(){return this._appWcRef.getAllHotspotIds()}getHotspotById(e){return this._appWcRef.getHotspotById(e)}createHotspots(e){this._appWcRef.createHotspots(e)}updateHotspots(e){this._appWcRef.updateHotspots(e)}removeHotspots(e){this._appWcRef.removeHotspots(e)}}const pH={hideHotspotsOnStart:{name:"hide-hotspots-on-start"}};var mH=Object.defineProperty,gH=(o,e,t,i)=>{for(var a=void 0,l=o.length-1,u;l>=0;l--)(u=o[l])&&(a=u(e,t,a)||a);return a&&mH(e,t,a),a};const DT=class Ia extends PT{constructor(){super(),this.featuresToEnable={viewer:!0,hotspots:!0,dimensions:!0,viewInYourSpace:!0,help:!0,sceneManager:!0},this.epigraphWebsiteRedirectUrls={icon:"https://www.epigraph.us/?utm_source=epigraph&utm_medium=experience&utm_campaign=powered-by&utm_id=powered-by-icon&utm_content=tour",modal:"https://www.epigraph.us/?utm_source=epigraph&utm_medium=experience&utm_campaign=powered-by&utm_id=powered-by-modal&utm_content=tour"},this.hideHotspotsOnStart=!1,this._loggerContext=Ia.webComponentName.toUpperCase(),window.epigraph.logger.info({title:`Initializing ${Ia.webComponentName}...`,contextOverride:this._loggerContext}),this.api=new LT(this)}static{this.webComponentName="epigraph-tour"}static{this.styles=[super.styles]}static setupWebComponent(){window.customElements.get(Ia.webComponentName)||window.customElements.define(Ia.webComponentName,Ia)}getWebComponentName(){return Ia.webComponentName}async _fetchExperienceDataConfig(){const e=new x0(St.resolveNexusEndpoint(this.apiMode),window.location.href,window.epigraph.epigraphSessionId,this.solutionVersion,this.xPath);let t=null;switch(this._identifierType){case"sku":t=await e.getTourBySku(this._identifier,this.customVersionId);break;case"shopify_variant_id":t=await e.getTourByShopifyVariantId(this._identifier,this.customVersionId);break;case"upc":t=await e.getTourByUpc(this._identifier,this.customVersionId);break;case"asin":t=await e.getTourByAsin(this._identifier,this.customVersionId);break;case"product_variant_uuid":t=await e.getTourByUuid(this._identifier,this.customVersionId);break;default:return window.epigraph.logger.error({title:`Identifier type: '${this._identifierType}' not supported!`,contextOverride:this._loggerContext}),Promise.reject()}return t}firstUpdated(){super.firstUpdated(),this.areHotspotsActive=!this.hideHotspotsOnStart}};gH([ue({type:Boolean,attribute:pH.hideHotspotsOnStart.name})],DT.prototype,"hideHotspotsOnStart");let NT=DT;class AH extends LT{constructor(e){super(e),this._appWcRef=e}}class Mr extends NT{constructor(){super(),this._loggerContext=Mr.webComponentName.toUpperCase(),window.epigraph.logger.info({title:`Initializing ${Mr.webComponentName}...`,contextOverride:this._loggerContext}),this.api=new AH(this)}static{this.webComponentName="epigraph-hotspot-tool"}static{this.styles=[super.styles]}static setupWebComponent(){window.customElements.get(Mr.webComponentName)||window.customElements.define(Mr.webComponentName,Mr)}getWebComponentName(){return Mr.webComponentName}}R_.setupWebComponent();hH.setupWebComponent();PT.setupWebComponent();NT.setupWebComponent();Mr.setupWebComponent();
8712
+ `]}static setupWebComponent(){window.customElements.get(Ta.webComponentName)||window.customElements.define(Ta.webComponentName,Ta)}getWebComponentName(){return Ta.webComponentName}firstUpdated(){const e=this.parsedUrlParams.get(Ii.identifierType),t=this.parsedUrlParams.get(Ii.identifier);e&&e&&this.setAttribute(String(e),String(t)),super.firstUpdated()}async _fetchExperienceDataConfig(){const e=new x0(St.resolveNexusEndpoint(this.apiMode),window.location.href,window.epigraph.epigraphSessionId,this.solutionVersion,this.xPath);let t=null;switch(this._identifierType){case"sku":t=await e.getViewerBySku(this._identifier,this.customVersionId);break;case"shopify_variant_id":t=await e.getViewerByShopifyVariantId(this._identifier,this.customVersionId);break;case"upc":t=await e.getViewerByUpc(this._identifier,this.customVersionId);break;case"asin":t=await e.getViewerByAsin(this._identifier,this.customVersionId);break;case"product_variant_uuid":t=await e.getTourByUuid(this._identifier,this.customVersionId);break;default:return window.epigraph.logger.error({title:`Identifier type: '${this._identifierType}' not supported!`,contextOverride:this._loggerContext}),Promise.reject()}return t}};fH([Ut("#viewInYourSpaceButton")],BT.prototype,"viewInYourSpaceButtonElem");let PT=BT;class LT extends RT{constructor(e){super(e),this._appWcRef=e}showHotspots(){this._appWcRef.showHotspots()}hideHotspots(){this._appWcRef.hideHotspots()}toggleHotspots(){this._appWcRef.toggleHotspots()}updateHotspotsOrder(e){this._appWcRef.updateHotspotsOrder(e)}openHotspot({hotspotId:e,state:t,skipHotspotOpenEvent:i=!1}){this._appWcRef.openHotspot({hotspotId:e,state:t,skipHotspotOpenEvent:i})}closeActiveHotspot(){this._appWcRef.closeActiveHotspot()}setActiveHotspotState(e){this._appWcRef.setActiveHotspotState(e)}nextHotspot(){return this._appWcRef.nextHotspot()}previousHotspot(){return this._appWcRef.previousHotspot()}getActiveHotspot(){return this._appWcRef.getActiveHotspot()}areHotspotsVisible(){return this._appWcRef.areHotspotsVisible()}getAllHotspots(){return this._appWcRef.getAllHotspots()}getAllHotspotIds(){return this._appWcRef.getAllHotspotIds()}getHotspotById(e){return this._appWcRef.getHotspotById(e)}createHotspots(e){this._appWcRef.createHotspots(e)}updateHotspots(e){this._appWcRef.updateHotspots(e)}removeHotspots(e){this._appWcRef.removeHotspots(e)}}const pH={hideHotspotsOnStart:{name:"hide-hotspots-on-start"}};var mH=Object.defineProperty,gH=(o,e,t,i)=>{for(var a=void 0,l=o.length-1,u;l>=0;l--)(u=o[l])&&(a=u(e,t,a)||a);return a&&mH(e,t,a),a};const DT=class Ia extends PT{constructor(){super(),this.featuresToEnable={viewer:!0,hotspots:!0,dimensions:!0,viewInYourSpace:!0,help:!0,sceneManager:!0},this.epigraphWebsiteRedirectUrls={icon:"https://www.epigraph.us/?utm_source=epigraph&utm_medium=experience&utm_campaign=powered-by&utm_id=powered-by-icon&utm_content=tour",modal:"https://www.epigraph.us/?utm_source=epigraph&utm_medium=experience&utm_campaign=powered-by&utm_id=powered-by-modal&utm_content=tour"},this.hideHotspotsOnStart=!1,this._loggerContext=Ia.webComponentName.toUpperCase(),window.epigraph.logger.info({title:`Initializing ${Ia.webComponentName}...`,contextOverride:this._loggerContext}),this.api=new LT(this)}static{this.webComponentName="epigraph-tour"}static{this.styles=[super.styles]}static setupWebComponent(){window.customElements.get(Ia.webComponentName)||window.customElements.define(Ia.webComponentName,Ia)}getWebComponentName(){return Ia.webComponentName}async _fetchExperienceDataConfig(){const e=new x0(St.resolveNexusEndpoint(this.apiMode),window.location.href,window.epigraph.epigraphSessionId,this.solutionVersion,this.xPath);let t=null;switch(this._identifierType){case"sku":t=await e.getTourBySku(this._identifier,this.customVersionId);break;case"shopify_variant_id":t=await e.getTourByShopifyVariantId(this._identifier,this.customVersionId);break;case"upc":t=await e.getTourByUpc(this._identifier,this.customVersionId);break;case"asin":t=await e.getTourByAsin(this._identifier,this.customVersionId);break;case"product_variant_uuid":t=await e.getTourByUuid(this._identifier,this.customVersionId);break;default:return window.epigraph.logger.error({title:`Identifier type: '${this._identifierType}' not supported!`,contextOverride:this._loggerContext}),Promise.reject()}return t}firstUpdated(){super.firstUpdated(),this.areHotspotsActive=!this.hideHotspotsOnStart}};gH([ue({type:Boolean,attribute:pH.hideHotspotsOnStart.name})],DT.prototype,"hideHotspotsOnStart");let NT=DT;class AH extends LT{constructor(e){super(e),this._appWcRef=e}addHotspot(e){this._appWcRef.hotspotsManager.addHotspot(e)}updateHotspot(e,t){this._appWcRef.hotspotsManager.updateHotspot(e,t)}removeHotspot(e){this._appWcRef.hotspotsManager.removeHotspot(e)}}class Mr extends NT{constructor(){super(),this._loggerContext=Mr.webComponentName.toUpperCase(),window.epigraph.logger.info({title:`Initializing ${Mr.webComponentName}...`,contextOverride:this._loggerContext}),this.api=new AH(this)}static{this.webComponentName="epigraph-hotspot-tool"}static{this.styles=[super.styles]}static setupWebComponent(){window.customElements.get(Mr.webComponentName)||window.customElements.define(Mr.webComponentName,Mr)}getWebComponentName(){return Mr.webComponentName}}R_.setupWebComponent();hH.setupWebComponent();PT.setupWebComponent();NT.setupWebComponent();Mr.setupWebComponent();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epigraph/solutions",
3
- "version": "0.19.0-canary.5",
3
+ "version": "0.19.0-canary.7",
4
4
  "type": "module",
5
5
  "main": "./dist/epigraph-solutions.js",
6
6
  "files": [