@thibezer/ui-components-kit 2.31.0 → 2.31.2
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/CHANGELOG.md +1302 -1284
- package/dist/components/ui-seletor-mapa-base/ui-seletor-mapa-base.d.ts +6 -0
- package/dist/custom-elements.json +25451 -25377
- package/dist/seletor-mapa-base.cjs +7 -7
- package/dist/seletor-mapa-base.js +50 -38
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var S=Object.defineProperty;var _=(r,o,e)=>o in r?S(r,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[o]=e;var p=(r,o,e)=>_(r,typeof o!="symbol"?o+"":o,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */const l=require("./kit-base-BmkPi5Rz.cjs"),c={lat:0,lng:0,zoom:2},y=19,x=85.05112878;function A(r){const o=Number.isFinite(r)&&r>0?Math.floor(r):0;return`${o} ${o===1?"opção":"opções"}`}function E(r,o,e){const i=Number.isFinite(r)?r:0,t=Number.isFinite(o)?o:0,a=Number.isFinite(e)?Math.max(0,e):0;return t>=a?"baixo":i>t?"cima":"baixo"}function k(r){if(typeof r!="string"||!r.trim())return null;const o=r.split(",").map(s=>Number(s.trim()));if(o.length<2||o.length>3)return null;const[e,i,t]=o;if(!Number.isFinite(e)||!Number.isFinite(i)||e<-90||e>90||i<-180||i>180)return null;const a=o.length===3?t:c.zoom;return Number.isFinite(a)?{lat:e,lng:i,zoom:Math.min(y,Math.max(0,Math.round(a)))}:null}function h(r,o,e){const i=Number.isFinite(e)?Math.min(y,Math.max(0,Math.round(e))):c.zoom,t=2**i,a=Number.isFinite(r)?Math.min(x,Math.max(-x,r)):0,s=Number.isFinite(o)?Math.min(180,Math.max(-180,o)):0,n=a*Math.PI/180,u=b=>Math.min(t-1,Math.max(0,Math.floor(b)));return{z:i,x:u((s+180)/360*t),y:u((1-Math.log(Math.tan(n)+1/Math.cos(n))/Math.PI)/2*t)}}function M(r){return/^https?:\/\//i.test(r.trim())}function z(r,o){return typeof r!="string"||!M(r)?null:r.replace(/\{z\}/g,String(o.z)).replace(/\{x\}/g,String(o.x)).replace(/\{y\}/g,String(o.y)).replace(/\{s\}/g,"a").replace(/\{r\}/g,"")}function g(r,o){return r?typeof r.thumbnailUrl=="string"&&M(r.thumbnailUrl)?r.thumbnailUrl:z(r.tileUrl,o):null}const I=':host{display:inline-block;font-family:var(--ui-fonte-base, "Inter", sans-serif);color:var(--ui-cor-texto, #f1f1f5);box-sizing:border-box;-webkit-user-select:none;user-select:none}:host *,:host *:before,:host *:after{box-sizing:border-box}:host([posicao="bottom-right"]){position:absolute;bottom:16px;right:16px;z-index:var(--ui-z-workspace-hud, 500)}:host([posicao="bottom-left"]){position:absolute;bottom:16px;left:16px;z-index:var(--ui-z-workspace-hud, 500)}:host([posicao="top-right"]){position:absolute;top:16px;right:16px;z-index:var(--ui-z-workspace-hud, 500)}:host([posicao="top-left"]){position:absolute;top:16px;left:16px;z-index:var(--ui-z-workspace-hud, 500)}:host([posicao="inline"]){position:relative;display:inline-flex}.ui-basemap-wrapper{position:relative;display:inline-flex;align-items:center}.ui-basemap-trigger{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 12px 0 6px;background:var(--ui-degrade-interno, var(--ui-basemap-gatilho-fundo, var(--ui-fundo-elevado, var(--ui-cor-fundo-elevado, rgba(18, 18, 24, .88)))));backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-pill, 999px);color:var(--ui-cor-texto, #f1f1f5);cursor:pointer;outline:none;font-size:11.5px;font-weight:500;letter-spacing:.2px;box-shadow:var(--ui-sombra-md, 0 4px 14px rgba(0, 0, 0, .35)),0 1px 3px #0003;transition:all .18s cubic-bezier(.16,1,.3,1)}.ui-basemap-trigger:hover{background:var(--ui-cor-botao-secundario-hover, rgba(28, 28, 36, .95));border-color:var(--ui-cor-primaria, #00E08A);transform:translateY(-1px);box-shadow:var(--ui-sombra-md, 0 6px 20px rgba(0, 0, 0, .45)),0 0 12px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 20%,transparent)}.ui-basemap-trigger:focus-visible{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 35%,transparent)}.ui-basemap-trigger.active{border-color:var(--ui-cor-primaria, #00E08A);background:var(--ui-degrade-interno, var(--ui-basemap-gatilho-ativo-fundo, var(--ui-fundo-elevado, var(--ui-cor-fundo-elevado, rgba(22, 26, 32, .95)))));box-shadow:var(--ui-sombra-md, 0 4px 16px rgba(0, 0, 0, .4)),0 0 10px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}:host([compacto]) .ui-basemap-trigger,.ui-basemap-trigger.compacto{width:36px;height:36px;padding:0;justify-content:center;border-radius:50%}:host([compacto]) .ui-basemap-label,:host([compacto]) .ui-basemap-chevron,.ui-basemap-trigger.compacto .ui-basemap-label,.ui-basemap-trigger.compacto .ui-basemap-chevron{display:none!important}.ui-basemap-thumb-mini{width:22px;height:22px;border-radius:50%;object-fit:cover;flex-shrink:0;border:1.5px solid var(--ui-cor-borda, rgba(255, 255, 255, .2));box-shadow:var(--ui-sombra-sm, 0 1px 3px rgba(0, 0, 0, .4))}.ui-basemap-thumb-mini.fallback{display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);color:var(--ui-cor-primaria, #00E08A)}.ui-basemap-thumb-mini.fallback svg{width:13px;height:13px}.ui-basemap-label{white-space:nowrap;max-width:130px;overflow:hidden;text-overflow:ellipsis}.ui-basemap-chevron{display:inline-flex;align-items:center;justify-content:center;color:var(--ui-cor-texto-secundario, #888899);transition:transform .2s cubic-bezier(.16,1,.3,1);margin-left:2px}.ui-basemap-chevron svg{width:12px;height:12px}.ui-basemap-trigger.active .ui-basemap-chevron{transform:rotate(180deg);color:var(--ui-cor-primaria, #00E08A)}.ui-basemap-popover{position:absolute;min-width:210px;max-width:250px;background:var(--ui-degrade-interno, var(--ui-basemap-popover-fundo, var(--ui-fundo-elevado, var(--ui-cor-fundo-elevado, rgba(16, 16, 22, .95)))));backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:12px;padding:6px;box-shadow:var(--ui-sombra-lg, 0 12px 32px rgba(0, 0, 0, .6)),0 2px 8px #0000004d;z-index:var(--ui-z-popover, 1050);display:flex;flex-direction:column;gap:3px;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(8px) scale(.97);transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1),visibility .18s}.ui-basemap-wrapper.pos-bottom-right .ui-basemap-popover,.ui-basemap-wrapper.pos-bottom-left .ui-basemap-popover,.ui-basemap-wrapper.pos-bottom .ui-basemap-popover{bottom:calc(100% + 8px);transform:translateY(8px) scale(.97)}.ui-basemap-wrapper.pos-bottom-right .ui-basemap-popover{right:0}.ui-basemap-wrapper.pos-bottom-left .ui-basemap-popover{left:0}.ui-basemap-wrapper.pos-top-right .ui-basemap-popover,.ui-basemap-wrapper.pos-top-left .ui-basemap-popover,.ui-basemap-wrapper.pos-top .ui-basemap-popover{top:calc(100% + 8px);transform:translateY(-8px) scale(.97)}.ui-basemap-wrapper.pos-top-right .ui-basemap-popover{right:0}.ui-basemap-wrapper.pos-top-left .ui-basemap-popover,.ui-basemap-wrapper.pos-auto .ui-basemap-popover{left:0}.ui-basemap-wrapper.pos-auto.abre-cima .ui-basemap-popover{bottom:calc(100% + 8px)}.ui-basemap-wrapper.pos-auto.abre-baixo .ui-basemap-popover{top:calc(100% + 8px)}.ui-basemap-wrapper.pos-auto.abre-baixo .ui-basemap-popover:not(.aberto){transform:translateY(-8px) scale(.97)}.ui-basemap-popover.aberto{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0) scale(1)}.ui-basemap-popover-header{display:flex;align-items:center;justify-content:space-between;padding:4px 8px 6px;border-bottom:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);margin-bottom:2px}.ui-basemap-popover-titulo{font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--ui-cor-texto-secundario, #888899)}.ui-basemap-popover-badge{font-size:9px;font-weight:600;padding:1px 5px;border-radius:var(--ui-raio-sm, 4px);background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 12%,transparent);color:var(--ui-cor-primaria, #00E08A);font-variant-numeric:tabular-nums}.ui-basemap-list{display:flex;flex-direction:column;gap:2px;max-height:280px;overflow-y:auto;overflow-x:hidden;padding-right:2px}.ui-basemap-list::-webkit-scrollbar{width:4px}.ui-basemap-list::-webkit-scrollbar-track{background:transparent}.ui-basemap-list::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 15%,transparent);border-radius:2px}.ui-basemap-item{display:flex;align-items:center;gap:8px;padding:5px 8px;border-radius:7px;background:transparent;border:1px solid transparent;cursor:pointer;transition:all .12s ease;outline:none}.ui-basemap-item:hover{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent)}.ui-basemap-item:focus-visible{border-color:var(--ui-cor-primaria, #00E08A);background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 6%,transparent)}.ui-basemap-item.active{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 12%,transparent);border-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 35%,transparent)}.ui-basemap-item-preview{width:32px;height:24px;border-radius:var(--ui-raio-sm, 4px);object-fit:cover;flex-shrink:0;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent);box-shadow:var(--ui-sombra-sm, 0 1px 3px rgba(0, 0, 0, .3))}.ui-basemap-item-preview-none{width:32px;height:24px;border-radius:var(--ui-raio-sm, 4px);flex-shrink:0;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);color:var(--ui-cor-texto-secundario, #888899)}.ui-basemap-item-preview-none svg{width:14px;height:14px}.ui-basemap-item-info{display:flex;flex-direction:column;min-width:0;flex:1}.ui-basemap-item-nome{font-size:11px;font-weight:500;color:var(--ui-cor-texto, #f1f1f5);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-basemap-item.active .ui-basemap-item-nome{color:var(--ui-cor-primaria, #00E08A);font-weight:600}.ui-basemap-item-desc{font-size:9.5px;color:var(--ui-cor-texto-secundario, #77778b);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-basemap-item-check{display:flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;color:var(--ui-cor-primaria, #00E08A);opacity:0;transform:scale(.6);transition:all .15s cubic-bezier(.16,1,.3,1)}.ui-basemap-item.active .ui-basemap-item-check{opacity:1;transform:scale(1)}.ui-basemap-item-check svg{width:13px;height:13px}:host(.degrade),:host(.gradiente),:host([data-degrade]:not([data-degrade="false"])),.ui-basemap-trigger[data-degrade]:not([data-degrade=false]),.ui-basemap-popover[data-degrade]:not([data-degrade=false]){--ui-basemap-gatilho-fundo: var(--ui-gradiente-elevado);--ui-basemap-gatilho-ativo-fundo: var(--ui-gradiente-elevado);--ui-basemap-popover-fundo: var(--ui-gradiente-elevado)}',f="https://server.arcgisonline.com/ArcGIS/rest/services",B=[{id:"none",nome:"Sem Mapa",descricao:"Tela CAD neutra com grade quadriculada"},{id:"google_satelite_puro",nome:"Google Puro",descricao:"Satélite limpo sem ruas ou rótulos",tileUrl:"https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}"},{id:"google_satelite",nome:"Google Híbrido",descricao:"Satélite com nomes de ruas e divisas",tileUrl:"https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}"},{id:"satelite",nome:"Esri Satélite",descricao:"Imagens orbitais de alta resolução",tileUrl:`${f}/World_Imagery/MapServer/tile/{z}/{y}/{x}`},{id:"osm",nome:"OpenStreetMap",descricao:"Mapa viário e urbano colaborativo",tileUrl:"https://tile.openstreetmap.org/{z}/{x}/{y}.png"},{id:"topografia",nome:"Topografia",descricao:"Curvas de nível e relevo sombreado",tileUrl:"https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png"},{id:"dark",nome:"Dark Canvas",descricao:"Mapa escuro de alto contraste para CAD",tileUrl:`${f}/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}`}],w=`
|
|
1
|
+
"use strict";var S=Object.defineProperty;var _=(r,o,e)=>o in r?S(r,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[o]=e;var p=(r,o,e)=>_(r,typeof o!="symbol"?o+"":o,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});;/* empty css */const l=require("./kit-base-BmkPi5Rz.cjs"),u={lat:0,lng:0,zoom:2},y=19,x=85.05112878;function A(r){const o=Number.isFinite(r)&&r>0?Math.floor(r):0;return`${o} ${o===1?"opção":"opções"}`}function E(r,o,e){const i=Number.isFinite(r)?r:0,t=Number.isFinite(o)?o:0,a=Number.isFinite(e)?Math.max(0,e):0;return t>=a?"baixo":i>t?"cima":"baixo"}function k(r){if(typeof r!="string"||!r.trim())return null;const o=r.split(",").map(s=>Number(s.trim()));if(o.length<2||o.length>3)return null;const[e,i,t]=o;if(!Number.isFinite(e)||!Number.isFinite(i)||e<-90||e>90||i<-180||i>180)return null;const a=o.length===3?t:u.zoom;return Number.isFinite(a)?{lat:e,lng:i,zoom:Math.min(y,Math.max(0,Math.round(a)))}:null}function h(r,o,e){const i=Number.isFinite(e)?Math.min(y,Math.max(0,Math.round(e))):u.zoom,t=2**i,a=Number.isFinite(r)?Math.min(x,Math.max(-x,r)):0,s=Number.isFinite(o)?Math.min(180,Math.max(-180,o)):0,n=a*Math.PI/180,c=b=>Math.min(t-1,Math.max(0,Math.floor(b)));return{z:i,x:c((s+180)/360*t),y:c((1-Math.log(Math.tan(n)+1/Math.cos(n))/Math.PI)/2*t)}}function M(r){return/^https?:\/\//i.test(r.trim())}function z(r,o){return typeof r!="string"||!M(r)?null:r.replace(/\{z\}/g,String(o.z)).replace(/\{x\}/g,String(o.x)).replace(/\{y\}/g,String(o.y)).replace(/\{s\}/g,"a").replace(/\{r\}/g,"")}function g(r,o){return r?typeof r.thumbnailUrl=="string"&&M(r.thumbnailUrl)?r.thumbnailUrl:z(r.tileUrl,o):null}const I=':host{display:inline-block;font-family:var(--ui-fonte-base, "Inter", sans-serif);color:var(--ui-cor-texto, #f1f1f5);box-sizing:border-box;-webkit-user-select:none;user-select:none}:host *,:host *:before,:host *:after{box-sizing:border-box}:host([posicao="bottom-right"]){position:absolute;bottom:16px;right:16px;z-index:var(--ui-z-workspace-hud, 500)}:host([posicao="bottom-left"]){position:absolute;bottom:16px;left:16px;z-index:var(--ui-z-workspace-hud, 500)}:host([posicao="top-right"]){position:absolute;top:16px;right:16px;z-index:var(--ui-z-workspace-hud, 500)}:host([posicao="top-left"]){position:absolute;top:16px;left:16px;z-index:var(--ui-z-workspace-hud, 500)}:host([posicao="inline"]){position:relative;display:inline-flex}.ui-basemap-wrapper{position:relative;display:inline-flex;align-items:center}.ui-basemap-trigger{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 12px 0 6px;background:var(--ui-degrade-interno, var(--ui-basemap-gatilho-fundo, var(--ui-fundo-elevado, var(--ui-cor-fundo-elevado, rgba(18, 18, 24, .88)))));backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-pill, 999px);color:var(--ui-cor-texto, #f1f1f5);cursor:pointer;outline:none;font-size:11.5px;font-weight:500;letter-spacing:.2px;box-shadow:var(--ui-sombra-md, 0 4px 14px rgba(0, 0, 0, .35)),0 1px 3px #0003;transition:all .18s cubic-bezier(.16,1,.3,1)}.ui-basemap-trigger:hover{background:var(--ui-cor-botao-secundario-hover, rgba(28, 28, 36, .95));border-color:var(--ui-cor-primaria, #00E08A);transform:translateY(-1px);box-shadow:var(--ui-sombra-md, 0 6px 20px rgba(0, 0, 0, .45)),0 0 12px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 20%,transparent)}.ui-basemap-trigger:focus-visible{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 35%,transparent)}.ui-basemap-trigger.active{border-color:var(--ui-cor-primaria, #00E08A);background:var(--ui-degrade-interno, var(--ui-basemap-gatilho-ativo-fundo, var(--ui-fundo-elevado, var(--ui-cor-fundo-elevado, rgba(22, 26, 32, .95)))));box-shadow:var(--ui-sombra-md, 0 4px 16px rgba(0, 0, 0, .4)),0 0 10px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}:host([compacto]) .ui-basemap-trigger,.ui-basemap-trigger.compacto{width:36px;height:36px;padding:0;justify-content:center;border-radius:50%}:host([compacto]) .ui-basemap-label,:host([compacto]) .ui-basemap-chevron,.ui-basemap-trigger.compacto .ui-basemap-label,.ui-basemap-trigger.compacto .ui-basemap-chevron{display:none!important}.ui-basemap-thumb-mini{width:22px;height:22px;border-radius:50%;object-fit:cover;flex-shrink:0;border:1.5px solid var(--ui-cor-borda, rgba(255, 255, 255, .2));box-shadow:var(--ui-sombra-sm, 0 1px 3px rgba(0, 0, 0, .4))}.ui-basemap-thumb-mini.fallback{display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);color:var(--ui-cor-primaria, #00E08A)}.ui-basemap-thumb-mini.fallback svg{width:13px;height:13px}.ui-basemap-label{white-space:nowrap;max-width:130px;overflow:hidden;text-overflow:ellipsis}.ui-basemap-chevron{display:inline-flex;align-items:center;justify-content:center;color:var(--ui-cor-texto-secundario, #888899);transition:transform .2s cubic-bezier(.16,1,.3,1);margin-left:2px}.ui-basemap-chevron svg{width:12px;height:12px}.ui-basemap-trigger.active .ui-basemap-chevron{transform:rotate(180deg);color:var(--ui-cor-primaria, #00E08A)}.ui-basemap-popover{position:absolute;min-width:210px;max-width:250px;background:var(--ui-degrade-interno, var(--ui-basemap-popover-fundo, var(--ui-fundo-elevado, var(--ui-cor-fundo-elevado, rgba(16, 16, 22, .95)))));backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:12px;padding:6px;box-shadow:var(--ui-sombra-lg, 0 12px 32px rgba(0, 0, 0, .6)),0 2px 8px #0000004d;z-index:var(--ui-z-popover, 1050);display:flex;flex-direction:column;gap:3px;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(8px) scale(.97);transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1),visibility .18s}.ui-basemap-wrapper.pos-bottom-right .ui-basemap-popover,.ui-basemap-wrapper.pos-bottom-left .ui-basemap-popover,.ui-basemap-wrapper.pos-bottom .ui-basemap-popover{bottom:calc(100% + 8px);transform:translateY(8px) scale(.97)}.ui-basemap-wrapper.pos-bottom-right .ui-basemap-popover{right:0}.ui-basemap-wrapper.pos-bottom-left .ui-basemap-popover{left:0}.ui-basemap-wrapper.pos-top-right .ui-basemap-popover,.ui-basemap-wrapper.pos-top-left .ui-basemap-popover,.ui-basemap-wrapper.pos-top .ui-basemap-popover{top:calc(100% + 8px);transform:translateY(-8px) scale(.97)}.ui-basemap-wrapper.pos-top-right .ui-basemap-popover{right:0}.ui-basemap-wrapper.pos-top-left .ui-basemap-popover,.ui-basemap-wrapper.pos-auto .ui-basemap-popover{left:0}.ui-basemap-wrapper.pos-auto.abre-cima .ui-basemap-popover{bottom:calc(100% + 8px)}.ui-basemap-wrapper.pos-auto.abre-baixo .ui-basemap-popover{top:calc(100% + 8px)}.ui-basemap-wrapper.pos-auto.abre-baixo .ui-basemap-popover:not(.aberto){transform:translateY(-8px) scale(.97)}.ui-basemap-popover.aberto{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0) scale(1)}.ui-basemap-popover-header{display:flex;align-items:center;justify-content:space-between;padding:4px 8px 6px;border-bottom:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);margin-bottom:2px}.ui-basemap-popover-titulo{font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--ui-cor-texto-secundario, #888899)}.ui-basemap-popover-badge{font-size:9px;font-weight:600;padding:1px 5px;border-radius:var(--ui-raio-sm, 4px);background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 12%,transparent);color:var(--ui-cor-primaria, #00E08A);font-variant-numeric:tabular-nums}.ui-basemap-list{display:flex;flex-direction:column;gap:2px;max-height:280px;overflow-y:auto;overflow-x:hidden;padding-right:2px}.ui-basemap-list::-webkit-scrollbar{width:4px}.ui-basemap-list::-webkit-scrollbar-track{background:transparent}.ui-basemap-list::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 15%,transparent);border-radius:2px}.ui-basemap-item{display:flex;align-items:center;gap:8px;padding:5px 8px;border-radius:7px;background:transparent;border:1px solid transparent;cursor:pointer;transition:all .12s ease;outline:none}.ui-basemap-item:hover{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent)}.ui-basemap-item:focus-visible{border-color:var(--ui-cor-primaria, #00E08A);background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 6%,transparent)}.ui-basemap-item.active{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 12%,transparent);border-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 35%,transparent)}.ui-basemap-item-preview{width:32px;height:24px;border-radius:var(--ui-raio-sm, 4px);object-fit:cover;flex-shrink:0;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent);box-shadow:var(--ui-sombra-sm, 0 1px 3px rgba(0, 0, 0, .3))}.ui-basemap-item-preview.pendente{display:block;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent)}.ui-basemap-item-preview-none{width:32px;height:24px;border-radius:var(--ui-raio-sm, 4px);flex-shrink:0;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);color:var(--ui-cor-texto-secundario, #888899)}.ui-basemap-item-preview-none svg{width:14px;height:14px}.ui-basemap-item-info{display:flex;flex-direction:column;min-width:0;flex:1}.ui-basemap-item-nome{font-size:11px;font-weight:500;color:var(--ui-cor-texto, #f1f1f5);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-basemap-item.active .ui-basemap-item-nome{color:var(--ui-cor-primaria, #00E08A);font-weight:600}.ui-basemap-item-desc{font-size:9.5px;color:var(--ui-cor-texto-secundario, #77778b);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-basemap-item-check{display:flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;color:var(--ui-cor-primaria, #00E08A);opacity:0;transform:scale(.6);transition:all .15s cubic-bezier(.16,1,.3,1)}.ui-basemap-item.active .ui-basemap-item-check{opacity:1;transform:scale(1)}.ui-basemap-item-check svg{width:13px;height:13px}:host(.degrade),:host(.gradiente),:host([data-degrade]:not([data-degrade="false"])),.ui-basemap-trigger[data-degrade]:not([data-degrade=false]),.ui-basemap-popover[data-degrade]:not([data-degrade=false]){--ui-basemap-gatilho-fundo: var(--ui-gradiente-elevado);--ui-basemap-gatilho-ativo-fundo: var(--ui-gradiente-elevado);--ui-basemap-popover-fundo: var(--ui-gradiente-elevado)}',f="https://server.arcgisonline.com/ArcGIS/rest/services",B=[{id:"none",nome:"Sem Mapa",descricao:"Tela CAD neutra com grade quadriculada"},{id:"google_satelite_puro",nome:"Google Puro",descricao:"Satélite limpo sem ruas ou rótulos",tileUrl:"https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}"},{id:"google_satelite",nome:"Google Híbrido",descricao:"Satélite com nomes de ruas e divisas",tileUrl:"https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}"},{id:"satelite",nome:"Esri Satélite",descricao:"Imagens orbitais de alta resolução",tileUrl:`${f}/World_Imagery/MapServer/tile/{z}/{y}/{x}`},{id:"osm",nome:"OpenStreetMap",descricao:"Mapa viário e urbano colaborativo",tileUrl:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"},{id:"topografia",nome:"Topografia",descricao:"Curvas de nível e relevo sombreado",tileUrl:"https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png"},{id:"dark",nome:"Dark Canvas",descricao:"Mapa escuro de alto contraste para CAD",tileUrl:`${f}/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}`}],w=`
|
|
2
2
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
3
3
|
<circle cx="12" cy="12" r="10"></circle>
|
|
4
4
|
<line x1="2" y1="12" x2="22" y2="12"></line>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
9
9
|
<polyline points="6 9 12 15 18 9"></polyline>
|
|
10
10
|
</svg>
|
|
11
|
-
|
|
11
|
+
`,O=`
|
|
12
12
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
13
13
|
<polyline points="20 6 9 17 4 12"></polyline>
|
|
14
14
|
</svg>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<line x1="9" y1="3" x2="9" y2="21"></line>
|
|
21
21
|
<line x1="15" y1="3" x2="15" y2="21"></line>
|
|
22
22
|
</svg>
|
|
23
|
-
`;class v extends l.SafeHTMLElement{constructor(){super();p(this,"shadow");p(this,"listeners",new l.ListenerBag);p(this,"_mapasBase",[...B]);p(this,"wrapperEl");p(this,"triggerBtn");p(this,"popoverEl");p(this,"listEl");p(this,"thumbEl");p(this,"labelEl");p(this,"tileMiniatura",h(
|
|
23
|
+
`;class v extends l.SafeHTMLElement{constructor(){super();p(this,"shadow");p(this,"listeners",new l.ListenerBag);p(this,"_mapasBase",[...B]);p(this,"wrapperEl");p(this,"triggerBtn");p(this,"popoverEl");p(this,"listEl");p(this,"thumbEl");p(this,"labelEl");p(this,"miniaturasLiberadas",!1);p(this,"opcoesPendentes",!1);p(this,"tileMiniatura",h(u.lat,u.lng,u.zoom));this.shadow=this.attachShadow({mode:"open"}),this.shadow.innerHTML=`
|
|
24
24
|
<style>${I}</style>
|
|
25
25
|
<div class="ui-basemap-wrapper" id="basemap-wrapper">
|
|
26
26
|
<button class="ui-basemap-trigger" id="basemap-trigger" part="base" type="button" aria-haspopup="listbox" aria-expanded="false" title="Alternar Mapa Base">
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
<div class="ui-basemap-list" id="basemap-list"></div>
|
|
38
38
|
</div>
|
|
39
39
|
</div>
|
|
40
|
-
`,this.wrapperEl=this.shadow.getElementById("basemap-wrapper"),this.triggerBtn=this.shadow.getElementById("basemap-trigger"),this.popoverEl=this.shadow.getElementById("basemap-popover"),this.listEl=this.shadow.getElementById("basemap-list"),this.thumbEl=this.shadow.getElementById("thumb-container"),this.labelEl=this.shadow.getElementById("basemap-label")}static get observedAttributes(){return["mapa-base-ativo","valor","posicao","aberto","compacto","desabilitado","centro-miniatura",...l.ATRIBUTOS_DEGRADE]}connectedCallback(){this.tileMiniatura=this.calcularTileMiniatura(),l.aplicarDegradeNoElemento(this,this.triggerBtn),l.aplicarDegradeNoElemento(this,this.popoverEl),this.atualizarPosicaoClasses(),this.renderizarOpcoes(),this.atualizarGatilho(),this.conectarEventos()}disconnectedCallback(){this.listeners.cleanup()}attributeChangedCallback(e,i,t){if(i!==t){if(l.ehAtributoDegrade(e)){l.aplicarDegradeNoElemento(this,this.triggerBtn),l.aplicarDegradeNoElemento(this,this.popoverEl);return}if(e==="mapa-base-ativo"||e==="valor")this.atualizarSelecaoVisual(),this.atualizarGatilho();else if(e==="posicao")this.atualizarPosicaoClasses();else if(e==="aberto"){const a=t!==null&&t!=="false";this.aplicarEstadoAberto(a)}else if(e==="compacto")this.triggerBtn.classList.toggle("compacto",t!==null&&t!=="false");else if(e==="centro-miniatura"){const a=this.calcularTileMiniatura(),s=this.tileMiniatura;if(a.z===s.z&&a.x===s.x&&a.y===s.y)return;this.tileMiniatura=a,this.
|
|
40
|
+
`,this.wrapperEl=this.shadow.getElementById("basemap-wrapper"),this.triggerBtn=this.shadow.getElementById("basemap-trigger"),this.popoverEl=this.shadow.getElementById("basemap-popover"),this.listEl=this.shadow.getElementById("basemap-list"),this.thumbEl=this.shadow.getElementById("thumb-container"),this.labelEl=this.shadow.getElementById("basemap-label")}static get observedAttributes(){return["mapa-base-ativo","valor","posicao","aberto","compacto","desabilitado","centro-miniatura",...l.ATRIBUTOS_DEGRADE]}connectedCallback(){this.tileMiniatura=this.calcularTileMiniatura(),l.aplicarDegradeNoElemento(this,this.triggerBtn),l.aplicarDegradeNoElemento(this,this.popoverEl),this.atualizarPosicaoClasses(),this.renderizarOpcoes(),this.atualizarGatilho(),this.conectarEventos()}disconnectedCallback(){this.listeners.cleanup()}attributeChangedCallback(e,i,t){if(i!==t){if(l.ehAtributoDegrade(e)){l.aplicarDegradeNoElemento(this,this.triggerBtn),l.aplicarDegradeNoElemento(this,this.popoverEl);return}if(e==="mapa-base-ativo"||e==="valor")this.atualizarSelecaoVisual(),this.atualizarGatilho();else if(e==="posicao")this.atualizarPosicaoClasses();else if(e==="aberto"){const a=t!==null&&t!=="false";this.aplicarEstadoAberto(a)}else if(e==="compacto")this.triggerBtn.classList.toggle("compacto",t!==null&&t!=="false");else if(e==="centro-miniatura"){const a=this.calcularTileMiniatura(),s=this.tileMiniatura;if(a.z===s.z&&a.x===s.x&&a.y===s.y)return;this.tileMiniatura=a,this.renderizarOpcoesSeVisivel(),this.atualizarGatilho()}else if(e==="desabilitado"){const a=t!==null&&t!=="false";this.triggerBtn.disabled=a,a&&this.fechar()}}}get mapaBaseAtivo(){return this.getAttribute("mapa-base-ativo")||this.getAttribute("valor")||"satelite"}set mapaBaseAtivo(e){this.setAttribute("mapa-base-ativo",e),this.setAttribute("valor",e)}get valor(){return this.mapaBaseAtivo}set valor(e){this.mapaBaseAtivo=e}get posicao(){return this.getAttribute("posicao")||"inline"}set posicao(e){this.setAttribute("posicao",e)}get aberto(){return this.hasAttribute("aberto")&&this.getAttribute("aberto")!=="false"}set aberto(e){e?this.setAttribute("aberto",""):this.removeAttribute("aberto")}get compacto(){return this.hasAttribute("compacto")&&this.getAttribute("compacto")!=="false"}set compacto(e){e?this.setAttribute("compacto",""):this.removeAttribute("compacto")}get desabilitado(){return this.hasAttribute("desabilitado")&&this.getAttribute("desabilitado")!=="false"}set desabilitado(e){e?this.setAttribute("desabilitado",""):this.removeAttribute("desabilitado")}get mapasBase(){return this._mapasBase}definirMapasBase(e){Array.isArray(e)&&(this._mapasBase=[...e],this.renderizarOpcoesSeVisivel(),this.atualizarGatilho())}abrir(){this.desabilitado||(this.aberto=!0)}fechar(){this.aberto=!1}alternar(){this.aberto?this.fechar():this.abrir()}selecionar(e){if(!e||this.mapaBaseAtivo===e){this.fechar();return}const i=this._mapasBase.find(a=>a.id===e);if(!i)return;this.mapaBaseAtivo=e;const t={mapaBaseId:e,item:i};this.dispatchEvent(new CustomEvent("ui-mapa-base-alterado",{detail:t,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0})),this.fechar()}calcularTileMiniatura(){const e=k(this.getAttribute("centro-miniatura"))??u;return h(e.lat,e.lng,e.zoom)}posicaoAutomatica(){return!["bottom-left","bottom-right","top-left","top-right"].includes(this.posicao)}atualizarPosicaoClasses(){const e=this.posicao,i=this.posicaoAutomatica(),t=this.wrapperEl.classList.contains("abre-baixo")?"abre-baixo":"abre-cima";this.wrapperEl.className=`ui-basemap-wrapper pos-${i?"auto":e}${i?` ${t}`:""}`}ajustarDirecao(){if(!(!this.posicaoAutomatica()||typeof window>"u"))try{const e=this.triggerBtn.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight||0;if(!i||!e.width&&!e.height)return;const t=16,a=e.top-t,s=i-e.bottom-t;this.listEl.style.maxHeight="";const n=E(a,s,this.popoverEl.offsetHeight+8);this.wrapperEl.classList.toggle("abre-cima",n==="cima"),this.wrapperEl.classList.toggle("abre-baixo",n==="baixo");const c=(n==="cima"?a:s)-8,b=this.popoverEl.offsetHeight-this.listEl.offsetHeight;this.popoverEl.offsetHeight>c&&(this.listEl.style.maxHeight=`${Math.max(96,Math.floor(c-b))}px`)}catch{}}renderizarOpcoesSeVisivel(){if(this.miniaturasLiberadas&&!this.aberto){this.opcoesPendentes=!0;return}this.renderizarOpcoes()}aplicarEstadoAberto(e){e&&(!this.miniaturasLiberadas||this.opcoesPendentes)&&(this.miniaturasLiberadas=!0,this.opcoesPendentes=!1,this.renderizarOpcoes()),e&&this.ajustarDirecao(),this.popoverEl.classList.toggle("aberto",e),this.triggerBtn.classList.toggle("active",e),this.triggerBtn.setAttribute("aria-expanded",String(e))}atualizarGatilho(){const e=this.mapaBaseAtivo,i=this._mapasBase.find(t=>t.id===e);if(i){this.labelEl.textContent=i.nome,this.triggerBtn.title=i.descricao?`Mapa Base: ${i.nome} (${i.descricao})`:`Mapa Base: ${i.nome}`;const t=g(i,this.tileMiniatura);t?this.thumbEl.innerHTML=`<img class="ui-basemap-thumb-mini" src="${m(t)}" alt="" referrerpolicy="no-referrer" decoding="async" />`:this.thumbEl.innerHTML=`<span class="ui-basemap-thumb-mini fallback">${d}</span>`}else this.labelEl.textContent="Mapa Base",this.triggerBtn.title="Alternar Mapa Base",this.thumbEl.innerHTML=`<span class="ui-basemap-thumb-mini fallback">${w}</span>`}renderizarOpcoes(){const e=this.shadow.getElementById("popover-count");e&&(e.textContent=A(this._mapasBase.length));const i=this.mapaBaseAtivo;this.listEl.innerHTML=this._mapasBase.map(t=>{const a=t.id===i,s=this.miniaturasLiberadas?g(t,this.tileMiniatura):null,c=!this.miniaturasLiberadas&&!!(t.thumbnailUrl||t.tileUrl)?'<span class="ui-basemap-item-preview pendente" aria-hidden="true"></span>':s?`<img class="ui-basemap-item-preview" src="${m(s)}" alt="" loading="lazy" referrerpolicy="no-referrer" decoding="async" />`:`<div class="ui-basemap-item-preview-none">${d}</div>`;return`
|
|
41
41
|
<div class="ui-basemap-item ${a?"active":""}"
|
|
42
42
|
data-id="${m(t.id)}"
|
|
43
43
|
role="option"
|
|
44
44
|
aria-selected="${a}"
|
|
45
45
|
tabindex="0">
|
|
46
|
-
${
|
|
46
|
+
${c}
|
|
47
47
|
<div class="ui-basemap-item-info">
|
|
48
48
|
<span class="ui-basemap-item-nome">${m(t.nome)}</span>
|
|
49
49
|
${t.descricao?`<span class="ui-basemap-item-desc">${m(t.descricao)}</span>`:""}
|
|
50
50
|
</div>
|
|
51
|
-
<span class="ui-basemap-item-check">${
|
|
51
|
+
<span class="ui-basemap-item-check">${O}</span>
|
|
52
52
|
</div>
|
|
53
|
-
`}).join("")}focarItem(e){const i=Array.from(this.listEl.querySelectorAll(".ui-basemap-item"));if(i.length===0)return;const t=i.indexOf(this.shadow.activeElement);let a;switch(e){case"ativo":a=Math.max(0,i.findIndex(s=>s.classList.contains("active")));break;case"proximo":a=Math.min(i.length-1,t+1);break;case"anterior":a=Math.max(0,t-1);break;case"primeiro":a=0;break;default:a=i.length-1}i[a].focus()}atualizarSelecaoVisual(){const e=this.mapaBaseAtivo;this.listEl.querySelectorAll(".ui-basemap-item").forEach(t=>{const s=t.getAttribute("data-id")===e;t.classList.toggle("active",s),t.setAttribute("aria-selected",String(s))})}conectarEventos(){this.listeners.add(this.triggerBtn,"click",t=>{t.stopPropagation(),this.alternar(),this.aberto&&t.detail===0&&this.focarItem("ativo")}),this.listeners.add(this.listEl,"click",t=>{const a=t.target.closest(".ui-basemap-item");if(!a)return;const s=a.getAttribute("data-id");s&&this.selecionar(s)}),this.listeners.add(this.listEl,"keydown",t=>{const a={ArrowDown:"proximo",ArrowUp:"anterior",Home:"primeiro",End:"ultimo"};if(a[t.key]){t.preventDefault(),this.focarItem(a[t.key]);return}if(t.key==="Enter"||t.key===" "){const s=t.target.closest(".ui-basemap-item");if(s){t.preventDefault();const n=s.getAttribute("data-id");n&&this.selecionar(n)}}});const e=t=>{if(!this.aberto)return;t.composedPath().includes(this)||this.fechar()};this.listeners.add(document,"click",e),this.listeners.add(this.wrapperEl,"focusout",t=>{const a=t.relatedTarget;this.aberto&&a&&!this.shadow.contains(a)&&!this.contains(a)&&this.fechar()}),this.listeners.add(this.shadow,"error",t=>{const a=t.target;if(!a||a.tagName!=="IMG")return;const s=document.createElement("span"),n=a.classList.contains("ui-basemap-thumb-mini");s.className=n?"ui-basemap-thumb-mini fallback":"ui-basemap-item-preview-none",s.innerHTML=n?w:d,a.replaceWith(s)},!0);const i=t=>{t.key==="Escape"&&this.aberto&&(this.fechar(),this.triggerBtn.focus())};this.listeners.add(document,"keydown",i)}}function m(r){return r?String(r).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}class C extends v{}l.definirCustomElement("ui-seletor-mapa-base",v);l.definirCustomElement("ui-mapa-base",C);exports.CENTRO_MINIATURA_PADRAO=
|
|
53
|
+
`}).join("")}focarItem(e){const i=Array.from(this.listEl.querySelectorAll(".ui-basemap-item"));if(i.length===0)return;const t=i.indexOf(this.shadow.activeElement);let a;switch(e){case"ativo":a=Math.max(0,i.findIndex(s=>s.classList.contains("active")));break;case"proximo":a=Math.min(i.length-1,t+1);break;case"anterior":a=Math.max(0,t-1);break;case"primeiro":a=0;break;default:a=i.length-1}i[a].focus()}atualizarSelecaoVisual(){const e=this.mapaBaseAtivo;this.listEl.querySelectorAll(".ui-basemap-item").forEach(t=>{const s=t.getAttribute("data-id")===e;t.classList.toggle("active",s),t.setAttribute("aria-selected",String(s))})}conectarEventos(){this.listeners.add(this.triggerBtn,"click",t=>{t.stopPropagation(),this.alternar(),this.aberto&&t.detail===0&&this.focarItem("ativo")}),this.listeners.add(this.listEl,"click",t=>{const a=t.target.closest(".ui-basemap-item");if(!a)return;const s=a.getAttribute("data-id");s&&this.selecionar(s)}),this.listeners.add(this.listEl,"keydown",t=>{const a={ArrowDown:"proximo",ArrowUp:"anterior",Home:"primeiro",End:"ultimo"};if(a[t.key]){t.preventDefault(),this.focarItem(a[t.key]);return}if(t.key==="Enter"||t.key===" "){const s=t.target.closest(".ui-basemap-item");if(s){t.preventDefault();const n=s.getAttribute("data-id");n&&this.selecionar(n)}}});const e=t=>{if(!this.aberto)return;t.composedPath().includes(this)||this.fechar()};this.listeners.add(document,"click",e),this.listeners.add(this.wrapperEl,"focusout",t=>{const a=t.relatedTarget;this.aberto&&a&&!this.shadow.contains(a)&&!this.contains(a)&&this.fechar()}),this.listeners.add(this.shadow,"error",t=>{const a=t.target;if(!a||a.tagName!=="IMG")return;const s=document.createElement("span"),n=a.classList.contains("ui-basemap-thumb-mini");s.className=n?"ui-basemap-thumb-mini fallback":"ui-basemap-item-preview-none",s.innerHTML=n?w:d,a.replaceWith(s)},!0);const i=t=>{t.key==="Escape"&&this.aberto&&(this.fechar(),this.triggerBtn.focus())};this.listeners.add(document,"keydown",i)}}function m(r){return r?String(r).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}class C extends v{}l.definirCustomElement("ui-seletor-mapa-base",v);l.definirCustomElement("ui-mapa-base",C);exports.CENTRO_MINIATURA_PADRAO=u;exports.MAPAS_BASE_PADRAO=B;exports.UIMapaBase=C;exports.UISeletorMapaBase=v;exports.decidirAbertura=E;exports.lerCentroMiniatura=k;exports.preencherModeloTile=z;exports.textoContagem=A;exports.tileDoPonto=h;exports.urlMiniatura=g;
|
|
@@ -2,43 +2,43 @@ var k = Object.defineProperty;
|
|
|
2
2
|
var M = (r, o, e) => o in r ? k(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e;
|
|
3
3
|
var p = (r, o, e) => M(r, typeof o != "symbol" ? o + "" : o, e);
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { S as z, A as B, L as C, g as
|
|
6
|
-
const
|
|
5
|
+
import { S as z, A as B, L as C, g as b, s as S, d as w } from "./kit-base-CBXA66aM.js";
|
|
6
|
+
const c = { lat: 0, lng: 0, zoom: 2 }, y = 19, h = 85.05112878;
|
|
7
7
|
function _(r) {
|
|
8
8
|
const o = Number.isFinite(r) && r > 0 ? Math.floor(r) : 0;
|
|
9
9
|
return `${o} ${o === 1 ? "opção" : "opções"}`;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function L(r, o, e) {
|
|
12
12
|
const i = Number.isFinite(r) ? r : 0, t = Number.isFinite(o) ? o : 0, a = Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
13
13
|
return t >= a ? "baixo" : i > t ? "cima" : "baixo";
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function $(r) {
|
|
16
16
|
if (typeof r != "string" || !r.trim()) return null;
|
|
17
17
|
const o = r.split(",").map((s) => Number(s.trim()));
|
|
18
18
|
if (o.length < 2 || o.length > 3) return null;
|
|
19
19
|
const [e, i, t] = o;
|
|
20
20
|
if (!Number.isFinite(e) || !Number.isFinite(i) || e < -90 || e > 90 || i < -180 || i > 180) return null;
|
|
21
|
-
const a = o.length === 3 ? t :
|
|
21
|
+
const a = o.length === 3 ? t : c.zoom;
|
|
22
22
|
return Number.isFinite(a) ? { lat: e, lng: i, zoom: Math.min(y, Math.max(0, Math.round(a))) } : null;
|
|
23
23
|
}
|
|
24
24
|
function g(r, o, e) {
|
|
25
|
-
const i = Number.isFinite(e) ? Math.min(y, Math.max(0, Math.round(e))) :
|
|
25
|
+
const i = Number.isFinite(e) ? Math.min(y, Math.max(0, Math.round(e))) : c.zoom, t = 2 ** i, a = Number.isFinite(r) ? Math.min(h, Math.max(-h, r)) : 0, s = Number.isFinite(o) ? Math.min(180, Math.max(-180, o)) : 0, n = a * Math.PI / 180, l = (m) => Math.min(t - 1, Math.max(0, Math.floor(m)));
|
|
26
26
|
return {
|
|
27
27
|
z: i,
|
|
28
|
-
x:
|
|
29
|
-
y:
|
|
28
|
+
x: l((s + 180) / 360 * t),
|
|
29
|
+
y: l((1 - Math.log(Math.tan(n) + 1 / Math.cos(n)) / Math.PI) / 2 * t)
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
function A(r) {
|
|
33
33
|
return /^https?:\/\//i.test(r.trim());
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function I(r, o) {
|
|
36
36
|
return typeof r != "string" || !A(r) ? null : r.replace(/\{z\}/g, String(o.z)).replace(/\{x\}/g, String(o.x)).replace(/\{y\}/g, String(o.y)).replace(/\{s\}/g, "a").replace(/\{r\}/g, "");
|
|
37
37
|
}
|
|
38
38
|
function v(r, o) {
|
|
39
|
-
return r ? typeof r.thumbnailUrl == "string" && A(r.thumbnailUrl) ? r.thumbnailUrl :
|
|
39
|
+
return r ? typeof r.thumbnailUrl == "string" && A(r.thumbnailUrl) ? r.thumbnailUrl : I(r.tileUrl, o) : null;
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const O = ':host{display:inline-block;font-family:var(--ui-fonte-base, "Inter", sans-serif);color:var(--ui-cor-texto, #f1f1f5);box-sizing:border-box;-webkit-user-select:none;user-select:none}:host *,:host *:before,:host *:after{box-sizing:border-box}:host([posicao="bottom-right"]){position:absolute;bottom:16px;right:16px;z-index:var(--ui-z-workspace-hud, 500)}:host([posicao="bottom-left"]){position:absolute;bottom:16px;left:16px;z-index:var(--ui-z-workspace-hud, 500)}:host([posicao="top-right"]){position:absolute;top:16px;right:16px;z-index:var(--ui-z-workspace-hud, 500)}:host([posicao="top-left"]){position:absolute;top:16px;left:16px;z-index:var(--ui-z-workspace-hud, 500)}:host([posicao="inline"]){position:relative;display:inline-flex}.ui-basemap-wrapper{position:relative;display:inline-flex;align-items:center}.ui-basemap-trigger{display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 12px 0 6px;background:var(--ui-degrade-interno, var(--ui-basemap-gatilho-fundo, var(--ui-fundo-elevado, var(--ui-cor-fundo-elevado, rgba(18, 18, 24, .88)))));backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-pill, 999px);color:var(--ui-cor-texto, #f1f1f5);cursor:pointer;outline:none;font-size:11.5px;font-weight:500;letter-spacing:.2px;box-shadow:var(--ui-sombra-md, 0 4px 14px rgba(0, 0, 0, .35)),0 1px 3px #0003;transition:all .18s cubic-bezier(.16,1,.3,1)}.ui-basemap-trigger:hover{background:var(--ui-cor-botao-secundario-hover, rgba(28, 28, 36, .95));border-color:var(--ui-cor-primaria, #00E08A);transform:translateY(-1px);box-shadow:var(--ui-sombra-md, 0 6px 20px rgba(0, 0, 0, .45)),0 0 12px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 20%,transparent)}.ui-basemap-trigger:focus-visible{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 35%,transparent)}.ui-basemap-trigger.active{border-color:var(--ui-cor-primaria, #00E08A);background:var(--ui-degrade-interno, var(--ui-basemap-gatilho-ativo-fundo, var(--ui-fundo-elevado, var(--ui-cor-fundo-elevado, rgba(22, 26, 32, .95)))));box-shadow:var(--ui-sombra-md, 0 4px 16px rgba(0, 0, 0, .4)),0 0 10px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}:host([compacto]) .ui-basemap-trigger,.ui-basemap-trigger.compacto{width:36px;height:36px;padding:0;justify-content:center;border-radius:50%}:host([compacto]) .ui-basemap-label,:host([compacto]) .ui-basemap-chevron,.ui-basemap-trigger.compacto .ui-basemap-label,.ui-basemap-trigger.compacto .ui-basemap-chevron{display:none!important}.ui-basemap-thumb-mini{width:22px;height:22px;border-radius:50%;object-fit:cover;flex-shrink:0;border:1.5px solid var(--ui-cor-borda, rgba(255, 255, 255, .2));box-shadow:var(--ui-sombra-sm, 0 1px 3px rgba(0, 0, 0, .4))}.ui-basemap-thumb-mini.fallback{display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);color:var(--ui-cor-primaria, #00E08A)}.ui-basemap-thumb-mini.fallback svg{width:13px;height:13px}.ui-basemap-label{white-space:nowrap;max-width:130px;overflow:hidden;text-overflow:ellipsis}.ui-basemap-chevron{display:inline-flex;align-items:center;justify-content:center;color:var(--ui-cor-texto-secundario, #888899);transition:transform .2s cubic-bezier(.16,1,.3,1);margin-left:2px}.ui-basemap-chevron svg{width:12px;height:12px}.ui-basemap-trigger.active .ui-basemap-chevron{transform:rotate(180deg);color:var(--ui-cor-primaria, #00E08A)}.ui-basemap-popover{position:absolute;min-width:210px;max-width:250px;background:var(--ui-degrade-interno, var(--ui-basemap-popover-fundo, var(--ui-fundo-elevado, var(--ui-cor-fundo-elevado, rgba(16, 16, 22, .95)))));backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:12px;padding:6px;box-shadow:var(--ui-sombra-lg, 0 12px 32px rgba(0, 0, 0, .6)),0 2px 8px #0000004d;z-index:var(--ui-z-popover, 1050);display:flex;flex-direction:column;gap:3px;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(8px) scale(.97);transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1),visibility .18s}.ui-basemap-wrapper.pos-bottom-right .ui-basemap-popover,.ui-basemap-wrapper.pos-bottom-left .ui-basemap-popover,.ui-basemap-wrapper.pos-bottom .ui-basemap-popover{bottom:calc(100% + 8px);transform:translateY(8px) scale(.97)}.ui-basemap-wrapper.pos-bottom-right .ui-basemap-popover{right:0}.ui-basemap-wrapper.pos-bottom-left .ui-basemap-popover{left:0}.ui-basemap-wrapper.pos-top-right .ui-basemap-popover,.ui-basemap-wrapper.pos-top-left .ui-basemap-popover,.ui-basemap-wrapper.pos-top .ui-basemap-popover{top:calc(100% + 8px);transform:translateY(-8px) scale(.97)}.ui-basemap-wrapper.pos-top-right .ui-basemap-popover{right:0}.ui-basemap-wrapper.pos-top-left .ui-basemap-popover,.ui-basemap-wrapper.pos-auto .ui-basemap-popover{left:0}.ui-basemap-wrapper.pos-auto.abre-cima .ui-basemap-popover{bottom:calc(100% + 8px)}.ui-basemap-wrapper.pos-auto.abre-baixo .ui-basemap-popover{top:calc(100% + 8px)}.ui-basemap-wrapper.pos-auto.abre-baixo .ui-basemap-popover:not(.aberto){transform:translateY(-8px) scale(.97)}.ui-basemap-popover.aberto{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0) scale(1)}.ui-basemap-popover-header{display:flex;align-items:center;justify-content:space-between;padding:4px 8px 6px;border-bottom:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);margin-bottom:2px}.ui-basemap-popover-titulo{font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--ui-cor-texto-secundario, #888899)}.ui-basemap-popover-badge{font-size:9px;font-weight:600;padding:1px 5px;border-radius:var(--ui-raio-sm, 4px);background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 12%,transparent);color:var(--ui-cor-primaria, #00E08A);font-variant-numeric:tabular-nums}.ui-basemap-list{display:flex;flex-direction:column;gap:2px;max-height:280px;overflow-y:auto;overflow-x:hidden;padding-right:2px}.ui-basemap-list::-webkit-scrollbar{width:4px}.ui-basemap-list::-webkit-scrollbar-track{background:transparent}.ui-basemap-list::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 15%,transparent);border-radius:2px}.ui-basemap-item{display:flex;align-items:center;gap:8px;padding:5px 8px;border-radius:7px;background:transparent;border:1px solid transparent;cursor:pointer;transition:all .12s ease;outline:none}.ui-basemap-item:hover{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent)}.ui-basemap-item:focus-visible{border-color:var(--ui-cor-primaria, #00E08A);background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 6%,transparent)}.ui-basemap-item.active{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 12%,transparent);border-color:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 35%,transparent)}.ui-basemap-item-preview{width:32px;height:24px;border-radius:var(--ui-raio-sm, 4px);object-fit:cover;flex-shrink:0;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent);box-shadow:var(--ui-sombra-sm, 0 1px 3px rgba(0, 0, 0, .3))}.ui-basemap-item-preview.pendente{display:block;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent)}.ui-basemap-item-preview-none{width:32px;height:24px;border-radius:var(--ui-raio-sm, 4px);flex-shrink:0;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);color:var(--ui-cor-texto-secundario, #888899)}.ui-basemap-item-preview-none svg{width:14px;height:14px}.ui-basemap-item-info{display:flex;flex-direction:column;min-width:0;flex:1}.ui-basemap-item-nome{font-size:11px;font-weight:500;color:var(--ui-cor-texto, #f1f1f5);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-basemap-item.active .ui-basemap-item-nome{color:var(--ui-cor-primaria, #00E08A);font-weight:600}.ui-basemap-item-desc{font-size:9.5px;color:var(--ui-cor-texto-secundario, #77778b);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ui-basemap-item-check{display:flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;color:var(--ui-cor-primaria, #00E08A);opacity:0;transform:scale(.6);transition:all .15s cubic-bezier(.16,1,.3,1)}.ui-basemap-item.active .ui-basemap-item-check{opacity:1;transform:scale(1)}.ui-basemap-item-check svg{width:13px;height:13px}:host(.degrade),:host(.gradiente),:host([data-degrade]:not([data-degrade="false"])),.ui-basemap-trigger[data-degrade]:not([data-degrade=false]),.ui-basemap-popover[data-degrade]:not([data-degrade=false]){--ui-basemap-gatilho-fundo: var(--ui-gradiente-elevado);--ui-basemap-gatilho-ativo-fundo: var(--ui-gradiente-elevado);--ui-basemap-popover-fundo: var(--ui-gradiente-elevado)}', x = "https://server.arcgisonline.com/ArcGIS/rest/services", N = [
|
|
42
42
|
{
|
|
43
43
|
id: "none",
|
|
44
44
|
nome: "Sem Mapa",
|
|
@@ -66,7 +66,7 @@ const H = ':host{display:inline-block;font-family:var(--ui-fonte-base, "Inter",
|
|
|
66
66
|
id: "osm",
|
|
67
67
|
nome: "OpenStreetMap",
|
|
68
68
|
descricao: "Mapa viário e urbano colaborativo",
|
|
69
|
-
tileUrl: "https://tile.openstreetmap.org/{z}/{x}/{y}.png"
|
|
69
|
+
tileUrl: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
id: "topografia",
|
|
@@ -86,11 +86,11 @@ const H = ':host{display:inline-block;font-family:var(--ui-fonte-base, "Inter",
|
|
|
86
86
|
<line x1="2" y1="12" x2="22" y2="12"></line>
|
|
87
87
|
<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path>
|
|
88
88
|
</svg>
|
|
89
|
-
`,
|
|
89
|
+
`, H = `
|
|
90
90
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
|
|
91
91
|
<polyline points="6 9 12 15 18 9"></polyline>
|
|
92
92
|
</svg>
|
|
93
|
-
`,
|
|
93
|
+
`, T = `
|
|
94
94
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round">
|
|
95
95
|
<polyline points="20 6 9 17 4 12"></polyline>
|
|
96
96
|
</svg>
|
|
@@ -108,21 +108,25 @@ class E extends z {
|
|
|
108
108
|
super();
|
|
109
109
|
p(this, "shadow");
|
|
110
110
|
p(this, "listeners", new C());
|
|
111
|
-
p(this, "_mapasBase", [...
|
|
111
|
+
p(this, "_mapasBase", [...N]);
|
|
112
112
|
p(this, "wrapperEl");
|
|
113
113
|
p(this, "triggerBtn");
|
|
114
114
|
p(this, "popoverEl");
|
|
115
115
|
p(this, "listEl");
|
|
116
116
|
p(this, "thumbEl");
|
|
117
117
|
p(this, "labelEl");
|
|
118
|
-
|
|
118
|
+
/** As miniaturas da lista só são pedidas na 1ª abertura (não disputam rede com o mapa na carga da página). */
|
|
119
|
+
p(this, "miniaturasLiberadas", !1);
|
|
120
|
+
/** Lista mudou (centro/catálogo) com o popover fechado: re-renderiza na próxima abertura. */
|
|
121
|
+
p(this, "opcoesPendentes", !1);
|
|
122
|
+
p(this, "tileMiniatura", g(c.lat, c.lng, c.zoom));
|
|
119
123
|
this.shadow = this.attachShadow({ mode: "open" }), this.shadow.innerHTML = `
|
|
120
|
-
<style>${
|
|
124
|
+
<style>${O}</style>
|
|
121
125
|
<div class="ui-basemap-wrapper" id="basemap-wrapper">
|
|
122
126
|
<button class="ui-basemap-trigger" id="basemap-trigger" part="base" type="button" aria-haspopup="listbox" aria-expanded="false" title="Alternar Mapa Base">
|
|
123
127
|
<span class="ui-basemap-thumb-container" id="thumb-container"></span>
|
|
124
128
|
<span class="ui-basemap-label" id="basemap-label">Esri Satélite</span>
|
|
125
|
-
<span class="ui-basemap-chevron">${
|
|
129
|
+
<span class="ui-basemap-chevron">${H}</span>
|
|
126
130
|
</button>
|
|
127
131
|
|
|
128
132
|
<div class="ui-basemap-popover" id="basemap-popover" part="lista" role="listbox" aria-label="Selecione o Mapa Base">
|
|
@@ -148,7 +152,7 @@ class E extends z {
|
|
|
148
152
|
];
|
|
149
153
|
}
|
|
150
154
|
connectedCallback() {
|
|
151
|
-
this.tileMiniatura = this.calcularTileMiniatura(),
|
|
155
|
+
this.tileMiniatura = this.calcularTileMiniatura(), b(this, this.triggerBtn), b(this, this.popoverEl), this.atualizarPosicaoClasses(), this.renderizarOpcoes(), this.atualizarGatilho(), this.conectarEventos();
|
|
152
156
|
}
|
|
153
157
|
disconnectedCallback() {
|
|
154
158
|
this.listeners.cleanup();
|
|
@@ -156,7 +160,7 @@ class E extends z {
|
|
|
156
160
|
attributeChangedCallback(e, i, t) {
|
|
157
161
|
if (i !== t) {
|
|
158
162
|
if (S(e)) {
|
|
159
|
-
|
|
163
|
+
b(this, this.triggerBtn), b(this, this.popoverEl);
|
|
160
164
|
return;
|
|
161
165
|
}
|
|
162
166
|
if (e === "mapa-base-ativo" || e === "valor")
|
|
@@ -171,7 +175,7 @@ class E extends z {
|
|
|
171
175
|
else if (e === "centro-miniatura") {
|
|
172
176
|
const a = this.calcularTileMiniatura(), s = this.tileMiniatura;
|
|
173
177
|
if (a.z === s.z && a.x === s.x && a.y === s.y) return;
|
|
174
|
-
this.tileMiniatura = a, this.
|
|
178
|
+
this.tileMiniatura = a, this.renderizarOpcoesSeVisivel(), this.atualizarGatilho();
|
|
175
179
|
} else if (e === "desabilitado") {
|
|
176
180
|
const a = t !== null && t !== "false";
|
|
177
181
|
this.triggerBtn.disabled = a, a && this.fechar();
|
|
@@ -219,7 +223,7 @@ class E extends z {
|
|
|
219
223
|
return this._mapasBase;
|
|
220
224
|
}
|
|
221
225
|
definirMapasBase(e) {
|
|
222
|
-
Array.isArray(e) && (this._mapasBase = [...e], this.
|
|
226
|
+
Array.isArray(e) && (this._mapasBase = [...e], this.renderizarOpcoesSeVisivel(), this.atualizarGatilho());
|
|
223
227
|
}
|
|
224
228
|
// --- Ações Públicas ---
|
|
225
229
|
abrir() {
|
|
@@ -252,7 +256,7 @@ class E extends z {
|
|
|
252
256
|
}
|
|
253
257
|
// --- Renderização Interna ---
|
|
254
258
|
calcularTileMiniatura() {
|
|
255
|
-
const e =
|
|
259
|
+
const e = $(this.getAttribute("centro-miniatura")) ?? c;
|
|
256
260
|
return g(e.lat, e.lng, e.zoom);
|
|
257
261
|
}
|
|
258
262
|
/** `inline`/`auto` (ou valor desconhecido) decidem a direção ao abrir; as posições de canto são fixas. */
|
|
@@ -271,15 +275,23 @@ class E extends z {
|
|
|
271
275
|
if (!i || !e.width && !e.height) return;
|
|
272
276
|
const t = 16, a = e.top - t, s = i - e.bottom - t;
|
|
273
277
|
this.listEl.style.maxHeight = "";
|
|
274
|
-
const n =
|
|
278
|
+
const n = L(a, s, this.popoverEl.offsetHeight + 8);
|
|
275
279
|
this.wrapperEl.classList.toggle("abre-cima", n === "cima"), this.wrapperEl.classList.toggle("abre-baixo", n === "baixo");
|
|
276
|
-
const
|
|
277
|
-
this.popoverEl.offsetHeight >
|
|
280
|
+
const l = (n === "cima" ? a : s) - 8, m = this.popoverEl.offsetHeight - this.listEl.offsetHeight;
|
|
281
|
+
this.popoverEl.offsetHeight > l && (this.listEl.style.maxHeight = `${Math.max(96, Math.floor(l - m))}px`);
|
|
278
282
|
} catch {
|
|
279
283
|
}
|
|
280
284
|
}
|
|
285
|
+
/** Fechado com miniaturas já liberadas: adia a troca de imagens para a próxima abertura. */
|
|
286
|
+
renderizarOpcoesSeVisivel() {
|
|
287
|
+
if (this.miniaturasLiberadas && !this.aberto) {
|
|
288
|
+
this.opcoesPendentes = !0;
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
this.renderizarOpcoes();
|
|
292
|
+
}
|
|
281
293
|
aplicarEstadoAberto(e) {
|
|
282
|
-
e && this.ajustarDirecao(), this.popoverEl.classList.toggle("aberto", e), this.triggerBtn.classList.toggle("active", e), this.triggerBtn.setAttribute("aria-expanded", String(e));
|
|
294
|
+
e && (!this.miniaturasLiberadas || this.opcoesPendentes) && (this.miniaturasLiberadas = !0, this.opcoesPendentes = !1, this.renderizarOpcoes()), e && this.ajustarDirecao(), this.popoverEl.classList.toggle("aberto", e), this.triggerBtn.classList.toggle("active", e), this.triggerBtn.setAttribute("aria-expanded", String(e));
|
|
283
295
|
}
|
|
284
296
|
atualizarGatilho() {
|
|
285
297
|
const e = this.mapaBaseAtivo, i = this._mapasBase.find((t) => t.id === e);
|
|
@@ -295,19 +307,19 @@ class E extends z {
|
|
|
295
307
|
e && (e.textContent = _(this._mapasBase.length));
|
|
296
308
|
const i = this.mapaBaseAtivo;
|
|
297
309
|
this.listEl.innerHTML = this._mapasBase.map((t) => {
|
|
298
|
-
const a = t.id === i, s = v(t, this.tileMiniatura),
|
|
310
|
+
const a = t.id === i, s = this.miniaturasLiberadas ? v(t, this.tileMiniatura) : null, l = !this.miniaturasLiberadas && !!(t.thumbnailUrl || t.tileUrl) ? '<span class="ui-basemap-item-preview pendente" aria-hidden="true"></span>' : s ? `<img class="ui-basemap-item-preview" src="${u(s)}" alt="" loading="lazy" referrerpolicy="no-referrer" decoding="async" />` : `<div class="ui-basemap-item-preview-none">${d}</div>`;
|
|
299
311
|
return `
|
|
300
312
|
<div class="ui-basemap-item ${a ? "active" : ""}"
|
|
301
313
|
data-id="${u(t.id)}"
|
|
302
314
|
role="option"
|
|
303
315
|
aria-selected="${a}"
|
|
304
316
|
tabindex="0">
|
|
305
|
-
${
|
|
317
|
+
${l}
|
|
306
318
|
<div class="ui-basemap-item-info">
|
|
307
319
|
<span class="ui-basemap-item-nome">${u(t.nome)}</span>
|
|
308
320
|
${t.descricao ? `<span class="ui-basemap-item-desc">${u(t.descricao)}</span>` : ""}
|
|
309
321
|
</div>
|
|
310
|
-
<span class="ui-basemap-item-check">${
|
|
322
|
+
<span class="ui-basemap-item-check">${T}</span>
|
|
311
323
|
</div>
|
|
312
324
|
`;
|
|
313
325
|
}).join("");
|
|
@@ -392,18 +404,18 @@ class E extends z {
|
|
|
392
404
|
function u(r) {
|
|
393
405
|
return r ? String(r).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'") : "";
|
|
394
406
|
}
|
|
395
|
-
class
|
|
407
|
+
class U extends E {
|
|
396
408
|
}
|
|
397
409
|
w("ui-seletor-mapa-base", E);
|
|
398
|
-
w("ui-mapa-base",
|
|
410
|
+
w("ui-mapa-base", U);
|
|
399
411
|
export {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
412
|
+
c as CENTRO_MINIATURA_PADRAO,
|
|
413
|
+
N as MAPAS_BASE_PADRAO,
|
|
414
|
+
U as UIMapaBase,
|
|
403
415
|
E as UISeletorMapaBase,
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
416
|
+
L as decidirAbertura,
|
|
417
|
+
$ as lerCentroMiniatura,
|
|
418
|
+
I as preencherModeloTile,
|
|
407
419
|
_ as textoContagem,
|
|
408
420
|
g as tileDoPonto,
|
|
409
421
|
v as urlMiniatura
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thibezer/ui-components-kit",
|
|
3
|
-
"version": "2.31.
|
|
3
|
+
"version": "2.31.2",
|
|
4
4
|
"description": "Web Components nativos (W3C Custom Elements + Shadow DOM) para interfaces densas de GIS, CAD e formulários, sem dependência de framework.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|