@esri/solutions-components 0.6.9 → 0.6.10
Sign up to get free protection for your applications and to get access to all the features.
- 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/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/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 +5 -1
- package/dist/collection/components/map-picker/map-picker.js +2 -2
- package/dist/collection/components/map-tools/map-tools.css +14 -0
- 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/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/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-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/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
@@ -2,5 +2,8 @@
|
|
2
2
|
"fetchingData": "Fetching data",
|
3
3
|
"edit": "Edit",
|
4
4
|
"enableEditing": "Update capability must be enabled on the layer.",
|
5
|
-
"editDisabled": "Editing Disabled"
|
5
|
+
"editDisabled": "Editing Disabled",
|
6
|
+
"next": "Next",
|
7
|
+
"back": "Back",
|
8
|
+
"indexOfTotal": "{{index}} of {{total}}"
|
6
9
|
}
|
@@ -2,5 +2,8 @@
|
|
2
2
|
"fetchingData": "Fetching data",
|
3
3
|
"edit": "Edit",
|
4
4
|
"enableEditing": "Update capability must be enabled on the layer.",
|
5
|
-
"editDisabled": "Editing Disabled"
|
5
|
+
"editDisabled": "Editing Disabled",
|
6
|
+
"next": "Next",
|
7
|
+
"back": "Back",
|
8
|
+
"indexOfTotal": "{{index}} of {{total}}"
|
6
9
|
}
|
@@ -193,7 +193,7 @@ const MapLegend = class {
|
|
193
193
|
};
|
194
194
|
MapLegend.style = mapLegendCss;
|
195
195
|
|
196
|
-
const mapPickerCss = ":host{display:block}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background);z-index:
|
196
|
+
const mapPickerCss = ":host{display:block}.width-full{width:100%}.height-full{height:100%}.display-flex{display:flex}.border-bottom-1{border-width:0px;border-bottom-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}.action-bar-size{height:51px;width:100%}.map-list{position:absolute;display:flex;flex-direction:column;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background);z-index:1000;width:100%;height:-moz-fit-content;height:fit-content}.display-none{display:none}.action-bar-color{background-color:var(--calcite-ui-border-3) !important}";
|
197
197
|
|
198
198
|
const MapPicker = class {
|
199
199
|
constructor(hostRef) {
|
@@ -273,7 +273,7 @@ const MapPicker = class {
|
|
273
273
|
_getMapPicker() {
|
274
274
|
var _a;
|
275
275
|
const mapListIcon = this._mapListExpanded ? "chevron-up" : "chevron-down";
|
276
|
-
return (index.h("calcite-button", { alignment: "icon-end-space-between", appearance: "
|
276
|
+
return (index.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));
|
277
277
|
}
|
278
278
|
/**
|
279
279
|
* Create the toolbar (controls used for map and app interactions)
|
@@ -283,7 +283,7 @@ const MapPicker = class {
|
|
283
283
|
* @protected
|
284
284
|
*/
|
285
285
|
_getToolbar() {
|
286
|
-
return (index.h("div", { class: "display-flex" }, index.h("calcite-action-bar", { class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getMapPicker())));
|
286
|
+
return (index.h("div", { class: "display-flex" }, index.h("calcite-action-bar", { class: "action-bar-color border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: "header" }, this._getMapPicker())));
|
287
287
|
}
|
288
288
|
/**
|
289
289
|
* Get a pick list for all maps in mapInfos
|
@@ -500,7 +500,7 @@ const MapSearch = class {
|
|
500
500
|
};
|
501
501
|
MapSearch.style = mapSearchCss;
|
502
502
|
|
503
|
-
const mapToolsCss = ":host{display:block}.display-none{display:none}.border{border:1px solid var(--calcite-ui-border-3)}.margin-top-1-2{margin-top:0.5rem}";
|
503
|
+
const mapToolsCss = ":host{display:block}.display-none{display:none}.border{border:1px solid var(--calcite-ui-border-3)}.margin-top-1-2{margin-top:0.5rem}.square-40{width:40px;height:40px}.width-40{width:40px}.square-40-41{width:40px;height:41px}";
|
504
504
|
|
505
505
|
const MapTools = class {
|
506
506
|
constructor(hostRef) {
|
@@ -520,14 +520,6 @@ const MapTools = class {
|
|
520
520
|
// Watch handlers
|
521
521
|
//
|
522
522
|
//--------------------------------------------------------------------------
|
523
|
-
/**
|
524
|
-
* Store the home extent when the map view changes
|
525
|
-
*/
|
526
|
-
async mapViewWatchHandler() {
|
527
|
-
await this.mapView.when(() => {
|
528
|
-
this._homeExtent = this.mapView.extent;
|
529
|
-
});
|
530
|
-
}
|
531
523
|
/**
|
532
524
|
* When the _showBasemapWidget property is true display the basemap gallery
|
533
525
|
*/
|
@@ -590,7 +582,7 @@ const MapTools = class {
|
|
590
582
|
const searchClass = this._showSearchWidget ? "" : "display-none";
|
591
583
|
const basemapClass = this._showBasemapWidget ? "" : "display-none";
|
592
584
|
const legendClass = this._showLegendWidget ? "" : "display-none";
|
593
|
-
return (index.h(index.Host, null, index.h("div", null, index.h("calcite-action", { alignment: "center", class: "border", compact: false, icon: toggleIcon, onClick: () => { this._toggleTools(); }, text: "" }), index.h("calcite-action-bar", { class: `border margin-top-1-2 ${toolsClass}`, "expand-disabled": true, layout: this.layout }, this._getActionGroup("
|
585
|
+
return (index.h(index.Host, null, index.h("div", null, index.h("calcite-action", { alignment: "center", class: "border square-40", compact: false, icon: toggleIcon, onClick: () => { this._toggleTools(); }, scale: "s", text: "" }), index.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()))), index.h("basemap-gallery", { class: basemapClass, mapView: this.mapView, ref: (el) => { this._basemapElement = el; } }), index.h("map-search", { class: searchClass, mapView: this.mapView, ref: (el) => { this._searchElement = el; }, searchConfiguration: this.searchConfiguration }), index.h("map-legend", { class: legendClass, mapView: this.mapView, ref: (el) => { this._legendElement = el; } })));
|
594
586
|
}
|
595
587
|
//--------------------------------------------------------------------------
|
596
588
|
//
|
@@ -610,17 +602,7 @@ const MapTools = class {
|
|
610
602
|
* @protected
|
611
603
|
*/
|
612
604
|
_getActionGroup(icon, disabled, tip, func) {
|
613
|
-
return (index.h("calcite-action-group",
|
614
|
-
}
|
615
|
-
/**
|
616
|
-
* Go to the exent that was first used when loading the map
|
617
|
-
*
|
618
|
-
* @returns void
|
619
|
-
*
|
620
|
-
* @protected
|
621
|
-
*/
|
622
|
-
async _goHome() {
|
623
|
-
await this.mapView.goTo(this._homeExtent);
|
605
|
+
return (index.h("calcite-action-group", { class: "square-40-41" }, index.h("calcite-action", { alignment: "center", class: "square-40", compact: false, disabled: disabled, icon: icon, id: icon, onClick: func, scale: "s", text: "" }, index.h("calcite-icon", { icon: "cheveron-up", scale: "s", slot: "icon" })), index.h("calcite-tooltip", { label: "", placement: "trailing", "reference-element": icon }, index.h("span", null, tip))));
|
624
606
|
}
|
625
607
|
// need to discuss this with the team
|
626
608
|
_showLegend() {
|
@@ -632,42 +614,6 @@ const MapTools = class {
|
|
632
614
|
this._showSearchWidget = !this._showSearchWidget;
|
633
615
|
this._showTools = false;
|
634
616
|
}
|
635
|
-
/**
|
636
|
-
* Fixed zoom in
|
637
|
-
*
|
638
|
-
* @returns void
|
639
|
-
*
|
640
|
-
* @protected
|
641
|
-
*/
|
642
|
-
async _zoomIn() {
|
643
|
-
await this._zoom(this.mapView.zoom + 1);
|
644
|
-
}
|
645
|
-
/**
|
646
|
-
* Fixed zoom out
|
647
|
-
*
|
648
|
-
* @returns void
|
649
|
-
*
|
650
|
-
* @protected
|
651
|
-
*/
|
652
|
-
async _zoomOut() {
|
653
|
-
await this._zoom(this.mapView.zoom - 1);
|
654
|
-
}
|
655
|
-
/**
|
656
|
-
* Zoom in/out at the maps current center point
|
657
|
-
*
|
658
|
-
* @param zoom Number to zoom level to go to
|
659
|
-
*
|
660
|
-
* @returns void
|
661
|
-
*
|
662
|
-
* @protected
|
663
|
-
*/
|
664
|
-
async _zoom(zoom) {
|
665
|
-
var _a;
|
666
|
-
await ((_a = this.mapView) === null || _a === void 0 ? void 0 : _a.goTo({
|
667
|
-
target: this.mapView.center,
|
668
|
-
zoom
|
669
|
-
}));
|
670
|
-
}
|
671
617
|
/**
|
672
618
|
* Show/Hide the basemap picker
|
673
619
|
*
|
@@ -716,7 +662,6 @@ const MapTools = class {
|
|
716
662
|
}
|
717
663
|
get el() { return index.getElement(this); }
|
718
664
|
static get watchers() { return {
|
719
|
-
"mapView": ["mapViewWatchHandler"],
|
720
665
|
"_showBasemapWidget": ["_showBasemapWidgetWatchHandler"],
|
721
666
|
"_showLegendWidget": ["_showLegendWidgetWatchHandler"],
|
722
667
|
"_showSearchWidget": ["_showSearchWidgetWatchHandler"]
|
@@ -11,7 +11,7 @@ const index = require('./index-0e50040c.js');
|
|
11
11
|
const locale = require('./locale-88c21da2.js');
|
12
12
|
const mapViewUtils = require('./mapViewUtils-9da2dddd.js');
|
13
13
|
const loadModules = require('./loadModules-c5490589.js');
|
14
|
-
const downloadUtils = require('./downloadUtils-
|
14
|
+
const downloadUtils = require('./downloadUtils-471a6a2d.js');
|
15
15
|
require('./_commonjsHelpers-384729db.js');
|
16
16
|
require('./interfaces-d539e30c.js');
|
17
17
|
|
@@ -80,7 +80,7 @@ const CardManager = class {
|
|
80
80
|
var _a, _b;
|
81
81
|
const featuresClass = ((_a = this._graphics) === null || _a === void 0 ? void 0 : _a.length) > 0 ? "" : "display-none";
|
82
82
|
const messageClass = ((_b = this._graphics) === null || _b === void 0 ? void 0 : _b.length) > 0 ? "display-none" : "";
|
83
|
-
return (index.h(index.Host, null, index.h("div", { class: "border-rounded overflow-auto height-full" }, index.h("calcite-shell", { class: "position-relative
|
83
|
+
return (index.h(index.Host, null, index.h("div", { class: "border-rounded overflow-auto height-full" }, index.h("calcite-shell", { class: "position-relative " + featuresClass }, index.h("div", null, index.h("info-card", { graphics: this._graphics, isLoading: this._cardLoading, mapView: this.mapView, zoomAndScrollToSelected: this.zoomAndScrollToSelected }))), index.h("div", { class: "padding-1 " + messageClass }, index.h("calcite-notice", { icon: "table", open: true }, index.h("div", { slot: "message" }, this._translations.selectFeaturesToStart))))));
|
84
84
|
}
|
85
85
|
//--------------------------------------------------------------------------
|
86
86
|
//
|
@@ -101,7 +101,7 @@ const CardManager = class {
|
|
101
101
|
};
|
102
102
|
CardManager.style = cardManagerCss;
|
103
103
|
|
104
|
-
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}";
|
104
|
+
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)}";
|
105
105
|
|
106
106
|
const LayerTable = class {
|
107
107
|
constructor(hostRef) {
|
@@ -234,7 +234,11 @@ const LayerTable = class {
|
|
234
234
|
const tableNodeClass = this._fetchingData ? "display-none" : "";
|
235
235
|
const loadingClass = this._fetchingData ? "" : "display-none";
|
236
236
|
const alertActionClass = this._alertShowAction ? "" : "display-none";
|
237
|
-
|
237
|
+
const total = this._allIds.length.toString();
|
238
|
+
const selected = this._selectedIndexes.length.toString();
|
239
|
+
return (index.h(index.Host, null, index.h("calcite-shell", null, this._getTableControlRow("header"), index.h("div", { class: "height-full width-full" }, index.h("calcite-panel", { class: "height-full width-full" }, index.h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { class: tableNodeClass, ref: this.onTableNodeCreate })), index.h("div", { class: "bottom-left background text-color" }, this._translations.recordsSelected
|
240
|
+
.replace("{{total}}", total)
|
241
|
+
.replace("{{selected}}", selected))), index.h("calcite-alert", { icon: this._alertIcon, kind: this._alertKind, label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, index.h("div", { slot: "title" }, this._alertTitle), index.h("div", { slot: "message" }, this._alertMessage), index.h("calcite-link", { class: alertActionClass, onClick: this._alertActionFunction, slot: "link" }, this._alertActionText)))));
|
238
242
|
}
|
239
243
|
//--------------------------------------------------------------------------
|
240
244
|
//
|
@@ -589,7 +593,7 @@ const LayerTable = class {
|
|
589
593
|
};
|
590
594
|
LayerTable.style = layerTableCss;
|
591
595
|
|
592
|
-
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 58px)}
|
596
|
+
const mapCardCss = ":host{display:block;--calcite-label-margin-bottom:0;--calcite-block-padding:0}.map-height{height:calc(100% - 58px)}";
|
593
597
|
|
594
598
|
const MapCard = class {
|
595
599
|
constructor(hostRef) {
|
@@ -640,12 +644,14 @@ const MapCard = class {
|
|
640
644
|
* @protected
|
641
645
|
*/
|
642
646
|
async _initModules() {
|
643
|
-
const [WebMap, MapView] = await loadModules.loadModules([
|
647
|
+
const [WebMap, MapView, Home] = await loadModules.loadModules([
|
644
648
|
"esri/WebMap",
|
645
|
-
"esri/views/MapView"
|
649
|
+
"esri/views/MapView",
|
650
|
+
"esri/widgets/Home"
|
646
651
|
]);
|
647
652
|
this.WebMap = WebMap;
|
648
653
|
this.MapView = MapView;
|
654
|
+
this.Home = Home;
|
649
655
|
}
|
650
656
|
/**
|
651
657
|
* Load the webmap for the provided webMapInfo
|
@@ -671,13 +677,17 @@ const MapCard = class {
|
|
671
677
|
map: webMap,
|
672
678
|
resizeAlign: "top-left"
|
673
679
|
});
|
680
|
+
this._loadedId = id;
|
681
|
+
this._searchConfiguration = this._webMapInfo.searchConfiguration;
|
682
|
+
this.mapChanged.emit({
|
683
|
+
id: id,
|
684
|
+
mapView: this.mapView
|
685
|
+
});
|
674
686
|
await this.mapView.when(() => {
|
675
|
-
|
676
|
-
|
677
|
-
this.mapChanged.emit({
|
678
|
-
id: id,
|
679
|
-
mapView: this.mapView
|
687
|
+
const home = new this.Home({
|
688
|
+
view: this.mapView
|
680
689
|
});
|
690
|
+
this.mapView.ui.add(home, { position: "top-left", index: 3 });
|
681
691
|
this.mapView.ui.add(this._mapTools, { position: "top-right", index: 0 });
|
682
692
|
});
|
683
693
|
}
|
@@ -12,7 +12,7 @@ const locale = require('./locale-88c21da2.js');
|
|
12
12
|
const interfaces = require('./interfaces-d539e30c.js');
|
13
13
|
require('./_commonjsHelpers-384729db.js');
|
14
14
|
|
15
|
-
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}";
|
15
|
+
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}";
|
16
16
|
|
17
17
|
const CrowdsourceManager = class {
|
18
18
|
constructor(hostRef) {
|
@@ -23,6 +23,7 @@ const CrowdsourceManager = class {
|
|
23
23
|
this.mapInfos = [];
|
24
24
|
this.searchConfiguration = undefined;
|
25
25
|
this.zoomAndScrollToSelected = false;
|
26
|
+
this._expandPopup = false;
|
26
27
|
this._translations = undefined;
|
27
28
|
this._layoutMode = interfaces.ELayoutMode.GRID;
|
28
29
|
this._mapView = undefined;
|
@@ -54,6 +55,9 @@ const CrowdsourceManager = class {
|
|
54
55
|
*/
|
55
56
|
async mapChanged(evt) {
|
56
57
|
const mapChange = evt.detail;
|
58
|
+
// close popup by default when the map changes otherwise other components that rely on the view don't work since it
|
59
|
+
// doesn't seem to fully load when it's not visible
|
60
|
+
this._expandPopup = false;
|
57
61
|
this._mapInfo = this._getMapInfo(mapChange.id);
|
58
62
|
this._mapView = mapChange.mapView;
|
59
63
|
this._mapView.popupEnabled = false;
|
@@ -190,7 +194,7 @@ const CrowdsourceManager = class {
|
|
190
194
|
*/
|
191
195
|
_getMapAndCard(layoutMode, panelOpen, hideMap) {
|
192
196
|
const mapSizeClass = this._getMapSizeClass(layoutMode, panelOpen);
|
193
|
-
return this.classicGrid ? (index.h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getCardNode(layoutMode, hideMap), this._getMapNode(layoutMode, hideMap))) : (index.h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getMapNode(layoutMode, hideMap), this._getCardNode(layoutMode, hideMap)));
|
197
|
+
return this.classicGrid ? (index.h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getCardNode(layoutMode, hideMap), this._getMapNode(layoutMode, hideMap))) : (index.h("div", { class: `${mapSizeClass} overflow-hidden` }, this._getMapNode(layoutMode, hideMap), this._getPopupExpandNode(), this._getCardNode(layoutMode, hideMap)));
|
194
198
|
}
|
195
199
|
/**
|
196
200
|
* Get the map node based for the current layout options
|
@@ -204,9 +208,27 @@ const CrowdsourceManager = class {
|
|
204
208
|
_getMapNode(layoutMode, hideMap) {
|
205
209
|
const mapDisplayClass = this.classicGrid && layoutMode === interfaces.ELayoutMode.GRID ? "display-flex height-full width-1-2" :
|
206
210
|
layoutMode === interfaces.ELayoutMode.GRID && !hideMap ? "" : "display-none";
|
207
|
-
const mapContainerClass = this.classicGrid && layoutMode === interfaces.ELayoutMode.GRID ? "width-full" : "adjusted-height-50";
|
211
|
+
const mapContainerClass = this.classicGrid && layoutMode === interfaces.ELayoutMode.GRID ? "width-full" : this._expandPopup ? "height-50-px" : "adjusted-height-50";
|
208
212
|
return (index.h("div", { class: `${mapContainerClass} overflow-hidden ${mapDisplayClass}` }, index.h("map-card", { class: "width-full", mapInfos: this.mapInfos })));
|
209
213
|
}
|
214
|
+
/**
|
215
|
+
* Get the expand node for the popup information
|
216
|
+
*
|
217
|
+
* @returns the expand node
|
218
|
+
* @protected
|
219
|
+
*/
|
220
|
+
_getPopupExpandNode() {
|
221
|
+
const icon = this._expandPopup ? "chevrons-down" : "chevrons-up";
|
222
|
+
return (index.h("div", { class: "height-49-px calcite-mode-dark" }, index.h("calcite-panel", null, index.h("div", { class: "display-flex align-items-center", slot: "header-content" }, index.h("calcite-icon", { class: "padding-inline-end-75", icon: "information", scale: "s" }), index.h("div", null, this._translations.information)), index.h("calcite-action", { class: "height-49-px", icon: icon, onClick: () => this._togglePopup(), slot: "header-actions-end" }))));
|
223
|
+
}
|
224
|
+
/**
|
225
|
+
* Toggle the popup information
|
226
|
+
*
|
227
|
+
* @protected
|
228
|
+
*/
|
229
|
+
_togglePopup() {
|
230
|
+
this._expandPopup = !this._expandPopup;
|
231
|
+
}
|
210
232
|
/**
|
211
233
|
* Get the card node based for the current layout options
|
212
234
|
*
|
@@ -218,9 +240,9 @@ const CrowdsourceManager = class {
|
|
218
240
|
*/
|
219
241
|
_getCardNode(layoutMode, hideMap) {
|
220
242
|
const cardManagerHeight = this.classicGrid && layoutMode === interfaces.ELayoutMode.GRID ? "" :
|
221
|
-
layoutMode === interfaces.ELayoutMode.GRID && !hideMap ? "adjusted-height-50" : "adjusted-height-100";
|
243
|
+
layoutMode === interfaces.ELayoutMode.GRID && !this._expandPopup && !hideMap ? "adjusted-height-50" : "adjusted-height-100";
|
222
244
|
const cardManagerContainer = this.classicGrid && layoutMode === interfaces.ELayoutMode.GRID ?
|
223
|
-
"width-full adjusted-height-100" : "width-50 height-full";
|
245
|
+
"width-full adjusted-height-100" : this._expandPopup ? "width-50 adjusted-height-100-50" : "width-50 height-full";
|
224
246
|
return (index.h("div", { class: `padding-1-2 ${cardManagerContainer}` }, index.h("card-manager", { class: `${cardManagerHeight} width-full`, mapView: this === null || this === void 0 ? void 0 : this._mapView, zoomAndScrollToSelected: this.zoomAndScrollToSelected })));
|
225
247
|
}
|
226
248
|
/**
|
@@ -1507,7 +1507,7 @@ function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++
|
|
1507
1507
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1508
1508
|
* ====================================================================
|
1509
1509
|
*/
|
1510
|
-
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-
|
1510
|
+
function(t){function e(){return (n.canvg?Promise.resolve(n.canvg):Promise.resolve().then(function () { return require('./index.es-33154f03.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},
|
1511
1511
|
/** ====================================================================
|
1512
1512
|
* @license
|
1513
1513
|
* jsPDF XMP metadata plugin
|
@@ -2522,8 +2522,8 @@ function _getFieldNamesFromFieldExpressions(fieldExpressions) {
|
|
2522
2522
|
* all attributes are exported
|
2523
2523
|
* @param attributeFormats Empty object to hold the formats for each attribute in a feature; the object is filled
|
2524
2524
|
* with formats by this function
|
2525
|
-
* @returns A Promise resolving to the format of a single label, e.g.,
|
2526
|
-
* "{
|
2525
|
+
* @returns A Promise resolving to the format of a single label with fields coerced to lowercase, e.g.,
|
2526
|
+
* for ILabelFormat type "pattern": "{name}|{street}|{city}, {state} {zip}"
|
2527
2527
|
*/
|
2528
2528
|
async function _getLabelFormat(layer, formatUsingLayerPopup, attributeFormats) {
|
2529
2529
|
var _a, _b, _c, _d, _e, _f;
|
@@ -2536,7 +2536,7 @@ async function _getLabelFormat(layer, formatUsingLayerPopup, attributeFormats) {
|
|
2536
2536
|
// Extract any format info that we have
|
2537
2537
|
fieldInfo => {
|
2538
2538
|
if (fieldInfo.format) {
|
2539
|
-
attributeFormats[fieldInfo.fieldName] = fieldInfo.format;
|
2539
|
+
attributeFormats[fieldInfo.fieldName.toLowerCase()] = fieldInfo.format;
|
2540
2540
|
}
|
2541
2541
|
});
|
2542
2542
|
// What is the nature of the label content?
|
@@ -2645,11 +2645,14 @@ async function _prepareLabels(layer, ids, formatUsingLayerPopup = true, includeH
|
|
2645
2645
|
// Get the features to export
|
2646
2646
|
const featureSet = await mapViewUtils.queryFeaturesByID(ids, layer, [], false);
|
2647
2647
|
// Get field data types. Do we have any domain-based fields?
|
2648
|
+
const attributeOrigNames = {};
|
2648
2649
|
const attributeTypes = {};
|
2649
2650
|
const attributeDomains = {};
|
2650
2651
|
layer.fields.forEach(field => {
|
2651
|
-
|
2652
|
-
|
2652
|
+
const lowercaseFieldname = field.name.toLowerCase();
|
2653
|
+
attributeOrigNames[lowercaseFieldname] = field.name;
|
2654
|
+
attributeDomains[lowercaseFieldname] = field.domain;
|
2655
|
+
attributeTypes[lowercaseFieldname] = field.type;
|
2653
2656
|
});
|
2654
2657
|
const attributeFormats = {};
|
2655
2658
|
// Get the label formatting, if any
|
@@ -2660,7 +2663,7 @@ async function _prepareLabels(layer, ids, formatUsingLayerPopup = true, includeH
|
|
2660
2663
|
await _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomains, includeHeaderNames)
|
2661
2664
|
: labelFormat.type == "pattern" ?
|
2662
2665
|
// Export attributes in format
|
2663
|
-
await _prepareLabelsFromPattern(featureSet, attributeTypes, attributeDomains, attributeFormats, labelFormat.format, includeHeaderNames)
|
2666
|
+
await _prepareLabelsFromPattern(featureSet, attributeOrigNames, attributeTypes, attributeDomains, attributeFormats, labelFormat.format, includeHeaderNames)
|
2664
2667
|
:
|
2665
2668
|
// Export attributes in expression
|
2666
2669
|
await _prepareLabelsUsingExecutor(featureSet, labelFormat.format);
|
@@ -2680,7 +2683,8 @@ async function _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomain
|
|
2680
2683
|
// Export all attributes
|
2681
2684
|
const labels = featureSet.map(feature => {
|
2682
2685
|
return Object.keys(feature.attributes).map((attributeName) => {
|
2683
|
-
|
2686
|
+
const lowercaseFieldname = attributeName.toLowerCase();
|
2687
|
+
return _prepareAttributeValue(feature.attributes[attributeName], attributeTypes[lowercaseFieldname], attributeDomains[lowercaseFieldname], null, intl);
|
2684
2688
|
});
|
2685
2689
|
});
|
2686
2690
|
// Add header names
|
@@ -2698,6 +2702,7 @@ async function _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomain
|
|
2698
2702
|
* Creates labels from attributes in a layer popup.
|
2699
2703
|
*
|
2700
2704
|
* @param featureSet Features to convert to labels
|
2705
|
+
* @param attributeOrigNames Mapping from lowercase field names to original field names
|
2701
2706
|
* @param attributeTypes Type for each attribute in a feature
|
2702
2707
|
* @param attributeDomains Domains for each attribute in a feature
|
2703
2708
|
* @param attributeFormats Formats for each attribute in a feature
|
@@ -2705,7 +2710,7 @@ async function _prepareLabelsFromAll(featureSet, attributeTypes, attributeDomain
|
|
2705
2710
|
* @param includeHeaderNames Add the label format at the front of the list of generated labels
|
2706
2711
|
* @returns Promise resolving with list of labels, each of which is a list of label lines
|
2707
2712
|
*/
|
2708
|
-
async function _prepareLabelsFromPattern(featureSet, attributeTypes, attributeDomains, attributeFormats, labelFormat, includeHeaderNames = false) {
|
2713
|
+
async function _prepareLabelsFromPattern(featureSet, attributeOrigNames, attributeTypes, attributeDomains, attributeFormats, labelFormat, includeHeaderNames = false) {
|
2709
2714
|
const [intl] = await loadModules.loadModules(["esri/intl"]);
|
2710
2715
|
// Find the label fields that we need to replace with values
|
2711
2716
|
const attributeExpressionMatches = _getFieldExpressionsFromLabel(labelFormat);
|
@@ -2715,7 +2720,8 @@ async function _prepareLabelsFromPattern(featureSet, attributeTypes, attributeDo
|
|
2715
2720
|
let labelPrep = labelFormat;
|
2716
2721
|
// Replace non-Arcade fields in this feature
|
2717
2722
|
attributeNames.forEach((attributeName, i) => {
|
2718
|
-
const
|
2723
|
+
const lowercaseFieldname = attributeName.toLowerCase();
|
2724
|
+
const value = _prepareAttributeValue(feature.attributes[attributeOrigNames[lowercaseFieldname]], attributeTypes[lowercaseFieldname], attributeDomains[lowercaseFieldname], attributeFormats[lowercaseFieldname], intl);
|
2719
2725
|
labelPrep = labelPrep.replace(attributeExpressionMatches[i], value);
|
2720
2726
|
});
|
2721
2727
|
// Split label into lines
|
@@ -176,7 +176,7 @@ const EditCard = class {
|
|
176
176
|
};
|
177
177
|
EditCard.style = editCardCss;
|
178
178
|
|
179
|
-
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
|
179
|
+
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}";
|
180
180
|
|
181
181
|
const InfoCard = class {
|
182
182
|
constructor(hostRef) {
|
@@ -187,6 +187,7 @@ const InfoCard = class {
|
|
187
187
|
this.mapView = undefined;
|
188
188
|
this.zoomAndScrollToSelected = undefined;
|
189
189
|
this._alertOpen = false;
|
190
|
+
this._count = "";
|
190
191
|
this._editRecordOpen = false;
|
191
192
|
this._translations = undefined;
|
192
193
|
}
|
@@ -264,7 +265,7 @@ const InfoCard = class {
|
|
264
265
|
const featureNodeClass = this.isLoading || this._editRecordOpen ? "display-none" : "position-absolute";
|
265
266
|
const editClass = !this.isLoading && this._editRecordOpen ? "position-absolute" : "display-none";
|
266
267
|
const editButtonClass = !this.isLoading && this._editRecordOpen ? "display-none" : "";
|
267
|
-
return (index.h(index.Host, null, index.h("calcite-shell", null, index.h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), index.h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), index.h("div", { class: `${editButtonClass} edit-btn edit-btn-position` }, index.h("calcite-
|
268
|
+
return (index.h(index.Host, null, index.h("calcite-shell", null, index.h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), index.h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), index.h("div", { class: `${editButtonClass} display-flex padding-1-2 button-container`, slot: "footer" }, index.h("div", { class: "min-width-100" }, index.h("calcite-button", { appearance: "outline", id: "solutions-back", onClick: () => this._back(), width: "full" }, this._translations.back), index.h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-back" }, index.h("span", null, this._translations.back))), index.h("div", null, this._getCount()), index.h("div", { class: "min-width-100" }, index.h("calcite-button", { appearance: "outline", id: "solutions-next", onClick: () => this._next(), width: "full" }, this._translations.next), index.h("calcite-tooltip", { label: "", placement: "top", "reference-element": "solutions-next" }, index.h("span", null, this._translations.next)))), index.h("div", { class: `${editButtonClass} edit-btn edit-btn-position` }, index.h("calcite-button", { appearance: "outline", "icon-start": "pencil", id: "solutions-edit", onClick: () => this._openEditRecord() }, this._translations.edit), index.h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-edit" }, index.h("span", null, this._translations.edit))), index.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 }), index.h("calcite-alert", { icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, index.h("div", { slot: "title" }, this._translations.editDisabled), index.h("div", { slot: "message" }, this._translations.enableEditing)))));
|
268
269
|
}
|
269
270
|
//--------------------------------------------------------------------------
|
270
271
|
//
|
@@ -345,6 +346,37 @@ const InfoCard = class {
|
|
345
346
|
this._alertOpen = true;
|
346
347
|
}
|
347
348
|
}
|
349
|
+
/**
|
350
|
+
* Go to the previous feature in the features widget
|
351
|
+
*
|
352
|
+
* @returns void
|
353
|
+
*/
|
354
|
+
_back() {
|
355
|
+
this._features.previous();
|
356
|
+
this._count = this._getCount();
|
357
|
+
}
|
358
|
+
/**
|
359
|
+
* Go to the next feature in the features widget
|
360
|
+
*
|
361
|
+
* @returns void
|
362
|
+
*/
|
363
|
+
_next() {
|
364
|
+
this._features.next();
|
365
|
+
this._count = this._getCount();
|
366
|
+
}
|
367
|
+
/**
|
368
|
+
* Get the current index of total string
|
369
|
+
*
|
370
|
+
* @returns the index of total string
|
371
|
+
*/
|
372
|
+
_getCount() {
|
373
|
+
var _a, _b, _c;
|
374
|
+
const index = (((_a = this._features) === null || _a === void 0 ? void 0 : _a.viewModel.selectedFeatureIndex) + 1).toString();
|
375
|
+
const total = (_c = (_b = this._features) === null || _b === void 0 ? void 0 : _b.features) === null || _c === void 0 ? void 0 : _c.length.toString();
|
376
|
+
return this._translations.indexOfTotal
|
377
|
+
.replace("{{index}}", index)
|
378
|
+
.replace("{{total}}", total);
|
379
|
+
}
|
348
380
|
/**
|
349
381
|
* Fetches the component's translations
|
350
382
|
*
|
@@ -6,7 +6,7 @@
|
|
6
6
|
'use strict';
|
7
7
|
|
8
8
|
const _commonjsHelpers = require('./_commonjsHelpers-384729db.js');
|
9
|
-
const downloadUtils = require('./downloadUtils-
|
9
|
+
const downloadUtils = require('./downloadUtils-471a6a2d.js');
|
10
10
|
require('./index-0e50040c.js');
|
11
11
|
require('./loadModules-c5490589.js');
|
12
12
|
require('./locale-88c21da2.js');
|