@esri/solutions-components 0.10.20 → 0.10.22
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/cjs/calcite-alert_5.cjs.entry.js +6 -2
- package/dist/cjs/crowdsource-manager.cjs.entry.js +17 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +78 -21
- package/dist/cjs/public-notification.cjs.entry.js +3 -3
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +37 -4
- package/dist/collection/components/edit-card/edit-card.js +6 -2
- package/dist/collection/components/map-select-tools/map-select-tools.js +78 -21
- package/dist/collection/components/public-notification/public-notification.js +5 -5
- package/dist/components/crowdsource-manager.js +20 -4
- package/dist/components/edit-card2.js +6 -2
- package/dist/components/map-select-tools2.js +78 -21
- package/dist/components/public-notification.js +3 -3
- package/dist/esm/calcite-alert_5.entry.js +6 -2
- package/dist/esm/crowdsource-manager.entry.js +17 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +78 -21
- package/dist/esm/public-notification.entry.js +3 -3
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/{p-4c88578a.entry.js → p-5067d77e.entry.js} +1 -1
- package/dist/solutions-components/{p-9fed495d.entry.js → p-a85fd786.entry.js} +1 -1
- package/dist/solutions-components/p-bd2278cf.entry.js +6 -0
- package/dist/solutions-components/p-cd5a9034.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +8 -0
- package/dist/types/components/edit-card/edit-card.d.ts +3 -1
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +22 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-5612aa0c.entry.js +0 -6
- package/dist/solutions-components/p-bde2619f.entry.js +0 -6
@@ -24,7 +24,7 @@ import { ELayoutMode } from "../../utils/interfaces";
|
|
24
24
|
import { getLayerOrTable } from "../../utils/mapViewUtils";
|
25
25
|
export class CrowdsourceManager {
|
26
26
|
constructor() {
|
27
|
-
this.appLayout =
|
27
|
+
this.appLayout = undefined;
|
28
28
|
this.appProxies = undefined;
|
29
29
|
this.basemapConfig = undefined;
|
30
30
|
this.coverPageEnabled = undefined;
|
@@ -47,6 +47,7 @@ export class CrowdsourceManager {
|
|
47
47
|
this.enableSearch = true;
|
48
48
|
this.enableShare = false;
|
49
49
|
this.enableZoom = true;
|
50
|
+
this.hideMapOnLoad = false;
|
50
51
|
this.mapInfos = [];
|
51
52
|
this.onlyShowUpdatableLayers = true;
|
52
53
|
this.popupHeaderColor = undefined;
|
@@ -135,6 +136,12 @@ export class CrowdsourceManager {
|
|
135
136
|
enableZoomWatchHandler() {
|
136
137
|
this._initMapZoom();
|
137
138
|
}
|
139
|
+
/**
|
140
|
+
* When true and no appLayout is defined the map will be hidden on load
|
141
|
+
*/
|
142
|
+
hideMapOnLoadWatchHandler() {
|
143
|
+
console.warn("hideMapOnLoad will be removed. Please use appLayout to control layout options.");
|
144
|
+
}
|
138
145
|
//--------------------------------------------------------------------------
|
139
146
|
//
|
140
147
|
// Methods (public)
|
@@ -213,7 +220,7 @@ export class CrowdsourceManager {
|
|
213
220
|
render() {
|
214
221
|
// only avoid border when we have a header color that is not white
|
215
222
|
const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
|
216
|
-
return (h(Host, { key: '
|
223
|
+
return (h(Host, { key: '28614b892c93b83de202a681a756027472d092c2' }, h("calcite-shell", { key: '8f9c57fa9d1c1c88dbac9706376aad6bbd425691', class: "position-relative" }, h("calcite-panel", { key: '3c156df89f396425c2711a39968017cc23910a55', class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter()), this._filterModal()));
|
217
224
|
}
|
218
225
|
/**
|
219
226
|
* Called after each render
|
@@ -232,6 +239,12 @@ export class CrowdsourceManager {
|
|
232
239
|
*/
|
233
240
|
async componentDidLoad() {
|
234
241
|
this._resizeObserver.observe(this.el);
|
242
|
+
if (this.hideMapOnLoad && !this.appLayout) {
|
243
|
+
this.appLayout = 'tableView';
|
244
|
+
}
|
245
|
+
else if (!this.appLayout) {
|
246
|
+
this.appLayout = 'splitView';
|
247
|
+
}
|
235
248
|
this._isMapViewOnLoad = this.appLayout === 'mapView';
|
236
249
|
this._setActiveLayout(this.appLayout);
|
237
250
|
}
|
@@ -706,8 +719,7 @@ export class CrowdsourceManager {
|
|
706
719
|
"text": "AppLayout: The type of layout the application should use.\r\nValid values: \"mapView\" or \"tableView\" or \"splitView\""
|
707
720
|
},
|
708
721
|
"attribute": "app-layout",
|
709
|
-
"reflect": false
|
710
|
-
"defaultValue": "'splitView'"
|
722
|
+
"reflect": false
|
711
723
|
},
|
712
724
|
"appProxies": {
|
713
725
|
"type": "any",
|
@@ -1105,6 +1117,24 @@ export class CrowdsourceManager {
|
|
1105
1117
|
"reflect": false,
|
1106
1118
|
"defaultValue": "true"
|
1107
1119
|
},
|
1120
|
+
"hideMapOnLoad": {
|
1121
|
+
"type": "boolean",
|
1122
|
+
"mutable": false,
|
1123
|
+
"complexType": {
|
1124
|
+
"original": "boolean",
|
1125
|
+
"resolved": "boolean",
|
1126
|
+
"references": {}
|
1127
|
+
},
|
1128
|
+
"required": false,
|
1129
|
+
"optional": false,
|
1130
|
+
"docs": {
|
1131
|
+
"tags": [],
|
1132
|
+
"text": "boolean: when true the map will be hidden on load"
|
1133
|
+
},
|
1134
|
+
"attribute": "hide-map-on-load",
|
1135
|
+
"reflect": false,
|
1136
|
+
"defaultValue": "false"
|
1137
|
+
},
|
1108
1138
|
"mapInfos": {
|
1109
1139
|
"type": "unknown",
|
1110
1140
|
"mutable": false,
|
@@ -1402,6 +1432,9 @@ export class CrowdsourceManager {
|
|
1402
1432
|
return [{
|
1403
1433
|
"propName": "enableZoom",
|
1404
1434
|
"methodName": "enableZoomWatchHandler"
|
1435
|
+
}, {
|
1436
|
+
"propName": "hideMapOnLoad",
|
1437
|
+
"methodName": "hideMapOnLoadWatchHandler"
|
1405
1438
|
}];
|
1406
1439
|
}
|
1407
1440
|
static get listeners() {
|
@@ -75,6 +75,8 @@ export class EditCard {
|
|
75
75
|
_editor;
|
76
76
|
/**
|
77
77
|
* esri/layers/FeatureLayer: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html
|
78
|
+
* OR
|
79
|
+
* esri/layers/support/SubtypeSublayer: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html
|
78
80
|
*/
|
79
81
|
_layer;
|
80
82
|
/**
|
@@ -179,7 +181,9 @@ export class EditCard {
|
|
179
181
|
if (this._layerEditHandle) {
|
180
182
|
this._layerEditHandle.remove();
|
181
183
|
}
|
182
|
-
|
184
|
+
// #896 Editing on sybtype group layer is failing in Manager
|
185
|
+
const layer = this._layer.type === "subtype-sublayer" ? this._layer.parent : this._layer;
|
186
|
+
this._layerEditHandle = layer.on("edits", () => {
|
183
187
|
this.editsComplete.emit();
|
184
188
|
});
|
185
189
|
}
|
@@ -194,7 +198,7 @@ export class EditCard {
|
|
194
198
|
!this.graphics[0].layer.editingEnabled : true;
|
195
199
|
const tableNodeClass = this._editorLoading ? "display-none" : "position-absolute";
|
196
200
|
const loadingClass = this._editorLoading ? "" : "display-none";
|
197
|
-
return (h(Host, { key: '
|
201
|
+
return (h(Host, { key: '16dd78822ee6d7c4e2da97c4b7ec7c0678b51e68' }, h("div", { key: '8aba2b86c7bf8e7dfbf7567b156e02b23b728f4e', class: "position-absolute" }, editDisabled ? (h("calcite-notice", { kind: "warning", open: true, slot: "content-top", width: "full" }, h("div", { slot: "message" }, this._translations.enableEditing))) : undefined, h("div", { key: '8230d44ec05ff207681e6333b7f08c80748c4f3d', class: "position-absolute" }, h("div", { key: '71792b5737c43a024ebc677ae168d74569349585', class: tableNodeClass, id: "feature-form", ref: (el) => this._editContainer = el }), h("calcite-loader", { key: '47176534c25769af8ae107c3864901c4294b4359', class: loadingClass, label: "", scale: "s" })))));
|
198
202
|
}
|
199
203
|
//--------------------------------------------------------------------------
|
200
204
|
//
|
@@ -69,6 +69,10 @@ export class MapSelectTools {
|
|
69
69
|
// Properties (protected)
|
70
70
|
//
|
71
71
|
//--------------------------------------------------------------------------
|
72
|
+
/**
|
73
|
+
* esri/request: https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html
|
74
|
+
*/
|
75
|
+
_esriRequest;
|
72
76
|
/**
|
73
77
|
* esri/layers/FeatureLayer: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html
|
74
78
|
*/
|
@@ -298,7 +302,7 @@ export class MapSelectTools {
|
|
298
302
|
render() {
|
299
303
|
const mapToolsClass = this.enableSketchTools ? "" : "display-none";
|
300
304
|
const mapToolsContainerClass = this.enableSketchTools ? "padding-top-1" : "";
|
301
|
-
return (h(Host, { key: '
|
305
|
+
return (h(Host, { key: '6753158d00a33dd5dfbb1f22cc27388baf4c0b5e' }, this._getMapLayerPicker(), h("div", { key: '082c6be48d3dfbe2e39be2c462959c7772a91d40', class: "border-bottom" }), h("div", { key: '0e8133a809b05bef34c2f19adeff43c1e57cc002', class: "padding-top-sides-1" }, h("div", { key: '4434b5b4d073f3ba9a7e44b82078b9b81733025b', class: "search-widget", ref: (el) => { this._searchElement = el; } }), h("div", { key: '6f01e27e06ea365de6ff98df3f9edd973d87117c', class: mapToolsContainerClass }, h("map-draw-tools", { key: '24ffe562d080955f2aacfd080c0baa1997f8eaab', active: true, class: mapToolsClass, editGraphicsEnabled: !this._useLayerFeaturesEnabled, graphics: this._graphics, mapView: this.mapView, onSketchGraphicsChange: (evt) => void this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, ref: (el) => { this._drawTools = el; } })), this.enableSearchDistance ? this._getBufferOptions() : undefined, this.enableLayerFeatures ? this._getUseLayerFeaturesOptions() : undefined, this._getNumSelected()), h("div", { key: '4c7cf401b5bcc7e4adef34e140d22676fce8ebbc', class: "border-bottom" }), this._getNameInput()));
|
302
306
|
}
|
303
307
|
/**
|
304
308
|
* Renders the buffer tools component.
|
@@ -365,13 +369,15 @@ export class MapSelectTools {
|
|
365
369
|
* @protected
|
366
370
|
*/
|
367
371
|
async _initModules() {
|
368
|
-
const [GraphicsLayer, Graphic, Search, geometryEngine, FeatureLayer] = await loadModules([
|
372
|
+
const [esriRequest, GraphicsLayer, Graphic, Search, geometryEngine, FeatureLayer] = await loadModules([
|
373
|
+
"esri/request",
|
369
374
|
"esri/layers/GraphicsLayer",
|
370
375
|
"esri/Graphic",
|
371
376
|
"esri/widgets/Search",
|
372
377
|
"esri/geometry/geometryEngine",
|
373
378
|
"esri/layers/FeatureLayer"
|
374
379
|
]);
|
380
|
+
this._esriRequest = esriRequest;
|
375
381
|
this.GraphicsLayer = GraphicsLayer;
|
376
382
|
this.Graphic = Graphic;
|
377
383
|
this.Search = Search;
|
@@ -448,25 +454,7 @@ export class MapSelectTools {
|
|
448
454
|
void this._clearResults(false, clearLabel);
|
449
455
|
});
|
450
456
|
this._searchWidget.on("select-result", (searchResults) => {
|
451
|
-
|
452
|
-
this._searchResult = searchResults.result;
|
453
|
-
const resultFeature = searchResults.result.feature;
|
454
|
-
const resultLayer = resultFeature?.layer;
|
455
|
-
const selectLayer = this.selectLayerView.layer;
|
456
|
-
const oid = resultFeature?.getObjectId();
|
457
|
-
const useOIDs = resultLayer?.url && selectLayer?.url && resultLayer.url === selectLayer.url && !isNaN(oid);
|
458
|
-
const oids = useOIDs ? [oid] : undefined;
|
459
|
-
this._workflowType = EWorkflowType.SEARCH;
|
460
|
-
void this._updateLabel();
|
461
|
-
const graphics = [searchResults.result.feature];
|
462
|
-
this._updateSelection(graphics, useOIDs, oids);
|
463
|
-
this._drawTools.graphics = graphics;
|
464
|
-
this._searchWidget.resultGraphic.visible = false;
|
465
|
-
}
|
466
|
-
else {
|
467
|
-
const clearLabel = this._searchClearLabel();
|
468
|
-
void this._clearResults(false, clearLabel);
|
469
|
-
}
|
457
|
+
void this._selectResult(searchResults.result);
|
470
458
|
});
|
471
459
|
await this._searchWidget.when(() => {
|
472
460
|
this._searchWidget.allPlaceholder = this.searchConfiguration?.allPlaceholder &&
|
@@ -475,6 +463,75 @@ export class MapSelectTools {
|
|
475
463
|
});
|
476
464
|
}
|
477
465
|
}
|
466
|
+
/**
|
467
|
+
* Handle the result from the search widget.
|
468
|
+
*
|
469
|
+
* @param url the url of the layer view
|
470
|
+
*
|
471
|
+
* @returns the url of the views source
|
472
|
+
* @protected
|
473
|
+
*/
|
474
|
+
async _selectResult(result) {
|
475
|
+
if (result) {
|
476
|
+
this._searchResult = result;
|
477
|
+
const resultFeature = result.feature;
|
478
|
+
const resultLayer = resultFeature?.layer;
|
479
|
+
const selectLayer = this.selectLayerView.layer;
|
480
|
+
const oid = resultFeature?.getObjectId();
|
481
|
+
let resultLayerSourceUrl;
|
482
|
+
if (resultLayer.sourceJSON?.isView) {
|
483
|
+
resultLayerSourceUrl = await this._getViewSourceUrl(resultLayer.url);
|
484
|
+
}
|
485
|
+
let selectLayerSourceUrl;
|
486
|
+
if (selectLayer.sourceJSON?.isView) {
|
487
|
+
selectLayerSourceUrl = await this._getViewSourceUrl(selectLayer.url);
|
488
|
+
}
|
489
|
+
const rUrl = resultLayer?.url?.toLowerCase();
|
490
|
+
const rSourceUrl = resultLayerSourceUrl?.toLowerCase();
|
491
|
+
const sUrl = selectLayer?.url?.toLowerCase();
|
492
|
+
const sSourceUrl = selectLayerSourceUrl?.toLowerCase();
|
493
|
+
const useOIDs = rUrl && sUrl &&
|
494
|
+
(rUrl === sUrl || rUrl === sSourceUrl || rSourceUrl === sUrl || rSourceUrl === sSourceUrl) &&
|
495
|
+
!isNaN(oid);
|
496
|
+
const oids = useOIDs ? [oid] : undefined;
|
497
|
+
this._workflowType = EWorkflowType.SEARCH;
|
498
|
+
void this._updateLabel();
|
499
|
+
const graphics = [result.feature];
|
500
|
+
this._updateSelection(graphics, useOIDs, oids);
|
501
|
+
this._drawTools.graphics = graphics;
|
502
|
+
this._searchWidget.resultGraphic.visible = false;
|
503
|
+
}
|
504
|
+
else {
|
505
|
+
const clearLabel = this._searchClearLabel();
|
506
|
+
void this._clearResults(false, clearLabel);
|
507
|
+
}
|
508
|
+
}
|
509
|
+
/**
|
510
|
+
* Get the source url for a view. This function supports single source views only.
|
511
|
+
*
|
512
|
+
* @param url the url of the layer view
|
513
|
+
*
|
514
|
+
* @returns the url of the views source
|
515
|
+
* @protected
|
516
|
+
*/
|
517
|
+
async _getViewSourceUrl(url) {
|
518
|
+
let sourceUrl = "";
|
519
|
+
const resultLayerSourcesUrl = `${url}/sources?f=json`;
|
520
|
+
try {
|
521
|
+
const request = await this._esriRequest(resultLayerSourcesUrl, {
|
522
|
+
query: {
|
523
|
+
f: "json"
|
524
|
+
}
|
525
|
+
});
|
526
|
+
if (request?.data?.services?.length === 1) {
|
527
|
+
sourceUrl = request.data.services[0].url;
|
528
|
+
}
|
529
|
+
}
|
530
|
+
catch (error) {
|
531
|
+
console.log(error);
|
532
|
+
}
|
533
|
+
return sourceUrl;
|
534
|
+
}
|
478
535
|
/**
|
479
536
|
* Check if the current label should be cleared
|
480
537
|
*
|
@@ -37,9 +37,9 @@ export class PublicNotification {
|
|
37
37
|
this.defaultExportTitle = "";
|
38
38
|
this.defaultNumLabelsPerPage = 6;
|
39
39
|
this.enableLayerFeatures = true;
|
40
|
-
this.enableLayerFeaturesOnLoad =
|
40
|
+
this.enableLayerFeaturesOnLoad = false;
|
41
41
|
this.enableSearchDistance = true;
|
42
|
-
this.enableSearchDistanceOnLoad =
|
42
|
+
this.enableSearchDistanceOnLoad = false;
|
43
43
|
this.enableSketchTools = true;
|
44
44
|
this.featureEffect = undefined;
|
45
45
|
this.featureHighlightEnabled = undefined;
|
@@ -265,7 +265,7 @@ export class PublicNotification {
|
|
265
265
|
*/
|
266
266
|
render() {
|
267
267
|
const headerSlot = this._isMobile ? "footer" : "header";
|
268
|
-
return (h(Host, { key: '
|
268
|
+
return (h(Host, { key: '019074cdfaddd8121a6ed255f42dea427aac9440' }, h("calcite-shell", { key: 'ece21e206f6519627bc8f139c35f68838eb701a2' }, h("calcite-action-bar", { key: '92883d5df9fcf43584f3934bf7f61640afed2bdb', class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: headerSlot }, this._getActionGroup("list-check", EPageType.LIST, this._translations.myLists), this.showRefineSelection ? this._getActionGroup("test-data", EPageType.REFINE, this._translations.refineSelection) : null, this._getActionGroup("export", EPageType.EXPORT, this._translations.export)), this._getPage(this._pageType))));
|
269
269
|
}
|
270
270
|
/**
|
271
271
|
* StencilJS: Called once just after the component is first loaded.
|
@@ -1254,7 +1254,7 @@ export class PublicNotification {
|
|
1254
1254
|
},
|
1255
1255
|
"attribute": "enable-layer-features-on-load",
|
1256
1256
|
"reflect": false,
|
1257
|
-
"defaultValue": "
|
1257
|
+
"defaultValue": "false"
|
1258
1258
|
},
|
1259
1259
|
"enableSearchDistance": {
|
1260
1260
|
"type": "boolean",
|
@@ -1290,7 +1290,7 @@ export class PublicNotification {
|
|
1290
1290
|
},
|
1291
1291
|
"attribute": "enable-search-distance-on-load",
|
1292
1292
|
"reflect": false,
|
1293
|
-
"defaultValue": "
|
1293
|
+
"defaultValue": "false"
|
1294
1294
|
},
|
1295
1295
|
"enableSketchTools": {
|
1296
1296
|
"type": "boolean",
|
@@ -76,7 +76,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
76
76
|
this.__registerHost();
|
77
77
|
this.showIntroductionWindow = createEvent(this, "showIntroductionWindow", 7);
|
78
78
|
this.showCoverPage = createEvent(this, "showCoverPage", 7);
|
79
|
-
this.appLayout =
|
79
|
+
this.appLayout = undefined;
|
80
80
|
this.appProxies = undefined;
|
81
81
|
this.basemapConfig = undefined;
|
82
82
|
this.coverPageEnabled = undefined;
|
@@ -99,6 +99,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
99
99
|
this.enableSearch = true;
|
100
100
|
this.enableShare = false;
|
101
101
|
this.enableZoom = true;
|
102
|
+
this.hideMapOnLoad = false;
|
102
103
|
this.mapInfos = [];
|
103
104
|
this.onlyShowUpdatableLayers = true;
|
104
105
|
this.popupHeaderColor = undefined;
|
@@ -182,6 +183,12 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
182
183
|
enableZoomWatchHandler() {
|
183
184
|
this._initMapZoom();
|
184
185
|
}
|
186
|
+
/**
|
187
|
+
* When true and no appLayout is defined the map will be hidden on load
|
188
|
+
*/
|
189
|
+
hideMapOnLoadWatchHandler() {
|
190
|
+
console.warn("hideMapOnLoad will be removed. Please use appLayout to control layout options.");
|
191
|
+
}
|
185
192
|
//--------------------------------------------------------------------------
|
186
193
|
//
|
187
194
|
// Methods (public)
|
@@ -260,7 +267,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
260
267
|
render() {
|
261
268
|
// only avoid border when we have a header color that is not white
|
262
269
|
const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
|
263
|
-
return (h(Host, { key: '
|
270
|
+
return (h(Host, { key: '28614b892c93b83de202a681a756027472d092c2' }, h("calcite-shell", { key: '8f9c57fa9d1c1c88dbac9706376aad6bbd425691', class: "position-relative" }, h("calcite-panel", { key: '3c156df89f396425c2711a39968017cc23910a55', class: `width-full height-full ${borderClass}` }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter()), this._filterModal()));
|
264
271
|
}
|
265
272
|
/**
|
266
273
|
* Called after each render
|
@@ -279,6 +286,12 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
279
286
|
*/
|
280
287
|
async componentDidLoad() {
|
281
288
|
this._resizeObserver.observe(this.el);
|
289
|
+
if (this.hideMapOnLoad && !this.appLayout) {
|
290
|
+
this.appLayout = 'tableView';
|
291
|
+
}
|
292
|
+
else if (!this.appLayout) {
|
293
|
+
this.appLayout = 'splitView';
|
294
|
+
}
|
282
295
|
this._isMapViewOnLoad = this.appLayout === 'mapView';
|
283
296
|
this._setActiveLayout(this.appLayout);
|
284
297
|
}
|
@@ -720,7 +733,8 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
720
733
|
this._translations = messages[0];
|
721
734
|
}
|
722
735
|
static get watchers() { return {
|
723
|
-
"enableZoom": ["enableZoomWatchHandler"]
|
736
|
+
"enableZoom": ["enableZoomWatchHandler"],
|
737
|
+
"hideMapOnLoad": ["hideMapOnLoadWatchHandler"]
|
724
738
|
}; }
|
725
739
|
static get style() { return CrowdsourceManagerStyle0; }
|
726
740
|
}, [0, "crowdsource-manager", {
|
@@ -747,6 +761,7 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
747
761
|
"enableSearch": [4, "enable-search"],
|
748
762
|
"enableShare": [4, "enable-share"],
|
749
763
|
"enableZoom": [4, "enable-zoom"],
|
764
|
+
"hideMapOnLoad": [4, "hide-map-on-load"],
|
750
765
|
"mapInfos": [16],
|
751
766
|
"onlyShowUpdatableLayers": [4, "only-show-updatable-layers"],
|
752
767
|
"popupHeaderColor": [1, "popup-header-color"],
|
@@ -774,7 +789,8 @@ const CrowdsourceManager$1 = /*@__PURE__*/ proxyCustomElement(class CrowdsourceM
|
|
774
789
|
"_filterOpen": [32],
|
775
790
|
"_showInformationHeader": [32]
|
776
791
|
}, [[8, "featureSelectionChange", "featureSelectionChange"], [8, "popupClosed", "popupClosed"], [8, "layoutChanged", "layoutChanged"], [8, "mapChanged", "mapChanged"], [8, "layerSelectionChange", "layerSelectionChange"]], {
|
777
|
-
"enableZoom": ["enableZoomWatchHandler"]
|
792
|
+
"enableZoom": ["enableZoomWatchHandler"],
|
793
|
+
"hideMapOnLoad": ["hideMapOnLoadWatchHandler"]
|
778
794
|
}]);
|
779
795
|
function defineCustomElement$1() {
|
780
796
|
if (typeof customElements === "undefined") {
|
@@ -67,6 +67,8 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
67
67
|
_editor;
|
68
68
|
/**
|
69
69
|
* esri/layers/FeatureLayer: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html
|
70
|
+
* OR
|
71
|
+
* esri/layers/support/SubtypeSublayer: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html
|
70
72
|
*/
|
71
73
|
_layer;
|
72
74
|
/**
|
@@ -171,7 +173,9 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
171
173
|
if (this._layerEditHandle) {
|
172
174
|
this._layerEditHandle.remove();
|
173
175
|
}
|
174
|
-
|
176
|
+
// #896 Editing on sybtype group layer is failing in Manager
|
177
|
+
const layer = this._layer.type === "subtype-sublayer" ? this._layer.parent : this._layer;
|
178
|
+
this._layerEditHandle = layer.on("edits", () => {
|
175
179
|
this.editsComplete.emit();
|
176
180
|
});
|
177
181
|
}
|
@@ -186,7 +190,7 @@ const EditCard = /*@__PURE__*/ proxyCustomElement(class EditCard extends HTMLEle
|
|
186
190
|
!this.graphics[0].layer.editingEnabled : true;
|
187
191
|
const tableNodeClass = this._editorLoading ? "display-none" : "position-absolute";
|
188
192
|
const loadingClass = this._editorLoading ? "" : "display-none";
|
189
|
-
return (h(Host, { key: '
|
193
|
+
return (h(Host, { key: '16dd78822ee6d7c4e2da97c4b7ec7c0678b51e68' }, h("div", { key: '8aba2b86c7bf8e7dfbf7567b156e02b23b728f4e', class: "position-absolute" }, editDisabled ? (h("calcite-notice", { kind: "warning", open: true, slot: "content-top", width: "full" }, h("div", { slot: "message" }, this._translations.enableEditing))) : undefined, h("div", { key: '8230d44ec05ff207681e6333b7f08c80748c4f3d', class: "position-absolute" }, h("div", { key: '71792b5737c43a024ebc677ae168d74569349585', class: tableNodeClass, id: "feature-form", ref: (el) => this._editContainer = el }), h("calcite-loader", { key: '47176534c25769af8ae107c3864901c4294b4359', class: loadingClass, label: "", scale: "s" })))));
|
190
194
|
}
|
191
195
|
//--------------------------------------------------------------------------
|
192
196
|
//
|
@@ -81,6 +81,10 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
|
|
81
81
|
// Properties (protected)
|
82
82
|
//
|
83
83
|
//--------------------------------------------------------------------------
|
84
|
+
/**
|
85
|
+
* esri/request: https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html
|
86
|
+
*/
|
87
|
+
_esriRequest;
|
84
88
|
/**
|
85
89
|
* esri/layers/FeatureLayer: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html
|
86
90
|
*/
|
@@ -310,7 +314,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
|
|
310
314
|
render() {
|
311
315
|
const mapToolsClass = this.enableSketchTools ? "" : "display-none";
|
312
316
|
const mapToolsContainerClass = this.enableSketchTools ? "padding-top-1" : "";
|
313
|
-
return (h(Host, { key: '
|
317
|
+
return (h(Host, { key: '6753158d00a33dd5dfbb1f22cc27388baf4c0b5e' }, this._getMapLayerPicker(), h("div", { key: '082c6be48d3dfbe2e39be2c462959c7772a91d40', class: "border-bottom" }), h("div", { key: '0e8133a809b05bef34c2f19adeff43c1e57cc002', class: "padding-top-sides-1" }, h("div", { key: '4434b5b4d073f3ba9a7e44b82078b9b81733025b', class: "search-widget", ref: (el) => { this._searchElement = el; } }), h("div", { key: '6f01e27e06ea365de6ff98df3f9edd973d87117c', class: mapToolsContainerClass }, h("map-draw-tools", { key: '24ffe562d080955f2aacfd080c0baa1997f8eaab', active: true, class: mapToolsClass, editGraphicsEnabled: !this._useLayerFeaturesEnabled, graphics: this._graphics, mapView: this.mapView, onSketchGraphicsChange: (evt) => void this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, ref: (el) => { this._drawTools = el; } })), this.enableSearchDistance ? this._getBufferOptions() : undefined, this.enableLayerFeatures ? this._getUseLayerFeaturesOptions() : undefined, this._getNumSelected()), h("div", { key: '4c7cf401b5bcc7e4adef34e140d22676fce8ebbc', class: "border-bottom" }), this._getNameInput()));
|
314
318
|
}
|
315
319
|
/**
|
316
320
|
* Renders the buffer tools component.
|
@@ -377,13 +381,15 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
|
|
377
381
|
* @protected
|
378
382
|
*/
|
379
383
|
async _initModules() {
|
380
|
-
const [GraphicsLayer, Graphic, Search, geometryEngine, FeatureLayer] = await loadModules([
|
384
|
+
const [esriRequest, GraphicsLayer, Graphic, Search, geometryEngine, FeatureLayer] = await loadModules([
|
385
|
+
"esri/request",
|
381
386
|
"esri/layers/GraphicsLayer",
|
382
387
|
"esri/Graphic",
|
383
388
|
"esri/widgets/Search",
|
384
389
|
"esri/geometry/geometryEngine",
|
385
390
|
"esri/layers/FeatureLayer"
|
386
391
|
]);
|
392
|
+
this._esriRequest = esriRequest;
|
387
393
|
this.GraphicsLayer = GraphicsLayer;
|
388
394
|
this.Graphic = Graphic;
|
389
395
|
this.Search = Search;
|
@@ -460,25 +466,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
|
|
460
466
|
void this._clearResults(false, clearLabel);
|
461
467
|
});
|
462
468
|
this._searchWidget.on("select-result", (searchResults) => {
|
463
|
-
|
464
|
-
this._searchResult = searchResults.result;
|
465
|
-
const resultFeature = searchResults.result.feature;
|
466
|
-
const resultLayer = resultFeature?.layer;
|
467
|
-
const selectLayer = this.selectLayerView.layer;
|
468
|
-
const oid = resultFeature?.getObjectId();
|
469
|
-
const useOIDs = resultLayer?.url && selectLayer?.url && resultLayer.url === selectLayer.url && !isNaN(oid);
|
470
|
-
const oids = useOIDs ? [oid] : undefined;
|
471
|
-
this._workflowType = EWorkflowType.SEARCH;
|
472
|
-
void this._updateLabel();
|
473
|
-
const graphics = [searchResults.result.feature];
|
474
|
-
this._updateSelection(graphics, useOIDs, oids);
|
475
|
-
this._drawTools.graphics = graphics;
|
476
|
-
this._searchWidget.resultGraphic.visible = false;
|
477
|
-
}
|
478
|
-
else {
|
479
|
-
const clearLabel = this._searchClearLabel();
|
480
|
-
void this._clearResults(false, clearLabel);
|
481
|
-
}
|
469
|
+
void this._selectResult(searchResults.result);
|
482
470
|
});
|
483
471
|
await this._searchWidget.when(() => {
|
484
472
|
this._searchWidget.allPlaceholder = this.searchConfiguration?.allPlaceholder &&
|
@@ -487,6 +475,75 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
|
|
487
475
|
});
|
488
476
|
}
|
489
477
|
}
|
478
|
+
/**
|
479
|
+
* Handle the result from the search widget.
|
480
|
+
*
|
481
|
+
* @param url the url of the layer view
|
482
|
+
*
|
483
|
+
* @returns the url of the views source
|
484
|
+
* @protected
|
485
|
+
*/
|
486
|
+
async _selectResult(result) {
|
487
|
+
if (result) {
|
488
|
+
this._searchResult = result;
|
489
|
+
const resultFeature = result.feature;
|
490
|
+
const resultLayer = resultFeature?.layer;
|
491
|
+
const selectLayer = this.selectLayerView.layer;
|
492
|
+
const oid = resultFeature?.getObjectId();
|
493
|
+
let resultLayerSourceUrl;
|
494
|
+
if (resultLayer.sourceJSON?.isView) {
|
495
|
+
resultLayerSourceUrl = await this._getViewSourceUrl(resultLayer.url);
|
496
|
+
}
|
497
|
+
let selectLayerSourceUrl;
|
498
|
+
if (selectLayer.sourceJSON?.isView) {
|
499
|
+
selectLayerSourceUrl = await this._getViewSourceUrl(selectLayer.url);
|
500
|
+
}
|
501
|
+
const rUrl = resultLayer?.url?.toLowerCase();
|
502
|
+
const rSourceUrl = resultLayerSourceUrl?.toLowerCase();
|
503
|
+
const sUrl = selectLayer?.url?.toLowerCase();
|
504
|
+
const sSourceUrl = selectLayerSourceUrl?.toLowerCase();
|
505
|
+
const useOIDs = rUrl && sUrl &&
|
506
|
+
(rUrl === sUrl || rUrl === sSourceUrl || rSourceUrl === sUrl || rSourceUrl === sSourceUrl) &&
|
507
|
+
!isNaN(oid);
|
508
|
+
const oids = useOIDs ? [oid] : undefined;
|
509
|
+
this._workflowType = EWorkflowType.SEARCH;
|
510
|
+
void this._updateLabel();
|
511
|
+
const graphics = [result.feature];
|
512
|
+
this._updateSelection(graphics, useOIDs, oids);
|
513
|
+
this._drawTools.graphics = graphics;
|
514
|
+
this._searchWidget.resultGraphic.visible = false;
|
515
|
+
}
|
516
|
+
else {
|
517
|
+
const clearLabel = this._searchClearLabel();
|
518
|
+
void this._clearResults(false, clearLabel);
|
519
|
+
}
|
520
|
+
}
|
521
|
+
/**
|
522
|
+
* Get the source url for a view. This function supports single source views only.
|
523
|
+
*
|
524
|
+
* @param url the url of the layer view
|
525
|
+
*
|
526
|
+
* @returns the url of the views source
|
527
|
+
* @protected
|
528
|
+
*/
|
529
|
+
async _getViewSourceUrl(url) {
|
530
|
+
let sourceUrl = "";
|
531
|
+
const resultLayerSourcesUrl = `${url}/sources?f=json`;
|
532
|
+
try {
|
533
|
+
const request = await this._esriRequest(resultLayerSourcesUrl, {
|
534
|
+
query: {
|
535
|
+
f: "json"
|
536
|
+
}
|
537
|
+
});
|
538
|
+
if (request?.data?.services?.length === 1) {
|
539
|
+
sourceUrl = request.data.services[0].url;
|
540
|
+
}
|
541
|
+
}
|
542
|
+
catch (error) {
|
543
|
+
console.log(error);
|
544
|
+
}
|
545
|
+
return sourceUrl;
|
546
|
+
}
|
490
547
|
/**
|
491
548
|
* Check if the current label should be cleared
|
492
549
|
*
|
@@ -71,9 +71,9 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
|
|
71
71
|
this.defaultExportTitle = "";
|
72
72
|
this.defaultNumLabelsPerPage = 6;
|
73
73
|
this.enableLayerFeatures = true;
|
74
|
-
this.enableLayerFeaturesOnLoad =
|
74
|
+
this.enableLayerFeaturesOnLoad = false;
|
75
75
|
this.enableSearchDistance = true;
|
76
|
-
this.enableSearchDistanceOnLoad =
|
76
|
+
this.enableSearchDistanceOnLoad = false;
|
77
77
|
this.enableSketchTools = true;
|
78
78
|
this.featureEffect = undefined;
|
79
79
|
this.featureHighlightEnabled = undefined;
|
@@ -294,7 +294,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
|
|
294
294
|
*/
|
295
295
|
render() {
|
296
296
|
const headerSlot = this._isMobile ? "footer" : "header";
|
297
|
-
return (h(Host, { key: '
|
297
|
+
return (h(Host, { key: '019074cdfaddd8121a6ed255f42dea427aac9440' }, h("calcite-shell", { key: 'ece21e206f6519627bc8f139c35f68838eb701a2' }, h("calcite-action-bar", { key: '92883d5df9fcf43584f3934bf7f61640afed2bdb', class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: headerSlot }, this._getActionGroup("list-check", EPageType.LIST, this._translations.myLists), this.showRefineSelection ? this._getActionGroup("test-data", EPageType.REFINE, this._translations.refineSelection) : null, this._getActionGroup("export", EPageType.EXPORT, this._translations.export)), this._getPage(this._pageType))));
|
298
298
|
}
|
299
299
|
/**
|
300
300
|
* StencilJS: Called once just after the component is first loaded.
|
@@ -1283,6 +1283,8 @@ const EditCard = class {
|
|
1283
1283
|
_editor;
|
1284
1284
|
/**
|
1285
1285
|
* esri/layers/FeatureLayer: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html
|
1286
|
+
* OR
|
1287
|
+
* esri/layers/support/SubtypeSublayer: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html
|
1286
1288
|
*/
|
1287
1289
|
_layer;
|
1288
1290
|
/**
|
@@ -1387,7 +1389,9 @@ const EditCard = class {
|
|
1387
1389
|
if (this._layerEditHandle) {
|
1388
1390
|
this._layerEditHandle.remove();
|
1389
1391
|
}
|
1390
|
-
|
1392
|
+
// #896 Editing on sybtype group layer is failing in Manager
|
1393
|
+
const layer = this._layer.type === "subtype-sublayer" ? this._layer.parent : this._layer;
|
1394
|
+
this._layerEditHandle = layer.on("edits", () => {
|
1391
1395
|
this.editsComplete.emit();
|
1392
1396
|
});
|
1393
1397
|
}
|
@@ -1402,7 +1406,7 @@ const EditCard = class {
|
|
1402
1406
|
!this.graphics[0].layer.editingEnabled : true;
|
1403
1407
|
const tableNodeClass = this._editorLoading ? "display-none" : "position-absolute";
|
1404
1408
|
const loadingClass = this._editorLoading ? "" : "display-none";
|
1405
|
-
return (h(Host, { key: '
|
1409
|
+
return (h(Host, { key: '16dd78822ee6d7c4e2da97c4b7ec7c0678b51e68' }, h("div", { key: '8aba2b86c7bf8e7dfbf7567b156e02b23b728f4e', class: "position-absolute" }, editDisabled ? (h("calcite-notice", { kind: "warning", open: true, slot: "content-top", width: "full" }, h("div", { slot: "message" }, this._translations.enableEditing))) : undefined, h("div", { key: '8230d44ec05ff207681e6333b7f08c80748c4f3d', class: "position-absolute" }, h("div", { key: '71792b5737c43a024ebc677ae168d74569349585', class: tableNodeClass, id: "feature-form", ref: (el) => this._editContainer = el }), h("calcite-loader", { key: '47176534c25769af8ae107c3864901c4294b4359', class: loadingClass, label: "", scale: "s" })))));
|
1406
1410
|
}
|
1407
1411
|
//--------------------------------------------------------------------------
|
1408
1412
|
//
|