@arcgis/portal-components 6.0.0-next.43 → 6.0.0-next.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/FFTXNKIV.js +2 -0
- package/dist/cdn/K3Z2K3M4.js +100 -0
- package/dist/cdn/LH47JYFW.js +2 -0
- package/dist/cdn/assets/portal-extent-picker/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/createPortalTool.js +32 -12
- package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +2 -0
- package/dist/components/arcgis-portal-ai-assistant/customElement.js +446 -403
- package/dist/components/arcgis-portal-ai-assistant/types/assistantTools.d.ts +38 -5
- package/dist/components/arcgis-portal-extent-picker/customElement.d.ts +2 -0
- package/dist/components/arcgis-portal-extent-picker/customElement.js +288 -236
- package/dist/components/arcgis-portal-extent-picker/index.js +3 -2
- package/dist/components/arcgis-portal-extent-picker-coord-field/customElement.js +28 -27
- package/dist/components/arcgis-portal-navigation/index.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +69 -69
- package/dist/loader.js +1 -1
- package/package.json +8 -8
- package/dist/cdn/OXF2WDSW.js +0 -2
- package/dist/cdn/QKRLO5CJ.js +0 -2
- package/dist/cdn/SCIZKRKA.js +0 -93
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { intersectionExecute as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import * as
|
|
13
|
-
import
|
|
14
|
-
import * as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import * as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
class q {
|
|
2
|
+
import { c as G } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as T, html as m } from "lit";
|
|
4
|
+
import V from "@arcgis/core/Basemap.js";
|
|
5
|
+
import M from "@arcgis/core/Color.js";
|
|
6
|
+
import E from "@arcgis/core/config.js";
|
|
7
|
+
import f from "@arcgis/core/geometry/Extent.js";
|
|
8
|
+
import { intersectionExecute as D } from "@arcgis/core/geometry/operators/intersectionOperator.js";
|
|
9
|
+
import v from "@arcgis/core/geometry/Point.js";
|
|
10
|
+
import d from "@arcgis/core/geometry/Polygon.js";
|
|
11
|
+
import I from "@arcgis/core/geometry/SpatialReference.js";
|
|
12
|
+
import * as k from "@arcgis/core/geometry/support/webMercatorUtils.js";
|
|
13
|
+
import y from "@arcgis/core/Graphic.js";
|
|
14
|
+
import * as $ from "@arcgis/core/intl.js";
|
|
15
|
+
import L from "@arcgis/core/layers/GraphicsLayer.js";
|
|
16
|
+
import N from "@arcgis/core/layers/Layer.js";
|
|
17
|
+
import z from "@arcgis/core/layers/TileLayer.js";
|
|
18
|
+
import O from "@arcgis/core/layers/VectorTileLayer.js";
|
|
19
|
+
import j from "@arcgis/core/layers/MapImageLayer.js";
|
|
20
|
+
import B from "@arcgis/core/Map.js";
|
|
21
|
+
import W from "@arcgis/core/portal/PortalItem.js";
|
|
22
|
+
import A from "@arcgis/core/request.js";
|
|
23
|
+
import * as U from "@arcgis/core/rest/geometryService.js";
|
|
24
|
+
import q from "@arcgis/core/rest/support/ProjectParameters.js";
|
|
25
|
+
import R from "@arcgis/core/symbols/SimpleFillSymbol.js";
|
|
26
|
+
import { LitElement as J, createEvent as C, safeStyleMap as S, safeClassMap as _ } from "@arcgis/lumina";
|
|
27
|
+
import { createRef as x, ref as u } from "lit/directives/ref.js";
|
|
28
|
+
import { u as H } from "../../chunks/useT9n.js";
|
|
29
|
+
const X = T`.extent-picker-modal{z-index:1001}.extent-picker-content{display:flex;min-height:100%;height:100%}.side-panel{padding:var(--calcite-space-lg);display:flex;flex-direction:column;overflow-y:auto;max-height:100%;width:420px}.extent-button{margin-top:var(--calcite-space-lg)}.use-location-header{margin-top:var(--calcite-space-3xl);margin-bottom:var(--calcite-space-lg)}.search-container{width:100%}.search-container .esri-search,.search-container arcgis-search{width:100%}.search-container calcite-autocomplete{width:100%}.map-panel{flex:1 1 0%;position:relative;display:flex}.map-loader{position:absolute;z-index:var(--calcite-z-index-1);top:50%;left:50%;transform:translate(-50%,-50%)}.map-container{flex:1 1 0%;opacity:0;transition:opacity .3s ease}.loader-container{flex:1 1 0%}.map-container--loaded{opacity:1}.coordinates-section{margin-top:var(--calcite-space-lg)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}`;
|
|
30
|
+
class Y {
|
|
32
31
|
constructor(t) {
|
|
33
32
|
this.outerRing = [
|
|
34
33
|
[180, -90],
|
|
@@ -39,13 +38,13 @@ class q {
|
|
|
39
38
|
], this.map = t;
|
|
40
39
|
}
|
|
41
40
|
init() {
|
|
42
|
-
this.maskSymbol = new
|
|
41
|
+
this.maskSymbol = new R({
|
|
43
42
|
color: [0, 0, 0, 0.5],
|
|
44
43
|
outline: {
|
|
45
44
|
color: [128, 128, 128, 0.5],
|
|
46
45
|
width: "0px"
|
|
47
46
|
}
|
|
48
|
-
}), this.maskLayer = new
|
|
47
|
+
}), this.maskLayer = new L({ id: "maskLayer " }), this.overlapLayer = new L({ id: "overlapLayer" }), this.map?.add(this.maskLayer), this.map?.add(this.overlapLayer);
|
|
49
48
|
}
|
|
50
49
|
hide() {
|
|
51
50
|
this.maskLayer.visible = !1;
|
|
@@ -74,15 +73,38 @@ class q {
|
|
|
74
73
|
const i = {};
|
|
75
74
|
if (!t)
|
|
76
75
|
return i;
|
|
76
|
+
const { spatialReference: a } = t;
|
|
77
|
+
if (!a.isWGS84 && !a.isWebMercator) {
|
|
78
|
+
if (!this.mapExtent)
|
|
79
|
+
return i;
|
|
80
|
+
const { xmin: o, ymin: l, xmax: p, ymax: w } = this.mapExtent, F = [
|
|
81
|
+
[
|
|
82
|
+
[p, l],
|
|
83
|
+
[o, l],
|
|
84
|
+
[o, w],
|
|
85
|
+
[p, w],
|
|
86
|
+
[p, l]
|
|
87
|
+
]
|
|
88
|
+
];
|
|
89
|
+
t.xmin !== t.xmax && t.ymin !== t.ymax && F.push([
|
|
90
|
+
[t.xmin, t.ymin],
|
|
91
|
+
[t.xmax, t.ymin],
|
|
92
|
+
[t.xmax, t.ymax],
|
|
93
|
+
[t.xmin, t.ymax],
|
|
94
|
+
[t.xmin, t.ymin]
|
|
95
|
+
]);
|
|
96
|
+
const P = new d({ rings: F, spatialReference: a });
|
|
97
|
+
return { graphic: new y({ geometry: P, symbol: e }) };
|
|
98
|
+
}
|
|
77
99
|
if (t.type === "extent" && t.xmax === t.xmin) {
|
|
78
|
-
const
|
|
79
|
-
return i.graphic = new
|
|
100
|
+
const o = new d({ rings: [this.outerRing] });
|
|
101
|
+
return i.graphic = new y({ geometry: o, symbol: e }), i;
|
|
80
102
|
}
|
|
81
103
|
t = this.toWGS84(t);
|
|
82
|
-
let
|
|
104
|
+
let n, s;
|
|
83
105
|
if (t.type === "extent") {
|
|
84
|
-
const
|
|
85
|
-
|
|
106
|
+
const o = this.checkPolyOverlap(t);
|
|
107
|
+
o ? (n = o?.ring?.reverse(), s = o?.oring?.reverse()) : n = [
|
|
86
108
|
[t.xmin, t.ymax],
|
|
87
109
|
[t.xmax, t.ymax],
|
|
88
110
|
[t.xmax, t.ymin],
|
|
@@ -90,12 +112,12 @@ class q {
|
|
|
90
112
|
[t.xmin, t.ymax]
|
|
91
113
|
];
|
|
92
114
|
}
|
|
93
|
-
let
|
|
94
|
-
t.xmin === t.xmax ?
|
|
95
|
-
const
|
|
96
|
-
rings:
|
|
115
|
+
let r = [];
|
|
116
|
+
t.xmin === t.xmax ? r = [this.outerRing] : r = [this.outerRing, n?.reverse() || [[]]];
|
|
117
|
+
const h = new d({
|
|
118
|
+
rings: r
|
|
97
119
|
});
|
|
98
|
-
return
|
|
120
|
+
return s && (i.overlap = s), i.graphic = new y({ geometry: h, symbol: e }), i;
|
|
99
121
|
}
|
|
100
122
|
checkPolyOverlap(t) {
|
|
101
123
|
const e = {};
|
|
@@ -112,167 +134,185 @@ class q {
|
|
|
112
134
|
[t.xmax, t.ymax],
|
|
113
135
|
[-180, t.ymax],
|
|
114
136
|
[-180, t.ymin]
|
|
115
|
-
],
|
|
116
|
-
return
|
|
137
|
+
], n = 180 - Math.abs(t.xmax), s = 180 - Math.abs(t.xmin);
|
|
138
|
+
return n > s ? (e.ring = a, e.oring = i) : (e.ring = i, e.oring = a), e;
|
|
117
139
|
} else
|
|
118
140
|
return;
|
|
119
141
|
}
|
|
120
142
|
toWGS84(t) {
|
|
121
|
-
const e = new
|
|
122
|
-
return
|
|
143
|
+
const e = new I({ wkid: 4326 });
|
|
144
|
+
return k.canProject(t, e) ? k.project(t, e) : t;
|
|
123
145
|
}
|
|
124
146
|
}
|
|
125
|
-
|
|
126
|
-
|
|
147
|
+
const g = 200375083427892e-7;
|
|
148
|
+
function Z(c) {
|
|
149
|
+
const t = c, e = Number(t?.xmin), i = Number(t?.xmax), a = Number(t?.ymin), n = Number(t?.ymax);
|
|
150
|
+
if (![e, i, a, n].every(Number.isFinite))
|
|
151
|
+
return { wkid: 4326 };
|
|
152
|
+
const s = Math.max(Math.abs(e), Math.abs(i)), r = Math.max(Math.abs(a), Math.abs(n));
|
|
153
|
+
return s <= 180 && r <= 90 ? { wkid: 4326 } : s <= g && r <= g ? { wkid: 3857 } : { wkid: 4326 };
|
|
154
|
+
}
|
|
155
|
+
function b(c) {
|
|
156
|
+
if (!c || typeof c != "object")
|
|
157
|
+
return null;
|
|
158
|
+
const t = c, e = typeof t.toJSON == "function" ? t.toJSON() : c;
|
|
159
|
+
return e.spatialReference || (e.spatialReference = Z(e)), e;
|
|
160
|
+
}
|
|
161
|
+
function K(c) {
|
|
162
|
+
if (!c)
|
|
127
163
|
return;
|
|
128
|
-
let t =
|
|
129
|
-
t.endsWith("/") || (t += "/"),
|
|
164
|
+
let t = E.assetsPath;
|
|
165
|
+
t.endsWith("/") || (t += "/"), c?.firstElementChild?.insertAdjacentHTML(
|
|
130
166
|
"beforebegin",
|
|
131
167
|
`<link rel="stylesheet" href="${t}esri/themes/light/main.css" />`
|
|
132
168
|
);
|
|
133
169
|
}
|
|
134
|
-
class
|
|
170
|
+
class Q extends J {
|
|
135
171
|
constructor() {
|
|
136
|
-
super(...arguments), this.polygonSymbol = new
|
|
172
|
+
super(...arguments), this.polygonSymbol = new R({
|
|
137
173
|
style: "solid",
|
|
138
|
-
color: new
|
|
174
|
+
color: new M([227, 139, 79, 0]),
|
|
139
175
|
outline: {
|
|
140
|
-
color: new
|
|
176
|
+
color: new M([65, 105, 255]),
|
|
141
177
|
width: 0
|
|
142
178
|
}
|
|
143
|
-
}), this.dlOverlapSymbol = new
|
|
179
|
+
}), this.dlOverlapSymbol = new R({
|
|
144
180
|
style: "solid",
|
|
145
181
|
color: [255, 0, 0, 0.5],
|
|
146
182
|
outline: {
|
|
147
183
|
color: [65, 105, 255],
|
|
148
184
|
width: 0
|
|
149
185
|
}
|
|
150
|
-
}), this.messages =
|
|
186
|
+
}), this.messages = H(), this.searchComponent = x(), this.sketchComponent = x(), this.mapContainer = x(), this.sketchListenersAdded = !1, this.searchInitialized = !1, this.topCoordField = x(), this.bottomCoordField = x(), this.leftCoordField = x(), this.rightCoordField = x(), this.minLatLabel = "", this.maxLatLabel = "", this.minLngLabel = "", this.maxLngLabel = "", this.firstLoad = !0, this.ymax = "0", this.ymin = "0", this.xmin = "0", this.xmax = "0", this.isDrawStart = !1, this.isReverting = !1, this.revertStatusMessage = "", this.loading = !0, this.active = !1, this.contentOnly = !1, this.isArea = !1, this.arcgisExtentPickerChange = C(), this.arcgisExtentPickerClose = C(), this.arcgisExtentPickerSave = C();
|
|
151
187
|
}
|
|
152
188
|
static {
|
|
153
|
-
this.properties = { ymax: 16, ymin: 16, xmin: 16, xmax: 16, isDrawStart: 16, loading: 16, featureExtent: 16, initialValue: 16, active: 5, extentValue: 0, itemId: 1, portal: 0, extentService: 1, contentOnly: 5, isArea: 5 };
|
|
189
|
+
this.properties = { ymax: 16, ymin: 16, xmin: 16, xmax: 16, isDrawStart: 16, isReverting: 16, revertStatusMessage: 16, loading: 16, featureExtent: 16, initialValue: 16, active: 5, extentValue: 0, itemId: 1, portal: 0, extentService: 1, contentOnly: 5, isArea: 5 };
|
|
154
190
|
}
|
|
155
191
|
static {
|
|
156
|
-
this.styles =
|
|
192
|
+
this.styles = X;
|
|
157
193
|
}
|
|
158
194
|
getExtent() {
|
|
159
195
|
return this.getExtentValue();
|
|
160
196
|
}
|
|
161
197
|
async load() {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
198
|
+
const t = this.el.closest("[lang]")?.getAttribute("lang") || document.documentElement.lang;
|
|
199
|
+
if (t && $.setLocale(t), this.minLatLabel = this.formatAxisLabel(-90), this.maxLatLabel = this.formatAxisLabel(90), this.minLngLabel = this.formatAxisLabel(-180), this.maxLngLabel = this.formatAxisLabel(180), this.portal) {
|
|
200
|
+
const e = this.portal.url.replace("/sharing/rest/", "");
|
|
201
|
+
e !== E.portalUrl && (E.portalUrl = e);
|
|
165
202
|
}
|
|
166
|
-
if (this.itemId && (this.item = new
|
|
203
|
+
if (this.itemId && (this.item = new W({
|
|
167
204
|
id: this.itemId,
|
|
168
205
|
portal: this.portal
|
|
169
|
-
}), await this.item.load()), this.portal && (this.orgExtent = this.portal.defaultExtent
|
|
170
|
-
const
|
|
206
|
+
}), await this.item.load()), this.portal && (this.orgExtent = b(this.portal.defaultExtent)), this.portal?.region) {
|
|
207
|
+
const e = this.portal.region, a = (await A(`${this.portal.url.replace("/sharing/rest/", "")}/sharing/rest/portals/self?region=${e}&default=true&f=pjson`, {
|
|
171
208
|
responseType: "json"
|
|
172
209
|
})).data;
|
|
173
|
-
this.orgRegionExtent =
|
|
210
|
+
this.orgRegionExtent = b(a.defaultExtent);
|
|
174
211
|
}
|
|
175
212
|
}
|
|
176
213
|
async loaded() {
|
|
177
|
-
|
|
214
|
+
K(this.el.shadowRoot), await this.initMap();
|
|
178
215
|
}
|
|
179
216
|
convertToNumber(t) {
|
|
180
217
|
return this.parseNumber(t);
|
|
181
218
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
219
|
+
normalizeItemExtent(t) {
|
|
220
|
+
if (!t || typeof t != "object")
|
|
221
|
+
return null;
|
|
222
|
+
if ("xmin" in t)
|
|
223
|
+
return b(t);
|
|
224
|
+
if (Array.isArray(t) && t.length === 2 && Array.isArray(t[0]) && Array.isArray(t[1])) {
|
|
225
|
+
const e = t[0][0], i = t[0][1], a = t[1][0], n = t[1][1];
|
|
226
|
+
return typeof e == "number" && typeof i == "number" && typeof a == "number" && typeof n == "number" ? new f({
|
|
227
|
+
xmin: e,
|
|
228
|
+
ymin: i,
|
|
229
|
+
xmax: a,
|
|
230
|
+
ymax: n,
|
|
190
231
|
spatialReference: { wkid: 4326 }
|
|
191
|
-
});
|
|
192
|
-
else if (e = this.toWGS84(t), e === t) {
|
|
193
|
-
this.tryAsyncProjection(t);
|
|
194
|
-
return;
|
|
232
|
+
}) : null;
|
|
195
233
|
}
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
async
|
|
199
|
-
const e =
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
async setFeatureExtent(t) {
|
|
237
|
+
const e = await this.toWGS84(t);
|
|
238
|
+
e && (this.featureExtent ? (this.featureExtent.xmin = Math.min(e.xmin, this.featureExtent.xmin), this.featureExtent.ymin = Math.min(e.ymin, this.featureExtent.ymin), this.featureExtent.xmax = Math.max(e.xmax, this.featureExtent.xmax), this.featureExtent.ymax = Math.max(e.ymax, this.featureExtent.ymax)) : this.featureExtent = e);
|
|
239
|
+
}
|
|
240
|
+
async projectGeometry(t, e) {
|
|
241
|
+
if (t.spatialReference.equals(e))
|
|
242
|
+
return t;
|
|
243
|
+
if (k.canProject(t, e))
|
|
244
|
+
return k.project(t, e) ?? void 0;
|
|
245
|
+
const { geometryServiceUrl: i } = E;
|
|
246
|
+
if (!i)
|
|
203
247
|
return;
|
|
204
|
-
const a = (
|
|
205
|
-
|
|
248
|
+
const a = new q({ geometries: [t], outSpatialReference: e });
|
|
249
|
+
return (await U.project(i, a))?.[0];
|
|
206
250
|
}
|
|
207
251
|
async initMap() {
|
|
208
|
-
const t =
|
|
209
|
-
basemap:
|
|
252
|
+
const t = new B({
|
|
253
|
+
basemap: "streets-vector"
|
|
210
254
|
});
|
|
211
255
|
if (this.extentService)
|
|
212
256
|
try {
|
|
213
|
-
const
|
|
257
|
+
const s = this.extentService.trim();
|
|
214
258
|
let r;
|
|
215
|
-
if (/\/VectorTileServer\/?$/iu.test(
|
|
216
|
-
r = new
|
|
217
|
-
url:
|
|
259
|
+
if (/\/VectorTileServer\/?$/iu.test(s))
|
|
260
|
+
r = new O({
|
|
261
|
+
url: s
|
|
218
262
|
});
|
|
219
263
|
else {
|
|
220
|
-
const
|
|
264
|
+
const l = (await A(`${s}?f=pjson`, {
|
|
221
265
|
responseType: "json"
|
|
222
266
|
})).data;
|
|
223
|
-
r =
|
|
224
|
-
url:
|
|
225
|
-
}) : new
|
|
226
|
-
url:
|
|
267
|
+
r = l.singleFusedMapCache === !0 && !!l.tileInfo ? new z({
|
|
268
|
+
url: s
|
|
269
|
+
}) : new j({
|
|
270
|
+
url: s
|
|
227
271
|
});
|
|
228
272
|
}
|
|
229
273
|
await r.load();
|
|
230
|
-
const
|
|
274
|
+
const h = new V({
|
|
231
275
|
baseLayers: [r],
|
|
232
276
|
id: "org_basemap"
|
|
233
277
|
});
|
|
234
|
-
|
|
235
|
-
} catch (
|
|
236
|
-
console.warn("[arcgis-portal-extent-picker] extentService basemap failed to load, using default basemap",
|
|
278
|
+
t.basemap = h;
|
|
279
|
+
} catch (s) {
|
|
280
|
+
console.warn("[arcgis-portal-extent-picker] extentService basemap failed to load, using default basemap", s);
|
|
237
281
|
}
|
|
238
|
-
if (this.mask = new
|
|
239
|
-
const
|
|
240
|
-
|
|
282
|
+
if (this.mask = new Y(t), this.mask.init(), this.dateLineLayer = new L({ id: "dateLineLayer" }), t.add(this.dateLineLayer), this.areasLayer = new L({ id: "areaGraphics" }), t.add(this.areasLayer), this.item?.type === "Feature Service" || this.item?.type === "Map Service") {
|
|
283
|
+
const s = await N.fromPortalItem({ portalItem: this.item });
|
|
284
|
+
s.visible = !1, t.add(s), s.when((r) => {
|
|
285
|
+
const h = async (o) => {
|
|
286
|
+
const l = await o.queryExtent();
|
|
287
|
+
l.extent && await this.setFeatureExtent(l.extent);
|
|
288
|
+
};
|
|
241
289
|
if ("layers" in r)
|
|
242
|
-
for (let
|
|
243
|
-
r.layers.getItemAt(
|
|
244
|
-
|
|
245
|
-
|
|
290
|
+
for (let o = 0; o < r.layers.length; o++) {
|
|
291
|
+
const l = r.layers.getItemAt(o);
|
|
292
|
+
h(l);
|
|
293
|
+
}
|
|
246
294
|
else
|
|
247
|
-
r
|
|
248
|
-
s.extent && this.setFeatureExtent(s.extent);
|
|
249
|
-
});
|
|
295
|
+
h(r);
|
|
250
296
|
});
|
|
251
297
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
zoom: 2,
|
|
265
|
-
center: [0, 0],
|
|
266
|
-
container: this.mapContainer.value
|
|
267
|
-
}), await this.view.when(), this.basemapExtent = this.getBasemapExtent(), this.itemExtent = this.item?.extent, this.extentValue?.xmax !== void 0 && this.extentValue?.xmin !== void 0 && this.extentValue?.ymax !== void 0 && this.extentValue?.ymin !== void 0)
|
|
298
|
+
const e = this.mapContainer.value;
|
|
299
|
+
e.zoom = 2, e.center = [0, 0], e.map = t, await e.viewOnReady();
|
|
300
|
+
const i = e.view;
|
|
301
|
+
this.view = i;
|
|
302
|
+
const a = e.popupElement;
|
|
303
|
+
if (a && (a.dockEnabled = !0, a.dockOptions = {
|
|
304
|
+
buttonEnabled: !1,
|
|
305
|
+
breakpoint: !1,
|
|
306
|
+
position: "bottom-center"
|
|
307
|
+
}), this.basemapExtent = this.getBasemapExtent(), this.mask.mapExtent = this.basemapExtent, this.itemExtent = this.normalizeItemExtent(this.item?.extent), this.extentValue?.xmax !== void 0 && this.extentValue?.xmin !== void 0 && this.extentValue?.ymax !== void 0 && this.extentValue?.ymin !== void 0)
|
|
268
308
|
this.ymin = this.extentValue?.ymin || "0", this.ymax = this.extentValue?.ymax || "0", this.xmax = this.extentValue?.xmax || "0", this.xmin = this.extentValue?.xmin || "0", await this.handleInputChange(), this.initialValue = this.currentExtent;
|
|
269
309
|
else if (this.itemExtent)
|
|
270
310
|
await this.drawExtent(this.itemExtent), this.initialValue = this.itemExtent;
|
|
271
311
|
else if (this.featureExtent)
|
|
272
312
|
await this.drawExtent(this.featureExtent), this.initialValue = this.featureExtent;
|
|
273
313
|
else if (this.portal?.defaultExtent) {
|
|
274
|
-
const
|
|
275
|
-
await this.drawExtent(
|
|
314
|
+
const s = b(this.portal.defaultExtent);
|
|
315
|
+
s && (await this.drawExtent(s), this.initialValue = s);
|
|
276
316
|
}
|
|
277
317
|
await this.initSearchWidget(), this.loading = !1;
|
|
278
318
|
}
|
|
@@ -280,62 +320,66 @@ class H extends B {
|
|
|
280
320
|
try {
|
|
281
321
|
let t, e, i, a;
|
|
282
322
|
if (this.view?.map?.basemap?.hasOwnProperty("baseLayers")) {
|
|
283
|
-
const
|
|
284
|
-
if (
|
|
285
|
-
for (const
|
|
286
|
-
const
|
|
287
|
-
t = t !== void 0 && t
|
|
323
|
+
const n = this.view.map.basemap.baseLayers;
|
|
324
|
+
if (n.length > 0) {
|
|
325
|
+
for (const s of n) {
|
|
326
|
+
const r = s.fullExtent;
|
|
327
|
+
r && (t = t !== void 0 && t < r.xmin ? t : r.xmin, i = i !== void 0 && i < r.ymin ? i : r.ymin, e = e !== void 0 && e > r.xmax ? e : r.xmax, a = a !== void 0 && a > r.ymax ? a : r.ymax);
|
|
288
328
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
329
|
+
if (t !== void 0 && e !== void 0 && i !== void 0 && a !== void 0)
|
|
330
|
+
return new f({
|
|
331
|
+
xmin: t,
|
|
332
|
+
xmax: e,
|
|
333
|
+
ymin: i,
|
|
334
|
+
ymax: a,
|
|
335
|
+
spatialReference: this.view.spatialReference
|
|
336
|
+
});
|
|
296
337
|
}
|
|
297
338
|
}
|
|
298
|
-
return
|
|
299
|
-
ymin: -90,
|
|
300
|
-
ymax: 90,
|
|
301
|
-
xmin: -180,
|
|
302
|
-
xmax: 180,
|
|
303
|
-
spatialReference: { wkid: 4326 }
|
|
304
|
-
});
|
|
339
|
+
return this.createFallbackBasemapExtent();
|
|
305
340
|
} catch {
|
|
306
|
-
return
|
|
307
|
-
ymin: -90,
|
|
308
|
-
ymax: 90,
|
|
309
|
-
xmin: -180,
|
|
310
|
-
xmax: 180,
|
|
311
|
-
spatialReference: { wkid: 4326 }
|
|
312
|
-
});
|
|
341
|
+
return this.createFallbackBasemapExtent();
|
|
313
342
|
}
|
|
314
343
|
}
|
|
344
|
+
createFallbackBasemapExtent() {
|
|
345
|
+
return this.view?.spatialReference?.wkid === 4326 ? new f({
|
|
346
|
+
ymin: -90,
|
|
347
|
+
ymax: 90,
|
|
348
|
+
xmin: -180,
|
|
349
|
+
xmax: 180,
|
|
350
|
+
spatialReference: { wkid: 4326 }
|
|
351
|
+
}) : new f({
|
|
352
|
+
ymin: -g,
|
|
353
|
+
ymax: g,
|
|
354
|
+
xmin: -g,
|
|
355
|
+
xmax: g,
|
|
356
|
+
spatialReference: this.view?.spatialReference
|
|
357
|
+
});
|
|
358
|
+
}
|
|
315
359
|
async drawExtent(t) {
|
|
316
360
|
if (this.isDrawStart = !1, !t || !t.xmin && t.xmin !== 0 || !t.xmax && t.xmax !== 0 || !t.ymin && t.ymin !== 0 || !t.ymax && t.ymax !== 0)
|
|
317
361
|
return;
|
|
318
|
-
const e = new
|
|
362
|
+
const e = new d();
|
|
319
363
|
e.spatialReference = t.spatialReference, e.addRing([
|
|
320
|
-
new
|
|
321
|
-
new
|
|
322
|
-
new
|
|
323
|
-
new
|
|
324
|
-
new
|
|
364
|
+
new v({ x: t.xmin, y: t.ymin }),
|
|
365
|
+
new v({ x: t.xmin, y: t.ymax }),
|
|
366
|
+
new v({ x: t.xmax, y: t.ymax }),
|
|
367
|
+
new v({ x: t.xmax, y: t.ymin }),
|
|
368
|
+
new v({ x: t.xmin, y: t.ymin })
|
|
325
369
|
]), await this.addInitialExtentPicker({ geometry: e });
|
|
326
370
|
}
|
|
327
|
-
toWGS84(t) {
|
|
328
|
-
const e = new
|
|
329
|
-
return
|
|
371
|
+
async toWGS84(t) {
|
|
372
|
+
const e = await this.projectGeometry(t, new I({ wkid: 4326 }));
|
|
373
|
+
return e?.type === "extent" ? e : void 0;
|
|
330
374
|
}
|
|
331
375
|
formatNum(t) {
|
|
332
|
-
return
|
|
376
|
+
return $.formatNumber(t, {
|
|
333
377
|
minimumFractionDigits: 6,
|
|
334
378
|
maximumFractionDigits: 6
|
|
335
379
|
});
|
|
336
380
|
}
|
|
337
381
|
formatAxisLabel(t) {
|
|
338
|
-
return
|
|
382
|
+
return $.formatNumber(t, {
|
|
339
383
|
minimumFractionDigits: 1,
|
|
340
384
|
maximumFractionDigits: 1
|
|
341
385
|
});
|
|
@@ -349,14 +393,22 @@ class H extends B {
|
|
|
349
393
|
return e = this.strippedInvalidChars(e), parseFloat(e);
|
|
350
394
|
}
|
|
351
395
|
async startupSketching(t, e) {
|
|
352
|
-
if (t && (t = this.toMap(t)
|
|
396
|
+
if (!(t && (t = await this.toMap(t), !t)) && (await this.initSketchComponent(), this.clearAllGraphics(), !e))
|
|
353
397
|
if (t) {
|
|
354
|
-
t.type === "extent"
|
|
355
|
-
|
|
398
|
+
const i = t.type === "extent", a = t.type === "extent" ? t : t.extent;
|
|
399
|
+
if (!a)
|
|
400
|
+
return;
|
|
401
|
+
const { spatialReference: n } = a;
|
|
402
|
+
if ((i || !n.isWGS84 && !n.isWebMercator) && (t = d.fromExtent(a)), this.currentExtent = await this.toWGS84(a), !this.currentExtent)
|
|
403
|
+
return;
|
|
404
|
+
this.ymax = this.formatNum(this.currentExtent.ymax), this.ymin = this.formatNum(this.currentExtent.ymin), this.xmin = this.formatNum(this.currentExtent.xmin), this.xmax = this.formatNum(this.currentExtent.xmax), this.firstLoad ? this.firstLoad = !1 : this.arcgisExtentPickerChange.emit(this.getExtentValue());
|
|
405
|
+
const s = D(t, this.basemapExtent);
|
|
406
|
+
s && (t = s);
|
|
407
|
+
const r = new y({
|
|
356
408
|
symbol: this.polygonSymbol,
|
|
357
409
|
geometry: t
|
|
358
410
|
});
|
|
359
|
-
|
|
411
|
+
r.geometry && (this.fallbackExtent = r.geometry.extent, this.areasLayer?.add(r), this.mask?.clear(), this.mask?.update(r.geometry.extent), await this.zoomTo(), await this.activateGraphicUpdate(r));
|
|
360
412
|
} else
|
|
361
413
|
await this.sketchComponent.value?.create("rectangle");
|
|
362
414
|
}
|
|
@@ -378,7 +430,7 @@ class H extends B {
|
|
|
378
430
|
}
|
|
379
431
|
async initSketchComponent() {
|
|
380
432
|
const t = this.sketchComponent.value;
|
|
381
|
-
t && (t.defaultGraphicsLayerDisabled = !0, t.updateOnGraphicClickDisabled = !1, t.layer = this.areasLayer, t.polygonSymbol = this.polygonSymbol, t.view = this.view, this.sketchListenersAdded || (t.addEventListener("arcgisUpdate", (e) => {
|
|
433
|
+
t && (t.defaultGraphicsLayerDisabled = !0, t.creationMode = "single", t.updateOnGraphicClickDisabled = !1, t.layer = this.areasLayer, t.polygonSymbol = this.polygonSymbol, t.view = this.view, this.sketchListenersAdded || (t.addEventListener("arcgisUpdate", (e) => {
|
|
382
434
|
this.handleSketchUpdate(e);
|
|
383
435
|
}), t.addEventListener("arcgisCreate", (e) => {
|
|
384
436
|
this.handleSketchCreate(e);
|
|
@@ -395,54 +447,53 @@ class H extends B {
|
|
|
395
447
|
return;
|
|
396
448
|
const i = e?.graphics?.[0]?.geometry?.extent, a = i && this.mask?.update(i);
|
|
397
449
|
if (e.toolEventInfo.type === "scale-stop" || e.toolEventInfo.type === "move-stop") {
|
|
398
|
-
let
|
|
399
|
-
const s = parseFloat(`${i?.xmax ?? "0"}`).toFixed(6),
|
|
400
|
-
if (s ===
|
|
401
|
-
const
|
|
402
|
-
rings: [
|
|
450
|
+
let n;
|
|
451
|
+
const s = parseFloat(`${i?.xmax ?? "0"}`).toFixed(6), r = parseFloat(`${i?.xmin ?? "0"}`).toFixed(6), h = parseFloat(`${i?.ymax ?? "0"}`).toFixed(6), o = parseFloat(`${i?.ymin ?? "0"}`).toFixed(6);
|
|
452
|
+
if (s === r || h === o ? (n = i, s === r && (n.xmax += 1), h === o && (n.ymax += 1)) : n = e?.graphics?.[0]?.geometry?.extent, a?.overlap) {
|
|
453
|
+
const l = a.graphic?.geometry, p = new d({
|
|
454
|
+
rings: [l?.rings[1]]
|
|
403
455
|
});
|
|
404
|
-
await this.addInitialExtentPicker({ geometry:
|
|
456
|
+
await this.addInitialExtentPicker({ geometry: p.extent });
|
|
405
457
|
} else
|
|
406
|
-
await this.startupSketching(
|
|
458
|
+
await this.startupSketching(n);
|
|
407
459
|
this.isDrawStart = !1;
|
|
408
460
|
} else if (this.dateLineLayer?.removeAll(), a?.overlap) {
|
|
409
|
-
const
|
|
410
|
-
geometry: new
|
|
461
|
+
const n = new y({
|
|
462
|
+
geometry: new d({ rings: [a.overlap] }),
|
|
411
463
|
symbol: this.dlOverlapSymbol
|
|
412
464
|
});
|
|
413
|
-
this.dateLineLayer?.add(
|
|
465
|
+
this.dateLineLayer?.add(n);
|
|
414
466
|
}
|
|
415
467
|
}
|
|
416
468
|
async handleSketchCreate(t) {
|
|
417
469
|
const e = t.detail;
|
|
418
|
-
if (this.dateLineLayer?.removeAll(), !e.graphic)
|
|
470
|
+
if (this.dateLineLayer?.removeAll(), !e.graphic || e.state === "cancel")
|
|
471
|
+
return;
|
|
472
|
+
const i = e.graphic.geometry?.extent;
|
|
473
|
+
if (!i)
|
|
419
474
|
return;
|
|
420
475
|
this.mask?.clear();
|
|
421
|
-
const
|
|
422
|
-
if (a?.overlap ? (this.remainderPoly = new
|
|
423
|
-
geometry: new
|
|
476
|
+
const a = this.mask?.add(i);
|
|
477
|
+
if (a?.overlap ? (this.remainderPoly = new y({
|
|
478
|
+
geometry: new d({ rings: [a.overlap] }),
|
|
424
479
|
symbol: this.dlOverlapSymbol
|
|
425
480
|
}), this.dateLineLayer?.add(this.remainderPoly)) : this.remainderPoly = null, e.state === "complete") {
|
|
426
|
-
let
|
|
427
|
-
const s
|
|
428
|
-
let o
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
if (s === o || n === l)
|
|
432
|
-
s === o && (o = o + 1), n === l && (l = l + 1), r = new p({
|
|
481
|
+
let n = i;
|
|
482
|
+
const { xmin: s, ymin: r, spatialReference: h } = i;
|
|
483
|
+
let { xmax: o, ymax: l } = i;
|
|
484
|
+
if (s === o || r === l)
|
|
485
|
+
s === o && (o = o + 1), r === l && (l = l + 1), n = new f({
|
|
433
486
|
xmin: s,
|
|
434
487
|
xmax: o,
|
|
435
|
-
ymin:
|
|
488
|
+
ymin: r,
|
|
436
489
|
ymax: l,
|
|
437
|
-
spatialReference:
|
|
490
|
+
spatialReference: h
|
|
438
491
|
});
|
|
439
|
-
else {
|
|
440
|
-
const w = a
|
|
441
|
-
|
|
442
|
-
rings: [w?.rings[1]]
|
|
443
|
-
}).extent;
|
|
492
|
+
else if (a?.overlap && a.graphic?.geometry?.type === "polygon") {
|
|
493
|
+
const { rings: p, spatialReference: w } = a.graphic.geometry;
|
|
494
|
+
n = new d({ rings: [p[1]], spatialReference: w }).extent;
|
|
444
495
|
}
|
|
445
|
-
this.remainderPoly ? await this.addInitialExtentPicker({ geometry:
|
|
496
|
+
this.remainderPoly ? await this.addInitialExtentPicker({ geometry: n }) : await this.startupSketching(n), this.isDrawStart = !1, this.mapContainer.value.focus();
|
|
446
497
|
}
|
|
447
498
|
}
|
|
448
499
|
async addInitialExtentPicker(t) {
|
|
@@ -450,8 +501,7 @@ class H extends B {
|
|
|
450
501
|
await this.startupSketching(null, !0);
|
|
451
502
|
return;
|
|
452
503
|
}
|
|
453
|
-
|
|
454
|
-
await this.startupSketching(e);
|
|
504
|
+
await this.startupSketching(t.geometry);
|
|
455
505
|
}
|
|
456
506
|
async zoomTo() {
|
|
457
507
|
if (this.areasLayer?.graphics) {
|
|
@@ -461,7 +511,7 @@ class H extends B {
|
|
|
461
511
|
t = t ? t.union(a) : a;
|
|
462
512
|
}), !t)
|
|
463
513
|
return;
|
|
464
|
-
const e = this.toMap(t.clone().expand(1.
|
|
514
|
+
const e = await this.toMap(t.clone().expand(1.25));
|
|
465
515
|
e && await this.view?.goTo(e);
|
|
466
516
|
}
|
|
467
517
|
}
|
|
@@ -470,8 +520,8 @@ class H extends B {
|
|
|
470
520
|
e.type === "graphics" && e.removeAll();
|
|
471
521
|
});
|
|
472
522
|
}
|
|
473
|
-
toMap(t) {
|
|
474
|
-
return this.view
|
|
523
|
+
async toMap(t) {
|
|
524
|
+
return this.view ? await this.projectGeometry(t, this.view.spatialReference) : t;
|
|
475
525
|
}
|
|
476
526
|
async initSearchWidget() {
|
|
477
527
|
const t = this.searchComponent.value;
|
|
@@ -499,14 +549,14 @@ class H extends B {
|
|
|
499
549
|
};
|
|
500
550
|
}
|
|
501
551
|
async handleInputChange() {
|
|
502
|
-
const t = this.parseNumber(this.ymin), e = this.parseNumber(this.ymax), i = this.parseNumber(this.xmin), a = this.parseNumber(this.xmax),
|
|
552
|
+
const t = this.parseNumber(this.ymin), e = this.parseNumber(this.ymax), i = this.parseNumber(this.xmin), a = this.parseNumber(this.xmax), n = new f({
|
|
503
553
|
spatialReference: { wkid: 4326 },
|
|
504
554
|
xmin: i,
|
|
505
555
|
xmax: a,
|
|
506
556
|
ymin: t,
|
|
507
557
|
ymax: e
|
|
508
558
|
});
|
|
509
|
-
this.currentExtent =
|
|
559
|
+
this.currentExtent = n, await this.drawExtent(n);
|
|
510
560
|
}
|
|
511
561
|
handleSave() {
|
|
512
562
|
if (!this.topCoordField.value.isValid()) {
|
|
@@ -540,54 +590,56 @@ class H extends B {
|
|
|
540
590
|
return await new Promise((e) => setTimeout(e, t));
|
|
541
591
|
}
|
|
542
592
|
renderModal() {
|
|
543
|
-
return
|
|
593
|
+
return m`<calcite-dialog class="extent-picker-modal" role=dialog scale=l outside-close-disabled .open=${this.active} placement=cover @calciteDialogClose=${() => {
|
|
544
594
|
this.arcgisExtentPickerClose.emit();
|
|
545
|
-
}} style=${
|
|
595
|
+
}} style=${S({
|
|
546
596
|
"--calcite-dialog-content-space": "0"
|
|
547
|
-
})} .heading=${this.isArea ? this.messages.setArea : this.messages.setExtent} heading-level=3><div class="extent-picker-content">${this.renderContent()}</div>${this.initialValue &&
|
|
548
|
-
this.initialValue && (this.isDrawStart && (this.isDrawStart = !1, await this.sketchComponent.value?.cancel(), this.startupSketching(this.fallbackExtent)), this.ymin = "0", this.ymax = "0", this.xmin = "0", this.xmax = "0", await this.timeout(100), await this.drawExtent(this.initialValue))
|
|
597
|
+
})} .heading=${this.isArea ? this.messages.setArea : this.messages.setExtent} heading-level=3><div class="extent-picker-content">${this.renderContent()}</div><div class="sr-only" role=status aria-live=polite>${this.revertStatusMessage}</div>${this.initialValue && m`<calcite-button appearance=outline slot=footer-start icon-start=reset @click=${async () => {
|
|
598
|
+
this.initialValue && (this.isDrawStart && (this.isDrawStart = !1, await this.sketchComponent.value?.cancel(), this.startupSketching(this.fallbackExtent)), this.isReverting = !0, this.ymin = "0", this.ymax = "0", this.xmin = "0", this.xmax = "0", await this.timeout(100), this.isReverting = !1, await this.drawExtent(this.initialValue), this.revertStatusMessage = this.messages.revertSuccess || "Changes are reverted successfully.", setTimeout(() => {
|
|
599
|
+
this.revertStatusMessage = "";
|
|
600
|
+
}, 2e3));
|
|
549
601
|
}}>${this.messages.revert}</calcite-button>` || ""}<calcite-button appearance=outline slot=footer-end @click=${() => this.arcgisExtentPickerClose.emit()}>${this.messages.cancel}</calcite-button><calcite-button slot=footer-end @click=${async () => this.handleSave()}>${this.messages.save}</calcite-button></calcite-dialog>`;
|
|
550
602
|
}
|
|
551
603
|
renderContent() {
|
|
552
604
|
const t = !!(this.portal && !this.portal.id), e = !!(this.orgExtent && !t), i = !!(this.orgRegionExtent && !t), a = !!this.featureExtent;
|
|
553
|
-
return
|
|
605
|
+
return m`<div class="side-panel">${!(!e && !i && !a) && m`<div>${this.isArea ? this.messages.areaBasedOn : this.messages.extentBasedOn}</div>${e && m`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=organization @click=${() => {
|
|
554
606
|
this.drawExtent(this.orgExtent);
|
|
555
|
-
}}>${this.messages.orgExtent}</calcite-button>` || ""}${i &&
|
|
607
|
+
}}>${this.messages.orgExtent}</calcite-button>` || ""}${i && m`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=organization @click=${() => {
|
|
556
608
|
this.drawExtent(this.orgRegionExtent);
|
|
557
|
-
}}>${this.messages.orgRegion}</calcite-button>` || ""}${a &&
|
|
609
|
+
}}>${this.messages.orgRegion}</calcite-button>` || ""}${a && m`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=feature-layer @click=${() => {
|
|
558
610
|
this.drawExtent(this.featureExtent);
|
|
559
|
-
}}>${this.messages.currentFeatures}</calcite-button>` || ""}` || ""}<div class="use-location-header">${this.messages.useLocation}</div><div class="search-container"><arcgis-search popup-disabled result-graphic-disabled ${
|
|
560
|
-
this.isDrawStart = !this.isDrawStart, this.isDrawStart ? (
|
|
561
|
-
}}></calcite-action></div><div class="coordinates-section"><calcite-
|
|
611
|
+
}}>${this.messages.currentFeatures}</calcite-button>` || ""}` || ""}<div class="use-location-header">${this.messages.useLocation}</div><div class="search-container"><arcgis-search popup-disabled result-graphic-disabled ${u(this.searchComponent)}></arcgis-search></div><div><div class="use-location-header">${this.isArea ? this.messages.drawAreaTitle : this.messages.drawExtentTitle}</div><calcite-action .text=${(this.isArea ? this.messages.drawArea : this.messages.drawExtent) || ""} text-enabled icon=rectangle-plus .active=${this.isDrawStart} .indicator=${this.isDrawStart} @click=${async () => {
|
|
612
|
+
this.isDrawStart = !this.isDrawStart, this.isDrawStart ? (await this.initSketchComponent(), this.clearAllGraphics(), await this.sketchComponent.value?.create("rectangle")) : (await this.sketchComponent.value?.cancel(), this.startupSketching(this.fallbackExtent));
|
|
613
|
+
}}></calcite-action></div><div class="coordinates-section"><calcite-block-group .label=${this.messages.coordinates ?? "Coordinates"} expand-mode=single scale=l><calcite-block .heading=${this.messages.coordinates} expandable><p>${this.messages.coordinatesDescription}</p><arcgis-portal-extent-picker-coord-field .isReverting=${this.isReverting} input-id=top-coord .label=${this.messages.top} .value=${this.strippedInvalidChars(this.ymax)} .errorMessage=${this.formatLatitudeError(this.messages.invalidTop || "")} min=-90 max=90 @arcgisCoordChange=${(s) => {
|
|
562
614
|
this.ymax = s.detail;
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
}} .relatedErrorMessage=${this.messages.topGreaterThanBottom} .validateRelated=${(s) => s > this.convertToNumber(this.ymin)} ${
|
|
615
|
+
const r = this.bottomCoordField.value.checkRelatedField();
|
|
616
|
+
r && (this.ymin = r), this.handleInputChange();
|
|
617
|
+
}} .relatedErrorMessage=${this.messages.topGreaterThanBottom} .validateRelated=${(s) => s > this.convertToNumber(this.ymin)} ${u(this.topCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field .isReverting=${this.isReverting} input-id=bottom-coord .label=${this.messages.bottom} .value=${this.strippedInvalidChars(this.ymin)} .errorMessage=${this.formatLatitudeError(this.messages.invalidBottom || "")} min=-90 max=90 @arcgisCoordChange=${(s) => {
|
|
566
618
|
this.ymin = s.detail;
|
|
567
|
-
const
|
|
568
|
-
|
|
569
|
-
}} .relatedErrorMessage=${this.messages.bottomLessThanTop} .validateRelated=${(s) => s < this.convertToNumber(this.ymax)} ${
|
|
619
|
+
const r = this.topCoordField.value.checkRelatedField();
|
|
620
|
+
r && (this.ymax = r), this.handleInputChange();
|
|
621
|
+
}} .relatedErrorMessage=${this.messages.bottomLessThanTop} .validateRelated=${(s) => s < this.convertToNumber(this.ymax)} ${u(this.bottomCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field .isReverting=${this.isReverting} input-id=left-coord .label=${this.messages.left} .value=${this.strippedInvalidChars(this.xmin)} .errorMessage=${this.formatLongitudeError(this.messages.invalidLeft || "")} min=-180 max=180 @arcgisCoordChange=${(s) => {
|
|
570
622
|
this.xmin = s.detail;
|
|
571
|
-
const
|
|
572
|
-
|
|
573
|
-
}} .relatedErrorMessage=${this.messages.leftLessThanRight} .validateRelated=${(s) => s < this.convertToNumber(this.xmax)} ${
|
|
623
|
+
const r = this.rightCoordField.value.checkRelatedField();
|
|
624
|
+
r && (this.xmax = r), this.handleInputChange();
|
|
625
|
+
}} .relatedErrorMessage=${this.messages.leftLessThanRight} .validateRelated=${(s) => s < this.convertToNumber(this.xmax)} ${u(this.leftCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field .isReverting=${this.isReverting} input-id=right-coord .label=${this.messages.right} .value=${this.strippedInvalidChars(this.xmax)} .errorMessage=${this.formatLongitudeError(this.messages.invalidRight || "")} min=-180 max=180 @arcgisCoordChange=${(s) => {
|
|
574
626
|
this.xmax = s.detail;
|
|
575
|
-
const
|
|
576
|
-
|
|
577
|
-
}} .relatedErrorMessage=${this.messages.rightGreaterThanLeft} .validateRelated=${(s) => s > this.convertToNumber(this.xmin)} ${
|
|
627
|
+
const r = this.leftCoordField.value.checkRelatedField();
|
|
628
|
+
r && (this.xmin = r), this.handleInputChange();
|
|
629
|
+
}} .relatedErrorMessage=${this.messages.rightGreaterThanLeft} .validateRelated=${(s) => s > this.convertToNumber(this.xmin)} ${u(this.rightCoordField)}></arcgis-portal-extent-picker-coord-field></calcite-block></calcite-block-group></div></div><div class="map-panel">${this.loading && m`<calcite-loader class="map-loader" label="Loading the application"></calcite-loader>` || ""}<arcgis-zoom .view=${this.view} visual-scale=s style=${S({
|
|
578
630
|
zIndex: "1"
|
|
579
|
-
})}></arcgis-zoom><arcgis-sketch hidden default-graphics-layer-disabled style=${
|
|
631
|
+
})}></arcgis-zoom><arcgis-sketch hidden default-graphics-layer-disabled style=${S({
|
|
580
632
|
display: "none"
|
|
581
|
-
})} ${
|
|
633
|
+
})} ${u(this.sketchComponent)}></arcgis-sketch><arcgis-map class=${_({
|
|
582
634
|
"map-container": !0,
|
|
583
635
|
"map-container--loaded": !this.loading
|
|
584
|
-
})} ${
|
|
636
|
+
})} ${u(this.mapContainer)}></arcgis-map></div>`;
|
|
585
637
|
}
|
|
586
638
|
render() {
|
|
587
|
-
return this.contentOnly ?
|
|
639
|
+
return this.contentOnly ? m`<div class="extent-picker-content">${this.renderContent()}</div>` : this.renderModal();
|
|
588
640
|
}
|
|
589
641
|
}
|
|
590
|
-
|
|
642
|
+
G("arcgis-portal-extent-picker", Q);
|
|
591
643
|
export {
|
|
592
|
-
|
|
644
|
+
Q as ArcgisPortalExtentPicker
|
|
593
645
|
};
|