@esri/solutions-components 0.8.8 → 0.8.9
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 +3 -1
- package/dist/assets/t9n/crowdsource-reporter/resources_en.json +3 -1
- package/dist/cjs/{calcite-action-menu_2.cjs.entry.js → calcite-action-menu_3.cjs.entry.js} +114 -7
- package/dist/cjs/calcite-alert_4.cjs.entry.js +46 -5
- package/dist/cjs/{calcite-input-date-picker_3.cjs.entry.js → calcite-block_5.cjs.entry.js} +691 -13
- package/dist/cjs/{calcite-combobox_5.cjs.entry.js → calcite-combobox_3.cjs.entry.js} +876 -844
- package/dist/cjs/calcite-dropdown_4.cjs.entry.js +1023 -0
- package/dist/cjs/{calcite-flow_5.cjs.entry.js → calcite-flow_6.cjs.entry.js} +327 -2
- package/dist/cjs/card-manager_3.cjs.entry.js +5 -5
- package/dist/cjs/crowdsource-manager.cjs.entry.js +1 -1
- package/dist/cjs/crowdsource-reporter.cjs.entry.js +122 -21
- package/dist/cjs/{downloadUtils-8b05d7cc.js → downloadUtils-dc349b1a.js} +2 -2
- package/dist/cjs/{index.es-e7587227.js → index.es-1830a1e6.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-select-tools_3.cjs.entry.js +8 -8
- package/dist/cjs/{mapViewUtils-3e0fa457.js → mapViewUtils-9dc05308.js} +11 -5
- package/dist/cjs/public-notification.cjs.entry.js +2 -2
- package/dist/cjs/solutions-components.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/create-feature/create-feature.js +18 -0
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.css +16 -0
- package/dist/collection/components/crowdsource-reporter/crowdsource-reporter.js +155 -35
- package/dist/collection/components/feature-details/feature-details.css +18 -0
- package/dist/collection/components/feature-details/feature-details.js +500 -0
- package/dist/collection/components/feature-details/test/feature-details.e2e.js +14 -0
- package/dist/collection/components/feature-details/test/feature-details.spec.js +22 -0
- package/dist/collection/components/feature-list/feature-list.js +14 -1
- package/dist/collection/components/info-card/info-card.css +15 -5
- package/dist/collection/components/info-card/info-card.js +178 -5
- package/dist/collection/components/layer-table/layer-table.js +2 -2
- package/dist/collection/components/map-card/map-card.js +1 -1
- package/dist/collection/components/map-select-tools/map-select-tools.js +5 -5
- package/dist/collection/components/refine-selection/refine-selection.js +1 -1
- package/dist/collection/demos/crowdsource-reporter.html +115 -1
- package/dist/collection/utils/mapViewUtils.js +11 -5
- package/dist/collection/utils/mapViewUtils.ts +13 -5
- package/dist/components/create-feature2.js +4 -0
- package/dist/components/crowdsource-reporter.js +270 -81
- package/dist/components/feature-details.d.ts +11 -0
- package/dist/components/feature-details.js +11 -0
- package/dist/components/feature-details2.js +449 -0
- package/dist/components/feature-list2.js +14 -1
- package/dist/components/info-card2.js +53 -5
- package/dist/components/layer-table2.js +2 -2
- package/dist/components/map-card2.js +1 -1
- package/dist/components/map-select-tools2.js +5 -5
- package/dist/components/mapViewUtils.js +11 -5
- package/dist/components/refine-selection2.js +1 -1
- package/dist/esm/{calcite-action-menu_2.entry.js → calcite-action-menu_3.entry.js} +118 -12
- package/dist/esm/calcite-alert_4.entry.js +46 -5
- package/dist/esm/{calcite-input-date-picker_3.entry.js → calcite-block_5.entry.js} +688 -12
- package/dist/esm/{calcite-combobox_5.entry.js → calcite-combobox_3.entry.js} +878 -844
- package/dist/esm/calcite-date-picker-day_3.entry.js +1 -1
- package/dist/esm/calcite-dropdown_4.entry.js +1016 -0
- package/dist/esm/{calcite-flow_5.entry.js → calcite-flow_6.entry.js} +327 -3
- package/dist/esm/card-manager_3.entry.js +5 -5
- package/dist/esm/crowdsource-manager.entry.js +1 -1
- package/dist/esm/crowdsource-reporter.entry.js +122 -21
- package/dist/esm/{date-5630530d.js → date-0c026a8b.js} +1 -1
- package/dist/esm/{downloadUtils-0c1e4d7b.js → downloadUtils-df4f21f6.js} +2 -2
- package/dist/esm/{index.es-286e3cfa.js → index.es-904fb846.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-select-tools_3.entry.js +8 -8
- package/dist/esm/{mapViewUtils-253178f1.js → mapViewUtils-2ec19fb0.js} +11 -5
- package/dist/esm/public-notification.entry.js +2 -2
- package/dist/esm/solutions-components.js +1 -1
- package/dist/solutions-components/demos/crowdsource-reporter.html +115 -1
- package/dist/solutions-components/{p-813fd8a4.entry.js → p-29f518fd.entry.js} +2 -2
- package/dist/solutions-components/{p-13ca3b00.entry.js → p-452fd697.entry.js} +1 -1
- package/dist/solutions-components/p-511b1c91.entry.js +23 -0
- package/dist/solutions-components/p-577efb16.js +36 -0
- package/dist/solutions-components/{p-94de9279.js → p-5817d78c.js} +1 -1
- package/dist/solutions-components/p-602cd811.entry.js +17 -0
- package/dist/solutions-components/{p-15f9624a.entry.js → p-6557b703.entry.js} +1 -1
- package/dist/solutions-components/p-7269c49b.entry.js +6 -0
- package/dist/solutions-components/p-760bd17e.entry.js +6 -0
- package/dist/solutions-components/p-95fea07a.entry.js +17 -0
- package/dist/solutions-components/{p-212b02e7.js → p-ae4d86e8.js} +1 -1
- package/dist/solutions-components/{p-038fcd93.entry.js → p-c273ab7a.entry.js} +1 -1
- package/dist/solutions-components/p-d742b915.entry.js +29 -0
- package/dist/solutions-components/p-dfad61a8.entry.js +24 -0
- package/dist/solutions-components/{p-331b5d1e.js → p-fca434c8.js} +2 -2
- package/dist/solutions-components/p-fd82a00f.entry.js +6 -0
- package/dist/solutions-components/solutions-components.esm.js +1 -1
- package/dist/solutions-components/utils/mapViewUtils.ts +13 -5
- package/dist/types/components/create-feature/create-feature.d.ts +4 -4
- package/dist/types/components/crowdsource-reporter/crowdsource-reporter.d.ts +91 -10
- package/dist/types/components/feature-details/feature-details.d.ts +151 -0
- package/dist/types/components/feature-list/feature-list.d.ts +6 -0
- package/dist/types/components/info-card/info-card.d.ts +33 -1
- package/dist/types/components.d.ts +129 -12
- package/dist/types/preact.d.ts +6 -1
- package/dist/types/utils/mapViewUtils.d.ts +5 -3
- package/package.json +1 -1
- package/dist/cjs/calcite-block_2.cjs.entry.js +0 -652
- package/dist/cjs/calcite-graph_2.cjs.entry.js +0 -1055
- package/dist/cjs/calcite-scrim.cjs.entry.js +0 -125
- package/dist/cjs/utils-7bc7f595.js +0 -64
- package/dist/esm/calcite-block_2.entry.js +0 -647
- package/dist/esm/calcite-graph_2.entry.js +0 -1050
- package/dist/esm/calcite-scrim.entry.js +0 -121
- package/dist/esm/utils-9fb4104a.js +0 -61
- package/dist/solutions-components/p-04c37d69.entry.js +0 -17
- package/dist/solutions-components/p-0b92e4b1.entry.js +0 -11
- package/dist/solutions-components/p-238d3b5f.entry.js +0 -6
- package/dist/solutions-components/p-3af79063.js +0 -36
- package/dist/solutions-components/p-80b11ec1.entry.js +0 -17
- package/dist/solutions-components/p-a3a11749.entry.js +0 -6
- package/dist/solutions-components/p-aec06ce4.entry.js +0 -18
- package/dist/solutions-components/p-bfdf89c2.js +0 -11
- package/dist/solutions-components/p-c4ff3b52.entry.js +0 -17
- package/dist/solutions-components/p-ced067bd.entry.js +0 -17
- package/dist/solutions-components/p-d136eab0.entry.js +0 -23
- package/dist/solutions-components/p-e0446d5b.entry.js +0 -6
@@ -31,6 +31,8 @@ export class InfoCard {
|
|
31
31
|
this.zoomAndScrollToSelected = undefined;
|
32
32
|
this.allowEditing = true;
|
33
33
|
this.highlightEnabled = true;
|
34
|
+
this.paginationEnabled = true;
|
35
|
+
this.position = 'absolute';
|
34
36
|
this._alertOpen = false;
|
35
37
|
this._count = "";
|
36
38
|
this._editRecordOpen = false;
|
@@ -76,6 +78,45 @@ export class InfoCard {
|
|
76
78
|
async getSelectedFeature() {
|
77
79
|
return this._features.selectedFeature;
|
78
80
|
}
|
81
|
+
/**
|
82
|
+
* Get the current selected feature from the Features widget
|
83
|
+
* @returns Promise resolving with the current feature
|
84
|
+
*/
|
85
|
+
async refresh() {
|
86
|
+
await this.setGraphics();
|
87
|
+
}
|
88
|
+
/**
|
89
|
+
* Go to the previous feature in the features widget
|
90
|
+
*/
|
91
|
+
async back() {
|
92
|
+
this._features.previous();
|
93
|
+
this._count = this._getCount();
|
94
|
+
}
|
95
|
+
/**
|
96
|
+
* Go to the next feature in the features widget
|
97
|
+
*/
|
98
|
+
async next() {
|
99
|
+
this._features.next();
|
100
|
+
this._count = this._getCount();
|
101
|
+
}
|
102
|
+
/**
|
103
|
+
* Toggle the visibility of the features list view
|
104
|
+
*/
|
105
|
+
async toggleListView() {
|
106
|
+
this._showListView = !this._showListView;
|
107
|
+
const i = this._features.selectedFeatureIndex;
|
108
|
+
this._features.open({
|
109
|
+
features: this.graphics,
|
110
|
+
featureMenuOpen: this._showListView
|
111
|
+
});
|
112
|
+
this._features.selectedFeatureIndex = i;
|
113
|
+
}
|
114
|
+
/**
|
115
|
+
* update the current graphics to the features widget
|
116
|
+
*/
|
117
|
+
async updateCurrentGraphic(selectedGraphic) {
|
118
|
+
this._features.selectedFeatureWidget.graphic = selectedGraphic;
|
119
|
+
}
|
79
120
|
/**
|
80
121
|
* Respond to and close the edit record display
|
81
122
|
*
|
@@ -140,8 +181,8 @@ export class InfoCard {
|
|
140
181
|
const id = (_d = (_c = this._features) === null || _c === void 0 ? void 0 : _c.selectedFeature) === null || _d === void 0 ? void 0 : _d.getObjectId();
|
141
182
|
const ids = parseInt(id === null || id === void 0 ? void 0 : id.toString(), 10) > -1 ? [id] : [];
|
142
183
|
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);
|
143
|
-
return (h(Host, null, h("calcite-shell",
|
144
|
-
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", {
|
184
|
+
return (h(Host, null, h("calcite-shell", { style: { position: this.position } }, 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 &&
|
185
|
+
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", { placement: "bottom", "reference-element": "solutions-edit" }, h("span", null, this._translations.edit)), this.isMobile ? (h("calcite-tooltip", { placement: "bottom", "reference-element": "solutions-delete" }, h("span", null, this._translations.delete))) : undefined), this.paginationEnabled && !nextBackDisabled && h("div", { class: `display-flex padding-1-2 button-container top-border ${nextBackClass}` }, h("div", null, h("calcite-button", { appearance: 'transparent', disabled: nextBackDisabled, iconStart: "chevron-left", id: "solutions-back", onClick: () => this._back(), width: "full" }), h("calcite-tooltip", { placement: "top", "reference-element": "solutions-back" }, h("span", null, this._translations.back))), h("calcite-action", { class: 'pagination-action', onClick: () => this._toggleListView(), scale: "s", text: "", textEnabled: true }, h("span", { class: "pagination-count" }, this._count)), h("div", null, h("calcite-button", { appearance: "transparent", disabled: nextBackDisabled, iconStart: "chevron-right", id: "solutions-next", onClick: () => this._next(), width: "full" }), h("calcite-tooltip", { 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)))));
|
145
186
|
}
|
146
187
|
//--------------------------------------------------------------------------
|
147
188
|
//
|
@@ -216,7 +257,7 @@ export class InfoCard {
|
|
216
257
|
if (this.zoomAndScrollToSelected) {
|
217
258
|
this.reactiveUtils.watch(() => this._features.selectedFeatureIndex, (i) => {
|
218
259
|
if (i > -1) {
|
219
|
-
this.selectionChanged.emit([this._features.selectedFeature]);
|
260
|
+
this.selectionChanged.emit({ selectedFeature: [this._features.selectedFeature], selectedFeatureIndex: this._features.selectedFeatureIndex });
|
220
261
|
}
|
221
262
|
});
|
222
263
|
}
|
@@ -451,6 +492,42 @@ export class InfoCard {
|
|
451
492
|
"attribute": "highlight-enabled",
|
452
493
|
"reflect": false,
|
453
494
|
"defaultValue": "true"
|
495
|
+
},
|
496
|
+
"paginationEnabled": {
|
497
|
+
"type": "boolean",
|
498
|
+
"mutable": false,
|
499
|
+
"complexType": {
|
500
|
+
"original": "boolean",
|
501
|
+
"resolved": "boolean",
|
502
|
+
"references": {}
|
503
|
+
},
|
504
|
+
"required": false,
|
505
|
+
"optional": true,
|
506
|
+
"docs": {
|
507
|
+
"tags": [],
|
508
|
+
"text": "boolean: If true will show the pagination for multiple features"
|
509
|
+
},
|
510
|
+
"attribute": "pagination-enabled",
|
511
|
+
"reflect": false,
|
512
|
+
"defaultValue": "true"
|
513
|
+
},
|
514
|
+
"position": {
|
515
|
+
"type": "string",
|
516
|
+
"mutable": false,
|
517
|
+
"complexType": {
|
518
|
+
"original": "string",
|
519
|
+
"resolved": "string",
|
520
|
+
"references": {}
|
521
|
+
},
|
522
|
+
"required": false,
|
523
|
+
"optional": true,
|
524
|
+
"docs": {
|
525
|
+
"tags": [],
|
526
|
+
"text": "string: Set the position of the feature info"
|
527
|
+
},
|
528
|
+
"attribute": "position",
|
529
|
+
"reflect": false,
|
530
|
+
"defaultValue": "'absolute'"
|
454
531
|
}
|
455
532
|
};
|
456
533
|
}
|
@@ -491,8 +568,8 @@ export class InfoCard {
|
|
491
568
|
"text": "Emitted on demand when the selected index changes"
|
492
569
|
},
|
493
570
|
"complexType": {
|
494
|
-
"original": "__esri.Graphic[]",
|
495
|
-
"resolved": "Graphic[]",
|
571
|
+
"original": "{ selectedFeature: __esri.Graphic[], selectedFeatureIndex: number }",
|
572
|
+
"resolved": "{ selectedFeature: Graphic[]; selectedFeatureIndex: number; }",
|
496
573
|
"references": {
|
497
574
|
"___esri": {
|
498
575
|
"location": "global",
|
@@ -523,6 +600,102 @@ export class InfoCard {
|
|
523
600
|
"text": "Promise resolving with the current feature"
|
524
601
|
}]
|
525
602
|
}
|
603
|
+
},
|
604
|
+
"refresh": {
|
605
|
+
"complexType": {
|
606
|
+
"signature": "() => Promise<any>",
|
607
|
+
"parameters": [],
|
608
|
+
"references": {
|
609
|
+
"Promise": {
|
610
|
+
"location": "global",
|
611
|
+
"id": "global::Promise"
|
612
|
+
}
|
613
|
+
},
|
614
|
+
"return": "Promise<any>"
|
615
|
+
},
|
616
|
+
"docs": {
|
617
|
+
"text": "Get the current selected feature from the Features widget",
|
618
|
+
"tags": [{
|
619
|
+
"name": "returns",
|
620
|
+
"text": "Promise resolving with the current feature"
|
621
|
+
}]
|
622
|
+
}
|
623
|
+
},
|
624
|
+
"back": {
|
625
|
+
"complexType": {
|
626
|
+
"signature": "() => Promise<void>",
|
627
|
+
"parameters": [],
|
628
|
+
"references": {
|
629
|
+
"Promise": {
|
630
|
+
"location": "global",
|
631
|
+
"id": "global::Promise"
|
632
|
+
}
|
633
|
+
},
|
634
|
+
"return": "Promise<void>"
|
635
|
+
},
|
636
|
+
"docs": {
|
637
|
+
"text": "Go to the previous feature in the features widget",
|
638
|
+
"tags": []
|
639
|
+
}
|
640
|
+
},
|
641
|
+
"next": {
|
642
|
+
"complexType": {
|
643
|
+
"signature": "() => Promise<void>",
|
644
|
+
"parameters": [],
|
645
|
+
"references": {
|
646
|
+
"Promise": {
|
647
|
+
"location": "global",
|
648
|
+
"id": "global::Promise"
|
649
|
+
}
|
650
|
+
},
|
651
|
+
"return": "Promise<void>"
|
652
|
+
},
|
653
|
+
"docs": {
|
654
|
+
"text": "Go to the next feature in the features widget",
|
655
|
+
"tags": []
|
656
|
+
}
|
657
|
+
},
|
658
|
+
"toggleListView": {
|
659
|
+
"complexType": {
|
660
|
+
"signature": "() => Promise<void>",
|
661
|
+
"parameters": [],
|
662
|
+
"references": {
|
663
|
+
"Promise": {
|
664
|
+
"location": "global",
|
665
|
+
"id": "global::Promise"
|
666
|
+
}
|
667
|
+
},
|
668
|
+
"return": "Promise<void>"
|
669
|
+
},
|
670
|
+
"docs": {
|
671
|
+
"text": "Toggle the visibility of the features list view",
|
672
|
+
"tags": []
|
673
|
+
}
|
674
|
+
},
|
675
|
+
"updateCurrentGraphic": {
|
676
|
+
"complexType": {
|
677
|
+
"signature": "(selectedGraphic: __esri.Graphic) => Promise<void>",
|
678
|
+
"parameters": [{
|
679
|
+
"name": "selectedGraphic",
|
680
|
+
"type": "Graphic",
|
681
|
+
"docs": ""
|
682
|
+
}],
|
683
|
+
"references": {
|
684
|
+
"Promise": {
|
685
|
+
"location": "global",
|
686
|
+
"id": "global::Promise"
|
687
|
+
},
|
688
|
+
"___esri": {
|
689
|
+
"location": "global",
|
690
|
+
"id": "global::___esri"
|
691
|
+
}
|
692
|
+
},
|
693
|
+
"return": "Promise<void>"
|
694
|
+
},
|
695
|
+
"docs": {
|
696
|
+
"text": "update the current graphics to the features widget",
|
697
|
+
"tags": []
|
698
|
+
}
|
526
699
|
}
|
527
700
|
};
|
528
701
|
}
|
@@ -220,7 +220,7 @@ export class LayerTable {
|
|
220
220
|
* @param evt CustomEvent the graphic for the current selection
|
221
221
|
*/
|
222
222
|
async selectionChanged(evt) {
|
223
|
-
const g = evt.detail[0];
|
223
|
+
const g = evt.detail.selectedFeature[0];
|
224
224
|
const oid = g.getObjectId();
|
225
225
|
if (this.zoomAndScrollToSelected) {
|
226
226
|
const i = this._table.viewModel.getObjectIdIndex(oid);
|
@@ -377,7 +377,7 @@ export class LayerTable {
|
|
377
377
|
_getActionBar() {
|
378
378
|
const containerClass = this.isMobile ? "width-full" : "";
|
379
379
|
const mobileClass = this.isMobile ? "border-top" : "";
|
380
|
-
return (h("calcite-action-bar", { class: containerClass, expandDisabled: true, expanded: true, id: this._getId("bar"), layout: "horizontal" }, h("div", { class: `border-end ${containerClass} ${mobileClass}`, id: "solutions-map-layer-picker-container" }, h("map-layer-picker", { appearance: "transparent", defaultLayerId: this.defaultLayerId, display: "inline-flex", height: 50, isMobile: this.isMobile, mapView: this.mapView, onLayerSelectionChange: (evt) => this._layerSelectionChanged(evt), onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, placeholderIcon: "layers", scale: "l", showSingleLayerAsLabel: true, showTables: true, type: "dropdown" })), !this.isMobile ? this._getActions() : undefined));
|
380
|
+
return (h("calcite-action-bar", { class: containerClass, expandDisabled: true, expanded: true, id: this._getId("bar"), layout: "horizontal" }, h("div", { class: `border-end ${containerClass} ${mobileClass}`, id: "solutions-map-layer-picker-container" }, h("map-layer-picker", { appearance: "transparent", defaultLayerId: this.defaultLayerId, display: "inline-flex", height: 50, isMobile: this.isMobile, mapView: this.mapView, onLayerSelectionChange: (evt) => void this._layerSelectionChanged(evt), onlyShowUpdatableLayers: this.onlyShowUpdatableLayers, placeholderIcon: "layers", scale: "l", showSingleLayerAsLabel: true, showTables: true, type: "dropdown" })), !this.isMobile ? this._getActions() : undefined));
|
381
381
|
}
|
382
382
|
/**
|
383
383
|
* Get the actions that are used for various interactions with the table
|
@@ -168,7 +168,7 @@ export class MapCard {
|
|
168
168
|
}
|
169
169
|
else if (loadDefaultMap) {
|
170
170
|
this._defaultWebmapHonored = true;
|
171
|
-
this._mapPicker.setMapByID(id);
|
171
|
+
void this._mapPicker.setMapByID(id);
|
172
172
|
}
|
173
173
|
else if (mapConfigChanged) {
|
174
174
|
// Map is the same so no need to reload but we need to update for any changes from the config
|
@@ -191,7 +191,7 @@ export class MapSelectTools {
|
|
191
191
|
* Renders the component.
|
192
192
|
*/
|
193
193
|
render() {
|
194
|
-
return (h(Host, null, this._getMapLayerPicker(), h("div", { class: "border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } }), h("div", { class: "padding-top-1" }, h("map-draw-tools", { active: true, editGraphicsEnabled: !this._useLayerFeaturesEnabled, graphics: this._graphics, mapView: this.mapView, onSketchGraphicsChange: (evt) => this._sketchGraphicsChanged(evt), pointSymbol: this.sketchPointSymbol, polygonSymbol: this.sketchPolygonSymbol, polylineSymbol: this.sketchLineSymbol, ref: (el) => { this._drawTools = el; } })), this._getBufferOptions(), this._getUseLayerFeaturesOptions(), this._getNumSelected()), h("div", { class: "border-bottom" }), this._getNameInput()));
|
194
|
+
return (h(Host, null, this._getMapLayerPicker(), h("div", { class: "border-bottom" }), h("div", { class: "padding-top-sides-1" }, h("div", { class: "search-widget", ref: (el) => { this._searchElement = el; } }), h("div", { class: "padding-top-1" }, h("map-draw-tools", { active: true, 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._getBufferOptions(), this._getUseLayerFeaturesOptions(), this._getNumSelected()), h("div", { class: "border-bottom" }), this._getNameInput()));
|
195
195
|
}
|
196
196
|
/**
|
197
197
|
* Renders the buffer tools component.
|
@@ -200,7 +200,7 @@ export class MapSelectTools {
|
|
200
200
|
var _a, _b;
|
201
201
|
const showBufferToolsClass = this._searchDistanceEnabled ? "search-distance" : "div-not-visible";
|
202
202
|
const bufferDistance = typeof ((_a = this.selectionSet) === null || _a === void 0 ? void 0 : _a.distance) === "number" ? this.selectionSet.distance : this.defaultBufferDistance;
|
203
|
-
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", 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) => this._bufferComplete(evt), ref: (el) => this._bufferTools = el, unit: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit }))));
|
203
|
+
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", 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: ((_b = this.selectionSet) === null || _b === void 0 ? void 0 : _b.unit) || this.defaultBufferUnit }))));
|
204
204
|
}
|
205
205
|
/**
|
206
206
|
* Renders the map layer picker component.
|
@@ -236,7 +236,7 @@ export class MapSelectTools {
|
|
236
236
|
* @protected
|
237
237
|
*/
|
238
238
|
_getMapLayerPicker() {
|
239
|
-
return (h("div", { class: "display-flex padding-sides-1 padding-bottom-1" }, h("calcite-label", { class: "font-bold width-full label-margin-0" }, this._translations.inputLayer, h("map-layer-picker", { enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => this._inputLayerSelectionChange(evt), selectedIds: this.selectLayerView ? [this.selectLayerView.layer.id] : this.selectionSet ? [this.selectionSet.layerView.layer.id] : [], showTables: false }))));
|
239
|
+
return (h("div", { class: "display-flex padding-sides-1 padding-bottom-1" }, h("calcite-label", { class: "font-bold width-full label-margin-0" }, this._translations.inputLayer, h("map-layer-picker", { enabledLayerIds: this.enabledLayerIds, mapView: this.mapView, onLayerSelectionChange: (evt) => void this._inputLayerSelectionChange(evt), selectedIds: this.selectLayerView ? [this.selectLayerView.layer.id] : this.selectionSet ? [this.selectionSet.layerView.layer.id] : [], showTables: false }))));
|
240
240
|
}
|
241
241
|
//--------------------------------------------------------------------------
|
242
242
|
//
|
@@ -308,7 +308,7 @@ export class MapSelectTools {
|
|
308
308
|
});
|
309
309
|
this._selectionLabel = (_c = this.selectionSet) === null || _c === void 0 ? void 0 : _c.label;
|
310
310
|
if (!this._useLayerFeaturesEnabled) {
|
311
|
-
(_d = this._drawTools) === null || _d === void 0 ? void 0 : _d.updateGraphics();
|
311
|
+
await ((_d = this._drawTools) === null || _d === void 0 ? void 0 : _d.updateGraphics());
|
312
312
|
}
|
313
313
|
await goToSelection(this.selectionSet.selectedIds, this.selectionSet.layerView, this.mapView, false);
|
314
314
|
}
|
@@ -454,7 +454,7 @@ export class MapSelectTools {
|
|
454
454
|
}
|
455
455
|
this._workflowType = this._useLayerFeaturesEnabled ? EWorkflowType.SELECT : EWorkflowType.SKETCH;
|
456
456
|
if (this._workflowType === EWorkflowType.SKETCH) {
|
457
|
-
this._drawTools.updateGraphics();
|
457
|
+
await this._drawTools.updateGraphics();
|
458
458
|
}
|
459
459
|
await this._updateLabel();
|
460
460
|
this._clearSearchWidget();
|
@@ -293,7 +293,7 @@ export class RefineSelection {
|
|
293
293
|
});
|
294
294
|
const oids = Array.isArray(graphics) ? graphics.map(g => { var _a; return g.attributes[(_a = g === null || g === void 0 ? void 0 : g.layer) === null || _a === void 0 ? void 0 : _a.objectIdField]; }) : [];
|
295
295
|
await this._updateIds(oids, this._selectionMode, this._refineSelectionSet.undoStack, this._refineLayer);
|
296
|
-
this._drawTools.clear();
|
296
|
+
void this._drawTools.clear();
|
297
297
|
}
|
298
298
|
/**
|
299
299
|
* Highlight any selected features in the map
|
@@ -140,9 +140,11 @@
|
|
140
140
|
//id: "c720e337ff814fe4a83bc244c46f8e43" //15 Layers
|
141
141
|
//id: "f5186c798b9e40dab1078658ddbc28cf" // 30K features
|
142
142
|
//id: "dda88d905a6748a5ab46bea5be795f33" // screening layers
|
143
|
-
id: "b5bdcb1e5d684dd3b21a2d44b8e4f928" //Popup content
|
143
|
+
id: "b5bdcb1e5d684dd3b21a2d44b8e4f928" //Popup content + like dislike
|
144
144
|
//id: "d399ec39959a4aac8617ae4f05dd6785" //Arcade
|
145
145
|
//id: "024e8a5e73a34c5aade9632d651c5750" //Attachments
|
146
|
+
//id: "ae6d5d1936e84ce7adde44c7a7908846" //like dislike
|
147
|
+
// id: "ce3dec81bf714d3bb71da9691ab686d1" //Filter
|
146
148
|
}
|
147
149
|
const webMap = new WebMap({
|
148
150
|
portalItem: custom ?? portalItem
|
@@ -164,6 +166,118 @@
|
|
164
166
|
demo.enableNewReports = true;
|
165
167
|
demo.theme = "light";
|
166
168
|
demo.reportSubmittedMessage = "Thank you! Your request was successfully submitted";
|
169
|
+
|
170
|
+
//Set the zoomScale to be used when zooming to single point feature
|
171
|
+
//demo.zoomToScale = 139596221; //World
|
172
|
+
//demo.zoomToScale = 33800278;//Country
|
173
|
+
//demo.zoomToScale = 4291772;//States
|
174
|
+
demo.zoomToScale = 96610;//City
|
175
|
+
//demo.zoomToScale = 3495; //Building
|
176
|
+
|
177
|
+
//Set filter config
|
178
|
+
demo.layerExpressions = [
|
179
|
+
{
|
180
|
+
id: "Requests_681",
|
181
|
+
title: "Requests",
|
182
|
+
operator: " AND ",
|
183
|
+
expressions: [
|
184
|
+
{
|
185
|
+
definitionExpression: "OBJECTID > 690",
|
186
|
+
id: 1701793260225,
|
187
|
+
index: 0,
|
188
|
+
name: "greater than 690",
|
189
|
+
active: false
|
190
|
+
},
|
191
|
+
{
|
192
|
+
id: 1654881457794,
|
193
|
+
name: 'status',
|
194
|
+
type: 'string',
|
195
|
+
field: 'status'
|
196
|
+
}
|
197
|
+
]
|
198
|
+
},{
|
199
|
+
id: "18f056682a4-layer-12",
|
200
|
+
title: "PopUp with date in title",
|
201
|
+
operator: " AND ",
|
202
|
+
expressions: [
|
203
|
+
{
|
204
|
+
definitionExpression: "shrt > 0",
|
205
|
+
id: 1901793260225,
|
206
|
+
index: 0,
|
207
|
+
name: "Like greater than 0",
|
208
|
+
active: false
|
209
|
+
}
|
210
|
+
]
|
211
|
+
}
|
212
|
+
];
|
213
|
+
//Set the reporting layer options, layers from this object with reporting set to true will only be shown in layer list
|
214
|
+
//if all the layers from map should be considered for reporting then pass true for each layer
|
215
|
+
demo.reportingOptions = {
|
216
|
+
"Requests_681":{
|
217
|
+
reporting: true,
|
218
|
+
comment: false,
|
219
|
+
like: false,
|
220
|
+
likeField: "Like_field",
|
221
|
+
dislike: false,
|
222
|
+
dislikeField: "Dislike_field"
|
223
|
+
},
|
224
|
+
"18cdb191817-layer-5": {
|
225
|
+
reporting: true,
|
226
|
+
comment: false,
|
227
|
+
like: true,
|
228
|
+
likeField: "Like_field",
|
229
|
+
dislike: true,
|
230
|
+
dislikeField: "Dislike_field"
|
231
|
+
},
|
232
|
+
"18f056682a4-layer-12":{
|
233
|
+
reporting: true,
|
234
|
+
comment: false,
|
235
|
+
like: true,
|
236
|
+
likeField: "shrt",
|
237
|
+
dislike: false,
|
238
|
+
dislikeField: "dislike_field"
|
239
|
+
},
|
240
|
+
"18f2a1562a8-layer-7": {
|
241
|
+
reporting: true,
|
242
|
+
comment: true,
|
243
|
+
like: true,
|
244
|
+
likeField: "like_field",
|
245
|
+
dislike: true,
|
246
|
+
dislikeField: "dislike_field"
|
247
|
+
},
|
248
|
+
"18f2a1562a5-layer-3": {
|
249
|
+
reporting: true,
|
250
|
+
comment: true,
|
251
|
+
like: true,
|
252
|
+
likeField: "like_field",
|
253
|
+
dislike: true,
|
254
|
+
dislikeField: "dislike_field"
|
255
|
+
},
|
256
|
+
"18f2a1562a7-layer-4": {
|
257
|
+
reporting: true,
|
258
|
+
comment: true,
|
259
|
+
like: true,
|
260
|
+
likeField: "like_field",
|
261
|
+
dislike: true,
|
262
|
+
dislikeField: "dislike_field"
|
263
|
+
},
|
264
|
+
"18f2a1562a7-layer-5": {
|
265
|
+
reporting: true,
|
266
|
+
comment: true,
|
267
|
+
like: true,
|
268
|
+
likeField: "like_field",
|
269
|
+
dislike: true,
|
270
|
+
dislikeField: "dislike_field"
|
271
|
+
},
|
272
|
+
"18f2a1562a8-layer-6": {
|
273
|
+
reporting: true,
|
274
|
+
comment: true,
|
275
|
+
like: true,
|
276
|
+
likeField: "like_field",
|
277
|
+
dislike: true,
|
278
|
+
dislikeField: "dislike_field"
|
279
|
+
}
|
280
|
+
}
|
167
281
|
//Select reporting layers -
|
168
282
|
//demo.layers = ['SE_field_mapping_9688', 'SE_field_mapping_5784', 'SE_field_mapping_1853']; //Se mapping
|
169
283
|
//demo.layers = ['Three_Layers_nested_4042', 'SE_sort_2889', 'SE_sort_756']; //screening layers
|
@@ -154,12 +154,13 @@ export async function getAllLayers(mapView) {
|
|
154
154
|
* @param layerView the layer view to highlight
|
155
155
|
* @param mapView the map view used if updateExtent is true
|
156
156
|
* @param updateExtent optional (default false) boolean to indicate if we should zoom to the extent
|
157
|
+
* @param zoomToScale optional (default 0) zoomScale that individual points will use when zoomed to
|
157
158
|
*
|
158
159
|
* @returns Promise resolving with the highlight handle
|
159
160
|
*/
|
160
|
-
export async function highlightFeatures(ids, layerView, mapView, updateExtent = false) {
|
161
|
+
export async function highlightFeatures(ids, layerView, mapView, updateExtent = false, zoomToScale = 0) {
|
161
162
|
if (updateExtent) {
|
162
|
-
await goToSelection(ids, layerView, mapView, false);
|
163
|
+
await goToSelection(ids, layerView, mapView, false, undefined, zoomToScale);
|
163
164
|
//wait for sometime to load the feature in layerView then only the highlight will work
|
164
165
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
165
166
|
}
|
@@ -245,13 +246,18 @@ export async function flashSelection(ids, layerView, featureEffect) {
|
|
245
246
|
* @param layerView the layer view that contains the OIDs
|
246
247
|
* @param mapView the map view to show the extent change
|
247
248
|
* @param flashFeatures optional (default true) boolean to indicate if we should flash the features
|
248
|
-
*
|
249
|
+
* @param featureEffect optional (default undefined) feature effect when flashing the features
|
250
|
+
* @param zoomToScale optional (default to 0) zoomScale that individual points will use when zoomed to
|
249
251
|
* @returns Promise resolving when the operation is complete
|
250
252
|
*
|
251
253
|
*/
|
252
|
-
export async function goToSelection(ids, layerView, mapView, flashFeatures = true, featureEffect = undefined) {
|
254
|
+
export async function goToSelection(ids, layerView, mapView, flashFeatures = true, featureEffect = undefined, zoomToScale = 0) {
|
253
255
|
const result = await queryExtent(ids, layerView.layer);
|
254
|
-
|
256
|
+
const goToParams = { target: result.extent };
|
257
|
+
if (result.count === 1 && layerView.layer.geometryType === 'point' && zoomToScale) {
|
258
|
+
goToParams.scale = zoomToScale;
|
259
|
+
}
|
260
|
+
await mapView.goTo(goToParams);
|
255
261
|
if (flashFeatures) {
|
256
262
|
await flashSelection(ids, layerView, featureEffect);
|
257
263
|
}
|
@@ -182,6 +182,7 @@ export async function getAllLayers(
|
|
182
182
|
* @param layerView the layer view to highlight
|
183
183
|
* @param mapView the map view used if updateExtent is true
|
184
184
|
* @param updateExtent optional (default false) boolean to indicate if we should zoom to the extent
|
185
|
+
* @param zoomToScale optional (default 0) zoomScale that individual points will use when zoomed to
|
185
186
|
*
|
186
187
|
* @returns Promise resolving with the highlight handle
|
187
188
|
*/
|
@@ -189,10 +190,11 @@ export async function highlightFeatures(
|
|
189
190
|
ids: number[],
|
190
191
|
layerView: __esri.FeatureLayerView,
|
191
192
|
mapView: __esri.MapView,
|
192
|
-
updateExtent = false
|
193
|
+
updateExtent = false,
|
194
|
+
zoomToScale = 0
|
193
195
|
): Promise<__esri.Handle> {
|
194
196
|
if (updateExtent) {
|
195
|
-
await goToSelection(ids, layerView, mapView, false);
|
197
|
+
await goToSelection(ids, layerView, mapView, false, undefined, zoomToScale);
|
196
198
|
//wait for sometime to load the feature in layerView then only the highlight will work
|
197
199
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
198
200
|
}
|
@@ -295,7 +297,8 @@ export async function flashSelection(
|
|
295
297
|
* @param layerView the layer view that contains the OIDs
|
296
298
|
* @param mapView the map view to show the extent change
|
297
299
|
* @param flashFeatures optional (default true) boolean to indicate if we should flash the features
|
298
|
-
*
|
300
|
+
* @param featureEffect optional (default undefined) feature effect when flashing the features
|
301
|
+
* @param zoomToScale optional (default to 0) zoomScale that individual points will use when zoomed to
|
299
302
|
* @returns Promise resolving when the operation is complete
|
300
303
|
*
|
301
304
|
*/
|
@@ -304,10 +307,15 @@ export async function goToSelection(
|
|
304
307
|
layerView: __esri.FeatureLayerView,
|
305
308
|
mapView: __esri.MapView,
|
306
309
|
flashFeatures = true,
|
307
|
-
featureEffect: __esri.FeatureEffect = undefined
|
310
|
+
featureEffect: __esri.FeatureEffect = undefined,
|
311
|
+
zoomToScale = 0
|
308
312
|
): Promise<void> {
|
309
313
|
const result = await queryExtent(ids, layerView.layer);
|
310
|
-
|
314
|
+
const goToParams: { target: __esri.Extent; scale?: number; } = { target: result.extent };
|
315
|
+
if (result.count === 1 && layerView.layer.geometryType === 'point' && zoomToScale) {
|
316
|
+
goToParams.scale = zoomToScale
|
317
|
+
}
|
318
|
+
await mapView.goTo(goToParams);
|
311
319
|
if (flashFeatures) {
|
312
320
|
await flashSelection(ids, layerView, featureEffect);
|
313
321
|
}
|
@@ -17,6 +17,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
17
17
|
this.fail = createEvent(this, "fail", 7);
|
18
18
|
this.drawComplete = createEvent(this, "drawComplete", 7);
|
19
19
|
this.editingAttachment = createEvent(this, "editingAttachment", 7);
|
20
|
+
this.progressStatus = createEvent(this, "progressStatus", 7);
|
20
21
|
this.mapView = undefined;
|
21
22
|
this.selectedLayerId = undefined;
|
22
23
|
this.customizeSubmit = false;
|
@@ -161,6 +162,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
161
162
|
//Add handle to watch featureTemplatesViewModel ready state and then start the creation
|
162
163
|
const handle = this.reactiveUtils.watch(() => this._editor.viewModel.featureTemplatesViewModel.state, (state) => {
|
163
164
|
if (state === 'ready') {
|
165
|
+
this.progressStatus.emit(0.5);
|
164
166
|
void this.startCreate();
|
165
167
|
}
|
166
168
|
});
|
@@ -184,6 +186,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
184
186
|
//once the feature template is selected handle the event for formSubmit and sketch complete
|
185
187
|
//also, hide the headers and footer in the editor as we will be showing our own submit and cancel button
|
186
188
|
this._editor.viewModel.featureTemplatesViewModel.on('select', () => {
|
189
|
+
this.progressStatus.emit(0.75);
|
187
190
|
setTimeout(() => {
|
188
191
|
//on form submit
|
189
192
|
this._editor.viewModel.featureFormViewModel.on('submit', this.submitted.bind(this));
|
@@ -191,6 +194,7 @@ const CreateFeature = /*@__PURE__*/ proxyCustomElement(class CreateFeature exten
|
|
191
194
|
this._editor.viewModel.sketchViewModel.on("create", (evt) => {
|
192
195
|
if (evt.state === "complete") {
|
193
196
|
this.showSearchWidget = false;
|
197
|
+
this.progressStatus.emit(1);
|
194
198
|
this.drawComplete.emit();
|
195
199
|
}
|
196
200
|
});
|