@esri/solutions-components 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/public-notification/resources.json +4 -1
- package/dist/assets/t9n/public-notification/resources_en.json +4 -1
- package/dist/cjs/buffer-tools_6.cjs.entry.js +8 -7
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +38 -25
- package/dist/cjs/calcite-input-message_5.cjs.entry.js +272 -21
- package/dist/cjs/{csvUtils-18a03353.js → csvUtils-83af7ae1.js} +5 -5
- package/dist/cjs/layer-table.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-search.cjs.entry.js +46 -7
- package/dist/cjs/{mapViewUtils-8ea9adc5.js → mapViewUtils-55ac76cb.js} +40 -25
- package/dist/cjs/public-notification.cjs.entry.js +101 -18
- package/dist/cjs/{publicNotificationStore-aca88430.js → publicNotificationStore-28a8759d.js} +3 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -5
- package/dist/collection/components/buffer-tools/buffer-tools.js +7 -6
- package/dist/collection/components/layer-table/layer-table.js +1 -1
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +47 -29
- package/dist/collection/components/map-search/map-search.js +66 -7
- package/dist/collection/components/map-select-tools/map-select-tools.js +125 -8
- package/dist/collection/components/pdf-download/pdf-download.js +32 -8
- package/dist/collection/components/public-notification/public-notification.css +46 -41
- package/dist/collection/components/public-notification/public-notification.js +267 -19
- package/dist/collection/components/refine-selection/refine-selection.js +18 -1
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +22 -5
- package/dist/{solutions-components/demos/config-pdf-download.html → collection/demos/buffer-tools.html} +13 -21
- package/dist/collection/demos/index.html +0 -24
- package/dist/collection/demos/map-draw-tools.html +17 -17
- package/dist/collection/demos/map-layer-picker.html +2 -0
- package/dist/collection/demos/map-search.html +16 -15
- package/dist/collection/demos/map-select-tools.html +16 -24
- package/dist/collection/demos/new-public-notification.html +46 -35
- package/dist/collection/demos/pdf-download.html +8 -1
- package/dist/collection/utils/csvUtils.js +4 -4
- package/dist/collection/utils/csvUtils.ts +6 -4
- package/dist/collection/utils/interfaces.ts +65 -1
- package/dist/collection/utils/mapViewUtils.js +36 -22
- package/dist/collection/utils/mapViewUtils.ts +50 -27
- package/dist/collection/utils/publicNotificationStore.js +3 -1
- package/dist/collection/utils/publicNotificationStore.ts +3 -1
- package/dist/collection/utils/queryUtils.js +2 -2
- package/dist/collection/utils/queryUtils.ts +2 -2
- package/dist/components/buffer-tools2.js +1 -1
- package/dist/components/csvUtils.js +4 -4
- package/dist/components/index.d.ts +0 -5
- package/dist/components/index.js +0 -5
- package/dist/components/layer-table.js +2 -3
- package/dist/components/map-layer-picker2.js +177 -28
- package/dist/components/map-search.js +47 -7
- package/dist/components/map-select-tools2.js +56 -11
- package/dist/components/pdf-download2.js +217 -8
- package/dist/components/public-notification.js +154 -55
- package/dist/components/publicNotificationStore.js +3 -1
- package/dist/components/queryUtils.js +3 -3
- package/dist/components/refine-selection-tools2.js +9 -8
- package/dist/components/refine-selection2.js +3 -1
- package/dist/esm/buffer-tools_6.entry.js +8 -7
- package/dist/esm/calcite-combobox_3.entry.js +38 -25
- package/dist/esm/calcite-input-message_5.entry.js +271 -20
- package/dist/esm/{csvUtils-edc0c2a8.js → csvUtils-eb231cfb.js} +5 -5
- package/dist/esm/layer-table.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-search.entry.js +46 -7
- package/dist/esm/{mapViewUtils-31d2c2bb.js → mapViewUtils-e5d8a1e1.js} +39 -25
- package/dist/esm/public-notification.entry.js +101 -18
- package/dist/esm/{publicNotificationStore-3e762eea.js → publicNotificationStore-8e9cb73b.js} +3 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/{collection/demos/config-pdf-download.html → solutions-components/demos/buffer-tools.html} +13 -21
- package/dist/solutions-components/demos/index.html +0 -24
- package/dist/solutions-components/demos/map-draw-tools.html +17 -17
- package/dist/solutions-components/demos/map-layer-picker.html +2 -0
- package/dist/solutions-components/demos/map-search.html +16 -15
- package/dist/solutions-components/demos/map-select-tools.html +16 -24
- package/dist/solutions-components/demos/new-public-notification.html +46 -35
- package/dist/solutions-components/demos/pdf-download.html +8 -1
- package/dist/solutions-components/p-07593958.entry.js +6 -0
- package/dist/solutions-components/p-3fa9b3c8.js +36 -0
- package/dist/solutions-components/p-9b5a9117.entry.js +12 -0
- package/dist/solutions-components/{p-15cd8a97.js → p-9c1ebc90.js} +1 -1
- package/dist/solutions-components/{p-c76f8ff7.entry.js → p-a516c658.entry.js} +1 -1
- package/dist/solutions-components/{p-ad42039f.js → p-b668daf8.js} +2 -2
- package/dist/solutions-components/p-bfa95147.entry.js +17 -0
- package/dist/solutions-components/p-d09a168c.entry.js +6 -0
- package/dist/solutions-components/{p-fa6046a8.entry.js → p-fc9609e6.entry.js} +2 -2
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/csvUtils.ts +6 -4
- package/dist/solutions-components/utils/interfaces.ts +65 -1
- package/dist/solutions-components/utils/mapViewUtils.ts +50 -27
- package/dist/solutions-components/utils/publicNotificationStore.ts +3 -1
- package/dist/solutions-components/utils/queryUtils.ts +2 -2
- package/dist/types/components/buffer-tools/buffer-tools.d.ts +4 -3
- package/dist/types/components/map-layer-picker/map-layer-picker.d.ts +22 -11
- package/dist/types/components/map-search/map-search.d.ts +18 -1
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +31 -1
- package/dist/types/components/pdf-download/pdf-download.d.ts +7 -2
- package/dist/types/components/public-notification/public-notification.d.ts +98 -4
- package/dist/types/components/refine-selection/refine-selection.d.ts +5 -0
- package/dist/types/components/refine-selection-tools/refine-selection-tools.d.ts +6 -1
- package/dist/types/components.d.ts +154 -180
- package/dist/types/preact.d.ts +0 -10
- package/dist/types/utils/csvUtils.d.ts +1 -1
- package/dist/types/utils/interfaces.d.ts +56 -1
- package/dist/types/utils/mapViewUtils.d.ts +19 -9
- package/dist/types/utils/publicNotificationStore.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/check-list.cjs.entry.js +0 -103
- package/dist/cjs/config-buffer-tools.cjs.entry.js +0 -125
- package/dist/cjs/config-draw-tools.cjs.entry.js +0 -85
- package/dist/cjs/config-layer-picker.cjs.entry.js +0 -113
- package/dist/cjs/config-pdf-download.cjs.entry.js +0 -117
- package/dist/cjs/labelFormats-3236d2e0.js +0 -212
- package/dist/collection/components/check-list/check-list.css +0 -3
- package/dist/collection/components/check-list/check-list.js +0 -179
- package/dist/collection/components/config-buffer-tools/config-buffer-tools.css +0 -34
- package/dist/collection/components/config-buffer-tools/config-buffer-tools.js +0 -209
- package/dist/collection/components/config-draw-tools/config-draw-tools.css +0 -17
- package/dist/collection/components/config-draw-tools/config-draw-tools.js +0 -150
- package/dist/collection/components/config-layer-picker/config-layer-picker.css +0 -17
- package/dist/collection/components/config-layer-picker/config-layer-picker.js +0 -218
- package/dist/collection/components/config-pdf-download/config-pdf-download.css +0 -17
- package/dist/collection/components/config-pdf-download/config-pdf-download.js +0 -183
- package/dist/collection/demos/check-list.html +0 -65
- package/dist/collection/demos/config-buffer-tools.html +0 -92
- package/dist/collection/demos/config-draw-tools.html +0 -58
- package/dist/collection/demos/config-layer-picker.html +0 -97
- package/dist/components/check-list.d.ts +0 -11
- package/dist/components/check-list.js +0 -11
- package/dist/components/check-list2.js +0 -131
- package/dist/components/config-buffer-tools.d.ts +0 -11
- package/dist/components/config-buffer-tools.js +0 -187
- package/dist/components/config-draw-tools.d.ts +0 -11
- package/dist/components/config-draw-tools.js +0 -121
- package/dist/components/config-layer-picker.d.ts +0 -11
- package/dist/components/config-layer-picker.js +0 -163
- package/dist/components/config-pdf-download.d.ts +0 -11
- package/dist/components/config-pdf-download.js +0 -154
- package/dist/components/labelFormats.js +0 -210
- package/dist/components/mapViewUtils.js +0 -129
- package/dist/esm/check-list.entry.js +0 -99
- package/dist/esm/config-buffer-tools.entry.js +0 -121
- package/dist/esm/config-draw-tools.entry.js +0 -81
- package/dist/esm/config-layer-picker.entry.js +0 -109
- package/dist/esm/config-pdf-download.entry.js +0 -113
- package/dist/esm/labelFormats-b37958c3.js +0 -210
- package/dist/solutions-components/demos/check-list.html +0 -65
- package/dist/solutions-components/demos/config-buffer-tools.html +0 -92
- package/dist/solutions-components/demos/config-draw-tools.html +0 -58
- package/dist/solutions-components/demos/config-layer-picker.html +0 -97
- package/dist/solutions-components/p-16a0e65a.entry.js +0 -6
- package/dist/solutions-components/p-35078393.entry.js +0 -17
- package/dist/solutions-components/p-3d72bba6.entry.js +0 -6
- package/dist/solutions-components/p-3e444242.entry.js +0 -6
- package/dist/solutions-components/p-67afea92.entry.js +0 -12
- package/dist/solutions-components/p-7dcab29d.js +0 -36
- package/dist/solutions-components/p-89f7b02a.entry.js +0 -6
- package/dist/solutions-components/p-906b7b96.entry.js +0 -6
- package/dist/solutions-components/p-99c98510.entry.js +0 -6
- package/dist/solutions-components/p-b1a3605f.entry.js +0 -6
- package/dist/solutions-components/p-e99b1247.js +0 -6
- package/dist/types/components/check-list/check-list.d.ts +0 -57
- package/dist/types/components/config-buffer-tools/config-buffer-tools.d.ts +0 -92
- package/dist/types/components/config-draw-tools/config-draw-tools.d.ts +0 -58
- package/dist/types/components/config-layer-picker/config-layer-picker.d.ts +0 -83
- package/dist/types/components/config-pdf-download/config-pdf-download.d.ts +0 -81
@@ -34,6 +34,7 @@ export class RefineSelection {
|
|
34
34
|
*/
|
35
35
|
this._addEnabled = true;
|
36
36
|
this.addresseeLayer = undefined;
|
37
|
+
this.enabledLayerIds = [];
|
37
38
|
this.mapView = undefined;
|
38
39
|
this.selectionSets = [];
|
39
40
|
this.GraphicsLayer = undefined;
|
@@ -66,7 +67,7 @@ export class RefineSelection {
|
|
66
67
|
* Renders the component.
|
67
68
|
*/
|
68
69
|
render() {
|
69
|
-
return (h(Host, null, h("div", { class: "padding-1" }, h("div", null, h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, h("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove)), h("refine-selection-tools", { border: true, ids: utils.getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? ESelectionMode.ADD : ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, useLayerPicker: false })), h("br", null), (h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
|
70
|
+
return (h(Host, null, h("div", { class: "padding-1" }, h("div", null, h("calcite-radio-group", { class: "w-100", onCalciteRadioGroupChange: (evt) => this._modeChanged(evt) }, h("calcite-radio-group-item", { checked: this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.ADD), value: ESelectionMode.ADD }, this._translations.add), h("calcite-radio-group-item", { checked: !this._addEnabled, class: "w-50", onClick: () => this._setSelectionMode(ESelectionMode.REMOVE), value: ESelectionMode.REMOVE }, this._translations.remove)), h("refine-selection-tools", { border: true, enabledLayerIds: this.enabledLayerIds, ids: utils.getSelectionIds(this.selectionSets), layerViews: [this.addresseeLayer], mapView: this.mapView, mode: this._addEnabled ? ESelectionMode.ADD : ESelectionMode.REMOVE, ref: (el) => { this._refineTools = el; }, useLayerPicker: false })), h("br", null), (h("calcite-list", { class: "list-border" }, this._getRefineSelectionSetList())))));
|
70
71
|
}
|
71
72
|
//--------------------------------------------------------------------------
|
72
73
|
//
|
@@ -283,6 +284,22 @@ export class RefineSelection {
|
|
283
284
|
"text": "esri/views/layers/FeatureLayerView: https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-FeatureLayerView.html"
|
284
285
|
}
|
285
286
|
},
|
287
|
+
"enabledLayerIds": {
|
288
|
+
"type": "unknown",
|
289
|
+
"mutable": false,
|
290
|
+
"complexType": {
|
291
|
+
"original": "string[]",
|
292
|
+
"resolved": "string[]",
|
293
|
+
"references": {}
|
294
|
+
},
|
295
|
+
"required": false,
|
296
|
+
"optional": false,
|
297
|
+
"docs": {
|
298
|
+
"tags": [],
|
299
|
+
"text": "string[]: Optional list of enabled layer ids\r\n If empty all layers will be available"
|
300
|
+
},
|
301
|
+
"defaultValue": "[]"
|
302
|
+
},
|
286
303
|
"mapView": {
|
287
304
|
"type": "unknown",
|
288
305
|
"mutable": false,
|
@@ -28,7 +28,7 @@ import { getLocaleComponentStrings } from "../../utils/locale";
|
|
28
28
|
export class RefineSelectionTools {
|
29
29
|
constructor() {
|
30
30
|
/**
|
31
|
-
* {<layer
|
31
|
+
* {<layer id>: Graphic[]}: Collection of graphics returned from queries to the layer
|
32
32
|
*/
|
33
33
|
this._featuresCollection = {};
|
34
34
|
/**
|
@@ -41,6 +41,7 @@ export class RefineSelectionTools {
|
|
41
41
|
this._undoStack = [];
|
42
42
|
this.active = false;
|
43
43
|
this.border = false;
|
44
|
+
this.enabledLayerIds = [];
|
44
45
|
this.graphics = undefined;
|
45
46
|
this.ids = [];
|
46
47
|
this.layerView = undefined;
|
@@ -130,7 +131,7 @@ export class RefineSelectionTools {
|
|
130
131
|
render() {
|
131
132
|
const showLayerPickerClass = this.useLayerPicker ? "div-visible" : "div-not-visible";
|
132
133
|
const drawClass = this.border ? " border" : "";
|
133
|
-
return (h(Host, null, h("div", null, h("map-layer-picker", { class: showLayerPickerClass, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); },
|
134
|
+
return (h(Host, null, h("div", null, h("map-layer-picker", { class: showLayerPickerClass, enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedLayerIds: this.layerViews.map(l => l.layer.id), selectionMode: "single" }), h("div", { class: "margin-top-1" + drawClass }, h("div", { class: "esri-sketch esri-widget" }, h("div", { class: "esri-sketch__panel" }, h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "select", onClick: () => this._setSelectionMode(ESelectionType.POINT), scale: "s", text: this._translations.select })), h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: !this._selectEnabled, icon: "line", onClick: () => this._setSelectionMode(ESelectionType.LINE), scale: "s", text: this._translations.selectLine }), h("calcite-action", { disabled: !this._selectEnabled, icon: "polygon", onClick: () => this._setSelectionMode(ESelectionType.POLY), scale: "s", text: this._translations.selectPolygon }), h("calcite-action", { disabled: !this._selectEnabled, icon: "rectangle", onClick: () => this._setSelectionMode(ESelectionType.RECT), scale: "s", text: this._translations.selectRectangle })), h("div", { class: "esri-sketch__tool-section esri-sketch__section" }, h("calcite-action", { disabled: this._undoStack.length === 0, icon: "undo", onClick: () => this._undo(), scale: "s", text: this._translations.undo }), h("calcite-action", { disabled: this._redoStack.length === 0, icon: "redo", onClick: () => this._redo(), scale: "s", text: this._translations.redo }))))))));
|
134
135
|
}
|
135
136
|
//--------------------------------------------------------------------------
|
136
137
|
//
|
@@ -257,8 +258,8 @@ export class RefineSelectionTools {
|
|
257
258
|
async _layerSelectionChange(evt) {
|
258
259
|
if (Array.isArray(evt.detail) && evt.detail.length > 0) {
|
259
260
|
this._selectEnabled = true;
|
260
|
-
const layerPromises = evt.detail.map(
|
261
|
-
return getMapLayerView(this.mapView,
|
261
|
+
const layerPromises = evt.detail.map(id => {
|
262
|
+
return getMapLayerView(this.mapView, id);
|
262
263
|
});
|
263
264
|
return Promise.all(layerPromises).then((layerViews) => {
|
264
265
|
this.layerViews = layerViews;
|
@@ -305,7 +306,7 @@ export class RefineSelectionTools {
|
|
305
306
|
*/
|
306
307
|
async _selectFeatures(geom) {
|
307
308
|
const queryFeaturePromises = this.layerViews.map(layerView => {
|
308
|
-
this._featuresCollection[layerView.layer.
|
309
|
+
this._featuresCollection[layerView.layer.id] = [];
|
309
310
|
return queryFeaturesByGeometry(0, layerView.layer, geom, this._featuresCollection);
|
310
311
|
});
|
311
312
|
return Promise.all(queryFeaturePromises).then(async (response) => {
|
@@ -455,6 +456,22 @@ export class RefineSelectionTools {
|
|
455
456
|
"reflect": false,
|
456
457
|
"defaultValue": "false"
|
457
458
|
},
|
459
|
+
"enabledLayerIds": {
|
460
|
+
"type": "unknown",
|
461
|
+
"mutable": false,
|
462
|
+
"complexType": {
|
463
|
+
"original": "string[]",
|
464
|
+
"resolved": "string[]",
|
465
|
+
"references": {}
|
466
|
+
},
|
467
|
+
"required": false,
|
468
|
+
"optional": false,
|
469
|
+
"docs": {
|
470
|
+
"tags": [],
|
471
|
+
"text": "string[]: Optional list of enabled layer ids\r\n If empty all layers will be available"
|
472
|
+
},
|
473
|
+
"defaultValue": "[]"
|
474
|
+
},
|
458
475
|
"graphics": {
|
459
476
|
"type": "unknown",
|
460
477
|
"mutable": true,
|
@@ -5,7 +5,7 @@
|
|
5
5
|
name="viewport"
|
6
6
|
content="initial-scale=1,maximum-scale=1,user-scalable=no"
|
7
7
|
/>
|
8
|
-
<title>
|
8
|
+
<title>Buffer Tools</title>
|
9
9
|
<!--
|
10
10
|
| Copyright 2022 Esri
|
11
11
|
|
|
@@ -22,7 +22,7 @@
|
|
22
22
|
| limitations under the License.
|
23
23
|
-->
|
24
24
|
<style>
|
25
|
-
|
25
|
+
#viewDiv {
|
26
26
|
padding: 0;
|
27
27
|
margin: 0;
|
28
28
|
height: 100%;
|
@@ -39,6 +39,9 @@
|
|
39
39
|
padding: 1rem;
|
40
40
|
border: 1px solid;
|
41
41
|
}
|
42
|
+
.column[dir="rtl"] {
|
43
|
+
float: left;
|
44
|
+
}
|
42
45
|
</style>
|
43
46
|
|
44
47
|
<link
|
@@ -51,39 +54,28 @@
|
|
51
54
|
<script src="https://js.arcgis.com/4.25/"></script>
|
52
55
|
<script type="module" src="../solutions-components.esm.js"></script>
|
53
56
|
<script>
|
54
|
-
require(["esri/
|
55
|
-
|
57
|
+
require(["esri/Map", "esri/views/MapView"], (
|
58
|
+
Map,
|
56
59
|
MapView
|
57
60
|
) => {
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
}
|
61
|
+
|
62
|
+
const map = new Map({
|
63
|
+
basemap: "topo-vector"
|
62
64
|
});
|
63
65
|
|
64
66
|
const demo = document.getElementById("demo");
|
65
67
|
demo.mapView = new MapView({
|
66
68
|
container: "viewDiv",
|
67
|
-
map:
|
69
|
+
map: map,
|
68
70
|
zoom: 5,
|
69
71
|
center: [-98, 42]
|
70
72
|
});
|
71
73
|
});
|
72
|
-
|
73
|
-
function showResults() {
|
74
|
-
const demo = document.getElementById("demo");
|
75
|
-
demo?.getConfigInfo().then(configInfo => {
|
76
|
-
alert(JSON.stringify(configInfo));
|
77
|
-
});
|
78
|
-
};
|
79
74
|
</script>
|
80
75
|
</head>
|
81
76
|
|
82
77
|
<body>
|
83
|
-
<div id="viewDiv"
|
84
|
-
<
|
85
|
-
<config-pdf-download id="demo"></config-pdf-download>
|
86
|
-
<calcite-button onclick="showResults()">Demo Results</calcite-button>
|
87
|
-
</div>
|
78
|
+
<div id="viewDiv"></div>
|
79
|
+
<buffer-tools id="demo" class="over-map column" distance="10" unit="miles"></map-search>
|
88
80
|
</body>
|
89
81
|
</html>
|
@@ -124,30 +124,6 @@
|
|
124
124
|
</div>
|
125
125
|
</div>
|
126
126
|
</div>
|
127
|
-
<div>
|
128
|
-
<h3>Config Public Notification Examples!</h3>
|
129
|
-
<div>
|
130
|
-
<div class="demo-column">
|
131
|
-
<ul class="nav">
|
132
|
-
<li>
|
133
|
-
<calcite-link href="./config-buffer-tools.html" target="_blank"><config-buffer-tools></calcite-link>
|
134
|
-
</li>
|
135
|
-
<li>
|
136
|
-
<calcite-link href="./config-draw-tools.html" target="_blank"><config-draw-tools></calcite-link>
|
137
|
-
</li>
|
138
|
-
<li>
|
139
|
-
<calcite-link href="./config-layer-picker.html" target="_blank"><config-layer-picker></calcite-link>
|
140
|
-
</li>
|
141
|
-
<li>
|
142
|
-
<calcite-link href="./config-pdf-download.html" target="_blank"><config-pdf-download></calcite-link>
|
143
|
-
</li>
|
144
|
-
<li>
|
145
|
-
<calcite-link href="./check-list.html" target="_blank"><check-list></calcite-link>
|
146
|
-
</li>
|
147
|
-
</ul>
|
148
|
-
</div>
|
149
|
-
</div>
|
150
|
-
</div>
|
151
127
|
|
152
128
|
<div>
|
153
129
|
<h3>Roadway Management</h3>
|
@@ -49,27 +49,27 @@
|
|
49
49
|
<link rel="stylesheet" href="https://webapps-cdn.esri.com/CDN/fonts/v1.4.1/fonts.css" />
|
50
50
|
<link rel="stylesheet" href="../solutions-components.css" type="text/css">
|
51
51
|
|
52
|
+
<script src="https://js.arcgis.com/4.25/"></script>
|
52
53
|
<script type="module" src="../solutions-components.esm.js"></script>
|
53
|
-
<script
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
54
|
+
<script>
|
55
|
+
require(["esri/WebMap", "esri/views/MapView", "esri/widgets/Legend"], (
|
56
|
+
WebMap,
|
57
|
+
MapView,
|
58
|
+
Legend
|
59
|
+
) => {
|
58
60
|
|
59
|
-
|
60
|
-
|
61
|
-
|
61
|
+
const map = new Map({
|
62
|
+
basemap: "topo-vector"
|
63
|
+
});
|
62
64
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
65
|
+
const demo = document.getElementById("demo");
|
66
|
+
demo.mapView = new MapView({
|
67
|
+
container: "viewDiv",
|
68
|
+
map: map,
|
69
|
+
zoom: 5,
|
70
|
+
center: [-98, 42]
|
71
|
+
});
|
69
72
|
});
|
70
|
-
|
71
|
-
demo.Sketch = Sketch;
|
72
|
-
demo.GraphicsLayer = GraphicsLayer;
|
73
73
|
</script>
|
74
74
|
</head>
|
75
75
|
|
@@ -51,25 +51,26 @@
|
|
51
51
|
<link rel="stylesheet" href="https://webapps-cdn.esri.com/CDN/fonts/v1.4.1/fonts.css" />
|
52
52
|
<link rel="stylesheet" href="../solutions-components.css" type="text/css">
|
53
53
|
|
54
|
+
<script src="https://js.arcgis.com/4.25/"></script>
|
54
55
|
<script type="module" src="../solutions-components.esm.js"></script>
|
55
|
-
<script
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
<script>
|
57
|
+
require(["esri/Map", "esri/views/MapView"], (
|
58
|
+
Map,
|
59
|
+
MapView
|
60
|
+
) => {
|
59
61
|
|
60
|
-
|
61
|
-
|
62
|
-
|
62
|
+
const map = new Map({
|
63
|
+
basemap: "topo-vector"
|
64
|
+
});
|
63
65
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
66
|
+
const demo = document.getElementById("demo");
|
67
|
+
demo.mapView = new MapView({
|
68
|
+
container: "viewDiv",
|
69
|
+
map: map,
|
70
|
+
zoom: 5,
|
71
|
+
center: [-98, 42]
|
72
|
+
});
|
70
73
|
});
|
71
|
-
|
72
|
-
demo.Search = Search;
|
73
74
|
</script>
|
74
75
|
</head>
|
75
76
|
|
@@ -51,33 +51,25 @@
|
|
51
51
|
<link rel="stylesheet" href="https://webapps-cdn.esri.com/CDN/fonts/v1.4.1/fonts.css" />
|
52
52
|
<link rel="stylesheet" href="../solutions-components.css" type="text/css">
|
53
53
|
|
54
|
+
<script src="https://js.arcgis.com/4.25/"></script>
|
54
55
|
<script type="module" src="../solutions-components.esm.js"></script>
|
55
|
-
<script
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
56
|
+
<script>
|
57
|
+
require(["esri/Map", "esri/views/MapView"], (
|
58
|
+
Map,
|
59
|
+
MapView
|
60
|
+
) => {
|
61
|
+
const map = new Map({
|
62
|
+
basemap: "topo-vector"
|
63
|
+
});
|
63
64
|
|
64
|
-
|
65
|
-
|
65
|
+
const demo = document.getElementById("demo");
|
66
|
+
demo.mapView = new MapView({
|
67
|
+
container: "viewDiv",
|
68
|
+
map: map,
|
69
|
+
zoom: 5,
|
70
|
+
center: [-98, 42]
|
71
|
+
});
|
66
72
|
});
|
67
|
-
|
68
|
-
const demo = document.getElementById("demo");
|
69
|
-
demo.mapView = new MapView({
|
70
|
-
container: "viewDiv",
|
71
|
-
map: map,
|
72
|
-
zoom: 5,
|
73
|
-
center: [-98, 42]
|
74
|
-
});
|
75
|
-
|
76
|
-
demo.Sketch = Sketch;
|
77
|
-
demo.GraphicsLayer = GraphicsLayer;
|
78
|
-
demo.Search = Search;
|
79
|
-
demo.Graphic = Graphic;
|
80
|
-
demo.SketchViewModel = SketchViewModel;
|
81
73
|
</script>
|
82
74
|
</head>
|
83
75
|
|
@@ -60,47 +60,58 @@
|
|
60
60
|
<link rel="stylesheet" href="https://webapps-cdn.esri.com/CDN/fonts/v1.4.1/fonts.css" />
|
61
61
|
<link rel="stylesheet" href="../solutions-components.css" type="text/css">
|
62
62
|
|
63
|
+
<script src="https://js.arcgis.com/4.25/"></script>
|
63
64
|
<script type="module" src="../solutions-components.esm.js"></script>
|
64
65
|
|
65
|
-
<script
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
// id: "3715f4899bea4b2a948347c5c2357e58"
|
80
|
-
// InstantApps
|
81
|
-
id: "863e4f6f2a7840db896cc1b1606d552d"
|
82
|
-
}
|
83
|
-
});
|
66
|
+
<script>
|
67
|
+
require(["esri/WebMap", "esri/views/MapView", "esri/widgets/Legend"], (
|
68
|
+
WebMap,
|
69
|
+
MapView,
|
70
|
+
Legend
|
71
|
+
) => {
|
72
|
+
var webMap = new WebMap({
|
73
|
+
portalItem: {
|
74
|
+
// solutions
|
75
|
+
// id: "3715f4899bea4b2a948347c5c2357e58"
|
76
|
+
// InstantApps
|
77
|
+
id: "863e4f6f2a7840db896cc1b1606d552d"
|
78
|
+
}
|
79
|
+
});
|
84
80
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
81
|
+
const demo = document.getElementById("demo");
|
82
|
+
demo.mapView = new MapView({
|
83
|
+
container: "viewDiv",
|
84
|
+
map: webMap
|
85
|
+
});
|
90
86
|
|
91
|
-
|
92
|
-
|
93
|
-
|
87
|
+
demo.mapView.when(() => {
|
88
|
+
const legend = new Legend({
|
89
|
+
view: demo.mapView
|
90
|
+
});
|
91
|
+
demo.mapView.ui.add(legend, "top-left");
|
94
92
|
});
|
95
|
-
demo.
|
93
|
+
demo.addresseeLayerIds = ["18434515eb8-layer-12"];
|
94
|
+
demo.defaultBufferDistance = 100;
|
95
|
+
demo.defaultBufferUnit = "kilometers";
|
96
|
+
demo.exportOptions = {
|
97
|
+
csvOptions: {
|
98
|
+
enabled: true, // I question if this should be exposed
|
99
|
+
addColumnTitle: false
|
100
|
+
},
|
101
|
+
pdfOptions: {
|
102
|
+
enabled: true, // I question if this should be exposed
|
103
|
+
enabledSizeValues: [6,10,14,20]
|
104
|
+
}
|
105
|
+
};
|
106
|
+
demo.featureEffect = {
|
107
|
+
includedEffect: "invert(100%)",
|
108
|
+
excludedEffect: "blur(5px)"
|
109
|
+
};
|
110
|
+
demo.featureHighlightEnabled = true;
|
111
|
+
demo.noResultText = "No results found";
|
112
|
+
demo.selectionLayerIds = ["1843422bf6b-layer-7"];
|
113
|
+
demo.showSearchSettings = false;
|
96
114
|
});
|
97
|
-
|
98
|
-
demo.Sketch = Sketch;
|
99
|
-
demo.GraphicsLayer = GraphicsLayer;
|
100
|
-
demo.Search = Search;
|
101
|
-
demo.Graphic = Graphic;
|
102
|
-
demo.SketchViewModel = SketchViewModel;
|
103
|
-
demo.geometryEngine = geometryEngine;
|
104
115
|
</script>
|
105
116
|
</head>
|
106
117
|
|
@@ -39,9 +39,16 @@
|
|
39
39
|
<link rel="stylesheet" href="../solutions-components.css" type="text/css">
|
40
40
|
|
41
41
|
<script type="module" src="../solutions-components.esm.js"></script>
|
42
|
+
<script>
|
43
|
+
function init() {
|
44
|
+
const demo = document.getElementById("demo");
|
45
|
+
demo.enabledSizeValues = [6,10];
|
46
|
+
demo.disabled = false;
|
47
|
+
}
|
48
|
+
</script>
|
42
49
|
</head>
|
43
50
|
|
44
|
-
<body>
|
51
|
+
<body onload="init()">
|
45
52
|
<pdf-download class="column over-map" id="demo"></pdf-download>
|
46
53
|
</body>
|
47
54
|
</html>
|
@@ -28,7 +28,7 @@ import { queryFeaturesByID } from "./queryUtils";
|
|
28
28
|
*
|
29
29
|
* @returns Promise when the function has completed
|
30
30
|
*/
|
31
|
-
export async function exportCSV(layerView, ids) {
|
31
|
+
export async function exportCSV(layerView, ids, addColumnTitle) {
|
32
32
|
const featureSet = await queryFeaturesByID(ids, layerView.layer);
|
33
33
|
const attributes = featureSet.features.map(f => f.attributes);
|
34
34
|
const fieldNames = {};
|
@@ -38,7 +38,7 @@ export async function exportCSV(layerView, ids) {
|
|
38
38
|
fieldNames[k] = k;
|
39
39
|
}
|
40
40
|
});
|
41
|
-
_downloadCSVFile(fieldNames, attributes, `notify-${Date.now().toString()}
|
41
|
+
_downloadCSVFile(fieldNames, attributes, `notify-${Date.now().toString()}`, addColumnTitle);
|
42
42
|
}
|
43
43
|
/**
|
44
44
|
* Download the CSV file
|
@@ -51,8 +51,8 @@ export async function exportCSV(layerView, ids) {
|
|
51
51
|
*
|
52
52
|
* @returns void
|
53
53
|
*/
|
54
|
-
function _downloadCSVFile(fieldNames, attributes, fileTitle) {
|
55
|
-
if (fieldNames) {
|
54
|
+
function _downloadCSVFile(fieldNames, attributes, fileTitle, addColumnTitle) {
|
55
|
+
if (addColumnTitle && fieldNames) {
|
56
56
|
attributes.unshift(fieldNames);
|
57
57
|
}
|
58
58
|
// format values to string so it doesn't get tripped up when a value has a comma
|
@@ -28,7 +28,8 @@ import { queryFeaturesByID } from "./queryUtils";
|
|
28
28
|
*/
|
29
29
|
export async function exportCSV(
|
30
30
|
layerView: __esri.FeatureLayerView,
|
31
|
-
ids: number[]
|
31
|
+
ids: number[],
|
32
|
+
addColumnTitle: boolean
|
32
33
|
): Promise<void> {
|
33
34
|
const featureSet = await queryFeaturesByID(ids, layerView.layer);
|
34
35
|
const attributes = featureSet.features.map(f => f.attributes);
|
@@ -39,7 +40,7 @@ export async function exportCSV(
|
|
39
40
|
fieldNames[k] = k;
|
40
41
|
}
|
41
42
|
});
|
42
|
-
_downloadCSVFile(fieldNames, attributes, `notify-${Date.now().toString()}
|
43
|
+
_downloadCSVFile(fieldNames, attributes, `notify-${Date.now().toString()}`, addColumnTitle);
|
43
44
|
}
|
44
45
|
|
45
46
|
/**
|
@@ -56,9 +57,10 @@ export async function exportCSV(
|
|
56
57
|
function _downloadCSVFile(
|
57
58
|
fieldNames: {[key: string]: string},
|
58
59
|
attributes: {[key: string]: string}[],
|
59
|
-
fileTitle: string
|
60
|
+
fileTitle: string,
|
61
|
+
addColumnTitle: boolean
|
60
62
|
): void {
|
61
|
-
if (fieldNames) {
|
63
|
+
if (addColumnTitle && fieldNames) {
|
62
64
|
attributes.unshift(fieldNames);
|
63
65
|
}
|
64
66
|
// format values to string so it doesn't get tripped up when a value has a comma
|
@@ -81,6 +81,70 @@ export enum EExpandType {
|
|
81
81
|
|
82
82
|
export type SelectionMode = "single" | "multi";
|
83
83
|
|
84
|
+
export type ValidSize = 6|10|14|20|30|60|80;
|
85
|
+
|
86
|
+
export type DistanceUnit = "feet"|"meters"|"miles"|"kilometers";
|
87
|
+
|
88
|
+
export interface IExportOptions {
|
89
|
+
csvOptions: ICsvOptions;
|
90
|
+
pdfOptions: IPdfOptions;
|
91
|
+
}
|
92
|
+
|
93
|
+
export interface ICsvOptions {
|
94
|
+
enabled: boolean;
|
95
|
+
addColumnTitle: boolean;
|
96
|
+
}
|
97
|
+
|
98
|
+
export interface IPdfOptions {
|
99
|
+
enabled: boolean;
|
100
|
+
enabledSizeValues: ValidSize[];
|
101
|
+
}
|
102
|
+
|
103
|
+
export interface ISearchConfiguration {
|
104
|
+
activeSourceIndex?: number;
|
105
|
+
allPlaceholder?: string;
|
106
|
+
includeDefaultSources?: boolean;
|
107
|
+
searchAllEnabled?: boolean;
|
108
|
+
sources: Array<ILocatorSourceConfigItem | ILayerSourceConfigItem>;
|
109
|
+
}
|
110
|
+
|
111
|
+
interface ISearchSourceConfigItem {
|
112
|
+
maxResults: number;
|
113
|
+
maxSuggestions: number;
|
114
|
+
minSuggestCharacters: number;
|
115
|
+
name: string;
|
116
|
+
suggestionsEnabled: boolean;
|
117
|
+
placeholder: string;
|
118
|
+
withinViewEnabled: boolean;
|
119
|
+
zoomScale: number;
|
120
|
+
}
|
121
|
+
|
122
|
+
export interface ILocatorSourceConfigItem extends ISearchSourceConfigItem {
|
123
|
+
url: string;
|
124
|
+
singleLineFieldName: string;
|
125
|
+
countryCode: string;
|
126
|
+
}
|
127
|
+
|
128
|
+
export interface ILayerSourceConfigItem extends ISearchSourceConfigItem {
|
129
|
+
displayField: string;
|
130
|
+
exactMatch: boolean;
|
131
|
+
layer: {
|
132
|
+
url: string | __esri.FeatureLayer;
|
133
|
+
id: string;
|
134
|
+
};
|
135
|
+
outFields: string[];
|
136
|
+
searchFields: string;
|
137
|
+
popupTemplate: any;
|
138
|
+
popupEnabled: boolean;
|
139
|
+
}
|
140
|
+
|
141
|
+
/**
|
142
|
+
* Layer id and title key value pair
|
143
|
+
*/
|
144
|
+
export interface ILayerHash {
|
145
|
+
[key: string]: string;
|
146
|
+
}
|
147
|
+
|
84
148
|
/**
|
85
149
|
* Key details from the templates item
|
86
150
|
*/
|
@@ -309,7 +373,7 @@ export interface ISelectionSet {
|
|
309
373
|
buffer: __esri.Geometry;
|
310
374
|
distance: number;
|
311
375
|
download: boolean;
|
312
|
-
unit:
|
376
|
+
unit: DistanceUnit;
|
313
377
|
label: string;
|
314
378
|
selectedIds: number[];
|
315
379
|
layerView: __esri.FeatureLayerView;
|