@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
|
@@ -6,7 +6,6 @@ const index = require('./index-6b51d5a0.js');
|
|
|
6
6
|
const index$1 = require('./index-bfda1cdc.js');
|
|
7
7
|
const componentUtils = require('./component-utils-cbd20e88.js');
|
|
8
8
|
const disconnected = require('./disconnected-306cb220.js');
|
|
9
|
-
const mappingUtils = require('./mapping-utils-c2c7b994.js');
|
|
10
9
|
|
|
11
10
|
const arcgisExpandCss = "arcgis-expand>.esri-expand__content--expanded{background-color:var(--calcite-ui-background)}";
|
|
12
11
|
|
|
@@ -90,193 +89,130 @@ const ArcgisExpand = class {
|
|
|
90
89
|
};
|
|
91
90
|
ArcgisExpand.style = arcgisExpandCss;
|
|
92
91
|
|
|
93
|
-
|
|
92
|
+
function disableNavigation(view) {
|
|
93
|
+
if (view.type === '2d') {
|
|
94
|
+
view.constraints.rotationEnabled = false;
|
|
95
|
+
}
|
|
96
|
+
view.popup.dockEnabled = true;
|
|
97
|
+
// Removes the zoom action on the popup
|
|
98
|
+
view.popup.actions.removeAll();
|
|
99
|
+
view.popup.viewModel.includeDefaultActions = false;
|
|
100
|
+
// stops propagation of default behavior when an event fires
|
|
101
|
+
function stopEvtPropagation(event) {
|
|
102
|
+
event.stopPropagation();
|
|
103
|
+
}
|
|
104
|
+
// exlude the zoom widget from the default UI
|
|
105
|
+
view.ui.components = ['attribution'];
|
|
106
|
+
// disable mouse wheel scroll zooming on the view
|
|
107
|
+
view.on('mouse-wheel', stopEvtPropagation);
|
|
108
|
+
// disable zooming via double-click on the view
|
|
109
|
+
view.on('double-click', stopEvtPropagation);
|
|
110
|
+
// disable zooming out via double-click + Control on the view
|
|
111
|
+
view.on('double-click', ['Control'], stopEvtPropagation);
|
|
112
|
+
// disables pinch-zoom and panning on the view
|
|
113
|
+
view.on('drag', stopEvtPropagation);
|
|
114
|
+
// disable the view's zoom box to prevent the Shift + drag
|
|
115
|
+
// and Shift + Control + drag zoom gestures.
|
|
116
|
+
view.on('drag', ['Shift'], stopEvtPropagation);
|
|
117
|
+
view.on('drag', ['Shift', 'Control'], stopEvtPropagation);
|
|
118
|
+
// prevents zooming with the + and - keys
|
|
119
|
+
view.on('key-down', event => {
|
|
120
|
+
const prohibitedKeys = ['+', '-', 'Shift', '_', '=', 'ArrowUp', 'ArrowDown', 'ArrowRight', 'ArrowLeft'];
|
|
121
|
+
const keyPressed = event.key;
|
|
122
|
+
if (prohibitedKeys.indexOf(keyPressed) !== -1) {
|
|
123
|
+
event.stopPropagation();
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
return view;
|
|
127
|
+
}
|
|
94
128
|
|
|
95
|
-
const
|
|
129
|
+
const arcgisMapCss = ".arcgis-map{padding:0;margin:0;height:100%;width:100%}";
|
|
130
|
+
|
|
131
|
+
const ArcgisMap = class {
|
|
96
132
|
constructor(hostRef) {
|
|
97
133
|
index.registerInstance(this, hostRef);
|
|
98
|
-
this.
|
|
99
|
-
this.
|
|
100
|
-
this.
|
|
101
|
-
this.
|
|
102
|
-
this.
|
|
103
|
-
this.attachmentsEnabled = undefined;
|
|
104
|
-
this.autoRefreshEnabled = undefined;
|
|
105
|
-
this.columnReorderingEnabled = undefined;
|
|
106
|
-
this.columns = undefined;
|
|
107
|
-
this.editingEnabled = undefined;
|
|
108
|
-
this.filterGeometry = undefined;
|
|
109
|
-
this.hiddenFields = undefined;
|
|
110
|
-
this.highlightEnabled = undefined;
|
|
111
|
-
this.highlightIds = undefined;
|
|
112
|
-
this.layer = undefined;
|
|
113
|
-
this.menu = undefined;
|
|
114
|
-
this.menuConfig = undefined;
|
|
115
|
-
this.multiSortEnabled = undefined;
|
|
116
|
-
this.pageSize = undefined;
|
|
117
|
-
this.state = undefined;
|
|
118
|
-
this.tableTemplate = undefined;
|
|
134
|
+
this.viewReady = index.createEvent(this, "viewReady", 7);
|
|
135
|
+
this.apiKey = undefined;
|
|
136
|
+
this.basemap = undefined;
|
|
137
|
+
this.backgroundColor = undefined;
|
|
138
|
+
this.disableNavigation = false;
|
|
119
139
|
this.itemId = undefined;
|
|
120
|
-
this.
|
|
121
|
-
this.
|
|
140
|
+
this.portalUrl = undefined;
|
|
141
|
+
this.scale = undefined;
|
|
142
|
+
this.zoom = undefined;
|
|
143
|
+
this.center = undefined;
|
|
122
144
|
this.view = undefined;
|
|
123
|
-
this.widget = undefined;
|
|
124
|
-
}
|
|
125
|
-
//--------------------------------------------------------------------------
|
|
126
|
-
//
|
|
127
|
-
// Watchers
|
|
128
|
-
//
|
|
129
|
-
//--------------------------------------------------------------------------
|
|
130
|
-
positionWatcher(newValue) {
|
|
131
|
-
if (newValue !== undefined && this.widget) {
|
|
132
|
-
if (typeof this.view !== "string") {
|
|
133
|
-
this.view.ui.move(this.childElem, newValue);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
attachmentsEnabledWatcher(value) {
|
|
138
|
-
if (value && this.widget) {
|
|
139
|
-
this.widget.attachmentsEnabled = value;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
autoRefreshEnabledWatcher(value) {
|
|
143
|
-
if (value && this.widget) {
|
|
144
|
-
this.widget.autoRefreshEnabled = value;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
columnReorderingEnabledWatcher(value) {
|
|
148
|
-
if (value && this.widget) {
|
|
149
|
-
this.widget.columnReorderingEnabled = value;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
editingEnabledWatcher(value) {
|
|
153
|
-
if (value && this.widget) {
|
|
154
|
-
this.widget.editingEnabled = value;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
filterGeometryWatcher(value) {
|
|
158
|
-
if (value && this.widget) {
|
|
159
|
-
this.widget.filterGeometry = value;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
hiddenFieldsWatcher(value) {
|
|
163
|
-
if (value && this.widget) {
|
|
164
|
-
this.widget.hiddenFields = value;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
highlightEnabledWatcher(value) {
|
|
168
|
-
if (value && this.widget) {
|
|
169
|
-
this.widget.highlightEnabled = value;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
highlightIdsWatcher(value) {
|
|
173
|
-
if (value && this.widget) {
|
|
174
|
-
this.widget.highlightIds = value;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
menuConfigWatcher(value) {
|
|
178
|
-
if (value && this.widget) {
|
|
179
|
-
this.widget.menuConfig = value;
|
|
180
|
-
}
|
|
181
145
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
this.widget.multiSortEnabled = value;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
pageSizeWatcher(value) {
|
|
188
|
-
if (value && this.widget) {
|
|
189
|
-
this.widget.pageSize = value;
|
|
190
|
-
}
|
|
146
|
+
apiKeyWatcher(value) {
|
|
147
|
+
this.config.apiKey = value;
|
|
191
148
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}
|
|
149
|
+
backgroundColorWatcher(value) {
|
|
150
|
+
this.view.background = {
|
|
151
|
+
color: value
|
|
152
|
+
};
|
|
196
153
|
}
|
|
197
|
-
|
|
154
|
+
itemIdWatcher(value, old) {
|
|
198
155
|
if (value && value !== old) {
|
|
199
|
-
|
|
200
|
-
portalItem: {
|
|
201
|
-
id: value
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
this.layer = layer;
|
|
156
|
+
this.loadMap();
|
|
205
157
|
}
|
|
206
158
|
}
|
|
207
|
-
|
|
208
|
-
if (value &&
|
|
209
|
-
this.
|
|
159
|
+
scaleWatcher(value, old) {
|
|
160
|
+
if (value != null && value !== old) {
|
|
161
|
+
this.view.scale = value;
|
|
210
162
|
}
|
|
211
163
|
}
|
|
212
|
-
|
|
213
|
-
if (value && value !== old) {
|
|
214
|
-
|
|
215
|
-
this.layer = layer;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
referenceElementWatcher(newValue) {
|
|
219
|
-
componentUtils.referenceElementHelper(this, newValue);
|
|
220
|
-
}
|
|
221
|
-
viewWatcher(newValue) {
|
|
222
|
-
if (newValue !== undefined && this.widget) {
|
|
223
|
-
this.widget.view = newValue;
|
|
164
|
+
zoomWatcher(value, old) {
|
|
165
|
+
if (value != null && value !== old) {
|
|
166
|
+
this.view.zoom = value;
|
|
224
167
|
}
|
|
225
168
|
}
|
|
226
169
|
//--------------------------------------------------------------------------
|
|
227
170
|
//
|
|
228
|
-
//
|
|
171
|
+
// Lifecycle
|
|
229
172
|
//
|
|
230
173
|
//--------------------------------------------------------------------------
|
|
231
|
-
async
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
async filterBySelection() {
|
|
238
|
-
return this.widget?.filterBySelection();
|
|
239
|
-
}
|
|
240
|
-
async findColumn(fieldName) {
|
|
241
|
-
return this.widget?.findColumn(fieldName);
|
|
242
|
-
}
|
|
243
|
-
async hideColumn(fieldName) {
|
|
244
|
-
return this.widget?.hideColumn(fieldName);
|
|
245
|
-
}
|
|
246
|
-
async refresh() {
|
|
247
|
-
return this.widget?.refresh();
|
|
248
|
-
}
|
|
249
|
-
async scrollToIndex(index) {
|
|
250
|
-
return this.widget?.scrollToIndex(index);
|
|
251
|
-
}
|
|
252
|
-
async showAllColumns() {
|
|
253
|
-
return this.widget?.showAllColumns();
|
|
174
|
+
async componentWillLoad() {
|
|
175
|
+
this.config = await index$1.importConfig();
|
|
176
|
+
if (this.apiKey) {
|
|
177
|
+
this.config.apiKey = this.apiKey;
|
|
178
|
+
}
|
|
179
|
+
this.loadMap();
|
|
254
180
|
}
|
|
255
|
-
|
|
256
|
-
|
|
181
|
+
componentDidRender() {
|
|
182
|
+
if (this.view) {
|
|
183
|
+
this.view.container = this.el;
|
|
184
|
+
}
|
|
257
185
|
}
|
|
258
|
-
|
|
259
|
-
return
|
|
186
|
+
render() {
|
|
187
|
+
return index.h("div", { class: "arcgis-map", ref: (el) => (this.el = el) });
|
|
260
188
|
}
|
|
261
189
|
//--------------------------------------------------------------------------
|
|
262
190
|
//
|
|
263
|
-
//
|
|
191
|
+
// Private Methods
|
|
264
192
|
//
|
|
265
193
|
//--------------------------------------------------------------------------
|
|
266
|
-
async
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
this.
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
194
|
+
async loadMap() {
|
|
195
|
+
const mapParams = {};
|
|
196
|
+
if (this.itemId) {
|
|
197
|
+
mapParams.portalItem = this._createPortalItem();
|
|
198
|
+
}
|
|
199
|
+
if (this.basemap) {
|
|
200
|
+
mapParams.basemap = this.basemap;
|
|
201
|
+
}
|
|
202
|
+
const map = await index$1.newWebMap(mapParams);
|
|
203
|
+
const params = this._createViewParams();
|
|
204
|
+
const view = await index$1.newViewsMapView({
|
|
205
|
+
map,
|
|
206
|
+
...params
|
|
207
|
+
});
|
|
208
|
+
this.view = view;
|
|
209
|
+
this._addWatchers();
|
|
210
|
+
if (this.disableNavigation) {
|
|
211
|
+
disableNavigation(this.view);
|
|
212
|
+
}
|
|
213
|
+
this.view.when(() => {
|
|
214
|
+
this.viewReady.emit({ view: this.view });
|
|
215
|
+
});
|
|
280
216
|
}
|
|
281
217
|
//--------------------------------------------------------------------------
|
|
282
218
|
//
|
|
@@ -284,139 +220,102 @@ const ArcgisFeatureTable = class {
|
|
|
284
220
|
//
|
|
285
221
|
//--------------------------------------------------------------------------
|
|
286
222
|
async _addWatchers() {
|
|
287
|
-
const { watch } = await index$1.importCoreReactiveUtils();
|
|
288
|
-
watch(() => this.
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
watch(() => this.widget.activeSortOrders, (value) => (this.activeSortOrders = value), {
|
|
292
|
-
initial: true
|
|
293
|
-
});
|
|
294
|
-
watch(() => this.widget.columns, (value) => (this.columns = value), {
|
|
295
|
-
initial: true
|
|
296
|
-
});
|
|
297
|
-
watch(() => this.widget.menu, (value) => (this.menu = value), {
|
|
298
|
-
initial: true
|
|
223
|
+
const { watch, when } = await index$1.importCoreReactiveUtils();
|
|
224
|
+
watch(() => this.view.center, (center) => {
|
|
225
|
+
const value = `${center.longitude},${center.latitude}`;
|
|
226
|
+
this.center = value;
|
|
299
227
|
});
|
|
300
|
-
|
|
301
|
-
|
|
228
|
+
when(() => this.view.updating, () => {
|
|
229
|
+
when(() => !this.view.updating, () => {
|
|
230
|
+
if (this.zoom !== this.view.zoom) {
|
|
231
|
+
this.zoom = this.view.zoom;
|
|
232
|
+
}
|
|
233
|
+
if (this.scale !== this.view.scale) {
|
|
234
|
+
this.scale = this.view.scale;
|
|
235
|
+
}
|
|
236
|
+
}, { once: true });
|
|
302
237
|
});
|
|
303
238
|
}
|
|
304
|
-
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
if (this.view) {
|
|
309
|
-
params.view = this.view;
|
|
310
|
-
}
|
|
311
|
-
if (this.attachmentsEnabled !== undefined) {
|
|
312
|
-
params.attachmentsEnabled = this.attachmentsEnabled;
|
|
313
|
-
}
|
|
314
|
-
if (this.autoRefreshEnabled !== undefined) {
|
|
315
|
-
params.autoRefreshEnabled = this.autoRefreshEnabled;
|
|
316
|
-
}
|
|
317
|
-
if (this.columnReorderingEnabled !== undefined) {
|
|
318
|
-
params.columnReorderingEnabled = this.columnReorderingEnabled;
|
|
319
|
-
}
|
|
320
|
-
if (this.editingEnabled !== undefined) {
|
|
321
|
-
params.editingEnabled = this.editingEnabled;
|
|
322
|
-
}
|
|
323
|
-
if (this.filterGeometry !== undefined) {
|
|
324
|
-
params.filterGeometry = this.filterGeometry;
|
|
325
|
-
}
|
|
326
|
-
if (this.hiddenFields !== undefined) {
|
|
327
|
-
params.hiddenFields = this.hiddenFields;
|
|
328
|
-
}
|
|
329
|
-
if (this.highlightEnabled !== undefined) {
|
|
330
|
-
params.highlightEnabled = this.highlightEnabled;
|
|
331
|
-
}
|
|
332
|
-
if (this.highlightIds !== undefined) {
|
|
333
|
-
params.highlightIds = this.highlightIds;
|
|
334
|
-
}
|
|
335
|
-
if (this.menuConfig !== undefined) {
|
|
336
|
-
params.menuConfig = this.menuConfig;
|
|
337
|
-
}
|
|
338
|
-
if (this.multiSortEnabled !== undefined) {
|
|
339
|
-
params.multiSortEnabled = this.multiSortEnabled;
|
|
239
|
+
_createPortalItem() {
|
|
240
|
+
const item = {};
|
|
241
|
+
if (this.itemId) {
|
|
242
|
+
item.id = this.itemId;
|
|
340
243
|
}
|
|
341
|
-
if (this.
|
|
342
|
-
|
|
244
|
+
if (this.portalUrl) {
|
|
245
|
+
item.portal = {
|
|
246
|
+
url: this.portalUrl
|
|
247
|
+
};
|
|
343
248
|
}
|
|
344
|
-
|
|
345
|
-
|
|
249
|
+
return item;
|
|
250
|
+
}
|
|
251
|
+
_createViewParams() {
|
|
252
|
+
const params = {};
|
|
253
|
+
if (this.backgroundColor) {
|
|
254
|
+
params.background = {
|
|
255
|
+
color: this.backgroundColor
|
|
256
|
+
};
|
|
346
257
|
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
params.layer = this.layer;
|
|
258
|
+
if (this.zoom !== undefined) {
|
|
259
|
+
params.zoom = this.zoom;
|
|
350
260
|
}
|
|
351
|
-
|
|
352
|
-
params.
|
|
261
|
+
if (this.scale !== undefined) {
|
|
262
|
+
params.scale = this.scale;
|
|
353
263
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
264
|
+
if (this.center) {
|
|
265
|
+
if (typeof this.center === "string") {
|
|
266
|
+
params.center = this.center.split(",").map((x) => Number(x));
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
params.center = this.center;
|
|
270
|
+
}
|
|
360
271
|
}
|
|
361
272
|
return params;
|
|
362
273
|
}
|
|
363
|
-
|
|
364
|
-
this.widget?.highlightIds.on("change", (e) => this.rowSelectionChange.emit(e));
|
|
365
|
-
}
|
|
366
|
-
get el() { return index.getElement(this); }
|
|
274
|
+
get hostElem() { return index.getElement(this); }
|
|
367
275
|
static get watchers() { return {
|
|
368
|
-
"
|
|
369
|
-
"
|
|
370
|
-
"autoRefreshEnabled": ["autoRefreshEnabledWatcher"],
|
|
371
|
-
"columnReorderingEnabled": ["columnReorderingEnabledWatcher"],
|
|
372
|
-
"editingEnabled": ["editingEnabledWatcher"],
|
|
373
|
-
"filterGeometry": ["filterGeometryWatcher"],
|
|
374
|
-
"hiddenFields": ["hiddenFieldsWatcher"],
|
|
375
|
-
"highlightEnabled": ["highlightEnabledWatcher"],
|
|
376
|
-
"highlightIds": ["highlightIdsWatcher"],
|
|
377
|
-
"menuConfig": ["menuConfigWatcher"],
|
|
378
|
-
"multiSortEnabled": ["multiSortEnabledWatcher"],
|
|
379
|
-
"pageSize": ["pageSizeWatcher"],
|
|
380
|
-
"tableTemplate": ["tableTemplateWatcher"],
|
|
276
|
+
"apiKey": ["apiKeyWatcher"],
|
|
277
|
+
"backgroundColor": ["backgroundColorWatcher"],
|
|
381
278
|
"itemId": ["itemIdWatcher"],
|
|
382
|
-
"
|
|
383
|
-
"
|
|
384
|
-
"referenceElement": ["referenceElementWatcher"],
|
|
385
|
-
"view": ["viewWatcher"]
|
|
279
|
+
"scale": ["scaleWatcher"],
|
|
280
|
+
"zoom": ["zoomWatcher"]
|
|
386
281
|
}; }
|
|
387
282
|
};
|
|
388
|
-
|
|
283
|
+
ArcgisMap.style = arcgisMapCss;
|
|
389
284
|
|
|
390
|
-
const
|
|
285
|
+
const arcgisSceneCss = ".arcgis-scene{padding:0;margin:0;height:100%;width:100%}";
|
|
391
286
|
|
|
392
|
-
const
|
|
287
|
+
const ArcgisScene = class {
|
|
393
288
|
constructor(hostRef) {
|
|
394
289
|
index.registerInstance(this, hostRef);
|
|
395
290
|
this.viewReady = index.createEvent(this, "viewReady", 7);
|
|
396
291
|
this.apiKey = undefined;
|
|
397
292
|
this.basemap = undefined;
|
|
398
|
-
this.backgroundColor = undefined;
|
|
399
|
-
this.disableNavigation = false;
|
|
400
293
|
this.itemId = undefined;
|
|
401
294
|
this.portalUrl = undefined;
|
|
402
295
|
this.scale = undefined;
|
|
403
296
|
this.zoom = undefined;
|
|
404
297
|
this.center = undefined;
|
|
405
298
|
this.view = undefined;
|
|
299
|
+
this.disableNavigation = false;
|
|
406
300
|
}
|
|
407
301
|
apiKeyWatcher(value) {
|
|
408
302
|
this.config.apiKey = value;
|
|
409
303
|
}
|
|
410
|
-
backgroundColorWatcher(value) {
|
|
411
|
-
this.view.background = {
|
|
412
|
-
color: value
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
304
|
itemIdWatcher(value, old) {
|
|
416
305
|
if (value && value !== old) {
|
|
417
306
|
this.loadMap();
|
|
418
307
|
}
|
|
419
308
|
}
|
|
309
|
+
scaleWatcher(value, old) {
|
|
310
|
+
if (value != null && value !== old) {
|
|
311
|
+
this.view.scale = value;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
zoomWatcher(value, old) {
|
|
315
|
+
if (value != null && value !== old) {
|
|
316
|
+
this.view.zoom = value;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
420
319
|
//--------------------------------------------------------------------------
|
|
421
320
|
//
|
|
422
321
|
// Lifecycle
|
|
@@ -435,7 +334,7 @@ const ArcgisMap = class {
|
|
|
435
334
|
}
|
|
436
335
|
}
|
|
437
336
|
render() {
|
|
438
|
-
return index.h("div", { class: "arcgis-
|
|
337
|
+
return index.h("div", { class: "arcgis-scene", ref: (el) => (this.el = el) });
|
|
439
338
|
}
|
|
440
339
|
//--------------------------------------------------------------------------
|
|
441
340
|
//
|
|
@@ -450,32 +349,37 @@ const ArcgisMap = class {
|
|
|
450
349
|
if (this.basemap) {
|
|
451
350
|
mapParams.basemap = this.basemap;
|
|
452
351
|
}
|
|
453
|
-
const map = await index$1.
|
|
352
|
+
const map = await index$1.newWebScene(mapParams);
|
|
454
353
|
const params = this._createViewParams();
|
|
455
|
-
const view = await index$1.
|
|
354
|
+
const view = await index$1.newViewsSceneView({
|
|
456
355
|
map,
|
|
457
356
|
...params
|
|
458
357
|
});
|
|
459
358
|
this.view = view;
|
|
460
359
|
this._addWatchers();
|
|
461
360
|
if (this.disableNavigation) {
|
|
462
|
-
|
|
361
|
+
disableNavigation(this.view);
|
|
463
362
|
}
|
|
464
|
-
this.view.when(() =>
|
|
363
|
+
this.view.when(() => {
|
|
364
|
+
this.viewReady.emit({ view: this.view });
|
|
365
|
+
});
|
|
465
366
|
}
|
|
466
|
-
//--------------------------------------------------------------------------
|
|
467
|
-
//
|
|
468
|
-
// Private Methods
|
|
469
|
-
//
|
|
470
|
-
//--------------------------------------------------------------------------
|
|
471
367
|
async _addWatchers() {
|
|
472
|
-
const { watch } = await index$1.importCoreReactiveUtils();
|
|
368
|
+
const { watch, when } = await index$1.importCoreReactiveUtils();
|
|
473
369
|
watch(() => this.view.center, (center) => {
|
|
474
370
|
const value = `${center.longitude},${center.latitude}`;
|
|
475
371
|
this.center = value;
|
|
476
372
|
});
|
|
477
|
-
|
|
478
|
-
|
|
373
|
+
when(() => this.view.updating, () => {
|
|
374
|
+
when(() => !this.view.updating, () => {
|
|
375
|
+
if (this.zoom !== this.view.zoom) {
|
|
376
|
+
this.zoom = this.view.zoom;
|
|
377
|
+
}
|
|
378
|
+
if (this.scale !== this.view.scale) {
|
|
379
|
+
this.scale = this.view.scale;
|
|
380
|
+
}
|
|
381
|
+
}, { once: true });
|
|
382
|
+
});
|
|
479
383
|
}
|
|
480
384
|
_createPortalItem() {
|
|
481
385
|
const item = {};
|
|
@@ -491,11 +395,6 @@ const ArcgisMap = class {
|
|
|
491
395
|
}
|
|
492
396
|
_createViewParams() {
|
|
493
397
|
const params = {};
|
|
494
|
-
if (this.backgroundColor) {
|
|
495
|
-
params.background = {
|
|
496
|
-
color: this.backgroundColor
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
398
|
if (this.zoom !== undefined) {
|
|
500
399
|
params.zoom = this.zoom;
|
|
501
400
|
}
|
|
@@ -515,11 +414,12 @@ const ArcgisMap = class {
|
|
|
515
414
|
get hostElem() { return index.getElement(this); }
|
|
516
415
|
static get watchers() { return {
|
|
517
416
|
"apiKey": ["apiKeyWatcher"],
|
|
518
|
-
"
|
|
519
|
-
"
|
|
417
|
+
"itemId": ["itemIdWatcher"],
|
|
418
|
+
"scale": ["scaleWatcher"],
|
|
419
|
+
"zoom": ["zoomWatcher"]
|
|
520
420
|
}; }
|
|
521
421
|
};
|
|
522
|
-
|
|
422
|
+
ArcgisScene.style = arcgisSceneCss;
|
|
523
423
|
|
|
524
424
|
const arcgisSearchCss = "";
|
|
525
425
|
|
|
@@ -788,6 +688,6 @@ const ArcgisSearch = class {
|
|
|
788
688
|
ArcgisSearch.style = arcgisSearchCss;
|
|
789
689
|
|
|
790
690
|
exports.arcgis_expand = ArcgisExpand;
|
|
791
|
-
exports.arcgis_feature_table = ArcgisFeatureTable;
|
|
792
691
|
exports.arcgis_map = ArcgisMap;
|
|
692
|
+
exports.arcgis_scene = ArcgisScene;
|
|
793
693
|
exports.arcgis_search = ArcgisSearch;
|