@mapvx/web-components 0.0.18 → 0.0.19
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/cjs/back_arrow-Cb1GjmUe.cjs +2 -0
- package/dist/cjs/{consume-BFImOAwk.cjs → consume-CE1TVLg-.cjs} +2 -2
- package/dist/cjs/custom-map-C_Cpnb0N.cjs +8 -0
- package/dist/cjs/floor-selector-D6YcNzdw.cjs +20 -0
- package/dist/cjs/{lazy-load-B_m5cmiy.cjs → lazy-load-DHtTuPrp.cjs} +2 -2
- package/dist/cjs/map-view-with-modal.cjs +1 -1
- package/dist/cjs/qr-modal-CkWqbgpG.cjs +16 -0
- package/dist/cjs/{route-options-CO_OCowG.cjs → route-options-H5wyZZ4h.cjs} +3 -3
- package/dist/cjs/route-view-totems.cjs +3 -4
- package/dist/es/assets/back_arrow-CUOAm8Zc.js +4 -0
- package/dist/es/assets/{components-KK5HFu0_.js → components-y75xh-dL.js} +17 -38
- package/dist/es/assets/{map-view-with-modal-CaAivY-n.js → map-view-with-modal-B5Mk49H1.js} +3 -3
- package/dist/es/assets/{route-view-totems-BYQG4LAF.js → route-view-totems-C8X6pCW7.js} +15 -14
- package/dist/es/assets/{utils-BxHEw8O3.js → utils-C2SiQIHC.js} +29 -61
- package/dist/es/index.js +2 -2
- package/dist/es/route-view-totems.js +2 -2
- package/dist/iife/map-view-with-modal.js +13 -13
- package/dist/iife/route-view-totems.js +26 -27
- package/package.json +2 -26
- package/dist/cjs/back_arrow-DNrh84z6.cjs +0 -2
- package/dist/cjs/class-map-Bdex8DcD.cjs +0 -12
- package/dist/cjs/custom-map-DARXhpnO.cjs +0 -8
- package/dist/cjs/floor-selector-CzILr6OJ.cjs +0 -15
- package/dist/cjs/qr-modal-D-Dxv4eF.cjs +0 -16
- package/dist/es/assets/back_arrow-B4vxoqtW.js +0 -4
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./consume-CE1TVLg-.cjs"),e=require("./lazy-load-DHtTuPrp.cjs"),o=1;class r{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2018 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/const n=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends r{constructor(t){if(super(t),t.type!==o||"class"!==t.name||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[o]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in o)o[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(o)}const r=t.element.classList;for(const e of this.st)e in o||(r.remove(e),this.st.delete(e));for(const e in o){const t=!!o[e];t===this.st.has(e)||this.nt?.has(e)||(t?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return e.T}});var i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=(t,e,o,r)=>{for(var n,a=r>1?void 0:r?s(e,o):e,l=t.length-1;l>=0;l--)(n=t[l])&&(a=(r?n(e,o,a):n(a))||a);return r&&a&&i(e,o,a),a};exports.FloorSelector=class extends e.i{_selectFloor(t){this.dispatchEvent(new CustomEvent("floorChange",{detail:t,bubbles:!0,composed:!0}))}render(){if(!this.sdkData)return e.x`<div>No data</div>`;const{currentFloor:t,parentPlace:o,enabledFloors:r}=this.sdkData;let i=o?.innerFloors||[];const s=this.sdkData?.generalConfig?.enabledFloors||[];return s.length>0&&(i=i.filter((t=>s.includes(t.key)))),e.x`
|
|
7
|
+
<div class="floor-selector-container">
|
|
8
|
+
${i.map((o=>{const i=o.key===t?.key,s=r?.some((t=>t.key===o.key))||!1;return e.x`
|
|
9
|
+
<div class="floor-btn-container">
|
|
10
|
+
<button
|
|
11
|
+
class=${n({"floor-btn":!0,active:i,disabled:!i&&!s})}
|
|
12
|
+
@click=${()=>s?this._selectFloor(o.key):null}
|
|
13
|
+
>
|
|
14
|
+
<span>${o.name}</span>
|
|
15
|
+
</button>
|
|
16
|
+
</div>
|
|
17
|
+
`}))}
|
|
18
|
+
</div>
|
|
19
|
+
`}},exports.FloorSelector.styles=[e.r(':host{position:absolute;top:0;right:10px}.floor-selector-container{display:flex;flex-direction:row;background:#fff;border-radius:0 0 30px 30px;box-shadow:0 0 15px #00000026;padding:0 24px;gap:8px;min-height:60px}.btn-floor{height:auto;width:100px;vertical-align:middle;font-size:small!important;word-wrap:break-word!important;font-family:Poppins;font-weight:600;font-size:16pt;border-radius:10px;border:0;box-shadow:0 0 15px #00000026}@media only screen and (max-width: 576px){.btn-floor{padding:6px;width:70px;height:auto;font-size:small!important}}.floor-btn-container:hover .floor-btn:not(.active):not(.disabled){width:100%;height:100%;border-radius:0 0 999px 999px;background:#000;color:#fff}.floor-btn{transition:background .2s ease,color .2s ease,transform .2s ease,opacity .2s ease;position:relative;background:transparent;border:none;outline:none;font-family:Poppins,sans-serif;font-weight:600;font-size:16px;padding:0 18px;border-radius:0 0 30px 30px;cursor:pointer;transition:all .2s ease;min-width:70px;height:100%;display:flex;align-items:center;justify-content:center;color:#000;z-index:1}.floor-btn.disabled{color:#c5c3c3;background:transparent;pointer-events:none;-webkit-tap-highlight-color:transparent;user-select:none}.floor-btn.active{color:#fff;background:transparent;z-index:2}.floor-btn.active:after{content:"";position:absolute;inset:0 2px;border-radius:0 0 999px 999px;background:#000;color:#fff;z-index:1}.floor-btn.active:before{content:"";position:absolute;inset:0 -3px -3px;border-radius:0 0 999px 999px;background:linear-gradient(45.8deg,#f5a 10.03%,#b850c9 25.23%,#6572d6 48.67%,#4eaeb8 72.74%);z-index:0}.floor-btn.active span{z-index:10}@media (max-width: 1100px){.floor-btn-container:hover .floor-btn:not(.active):not(.disabled){border-radius:999px 0 0 999px}.floor-selector-container{right:0;position:fixed;top:50%;transform:translateY(-50%);display:flex;flex-direction:column-reverse;border-radius:30px 0 0 30px;min-width:87px;max-height:100%;height:auto;padding:0;gap:0}.floor-btn-container{padding:0;width:100%}.floor-btn{width:100%;padding:20px;border-radius:999px 0 0 999px}.floor-btn.active:after{position:absolute;inset:2px 0 2px 2px;border-radius:999px 0 0 999px}.floor-btn.active:before{inset:-3px 0 -3px -3px;border-radius:999px 0 0 999px}}')],a([t.c({context:e.sdkContext,subscribe:!0})],exports.FloorSelector.prototype,"sdkData",2),exports.FloorSelector=a([e.t("floor-selector")],exports.FloorSelector);
|
|
20
|
+
//# sourceMappingURL=floor-selector-D6YcNzdw.cjs.map
|