@esri/solutions-components 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/dist/assets/t9n/public-notification/resources.json +0 -2
  2. package/dist/assets/t9n/public-notification/resources_en.json +0 -2
  3. package/dist/cjs/calcite-input-message_5.cjs.entry.js +1342 -18
  4. package/dist/cjs/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-da276a1c.js → downloadUtils-27dbd8b9.js} +205 -1383
  5. package/dist/cjs/{index.es-176629d8.js → index.es-40d341ed.js} +3 -13
  6. package/dist/cjs/layer-table.cjs.entry.js +5 -15
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/public-notification.cjs.entry.js +2 -2
  9. package/dist/cjs/solutions-components.cjs.js +1 -1
  10. package/dist/collection/components/layer-table/layer-table.js +4 -16
  11. package/dist/collection/components/map-search/map-search.js +1 -1
  12. package/dist/collection/components/map-select-tools/map-select-tools.js +42 -38
  13. package/dist/collection/components/pdf-download/pdf-download.js +9 -76
  14. package/dist/collection/components/public-notification/public-notification.js +3 -3
  15. package/dist/collection/components/refine-selection/refine-selection.js +1 -1
  16. package/dist/collection/utils/csvUtils.js +4 -0
  17. package/dist/collection/utils/csvUtils.ts +7 -0
  18. package/dist/collection/utils/downloadUtils.js +181 -0
  19. package/dist/collection/utils/downloadUtils.ts +235 -0
  20. package/dist/collection/utils/interfaces.ts +3 -2
  21. package/dist/collection/utils/pdfUtils.js +7 -0
  22. package/dist/collection/utils/pdfUtils.ts +13 -2
  23. package/dist/components/downloadUtils.js +2279 -0
  24. package/dist/components/index.es.js +1 -1
  25. package/dist/components/layer-table.js +5 -16
  26. package/dist/components/map-layer-picker2.js +1 -1
  27. package/dist/components/map-search.js +1 -1
  28. package/dist/components/map-select-tools2.js +44 -40
  29. package/dist/components/pdf-download2.js +10 -2124
  30. package/dist/components/public-notification.js +3 -3
  31. package/dist/components/queryUtils.js +1 -1
  32. package/dist/components/refine-selection-tools2.js +1 -1
  33. package/dist/components/refine-selection2.js +1 -1
  34. package/dist/esm/buffer-tools_6.entry.js +1 -1
  35. package/dist/esm/calcite-combobox_3.entry.js +1 -1
  36. package/dist/esm/calcite-input-message_5.entry.js +1341 -13
  37. package/dist/esm/{calcite-input-message.calcite-notice.map-select-tools.pdf-download.refine-selection-c6f63458.js → downloadUtils-76e38a94.js} +206 -1381
  38. package/dist/esm/{index.es-54a6f3a3.js → index.es-489f4f08.js} +2 -12
  39. package/dist/esm/layer-table.entry.js +6 -16
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/{mapViewUtils-63e118f8.js → mapViewUtils-02696ab6.js} +1 -1
  42. package/dist/esm/public-notification.entry.js +3 -3
  43. package/dist/esm/solutions-components.js +1 -1
  44. package/dist/solutions-components/{p-cc2e20c8.js → p-1bfd07e3.js} +1 -1
  45. package/dist/solutions-components/{p-117174e8.entry.js → p-335fce8c.entry.js} +1 -1
  46. package/dist/solutions-components/p-4ef94c6b.entry.js +6 -0
  47. package/dist/solutions-components/p-5d27b47d.entry.js +17 -0
  48. package/dist/solutions-components/p-92cb569a.entry.js +6 -0
  49. package/dist/solutions-components/{p-8a0c0935.entry.js → p-a3b60bc9.entry.js} +1 -1
  50. package/dist/solutions-components/{p-1e459361.js → p-bff8aa4e.js} +3 -3
  51. package/dist/solutions-components/p-caa7e7a7.js +437 -0
  52. package/dist/solutions-components/solutions-components.esm.js +1 -1
  53. package/dist/solutions-components/utils/csvUtils.ts +7 -0
  54. package/dist/solutions-components/utils/downloadUtils.ts +235 -0
  55. package/dist/solutions-components/utils/interfaces.ts +3 -2
  56. package/dist/solutions-components/utils/pdfUtils.ts +13 -2
  57. package/dist/types/components/map-select-tools/map-select-tools.d.ts +11 -5
  58. package/dist/types/components/pdf-download/pdf-download.d.ts +0 -18
  59. package/dist/types/utils/downloadUtils.d.ts +40 -0
  60. package/dist/types/utils/interfaces.d.ts +2 -3
  61. package/dist/types/utils/pdfUtils.d.ts +3 -1
  62. package/package.json +1 -1
  63. package/dist/cjs/csvUtils-3a56c6d8.js +0 -54
  64. package/dist/components/csvUtils.js +0 -52
  65. package/dist/esm/csvUtils-23b5418f.js +0 -52
  66. package/dist/solutions-components/p-3069e3b7.js +0 -21
  67. package/dist/solutions-components/p-6d28f991.entry.js +0 -6
  68. package/dist/solutions-components/p-80f5e33c.js +0 -416
  69. package/dist/solutions-components/p-8927862a.entry.js +0 -6
  70. package/dist/solutions-components/p-e69c58e5.entry.js +0 -6
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Copyright 2022 Esri
3
+ * Licensed under the Apache License, Version 2.0
4
+ * http://www.apache.org/licenses/LICENSE-2.0
5
+ */
6
+ import{r as t,h as e,H as i,g as a}from"./p-c2f00d41.js";import{g as l}from"./p-9260d75a.js";import{g as s,a as r,q as o}from"./p-1bfd07e3.js";import{d as c}from"./p-caa7e7a7.js";import"./p-e1a4994d.js";import"./p-dbc9a5a8.js";import"./p-eea93a37.js";const n=class{constructor(e){t(this,e),this._graphics=[],this._fieldNames=[],this.mapView=void 0,this._translations=void 0,this._selectedIndexes=[]}async componentWillLoad(){await this._getTranslations()}render(){return e(i,null,this._getTableControlRow(),e("div",{class:"data-container"},e("div",{class:"table-container"},e("div",{class:"table"},this._getTableHeader(),this._getTableRows()))),e("edit-record-modal",{ref:t=>this._editMultipleMpdal=t}))}_getTableControlRow(){const t=this._selectedIndexes.length>0,i=this._selectedIndexes.length>1;return e("div",{class:"display-flex table-border"},e("map-layer-picker",{mapView:this.mapView,onLayerSelectionChange:t=>this._layerSelectionChanged(t)}),e("div",null,e("calcite-button",{appearance:"transparent",color:"neutral",disabled:!t,iconStart:"magnifying-glass",onClick:()=>this._zoom()},this._translations.zoom),e("calcite-button",{appearance:"transparent",color:"neutral",disabled:!i,iconStart:"pencil",onClick:()=>this._editMultiple()},this._translations.editMultiple),e("calcite-button",{appearance:"transparent",color:"neutral",disabled:!t,iconStart:"trash",onClick:()=>this._delete()},this._translations.delete),e("calcite-split-button",{appearance:"transparent",color:"neutral","primary-text":this._translations.more},e("calcite-dropdown-group",{"selection-mode":"none"},e("calcite-dropdown-item",{iconStart:"list-check-all",onClick:()=>this._selectAll(!0)},this._translations.selectAll),e("calcite-dropdown-item",{iconStart:"selected-items-filter",onClick:()=>this._showSelected()},this._translations.showSelected),e("calcite-dropdown-item",{iconStart:"erase",onClick:()=>this._clearSelection()},this._translations.clearSelection),e("calcite-dropdown-item",{iconStart:"refresh",onClick:()=>this._switchSelected()},this._translations.switchSelected),e("calcite-dropdown-item",{iconStart:"export",onClick:()=>this._exportToCSV()},this._translations.exportCSV)))))}_getTableHeader(){return e("div",{class:"header"},e("div",{class:"table-header-cell padding-3-4"},e("calcite-checkbox",{class:"display-flex justify-center",onClick:()=>this._selectAll(this._selectAllElement.checked),ref:t=>this._selectAllElement=t})),this._fieldNames.map((t=>this._getTableHeaderCell(t))))}_getTableHeaderCell(t){return e("div",{class:"table-header-cell field-width"},t)}_getTableRows(){return e("div",{class:"table-body"},this._graphics.map(((t,e)=>this._getTableRow(t,e))))}_getTableRow(t,i){const a=this._selectedIndexes.indexOf(i)>-1;return e("div",{class:"row"},e("div",{class:"table-cell table-border padding-3-4"},e("calcite-checkbox",{checked:a,class:"display-flex justify-center",onClick:()=>this._rowSelected(i),value:i})),this._fieldNames.map((e=>{const i=this._layerView.layer.fieldsIndex.get(e);return this._getTableRowCell(t.attributes[e],i,a)})))}_getTableRowCell(t,i,a){const l=i.editable&&a,s=this._getInputType(i.type);let r;const o=i.domain;return o&&(r="coded-value"===o.type?e("calcite-select",{label:""},o.codedValues.map((i=>e("calcite-option",{label:i.name,selected:t===i.code.toString(),value:i.code})))):e("calcite-input",{max:o.maxValue,min:o.minValue,type:"number",value:t})),e("div",{class:"table-cell table-border field-width"},l&&r?r:l?e("calcite-input",{type:s,value:t}):t)}_getInputType(t){const e={string:"text","small-integer":"number",integer:"number",single:"number",double:"number",long:"number",date:"datetime-local",oid:"number",guid:"text","global-id":"text"};return Object.keys(e).indexOf(t)>-1?e[t]:"text"}_selectAll(t){this._selectedIndexes=t?this._graphics.map(((t,e)=>e)):[]}_showSelected(){console.log("_showSelected")}_clearSelection(){this._selectedIndexes=[]}_switchSelected(){const t=[...this._selectedIndexes];this._selectedIndexes=this._graphics.reduce(((e,i,a)=>(t.indexOf(a)<0&&e.push(a),e)),[])}async _exportToCSV(){return c(this._layerView.layer,this._getSelectedIds(),!1,!1,!0)}_zoom(){const t=this._getSelectedIds();s(t,this._layerView,this.mapView,!0)}_editMultiple(){this._editMultipleMpdal.open=!0}_delete(){console.log("delete")}_getGraphics(t){return this._graphics.filter(((e,i)=>t.indexOf(i)>-1))}_getSelectedIds(){return this._getGraphics(this._selectedIndexes).map((t=>t.getObjectId()))}_rowSelected(t){const e=this._selectedIndexes.indexOf(t);e>-1?(this._selectedIndexes.splice(e,1),this._selectedIndexes=[...this._selectedIndexes]):this._selectedIndexes=[...this._selectedIndexes,t]}async _layerSelectionChanged(t){const e=t.detail[0];this._layerView=await r(this.mapView,e),this._fieldNames=this._layerView.layer.fields.map((t=>t.alias||t.name)),this._graphics=await o(0,this._layerView.layer,[]),this._selectedIndexes=[]}async _getTranslations(){const t=await l(this.el);this._translations=t[0]}get el(){return a(this)}};n.style=":host{display:block}.table{display:table;width:100%}.header{display:table-header-group;background-color:#757575;font-weight:500;font-size:var(--calcite-font-size-0);color:var(--calcite-ui-text-inverse);position:sticky;top:0;z-index:1}.table-header-cell{display:table-cell;text-align:justify;border-right:1px solid var(--calcite-ui-border-2);padding:0.5rem}.table-body{display:table-row-group}.row{display:table-row}.table-cell{display:table-cell;padding:0.5rem}.display-table-header{display:table-header-group}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.justify-center{justify-content:center}.table-container{width:100%}.overflow-auto{overflow:auto}.data-container{overflow:auto;height:calc(100% - 35px)}.row:nth-child(odd){background:var(--calcite-ui-foreground-3)}.padding-3-4{padding:0.75rem}.field-width{white-space:nowrap;min-width:300px;max-width:300px;overflow:hidden}";export{n as layer_table}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the Apache License, Version 2.0
4
4
  * http://www.apache.org/licenses/LICENSE-2.0
5
5
  */
6
- import{r as i,c as t,h as e,H as a,g as s}from"./p-c2f00d41.js";import{l as n}from"./p-eea93a37.js";import{g as l}from"./p-9260d75a.js";import{b as r,g as h,t as o,i as c,h as d}from"./p-83166522.js";import{c as u,d as m}from"./p-bd67334c.js";import{a as b,c as p,d as g,H as f}from"./p-a33d73bb.js";import{u as v}from"./p-7daea1df.js";import{g as x}from"./p-a80b3880.js";import{d as k,c as y}from"./p-63f6e8f1.js";import{i as w}from"./p-73e23995.js";import{n as _,c as z,d as V}from"./p-9eba5c66.js";import{s as D}from"./p-4557d5a8.js";import{h as M,g as $,f as C}from"./p-dbc9a5a8.js";import{a as I,f as S,h as H}from"./p-cc2e20c8.js";import"./p-e1a4994d.js";import"./p-729708a3.js";import"./p-9a9955db.js";import"./p-00444009.js";const L=class{constructor(e){i(this,e),this.bufferComplete=t(this,"bufferComplete",7),this.distanceChanged=t(this,"distanceChanged",7),this.unitChanged=t(this,"unitChanged",7),this.appearance="text",this.distance=0,this.geometries=[],this.max=void 0,this.min=0,this.sliderTicks=10,this.unionResults=!0,this.unit="meters",this._translations=void 0}geometriesWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&this._buffer()}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return e(a,null,"text"===this.appearance?this._getTextBoxDisplay():this._getSliderDisplay())}async _initModules(){const[i]=await n(["esri/geometry/geometryEngine"]);this._geometryEngine=i}_getUnits(){const i={feet:this._translations.feet,meters:this._translations.meters,miles:this._translations.miles,kilometers:this._translations.kilometers};return Object.keys(i).map((t=>e("calcite-option",{label:i[t],selected:this.unit===t,value:t})))}_setDistance(i){const t=parseInt(i.detail.value,10);this.distance!==t&&t>=this.min&&(this.distanceChanged.emit({oldValue:this.distance,newValue:i.detail.value}),this.distance=t,this.distance>0?this._buffer():this.bufferComplete.emit(void 0))}_setUnit(i){this.unitChanged.emit({oldValue:this.unit,newValue:i}),this.unit=i,this._buffer()}_buffer(){this._bufferTimeout&&clearTimeout(this._bufferTimeout),this._bufferTimeout=setTimeout((()=>{var i;if((null===(i=this.geometries)||void 0===i?void 0:i.length)>0&&this.unit&&this.distance>0){const i=this._geometryEngine.geodesicBuffer(this.geometries,this.distance,this.unit,this.unionResults);this.bufferComplete.emit(i)}}),400)}_getTextBoxDisplay(){return e("div",{class:"c-container"},e("calcite-input",{class:"padding-end-1",max:this.max&&this.max>0?this.max:void 0,min:this.min,"number-button-type":"vertical",onCalciteInputInput:i=>this._setDistance(i),placeholder:"0",type:"number",value:this.distance?this.distance.toString():void 0}),e("calcite-select",{class:"flex-1",label:"label",onCalciteSelectChange:()=>this._setUnit(this._unitElement.value),ref:i=>{this._unitElement=i}},this._getUnits()))}_getSliderDisplay(){return e("div",null,e("calcite-slider",{labelHandles:!0,max:this.max&&this.max>0?this.max:void 0,min:this.min,ticks:this.sliderTicks}))}async _getTranslations(){const i=await l(this.el);this._translations=i[0]}_testAccess(i,t){switch(i){case"_setUnit":return this._setUnit(t);case"_setDistance":return this._setDistance(t)}return null}get el(){return s(this)}static get watchers(){return{geometries:["geometriesWatchHandler"]}}};L.style=':host{display:block}.c-container{display:inline-flex}.flex-1{flex:"1"}.padding-end-1{-webkit-padding-end:1rem;padding-inline-end:1rem}';const A=class{constructor(e){i(this,e),this.calciteRadioGroupChange=t(this,"calciteRadioGroupChange",6),this.appearance="solid",this.disabled=!1,this.required=!1,this.layout="horizontal",this.scale="m",this.value=null,this.width="auto",this.handleClick=i=>{"calcite-radio-group-item"===i.target.localName&&this.selectItem(i.target,!0)}}valueHandler(i){this.getItems().forEach((t=>t.checked=t.value===i))}handleSelectedItemChange(i,t){if(this.value=null==i?void 0:i.value,i===t)return;const e=this.getItems(),a=Array.from(e).filter((t=>t===i)).pop();a?this.selectItem(a):e[0]&&(e[0].tabIndex=0)}componentWillLoad(){const i=this.getItems(),t=Array.from(i).filter((i=>i.checked)).pop();t?this.selectItem(t):i[0]&&(i[0].tabIndex=0)}componentDidLoad(){b(this,this.value)}connectedCallback(){u(this),p(this)}disconnectedCallback(){m(this),g(this)}componentDidRender(){v(this)}render(){return e(a,{onClick:this.handleClick,role:"radiogroup"},e("slot",null),e(f,{component:this}))}handleSelected(i){i.preventDefault(),this.selectItem(i.target),i.stopPropagation()}handleKeyDown(i){const{key:t}=i,{el:e,selectedItem:a}=this;if(-1===["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "].indexOf(t))return;let s=t;"rtl"===r(e)&&("ArrowRight"===t&&(s="ArrowLeft"),"ArrowLeft"===t&&(s="ArrowRight"));const n=this.getItems();let l=-1;switch(n.forEach(((i,t)=>{i===a&&(l=t)})),s){case"ArrowLeft":case"ArrowUp":i.preventDefault();const t=n.item(l<1?n.length-1:l-1);return void this.selectItem(t,!0);case"ArrowRight":case"ArrowDown":i.preventDefault();const e=-1===l?n.item(1):n.item(l+1)||n.item(0);return void this.selectItem(e,!0);case" ":return i.preventDefault(),void this.selectItem(i.target,!0);default:return}}async setFocus(){var i;null===(i=this.selectedItem||this.getItems()[0])||void 0===i||i.focus()}onLabelClick(){this.setFocus()}getItems(){return this.el.querySelectorAll("calcite-radio-group-item")}selectItem(i,t=!1){if(i===this.selectedItem)return;const e=this.getItems();let a=null;e.forEach((e=>{const s=e.value===i.value;(s&&!e.checked||!s&&e.checked)&&(e.checked=s),e.tabIndex=s?0:-1,s&&(a=e,t&&this.calciteRadioGroupChange.emit(a.value))})),this.selectedItem=a,a&&a.focus()}get el(){return s(this)}static get watchers(){return{value:["valueHandler"],selectedItem:["handleSelectedItemChange"]}}};A.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;background-color:var(--calcite-ui-foreground-1);inline-size:-moz-fit-content;inline-size:fit-content;outline:1px solid var(--calcite-ui-border-input);outline-offset:-1px}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([layout=vertical]){flex-direction:column;align-items:flex-start;align-self:flex-start}:host([width=full]){inline-size:100%;min-inline-size:-moz-fit-content;min-inline-size:fit-content}:host([width=full]) ::slotted(calcite-radio-group-item){flex:1 1 auto}:host([width=full][layout=vertical]) ::slotted(calcite-radio-group-item){justify-content:flex-start}::slotted(input[slot=hidden-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}";
6
+ import{r as i,c as t,h as e,H as a,g as s}from"./p-c2f00d41.js";import{l as n}from"./p-eea93a37.js";import{g as l}from"./p-9260d75a.js";import{b as r,g as h,t as o,i as c,h as d}from"./p-83166522.js";import{c as u,d as m}from"./p-bd67334c.js";import{a as b,c as p,d as g,H as f}from"./p-a33d73bb.js";import{u as v}from"./p-7daea1df.js";import{g as x}from"./p-a80b3880.js";import{d as k,c as y}from"./p-63f6e8f1.js";import{i as w}from"./p-73e23995.js";import{n as _,c as z,d as V}from"./p-9eba5c66.js";import{s as D}from"./p-4557d5a8.js";import{h as M,g as $,f as C}from"./p-dbc9a5a8.js";import{a as I,f as S,h as H}from"./p-1bfd07e3.js";import"./p-e1a4994d.js";import"./p-729708a3.js";import"./p-9a9955db.js";import"./p-00444009.js";const L=class{constructor(e){i(this,e),this.bufferComplete=t(this,"bufferComplete",7),this.distanceChanged=t(this,"distanceChanged",7),this.unitChanged=t(this,"unitChanged",7),this.appearance="text",this.distance=0,this.geometries=[],this.max=void 0,this.min=0,this.sliderTicks=10,this.unionResults=!0,this.unit="meters",this._translations=void 0}geometriesWatchHandler(i,t){i&&JSON.stringify(i)!==JSON.stringify(t)&&this._buffer()}async componentWillLoad(){await this._getTranslations(),await this._initModules()}render(){return e(a,null,"text"===this.appearance?this._getTextBoxDisplay():this._getSliderDisplay())}async _initModules(){const[i]=await n(["esri/geometry/geometryEngine"]);this._geometryEngine=i}_getUnits(){const i={feet:this._translations.feet,meters:this._translations.meters,miles:this._translations.miles,kilometers:this._translations.kilometers};return Object.keys(i).map((t=>e("calcite-option",{label:i[t],selected:this.unit===t,value:t})))}_setDistance(i){const t=parseInt(i.detail.value,10);this.distance!==t&&t>=this.min&&(this.distanceChanged.emit({oldValue:this.distance,newValue:i.detail.value}),this.distance=t,this.distance>0?this._buffer():this.bufferComplete.emit(void 0))}_setUnit(i){this.unitChanged.emit({oldValue:this.unit,newValue:i}),this.unit=i,this._buffer()}_buffer(){this._bufferTimeout&&clearTimeout(this._bufferTimeout),this._bufferTimeout=setTimeout((()=>{var i;if((null===(i=this.geometries)||void 0===i?void 0:i.length)>0&&this.unit&&this.distance>0){const i=this._geometryEngine.geodesicBuffer(this.geometries,this.distance,this.unit,this.unionResults);this.bufferComplete.emit(i)}}),400)}_getTextBoxDisplay(){return e("div",{class:"c-container"},e("calcite-input",{class:"padding-end-1",max:this.max&&this.max>0?this.max:void 0,min:this.min,"number-button-type":"vertical",onCalciteInputInput:i=>this._setDistance(i),placeholder:"0",type:"number",value:this.distance?this.distance.toString():void 0}),e("calcite-select",{class:"flex-1",label:"label",onCalciteSelectChange:()=>this._setUnit(this._unitElement.value),ref:i=>{this._unitElement=i}},this._getUnits()))}_getSliderDisplay(){return e("div",null,e("calcite-slider",{labelHandles:!0,max:this.max&&this.max>0?this.max:void 0,min:this.min,ticks:this.sliderTicks}))}async _getTranslations(){const i=await l(this.el);this._translations=i[0]}_testAccess(i,t){switch(i){case"_setUnit":return this._setUnit(t);case"_setDistance":return this._setDistance(t)}return null}get el(){return s(this)}static get watchers(){return{geometries:["geometriesWatchHandler"]}}};L.style=':host{display:block}.c-container{display:inline-flex}.flex-1{flex:"1"}.padding-end-1{-webkit-padding-end:1rem;padding-inline-end:1rem}';const A=class{constructor(e){i(this,e),this.calciteRadioGroupChange=t(this,"calciteRadioGroupChange",6),this.appearance="solid",this.disabled=!1,this.required=!1,this.layout="horizontal",this.scale="m",this.value=null,this.width="auto",this.handleClick=i=>{"calcite-radio-group-item"===i.target.localName&&this.selectItem(i.target,!0)}}valueHandler(i){this.getItems().forEach((t=>t.checked=t.value===i))}handleSelectedItemChange(i,t){if(this.value=null==i?void 0:i.value,i===t)return;const e=this.getItems(),a=Array.from(e).filter((t=>t===i)).pop();a?this.selectItem(a):e[0]&&(e[0].tabIndex=0)}componentWillLoad(){const i=this.getItems(),t=Array.from(i).filter((i=>i.checked)).pop();t?this.selectItem(t):i[0]&&(i[0].tabIndex=0)}componentDidLoad(){b(this,this.value)}connectedCallback(){u(this),p(this)}disconnectedCallback(){m(this),g(this)}componentDidRender(){v(this)}render(){return e(a,{onClick:this.handleClick,role:"radiogroup"},e("slot",null),e(f,{component:this}))}handleSelected(i){i.preventDefault(),this.selectItem(i.target),i.stopPropagation()}handleKeyDown(i){const{key:t}=i,{el:e,selectedItem:a}=this;if(-1===["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "].indexOf(t))return;let s=t;"rtl"===r(e)&&("ArrowRight"===t&&(s="ArrowLeft"),"ArrowLeft"===t&&(s="ArrowRight"));const n=this.getItems();let l=-1;switch(n.forEach(((i,t)=>{i===a&&(l=t)})),s){case"ArrowLeft":case"ArrowUp":i.preventDefault();const t=n.item(l<1?n.length-1:l-1);return void this.selectItem(t,!0);case"ArrowRight":case"ArrowDown":i.preventDefault();const e=-1===l?n.item(1):n.item(l+1)||n.item(0);return void this.selectItem(e,!0);case" ":return i.preventDefault(),void this.selectItem(i.target,!0);default:return}}async setFocus(){var i;null===(i=this.selectedItem||this.getItems()[0])||void 0===i||i.focus()}onLabelClick(){this.setFocus()}getItems(){return this.el.querySelectorAll("calcite-radio-group-item")}selectItem(i,t=!1){if(i===this.selectedItem)return;const e=this.getItems();let a=null;e.forEach((e=>{const s=e.value===i.value;(s&&!e.checked||!s&&e.checked)&&(e.checked=s),e.tabIndex=s?0:-1,s&&(a=e,t&&this.calciteRadioGroupChange.emit(a.value))})),this.selectedItem=a,a&&a.focus()}get el(){return s(this)}static get watchers(){return{value:["valueHandler"],selectedItem:["handleSelectedItemChange"]}}};A.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;background-color:var(--calcite-ui-foreground-1);inline-size:-moz-fit-content;inline-size:fit-content;outline:1px solid var(--calcite-ui-border-input);outline-offset:-1px}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([layout=vertical]){flex-direction:column;align-items:flex-start;align-self:flex-start}:host([width=full]){inline-size:100%;min-inline-size:-moz-fit-content;min-inline-size:fit-content}:host([width=full]) ::slotted(calcite-radio-group-item){flex:1 1 auto}:host([width=full][layout=vertical]) ::slotted(calcite-radio-group-item){justify-content:flex-start}::slotted(input[slot=hidden-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}";
7
7
  /*!
8
8
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
9
9
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.