@esri/solutions-components 0.5.7 → 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/buffer-tools/resources_ar.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_bg.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_bs.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_ca.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_cs.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_da.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_de.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_el.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_es.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_et.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_fi.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_fr.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_he.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_hr.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_hu.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_id.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_it.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_ja.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_ko.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_lt.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_lv.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_nb.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_nl.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_pl.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_pt-BR.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_pt-PT.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_ro.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_ru.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_sk.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_sl.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_sr.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_sv.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_th.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_tr.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_uk.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_vi.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_zh-CN.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_zh-HK.json +4 -4
- package/dist/assets/t9n/buffer-tools/resources_zh-TW.json +4 -4
- package/dist/assets/t9n/map-draw-tools/resources_ar.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_bg.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_bs.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_ca.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_cs.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_da.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_de.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_el.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_es.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_et.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_fi.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_fr.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_he.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_hr.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_hu.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_id.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_it.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_ja.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_ko.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_lt.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_lv.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_nb.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_nl.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_pl.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_pt-BR.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_pt-PT.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_ro.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_ru.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_sk.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_sl.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_sr.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_sv.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_th.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_tr.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_uk.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_vi.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_zh-CN.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_zh-HK.json +3 -3
- package/dist/assets/t9n/map-draw-tools/resources_zh-TW.json +3 -3
- package/dist/assets/t9n/map-select-tools/resources_ar.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_bg.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_bs.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_ca.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_cs.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_da.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_de.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_el.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_es.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_et.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_fi.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_fr.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_he.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_hr.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_hu.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_id.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_it.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_ja.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_ko.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_lt.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_lv.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_nb.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_nl.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_pl.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_pt-BR.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_pt-PT.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_ro.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_ru.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_sk.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_sl.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_sr.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_sv.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_th.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_tr.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_uk.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_vi.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_zh-CN.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_zh-HK.json +13 -11
- package/dist/assets/t9n/map-select-tools/resources_zh-TW.json +13 -11
- package/dist/assets/t9n/pdf-download/resources_ar.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_bg.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_bs.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_ca.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_cs.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_da.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_de.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_el.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_es.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_et.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_fi.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_fr.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_he.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_hr.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_hu.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_id.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_it.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_ja.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_ko.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_lt.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_lv.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_nb.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_nl.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_pl.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_pt-BR.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_pt-PT.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_ro.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_ru.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_sk.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_sl.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_sr.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_sv.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_th.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_tr.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_uk.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_vi.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_zh-CN.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_zh-HK.json +1 -1
- package/dist/assets/t9n/pdf-download/resources_zh-TW.json +1 -1
- package/dist/assets/t9n/public-notification/resources.json +11 -9
- package/dist/assets/t9n/public-notification/resources_ar.json +39 -38
- package/dist/assets/t9n/public-notification/resources_bg.json +39 -38
- package/dist/assets/t9n/public-notification/resources_bs.json +39 -38
- package/dist/assets/t9n/public-notification/resources_ca.json +39 -38
- package/dist/assets/t9n/public-notification/resources_cs.json +39 -38
- package/dist/assets/t9n/public-notification/resources_da.json +39 -38
- package/dist/assets/t9n/public-notification/resources_de.json +39 -38
- package/dist/assets/t9n/public-notification/resources_el.json +39 -38
- package/dist/assets/t9n/public-notification/resources_en.json +11 -9
- package/dist/assets/t9n/public-notification/resources_es.json +39 -38
- package/dist/assets/t9n/public-notification/resources_et.json +39 -38
- package/dist/assets/t9n/public-notification/resources_fi.json +39 -38
- package/dist/assets/t9n/public-notification/resources_fr.json +39 -38
- package/dist/assets/t9n/public-notification/resources_he.json +39 -38
- package/dist/assets/t9n/public-notification/resources_hr.json +39 -38
- package/dist/assets/t9n/public-notification/resources_hu.json +39 -38
- package/dist/assets/t9n/public-notification/resources_id.json +39 -38
- package/dist/assets/t9n/public-notification/resources_it.json +39 -38
- package/dist/assets/t9n/public-notification/resources_ja.json +39 -38
- package/dist/assets/t9n/public-notification/resources_ko.json +39 -38
- package/dist/assets/t9n/public-notification/resources_lt.json +39 -38
- package/dist/assets/t9n/public-notification/resources_lv.json +39 -38
- package/dist/assets/t9n/public-notification/resources_nb.json +39 -38
- package/dist/assets/t9n/public-notification/resources_nl.json +39 -38
- package/dist/assets/t9n/public-notification/resources_pl.json +39 -38
- package/dist/assets/t9n/public-notification/resources_pt-BR.json +39 -38
- package/dist/assets/t9n/public-notification/resources_pt-PT.json +39 -38
- package/dist/assets/t9n/public-notification/resources_ro.json +39 -38
- package/dist/assets/t9n/public-notification/resources_ru.json +39 -38
- package/dist/assets/t9n/public-notification/resources_sk.json +39 -38
- package/dist/assets/t9n/public-notification/resources_sl.json +39 -38
- package/dist/assets/t9n/public-notification/resources_sr.json +39 -38
- package/dist/assets/t9n/public-notification/resources_sv.json +39 -38
- package/dist/assets/t9n/public-notification/resources_th.json +39 -38
- package/dist/assets/t9n/public-notification/resources_tr.json +39 -38
- package/dist/assets/t9n/public-notification/resources_uk.json +39 -38
- package/dist/assets/t9n/public-notification/resources_vi.json +39 -38
- package/dist/assets/t9n/public-notification/resources_zh-CN.json +39 -38
- package/dist/assets/t9n/public-notification/resources_zh-HK.json +39 -38
- package/dist/assets/t9n/public-notification/resources_zh-TW.json +39 -38
- package/dist/assets/t9n/refine-selection/resources.json +3 -1
- package/dist/assets/t9n/refine-selection/resources_en.json +3 -1
- package/dist/cjs/calcite-input-text_5.cjs.entry.js +3 -3
- package/dist/cjs/{downloadUtils-06876768.js → downloadUtils-4ef4b28b.js} +87 -21
- package/dist/cjs/{index.es-d07646b4.js → index.es-cbe67d5b.js} +1 -1
- package/dist/cjs/layer-table_2.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/public-notification/public-notification.js +2 -2
- package/dist/collection/components/refine-selection/refine-selection.css +106 -85
- package/dist/collection/components/refine-selection/refine-selection.js +1 -1
- package/dist/collection/utils/downloadUtils.js +86 -20
- package/dist/collection/utils/downloadUtils.ts +139 -27
- package/dist/components/downloadUtils.js +86 -20
- package/dist/components/public-notification.js +2 -2
- package/dist/components/refine-selection2.js +36 -24
- package/dist/esm/calcite-input-text_5.entry.js +3 -3
- package/dist/esm/{downloadUtils-046ce0aa.js → downloadUtils-2ebeb46d.js} +87 -21
- package/dist/esm/{index.es-3fd0e8f6.js → index.es-6dd27a48.js} +1 -1
- package/dist/esm/layer-table_2.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/{p-2e0db581.js → p-657caece.js} +11 -11
- package/dist/solutions-components/{p-1b08d9d6.entry.js → p-6f27bea2.entry.js} +2 -2
- package/dist/solutions-components/{p-99aec087.js → p-ad82c173.js} +1 -1
- package/dist/solutions-components/p-db82a9ce.entry.js +6 -0
- package/dist/solutions-components/{p-1850a763.entry.js → p-deb90ce7.entry.js} +1 -1
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/downloadUtils.ts +139 -27
- package/dist/types/utils/downloadUtils.d.ts +21 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-f66a7ea7.entry.js +0 -6
@@ -9,17 +9,19 @@ import { b as getMapLayerView, c as getIdSets, e as highlightAllFeatures, d as d
|
|
9
9
|
import { c as queryFeaturesByGeometry } from './queryUtils.js';
|
10
10
|
import { s as state } from './publicNotificationStore.js';
|
11
11
|
import { g as getLocaleComponentStrings } from './locale.js';
|
12
|
-
import { d as defineCustomElement$
|
13
|
-
import { d as defineCustomElement$
|
14
|
-
import { d as defineCustomElement$
|
15
|
-
import { d as defineCustomElement$
|
16
|
-
import { d as defineCustomElement$
|
17
|
-
import { d as defineCustomElement$
|
18
|
-
import { d as defineCustomElement$
|
19
|
-
import { d as defineCustomElement$
|
20
|
-
import { d as defineCustomElement$
|
21
|
-
import { d as defineCustomElement$
|
22
|
-
import { d as defineCustomElement$
|
12
|
+
import { d as defineCustomElement$k } from './action.js';
|
13
|
+
import { d as defineCustomElement$j } from './chip.js';
|
14
|
+
import { d as defineCustomElement$i } from './combobox.js';
|
15
|
+
import { d as defineCustomElement$h } from './combobox-item.js';
|
16
|
+
import { d as defineCustomElement$g } from './filter.js';
|
17
|
+
import { d as defineCustomElement$f } from './icon.js';
|
18
|
+
import { d as defineCustomElement$e } from './input.js';
|
19
|
+
import { d as defineCustomElement$d } from './label.js';
|
20
|
+
import { d as defineCustomElement$c } from './list.js';
|
21
|
+
import { d as defineCustomElement$b } from './list-item2.js';
|
22
|
+
import { d as defineCustomElement$a } from './loader.js';
|
23
|
+
import { d as defineCustomElement$9 } from './option.js';
|
24
|
+
import { d as defineCustomElement$8 } from './popover.js';
|
23
25
|
import { d as defineCustomElement$7 } from './progress.js';
|
24
26
|
import { d as defineCustomElement$6 } from './scrim.js';
|
25
27
|
import { d as defineCustomElement$5 } from './segmented-control.js';
|
@@ -27,7 +29,7 @@ import { d as defineCustomElement$4 } from './segmented-control-item.js';
|
|
27
29
|
import { d as defineCustomElement$3 } from './select.js';
|
28
30
|
import { d as defineCustomElement$2 } from './map-draw-tools2.js';
|
29
31
|
|
30
|
-
const refineSelectionCss = ":host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir=\"rtl\"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-ui-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:\"Avenir Next\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-ui-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}";
|
32
|
+
const refineSelectionCss = ":host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir=\"rtl\"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-ui-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:\"Avenir Next\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-ui-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}.display-flex{display:flex}.font-bold{font-weight:bold}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom:0}.padding-start-1-2{-webkit-padding-start:0.5rem;padding-inline-start:0.5rem}";
|
31
33
|
|
32
34
|
const RefineSelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
33
35
|
constructor() {
|
@@ -86,7 +88,7 @@ const RefineSelection = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
86
88
|
render() {
|
87
89
|
var _a, _b;
|
88
90
|
const layerPickerClass = this._enabledLayerIds.length > 1 ? "display-block" : "display-none";
|
89
|
-
return (h(Host, null, h("div", { class: layerPickerClass + " padding-top-sides-1" }, h("map-layer-picker", { enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; }, selectedLayerIds: [this._refineLayer.layer.id], selectionMode: "single" })), h("div", { class: "padding-1" }, h("div", { class: "padding-bottom-1" }, h("calcite-segmented-control", { class: "w-100" }, h("calcite-segmented-control-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h("calcite-segmented-control-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove))), h("div", null, h("map-draw-tools", { active: true, drawMode: EDrawMode.REFINE, mapView: this.mapView, onDrawRedo: () => this._redo(), onDrawUndo: () => this._undo(), onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, redoEnabled: ((_a = this._refineSelectionSet) === null || _a === void 0 ? void 0 : _a.redoStack.length) > 0, ref: (el) => { this._drawTools = el; }, undoEnabled: ((_b = this._refineSelectionSet) === null || _b === void 0 ? void 0 : _b.undoStack.length) > 0 })), h("br", null), (h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
|
91
|
+
return (h(Host, null, h("div", { class: layerPickerClass + " padding-top-sides-1" }, h("div", { class: "display-flex" }, h("calcite-label", { class: "font-bold width-full label-margin-0" }, h("div", { class: "display-flex" }, this._translations.inputLayer, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "refine-input-layer", scale: "s" })), h("map-layer-picker", { enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; }, selectedLayerIds: [this._refineLayer.layer.id], selectionMode: "single" })), h("calcite-popover", { closable: true, label: "", referenceElement: "refine-input-layer" }, h("span", { class: "tooltip-message" }, this._translations.inputLayerTip)))), h("div", { class: "padding-1" }, h("div", { class: "padding-bottom-1" }, h("calcite-segmented-control", { class: "w-100" }, h("calcite-segmented-control-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h("calcite-segmented-control-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove))), h("div", null, h("map-draw-tools", { active: true, drawMode: EDrawMode.REFINE, mapView: this.mapView, onDrawRedo: () => this._redo(), onDrawUndo: () => this._undo(), onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, redoEnabled: ((_a = this._refineSelectionSet) === null || _a === void 0 ? void 0 : _a.redoStack.length) > 0, ref: (el) => { this._drawTools = el; }, undoEnabled: ((_b = this._refineSelectionSet) === null || _b === void 0 ? void 0 : _b.undoStack.length) > 0 })), h("br", null), (h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
|
90
92
|
}
|
91
93
|
//--------------------------------------------------------------------------
|
92
94
|
//
|
@@ -432,7 +434,7 @@ function defineCustomElement() {
|
|
432
434
|
if (typeof customElements === "undefined") {
|
433
435
|
return;
|
434
436
|
}
|
435
|
-
const components = ["refine-selection", "calcite-action", "calcite-chip", "calcite-combobox", "calcite-combobox-item", "calcite-filter", "calcite-icon", "calcite-input", "calcite-list", "calcite-list-item", "calcite-loader", "calcite-option", "calcite-progress", "calcite-scrim", "calcite-segmented-control", "calcite-segmented-control-item", "calcite-select", "map-draw-tools", "map-layer-picker"];
|
437
|
+
const components = ["refine-selection", "calcite-action", "calcite-chip", "calcite-combobox", "calcite-combobox-item", "calcite-filter", "calcite-icon", "calcite-input", "calcite-label", "calcite-list", "calcite-list-item", "calcite-loader", "calcite-option", "calcite-popover", "calcite-progress", "calcite-scrim", "calcite-segmented-control", "calcite-segmented-control-item", "calcite-select", "map-draw-tools", "map-layer-picker"];
|
436
438
|
components.forEach(tagName => { switch (tagName) {
|
437
439
|
case "refine-selection":
|
438
440
|
if (!customElements.get(tagName)) {
|
@@ -441,55 +443,65 @@ function defineCustomElement() {
|
|
441
443
|
break;
|
442
444
|
case "calcite-action":
|
443
445
|
if (!customElements.get(tagName)) {
|
444
|
-
defineCustomElement$
|
446
|
+
defineCustomElement$k();
|
445
447
|
}
|
446
448
|
break;
|
447
449
|
case "calcite-chip":
|
448
450
|
if (!customElements.get(tagName)) {
|
449
|
-
defineCustomElement$
|
451
|
+
defineCustomElement$j();
|
450
452
|
}
|
451
453
|
break;
|
452
454
|
case "calcite-combobox":
|
453
455
|
if (!customElements.get(tagName)) {
|
454
|
-
defineCustomElement$
|
456
|
+
defineCustomElement$i();
|
455
457
|
}
|
456
458
|
break;
|
457
459
|
case "calcite-combobox-item":
|
458
460
|
if (!customElements.get(tagName)) {
|
459
|
-
defineCustomElement$
|
461
|
+
defineCustomElement$h();
|
460
462
|
}
|
461
463
|
break;
|
462
464
|
case "calcite-filter":
|
463
465
|
if (!customElements.get(tagName)) {
|
464
|
-
defineCustomElement$
|
466
|
+
defineCustomElement$g();
|
465
467
|
}
|
466
468
|
break;
|
467
469
|
case "calcite-icon":
|
468
470
|
if (!customElements.get(tagName)) {
|
469
|
-
defineCustomElement$
|
471
|
+
defineCustomElement$f();
|
470
472
|
}
|
471
473
|
break;
|
472
474
|
case "calcite-input":
|
473
475
|
if (!customElements.get(tagName)) {
|
474
|
-
defineCustomElement$
|
476
|
+
defineCustomElement$e();
|
477
|
+
}
|
478
|
+
break;
|
479
|
+
case "calcite-label":
|
480
|
+
if (!customElements.get(tagName)) {
|
481
|
+
defineCustomElement$d();
|
475
482
|
}
|
476
483
|
break;
|
477
484
|
case "calcite-list":
|
478
485
|
if (!customElements.get(tagName)) {
|
479
|
-
defineCustomElement$
|
486
|
+
defineCustomElement$c();
|
480
487
|
}
|
481
488
|
break;
|
482
489
|
case "calcite-list-item":
|
483
490
|
if (!customElements.get(tagName)) {
|
484
|
-
defineCustomElement$
|
491
|
+
defineCustomElement$b();
|
485
492
|
}
|
486
493
|
break;
|
487
494
|
case "calcite-loader":
|
488
495
|
if (!customElements.get(tagName)) {
|
489
|
-
defineCustomElement$
|
496
|
+
defineCustomElement$a();
|
490
497
|
}
|
491
498
|
break;
|
492
499
|
case "calcite-option":
|
500
|
+
if (!customElements.get(tagName)) {
|
501
|
+
defineCustomElement$9();
|
502
|
+
}
|
503
|
+
break;
|
504
|
+
case "calcite-popover":
|
493
505
|
if (!customElements.get(tagName)) {
|
494
506
|
defineCustomElement$8();
|
495
507
|
}
|
@@ -20,7 +20,7 @@ import { g as goToSelection, h as highlightFeatures, q as queryObjectIds, a as g
|
|
20
20
|
import { c as EWorkflowType, e as ESelectionMode, f as EDrawMode } from './interfaces-523c6558.js';
|
21
21
|
import { s as state } from './publicNotificationStore-c36d95bf.js';
|
22
22
|
import { a as getComponentClosestLanguage, g as getLocaleComponentStrings } from './locale-54cac39a.js';
|
23
|
-
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-
|
23
|
+
import { d as downloadCSV, a as downloadPDF } from './downloadUtils-2ebeb46d.js';
|
24
24
|
import './guid-2069664e.js';
|
25
25
|
import './key-218d8d4d.js';
|
26
26
|
import './index-4c4a4f3d.js';
|
@@ -1550,7 +1550,7 @@ const PdfDownload = class {
|
|
1550
1550
|
};
|
1551
1551
|
PdfDownload.style = pdfDownloadCss;
|
1552
1552
|
|
1553
|
-
const refineSelectionCss = ":host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir=\"rtl\"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-ui-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:\"Avenir Next\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-ui-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}";
|
1553
|
+
const refineSelectionCss = ":host{display:block}.div-visible{display:inherit}.div-not-visible{display:none !important}.padding-top-1-2{padding-top:.5rem}.main-label{display:flex;float:left}html[dir=\"rtl\"] .main-label{display:flex;float:right}.border{outline:1px solid var(--calcite-ui-border-input)}.margin-top-1{margin-top:1rem}.esri-sketch{display:flex;flex-flow:column wrap}.esri-widget{box-sizing:border-box;color:#323232;font-size:14px;font-family:\"Avenir Next\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:1.3em;background-color:var(--calcite-ui-foreground-1)}.esri-sketch__panel{align-items:center;display:flex;flex-flow:row nowrap;padding:0}*/ .esri-sketch__tool-section{border-right:1px solid rgba(110,110,110,.3)}.esri-sketch__section{align-items:center;display:flex;flex-flow:row nowrap;padding:0 7px;margin:6px 0;border-right:1px solid rgba(110,110,110,.3)}.display-flex{display:flex}.font-bold{font-weight:bold}.width-full{width:100%}.label-margin-0{--calcite-label-margin-bottom:0}.padding-start-1-2{-webkit-padding-start:0.5rem;padding-inline-start:0.5rem}";
|
1554
1554
|
|
1555
1555
|
const RefineSelection = class {
|
1556
1556
|
constructor(hostRef) {
|
@@ -1608,7 +1608,7 @@ const RefineSelection = class {
|
|
1608
1608
|
render() {
|
1609
1609
|
var _a, _b;
|
1610
1610
|
const layerPickerClass = this._enabledLayerIds.length > 1 ? "display-block" : "display-none";
|
1611
|
-
return (h(Host, null, h("div", { class: layerPickerClass + " padding-top-sides-1" }, h("map-layer-picker", { enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; }, selectedLayerIds: [this._refineLayer.layer.id], selectionMode: "single" })), h("div", { class: "padding-1" }, h("div", { class: "padding-bottom-1" }, h("calcite-segmented-control", { class: "w-100" }, h("calcite-segmented-control-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h("calcite-segmented-control-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove))), h("div", null, h("map-draw-tools", { active: true, drawMode: EDrawMode.REFINE, mapView: this.mapView, onDrawRedo: () => this._redo(), onDrawUndo: () => this._undo(), onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, redoEnabled: ((_a = this._refineSelectionSet) === null || _a === void 0 ? void 0 : _a.redoStack.length) > 0, ref: (el) => { this._drawTools = el; }, undoEnabled: ((_b = this._refineSelectionSet) === null || _b === void 0 ? void 0 : _b.undoStack.length) > 0 })), h("br", null), (h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
|
1611
|
+
return (h(Host, null, h("div", { class: layerPickerClass + " padding-top-sides-1" }, h("div", { class: "display-flex" }, h("calcite-label", { class: "font-bold width-full label-margin-0" }, h("div", { class: "display-flex" }, this._translations.inputLayer, h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "refine-input-layer", scale: "s" })), h("map-layer-picker", { enabledLayerIds: this._enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, ref: (el) => { this._layerPicker = el; }, selectedLayerIds: [this._refineLayer.layer.id], selectionMode: "single" })), h("calcite-popover", { closable: true, label: "", referenceElement: "refine-input-layer" }, h("span", { class: "tooltip-message" }, this._translations.inputLayerTip)))), h("div", { class: "padding-1" }, h("div", { class: "padding-bottom-1" }, h("calcite-segmented-control", { class: "w-100" }, h("calcite-segmented-control-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h("calcite-segmented-control-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove))), h("div", null, h("map-draw-tools", { active: true, drawMode: EDrawMode.REFINE, mapView: this.mapView, onDrawRedo: () => this._redo(), onDrawUndo: () => this._undo(), onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, redoEnabled: ((_a = this._refineSelectionSet) === null || _a === void 0 ? void 0 : _a.redoStack.length) > 0, ref: (el) => { this._drawTools = el; }, undoEnabled: ((_b = this._refineSelectionSet) === null || _b === void 0 ? void 0 : _b.undoStack.length) > 0 })), h("br", null), (h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
|
1612
1612
|
}
|
1613
1613
|
//--------------------------------------------------------------------------
|
1614
1614
|
//
|
@@ -1505,7 +1505,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
1505
1505
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1506
1506
|
* ====================================================================
|
1507
1507
|
*/
|
1508
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-
|
1508
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-6dd27a48.js')).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
|
1509
1509
|
/** ====================================================================
|
1510
1510
|
* @license
|
1511
1511
|
* jsPDF XMP metadata plugin
|
@@ -2425,6 +2425,38 @@ function _createFilename(selectionSetNames) {
|
|
2425
2425
|
const title = selectionSetNames.length > 0 ? selectionSetNames.join(", ") : "download";
|
2426
2426
|
return title;
|
2427
2427
|
}
|
2428
|
+
/**
|
2429
|
+
* Creates relationship queries for each relationship flag in a popup.
|
2430
|
+
* @param layer Layer whose popup is to be examined
|
2431
|
+
* @return Hash of relationships by their id, or null if there are no relationship flags in the
|
2432
|
+
* popup; each relationship has the properties layer and relatedQuery for the related layer
|
2433
|
+
* and the query for that layer
|
2434
|
+
*/
|
2435
|
+
function _createRelationshipQueries(layer) {
|
2436
|
+
const relationships = {};
|
2437
|
+
const relationshipFieldPattern = /\{relationships\/\d+\//gm;
|
2438
|
+
const relationshipIdPattern = /\d+/;
|
2439
|
+
// Test if this popup has any relationship references
|
2440
|
+
const matches = layer.popupTemplate.content[0].text.match(relationshipFieldPattern);
|
2441
|
+
if (matches) {
|
2442
|
+
matches.forEach(match => {
|
2443
|
+
// Add a query to a found relationship if we don't already have one
|
2444
|
+
const id = match.match(relationshipIdPattern)[0];
|
2445
|
+
if (!relationships.hasOwnProperty(id)) {
|
2446
|
+
const relatedQuery = {
|
2447
|
+
outFields: ['*'],
|
2448
|
+
relationshipId: id,
|
2449
|
+
returnGeometry: false
|
2450
|
+
};
|
2451
|
+
relationships[id] = {
|
2452
|
+
layer,
|
2453
|
+
relatedQuery
|
2454
|
+
};
|
2455
|
+
}
|
2456
|
+
});
|
2457
|
+
}
|
2458
|
+
return relationships;
|
2459
|
+
}
|
2428
2460
|
/**
|
2429
2461
|
* Prepares an attribute's value by applying domain and type information.
|
2430
2462
|
*
|
@@ -2485,7 +2517,7 @@ function _prepareAttributeValue(attributeValue, attributeType, attributeDomain,
|
|
2485
2517
|
* @returns Promise resolving when function is done
|
2486
2518
|
*/
|
2487
2519
|
async function _prepareLabels(layer, ids, removeDuplicates = true, formatUsingLayerPopup = true, includeHeaderNames = false) {
|
2488
|
-
var _a, _b, _c, _d;
|
2520
|
+
var _a, _b, _c, _d, _e, _f;
|
2489
2521
|
const [intl] = await loadModules(["esri/intl"]);
|
2490
2522
|
// Get the features to export
|
2491
2523
|
const featureSet = await queryFeaturesByID(ids, layer);
|
@@ -2499,6 +2531,7 @@ async function _prepareLabels(layer, ids, removeDuplicates = true, formatUsingLa
|
|
2499
2531
|
const attributeFormats = {};
|
2500
2532
|
// Get the label formatting, if any
|
2501
2533
|
let labelFormat;
|
2534
|
+
let relationshipQueries = {};
|
2502
2535
|
let arcadeExecutors = {};
|
2503
2536
|
if (layer.popupEnabled) {
|
2504
2537
|
layer.popupTemplate.fieldInfos.forEach(
|
@@ -2527,6 +2560,8 @@ async function _prepareLabels(layer, ids, removeDuplicates = true, formatUsingLa
|
|
2527
2560
|
}
|
2528
2561
|
else if (formatUsingLayerPopup && ((_d = (_c = layer.popupTemplate) === null || _c === void 0 ? void 0 : _c.content[0]) === null || _d === void 0 ? void 0 : _d.type) === "text") {
|
2529
2562
|
labelFormat = _convertPopupTextToLabelSpec(layer.popupTemplate.content[0].text);
|
2563
|
+
// Do we need any relationship queries?
|
2564
|
+
relationshipQueries = _createRelationshipQueries(layer);
|
2530
2565
|
// Do we need any Arcade executors?
|
2531
2566
|
arcadeExecutors = await _createArcadeExecutors(labelFormat, layer);
|
2532
2567
|
}
|
@@ -2538,33 +2573,64 @@ async function _prepareLabels(layer, ids, removeDuplicates = true, formatUsingLa
|
|
2538
2573
|
const arcadeExpressionRegExp = /\{expression\/\w+\}/g;
|
2539
2574
|
const attributeRegExp = /\{\w+\}/g;
|
2540
2575
|
// Find the label fields that we need to replace with values
|
2541
|
-
const arcadeExpressionMatches = labelFormat.match(arcadeExpressionRegExp);
|
2542
|
-
const attributeMatches = labelFormat.match(attributeRegExp);
|
2576
|
+
const arcadeExpressionMatches = (_e = labelFormat.match(arcadeExpressionRegExp)) !== null && _e !== void 0 ? _e : [];
|
2577
|
+
const attributeMatches = (_f = labelFormat.match(attributeRegExp)) !== null && _f !== void 0 ? _f : [];
|
2543
2578
|
// Convert feature attributes into an array of labels
|
2544
|
-
|
2579
|
+
const relationshipKeys = Object.keys(relationshipQueries);
|
2580
|
+
labels = await Promise.all(featureSet.features.map(async (feature) => {
|
2545
2581
|
let labelPrep = labelFormat;
|
2546
|
-
// Replace Arcade expressions
|
2547
|
-
|
2548
|
-
|
2549
|
-
|
2550
|
-
|
2551
|
-
|
2552
|
-
|
2553
|
-
|
2554
|
-
|
2555
|
-
|
2556
|
-
|
2557
|
-
|
2558
|
-
|
2559
|
-
|
2582
|
+
// Replace Arcade expressions in this feature
|
2583
|
+
arcadeExpressionMatches.forEach((match) => {
|
2584
|
+
const expressionName = match.substring(match.indexOf("/") + 1, match.length - 1);
|
2585
|
+
const value = arcadeExecutors[expressionName].execute({ "$feature": feature });
|
2586
|
+
labelPrep = labelPrep.replace(match, value);
|
2587
|
+
});
|
2588
|
+
// Replace relationship expressions in this feature
|
2589
|
+
const relatedFeatureQueries = [];
|
2590
|
+
const relationshipIds = [];
|
2591
|
+
relationshipKeys.forEach((relationshipId) => {
|
2592
|
+
const relationship = relationshipQueries[relationshipId];
|
2593
|
+
const objectId = feature.attributes[relationship.layer.objectIdField];
|
2594
|
+
const relatedQuery = Object.assign(Object.assign({}, relationship.relatedQuery), { objectIds: [objectId] });
|
2595
|
+
relatedFeatureQueries.push(relationship.layer.queryRelatedFeatures(relatedQuery));
|
2596
|
+
relationshipIds.push(relationshipId);
|
2597
|
+
});
|
2598
|
+
// Wait for all of the queries for related records for this label
|
2599
|
+
const relatedFeatureQueryResults = await Promise.all(relatedFeatureQueries);
|
2600
|
+
relatedFeatureQueryResults.forEach((relatedFeatureQueryResult, i) => {
|
2601
|
+
// We have an object with FeatureSets grouped by source layer or table objectIds
|
2602
|
+
const relationshipId = relationshipIds[i];
|
2603
|
+
// Run through the source layer or table objectIds
|
2604
|
+
Object.keys(relatedFeatureQueryResult).forEach(relatedFeatureSetId => {
|
2605
|
+
// We have a feature set
|
2606
|
+
const relatedFeatures = relatedFeatureQueryResult[relatedFeatureSetId].features;
|
2607
|
+
// Get the values from each feature and replace them in the label
|
2608
|
+
relatedFeatures.forEach(feature => {
|
2609
|
+
// Merge the base and related feature attributes and create the label
|
2610
|
+
// Prefix related feature's attributes with "relationships/<id>/" to match popup
|
2611
|
+
const rePrefix = "\{relationships/" + relationshipId + "/";
|
2612
|
+
const reSuffix = "\}";
|
2613
|
+
const attributes = feature.attributes;
|
2614
|
+
Object.keys(attributes).forEach(attributeName => {
|
2615
|
+
// Replace the value using the attribute name as a relationship
|
2616
|
+
const attributeRelationshipRegExp = new RegExp(rePrefix + attributeName + reSuffix, "g");
|
2617
|
+
labelPrep = labelPrep.replaceAll(attributeRelationshipRegExp, attributes[attributeName]);
|
2618
|
+
});
|
2619
|
+
});
|
2560
2620
|
});
|
2561
|
-
}
|
2621
|
+
});
|
2622
|
+
// Replace non-Arcade fields in this feature
|
2623
|
+
attributeMatches.forEach((match) => {
|
2624
|
+
const attributeName = match.substring(1, match.length - 1);
|
2625
|
+
const value = _prepareAttributeValue(feature.attributes[attributeName], attributeTypes[attributeName], attributeDomains[attributeName], attributeFormats[attributeName], intl);
|
2626
|
+
labelPrep = labelPrep.replace(match, value);
|
2627
|
+
});
|
2562
2628
|
// Split label into lines
|
2563
2629
|
let label = labelPrep.split(lineSeparatorChar);
|
2564
2630
|
// Trim lines
|
2565
2631
|
label = label.map(line => line.trim());
|
2566
2632
|
return label;
|
2567
|
-
});
|
2633
|
+
}));
|
2568
2634
|
}
|
2569
2635
|
else {
|
2570
2636
|
// Export all attributes
|
@@ -4,7 +4,7 @@
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
6
|
import { a as commonjsGlobal, c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-d5f9d613.js';
|
7
|
-
import { _ as _typeof_1 } from './downloadUtils-
|
7
|
+
import { _ as _typeof_1 } from './downloadUtils-2ebeb46d.js';
|
8
8
|
import './index-d298aca9.js';
|
9
9
|
import './loadModules-cd3569de.js';
|
10
10
|
import './locale-54cac39a.js';
|
@@ -7,7 +7,7 @@ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent
|
|
7
7
|
import { l as loadModules } from './loadModules-cd3569de.js';
|
8
8
|
import { g as getLocaleComponentStrings } from './locale-54cac39a.js';
|
9
9
|
import { i as getMapLayerIds, b as getMapLayerView, g as goToSelection, j as queryAllFeatures } from './mapViewUtils-ebbd4733.js';
|
10
|
-
import { d as downloadCSV } from './downloadUtils-
|
10
|
+
import { d as downloadCSV } from './downloadUtils-2ebeb46d.js';
|
11
11
|
import { g as EExpandType } from './interfaces-523c6558.js';
|
12
12
|
import './_commonjsHelpers-d5f9d613.js';
|
13
13
|
|