@arcgis/map-components 4.29.0-beta.3 → 4.29.0-beta.5
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/{readme.md → README.md} +1 -1
- package/dist/arcgis-map-components/arcgis-map-components.esm.js +1 -1
- package/dist/arcgis-map-components/{p-174f9d11.entry.js → p-037a3bb6.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-18c653a4.entry.js → p-064bf907.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-4fa3c6fe.entry.js → p-08015460.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-4b5fa9a2.entry.js → p-0d492ad6.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-1c631990.entry.js → p-0ee8ea5a.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-47629a4c.entry.js → p-11168df4.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-4bb15110.entry.js → p-1680f044.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-11e7ce02.entry.js → p-1a6dcf6a.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-1435356e.entry.js → p-29c81862.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-21721d4b.entry.js → p-347dba98.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-9e667282.entry.js → p-3673ae6e.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-a67dda4e.entry.js → p-367c6986.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-3587b4d8.entry.js → p-3b2623c6.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-f0e5dcc7.entry.js → p-4722bbad.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-535bf289.entry.js → p-48c89578.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-3361d81f.entry.js → p-5299aa69.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-3b5560bb.entry.js → p-52c3388d.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-5d835456.entry.js → p-5d2f53bd.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-4d5e7ddd.entry.js → p-615399dd.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-d8be8a46.entry.js → p-658a2499.entry.js} +1 -1
- package/dist/arcgis-map-components/p-7031c422.entry.js +1 -0
- package/dist/arcgis-map-components/{p-c63a5c7f.entry.js → p-7084f84f.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-9aad48fe.entry.js → p-74b7f2c3.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-2becbf01.entry.js → p-86a82586.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-1b5e33ea.entry.js → p-8a60074a.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-8d184d92.entry.js → p-8b4cf5da.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-9c1b8e69.entry.js → p-922bbfed.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-dafb17cf.entry.js → p-932be58c.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-8c18a99c.entry.js → p-99d486cb.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-4c103777.entry.js → p-9fdd4596.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-5db2786d.entry.js → p-a0f092fc.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-f5cc7f2d.entry.js → p-a1e2e59f.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-f7b74cd4.entry.js → p-a249c2fa.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-3e676259.entry.js → p-a508d7c6.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-5ea3ce11.entry.js → p-a89102b6.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-ef0b3818.entry.js → p-ac7e9294.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-8fde8001.entry.js → p-adcfd40d.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-ce14e49f.entry.js → p-ae96d72a.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-d3fbbf3f.entry.js → p-b026950f.entry.js} +1 -1
- package/dist/arcgis-map-components/p-b5904340.entry.js +1 -0
- package/dist/arcgis-map-components/{p-927f8748.entry.js → p-c57f270d.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-01d9efae.entry.js → p-c63d9e91.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-acb4a35a.entry.js → p-c8516f87.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-5a91868a.entry.js → p-d3f3affa.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-721673c8.entry.js → p-d5ac71b2.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-b19043d5.entry.js → p-dcf3861b.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-ec2cc024.entry.js → p-e1201530.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-312ff83f.entry.js → p-eb95717e.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-2c5be6b0.entry.js → p-ee1086de.entry.js} +1 -1
- package/dist/arcgis-map-components/{p-620959fc.js → p-f28d6d27.js} +1 -1
- package/dist/arcgis-map-components/{p-501861a1.entry.js → p-f8353590.entry.js} +1 -1
- package/dist/cjs/arcgis-expand_4.cjs.entry.js +180 -280
- package/dist/cjs/arcgis-feature-table.cjs.entry.js +307 -0
- package/dist/cjs/arcgis-map-components.cjs.js +1 -1
- package/dist/cjs/index-6b51d5a0.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/components/arcgis-map.js +27 -5
- package/dist/components/arcgis-scene.js +27 -5
- 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-basemap-gallery.entry.js +1 -1
- 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 +1 -1
- 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 +180 -280
- package/dist/esm/arcgis-feature-form.entry.js +1 -1
- package/dist/esm/arcgis-feature-table.entry.js +303 -0
- 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-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-c227d296.js → index-334b0bde.js} +1 -1
- package/dist/esm/index-eb3ead33.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/arcgis-map/arcgis-map.d.ts +2 -0
- package/dist/types/components/arcgis-scene/arcgis-scene.d.ts +2 -0
- package/package.json +5 -4
- package/dist/arcgis-map-components/p-5cabdee7.js +0 -1
- package/dist/arcgis-map-components/p-bb6e5f04.entry.js +0 -1
- package/dist/arcgis-map-components/p-bfae0a1f.entry.js +0 -1
- package/dist/cjs/arcgis-scene.cjs.entry.js +0 -126
- package/dist/cjs/mapping-utils-c2c7b994.js +0 -40
- package/dist/esm/arcgis-scene.entry.js +0 -122
- package/dist/esm/mapping-utils-26beb904.js +0 -38
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-eb3ead33.js';
|
|
2
|
-
import { n as newWidgetsExpand,
|
|
2
|
+
import { n as newWidgetsExpand, i as importConfig, a as newWebMap, b as newViewsMapView, c as importCoreReactiveUtils, d as newWebScene, e as newViewsSceneView, f as newWidgetsSearch } from './index-334b0bde.js';
|
|
3
3
|
import { r as referenceElementHelper, c as checkForView } from './component-utils-2ebdae59.js';
|
|
4
4
|
import { o as onDisconnectedHelper } from './disconnected-bc5fc8bc.js';
|
|
5
|
-
import { d as disableNavigation } from './mapping-utils-26beb904.js';
|
|
6
5
|
|
|
7
6
|
const arcgisExpandCss = "arcgis-expand>.esri-expand__content--expanded{background-color:var(--calcite-ui-background)}";
|
|
8
7
|
|
|
@@ -86,193 +85,130 @@ const ArcgisExpand = class {
|
|
|
86
85
|
};
|
|
87
86
|
ArcgisExpand.style = arcgisExpandCss;
|
|
88
87
|
|
|
89
|
-
|
|
88
|
+
function disableNavigation(view) {
|
|
89
|
+
if (view.type === '2d') {
|
|
90
|
+
view.constraints.rotationEnabled = false;
|
|
91
|
+
}
|
|
92
|
+
view.popup.dockEnabled = true;
|
|
93
|
+
// Removes the zoom action on the popup
|
|
94
|
+
view.popup.actions.removeAll();
|
|
95
|
+
view.popup.viewModel.includeDefaultActions = false;
|
|
96
|
+
// stops propagation of default behavior when an event fires
|
|
97
|
+
function stopEvtPropagation(event) {
|
|
98
|
+
event.stopPropagation();
|
|
99
|
+
}
|
|
100
|
+
// exlude the zoom widget from the default UI
|
|
101
|
+
view.ui.components = ['attribution'];
|
|
102
|
+
// disable mouse wheel scroll zooming on the view
|
|
103
|
+
view.on('mouse-wheel', stopEvtPropagation);
|
|
104
|
+
// disable zooming via double-click on the view
|
|
105
|
+
view.on('double-click', stopEvtPropagation);
|
|
106
|
+
// disable zooming out via double-click + Control on the view
|
|
107
|
+
view.on('double-click', ['Control'], stopEvtPropagation);
|
|
108
|
+
// disables pinch-zoom and panning on the view
|
|
109
|
+
view.on('drag', stopEvtPropagation);
|
|
110
|
+
// disable the view's zoom box to prevent the Shift + drag
|
|
111
|
+
// and Shift + Control + drag zoom gestures.
|
|
112
|
+
view.on('drag', ['Shift'], stopEvtPropagation);
|
|
113
|
+
view.on('drag', ['Shift', 'Control'], stopEvtPropagation);
|
|
114
|
+
// prevents zooming with the + and - keys
|
|
115
|
+
view.on('key-down', event => {
|
|
116
|
+
const prohibitedKeys = ['+', '-', 'Shift', '_', '=', 'ArrowUp', 'ArrowDown', 'ArrowRight', 'ArrowLeft'];
|
|
117
|
+
const keyPressed = event.key;
|
|
118
|
+
if (prohibitedKeys.indexOf(keyPressed) !== -1) {
|
|
119
|
+
event.stopPropagation();
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
return view;
|
|
123
|
+
}
|
|
90
124
|
|
|
91
|
-
const
|
|
125
|
+
const arcgisMapCss = ".arcgis-map{padding:0;margin:0;height:100%;width:100%}";
|
|
126
|
+
|
|
127
|
+
const ArcgisMap = class {
|
|
92
128
|
constructor(hostRef) {
|
|
93
129
|
registerInstance(this, hostRef);
|
|
94
|
-
this.
|
|
95
|
-
this.
|
|
96
|
-
this.
|
|
97
|
-
this.
|
|
98
|
-
this.
|
|
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;
|
|
130
|
+
this.viewReady = createEvent(this, "viewReady", 7);
|
|
131
|
+
this.apiKey = undefined;
|
|
132
|
+
this.basemap = undefined;
|
|
133
|
+
this.backgroundColor = undefined;
|
|
134
|
+
this.disableNavigation = false;
|
|
115
135
|
this.itemId = undefined;
|
|
116
|
-
this.
|
|
117
|
-
this.
|
|
136
|
+
this.portalUrl = undefined;
|
|
137
|
+
this.scale = undefined;
|
|
138
|
+
this.zoom = undefined;
|
|
139
|
+
this.center = undefined;
|
|
118
140
|
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
141
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
this.widget.multiSortEnabled = value;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
pageSizeWatcher(value) {
|
|
184
|
-
if (value && this.widget) {
|
|
185
|
-
this.widget.pageSize = value;
|
|
186
|
-
}
|
|
142
|
+
apiKeyWatcher(value) {
|
|
143
|
+
this.config.apiKey = value;
|
|
187
144
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
145
|
+
backgroundColorWatcher(value) {
|
|
146
|
+
this.view.background = {
|
|
147
|
+
color: value
|
|
148
|
+
};
|
|
192
149
|
}
|
|
193
|
-
|
|
150
|
+
itemIdWatcher(value, old) {
|
|
194
151
|
if (value && value !== old) {
|
|
195
|
-
|
|
196
|
-
portalItem: {
|
|
197
|
-
id: value
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
this.layer = layer;
|
|
152
|
+
this.loadMap();
|
|
201
153
|
}
|
|
202
154
|
}
|
|
203
|
-
|
|
204
|
-
if (value &&
|
|
205
|
-
this.
|
|
155
|
+
scaleWatcher(value, old) {
|
|
156
|
+
if (value != null && value !== old) {
|
|
157
|
+
this.view.scale = value;
|
|
206
158
|
}
|
|
207
159
|
}
|
|
208
|
-
|
|
209
|
-
if (value && value !== old) {
|
|
210
|
-
|
|
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;
|
|
160
|
+
zoomWatcher(value, old) {
|
|
161
|
+
if (value != null && value !== old) {
|
|
162
|
+
this.view.zoom = value;
|
|
220
163
|
}
|
|
221
164
|
}
|
|
222
165
|
//--------------------------------------------------------------------------
|
|
223
166
|
//
|
|
224
|
-
//
|
|
167
|
+
// Lifecycle
|
|
225
168
|
//
|
|
226
169
|
//--------------------------------------------------------------------------
|
|
227
|
-
async
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
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();
|
|
170
|
+
async componentWillLoad() {
|
|
171
|
+
this.config = await importConfig();
|
|
172
|
+
if (this.apiKey) {
|
|
173
|
+
this.config.apiKey = this.apiKey;
|
|
174
|
+
}
|
|
175
|
+
this.loadMap();
|
|
250
176
|
}
|
|
251
|
-
|
|
252
|
-
|
|
177
|
+
componentDidRender() {
|
|
178
|
+
if (this.view) {
|
|
179
|
+
this.view.container = this.el;
|
|
180
|
+
}
|
|
253
181
|
}
|
|
254
|
-
|
|
255
|
-
return
|
|
182
|
+
render() {
|
|
183
|
+
return h("div", { class: "arcgis-map", ref: (el) => (this.el = el) });
|
|
256
184
|
}
|
|
257
185
|
//--------------------------------------------------------------------------
|
|
258
186
|
//
|
|
259
|
-
//
|
|
187
|
+
// Private Methods
|
|
260
188
|
//
|
|
261
189
|
//--------------------------------------------------------------------------
|
|
262
|
-
async
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
this.
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
190
|
+
async loadMap() {
|
|
191
|
+
const mapParams = {};
|
|
192
|
+
if (this.itemId) {
|
|
193
|
+
mapParams.portalItem = this._createPortalItem();
|
|
194
|
+
}
|
|
195
|
+
if (this.basemap) {
|
|
196
|
+
mapParams.basemap = this.basemap;
|
|
197
|
+
}
|
|
198
|
+
const map = await newWebMap(mapParams);
|
|
199
|
+
const params = this._createViewParams();
|
|
200
|
+
const view = await newViewsMapView({
|
|
201
|
+
map,
|
|
202
|
+
...params
|
|
203
|
+
});
|
|
204
|
+
this.view = view;
|
|
205
|
+
this._addWatchers();
|
|
206
|
+
if (this.disableNavigation) {
|
|
207
|
+
disableNavigation(this.view);
|
|
208
|
+
}
|
|
209
|
+
this.view.when(() => {
|
|
210
|
+
this.viewReady.emit({ view: this.view });
|
|
211
|
+
});
|
|
276
212
|
}
|
|
277
213
|
//--------------------------------------------------------------------------
|
|
278
214
|
//
|
|
@@ -280,139 +216,102 @@ const ArcgisFeatureTable = class {
|
|
|
280
216
|
//
|
|
281
217
|
//--------------------------------------------------------------------------
|
|
282
218
|
async _addWatchers() {
|
|
283
|
-
const { watch } = await importCoreReactiveUtils();
|
|
284
|
-
watch(() => this.
|
|
285
|
-
|
|
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
|
|
219
|
+
const { watch, when } = await importCoreReactiveUtils();
|
|
220
|
+
watch(() => this.view.center, (center) => {
|
|
221
|
+
const value = `${center.longitude},${center.latitude}`;
|
|
222
|
+
this.center = value;
|
|
295
223
|
});
|
|
296
|
-
|
|
297
|
-
|
|
224
|
+
when(() => this.view.updating, () => {
|
|
225
|
+
when(() => !this.view.updating, () => {
|
|
226
|
+
if (this.zoom !== this.view.zoom) {
|
|
227
|
+
this.zoom = this.view.zoom;
|
|
228
|
+
}
|
|
229
|
+
if (this.scale !== this.view.scale) {
|
|
230
|
+
this.scale = this.view.scale;
|
|
231
|
+
}
|
|
232
|
+
}, { once: true });
|
|
298
233
|
});
|
|
299
234
|
}
|
|
300
|
-
|
|
301
|
-
const
|
|
302
|
-
|
|
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;
|
|
235
|
+
_createPortalItem() {
|
|
236
|
+
const item = {};
|
|
237
|
+
if (this.itemId) {
|
|
238
|
+
item.id = this.itemId;
|
|
336
239
|
}
|
|
337
|
-
if (this.
|
|
338
|
-
|
|
240
|
+
if (this.portalUrl) {
|
|
241
|
+
item.portal = {
|
|
242
|
+
url: this.portalUrl
|
|
243
|
+
};
|
|
339
244
|
}
|
|
340
|
-
|
|
341
|
-
|
|
245
|
+
return item;
|
|
246
|
+
}
|
|
247
|
+
_createViewParams() {
|
|
248
|
+
const params = {};
|
|
249
|
+
if (this.backgroundColor) {
|
|
250
|
+
params.background = {
|
|
251
|
+
color: this.backgroundColor
|
|
252
|
+
};
|
|
342
253
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
params.layer = this.layer;
|
|
254
|
+
if (this.zoom !== undefined) {
|
|
255
|
+
params.zoom = this.zoom;
|
|
346
256
|
}
|
|
347
|
-
|
|
348
|
-
params.
|
|
257
|
+
if (this.scale !== undefined) {
|
|
258
|
+
params.scale = this.scale;
|
|
349
259
|
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
260
|
+
if (this.center) {
|
|
261
|
+
if (typeof this.center === "string") {
|
|
262
|
+
params.center = this.center.split(",").map((x) => Number(x));
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
params.center = this.center;
|
|
266
|
+
}
|
|
356
267
|
}
|
|
357
268
|
return params;
|
|
358
269
|
}
|
|
359
|
-
|
|
360
|
-
this.widget?.highlightIds.on("change", (e) => this.rowSelectionChange.emit(e));
|
|
361
|
-
}
|
|
362
|
-
get el() { return getElement(this); }
|
|
270
|
+
get hostElem() { return getElement(this); }
|
|
363
271
|
static get watchers() { return {
|
|
364
|
-
"
|
|
365
|
-
"
|
|
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"],
|
|
272
|
+
"apiKey": ["apiKeyWatcher"],
|
|
273
|
+
"backgroundColor": ["backgroundColorWatcher"],
|
|
377
274
|
"itemId": ["itemIdWatcher"],
|
|
378
|
-
"
|
|
379
|
-
"
|
|
380
|
-
"referenceElement": ["referenceElementWatcher"],
|
|
381
|
-
"view": ["viewWatcher"]
|
|
275
|
+
"scale": ["scaleWatcher"],
|
|
276
|
+
"zoom": ["zoomWatcher"]
|
|
382
277
|
}; }
|
|
383
278
|
};
|
|
384
|
-
|
|
279
|
+
ArcgisMap.style = arcgisMapCss;
|
|
385
280
|
|
|
386
|
-
const
|
|
281
|
+
const arcgisSceneCss = ".arcgis-scene{padding:0;margin:0;height:100%;width:100%}";
|
|
387
282
|
|
|
388
|
-
const
|
|
283
|
+
const ArcgisScene = class {
|
|
389
284
|
constructor(hostRef) {
|
|
390
285
|
registerInstance(this, hostRef);
|
|
391
286
|
this.viewReady = createEvent(this, "viewReady", 7);
|
|
392
287
|
this.apiKey = undefined;
|
|
393
288
|
this.basemap = undefined;
|
|
394
|
-
this.backgroundColor = undefined;
|
|
395
|
-
this.disableNavigation = false;
|
|
396
289
|
this.itemId = undefined;
|
|
397
290
|
this.portalUrl = undefined;
|
|
398
291
|
this.scale = undefined;
|
|
399
292
|
this.zoom = undefined;
|
|
400
293
|
this.center = undefined;
|
|
401
294
|
this.view = undefined;
|
|
295
|
+
this.disableNavigation = false;
|
|
402
296
|
}
|
|
403
297
|
apiKeyWatcher(value) {
|
|
404
298
|
this.config.apiKey = value;
|
|
405
299
|
}
|
|
406
|
-
backgroundColorWatcher(value) {
|
|
407
|
-
this.view.background = {
|
|
408
|
-
color: value
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
300
|
itemIdWatcher(value, old) {
|
|
412
301
|
if (value && value !== old) {
|
|
413
302
|
this.loadMap();
|
|
414
303
|
}
|
|
415
304
|
}
|
|
305
|
+
scaleWatcher(value, old) {
|
|
306
|
+
if (value != null && value !== old) {
|
|
307
|
+
this.view.scale = value;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
zoomWatcher(value, old) {
|
|
311
|
+
if (value != null && value !== old) {
|
|
312
|
+
this.view.zoom = value;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
416
315
|
//--------------------------------------------------------------------------
|
|
417
316
|
//
|
|
418
317
|
// Lifecycle
|
|
@@ -431,7 +330,7 @@ const ArcgisMap = class {
|
|
|
431
330
|
}
|
|
432
331
|
}
|
|
433
332
|
render() {
|
|
434
|
-
return h("div", { class: "arcgis-
|
|
333
|
+
return h("div", { class: "arcgis-scene", ref: (el) => (this.el = el) });
|
|
435
334
|
}
|
|
436
335
|
//--------------------------------------------------------------------------
|
|
437
336
|
//
|
|
@@ -446,9 +345,9 @@ const ArcgisMap = class {
|
|
|
446
345
|
if (this.basemap) {
|
|
447
346
|
mapParams.basemap = this.basemap;
|
|
448
347
|
}
|
|
449
|
-
const map = await
|
|
348
|
+
const map = await newWebScene(mapParams);
|
|
450
349
|
const params = this._createViewParams();
|
|
451
|
-
const view = await
|
|
350
|
+
const view = await newViewsSceneView({
|
|
452
351
|
map,
|
|
453
352
|
...params
|
|
454
353
|
});
|
|
@@ -457,21 +356,26 @@ const ArcgisMap = class {
|
|
|
457
356
|
if (this.disableNavigation) {
|
|
458
357
|
disableNavigation(this.view);
|
|
459
358
|
}
|
|
460
|
-
this.view.when(() =>
|
|
359
|
+
this.view.when(() => {
|
|
360
|
+
this.viewReady.emit({ view: this.view });
|
|
361
|
+
});
|
|
461
362
|
}
|
|
462
|
-
//--------------------------------------------------------------------------
|
|
463
|
-
//
|
|
464
|
-
// Private Methods
|
|
465
|
-
//
|
|
466
|
-
//--------------------------------------------------------------------------
|
|
467
363
|
async _addWatchers() {
|
|
468
|
-
const { watch } = await importCoreReactiveUtils();
|
|
364
|
+
const { watch, when } = await importCoreReactiveUtils();
|
|
469
365
|
watch(() => this.view.center, (center) => {
|
|
470
366
|
const value = `${center.longitude},${center.latitude}`;
|
|
471
367
|
this.center = value;
|
|
472
368
|
});
|
|
473
|
-
|
|
474
|
-
|
|
369
|
+
when(() => this.view.updating, () => {
|
|
370
|
+
when(() => !this.view.updating, () => {
|
|
371
|
+
if (this.zoom !== this.view.zoom) {
|
|
372
|
+
this.zoom = this.view.zoom;
|
|
373
|
+
}
|
|
374
|
+
if (this.scale !== this.view.scale) {
|
|
375
|
+
this.scale = this.view.scale;
|
|
376
|
+
}
|
|
377
|
+
}, { once: true });
|
|
378
|
+
});
|
|
475
379
|
}
|
|
476
380
|
_createPortalItem() {
|
|
477
381
|
const item = {};
|
|
@@ -487,11 +391,6 @@ const ArcgisMap = class {
|
|
|
487
391
|
}
|
|
488
392
|
_createViewParams() {
|
|
489
393
|
const params = {};
|
|
490
|
-
if (this.backgroundColor) {
|
|
491
|
-
params.background = {
|
|
492
|
-
color: this.backgroundColor
|
|
493
|
-
};
|
|
494
|
-
}
|
|
495
394
|
if (this.zoom !== undefined) {
|
|
496
395
|
params.zoom = this.zoom;
|
|
497
396
|
}
|
|
@@ -511,11 +410,12 @@ const ArcgisMap = class {
|
|
|
511
410
|
get hostElem() { return getElement(this); }
|
|
512
411
|
static get watchers() { return {
|
|
513
412
|
"apiKey": ["apiKeyWatcher"],
|
|
514
|
-
"
|
|
515
|
-
"
|
|
413
|
+
"itemId": ["itemIdWatcher"],
|
|
414
|
+
"scale": ["scaleWatcher"],
|
|
415
|
+
"zoom": ["zoomWatcher"]
|
|
516
416
|
}; }
|
|
517
417
|
};
|
|
518
|
-
|
|
418
|
+
ArcgisScene.style = arcgisSceneCss;
|
|
519
419
|
|
|
520
420
|
const arcgisSearchCss = "";
|
|
521
421
|
|
|
@@ -783,4 +683,4 @@ const ArcgisSearch = class {
|
|
|
783
683
|
};
|
|
784
684
|
ArcgisSearch.style = arcgisSearchCss;
|
|
785
685
|
|
|
786
|
-
export { ArcgisExpand as arcgis_expand,
|
|
686
|
+
export { ArcgisExpand as arcgis_expand, ArcgisMap as arcgis_map, ArcgisScene as arcgis_scene, ArcgisSearch as arcgis_search };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, g as getElement } from './index-eb3ead33.js';
|
|
2
|
-
import { A as newWidgetsFeatureForm } from './index-
|
|
2
|
+
import { A as newWidgetsFeatureForm } from './index-334b0bde.js';
|
|
3
3
|
|
|
4
4
|
const arcgisFeatureFormCss = "";
|
|
5
5
|
|