@esri/solutions-components 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/t9n/crowdsource-reporter/resources.json +5 -6
- package/dist/assets/t9n/crowdsource-reporter/resources_en.json +5 -6
- package/dist/assets/t9n/feature-list/resources.json +1 -1
- package/dist/assets/t9n/feature-list/resources_en.json +1 -1
- package/dist/assets/t9n/public-notification/resources.json +3 -1
- package/dist/assets/t9n/public-notification/resources_en.json +3 -1
- package/dist/cjs/buffer-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/calcite-alert_4.cjs.entry.js +2 -2
- package/dist/cjs/calcite-combobox_5.cjs.entry.js +2 -2
- package/dist/cjs/calcite-flow_5.cjs.entry.js +163 -16
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +120 -38
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +2 -2
- package/dist/cjs/public-notification.cjs.entry.js +110 -4
- package/dist/cjs/{publicNotificationStore-ef379d11.js → publicNotificationStore-e790601d.js} +2 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/create-feature/create-feature.css +9 -0
- package/dist/collection/components/create-feature/create-feature.js +134 -6
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +5 -0
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +120 -38
- package/dist/collection/components/feature-list/feature-list.js +93 -5
- package/dist/collection/components/info-card/info-card.css +1 -1
- package/dist/collection/components/info-card/info-card.js +1 -1
- package/dist/collection/components/layer-list/layer-list.js +6 -6
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +1 -1
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +1 -1
- package/dist/collection/components/map-select-tools/map-select-tools.js +1 -1
- package/dist/collection/components/public-notification/public-notification.js +110 -3
- package/dist/collection/demos/crowdsource-reporter.html +1 -1
- package/dist/collection/utils/interfaces.ts +7 -0
- package/dist/collection/utils/publicNotificationStore.js +2 -2
- package/dist/collection/utils/publicNotificationStore.ts +3 -2
- package/dist/components/create-feature2.js +111 -7
- package/dist/components/crowdsource-reporter.js +121 -39
- package/dist/components/feature-list2.js +54 -6
- package/dist/components/info-card2.js +2 -2
- package/dist/components/layer-list2.js +6 -6
- package/dist/components/map-draw-tools2.js +1 -1
- package/dist/components/map-layer-picker2.js +1 -1
- package/dist/components/map-select-tools2.js +1 -1
- package/dist/components/public-notification.js +110 -3
- package/dist/components/publicNotificationStore.js +2 -2
- package/dist/esm/buffer-tools_3.entry.js +2 -2
- package/dist/esm/calcite-alert_4.entry.js +3 -3
- package/dist/esm/calcite-combobox_5.entry.js +3 -3
- package/dist/esm/calcite-flow_5.entry.js +164 -17
- package/dist/esm/card-manager_3.entry.js +2 -2
- package/dist/esm/crowdsource-manager.entry.js +1 -1
- package/dist/esm/crowdsource-reporter.entry.js +121 -39
- package/dist/esm/{downloadUtils-0c13073b.js → downloadUtils-0c1e4d7b.js} +2 -2
- package/dist/esm/{index.es-ad250bc6.js → index.es-286e3cfa.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +4 -4
- package/dist/esm/{mapViewUtils-20504620.js → mapViewUtils-253178f1.js} +1 -1
- package/dist/esm/public-notification.entry.js +112 -6
- package/dist/esm/{publicNotificationStore-3bf4de75.js → publicNotificationStore-223faed2.js} +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-reporter.html +1 -1
- package/dist/solutions-components/p-15f9624a.entry.js +6 -0
- package/dist/solutions-components/{p-955647ea.entry.js → p-1ea5e061.entry.js} +2 -2
- package/dist/solutions-components/{p-590a2a26.js → p-212b02e7.js} +1 -1
- package/dist/solutions-components/p-238d3b5f.entry.js +6 -0
- package/dist/solutions-components/p-273d833b.entry.js +6 -0
- package/dist/solutions-components/{p-cc280aa1.js → p-322868ec.js} +1 -1
- package/dist/solutions-components/{p-1d3a1794.js → p-331b5d1e.js} +2 -2
- package/dist/solutions-components/{p-c897e3eb.js → p-3af79063.js} +1 -1
- package/dist/solutions-components/{p-b8c12736.entry.js → p-45ed16d5.entry.js} +1 -1
- package/dist/solutions-components/p-80b11ec1.entry.js +17 -0
- package/dist/solutions-components/{p-5c7e3941.entry.js → p-813fd8a4.entry.js} +2 -2
- package/dist/solutions-components/{p-ff302d95.entry.js → p-d136eab0.entry.js} +2 -2
- package/dist/solutions-components/p-e0446d5b.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/interfaces.ts +7 -0
- package/dist/solutions-components/utils/publicNotificationStore.ts +3 -2
- package/dist/types/components/create-feature/create-feature.d.ts +43 -1
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +31 -10
- package/dist/types/components/feature-list/feature-list.d.ts +31 -0
- package/dist/types/components/layer-list/layer-list.d.ts +3 -3
- package/dist/types/components/public-notification/public-notification.d.ts +48 -0
- package/dist/types/components.d.ts +21 -0
- package/dist/types/utils/interfaces.d.ts +6 -0
- package/dist/types/utils/publicNotificationStore.d.ts +2 -1
- package/package.json +1 -1
- package/dist/solutions-components/p-6512dc44.entry.js +0 -6
- package/dist/solutions-components/p-6f65682c.entry.js +0 -6
- package/dist/solutions-components/p-989bf0bf.entry.js +0 -6
- package/dist/solutions-components/p-a0611720.entry.js +0 -6
- package/dist/solutions-components/p-efe1694a.entry.js +0 -17
@@ -24,7 +24,7 @@ import { d as defineCustomElement$3 } from './tooltip.js';
|
|
24
24
|
import { d as defineCustomElement$2 } from './delete-button2.js';
|
25
25
|
import { d as defineCustomElement$1 } from './edit-card2.js';
|
26
26
|
|
27
|
-
const infoCardCss = ":host{display:block;--calcite-label-margin-bottom:0}.padding-1-2{padding:0.5rem}.display-none{display:none !important}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.top-border{border-top:1px solid var(--calcite-color-border-1)}.min-width-100{min-width:100px}.width-100{width:100%}.esri-features__container{padding:0.5rem !important;background-color:var(--calcite-color-foreground-1) !important;height:100% !important}.overflow-hidden{overflow:hidden}.height-40{height:40px}.end-border{border-inline-end:1px solid var(--calcite-color-border-1)}.font-bold{font-weight:bold}.visibility-hidden{visibility:hidden;height:0px}.padding-inline-start-1{padding-inline-start:1rem}.border-width-0{border-width:0px}";
|
27
|
+
const infoCardCss = ":host{display:block;--calcite-label-margin-bottom:0}.padding-1-2{padding:0.5rem}.display-none{display:none !important}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.feature-node .esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.top-border{border-top:1px solid var(--calcite-color-border-1)}.min-width-100{min-width:100px}.width-100{width:100%}.esri-features__container{padding:0.5rem !important;background-color:var(--calcite-color-foreground-1) !important;height:100% !important}.overflow-hidden{overflow:hidden}.height-40{height:40px}.end-border{border-inline-end:1px solid var(--calcite-color-border-1)}.font-bold{font-weight:bold}.visibility-hidden{visibility:hidden;height:0px}.padding-inline-start-1{padding-inline-start:1rem}.border-width-0{border-width:0px}";
|
28
28
|
|
29
29
|
const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLElement {
|
30
30
|
constructor() {
|
@@ -148,7 +148,7 @@ const InfoCard = /*@__PURE__*/ proxyCustomElement(class InfoCard extends HTMLEle
|
|
148
148
|
const id = (_d = (_c = this._features) === null || _c === void 0 ? void 0 : _c.selectedFeature) === null || _d === void 0 ? void 0 : _d.getObjectId();
|
149
149
|
const ids = parseInt(id === null || id === void 0 ? void 0 : id.toString(), 10) > -1 ? [id] : [];
|
150
150
|
const deleteEnabled = ((_e = this._layer) === null || _e === void 0 ? void 0 : _e.editingEnabled) && ((_h = (_g = (_f = this._layer) === null || _f === void 0 ? void 0 : _f.capabilities) === null || _g === void 0 ? void 0 : _g.operations) === null || _h === void 0 ? void 0 : _h.supportsDelete);
|
151
|
-
return (h(Host, null, h("calcite-shell", null, this._getHeader(), h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
|
151
|
+
return (h(Host, null, h("calcite-shell", null, this._getHeader(), h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget feature-node " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
|
152
152
|
h("div", { class: "display-flex top-border padding-1-2" }, h("calcite-button", { appearance: "solid", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), this.isMobile && deleteEnabled ? (h("delete-button", { class: "padding-inline-start-1 width-100", id: "solutions-delete", ids: ids, layer: this._layer, onEditsComplete: () => this._closePopup() })) : undefined, h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-edit" }, h("span", null, this._translations.edit)), this.isMobile ? (h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-delete" }, h("span", null, this._translations.delete))) : undefined), !nextBackDisabled && h("div", { class: `display-flex padding-1-2 button-container top-border ${nextBackClass}` }, h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", disabled: nextBackDisabled, 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, h("calcite-action", { icon: "list", onClick: () => this._toggleListView(), scale: "s", text: this._count, textEnabled: true })), h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", disabled: nextBackDisabled, 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("edit-card", { class: editClass, graphicIndex: (_j = this._features) === null || _j === void 0 ? void 0 : _j.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)))));
|
153
153
|
}
|
154
154
|
//--------------------------------------------------------------------------
|
@@ -82,7 +82,7 @@ const LayerList = /*@__PURE__*/ proxyCustomElement(class LayerList extends HTMLE
|
|
82
82
|
render() {
|
83
83
|
return (h(Fragment, null, this._isLoading && h("calcite-loader", { label: "", scale: "m" }), !this._isLoading && this.mapView && this._noLayersToDisplay &&
|
84
84
|
h("calcite-notice", { class: "error-msg", icon: "layers-reference", kind: "danger", open: true }, h("div", { slot: "title" }, this._translations.error), h("div", { slot: "message" }, this.noLayerErrorMsg ? this.noLayerErrorMsg : this._noLayerToDisplayErrorMsg)), !this._isLoading && this.mapView &&
|
85
|
-
h("calcite-list", { "selection-appearance": "border", "selection-mode":
|
85
|
+
h("calcite-list", { "selection-appearance": "border", "selection-mode": "none" }, this.renderLayerList())));
|
86
86
|
}
|
87
87
|
//--------------------------------------------------------------------------
|
88
88
|
//
|
@@ -130,7 +130,7 @@ const LayerList = /*@__PURE__*/ proxyCustomElement(class LayerList extends HTMLE
|
|
130
130
|
}
|
131
131
|
});
|
132
132
|
await Promise.all(def).then(() => {
|
133
|
-
const editableLayerIds = this.
|
133
|
+
const editableLayerIds = this.getLayersToBeShownInList(this._layerItemsHash);
|
134
134
|
this._mapLayerIds = editableLayerIds.reverse();
|
135
135
|
this.handleNoLayersToDisplay();
|
136
136
|
}, () => {
|
@@ -146,17 +146,17 @@ const LayerList = /*@__PURE__*/ proxyCustomElement(class LayerList extends HTMLE
|
|
146
146
|
this.layersListLoaded.emit(this._mapLayerIds);
|
147
147
|
}
|
148
148
|
/**
|
149
|
-
* Returns the ids of all OR configured layers that
|
149
|
+
* Returns the ids of all OR configured layers that needs to be shown in the list
|
150
150
|
* @param hash each layer item details
|
151
151
|
* @returns array of layer ids
|
152
152
|
*/
|
153
|
-
|
153
|
+
getLayersToBeShownInList(hash) {
|
154
154
|
var _a;
|
155
155
|
const configuredLayers = ((_a = this.layers) === null || _a === void 0 ? void 0 : _a.length) > 0 ? this.layers : [];
|
156
156
|
return Object.keys(hash).reduce((prev, cur) => {
|
157
|
-
let showLayer =
|
157
|
+
let showLayer = true;
|
158
158
|
if ((configuredLayers === null || configuredLayers === void 0 ? void 0 : configuredLayers.length) > 0) {
|
159
|
-
showLayer = configuredLayers.indexOf(cur) > -1
|
159
|
+
showLayer = configuredLayers.indexOf(cur) > -1;
|
160
160
|
}
|
161
161
|
if (showLayer) {
|
162
162
|
prev.push(cur);
|
@@ -167,7 +167,7 @@ const MapDrawTools = /*@__PURE__*/ proxyCustomElement(class MapDrawTools extends
|
|
167
167
|
}
|
168
168
|
else {
|
169
169
|
this._sketchGraphicsLayer = new this.GraphicsLayer({ title, listMode: "hide" });
|
170
|
-
state.managedLayers
|
170
|
+
state.managedLayers[title] = "sketch";
|
171
171
|
this.mapView.map.layers.add(this._sketchGraphicsLayer);
|
172
172
|
}
|
173
173
|
if (this.graphics && this.graphics.length > 0) {
|
@@ -305,7 +305,7 @@ const MapLayerPicker = /*@__PURE__*/ proxyCustomElement(class MapLayerPicker ext
|
|
305
305
|
_validLayer(id) {
|
306
306
|
var _a;
|
307
307
|
const name = (_a = this._layerNameHash[id]) === null || _a === void 0 ? void 0 : _a.name;
|
308
|
-
return name && state.managedLayers.indexOf(name) < 0 && (this.enabledLayerIds.length > 0 ?
|
308
|
+
return name && Object.keys(state.managedLayers).indexOf(name) < 0 && (this.enabledLayerIds.length > 0 ?
|
309
309
|
this.enabledLayerIds.indexOf(id) > -1 : true);
|
310
310
|
}
|
311
311
|
/**
|
@@ -443,7 +443,7 @@ const MapSelectTools = /*@__PURE__*/ proxyCustomElement(class MapSelectTools ext
|
|
443
443
|
}
|
444
444
|
else {
|
445
445
|
this._bufferGraphicsLayer = new this.GraphicsLayer({ title, listMode: "hide" });
|
446
|
-
state.managedLayers
|
446
|
+
state.managedLayers[title] = "buffer";
|
447
447
|
const sketchIndex = this.mapView.map.layers.findIndex((l) => l.title === this._translations.sketchLayer);
|
448
448
|
if (sketchIndex > -1) {
|
449
449
|
this.mapView.map.layers.add(this._bufferGraphicsLayer, sketchIndex);
|
@@ -92,6 +92,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
|
|
92
92
|
this.sketchLineSymbol = undefined;
|
93
93
|
this.sketchPointSymbol = undefined;
|
94
94
|
this.sketchPolygonSymbol = undefined;
|
95
|
+
this._exportGraphics = false;
|
95
96
|
this._addMap = false;
|
96
97
|
this._addResults = true;
|
97
98
|
this._addTitle = false;
|
@@ -170,6 +171,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
|
|
170
171
|
if (pageType === EPageType.EXPORT) {
|
171
172
|
this._fetchingData = true;
|
172
173
|
this._numDuplicates = await this._getNumDuplicates();
|
174
|
+
this._updateExportGraphics();
|
173
175
|
this._fetchingData = false;
|
174
176
|
}
|
175
177
|
this._clearHighlight();
|
@@ -177,6 +179,9 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
|
|
177
179
|
// clear any draw shapes or buffers
|
178
180
|
await this._clearSelection();
|
179
181
|
}
|
182
|
+
if (oldPageType === EPageType.EXPORT) {
|
183
|
+
this._removeExportGraphics();
|
184
|
+
}
|
180
185
|
if (pageType !== EPageType.SELECT) {
|
181
186
|
return this._highlightFeatures();
|
182
187
|
}
|
@@ -240,12 +245,14 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
|
|
240
245
|
* @protected
|
241
246
|
*/
|
242
247
|
async _initModules() {
|
243
|
-
const [geometryEngine, jsonUtils] = await loadModules([
|
248
|
+
const [geometryEngine, jsonUtils, graphic] = await loadModules([
|
244
249
|
"esri/geometry/geometryEngine",
|
245
|
-
"esri/symbols/support/jsonUtils"
|
250
|
+
"esri/symbols/support/jsonUtils",
|
251
|
+
"esri/Graphic"
|
246
252
|
]);
|
247
253
|
this._geometryEngine = geometryEngine;
|
248
254
|
this._jsonUtils = jsonUtils;
|
255
|
+
this.Graphic = graphic;
|
249
256
|
}
|
250
257
|
/**
|
251
258
|
* Load the search configuration
|
@@ -573,9 +580,107 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
|
|
573
580
|
_getExportOptions() {
|
574
581
|
const displayClass = this._exportType === EExportType.PDF ? "display-block" : "display-none";
|
575
582
|
const titleOptionsClass = this._addTitle ? "display-block" : "display-none";
|
583
|
+
const graphicsOptionsClass = this._addMap ? "display-flex" : "display-none";
|
576
584
|
const title = this._titleValue ? this._titleValue : this.defaultExportTitle ? this.defaultExportTitle : "";
|
577
585
|
const formatOptionsClass = this._addResults ? "" : "display-none";
|
578
|
-
return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addResults, onCalciteCheckboxChange: () => this._addResults = !this._addResults }), this._translations.addResults)), h("div", { class: `padding-top-sides-1 ${formatOptionsClass}` }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: `padding-sides-1 ${formatOptionsClass}` }, h("pdf-download", { defaultNumLabelsPerPage: parseInt(this.defaultNumLabelsPerPage.toString(), 10), disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.title)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this.
|
586
|
+
return (h("div", { class: displayClass }, this._getLabel(this._translations.pdfOptions, true), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addResults, onCalciteCheckboxChange: () => this._addResults = !this._addResults }), this._translations.addResults)), h("div", { class: `padding-top-sides-1 ${formatOptionsClass}` }, h("calcite-label", { class: "label-margin-0" }, this._translations.selectPDFLabelOption)), h("div", { class: `padding-sides-1 ${formatOptionsClass}` }, h("pdf-download", { defaultNumLabelsPerPage: parseInt(this.defaultNumLabelsPerPage.toString(), 10), disabled: !this._downloadActive, ref: (el) => { this._downloadTools = el; } })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addTitle, onCalciteCheckboxChange: () => this._addTitle = !this._addTitle }), this._translations.title)), h("div", { class: titleOptionsClass }, this._getLabel(this._translations.title, true, ""), h("calcite-input-text", { class: "padding-sides-1", onCalciteInputTextInput: () => this._changeTitle(), placeholder: this._translations.titlePlaceholder, ref: (el) => { this._titleElement = el; }, value: title })), h("div", { class: "padding-top-sides-1" }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._addMap, onCalciteCheckboxChange: () => this._handleAddMapChange() }), this._translations.includeMap)), h("div", { class: `padding-top-sides-1 ${graphicsOptionsClass}` }, h("calcite-label", { class: "label-margin-0", layout: "inline" }, h("calcite-checkbox", { checked: this._exportGraphics, onCalciteCheckboxChange: () => this._handleExportGraphicsChange() }), this._translations.listGraphics), h("calcite-icon", { class: "padding-start-1-2 icon", icon: "question", id: "list-graphics-icon", scale: "s" }), h("calcite-popover", { closable: true, label: "", referenceElement: "list-graphics-icon" }, h("span", { class: "tooltip-message" }, this._translations.listGraphicsTip)))));
|
587
|
+
}
|
588
|
+
/**
|
589
|
+
* Toggle the _addMap state variable and update the graphics on the map
|
590
|
+
*
|
591
|
+
* @protected
|
592
|
+
*/
|
593
|
+
_handleAddMapChange() {
|
594
|
+
this._addMap = !this._addMap;
|
595
|
+
this._updateExportGraphics();
|
596
|
+
}
|
597
|
+
/**
|
598
|
+
* Toggle the _exportGraphics state variable and update the graphics on the map
|
599
|
+
*
|
600
|
+
* @protected
|
601
|
+
*/
|
602
|
+
_handleExportGraphicsChange() {
|
603
|
+
this._exportGraphics = !this._exportGraphics;
|
604
|
+
this._updateExportGraphics();
|
605
|
+
}
|
606
|
+
/**
|
607
|
+
* Get the "sketch" or "buffer" graphics layer
|
608
|
+
*
|
609
|
+
* @param type The type of managed layer to fetch "sketch" | "buffer"
|
610
|
+
*
|
611
|
+
* @protected
|
612
|
+
*/
|
613
|
+
_getManagedLayer(type) {
|
614
|
+
let layer;
|
615
|
+
Object.keys(state.managedLayers).some((k) => {
|
616
|
+
const i = this.mapView.map.layers.findIndex((l) => l.title === k);
|
617
|
+
if (state.managedLayers[k] === type) {
|
618
|
+
layer = this.mapView.map.layers.getItemAt(i);
|
619
|
+
return true;
|
620
|
+
}
|
621
|
+
});
|
622
|
+
return layer;
|
623
|
+
}
|
624
|
+
/**
|
625
|
+
* Update the export graphics by adding or removeing them
|
626
|
+
*
|
627
|
+
* @param clear When true the graphics layers will be cleared prior to adding any new graphics, defaults to false
|
628
|
+
*
|
629
|
+
* @protected
|
630
|
+
*/
|
631
|
+
_updateExportGraphics(clear = false) {
|
632
|
+
if (clear || !this._exportGraphics || !this._addMap) {
|
633
|
+
this._removeExportGraphics();
|
634
|
+
}
|
635
|
+
if (this._exportGraphics && this._addMap) {
|
636
|
+
this._addExportGraphics();
|
637
|
+
}
|
638
|
+
}
|
639
|
+
/**
|
640
|
+
* Remove all buffer and sketch graphics
|
641
|
+
*
|
642
|
+
* @protected
|
643
|
+
*/
|
644
|
+
_removeExportGraphics() {
|
645
|
+
const sketchLayer = this._getManagedLayer("sketch");
|
646
|
+
const bufferLayer = this._getManagedLayer("buffer");
|
647
|
+
if (sketchLayer) {
|
648
|
+
sketchLayer.graphics.removeAll();
|
649
|
+
}
|
650
|
+
if (bufferLayer) {
|
651
|
+
bufferLayer.graphics.removeAll();
|
652
|
+
}
|
653
|
+
}
|
654
|
+
/**
|
655
|
+
* Add all buffer and sketch graphics that are flagged for download
|
656
|
+
*
|
657
|
+
* @protected
|
658
|
+
*/
|
659
|
+
_addExportGraphics() {
|
660
|
+
const sketchLayer = this._getManagedLayer("sketch");
|
661
|
+
const bufferLayer = this._getManagedLayer("buffer");
|
662
|
+
this._selectionSets.forEach(ss => {
|
663
|
+
if (ss.download) {
|
664
|
+
if (sketchLayer) {
|
665
|
+
sketchLayer.graphics.add(ss.sketchGraphic);
|
666
|
+
}
|
667
|
+
if (bufferLayer) {
|
668
|
+
const symbol = {
|
669
|
+
type: "simple-fill",
|
670
|
+
color: this.bufferColor,
|
671
|
+
outline: {
|
672
|
+
color: this.bufferOutlineColor,
|
673
|
+
width: 1
|
674
|
+
}
|
675
|
+
};
|
676
|
+
const bufferGraphic = new this.Graphic({
|
677
|
+
geometry: ss.buffer,
|
678
|
+
symbol
|
679
|
+
});
|
680
|
+
bufferLayer.graphics.add(bufferGraphic);
|
681
|
+
}
|
682
|
+
}
|
683
|
+
});
|
579
684
|
}
|
580
685
|
/**
|
581
686
|
* Render the refine page
|
@@ -669,6 +774,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
|
|
669
774
|
isActive = ss.download ? true : isActive;
|
670
775
|
return ss;
|
671
776
|
});
|
777
|
+
this._updateExportGraphics(true);
|
672
778
|
this._downloadActive = isActive;
|
673
779
|
this._fetchingData = true;
|
674
780
|
this._numDuplicates = await this._getNumDuplicates();
|
@@ -939,6 +1045,7 @@ const PublicNotification$1 = /*@__PURE__*/ proxyCustomElement(class PublicNotifi
|
|
939
1045
|
"sketchLineSymbol": [8, "sketch-line-symbol"],
|
940
1046
|
"sketchPointSymbol": [8, "sketch-point-symbol"],
|
941
1047
|
"sketchPolygonSymbol": [8, "sketch-polygon-symbol"],
|
1048
|
+
"_exportGraphics": [32],
|
942
1049
|
"_addMap": [32],
|
943
1050
|
"_addResults": [32],
|
944
1051
|
"_addTitle": [32],
|
@@ -21,8 +21,8 @@ import { c as createStore } from './index4.js';
|
|
21
21
|
* limitations under the License.
|
22
22
|
*/
|
23
23
|
const { state, onChange } = createStore({
|
24
|
-
//
|
25
|
-
managedLayers:
|
24
|
+
// Key Value pair whose Key is the layer name and the Value is the type of layer ("buffer" | "sketch")
|
25
|
+
managedLayers: {},
|
26
26
|
// List of tables added and managed by the component
|
27
27
|
managedTables: [],
|
28
28
|
// Handle[]: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Handles.html#Handle
|
@@ -7,7 +7,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
|
|
7
7
|
import { l as loadModules, g as getLocaleComponentStrings } from './locale-bcbea4ef.js';
|
8
8
|
import { x as setRequestedIcon } from './dom-38c6f027.js';
|
9
9
|
import { f as EDrawMode } from './interfaces-586e863c.js';
|
10
|
-
import { s as state } from './publicNotificationStore-
|
10
|
+
import { s as state } from './publicNotificationStore-223faed2.js';
|
11
11
|
import './esri-loader-1b324844.js';
|
12
12
|
import './_commonjsHelpers-0f74c230.js';
|
13
13
|
import './guid-b75a5f7b.js';
|
@@ -464,7 +464,7 @@ const MapDrawTools = class {
|
|
464
464
|
}
|
465
465
|
else {
|
466
466
|
this._sketchGraphicsLayer = new this.GraphicsLayer({ title, listMode: "hide" });
|
467
|
-
state.managedLayers
|
467
|
+
state.managedLayers[title] = "sketch";
|
468
468
|
this.mapView.map.layers.add(this._sketchGraphicsLayer);
|
469
469
|
}
|
470
470
|
if (this.graphics && this.graphics.length > 0) {
|
@@ -12,7 +12,7 @@ import { o as onToggleOpenCloseComponent } from './openCloseComponent-9f90f493.j
|
|
12
12
|
import { c as connectMessages, s as setUpMessages, d as disconnectMessages, u as updateMessages } from './t9n-436fb2b1.js';
|
13
13
|
import { K as KindIcons } from './resources-88a48c5c.js';
|
14
14
|
import { g as getLocaleComponentStrings, l as loadModules } from './locale-bcbea4ef.js';
|
15
|
-
import { a as getAllLayers } from './mapViewUtils-
|
15
|
+
import { a as getAllLayers } from './mapViewUtils-253178f1.js';
|
16
16
|
import { P as PopupUtils } from './popupUtils-af124b47.js';
|
17
17
|
import './guid-b75a5f7b.js';
|
18
18
|
import './resources-8834f920.js';
|
@@ -664,7 +664,7 @@ const EditCard = class {
|
|
664
664
|
};
|
665
665
|
EditCard.style = editCardCss;
|
666
666
|
|
667
|
-
const infoCardCss = ":host{display:block;--calcite-label-margin-bottom:0}.padding-1-2{padding:0.5rem}.display-none{display:none !important}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.top-border{border-top:1px solid var(--calcite-color-border-1)}.min-width-100{min-width:100px}.width-100{width:100%}.esri-features__container{padding:0.5rem !important;background-color:var(--calcite-color-foreground-1) !important;height:100% !important}.overflow-hidden{overflow:hidden}.height-40{height:40px}.end-border{border-inline-end:1px solid var(--calcite-color-border-1)}.font-bold{font-weight:bold}.visibility-hidden{visibility:hidden;height:0px}.padding-inline-start-1{padding-inline-start:1rem}.border-width-0{border-width:0px}";
|
667
|
+
const infoCardCss = ":host{display:block;--calcite-label-margin-bottom:0}.padding-1-2{padding:0.5rem}.display-none{display:none !important}.display-flex{display:flex}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.feature-node .esri-features__footer{display:none !important}.button-container{justify-content:space-between;align-items:center}.top-border{border-top:1px solid var(--calcite-color-border-1)}.min-width-100{min-width:100px}.width-100{width:100%}.esri-features__container{padding:0.5rem !important;background-color:var(--calcite-color-foreground-1) !important;height:100% !important}.overflow-hidden{overflow:hidden}.height-40{height:40px}.end-border{border-inline-end:1px solid var(--calcite-color-border-1)}.font-bold{font-weight:bold}.visibility-hidden{visibility:hidden;height:0px}.padding-inline-start-1{padding-inline-start:1rem}.border-width-0{border-width:0px}";
|
668
668
|
|
669
669
|
const InfoCard = class {
|
670
670
|
constructor(hostRef) {
|
@@ -787,7 +787,7 @@ const InfoCard = class {
|
|
787
787
|
const id = (_d = (_c = this._features) === null || _c === void 0 ? void 0 : _c.selectedFeature) === null || _d === void 0 ? void 0 : _d.getObjectId();
|
788
788
|
const ids = parseInt(id === null || id === void 0 ? void 0 : id.toString(), 10) > -1 ? [id] : [];
|
789
789
|
const deleteEnabled = ((_e = this._layer) === null || _e === void 0 ? void 0 : _e.editingEnabled) && ((_h = (_g = (_f = this._layer) === null || _f === void 0 ? void 0 : _f.capabilities) === null || _g === void 0 ? void 0 : _g.operations) === null || _h === void 0 ? void 0 : _h.supportsDelete);
|
790
|
-
return (h(Host, null, h("calcite-shell", null, this._getHeader(), h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
|
790
|
+
return (h(Host, null, h("calcite-shell", null, this._getHeader(), h("calcite-loader", { class: loadingClass, label: this._translations.fetchingData }), h("div", { class: "esri-widget feature-node " + featureNodeClass, id: "features-node" }), h("div", { class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
|
791
791
|
h("div", { class: "display-flex top-border padding-1-2" }, h("calcite-button", { appearance: "solid", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), this.isMobile && deleteEnabled ? (h("delete-button", { class: "padding-inline-start-1 width-100", id: "solutions-delete", ids: ids, layer: this._layer, onEditsComplete: () => this._closePopup() })) : undefined, h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-edit" }, h("span", null, this._translations.edit)), this.isMobile ? (h("calcite-tooltip", { label: "", placement: "bottom", "reference-element": "solutions-delete" }, h("span", null, this._translations.delete))) : undefined), !nextBackDisabled && h("div", { class: `display-flex padding-1-2 button-container top-border ${nextBackClass}` }, h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", disabled: nextBackDisabled, 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, h("calcite-action", { icon: "list", onClick: () => this._toggleListView(), scale: "s", text: this._count, textEnabled: true })), h("div", { class: "min-width-100" }, h("calcite-button", { appearance: "outline", disabled: nextBackDisabled, 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("edit-card", { class: editClass, graphicIndex: (_j = this._features) === null || _j === void 0 ? void 0 : _j.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)))));
|
792
792
|
}
|
793
793
|
//--------------------------------------------------------------------------
|
@@ -22,8 +22,8 @@ import { V as Validation } from './Validation-ea480265.js';
|
|
22
22
|
import { d as debounce } from './debounce-229b1a22.js';
|
23
23
|
import { i as isActivationKey } from './key-c83d835f.js';
|
24
24
|
import { g as getLocaleComponentStrings } from './locale-bcbea4ef.js';
|
25
|
-
import {
|
26
|
-
import { s as state } from './publicNotificationStore-
|
25
|
+
import { c as getMapLayerHash, o as getMapTableHash } from './mapViewUtils-253178f1.js';
|
26
|
+
import { s as state } from './publicNotificationStore-223faed2.js';
|
27
27
|
import './resources-8834f920.js';
|
28
28
|
import './browser-d60104bd.js';
|
29
29
|
import './esri-loader-1b324844.js';
|
@@ -2065,7 +2065,7 @@ const MapLayerPicker = class {
|
|
2065
2065
|
_validLayer(id) {
|
2066
2066
|
var _a;
|
2067
2067
|
const name = (_a = this._layerNameHash[id]) === null || _a === void 0 ? void 0 : _a.name;
|
2068
|
-
return name && state.managedLayers.indexOf(name) < 0 && (this.enabledLayerIds.length > 0 ?
|
2068
|
+
return name && Object.keys(state.managedLayers).indexOf(name) < 0 && (this.enabledLayerIds.length > 0 ?
|
2069
2069
|
this.enabledLayerIds.indexOf(id) > -1 : true);
|
2070
2070
|
}
|
2071
2071
|
/**
|