@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
|
@@ -7,7 +7,7 @@ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent
|
|
|
7
7
|
import { g as getLocaleComponentStrings } from './locale-efad8f83.js';
|
|
8
8
|
import { q as queryFeaturesByID, a as getLayer, b as getMapLayerIds, g as goToSelection, c as queryAllIds } from './mapViewUtils-f0c04325.js';
|
|
9
9
|
import { l as loadModules } from './loadModules-f5f910b6.js';
|
|
10
|
-
import { d as downloadCSV } from './downloadUtils-
|
|
10
|
+
import { d as downloadCSV } from './downloadUtils-8d4c13bb.js';
|
|
11
11
|
import './_commonjsHelpers-d5f9d613.js';
|
|
12
12
|
import './interfaces-5a2fe8b4.js';
|
|
13
13
|
|
|
@@ -76,7 +76,7 @@ const CardManager = class {
|
|
|
76
76
|
var _a, _b;
|
|
77
77
|
const featuresClass = ((_a = this._graphics) === null || _a === void 0 ? void 0 : _a.length) > 0 ? "" : "display-none";
|
|
78
78
|
const messageClass = ((_b = this._graphics) === null || _b === void 0 ? void 0 : _b.length) > 0 ? "display-none" : "";
|
|
79
|
-
return (h(Host, null, h("div", { class: "border-rounded overflow-auto height-full" }, h("calcite-shell", { class: "position-relative
|
|
79
|
+
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))))));
|
|
80
80
|
}
|
|
81
81
|
//--------------------------------------------------------------------------
|
|
82
82
|
//
|
|
@@ -97,7 +97,7 @@ const CardManager = class {
|
|
|
97
97
|
};
|
|
98
98
|
CardManager.style = cardManagerCss;
|
|
99
99
|
|
|
100
|
-
const layerTableCss = ":host{display:block}.height-full{height:100%}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.height-51{height:51px}";
|
|
100
|
+
const layerTableCss = ":host{display:block}.height-full{height:100%}.width-full{width:100%}.display-flex{display:flex}.table-border{border:1px solid var(--calcite-ui-border-2)}.border-end{border-inline-end:1px solid var(--calcite-ui-border-2)}.padding-5{padding:5px}.height-51{height:51px}.bottom-left{position:absolute;left:0;bottom:0}html[dir=\"rtl\"] .bottom-left{position:absolute;right:0;bottom:0}.background{background-color:var(--calcite-ui-background)}.text-color{color:var(--calcite-ui-text-1)}";
|
|
101
101
|
|
|
102
102
|
const LayerTable = class {
|
|
103
103
|
constructor(hostRef) {
|
|
@@ -230,7 +230,11 @@ const LayerTable = class {
|
|
|
230
230
|
const tableNodeClass = this._fetchingData ? "display-none" : "";
|
|
231
231
|
const loadingClass = this._fetchingData ? "" : "display-none";
|
|
232
232
|
const alertActionClass = this._alertShowAction ? "" : "display-none";
|
|
233
|
-
|
|
233
|
+
const total = this._allIds.length.toString();
|
|
234
|
+
const selected = this._selectedIndexes.length.toString();
|
|
235
|
+
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
|
|
236
|
+
.replace("{{total}}", total)
|
|
237
|
+
.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)))));
|
|
234
238
|
}
|
|
235
239
|
//--------------------------------------------------------------------------
|
|
236
240
|
//
|
|
@@ -585,7 +589,7 @@ const LayerTable = class {
|
|
|
585
589
|
};
|
|
586
590
|
LayerTable.style = layerTableCss;
|
|
587
591
|
|
|
588
|
-
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 58px)}
|
|
592
|
+
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 58px)}";
|
|
589
593
|
|
|
590
594
|
const MapCard = class {
|
|
591
595
|
constructor(hostRef) {
|
|
@@ -636,12 +640,14 @@ const MapCard = class {
|
|
|
636
640
|
* @protected
|
|
637
641
|
*/
|
|
638
642
|
async _initModules() {
|
|
639
|
-
const [WebMap, MapView] = await loadModules([
|
|
643
|
+
const [WebMap, MapView, Home] = await loadModules([
|
|
640
644
|
"esri/WebMap",
|
|
641
|
-
"esri/views/MapView"
|
|
645
|
+
"esri/views/MapView",
|
|
646
|
+
"esri/widgets/Home"
|
|
642
647
|
]);
|
|
643
648
|
this.WebMap = WebMap;
|
|
644
649
|
this.MapView = MapView;
|
|
650
|
+
this.Home = Home;
|
|
645
651
|
}
|
|
646
652
|
/**
|
|
647
653
|
* Load the webmap for the provided webMapInfo
|
|
@@ -667,13 +673,17 @@ const MapCard = class {
|
|
|
667
673
|
map: webMap,
|
|
668
674
|
resizeAlign: "top-left"
|
|
669
675
|
});
|
|
676
|
+
this._loadedId = id;
|
|
677
|
+
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
|
678
|
+
this.mapChanged.emit({
|
|
679
|
+
id: id,
|
|
680
|
+
mapView: this.mapView
|
|
681
|
+
});
|
|
670
682
|
await this.mapView.when(() => {
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
this.mapChanged.emit({
|
|
674
|
-
id: id,
|
|
675
|
-
mapView: this.mapView
|
|
683
|
+
const home = new this.Home({
|
|
684
|
+
view: this.mapView
|
|
676
685
|
});
|
|
686
|
+
this.mapView.ui.add(home, { position: "top-left", index: 3 });
|
|
677
687
|
this.mapView.ui.add(this._mapTools, { position: "top-right", index: 0 });
|
|
678
688
|
});
|
|
679
689
|
}
|
|
@@ -8,7 +8,7 @@ import { g as getLocaleComponentStrings } from './locale-efad8f83.js';
|
|
|
8
8
|
import { E as ELayoutMode } from './interfaces-5a2fe8b4.js';
|
|
9
9
|
import './_commonjsHelpers-d5f9d613.js';
|
|
10
10
|
|
|
11
|
-
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-ui-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 0.5rem)}.adjusted-height-100{height:calc(100% - 1rem)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}";
|
|
11
|
+
const crowdsourceManagerCss = ":host{display:block;--calcite-label-margin-bottom:0px}.padding-1-2{padding:0.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-ui-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-ui-border-3)}.position-relative{position:relative}.height-50{height:50%}.adjusted-height-50{height:calc(50% - 0.5rem - 25px)}.adjusted-height-100{height:calc(100% - 1rem - 50px)}.adjusted-height-100-50{height:calc(100% - 50px)}.display-none{display:none}.height-53{height:53px}.position-absolute-53{position:absolute;top:53px}.display-grid{display:grid}.height-49-px{height:49px}.height-50-px{height:50px}.padding-inline-end-75{padding-inline-end:0.75rem}.align-items-center{align-items:center}";
|
|
12
12
|
|
|
13
13
|
const CrowdsourceManager = class {
|
|
14
14
|
constructor(hostRef) {
|
|
@@ -19,6 +19,7 @@ const CrowdsourceManager = class {
|
|
|
19
19
|
this.mapInfos = [];
|
|
20
20
|
this.searchConfiguration = undefined;
|
|
21
21
|
this.zoomAndScrollToSelected = false;
|
|
22
|
+
this._expandPopup = false;
|
|
22
23
|
this._translations = undefined;
|
|
23
24
|
this._layoutMode = ELayoutMode.GRID;
|
|
24
25
|
this._mapView = undefined;
|
|
@@ -50,6 +51,9 @@ const CrowdsourceManager = class {
|
|
|
50
51
|
*/
|
|
51
52
|
async mapChanged(evt) {
|
|
52
53
|
const mapChange = evt.detail;
|
|
54
|
+
// close popup by default when the map changes otherwise other components that rely on the view don't work since it
|
|
55
|
+
// doesn't seem to fully load when it's not visible
|
|
56
|
+
this._expandPopup = false;
|
|
53
57
|
this._mapInfo = this._getMapInfo(mapChange.id);
|
|
54
58
|
this._mapView = mapChange.mapView;
|
|
55
59
|
this._mapView.popupEnabled = false;
|
|
@@ -186,7 +190,7 @@ const CrowdsourceManager = class {
|
|
|
186
190
|
*/
|
|
187
191
|
_getMapAndCard(layoutMode, panelOpen, hideMap) {
|
|
188
192
|
const mapSizeClass = this._getMapSizeClass(layoutMode, panelOpen);
|
|
189
|
-
return this.classicGrid ? (h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getCardNode(layoutMode, hideMap), this._getMapNode(layoutMode, hideMap))) : (h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getMapNode(layoutMode, hideMap), this._getCardNode(layoutMode, hideMap)));
|
|
193
|
+
return this.classicGrid ? (h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getCardNode(layoutMode, hideMap), this._getMapNode(layoutMode, hideMap))) : (h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getMapNode(layoutMode, hideMap), this._getPopupExpandNode(), this._getCardNode(layoutMode, hideMap)));
|
|
190
194
|
}
|
|
191
195
|
/**
|
|
192
196
|
* Get the map node based for the current layout options
|
|
@@ -200,9 +204,27 @@ const CrowdsourceManager = class {
|
|
|
200
204
|
_getMapNode(layoutMode, hideMap) {
|
|
201
205
|
const mapDisplayClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "display-flex height-full width-1-2" :
|
|
202
206
|
layoutMode === ELayoutMode.GRID && !hideMap ? "" : "display-none";
|
|
203
|
-
const mapContainerClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "width-full" : "adjusted-height-50";
|
|
207
|
+
const mapContainerClass = this.classicGrid && layoutMode === ELayoutMode.GRID ? "width-full" : this._expandPopup ? "height-50-px" : "adjusted-height-50";
|
|
204
208
|
return (h("div", { class: `${mapContainerClass} overflow-hidden ${mapDisplayClass}` }, h("map-card", { class: "width-full", mapInfos: this.mapInfos })));
|
|
205
209
|
}
|
|
210
|
+
/**
|
|
211
|
+
* Get the expand node for the popup information
|
|
212
|
+
*
|
|
213
|
+
* @returns the expand node
|
|
214
|
+
* @protected
|
|
215
|
+
*/
|
|
216
|
+
_getPopupExpandNode() {
|
|
217
|
+
const icon = this._expandPopup ? "chevrons-down" : "chevrons-up";
|
|
218
|
+
return (h("div", { class: "height-49-px calcite-mode-dark" }, h("calcite-panel", null, h("div", { class: "display-flex align-items-center", slot: "header-content" }, h("calcite-icon", { class: "padding-inline-end-75", icon: "information", scale: "s" }), h("div", null, this._translations.information)), h("calcite-action", { class: "height-49-px", icon: icon, onClick: () => this._togglePopup(), slot: "header-actions-end" }))));
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Toggle the popup information
|
|
222
|
+
*
|
|
223
|
+
* @protected
|
|
224
|
+
*/
|
|
225
|
+
_togglePopup() {
|
|
226
|
+
this._expandPopup = !this._expandPopup;
|
|
227
|
+
}
|
|
206
228
|
/**
|
|
207
229
|
* Get the card node based for the current layout options
|
|
208
230
|
*
|
|
@@ -214,9 +236,9 @@ const CrowdsourceManager = class {
|
|
|
214
236
|
*/
|
|
215
237
|
_getCardNode(layoutMode, hideMap) {
|
|
216
238
|
const cardManagerHeight = this.classicGrid && layoutMode === ELayoutMode.GRID ? "" :
|
|
217
|
-
layoutMode === ELayoutMode.GRID && !hideMap ? "adjusted-height-50" : "adjusted-height-100";
|
|
239
|
+
layoutMode === ELayoutMode.GRID && !this._expandPopup && !hideMap ? "adjusted-height-50" : "adjusted-height-100";
|
|
218
240
|
const cardManagerContainer = this.classicGrid && layoutMode === ELayoutMode.GRID ?
|
|
219
|
-
"width-full adjusted-height-100" : "width-50 height-full";
|
|
241
|
+
"width-full adjusted-height-100" : this._expandPopup ? "width-50 adjusted-height-100-50" : "width-50 height-full";
|
|
220
242
|
return (h("div", { class: `padding-1-2 ${cardManagerContainer}` }, h("card-manager", { class: `${cardManagerHeight} width-full`, mapView: this === null || this === void 0 ? void 0 : this._mapView, zoomAndScrollToSelected: this.zoomAndScrollToSelected })));
|
|
221
243
|
}
|
|
222
244
|
/**
|
|
@@ -1505,7 +1505,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
|
1505
1505
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1506
1506
|
* ====================================================================
|
|
1507
1507
|
*/
|
|
1508
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-
|
|
1508
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):import('./index.es-065c3035.js')).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u);}))};}(),E.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},E.API.viewerPreferences=function(e,r){var n;e=e||{},r=r||!1;var i,a,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},c=Object.keys(s),u=[],h=0,l=0,f=0;function d(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1;}if("object"===t(e))for(a in e)if(o=e[a],d(c,a)&&void 0!==o){if("boolean"===n[a].type&&"boolean"==typeof o)n[a].value=o;else if("name"===n[a].type&&d(n[a].valueSet,o))n[a].value=o;else if("integer"===n[a].type&&Number.isInteger(o))n[a].value=o;else if("array"===n[a].type){for(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "));}n[a].value="["+u.join(" ")+"]";}else n[a].value=n[a].defaultValue;n[a].explicitSet=!0;}return !1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in n)!0===n[t].explicitSet&&("name"===n[t].type?e.push("/"+t+" /"+n[t].value):e.push("/"+t+" "+n[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>");})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
|
|
1509
1509
|
/** ====================================================================
|
|
1510
1510
|
* @license
|
|
1511
1511
|
* jsPDF XMP metadata plugin
|
|
@@ -2520,8 +2520,8 @@ function _getFieldNamesFromFieldExpressions(fieldExpressions) {
|
|
|
2520
2520
|
* all attributes are exported
|
|
2521
2521
|
* @param attributeFormats Empty object to hold the formats for each attribute in a feature; the object is filled
|
|
2522
2522
|
* with formats by this function
|
|
2523
|
-
* @returns A Promise resolving to the format of a single label, e.g.,
|
|
2524
|
-
* "{
|
|
2523
|
+
* @returns A Promise resolving to the format of a single label with fields coerced to lowercase, e.g.,
|
|
2524
|
+
* for ILabelFormat type "pattern": "{name}|{street}|{city}, {state} {zip}"
|
|
2525
2525
|
*/
|
|
2526
2526
|
async function _getLabelFormat(layer, formatUsingLayerPopup, attributeFormats) {
|
|
2527
2527
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -2534,7 +2534,7 @@ async function _getLabelFormat(layer, formatUsingLayerPopup, attributeFormats) {
|
|
|
2534
2534
|
// Extract any format info that we have
|
|
2535
2535
|
fieldInfo => {
|
|
2536
2536
|
if (fieldInfo.format) {
|
|
2537
|
-
attributeFormats[fieldInfo.fieldName] = fieldInfo.format;
|
|
2537
|
+
attributeFormats[fieldInfo.fieldName.toLowerCase()] = fieldInfo.format;
|
|
2538
2538
|
}
|
|
2539
2539
|
});
|
|
2540
2540
|
// What is the nature of the label content?
|
|
@@ -2643,11 +2643,14 @@ async function _prepareLabels(layer, ids, formatUsingLayerPopup = true, includeH
|
|
|
2643
2643
|
// Get the features to export
|
|
2644
2644
|
const featureSet = await queryFeaturesByID(ids, layer, [], false);
|
|
2645
2645
|
// Get field data types. Do we have any domain-based fields?
|
|
2646
|
+
const attributeOrigNames = {};
|
|
2646
2647
|
const attributeTypes = {};
|
|
2647
2648
|
const attributeDomains = {};
|
|
2648
2649
|
layer.fields.forEach(field => {
|
|
2649
|
-
|
|
2650
|
-
|
|
2650
|
+
const lowercaseFieldname = field.name.toLowerCase();
|
|
2651
|
+
attributeOrigNames[lowercaseFieldname] = field.name;
|
|
2652
|
+
attributeDomains[lowercaseFieldname] = field.domain;
|
|
2653
|
+
attributeTypes[lowercaseFieldname] = field.type;
|
|
2651
2654
|
});
|
|
2652
2655
|
const attributeFormats = {};
|
|
2653
2656
|
// Get the label formatting, if any
|
|
@@ -2658,7 +2661,7 @@ async function _prepareLabels(layer, ids, formatUsingLayerPopup = true, includeH
|
|
|
2658
2661
|
await _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomains, includeHeaderNames)
|
|
2659
2662
|
: labelFormat.type == "pattern" ?
|
|
2660
2663
|
// Export attributes in format
|
|
2661
|
-
await _prepareLabelsFromPattern(featureSet, attributeTypes, attributeDomains, attributeFormats, labelFormat.format, includeHeaderNames)
|
|
2664
|
+
await _prepareLabelsFromPattern(featureSet, attributeOrigNames, attributeTypes, attributeDomains, attributeFormats, labelFormat.format, includeHeaderNames)
|
|
2662
2665
|
:
|
|
2663
2666
|
// Export attributes in expression
|
|
2664
2667
|
await _prepareLabelsUsingExecutor(featureSet, labelFormat.format);
|
|
@@ -2678,7 +2681,8 @@ async function _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomain
|
|
|
2678
2681
|
// Export all attributes
|
|
2679
2682
|
const labels = featureSet.map(feature => {
|
|
2680
2683
|
return Object.keys(feature.attributes).map((attributeName) => {
|
|
2681
|
-
|
|
2684
|
+
const lowercaseFieldname = attributeName.toLowerCase();
|
|
2685
|
+
return _prepareAttributeValue(feature.attributes[attributeName], attributeTypes[lowercaseFieldname], attributeDomains[lowercaseFieldname], null, intl);
|
|
2682
2686
|
});
|
|
2683
2687
|
});
|
|
2684
2688
|
// Add header names
|
|
@@ -2696,6 +2700,7 @@ async function _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomain
|
|
|
2696
2700
|
* Creates labels from attributes in a layer popup.
|
|
2697
2701
|
*
|
|
2698
2702
|
* @param featureSet Features to convert to labels
|
|
2703
|
+
* @param attributeOrigNames Mapping from lowercase field names to original field names
|
|
2699
2704
|
* @param attributeTypes Type for each attribute in a feature
|
|
2700
2705
|
* @param attributeDomains Domains for each attribute in a feature
|
|
2701
2706
|
* @param attributeFormats Formats for each attribute in a feature
|
|
@@ -2703,7 +2708,7 @@ async function _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomain
|
|
|
2703
2708
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
|
2704
2709
|
* @returns Promise resolving with list of labels, each of which is a list of label lines
|
|
2705
2710
|
*/
|
|
2706
|
-
async function _prepareLabelsFromPattern(featureSet, attributeTypes, attributeDomains, attributeFormats, labelFormat, includeHeaderNames = false) {
|
|
2711
|
+
async function _prepareLabelsFromPattern(featureSet, attributeOrigNames, attributeTypes, attributeDomains, attributeFormats, labelFormat, includeHeaderNames = false) {
|
|
2707
2712
|
const [intl] = await loadModules(["esri/intl"]);
|
|
2708
2713
|
// Find the label fields that we need to replace with values
|
|
2709
2714
|
const attributeExpressionMatches = _getFieldExpressionsFromLabel(labelFormat);
|
|
@@ -2713,7 +2718,8 @@ async function _prepareLabelsFromPattern(featureSet, attributeTypes, attributeDo
|
|
|
2713
2718
|
let labelPrep = labelFormat;
|
|
2714
2719
|
// Replace non-Arcade fields in this feature
|
|
2715
2720
|
attributeNames.forEach((attributeName, i) => {
|
|
2716
|
-
const
|
|
2721
|
+
const lowercaseFieldname = attributeName.toLowerCase();
|
|
2722
|
+
const value = _prepareAttributeValue(feature.attributes[attributeOrigNames[lowercaseFieldname]], attributeTypes[lowercaseFieldname], attributeDomains[lowercaseFieldname], attributeFormats[lowercaseFieldname], intl);
|
|
2717
2723
|
labelPrep = labelPrep.replace(attributeExpressionMatches[i], value);
|
|
2718
2724
|
});
|
|
2719
2725
|
// Split label into lines
|
|
@@ -172,7 +172,7 @@ const EditCard = class {
|
|
|
172
172
|
};
|
|
173
173
|
EditCard.style = editCardCss;
|
|
174
174
|
|
|
175
|
-
const infoCardCss = ":host{display:block;--calcite-label-margin-bottom:0}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:8px}tr:nth-child(odd){background:var(--calcite-ui-foreground-2)}.bottom-border{padding-bottom:0.5rem;border-bottom:1px solid var(--calcite-ui-border-1)}.padding-1-2{padding:0.5rem}.padding-top-1-2{padding-top:0.5rem}.font-color-3{color:var(--calcite-ui-text-3)}.display-none{display:none}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.edit-btn{z-index:999;position:absolute
|
|
175
|
+
const infoCardCss = ":host{display:block;--calcite-label-margin-bottom:0}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:8px}tr:nth-child(odd){background:var(--calcite-ui-foreground-2)}.bottom-border{padding-bottom:0.5rem;border-bottom:1px solid var(--calcite-ui-border-1)}.padding-1-2{padding:0.5rem}.padding-top-1-2{padding-top:0.5rem}.font-color-3{color:var(--calcite-ui-text-3)}.display-none{display:none}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.edit-btn{z-index:999;position:absolute}.edit-btn-position{right:0.5rem;top:0.5rem}html[dir=\"rtl\"] .edit-btn-position{left:0}.esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.min-width-100{min-width:100px}";
|
|
176
176
|
|
|
177
177
|
const InfoCard = class {
|
|
178
178
|
constructor(hostRef) {
|
|
@@ -183,6 +183,7 @@ const InfoCard = class {
|
|
|
183
183
|
this.mapView = undefined;
|
|
184
184
|
this.zoomAndScrollToSelected = undefined;
|
|
185
185
|
this._alertOpen = false;
|
|
186
|
+
this._count = "";
|
|
186
187
|
this._editRecordOpen = false;
|
|
187
188
|
this._translations = undefined;
|
|
188
189
|
}
|
|
@@ -260,7 +261,7 @@ const InfoCard = class {
|
|
|
260
261
|
const featureNodeClass = this.isLoading || this._editRecordOpen ? "display-none" : "position-absolute";
|
|
261
262
|
const editClass = !this.isLoading && this._editRecordOpen ? "position-absolute" : "display-none";
|
|
262
263
|
const editButtonClass = !this.isLoading && this._editRecordOpen ? "display-none" : "";
|
|
263
|
-
return (h(Host, null, h("calcite-shell", null, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} edit-btn edit-btn-position` }, h("calcite-
|
|
264
|
+
return (h(Host, null, h("calcite-shell", null, h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} display-flex padding-1-2 button-container`, slot: "footer" }, h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", id: "solutions-back", onClick: () => this._back(), width: "full" }, this._translations.back), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, h("span", null, this._translations.back))), h("div", null, this._getCount()), h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", id: "solutions-next", onClick: () => this._next(), width: "full" }, this._translations.next), h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-next" }, h("span", null, this._translations.next)))), h("div", { class: `${editButtonClass} edit-btn edit-btn-position` }, h("calcite-button", { appearance: "outline", "icon-start": "pencil", id: "solutions-edit", onClick: () => this._openEditRecord() }, this._translations.edit), h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-edit" }, h("span", null, this._translations.edit))), h("edit-card", { class: editClass, graphicIndex: (_a = this._features) === null || _a === void 0 ? void 0 : _a.selectedFeatureIndex, graphics: this.graphics, mapView: this.mapView, open: this._editRecordOpen }), h("calcite-alert", { icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, h("div", { slot: "title" }, this._translations.editDisabled), h("div", { slot: "message" }, this._translations.enableEditing)))));
|
|
264
265
|
}
|
|
265
266
|
//--------------------------------------------------------------------------
|
|
266
267
|
//
|
|
@@ -341,6 +342,37 @@ const InfoCard = class {
|
|
|
341
342
|
this._alertOpen = true;
|
|
342
343
|
}
|
|
343
344
|
}
|
|
345
|
+
/**
|
|
346
|
+
* Go to the previous feature in the features widget
|
|
347
|
+
*
|
|
348
|
+
* @returns void
|
|
349
|
+
*/
|
|
350
|
+
_back() {
|
|
351
|
+
this._features.previous();
|
|
352
|
+
this._count = this._getCount();
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Go to the next feature in the features widget
|
|
356
|
+
*
|
|
357
|
+
* @returns void
|
|
358
|
+
*/
|
|
359
|
+
_next() {
|
|
360
|
+
this._features.next();
|
|
361
|
+
this._count = this._getCount();
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Get the current index of total string
|
|
365
|
+
*
|
|
366
|
+
* @returns the index of total string
|
|
367
|
+
*/
|
|
368
|
+
_getCount() {
|
|
369
|
+
var _a, _b, _c;
|
|
370
|
+
const index = (((_a = this._features) === null || _a === void 0 ? void 0 : _a.viewModel.selectedFeatureIndex) + 1).toString();
|
|
371
|
+
const total = (_c = (_b = this._features) === null || _b === void 0 ? void 0 : _b.features) === null || _c === void 0 ? void 0 : _c.length.toString();
|
|
372
|
+
return this._translations.indexOfTotal
|
|
373
|
+
.replace("{{index}}", index)
|
|
374
|
+
.replace("{{total}}", total);
|
|
375
|
+
}
|
|
344
376
|
/**
|
|
345
377
|
* Fetches the component's translations
|
|
346
378
|
*
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5
5
|
*/
|
|
6
6
|
import { a as commonjsGlobal, c as createCommonjsModule, g as getDefaultExportFromCjs } from './_commonjsHelpers-d5f9d613.js';
|
|
7
|
-
import { _ as _typeof_1 } from './downloadUtils-
|
|
7
|
+
import { _ as _typeof_1 } from './downloadUtils-8d4c13bb.js';
|
|
8
8
|
import './index-b5d9d795.js';
|
|
9
9
|
import './loadModules-f5f910b6.js';
|
|
10
10
|
import './locale-efad8f83.js';
|