@esri/solutions-components 0.6.9 → 0.6.11
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/assets/t9n/crowdsource-manager/resources.json +2 -1
- package/dist/assets/t9n/crowdsource-manager/resources_en.json +2 -1
- package/dist/assets/t9n/info-card/resources.json +4 -1
- package/dist/assets/t9n/info-card/resources_en.json +4 -1
- package/dist/assets/t9n/layer-table/resources.json +2 -1
- package/dist/assets/t9n/layer-table/resources_en.json +2 -1
- package/dist/assets/t9n/map-tools/resources.json +0 -3
- package/dist/assets/t9n/map-tools/resources_en.json +0 -3
- package/dist/cjs/basemap-gallery_5.cjs.entry.js +6 -61
- package/dist/cjs/buffer-tools_4.cjs.entry.js +4 -2
- package/dist/cjs/card-manager_3.cjs.entry.js +22 -12
- package/dist/cjs/crowdsource-manager.cjs.entry.js +27 -5
- package/dist/cjs/{downloadUtils-1f057ec0.js → downloadUtils-471a6a2d.js} +16 -10
- package/dist/cjs/edit-card_2.cjs.entry.js +34 -2
- package/dist/cjs/{index.es-a1507f1c.js → index.es-33154f03.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +1 -1
- package/dist/cjs/public-notification.cjs.entry.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +4 -2
- package/dist/collection/components/card-manager/card-manager.js +1 -1
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.css +23 -2
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +27 -4
- package/dist/collection/components/info-card/info-card.css +15 -2
- package/dist/collection/components/info-card/info-card.js +34 -1
- package/dist/collection/components/layer-table/layer-table.css +20 -0
- package/dist/collection/components/layer-table/layer-table.js +5 -1
- package/dist/collection/components/map-card/map-card.css +0 -7
- package/dist/collection/components/map-card/map-card.js +13 -7
- package/dist/collection/components/map-picker/map-picker.css +64 -60
- package/dist/collection/components/map-picker/map-picker.js +2 -2
- package/dist/collection/components/map-tools/map-tools.css +45 -31
- package/dist/collection/components/map-tools/map-tools.js +2 -59
- package/dist/collection/utils/downloadUtils.js +15 -9
- package/dist/collection/utils/downloadUtils.ts +21 -10
- package/dist/components/buffer-tools2.js +4 -2
- package/dist/components/card-manager2.js +6 -6
- package/dist/components/crowdsource-manager.js +28 -5
- package/dist/components/downloadUtils.js +15 -9
- package/dist/components/info-card2.js +40 -7
- package/dist/components/layer-table2.js +6 -2
- package/dist/components/map-card2.js +14 -8
- package/dist/components/map-picker2.js +3 -3
- package/dist/components/map-tools2.js +3 -58
- package/dist/esm/basemap-gallery_5.entry.js +6 -61
- package/dist/esm/buffer-tools_4.entry.js +4 -2
- package/dist/esm/card-manager_3.entry.js +22 -12
- package/dist/esm/crowdsource-manager.entry.js +27 -5
- package/dist/esm/{downloadUtils-64c27514.js → downloadUtils-8d4c13bb.js} +16 -10
- package/dist/esm/edit-card_2.entry.js +34 -2
- package/dist/esm/{index.es-b7bc2db1.js → index.es-065c3035.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +1 -1
- package/dist/esm/public-notification.entry.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/{p-12f06497.entry.js → p-0dd8368d.entry.js} +1 -1
- package/dist/solutions-components/p-46352a57.entry.js +6 -0
- package/dist/solutions-components/{p-22d06238.js → p-6eb4ba8f.js} +1 -1
- package/dist/solutions-components/{p-35cb6eca.entry.js → p-7a8d99fe.entry.js} +2 -2
- package/dist/solutions-components/{p-a26dc184.js → p-95c11620.js} +2 -2
- package/dist/solutions-components/p-9eba78eb.entry.js +6 -0
- package/dist/solutions-components/{p-b2a52acb.entry.js → p-c26cd409.entry.js} +1 -1
- package/dist/solutions-components/p-d4cb29ed.entry.js +6 -0
- package/dist/solutions-components/p-fb7ca639.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/downloadUtils.ts +21 -10
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +17 -0
- package/dist/types/components/info-card/info-card.d.ts +23 -0
- package/dist/types/components/map-card/map-card.d.ts +4 -0
- package/dist/types/components/map-tools/map-tools.d.ts +0 -42
- package/dist/types/utils/downloadUtils.d.ts +7 -3
- package/package.json +1 -1
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/solutions-components/p-0dce2c3b.entry.js +0 -6
- package/dist/solutions-components/p-476eb52c.entry.js +0 -6
- package/dist/solutions-components/p-8b8a6c1f.entry.js +0 -6
- package/dist/solutions-components/p-97a4001d.entry.js +0 -6
|
@@ -153,7 +153,11 @@ export class LayerTable {
|
|
|
153
153
|
const tableNodeClass = this._fetchingData ? "display-none" : "";
|
|
154
154
|
const loadingClass = this._fetchingData ? "" : "display-none";
|
|
155
155
|
const alertActionClass = this._alertShowAction ? "" : "display-none";
|
|
156
|
-
|
|
156
|
+
const total = this._allIds.length.toString();
|
|
157
|
+
const selected = this._selectedIndexes.length.toString();
|
|
158
|
+
return (h(Host, null, h("calcite-shell", null, this._getTableControlRow("header"), h("div", { class: "height-full width-full" }, h("calcite-panel", { class: "height-full width-full" }, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), h("div", { class: "bottom-left background text-color" }, this._translations.recordsSelected
|
|
159
|
+
.replace("{{total}}", total)
|
|
160
|
+
.replace("{{selected}}", selected))), h("calcite-alert", { icon: this._alertIcon, kind: this._alertKind, label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._alertTitle), h("div", { slot: "message" }, this._alertMessage), h("calcite-link", { class: alertActionClass, onClick: this._alertActionFunction, slot: "link" }, this._alertActionText)))));
|
|
157
161
|
}
|
|
158
162
|
//--------------------------------------------------------------------------
|
|
159
163
|
//
|
|
@@ -73,12 +73,14 @@ export class MapCard {
|
|
|
73
73
|
* @protected
|
|
74
74
|
*/
|
|
75
75
|
async _initModules() {
|
|
76
|
-
const [WebMap, MapView] = await loadModules([
|
|
76
|
+
const [WebMap, MapView, Home] = await loadModules([
|
|
77
77
|
"esri/WebMap",
|
|
78
|
-
"esri/views/MapView"
|
|
78
|
+
"esri/views/MapView",
|
|
79
|
+
"esri/widgets/Home"
|
|
79
80
|
]);
|
|
80
81
|
this.WebMap = WebMap;
|
|
81
82
|
this.MapView = MapView;
|
|
83
|
+
this.Home = Home;
|
|
82
84
|
}
|
|
83
85
|
/**
|
|
84
86
|
* Load the webmap for the provided webMapInfo
|
|
@@ -104,13 +106,17 @@ export class MapCard {
|
|
|
104
106
|
map: webMap,
|
|
105
107
|
resizeAlign: "top-left"
|
|
106
108
|
});
|
|
109
|
+
this._loadedId = id;
|
|
110
|
+
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
|
111
|
+
this.mapChanged.emit({
|
|
112
|
+
id: id,
|
|
113
|
+
mapView: this.mapView
|
|
114
|
+
});
|
|
107
115
|
await this.mapView.when(() => {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
this.mapChanged.emit({
|
|
111
|
-
id: id,
|
|
112
|
-
mapView: this.mapView
|
|
116
|
+
const home = new this.Home({
|
|
117
|
+
view: this.mapView
|
|
113
118
|
});
|
|
119
|
+
this.mapView.ui.add(home, { position: "top-left", index: 3 });
|
|
114
120
|
this.mapView.ui.add(this._mapTools, { position: "top-right", index: 0 });
|
|
115
121
|
});
|
|
116
122
|
}
|
|
@@ -1,60 +1,64 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2023 Esri
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
:host {
|
|
18
|
-
display: block;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.width-full {
|
|
22
|
-
width: 100%;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.height-full {
|
|
26
|
-
height: 100%;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.display-flex {
|
|
30
|
-
display: flex;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.border-bottom-1 {
|
|
34
|
-
border-width: 0px;
|
|
35
|
-
border-bottom-width: 1px;
|
|
36
|
-
border-style: solid;
|
|
37
|
-
border-color: var(--calcite-ui-border-3);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.action-bar-size {
|
|
41
|
-
height: 51px;
|
|
42
|
-
width: 100%;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.map-list {
|
|
46
|
-
position: absolute;
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-direction: column;
|
|
49
|
-
overflow: hidden;
|
|
50
|
-
animation: calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;
|
|
51
|
-
background-color: var(--calcite-scrim-background);
|
|
52
|
-
z-index:
|
|
53
|
-
width: 100%;
|
|
54
|
-
height: -moz-fit-content;
|
|
55
|
-
height: fit-content;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.display-none {
|
|
59
|
-
display: none;
|
|
60
|
-
}
|
|
1
|
+
/** @license
|
|
2
|
+
* Copyright 2023 Esri
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
:host {
|
|
18
|
+
display: block;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.width-full {
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.height-full {
|
|
26
|
+
height: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.display-flex {
|
|
30
|
+
display: flex;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.border-bottom-1 {
|
|
34
|
+
border-width: 0px;
|
|
35
|
+
border-bottom-width: 1px;
|
|
36
|
+
border-style: solid;
|
|
37
|
+
border-color: var(--calcite-ui-border-3);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.action-bar-size {
|
|
41
|
+
height: 51px;
|
|
42
|
+
width: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.map-list {
|
|
46
|
+
position: absolute;
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
animation: calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;
|
|
51
|
+
background-color: var(--calcite-scrim-background);
|
|
52
|
+
z-index: 1000;
|
|
53
|
+
width: 100%;
|
|
54
|
+
height: -moz-fit-content;
|
|
55
|
+
height: fit-content;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.display-none {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.action-bar-color {
|
|
63
|
+
background-color: var(--calcite-ui-border-3) !important;
|
|
64
|
+
}
|
|
@@ -95,7 +95,7 @@ export class MapPicker {
|
|
|
95
95
|
_getMapPicker() {
|
|
96
96
|
var _a;
|
|
97
97
|
const mapListIcon = this._mapListExpanded ? "chevron-up" : "chevron-down";
|
|
98
|
-
return (h("calcite-button", { alignment: "icon-end-space-between", appearance: "
|
|
98
|
+
return (h("calcite-button", { alignment: "icon-end-space-between", appearance: "transparent", class: "width-full height-full", iconEnd: mapListIcon, kind: "neutral", onClick: () => this._chooseMap(), width: "full" }, (_a = this._webMapInfo) === null || _a === void 0 ? void 0 : _a.name));
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
101
|
* Create the toolbar (controls used for map and app interactions)
|
|
@@ -105,7 +105,7 @@ export class MapPicker {
|
|
|
105
105
|
* @protected
|
|
106
106
|
*/
|
|
107
107
|
_getToolbar() {
|
|
108
|
-
return (h("div", { class: "display-flex" }, h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getMapPicker())));
|
|
108
|
+
return (h("div", { class: "display-flex" }, h("calcite-action-bar", { class: "action-bar-color border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getMapPicker())));
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
111
|
* Get a pick list for all maps in mapInfos
|
|
@@ -1,31 +1,45 @@
|
|
|
1
|
-
/** @license
|
|
2
|
-
* Copyright 2022 Esri
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
:host {
|
|
18
|
-
display: block;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.display-none {
|
|
22
|
-
display: none;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.border {
|
|
26
|
-
border: 1px solid var(--calcite-ui-border-3);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.margin-top-1-2 {
|
|
30
|
-
margin-top: 0.5rem;
|
|
31
|
-
}
|
|
1
|
+
/** @license
|
|
2
|
+
* Copyright 2022 Esri
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
:host {
|
|
18
|
+
display: block;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.display-none {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.border {
|
|
26
|
+
border: 1px solid var(--calcite-ui-border-3);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.margin-top-1-2 {
|
|
30
|
+
margin-top: 0.5rem;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.square-40 {
|
|
34
|
+
width: 40px;
|
|
35
|
+
height: 40px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.width-40 {
|
|
39
|
+
width: 40px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.square-40-41 {
|
|
43
|
+
width: 40px;
|
|
44
|
+
height: 41px;
|
|
45
|
+
}
|
|
@@ -37,14 +37,6 @@ export class MapTools {
|
|
|
37
37
|
// Watch handlers
|
|
38
38
|
//
|
|
39
39
|
//--------------------------------------------------------------------------
|
|
40
|
-
/**
|
|
41
|
-
* Store the home extent when the map view changes
|
|
42
|
-
*/
|
|
43
|
-
async mapViewWatchHandler() {
|
|
44
|
-
await this.mapView.when(() => {
|
|
45
|
-
this._homeExtent = this.mapView.extent;
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
40
|
/**
|
|
49
41
|
* When the _showBasemapWidget property is true display the basemap gallery
|
|
50
42
|
*/
|
|
@@ -107,7 +99,7 @@ export class MapTools {
|
|
|
107
99
|
const searchClass = this._showSearchWidget ? "" : "display-none";
|
|
108
100
|
const basemapClass = this._showBasemapWidget ? "" : "display-none";
|
|
109
101
|
const legendClass = this._showLegendWidget ? "" : "display-none";
|
|
110
|
-
return (h(Host, null, h("div", null, h("calcite-action", { alignment: "center", class: "border", compact: false, icon: toggleIcon, onClick: () => { this._toggleTools(); }, text: "" }), h("calcite-action-bar", { class: `border margin-top-1-2 ${toolsClass}`, "expand-disabled": true, layout: this.layout }, this._getActionGroup("
|
|
102
|
+
return (h(Host, null, h("div", null, h("calcite-action", { alignment: "center", class: "border square-40", compact: false, icon: toggleIcon, onClick: () => { this._toggleTools(); }, scale: "s", text: "" }), h("calcite-action-bar", { class: `width-40 border margin-top-1-2 ${toolsClass}`, "expand-disabled": true, layout: this.layout }, this._getActionGroup("legend", false, this._translations.legend, () => this._showLegend()), this._getActionGroup("magnifying-glass", false, this._translations.search, () => this._search()), this._getActionGroup("expand", false, this._translations.expand, () => this._expand()), this._getActionGroup("basemap", false, this._translations.basemap, () => this._toggleBasemapPicker()))), h("basemap-gallery", { class: basemapClass, mapView: this.mapView, ref: (el) => { this._basemapElement = el; } }), h("map-search", { class: searchClass, mapView: this.mapView, ref: (el) => { this._searchElement = el; }, searchConfiguration: this.searchConfiguration }), h("map-legend", { class: legendClass, mapView: this.mapView, ref: (el) => { this._legendElement = el; } })));
|
|
111
103
|
}
|
|
112
104
|
//--------------------------------------------------------------------------
|
|
113
105
|
//
|
|
@@ -127,17 +119,7 @@ export class MapTools {
|
|
|
127
119
|
* @protected
|
|
128
120
|
*/
|
|
129
121
|
_getActionGroup(icon, disabled, tip, func) {
|
|
130
|
-
return (h("calcite-action-group",
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Go to the exent that was first used when loading the map
|
|
134
|
-
*
|
|
135
|
-
* @returns void
|
|
136
|
-
*
|
|
137
|
-
* @protected
|
|
138
|
-
*/
|
|
139
|
-
async _goHome() {
|
|
140
|
-
await this.mapView.goTo(this._homeExtent);
|
|
122
|
+
return (h("calcite-action-group", { class: "square-40-41" }, h("calcite-action", { alignment: "center", class: "square-40", compact: false, disabled: disabled, icon: icon, id: icon, onClick: func, scale: "s", text: "" }, h("calcite-icon", { icon: "cheveron-up", scale: "s", slot: "icon" })), h("calcite-tooltip", { label: "", placement: "trailing", "reference-element": icon }, h("span", null, tip))));
|
|
141
123
|
}
|
|
142
124
|
// need to discuss this with the team
|
|
143
125
|
_showLegend() {
|
|
@@ -149,42 +131,6 @@ export class MapTools {
|
|
|
149
131
|
this._showSearchWidget = !this._showSearchWidget;
|
|
150
132
|
this._showTools = false;
|
|
151
133
|
}
|
|
152
|
-
/**
|
|
153
|
-
* Fixed zoom in
|
|
154
|
-
*
|
|
155
|
-
* @returns void
|
|
156
|
-
*
|
|
157
|
-
* @protected
|
|
158
|
-
*/
|
|
159
|
-
async _zoomIn() {
|
|
160
|
-
await this._zoom(this.mapView.zoom + 1);
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Fixed zoom out
|
|
164
|
-
*
|
|
165
|
-
* @returns void
|
|
166
|
-
*
|
|
167
|
-
* @protected
|
|
168
|
-
*/
|
|
169
|
-
async _zoomOut() {
|
|
170
|
-
await this._zoom(this.mapView.zoom - 1);
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Zoom in/out at the maps current center point
|
|
174
|
-
*
|
|
175
|
-
* @param zoom Number to zoom level to go to
|
|
176
|
-
*
|
|
177
|
-
* @returns void
|
|
178
|
-
*
|
|
179
|
-
* @protected
|
|
180
|
-
*/
|
|
181
|
-
async _zoom(zoom) {
|
|
182
|
-
var _a;
|
|
183
|
-
await ((_a = this.mapView) === null || _a === void 0 ? void 0 : _a.goTo({
|
|
184
|
-
target: this.mapView.center,
|
|
185
|
-
zoom
|
|
186
|
-
}));
|
|
187
|
-
}
|
|
188
134
|
/**
|
|
189
135
|
* Show/Hide the basemap picker
|
|
190
136
|
*
|
|
@@ -342,9 +288,6 @@ export class MapTools {
|
|
|
342
288
|
static get elementRef() { return "el"; }
|
|
343
289
|
static get watchers() {
|
|
344
290
|
return [{
|
|
345
|
-
"propName": "mapView",
|
|
346
|
-
"methodName": "mapViewWatchHandler"
|
|
347
|
-
}, {
|
|
348
291
|
"propName": "_showBasemapWidget",
|
|
349
292
|
"methodName": "_showBasemapWidgetWatchHandler"
|
|
350
293
|
}, {
|
|
@@ -324,8 +324,8 @@ export function _getFieldNamesFromFieldExpressions(fieldExpressions) {
|
|
|
324
324
|
* all attributes are exported
|
|
325
325
|
* @param attributeFormats Empty object to hold the formats for each attribute in a feature; the object is filled
|
|
326
326
|
* with formats by this function
|
|
327
|
-
* @returns A Promise resolving to the format of a single label, e.g.,
|
|
328
|
-
* "{
|
|
327
|
+
* @returns A Promise resolving to the format of a single label with fields coerced to lowercase, e.g.,
|
|
328
|
+
* for ILabelFormat type "pattern": "{name}|{street}|{city}, {state} {zip}"
|
|
329
329
|
*/
|
|
330
330
|
export async function _getLabelFormat(layer, formatUsingLayerPopup, attributeFormats) {
|
|
331
331
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -338,7 +338,7 @@ export async function _getLabelFormat(layer, formatUsingLayerPopup, attributeFor
|
|
|
338
338
|
// Extract any format info that we have
|
|
339
339
|
fieldInfo => {
|
|
340
340
|
if (fieldInfo.format) {
|
|
341
|
-
attributeFormats[fieldInfo.fieldName] = fieldInfo.format;
|
|
341
|
+
attributeFormats[fieldInfo.fieldName.toLowerCase()] = fieldInfo.format;
|
|
342
342
|
}
|
|
343
343
|
});
|
|
344
344
|
// What is the nature of the label content?
|
|
@@ -447,11 +447,14 @@ export async function _prepareLabels(layer, ids, formatUsingLayerPopup = true, i
|
|
|
447
447
|
// Get the features to export
|
|
448
448
|
const featureSet = await queryFeaturesByID(ids, layer, [], false);
|
|
449
449
|
// Get field data types. Do we have any domain-based fields?
|
|
450
|
+
const attributeOrigNames = {};
|
|
450
451
|
const attributeTypes = {};
|
|
451
452
|
const attributeDomains = {};
|
|
452
453
|
layer.fields.forEach(field => {
|
|
453
|
-
|
|
454
|
-
|
|
454
|
+
const lowercaseFieldname = field.name.toLowerCase();
|
|
455
|
+
attributeOrigNames[lowercaseFieldname] = field.name;
|
|
456
|
+
attributeDomains[lowercaseFieldname] = field.domain;
|
|
457
|
+
attributeTypes[lowercaseFieldname] = field.type;
|
|
455
458
|
});
|
|
456
459
|
const attributeFormats = {};
|
|
457
460
|
// Get the label formatting, if any
|
|
@@ -462,7 +465,7 @@ export async function _prepareLabels(layer, ids, formatUsingLayerPopup = true, i
|
|
|
462
465
|
await _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomains, includeHeaderNames)
|
|
463
466
|
: labelFormat.type == "pattern" ?
|
|
464
467
|
// Export attributes in format
|
|
465
|
-
await _prepareLabelsFromPattern(featureSet, attributeTypes, attributeDomains, attributeFormats, labelFormat.format, includeHeaderNames)
|
|
468
|
+
await _prepareLabelsFromPattern(featureSet, attributeOrigNames, attributeTypes, attributeDomains, attributeFormats, labelFormat.format, includeHeaderNames)
|
|
466
469
|
:
|
|
467
470
|
// Export attributes in expression
|
|
468
471
|
await _prepareLabelsUsingExecutor(featureSet, labelFormat.format);
|
|
@@ -482,7 +485,8 @@ export async function _prepareLabelsFromAll(featureSet, attributeTypes, attribut
|
|
|
482
485
|
// Export all attributes
|
|
483
486
|
const labels = featureSet.map(feature => {
|
|
484
487
|
return Object.keys(feature.attributes).map((attributeName) => {
|
|
485
|
-
|
|
488
|
+
const lowercaseFieldname = attributeName.toLowerCase();
|
|
489
|
+
return _prepareAttributeValue(feature.attributes[attributeName], attributeTypes[lowercaseFieldname], attributeDomains[lowercaseFieldname], null, intl);
|
|
486
490
|
});
|
|
487
491
|
});
|
|
488
492
|
// Add header names
|
|
@@ -500,6 +504,7 @@ export async function _prepareLabelsFromAll(featureSet, attributeTypes, attribut
|
|
|
500
504
|
* Creates labels from attributes in a layer popup.
|
|
501
505
|
*
|
|
502
506
|
* @param featureSet Features to convert to labels
|
|
507
|
+
* @param attributeOrigNames Mapping from lowercase field names to original field names
|
|
503
508
|
* @param attributeTypes Type for each attribute in a feature
|
|
504
509
|
* @param attributeDomains Domains for each attribute in a feature
|
|
505
510
|
* @param attributeFormats Formats for each attribute in a feature
|
|
@@ -507,7 +512,7 @@ export async function _prepareLabelsFromAll(featureSet, attributeTypes, attribut
|
|
|
507
512
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
|
508
513
|
* @returns Promise resolving with list of labels, each of which is a list of label lines
|
|
509
514
|
*/
|
|
510
|
-
export async function _prepareLabelsFromPattern(featureSet, attributeTypes, attributeDomains, attributeFormats, labelFormat, includeHeaderNames = false) {
|
|
515
|
+
export async function _prepareLabelsFromPattern(featureSet, attributeOrigNames, attributeTypes, attributeDomains, attributeFormats, labelFormat, includeHeaderNames = false) {
|
|
511
516
|
const [intl] = await loadModules(["esri/intl"]);
|
|
512
517
|
// Find the label fields that we need to replace with values
|
|
513
518
|
const attributeExpressionMatches = _getFieldExpressionsFromLabel(labelFormat);
|
|
@@ -517,7 +522,8 @@ export async function _prepareLabelsFromPattern(featureSet, attributeTypes, attr
|
|
|
517
522
|
let labelPrep = labelFormat;
|
|
518
523
|
// Replace non-Arcade fields in this feature
|
|
519
524
|
attributeNames.forEach((attributeName, i) => {
|
|
520
|
-
const
|
|
525
|
+
const lowercaseFieldname = attributeName.toLowerCase();
|
|
526
|
+
const value = _prepareAttributeValue(feature.attributes[attributeOrigNames[lowercaseFieldname]], attributeTypes[lowercaseFieldname], attributeDomains[lowercaseFieldname], attributeFormats[lowercaseFieldname], intl);
|
|
521
527
|
labelPrep = labelPrep.replace(attributeExpressionMatches[i], value);
|
|
522
528
|
});
|
|
523
529
|
// Split label into lines
|
|
@@ -24,6 +24,10 @@ import { IExportInfo, IExportInfos } from "../utils/interfaces";
|
|
|
24
24
|
|
|
25
25
|
export { ILabel } from "./pdfUtils";
|
|
26
26
|
|
|
27
|
+
export interface IAttributeOrigNames {
|
|
28
|
+
[lowercaseName: string]: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
27
31
|
export interface IAttributeDomains {
|
|
28
32
|
[attributeName: string]: __esri.CodedValueDomain | __esri.RangeDomain | __esri.InheritedDomain | null;
|
|
29
33
|
}
|
|
@@ -436,8 +440,8 @@ export function _getFieldNamesFromFieldExpressions(
|
|
|
436
440
|
* all attributes are exported
|
|
437
441
|
* @param attributeFormats Empty object to hold the formats for each attribute in a feature; the object is filled
|
|
438
442
|
* with formats by this function
|
|
439
|
-
* @returns A Promise resolving to the format of a single label, e.g.,
|
|
440
|
-
* "{
|
|
443
|
+
* @returns A Promise resolving to the format of a single label with fields coerced to lowercase, e.g.,
|
|
444
|
+
* for ILabelFormat type "pattern": "{name}|{street}|{city}, {state} {zip}"
|
|
441
445
|
*/
|
|
442
446
|
export async function _getLabelFormat(
|
|
443
447
|
layer: __esri.FeatureLayer,
|
|
@@ -454,7 +458,7 @@ export async function _getLabelFormat(
|
|
|
454
458
|
// Extract any format info that we have
|
|
455
459
|
fieldInfo => {
|
|
456
460
|
if (fieldInfo.format) {
|
|
457
|
-
attributeFormats[fieldInfo.fieldName] = fieldInfo.format;
|
|
461
|
+
attributeFormats[fieldInfo.fieldName.toLowerCase()] = fieldInfo.format;
|
|
458
462
|
}
|
|
459
463
|
}
|
|
460
464
|
);
|
|
@@ -586,12 +590,15 @@ export async function _prepareLabels(
|
|
|
586
590
|
const featureSet = await queryFeaturesByID(ids, layer, [], false);
|
|
587
591
|
|
|
588
592
|
// Get field data types. Do we have any domain-based fields?
|
|
593
|
+
const attributeOrigNames: IAttributeOrigNames = {};
|
|
589
594
|
const attributeTypes: IAttributeTypes = {};
|
|
590
595
|
const attributeDomains: IAttributeDomains = {};
|
|
591
596
|
layer.fields.forEach(
|
|
592
597
|
field => {
|
|
593
|
-
|
|
594
|
-
|
|
598
|
+
const lowercaseFieldname = field.name.toLowerCase();
|
|
599
|
+
attributeOrigNames[lowercaseFieldname] = field.name;
|
|
600
|
+
attributeDomains[lowercaseFieldname] = field.domain;
|
|
601
|
+
attributeTypes[lowercaseFieldname] = field.type;
|
|
595
602
|
}
|
|
596
603
|
);
|
|
597
604
|
const attributeFormats: IAttributeFormats = {};
|
|
@@ -605,7 +612,7 @@ export async function _prepareLabels(
|
|
|
605
612
|
await _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomains, includeHeaderNames)
|
|
606
613
|
: labelFormat.type == "pattern" ?
|
|
607
614
|
// Export attributes in format
|
|
608
|
-
await _prepareLabelsFromPattern(featureSet, attributeTypes, attributeDomains,
|
|
615
|
+
await _prepareLabelsFromPattern(featureSet, attributeOrigNames, attributeTypes, attributeDomains,
|
|
609
616
|
attributeFormats, labelFormat.format as string, includeHeaderNames)
|
|
610
617
|
:
|
|
611
618
|
// Export attributes in expression
|
|
@@ -636,8 +643,9 @@ export async function _prepareLabelsFromAll(
|
|
|
636
643
|
feature => {
|
|
637
644
|
return Object.keys(feature.attributes).map(
|
|
638
645
|
(attributeName: string) => {
|
|
646
|
+
const lowercaseFieldname = attributeName.toLowerCase();
|
|
639
647
|
return _prepareAttributeValue(feature.attributes[attributeName],
|
|
640
|
-
attributeTypes[
|
|
648
|
+
attributeTypes[lowercaseFieldname], attributeDomains[lowercaseFieldname],
|
|
641
649
|
null, intl);
|
|
642
650
|
}
|
|
643
651
|
);
|
|
@@ -661,6 +669,7 @@ export async function _prepareLabelsFromAll(
|
|
|
661
669
|
* Creates labels from attributes in a layer popup.
|
|
662
670
|
*
|
|
663
671
|
* @param featureSet Features to convert to labels
|
|
672
|
+
* @param attributeOrigNames Mapping from lowercase field names to original field names
|
|
664
673
|
* @param attributeTypes Type for each attribute in a feature
|
|
665
674
|
* @param attributeDomains Domains for each attribute in a feature
|
|
666
675
|
* @param attributeFormats Formats for each attribute in a feature
|
|
@@ -670,6 +679,7 @@ export async function _prepareLabelsFromAll(
|
|
|
670
679
|
*/
|
|
671
680
|
export async function _prepareLabelsFromPattern(
|
|
672
681
|
featureSet: __esri.Graphic[],
|
|
682
|
+
attributeOrigNames: IAttributeOrigNames,
|
|
673
683
|
attributeTypes: IAttributeTypes,
|
|
674
684
|
attributeDomains: IAttributeDomains,
|
|
675
685
|
attributeFormats: IAttributeFormats,
|
|
@@ -690,9 +700,10 @@ export async function _prepareLabelsFromPattern(
|
|
|
690
700
|
// Replace non-Arcade fields in this feature
|
|
691
701
|
attributeNames.forEach(
|
|
692
702
|
(attributeName: string, i: number) => {
|
|
693
|
-
const
|
|
694
|
-
|
|
695
|
-
|
|
703
|
+
const lowercaseFieldname = attributeName.toLowerCase();
|
|
704
|
+
const value = _prepareAttributeValue(feature.attributes[attributeOrigNames[lowercaseFieldname]],
|
|
705
|
+
attributeTypes[lowercaseFieldname], attributeDomains[lowercaseFieldname],
|
|
706
|
+
attributeFormats[lowercaseFieldname], intl);
|
|
696
707
|
labelPrep = labelPrep.replace(attributeExpressionMatches[i], value);
|
|
697
708
|
|
|
698
709
|
},
|
|
@@ -155,9 +155,11 @@ const BufferTools = /*@__PURE__*/ proxyCustomElement(class BufferTools extends H
|
|
|
155
155
|
}
|
|
156
156
|
this._bufferTimeout = setTimeout(() => {
|
|
157
157
|
var _a;
|
|
158
|
-
// needs to be wgs 84 or Web Mercator
|
|
159
158
|
if (((_a = this.geometries) === null || _a === void 0 ? void 0 : _a.length) > 0 && this.unit && this.distance > 0) {
|
|
160
|
-
const
|
|
159
|
+
const geom = this.geometries[0];
|
|
160
|
+
const sr = geom.spatialReference;
|
|
161
|
+
const buffer = (sr.isWGS84 || sr.isWebMercator) ?
|
|
162
|
+
this._geometryEngine.geodesicBuffer(this.geometries, this.distance, this.unit, this.unionResults) : this._geometryEngine.buffer(this.geometries, this.distance, this.unit, this.unionResults);
|
|
161
163
|
this.bufferComplete.emit(buffer);
|
|
162
164
|
}
|
|
163
165
|
}, 400);
|
|
@@ -7,8 +7,8 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
7
7
|
import { g as getLocaleComponentStrings } from './locale.js';
|
|
8
8
|
import { q as queryFeaturesByID } from './queryUtils.js';
|
|
9
9
|
import { g as getLayer } from './mapViewUtils.js';
|
|
10
|
-
import { d as defineCustomElement$a } from './
|
|
11
|
-
import { d as defineCustomElement$9 } from './
|
|
10
|
+
import { d as defineCustomElement$a } from './alert.js';
|
|
11
|
+
import { d as defineCustomElement$9 } from './button.js';
|
|
12
12
|
import { d as defineCustomElement$8 } from './chip.js';
|
|
13
13
|
import { d as defineCustomElement$7 } from './icon.js';
|
|
14
14
|
import { d as defineCustomElement$6 } from './loader.js';
|
|
@@ -84,7 +84,7 @@ const CardManager = /*@__PURE__*/ proxyCustomElement(class CardManager extends H
|
|
|
84
84
|
var _a, _b;
|
|
85
85
|
const featuresClass = ((_a = this._graphics) === null || _a === void 0 ? void 0 : _a.length) > 0 ? "" : "display-none";
|
|
86
86
|
const messageClass = ((_b = this._graphics) === null || _b === void 0 ? void 0 : _b.length) > 0 ? "display-none" : "";
|
|
87
|
-
return (h(Host, null, h("div", { class: "border-rounded overflow-auto height-full" }, h("calcite-shell", { class: "position-relative
|
|
87
|
+
return (h(Host, null, h("div", { class: "border-rounded overflow-auto height-full" }, h("calcite-shell", { class: "position-relative " + featuresClass }, h("div", null, h("info-card", { graphics: this._graphics, isLoading: this._cardLoading, mapView: this.mapView, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))), h("div", { class: "padding-1 " + messageClass }, h("calcite-notice", { icon: "table", open: true }, h("div", { slot: "message" }, this._translations.selectFeaturesToStart))))));
|
|
88
88
|
}
|
|
89
89
|
//--------------------------------------------------------------------------
|
|
90
90
|
//
|
|
@@ -115,19 +115,19 @@ function defineCustomElement() {
|
|
|
115
115
|
if (typeof customElements === "undefined") {
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
|
-
const components = ["card-manager", "calcite-
|
|
118
|
+
const components = ["card-manager", "calcite-alert", "calcite-button", "calcite-chip", "calcite-icon", "calcite-loader", "calcite-notice", "calcite-shell", "calcite-tooltip", "edit-card", "info-card"];
|
|
119
119
|
components.forEach(tagName => { switch (tagName) {
|
|
120
120
|
case "card-manager":
|
|
121
121
|
if (!customElements.get(tagName)) {
|
|
122
122
|
customElements.define(tagName, CardManager);
|
|
123
123
|
}
|
|
124
124
|
break;
|
|
125
|
-
case "calcite-
|
|
125
|
+
case "calcite-alert":
|
|
126
126
|
if (!customElements.get(tagName)) {
|
|
127
127
|
defineCustomElement$a();
|
|
128
128
|
}
|
|
129
129
|
break;
|
|
130
|
-
case "calcite-
|
|
130
|
+
case "calcite-button":
|
|
131
131
|
if (!customElements.get(tagName)) {
|
|
132
132
|
defineCustomElement$9();
|
|
133
133
|
}
|