@epigraph/solutions 0.19.0-canary.6 → 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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epigraph/solutions",
3
- "version": "0.19.0-canary.6",
3
+ "version": "0.19.0-canary.7",
4
4
  "type": "module",
5
5
  "main": "./dist/epigraph-solutions.js",
6
6
  "files": [