qwc2 2026.9.8 → 2026.9.17
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/actions/display.js +1 -1
- package/actions/editing.js +1 -1
- package/actions/layerinfo.js +1 -1
- package/actions/layers.js +1 -1
- package/actions/localConfig.js +1 -1
- package/actions/locale.js +1 -1
- package/actions/locate.js +1 -1
- package/actions/logging.js +1 -1
- package/actions/map.js +1 -1
- package/actions/measurement.js +1 -1
- package/actions/processNotifications.js +1 -1
- package/actions/redlining.js +1 -1
- package/actions/redliningPick.js +1 -1
- package/actions/search.js +1 -1
- package/actions/task.js +1 -1
- package/actions/theme.js +1 -1
- package/actions/windows.js +1 -1
- package/components/AppMenu.js +1 -1
- package/components/AttributeForm.js +60 -87
- package/components/AttributeTableWidget.js +1 -1
- package/components/AutoEditForm.js +19 -38
- package/components/CoordinateDisplayer.js +1 -1
- package/components/EditComboField.js +1 -1
- package/components/EditUploadField.js +1 -3
- package/components/ExportSelection.js +1 -1
- package/components/FeatureAttributesWindow.js +1 -1
- package/components/FullscreenSwitcher.js +1 -1
- package/components/Icon.js +1 -1
- package/components/IdentifyTool.js +1 -1
- package/components/IdentifyViewer.js +47 -17
- package/components/ImportLayer.js +1 -1
- package/components/LayerInfoWindow.js +1 -1
- package/components/LinkFeatureForm.js +24 -4
- package/components/LocationRecorder.js +1 -1
- package/components/MapButton.js +1 -1
- package/components/MapSelection.js +1 -1
- package/components/MeasureSwitcher.js +1 -1
- package/components/MessageBar.js +1 -1
- package/components/NumericInputWindow.js +1 -1
- package/components/OverviewMapButton.js +1 -1
- package/components/PickFeature.js +1 -1
- package/components/PluginsContainer.js +10 -3
- package/components/ProcessNotifications.js +1 -1
- package/components/QtDesignerForm.js +73 -32
- package/components/ResizeableWindow.js +3 -1
- package/components/SearchBox.js +1 -1
- package/components/ServiceInfoWindow.js +1 -1
- package/components/SideBar.js +8 -5
- package/components/StandardApp.js +26 -12
- package/components/TaskBar.js +1 -1
- package/components/ThemeLayersListWindow.js +1 -1
- package/components/ThemeList.js +1 -1
- package/components/Toolbar.js +1 -1
- package/components/ViewSwitcher.js +1 -1
- package/components/WindowManager.js +1 -1
- package/components/map/OlLayer.js +1 -1
- package/components/map/OlMap.js +19 -8
- package/components/map/layers/BingLayer.js +1 -1
- package/components/map/layers/GoogleLayer.js +1 -1
- package/components/map/layers/GraticuleLayer.js +1 -1
- package/components/map/layers/ImageLayer.js +1 -1
- package/components/map/layers/OSMLayer.js +1 -1
- package/components/map/layers/OverlayLayer.js +1 -1
- package/components/map/layers/VectorLayer.js +1 -1
- package/components/map/layers/WFSLayer.js +1 -1
- package/components/map/layers/WMSLayer.js +1 -1
- package/components/map/layers/WMTSLayer.js +1 -1
- package/components/map/layers/index.js +1 -1
- package/components/map3d/ColorLayer3D.js +1 -1
- package/components/map3d/EditDataset3D.js +1 -1
- package/components/map3d/HeightProfile3D.js +1 -1
- package/components/map3d/ImportObjects3D.js +1 -1
- package/components/map3d/Map3D.js +1 -1
- package/components/map3d/MapControls3D.js +1 -1
- package/components/map3d/SearchField3D.js +1 -1
- package/components/map3d/drawtool/CreateTool3D.js +1 -1
- package/components/map3d/drawtool/EditTool3D.js +1 -1
- package/components/map3d/drawtool/NumericInput3D.js +1 -1
- package/components/map3d/layers/GeoTIFFLayer3D.js +1 -1
- package/components/map3d/layers/Layer3D.js +1 -1
- package/components/map3d/layers/MVTLayer3D.js +1 -1
- package/components/map3d/layers/VectorLayer3D.js +1 -1
- package/components/map3d/layers/WFSLayer3D.js +1 -1
- package/components/map3d/layers/WMSLayer3D.js +1 -1
- package/components/map3d/layers/WMTSLayer3D.js +1 -1
- package/components/map3d/layers/index.js +1 -1
- package/components/map3d/utils/MiscUtils3D.js +1 -1
- package/components/map3d/utils/OrbitControls3D.js +1 -1
- package/components/map3d/utils/Tiles3DStyle.js +1 -1
- package/components/share/ShareLink.js +1 -1
- package/components/share/ShareQRCode.js +1 -1
- package/components/share/ShareSocials.js +1 -1
- package/components/style/App.css +68 -57
- package/components/style/AttributeTableWidget.css +2 -2
- package/components/style/AutoEditForm.css +2 -40
- package/components/style/PluginsContainer.css +1 -0
- package/components/style/QtDesignerForm.css +5 -3
- package/components/timeline/FixedTimeline.js +1 -1
- package/components/timeline/InfiniteTimeline.js +1 -1
- package/components/timeline/TimelineFeaturesSlider.js +1 -1
- package/components/widgets/AccordeonWidget.js +1 -1
- package/components/widgets/ButtonBar.js +1 -1
- package/components/widgets/ColorButton.js +5 -3
- package/components/widgets/ComboBox.js +1 -1
- package/components/widgets/CopyButton.js +1 -1
- package/components/widgets/DateTimeInput.js +1 -1
- package/components/widgets/EditableSelect.js +1 -1
- package/components/widgets/FeaturesTable.js +6 -5
- package/components/widgets/FileSelector.js +1 -1
- package/components/widgets/Input.js +1 -1
- package/components/widgets/InputContainer.js +1 -1
- package/components/widgets/ListInput.js +1 -1
- package/components/widgets/ModalDialog.js +10 -15
- package/components/widgets/NavBar.js +1 -1
- package/components/widgets/NumberInput.js +1 -1
- package/components/widgets/PopupMenu.js +18 -17
- package/components/widgets/Primitives.js +1 -1
- package/components/widgets/SearchWidget.js +1 -1
- package/components/widgets/SuggestionInput.js +1 -1
- package/components/widgets/TextInput.js +11 -8
- package/components/widgets/ToggleSwitch.js +1 -1
- package/components/widgets/VectorLayerPicker.js +1 -1
- package/components/widgets/style/ColorButton.css +1 -1
- package/components/widgets/style/ModalDialog.css +1 -1
- package/extra/components/Oereb2Document.js +1 -1
- package/extra/components/OerebDocument.js +1 -1
- package/extra/plugins/PlotInfoTool.js +1 -1
- package/icons/snap_intersection.svg +79 -0
- package/icons/snap_perpendicular.svg +40 -0
- package/icons/triangle.svg +7 -0
- package/libs/openlayers.js +3 -1
- package/package.json +1 -1
- package/plugins/API.js +1 -1
- package/plugins/AttributeTable.js +1 -1
- package/plugins/Authentication.js +1 -1
- package/plugins/BackgroundSwitcher.js +1 -1
- package/plugins/BottomBar.js +1 -1
- package/plugins/Cyclomedia.js +1 -1
- package/plugins/Editing.js +4 -4
- package/plugins/FeatureForm.js +1 -1
- package/plugins/FeatureSearch.js +13 -3
- package/plugins/FeatureSelection.js +1 -1
- package/plugins/GeometryDigitizer.js +2 -2
- package/plugins/HeightProfile.js +1 -1
- package/plugins/Help.js +54 -15
- package/plugins/HomeButton.js +1 -1
- package/plugins/Identify.js +1 -1
- package/plugins/LayerCatalog.js +1 -1
- package/plugins/LayerTree.js +1 -1
- package/plugins/LocateButton.js +1 -1
- package/plugins/Map.js +1 -1
- package/plugins/MapCompare.js +5 -3
- package/plugins/MapCopyright.js +1 -1
- package/plugins/MapExport.js +1 -1
- package/plugins/MapFilter.js +1 -1
- package/plugins/MapInfoTooltip.js +1 -1
- package/plugins/MapLegend.js +1 -1
- package/plugins/MapTip.js +1 -1
- package/plugins/Measure.js +3 -3
- package/plugins/NewsPopup.js +1 -1
- package/plugins/ObjectList.js +1 -1
- package/plugins/ObliqueView.js +1 -1
- package/plugins/OverviewMap.js +1 -1
- package/plugins/Panoramax.js +3 -1
- package/plugins/Print.js +1 -1
- package/plugins/Redlining.js +21 -8
- package/plugins/Reports.js +1 -1
- package/plugins/Routing.js +1 -1
- package/plugins/ScratchDrawing.js +1 -1
- package/plugins/SensorThingsTool.js +1 -1
- package/plugins/Settings.js +1 -1
- package/plugins/Share.js +1 -1
- package/plugins/StartupMarker.js +1 -1
- package/plugins/TaskButton.js +1 -1
- package/plugins/ThemeBrowser.css +1 -1
- package/plugins/ThemeBrowser.js +6 -5
- package/plugins/ThemeSwitcher.js +1 -1
- package/plugins/TimeManager.js +8 -4
- package/plugins/TopBar.js +1 -1
- package/plugins/ValueTool.js +2 -2
- package/plugins/View3D.js +3 -4
- package/plugins/ZoomButtons.js +1 -1
- package/plugins/map/DrawInteraction.js +88 -0
- package/plugins/map/EditingSupport.js +53 -12
- package/plugins/map/LocateSupport.js +1 -1
- package/plugins/map/MeasurementSupport.js +3 -2
- package/plugins/map/RedliningPickSupport.js +1 -1
- package/plugins/map/RedliningSupport.js +32 -24
- package/plugins/map/SnapInteraction.js +206 -23
- package/plugins/map/SnappingSupport.js +47 -36
- package/plugins/map3d/BackgroundSwitcher3D.js +1 -1
- package/plugins/map3d/BottomBar3D.js +1 -1
- package/plugins/map3d/Compare3D.js +1 -1
- package/plugins/map3d/Draw3D.js +4 -4
- package/plugins/map3d/ExportObjects3D.js +1 -1
- package/plugins/map3d/HideObjects3D.js +1 -1
- package/plugins/map3d/Identify3D.js +1 -1
- package/plugins/map3d/LayerTree3D.js +1 -1
- package/plugins/map3d/MapCopyright3D.js +1 -1
- package/plugins/map3d/MapExport3D.js +1 -1
- package/plugins/map3d/MapLight3D.js +1 -1
- package/plugins/map3d/Measure3D.js +1 -1
- package/plugins/map3d/MeasureObjects3D.js +1 -1
- package/plugins/map3d/OverviewMap3D.js +1 -1
- package/plugins/map3d/Settings3D.js +1 -1
- package/plugins/map3d/SunExposure3D.js +1 -1
- package/plugins/map3d/TopBar3D.js +1 -1
- package/plugins/map3d/Viewshed3D.js +1 -1
- package/plugins/redlining/RedliningBufferSupport.js +1 -1
- package/plugins/redlining/RedliningFeatureLabelSupport.js +1 -1
- package/plugins/style/CookiePopup.css +1 -1
- package/plugins/style/MapDropImport.css +1 -1
- package/plugins/style/NewsPopup.css +1 -1
- package/plugins/style/Portal.css +3 -3
- package/plugins/style/SensorThingsTool.css +1 -1
- package/reducers/display.js +1 -1
- package/reducers/editing.js +1 -1
- package/reducers/index.js +1 -1
- package/reducers/layerinfo.js +1 -1
- package/reducers/layers.js +1 -1
- package/reducers/localConfig.js +1 -1
- package/reducers/locale.js +1 -1
- package/reducers/locate.js +1 -1
- package/reducers/map.js +2 -2
- package/reducers/measurement.js +1 -1
- package/reducers/processNotifications.js +1 -1
- package/reducers/redlining.js +1 -1
- package/reducers/redliningPick.js +1 -1
- package/reducers/search.js +1 -1
- package/reducers/task.js +1 -1
- package/reducers/theme.js +1 -1
- package/reducers/windows.js +1 -1
- package/scripts/gen-plugin-docs.js +1 -1
- package/scripts/themesConfig.js +1 -1
- package/scripts/themesConfig.py +1 -1
- package/scripts/updateTranslations.js +1 -1
- package/selectors/searchproviders.js +1 -1
- package/static/translations/bg-BG.json +13 -8
- package/static/translations/ca-ES.json +13 -8
- package/static/translations/cs-CZ.json +13 -8
- package/static/translations/de-CH.json +13 -8
- package/static/translations/de-DE.json +13 -8
- package/static/translations/en-US.json +13 -8
- package/static/translations/es-ES.json +13 -8
- package/static/translations/fi-FI.json +13 -8
- package/static/translations/fr-FR.json +19 -14
- package/static/translations/hu-HU.json +13 -8
- package/static/translations/it-IT.json +21 -16
- package/static/translations/ja-JP.json +13 -8
- package/static/translations/nl-NL.json +13 -8
- package/static/translations/no-NO.json +13 -8
- package/static/translations/pl-PL.json +13 -8
- package/static/translations/pt-BR.json +13 -8
- package/static/translations/pt-PT.json +13 -8
- package/static/translations/ro-RO.json +13 -8
- package/static/translations/ru-RU.json +13 -8
- package/static/translations/sv-SE.json +13 -8
- package/static/translations/tr-TR.json +13 -8
- package/static/translations/tsconfig.json +11 -7
- package/static/translations/uk-UA.json +13 -8
- package/stores/StandardStore.js +11 -1
- package/utils/ConfigUtils.js +3 -6
- package/utils/CoordinatesUtils.js +1 -1
- package/utils/DxfUtils.js +1 -1
- package/utils/EditingInterface.js +1 -1
- package/utils/EditingUtils.js +5 -5
- package/utils/ElevationInterface.js +1 -1
- package/utils/FeatureSnapIndex.js +1 -1
- package/utils/FeatureStyles.js +7 -2
- package/utils/FileImportUtils.js +1 -1
- package/utils/IdentifyExporters.js +1 -1
- package/utils/IdentifyUtils.js +4 -2
- package/utils/ImageEditor.js +6 -5
- package/utils/LayerUtils.js +1 -1
- package/utils/LocaleUtils.js +6 -6
- package/utils/MapUtils.js +1 -1
- package/utils/MeasureUtils.js +1 -1
- package/utils/MiscUtils.js +11 -4
- package/utils/PermaLinkUtils.js +38 -16
- package/utils/ResourceRegistry.js +1 -1
- package/utils/RoutingInterface.js +1 -1
- package/utils/SearchProviders.js +1 -1
- package/utils/ServiceLayerUtils.js +1 -1
- package/utils/ThemeUtils.js +1 -1
- package/utils/VectorLayerUtils.js +1 -1
package/actions/display.js
CHANGED
package/actions/editing.js
CHANGED
package/actions/layerinfo.js
CHANGED
package/actions/layers.js
CHANGED
package/actions/localConfig.js
CHANGED
package/actions/locale.js
CHANGED
package/actions/locate.js
CHANGED
package/actions/logging.js
CHANGED
package/actions/map.js
CHANGED
package/actions/measurement.js
CHANGED
package/actions/redlining.js
CHANGED
package/actions/redliningPick.js
CHANGED
package/actions/search.js
CHANGED
package/actions/task.js
CHANGED
package/actions/theme.js
CHANGED
|
@@ -12,7 +12,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
12
12
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
/**
|
|
15
|
-
* Copyright
|
|
15
|
+
* Copyright Sourcepole AG
|
|
16
16
|
* All rights reserved.
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the BSD-style license found in the
|
package/actions/windows.js
CHANGED
|
@@ -11,7 +11,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
11
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
13
|
/**
|
|
14
|
-
* Copyright
|
|
14
|
+
* Copyright Sourcepole AG
|
|
15
15
|
* All rights reserved.
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the BSD-style license found in the
|
package/components/AppMenu.js
CHANGED
|
@@ -19,7 +19,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
19
19
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
20
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
21
|
/**
|
|
22
|
-
* Copyright
|
|
22
|
+
* Copyright Sourcepole AG
|
|
23
23
|
* All rights reserved.
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -26,7 +26,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
26
26
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
27
27
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
28
28
|
/**
|
|
29
|
-
* Copyright
|
|
29
|
+
* Copyright Sourcepole AG
|
|
30
30
|
* All rights reserved.
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -223,6 +223,15 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
|
|
|
223
223
|
_defineProperty(_this, "setRelationTables", function (relationTables) {
|
|
224
224
|
_this.setState({
|
|
225
225
|
relationTables: relationTables
|
|
226
|
+
}, function () {
|
|
227
|
+
if (_this.needRelationValueReload) {
|
|
228
|
+
_this.needRelationValueReload = false;
|
|
229
|
+
_this.loadRelationValues(_this.props.editContext.feature, function (newFeature) {
|
|
230
|
+
_this.props.setEditContext(_this.props.editContext.id, {
|
|
231
|
+
feature: newFeature
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
}
|
|
226
235
|
});
|
|
227
236
|
});
|
|
228
237
|
_defineProperty(_this, "loadRelationValues", function (feature, callback) {
|
|
@@ -255,6 +264,8 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
|
|
|
255
264
|
});
|
|
256
265
|
callback(newFeature);
|
|
257
266
|
}
|
|
267
|
+
} else {
|
|
268
|
+
callback(feature);
|
|
258
269
|
}
|
|
259
270
|
});
|
|
260
271
|
_defineProperty(_this, "addRelationRecord", function (dataset) {
|
|
@@ -290,9 +301,10 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
|
|
|
290
301
|
childEdit: childEdit
|
|
291
302
|
});
|
|
292
303
|
} else {
|
|
304
|
+
var _newRelationValues$da;
|
|
293
305
|
var newRelationValues = _objectSpread({}, _this.props.editContext.feature.relationValues);
|
|
294
306
|
newRelationValues[dataset] = _objectSpread({}, newRelationValues[dataset]);
|
|
295
|
-
newRelationValues[dataset].features = newRelationValues[dataset].features.concat([newRelFeature]);
|
|
307
|
+
newRelationValues[dataset].features = ((_newRelationValues$da = newRelationValues[dataset].features) !== null && _newRelationValues$da !== void 0 ? _newRelationValues$da : []).concat([newRelFeature]);
|
|
296
308
|
var newFeature = _objectSpread(_objectSpread({}, _this.props.editContext.feature), {}, {
|
|
297
309
|
relationValues: newRelationValues
|
|
298
310
|
});
|
|
@@ -389,24 +401,12 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
|
|
|
389
401
|
var idx = (_this$state$childEdit = _this.state.childEdit.idx) !== null && _this$state$childEdit !== void 0 ? _this$state$childEdit : newRelationValues[dataset].features.length;
|
|
390
402
|
newRelationValues[dataset] = _objectSpread({}, newRelationValues[dataset]);
|
|
391
403
|
newRelationValues[dataset].features = newRelationValues[dataset].features.slice(0);
|
|
392
|
-
newRelationValues[dataset].features[idx] =
|
|
393
|
-
__status__: "changed"
|
|
394
|
-
});
|
|
395
|
-
// If feature id is known, i.e. not when drawing new feature, set foreign key
|
|
396
|
-
var changed = _this.props.editContext.changed;
|
|
397
|
-
var relTable = _this.state.relationTables[dataset];
|
|
398
|
-
var fkVal = relTable.pkField ? _this.props.editContext.feature.properties[relTable.pkField] : _this.props.editContext.feature.id;
|
|
399
|
-
var fkField = _this.state.relationTables[dataset].fkField;
|
|
400
|
-
if (_this.props.editContext.action !== "Draw" && feature.properties[fkField] !== fkVal) {
|
|
401
|
-
newRelationValues[dataset].features[idx].properties = _objectSpread(_objectSpread({}, newRelationValues[dataset].features[idx].properties), {}, _defineProperty({}, fkField, fkVal));
|
|
402
|
-
changed = true;
|
|
403
|
-
}
|
|
404
|
+
newRelationValues[dataset].features[idx] = feature;
|
|
404
405
|
var newFeature = _objectSpread(_objectSpread({}, _this.props.editContext.feature), {}, {
|
|
405
406
|
relationValues: newRelationValues
|
|
406
407
|
});
|
|
407
408
|
_this.props.setEditContext(_this.props.editContext.id, {
|
|
408
|
-
feature: newFeature
|
|
409
|
-
changed: changed
|
|
409
|
+
feature: newFeature
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
412
|
_this.setState({
|
|
@@ -426,20 +426,13 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
|
|
|
426
426
|
_this.setState({
|
|
427
427
|
busy: false
|
|
428
428
|
});
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
_this.loadRelationValues(feature, function (newFeature) {
|
|
432
|
-
_this.props.setEditContext(_this.props.editContext.id, {
|
|
433
|
-
feature: newFeature,
|
|
434
|
-
changed: false
|
|
435
|
-
});
|
|
436
|
-
});
|
|
437
|
-
} else {
|
|
429
|
+
// Re-load relation values
|
|
430
|
+
_this.loadRelationValues(feature, function (newFeature) {
|
|
438
431
|
_this.props.setEditContext(_this.props.editContext.id, {
|
|
439
|
-
feature:
|
|
432
|
+
feature: newFeature,
|
|
440
433
|
changed: false
|
|
441
434
|
});
|
|
442
|
-
}
|
|
435
|
+
});
|
|
443
436
|
});
|
|
444
437
|
} else {
|
|
445
438
|
var featureSkel = {
|
|
@@ -754,27 +747,44 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
|
|
|
754
747
|
}
|
|
755
748
|
}
|
|
756
749
|
});
|
|
757
|
-
_defineProperty(_this, "featureCommited", function (success,
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
return (entry.features || []).find(function (f) {
|
|
765
|
-
return f.error;
|
|
766
|
-
});
|
|
767
|
-
}) !== undefined;
|
|
768
|
-
if (relationValueErrors) {
|
|
769
|
-
// Relation values commit failed, switch to pick to avoid adding feature again on next attempt
|
|
770
|
-
_this.commitFinished(false, LocaleUtils.tr("editing.relationcommitfailed"));
|
|
771
|
-
_this.props.setEditContext(_this.props.editContext.id, {
|
|
772
|
-
action: "Pick",
|
|
773
|
-
feature: result,
|
|
774
|
-
changed: true
|
|
750
|
+
_defineProperty(_this, "featureCommited", function (success, featureOrErrmsg) {
|
|
751
|
+
_this.setState({
|
|
752
|
+
busy: false
|
|
753
|
+
});
|
|
754
|
+
if (success) {
|
|
755
|
+
_this.props.refreshLayer(function (layer) {
|
|
756
|
+
return layer.wms_name === _this.props.editContext.mapPrefix;
|
|
775
757
|
});
|
|
758
|
+
_this.props.setCurrentTaskBlocked(false);
|
|
759
|
+
// Check for relation records which failed to commit
|
|
760
|
+
var relationValueErrors = Object.values(featureOrErrmsg.relationValues || []).find(function (entry) {
|
|
761
|
+
return (entry.features || []).find(function (f) {
|
|
762
|
+
return f.error;
|
|
763
|
+
});
|
|
764
|
+
}) !== undefined;
|
|
765
|
+
if (relationValueErrors) {
|
|
766
|
+
// eslint-disable-next-line
|
|
767
|
+
alert(LocaleUtils.tr("editing.relationcommitfailed"));
|
|
768
|
+
// Switch to Pick mode to avoid recommitting new feature
|
|
769
|
+
_this.props.setEditContext(_this.props.editContext.id, {
|
|
770
|
+
action: 'Pick',
|
|
771
|
+
feature: featureOrErrmsg,
|
|
772
|
+
changed: true
|
|
773
|
+
});
|
|
774
|
+
} else {
|
|
775
|
+
_this.loadRelationValues(featureOrErrmsg, function (newFeature) {
|
|
776
|
+
var _this$props$onCommit, _this$props;
|
|
777
|
+
_this.props.setEditContext(_this.props.editContext.id, {
|
|
778
|
+
action: 'Pick',
|
|
779
|
+
feature: newFeature,
|
|
780
|
+
changed: false
|
|
781
|
+
});
|
|
782
|
+
(_this$props$onCommit = (_this$props = _this.props).onCommit) === null || _this$props$onCommit === void 0 || _this$props$onCommit.call(_this$props, newFeature);
|
|
783
|
+
});
|
|
784
|
+
}
|
|
776
785
|
} else {
|
|
777
|
-
|
|
786
|
+
// eslint-disable-next-line
|
|
787
|
+
alert(featureOrErrmsg);
|
|
778
788
|
}
|
|
779
789
|
});
|
|
780
790
|
_defineProperty(_this, "deleteClicked", function () {
|
|
@@ -800,38 +810,6 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
|
|
|
800
810
|
_this.props.setCurrentTaskBlocked(false);
|
|
801
811
|
}
|
|
802
812
|
});
|
|
803
|
-
_defineProperty(_this, "commitFinished", function (success, result) {
|
|
804
|
-
_this.setState({
|
|
805
|
-
busy: false
|
|
806
|
-
});
|
|
807
|
-
if (success) {
|
|
808
|
-
_this.props.refreshLayer(function (layer) {
|
|
809
|
-
return layer.wms_name === _this.props.editContext.mapPrefix;
|
|
810
|
-
});
|
|
811
|
-
_this.props.setCurrentTaskBlocked(false);
|
|
812
|
-
if (!_this.props.onCommit || !_this.props.onCommit(result)) {
|
|
813
|
-
if (!isEmpty(_this.state.relationTables)) {
|
|
814
|
-
// Re-load relation values
|
|
815
|
-
_this.loadRelationValues(result, function (newFeature) {
|
|
816
|
-
_this.props.setEditContext(_this.props.editContext.id, {
|
|
817
|
-
action: 'Pick',
|
|
818
|
-
feature: newFeature,
|
|
819
|
-
changed: false
|
|
820
|
-
});
|
|
821
|
-
});
|
|
822
|
-
} else {
|
|
823
|
-
_this.props.setEditContext(_this.props.editContext.id, {
|
|
824
|
-
action: 'Pick',
|
|
825
|
-
feature: result,
|
|
826
|
-
changed: false
|
|
827
|
-
});
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
} else {
|
|
831
|
-
// eslint-disable-next-line
|
|
832
|
-
alert(result);
|
|
833
|
-
}
|
|
834
|
-
});
|
|
835
813
|
_defineProperty(_this, "deleteFinished", function (success, result) {
|
|
836
814
|
_this.setState({
|
|
837
815
|
busy: false
|
|
@@ -897,13 +875,14 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
|
|
|
897
875
|
});
|
|
898
876
|
});
|
|
899
877
|
_this.form = null;
|
|
878
|
+
_this.needRelationValueReload = false;
|
|
900
879
|
return _this;
|
|
901
880
|
}
|
|
902
881
|
_inherits(AttributeForm, _React$Component);
|
|
903
882
|
return _createClass(AttributeForm, [{
|
|
904
883
|
key: "componentDidUpdate",
|
|
905
884
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
906
|
-
var
|
|
885
|
+
var _prevProps$editContex;
|
|
907
886
|
if (prevProps.editContext.changed !== this.props.editContext.changed) {
|
|
908
887
|
this.props.setCurrentTaskBlocked(this.props.editContext.changed === true, LocaleUtils.tr("editing.unsavedchanged"));
|
|
909
888
|
}
|
|
@@ -913,14 +892,8 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
|
|
|
913
892
|
});
|
|
914
893
|
}
|
|
915
894
|
// Reload relation values if necessary
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
if ((!this.props.editContext.changed || !feature.relationValues) && (this.state.relationTables !== prevState.relationTables || feature.id !== (prevFeature || {}).id)) {
|
|
919
|
-
this.loadRelationValues(this.props.editContext.feature, function (newFeature) {
|
|
920
|
-
_this2.props.setEditContext(_this2.props.editContext.id, {
|
|
921
|
-
feature: newFeature
|
|
922
|
-
});
|
|
923
|
-
});
|
|
895
|
+
if (this.props.editContext.feature !== ((_prevProps$editContex = prevProps.editContext.feature) === null || _prevProps$editContex === void 0 ? void 0 : _prevProps$editContex.id)) {
|
|
896
|
+
this.needRelationValueReload = true;
|
|
924
897
|
}
|
|
925
898
|
if (this.props.editContext.feature !== prevProps.editContext.feature) {
|
|
926
899
|
this.validateForm(this.props.editContext.feature);
|
|
@@ -26,7 +26,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
26
26
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
27
27
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
28
28
|
/**
|
|
29
|
-
* Copyright
|
|
29
|
+
* Copyright Sourcepole AG
|
|
30
30
|
* All rights reserved.
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -23,7 +23,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
23
23
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
24
24
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
25
25
|
/**
|
|
26
|
-
* Copyright
|
|
26
|
+
* Copyright Sourcepole AG
|
|
27
27
|
* All rights reserved.
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -35,6 +35,7 @@ import PropTypes from 'prop-types';
|
|
|
35
35
|
import EditComboField from './EditComboField';
|
|
36
36
|
import EditUploadField from './EditUploadField';
|
|
37
37
|
import NumberInput from './widgets/NumberInput';
|
|
38
|
+
import TextInput from './widgets/TextInput';
|
|
38
39
|
import ToggleSwitch from './widgets/ToggleSwitch';
|
|
39
40
|
import './style/AutoEditForm.css';
|
|
40
41
|
var AutoEditForm = /*#__PURE__*/function (_React$Component) {
|
|
@@ -85,9 +86,7 @@ var AutoEditForm = /*#__PURE__*/function (_React$Component) {
|
|
|
85
86
|
_constraints$keyvalre2 = _slicedToArray(_constraints$keyvalre, 2),
|
|
86
87
|
mapPrefix = _constraints$keyvalre2[0],
|
|
87
88
|
keyvalrel = _constraints$keyvalre2[1];
|
|
88
|
-
input = /*#__PURE__*/React.createElement(
|
|
89
|
-
className: "input-frame"
|
|
90
|
-
}, /*#__PURE__*/React.createElement(EditComboField, {
|
|
89
|
+
input = /*#__PURE__*/React.createElement(EditComboField, {
|
|
91
90
|
editIface: _this.props.iface,
|
|
92
91
|
fieldId: field.id,
|
|
93
92
|
keyvalrel: keyvalrel,
|
|
@@ -98,7 +97,7 @@ var AutoEditForm = /*#__PURE__*/function (_React$Component) {
|
|
|
98
97
|
updateField: _this.props.updateField,
|
|
99
98
|
value: value,
|
|
100
99
|
values: constraints.values
|
|
101
|
-
})
|
|
100
|
+
});
|
|
102
101
|
} else if (field.type === "number") {
|
|
103
102
|
var precision = constraints.step > 0 ? Math.ceil(-Math.log10(constraints.step)) : 0;
|
|
104
103
|
input = /*#__PURE__*/React.createElement(NumberInput, {
|
|
@@ -116,42 +115,26 @@ var AutoEditForm = /*#__PURE__*/function (_React$Component) {
|
|
|
116
115
|
} else if (field.type === "date") {
|
|
117
116
|
// Truncate time portion of ISO date string
|
|
118
117
|
value = value.substr(0, 10);
|
|
119
|
-
input = /*#__PURE__*/React.createElement("
|
|
120
|
-
className: "input-frame"
|
|
121
|
-
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
118
|
+
input = /*#__PURE__*/React.createElement("input", _extends({
|
|
122
119
|
name: field.id,
|
|
123
|
-
type:
|
|
120
|
+
type: "date"
|
|
124
121
|
}, constraints, {
|
|
125
122
|
onChange: function onChange(ev) {
|
|
126
123
|
return _this.props.updateField(field.id, ev.target.value);
|
|
127
124
|
},
|
|
128
125
|
value: value
|
|
129
|
-
}))
|
|
126
|
+
}));
|
|
130
127
|
} else if (field.type === "text") {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
} else {
|
|
142
|
-
input = /*#__PURE__*/React.createElement("span", {
|
|
143
|
-
className: "input-frame"
|
|
144
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
145
|
-
name: field.id,
|
|
146
|
-
onChange: function onChange(ev) {
|
|
147
|
-
return _this.props.updateField(field.id, ev.target.value);
|
|
148
|
-
},
|
|
149
|
-
readOnly: readOnly,
|
|
150
|
-
required: constraints.required,
|
|
151
|
-
type: field.type,
|
|
152
|
-
value: value
|
|
153
|
-
}));
|
|
154
|
-
}
|
|
128
|
+
input = /*#__PURE__*/React.createElement(TextInput, {
|
|
129
|
+
multiline: multiline,
|
|
130
|
+
name: field.id,
|
|
131
|
+
onChange: function onChange(text) {
|
|
132
|
+
return _this.props.updateField(field.id, text);
|
|
133
|
+
},
|
|
134
|
+
readOnly: readOnly,
|
|
135
|
+
required: constraints.required,
|
|
136
|
+
value: value
|
|
137
|
+
});
|
|
155
138
|
} else if (field.type === "file") {
|
|
156
139
|
input = /*#__PURE__*/React.createElement(EditUploadField, {
|
|
157
140
|
constraints: constraints,
|
|
@@ -163,9 +146,7 @@ var AutoEditForm = /*#__PURE__*/function (_React$Component) {
|
|
|
163
146
|
value: value
|
|
164
147
|
});
|
|
165
148
|
} else {
|
|
166
|
-
input = /*#__PURE__*/React.createElement("
|
|
167
|
-
className: "input-frame"
|
|
168
|
-
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
149
|
+
input = /*#__PURE__*/React.createElement("input", _extends({
|
|
169
150
|
name: field.id,
|
|
170
151
|
type: field.type
|
|
171
152
|
}, constraints, {
|
|
@@ -173,7 +154,7 @@ var AutoEditForm = /*#__PURE__*/function (_React$Component) {
|
|
|
173
154
|
return _this.props.updateField(field.id, ev.target.value);
|
|
174
155
|
},
|
|
175
156
|
value: value
|
|
176
|
-
}))
|
|
157
|
+
}));
|
|
177
158
|
}
|
|
178
159
|
return /*#__PURE__*/React.createElement("tr", {
|
|
179
160
|
key: field.id
|
|
@@ -13,7 +13,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
/**
|
|
16
|
-
* Copyright
|
|
16
|
+
* Copyright Sourcepole AG
|
|
17
17
|
* All rights reserved.
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -19,7 +19,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
19
19
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
20
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
21
|
/**
|
|
22
|
-
* Copyright
|
|
22
|
+
* Copyright Sourcepole AG
|
|
23
23
|
* All rights reserved.
|
|
24
24
|
*
|
|
25
25
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -14,7 +14,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
14
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
16
|
/**
|
|
17
|
-
* Copyright
|
|
17
|
+
* Copyright Sourcepole AG
|
|
18
18
|
* All rights reserved.
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -195,8 +195,6 @@ var EditUploadField = /*#__PURE__*/function (_React$Component) {
|
|
|
195
195
|
});
|
|
196
196
|
_this.cameraStream = null;
|
|
197
197
|
_this.videoElement = null;
|
|
198
|
-
_this.portal = document.createElement("div");
|
|
199
|
-
document.body.appendChild(_this.portal);
|
|
200
198
|
return _this;
|
|
201
199
|
}
|
|
202
200
|
_inherits(EditUploadField, _React$Component);
|
|
@@ -15,7 +15,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
15
15
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
16
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
17
|
/**
|
|
18
|
-
* Copyright
|
|
18
|
+
* Copyright Sourcepole AG
|
|
19
19
|
* All rights reserved.
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -25,7 +25,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
25
25
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
26
26
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
27
27
|
/**
|
|
28
|
-
* Copyright
|
|
28
|
+
* Copyright Sourcepole AG
|
|
29
29
|
* All rights reserved.
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -13,7 +13,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
/**
|
|
16
|
-
* Copyright
|
|
16
|
+
* Copyright Sourcepole AG
|
|
17
17
|
* All rights reserved.
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the BSD-style license found in the
|
package/components/Icon.js
CHANGED
|
@@ -13,7 +13,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
13
13
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
/**
|
|
16
|
-
* Copyright
|
|
16
|
+
* Copyright Sourcepole AG
|
|
17
17
|
* All rights reserved.
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -25,7 +25,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
25
25
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
26
26
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
27
27
|
/**
|
|
28
|
-
* Copyright
|
|
28
|
+
* Copyright Sourcepole AG
|
|
29
29
|
* All rights reserved.
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the BSD-style license found in the
|