@mapvx/web-components 0.0.23 → 0.0.25
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/{base-floor-selector-CFWNvVet.cjs → base-floor-selector-C1G5K9Er.cjs} +2 -2
- package/dist/cjs/{class-map-DfzRTbYX.cjs → class-map-BQQ7MXll.cjs} +2 -2
- package/dist/cjs/compact-floor-selector-DsMWGOFg.cjs +176 -0
- package/dist/cjs/{consume-DvK04Qkq.cjs → consume-DRj4CYCX.cjs} +2 -2
- package/dist/cjs/{custom-map-Csx71pWL.cjs → custom-map-DDdkf9Am.cjs} +24 -37
- package/dist/cjs/{floor-selector-Co3QpwzQ.cjs → floor-selector-CDmDuSiD.cjs} +2 -2
- package/dist/cjs/{lazy-load-DKre9Iqr.cjs → lazy-load-Dn0YjnPb.cjs} +2 -2
- package/dist/cjs/map-view-with-modal.cjs +57 -38
- package/dist/cjs/{qr-modal-CYh9P4bM.cjs → qr-modal-DViSVtZI.cjs} +2 -2
- package/dist/cjs/{route-options-DxYiU5zC.cjs → route-options-CyEO6vv_.cjs} +2 -2
- package/dist/cjs/route-view-totems.cjs +8 -3
- package/dist/components/custom-map.d.ts +13 -0
- package/dist/components/custom-map.js +64 -0
- package/dist/components/floor-selector.d.ts +6 -0
- package/dist/components/floor-selector.js +40 -0
- package/dist/components/qr-modal.d.ts +7 -0
- package/dist/components/qr-modal.js +69 -0
- package/dist/components/route-options.d.ts +6 -0
- package/dist/components/route-options.js +51 -0
- package/dist/components/zoom-controls.d.ts +6 -0
- package/dist/components/zoom-controls.js +40 -0
- package/dist/es/assets/{compact-floor-selector-BLLR7mXQ.js → compact-floor-selector-CoQYAD6z.js} +33 -50
- package/dist/es/assets/{components-C542vOSv.js → components-BQGHQSdV.js} +23 -73
- package/dist/es/assets/{map-view-with-modal-C-vcHaJc.js → map-view-with-modal-SkmapEWH.js} +66 -94
- package/dist/es/assets/{route-view-totems-z3hCCsGS.js → route-view-totems-eQTxU-id.js} +13 -8
- package/dist/es/assets/{utils-HInBaX5h.js → utils-CWtvoL4a.js} +3 -3
- package/dist/es/index.js +2 -2
- package/dist/es/route-view-totems.js +2 -2
- package/dist/iife/map-view-with-modal.js +115 -104
- package/dist/iife/route-view-totems.js +37 -45
- package/dist/route-view-totems.d.ts +16 -0
- package/dist/route-view-totems.js +58 -0
- package/dist/utils/styles.d.ts +2 -0
- package/dist/utils/styles.js +5 -0
- package/package.json +5 -5
- package/dist/cjs/compact-floor-selector-BPNEdxm6.cjs +0 -171
- package/dist/update-timestamp.txt +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import './components/custom-map.js';
|
|
3
|
+
import './components/floor-selector.js';
|
|
4
|
+
import './components/qr-modal.js';
|
|
5
|
+
import './components/route-options.js';
|
|
6
|
+
import './components/zoom-controls.js';
|
|
7
|
+
export declare class RouteViewTotems extends LitElement {
|
|
8
|
+
styles: import("lit").CSSResult[];
|
|
9
|
+
apiKey: string;
|
|
10
|
+
parentPlaceId: string;
|
|
11
|
+
locale: string;
|
|
12
|
+
originId: string;
|
|
13
|
+
destinationId: string;
|
|
14
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=route-view-totems.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, css } from 'lit';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
import { tailwindStyles } from './utils/styles';
|
|
10
|
+
import './components/custom-map.js';
|
|
11
|
+
import './components/floor-selector.js';
|
|
12
|
+
import './components/qr-modal.js';
|
|
13
|
+
import './components/route-options.js';
|
|
14
|
+
import './components/zoom-controls.js';
|
|
15
|
+
let RouteViewTotems = class RouteViewTotems extends LitElement {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.styles = [tailwindStyles, css ``];
|
|
19
|
+
this.apiKey = '';
|
|
20
|
+
this.parentPlaceId = '';
|
|
21
|
+
this.locale = 'es';
|
|
22
|
+
this.originId = '';
|
|
23
|
+
this.destinationId = '';
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return html `
|
|
27
|
+
<div class="flex flex-col items-center justify-center h-full">
|
|
28
|
+
<custom-map
|
|
29
|
+
apiKey="${this.apiKey}"
|
|
30
|
+
parentPlaceId="${this.parentPlaceId}"
|
|
31
|
+
locale="${this.locale}"
|
|
32
|
+
originId="${this.originId}"
|
|
33
|
+
destinationId="${this.destinationId}"
|
|
34
|
+
></custom-map>
|
|
35
|
+
</div>
|
|
36
|
+
`;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
__decorate([
|
|
40
|
+
property({ type: String })
|
|
41
|
+
], RouteViewTotems.prototype, "apiKey", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
property({ type: String })
|
|
44
|
+
], RouteViewTotems.prototype, "parentPlaceId", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
property({ type: String })
|
|
47
|
+
], RouteViewTotems.prototype, "locale", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
property({ type: String })
|
|
50
|
+
], RouteViewTotems.prototype, "originId", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
property({ type: String })
|
|
53
|
+
], RouteViewTotems.prototype, "destinationId", void 0);
|
|
54
|
+
RouteViewTotems = __decorate([
|
|
55
|
+
customElement('route-view-totems')
|
|
56
|
+
], RouteViewTotems);
|
|
57
|
+
export { RouteViewTotems };
|
|
58
|
+
//# sourceMappingURL=route-view-totems.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapvx/web-components",
|
|
3
3
|
"description": "MapVX Web Components is a web components library that provides interactive and accessible mapping solutions. Built with Lit, it offers a modern, lightweight, and framework-agnostic way to integrate maps into any web application.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.25",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Mapvx",
|
|
7
7
|
"homepage": "https://mapvx.com",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"analyze": "lit-analyzer",
|
|
49
49
|
"prepare": "husky",
|
|
50
50
|
"docs:dev": "cd docs && next dev",
|
|
51
|
-
"docs:build": "cd docs && next build && cp ../src/docs-base-redirect.html ../docs-build/index.html",
|
|
51
|
+
"docs:build": "NEXT_EXPORT=true cd docs && next build && cp ../src/docs-base-redirect.html ../docs-build/index.html",
|
|
52
52
|
"docs:start": "cd docs && next start",
|
|
53
53
|
"prepublishOnly": "npm run build-with-sourcemaps",
|
|
54
54
|
"upload-sourcemaps": "./scripts/upload-sourcemaps-to-rollbar.sh",
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"husky": "^9.1.7",
|
|
74
74
|
"lint-staged": "^15.5.1",
|
|
75
75
|
"lit-analyzer": "^2.0.3",
|
|
76
|
-
"next": "^
|
|
77
|
-
"nextra": "^
|
|
78
|
-
"nextra-theme-docs": "^
|
|
76
|
+
"next": "^13.5.6",
|
|
77
|
+
"nextra": "^2.13.2",
|
|
78
|
+
"nextra-theme-docs": "^2.13.2",
|
|
79
79
|
"prettier": "^3.5.3",
|
|
80
80
|
"sonarqube-scanner": "^3.3.0",
|
|
81
81
|
"terser": "^5.39.1",
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./lazy-load-DKre9Iqr.cjs"),e=require("./class-map-DfzRTbYX.cjs"),t=require("./base-floor-selector-CFWNvVet.cjs");var r,s,i,l=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=o=>{throw TypeError(o)},d=(o,e,t,r)=>{for(var s,i=r>1?void 0:r?n(e,t):e,a=o.length-1;a>=0;a--)(s=o[a])&&(i=(r?s(e,t,i):s(i))||i);return r&&i&&l(e,t,i),i},p=(o,e,t)=>e.has(o)||a("Cannot "+t),c=(o,e,t)=>(p(o,e,"read from private field"),t?t.call(o):e.get(o)),b=(o,e,t)=>e.has(o)?a("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(o):e.set(o,t),h=(o,e,t,r)=>(p(o,e,"write to private field"),e.set(o,t),t);exports.CompactFloorSelector=class extends t.BaseFloorSelector{constructor(){super(...arguments),b(this,r,"#251660"),b(this,s,1),b(this,i,!1),this.isOpen=!1,this._handleClickOutside=o=>{this.isOpen&&!this.shadowRoot?.contains(o.target)&&(this.isOpen=!1,this.requestUpdate())}}get borderColor(){return c(this,r)}set borderColor(o){h(this,r,o)}get borderWidth(){return c(this,s)}set borderWidth(o){h(this,s,o)}get disabled(){return c(this,i)}set disabled(o){h(this,i,o)}_toggleDropdown(o){this.disabled||(o.stopPropagation(),this.isOpen=!this.isOpen,this.requestUpdate())}_selectFloor(o){this.disabled||(this.selectFloor(o),this.isOpen=!1,this.requestUpdate())}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleClickOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutside)}render(){if(!this.sdkData)return o.x`<div>No data</div>`;const t=this.getFloors(),r=this.getCurrentFloor(),s=r?this.getFloorDisplayName(r):"Seleccionar piso";return o.x`
|
|
2
|
-
<div class="floor-dropdown">
|
|
3
|
-
<button
|
|
4
|
-
class=${e.e({"floor-button":!0,active:!!r,open:this.isOpen})}
|
|
5
|
-
style="border: ${this.borderWidth}px solid ${this.borderColor};"
|
|
6
|
-
?disabled=${this.disabled}
|
|
7
|
-
@click=${this._toggleDropdown}
|
|
8
|
-
>
|
|
9
|
-
<span>${s}</span>
|
|
10
|
-
<div class="dropdown-arrow"></div>
|
|
11
|
-
</button>
|
|
12
|
-
|
|
13
|
-
<div
|
|
14
|
-
class=${e.e({"floor-list":!0,open:this.isOpen})}
|
|
15
|
-
>
|
|
16
|
-
${t.map((t=>{const r=this.isFloorActive(t);return o.x`
|
|
17
|
-
<div
|
|
18
|
-
class=${e.e({"floor-option":!0,active:r})}
|
|
19
|
-
@click=${()=>this._selectFloor(t.key)}
|
|
20
|
-
>
|
|
21
|
-
${this.getFloorDisplayName(t)}
|
|
22
|
-
</div>
|
|
23
|
-
`}))}
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
`}},r=new WeakMap,s=new WeakMap,i=new WeakMap,exports.CompactFloorSelector.styles=[o.i$1`
|
|
27
|
-
:host {
|
|
28
|
-
display: block;
|
|
29
|
-
position: relative;
|
|
30
|
-
z-index: 1000;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.floor-dropdown {
|
|
34
|
-
position: relative;
|
|
35
|
-
display: inline-block;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.floor-button {
|
|
39
|
-
background: #fff;
|
|
40
|
-
border-radius: 8px;
|
|
41
|
-
padding: 8px 12px;
|
|
42
|
-
font-size: 14px;
|
|
43
|
-
font-weight: 500;
|
|
44
|
-
color: #251660;
|
|
45
|
-
cursor: pointer;
|
|
46
|
-
display: flex;
|
|
47
|
-
align-items: center;
|
|
48
|
-
gap: 8px;
|
|
49
|
-
min-width: 120px;
|
|
50
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
51
|
-
transition: all 0.2s ease;
|
|
52
|
-
user-select: none;
|
|
53
|
-
-webkit-user-select: none;
|
|
54
|
-
-moz-user-select: none;
|
|
55
|
-
-ms-user-select: none;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.floor-button:hover {
|
|
59
|
-
border-color: #007bff;
|
|
60
|
-
box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.floor-button.active {
|
|
64
|
-
background: #fff;
|
|
65
|
-
color: #251660;
|
|
66
|
-
border-color: #251660;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.floor-button.disabled {
|
|
70
|
-
opacity: 0.5;
|
|
71
|
-
cursor: not-allowed;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.floor-button[disabled] {
|
|
75
|
-
background: #fff;
|
|
76
|
-
color: #251660;
|
|
77
|
-
cursor: not-allowed;
|
|
78
|
-
pointer-events: none;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.dropdown-arrow {
|
|
82
|
-
width: 0;
|
|
83
|
-
height: 0;
|
|
84
|
-
border-left: 4px solid transparent;
|
|
85
|
-
border-right: 4px solid transparent;
|
|
86
|
-
border-top: 4px solid currentColor;
|
|
87
|
-
transition: transform 0.2s ease;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.floor-button.open .dropdown-arrow {
|
|
91
|
-
transform: rotate(180deg);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.floor-button[disabled] .dropdown-arrow {
|
|
95
|
-
display: none;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.floor-list {
|
|
99
|
-
position: absolute;
|
|
100
|
-
top: 100%;
|
|
101
|
-
left: 0;
|
|
102
|
-
right: 0;
|
|
103
|
-
background: #fff;
|
|
104
|
-
border: 1px solid #ddd;
|
|
105
|
-
border-radius: 8px;
|
|
106
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
107
|
-
max-height: 200px;
|
|
108
|
-
overflow-y: auto;
|
|
109
|
-
z-index: 1001;
|
|
110
|
-
margin-top: 4px;
|
|
111
|
-
display: none;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.floor-list.open {
|
|
115
|
-
display: block;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.floor-option {
|
|
119
|
-
padding: 8px 12px;
|
|
120
|
-
cursor: pointer;
|
|
121
|
-
border-bottom: 1px solid #f0f0f0;
|
|
122
|
-
transition: background-color 0.2s ease;
|
|
123
|
-
font-size: 14px;
|
|
124
|
-
color: #251660;
|
|
125
|
-
user-select: none;
|
|
126
|
-
-webkit-user-select: none;
|
|
127
|
-
-moz-user-select: none;
|
|
128
|
-
-ms-user-select: none;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.floor-option:last-child {
|
|
132
|
-
border-bottom: none;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.floor-option:hover {
|
|
136
|
-
background-color: #f8f9fa;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.floor-option.active {
|
|
140
|
-
background-color: #f3e7ff;
|
|
141
|
-
color: #251660;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.floor-option.disabled {
|
|
145
|
-
opacity: 0.5;
|
|
146
|
-
cursor: not-allowed;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.floor-option.disabled:hover {
|
|
150
|
-
background-color: transparent;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/* Mobile styles */
|
|
154
|
-
@media (max-width: 768px) {
|
|
155
|
-
.floor-button {
|
|
156
|
-
font-size: 12px;
|
|
157
|
-
padding: 6px 10px;
|
|
158
|
-
min-width: 100px;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.floor-option {
|
|
162
|
-
font-size: 12px;
|
|
163
|
-
padding: 6px 10px;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.floor-list {
|
|
167
|
-
max-height: 150px;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
`],d([o.n({type:String})],exports.CompactFloorSelector.prototype,"borderColor",1),d([o.n({type:Number})],exports.CompactFloorSelector.prototype,"borderWidth",1),d([o.n({type:Boolean})],exports.CompactFloorSelector.prototype,"disabled",1),exports.CompactFloorSelector=d([o.t("compact-floor-selector")],exports.CompactFloorSelector);
|
|
171
|
-
//# sourceMappingURL=compact-floor-selector-BPNEdxm6.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
23-06-2025 12:53:37 -04
|