@esri/solutions-components 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/public-notification/resources.json +4 -1
- package/dist/assets/t9n/public-notification/resources_en.json +4 -1
- package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -7
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +38 -25
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +272 -21
- package/dist/cjs/{csvUtils-18a03353.js → csvUtils-83af7ae1.js} +5 -5
- package/dist/cjs/layer-table.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-search.cjs.entry.js +46 -7
- package/dist/cjs/{mapViewUtils-8ea9adc5.js → mapViewUtils-55ac76cb.js} +40 -25
- package/dist/cjs/public-notification.cjs.entry.js +101 -18
- package/dist/cjs/{publicNotificationStore-aca88430.js → publicNotificationStore-28a8759d.js} +3 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -5
- package/dist/collection/components/buffer-tools/buffer-tools.js +7 -6
- package/dist/collection/components/layer-table/layer-table.js +1 -1
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +47 -29
- package/dist/collection/components/map-search/map-search.js +66 -7
- package/dist/collection/components/map-select-tools/map-select-tools.js +125 -8
- package/dist/collection/components/pdf-download/pdf-download.js +32 -8
- package/dist/collection/components/public-notification/public-notification.css +46 -41
- package/dist/collection/components/public-notification/public-notification.js +267 -19
- package/dist/collection/components/refine-selection/refine-selection.js +18 -1
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +22 -5
- package/dist/{solutions-components/demos/config-pdf-download.html → collection/demos/buffer-tools.html} +13 -21
- package/dist/collection/demos/index.html +0 -24
- package/dist/collection/demos/map-draw-tools.html +17 -17
- package/dist/collection/demos/map-layer-picker.html +2 -0
- package/dist/collection/demos/map-search.html +16 -15
- package/dist/collection/demos/map-select-tools.html +16 -24
- package/dist/collection/demos/new-public-notification.html +46 -35
- package/dist/collection/demos/pdf-download.html +8 -1
- package/dist/collection/utils/csvUtils.js +4 -4
- package/dist/collection/utils/csvUtils.ts +6 -4
- package/dist/collection/utils/interfaces.ts +65 -1
- package/dist/collection/utils/mapViewUtils.js +36 -22
- package/dist/collection/utils/mapViewUtils.ts +50 -27
- package/dist/collection/utils/publicNotificationStore.js +3 -1
- package/dist/collection/utils/publicNotificationStore.ts +3 -1
- package/dist/collection/utils/queryUtils.js +2 -2
- package/dist/collection/utils/queryUtils.ts +2 -2
- package/dist/components/buffer-tools2.js +1 -1
- package/dist/components/csvUtils.js +4 -4
- package/dist/components/index.d.ts +0 -5
- package/dist/components/index.js +0 -5
- package/dist/components/layer-table.js +2 -3
- package/dist/components/map-layer-picker2.js +177 -28
- package/dist/components/map-search.js +47 -7
- package/dist/components/map-select-tools2.js +56 -11
- package/dist/components/pdf-download2.js +217 -8
- package/dist/components/public-notification.js +154 -55
- package/dist/components/publicNotificationStore.js +3 -1
- package/dist/components/queryUtils.js +3 -3
- package/dist/components/refine-selection-tools2.js +9 -8
- package/dist/components/refine-selection2.js +3 -1
- package/dist/esm/buffer-tools_6.entry.js +8 -7
- package/dist/esm/calcite-combobox_3.entry.js +38 -25
- package/dist/esm/calcite-input-message_5.entry.js +271 -20
- package/dist/esm/{csvUtils-edc0c2a8.js → csvUtils-eb231cfb.js} +5 -5
- package/dist/esm/layer-table.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-search.entry.js +46 -7
- package/dist/esm/{mapViewUtils-31d2c2bb.js → mapViewUtils-e5d8a1e1.js} +39 -25
- package/dist/esm/public-notification.entry.js +101 -18
- package/dist/esm/{publicNotificationStore-3e762eea.js → publicNotificationStore-8e9cb73b.js} +3 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/{collection/demos/config-pdf-download.html → solutions-components/demos/buffer-tools.html} +13 -21
- package/dist/solutions-components/demos/index.html +0 -24
- package/dist/solutions-components/demos/map-draw-tools.html +17 -17
- package/dist/solutions-components/demos/map-layer-picker.html +2 -0
- package/dist/solutions-components/demos/map-search.html +16 -15
- package/dist/solutions-components/demos/map-select-tools.html +16 -24
- package/dist/solutions-components/demos/new-public-notification.html +46 -35
- package/dist/solutions-components/demos/pdf-download.html +8 -1
- package/dist/solutions-components/p-07593958.entry.js +6 -0
- package/dist/solutions-components/p-3fa9b3c8.js +36 -0
- package/dist/solutions-components/p-9b5a9117.entry.js +12 -0
- package/dist/solutions-components/{p-15cd8a97.js → p-9c1ebc90.js} +1 -1
- package/dist/solutions-components/{p-c76f8ff7.entry.js → p-a516c658.entry.js} +1 -1
- package/dist/solutions-components/{p-ad42039f.js → p-b668daf8.js} +2 -2
- package/dist/solutions-components/p-bfa95147.entry.js +17 -0
- package/dist/solutions-components/p-d09a168c.entry.js +6 -0
- package/dist/solutions-components/{p-fa6046a8.entry.js → p-fc9609e6.entry.js} +2 -2
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/csvUtils.ts +6 -4
- package/dist/solutions-components/utils/interfaces.ts +65 -1
- package/dist/solutions-components/utils/mapViewUtils.ts +50 -27
- package/dist/solutions-components/utils/publicNotificationStore.ts +3 -1
- package/dist/solutions-components/utils/queryUtils.ts +2 -2
- package/dist/types/components/buffer-tools/buffer-tools.d.ts +4 -3
- package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +22 -11
- package/dist/types/components/map-search/map-search.d.ts +18 -1
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +31 -1
- package/dist/types/components/pdf-download/pdf-download.d.ts +7 -2
- package/dist/types/components/public-notification/public-notification.d.ts +98 -4
- package/dist/types/components/refine-selection/refine-selection.d.ts +5 -0
- package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +6 -1
- package/dist/types/components.d.ts +154 -180
- package/dist/types/preact.d.ts +0 -10
- package/dist/types/utils/csvUtils.d.ts +1 -1
- package/dist/types/utils/interfaces.d.ts +56 -1
- package/dist/types/utils/mapViewUtils.d.ts +19 -9
- package/dist/types/utils/publicNotificationStore.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/check-list.cjs.entry.js +0 -103
- package/dist/cjs/config-buffer-tools.cjs.entry.js +0 -125
- package/dist/cjs/config-draw-tools.cjs.entry.js +0 -85
- package/dist/cjs/config-layer-picker.cjs.entry.js +0 -113
- package/dist/cjs/config-pdf-download.cjs.entry.js +0 -117
- package/dist/cjs/labelFormats-3236d2e0.js +0 -212
- package/dist/collection/components/check-list/check-list.css +0 -3
- package/dist/collection/components/check-list/check-list.js +0 -179
- package/dist/collection/components/config-buffer-tools/config-buffer-tools.css +0 -34
- package/dist/collection/components/config-buffer-tools/config-buffer-tools.js +0 -209
- package/dist/collection/components/config-draw-tools/config-draw-tools.css +0 -17
- package/dist/collection/components/config-draw-tools/config-draw-tools.js +0 -150
- package/dist/collection/components/config-layer-picker/config-layer-picker.css +0 -17
- package/dist/collection/components/config-layer-picker/config-layer-picker.js +0 -218
- package/dist/collection/components/config-pdf-download/config-pdf-download.css +0 -17
- package/dist/collection/components/config-pdf-download/config-pdf-download.js +0 -183
- package/dist/collection/demos/check-list.html +0 -65
- package/dist/collection/demos/config-buffer-tools.html +0 -92
- package/dist/collection/demos/config-draw-tools.html +0 -58
- package/dist/collection/demos/config-layer-picker.html +0 -97
- package/dist/components/check-list.d.ts +0 -11
- package/dist/components/check-list.js +0 -11
- package/dist/components/check-list2.js +0 -131
- package/dist/components/config-buffer-tools.d.ts +0 -11
- package/dist/components/config-buffer-tools.js +0 -187
- package/dist/components/config-draw-tools.d.ts +0 -11
- package/dist/components/config-draw-tools.js +0 -121
- package/dist/components/config-layer-picker.d.ts +0 -11
- package/dist/components/config-layer-picker.js +0 -163
- package/dist/components/config-pdf-download.d.ts +0 -11
- package/dist/components/config-pdf-download.js +0 -154
- package/dist/components/labelFormats.js +0 -210
- package/dist/components/mapViewUtils.js +0 -129
- package/dist/esm/check-list.entry.js +0 -99
- package/dist/esm/config-buffer-tools.entry.js +0 -121
- package/dist/esm/config-draw-tools.entry.js +0 -81
- package/dist/esm/config-layer-picker.entry.js +0 -109
- package/dist/esm/config-pdf-download.entry.js +0 -113
- package/dist/esm/labelFormats-b37958c3.js +0 -210
- package/dist/solutions-components/demos/check-list.html +0 -65
- package/dist/solutions-components/demos/config-buffer-tools.html +0 -92
- package/dist/solutions-components/demos/config-draw-tools.html +0 -58
- package/dist/solutions-components/demos/config-layer-picker.html +0 -97
- package/dist/solutions-components/p-16a0e65a.entry.js +0 -6
- package/dist/solutions-components/p-35078393.entry.js +0 -17
- package/dist/solutions-components/p-3d72bba6.entry.js +0 -6
- package/dist/solutions-components/p-3e444242.entry.js +0 -6
- package/dist/solutions-components/p-67afea92.entry.js +0 -12
- package/dist/solutions-components/p-7dcab29d.js +0 -36
- package/dist/solutions-components/p-89f7b02a.entry.js +0 -6
- package/dist/solutions-components/p-906b7b96.entry.js +0 -6
- package/dist/solutions-components/p-99c98510.entry.js +0 -6
- package/dist/solutions-components/p-b1a3605f.entry.js +0 -6
- package/dist/solutions-components/p-e99b1247.js +0 -6
- package/dist/types/components/check-list/check-list.d.ts +0 -57
- package/dist/types/components/config-buffer-tools/config-buffer-tools.d.ts +0 -92
- package/dist/types/components/config-draw-tools/config-draw-tools.d.ts +0 -58
- package/dist/types/components/config-layer-picker/config-layer-picker.d.ts +0 -83
- package/dist/types/components/config-pdf-download/config-pdf-download.d.ts +0 -81
@@ -1,12 +0,0 @@
|
|
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 i,c as t,h as e,H as s,g as a}from"./p-c023e6a1.js";import{f as n}from"./p-d48a24e6.js";import{d as o,f as c,c as l,u as r,r as h,a as d,F as m}from"./p-cdc46c0c.js";import{g as p}from"./p-a80b3880.js";import{T as u,C as b,b as g,c as f,h as v,d as x,e as y,g as w,a as k}from"./p-a5b1ab03.js";import{c as C,d as z,g as I}from"./p-bd67334c.js";import{s as $,c as H,a as _,d as D,H as j}from"./p-316f56db.js";import{c as L}from"./p-9a9955db.js";import{u as A}from"./p-7daea1df.js";import{i as E,t as P,g as S,a as F}from"./p-83166522.js";import{c as T,d as B}from"./p-2e9ed892.js";import{d as M}from"./p-4e32bf8c.js";import{c as O,d as R}from"./p-ea534300.js";import{g as W}from"./p-7dcab29d.js";import{s as U}from"./p-15cd8a97.js";import"./p-729708a3.js";import"./p-be41429f.js";import"./p-4307dacd.js";const V="combobox-item-",X="combobox-chip-",Y="combobox-label-",G="combobox-listbox-",K="combobox-input-",N=class{constructor(e){i(this,e),this.calciteLookupChange=t(this,"calciteLookupChange",6),this.calciteComboboxChange=t(this,"calciteComboboxChange",6),this.calciteComboboxFilterChange=t(this,"calciteComboboxFilterChange",6),this.calciteComboboxChipDismiss=t(this,"calciteComboboxChipDismiss",6),this.calciteComboboxBeforeClose=t(this,"calciteComboboxBeforeClose",6),this.calciteComboboxClose=t(this,"calciteComboboxClose",6),this.calciteComboboxBeforeOpen=t(this,"calciteComboboxBeforeOpen",6),this.calciteComboboxOpen=t(this,"calciteComboboxOpen",6),this.active=!1,this.open=!1,this.disabled=!1,this.maxItems=0,this.overlayPositioning="absolute",this.required=!1,this.selectionMode="multi",this.scale="m",this.value=null,this.intlRemoveTag=u.removeTag,this.placement=o,this.internalValueChangeFlag=!1,this.items=[],this.groupItems=[],this.selectedItems=[],this.visibleItems=[],this.activeItemIndex=-1,this.activeChipIndex=-1,this.activeDescendant="",this.text="",this.textInput=null,this.mutationObserver=L("mutation",(()=>this.updateItems())),this.resizeObserver=L("resize",(()=>this.setMaxScrollerHeight())),this.guid=p(),this.inputHeight=0,this.ignoreSelectedEventsFlag=!1,this.openTransitionProp="opacity",this.setFilteredPlacements=()=>{const{el:i,flipPlacements:t}=this;this.filteredFlipPlacements=t?c(t,i):null},this.getValue=()=>{const i=this.selectedItems.map((i=>{var t;return null===(t=null==i?void 0:i.value)||void 0===t?void 0:t.toString()}));return(null==i?void 0:i.length)?i.length>1?i:i[0]:""},this.onLabelClick=()=>{this.setFocus()},this.keydownHandler=i=>{const{key:t}=i;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):this.open&&(this.open=!1,i.preventDefault());break;case"ArrowLeft":this.previousChip(),i.preventDefault();break;case"ArrowRight":this.nextChip(),i.preventDefault();break;case"ArrowUp":i.preventDefault(),this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView();break;case"ArrowDown":i.preventDefault(),this.open||(this.open=!0),this.shiftActiveItemIndex(1),this.comboboxInViewport()||this.el.scrollIntoView();break;case" ":this.textInput.value||(i.preventDefault(),this.open=!0,this.shiftActiveItemIndex(1));break;case"Home":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(this.visibleItems.length-1),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":this.open=!1,i.preventDefault();break;case"Enter":this.activeItemIndex>-1?(this.toggleSelection(this.visibleItems[this.activeItemIndex]),i.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),i.preventDefault()):this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):i.defaultPrevented||$(this)&&i.preventDefault();break;case"Delete":case"Backspace":this.activeChipIndex>-1?(i.preventDefault(),this.removeActiveChip()):!this.text&&this.isMulti()&&(i.preventDefault(),this.removeLastChip())}},this.toggleCloseEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxClose",this.toggleCloseEnd)},this.toggleOpenEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxOpen",this.toggleOpenEnd)},this.setMaxScrollerHeight=async()=>{const{listContainerEl:i,open:t,referenceEl:e}=this;if(!i||!t)return;await this.reposition(!0);const s=this.getMaxScrollerHeight();i.style.maxHeight=s>0?`${s}px`:"",i.style.minWidth=`${e.clientWidth}px`,await this.reposition(!0)},this.calciteChipDismissHandler=(i,t)=>{this.open=!1;const e=this.items.find((i=>i===t));e&&this.toggleSelection(e,!1),this.calciteComboboxChipDismiss.emit(i.detail)},this.clickHandler=i=>{i.composedPath().some((i=>"CALCITE-CHIP"===i.tagName))||(this.open=!this.open,this.updateActiveItemIndex(0),this.setFocus())},this.setInactiveIfNotContained=i=>{const t=i.composedPath();!this.open||t.includes(this.el)||t.includes(this.referenceEl)||(this.allowCustomValues&&this.text.trim().length&&this.addCustomChip(this.text),"single"===this.selectionMode&&(this.textInput&&(this.textInput.value=""),this.text="",this.filterItems(""),this.updateActiveItemIndex(-1)),this.open=!1)},this.setFloatingEl=i=>{this.floatingEl=i,l(this,this.referenceEl,this.floatingEl)},this.setContainerEl=i=>{this.resizeObserver.observe(i),this.listContainerEl=i,this.transitionEl=i,T(this)},this.setReferenceEl=i=>{this.referenceEl=i,l(this,this.referenceEl,this.floatingEl)},this.inputHandler=i=>{const t=i.target.value;this.text=t,this.filterItems(t),t&&(this.activeChipIndex=-1)},this.filterItems=(()=>{const i=(i,t)=>i&&t.some((({label:t,value:e})=>i.tagName===y?e===i.label:e===i.textLabel||e===i.value||t===i.textLabel||t===i.value));return M((t=>{const e=n(this.data,t);this.getCombinedItems().forEach((t=>{const s=!i(t,e);t.hidden=s;const[a,n]=t.ancestors;(i(a,e)||i(n,e))&&(t.hidden=!1),s||t.ancestors.forEach((i=>i.hidden=!1))})),this.visibleItems=this.getVisibleItems(),this.calciteComboboxFilterChange.emit({visibleItems:[...this.visibleItems],text:t})}),100)})(),this.internalCalciteLookupChangeEvent=()=>{this.calciteLookupChange.emit(this.selectedItems)},this.emitCalciteLookupChange=M(this.internalCalciteLookupChangeEvent,0),this.internalComboboxChangeEvent=()=>{const{selectedItems:i}=this;this.calciteComboboxChange.emit({selectedItems:i})},this.emitComboboxChange=M(this.internalComboboxChangeEvent,0),this.updateItems=()=>{this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.selectedItems=this.getSelectedItems(),this.visibleItems=this.getVisibleItems(),this.needsIcon=this.getNeedsIcon(),this.allowCustomValues||this.setMaxScrollerHeight()},this.scrollToActiveItem=()=>{const i=this.visibleItems[this.activeItemIndex],t=this.calculateSingleItemHeight(i),{offsetHeight:e,scrollTop:s}=this.listContainerEl;e+s<i.offsetTop+t?this.listContainerEl.scrollTop=i.offsetTop-e+t:i.offsetTop<s&&(this.listContainerEl.scrollTop=i.offsetTop)},this.comboboxFocusHandler=()=>{var i;null===(i=this.textInput)||void 0===i||i.focus()},this.comboboxBlurHandler=i=>{this.setInactiveIfNotContained(i)}}activeHandler(i){if(this.disabled)return this.active=!1,void(this.open=!1);this.open=i}openHandler(i){if(i||r(this.floatingEl),this.disabled)return this.active=!1,void(this.open=!1);this.active=i,this.setMaxScrollerHeight()}handleDisabledChange(i){i||(this.active=!1,this.open=!1)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}valueHandler(i){if(!this.internalValueChangeFlag){const t=this.getItems();Array.isArray(i)?t.forEach((t=>t.selected=i.includes(t.value))):t.forEach(i?t=>t.selected=i===t.value:i=>i.selected=!1),this.updateItems()}}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}documentClickHandler(i){E(i)&&this.setInactiveIfNotContained(i)}calciteComboboxItemChangeHandler(i){if(this.ignoreSelectedEventsFlag)return;const t=i.target,e=this.visibleItems.indexOf(t);this.updateActiveItemIndex(e),this.toggleSelection(t,t.selected)}async reposition(i=!1){const{floatingEl:t,referenceEl:e,placement:s,overlayPositioning:a,filteredFlipPlacements:n}=this;return h(this,{floatingEl:t,referenceEl:e,overlayPositioning:a,placement:s,flipPlacements:n,type:"menu"},i)}async setFocus(){var i;null===(i=this.textInput)||void 0===i||i.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){var i;this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,null===(i=this.mutationObserver)||void 0===i||i.observe(this.el,{childList:!0,subtree:!0}),C(this),H(this),T(this),this.setFilteredPlacements(),this.reposition(!0),this.active&&this.activeHandler(this.active),this.open&&this.openHandler(this.open)}componentWillLoad(){this.updateItems()}componentDidLoad(){_(this,this.getValue()),this.reposition(!0)}componentDidRender(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),A(this)}disconnectedCallback(){var i,t;null===(i=this.mutationObserver)||void 0===i||i.disconnect(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),z(this),D(this),d(this,this.referenceEl,this.floatingEl),B(this)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}textHandler(){this.updateActiveItemIndex(-1)}comboboxInViewport(){const i=this.el.getBoundingClientRect();return i.top>=0&&i.left>=0&&i.right<=(window.innerWidth||document.documentElement.clientWidth)&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)}onBeforeOpen(){this.calciteComboboxBeforeOpen.emit()}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit()}getMaxScrollerHeight(){const i=this.getCombinedItems().filter((i=>!i.hidden)),{maxItems:t}=this;let e=0,s=0;return i.length>t&&i.forEach((i=>{if(e<t&&t>0){const t=this.calculateSingleItemHeight(i);t>0&&(s+=t,e++)}})),s}calculateSingleItemHeight(i){let t=i.offsetHeight;return Array.from(i.querySelectorAll(b)).map((i=>null==i?void 0:i.offsetHeight)).forEach((i=>{t-=i})),t}getCombinedItems(){return[...this.groupItems,...this.items]}toggleSelection(i,t=!i.selected){i&&(this.isMulti()?(i.selected=t,this.updateAncestors(i),this.selectedItems=this.getSelectedItems(),this.emitCalciteLookupChange(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach((e=>e.selected=e===i&&t)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput&&(this.textInput.value=i.textLabel),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(i){if("ancestors"!==this.selectionMode)return;const t=g(i),e=f(i);i.selected?t.forEach((i=>{i.selected=!0})):(e.forEach((i=>i.selected=!1)),[...t].forEach((i=>{v(i)||(i.selected=!1)})))}getVisibleItems(){return this.items.filter((i=>!i.hidden))}getSelectedItems(){if(!this.isMulti()){const i=this.items.find((({selected:i})=>i));return i?[i]:[]}return this.items.filter((i=>i.selected&&("ancestors"!==this.selectionMode||!v(i)))).sort(((i,t)=>{const e=this.selectedItems.indexOf(i),s=this.selectedItems.indexOf(t);return e>-1&&s>-1?e-s:s-e}))}getData(){return this.items.map((i=>({constant:i.constant,filterDisabled:i.filterDisabled,value:i.value,label:i.textLabel})))}getNeedsIcon(){return"single"===this.selectionMode&&this.items.some((i=>i.icon))}resetText(){this.textInput&&(this.textInput.value=""),this.text=""}getItems(){return Array.from(this.el.querySelectorAll(x)).filter((i=>!i.disabled))}getGroupItems(){return Array.from(this.el.querySelectorAll(y))}addCustomChip(i,t){const e=this.items.find((t=>t.textLabel===i));if(e)this.toggleSelection(e,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);const e=document.createElement(x);e.value=i,e.textLabel=i,e.selected=!0,this.el.appendChild(e),this.resetText(),t&&this.setFocus(),this.updateItems(),this.filterItems(""),this.emitCalciteLookupChange(),this.emitComboboxChange()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){if(this.text)return;const i=this.activeChipIndex;this.activeChipIndex=-1===i?this.selectedItems.length-1:Math.max(i-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){if(this.text||-1===this.activeChipIndex)return;const i=this.activeChipIndex+1;i>this.selectedItems.length-1?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=i,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){var i;const t=null===(i=this.selectedItems[this.activeChipIndex])||void 0===i?void 0:i.guid,e=t?this.referenceEl.querySelector(`#${X}${t}`):null;null==e||e.setFocus()}shiftActiveItemIndex(i){const{length:t}=this.visibleItems;this.updateActiveItemIndex((this.activeItemIndex+t+i)%t),this.scrollToActiveItem()}updateActiveItemIndex(i){var t;this.activeItemIndex=i;let e=null;this.visibleItems.forEach(((t,s)=>{s===i?(t.active=!0,e=`${V}${t.guid}`):t.active=!1})),this.activeDescendant=e,this.activeItemIndex>-1&&(this.activeChipIndex=-1,null===(t=this.textInput)||void 0===t||t.focus())}isMulti(){return"single"!==this.selectionMode}renderChips(){const{activeChipIndex:i,scale:t,selectionMode:s,intlRemoveTag:a}=this;return this.selectedItems.map(((n,o)=>{const c={chip:!0,"chip--active":i===o},l=[...[...g(n)].reverse(),n].map((i=>i.textLabel)),r="ancestors"!==s?n.textLabel:l.join(" / ");return e("calcite-chip",{class:c,dismissLabel:a,dismissible:!0,icon:n.icon,id:n.guid?`${X}${n.guid}`:null,key:n.textLabel,onCalciteChipDismiss:i=>this.calciteChipDismissHandler(i,n),scale:t,title:r,value:n.value},r)}))}renderInput(){const{guid:i,active:t,disabled:s,placeholder:a,selectionMode:n,selectedItems:o,open:c}=this,l="single"===n,r=o[0],h=!(c||t)&&l&&!!r;return e("span",{class:{"input-wrap":!0,"input-wrap--single":l}},h&&e("span",{class:{label:!0,"label--icon":!!(null==r?void 0:r.icon)},key:"label"},r.textLabel),e("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":`${G}${i}`,"aria-label":I(this),class:{input:!0,"input--single":!0,"input--transparent":this.activeChipIndex>-1,"input--hidden":h,"input--icon":!!this.placeholderIcon},disabled:s,id:`${K}${i}`,key:"input",onBlur:this.comboboxBlurHandler,onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:a,ref:i=>this.textInput=i,type:"text"}))}renderListBoxOptions(){return this.visibleItems.map((i=>e("li",{"aria-selected":P(i.selected),id:i.guid?`${V}${i.guid}`:null,role:"option",tabindex:"-1"},i.textLabel)))}renderFloatingUIContainer(){const{active:i,setFloatingEl:t,setContainerEl:s,open:a}=this;return e("div",{"aria-hidden":"true",class:{"floating-ui-container":!0,"floating-ui-container--active":a||i},ref:t},e("div",{class:{"list-container":!0,[m.animation]:!0,[m.animationActive]:a||i},ref:s},e("ul",{class:{list:!0,"list--hide":!(a||i)}},e("slot",null))))}renderIconStart(){const{selectedItems:i,placeholderIcon:t,selectionMode:s}=this,a=i[0],n=null==a?void 0:a.icon,o="single"===s;return(!this.open&&a?!!n&&o:!!this.placeholderIcon&&(!a||o))&&e("span",{class:"icon-start"},e("calcite-icon",{class:"selected-icon",icon:!this.open&&a?n:t,scale:"s"}))}renderIconEnd(){const{active:i,open:t}=this;return e("span",{class:"icon-end"},e("calcite-icon",{icon:i||t?"chevron-up":"chevron-down",scale:"s"}))}render(){const{active:i,guid:t,label:a,open:n}=this,o="single"===this.selectionMode;return e(s,null,e("div",{"aria-autocomplete":"list","aria-controls":`${G}${t}`,"aria-expanded":P(n||i),"aria-haspopup":"listbox","aria-labelledby":`${Y}${t}`,"aria-live":"polite","aria-owns":`${G}${t}`,class:{wrapper:!0,"wrapper--single":o||!this.selectedItems.length,"wrapper--active":n||i},onClick:this.clickHandler,onKeyDown:this.keydownHandler,ref:this.setReferenceEl,role:"combobox"},e("div",{class:"grid-input"},this.renderIconStart(),!o&&this.renderChips(),e("label",{class:"screen-readers-only",htmlFor:`${K}${t}`,id:`${Y}${t}`},a),this.renderInput()),this.renderIconEnd()),e("ul",{"aria-labelledby":`${Y}${t}`,"aria-multiselectable":"true",class:"screen-readers-only",id:`${G}${t}`,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderFloatingUIContainer(),e(j,{component:this}))}get el(){return a(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],disabled:["handleDisabledChange"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],value:["valueHandler"],flipPlacements:["flipPlacementsHandler"],selectedItems:["selectedItemsHandler"],text:["textHandler"]}}};N.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{position:relative;display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-input-height:1.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-input-height:2rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-input-height:2.75rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px}.input{flex-grow:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-style:none;background-color:transparent;padding:0px;font-family:inherit;color:var(--calcite-ui-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-inline-size:120px;-webkit-margin-after:var(--calcite-combobox-item-spacing-unit-s);margin-block-end:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-block:0px;padding:0px}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:flex;flex-grow:1}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;display:flex;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;inline-size:1rem;cursor:pointer;align-items:center}.icon-end{flex:none}.floating-ui-container{display:block;position:absolute;z-index:900;visibility:hidden;pointer-events:none;inline-size:0;block-size:0;overflow:hidden}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}.floating-ui-container--active{pointer-events:initial;visibility:visible;inline-size:unset;block-size:unset;overflow:unset}@media (forced-colors: active){.wrapper,.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-ui-foreground-1);inline-size:var(--calcite-dropdown-width)}.list{margin:0px;display:block;padding:0px}.list--hide{block-size:0px;overflow:hidden}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);margin-inline:0 var(--calcite-combobox-item-spacing-unit-s);max-inline-size:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.item{display:block}::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
|
-
/*!
|
8
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
-
* v1.0.0-beta.97
|
11
|
-
*/
|
12
|
-
const q="icon",J=class{constructor(e){i(this,e),this.calciteComboboxItemChange=t(this,"calciteComboboxItemChange",6),this.disabled=!1,this.selected=!1,this.active=!1,this.guid=p(),this.scale="m",this.itemClickHandler=i=>{i.preventDefault(),this.disabled||(this.selected=!this.selected)}}selectedWatchHandler(){this.calciteComboboxItemChange.emit(this.el)}connectedCallback(){this.ancestors=w(this.el),this.scale=S(this.el,"scale",this.scale),O(this)}disconnectedCallback(){R(this)}componentDidRender(){A(this)}async toggleSelected(i){this.disabled||(this.selected="boolean"==typeof i?i:!this.selected)}renderIcon(i){const{icon:t,disabled:s,selected:a}=this,n=`${q}--indent`;return!i||t||s?e("calcite-icon",{class:{[q]:!t,"icon--custom":!!t,"icon--active":t&&a,[n]:!0},icon:t||(s?"circle-disallowed":i?"dot":"check"),scale:"s"}):e("span",{class:{[q]:!0,"icon--dot":!0,[n]:!0}})}renderChildren(){return F(this.el)?e("ul",{key:"default-slot-container"},e("slot",null)):null}render(){const i="single"===S(this.el,"selection-mode","multi"),t={label:!0,"label--selected":this.selected,"label--active":this.active,"label--single":i},a=k(this.el);return e(s,{"aria-hidden":"true"},e("div",{class:`container scale--${this.scale}`,style:{"--calcite-combobox-item-spacing-indent-multiplier":`${a}`}},e("li",{class:t,id:this.guid,onClick:this.itemClickHandler},this.renderIcon(i),e("span",{class:"title"},this.textLabel)),this.renderChildren()))}get el(){return a(this)}static get watchers(){return{selected:["selectedWatchHandler"]}}};J.style='@charset "UTF-8";@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)}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent:0.5rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent:0.75rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent:1rem}.container{--calcite-combobox-item-indent-value:calc(\n var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier)\n )}:host(:focus){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host,ul{margin:0px;display:flex;flex-direction:column;padding:0px}:host(:focus),ul:focus{outline:2px solid transparent;outline-offset:2px}.label{position:relative;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:100%;cursor:pointer;align-items:center;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);outline-color:transparent;padding-block:var(--calcite-combobox-item-spacing-unit-s);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host([disabled]) .label{cursor:default}.label--selected{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.label--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover,.label:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);-webkit-text-decoration-line:none;text-decoration-line:none;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.title{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon{display:inline-flex;opacity:0;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);color:var(--calcite-ui-border-1)}.icon--indent{-webkit-padding-start:var(--calcite-combobox-item-indent-value);padding-inline-start:var(--calcite-combobox-item-indent-value)}.icon--custom{-webkit-margin-before:-1px;margin-block-start:-1px;color:var(--calcite-ui-text-3)}.icon--active{color:var(--calcite-ui-text-1)}.icon--dot{display:flex;justify-content:flex-end;min-inline-size:var(--calcite-combobox-item-spacing-unit-l)}.icon--dot:before{text-align:start;content:"•"}.label--active .icon{opacity:1}.label--selected .icon{opacity:1;color:var(--calcite-ui-brand)}:host(:hover[disabled]) .icon{opacity:1}';const Q=class{constructor(e){i(this,e),this.layerSelectionChange=t(this,"layerSelectionChange",7),this.layerNames=[],this.mapView=void 0,this.selectedLayers=[],this.selectionMode="single"}async watchStateHandler(i,t){i!==t&&(await this._setLayers(),"single"===this.selectionMode&&this.layerSelectionChange.emit([this.layerNames[0]]))}async componentWillLoad(){await this._setLayers(),"single"===this.selectionMode&&(this.layerNames.length>0||1===this.selectedLayers.length)&&this.layerSelectionChange.emit(1===this.selectedLayers.length?[this.selectedLayers[0]]:[this.layerNames[0]])}render(){return e(s,null,e("div",{class:"map-layer-picker-container"},e("div",{class:"map-layer-picker"},"multi"===this.selectionMode?this._getCombobox():this._getSelect())))}_getSelect(){return e("calcite-select",{label:"",onCalciteSelectChange:i=>this._layerSelectionChange(i),ref:i=>{this._layerElement=i}},this._addMapLayersOptions())}_getCombobox(){return e("calcite-combobox",{label:"",onCalciteComboboxChange:i=>this._layerSelectionChange(i),"selection-mode":this.selectionMode},this._addMapLayersOptions())}_addMapLayersOptions(){return this.layerNames.reduce(((i,t)=>(U.managedLayers.indexOf(t)<0&&i.push("multi"===this.selectionMode&&this.selectedLayers.indexOf(t)>-1?e("calcite-combobox-item",{selected:!0,textLabel:t,value:t}):"multi"===this.selectionMode?e("calcite-combobox-item",{textLabel:t,value:t}):this.selectedLayers.indexOf(t)>-1?e("calcite-option",{label:t,selected:!0,value:t}):e("calcite-option",{label:t,value:t})),i)),[])}async _setLayers(){this.mapView&&(this.layerNames=await W(this.mapView))}_layerSelectionChange(i){var t;this.selectedLayers="single"===this.selectionMode?[this._layerElement.value]:(null===(t=i.detail)||void 0===t?void 0:t.selectedItems.map((i=>i.value)))||[],this.layerSelectionChange.emit(this.selectedLayers)}get el(){return a(this)}static get watchers(){return{mapView:["watchStateHandler"]}}};Q.style=":host{display:block}.map-layer-picker-container{width:100%}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}";export{N as calcite_combobox,J as calcite_combobox_item,Q as map_layer_picker}
|
@@ -1,36 +0,0 @@
|
|
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{E as t}from"./p-be41429f.js";
|
7
|
-
/** @license
|
8
|
-
* Copyright 2022 Esri
|
9
|
-
*
|
10
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
-
* you may not use this file except in compliance with the License.
|
12
|
-
* You may obtain a copy of the License at
|
13
|
-
*
|
14
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
*
|
16
|
-
* Unless required by applicable law or agreed to in writing, software
|
17
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
-
* See the License for the specific language governing permissions and
|
20
|
-
* limitations under the License.
|
21
|
-
*/async function n(t,e,a){const r=e.capabilities.query.maxRecordCount,o={start:t,num:r,outFields:["*"],returnGeometry:!0,where:"1=1"},s=await e.queryFeatures(o);return a=a.concat(s.features),s.exceededTransferLimit?n(t+=r,e,a):Promise.resolve(a)}async function e(t,n){let e=[];const a=t.map((t=>async function(t,n){const e=n.createQuery();return e.spatialRelationship="intersects",e.geometry=t,n.queryObjectIds(e)}
|
22
|
-
/** @license
|
23
|
-
* Copyright 2022 Esri
|
24
|
-
*
|
25
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
26
|
-
* you may not use this file except in compliance with the License.
|
27
|
-
* You may obtain a copy of the License at
|
28
|
-
*
|
29
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
30
|
-
*
|
31
|
-
* Unless required by applicable law or agreed to in writing, software
|
32
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
33
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
34
|
-
* See the License for the specific language governing permissions and
|
35
|
-
* limitations under the License.
|
36
|
-
*/(t,n)));return(await Promise.all(a)).forEach((t=>{e=[...e,...t]})),e}async function a(t,n){const e=n.createQuery();return e.outFields=["*"],e.objectIds=t,n.queryFeatures(e)}async function r(t,n,e,a){const o=n.capabilities.query.maxRecordCount,s={start:t,num:o,outFields:["*"],returnGeometry:!0,geometry:e},i=await n.queryFeatures(s);return a[n.title]=a[n.title].concat(i.features),i.exceededTransferLimit?r(t+=o,n,e,a):Promise.resolve(a)}function o(t,n){return[...i(t,"polygon",n),...i(t,"polyline",n),...i(t,"point",n)]}function s(n,a){let r=Promise.resolve([]);return n.workflowType!==t.REFINE&&(r=e(n.buffer?[n.buffer]:o(n.geometries,a),n.layerView.layer)),r}function i(t,n,e){const a=t.filter((t=>t.type===n));return a.length<=1?a:[e.union(a)]}async function c(t){let n=[];return await t.when((()=>{n=t.map.layers.toArray().map((t=>t.title))})),n}async function u(t,n){const e=await async function(t,n){let e=[];return await t.when((()=>{e=t.map.layers.toArray().filter((t=>t.title===n))})),e.length>0?e[0]:void 0}(t,n);return e?await t.whenLayerView(e):void 0}async function f(t,n,e,a=!1){return a&&await y(t,n,e,!1),n.highlight(t)}async function y(t,n,e,a=!0){const r=await async function(t,n){const e=n.createQuery();return e.objectIds=t,n.queryExtent(e)}(t,n.layer);await e.goTo(r.extent),a&&await async function(t,n){n.featureEffect={filter:{objectIds:t},includedEffect:"invert(100%)",excludedEffect:"blur(5px)"},setTimeout((()=>{n.featureEffect=void 0}),1300)}(t,n)}export{y as a,u as b,a as c,s as d,e,o as f,c as g,f as h,r as i,n as q}
|
@@ -1,6 +0,0 @@
|
|
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 i,H as s,g as a}from"./p-c023e6a1.js";import{g as n}from"./p-44da2507.js";import"./p-3b010ce1.js";const e=class{constructor(i){t(this,i),this.defaultChecked=!0,this._translations=void 0}async getConfigInfo(){return this._checkList.getConfigInfo()}async componentWillLoad(){await this._getTranslations()}render(){const t=this._translations.types||{},a=Object.keys(t).map((i=>t[i]));return i(s,null,i("div",null,i("div",{class:"padding-block-end-1"},i("calcite-label",{class:"label-spacing"},this._translations.drawTools)),i("div",{class:"padding-inline-start-1"},i("check-list",{defaultChecked:this.defaultChecked,ref:t=>{this._checkList=t},values:a}))))}async _getTranslations(){const t=await n(this.el);this._translations=t[0]}get el(){return a(this)}};e.style=":host{display:block}.label-spacing{--calcite-label-margin-bottom:0}.padding-block-end-1{-webkit-padding-after:1rem;padding-block-end:1rem}.padding-inline-start-1{-webkit-padding-start:1rem;padding-inline-start:1rem}";export{e as config_draw_tools}
|
@@ -1,6 +0,0 @@
|
|
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 s,H as e,g as i}from"./p-c023e6a1.js";const r=class{constructor(s){t(this,s),this._elements=[],this.defaultChecked=!0,this.values=void 0}async getConfigInfo(){return this._elements.reduce(((t,s)=>(t[s.value]=s.checked,t)),{})}async componentDidLoad(){this.defaultChecked&&this._elements.forEach((t=>{t.checked=!0}))}render(){return s(e,null,s("div",null,this._renderCheckboxes(this.values)))}_renderCheckboxes(t){return t.map((t=>s("calcite-label",{layout:"inline"},s("calcite-checkbox",{ref:t=>this._elements.push(t),value:t}),t)))}get el(){return i(this)}};r.style=":host{display:block}";export{r as check_list}
|
@@ -1,6 +0,0 @@
|
|
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 s,c as i,h as t,H as a,g as h}from"./p-c023e6a1.js";import{l as e}from"./p-1c567f3a.js";import{g as r}from"./p-44da2507.js";import"./p-3b010ce1.js";const c=class{constructor(t){s(this,t),this.searchChange=i(this,"searchChange",7),this.mapView=void 0,this._searchTerm=void 0,this._translations=void 0}async clear(){this._searchWidget.clear()}async componentWillLoad(){await this._getTranslations(),await this._initModules()}componentDidLoad(){this._init()}render(){return t(a,null,t("div",{class:"search-widget",ref:s=>{this._searchElement=s}}))}async _initModules(){const[s]=await e(["esri/widgets/Search"]);this.Search=s}_init(){this._initSearchWidget()}_initSearchWidget(){this.mapView&&this._searchElement&&(this._searchWidget=new this.Search({view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm}),this._searchWidget.on("search-clear",(()=>{this._searchResult=void 0,this.searchChange.emit(this._searchResult)})),this._searchWidget.on("select-result",(s=>{this._searchResult=void 0,s.result&&(this._searchResult=s.result,this.searchChange.emit({graphics:[s.result.feature],name:s.result.name||""}))})))}async _getTranslations(){const s=await r(this.el);this._translations=s[0]}get el(){return h(this)}};c.style=":host{display:block}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}";export{c as map_search}
|
@@ -1,6 +0,0 @@
|
|
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 i,H as a,g as s}from"./p-c023e6a1.js";import{g as e}from"./p-44da2507.js";import{g as n}from"./p-7dcab29d.js";import"./p-3b010ce1.js";import"./p-be41429f.js";const o=class{constructor(i){t(this,i),this.defaultChecked=!0,this.instruction="",this.mapView=void 0,this._layerNames=[],this._translations=void 0}async watchStateHandler(){await this._setLayers()}async getConfigInfo(){return"string"==typeof this._checkList.value?[this._checkList.value]:this._checkList.value}async componentWillLoad(){await this._setLayers(),await this._getTranslations()}render(){return i(a,null,i("div",null,i("div",{class:"padding-block-end-1"},i("calcite-label",{class:"label-spacing"},this.instruction||this._translations.chooseLayer)),i("div",{class:"padding-inline-start-1"},i("calcite-combobox",{label:"",overlayPositioning:"fixed",ref:t=>{this._checkList=t},selectionMode:"multiple"},this._getComboboxItems()))))}_getComboboxItems(){return this._layerNames?this._layerNames.map((t=>i("calcite-combobox-item",{textLabel:t,value:t}))):[]}async _setLayers(){this.mapView&&(this._layerNames=await n(this.mapView))}async _getTranslations(){const t=await e(this.el);this._translations=t[0]}get el(){return s(this)}static get watchers(){return{mapView:["watchStateHandler"]}}};o.style=":host{display:block}.label-spacing{--calcite-label-margin-bottom:0}.padding-block-end-1{-webkit-padding-after:1rem;padding-block-end:1rem}.padding-inline-start-1{-webkit-padding-start:1rem;padding-inline-start:1rem}";export{o as config_layer_picker}
|
@@ -1,6 +0,0 @@
|
|
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
|
-
const e=Object.freeze({__proto__:null,default:[{descriptionPDF:{labelWidthDisplay:"2-5/8",labelHeightDisplay:"1",labelsPerPageDisplay:"30",averyPartNumber:"*60"},labelSpec:{type:"AVERY",pageDimensions:{width:8.5,height:11,leftMargin:.1875,rightMargin:.1875,topMargin:.5,bottomMargin:.5},numLabelsAcross:3,numLabelsDown:10,labelWidth:2.625,labelHeight:1,horizGapIn:.125,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1",labelsPerPageDisplay:"20",averyPartNumber:"*61"},labelSpec:{type:"AVERY",pageDimensions:{width:8.5,height:11,leftMargin:.15625,rightMargin:.15625,topMargin:.47637821,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:10,labelWidth:4,labelHeight:1.0025,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:4}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"1-1/3",labelsPerPageDisplay:"14",averyPartNumber:"*62"},labelSpec:{type:"AVERY",pageDimensions:{width:8.5,height:11,leftMargin:.15625,rightMargin:.15625,topMargin:.81889808,bottomMargin:.83464612},numLabelsAcross:2,numLabelsDown:7,labelWidth:4,labelHeight:1.3352,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:11,maxNumLabelLines:6}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"2",labelsPerPageDisplay:"10",averyPartNumber:"*63"},labelSpec:{type:"AVERY",pageDimensions:{width:8.5,height:11,leftMargin:.15625,rightMargin:.15625,topMargin:.5,bottomMargin:.5},numLabelsAcross:2,numLabelsDown:5,labelWidth:4,labelHeight:2,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:12,maxNumLabelLines:10}},{descriptionPDF:{labelWidthDisplay:"4",labelHeightDisplay:"3-1/3",labelsPerPageDisplay:"6",averyPartNumber:"*64"},labelSpec:{type:"AVERY",pageDimensions:{width:8.5,height:11,leftMargin:.15625,rightMargin:.15625,topMargin:.4724412,bottomMargin:.50000027},numLabelsAcross:2,numLabelsDown:3,labelWidth:4,labelHeight:3.342,horizGapIn:.1875,vertGapIn:0,labelPadding:.1,fontSizePx:14,maxNumLabelLines:12}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"1/2",labelsPerPageDisplay:"80",averyPartNumber:"*67"},labelSpec:{type:"AVERY",pageDimensions:{width:8.5,height:11,leftMargin:.307086375,rightMargin:.307086375,topMargin:.4724412,bottomMargin:.49606326},numLabelsAcross:4,numLabelsDown:20,labelWidth:1.75,labelHeight:.50155,horizGapIn:.29527575,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:3}},{descriptionPDF:{labelWidthDisplay:"1-3/4",labelHeightDisplay:"2/3",labelsPerPageDisplay:"60",averyPartNumber:"*95"},labelSpec:{type:"AVERY",pageDimensions:{width:8.5,height:11,leftMargin:.28936983,rightMargin:.28936983,topMargin:.53937037,bottomMargin:.5511814},numLabelsAcross:4,numLabelsDown:15,labelWidth:1.75,labelHeight:.6605,horizGapIn:.30708678,vertGapIn:0,labelPadding:.1,fontSizePx:8,maxNumLabelLines:4}}]});export{e as p}
|
@@ -1,57 +0,0 @@
|
|
1
|
-
/** @license
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
import { VNode } from '../../stencil-public-runtime';
|
17
|
-
export declare class CheckList {
|
18
|
-
el: HTMLCheckListElement;
|
19
|
-
/**
|
20
|
-
* boolean: All checkboxes checked state will be set with this value on first render.
|
21
|
-
* Default is true
|
22
|
-
*/
|
23
|
-
defaultChecked: boolean;
|
24
|
-
/**
|
25
|
-
* string []: The values to render beside the checkboxes
|
26
|
-
*/
|
27
|
-
values: string[];
|
28
|
-
/**
|
29
|
-
* A list of all checkbox elements for this component
|
30
|
-
*
|
31
|
-
* @protected
|
32
|
-
*/
|
33
|
-
protected _elements: HTMLCalciteCheckboxElement[];
|
34
|
-
/**
|
35
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
36
|
-
*
|
37
|
-
* @returns Promise with the state of the checkboxes
|
38
|
-
*/
|
39
|
-
getConfigInfo(): Promise<{
|
40
|
-
[key: string]: boolean;
|
41
|
-
}>;
|
42
|
-
/**
|
43
|
-
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
44
|
-
*/
|
45
|
-
componentDidLoad(): Promise<void>;
|
46
|
-
/**
|
47
|
-
* Renders the component.
|
48
|
-
*/
|
49
|
-
render(): any;
|
50
|
-
/**
|
51
|
-
* Render a checkbox with a label for each of the types listed in the NLS
|
52
|
-
*
|
53
|
-
* @returns Array of label/checkbox input nodes
|
54
|
-
* @protected
|
55
|
-
*/
|
56
|
-
protected _renderCheckboxes(values: string[]): VNode[];
|
57
|
-
}
|
@@ -1,92 +0,0 @@
|
|
1
|
-
/** @license
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
import { VNode } from '../../stencil-public-runtime';
|
17
|
-
import ConfigBufferTools_T9n from "../../assets/t9n/config-buffer-tools/resources.json";
|
18
|
-
export declare class ConfigBufferTools {
|
19
|
-
el: HTMLConfigBufferToolsElement;
|
20
|
-
/**
|
21
|
-
* number: Default distance value.
|
22
|
-
*/
|
23
|
-
distance: number;
|
24
|
-
/**
|
25
|
-
* string: Default unit value.
|
26
|
-
* Should be a unit listed in assets/t9n/config-buffer-tools/resources
|
27
|
-
*/
|
28
|
-
unit: string;
|
29
|
-
/**
|
30
|
-
* When checked the buffer tools will be show in the config
|
31
|
-
*/
|
32
|
-
_showBufferChecked: boolean;
|
33
|
-
/**
|
34
|
-
* When checked the buffer tools will be avalible at runtime.
|
35
|
-
*/
|
36
|
-
protected _showBufferElement: HTMLCalciteCheckboxElement;
|
37
|
-
/**
|
38
|
-
* Contains the translations for this component.
|
39
|
-
* All UI strings should be defined here.
|
40
|
-
*/
|
41
|
-
_translations: typeof ConfigBufferTools_T9n;
|
42
|
-
/**
|
43
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
44
|
-
*
|
45
|
-
* @returns Promise with the state of the checkboxes
|
46
|
-
*/
|
47
|
-
getConfigInfo(): Promise<{
|
48
|
-
[key: string]: number | string;
|
49
|
-
}>;
|
50
|
-
/**
|
51
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
52
|
-
*
|
53
|
-
* @returns Promise when complete
|
54
|
-
*/
|
55
|
-
componentWillLoad(): Promise<void>;
|
56
|
-
/**
|
57
|
-
* Renders the component.
|
58
|
-
*/
|
59
|
-
render(): any;
|
60
|
-
/**
|
61
|
-
* Store the user defined distance
|
62
|
-
*
|
63
|
-
* @protected
|
64
|
-
*/
|
65
|
-
protected _distanceChanged(evt: CustomEvent): void;
|
66
|
-
/**
|
67
|
-
* Store the user defined unit
|
68
|
-
*
|
69
|
-
* @protected
|
70
|
-
*/
|
71
|
-
protected _unitSelectionChange(evt: CustomEvent): void;
|
72
|
-
/**
|
73
|
-
* Render the various unit options
|
74
|
-
*
|
75
|
-
* @returns Promise when complete
|
76
|
-
* @protected
|
77
|
-
*/
|
78
|
-
protected _renderUnitOptions(): VNode[];
|
79
|
-
/**
|
80
|
-
* When not checked the buffer options will be disabled in the config and not visible in the UI at runtime
|
81
|
-
*
|
82
|
-
* @protected
|
83
|
-
*/
|
84
|
-
protected _setShowBufferChecked(): void;
|
85
|
-
/**
|
86
|
-
* Fetches the component's translations
|
87
|
-
*
|
88
|
-
* @returns Promise when complete
|
89
|
-
* @protected
|
90
|
-
*/
|
91
|
-
protected _getTranslations(): Promise<void>;
|
92
|
-
}
|
@@ -1,58 +0,0 @@
|
|
1
|
-
/** @license
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
import ConfigDrawTools_T9n from "../../assets/t9n/config-draw-tools/resources.json";
|
17
|
-
export declare class ConfigDrawTools {
|
18
|
-
el: HTMLConfigDrawToolsElement;
|
19
|
-
/**
|
20
|
-
* boolean: All checkboxes checked state will be set with this value on first render.
|
21
|
-
* Default is true
|
22
|
-
*/
|
23
|
-
defaultChecked: boolean;
|
24
|
-
/**
|
25
|
-
* Contains the translations for this component.
|
26
|
-
* All UI strings should be defined here.
|
27
|
-
*/
|
28
|
-
_translations: typeof ConfigDrawTools_T9n;
|
29
|
-
/**
|
30
|
-
* HTMLCheckListElement: The check list element
|
31
|
-
*/
|
32
|
-
protected _checkList: HTMLCheckListElement;
|
33
|
-
/**
|
34
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
35
|
-
*
|
36
|
-
* @returns Promise with the state of the checkboxes
|
37
|
-
*/
|
38
|
-
getConfigInfo(): Promise<{
|
39
|
-
[key: string]: boolean;
|
40
|
-
}>;
|
41
|
-
/**
|
42
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
43
|
-
*
|
44
|
-
* @returns Promise when complete
|
45
|
-
*/
|
46
|
-
componentWillLoad(): Promise<void>;
|
47
|
-
/**
|
48
|
-
* Renders the component.
|
49
|
-
*/
|
50
|
-
render(): any;
|
51
|
-
/**
|
52
|
-
* Fetches the component's translations
|
53
|
-
*
|
54
|
-
* @returns Promise when complete
|
55
|
-
* @protected
|
56
|
-
*/
|
57
|
-
protected _getTranslations(): Promise<void>;
|
58
|
-
}
|
@@ -1,83 +0,0 @@
|
|
1
|
-
/** @license
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
/// <reference types="arcgis-js-api" />
|
17
|
-
import { VNode } from '../../stencil-public-runtime';
|
18
|
-
import ConfigLayerPicker_T9n from "../../assets/t9n/config-layer-picker/resources.json";
|
19
|
-
export declare class ConfigLayerPicker {
|
20
|
-
el: HTMLConfigLayerPickerElement;
|
21
|
-
/**
|
22
|
-
* boolean: All checkboxes checked state will be set with this value on first render.
|
23
|
-
* Default is true
|
24
|
-
*/
|
25
|
-
defaultChecked: boolean;
|
26
|
-
/**
|
27
|
-
* string: Value to be shown above the check list
|
28
|
-
* Allows this to support multiple sets of layers.
|
29
|
-
*/
|
30
|
-
instruction: string;
|
31
|
-
/**
|
32
|
-
* esri/views/View: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html
|
33
|
-
*/
|
34
|
-
mapView: __esri.MapView;
|
35
|
-
/**
|
36
|
-
* string[]: list of layer names from the map
|
37
|
-
*/
|
38
|
-
_layerNames: string[];
|
39
|
-
/**
|
40
|
-
* Contains the translations for this component.
|
41
|
-
* All UI strings should be defined here.
|
42
|
-
*/
|
43
|
-
_translations: typeof ConfigLayerPicker_T9n;
|
44
|
-
/**
|
45
|
-
* HTMLCheckListElement: The check list element
|
46
|
-
*/
|
47
|
-
protected _checkList: HTMLCalciteComboboxElement;
|
48
|
-
/**
|
49
|
-
* Called each time the mapView prop is changed.
|
50
|
-
*
|
51
|
-
*/
|
52
|
-
watchStateHandler(): Promise<void>;
|
53
|
-
/**
|
54
|
-
* Returns a list of layers that have been selected
|
55
|
-
*
|
56
|
-
* @returns Promise with a list of layer names to use
|
57
|
-
*/
|
58
|
-
getConfigInfo(): Promise<string[]>;
|
59
|
-
/**
|
60
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
61
|
-
*
|
62
|
-
* @returns Promise when complete
|
63
|
-
*/
|
64
|
-
componentWillLoad(): Promise<void>;
|
65
|
-
/**
|
66
|
-
* Renders the component.
|
67
|
-
*/
|
68
|
-
render(): any;
|
69
|
-
_getComboboxItems(): VNode[];
|
70
|
-
/**
|
71
|
-
* Fetch the names of the layers from the map
|
72
|
-
*
|
73
|
-
* @returns Promise when the operation has completed
|
74
|
-
*/
|
75
|
-
_setLayers(): Promise<void>;
|
76
|
-
/**
|
77
|
-
* Fetches the component's translations
|
78
|
-
*
|
79
|
-
* @returns Promise when complete
|
80
|
-
* @protected
|
81
|
-
*/
|
82
|
-
protected _getTranslations(): Promise<void>;
|
83
|
-
}
|
@@ -1,81 +0,0 @@
|
|
1
|
-
/** @license
|
2
|
-
* Copyright 2022 Esri
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
import ConfigPdfDownload_T9n from "../../assets/t9n/config-pdf-download/resources.json";
|
17
|
-
export declare class ConfigPdfDownload {
|
18
|
-
el: HTMLConfigPdfDownloadElement;
|
19
|
-
/**
|
20
|
-
* boolean: All checkboxes checked state will be set with this value on first render.
|
21
|
-
* Default is true
|
22
|
-
*/
|
23
|
-
defaultChecked: boolean;
|
24
|
-
/**
|
25
|
-
* string[]: list of layer names from the map
|
26
|
-
*/
|
27
|
-
_formatOptions: string[];
|
28
|
-
/**
|
29
|
-
* Contains the translations for this component.
|
30
|
-
* All UI strings should be defined here.
|
31
|
-
*/
|
32
|
-
_translations: typeof ConfigPdfDownload_T9n;
|
33
|
-
/**
|
34
|
-
* HTMLCheckListElement: The format options check list element
|
35
|
-
*/
|
36
|
-
protected _formatOptionsCheckList: HTMLCheckListElement;
|
37
|
-
/**
|
38
|
-
* HTMLCheckListElement: The CSV options check list element
|
39
|
-
*/
|
40
|
-
protected _csvOptionsCheckList: HTMLCheckListElement;
|
41
|
-
/**
|
42
|
-
* Returns a key/value pair that represents the checkbox value and checked state
|
43
|
-
*
|
44
|
-
* @returns Promise with the state of the checkboxes
|
45
|
-
*/
|
46
|
-
getConfigInfo(): Promise<{
|
47
|
-
[key: string]: boolean;
|
48
|
-
}>;
|
49
|
-
/**
|
50
|
-
* StencilJS: Called once just after the component is first connected to the DOM.
|
51
|
-
*
|
52
|
-
* @returns Promise when complete
|
53
|
-
*/
|
54
|
-
componentWillLoad(): Promise<void>;
|
55
|
-
/**
|
56
|
-
* Renders the component.
|
57
|
-
*/
|
58
|
-
render(): any;
|
59
|
-
/**
|
60
|
-
* Fetch the names of the layers from the map
|
61
|
-
*
|
62
|
-
* @returns Promise when the operation has completed
|
63
|
-
*/
|
64
|
-
_setFormatOptions(): Promise<void>;
|
65
|
-
/**
|
66
|
-
* Gets the formatted pdf export size text
|
67
|
-
*
|
68
|
-
* @param labelInfo current user selected label info
|
69
|
-
*
|
70
|
-
* @returns the pdf label as a string
|
71
|
-
* @protected
|
72
|
-
*/
|
73
|
-
protected _getLabelSizeText(labelInfo: any): string;
|
74
|
-
/**
|
75
|
-
* Fetches the component's translations
|
76
|
-
*
|
77
|
-
* @returns Promise when complete
|
78
|
-
* @protected
|
79
|
-
*/
|
80
|
-
protected _getTranslations(): Promise<void>;
|
81
|
-
}
|