@esri/solutions-components 0.11.22 → 0.11.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/card-manager_3.cjs.entry.js +8 -4
- package/dist/cjs/create-feature_4.cjs.entry.js +21 -10
- package/dist/cjs/create-related-feature_3.cjs.entry.js +25 -19
- package/dist/cjs/crowdsource-manager.cjs.entry.js +3 -2
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +7 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/components/card-manager/card-manager.js +23 -2
- package/dist/collection/components/create-feature/create-feature.css +1 -1
- package/dist/collection/components/create-feature/create-feature.js +28 -3
- package/dist/collection/components/create-related-feature/create-related-feature.css +1 -1
- package/dist/collection/components/create-related-feature/create-related-feature.js +74 -49
- package/dist/collection/components/crowdsource-manager/crowdsource-manager.js +23 -2
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +27 -6
- package/dist/collection/components/edit-card/edit-card.css +1 -1
- package/dist/collection/components/edit-card/edit-card.js +48 -23
- package/dist/collection/components/feature-details/feature-details.js +27 -6
- package/dist/collection/components/info-card/info-card.js +23 -2
- package/dist/collection/components/layer-table/layer-table.js +5 -2
- package/dist/components/card-manager2.js +4 -2
- package/dist/components/create-feature2.js +10 -4
- package/dist/components/create-related-feature2.js +21 -15
- package/dist/components/crowdsource-manager.js +4 -2
- package/dist/components/crowdsource-reporter.js +8 -6
- package/dist/components/edit-card2.js +11 -5
- package/dist/components/feature-details2.js +8 -6
- package/dist/components/info-card2.js +4 -2
- package/dist/components/layer-table2.js +5 -2
- package/dist/esm/card-manager_3.entry.js +8 -4
- package/dist/esm/create-feature_4.entry.js +21 -10
- package/dist/esm/create-related-feature_3.entry.js +25 -19
- package/dist/esm/crowdsource-manager.entry.js +3 -2
- package/dist/esm/crowdsource-reporter.entry.js +7 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/p-2507c685.entry.js +6 -0
- package/dist/solutions-components/p-386b0163.entry.js +6 -0
- package/dist/solutions-components/p-99e00361.entry.js +6 -0
- package/dist/solutions-components/p-a415a60d.entry.js +6 -0
- package/dist/solutions-components/p-b5a102db.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components_commit.txt +6 -6
- package/dist/types/components/card-manager/card-manager.d.ts +4 -0
- package/dist/types/components/create-feature/create-feature.d.ts +4 -0
- package/dist/types/components/create-related-feature/create-related-feature.d.ts +23 -19
- package/dist/types/components/crowdsource-manager/crowdsource-manager.d.ts +4 -0
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +4 -0
- package/dist/types/components/edit-card/edit-card.d.ts +8 -4
- package/dist/types/components/feature-details/feature-details.d.ts +4 -0
- package/dist/types/components/info-card/info-card.d.ts +4 -0
- package/dist/types/components.d.ts +64 -0
- package/package.json +1 -1
- package/dist/solutions-components/p-1ac20964.entry.js +0 -6
- package/dist/solutions-components/p-892b42be.entry.js +0 -6
- package/dist/solutions-components/p-9161beb0.entry.js +0 -6
- package/dist/solutions-components/p-decfd5fc.entry.js +0 -6
- package/dist/solutions-components/p-eba271dd.entry.js +0 -6
@@ -26,6 +26,7 @@ export class CardManager {
|
|
26
26
|
constructor() {
|
27
27
|
this.customInfoText = undefined;
|
28
28
|
this.enableEditGeometry = false;
|
29
|
+
this.enableSnapping = false;
|
29
30
|
this.isMobile = undefined;
|
30
31
|
this.layer = undefined;
|
31
32
|
this.locale = undefined;
|
@@ -141,14 +142,14 @@ export class CardManager {
|
|
141
142
|
const heading = isTable ? this._translations.createRecord : this._translations.createFeature;
|
142
143
|
const guideMsg = this.customInfoText ? this.customInfoText : this.selectingFeatureFromMap ? this._translations.selectFeaturesFromMapToStart : this._translations.selectFeaturesToStart;
|
143
144
|
const showCreateFeatureOrRecordBtn = this.enableCreateFeatures && this.layer?.capabilities?.operations?.supportsAdd;
|
144
|
-
return (h(Host, { key: '
|
145
|
+
return (h(Host, { key: '803f5130e6f4fa0bf97cfdd2776e176786e736cc' }, h("div", { key: '7c0a756f5de5f536b52d2e9f6629593eb3c85781', class: "overflow-auto height-full" }, h("calcite-shell", { key: '9a6366bba429d5c29a5f1c556d6812f44d28ee2c', class: "position-relative " + featuresClass }, h("div", { key: '61cb9f7942eb209e5e0bd751ab4b5ca026086882', class: "position-static z-index-500" }, h("info-card", { key: '0c3b6f958384dab4bc1db2917a88215bafe330b1', enableEditGeometry: this.enableEditGeometry, enableSnapping: this.enableSnapping, graphics: this._graphics, isLoading: this._cardLoading, isMobile: this.isMobile, locale: this.locale, mapView: this.mapView, showCloseBtn: true }))), h("calcite-shell", { key: 'db9233d29cc88ddc6cb023bcf9e9190ecb721214', class: "position-relative " + messageClass }, h("calcite-panel", { key: '0d1c22a3ad3d2d2a56054b2e8609697987b45ca7' }, h("div", { key: 'cc5f7faa934f474ddca2d0ab74fd46dac240cc6f', class: "padding-1" }, h("calcite-notice", { key: '2c2771696892455fcb1ec24d895cd321a84a8f49', icon: this.selectingFeatureFromMap ? "map" : "table", iconFlipRtl: true, open: true }, h("div", { key: '0bbbd13e4e9a7b2240a85b41dbd00fc2a7e39c75', slot: "message" }, guideMsg))), !this.isMobile && showCreateFeatureOrRecordBtn && h("calcite-button", { key: '67bac627f68fc6bcda2b1a8965ab6d7fb12d2e4c', disabled: !this.layer, onClick: () => this._createFeatureBtnClicked(), slot: "footer", width: "full" }, isTable ? this._translations.createRecord : this._translations.createFeature))), h("calcite-shell", { key: 'cd44af48bb05fd6ac41c0d66bdd9e01826ece1a4', class: "position-relative " + createFeatureClass }, h("calcite-flow-item", { key: '648dfdc4fb559ecbf64ee43791e3d9799c346f1a', selected: true }, h("calcite-panel", { key: '855df56ed576e52c94dbe3cfa8f6d57427a37ba2', heading: heading }, h("calcite-action", { key: '156d1b20da3f02de66879531802aa2d2fb99b1ca', class: "back-button hydrated", icon: "chevron-left", onClick: this._backFromCreateFeature.bind(this), scale: "s", slot: "header-actions-start", text: "" }), this.getEditorComponent(), this._showSubmitBtn && h("calcite-button", { key: '9b4556876d579a4f2bd02849737cd55b55f87cbd', appearance: "solid", class: "footer-top-button footer-button", onClick: () => void this._createFeature.submit(), slot: "footer", width: "full" }, this._translations.create)))))));
|
145
146
|
}
|
146
147
|
/**
|
147
148
|
* Returns the editor component for adding feature
|
148
149
|
* @returns Node
|
149
150
|
*/
|
150
151
|
getEditorComponent() {
|
151
|
-
return (h("div", null, this._showCreateFeatureComponent && h("create-feature", { customizeSubmit: true, locale: this.locale, mapView: this.mapView, onDrawComplete: () => { this._showSubmitBtn = true; }, onEditingAttachment: (evt) => { this._showSubmitBtn = !evt.detail; }, onProgressStatus: () => {
|
152
|
+
return (h("div", null, this._showCreateFeatureComponent && h("create-feature", { customizeSubmit: true, enableSnapping: this.enableSnapping, locale: this.locale, mapView: this.mapView, onDrawComplete: () => { this._showSubmitBtn = true; }, onEditingAttachment: (evt) => { this._showSubmitBtn = !evt.detail; }, onProgressStatus: () => {
|
152
153
|
setTimeout(() => {
|
153
154
|
this._isFeatureCreated = false;
|
154
155
|
}, 2000);
|
@@ -265,6 +266,26 @@ export class CardManager {
|
|
265
266
|
"reflect": false,
|
266
267
|
"defaultValue": "false"
|
267
268
|
},
|
269
|
+
"enableSnapping": {
|
270
|
+
"type": "boolean",
|
271
|
+
"mutable": false,
|
272
|
+
"complexType": {
|
273
|
+
"original": "boolean",
|
274
|
+
"resolved": "boolean",
|
275
|
+
"references": {}
|
276
|
+
},
|
277
|
+
"required": false,
|
278
|
+
"optional": false,
|
279
|
+
"docs": {
|
280
|
+
"tags": [],
|
281
|
+
"text": "When true the snapping options will be exposed"
|
282
|
+
},
|
283
|
+
"getter": false,
|
284
|
+
"setter": false,
|
285
|
+
"attribute": "enable-snapping",
|
286
|
+
"reflect": false,
|
287
|
+
"defaultValue": "false"
|
288
|
+
},
|
268
289
|
"isMobile": {
|
269
290
|
"type": "boolean",
|
270
291
|
"mutable": false,
|
@@ -26,6 +26,7 @@ export class CreateFeature {
|
|
26
26
|
constructor() {
|
27
27
|
this.customizeSubmit = false;
|
28
28
|
this.enableSearch = false;
|
29
|
+
this.enableSnapping = false;
|
29
30
|
this.floorLevel = undefined;
|
30
31
|
this.formElements = undefined;
|
31
32
|
this.isMobile = undefined;
|
@@ -291,8 +292,8 @@ export class CreateFeature {
|
|
291
292
|
else if (this._currentPage === 'featureForm') {
|
292
293
|
guidingMsg = this._translations.provideDetailsMsg;
|
293
294
|
}
|
294
|
-
return (h(Fragment, { key: '
|
295
|
-
h("div", { key: '
|
295
|
+
return (h(Fragment, { key: '07a1a08a5cd9d8c439870a2500922fbd6839dac9' }, showGuidingMsg && h("calcite-notice", { key: '5d846812fc38f9ca4e9bd997f5bc519fe8a4f21e', class: "notice-msg", icon: "lightbulb", kind: "success", open: true, ref: el => this._calciteNotice = el }, h("div", { key: '8ad1da020a728e19e5d2f3add15ec7c5a8bbdd9f', slot: "message" }, guidingMsg)), h("calcite-loader", { key: '39a0843ca8b16e60a7468908eb00d08a15703756', class: loaderClass, label: "", scale: "s" }), h("div", { key: '1ce7ea5afc559adc1b0d8d8d60696bcf5783453b', class: featureFormClass, id: "feature-form" }), this.enableSearch &&
|
296
|
+
h("div", { key: 'e2832e4a615051a7d0a6cd29de348ef2d0c65cb9', class: `search-widget ${showSearchWidget} ${featureFormClass}`, id: "search-widget-ref", ref: el => this._searchDiv = el }), h("div", { key: 'a3388a9cf013a7c7155119d12835dc996ec9c947', class: `${mobileMapClass}`, ref: (el) => { this._mapViewContainer = el; } })));
|
296
297
|
}
|
297
298
|
//--------------------------------------------------------------------------
|
298
299
|
//
|
@@ -371,6 +372,9 @@ export class CreateFeature {
|
|
371
372
|
const layerInfos = [];
|
372
373
|
this._container = document.createElement("div");
|
373
374
|
this._container?.classList.add("display-none");
|
375
|
+
if (!this.enableSnapping) {
|
376
|
+
this._container.classList.add("hide-editor-toolbar");
|
377
|
+
}
|
374
378
|
const allMapLayers = await getAllLayers(this._updatedMapView);
|
375
379
|
this._selectedLayer = await getLayerOrTable(this.mapView, this.selectedLayerId);
|
376
380
|
// if layer is selected then only use the layerInfos while initializing the editor widget
|
@@ -390,7 +394,8 @@ export class CreateFeature {
|
|
390
394
|
view: this._updatedMapView,
|
391
395
|
layerInfos: layerInfos,
|
392
396
|
visibleElements: {
|
393
|
-
|
397
|
+
settingsMenu: this.enableSnapping,
|
398
|
+
snappingControls: this.enableSnapping,
|
394
399
|
createFeaturesSection: true,
|
395
400
|
editFeaturesSection: false,
|
396
401
|
flow: false
|
@@ -749,6 +754,26 @@ export class CreateFeature {
|
|
749
754
|
"reflect": false,
|
750
755
|
"defaultValue": "false"
|
751
756
|
},
|
757
|
+
"enableSnapping": {
|
758
|
+
"type": "boolean",
|
759
|
+
"mutable": false,
|
760
|
+
"complexType": {
|
761
|
+
"original": "boolean",
|
762
|
+
"resolved": "boolean",
|
763
|
+
"references": {}
|
764
|
+
},
|
765
|
+
"required": false,
|
766
|
+
"optional": false,
|
767
|
+
"docs": {
|
768
|
+
"tags": [],
|
769
|
+
"text": "When true the snapping options will be exposed"
|
770
|
+
},
|
771
|
+
"getter": false,
|
772
|
+
"setter": false,
|
773
|
+
"attribute": "enable-snapping",
|
774
|
+
"reflect": false,
|
775
|
+
"defaultValue": "false"
|
776
|
+
},
|
752
777
|
"floorLevel": {
|
753
778
|
"type": "string",
|
754
779
|
"mutable": false,
|
@@ -23,12 +23,13 @@ import { loadModules } from "../../utils/loadModules";
|
|
23
23
|
import { getLocaleComponentStrings } from "../../utils/locale";
|
24
24
|
export class CreateRelatedFeature {
|
25
25
|
constructor() {
|
26
|
+
this.customizeSubmit = false;
|
27
|
+
this.enableSnapping = false;
|
26
28
|
this.locale = undefined;
|
27
29
|
this.mapView = undefined;
|
28
|
-
this.table = undefined;
|
29
30
|
this.selectedFeature = undefined;
|
30
|
-
this.customizeSubmit = false;
|
31
31
|
this.showGuidingMsg = true;
|
32
|
+
this.table = undefined;
|
32
33
|
this._editorLoading = false;
|
33
34
|
this._translations = undefined;
|
34
35
|
}
|
@@ -48,23 +49,23 @@ export class CreateRelatedFeature {
|
|
48
49
|
* The Editor constructor
|
49
50
|
*/
|
50
51
|
Editor;
|
51
|
-
/**
|
52
|
-
* esri/widgets/Editor: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html
|
53
|
-
* The Editor instance
|
54
|
-
*/
|
55
|
-
_editor;
|
56
52
|
/**
|
57
53
|
* esri/core/reactiveUtils: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html
|
58
54
|
*/
|
59
55
|
reactiveUtils;
|
56
|
+
/**
|
57
|
+
* boolean: Flag to maintain the add attachment
|
58
|
+
*/
|
59
|
+
_addingAttachment;
|
60
60
|
/**
|
61
61
|
* HTMLDivElement: The node the editor will be added to
|
62
62
|
*/
|
63
63
|
_container;
|
64
64
|
/**
|
65
|
-
|
66
|
-
|
67
|
-
|
65
|
+
* esri/widgets/Editor: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html
|
66
|
+
* The Editor instance
|
67
|
+
*/
|
68
|
+
_editor;
|
68
69
|
/**
|
69
70
|
* boolean: Flag to maintain form submission using submit button
|
70
71
|
*/
|
@@ -172,7 +173,7 @@ export class CreateRelatedFeature {
|
|
172
173
|
}
|
173
174
|
render() {
|
174
175
|
const loaderClass = this._editorLoading ? "" : "display-none";
|
175
|
-
return (h(Fragment, { key: '
|
176
|
+
return (h(Fragment, { key: '5251d18b13ed90499cd960305773b6fb04efd4db' }, this.showGuidingMsg && h("calcite-notice", { key: '9f2902f8dab476734d3a70fad4e5cc7996f721a8', class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, h("div", { key: '650f56b689cde544c96e24a966da7283efcdfcbe', slot: "message" }, this._translations.provideDetailsMsg)), h("calcite-loader", { key: 'be4c67978909e7dcf18fe8dece831b8830dee5d1', class: loaderClass, label: "", scale: "s" })));
|
176
177
|
}
|
177
178
|
/**
|
178
179
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
@@ -198,11 +199,15 @@ export class CreateRelatedFeature {
|
|
198
199
|
}
|
199
200
|
this._container = document.createElement("div");
|
200
201
|
this._container?.classList.add("display-none");
|
202
|
+
if (!this.enableSnapping) {
|
203
|
+
this._container.classList.add("hide-editor-toolbar");
|
204
|
+
}
|
201
205
|
this._editor = new this.Editor({
|
202
206
|
view: this.mapView,
|
203
207
|
visibleElements: {
|
204
208
|
flow: true,
|
205
|
-
|
209
|
+
settingsMenu: this.enableSnapping,
|
210
|
+
snappingControls: this.enableSnapping,
|
206
211
|
},
|
207
212
|
container: this._container
|
208
213
|
});
|
@@ -372,6 +377,46 @@ export class CreateRelatedFeature {
|
|
372
377
|
}
|
373
378
|
static get properties() {
|
374
379
|
return {
|
380
|
+
"customizeSubmit": {
|
381
|
+
"type": "boolean",
|
382
|
+
"mutable": false,
|
383
|
+
"complexType": {
|
384
|
+
"original": "boolean",
|
385
|
+
"resolved": "boolean",
|
386
|
+
"references": {}
|
387
|
+
},
|
388
|
+
"required": false,
|
389
|
+
"optional": true,
|
390
|
+
"docs": {
|
391
|
+
"tags": [],
|
392
|
+
"text": "boolean: Set this to true when have a custom submit button in the app.\r\nThis will hide the header and footer elements of the editor and user needs to execute the submit method manually."
|
393
|
+
},
|
394
|
+
"getter": false,
|
395
|
+
"setter": false,
|
396
|
+
"attribute": "customize-submit",
|
397
|
+
"reflect": false,
|
398
|
+
"defaultValue": "false"
|
399
|
+
},
|
400
|
+
"enableSnapping": {
|
401
|
+
"type": "boolean",
|
402
|
+
"mutable": false,
|
403
|
+
"complexType": {
|
404
|
+
"original": "boolean",
|
405
|
+
"resolved": "boolean",
|
406
|
+
"references": {}
|
407
|
+
},
|
408
|
+
"required": false,
|
409
|
+
"optional": false,
|
410
|
+
"docs": {
|
411
|
+
"tags": [],
|
412
|
+
"text": "When true the snapping options will be exposed"
|
413
|
+
},
|
414
|
+
"getter": false,
|
415
|
+
"setter": false,
|
416
|
+
"attribute": "enable-snapping",
|
417
|
+
"reflect": false,
|
418
|
+
"defaultValue": "false"
|
419
|
+
},
|
375
420
|
"locale": {
|
376
421
|
"type": "string",
|
377
422
|
"mutable": false,
|
@@ -413,28 +458,6 @@ export class CreateRelatedFeature {
|
|
413
458
|
"getter": false,
|
414
459
|
"setter": false
|
415
460
|
},
|
416
|
-
"table": {
|
417
|
-
"type": "unknown",
|
418
|
-
"mutable": false,
|
419
|
-
"complexType": {
|
420
|
-
"original": "__esri.FeatureLayer",
|
421
|
-
"resolved": "FeatureLayer",
|
422
|
-
"references": {
|
423
|
-
"___esri": {
|
424
|
-
"location": "global",
|
425
|
-
"id": "global::___esri"
|
426
|
-
}
|
427
|
-
}
|
428
|
-
},
|
429
|
-
"required": false,
|
430
|
-
"optional": false,
|
431
|
-
"docs": {
|
432
|
-
"tags": [],
|
433
|
-
"text": "__esri.FeatureLayer: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html"
|
434
|
-
},
|
435
|
-
"getter": false,
|
436
|
-
"setter": false
|
437
|
-
},
|
438
461
|
"selectedFeature": {
|
439
462
|
"type": "unknown",
|
440
463
|
"mutable": false,
|
@@ -457,7 +480,7 @@ export class CreateRelatedFeature {
|
|
457
480
|
"getter": false,
|
458
481
|
"setter": false
|
459
482
|
},
|
460
|
-
"
|
483
|
+
"showGuidingMsg": {
|
461
484
|
"type": "boolean",
|
462
485
|
"mutable": false,
|
463
486
|
"complexType": {
|
@@ -469,33 +492,35 @@ export class CreateRelatedFeature {
|
|
469
492
|
"optional": true,
|
470
493
|
"docs": {
|
471
494
|
"tags": [],
|
472
|
-
"text": "boolean:
|
495
|
+
"text": "boolean: When true the notice message should be shown"
|
473
496
|
},
|
474
497
|
"getter": false,
|
475
498
|
"setter": false,
|
476
|
-
"attribute": "
|
499
|
+
"attribute": "show-guiding-msg",
|
477
500
|
"reflect": false,
|
478
|
-
"defaultValue": "
|
501
|
+
"defaultValue": "true"
|
479
502
|
},
|
480
|
-
"
|
481
|
-
"type": "
|
503
|
+
"table": {
|
504
|
+
"type": "unknown",
|
482
505
|
"mutable": false,
|
483
506
|
"complexType": {
|
484
|
-
"original": "
|
485
|
-
"resolved": "
|
486
|
-
"references": {
|
507
|
+
"original": "__esri.FeatureLayer",
|
508
|
+
"resolved": "FeatureLayer",
|
509
|
+
"references": {
|
510
|
+
"___esri": {
|
511
|
+
"location": "global",
|
512
|
+
"id": "global::___esri"
|
513
|
+
}
|
514
|
+
}
|
487
515
|
},
|
488
516
|
"required": false,
|
489
|
-
"optional":
|
517
|
+
"optional": false,
|
490
518
|
"docs": {
|
491
519
|
"tags": [],
|
492
|
-
"text": "
|
520
|
+
"text": "__esri.FeatureLayer: https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html"
|
493
521
|
},
|
494
522
|
"getter": false,
|
495
|
-
"setter": false
|
496
|
-
"attribute": "show-guiding-msg",
|
497
|
-
"reflect": false,
|
498
|
-
"defaultValue": "true"
|
523
|
+
"setter": false
|
499
524
|
}
|
500
525
|
};
|
501
526
|
}
|
@@ -48,6 +48,7 @@ export class CrowdsourceManager {
|
|
48
48
|
this.enableLegend = true;
|
49
49
|
this.enableSearch = true;
|
50
50
|
this.enableShare = false;
|
51
|
+
this.enableSnapping = true;
|
51
52
|
this.enableZoom = true;
|
52
53
|
this.locale = undefined;
|
53
54
|
this.mapInfos = [];
|
@@ -277,7 +278,7 @@ export class CrowdsourceManager {
|
|
277
278
|
render() {
|
278
279
|
// only avoid border when we have a header color that is not white
|
279
280
|
const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
|
280
|
-
return (h(Host, { key: '
|
281
|
+
return (h(Host, { key: '1d30ec71032cffd61c016cc846f59a8e437253de' }, h("calcite-shell", { key: '836f6e8cde7c3e5b177803b607e26a41bdea42a3', class: "position-relative" }, h("calcite-panel", { key: '0c968ccf6d19aa754b56dc5a3714e3b6f44dcac9', class: `width-full height-full ${borderClass}`, loading: this._isLoading }, this._getBody(this._layoutMode, this._panelOpen, this._hideTable)), this._getFooter()), this._filterModal(), this._deleteModal()));
|
281
282
|
}
|
282
283
|
/**
|
283
284
|
* Called after each render
|
@@ -508,7 +509,7 @@ export class CrowdsourceManager {
|
|
508
509
|
const isTableLayout = this.appLayout === 'tableView';
|
509
510
|
const cardManagerHeight = isTableLayout && this.mapInfos?.length > 1 ? "adjusted-height-100-51" : isMapLayout || isTableLayout ? "height-full" : (this._numSelected > 0 && !this._isMobile) ? "height-50" : !this._showInformationHeader ? "adjusted-height-50_25" : !this._isPortraitMobile ? "height-50" : "height-full";
|
510
511
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
511
|
-
return (h("div", { class: `width-50 height-full ${themeClass}` }, h("card-manager", { class: `${cardManagerHeight} width-full`, customInfoText: this.customInfoText, enableCreateFeatures: this._enableCreateFeatures && !this._isMobile, enableEditGeometry: this?._mapInfo?.enableEditGeometry, isMobile: this._isPortraitMobile, layer: this._layer, locale: this.locale, mapView: this?._mapView, onBackFromCreateWorkFlow: () => {
|
512
|
+
return (h("div", { class: `width-50 height-full ${themeClass}` }, h("card-manager", { class: `${cardManagerHeight} width-full`, customInfoText: this.customInfoText, enableCreateFeatures: this._enableCreateFeatures && !this._isMobile, enableEditGeometry: this?._mapInfo?.enableEditGeometry, enableSnapping: this.enableSnapping, isMobile: this._isPortraitMobile, layer: this._layer, locale: this.locale, mapView: this?._mapView, onBackFromCreateWorkFlow: () => {
|
512
513
|
this._showInformationHeader = true;
|
513
514
|
}, onCreateWorkFlowStarted: () => {
|
514
515
|
this.appLayout = this._layer.isTable ? "tableView" : "mapView";
|
@@ -1268,6 +1269,26 @@ export class CrowdsourceManager {
|
|
1268
1269
|
"reflect": false,
|
1269
1270
|
"defaultValue": "false"
|
1270
1271
|
},
|
1272
|
+
"enableSnapping": {
|
1273
|
+
"type": "boolean",
|
1274
|
+
"mutable": false,
|
1275
|
+
"complexType": {
|
1276
|
+
"original": "boolean",
|
1277
|
+
"resolved": "boolean",
|
1278
|
+
"references": {}
|
1279
|
+
},
|
1280
|
+
"required": false,
|
1281
|
+
"optional": false,
|
1282
|
+
"docs": {
|
1283
|
+
"tags": [],
|
1284
|
+
"text": "When true the snapping options will be exposed"
|
1285
|
+
},
|
1286
|
+
"getter": false,
|
1287
|
+
"setter": false,
|
1288
|
+
"attribute": "enable-snapping",
|
1289
|
+
"reflect": false,
|
1290
|
+
"defaultValue": "true"
|
1291
|
+
},
|
1271
1292
|
"enableZoom": {
|
1272
1293
|
"type": "boolean",
|
1273
1294
|
"mutable": false,
|
@@ -37,6 +37,7 @@ export class CrowdsourceReporter {
|
|
37
37
|
this.enableLogin = undefined;
|
38
38
|
this.enableNewReports = undefined;
|
39
39
|
this.enableSearch = true;
|
40
|
+
this.enableSnapping = false;
|
40
41
|
this.enableZoom = true;
|
41
42
|
this.isMobile = undefined;
|
42
43
|
this.layerExpressions = [];
|
@@ -390,7 +391,7 @@ export class CrowdsourceReporter {
|
|
390
391
|
*/
|
391
392
|
render() {
|
392
393
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
393
|
-
return (h(Host, { key: '
|
394
|
+
return (h(Host, { key: '11cf5f3a1674460c6ab9d2979d621417431e7130' }, this._reportSubmitted && h("calcite-alert", { key: 'ab40068608e235cbbeda293d62f501c1bcc2a123', "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: '91e436fa80c41457465f0816b66e205793f5a91d', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && h("calcite-alert", { key: '6dbcd02898e6328f343af94985f069d8261dce1f', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, h("div", { key: 'fc97e5f02b5241af076243b7fa8bb19f29c3dad6', slot: "title" }, this._translations.error), h("div", { key: '9583f6bd62f2a36c50e8309a353dd634300aa835', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && h("calcite-alert", { key: '0d216fc75481b249ee63468b2c0145ed7f09d09e', "auto-close": true, class: 'report-submitted ' + themeClass, icon: "check-circle", kind: "success", label: "", onCalciteAlertClose: () => { this._commentSubmitted = false; }, open: true, placement: "top" }, h("div", { key: '700a788d9f0f12200bee0625576571a8c352a6a1', slot: "message" }, this.commentSubmittedMessage || this._translations.commentSubmittedMsg)), this._addingCommentFailed && h("calcite-alert", { key: '28ef0e56c42d3d366e33374368461eba9bb5e896', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, h("div", { key: '90e8757ee650b3f55c456d0fd56a45dac6df263e', slot: "title" }, this._translations.error), h("div", { key: 'b819d951be7340af388767b40e423a279b33ea85', slot: "message" }, this._translations.addingCommentFailedMsg)), h("div", { key: '167d0cb576feaaa77279110ab40df63e1a6146ae' }, h("calcite-shell", { key: 'b4d83790aa3a47a9c336821c54bc3e0fa1d9e308', "content-behind": true }, this._getReporter())), this.isMobile && this.filterModal()));
|
394
395
|
}
|
395
396
|
//--------------------------------------------------------------------------
|
396
397
|
//
|
@@ -574,7 +575,7 @@ export class CrowdsourceReporter {
|
|
574
575
|
* @protected
|
575
576
|
*/
|
576
577
|
getFeatureCreateFlowItem() {
|
577
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromCreateFeaturePanel.bind(this), selected: this._flowItems[this._flowItems.length - 1] === "feature-create" }, this._showSubmitCancelButton && h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", onClick: this.onCreateFeatureSubmitButtonClick.bind(this), width: "full" }, this._translations.submit), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromCreateFeaturePanel.bind(this), width: "full" }, this._translations.cancel)), h("calcite-panel", { "full-height": true, "full-width": true }, h("div", { class: "progress-bar" }, h("calcite-progress", { type: "determinate", value: this._updatedProgressBarStatus })), h("create-feature", { customizeSubmit: true, enableSearch: true, floorLevel: this.floorLevel, formElements: this._formElements.find(elm => elm.id === this._selectedLayerId), isMobile: this.isMobile, locale: this.locale, mapView: this.mapView, onDrawComplete: this.onFormReady.bind(this), onEditingAttachment: this.showSubmitCancelButton.bind(this), onFail: this.createFeatureFailed.bind(this), onModeChanged: this.backFromCreateFeaturePanel.bind(this), onProgressStatus: this.updatedProgressStatus.bind(this), onSuccess: this.onReportSubmitted.bind(this), ref: el => this._createFeature = el, searchConfiguration: this.searchConfiguration, selectedLayerId: this._selectedLayerId, submitNewReportsMessage: this.submitNewReportsMessage }))));
|
578
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, onCalciteFlowItemBack: this.backFromCreateFeaturePanel.bind(this), selected: this._flowItems[this._flowItems.length - 1] === "feature-create" }, this._showSubmitCancelButton && h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", onClick: this.onCreateFeatureSubmitButtonClick.bind(this), width: "full" }, this._translations.submit), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromCreateFeaturePanel.bind(this), width: "full" }, this._translations.cancel)), h("calcite-panel", { "full-height": true, "full-width": true }, h("div", { class: "progress-bar" }, h("calcite-progress", { type: "determinate", value: this._updatedProgressBarStatus })), h("create-feature", { customizeSubmit: true, enableSearch: true, enableSnapping: this.enableSnapping, floorLevel: this.floorLevel, formElements: this._formElements.find(elm => elm.id === this._selectedLayerId), isMobile: this.isMobile, locale: this.locale, mapView: this.mapView, onDrawComplete: this.onFormReady.bind(this), onEditingAttachment: this.showSubmitCancelButton.bind(this), onFail: this.createFeatureFailed.bind(this), onModeChanged: this.backFromCreateFeaturePanel.bind(this), onProgressStatus: this.updatedProgressStatus.bind(this), onSuccess: this.onReportSubmitted.bind(this), ref: el => this._createFeature = el, searchConfiguration: this.searchConfiguration, selectedLayerId: this._selectedLayerId, submitNewReportsMessage: this.submitNewReportsMessage }))));
|
578
579
|
}
|
579
580
|
/**
|
580
581
|
* Update the progress bar status when editor panel changes
|
@@ -742,7 +743,7 @@ export class CrowdsourceReporter {
|
|
742
743
|
* @protected
|
743
744
|
*/
|
744
745
|
async layerListLoaded(evt) {
|
745
|
-
// Check if user is present on the layer panel or if first component is feature list then only allow to store the non-reporting valid layers to avoid the feature visbility issue on map
|
746
|
+
// Check if user is present on the layer panel or if first component is feature list then only allow to store the non-reporting valid layers to avoid the feature visbility issue on map
|
746
747
|
const presentOnLayerListPanel = this._layerList && this._flowItems[this._flowItems.length - 1] === "layer-list" || this._flowItems[0] === "feature-list";
|
747
748
|
if (presentOnLayerListPanel) {
|
748
749
|
const layersListed = evt.detail;
|
@@ -942,7 +943,7 @@ export class CrowdsourceReporter {
|
|
942
943
|
*/
|
943
944
|
getFeatureDetailsFlowItem() {
|
944
945
|
const showCommentBtn = this._getLayersConfig(this._selectedLayerId)?.comment && this._selectedLayer.relationships.length > 0 && this._relatedTable;
|
945
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this), selected: this._flowItems[this._flowItems.length - 1] === "feature-details" }, 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, locale: this.locale, mapView: this.mapView, onAddComment: this.showAddCommentsPanel.bind(this), onCommentSelect: this.onCommentSelectFromList.bind(this), onFeatureSelectionChange: this.selectionChanged.bind(this), onLikeOrDislikeClicked: () => { void this._featureList.refresh(true); }, onLoadingStatus: (evt) => void this.updatingFeatureDetails(evt.detail), ref: el => this._featureDetails = el, reportingOptions: this.reportingOptions, showFullCommentTitle: this.showFullCommentTitle, showUserImageInCommentsList: this.showUserImageInCommentsList }), showCommentBtn &&
|
946
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._selectedLayerName, loading: this._showLoadingIndicator, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this), selected: this._flowItems[this._flowItems.length - 1] === "feature-details" }, 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', enableSnapping: this.enableSnapping, graphics: this._selectedFeature, layerItemsHash: this._layerItemsHash, locale: this.locale, mapView: this.mapView, onAddComment: this.showAddCommentsPanel.bind(this), onCommentSelect: this.onCommentSelectFromList.bind(this), onFeatureSelectionChange: this.selectionChanged.bind(this), onLikeOrDislikeClicked: () => { void this._featureList.refresh(true); }, onLoadingStatus: (evt) => void this.updatingFeatureDetails(evt.detail), ref: el => this._featureDetails = el, reportingOptions: this.reportingOptions, showFullCommentTitle: this.showFullCommentTitle, showUserImageInCommentsList: this.showUserImageInCommentsList }), showCommentBtn &&
|
946
947
|
h("calcite-button", { appearance: "solid", onClick: this.showAddCommentsPanel.bind(this), slot: "footer", width: "full" }, this.commentButtonText || this._translations.comment))));
|
947
948
|
}
|
948
949
|
/**
|
@@ -958,14 +959,14 @@ export class CrowdsourceReporter {
|
|
958
959
|
* @returns Node
|
959
960
|
*/
|
960
961
|
getCommentDetailsFlowItem() {
|
961
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._relatedTable.title, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this), selected: this._flowItems[this._flowItems.length - 1] === "comment-details" }, this.isMobile && this.getActionToExpandCollapsePanel(), h("calcite-panel", { "full-height": true }, h("info-card", { allowEditing: false, graphics: this._selectedRelatedFeature, highlightEnabled: false, isLoading: false, isMobile: false, locale: this.locale, mapView: this.mapView, paginationEnabled: false }))));
|
962
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._relatedTable.title, onCalciteFlowItemBack: this.backFromSelectedPanel.bind(this), selected: this._flowItems[this._flowItems.length - 1] === "comment-details" }, this.isMobile && this.getActionToExpandCollapsePanel(), h("calcite-panel", { "full-height": true }, h("info-card", { allowEditing: false, enableSnapping: this.enableSnapping, graphics: this._selectedRelatedFeature, highlightEnabled: false, isLoading: false, isMobile: false, locale: this.locale, mapView: this.mapView, paginationEnabled: false }))));
|
962
963
|
}
|
963
964
|
/**
|
964
965
|
* Returns the calcite-flow item for add comment
|
965
966
|
* @returns Node
|
966
967
|
*/
|
967
968
|
getAddCommentFlowItem() {
|
968
|
-
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._relatedTable.title, onCalciteFlowItemBack: this.backFromCreateRelatedFeaturePanel.bind(this), selected: this._flowItems[this._flowItems.length - 1] === "add-comment" }, this.isMobile && this.getActionToExpandCollapsePanel(), h("div", { class: "width-full", slot: "footer" }, this._showSubmitCancelButton && h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", onClick: this.onCreateRelatedFeatureSubmitButtonClick.bind(this), width: "full" }, this._translations.submit), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromCreateRelatedFeaturePanel.bind(this), width: "full" }, this._translations.cancel))), h("calcite-panel", null, h("create-related-feature", { customizeSubmit: true, locale: this.locale, mapView: this.mapView, onFail: this.addCommentFailed.bind(this), onFormReady: this.onFormReady.bind(this), onIsActionPending: this.showSubmitCancelButton.bind(this), onSuccess: this.onCommentSubmitted.bind(this), ref: el => this._createRelatedFeature = el, selectedFeature: this._currentFeature, table: this._relatedTable }))));
|
969
|
+
return (h("calcite-flow-item", { collapsed: this.isMobile && this._sidePanelCollapsed, heading: this._relatedTable.title, onCalciteFlowItemBack: this.backFromCreateRelatedFeaturePanel.bind(this), selected: this._flowItems[this._flowItems.length - 1] === "add-comment" }, this.isMobile && this.getActionToExpandCollapsePanel(), h("div", { class: "width-full", slot: "footer" }, this._showSubmitCancelButton && h("div", { class: "width-full", slot: "footer" }, h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", onClick: this.onCreateRelatedFeatureSubmitButtonClick.bind(this), width: "full" }, this._translations.submit), h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromCreateRelatedFeaturePanel.bind(this), width: "full" }, this._translations.cancel))), h("calcite-panel", null, h("create-related-feature", { customizeSubmit: true, enableSnapping: this.enableSnapping, locale: this.locale, mapView: this.mapView, onFail: this.addCommentFailed.bind(this), onFormReady: this.onFormReady.bind(this), onIsActionPending: this.showSubmitCancelButton.bind(this), onSuccess: this.onCommentSubmitted.bind(this), ref: el => this._createRelatedFeature = el, selectedFeature: this._currentFeature, table: this._relatedTable }))));
|
969
970
|
}
|
970
971
|
/**
|
971
972
|
* Sets the selected features and updates the first feature as the current selected feature
|
@@ -1680,6 +1681,26 @@ export class CrowdsourceReporter {
|
|
1680
1681
|
"reflect": false,
|
1681
1682
|
"defaultValue": "true"
|
1682
1683
|
},
|
1684
|
+
"enableSnapping": {
|
1685
|
+
"type": "boolean",
|
1686
|
+
"mutable": false,
|
1687
|
+
"complexType": {
|
1688
|
+
"original": "boolean",
|
1689
|
+
"resolved": "boolean",
|
1690
|
+
"references": {}
|
1691
|
+
},
|
1692
|
+
"required": false,
|
1693
|
+
"optional": false,
|
1694
|
+
"docs": {
|
1695
|
+
"tags": [],
|
1696
|
+
"text": "When true the snapping options will be exposed"
|
1697
|
+
},
|
1698
|
+
"getter": false,
|
1699
|
+
"setter": false,
|
1700
|
+
"attribute": "enable-snapping",
|
1701
|
+
"reflect": false,
|
1702
|
+
"defaultValue": "false"
|
1703
|
+
},
|
1683
1704
|
"enableZoom": {
|
1684
1705
|
"type": "boolean",
|
1685
1706
|
"mutable": false,
|