@arcgis/map-components 4.29.0-beta.0 → 4.29.0-beta.1
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/arcgis-map-components/arcgis-map-components.esm.js +1 -1
- package/dist/arcgis-map-components/p-bb6e5f04.entry.js +1 -0
- package/dist/arcgis-map-components/p-bfae0a1f.entry.js +1 -0
- package/dist/cjs/arcgis-expand_4.cjs.entry.js +60 -25
- package/dist/cjs/arcgis-map-components.cjs.js +1 -1
- package/dist/cjs/arcgis-scene.cjs.entry.js +47 -27
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/components/arcgis-feature-table.js +1 -1
- package/dist/components/arcgis-map.js +64 -26
- package/dist/components/arcgis-scene.js +50 -27
- package/dist/esm/arcgis-expand_4.entry.js +60 -25
- package/dist/esm/arcgis-map-components.js +1 -1
- package/dist/esm/arcgis-scene.entry.js +47 -27
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/arcgis-map/arcgis-map.d.ts +12 -3
- package/dist/types/components/arcgis-scene/arcgis-scene.d.ts +8 -2
- package/dist/types/components.d.ts +12 -0
- package/package.json +6 -6
- package/dist/arcgis-map-components/p-06df2252.entry.js +0 -1
- package/dist/arcgis-map-components/p-109bebac.entry.js +0 -1
- package/dist/arcgis-map-components/p-198374aa.entry.js +0 -1
- package/dist/arcgis-map-components/p-1e9abc6d.entry.js +0 -1
- package/dist/arcgis-map-components/p-2165089c.entry.js +0 -1
- package/dist/arcgis-map-components/p-25089dd3.entry.js +0 -1
- package/dist/arcgis-map-components/p-2792ef61.entry.js +0 -1
- package/dist/arcgis-map-components/p-2a84985d.entry.js +0 -1
- package/dist/arcgis-map-components/p-2abff98f.entry.js +0 -1
- package/dist/arcgis-map-components/p-2cf30ef5.entry.js +0 -1
- package/dist/arcgis-map-components/p-30ef17d7.entry.js +0 -1
- package/dist/arcgis-map-components/p-3155dc12.entry.js +0 -1
- package/dist/arcgis-map-components/p-3279d5e4.entry.js +0 -1
- package/dist/arcgis-map-components/p-35b675ca.entry.js +0 -1
- package/dist/arcgis-map-components/p-364d4187.entry.js +0 -1
- package/dist/arcgis-map-components/p-37eceffa.entry.js +0 -1
- package/dist/arcgis-map-components/p-39443d81.entry.js +0 -1
- package/dist/arcgis-map-components/p-3bd2d0aa.entry.js +0 -1
- package/dist/arcgis-map-components/p-3d55c74c.entry.js +0 -1
- package/dist/arcgis-map-components/p-43c52a2d.entry.js +0 -1
- package/dist/arcgis-map-components/p-4dfcfa91.entry.js +0 -1
- package/dist/arcgis-map-components/p-56d3bde2.entry.js +0 -1
- package/dist/arcgis-map-components/p-576ef000.entry.js +0 -1
- package/dist/arcgis-map-components/p-64607de6.entry.js +0 -1
- package/dist/arcgis-map-components/p-69374811.entry.js +0 -1
- package/dist/arcgis-map-components/p-69b6541c.entry.js +0 -1
- package/dist/arcgis-map-components/p-6c3e28cd.entry.js +0 -1
- package/dist/arcgis-map-components/p-737f79f3.entry.js +0 -1
- package/dist/arcgis-map-components/p-76af5d10.entry.js +0 -1
- package/dist/arcgis-map-components/p-7add1ddc.entry.js +0 -1
- package/dist/arcgis-map-components/p-82462685.entry.js +0 -1
- package/dist/arcgis-map-components/p-83b8f950.entry.js +0 -1
- package/dist/arcgis-map-components/p-859d99ff.entry.js +0 -1
- package/dist/arcgis-map-components/p-9040f50a.entry.js +0 -1
- package/dist/arcgis-map-components/p-93b5c951.entry.js +0 -1
- package/dist/arcgis-map-components/p-96b72ddd.js +0 -1
- package/dist/arcgis-map-components/p-99ab4a91.entry.js +0 -1
- package/dist/arcgis-map-components/p-9cfcd5e2.entry.js +0 -1
- package/dist/arcgis-map-components/p-9daf744f.entry.js +0 -1
- package/dist/arcgis-map-components/p-a242b477.entry.js +0 -1
- package/dist/arcgis-map-components/p-a5f78ba3.entry.js +0 -1
- package/dist/arcgis-map-components/p-aed5d6b3.entry.js +0 -1
- package/dist/arcgis-map-components/p-b47a4384.entry.js +0 -1
- package/dist/arcgis-map-components/p-b9acaa74.entry.js +0 -1
- package/dist/arcgis-map-components/p-ba19bf3b.entry.js +0 -1
- package/dist/arcgis-map-components/p-ba6ee56b.entry.js +0 -1
- package/dist/arcgis-map-components/p-c0d9a07e.entry.js +0 -1
- package/dist/arcgis-map-components/p-c6e11b15.entry.js +0 -1
- package/dist/arcgis-map-components/p-dd2f47ce.entry.js +0 -1
- package/dist/arcgis-map-components/p-df6a6059.entry.js +0 -1
- package/dist/arcgis-map-components/p-e15196d8.entry.js +0 -1
- package/dist/arcgis-map-components/p-f03d0e30.entry.js +0 -1
- package/dist/arcgis-map-components/p-f5fd6688.entry.js +0 -1
- package/dist/cjs/arcgis-basemap-gallery_4.cjs.entry.js +0 -548
- package/dist/cjs/arcgis-feature-table.cjs.entry.js +0 -300
- package/dist/esm/arcgis-basemap-gallery_4.entry.js +0 -541
- package/dist/esm/arcgis-feature-table.entry.js +0 -296
- package/dist/esm/index-60c6bcb8.js +0 -660
|
@@ -1,541 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
|
|
2
|
-
import { n as newWidgetsBasemapGallery, i as importCoreReactiveUtils, a as newWidgetsExpand, b as importConfig, c as newWebMap, d as newViewsMapView, e as newWidgetsSearch } from './index-60c6bcb8.js';
|
|
3
|
-
import { r as referenceElementHelper, c as checkForView } from './component-utils-2ebdae59.js';
|
|
4
|
-
import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
|
|
5
|
-
import { d as disableNavigation } from './mapping-utils-26beb904.js';
|
|
6
|
-
|
|
7
|
-
const arcgisBasemapGalleryCss = "";
|
|
8
|
-
|
|
9
|
-
const ArcgisBasemapGallery = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
registerInstance(this, hostRef);
|
|
12
|
-
this.widgetReady = createEvent(this, "widgetReady", 7);
|
|
13
|
-
this.referenceElement = undefined;
|
|
14
|
-
this.activeBasemap = undefined;
|
|
15
|
-
this.position = "bottom-left";
|
|
16
|
-
this.expandable = false;
|
|
17
|
-
this.source = undefined;
|
|
18
|
-
this.view = undefined;
|
|
19
|
-
this.widget = undefined;
|
|
20
|
-
}
|
|
21
|
-
//--------------------------------------------------------------------------
|
|
22
|
-
//
|
|
23
|
-
// Watchers
|
|
24
|
-
//
|
|
25
|
-
//--------------------------------------------------------------------------
|
|
26
|
-
positionWatcher(newValue) {
|
|
27
|
-
if (newValue !== undefined && this.widget) {
|
|
28
|
-
if (typeof this.view !== "string") {
|
|
29
|
-
this.view.ui.move(this.childElem, newValue);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
referenceElementWatcher(newValue) {
|
|
34
|
-
referenceElementHelper(this, newValue);
|
|
35
|
-
}
|
|
36
|
-
viewWatcher(newValue) {
|
|
37
|
-
if (newValue !== undefined && this.widget) {
|
|
38
|
-
this.widget.view = newValue;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
//--------------------------------------------------------------------------
|
|
42
|
-
//
|
|
43
|
-
// Lifecycle
|
|
44
|
-
//
|
|
45
|
-
//--------------------------------------------------------------------------
|
|
46
|
-
async componentDidLoad() {
|
|
47
|
-
const params = this._createParams();
|
|
48
|
-
const widget = await newWidgetsBasemapGallery(params);
|
|
49
|
-
this.widget = widget;
|
|
50
|
-
this.widget.when(() => {
|
|
51
|
-
this.source = this.widget.source;
|
|
52
|
-
});
|
|
53
|
-
await this._addWatchers();
|
|
54
|
-
this.widgetReady.emit({ widget: this.widget });
|
|
55
|
-
checkForView(this);
|
|
56
|
-
}
|
|
57
|
-
disconnectedCallback() {
|
|
58
|
-
onDisconnectedHelper(this);
|
|
59
|
-
}
|
|
60
|
-
render() {
|
|
61
|
-
if (this.expandable) {
|
|
62
|
-
return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
|
|
63
|
-
}
|
|
64
|
-
return h("div", { ref: (el) => (this.childElem = el) });
|
|
65
|
-
}
|
|
66
|
-
//--------------------------------------------------------------------------
|
|
67
|
-
//
|
|
68
|
-
// Private Interal Methods
|
|
69
|
-
//
|
|
70
|
-
//--------------------------------------------------------------------------
|
|
71
|
-
async _addWatchers() {
|
|
72
|
-
const { watch } = await importCoreReactiveUtils();
|
|
73
|
-
watch(() => this.widget.source, () => (this.source = this.widget.source));
|
|
74
|
-
watch(() => this.widget.activeBasemap, (basemap) => (this.activeBasemap = basemap));
|
|
75
|
-
}
|
|
76
|
-
_createParams() {
|
|
77
|
-
const params = {
|
|
78
|
-
container: this.childElem
|
|
79
|
-
};
|
|
80
|
-
if (this.view) {
|
|
81
|
-
params.view = this.view;
|
|
82
|
-
}
|
|
83
|
-
return params;
|
|
84
|
-
}
|
|
85
|
-
get el() { return getElement(this); }
|
|
86
|
-
static get watchers() { return {
|
|
87
|
-
"position": ["positionWatcher"],
|
|
88
|
-
"referenceElement": ["referenceElementWatcher"],
|
|
89
|
-
"view": ["viewWatcher"]
|
|
90
|
-
}; }
|
|
91
|
-
};
|
|
92
|
-
ArcgisBasemapGallery.style = arcgisBasemapGalleryCss;
|
|
93
|
-
|
|
94
|
-
const arcgisExpandCss = "arcgis-expand>.esri-expand__content--expanded{background-color:var(--calcite-ui-background)}";
|
|
95
|
-
|
|
96
|
-
const ArcgisExpand = class {
|
|
97
|
-
constructor(hostRef) {
|
|
98
|
-
registerInstance(this, hostRef);
|
|
99
|
-
this.widgetReady = createEvent(this, "widgetReady", 7);
|
|
100
|
-
this.referenceElement = undefined;
|
|
101
|
-
this.position = "top-right";
|
|
102
|
-
this.view = undefined;
|
|
103
|
-
this.widget = undefined;
|
|
104
|
-
}
|
|
105
|
-
//--------------------------------------------------------------------------
|
|
106
|
-
//
|
|
107
|
-
// Watchers
|
|
108
|
-
//
|
|
109
|
-
//--------------------------------------------------------------------------
|
|
110
|
-
positionWatcher(newValue) {
|
|
111
|
-
if (newValue !== undefined && this.widget) {
|
|
112
|
-
if (typeof this.view !== "string") {
|
|
113
|
-
this.view.ui.move(this.childElem, newValue);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
referenceElementWatcher(newValue) {
|
|
118
|
-
referenceElementHelper(this, newValue);
|
|
119
|
-
}
|
|
120
|
-
viewWatcher(newValue) {
|
|
121
|
-
if (newValue !== undefined && this.widget) {
|
|
122
|
-
this.widget.view = newValue;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
//--------------------------------------------------------------------------
|
|
126
|
-
//
|
|
127
|
-
// Lifecycle
|
|
128
|
-
//
|
|
129
|
-
//--------------------------------------------------------------------------
|
|
130
|
-
async componentDidLoad() {
|
|
131
|
-
const widget = await newWidgetsExpand({
|
|
132
|
-
container: this.childElem
|
|
133
|
-
});
|
|
134
|
-
this.widget = widget;
|
|
135
|
-
if (this.view) {
|
|
136
|
-
this.widget.view = this.view;
|
|
137
|
-
}
|
|
138
|
-
this._checkForView();
|
|
139
|
-
}
|
|
140
|
-
disconnectedCallback() {
|
|
141
|
-
onDisconnectedHelper(this);
|
|
142
|
-
}
|
|
143
|
-
render() {
|
|
144
|
-
return h("div", { ref: (el) => (this.childElem = el) });
|
|
145
|
-
}
|
|
146
|
-
//--------------------------------------------------------------------------
|
|
147
|
-
//
|
|
148
|
-
// Private Internal Methods
|
|
149
|
-
//
|
|
150
|
-
//--------------------------------------------------------------------------
|
|
151
|
-
_checkForView() {
|
|
152
|
-
const viewRef = this.el.closest("arcgis-map") || this.el.closest("arcgis-scene");
|
|
153
|
-
if (viewRef?.view) {
|
|
154
|
-
this.view = viewRef.view;
|
|
155
|
-
this.view.ui.add(this.childElem, this.position);
|
|
156
|
-
this.widgetReady.emit({ widget: this.widget });
|
|
157
|
-
}
|
|
158
|
-
else if (viewRef) {
|
|
159
|
-
const handler = () => {
|
|
160
|
-
this.view = viewRef.view;
|
|
161
|
-
this.view.ui.add(this.childElem, this.position);
|
|
162
|
-
this.widgetReady.emit({ widget: this.widget });
|
|
163
|
-
};
|
|
164
|
-
viewRef.addEventListener("viewReady", handler, false);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
get el() { return getElement(this); }
|
|
168
|
-
static get watchers() { return {
|
|
169
|
-
"position": ["positionWatcher"],
|
|
170
|
-
"referenceElement": ["referenceElementWatcher"],
|
|
171
|
-
"view": ["viewWatcher"]
|
|
172
|
-
}; }
|
|
173
|
-
};
|
|
174
|
-
ArcgisExpand.style = arcgisExpandCss;
|
|
175
|
-
|
|
176
|
-
const arcgisMapCss = ".arcgis-map{padding:0;margin:0;height:100%;width:100%}";
|
|
177
|
-
|
|
178
|
-
const ArcgisMap = class {
|
|
179
|
-
constructor(hostRef) {
|
|
180
|
-
registerInstance(this, hostRef);
|
|
181
|
-
this.viewReady = createEvent(this, "viewReady", 7);
|
|
182
|
-
this.apiKey = undefined;
|
|
183
|
-
this.basemap = undefined;
|
|
184
|
-
this.disableNavigation = false;
|
|
185
|
-
this.itemId = undefined;
|
|
186
|
-
this.zoom = undefined;
|
|
187
|
-
this.center = undefined;
|
|
188
|
-
this.view = undefined;
|
|
189
|
-
}
|
|
190
|
-
//--------------------------------------------------------------------------
|
|
191
|
-
//
|
|
192
|
-
// Watchers
|
|
193
|
-
//
|
|
194
|
-
//--------------------------------------------------------------------------
|
|
195
|
-
apiKeyWatcher(value) {
|
|
196
|
-
this.config.apiKey = value;
|
|
197
|
-
}
|
|
198
|
-
itemIdWatcher(value, old) {
|
|
199
|
-
if (value && value !== old) {
|
|
200
|
-
this.loadMap();
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
//--------------------------------------------------------------------------
|
|
204
|
-
//
|
|
205
|
-
// Lifecycle
|
|
206
|
-
//
|
|
207
|
-
//--------------------------------------------------------------------------
|
|
208
|
-
async componentWillLoad() {
|
|
209
|
-
this.config = await importConfig();
|
|
210
|
-
if (this.apiKey) {
|
|
211
|
-
this.config.apiKey = this.apiKey;
|
|
212
|
-
}
|
|
213
|
-
await this.loadMap();
|
|
214
|
-
}
|
|
215
|
-
componentDidRender() {
|
|
216
|
-
if (this.view) {
|
|
217
|
-
this.view.container = this.el;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
render() {
|
|
221
|
-
return h("div", { class: "arcgis-map", ref: (el) => (this.el = el) });
|
|
222
|
-
}
|
|
223
|
-
//--------------------------------------------------------------------------
|
|
224
|
-
//
|
|
225
|
-
// Private Methods
|
|
226
|
-
//
|
|
227
|
-
//--------------------------------------------------------------------------
|
|
228
|
-
async loadMap() {
|
|
229
|
-
const mapParams = {};
|
|
230
|
-
if (this.itemId) {
|
|
231
|
-
mapParams.portalItem = {
|
|
232
|
-
id: this.itemId
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
if (this.basemap) {
|
|
236
|
-
mapParams.basemap = this.basemap;
|
|
237
|
-
}
|
|
238
|
-
const map = await newWebMap(mapParams);
|
|
239
|
-
const params = {};
|
|
240
|
-
if (this.zoom) {
|
|
241
|
-
params.zoom = this.zoom;
|
|
242
|
-
}
|
|
243
|
-
if (this.center) {
|
|
244
|
-
if (typeof this.center === "string") {
|
|
245
|
-
params.center = this.center.split(",").map((x) => Number(x));
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
params.center = this.center;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
const view = await newViewsMapView({
|
|
252
|
-
map,
|
|
253
|
-
...params
|
|
254
|
-
});
|
|
255
|
-
const { watch } = await importCoreReactiveUtils();
|
|
256
|
-
this.view = view;
|
|
257
|
-
watch(() => this.view.center, (center) => {
|
|
258
|
-
const value = `${center.longitude},${center.latitude}`;
|
|
259
|
-
this.center = value;
|
|
260
|
-
});
|
|
261
|
-
watch(() => this.view.zoom, (value) => (this.zoom = value));
|
|
262
|
-
if (this.disableNavigation) {
|
|
263
|
-
disableNavigation(this.view);
|
|
264
|
-
}
|
|
265
|
-
this.view.when(() => this.viewReady.emit({ view: this.view }));
|
|
266
|
-
}
|
|
267
|
-
get hostElem() { return getElement(this); }
|
|
268
|
-
static get watchers() { return {
|
|
269
|
-
"apiKey": ["apiKeyWatcher"],
|
|
270
|
-
"itemId": ["itemIdWatcher"]
|
|
271
|
-
}; }
|
|
272
|
-
};
|
|
273
|
-
ArcgisMap.style = arcgisMapCss;
|
|
274
|
-
|
|
275
|
-
const arcgisSearchCss = "";
|
|
276
|
-
|
|
277
|
-
const ArcgisSearch = class {
|
|
278
|
-
constructor(hostRef) {
|
|
279
|
-
registerInstance(this, hostRef);
|
|
280
|
-
this.widgetReady = createEvent(this, "widgetReady", 7);
|
|
281
|
-
this.searchBlur = createEvent(this, "searchBlur", 7);
|
|
282
|
-
this.searchClear = createEvent(this, "searchClear", 7);
|
|
283
|
-
this.searchComplete = createEvent(this, "searchComplete", 7);
|
|
284
|
-
this.searchFocus = createEvent(this, "searchFocus", 7);
|
|
285
|
-
this.searchStart = createEvent(this, "searchStart", 7);
|
|
286
|
-
this.selectResult = createEvent(this, "selectResult", 7);
|
|
287
|
-
this.suggestComplete = createEvent(this, "suggestComplete", 7);
|
|
288
|
-
this.suggestStart = createEvent(this, "suggestStart", 7);
|
|
289
|
-
this.referenceElement = undefined;
|
|
290
|
-
this.activeMenu = undefined;
|
|
291
|
-
this.activeSource = undefined;
|
|
292
|
-
this.activeSourceIndex = undefined;
|
|
293
|
-
this.allPlaceholder = undefined;
|
|
294
|
-
this.allSources = undefined;
|
|
295
|
-
this.autoSelect = undefined;
|
|
296
|
-
this.defaultSources = undefined;
|
|
297
|
-
this.includeDefaultSources = undefined;
|
|
298
|
-
this.locationEnabled = undefined;
|
|
299
|
-
this.maxResults = undefined;
|
|
300
|
-
this.maxSuggestions = undefined;
|
|
301
|
-
this.minSuggestCharacters = undefined;
|
|
302
|
-
this.popupEnabled = undefined;
|
|
303
|
-
this.popupTemplate = undefined;
|
|
304
|
-
this.portal = undefined;
|
|
305
|
-
this.resultGraphic = undefined;
|
|
306
|
-
this.resultGraphicEnabled = undefined;
|
|
307
|
-
this.results = undefined;
|
|
308
|
-
this.searchAllEnabled = undefined;
|
|
309
|
-
this.searchTerm = undefined;
|
|
310
|
-
this.selectedResult = undefined;
|
|
311
|
-
this.sources = undefined;
|
|
312
|
-
this.suggestions = undefined;
|
|
313
|
-
this.suggestionsEnabled = undefined;
|
|
314
|
-
this.position = "top-right";
|
|
315
|
-
this.expandable = false;
|
|
316
|
-
this.view = undefined;
|
|
317
|
-
this.widget = undefined;
|
|
318
|
-
}
|
|
319
|
-
//--------------------------------------------------------------------------
|
|
320
|
-
//
|
|
321
|
-
// Watchers
|
|
322
|
-
//
|
|
323
|
-
//--------------------------------------------------------------------------
|
|
324
|
-
positionWatcher(newValue) {
|
|
325
|
-
if (newValue !== undefined && this.widget) {
|
|
326
|
-
if (typeof this.view !== "string") {
|
|
327
|
-
this.view.ui.move(this.childElem, newValue);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
activeMenuWatcher(newValue) {
|
|
332
|
-
if (newValue !== undefined && this.widget) {
|
|
333
|
-
this.widget.activeMenu = newValue;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
activeSourceIndexWatcher(newValue) {
|
|
337
|
-
if (newValue !== undefined && this.widget) {
|
|
338
|
-
this.widget.activeSourceIndex = newValue;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
allPlaceholderWatcher(newValue) {
|
|
342
|
-
if (newValue !== undefined && this.widget) {
|
|
343
|
-
this.widget.allPlaceholder = newValue;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
autoSelectWatcher(newValue) {
|
|
347
|
-
if (newValue !== undefined && this.widget) {
|
|
348
|
-
this.widget.autoSelect = newValue;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
includeDefaultSourcesWatcher(newValue) {
|
|
352
|
-
if (newValue !== undefined && this.widget) {
|
|
353
|
-
this.widget.includeDefaultSources = newValue;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
locationEnabledWatcher(newValue) {
|
|
357
|
-
if (newValue !== undefined && this.widget) {
|
|
358
|
-
this.widget.locationEnabled = newValue;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
maxResultsWatcher(newValue) {
|
|
362
|
-
if (newValue !== undefined && this.widget) {
|
|
363
|
-
this.widget.maxResults = newValue;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
maxSuggestionsWatcher(newValue) {
|
|
367
|
-
if (newValue !== undefined && this.widget) {
|
|
368
|
-
this.widget.maxSuggestions = newValue;
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
minSuggestCharactersWatcher(newValue) {
|
|
372
|
-
if (newValue !== undefined && this.widget) {
|
|
373
|
-
this.widget.minSuggestCharacters = newValue;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
popupEnabledWatcher(newValue) {
|
|
377
|
-
if (newValue !== undefined && this.widget) {
|
|
378
|
-
this.widget.popupEnabled = newValue;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
popupTemplateWatcher(newValue) {
|
|
382
|
-
if (newValue !== undefined && this.widget) {
|
|
383
|
-
this.widget.popupTemplate = newValue;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
portalWatcher(newValue) {
|
|
387
|
-
if (newValue !== undefined && this.widget) {
|
|
388
|
-
this.widget.portal = newValue;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
resultGraphicEnabledWatcher(newValue) {
|
|
392
|
-
if (newValue !== undefined && this.widget) {
|
|
393
|
-
this.widget.resultGraphicEnabled = newValue;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
searchAllEnabledWatcher(newValue) {
|
|
397
|
-
if (newValue !== undefined && this.widget) {
|
|
398
|
-
this.widget.searchAllEnabled = newValue;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
searchTermWatcher(newValue) {
|
|
402
|
-
if (newValue !== undefined && this.widget) {
|
|
403
|
-
this.widget.searchTerm = newValue;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
sourcesWatcher(newValue) {
|
|
407
|
-
if (newValue !== undefined && this.widget) {
|
|
408
|
-
this.widget.sources = newValue;
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
suggestionsEnabledWatcher(newValue) {
|
|
412
|
-
if (newValue !== undefined && this.widget) {
|
|
413
|
-
this.widget.suggestionsEnabled = newValue;
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
referenceElementWatcher(newValue) {
|
|
417
|
-
referenceElementHelper(this, newValue);
|
|
418
|
-
}
|
|
419
|
-
viewWatcher(newValue) {
|
|
420
|
-
if (newValue !== undefined && this.widget) {
|
|
421
|
-
this.widget.view = newValue;
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
//--------------------------------------------------------------------------
|
|
425
|
-
//
|
|
426
|
-
// Methods
|
|
427
|
-
//
|
|
428
|
-
//--------------------------------------------------------------------------
|
|
429
|
-
async blurSearch() {
|
|
430
|
-
return this.widget?.blur();
|
|
431
|
-
}
|
|
432
|
-
async clearSearch() {
|
|
433
|
-
return this.widget?.clear();
|
|
434
|
-
}
|
|
435
|
-
async focusSearch() {
|
|
436
|
-
return this.widget?.focus();
|
|
437
|
-
}
|
|
438
|
-
async search(term) {
|
|
439
|
-
return this.widget?.search(term);
|
|
440
|
-
}
|
|
441
|
-
async suggest(term) {
|
|
442
|
-
return this.widget?.suggest(term);
|
|
443
|
-
}
|
|
444
|
-
//--------------------------------------------------------------------------
|
|
445
|
-
//
|
|
446
|
-
// Lifecycle
|
|
447
|
-
//
|
|
448
|
-
//--------------------------------------------------------------------------
|
|
449
|
-
async componentDidLoad() {
|
|
450
|
-
const params = this._createParams();
|
|
451
|
-
const widget = await newWidgetsSearch(params);
|
|
452
|
-
this.widget = widget;
|
|
453
|
-
await this._addWatchers();
|
|
454
|
-
this._proxyEvents();
|
|
455
|
-
this.widgetReady.emit({ widget: this.widget });
|
|
456
|
-
checkForView(this);
|
|
457
|
-
}
|
|
458
|
-
disconnectedCallback() {
|
|
459
|
-
onDisconnectedHelper(this);
|
|
460
|
-
}
|
|
461
|
-
render() {
|
|
462
|
-
if (this.expandable) {
|
|
463
|
-
return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
|
|
464
|
-
}
|
|
465
|
-
return h("div", { ref: (el) => (this.childElem = el) });
|
|
466
|
-
}
|
|
467
|
-
//--------------------------------------------------------------------------
|
|
468
|
-
//
|
|
469
|
-
// Private Interal Methods
|
|
470
|
-
//
|
|
471
|
-
//--------------------------------------------------------------------------
|
|
472
|
-
async _addWatchers() {
|
|
473
|
-
const { watch } = await importCoreReactiveUtils();
|
|
474
|
-
watch(() => this.widget.activeSource, (value) => (this.activeSource = value), {
|
|
475
|
-
initial: true
|
|
476
|
-
});
|
|
477
|
-
watch(() => this.widget.activeSourceIndex, (value) => (this.activeSourceIndex = value), {
|
|
478
|
-
initial: true
|
|
479
|
-
});
|
|
480
|
-
watch(() => this.widget.allSources, (value) => (this.allSources = value), {
|
|
481
|
-
initial: true
|
|
482
|
-
});
|
|
483
|
-
watch(() => this.widget.defaultSources, (value) => (this.defaultSources = value), {
|
|
484
|
-
initial: true
|
|
485
|
-
});
|
|
486
|
-
watch(() => this.widget.resultGraphic, (value) => (this.resultGraphic = value), {
|
|
487
|
-
initial: true
|
|
488
|
-
});
|
|
489
|
-
watch(() => this.widget.results, (value) => (this.results = value), {
|
|
490
|
-
initial: true
|
|
491
|
-
});
|
|
492
|
-
watch(() => this.widget.selectedResult, (value) => (this.selectedResult = value), {
|
|
493
|
-
initial: true
|
|
494
|
-
});
|
|
495
|
-
}
|
|
496
|
-
_createParams() {
|
|
497
|
-
const params = {
|
|
498
|
-
container: this.childElem
|
|
499
|
-
};
|
|
500
|
-
if (this.view) {
|
|
501
|
-
params.view = this.view;
|
|
502
|
-
}
|
|
503
|
-
return params;
|
|
504
|
-
}
|
|
505
|
-
_proxyEvents() {
|
|
506
|
-
this.widget.on("search-blur", (e) => this.searchBlur.emit(e));
|
|
507
|
-
this.widget.on("search-clear", (e) => this.searchClear.emit(e));
|
|
508
|
-
this.widget.on("search-complete", (e) => this.searchComplete.emit(e));
|
|
509
|
-
this.widget.on("search-focus", (e) => this.searchFocus.emit(e));
|
|
510
|
-
this.widget.on("search-start", (e) => this.searchStart.emit(e));
|
|
511
|
-
this.widget.on("select-result", (e) => this.selectResult.emit(e));
|
|
512
|
-
this.widget.on("suggest-complete", (e) => this.suggestComplete.emit(e));
|
|
513
|
-
this.widget.on("suggest-start", (e) => this.suggestStart.emit(e));
|
|
514
|
-
}
|
|
515
|
-
get el() { return getElement(this); }
|
|
516
|
-
static get watchers() { return {
|
|
517
|
-
"position": ["positionWatcher"],
|
|
518
|
-
"activeMenu": ["activeMenuWatcher"],
|
|
519
|
-
"activeSourceIndex": ["activeSourceIndexWatcher"],
|
|
520
|
-
"allPlaceholder": ["allPlaceholderWatcher"],
|
|
521
|
-
"autoSelect": ["autoSelectWatcher"],
|
|
522
|
-
"includeDefaultSources": ["includeDefaultSourcesWatcher"],
|
|
523
|
-
"locationEnabled": ["locationEnabledWatcher"],
|
|
524
|
-
"maxResults": ["maxResultsWatcher"],
|
|
525
|
-
"maxSuggestions": ["maxSuggestionsWatcher"],
|
|
526
|
-
"minSuggestCharacters": ["minSuggestCharactersWatcher"],
|
|
527
|
-
"popupEnabled": ["popupEnabledWatcher"],
|
|
528
|
-
"popupTemplate": ["popupTemplateWatcher"],
|
|
529
|
-
"portal": ["portalWatcher"],
|
|
530
|
-
"resultGraphicEnabled": ["resultGraphicEnabledWatcher"],
|
|
531
|
-
"searchAllEnabled": ["searchAllEnabledWatcher"],
|
|
532
|
-
"searchTerm": ["searchTermWatcher"],
|
|
533
|
-
"sources": ["sourcesWatcher"],
|
|
534
|
-
"suggestionsEnabled": ["suggestionsEnabledWatcher"],
|
|
535
|
-
"referenceElement": ["referenceElementWatcher"],
|
|
536
|
-
"view": ["viewWatcher"]
|
|
537
|
-
}; }
|
|
538
|
-
};
|
|
539
|
-
ArcgisSearch.style = arcgisSearchCss;
|
|
540
|
-
|
|
541
|
-
export { ArcgisBasemapGallery as arcgis_basemap_gallery, ArcgisExpand as arcgis_expand, ArcgisMap as arcgis_map, ArcgisSearch as arcgis_search };
|