@arcgis/map-components 4.28.0-beta.9 → 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-2fd925ca.entry.js → p-01d9efae.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-68646c61.entry.js → p-11e7ce02.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-1a43e8d8.entry.js → p-1435356e.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-7abce241.entry.js → p-174f9d11.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-f58b60c7.entry.js → p-18c653a4.entry.js} +1 -1
- package/dist/arcgis-map-components/p-1b5e33ea.entry.js +1 -0
- package/dist/arcgis-map-components/{p-2db2577e.entry.js → p-1c631990.entry.js} +1 -1
- package/dist/arcgis-map-components/p-21721d4b.entry.js +1 -0
- package/dist/arcgis-map-components/p-2becbf01.entry.js +1 -0
- package/dist/arcgis-map-components/{p-468ba851.entry.js → p-2c5be6b0.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-ad5290c9.entry.js → p-312ff83f.entry.js} +1 -1
- package/dist/arcgis-map-components/p-3361d81f.entry.js +1 -0
- package/dist/arcgis-map-components/p-3587b4d8.entry.js +1 -0
- package/dist/arcgis-map-components/{p-5a021a17.entry.js → p-3b5560bb.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-091d4493.entry.js → p-3e676259.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-14749f65.entry.js → p-47629a4c.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-b1b46d88.entry.js → p-4b5fa9a2.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-0ea677ba.entry.js → p-4bb15110.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-3be968a1.entry.js → p-4c103777.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-c3ace9c2.entry.js → p-4d5e7ddd.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-77e1789b.entry.js → p-4fa3c6fe.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-a4d66952.entry.js → p-501861a1.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-59eeb050.entry.js → p-535bf289.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-73d00de1.entry.js → p-5a91868a.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-96d19c1a.entry.js → p-5d835456.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-3fa85124.entry.js → p-5db2786d.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-e52cb479.entry.js → p-5ea3ce11.entry.js} +1 -1
- package/dist/arcgis-map-components/p-620959fc.js +1 -0
- package/dist/arcgis-map-components/{p-2ee35a41.entry.js → p-721673c8.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-ecf7fc37.entry.js → p-8c18a99c.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-46bcef6f.entry.js → p-8d184d92.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-59e90608.entry.js → p-8fde8001.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-fc030349.entry.js → p-927f8748.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-75fe9abd.entry.js → p-9aad48fe.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-bb8e0d09.entry.js → p-9c1b8e69.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-659610e7.entry.js → p-9e667282.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-dd338d8a.entry.js → p-a67dda4e.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-84bca99d.entry.js → p-acb4a35a.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-c3dada67.entry.js → p-b19043d5.entry.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/arcgis-map-components/p-c63a5c7f.entry.js +1 -0
- package/dist/arcgis-map-components/{p-af108a38.entry.js → p-ce14e49f.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-7e190cc8.entry.js → p-d3fbbf3f.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-dab815b7.entry.js → p-d8be8a46.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-6dbba964.entry.js → p-dafb17cf.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-1e190d5b.entry.js → p-ec2cc024.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-91c5ef0f.entry.js → p-ef0b3818.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-ea86c3a4.entry.js → p-f0e5dcc7.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-8d4d14db.entry.js → p-f5cc7f2d.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-67ff797c.entry.js → p-f7b74cd4.entry.js} +1 -1
- package/dist/cjs/arcgis-area-measurement-2d.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-area-measurement-3d.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-attachments.cjs.entry.js +1 -1
- package/dist/cjs/{arcgis-directional-pad.cjs.entry.js → arcgis-basemap-gallery.cjs.entry.js} +22 -25
- package/dist/cjs/arcgis-basemap-layer-list.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-basemap-toggle.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-bookmarks.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-building-explorer.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-compass.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-coordinate-conversion.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-daylight.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-directions.cjs.entry.js +6 -6
- package/dist/cjs/arcgis-directline-measurement-3d.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-distance-measurement-2d.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-editor.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-elevation-profile.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-expand_4.cjs.entry.js +793 -0
- package/dist/cjs/arcgis-feature-form.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-feature-templates.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-feature.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-features.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-floor-filter.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-fullscreen.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-histogram-range-slider.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-histogram.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-home.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-layer-list.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-legend.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-line-of-sight.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-locate.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-map-components.cjs.js +1 -1
- package/dist/cjs/arcgis-measurement.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-navigation-toggle.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-print.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-scale-bar.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-scale-range-slider.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-scene.cjs.entry.js +48 -28
- package/dist/cjs/arcgis-shadow-cast.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-sketch.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-slice.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-slider.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-swipe.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-table-list.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-time-slider.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-track.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-utility-network-associations.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-utility-network-trace.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-utility-network-validate-topology.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-value-picker.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-weather.cjs.entry.js +1 -1
- package/dist/cjs/arcgis-zoom.cjs.entry.js +1 -1
- package/dist/cjs/index-6b51d5a0.js +6 -14
- package/dist/cjs/{index-1bd145e7.js → index-bfda1cdc.js} +0 -12
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/components/arcgis-area-measurement-2d.js +1 -1
- package/dist/components/arcgis-area-measurement-3d.js +1 -1
- package/dist/components/arcgis-basemap-gallery.js +1 -1
- package/dist/components/arcgis-basemap-layer-list.js +1 -1
- package/dist/components/arcgis-basemap-toggle.js +1 -1
- package/dist/components/arcgis-bookmarks.js +1 -1
- package/dist/components/arcgis-building-explorer.js +1 -1
- package/dist/components/arcgis-compass.js +1 -1
- package/dist/components/arcgis-coordinate-conversion.js +1 -1
- package/dist/components/arcgis-daylight.js +1 -1
- package/dist/components/arcgis-directions.js +8 -8
- package/dist/components/arcgis-directline-measurement-3d.js +2 -2
- package/dist/components/arcgis-distance-measurement-2d.js +2 -2
- package/dist/components/arcgis-editor.js +2 -2
- package/dist/components/arcgis-elevation-profile.js +2 -2
- package/dist/components/arcgis-expand2.js +2 -2
- package/dist/components/arcgis-feature-form.js +1 -1
- package/dist/components/arcgis-feature-table.js +22 -22
- package/dist/components/arcgis-feature-templates.js +1 -1
- package/dist/components/arcgis-feature.js +2 -2
- package/dist/components/arcgis-features.js +2 -2
- package/dist/components/arcgis-floor-filter.js +2 -2
- package/dist/components/arcgis-fullscreen.js +2 -2
- package/dist/components/arcgis-histogram-range-slider.js +1 -1
- package/dist/components/arcgis-histogram.js +1 -1
- package/dist/components/arcgis-home.js +2 -2
- package/dist/components/arcgis-layer-list.js +2 -2
- package/dist/components/arcgis-legend.js +2 -2
- package/dist/components/arcgis-line-of-sight.js +2 -2
- package/dist/components/arcgis-locate.js +2 -2
- package/dist/components/arcgis-map.js +67 -29
- package/dist/components/arcgis-measurement.js +2 -2
- package/dist/components/arcgis-navigation-toggle.js +2 -2
- package/dist/components/arcgis-print.js +2 -2
- package/dist/components/arcgis-scale-bar.js +2 -2
- package/dist/components/arcgis-scale-range-slider.js +2 -2
- package/dist/components/arcgis-scene.js +53 -30
- package/dist/components/arcgis-search.js +2 -2
- package/dist/components/arcgis-shadow-cast.js +2 -2
- package/dist/components/arcgis-sketch.js +2 -2
- package/dist/components/arcgis-slice.js +2 -2
- package/dist/components/arcgis-slider.js +1 -1
- package/dist/components/arcgis-swipe.js +2 -2
- package/dist/components/arcgis-table-list.js +2 -2
- package/dist/components/arcgis-time-slider.js +2 -2
- package/dist/components/arcgis-track.js +2 -2
- package/dist/components/arcgis-utility-network-associations.js +2 -2
- package/dist/components/arcgis-utility-network-trace.js +2 -2
- package/dist/components/arcgis-utility-network-validate-topology.js +2 -2
- package/dist/components/arcgis-value-picker.js +2 -2
- package/dist/components/arcgis-weather.js +2 -2
- package/dist/components/arcgis-zoom.js +2 -2
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.js +0 -1
- package/dist/components/index2.js +1 -12
- package/dist/esm/arcgis-area-measurement-2d.entry.js +1 -1
- package/dist/esm/arcgis-area-measurement-3d.entry.js +1 -1
- package/dist/esm/arcgis-attachments.entry.js +1 -1
- package/dist/esm/{arcgis-directional-pad.entry.js → arcgis-basemap-gallery.entry.js} +23 -26
- package/dist/esm/arcgis-basemap-layer-list.entry.js +1 -1
- package/dist/esm/arcgis-basemap-toggle.entry.js +1 -1
- package/dist/esm/arcgis-bookmarks.entry.js +1 -1
- package/dist/esm/arcgis-building-explorer.entry.js +1 -1
- package/dist/esm/arcgis-compass.entry.js +1 -1
- package/dist/esm/arcgis-coordinate-conversion.entry.js +1 -1
- package/dist/esm/arcgis-daylight.entry.js +1 -1
- package/dist/esm/arcgis-directions.entry.js +6 -6
- package/dist/esm/arcgis-directline-measurement-3d.entry.js +1 -1
- package/dist/esm/arcgis-distance-measurement-2d.entry.js +1 -1
- package/dist/esm/arcgis-editor.entry.js +1 -1
- package/dist/esm/arcgis-elevation-profile.entry.js +1 -1
- package/dist/esm/arcgis-expand_4.entry.js +786 -0
- package/dist/esm/arcgis-feature-form.entry.js +1 -1
- package/dist/esm/arcgis-feature-templates.entry.js +1 -1
- package/dist/esm/arcgis-feature.entry.js +1 -1
- package/dist/esm/arcgis-features.entry.js +1 -1
- package/dist/esm/arcgis-floor-filter.entry.js +1 -1
- package/dist/esm/arcgis-fullscreen.entry.js +1 -1
- package/dist/esm/arcgis-histogram-range-slider.entry.js +1 -1
- package/dist/esm/arcgis-histogram.entry.js +1 -1
- package/dist/esm/arcgis-home.entry.js +1 -1
- package/dist/esm/arcgis-layer-list.entry.js +1 -1
- package/dist/esm/arcgis-legend.entry.js +1 -1
- package/dist/esm/arcgis-line-of-sight.entry.js +1 -1
- package/dist/esm/arcgis-locate.entry.js +1 -1
- package/dist/esm/arcgis-map-components.js +1 -1
- package/dist/esm/arcgis-measurement.entry.js +1 -1
- package/dist/esm/arcgis-navigation-toggle.entry.js +1 -1
- package/dist/esm/arcgis-print.entry.js +1 -1
- package/dist/esm/arcgis-scale-bar.entry.js +1 -1
- package/dist/esm/arcgis-scale-range-slider.entry.js +1 -1
- package/dist/esm/arcgis-scene.entry.js +48 -28
- package/dist/esm/arcgis-shadow-cast.entry.js +1 -1
- package/dist/esm/arcgis-sketch.entry.js +1 -1
- package/dist/esm/arcgis-slice.entry.js +1 -1
- package/dist/esm/arcgis-slider.entry.js +1 -1
- package/dist/esm/arcgis-swipe.entry.js +1 -1
- package/dist/esm/arcgis-table-list.entry.js +1 -1
- package/dist/esm/arcgis-time-slider.entry.js +1 -1
- package/dist/esm/arcgis-track.entry.js +1 -1
- package/dist/esm/arcgis-utility-network-associations.entry.js +1 -1
- package/dist/esm/arcgis-utility-network-trace.entry.js +1 -1
- package/dist/esm/arcgis-utility-network-validate-topology.entry.js +1 -1
- package/dist/esm/arcgis-value-picker.entry.js +1 -1
- package/dist/esm/arcgis-weather.entry.js +1 -1
- package/dist/esm/arcgis-zoom.entry.js +1 -1
- package/dist/esm/{index-85c249d6.js → index-c227d296.js} +1 -12
- package/dist/esm/index-eb3ead33.js +6 -14
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/arcgis-directions/arcgis-directions.d.ts +2 -2
- package/dist/types/components/arcgis-feature-table/arcgis-feature-table.d.ts +2 -5
- 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 +14 -35
- package/package.json +19 -14
- package/dist/arcgis-map-components/p-0dfeaa97.entry.js +0 -1
- package/dist/arcgis-map-components/p-109ba82f.entry.js +0 -1
- package/dist/arcgis-map-components/p-1e6d8c41.entry.js +0 -1
- package/dist/arcgis-map-components/p-3461eee5.entry.js +0 -1
- package/dist/arcgis-map-components/p-4185d368.entry.js +0 -1
- package/dist/arcgis-map-components/p-5c5e6d7d.entry.js +0 -1
- package/dist/arcgis-map-components/p-7c798923.entry.js +0 -1
- package/dist/arcgis-map-components/p-b81b9227.entry.js +0 -1
- package/dist/arcgis-map-components/p-d1ca9ab9.entry.js +0 -1
- package/dist/arcgis-map-components/p-ebab1b79.js +0 -1
- package/dist/arcgis-map-components/p-edf58b44.entry.js +0 -1
- package/dist/cjs/arcgis-basemap-gallery_3.cjs.entry.js +0 -281
- package/dist/cjs/arcgis-feature-table.cjs.entry.js +0 -300
- package/dist/cjs/arcgis-search.cjs.entry.js +0 -276
- package/dist/components/arcgis-directional-pad.d.ts +0 -11
- package/dist/components/arcgis-directional-pad.js +0 -126
- package/dist/esm/arcgis-basemap-gallery_3.entry.js +0 -275
- package/dist/esm/arcgis-feature-table.entry.js +0 -296
- package/dist/esm/arcgis-search.entry.js +0 -272
- package/dist/types/components/arcgis-directional-pad/arcgis-directional-pad.d.ts +0 -29
|
@@ -0,0 +1,786 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
|
|
2
|
+
import { n as newWidgetsExpand, a as newLayersFeatureLayer, b as newWidgetsFeatureTable, i as importCoreReactiveUtils, c as importConfig, d as newWebMap, e as newViewsMapView, f as newWidgetsSearch } from './index-c227d296.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 arcgisExpandCss = "arcgis-expand>.esri-expand__content--expanded{background-color:var(--calcite-ui-background)}";
|
|
8
|
+
|
|
9
|
+
const ArcgisExpand = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
this.widgetReady = createEvent(this, "widgetReady", 7);
|
|
13
|
+
this.referenceElement = undefined;
|
|
14
|
+
this.position = "top-right";
|
|
15
|
+
this.view = undefined;
|
|
16
|
+
this.widget = undefined;
|
|
17
|
+
}
|
|
18
|
+
//--------------------------------------------------------------------------
|
|
19
|
+
//
|
|
20
|
+
// Watchers
|
|
21
|
+
//
|
|
22
|
+
//--------------------------------------------------------------------------
|
|
23
|
+
positionWatcher(newValue) {
|
|
24
|
+
if (newValue !== undefined && this.widget) {
|
|
25
|
+
if (typeof this.view !== "string") {
|
|
26
|
+
this.view.ui.move(this.childElem, newValue);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
referenceElementWatcher(newValue) {
|
|
31
|
+
referenceElementHelper(this, newValue);
|
|
32
|
+
}
|
|
33
|
+
viewWatcher(newValue) {
|
|
34
|
+
if (newValue !== undefined && this.widget) {
|
|
35
|
+
this.widget.view = newValue;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//--------------------------------------------------------------------------
|
|
39
|
+
//
|
|
40
|
+
// Lifecycle
|
|
41
|
+
//
|
|
42
|
+
//--------------------------------------------------------------------------
|
|
43
|
+
async componentDidLoad() {
|
|
44
|
+
const widget = await newWidgetsExpand({
|
|
45
|
+
container: this.childElem
|
|
46
|
+
});
|
|
47
|
+
this.widget = widget;
|
|
48
|
+
if (this.view) {
|
|
49
|
+
this.widget.view = this.view;
|
|
50
|
+
}
|
|
51
|
+
this._checkForView();
|
|
52
|
+
}
|
|
53
|
+
disconnectedCallback() {
|
|
54
|
+
onDisconnectedHelper(this);
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
return h("div", { ref: (el) => (this.childElem = el) });
|
|
58
|
+
}
|
|
59
|
+
//--------------------------------------------------------------------------
|
|
60
|
+
//
|
|
61
|
+
// Private Internal Methods
|
|
62
|
+
//
|
|
63
|
+
//--------------------------------------------------------------------------
|
|
64
|
+
_checkForView() {
|
|
65
|
+
const viewRef = this.el.closest("arcgis-map") || this.el.closest("arcgis-scene");
|
|
66
|
+
if (viewRef?.view) {
|
|
67
|
+
this.view = viewRef.view;
|
|
68
|
+
this.view.ui.add(this.childElem, this.position);
|
|
69
|
+
this.widgetReady.emit({ widget: this.widget });
|
|
70
|
+
}
|
|
71
|
+
else if (viewRef) {
|
|
72
|
+
const handler = () => {
|
|
73
|
+
this.view = viewRef.view;
|
|
74
|
+
this.view.ui.add(this.childElem, this.position);
|
|
75
|
+
this.widgetReady.emit({ widget: this.widget });
|
|
76
|
+
};
|
|
77
|
+
viewRef.addEventListener("viewReady", handler, false);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
get el() { return getElement(this); }
|
|
81
|
+
static get watchers() { return {
|
|
82
|
+
"position": ["positionWatcher"],
|
|
83
|
+
"referenceElement": ["referenceElementWatcher"],
|
|
84
|
+
"view": ["viewWatcher"]
|
|
85
|
+
}; }
|
|
86
|
+
};
|
|
87
|
+
ArcgisExpand.style = arcgisExpandCss;
|
|
88
|
+
|
|
89
|
+
const arcgisFeatureTableCss = ".arcgis-feature-table{width:100%;height:100%}";
|
|
90
|
+
|
|
91
|
+
const ArcgisFeatureTable = class {
|
|
92
|
+
constructor(hostRef) {
|
|
93
|
+
registerInstance(this, hostRef);
|
|
94
|
+
this.rowSelectionChange = createEvent(this, "rowSelectionChange", 7);
|
|
95
|
+
this.widgetReady = createEvent(this, "widgetReady", 7);
|
|
96
|
+
this.referenceElement = undefined;
|
|
97
|
+
this.activeFilters = undefined;
|
|
98
|
+
this.activeSortOrders = undefined;
|
|
99
|
+
this.attachmentsEnabled = undefined;
|
|
100
|
+
this.autoRefreshEnabled = undefined;
|
|
101
|
+
this.columnReorderingEnabled = undefined;
|
|
102
|
+
this.columns = undefined;
|
|
103
|
+
this.editingEnabled = undefined;
|
|
104
|
+
this.filterGeometry = undefined;
|
|
105
|
+
this.hiddenFields = undefined;
|
|
106
|
+
this.highlightEnabled = undefined;
|
|
107
|
+
this.highlightIds = undefined;
|
|
108
|
+
this.layer = undefined;
|
|
109
|
+
this.menu = undefined;
|
|
110
|
+
this.menuConfig = undefined;
|
|
111
|
+
this.multiSortEnabled = undefined;
|
|
112
|
+
this.pageSize = undefined;
|
|
113
|
+
this.state = undefined;
|
|
114
|
+
this.tableTemplate = undefined;
|
|
115
|
+
this.itemId = undefined;
|
|
116
|
+
this.position = "bottom-left";
|
|
117
|
+
this.url = undefined;
|
|
118
|
+
this.view = undefined;
|
|
119
|
+
this.widget = undefined;
|
|
120
|
+
}
|
|
121
|
+
//--------------------------------------------------------------------------
|
|
122
|
+
//
|
|
123
|
+
// Watchers
|
|
124
|
+
//
|
|
125
|
+
//--------------------------------------------------------------------------
|
|
126
|
+
positionWatcher(newValue) {
|
|
127
|
+
if (newValue !== undefined && this.widget) {
|
|
128
|
+
if (typeof this.view !== "string") {
|
|
129
|
+
this.view.ui.move(this.childElem, newValue);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
attachmentsEnabledWatcher(value) {
|
|
134
|
+
if (value && this.widget) {
|
|
135
|
+
this.widget.attachmentsEnabled = value;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
autoRefreshEnabledWatcher(value) {
|
|
139
|
+
if (value && this.widget) {
|
|
140
|
+
this.widget.autoRefreshEnabled = value;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
columnReorderingEnabledWatcher(value) {
|
|
144
|
+
if (value && this.widget) {
|
|
145
|
+
this.widget.columnReorderingEnabled = value;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
editingEnabledWatcher(value) {
|
|
149
|
+
if (value && this.widget) {
|
|
150
|
+
this.widget.editingEnabled = value;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
filterGeometryWatcher(value) {
|
|
154
|
+
if (value && this.widget) {
|
|
155
|
+
this.widget.filterGeometry = value;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
hiddenFieldsWatcher(value) {
|
|
159
|
+
if (value && this.widget) {
|
|
160
|
+
this.widget.hiddenFields = value;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
highlightEnabledWatcher(value) {
|
|
164
|
+
if (value && this.widget) {
|
|
165
|
+
this.widget.highlightEnabled = value;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
highlightIdsWatcher(value) {
|
|
169
|
+
if (value && this.widget) {
|
|
170
|
+
this.widget.highlightIds = value;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
menuConfigWatcher(value) {
|
|
174
|
+
if (value && this.widget) {
|
|
175
|
+
this.widget.menuConfig = value;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
multiSortEnabledWatcher(value) {
|
|
179
|
+
if (value && this.widget) {
|
|
180
|
+
this.widget.multiSortEnabled = value;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
pageSizeWatcher(value) {
|
|
184
|
+
if (value && this.widget) {
|
|
185
|
+
this.widget.pageSize = value;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
tableTemplateWatcher(value) {
|
|
189
|
+
if (value && this.widget) {
|
|
190
|
+
this.widget.tableTemplate = value;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
async itemIdWatcher(value, old) {
|
|
194
|
+
if (value && value !== old) {
|
|
195
|
+
const layer = await newLayersFeatureLayer({
|
|
196
|
+
portalItem: {
|
|
197
|
+
id: value
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
this.layer = layer;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
layerWatcher(value) {
|
|
204
|
+
if (value && this.widget) {
|
|
205
|
+
this.widget.layer = value;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
async urlWatcher(value, old) {
|
|
209
|
+
if (value && value !== old) {
|
|
210
|
+
const layer = await newLayersFeatureLayer({ url: value });
|
|
211
|
+
this.layer = layer;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
referenceElementWatcher(newValue) {
|
|
215
|
+
referenceElementHelper(this, newValue);
|
|
216
|
+
}
|
|
217
|
+
viewWatcher(newValue) {
|
|
218
|
+
if (newValue !== undefined && this.widget) {
|
|
219
|
+
this.widget.view = newValue;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
//--------------------------------------------------------------------------
|
|
223
|
+
//
|
|
224
|
+
// Methods
|
|
225
|
+
//
|
|
226
|
+
//--------------------------------------------------------------------------
|
|
227
|
+
async clearSelectionFilter() {
|
|
228
|
+
return this.widget?.clearSelectionFilter();
|
|
229
|
+
}
|
|
230
|
+
async deleteSelection(showWarningPrompt) {
|
|
231
|
+
return this.widget?.deleteSelection(showWarningPrompt);
|
|
232
|
+
}
|
|
233
|
+
async filterBySelection() {
|
|
234
|
+
return this.widget?.filterBySelection();
|
|
235
|
+
}
|
|
236
|
+
async findColumn(fieldName) {
|
|
237
|
+
return this.widget?.findColumn(fieldName);
|
|
238
|
+
}
|
|
239
|
+
async hideColumn(fieldName) {
|
|
240
|
+
return this.widget?.hideColumn(fieldName);
|
|
241
|
+
}
|
|
242
|
+
async refresh() {
|
|
243
|
+
return this.widget?.refresh();
|
|
244
|
+
}
|
|
245
|
+
async scrollToIndex(index) {
|
|
246
|
+
return this.widget?.scrollToIndex(index);
|
|
247
|
+
}
|
|
248
|
+
async showAllColumns() {
|
|
249
|
+
return this.widget?.showAllColumns();
|
|
250
|
+
}
|
|
251
|
+
async showColumn(fieldName) {
|
|
252
|
+
return this.widget?.showColumn(fieldName);
|
|
253
|
+
}
|
|
254
|
+
async sortColumn(path, direction) {
|
|
255
|
+
return this.widget?.sortColumn(path, direction);
|
|
256
|
+
}
|
|
257
|
+
//--------------------------------------------------------------------------
|
|
258
|
+
//
|
|
259
|
+
// Lifecycle
|
|
260
|
+
//
|
|
261
|
+
//--------------------------------------------------------------------------
|
|
262
|
+
async componentDidLoad() {
|
|
263
|
+
const params = await this._createParams();
|
|
264
|
+
const widget = await newWidgetsFeatureTable(params);
|
|
265
|
+
this.widget = widget;
|
|
266
|
+
await this._addWatchers();
|
|
267
|
+
this._proxyEvents();
|
|
268
|
+
this.widgetReady.emit({ widget: this.widget });
|
|
269
|
+
checkForView(this);
|
|
270
|
+
}
|
|
271
|
+
disconnectedCallback() {
|
|
272
|
+
onDisconnectedHelper(this);
|
|
273
|
+
}
|
|
274
|
+
render() {
|
|
275
|
+
return h("div", { class: "arcgis-feature-table", ref: (el) => (this.childElem = el) });
|
|
276
|
+
}
|
|
277
|
+
//--------------------------------------------------------------------------
|
|
278
|
+
//
|
|
279
|
+
// Private Methods
|
|
280
|
+
//
|
|
281
|
+
//--------------------------------------------------------------------------
|
|
282
|
+
async _addWatchers() {
|
|
283
|
+
const { watch } = await importCoreReactiveUtils();
|
|
284
|
+
watch(() => this.widget.activeFilters, (value) => (this.activeFilters = value), {
|
|
285
|
+
initial: true
|
|
286
|
+
});
|
|
287
|
+
watch(() => this.widget.activeSortOrders, (value) => (this.activeSortOrders = value), {
|
|
288
|
+
initial: true
|
|
289
|
+
});
|
|
290
|
+
watch(() => this.widget.columns, (value) => (this.columns = value), {
|
|
291
|
+
initial: true
|
|
292
|
+
});
|
|
293
|
+
watch(() => this.widget.menu, (value) => (this.menu = value), {
|
|
294
|
+
initial: true
|
|
295
|
+
});
|
|
296
|
+
watch(() => this.widget.state, (value) => (this.state = value), {
|
|
297
|
+
initial: true
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
async _createParams() {
|
|
301
|
+
const params = {
|
|
302
|
+
container: this.childElem
|
|
303
|
+
};
|
|
304
|
+
if (this.view) {
|
|
305
|
+
params.view = this.view;
|
|
306
|
+
}
|
|
307
|
+
if (this.attachmentsEnabled !== undefined) {
|
|
308
|
+
params.attachmentsEnabled = this.attachmentsEnabled;
|
|
309
|
+
}
|
|
310
|
+
if (this.autoRefreshEnabled !== undefined) {
|
|
311
|
+
params.autoRefreshEnabled = this.autoRefreshEnabled;
|
|
312
|
+
}
|
|
313
|
+
if (this.columnReorderingEnabled !== undefined) {
|
|
314
|
+
params.columnReorderingEnabled = this.columnReorderingEnabled;
|
|
315
|
+
}
|
|
316
|
+
if (this.editingEnabled !== undefined) {
|
|
317
|
+
params.editingEnabled = this.editingEnabled;
|
|
318
|
+
}
|
|
319
|
+
if (this.filterGeometry !== undefined) {
|
|
320
|
+
params.filterGeometry = this.filterGeometry;
|
|
321
|
+
}
|
|
322
|
+
if (this.hiddenFields !== undefined) {
|
|
323
|
+
params.hiddenFields = this.hiddenFields;
|
|
324
|
+
}
|
|
325
|
+
if (this.highlightEnabled !== undefined) {
|
|
326
|
+
params.highlightEnabled = this.highlightEnabled;
|
|
327
|
+
}
|
|
328
|
+
if (this.highlightIds !== undefined) {
|
|
329
|
+
params.highlightIds = this.highlightIds;
|
|
330
|
+
}
|
|
331
|
+
if (this.menuConfig !== undefined) {
|
|
332
|
+
params.menuConfig = this.menuConfig;
|
|
333
|
+
}
|
|
334
|
+
if (this.multiSortEnabled !== undefined) {
|
|
335
|
+
params.multiSortEnabled = this.multiSortEnabled;
|
|
336
|
+
}
|
|
337
|
+
if (this.pageSize !== undefined) {
|
|
338
|
+
params.pageSize = this.pageSize;
|
|
339
|
+
}
|
|
340
|
+
if (this.tableTemplate !== undefined) {
|
|
341
|
+
params.tableTemplate = this.tableTemplate;
|
|
342
|
+
}
|
|
343
|
+
// Handle loading a layer, url, or itemId
|
|
344
|
+
if (this.layer !== undefined) {
|
|
345
|
+
params.layer = this.layer;
|
|
346
|
+
}
|
|
347
|
+
else if (this.url) {
|
|
348
|
+
params.layer = await newLayersFeatureLayer({ url: this.url });
|
|
349
|
+
}
|
|
350
|
+
else if (this.itemId) {
|
|
351
|
+
params.layer = await newLayersFeatureLayer({
|
|
352
|
+
portalItem: {
|
|
353
|
+
id: this.itemId
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
return params;
|
|
358
|
+
}
|
|
359
|
+
async _proxyEvents() {
|
|
360
|
+
this.widget?.highlightIds.on("change", (e) => this.rowSelectionChange.emit(e));
|
|
361
|
+
}
|
|
362
|
+
get el() { return getElement(this); }
|
|
363
|
+
static get watchers() { return {
|
|
364
|
+
"position": ["positionWatcher"],
|
|
365
|
+
"attachmentsEnabled": ["attachmentsEnabledWatcher"],
|
|
366
|
+
"autoRefreshEnabled": ["autoRefreshEnabledWatcher"],
|
|
367
|
+
"columnReorderingEnabled": ["columnReorderingEnabledWatcher"],
|
|
368
|
+
"editingEnabled": ["editingEnabledWatcher"],
|
|
369
|
+
"filterGeometry": ["filterGeometryWatcher"],
|
|
370
|
+
"hiddenFields": ["hiddenFieldsWatcher"],
|
|
371
|
+
"highlightEnabled": ["highlightEnabledWatcher"],
|
|
372
|
+
"highlightIds": ["highlightIdsWatcher"],
|
|
373
|
+
"menuConfig": ["menuConfigWatcher"],
|
|
374
|
+
"multiSortEnabled": ["multiSortEnabledWatcher"],
|
|
375
|
+
"pageSize": ["pageSizeWatcher"],
|
|
376
|
+
"tableTemplate": ["tableTemplateWatcher"],
|
|
377
|
+
"itemId": ["itemIdWatcher"],
|
|
378
|
+
"layer": ["layerWatcher"],
|
|
379
|
+
"url": ["urlWatcher"],
|
|
380
|
+
"referenceElement": ["referenceElementWatcher"],
|
|
381
|
+
"view": ["viewWatcher"]
|
|
382
|
+
}; }
|
|
383
|
+
};
|
|
384
|
+
ArcgisFeatureTable.style = arcgisFeatureTableCss;
|
|
385
|
+
|
|
386
|
+
const arcgisMapCss = ".arcgis-map{padding:0;margin:0;height:100%;width:100%}";
|
|
387
|
+
|
|
388
|
+
const ArcgisMap = class {
|
|
389
|
+
constructor(hostRef) {
|
|
390
|
+
registerInstance(this, hostRef);
|
|
391
|
+
this.viewReady = createEvent(this, "viewReady", 7);
|
|
392
|
+
this.apiKey = undefined;
|
|
393
|
+
this.basemap = undefined;
|
|
394
|
+
this.backgroundColor = undefined;
|
|
395
|
+
this.disableNavigation = false;
|
|
396
|
+
this.itemId = undefined;
|
|
397
|
+
this.portalUrl = undefined;
|
|
398
|
+
this.scale = undefined;
|
|
399
|
+
this.zoom = undefined;
|
|
400
|
+
this.center = undefined;
|
|
401
|
+
this.view = undefined;
|
|
402
|
+
}
|
|
403
|
+
apiKeyWatcher(value) {
|
|
404
|
+
this.config.apiKey = value;
|
|
405
|
+
}
|
|
406
|
+
backgroundColorWatcher(value) {
|
|
407
|
+
this.view.background = {
|
|
408
|
+
color: value
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
itemIdWatcher(value, old) {
|
|
412
|
+
if (value && value !== old) {
|
|
413
|
+
this.loadMap();
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
//--------------------------------------------------------------------------
|
|
417
|
+
//
|
|
418
|
+
// Lifecycle
|
|
419
|
+
//
|
|
420
|
+
//--------------------------------------------------------------------------
|
|
421
|
+
async componentWillLoad() {
|
|
422
|
+
this.config = await importConfig();
|
|
423
|
+
if (this.apiKey) {
|
|
424
|
+
this.config.apiKey = this.apiKey;
|
|
425
|
+
}
|
|
426
|
+
this.loadMap();
|
|
427
|
+
}
|
|
428
|
+
componentDidRender() {
|
|
429
|
+
if (this.view) {
|
|
430
|
+
this.view.container = this.el;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
render() {
|
|
434
|
+
return h("div", { class: "arcgis-map", ref: (el) => (this.el = el) });
|
|
435
|
+
}
|
|
436
|
+
//--------------------------------------------------------------------------
|
|
437
|
+
//
|
|
438
|
+
// Private Methods
|
|
439
|
+
//
|
|
440
|
+
//--------------------------------------------------------------------------
|
|
441
|
+
async loadMap() {
|
|
442
|
+
const mapParams = {};
|
|
443
|
+
if (this.itemId) {
|
|
444
|
+
mapParams.portalItem = this._createPortalItem();
|
|
445
|
+
}
|
|
446
|
+
if (this.basemap) {
|
|
447
|
+
mapParams.basemap = this.basemap;
|
|
448
|
+
}
|
|
449
|
+
const map = await newWebMap(mapParams);
|
|
450
|
+
const params = this._createViewParams();
|
|
451
|
+
const view = await newViewsMapView({
|
|
452
|
+
map,
|
|
453
|
+
...params
|
|
454
|
+
});
|
|
455
|
+
this.view = view;
|
|
456
|
+
this._addWatchers();
|
|
457
|
+
if (this.disableNavigation) {
|
|
458
|
+
disableNavigation(this.view);
|
|
459
|
+
}
|
|
460
|
+
this.view.when(() => this.viewReady.emit({ view: this.view }));
|
|
461
|
+
}
|
|
462
|
+
//--------------------------------------------------------------------------
|
|
463
|
+
//
|
|
464
|
+
// Private Methods
|
|
465
|
+
//
|
|
466
|
+
//--------------------------------------------------------------------------
|
|
467
|
+
async _addWatchers() {
|
|
468
|
+
const { watch } = await importCoreReactiveUtils();
|
|
469
|
+
watch(() => this.view.center, (center) => {
|
|
470
|
+
const value = `${center.longitude},${center.latitude}`;
|
|
471
|
+
this.center = value;
|
|
472
|
+
});
|
|
473
|
+
watch(() => this.view.zoom, (value) => (this.zoom = value));
|
|
474
|
+
watch(() => this.view.scale, (value) => (this.scale = value));
|
|
475
|
+
}
|
|
476
|
+
_createPortalItem() {
|
|
477
|
+
const item = {};
|
|
478
|
+
if (this.itemId) {
|
|
479
|
+
item.id = this.itemId;
|
|
480
|
+
}
|
|
481
|
+
if (this.portalUrl) {
|
|
482
|
+
item.portal = {
|
|
483
|
+
url: this.portalUrl
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
return item;
|
|
487
|
+
}
|
|
488
|
+
_createViewParams() {
|
|
489
|
+
const params = {};
|
|
490
|
+
if (this.backgroundColor) {
|
|
491
|
+
params.background = {
|
|
492
|
+
color: this.backgroundColor
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
if (this.zoom !== undefined) {
|
|
496
|
+
params.zoom = this.zoom;
|
|
497
|
+
}
|
|
498
|
+
if (this.scale !== undefined) {
|
|
499
|
+
params.scale = this.scale;
|
|
500
|
+
}
|
|
501
|
+
if (this.center) {
|
|
502
|
+
if (typeof this.center === "string") {
|
|
503
|
+
params.center = this.center.split(",").map((x) => Number(x));
|
|
504
|
+
}
|
|
505
|
+
else {
|
|
506
|
+
params.center = this.center;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
return params;
|
|
510
|
+
}
|
|
511
|
+
get hostElem() { return getElement(this); }
|
|
512
|
+
static get watchers() { return {
|
|
513
|
+
"apiKey": ["apiKeyWatcher"],
|
|
514
|
+
"backgroundColor": ["backgroundColorWatcher"],
|
|
515
|
+
"itemId": ["itemIdWatcher"]
|
|
516
|
+
}; }
|
|
517
|
+
};
|
|
518
|
+
ArcgisMap.style = arcgisMapCss;
|
|
519
|
+
|
|
520
|
+
const arcgisSearchCss = "";
|
|
521
|
+
|
|
522
|
+
const ArcgisSearch = class {
|
|
523
|
+
constructor(hostRef) {
|
|
524
|
+
registerInstance(this, hostRef);
|
|
525
|
+
this.widgetReady = createEvent(this, "widgetReady", 7);
|
|
526
|
+
this.searchBlur = createEvent(this, "searchBlur", 7);
|
|
527
|
+
this.searchClear = createEvent(this, "searchClear", 7);
|
|
528
|
+
this.searchComplete = createEvent(this, "searchComplete", 7);
|
|
529
|
+
this.searchFocus = createEvent(this, "searchFocus", 7);
|
|
530
|
+
this.searchStart = createEvent(this, "searchStart", 7);
|
|
531
|
+
this.selectResult = createEvent(this, "selectResult", 7);
|
|
532
|
+
this.suggestComplete = createEvent(this, "suggestComplete", 7);
|
|
533
|
+
this.suggestStart = createEvent(this, "suggestStart", 7);
|
|
534
|
+
this.referenceElement = undefined;
|
|
535
|
+
this.activeMenu = undefined;
|
|
536
|
+
this.activeSource = undefined;
|
|
537
|
+
this.activeSourceIndex = undefined;
|
|
538
|
+
this.allPlaceholder = undefined;
|
|
539
|
+
this.allSources = undefined;
|
|
540
|
+
this.autoSelect = undefined;
|
|
541
|
+
this.defaultSources = undefined;
|
|
542
|
+
this.includeDefaultSources = undefined;
|
|
543
|
+
this.locationEnabled = undefined;
|
|
544
|
+
this.maxResults = undefined;
|
|
545
|
+
this.maxSuggestions = undefined;
|
|
546
|
+
this.minSuggestCharacters = undefined;
|
|
547
|
+
this.popupEnabled = undefined;
|
|
548
|
+
this.popupTemplate = undefined;
|
|
549
|
+
this.portal = undefined;
|
|
550
|
+
this.resultGraphic = undefined;
|
|
551
|
+
this.resultGraphicEnabled = undefined;
|
|
552
|
+
this.results = undefined;
|
|
553
|
+
this.searchAllEnabled = undefined;
|
|
554
|
+
this.searchTerm = undefined;
|
|
555
|
+
this.selectedResult = undefined;
|
|
556
|
+
this.sources = undefined;
|
|
557
|
+
this.suggestions = undefined;
|
|
558
|
+
this.suggestionsEnabled = undefined;
|
|
559
|
+
this.position = "top-right";
|
|
560
|
+
this.expandable = false;
|
|
561
|
+
this.view = undefined;
|
|
562
|
+
this.widget = undefined;
|
|
563
|
+
}
|
|
564
|
+
//--------------------------------------------------------------------------
|
|
565
|
+
//
|
|
566
|
+
// Watchers
|
|
567
|
+
//
|
|
568
|
+
//--------------------------------------------------------------------------
|
|
569
|
+
positionWatcher(newValue) {
|
|
570
|
+
if (newValue !== undefined && this.widget) {
|
|
571
|
+
if (typeof this.view !== "string") {
|
|
572
|
+
this.view.ui.move(this.childElem, newValue);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
activeMenuWatcher(newValue) {
|
|
577
|
+
if (newValue !== undefined && this.widget) {
|
|
578
|
+
this.widget.activeMenu = newValue;
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
activeSourceIndexWatcher(newValue) {
|
|
582
|
+
if (newValue !== undefined && this.widget) {
|
|
583
|
+
this.widget.activeSourceIndex = newValue;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
allPlaceholderWatcher(newValue) {
|
|
587
|
+
if (newValue !== undefined && this.widget) {
|
|
588
|
+
this.widget.allPlaceholder = newValue;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
autoSelectWatcher(newValue) {
|
|
592
|
+
if (newValue !== undefined && this.widget) {
|
|
593
|
+
this.widget.autoSelect = newValue;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
includeDefaultSourcesWatcher(newValue) {
|
|
597
|
+
if (newValue !== undefined && this.widget) {
|
|
598
|
+
this.widget.includeDefaultSources = newValue;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
locationEnabledWatcher(newValue) {
|
|
602
|
+
if (newValue !== undefined && this.widget) {
|
|
603
|
+
this.widget.locationEnabled = newValue;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
maxResultsWatcher(newValue) {
|
|
607
|
+
if (newValue !== undefined && this.widget) {
|
|
608
|
+
this.widget.maxResults = newValue;
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
maxSuggestionsWatcher(newValue) {
|
|
612
|
+
if (newValue !== undefined && this.widget) {
|
|
613
|
+
this.widget.maxSuggestions = newValue;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
minSuggestCharactersWatcher(newValue) {
|
|
617
|
+
if (newValue !== undefined && this.widget) {
|
|
618
|
+
this.widget.minSuggestCharacters = newValue;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
popupEnabledWatcher(newValue) {
|
|
622
|
+
if (newValue !== undefined && this.widget) {
|
|
623
|
+
this.widget.popupEnabled = newValue;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
popupTemplateWatcher(newValue) {
|
|
627
|
+
if (newValue !== undefined && this.widget) {
|
|
628
|
+
this.widget.popupTemplate = newValue;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
portalWatcher(newValue) {
|
|
632
|
+
if (newValue !== undefined && this.widget) {
|
|
633
|
+
this.widget.portal = newValue;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
resultGraphicEnabledWatcher(newValue) {
|
|
637
|
+
if (newValue !== undefined && this.widget) {
|
|
638
|
+
this.widget.resultGraphicEnabled = newValue;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
searchAllEnabledWatcher(newValue) {
|
|
642
|
+
if (newValue !== undefined && this.widget) {
|
|
643
|
+
this.widget.searchAllEnabled = newValue;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
searchTermWatcher(newValue) {
|
|
647
|
+
if (newValue !== undefined && this.widget) {
|
|
648
|
+
this.widget.searchTerm = newValue;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
sourcesWatcher(newValue) {
|
|
652
|
+
if (newValue !== undefined && this.widget) {
|
|
653
|
+
this.widget.sources = newValue;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
suggestionsEnabledWatcher(newValue) {
|
|
657
|
+
if (newValue !== undefined && this.widget) {
|
|
658
|
+
this.widget.suggestionsEnabled = newValue;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
referenceElementWatcher(newValue) {
|
|
662
|
+
referenceElementHelper(this, newValue);
|
|
663
|
+
}
|
|
664
|
+
viewWatcher(newValue) {
|
|
665
|
+
if (newValue !== undefined && this.widget) {
|
|
666
|
+
this.widget.view = newValue;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
//--------------------------------------------------------------------------
|
|
670
|
+
//
|
|
671
|
+
// Methods
|
|
672
|
+
//
|
|
673
|
+
//--------------------------------------------------------------------------
|
|
674
|
+
async blurSearch() {
|
|
675
|
+
return this.widget?.blur();
|
|
676
|
+
}
|
|
677
|
+
async clearSearch() {
|
|
678
|
+
return this.widget?.clear();
|
|
679
|
+
}
|
|
680
|
+
async focusSearch() {
|
|
681
|
+
return this.widget?.focus();
|
|
682
|
+
}
|
|
683
|
+
async search(term) {
|
|
684
|
+
return this.widget?.search(term);
|
|
685
|
+
}
|
|
686
|
+
async suggest(term) {
|
|
687
|
+
return this.widget?.suggest(term);
|
|
688
|
+
}
|
|
689
|
+
//--------------------------------------------------------------------------
|
|
690
|
+
//
|
|
691
|
+
// Lifecycle
|
|
692
|
+
//
|
|
693
|
+
//--------------------------------------------------------------------------
|
|
694
|
+
async componentDidLoad() {
|
|
695
|
+
const params = this._createParams();
|
|
696
|
+
const widget = await newWidgetsSearch(params);
|
|
697
|
+
this.widget = widget;
|
|
698
|
+
await this._addWatchers();
|
|
699
|
+
this._proxyEvents();
|
|
700
|
+
this.widgetReady.emit({ widget: this.widget });
|
|
701
|
+
checkForView(this);
|
|
702
|
+
}
|
|
703
|
+
disconnectedCallback() {
|
|
704
|
+
onDisconnectedHelper(this);
|
|
705
|
+
}
|
|
706
|
+
render() {
|
|
707
|
+
if (this.expandable) {
|
|
708
|
+
return (h("arcgis-expand", { position: this.position, ref: (el) => (this.expandElem = el) }, h("div", { ref: (el) => (this.childElem = el) })));
|
|
709
|
+
}
|
|
710
|
+
return h("div", { ref: (el) => (this.childElem = el) });
|
|
711
|
+
}
|
|
712
|
+
//--------------------------------------------------------------------------
|
|
713
|
+
//
|
|
714
|
+
// Private Interal Methods
|
|
715
|
+
//
|
|
716
|
+
//--------------------------------------------------------------------------
|
|
717
|
+
async _addWatchers() {
|
|
718
|
+
const { watch } = await importCoreReactiveUtils();
|
|
719
|
+
watch(() => this.widget.activeSource, (value) => (this.activeSource = value), {
|
|
720
|
+
initial: true
|
|
721
|
+
});
|
|
722
|
+
watch(() => this.widget.activeSourceIndex, (value) => (this.activeSourceIndex = value), {
|
|
723
|
+
initial: true
|
|
724
|
+
});
|
|
725
|
+
watch(() => this.widget.allSources, (value) => (this.allSources = value), {
|
|
726
|
+
initial: true
|
|
727
|
+
});
|
|
728
|
+
watch(() => this.widget.defaultSources, (value) => (this.defaultSources = value), {
|
|
729
|
+
initial: true
|
|
730
|
+
});
|
|
731
|
+
watch(() => this.widget.resultGraphic, (value) => (this.resultGraphic = value), {
|
|
732
|
+
initial: true
|
|
733
|
+
});
|
|
734
|
+
watch(() => this.widget.results, (value) => (this.results = value), {
|
|
735
|
+
initial: true
|
|
736
|
+
});
|
|
737
|
+
watch(() => this.widget.selectedResult, (value) => (this.selectedResult = value), {
|
|
738
|
+
initial: true
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
_createParams() {
|
|
742
|
+
const params = {
|
|
743
|
+
container: this.childElem
|
|
744
|
+
};
|
|
745
|
+
if (this.view) {
|
|
746
|
+
params.view = this.view;
|
|
747
|
+
}
|
|
748
|
+
return params;
|
|
749
|
+
}
|
|
750
|
+
_proxyEvents() {
|
|
751
|
+
this.widget.on("search-blur", (e) => this.searchBlur.emit(e));
|
|
752
|
+
this.widget.on("search-clear", (e) => this.searchClear.emit(e));
|
|
753
|
+
this.widget.on("search-complete", (e) => this.searchComplete.emit(e));
|
|
754
|
+
this.widget.on("search-focus", (e) => this.searchFocus.emit(e));
|
|
755
|
+
this.widget.on("search-start", (e) => this.searchStart.emit(e));
|
|
756
|
+
this.widget.on("select-result", (e) => this.selectResult.emit(e));
|
|
757
|
+
this.widget.on("suggest-complete", (e) => this.suggestComplete.emit(e));
|
|
758
|
+
this.widget.on("suggest-start", (e) => this.suggestStart.emit(e));
|
|
759
|
+
}
|
|
760
|
+
get el() { return getElement(this); }
|
|
761
|
+
static get watchers() { return {
|
|
762
|
+
"position": ["positionWatcher"],
|
|
763
|
+
"activeMenu": ["activeMenuWatcher"],
|
|
764
|
+
"activeSourceIndex": ["activeSourceIndexWatcher"],
|
|
765
|
+
"allPlaceholder": ["allPlaceholderWatcher"],
|
|
766
|
+
"autoSelect": ["autoSelectWatcher"],
|
|
767
|
+
"includeDefaultSources": ["includeDefaultSourcesWatcher"],
|
|
768
|
+
"locationEnabled": ["locationEnabledWatcher"],
|
|
769
|
+
"maxResults": ["maxResultsWatcher"],
|
|
770
|
+
"maxSuggestions": ["maxSuggestionsWatcher"],
|
|
771
|
+
"minSuggestCharacters": ["minSuggestCharactersWatcher"],
|
|
772
|
+
"popupEnabled": ["popupEnabledWatcher"],
|
|
773
|
+
"popupTemplate": ["popupTemplateWatcher"],
|
|
774
|
+
"portal": ["portalWatcher"],
|
|
775
|
+
"resultGraphicEnabled": ["resultGraphicEnabledWatcher"],
|
|
776
|
+
"searchAllEnabled": ["searchAllEnabledWatcher"],
|
|
777
|
+
"searchTerm": ["searchTermWatcher"],
|
|
778
|
+
"sources": ["sourcesWatcher"],
|
|
779
|
+
"suggestionsEnabled": ["suggestionsEnabledWatcher"],
|
|
780
|
+
"referenceElement": ["referenceElementWatcher"],
|
|
781
|
+
"view": ["viewWatcher"]
|
|
782
|
+
}; }
|
|
783
|
+
};
|
|
784
|
+
ArcgisSearch.style = arcgisSearchCss;
|
|
785
|
+
|
|
786
|
+
export { ArcgisExpand as arcgis_expand, ArcgisFeatureTable as arcgis_feature_table, ArcgisMap as arcgis_map, ArcgisSearch as arcgis_search };
|