@esri/solutions-components 0.10.14 → 0.10.16
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/calcite-flow_6.cjs.entry.js +3 -4
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +4 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +11 -1
- package/dist/cjs/public-notification.cjs.entry.js +4 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/create-feature/create-feature.js +3 -4
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +38 -2
- package/dist/collection/components/map-select-tools/map-select-tools.js +47 -1
- package/dist/collection/components/public-notification/public-notification.js +40 -2
- package/dist/collection/demos/crowdsource-reporter.html +63 -113
- package/dist/components/create-feature2.js +3 -4
- package/dist/components/crowdsource-reporter.js +6 -2
- package/dist/components/map-select-tools2.js +13 -1
- package/dist/components/public-notification.js +6 -2
- package/dist/esm/calcite-flow_6.entry.js +3 -4
- package/dist/esm/crowdsource-reporter.entry.js +4 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +11 -1
- package/dist/esm/public-notification.entry.js +4 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-reporter.html +63 -113
- package/dist/solutions-components/p-2737e44e.entry.js +17 -0
- package/dist/solutions-components/p-5907d17d.entry.js +6 -0
- package/dist/solutions-components/p-c5e05351.entry.js +6 -0
- package/dist/solutions-components/p-f0a23f46.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +8 -0
- package/dist/types/components/map-select-tools/map-select-tools.d.ts +8 -0
- package/dist/types/components/public-notification/public-notification.d.ts +8 -0
- package/dist/types/components.d.ts +48 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-31f7dd8e.entry.js +0 -6
- package/dist/solutions-components/p-40e305b4.entry.js +0 -17
- package/dist/solutions-components/p-4d44410b.entry.js +0 -6
- package/dist/solutions-components/p-abd3e579.entry.js +0 -6
@@ -232,7 +232,7 @@ export class CreateFeature {
|
|
232
232
|
const loaderClass = this._editorLoading ? "" : "display-none";
|
233
233
|
const featureFormClass = this._editorLoading ? "display-none" : "";
|
234
234
|
const mobileMapClass = this.isMobile ? "show-map" : "display-none";
|
235
|
-
return (h(Fragment, { key: '
|
235
|
+
return (h(Fragment, { key: 'aac8fd8fe4ba5d7fb67a2b74a86147e053c1b0b8' }, h("calcite-loader", { key: 'e440bd2e0f4cf5acf4fd6941ada508c8ac5a0380', class: loaderClass, label: "", scale: "s" }), h("div", { key: '055a4e4b30b1fe24e0735257fa54fa9845cbaf2f', class: featureFormClass, id: "feature-form" }), h("div", { key: '342847f06ba99ad3c9693026bc83a8ac18b6c05f', class: `search-widget ${showSearchWidget} ${featureFormClass}`, id: "search-widget-ref" }), h("div", { key: '0acb837b4604d8d590bbfbcd738a3e09a099c362', class: `${mobileMapClass}`, ref: (el) => { this._mapViewContainer = el; } })));
|
236
236
|
}
|
237
237
|
//--------------------------------------------------------------------------
|
238
238
|
//
|
@@ -350,7 +350,7 @@ export class CreateFeature {
|
|
350
350
|
this._editor.viewModel.addHandles(attachmentHandle);
|
351
351
|
//Add handle to watch featureTemplatesViewModel ready state and then start the creation
|
352
352
|
const handle = this.reactiveUtils.watch(() => this._editor.viewModel.featureTemplatesViewModel.state, (state) => {
|
353
|
-
if (state === 'ready') {
|
353
|
+
if (state === 'ready' && this._editor.viewModel?.activeWorkflow?.type !== "create-features") {
|
354
354
|
this.progressStatus.emit(0.5);
|
355
355
|
this._editorLoading = true;
|
356
356
|
}
|
@@ -371,7 +371,6 @@ export class CreateFeature {
|
|
371
371
|
const createFeatureHandle = this.reactiveUtils.watch(() => this._editor.viewModel.state, (state) => {
|
372
372
|
if (state === 'creating-features') {
|
373
373
|
this._mapViewContainer?.classList?.replace("hide-map", "show-map");
|
374
|
-
this._editorLoading = true;
|
375
374
|
this._showSearchWidget = true;
|
376
375
|
}
|
377
376
|
});
|
@@ -382,7 +381,7 @@ export class CreateFeature {
|
|
382
381
|
* @protected
|
383
382
|
*/
|
384
383
|
async startCreate() {
|
385
|
-
// hides the header elements on template picker page
|
384
|
+
// hides the header elements on template picker page
|
386
385
|
await this.hideEditorsElements();
|
387
386
|
return new Promise((resolve, reject) => {
|
388
387
|
if (this._editor.viewModel.featureTemplatesViewModel.items?.length) {
|
@@ -26,6 +26,8 @@ import { queryFeaturesByID } from "../../utils/queryUtils";
|
|
26
26
|
export class CrowdsourceReporter {
|
27
27
|
constructor() {
|
28
28
|
this.center = undefined;
|
29
|
+
this.commentButtonText = undefined;
|
30
|
+
this.commentSubmittedMessage = undefined;
|
29
31
|
this.defaultWebmap = "";
|
30
32
|
this.description = undefined;
|
31
33
|
this.enableAnonymousAccess = undefined;
|
@@ -298,7 +300,7 @@ export class CrowdsourceReporter {
|
|
298
300
|
*/
|
299
301
|
render() {
|
300
302
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
301
|
-
return (h(Host, { key: '
|
303
|
+
return (h(Host, { key: '712bd9d383d112b8e86832adc5026780ed5b6a21' }, this._reportSubmitted && h("calcite-alert", { key: '4f355784741e72c1cdd13b6e36d77ff05680e147', "auto-close": true, class: themeClass + " report-submitted-msg", icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '1a529422b45de78ff1a97ff71a616d39e33736fe', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { key: '02722111a22c5c9da25a20cd77daae0d16c4829e', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { key: '94725b928eb5200f8b114d565f1eef551b1f8472', slot: "title" }, this._translations.error), h("div", { key: '362ab693984413822e85b50945cbff5633798dec', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && h("calcite-alert", { key: '74b1287b952b7e9d9406b8cc08ce85fa6ee124b2', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '1ebed2836d95fc7d3dc79e26acb60645b6c8300f', slot: "message" }, this.commentSubmittedMessage || this._translations.commentSubmittedMsg)), this._addingCommentFailed && h("calcite-alert", { key: '62428d3d20b754200c6390880b7067d262008d3d', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, h("div", { key: '78593f816ca80583b062b90fc796dd9e54ed7344', slot: "title" }, this._translations.error), h("div", { key: '5d45971a4f8c26f34e87e2985e9252932e6d90ac', slot: "message" }, this._translations.addingCommentFailedMsg)), h("div", { key: '0a7d3e35e62a9955c8cb16b6e1f4435c11b8b11d' }, h("calcite-shell", { key: 'e8f9b57f6906a3e9c8960cdf722db2dc253dd454', "content-behind": true }, this._getReporter()))));
|
302
304
|
}
|
303
305
|
//--------------------------------------------------------------------------
|
304
306
|
//
|
@@ -800,7 +802,7 @@ export class CrowdsourceReporter {
|
|
800
802
|
getFeatureDetailsFlowItem() {
|
801
803
|
const showCommentBtn = this._getLayersConfig(this._selectedLayerId)?.comment && this._selectedLayer.relationships.length > 0;
|
802
804
|
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("instant-apps-social-share", { autoUpdateShareUrl: false, class: "share-node", embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, removePopoverOffset: true, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), this._selectedFeature.length > 1 && this.getFeaturesPagination(), h("calcite-panel", null, h("feature-details", { class: 'full-height', graphics: this._selectedFeature, layerItemsHash: this._layerItemsHash, mapView: this.mapView, onCommentSelect: this.onCommentSelectFromList.bind(this), onFeatureSelectionChange: this.selectionChanged.bind(this), onLoadingStatus: (evt) => void this.updatingFeatureDetails(evt.detail), ref: el => this._featureDetails = el, reportingOptions: this.reportingOptions, showUserImageInCommentsList: this.showUserImageInCommentsList }), showCommentBtn &&
|
803
|
-
h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this._translations.comment))));
|
805
|
+
h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this.commentButtonText || this._translations.comment))));
|
804
806
|
}
|
805
807
|
/**
|
806
808
|
* Returns the pagination for the multiple features
|
@@ -1192,6 +1194,40 @@ export class CrowdsourceReporter {
|
|
1192
1194
|
"attribute": "center",
|
1193
1195
|
"reflect": false
|
1194
1196
|
},
|
1197
|
+
"commentButtonText": {
|
1198
|
+
"type": "string",
|
1199
|
+
"mutable": false,
|
1200
|
+
"complexType": {
|
1201
|
+
"original": "string",
|
1202
|
+
"resolved": "string",
|
1203
|
+
"references": {}
|
1204
|
+
},
|
1205
|
+
"required": false,
|
1206
|
+
"optional": false,
|
1207
|
+
"docs": {
|
1208
|
+
"tags": [],
|
1209
|
+
"text": "string: User configurable text to display for the comment button"
|
1210
|
+
},
|
1211
|
+
"attribute": "comment-button-text",
|
1212
|
+
"reflect": false
|
1213
|
+
},
|
1214
|
+
"commentSubmittedMessage": {
|
1215
|
+
"type": "string",
|
1216
|
+
"mutable": false,
|
1217
|
+
"complexType": {
|
1218
|
+
"original": "string",
|
1219
|
+
"resolved": "string",
|
1220
|
+
"references": {}
|
1221
|
+
},
|
1222
|
+
"required": false,
|
1223
|
+
"optional": false,
|
1224
|
+
"docs": {
|
1225
|
+
"tags": [],
|
1226
|
+
"text": "string: User configurable nessage to display when a comment is submitted"
|
1227
|
+
},
|
1228
|
+
"attribute": "comment-submitted-message",
|
1229
|
+
"reflect": false
|
1230
|
+
},
|
1195
1231
|
"defaultWebmap": {
|
1196
1232
|
"type": "string",
|
1197
1233
|
"mutable": false,
|
@@ -32,7 +32,9 @@ export class MapSelectTools {
|
|
32
32
|
this.customLabelEnabled = undefined;
|
33
33
|
this.enabledLayerIds = [];
|
34
34
|
this.enableLayerFeatures = true;
|
35
|
+
this.enableLayerFeaturesOnLoad = false;
|
35
36
|
this.enableSearchDistance = true;
|
37
|
+
this.enableSearchDistanceOnLoad = false;
|
36
38
|
this.enableSketchTools = true;
|
37
39
|
this.defaultBufferDistance = undefined;
|
38
40
|
this.defaultBufferUnit = undefined;
|
@@ -296,12 +298,16 @@ export class MapSelectTools {
|
|
296
298
|
render() {
|
297
299
|
const mapToolsClass = this.enableSketchTools ? "" : "display-none";
|
298
300
|
const mapToolsContainerClass = this.enableSketchTools ? "padding-top-1" : "";
|
299
|
-
return (h(Host, { key: '
|
301
|
+
return (h(Host, { key: '14b27786176d25c3d36df5fa71a7d15c84febf6a' }, this._getMapLayerPicker(), h("div", { key: 'f0ec5ecbcc252ac74e19e1c76ca9a8fcf23d7375', class: "border-bottom" }), h("div", { key: 'a396efbe43a9b23af12a46bfb6bdc422be700c51', class: "padding-top-sides-1" }, h("div", { key: '3ce18d6baeb866edccb3b3f5461329303d1a7340', class: "search-widget", ref: (el) => { this._searchElement = el; } }), h("div", { key: 'b7acabfd7addac9184b488f918fadb09099074d6', class: mapToolsContainerClass }, h("map-draw-tools", { key: '6eda64fb64bbac651d8bbaada867b7112edb30e1', active: true, class: mapToolsClass, editGraphicsEnabled: !this._useLayerFeaturesEnabled, graphics: this._graphics, mapView: this.mapView, onSketchGraphicsChange: (evt) => void this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, ref: (el) => { this._drawTools = el; } })), this.enableSearchDistance ? this._getBufferOptions() : undefined, this.enableLayerFeatures ? this._getUseLayerFeaturesOptions() : undefined, this._getNumSelected()), h("div", { key: 'fe122716ac0c9df8fb84115aa2e2ac994766b360', class: "border-bottom" }), this._getNameInput()));
|
300
302
|
}
|
301
303
|
/**
|
302
304
|
* Renders the buffer tools component.
|
303
305
|
*/
|
304
306
|
_getBufferOptions() {
|
307
|
+
if (this.enableSearchDistanceOnLoad) {
|
308
|
+
this._searchDistanceEnabled = true;
|
309
|
+
this.enableSearchDistanceOnLoad = false;
|
310
|
+
}
|
305
311
|
const showBufferToolsClass = this._searchDistanceEnabled ? "search-distance" : "div-not-visible";
|
306
312
|
const bufferDistance = typeof this.selectionSet?.distance === "number" ? this.selectionSet.distance : this.defaultBufferDistance;
|
307
313
|
return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.searchDistance, h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: !(this.locale?.toLowerCase() === "he"), icon: "question", id: "search-distance-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "search-distance-icon" }, h("span", { class: "tooltip-message" }, this._translations.useSearchDistanceTootip)), h("calcite-switch", { checked: this._searchDistanceEnabled, onCalciteSwitchChange: () => this._searchDistanceEnabled = !this._searchDistanceEnabled })), h("div", { class: showBufferToolsClass }, h("buffer-tools", { disabled: !this._searchDistanceEnabled, distance: bufferDistance, geometries: this.geometries, onBufferComplete: (evt) => void this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: this.selectionSet?.unit || this.defaultBufferUnit }))));
|
@@ -310,6 +316,10 @@ export class MapSelectTools {
|
|
310
316
|
* Renders the map layer picker component.
|
311
317
|
*/
|
312
318
|
_getUseLayerFeaturesOptions() {
|
319
|
+
if (this.enableLayerFeaturesOnLoad) {
|
320
|
+
this._useLayerFeaturesEnabled = true;
|
321
|
+
this.enableLayerFeaturesOnLoad = false;
|
322
|
+
}
|
313
323
|
const useLayerFeaturesClass = this._useLayerFeaturesEnabled ? "div-visible" : "div-not-visible";
|
314
324
|
return (h("div", null, h("div", { class: "padding-top-1 display-flex" }, h("calcite-label", { class: "label-margin-0 w-100", layout: "inline-space-between" }, h("div", { class: "tooltip-container" }, this._translations.useLayerFeatures, h("calcite-icon", { class: "padding-start-1-2 icon", flipRtl: !(this.locale?.toLowerCase() === "he"), icon: "question", id: "use-layer-features-icon", scale: "s" }))), h("calcite-popover", { closable: true, label: "", referenceElement: "use-layer-features-icon" }, h("span", { class: "tooltip-message" }, this._translations.useLayerFeaturesTooltip)), h("calcite-switch", { checked: this._useLayerFeaturesEnabled, onCalciteSwitchChange: () => { this._useLayerFeaturesEnabledChanged(); } })), h("div", { class: useLayerFeaturesClass + " padding-top-1" }, h("map-layer-picker", { enabledLayerIds: this.selectionLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => { void this._layerSelectionChange(evt); }, selectedIds: this.layerViews.map(l => l.layer.id), showTables: false }))));
|
315
325
|
}
|
@@ -1001,6 +1011,24 @@ export class MapSelectTools {
|
|
1001
1011
|
"reflect": false,
|
1002
1012
|
"defaultValue": "true"
|
1003
1013
|
},
|
1014
|
+
"enableLayerFeaturesOnLoad": {
|
1015
|
+
"type": "boolean",
|
1016
|
+
"mutable": false,
|
1017
|
+
"complexType": {
|
1018
|
+
"original": "boolean",
|
1019
|
+
"resolved": "boolean",
|
1020
|
+
"references": {}
|
1021
|
+
},
|
1022
|
+
"required": false,
|
1023
|
+
"optional": false,
|
1024
|
+
"docs": {
|
1025
|
+
"tags": [],
|
1026
|
+
"text": "boolean: When true the use features from a layer options will be enabled when the component loads"
|
1027
|
+
},
|
1028
|
+
"attribute": "enable-layer-features-on-load",
|
1029
|
+
"reflect": false,
|
1030
|
+
"defaultValue": "false"
|
1031
|
+
},
|
1004
1032
|
"enableSearchDistance": {
|
1005
1033
|
"type": "boolean",
|
1006
1034
|
"mutable": false,
|
@@ -1019,6 +1047,24 @@ export class MapSelectTools {
|
|
1019
1047
|
"reflect": false,
|
1020
1048
|
"defaultValue": "true"
|
1021
1049
|
},
|
1050
|
+
"enableSearchDistanceOnLoad": {
|
1051
|
+
"type": "boolean",
|
1052
|
+
"mutable": false,
|
1053
|
+
"complexType": {
|
1054
|
+
"original": "boolean",
|
1055
|
+
"resolved": "boolean",
|
1056
|
+
"references": {}
|
1057
|
+
},
|
1058
|
+
"required": false,
|
1059
|
+
"optional": false,
|
1060
|
+
"docs": {
|
1061
|
+
"tags": [],
|
1062
|
+
"text": "boolean: When true the serach distance options will be enabled when the component loads"
|
1063
|
+
},
|
1064
|
+
"attribute": "enable-search-distance-on-load",
|
1065
|
+
"reflect": false,
|
1066
|
+
"defaultValue": "false"
|
1067
|
+
},
|
1022
1068
|
"enableSketchTools": {
|
1023
1069
|
"type": "boolean",
|
1024
1070
|
"mutable": false,
|
@@ -37,7 +37,9 @@ export class PublicNotification {
|
|
37
37
|
this.defaultExportTitle = "";
|
38
38
|
this.defaultNumLabelsPerPage = 6;
|
39
39
|
this.enableLayerFeatures = true;
|
40
|
+
this.enableLayerFeaturesOnLoad = true;
|
40
41
|
this.enableSearchDistance = true;
|
42
|
+
this.enableSearchDistanceOnLoad = true;
|
41
43
|
this.enableSketchTools = true;
|
42
44
|
this.featureEffect = undefined;
|
43
45
|
this.featureHighlightEnabled = undefined;
|
@@ -263,7 +265,7 @@ export class PublicNotification {
|
|
263
265
|
*/
|
264
266
|
render() {
|
265
267
|
const headerSlot = this._isMobile ? "footer" : "header";
|
266
|
-
return (h(Host, { key: '
|
268
|
+
return (h(Host, { key: '3ba355821879dc79890507bca0adcd1e2a2e32af' }, h("calcite-shell", { key: 'b6f08e69cc7581f1273297bfba743944d18a7054' }, h("calcite-action-bar", { key: '2ed5932e3506153451a8aa6ba9aa531524ef7c82', class: "border-bottom-1 action-bar-size", "expand-disabled": true, layout: "horizontal", slot: headerSlot }, this._getActionGroup("list-check", EPageType.LIST, this._translations.myLists), this.showRefineSelection ? this._getActionGroup("test-data", EPageType.REFINE, this._translations.refineSelection) : null, this._getActionGroup("export", EPageType.EXPORT, this._translations.export)), this._getPage(this._pageType))));
|
267
269
|
}
|
268
270
|
/**
|
269
271
|
* StencilJS: Called once just after the component is first loaded.
|
@@ -600,7 +602,7 @@ export class PublicNotification {
|
|
600
602
|
*/
|
601
603
|
_getSelectPage() {
|
602
604
|
const noticeText = this._translations.selectSearchTip;
|
603
|
-
return (h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull, true), this._getNotice(noticeText, "padding-1", "word-wrap-anywhere"), h("div", null, h("map-select-tools", { bufferColor: this.bufferColor, bufferOutlineColor: this.bufferOutlineColor, class: "font-bold", customLabelEnabled: this.customLabelEnabled, defaultBufferDistance: this.defaultBufferDistance, defaultBufferUnit: this.defaultBufferUnit, enableLayerFeatures: this.enableLayerFeatures, enableSearchDistance: this.enableSearchDistance, enableSketchTools: this.enableSketchTools, enabledLayerIds: this.addresseeLayerIds, isUpdate: !!this._activeSelection, locale: this.locale, mapView: this.mapView, noResultText: this.noResultText, onSelectionSetChange: (evt) => this._updateForSelection(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this._searchConfiguration, selectionLayerIds: this.selectionLayerIds, selectionSet: this._activeSelection, sketchLineSymbol: this.sketchLineSymbol, sketchPointSymbol: this.sketchPointSymbol, sketchPolygonSymbol: this.sketchPolygonSymbol })), this._getPageNavButtons(this._translations.done, this._numSelected === 0, () => { void this._saveSelection(); }, this._translations.cancel, false, () => { void this._home(); })));
|
605
|
+
return (h("calcite-panel", null, this._getLabel(this._translations.stepTwoFull, true), this._getNotice(noticeText, "padding-1", "word-wrap-anywhere"), h("div", null, h("map-select-tools", { bufferColor: this.bufferColor, bufferOutlineColor: this.bufferOutlineColor, class: "font-bold", customLabelEnabled: this.customLabelEnabled, defaultBufferDistance: this.defaultBufferDistance, defaultBufferUnit: this.defaultBufferUnit, enableLayerFeatures: this.enableLayerFeatures, enableLayerFeaturesOnLoad: this.enableLayerFeaturesOnLoad, enableSearchDistance: this.enableSearchDistance, enableSearchDistanceOnLoad: this.enableSearchDistanceOnLoad, enableSketchTools: this.enableSketchTools, enabledLayerIds: this.addresseeLayerIds, isUpdate: !!this._activeSelection, locale: this.locale, mapView: this.mapView, noResultText: this.noResultText, onSelectionSetChange: (evt) => this._updateForSelection(evt), ref: (el) => { this._selectTools = el; }, searchConfiguration: this._searchConfiguration, selectionLayerIds: this.selectionLayerIds, selectionSet: this._activeSelection, sketchLineSymbol: this.sketchLineSymbol, sketchPointSymbol: this.sketchPointSymbol, sketchPolygonSymbol: this.sketchPolygonSymbol })), this._getPageNavButtons(this._translations.done, this._numSelected === 0, () => { void this._saveSelection(); }, this._translations.cancel, false, () => { void this._home(); })));
|
604
606
|
}
|
605
607
|
/**
|
606
608
|
* Create the main download page that has the shared aspects of both PDF and CSV
|
@@ -1236,6 +1238,24 @@ export class PublicNotification {
|
|
1236
1238
|
"reflect": false,
|
1237
1239
|
"defaultValue": "true"
|
1238
1240
|
},
|
1241
|
+
"enableLayerFeaturesOnLoad": {
|
1242
|
+
"type": "boolean",
|
1243
|
+
"mutable": false,
|
1244
|
+
"complexType": {
|
1245
|
+
"original": "boolean",
|
1246
|
+
"resolved": "boolean",
|
1247
|
+
"references": {}
|
1248
|
+
},
|
1249
|
+
"required": false,
|
1250
|
+
"optional": false,
|
1251
|
+
"docs": {
|
1252
|
+
"tags": [],
|
1253
|
+
"text": "boolean: When true the use features from a layer options will be enabled when the component loads"
|
1254
|
+
},
|
1255
|
+
"attribute": "enable-layer-features-on-load",
|
1256
|
+
"reflect": false,
|
1257
|
+
"defaultValue": "true"
|
1258
|
+
},
|
1239
1259
|
"enableSearchDistance": {
|
1240
1260
|
"type": "boolean",
|
1241
1261
|
"mutable": false,
|
@@ -1254,6 +1274,24 @@ export class PublicNotification {
|
|
1254
1274
|
"reflect": false,
|
1255
1275
|
"defaultValue": "true"
|
1256
1276
|
},
|
1277
|
+
"enableSearchDistanceOnLoad": {
|
1278
|
+
"type": "boolean",
|
1279
|
+
"mutable": false,
|
1280
|
+
"complexType": {
|
1281
|
+
"original": "boolean",
|
1282
|
+
"resolved": "boolean",
|
1283
|
+
"references": {}
|
1284
|
+
},
|
1285
|
+
"required": false,
|
1286
|
+
"optional": false,
|
1287
|
+
"docs": {
|
1288
|
+
"tags": [],
|
1289
|
+
"text": "boolean: When true the serach distance options will be enabled when the component loads"
|
1290
|
+
},
|
1291
|
+
"attribute": "enable-search-distance-on-load",
|
1292
|
+
"reflect": false,
|
1293
|
+
"defaultValue": "true"
|
1294
|
+
},
|
1257
1295
|
"enableSketchTools": {
|
1258
1296
|
"type": "boolean",
|
1259
1297
|
"mutable": false,
|
@@ -73,7 +73,7 @@
|
|
73
73
|
top: calc(100% - 100px);
|
74
74
|
height: 100px;
|
75
75
|
}
|
76
|
-
|
76
|
+
|
77
77
|
.map-collapsed {
|
78
78
|
height: 100%;
|
79
79
|
top: 0;
|
@@ -83,12 +83,12 @@
|
|
83
83
|
}
|
84
84
|
</style>
|
85
85
|
|
86
|
-
<link rel="stylesheet" href="https://jsdev.arcgis.com/4.
|
86
|
+
<link rel="stylesheet" href="https://jsdev.arcgis.com/4.31/esri/themes/light/main.css"/>
|
87
87
|
<link rel="stylesheet" href="https://webapps-cdn.esri.com/CDN/fonts/v1.4.1/fonts.css" />
|
88
88
|
<link rel="stylesheet" href="../solutions-components.css" type="text/css">
|
89
89
|
<link rel="stylesheet" type="text/css" href="https://js.arcgis.com/calcite-components/2.8.2/calcite.css" />
|
90
90
|
|
91
|
-
<script src="https://jsdev.arcgis.com/4.
|
91
|
+
<script src="https://jsdev.arcgis.com/4.31/"></script>
|
92
92
|
<script type="module" src="../solutions-components.esm.js"></script>
|
93
93
|
|
94
94
|
<script>
|
@@ -136,7 +136,7 @@
|
|
136
136
|
// Set the locale before the JSAPI loads
|
137
137
|
esriConfig.locale = locale;
|
138
138
|
demo.lang = locale;
|
139
|
-
|
139
|
+
|
140
140
|
//update the portalUrl if found in urlParams
|
141
141
|
//esriConfig.portalUrl = "https://solutions.mapsdevext.arcgis.com";
|
142
142
|
if (portal) {
|
@@ -151,8 +151,8 @@
|
|
151
151
|
//id: "dda88d905a6748a5ab46bea5be795f33" // screening layers
|
152
152
|
//id: "b5bdcb1e5d684dd3b21a2d44b8e4f928" //Popup content + like dislike
|
153
153
|
//id: "d399ec39959a4aac8617ae4f05dd6785" //Arcade
|
154
|
-
|
155
|
-
id: "ae6d5d1936e84ce7adde44c7a7908846" //like dislike
|
154
|
+
id: "4bb6641b18e94cfb9d895ed37b13418a" //Attachments
|
155
|
+
//id: "ae6d5d1936e84ce7adde44c7a7908846" //like dislike
|
156
156
|
// id: "ce3dec81bf714d3bb71da9691ab686d1" //Filter
|
157
157
|
}
|
158
158
|
const webMap = new WebMap({
|
@@ -182,125 +182,75 @@
|
|
182
182
|
demo.enableNewReports = true;
|
183
183
|
demo.theme = "light";
|
184
184
|
demo.reportSubmittedMessage = "Thank you! Your request was successfully submitted";
|
185
|
-
|
185
|
+
|
186
186
|
//Set the zoomScale to be used when zooming to single point feature
|
187
187
|
//demo.zoomToScale = 139596221; //World
|
188
188
|
//demo.zoomToScale = 33800278;//Country
|
189
189
|
//demo.zoomToScale = 4291772;//States
|
190
190
|
demo.zoomToScale = 96610;//City
|
191
191
|
//demo.zoomToScale = 3495; //Building
|
192
|
-
|
192
|
+
|
193
193
|
//Set filter config
|
194
|
-
demo.layerExpressions = [
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
];
|
194
|
+
// demo.layerExpressions = [
|
195
|
+
// {
|
196
|
+
// id: "Requests_681",
|
197
|
+
// title: "Requests",
|
198
|
+
// operator: " AND ",
|
199
|
+
// expressions: [
|
200
|
+
// {
|
201
|
+
// definitionExpression: "OBJECTID > 690",
|
202
|
+
// id: 1701793260225,
|
203
|
+
// index: 0,
|
204
|
+
// name: "greater than 690",
|
205
|
+
// active: false
|
206
|
+
// },
|
207
|
+
// {
|
208
|
+
// id: 1654881457794,
|
209
|
+
// name: 'status',
|
210
|
+
// type: 'string',
|
211
|
+
// field: 'status'
|
212
|
+
// }
|
213
|
+
// ]
|
214
|
+
// },{
|
215
|
+
// id: "18f056682a4-layer-12",
|
216
|
+
// title: "PopUp with date in title",
|
217
|
+
// operator: " AND ",
|
218
|
+
// expressions: [
|
219
|
+
// {
|
220
|
+
// definitionExpression: "shrt > 0",
|
221
|
+
// id: 1901793260225,
|
222
|
+
// index: 0,
|
223
|
+
// name: "Like greater than 0",
|
224
|
+
// active: false
|
225
|
+
// }
|
226
|
+
// ]
|
227
|
+
// }
|
228
|
+
// ];
|
229
229
|
//Set the reporting layer options, layers from this object with reporting set to true will only be shown in layer list
|
230
|
-
//if all the layers from map should be considered for reporting then pass true for each layer
|
230
|
+
//if all the layers from map should be considered for reporting then pass true for each layer
|
231
231
|
demo.reportingOptions = {
|
232
|
-
"
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
dislike: false
|
238
|
-
dislikeField: "Dislike_field",
|
239
|
-
visible: false
|
240
|
-
},
|
241
|
-
"18cdb191817-layer-5": {
|
242
|
-
reporting: true,
|
243
|
-
comment: false,
|
244
|
-
like: true,
|
245
|
-
likeField: "Like_field",
|
246
|
-
dislike: true,
|
247
|
-
dislikeField: "Dislike_field",
|
248
|
-
visible: false
|
232
|
+
"19055a4633a-layer-11": {
|
233
|
+
"visible": true,
|
234
|
+
"reporting": true,
|
235
|
+
"comment": true,
|
236
|
+
"like": false,
|
237
|
+
"dislike": false
|
249
238
|
},
|
250
|
-
"
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
dislike: false
|
256
|
-
dislikeField: "dislike_field",
|
257
|
-
visible: true
|
239
|
+
"19055a2a831-layer-7": {
|
240
|
+
"visible": true,
|
241
|
+
"reporting": true,
|
242
|
+
"comment": false,
|
243
|
+
"like": false,
|
244
|
+
"dislike": false
|
258
245
|
},
|
259
|
-
"
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
dislike:
|
265
|
-
dislikeField: "dislike_field",
|
266
|
-
visible: true
|
267
|
-
},
|
268
|
-
"18f2a1562a7-layer-4": {
|
269
|
-
reporting: true,
|
270
|
-
comment: true,
|
271
|
-
like: true,
|
272
|
-
likeField: "like_field",
|
273
|
-
dislike: true,
|
274
|
-
dislikeField: "dislike_field",
|
275
|
-
visible: true
|
276
|
-
},
|
277
|
-
"18f2a1562a7-layer-5": {
|
278
|
-
reporting: false,
|
279
|
-
comment: true,
|
280
|
-
like: true,
|
281
|
-
likeField: "like_field",
|
282
|
-
dislike: true,
|
283
|
-
dislikeField: "dislike_field",
|
284
|
-
visible: true
|
285
|
-
},
|
286
|
-
"18f2a1562a8-layer-6": {
|
287
|
-
reporting: true,
|
288
|
-
comment: true,
|
289
|
-
like: true,
|
290
|
-
likeField: "like_field",
|
291
|
-
dislike: true,
|
292
|
-
dislikeField: "dislike_field",
|
293
|
-
visible: true
|
294
|
-
},
|
295
|
-
"18f2a1562a8-layer-7": {
|
296
|
-
reporting: true,
|
297
|
-
comment: true,
|
298
|
-
like: true,
|
299
|
-
likeField: "like_field",
|
300
|
-
dislike: true,
|
301
|
-
dislikeField: "dislike_field"
|
246
|
+
"19055a2a735-layer-3": {
|
247
|
+
"visible": true,
|
248
|
+
"reporting": true,
|
249
|
+
"comment": false,
|
250
|
+
"like": false,
|
251
|
+
"dislike": false
|
302
252
|
}
|
303
|
-
}
|
253
|
+
};
|
304
254
|
//Select reporting layers -
|
305
255
|
//demo.layers = ['SE_field_mapping_9688', 'SE_field_mapping_5784', 'SE_field_mapping_1853']; //Se mapping
|
306
256
|
//demo.layers = ['Three_Layers_nested_4042', 'SE_sort_2889', 'SE_sort_756']; //screening layers
|
@@ -225,7 +225,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
225
225
|
const loaderClass = this._editorLoading ? "" : "display-none";
|
226
226
|
const featureFormClass = this._editorLoading ? "display-none" : "";
|
227
227
|
const mobileMapClass = this.isMobile ? "show-map" : "display-none";
|
228
|
-
return (h(Fragment, { key: '
|
228
|
+
return (h(Fragment, { key: 'aac8fd8fe4ba5d7fb67a2b74a86147e053c1b0b8' }, h("calcite-loader", { key: 'e440bd2e0f4cf5acf4fd6941ada508c8ac5a0380', class: loaderClass, label: "", scale: "s" }), h("div", { key: '055a4e4b30b1fe24e0735257fa54fa9845cbaf2f', class: featureFormClass, id: "feature-form" }), h("div", { key: '342847f06ba99ad3c9693026bc83a8ac18b6c05f', class: `search-widget ${showSearchWidget} ${featureFormClass}`, id: "search-widget-ref" }), h("div", { key: '0acb837b4604d8d590bbfbcd738a3e09a099c362', class: `${mobileMapClass}`, ref: (el) => { this._mapViewContainer = el; } })));
|
229
229
|
}
|
230
230
|
//--------------------------------------------------------------------------
|
231
231
|
//
|
@@ -343,7 +343,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
343
343
|
this._editor.viewModel.addHandles(attachmentHandle);
|
344
344
|
//Add handle to watch featureTemplatesViewModel ready state and then start the creation
|
345
345
|
const handle = this.reactiveUtils.watch(() => this._editor.viewModel.featureTemplatesViewModel.state, (state) => {
|
346
|
-
if (state === 'ready') {
|
346
|
+
if (state === 'ready' && this._editor.viewModel?.activeWorkflow?.type !== "create-features") {
|
347
347
|
this.progressStatus.emit(0.5);
|
348
348
|
this._editorLoading = true;
|
349
349
|
}
|
@@ -364,7 +364,6 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
364
364
|
const createFeatureHandle = this.reactiveUtils.watch(() => this._editor.viewModel.state, (state) => {
|
365
365
|
if (state === 'creating-features') {
|
366
366
|
this._mapViewContainer?.classList?.replace("hide-map", "show-map");
|
367
|
-
this._editorLoading = true;
|
368
367
|
this._showSearchWidget = true;
|
369
368
|
}
|
370
369
|
});
|
@@ -375,7 +374,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
375
374
|
* @protected
|
376
375
|
*/
|
377
376
|
async startCreate() {
|
378
|
-
// hides the header elements on template picker page
|
377
|
+
// hides the header elements on template picker page
|
379
378
|
await this.hideEditorsElements();
|
380
379
|
return new Promise((resolve, reject) => {
|
381
380
|
if (this._editor.viewModel.featureTemplatesViewModel.items?.length) {
|
@@ -65,6 +65,8 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
65
65
|
this.__registerHost();
|
66
66
|
this.togglePanel = createEvent(this, "togglePanel", 7);
|
67
67
|
this.center = undefined;
|
68
|
+
this.commentButtonText = undefined;
|
69
|
+
this.commentSubmittedMessage = undefined;
|
68
70
|
this.defaultWebmap = "";
|
69
71
|
this.description = undefined;
|
70
72
|
this.enableAnonymousAccess = undefined;
|
@@ -332,7 +334,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
332
334
|
*/
|
333
335
|
render() {
|
334
336
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
335
|
-
return (h(Host, { key: '
|
337
|
+
return (h(Host, { key: '712bd9d383d112b8e86832adc5026780ed5b6a21' }, this._reportSubmitted && h("calcite-alert", { key: '4f355784741e72c1cdd13b6e36d77ff05680e147', "auto-close": true, class: themeClass + " report-submitted-msg", icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._reportSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '1a529422b45de78ff1a97ff71a616d39e33736fe', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { key: '02722111a22c5c9da25a20cd77daae0d16c4829e', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { key: '94725b928eb5200f8b114d565f1eef551b1f8472', slot: "title" }, this._translations.error), h("div", { key: '362ab693984413822e85b50945cbff5633798dec', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && h("calcite-alert", { key: '74b1287b952b7e9d9406b8cc08ce85fa6ee124b2', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '1ebed2836d95fc7d3dc79e26acb60645b6c8300f', slot: "message" }, this.commentSubmittedMessage || this._translations.commentSubmittedMsg)), this._addingCommentFailed && h("calcite-alert", { key: '62428d3d20b754200c6390880b7067d262008d3d', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, h("div", { key: '78593f816ca80583b062b90fc796dd9e54ed7344', slot: "title" }, this._translations.error), h("div", { key: '5d45971a4f8c26f34e87e2985e9252932e6d90ac', slot: "message" }, this._translations.addingCommentFailedMsg)), h("div", { key: '0a7d3e35e62a9955c8cb16b6e1f4435c11b8b11d' }, h("calcite-shell", { key: 'e8f9b57f6906a3e9c8960cdf722db2dc253dd454', "content-behind": true }, this._getReporter()))));
|
336
338
|
}
|
337
339
|
//--------------------------------------------------------------------------
|
338
340
|
//
|
@@ -834,7 +836,7 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
834
836
|
getFeatureDetailsFlowItem() {
|
835
837
|
const showCommentBtn = this._getLayersConfig(this._selectedLayerId)?.comment && this._selectedLayer.relationships.length > 0;
|
836
838
|
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this) }, this.isMobile && this.getActionToExpandCollapsePanel(), h("instant-apps-social-share", { autoUpdateShareUrl: false, class: "share-node", embed: false, popoverButtonIconScale: "s", ref: el => this._shareNode = el, removePopoverOffset: true, scale: "m", shareButtonColor: "neutral", shareButtonType: "action", slot: "header-actions-end", socialMedia: true, view: this.mapView }), this._selectedFeature.length > 1 && this.getFeaturesPagination(), h("calcite-panel", null, h("feature-details", { class: 'full-height', graphics: this._selectedFeature, layerItemsHash: this._layerItemsHash, mapView: this.mapView, onCommentSelect: this.onCommentSelectFromList.bind(this), onFeatureSelectionChange: this.selectionChanged.bind(this), onLoadingStatus: (evt) => void this.updatingFeatureDetails(evt.detail), ref: el => this._featureDetails = el, reportingOptions: this.reportingOptions, showUserImageInCommentsList: this.showUserImageInCommentsList }), showCommentBtn &&
|
837
|
-
h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this._translations.comment))));
|
839
|
+
h("calcite-button", { appearance: "solid", onClick: () => this._flowItems = [...this._flowItems, "add-comment"], slot: "footer", width: "full" }, this.commentButtonText || this._translations.comment))));
|
838
840
|
}
|
839
841
|
/**
|
840
842
|
* Returns the pagination for the multiple features
|
@@ -1204,6 +1206,8 @@ const CrowdsourceReporter$1 = /*@__PURE__*/ proxyCustomElement(class Crowdsource
|
|
1204
1206
|
static get style() { return CrowdsourceReporterStyle0; }
|
1205
1207
|
}, [0, "crowdsource-reporter", {
|
1206
1208
|
"center": [1],
|
1209
|
+
"commentButtonText": [1, "comment-button-text"],
|
1210
|
+
"commentSubmittedMessage": [1, "comment-submitted-message"],
|
1207
1211
|
"defaultWebmap": [1, "default-webmap"],
|
1208
1212
|
"description": [1],
|
1209
1213
|
"enableAnonymousAccess": [4, "enable-anonymous-access"],
|