Custom Gis Application with Arcgis Javascript API with modern layouting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
9.3 KiB

// All material copyright Esri, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.30/esri/copyright.txt for details.
//>>built
define("exports ./componentsUtils ./array2 ./dom ./form ./guid ./interactive ./label2 ./loadable".split(" "),function(f,c,q,g,h,u,e,k,l){function r(){"undefined"!==typeof customElements&&["calcite-radio-button"].forEach(a=>{switch(a){case "calcite-radio-button":customElements.get(a)||customElements.define(a,t)}})}const t=c.proxyCustomElement(class extends c.H{constructor(){super();this.__registerHost();this.__attachShadow();this.calciteInternalRadioButtonBlur=c.createEvent(this,"calciteInternalRadioButtonBlur",
6);this.calciteRadioButtonChange=c.createEvent(this,"calciteRadioButtonChange",6);this.calciteInternalRadioButtonCheckedChange=c.createEvent(this,"calciteInternalRadioButtonCheckedChange",6);this.calciteInternalRadioButtonFocus=c.createEvent(this,"calciteInternalRadioButtonFocus",6);this.selectItem=(a,b)=>{a[b].click()};this.queryButtons=()=>Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(a=>a.name===this.name);this.isFocusable=()=>{var a=this.queryButtons();
const b=a.find(d=>!d.disabled);a=a.find(d=>d.checked);return b===this.el&&!a};this.check=()=>{this.disabled||(this.focused=!0,this.setFocus(),this.checked||(this.uncheckAllRadioButtonsInGroup(),this.checked=!0,this.calciteRadioButtonChange.emit()))};this.clickHandler=()=>{this.disabled||this.check()};this.setContainerEl=a=>{this.containerEl=a};this.handleKeyDown=a=>{var {key:b}=a,{el:d}=this;if(-1!==["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "].indexOf(b))if(" "===b)this.check(),a.preventDefault();
else{var m=b;"rtl"===g.getElementDir(d)&&("ArrowRight"===b&&(m="ArrowLeft"),"ArrowLeft"===b&&(m="ArrowRight"));b=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(n=>n.name===this.name);var p=0;d=b.length;b.some((n,v)=>{if(n.checked)return p=v,!0});switch(m){case "ArrowLeft":case "ArrowUp":a.preventDefault();this.selectItem(b,q.getRoundRobinIndex(Math.max(p-1,-1),d));break;case "ArrowRight":case "ArrowDown":a.preventDefault(),this.selectItem(b,q.getRoundRobinIndex(p+
1,d))}}};this.onContainerBlur=()=>{this.focused=!1;this.calciteInternalRadioButtonBlur.emit()};this.onContainerFocus=()=>{this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())};this.focused=this.disabled=this.checked=!1;this.guid=this.form=void 0;this.hovered=!1;this.name=this.label=void 0;this.required=!1;this.scale="m";this.value=void 0}handleHiddenChange(){this.updateTabIndexOfOtherRadioButtonsInGroup()}checkedChanged(a){a&&this.uncheckOtherRadioButtonsInGroup();this.calciteInternalRadioButtonCheckedChange.emit()}disabledChanged(){this.updateTabIndexOfOtherRadioButtonsInGroup()}nameChanged(){this.checkLastRadioButton()}async setFocus(){await l.componentFocusable(this);
this.disabled||g.focusElement(this.containerEl)}syncHiddenFormInput(a){a.type="radio"}onLabelClick(a){!this.disabled&&!this.el.hidden&&(a=a.currentTarget,a=a.for?this.rootNode.querySelector(`calcite-radio-button[id="${a.for}"]`):a.querySelector(`calcite-radio-button[name="${this.name}"]`))&&(a.focused=!0,this.setFocus(),a.checked||(this.uncheckOtherRadioButtonsInGroup(),a.checked=!0,this.calciteRadioButtonChange.emit()))}checkLastRadioButton(){const a=this.queryButtons().filter(b=>b.checked);if(1<
a?.length){const b=a[a.length-1];a.filter(d=>d!==b).forEach(d=>{d.checked=!1;d.emitCheckedChange()})}}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}uncheckAllRadioButtonsInGroup(){this.queryButtons().forEach(a=>{a.checked&&(a.checked=!1,a.focused=!1)})}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter(a=>a.guid!==this.guid).forEach(a=>{a.checked&&(a.checked=!1,a.focused=!1)})}updateTabIndexOfOtherRadioButtonsInGroup(){this.queryButtons().filter(a=>a.guid!==
this.guid&&!a.disabled).forEach(a=>{c.forceUpdate(a)})}getTabIndex(){if(!this.disabled)return this.checked||this.isFocusable()?0:-1}pointerEnterHandler(){this.disabled||(this.hovered=!0)}pointerLeaveHandler(){this.disabled||(this.hovered=!1)}connectedCallback(){this.rootNode=this.el.getRootNode();this.guid=this.el.id||`calcite-radio-button-${u.guid()}`;this.name&&this.checkLastRadioButton();e.connectInteractive(this);k.connectLabel(this);h.connectForm(this);this.updateTabIndexOfOtherRadioButtonsInGroup()}componentWillLoad(){l.setUpLoadableComponent(this)}componentDidLoad(){l.setComponentLoaded(this);
this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){e.disconnectInteractive(this);k.disconnectLabel(this);h.disconnectForm(this);this.updateTabIndexOfOtherRadioButtonsInGroup()}componentDidRender(){e.updateHostInteraction(this)}render(){const a=this.getTabIndex();return c.h(c.Host,{key:"7f7f0cfa7e4a873346af37a4c90885e3b0353da9",onClick:this.clickHandler,onKeyDown:this.handleKeyDown},c.h(e.InteractiveContainer,{key:"a4896cb1e1444133c974769bd17adb62dd71f93b",disabled:this.disabled},
c.h("div",{key:"4efbe11beea96f535bbe5a0d4bb560c0c1771059","aria-checked":g.toAriaBoolean(this.checked),"aria-label":k.getLabelText(this),class:"container",onBlur:this.onContainerBlur,onFocus:this.onContainerFocus,role:"radio",tabIndex:a,ref:this.setContainerEl},c.h("div",{key:"4f5a058df72d81bb149d95e0bf86a43067818bbd",class:"radio"})),c.h(h.HiddenFormInputSlot,{key:"8760ce6ccca0a98c46f6198753f57509cbbe2551",component:this})))}get el(){return this}static get watchers(){return{hidden:["handleHiddenChange"],
checked:["checkedChanged"],disabled:["disabledChanged"],name:["nameChanged"]}}static get style(){return':host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px}:host .radio{cursor:pointer;border-radius:9999px;background-color:var(--calcite-color-foreground-1);outline-color:transparent;transition:background-color, block-size, border-color, box-shadow, color, inset-block-end, inset-block-start, inset-inline-end, inset-inline-start inset-size, opacity, outline-color, transform var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;box-shadow:inset 0 0 0 1px var(--calcite-color-border-input)}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 2px var(--calcite-color-brand)}:host([focused]) .radio{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-color-brand));outline-offset:calc(\n 2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-offset-invert-focus),\n 1\n )\n )\n )}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 1px var(--calcite-color-border-input)}:host([scale\x3ds]){--calcite-radio-size:var(--calcite-font-size--2)}:host([scale\x3dm]){--calcite-radio-size:var(--calcite-font-size--1)}:host([scale\x3dl]){--calcite-radio-size:var(--calcite-font-size-0)}.radio{block-size:var(--calcite-radio-size);max-inline-size:var(--calcite-radio-size);min-inline-size:var(--calcite-radio-size)}:host([scale\x3ds][checked]) .radio,:host([hovered][scale\x3ds][checked][disabled]) .radio{box-shadow:inset 0 0 0 4px var(--calcite-color-brand)}:host([scale\x3ds][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 4px var(--calcite-color-brand), 0 0 0 2px var(--calcite-color-foreground-1)}:host([scale\x3dm][checked]) .radio,:host([hovered][scale\x3dm][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-color-brand)}:host([scale\x3dm][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-color-brand), 0 0 0 2px var(--calcite-color-foreground-1)}:host([scale\x3dl][checked]) .radio,:host([hovered][scale\x3dl][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-color-brand)}:host([scale\x3dl][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-color-brand), 0 0 0 2px var(--calcite-color-foreground-1)}@media (forced-colors: active){:host([checked]) .radio::after,:host([checked][disabled]) .radio::after{content:"";inline-size:var(--calcite-radio-size);block-size:var(--calcite-radio-size);background-color:windowText;display:block}}::slotted(input[slot\x3dhidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}:host([hidden]){display:none}[hidden]{display:none}'}},
[1,"calcite-radio-button",{checked:[1540],disabled:[516],focused:[1540],form:[513],guid:[1537],hovered:[1540],label:[1],name:[513],required:[516],scale:[513],value:[1032],setFocus:[64],emitCheckedChange:[64]},[[1,"pointerenter","pointerEnterHandler"],[1,"pointerleave","pointerLeaveHandler"]],{hidden:["handleHiddenChange"],checked:["checkedChanged"],disabled:["disabledChanged"],name:["nameChanged"]}]);r();f.CalciteRadioButton=t;f.defineCustomElement=r;Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});