@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
@@ -31,6 +31,7 @@ const CardManager = class {
|
|
31
31
|
this.featureOrRecordSubmitted = index.createEvent(this, "featureOrRecordSubmitted", 7);
|
32
32
|
this.customInfoText = undefined;
|
33
33
|
this.enableEditGeometry = false;
|
34
|
+
this.enableSnapping = false;
|
34
35
|
this.isMobile = undefined;
|
35
36
|
this.layer = undefined;
|
36
37
|
this.locale = undefined;
|
@@ -141,14 +142,14 @@ const CardManager = class {
|
|
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 (index.h(index.Host, { key: '
|
145
|
+
return (index.h(index.Host, { key: '803f5130e6f4fa0bf97cfdd2776e176786e736cc' }, index.h("div", { key: '7c0a756f5de5f536b52d2e9f6629593eb3c85781', class: "overflow-auto height-full" }, index.h("calcite-shell", { key: '9a6366bba429d5c29a5f1c556d6812f44d28ee2c', class: "position-relative " + featuresClass }, index.h("div", { key: '61cb9f7942eb209e5e0bd751ab4b5ca026086882', class: "position-static z-index-500" }, index.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 }))), index.h("calcite-shell", { key: 'db9233d29cc88ddc6cb023bcf9e9190ecb721214', class: "position-relative " + messageClass }, index.h("calcite-panel", { key: '0d1c22a3ad3d2d2a56054b2e8609697987b45ca7' }, index.h("div", { key: 'cc5f7faa934f474ddca2d0ab74fd46dac240cc6f', class: "padding-1" }, index.h("calcite-notice", { key: '2c2771696892455fcb1ec24d895cd321a84a8f49', icon: this.selectingFeatureFromMap ? "map" : "table", iconFlipRtl: true, open: true }, index.h("div", { key: '0bbbd13e4e9a7b2240a85b41dbd00fc2a7e39c75', slot: "message" }, guideMsg))), !this.isMobile && showCreateFeatureOrRecordBtn && index.h("calcite-button", { key: '67bac627f68fc6bcda2b1a8965ab6d7fb12d2e4c', disabled: !this.layer, onClick: () => this._createFeatureBtnClicked(), slot: "footer", width: "full" }, isTable ? this._translations.createRecord : this._translations.createFeature))), index.h("calcite-shell", { key: 'cd44af48bb05fd6ac41c0d66bdd9e01826ece1a4', class: "position-relative " + createFeatureClass }, index.h("calcite-flow-item", { key: '648dfdc4fb559ecbf64ee43791e3d9799c346f1a', selected: true }, index.h("calcite-panel", { key: '855df56ed576e52c94dbe3cfa8f6d57427a37ba2', heading: heading }, index.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 && index.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 (index.h("div", null, this._showCreateFeatureComponent && index.h("create-feature", { customizeSubmit: true, locale: this.locale, mapView: this.mapView, onDrawComplete: () => { this._showSubmitBtn = true; }, onEditingAttachment: (evt) => { this._showSubmitBtn = !evt.detail; }, onProgressStatus: () => {
|
152
|
+
return (index.h("div", null, this._showCreateFeatureComponent && index.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);
|
@@ -835,7 +836,7 @@ const LayerTable = class {
|
|
835
836
|
const showSearch = this._canShowFullTextSearch();
|
836
837
|
this._validateActiveActions();
|
837
838
|
return (index.h(index.Host, { key: '5141283322c3492f26768af0b712df01ebb734ad' }, index.h("div", { key: '3a1742f91134a896a5cf8298e2359d2370a95b51' }, index.h("calcite-scrim", { key: 'e50e99752b35ad923bfa2adb005cc004d655c6fb', class: scrimClass, loading: this._queryingData }), index.h("calcite-shell", { key: '51c5b8cd436c352144f5072ea07f26518b3602f4' }, this._getTableControlRow("header"), index.h("div", { key: '74ac951ac1a460ed555b70db37d6502585fd702d', class: `width-full ${tableHeightClass}` }, index.h("calcite-panel", { key: '0afcdaa113b15a7c4a95fb2615f7b8e19bffc5f3', class: "height-full width-full" }, showSearch &&
|
838
|
-
index.h("div", { key: 'eae1850675897ebf1f2f34a2c13f9b7e19a5b962', class: "search-container" }, index.h("calcite-input", { key: 'cde8ce3a6bf1d9da95825fc543c7e3d72643a1f6', class: "search", clearable: true, icon: "search", onCalciteInputChange: (evt) => void this._searchTextChanged(evt), placeholder: this._searchPlaceHolder, title: this._searchPlaceHolder, type: "search" })), index.h("calcite-loader", { key: '78beeb6521f065fd4dbbf233f6807acefcc7fa66', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { key: 'bc258046891b9d8ca3e6e67fb16b9b7c909f2bbc', class: tableNodeClass, ref: this.onTableNodeCreate }))), !this.isMobile ? (index.h("div", { class: "bottom-left text-color height-19" }, this._translations.recordsSelected
|
839
|
+
index.h("div", { key: 'eae1850675897ebf1f2f34a2c13f9b7e19a5b962', class: "search-container" }, index.h("calcite-input", { key: 'cde8ce3a6bf1d9da95825fc543c7e3d72643a1f6', class: "search", clearable: true, icon: "search", onCalciteInputChange: (evt) => void this._searchTextChanged(evt), placeholder: this._searchPlaceHolder, title: this._searchPlaceHolder, type: "search" })), index.h("calcite-loader", { key: '78beeb6521f065fd4dbbf233f6807acefcc7fa66', class: loadingClass, label: this._translations.fetchingData, scale: "l" }), index.h("div", { key: 'bc258046891b9d8ca3e6e67fb16b9b7c909f2bbc', class: tableNodeClass, ref: this.onTableNodeCreate }))), !this.isMobile ? (index.h("div", { class: "bottom-left text-color height-19", id: "solutions-selected-count-div" }, this._translations.recordsSelected
|
839
840
|
.replace("{{total}}", total)
|
840
841
|
.replace("{{selected}}", selected))) : undefined), this.createFilterModal && this._filterModal())));
|
841
842
|
}
|
@@ -2095,7 +2096,10 @@ const LayerTable = class {
|
|
2095
2096
|
};
|
2096
2097
|
const fields = this._table.columns.toArray().reduce((prev, cur) => {
|
2097
2098
|
if (!cur.hidden) {
|
2098
|
-
|
2099
|
+
const name = cur?.name || cur?.fieldName;
|
2100
|
+
if (name) {
|
2101
|
+
prev.push(name.toLocaleLowerCase());
|
2102
|
+
}
|
2099
2103
|
}
|
2100
2104
|
return prev;
|
2101
2105
|
}, []);
|
@@ -21,7 +21,7 @@ require('./solution-resource-d0a2f7fe.js');
|
|
21
21
|
require('./restHelpersGet-e4639890.js');
|
22
22
|
require('./update-243ea407.js');
|
23
23
|
|
24
|
-
const createFeatureCss = ":host{display:block}.esri-editor__panel-toolbar{display:none !important}.esri-editor__panel-content{padding-block:0px !important}.esri-editor .esri-item-list__group__header{display:none !important}.esri-editor__panel-content__section .esri-widget__heading{display:none !important}.esri-editor .esri-item-list__filter-container--sticky{padding-block:0px !important;padding-inline:10px !important}.search-widget{width:92% !important;margin:5px 14px 20px 14px}.display-none{display:none !important}.hide-map{height:1%;visibility:hidden}.show-map{padding:10px !important;position:absolute !important;bottom:0;height:auto !important;width:calc(100% - 22px)}.notice-msg{padding:10px;width:calc(100% - 20px)}.esri-editor__panel-content{padding-block:10px !important}@media only screen and (max-width: 600px){.esri-editor__panel-content{padding-block:0 !important;min-height:0 !important}}";
|
24
|
+
const createFeatureCss = ":host{display:block}.hide-editor-toolbar .esri-editor__panel-toolbar{display:none !important}.esri-editor__panel-content{padding-block:0px !important}.esri-editor .esri-item-list__group__header{display:none !important}.esri-editor__panel-content__section .esri-widget__heading{display:none !important}.esri-editor .esri-item-list__filter-container--sticky{padding-block:0px !important;padding-inline:10px !important}.search-widget{width:92% !important;margin:5px 14px 20px 14px}.display-none{display:none !important}.hide-map{height:1%;visibility:hidden}.show-map{padding:10px !important;position:absolute !important;bottom:0;height:auto !important;width:calc(100% - 22px)}.notice-msg{padding:10px;width:calc(100% - 20px)}.esri-editor__panel-content{padding-block:10px !important}@media only screen and (max-width: 600px){.esri-editor__panel-content{padding-block:0 !important;min-height:0 !important}}";
|
25
25
|
const CreateFeatureStyle0 = createFeatureCss;
|
26
26
|
|
27
27
|
const CreateFeature = class {
|
@@ -35,6 +35,7 @@ const CreateFeature = class {
|
|
35
35
|
this.modeChanged = index.createEvent(this, "modeChanged", 7);
|
36
36
|
this.customizeSubmit = false;
|
37
37
|
this.enableSearch = false;
|
38
|
+
this.enableSnapping = false;
|
38
39
|
this.floorLevel = undefined;
|
39
40
|
this.formElements = undefined;
|
40
41
|
this.isMobile = undefined;
|
@@ -295,8 +296,8 @@ const CreateFeature = class {
|
|
295
296
|
else if (this._currentPage === 'featureForm') {
|
296
297
|
guidingMsg = this._translations.provideDetailsMsg;
|
297
298
|
}
|
298
|
-
return (index.h(index.Fragment, { key: '
|
299
|
-
index.h("div", { key: '
|
299
|
+
return (index.h(index.Fragment, { key: '07a1a08a5cd9d8c439870a2500922fbd6839dac9' }, showGuidingMsg && index.h("calcite-notice", { key: '5d846812fc38f9ca4e9bd997f5bc519fe8a4f21e', class: "notice-msg", icon: "lightbulb", kind: "success", open: true, ref: el => this._calciteNotice = el }, index.h("div", { key: '8ad1da020a728e19e5d2f3add15ec7c5a8bbdd9f', slot: "message" }, guidingMsg)), index.h("calcite-loader", { key: '39a0843ca8b16e60a7468908eb00d08a15703756', class: loaderClass, label: "", scale: "s" }), index.h("div", { key: '1ce7ea5afc559adc1b0d8d8d60696bcf5783453b', class: featureFormClass, id: "feature-form" }), this.enableSearch &&
|
300
|
+
index.h("div", { key: 'e2832e4a615051a7d0a6cd29de348ef2d0c65cb9', class: `search-widget ${showSearchWidget} ${featureFormClass}`, id: "search-widget-ref", ref: el => this._searchDiv = el }), index.h("div", { key: 'a3388a9cf013a7c7155119d12835dc996ec9c947', class: `${mobileMapClass}`, ref: (el) => { this._mapViewContainer = el; } })));
|
300
301
|
}
|
301
302
|
//--------------------------------------------------------------------------
|
302
303
|
//
|
@@ -375,6 +376,9 @@ const CreateFeature = class {
|
|
375
376
|
const layerInfos = [];
|
376
377
|
this._container = document.createElement("div");
|
377
378
|
this._container?.classList.add("display-none");
|
379
|
+
if (!this.enableSnapping) {
|
380
|
+
this._container.classList.add("hide-editor-toolbar");
|
381
|
+
}
|
378
382
|
const allMapLayers = await mapViewUtils.getAllLayers(this._updatedMapView);
|
379
383
|
this._selectedLayer = await mapViewUtils.getLayerOrTable(this.mapView, this.selectedLayerId);
|
380
384
|
// if layer is selected then only use the layerInfos while initializing the editor widget
|
@@ -394,7 +398,8 @@ const CreateFeature = class {
|
|
394
398
|
view: this._updatedMapView,
|
395
399
|
layerInfos: layerInfos,
|
396
400
|
visibleElements: {
|
397
|
-
|
401
|
+
settingsMenu: this.enableSnapping,
|
402
|
+
snappingControls: this.enableSnapping,
|
398
403
|
createFeaturesSection: true,
|
399
404
|
editFeaturesSection: false,
|
400
405
|
flow: false
|
@@ -844,7 +849,7 @@ const DeleteButton = class {
|
|
844
849
|
};
|
845
850
|
DeleteButton.style = DeleteButtonStyle0;
|
846
851
|
|
847
|
-
const editCardCss = ":host{display:block}.padding-bottom-1{padding-bottom:1rem}.font-bold{font-weight:var(--calcite-font-weight-bold)}.font-500{font-weight:var(--calcite-font-weight-medium)}.font-italic{font-style:italic}#feature-form{padding-top:0px}.padding-sides-bottom-1{padding:0 1rem 1rem 1rem}.position-relative{position:relative}.esri-editor__prompt--danger{position:relative !important;width:100% !important;background-color:var(--calcite-color-foreground-1) !important}.esri-feature__content-node{background-color:var(--calcite-color-foreground-1) !important}.esri-editor__panel-toolbar{display:none !important}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.esri-editor__panel-content{padding-block:10px !important}";
|
852
|
+
const editCardCss = ":host{display:block}.padding-bottom-1{padding-bottom:1rem}.font-bold{font-weight:var(--calcite-font-weight-bold)}.font-500{font-weight:var(--calcite-font-weight-medium)}.font-italic{font-style:italic}#feature-form{padding-top:0px}.padding-sides-bottom-1{padding:0 1rem 1rem 1rem}.position-relative{position:relative}.esri-editor__prompt--danger{position:relative !important;width:100% !important;background-color:var(--calcite-color-foreground-1) !important}.esri-feature__content-node{background-color:var(--calcite-color-foreground-1) !important}.hide-editor-toolbar .esri-editor__panel-toolbar{display:none !important}.position-absolute{position:absolute;top:0;right:0;bottom:0;left:0;overflow:auto}.esri-editor__panel-content{padding-block:10px !important}";
|
848
853
|
const EditCardStyle0 = editCardCss;
|
849
854
|
|
850
855
|
const EditCard = class {
|
@@ -855,11 +860,12 @@ const EditCard = class {
|
|
855
860
|
this.editsComplete = index.createEvent(this, "editsComplete", 7);
|
856
861
|
this.refreshGraphics = index.createEvent(this, "refreshGraphics", 7);
|
857
862
|
this.enableEditGeometry = false;
|
863
|
+
this.enableSnapping = false;
|
864
|
+
this.graphicIndex = 0;
|
858
865
|
this.graphics = undefined;
|
859
866
|
this.locale = undefined;
|
860
867
|
this.mapView = undefined;
|
861
868
|
this.open = false;
|
862
|
-
this.graphicIndex = 0;
|
863
869
|
this._editorLoading = false;
|
864
870
|
this._translations = undefined;
|
865
871
|
}
|
@@ -1036,7 +1042,7 @@ const EditCard = class {
|
|
1036
1042
|
!this.graphics[0].layer.editingEnabled : true;
|
1037
1043
|
const tableNodeClass = this._editorLoading ? "display-none" : "position-absolute";
|
1038
1044
|
const loadingClass = this._editorLoading ? "" : "display-none";
|
1039
|
-
return (index.h(index.Host, { key: '
|
1045
|
+
return (index.h(index.Host, { key: 'bf9a2cc632deb0cc203f6a2fa837008f8e809482' }, index.h("div", { key: 'fa2ad6208c2274fe2982b71502d52694e3838162', class: "position-absolute" }, editDisabled ? (index.h("calcite-notice", { kind: "warning", open: true, slot: "content-top", width: "full" }, index.h("div", { slot: "message" }, this._translations.enableEditing))) : undefined, index.h("div", { key: '98c1d2cb3dce8855b0c792328c893b6947e01f4c', class: "position-absolute" }, index.h("div", { key: 'ebf21d9145dabcc3b91a4fc44d3a3ae92a6ef5ea', class: tableNodeClass, id: "feature-form", ref: (el) => this._editContainer = el }), index.h("calcite-loader", { key: 'd3da2a76b0dda07540ca6f65a2f671e825af211a', class: loadingClass, label: "", scale: "s" })))));
|
1040
1046
|
}
|
1041
1047
|
//--------------------------------------------------------------------------
|
1042
1048
|
//
|
@@ -1077,7 +1083,8 @@ const EditCard = class {
|
|
1077
1083
|
layerInfos,
|
1078
1084
|
visibleElements: {
|
1079
1085
|
flow: true,
|
1080
|
-
|
1086
|
+
settingsMenu: this.enableSnapping,
|
1087
|
+
snappingControls: this.enableSnapping,
|
1081
1088
|
},
|
1082
1089
|
container
|
1083
1090
|
});
|
@@ -1100,6 +1107,9 @@ const EditCard = class {
|
|
1100
1107
|
this.open = false;
|
1101
1108
|
}
|
1102
1109
|
});
|
1110
|
+
if (!this.enableSnapping) {
|
1111
|
+
container.classList.add("hide-editor-toolbar");
|
1112
|
+
}
|
1103
1113
|
// had issues with destroy before adding like this
|
1104
1114
|
this._editContainer.appendChild(container);
|
1105
1115
|
this.editorInitialized.emit(this._editor);
|
@@ -1159,6 +1169,7 @@ const InfoCard = class {
|
|
1159
1169
|
this.clearSelection = index.createEvent(this, "clearSelection", 7);
|
1160
1170
|
this.selectionChanged = index.createEvent(this, "selectionChanged", 7);
|
1161
1171
|
this.enableEditGeometry = false;
|
1172
|
+
this.enableSnapping = false;
|
1162
1173
|
this.graphics = undefined;
|
1163
1174
|
this.isLoading = false;
|
1164
1175
|
this.isMobile = undefined;
|
@@ -1399,8 +1410,8 @@ const InfoCard = class {
|
|
1399
1410
|
// if user has navigated to the related feature then pass the related feature to the graphics
|
1400
1411
|
const graphics = this._relatedFeature ? [this._relatedFeature] : this.graphics;
|
1401
1412
|
const selectedFeatureIndex = this._navigatedToRelatedFeature ? 0 : this._features?.selectedFeatureIndex;
|
1402
|
-
return (index.h(index.Host, { key: '
|
1403
|
-
index.h("div", { key: '
|
1413
|
+
return (index.h(index.Host, { key: '5b379325eff02faa0cc5bb93b625f63e75dac557' }, index.h("calcite-shell", { key: 'ce3b54deb9c64f8f6a4ec58a8dce37bb738e1307', style: { position: this.position } }, this._getHeader(), index.h("calcite-loader", { key: '3c2824073847b85b0a7a455c1e5ea1dc1d92169a', class: loadingClass, label: this._translations.fetchingData }), index.h("div", { key: '02645c7bc0a5e0c20a7888f6fc6e5ac0c913b908', class: "esri-widget feature-node " + featureNodeClass, id: this._featuresNodeId }), index.h("div", { key: 'f7168748d005c4347295b9f85ebac29f49f197d2', class: `${editButtonClass} width-100`, slot: "footer" }, this.allowEditing &&
|
1414
|
+
index.h("div", { key: '5ff5d61eb97f46789d781ed1c7d3a446542f3a68', class: "display-flex top-border padding-1-2" }, index.h("calcite-button", { key: '632f599ee2da0ea49baf4ee5fcff47434b3f2e8d', appearance: "solid", id: "solutions-edit", onClick: () => this._openEditRecord(), width: "full" }, this._translations.edit), this.isMobile && deleteEnabled ? (index.h("delete-button", { class: "padding-inline-start-1 width-100", id: "solutions-delete", ids: ids, layer: this._layer, locale: this.locale, onEditsComplete: () => this._closePopup() })) : undefined, index.h("calcite-tooltip", { key: '15673c1194d9ce01d6441330423352f54539158d', placement: "bottom", "reference-element": "solutions-edit" }, index.h("span", { key: 'bf7f3c471e66a6902863a667642fb49eb2d98938' }, this._translations.edit)), this.isMobile && deleteEnabled ? (index.h("calcite-tooltip", { placement: "bottom", "reference-element": "solutions-delete" }, index.h("span", null, this._translations.delete))) : undefined), this.paginationEnabled && !nextBackDisabled && index.h("div", { key: '337417e71ee660dff91793b99a74983ca765d616', class: `display-flex padding-1-2 button-container top-border ${nextBackClass}` }, index.h("div", { key: '6425566f26dfd1a3e35b44823f7727ddffe80efc' }, index.h("calcite-button", { key: '7f6cf491407741b95b3f1c2e1d533f903dd402a6', appearance: 'transparent', disabled: nextBackDisabled, iconFlipRtl: "both", iconStart: "chevron-left", id: "solutions-back", onClick: () => this._back(), width: "full" }), index.h("calcite-tooltip", { key: '1c209dd4229b3b3f1490563f722d19247454cb8f', placement: "top", "reference-element": "solutions-back" }, index.h("span", { key: '5cdbe55fddd53f430171e286ca0cf7785c564f92' }, this._translations.back))), index.h("calcite-action", { key: '3964c9e101508084299235ab4e4e15dedd1cd3fd', class: 'pagination-action', iconFlipRtl: true, onClick: () => this._toggleListView(), scale: "s", text: "", textEnabled: true }, index.h("span", { key: '3bc52707b7eac70e13caf9d2a24a09fc09456cf9', class: "pagination-count" }, this._count)), index.h("div", { key: '7c70dd2f40d1b799aa5c053e623cd43dc1da1594' }, index.h("calcite-button", { key: '9251259b306f5f0a13f953c742be7ea0606f1a2a', appearance: "transparent", disabled: nextBackDisabled, iconFlipRtl: "both", iconStart: "chevron-right", id: "solutions-next", onClick: () => this._next(), width: "full" }), index.h("calcite-tooltip", { key: '4634f29cf4e5c212f1f0fd46c6e5505b2f0d8dfe', placement: "top", "reference-element": "solutions-next" }, index.h("span", { key: 'f6480bb70598aa89547256af8867ab657e17aece' }, this._translations.next))))), index.h("edit-card", { key: '467a508438eceac82d387238edfaf3da7c644da9', class: editClass, enableEditGeometry: this.enableEditGeometry, enableSnapping: this.enableSnapping, graphicIndex: selectedFeatureIndex, graphics: graphics, locale: this.locale, mapView: this.mapView, open: this._editRecordOpen }), index.h("calcite-alert", { key: '53eba21ad693a3655d695fd1d1ae6211f7f1c68a', icon: "layer-broken", kind: "warning", label: "", onCalciteAlertClose: () => this._alertClosed(), open: this._alertOpen, placement: "top" }, index.h("div", { key: '01ecc5c16948cd9f140d523cdc21dee1e45b4bcc', slot: "title" }, this._translations.editDisabled), index.h("div", { key: 'ae30d08e51b01a2eb1c7d3a6f276ba15b7ccf849', slot: "message" }, this._translations.enableEditing)))));
|
1404
1415
|
}
|
1405
1416
|
//--------------------------------------------------------------------------
|
1406
1417
|
//
|
@@ -14,7 +14,7 @@ const esriLoader = require('./esri-loader-08dc41bd.js');
|
|
14
14
|
require('./interfaces-09c4c40e.js');
|
15
15
|
require('./_commonjsHelpers-baf43783.js');
|
16
16
|
|
17
|
-
const createRelatedFeatureCss = ":host{display:block}.esri-editor__panel-toolbar{display:none !important}.display-none{display:none !important}.esri-editor__panel-content{padding-block:10px !important}.notice-msg{padding:10px;width:calc(100% - 20px)}";
|
17
|
+
const createRelatedFeatureCss = ":host{display:block}.hide-editor-toolbar .esri-editor__panel-toolbar{display:none !important}.display-none{display:none !important}.esri-editor__panel-content{padding-block:10px !important}.notice-msg{padding:10px;width:calc(100% - 20px)}";
|
18
18
|
const CreateRelatedFeatureStyle0 = createRelatedFeatureCss;
|
19
19
|
|
20
20
|
const CreateRelatedFeature = class {
|
@@ -24,12 +24,13 @@ const CreateRelatedFeature = class {
|
|
24
24
|
this.fail = index.createEvent(this, "fail", 7);
|
25
25
|
this.isActionPending = index.createEvent(this, "isActionPending", 7);
|
26
26
|
this.formReady = index.createEvent(this, "formReady", 7);
|
27
|
+
this.customizeSubmit = false;
|
28
|
+
this.enableSnapping = false;
|
27
29
|
this.locale = undefined;
|
28
30
|
this.mapView = undefined;
|
29
|
-
this.table = undefined;
|
30
31
|
this.selectedFeature = undefined;
|
31
|
-
this.customizeSubmit = false;
|
32
32
|
this.showGuidingMsg = true;
|
33
|
+
this.table = undefined;
|
33
34
|
this._editorLoading = false;
|
34
35
|
this._translations = undefined;
|
35
36
|
}
|
@@ -44,23 +45,23 @@ const CreateRelatedFeature = class {
|
|
44
45
|
* The Editor constructor
|
45
46
|
*/
|
46
47
|
Editor;
|
47
|
-
/**
|
48
|
-
* esri/widgets/Editor: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html
|
49
|
-
* The Editor instance
|
50
|
-
*/
|
51
|
-
_editor;
|
52
48
|
/**
|
53
49
|
* esri/core/reactiveUtils: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html
|
54
50
|
*/
|
55
51
|
reactiveUtils;
|
52
|
+
/**
|
53
|
+
* boolean: Flag to maintain the add attachment
|
54
|
+
*/
|
55
|
+
_addingAttachment;
|
56
56
|
/**
|
57
57
|
* HTMLDivElement: The node the editor will be added to
|
58
58
|
*/
|
59
59
|
_container;
|
60
60
|
/**
|
61
|
-
|
62
|
-
|
63
|
-
|
61
|
+
* esri/widgets/Editor: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html
|
62
|
+
* The Editor instance
|
63
|
+
*/
|
64
|
+
_editor;
|
64
65
|
/**
|
65
66
|
* boolean: Flag to maintain form submission using submit button
|
66
67
|
*/
|
@@ -168,7 +169,7 @@ const CreateRelatedFeature = class {
|
|
168
169
|
}
|
169
170
|
render() {
|
170
171
|
const loaderClass = this._editorLoading ? "" : "display-none";
|
171
|
-
return (index.h(index.Fragment, { key: '
|
172
|
+
return (index.h(index.Fragment, { key: '5251d18b13ed90499cd960305773b6fb04efd4db' }, this.showGuidingMsg && index.h("calcite-notice", { key: '9f2902f8dab476734d3a70fad4e5cc7996f721a8', class: "notice-msg", icon: "lightbulb", kind: "success", open: true }, index.h("div", { key: '650f56b689cde544c96e24a966da7283efcdfcbe', slot: "message" }, this._translations.provideDetailsMsg)), index.h("calcite-loader", { key: 'be4c67978909e7dcf18fe8dece831b8830dee5d1', class: loaderClass, label: "", scale: "s" })));
|
172
173
|
}
|
173
174
|
/**
|
174
175
|
* StencilJS: Called once just after the component is fully loaded and the first render() occurs.
|
@@ -194,11 +195,15 @@ const CreateRelatedFeature = class {
|
|
194
195
|
}
|
195
196
|
this._container = document.createElement("div");
|
196
197
|
this._container?.classList.add("display-none");
|
198
|
+
if (!this.enableSnapping) {
|
199
|
+
this._container.classList.add("hide-editor-toolbar");
|
200
|
+
}
|
197
201
|
this._editor = new this.Editor({
|
198
202
|
view: this.mapView,
|
199
203
|
visibleElements: {
|
200
204
|
flow: true,
|
201
|
-
|
205
|
+
settingsMenu: this.enableSnapping,
|
206
|
+
snappingControls: this.enableSnapping,
|
202
207
|
},
|
203
208
|
container: this._container
|
204
209
|
});
|
@@ -374,6 +379,7 @@ const FeatureDetails = class {
|
|
374
379
|
this.addComment = index.createEvent(this, "addComment", 7);
|
375
380
|
this.likeOrDislikeClicked = index.createEvent(this, "likeOrDislikeClicked", 7);
|
376
381
|
this.featureSelectionChange = index.createEvent(this, "featureSelectionChange", 7);
|
382
|
+
this.enableSnapping = false;
|
377
383
|
this.mapView = undefined;
|
378
384
|
this.graphics = undefined;
|
379
385
|
this.reportingOptions = undefined;
|
@@ -528,12 +534,12 @@ const FeatureDetails = class {
|
|
528
534
|
render() {
|
529
535
|
//When related features found show comments list of only those features else comments list will be empty
|
530
536
|
const commentsListWhereClause = this._relatedFeaturesOIDs?.length > 0 ? `objectId in(${this._relatedFeaturesOIDs})` : '1=0';
|
531
|
-
return (index.h("calcite-panel", { key: '
|
532
|
-
index.h("div", { key: '
|
533
|
-
index.h("calcite-button", { key: '
|
534
|
-
index.h("calcite-button", { key: '
|
535
|
-
index.h("calcite-button", { key: '
|
536
|
-
index.h("feature-list", { key: '
|
537
|
+
return (index.h("calcite-panel", { key: '9fea2f56281419fd95720cd6b0f7369017d975b0', "full-height": true }, index.h("info-card", { key: 'ae9f7a316ba49b59dbbfaeb011aa3475b70f809b', allowEditing: false, enableSnapping: this.enableSnapping, graphics: this.graphics, highlightEnabled: false, isLoading: false, isMobile: false, locale: this.locale, mapView: this.mapView, onSelectionChanged: (e) => { this.featureSelectionChange.emit(e.detail); }, paginationEnabled: false, position: "relative", ref: el => this._infoCard = el }), (this._likeFieldAvailable || this._dislikeFieldAvailable || this._commentsAvailable) &&
|
538
|
+
index.h("div", { key: '7da88cf71d12c05321895a04d8e4039d74a466e9', class: "buttons-container" }, this._commentsAvailable &&
|
539
|
+
index.h("calcite-button", { key: 'ebc7b32a69c551fe8e2a8dd10d69cde8b9078e4f', appearance: "transparent", iconEnd: "speech-bubble", kind: "neutral", onClick: () => { this.addComment.emit(); }, scale: 'm' }, this._relatedFeaturesOIDs.length), this._likeFieldAvailable &&
|
540
|
+
index.h("calcite-button", { key: 'ef43f47829ebb6b04dbaaf7a20ee9848d9c21c87', appearance: "transparent", iconEnd: "thumbs-up", kind: this._isLikeBtnClicked ? "brand" : "neutral", loading: this._updating, onClick: this.onLikeButtonClick.bind(this), scale: 'm' }, this._likeCount ?? this._selectedGraphic.attributes[this._likeField] ?? 0), this._dislikeFieldAvailable &&
|
541
|
+
index.h("calcite-button", { key: '64651be363c2d1a5083002dcad4bff4d040a396a', appearance: "transparent", iconEnd: "thumbs-down", kind: this._isDislikeBtnClicked ? "brand" : "neutral", loading: this._updating, onClick: this.onDislikeButtonClick.bind(this), scale: 'm' }, this._disLikeCount ?? this._selectedGraphic.attributes[this._dislikeField] ?? 0)), this.relatedTableId && this._commentsAvailable &&
|
542
|
+
index.h("feature-list", { key: 'fff5e1ce72310a5a41b2223578165011026e1b8c', class: "height-full", locale: this.locale, mapView: this.mapView, onFeatureSelect: (e) => { this.commentSelect.emit(e.detail); }, pageSize: 5, ref: el => this._commentsList = el, selectedLayerId: this.relatedTableId, showErrorWhenNoFeatures: false, showFullTitle: this.showFullCommentTitle, showInitialLoading: false, showUserImageInList: this.showUserImageInCommentsList, textSize: "small", whereClause: commentsListWhereClause })));
|
537
543
|
}
|
538
544
|
/**
|
539
545
|
* Load esri javascript api modules
|
@@ -46,6 +46,7 @@ const CrowdsourceManager = class {
|
|
46
46
|
this.enableLegend = true;
|
47
47
|
this.enableSearch = true;
|
48
48
|
this.enableShare = false;
|
49
|
+
this.enableSnapping = true;
|
49
50
|
this.enableZoom = true;
|
50
51
|
this.locale = undefined;
|
51
52
|
this.mapInfos = [];
|
@@ -270,7 +271,7 @@ const CrowdsourceManager = class {
|
|
270
271
|
render() {
|
271
272
|
// only avoid border when we have a header color that is not white
|
272
273
|
const borderClass = this.popupHeaderColor && this.popupHeaderColor !== "#FFFFFF" ? "border-width-0" : "";
|
273
|
-
return (index.h(index.Host, { key: '
|
274
|
+
return (index.h(index.Host, { key: '1d30ec71032cffd61c016cc846f59a8e437253de' }, index.h("calcite-shell", { key: '836f6e8cde7c3e5b177803b607e26a41bdea42a3', class: "position-relative" }, index.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()));
|
274
275
|
}
|
275
276
|
/**
|
276
277
|
* Called after each render
|
@@ -501,7 +502,7 @@ const CrowdsourceManager = class {
|
|
501
502
|
const isTableLayout = this.appLayout === 'tableView';
|
502
503
|
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";
|
503
504
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
504
|
-
return (index.h("div", { class: `width-50 height-full ${themeClass}` }, index.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: () => {
|
505
|
+
return (index.h("div", { class: `width-50 height-full ${themeClass}` }, index.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: () => {
|
505
506
|
this._showInformationHeader = true;
|
506
507
|
}, onCreateWorkFlowStarted: () => {
|
507
508
|
this.appLayout = this._layer.isTable ? "tableView" : "mapView";
|
@@ -33,6 +33,7 @@ const CrowdsourceReporter = class {
|
|
33
33
|
this.enableLogin = undefined;
|
34
34
|
this.enableNewReports = undefined;
|
35
35
|
this.enableSearch = true;
|
36
|
+
this.enableSnapping = false;
|
36
37
|
this.enableZoom = true;
|
37
38
|
this.isMobile = undefined;
|
38
39
|
this.layerExpressions = [];
|
@@ -381,7 +382,7 @@ const CrowdsourceReporter = class {
|
|
381
382
|
*/
|
382
383
|
render() {
|
383
384
|
const themeClass = this.theme === "dark" ? "calcite-mode-dark" : "calcite-mode-light";
|
384
|
-
return (index.h(index.Host, { key: '
|
385
|
+
return (index.h(index.Host, { key: '11cf5f3a1674460c6ab9d2979d621417431e7130' }, this._reportSubmitted && index.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" }, index.h("div", { key: '91e436fa80c41457465f0816b66e205793f5a91d', slot: "message" }, this.reportSubmittedMessage ? this.reportSubmittedMessage : this._translations.submitMsg)), this._featureCreationFailedErrorMsg && index.h("calcite-alert", { key: '6dbcd02898e6328f343af94985f069d8261dce1f', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._featureCreationFailedErrorMsg = ""; }, open: true, placement: "top" }, index.h("div", { key: 'fc97e5f02b5241af076243b7fa8bb19f29c3dad6', slot: "title" }, this._translations.error), index.h("div", { key: '9583f6bd62f2a36c50e8309a353dd634300aa835', slot: "message" }, this._featureCreationFailedErrorMsg)), this._commentSubmitted && index.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" }, index.h("div", { key: '700a788d9f0f12200bee0625576571a8c352a6a1', slot: "message" }, this.commentSubmittedMessage || this._translations.commentSubmittedMsg)), this._addingCommentFailed && index.h("calcite-alert", { key: '28ef0e56c42d3d366e33374368461eba9bb5e896', "auto-close": true, class: themeClass, icon: "x-octagon", kind: "danger", label: "", onCalciteAlertClose: () => { this._addingCommentFailed = false; }, open: true, placement: "top" }, index.h("div", { key: '90e8757ee650b3f55c456d0fd56a45dac6df263e', slot: "title" }, this._translations.error), index.h("div", { key: 'b819d951be7340af388767b40e423a279b33ea85', slot: "message" }, this._translations.addingCommentFailedMsg)), index.h("div", { key: '167d0cb576feaaa77279110ab40df63e1a6146ae' }, index.h("calcite-shell", { key: 'b4d83790aa3a47a9c336821c54bc3e0fa1d9e308', "content-behind": true }, this._getReporter())), this.isMobile && this.filterModal()));
|
385
386
|
}
|
386
387
|
//--------------------------------------------------------------------------
|
387
388
|
//
|
@@ -565,7 +566,7 @@ const CrowdsourceReporter = class {
|
|
565
566
|
* @protected
|
566
567
|
*/
|
567
568
|
getFeatureCreateFlowItem() {
|
568
|
-
return (index.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 && index.h("div", { class: "width-full", slot: "footer" }, index.h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", onClick: this.onCreateFeatureSubmitButtonClick.bind(this), width: "full" }, this._translations.submit), index.h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromCreateFeaturePanel.bind(this), width: "full" }, this._translations.cancel)), index.h("calcite-panel", { "full-height": true, "full-width": true }, index.h("div", { class: "progress-bar" }, index.h("calcite-progress", { type: "determinate", value: this._updatedProgressBarStatus })), index.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 }))));
|
569
|
+
return (index.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 && index.h("div", { class: "width-full", slot: "footer" }, index.h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", onClick: this.onCreateFeatureSubmitButtonClick.bind(this), width: "full" }, this._translations.submit), index.h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromCreateFeaturePanel.bind(this), width: "full" }, this._translations.cancel)), index.h("calcite-panel", { "full-height": true, "full-width": true }, index.h("div", { class: "progress-bar" }, index.h("calcite-progress", { type: "determinate", value: this._updatedProgressBarStatus })), index.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 }))));
|
569
570
|
}
|
570
571
|
/**
|
571
572
|
* Update the progress bar status when editor panel changes
|
@@ -733,7 +734,7 @@ const CrowdsourceReporter = class {
|
|
733
734
|
* @protected
|
734
735
|
*/
|
735
736
|
async layerListLoaded(evt) {
|
736
|
-
// 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
|
737
|
+
// 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
|
737
738
|
const presentOnLayerListPanel = this._layerList && this._flowItems[this._flowItems.length - 1] === "layer-list" || this._flowItems[0] === "feature-list";
|
738
739
|
if (presentOnLayerListPanel) {
|
739
740
|
const layersListed = evt.detail;
|
@@ -933,7 +934,7 @@ const CrowdsourceReporter = class {
|
|
933
934
|
*/
|
934
935
|
getFeatureDetailsFlowItem() {
|
935
936
|
const showCommentBtn = this._getLayersConfig(this._selectedLayerId)?.comment && this._selectedLayer.relationships.length > 0 && this._relatedTable;
|
936
|
-
return (index.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(), index.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(), index.h("calcite-panel", null, index.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 &&
|
937
|
+
return (index.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(), index.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(), index.h("calcite-panel", null, index.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 &&
|
937
938
|
index.h("calcite-button", { appearance: "solid", onClick: this.showAddCommentsPanel.bind(this), slot: "footer", width: "full" }, this.commentButtonText || this._translations.comment))));
|
938
939
|
}
|
939
940
|
/**
|
@@ -949,14 +950,14 @@ const CrowdsourceReporter = class {
|
|
949
950
|
* @returns Node
|
950
951
|
*/
|
951
952
|
getCommentDetailsFlowItem() {
|
952
|
-
return (index.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(), index.h("calcite-panel", { "full-height": true }, index.h("info-card", { allowEditing: false, graphics: this._selectedRelatedFeature, highlightEnabled: false, isLoading: false, isMobile: false, locale: this.locale, mapView: this.mapView, paginationEnabled: false }))));
|
953
|
+
return (index.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(), index.h("calcite-panel", { "full-height": true }, index.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 }))));
|
953
954
|
}
|
954
955
|
/**
|
955
956
|
* Returns the calcite-flow item for add comment
|
956
957
|
* @returns Node
|
957
958
|
*/
|
958
959
|
getAddCommentFlowItem() {
|
959
|
-
return (index.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(), index.h("div", { class: "width-full", slot: "footer" }, this._showSubmitCancelButton && index.h("div", { class: "width-full", slot: "footer" }, index.h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", onClick: this.onCreateRelatedFeatureSubmitButtonClick.bind(this), width: "full" }, this._translations.submit), index.h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromCreateRelatedFeaturePanel.bind(this), width: "full" }, this._translations.cancel))), index.h("calcite-panel", null, index.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 }))));
|
960
|
+
return (index.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(), index.h("div", { class: "width-full", slot: "footer" }, this._showSubmitCancelButton && index.h("div", { class: "width-full", slot: "footer" }, index.h("calcite-button", { appearance: "solid", class: "footer-top-button footer-button", onClick: this.onCreateRelatedFeatureSubmitButtonClick.bind(this), width: "full" }, this._translations.submit), index.h("calcite-button", { appearance: "outline", class: "footer-button", onClick: this.backFromCreateRelatedFeaturePanel.bind(this), width: "full" }, this._translations.cancel))), index.h("calcite-panel", null, index.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 }))));
|
960
961
|
}
|
961
962
|
/**
|
962
963
|
* Sets the selected features and updates the first feature as the current selected feature
|