qwc2 2026.8.5 → 2026.8.7

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.
@@ -87,6 +87,13 @@ var AppMenu = /*#__PURE__*/function (_React$Component) {
87
87
  if (_this.menuEl && !_this.menuEl.contains(ev.target) && _this.props.menuDisplayMode === "normal") {
88
88
  _this.toggleMenu();
89
89
  MiscUtils.killEvent(ev);
90
+ _this.killClick = true;
91
+ }
92
+ });
93
+ _defineProperty(_this, "checkKillClick", function (ev) {
94
+ if (_this.killClick) {
95
+ MiscUtils.killEvent(ev);
96
+ _this.killClick = undefined;
90
97
  }
91
98
  });
92
99
  _defineProperty(_this, "onSubmenuClicked", function (key, level) {
@@ -242,6 +249,9 @@ var AppMenu = /*#__PURE__*/function (_React$Component) {
242
249
  if (this.props.appMenuShortcut) {
243
250
  mousetrap.bind(this.props.appMenuShortcut, this.toggleMenu);
244
251
  }
252
+ document.addEventListener('click', this.checkKillClick, {
253
+ capture: true
254
+ });
245
255
  }
246
256
  }, {
247
257
  key: "componentDidUpdate",
@@ -255,10 +265,14 @@ var AppMenu = /*#__PURE__*/function (_React$Component) {
255
265
  }, 400);
256
266
  // Delay one cycle
257
267
  setTimeout(function () {
258
- return document.addEventListener('click', _this2.checkCloseMenu);
268
+ return document.addEventListener('pointerdown', _this2.checkCloseMenu, {
269
+ capture: true
270
+ });
259
271
  }, 0);
260
272
  } else if (prevState.menuVisible && !this.state.menuVisible) {
261
- document.removeEventListener('click', this.checkCloseMenu);
273
+ document.removeEventListener('pointerdown', this.checkCloseMenu, {
274
+ capture: true
275
+ });
262
276
  }
263
277
  }
264
278
  }, {
@@ -270,7 +284,12 @@ var AppMenu = /*#__PURE__*/function (_React$Component) {
270
284
  if (this.props.appMenuShortcut) {
271
285
  mousetrap.unbind(this.props.appMenuShortcut, this.toggleMenu);
272
286
  }
273
- document.removeEventListener('click', this.checkCloseMenu);
287
+ document.removeEventListener('pointerdown', this.checkCloseMenu, {
288
+ capture: true
289
+ });
290
+ document.removeEventListener('click', this.checkKillClick, {
291
+ capture: true
292
+ });
274
293
  }
275
294
  }, {
276
295
  key: "render",
@@ -575,6 +575,10 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
575
575
  // Ensure numeric values are numbers and not strings
576
576
  value = Number(value);
577
577
  }
578
+ if (nrelFieldConfig.type === 'boolean' && value !== null && typeof value === "string") {
579
+ // Ensure boolean values are bools
580
+ value = value.trim().toLowerCase() === "true";
581
+ }
578
582
 
579
583
  // relationValues for table must exist as rows are either pre-existing or were added
580
584
  if (!(field in relationValues[datasetname].features[index].properties)) {
@@ -621,6 +625,10 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
621
625
  // Ensure numeric values are numbers and not strings
622
626
  value = Number(value);
623
627
  }
628
+ if (fieldConfig.type === 'boolean' && value !== null && typeof value === "string") {
629
+ // Ensure boolean values are bools
630
+ value = value.trim().toLowerCase() === "true";
631
+ }
624
632
  if (!(name in feature.properties)) {
625
633
  feature.defaultedProperties = [].concat(_toConsumableArray(feature.defaultedProperties || []), [name]);
626
634
  }
@@ -1,7 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
3
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
6
4
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
7
5
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
@@ -210,18 +208,21 @@ var EditUploadField = /*#__PURE__*/function (_React$Component) {
210
208
  }, {
211
209
  key: "render",
212
210
  value: function render() {
213
- var _this$state$imageData2,
211
+ var _this$props$constrain,
212
+ _this$props$constrain2,
213
+ _this$state$imageData2,
214
214
  _fileType$startsWith2,
215
215
  _this2 = this;
216
216
  var isAttachment = this.props.value.startsWith("attachment:");
217
217
  var fileValue = isAttachment ? this.props.value.replace(/attachment:\/\//, '') : this.props.value;
218
218
  var fileType = mime.lookup(fileValue);
219
219
  var fileUrl = isAttachment ? this.props.iface.resolveAttachmentUrl(this.props.dataset, fileValue) : fileValue;
220
- var constraints = _objectSpread(_objectSpread({}, this.props.constraints), {}, {
221
- accept: (this.props.constraints.accept || "").split(",").map(function (ext) {
220
+ var constraints = {
221
+ required: (_this$props$constrain = this.props.constraints) === null || _this$props$constrain === void 0 ? void 0 : _this$props$constrain.required,
222
+ accept: (((_this$props$constrain2 = this.props.constraints) === null || _this$props$constrain2 === void 0 ? void 0 : _this$props$constrain2.accept) || "").split(",").map(function (ext) {
222
223
  return mime.lookup(ext);
223
224
  }).join(",")
224
- });
225
+ };
225
226
  var mediaSupport = 'mediaDevices' in navigator && constraints.accept.split(",").includes("image/jpeg");
226
227
  var imageData = (_this$state$imageData2 = this.state.imageData) !== null && _this$state$imageData2 !== void 0 ? _this$state$imageData2 : fileType !== null && fileType !== void 0 && (_fileType$startsWith2 = fileType.startsWith) !== null && _fileType$startsWith2 !== void 0 && _fileType$startsWith2.call(fileType, 'image/') ? fileUrl : null;
227
228
  if (imageData) {
@@ -309,7 +309,8 @@ var BuiltinExporters = [{
309
309
  }
310
310
  features.forEach(function (feature) {
311
311
  var row = exportAttrs.map(function (attr) {
312
- return feature.properties[attr];
312
+ var value = feature.properties[attr];
313
+ return MiscUtils.isNumeric(value) ? Number(value) : value;
313
314
  });
314
315
  if (feature.geometry) {
315
316
  var geomWkt = VectorLayerUtils.geoJSONGeomToWkt(feature.geometry);
@@ -984,7 +985,9 @@ var IdentifyViewer = /*#__PURE__*/function (_React$Component) {
984
985
  var exporters = Object.fromEntries(_this.getExporters().map(function (exporter) {
985
986
  return [exporter.id, exporter];
986
987
  }));
987
- var enabledExporters = Array.isArray(_this.props.enableExport) ? _this.props.enableExport : Object.keys(exporters);
988
+ var enabledExporters = Array.isArray(_this.props.enableExport) ? _this.props.enableExport.filter(function (id) {
989
+ return id in exporters;
990
+ }) : Object.keys(exporters);
988
991
  var clipboardExportDisabled = ((_exporters$_this$stat = exporters[_this.state.exportFormat]) === null || _exporters$_this$stat === void 0 ? void 0 : _exporters$_this$stat.allowClipboard) !== true;
989
992
  return /*#__PURE__*/React.createElement("div", {
990
993
  className: "identify-settings-menu"
@@ -31,6 +31,7 @@ import { getFeatureTemplate } from '../utils/EditingUtils';
31
31
  import LocaleUtils from '../utils/LocaleUtils';
32
32
  import MapUtils from '../utils/MapUtils';
33
33
  import AttributeForm from './AttributeForm';
34
+ import Icon from './Icon';
34
35
  import './style/LinkFeatureForm.css';
35
36
  var LinkFeatureForm = /*#__PURE__*/function (_React$Component) {
36
37
  function LinkFeatureForm() {
@@ -203,7 +204,9 @@ var LinkFeatureForm = /*#__PURE__*/function (_React$Component) {
203
204
  }, /*#__PURE__*/React.createElement("button", {
204
205
  className: "button",
205
206
  onClick: this.close
206
- }, LocaleUtils.tr("common.close"))));
207
+ }, /*#__PURE__*/React.createElement(Icon, {
208
+ icon: "remove"
209
+ }), LocaleUtils.tr("common.close"))));
207
210
  } else if (editContext.feature) {
208
211
  var drawing = editContext.action === 'Draw' && !editContext.feature.geometry && this.props.editConfig.geomType;
209
212
  return /*#__PURE__*/React.createElement("div", {
@@ -223,7 +226,9 @@ var LinkFeatureForm = /*#__PURE__*/function (_React$Component) {
223
226
  }, /*#__PURE__*/React.createElement("button", {
224
227
  className: "button",
225
228
  onClick: this.close
226
- }, editContext.action === 'Draw' ? LocaleUtils.tr("common.cancel") : LocaleUtils.tr("common.close"))));
229
+ }, /*#__PURE__*/React.createElement(Icon, {
230
+ icon: "remove"
231
+ }), editContext.action === 'Draw' ? LocaleUtils.tr("common.cancel") : LocaleUtils.tr("common.close"))));
227
232
  } else {
228
233
  return null;
229
234
  }
@@ -5,7 +5,6 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
5
5
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
6
6
  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; } }
7
7
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
8
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
9
8
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
9
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
10
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -78,6 +77,12 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
78
77
  _defineProperty(_this, "state", {
79
78
  reevaluate: 0
80
79
  });
80
+ _defineProperty(_this, "isVertical", function (orientation) {
81
+ return orientation === "Qt::Vertical" || orientation === "Qt::Orientation::Vertical";
82
+ });
83
+ _defineProperty(_this, "isHorizontal", function (orientation) {
84
+ return orientation === "Qt::Horizontal" || orientation === "Qt::Orientation::Horizontal";
85
+ });
81
86
  _defineProperty(_this, "renderLayout", function (layout, feature, editConfig, updateField) {
82
87
  var _this$props$editConfi;
83
88
  var nametransform = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function (name) {
@@ -110,6 +115,9 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
110
115
  };
111
116
  } else if (layout["class"] === "QVBoxLayout") {
112
117
  containerClass = "qt-designer-layout-grid";
118
+ containerStyle = {
119
+ gridTemplateRows: _this.computeLayoutRows(layout.item, true).join(" ")
120
+ };
113
121
  itemStyle = function itemStyle(item, idx) {
114
122
  return {
115
123
  gridArea: 1 + idx + "/1/ span 1/ span 1"
@@ -138,7 +146,8 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
138
146
  containerStyle.display = 'none';
139
147
  }
140
148
  if (layout.item.find(function (item) {
141
- return item.spacer && (item.spacer.property || {}).orientation === "Qt::Vertical";
149
+ var _item$spacer$property;
150
+ return item.spacer && _this.isVertical((_item$spacer$property = item.spacer.property) === null || _item$spacer$property === void 0 ? void 0 : _item$spacer$property.orientation);
142
151
  })) {
143
152
  containerStyle.height = '100%';
144
153
  }
@@ -172,18 +181,14 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
172
181
  var useIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
173
182
  var columns = [];
174
183
  var hasAuto = false;
175
- var hasSpacer = items.find(function (item) {
176
- var _item$spacer;
177
- return ((_item$spacer = item.spacer) === null || _item$spacer === void 0 || (_item$spacer = _item$spacer.property) === null || _item$spacer === void 0 ? void 0 : _item$spacer.orientation) === "Qt::Horizontal";
178
- });
179
184
  items.forEach(function (item, index) {
180
- var _item$spacer2, _item$widget;
185
+ var _item$spacer, _item$widget;
181
186
  var col = useIndex ? index : parseInt(item.column, 10) || 0;
182
187
  var colSpan = useIndex ? 1 : parseInt(item.colspan, 10) || 1;
183
- if (((_item$spacer2 = item.spacer) === null || _item$spacer2 === void 0 || (_item$spacer2 = _item$spacer2.property) === null || _item$spacer2 === void 0 ? void 0 : _item$spacer2.orientation) === "Qt::Horizontal") {
184
- columns[col] = 'auto';
188
+ if (_this.isHorizontal((_item$spacer = item.spacer) === null || _item$spacer === void 0 || (_item$spacer = _item$spacer.property) === null || _item$spacer === void 0 ? void 0 : _item$spacer.orientation)) {
189
+ columns[col] = '1fr';
185
190
  hasAuto = true;
186
- } else if (!hasSpacer && !hFitWidgets.includes((_item$widget = item.widget) === null || _item$widget === void 0 ? void 0 : _item$widget["class"]) && colSpan === 1) {
191
+ } else if (!hFitWidgets.includes((_item$widget = item.widget) === null || _item$widget === void 0 ? void 0 : _item$widget["class"]) && colSpan === 1) {
187
192
  columns[col] = 'auto';
188
193
  hasAuto = true;
189
194
  } else {
@@ -200,20 +205,18 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
200
205
  _defineProperty(_this, "computeLayoutRows", function (items) {
201
206
  var useIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
202
207
  var rows = [];
203
- var hasSpacer = items.find(function (item) {
204
- var _item$spacer3;
205
- return ((_item$spacer3 = item.spacer) === null || _item$spacer3 === void 0 || (_item$spacer3 = _item$spacer3.property) === null || _item$spacer3 === void 0 ? void 0 : _item$spacer3.orientation) === "Qt::Vertical";
206
- });
207
208
  items.forEach(function (item, index) {
208
- var _item$spacer4, _item$widget2, _item$widget2$startsW, _item$widget$layout, _item$widget3, _item$widget5;
209
+ var _item$spacer2, _item$widget$layout, _item$widget2, _item$widget4, _item$widget4$startsW, _item$widget5;
209
210
  var row = useIndex ? index : parseInt(item.row, 10) || 0;
210
211
  var rowSpan = useIndex ? 1 : parseInt(item.rowspan, 10) || 1;
211
- if (((_item$spacer4 = item.spacer) === null || _item$spacer4 === void 0 || (_item$spacer4 = _item$spacer4.property) === null || _item$spacer4 === void 0 ? void 0 : _item$spacer4.orientation) === "Qt::Vertical" || (_item$widget2 = item.widget) !== null && _item$widget2 !== void 0 && (_item$widget2 = _item$widget2.name) !== null && _item$widget2 !== void 0 && (_item$widget2$startsW = _item$widget2.startsWith) !== null && _item$widget2$startsW !== void 0 && _item$widget2$startsW.call(_item$widget2, "nrel_")) {
212
+ if (_this.isVertical((_item$spacer2 = item.spacer) === null || _item$spacer2 === void 0 || (_item$spacer2 = _item$spacer2.property) === null || _item$spacer2 === void 0 ? void 0 : _item$spacer2.orientation)) {
213
+ rows[row] = '1fr';
214
+ } else if ((_item$widget$layout = (_item$widget2 = item.widget) === null || _item$widget2 === void 0 ? void 0 : _item$widget2.layout) !== null && _item$widget$layout !== void 0 ? _item$widget$layout : item.layout) {
215
+ var _item$widget3, _item$layout;
216
+ rows[row] = (_item$widget3 = item.widget) !== null && _item$widget3 !== void 0 && (_item$widget3 = _item$widget3.layout) !== null && _item$widget3 !== void 0 && _item$widget3.verticalFill || (_item$layout = item.layout) !== null && _item$layout !== void 0 && _item$layout.verticalFill ? 'auto' : null; // Placeholder replaced by fit-content below
217
+ } else if ((_item$widget4 = item.widget) !== null && _item$widget4 !== void 0 && (_item$widget4 = _item$widget4.name) !== null && _item$widget4 !== void 0 && (_item$widget4$startsW = _item$widget4.startsWith) !== null && _item$widget4$startsW !== void 0 && _item$widget4$startsW.call(_item$widget4, "nrel_")) {
212
218
  rows[row] = 'auto';
213
- } else if ((_item$widget$layout = (_item$widget3 = item.widget) === null || _item$widget3 === void 0 ? void 0 : _item$widget3.layout) !== null && _item$widget$layout !== void 0 ? _item$widget$layout : item.layout) {
214
- var _item$widget4, _item$layout;
215
- rows[row] = (_item$widget4 = item.widget) !== null && _item$widget4 !== void 0 && (_item$widget4 = _item$widget4.layout) !== null && _item$widget4 !== void 0 && _item$widget4.verticalFill || (_item$layout = item.layout) !== null && _item$layout !== void 0 && _item$layout.verticalFill ? 'auto' : null; // Placeholder replaced by fit-content below
216
- } else if (!hasSpacer && !vFitWidgets.includes((_item$widget5 = item.widget) === null || _item$widget5 === void 0 ? void 0 : _item$widget5["class"]) && rowSpan === 1) {
219
+ } else if (!vFitWidgets.includes((_item$widget5 = item.widget) === null || _item$widget5 === void 0 ? void 0 : _item$widget5["class"]) && rowSpan === 1) {
217
220
  rows[row] = 'auto';
218
221
  } else {
219
222
  var _rows$row;
@@ -241,11 +244,10 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
241
244
  var attr = widget.attribute || {};
242
245
  var fieldname = widget.name.replace(/kvrel__/, '').split("__")[isRelWidget ? 1 : 0];
243
246
  var field = fields[fieldname];
244
- var fieldConstraints = (field === null || field === void 0 ? void 0 : field.constraints) || {};
245
- var inputConstraints = {};
246
- inputConstraints.readOnly = _this.props.readOnly || String(prop.readOnly) === "true" || String(prop.enabled) === "false" || fieldConstraints.readOnly === true || disabled;
247
- inputConstraints.required = !inputConstraints.readOnly && (String(prop.required) === "true" || String(fieldConstraints.required) === "true");
248
- inputConstraints.placeholder = prop.placeholderText || fieldConstraints.placeholder || "";
247
+ var constraints = (field === null || field === void 0 ? void 0 : field.constraints) || {};
248
+ constraints.readOnly = _this.props.readOnly || constraints.readOnly === true || String(prop.readOnly) === "true" || String(prop.enabled) === "false" || disabled;
249
+ constraints.required = !constraints.readOnly && (constraints.required || String(prop.required) === "true");
250
+ constraints.placeholder = prop.placeholderText || constraints.placeholder || "";
249
251
  var fontProps = prop.font || {};
250
252
  var fontStyle = {
251
253
  fontWeight: String(fontProps.bold) === "true" ? "bold" : "normal",
@@ -269,16 +271,16 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
269
271
  if (widget.name.startsWith("ext__")) {
270
272
  updateField = null;
271
273
  value = _this.state.formData.externalFields[widget.name.slice(5)];
272
- inputConstraints.readOnly = true;
274
+ constraints.readOnly = true;
273
275
  } else {
274
276
  elname = nametransform(widget.name);
275
277
  }
276
278
  if (widget.component) {
277
279
  return /*#__PURE__*/React.createElement(widget.component, {
278
280
  addRelationRecord: _this.props.addRelationRecord,
281
+ constraints: constraints,
279
282
  editConfigs: _this.props.editConfigs,
280
283
  feature: _this.props.feature,
281
- inputConstraints: inputConstraints,
282
284
  mapPrefix: _this.props.mapPrefix,
283
285
  name: elname,
284
286
  onChange: function onChange(val) {
@@ -315,7 +317,7 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
315
317
  }
316
318
  } else if (widget["class"] === "Line") {
317
319
  var _widget$property;
318
- var linetype = ((_widget$property = widget.property) === null || _widget$property === void 0 ? void 0 : _widget$property.orientation) === "Qt::Vertical" ? "vline" : "hline";
320
+ var linetype = _this.isVertical((_widget$property = widget.property) === null || _widget$property === void 0 ? void 0 : _widget$property.orientation) ? "vline" : "hline";
319
321
  return /*#__PURE__*/React.createElement("div", {
320
322
  className: "qt-designer-form-" + linetype
321
323
  });
@@ -411,17 +413,19 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
411
413
  }, value);
412
414
  } else {
413
415
  var addLinkAnchors = ConfigUtils.getConfigProp("editingAddLinkAnchors") !== false;
414
- return /*#__PURE__*/React.createElement(TextInput, _extends({
416
+ return /*#__PURE__*/React.createElement(TextInput, {
415
417
  addLinkAnchors: addLinkAnchors,
416
418
  multiline: true,
417
419
  name: elname,
418
420
  onChange: function onChange(val) {
419
421
  return updateField(widget.name, val);
420
- }
421
- }, inputConstraints, {
422
+ },
423
+ placeholder: constraints.placeholder,
424
+ readOnly: constraints.readOnly,
425
+ required: constraints.required,
422
426
  style: fontStyle,
423
427
  value: String(value)
424
- }));
428
+ });
425
429
  }
426
430
  } else if (widget["class"] === "QLineEdit") {
427
431
  if (widget.name.endsWith("__upload")) {
@@ -429,14 +433,14 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
429
433
  var fieldId = widget.name.replace(/__upload/, '');
430
434
  var uploadValue = ((_feature$properties4 = feature.properties) === null || _feature$properties4 === void 0 ? void 0 : _feature$properties4[fieldId]) || "";
431
435
  var uploadElName = elname.replace(/__upload/, '');
432
- var constraints = {
436
+ var widgetConstraints = {
433
437
  accept: prop.text || "",
434
- required: inputConstraints.required
438
+ required: constraints.required
435
439
  };
436
440
  return /*#__PURE__*/React.createElement(EditUploadField, {
437
- constraints: constraints,
441
+ constraints: widgetConstraints,
438
442
  dataset: editConfig.editDataset,
439
- disabled: inputConstraints.readOnly,
443
+ disabled: constraints.readOnly,
440
444
  fieldId: fieldId,
441
445
  iface: _this.props.iface,
442
446
  name: uploadElName,
@@ -446,8 +450,8 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
446
450
  });
447
451
  } else {
448
452
  var _feature$properties$w4, _feature$properties5;
449
- if (fieldConstraints.prec !== undefined && typeof value === 'number') {
450
- value = value.toFixed(fieldConstraints.prec);
453
+ if (constraints.prec !== undefined && typeof value === 'number') {
454
+ value = value.toFixed(constraints.prec);
451
455
  } else if (value === "" && ((_feature$properties$w4 = (_feature$properties5 = feature.properties) === null || _feature$properties5 === void 0 ? void 0 : _feature$properties5[widget.name]) !== null && _feature$properties$w4 !== void 0 ? _feature$properties$w4 : null) === null) {
452
456
  var _ConfigUtils$getConfi2;
453
457
  value = (_ConfigUtils$getConfi2 = ConfigUtils.getConfigProp("editTextNullValue")) !== null && _ConfigUtils$getConfi2 !== void 0 ? _ConfigUtils$getConfi2 : "";
@@ -455,21 +459,23 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
455
459
  if (_this.props.report) {
456
460
  return /*#__PURE__*/React.createElement("div", {
457
461
  style: fontStyle
458
- }, value || inputConstraints.placeholder);
462
+ }, value || constraints.placeholder);
459
463
  } else {
460
464
  var _addLinkAnchors = ConfigUtils.getConfigProp("editingAddLinkAnchors") !== false;
461
465
  var editTextNullValue = ConfigUtils.getConfigProp("editTextNullValue");
462
- return /*#__PURE__*/React.createElement(TextInput, _extends({
466
+ return /*#__PURE__*/React.createElement(TextInput, {
463
467
  addLinkAnchors: _addLinkAnchors,
464
468
  clearValue: editTextNullValue,
465
469
  name: elname,
466
470
  onChange: function onChange(val) {
467
471
  return updateField(widget.name, val);
468
- }
469
- }, inputConstraints, {
472
+ },
473
+ placeholder: constraints.placeholder,
474
+ readOnly: constraints.readOnly,
475
+ required: constraints.required,
470
476
  style: fontStyle,
471
477
  value: String(value)
472
- }));
478
+ });
473
479
  }
474
480
  }
475
481
  } else if (widget["class"] === "QCheckBox" || widget["class"] === "QRadioButton") {
@@ -479,17 +485,17 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
479
485
  var checked = inGroup ? ((_this$props$feature$p = _this.props.feature.properties) === null || _this$props$feature$p === void 0 ? void 0 : _this$props$feature$p[_this.groupOrName(widget)]) === widget.name : value;
480
486
  return /*#__PURE__*/React.createElement("label", {
481
487
  style: fontStyle
482
- }, /*#__PURE__*/React.createElement("input", _extends({
488
+ }, /*#__PURE__*/React.createElement("input", {
483
489
  checked: checked,
484
- disabled: inputConstraints.readOnly,
490
+ disabled: constraints.readOnly,
485
491
  name: nametransform(_this.groupOrName(widget)),
486
492
  onChange: function onChange(ev) {
487
493
  return updateField(_this.groupOrName(widget), inGroup ? widget.name : ev.target.checked);
488
- }
489
- }, inputConstraints, {
494
+ },
495
+ required: constraints.required,
490
496
  type: type,
491
497
  value: widget.name
492
- })), widget.property.text);
498
+ }), widget.property.text);
493
499
  } else if (widget["class"] === "QComboBox") {
494
500
  var parts = widget.name.split("__");
495
501
  if ((parts.length === 5 || parts.length === 6) && parts[0] === "kvrel") {
@@ -517,33 +523,34 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
517
523
  mapPrefix: _this.props.mapPrefix,
518
524
  multiSelect: widget.property.allowMulti === true || widget.allowMulti === "true",
519
525
  name: nametransform(_fieldId),
520
- placeholder: inputConstraints.placeholder,
521
- readOnly: inputConstraints.readOnly || fieldConstraints.readOnly,
522
- required: inputConstraints.required || fieldConstraints.required,
523
- showAdd: fieldConstraints.showAdd,
524
- showEdit: fieldConstraints.showEdit,
526
+ placeholder: constraints.placeholder,
527
+ readOnly: constraints.readOnly,
528
+ required: constraints.required,
529
+ showAdd: constraints.showAdd,
530
+ showEdit: constraints.showEdit,
525
531
  style: fontStyle,
526
532
  switchEditContext: _this.props.switchEditContext,
527
533
  updateField: updateField,
528
534
  value: value
529
535
  });
530
536
  } else {
531
- var values = MiscUtils.ensureArray(widget.item || []).map(function (item) {
537
+ var _constraints$values;
538
+ var values = widget.item ? MiscUtils.ensureArray(widget.item).map(function (item) {
532
539
  var _item$property$value;
533
540
  return {
534
541
  label: item.property.text,
535
542
  value: (_item$property$value = item.property.value) !== null && _item$property$value !== void 0 ? _item$property$value : item.property.text
536
543
  };
537
- });
544
+ }) : (_constraints$values = constraints.values) !== null && _constraints$values !== void 0 ? _constraints$values : [];
538
545
  return /*#__PURE__*/React.createElement(EditComboField, {
539
546
  editIface: _this.props.iface,
540
547
  fieldId: widget.name,
541
548
  key: widget.name,
542
549
  mapPrefix: _this.props.mapPrefix,
543
550
  name: elname,
544
- placeholder: inputConstraints.placeholder,
545
- readOnly: inputConstraints.readOnly || inputConstraints.readOnly,
546
- required: inputConstraints.required || inputConstraints.required,
551
+ placeholder: constraints.placeholder,
552
+ readOnly: constraints.readOnly,
553
+ required: constraints.required,
547
554
  style: fontStyle,
548
555
  updateField: updateField,
549
556
  value: value,
@@ -556,67 +563,75 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
556
563
  var f = parseFloat(x);
557
564
  return isNaN(f) ? undefined : f;
558
565
  };
559
- var min = floatConstraint((_prop$minimum = prop.minimum) !== null && _prop$minimum !== void 0 ? _prop$minimum : fieldConstraints.min);
560
- var max = floatConstraint((_prop$maximum = prop.maximum) !== null && _prop$maximum !== void 0 ? _prop$maximum : fieldConstraints.max);
561
- var step = (_ref = (_prop$singleStep = prop.singleStep) !== null && _prop$singleStep !== void 0 ? _prop$singleStep : fieldConstraints.step) !== null && _ref !== void 0 ? _ref : 1;
566
+ var min = floatConstraint((_prop$minimum = prop.minimum) !== null && _prop$minimum !== void 0 ? _prop$minimum : constraints.min);
567
+ var max = floatConstraint((_prop$maximum = prop.maximum) !== null && _prop$maximum !== void 0 ? _prop$maximum : constraints.max);
568
+ var step = (_ref = (_prop$singleStep = prop.singleStep) !== null && _prop$singleStep !== void 0 ? _prop$singleStep : constraints.step) !== null && _ref !== void 0 ? _ref : 1;
562
569
  var precision = (_prop$decimals = prop.decimals) !== null && _prop$decimals !== void 0 ? _prop$decimals : 0;
563
570
  if (widget["class"] === "QSlider") {
564
- return /*#__PURE__*/React.createElement("input", _extends({
571
+ return /*#__PURE__*/React.createElement("input", {
565
572
  max: max,
566
573
  min: min,
567
574
  name: elname,
568
575
  onChange: function onChange(ev) {
569
576
  return updateField(widget.name, ev.target.value);
570
- }
571
- }, inputConstraints, {
577
+ },
578
+ placeholder: constraints.placeholder,
579
+ readOnly: constraints.readOnly,
580
+ required: constraints.required,
572
581
  size: 5,
573
582
  step: step,
574
583
  style: fontStyle,
575
584
  type: "range",
576
585
  value: value
577
- }));
586
+ });
578
587
  } else {
579
588
  var _feature$properties6;
580
- return /*#__PURE__*/React.createElement(NumberInput, _extends({
589
+ return /*#__PURE__*/React.createElement(NumberInput, {
581
590
  decimals: precision,
582
591
  max: max,
583
592
  min: min,
584
593
  name: elname,
585
594
  onChange: function onChange(val) {
586
595
  return updateField(widget.name, val);
587
- }
588
- }, inputConstraints, {
596
+ },
597
+ placeholder: constraints.placeholder,
598
+ readOnly: constraints.readOnly,
599
+ required: constraints.required,
589
600
  step: step,
590
601
  style: fontStyle,
591
602
  value: (_feature$properties6 = feature.properties) === null || _feature$properties6 === void 0 ? void 0 : _feature$properties6[widget.name]
592
- }));
603
+ });
593
604
  }
594
605
  } else if (widget["class"] === "QDateEdit") {
595
606
  var _min = prop.minimumDate ? _this.dateConstraint(prop.minimumDate) : "1600-01-01";
596
607
  var _max = prop.maximumDate ? _this.dateConstraint(prop.maximumDate) : "9999-12-31";
597
- return /*#__PURE__*/React.createElement("input", _extends({
608
+ return /*#__PURE__*/React.createElement("input", {
598
609
  max: _max,
599
610
  min: _min,
600
611
  name: elname,
601
612
  onChange: function onChange(ev) {
602
613
  return updateField(widget.name, ev.target.value);
603
- }
604
- }, inputConstraints, {
614
+ },
615
+ placeholder: constraints.placeholder,
616
+ readOnly: constraints.readOnly,
617
+ required: constraints.required,
605
618
  style: fontStyle,
606
619
  type: "date",
607
620
  value: value.split("T")[0]
608
- }));
621
+ });
609
622
  } else if (widget["class"] === "QTimeEdit") {
610
- return /*#__PURE__*/React.createElement("input", _extends({
623
+ return /*#__PURE__*/React.createElement("input", {
611
624
  name: elname,
612
625
  onChange: function onChange(ev) {
613
626
  return updateField(widget.name, ev.target.value);
614
- }
615
- }, inputConstraints, {
627
+ },
628
+ placeholder: constraints.placeholder,
629
+ readOnly: constraints.readOnly,
630
+ required: constraints.required,
616
631
  style: fontStyle,
617
632
  type: "time",
618
633
  value: value
619
- }));
634
+ });
620
635
  } else if (widget["class"] === "QDateTimeEdit") {
621
636
  var _min2 = prop.minimumDate ? _this.dateConstraint(prop.minimumDate) : "1600-01-01";
622
637
  var _max2 = prop.maximumDate ? _this.dateConstraint(prop.maximumDate) : "9999-12-31";
@@ -627,8 +642,8 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
627
642
  onChange: function onChange(val) {
628
643
  return updateField(widget.name, val);
629
644
  },
630
- readOnly: inputConstraints.readOnly,
631
- required: inputConstraints.required,
645
+ readOnly: constraints.readOnly,
646
+ required: constraints.required,
632
647
  style: fontStyle,
633
648
  value: value,
634
649
  valueHasTz: field.data_type === "timestamp with time zone"
@@ -638,8 +653,8 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
638
653
  onChange: function onChange(val) {
639
654
  return updateField(widget.name, val);
640
655
  },
641
- readOnly: inputConstraints.readOnly,
642
- required: inputConstraints.required,
656
+ readOnly: constraints.readOnly,
657
+ required: constraints.required,
643
658
  type: field.type.slice(0, -2),
644
659
  value: value
645
660
  });
@@ -655,7 +670,7 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
655
670
  if (widget.name.startsWith("btn__") && widget.onClick) {
656
671
  return /*#__PURE__*/React.createElement("button", {
657
672
  className: "button",
658
- disabled: inputConstraints.readOnly,
673
+ disabled: constraints.readOnly,
659
674
  onClick: function onClick() {
660
675
  return widget.onClick(_this.props.setFormBusy);
661
676
  },
@@ -900,14 +915,17 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
900
915
  _this.props.addRelationRecord(datasetname);
901
916
  });
902
917
  _defineProperty(_this, "startRelationTableResize", function (ev) {
903
- var container = ev.target.parentElement.parentElement;
918
+ var container = ev.target.parentElement;
904
919
  if (!container) {
905
920
  return;
906
921
  }
922
+ // Drop max-height as soon as a manual height is set
907
923
  var startHeight = container.offsetHeight;
924
+ container.style.height = container.offsetHeight + 'px';
925
+ container.style.maxHeight = 'initial';
908
926
  var startMouseY = ev.clientY;
909
927
  var resizeInput = function resizeInput(event) {
910
- container.style.height = Math.max(30, startHeight + (event.clientY - startMouseY)) + 'px';
928
+ container.style.height = Math.max(MiscUtils.convertEmToPx(2.5), startHeight + (event.clientY - startMouseY)) + 'px';
911
929
  };
912
930
  ev.view.document.body.style.userSelect = 'none';
913
931
  ev.view.addEventListener("pointermove", resizeInput);
@@ -1063,7 +1081,7 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
1063
1081
  return key !== "name";
1064
1082
  })]));
1065
1083
  }, {});
1066
- if (item.spacer.property.orientation === "Qt::Vertical") {
1084
+ if (_this.isVertical(item.spacer.property.orientation)) {
1067
1085
  verticalFill = true;
1068
1086
  }
1069
1087
  } else if (item.layout) {
@@ -1067,7 +1067,7 @@ var SearchBox = /*#__PURE__*/function (_React$Component) {
1067
1067
  }
1068
1068
  // Add highlight features and markers
1069
1069
  var mapCrs = _this.props.map.projection;
1070
- var showMarkers = !response.hidemarker && _this.props.searchOptions.showHighlightMarker;
1070
+ var showMarkers = !(response !== null && response !== void 0 && response.hidemarker) && _this.props.searchOptions.showHighlightMarker;
1071
1071
  var label = ((_ref0 = (_item$label = item.label) !== null && _item$label !== void 0 ? _item$label : item.text) !== null && _ref0 !== void 0 ? _ref0 : '').replace(/<\/?\w+\s*\/?>/g, '');
1072
1072
  var layer = {
1073
1073
  id: "searchselection",
@@ -1361,17 +1361,22 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
1361
1361
  return _createClass(Map3D, [{
1362
1362
  key: "componentDidMount",
1363
1363
  value: function componentDidMount() {
1364
+ var _this3 = this;
1364
1365
  this.props.innerRef(this);
1366
+ window.qwc2.__3dscenecontext = function () {
1367
+ return _this3.state.sceneContext;
1368
+ };
1365
1369
  }
1366
1370
  }, {
1367
1371
  key: "componentWillUnmount",
1368
1372
  value: function componentWillUnmount() {
1369
1373
  unregisterPermalinkDataStoreHook("map3d");
1374
+ window.qwc2.__3dscenecontext = undefined;
1370
1375
  }
1371
1376
  }, {
1372
1377
  key: "componentDidUpdate",
1373
1378
  value: function componentDidUpdate(prevProps, prevState) {
1374
- var _this3 = this;
1379
+ var _this4 = this;
1375
1380
  if (this.props.theme !== prevProps.theme) {
1376
1381
  if (this.props.theme.map3d) {
1377
1382
  this.setState(function (state) {
@@ -1386,7 +1391,7 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
1386
1391
  this.setState(function (state) {
1387
1392
  return {
1388
1393
  sceneContext: _objectSpread(_objectSpread({}, state.sceneContext), {}, {
1389
- colorLayers: _this3.collectColorLayers(state.sceneContext.colorLayers, prevProps.layers)
1394
+ colorLayers: _this4.collectColorLayers(state.sceneContext.colorLayers, prevProps.layers)
1390
1395
  })
1391
1396
  };
1392
1397
  });
@@ -1398,7 +1403,7 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
1398
1403
  return {
1399
1404
  sceneContext: _objectSpread(_objectSpread({}, state.sceneContext), {}, {
1400
1405
  collisionObjects: Object.keys(state.sceneContext.objectTree).reduce(function (res, objectId) {
1401
- var obj = _this3.objectMap[objectId];
1406
+ var obj = _this4.objectMap[objectId];
1402
1407
  if (obj !== null && obj !== void 0 && obj.visible) {
1403
1408
  var _obj$tiles$group, _obj$tiles;
1404
1409
  res.push((_obj$tiles$group = (_obj$tiles = obj.tiles) === null || _obj$tiles === void 0 ? void 0 : _obj$tiles.group) !== null && _obj$tiles$group !== void 0 ? _obj$tiles$group : obj);
@@ -1409,7 +1414,7 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
1409
1414
  var _ref1 = _slicedToArray(_ref0, 2),
1410
1415
  objectId = _ref1[0],
1411
1416
  entry = _ref1[1];
1412
- var obj = _this3.objectMap[objectId];
1417
+ var obj = _this4.objectMap[objectId];
1413
1418
  if (obj !== null && obj !== void 0 && obj.visible && entry.snap) {
1414
1419
  var _obj$tiles$group2, _obj$tiles2;
1415
1420
  res.push((_obj$tiles$group2 = (_obj$tiles2 = obj.tiles) === null || _obj$tiles2 === void 0 ? void 0 : _obj$tiles2.group) !== null && _obj$tiles$group2 !== void 0 ? _obj$tiles$group2 : obj);
@@ -1426,10 +1431,10 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
1426
1431
  }
1427
1432
  if (this.state.sceneContext.settings.pointSize !== prevState.sceneContext.settings.pointSize) {
1428
1433
  Object.values(this.state.sceneContext.objectTree).map(function (entry) {
1429
- var obj = _this3.state.sceneContext.getSceneObject(entry.objectId);
1430
- if (_this3.objectContainsPoints(obj)) {
1431
- obj.pointSize = _this3.state.sceneContext.settings.pointSize;
1432
- _this3.instance.notifyChange(obj);
1434
+ var obj = _this4.state.sceneContext.getSceneObject(entry.objectId);
1435
+ if (_this4.objectContainsPoints(obj)) {
1436
+ obj.pointSize = _this4.state.sceneContext.settings.pointSize;
1437
+ _this4.instance.notifyChange(obj);
1433
1438
  }
1434
1439
  });
1435
1440
  }
@@ -1442,14 +1447,14 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
1442
1447
  return (_entity$tiles2 = entity.tiles) === null || _entity$tiles2 === void 0 ? void 0 : _entity$tiles2.lruCache;
1443
1448
  }).forEach(function (entity) {
1444
1449
  var gigabyteBytes = Math.pow(2, 30);
1445
- entity.tiles.lruCache.maxBytesSize = 0.5 * gigabyteBytes * (1 + _this3.state.sceneContext.settings.sceneQuality / 100);
1450
+ entity.tiles.lruCache.maxBytesSize = 0.5 * gigabyteBytes * (1 + _this4.state.sceneContext.settings.sceneQuality / 100);
1446
1451
  });
1447
1452
  }
1448
1453
  }
1449
1454
  }, {
1450
1455
  key: "render",
1451
1456
  value: function render() {
1452
- var _this4 = this;
1457
+ var _this5 = this;
1453
1458
  return [/*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/React.createElement("div", {
1454
1459
  className: "map3d-map",
1455
1460
  id: "map3d",
@@ -1476,16 +1481,16 @@ var Map3D = /*#__PURE__*/function (_React$Component2) {
1476
1481
  return /*#__PURE__*/React.createElement(Suspense, {
1477
1482
  key: name
1478
1483
  }, /*#__PURE__*/React.createElement(Component, _extends({
1479
- sceneContext: _this4.state.sceneContext
1480
- }, _this4.props.pluginOptions[name])));
1484
+ sceneContext: _this5.state.sceneContext
1485
+ }, _this5.props.pluginOptions[name])));
1481
1486
  }), this.renderBaseLayer(), Object.values(this.state.sceneContext.colorLayers).map(function (options, idx) {
1482
- var _this4$state$sceneCon, _this4$state$sceneCon2;
1487
+ var _this5$state$sceneCon, _this5$state$sceneCon2;
1483
1488
  return /*#__PURE__*/React.createElement(ColorLayer3D, {
1484
1489
  key: options.id,
1485
- map: _this4.map,
1490
+ map: _this5.map,
1486
1491
  options: options,
1487
- prevLayerId: (_this4$state$sceneCon = (_this4$state$sceneCon2 = _this4.state.sceneContext.colorLayers[idx - 1]) === null || _this4$state$sceneCon2 === void 0 ? void 0 : _this4$state$sceneCon2.id) !== null && _this4$state$sceneCon !== void 0 ? _this4$state$sceneCon : "__baselayer",
1488
- sceneContext: _this4.state.sceneContext
1492
+ prevLayerId: (_this5$state$sceneCon = (_this5$state$sceneCon2 = _this5.state.sceneContext.colorLayers[idx - 1]) === null || _this5$state$sceneCon2 === void 0 ? void 0 : _this5$state$sceneCon2.id) !== null && _this5$state$sceneCon !== void 0 ? _this5$state$sceneCon : "__baselayer",
1493
+ sceneContext: _this5.state.sceneContext
1489
1494
  });
1490
1495
  }))) : null];
1491
1496
  }
@@ -2,16 +2,6 @@ div.qt-designer-form {
2
2
  overflow: auto;
3
3
  margin-bottom: 0.25em;
4
4
  }
5
-
6
- div.qt-designer-form textarea {
7
- height: 100%;
8
- }
9
-
10
- div.qt-designer-form div.text-input-wrapper-multiline,
11
- div.qt-designer-form div.text-input-wrapper-multiline > pre {
12
- height: 100%;
13
- }
14
-
15
5
  div.qt-designer-form label > input {
16
6
  margin-right: 0.25em;
17
7
  }
@@ -86,13 +76,14 @@ div.qt-designer-widget-relation {
86
76
  display: flex;
87
77
  flex-direction: column;
88
78
  position: relative;
79
+ max-height: 6.5em;
89
80
  }
90
81
 
91
82
  div.qt-designer-widget-relation-resize-handle {
92
83
  touch-action: none;
93
84
  position: absolute;
94
- right: -0.25em;
95
- bottom: -0.25em;
85
+ right: 1px;
86
+ bottom: 1px;
96
87
  width: 0;
97
88
  height: 0;
98
89
  border-bottom: 10px solid var(--border-color);
@@ -101,11 +92,18 @@ div.qt-designer-widget-relation-resize-handle {
101
92
  cursor: ns-resize;
102
93
  }
103
94
 
95
+ div.qt-designer-form-frame > div.qt-designer-widget-relation > div.qt-designer-widget-relation-resize-handle {
96
+ right: calc(-0.25em + 1px);
97
+ bottom: calc(-0.25em + 1px);
98
+ }
99
+
104
100
  div.qt-designer-widget-relation-table-container {
105
101
  overflow-y: auto;
106
102
  flex: 1 1 auto;
107
- height: 4.5em;
108
103
  position: relative;
104
+ border-top: 1px solid var(--border-color);
105
+ border-left: 1px solid var(--border-color);
106
+ border-right: 1px solid var(--border-color);
109
107
  }
110
108
 
111
109
  div.qt-designer-widget-relation-table-loading {
@@ -128,7 +126,6 @@ div.qt-designer-widget-relation-table-loading > div.spinner {
128
126
 
129
127
  div.qt-designer-widget-relation-table-container > table {
130
128
  width: 100%;
131
- border: 1px solid var(--border-color);
132
129
  }
133
130
 
134
131
  div.qt-designer-widget-relation-table-container > table td {
@@ -137,7 +134,7 @@ div.qt-designer-widget-relation-table-container > table td {
137
134
  }
138
135
 
139
136
  div.qt-designer-widget-relation-table-container > table td.qt-designer-widget-relation-record-icon {
140
- width: 1px;
137
+ width: 1.5em;
141
138
  }
142
139
 
143
140
  td.qt-designer-widget-relation-record-icon > span.icon-trash:hover {
@@ -180,6 +177,10 @@ div.qt-designer-form label {
180
177
  align-items: center;
181
178
  }
182
179
 
180
+ div.qt-designer-form div.text-input-wrapper-multiline {
181
+ height: 100%;
182
+ }
183
+
183
184
  div.qt-designer-form-featurelink-buttons {
184
185
  display: flex;
185
186
  }
@@ -197,7 +198,6 @@ div.qt-designer-report {
197
198
  }
198
199
 
199
200
  div.qt-designer-report input,
200
- div.qt-designer-report textarea,
201
201
  div.qt-designer-report select {
202
202
  border: none!important;
203
203
  outline: none!important;
@@ -10,12 +10,15 @@ div.searchbox-field {
10
10
  button.searchbox-filter-button {
11
11
  flex: 0 0 auto;
12
12
  border-left-width: 0;
13
- padding: 0 0.25em 0 0.5em;
13
+ padding: 0 1em 0 0.5em;
14
+ position: relative;
14
15
  }
15
16
 
16
- button.searchbox-filter-button > span.icon:last-child {
17
- font-size: 75%;
18
- margin-top: 1em;
17
+ button.searchbox-filter-button > span.icon-chevron-down {
18
+ font-size: 80%;
19
+ position: absolute;
20
+ bottom: 0.25em;
21
+ right: 0.25em;
19
22
  }
20
23
 
21
24
  div.searchbox-field > div.spinner {
@@ -37,8 +37,7 @@ var MenuButton = /*#__PURE__*/function (_React$Component) {
37
37
  });
38
38
  }
39
39
  });
40
- _defineProperty(_this, "onButtonClicked", function (ev) {
41
- ev.stopPropagation();
40
+ _defineProperty(_this, "onButtonClicked", function () {
42
41
  if (_this.state.selected) {
43
42
  var _this$props$onActivat, _this$props;
44
43
  (_this$props$onActivat = (_this$props = _this.props).onActivate) === null || _this$props$onActivat === void 0 || _this$props$onActivat.call(_this$props, _this.state.selected);
@@ -112,7 +111,6 @@ var MenuButton = /*#__PURE__*/function (_React$Component) {
112
111
  className: classes
113
112
  }, /*#__PURE__*/React.createElement("div", {
114
113
  className: buttonClassnames,
115
- onClick: this.onMenuClicked,
116
114
  onKeyDown: MiscUtils.checkKeyActivate,
117
115
  ref: function ref(el) {
118
116
  _this2.el = el;
@@ -122,7 +120,8 @@ var MenuButton = /*#__PURE__*/function (_React$Component) {
122
120
  className: "menubutton-button-content",
123
121
  onClick: this.onButtonClicked
124
122
  }, buttonContents), /*#__PURE__*/React.createElement("span", {
125
- className: "menubotton-button-arrow"
123
+ className: "menubotton-button-arrow",
124
+ onClick: this.onMenuClicked
126
125
  }, /*#__PURE__*/React.createElement(Icon, {
127
126
  icon: "chevron-down"
128
127
  })), this.props.tooltip ? /*#__PURE__*/React.createElement("span", {
@@ -29,20 +29,37 @@ import MiscUtils from '../../utils/MiscUtils';
29
29
  import './style/PopupMenu.css';
30
30
  var PopupMenu = /*#__PURE__*/function (_React$PureComponent) {
31
31
  function PopupMenu(props) {
32
- var _this$props$anchor$ow, _this$props$anchor5, _this$props$anchor$ow3, _this$props$anchor7;
32
+ var _this$props$anchor$ow, _this$props$anchor6;
33
33
  var _this;
34
34
  _classCallCheck(this, PopupMenu);
35
35
  _this = _callSuper(this, PopupMenu, [props]);
36
+ _defineProperty(_this, "checkCloseMenu", function (ev) {
37
+ var _this$props$anchor, _this$props$anchor$co;
38
+ if (_this.menuEl && !_this.menuEl.contains(ev.target) && !((_this$props$anchor = _this.props.anchor) !== null && _this$props$anchor !== void 0 && (_this$props$anchor$co = _this$props$anchor.contains) !== null && _this$props$anchor$co !== void 0 && _this$props$anchor$co.call(_this$props$anchor, ev.target))) {
39
+ _this.props.onClose();
40
+ MiscUtils.killEvent(ev);
41
+ _this.killClick = true;
42
+ }
43
+ });
44
+ _defineProperty(_this, "checkKillClick", function (ev) {
45
+ if (_this.killClick) {
46
+ MiscUtils.killEvent(ev);
47
+ _this.killClick = undefined;
48
+ ev.currentTarget.removeEventListener('click', _this.checkKillClick, {
49
+ capture: true
50
+ });
51
+ }
52
+ });
36
53
  _defineProperty(_this, "setFocus", function (el) {
37
- var _this$props$anchor;
54
+ var _this$props$anchor2;
38
55
  _this.menuEl = el;
39
- if (el && ((_this$props$anchor = _this.props.anchor) === null || _this$props$anchor === void 0 ? void 0 : _this$props$anchor.nodeName) !== "INPUT") {
56
+ if (el && ((_this$props$anchor2 = _this.props.anchor) === null || _this$props$anchor2 === void 0 ? void 0 : _this$props$anchor2.nodeName) !== "INPUT") {
40
57
  _this.menuEl.focus();
41
58
  }
42
59
  });
43
60
  _defineProperty(_this, "clearFocus", function () {
44
- var _this$props$anchor2;
45
- if (((_this$props$anchor2 = _this.props.anchor) === null || _this$props$anchor2 === void 0 ? void 0 : _this$props$anchor2.nodeName) === "INPUT") {
61
+ var _this$props$anchor3;
62
+ if (((_this$props$anchor3 = _this.props.anchor) === null || _this$props$anchor3 === void 0 ? void 0 : _this$props$anchor3.nodeName) === "INPUT") {
46
63
  _this.props.anchor.focus();
47
64
  } else {
48
65
  _this.menuEl.focus();
@@ -81,18 +98,19 @@ var PopupMenu = /*#__PURE__*/function (_React$PureComponent) {
81
98
  }
82
99
  MiscUtils.killEvent(ev);
83
100
  } else if (ev.key === 'Escape') {
84
- var _this$props$onClose2, _this$props2, _this$props$anchor3, _this$props$anchor3$f;
101
+ var _this$props$onClose2, _this$props2, _this$props$anchor4, _this$props$anchor4$f;
85
102
  (_this$props$onClose2 = (_this$props2 = _this.props).onClose) === null || _this$props$onClose2 === void 0 || _this$props$onClose2.call(_this$props2);
86
- (_this$props$anchor3 = _this.props.anchor) === null || _this$props$anchor3 === void 0 || (_this$props$anchor3$f = _this$props$anchor3.focus) === null || _this$props$anchor3$f === void 0 || _this$props$anchor3$f.call(_this$props$anchor3);
103
+ (_this$props$anchor4 = _this.props.anchor) === null || _this$props$anchor4 === void 0 || (_this$props$anchor4$f = _this$props$anchor4.focus) === null || _this$props$anchor4$f === void 0 || _this$props$anchor4$f.call(_this$props$anchor4);
87
104
  MiscUtils.killEvent(ev);
88
105
  } else if (ev.key === 'Enter' || ev.key === ' ' && _this.props.spaceKeyActivation) {
89
106
  MiscUtils.killEvent(ev);
90
107
  } else if (ev.key !== 'Tab' && ev.key !== 'Shift') {
91
- var _this$props$anchor4, _this$props$anchor4$f;
92
- (_this$props$anchor4 = _this.props.anchor) === null || _this$props$anchor4 === void 0 || (_this$props$anchor4$f = _this$props$anchor4.focus) === null || _this$props$anchor4$f === void 0 || _this$props$anchor4$f.call(_this$props$anchor4);
108
+ var _this$props$anchor5, _this$props$anchor5$f;
109
+ (_this$props$anchor5 = _this.props.anchor) === null || _this$props$anchor5 === void 0 || (_this$props$anchor5$f = _this$props$anchor5.focus) === null || _this$props$anchor5$f === void 0 || _this$props$anchor5$f.call(_this$props$anchor5);
93
110
  }
94
111
  });
95
- _this.container = ((_this$props$anchor$ow = (_this$props$anchor5 = _this.props.anchor) === null || _this$props$anchor5 === void 0 ? void 0 : _this$props$anchor5.ownerDocument) !== null && _this$props$anchor$ow !== void 0 ? _this$props$anchor$ow : document).createElement("div");
112
+ var doc = (_this$props$anchor$ow = (_this$props$anchor6 = _this.props.anchor) === null || _this$props$anchor6 === void 0 ? void 0 : _this$props$anchor6.ownerDocument) !== null && _this$props$anchor$ow !== void 0 ? _this$props$anchor$ow : document;
113
+ _this.container = doc.createElement("div");
96
114
  _this.container.id = 'popup-container';
97
115
  _this.container.style.position = 'fixed';
98
116
  _this.container.style.left = 0;
@@ -100,60 +118,47 @@ var PopupMenu = /*#__PURE__*/function (_React$PureComponent) {
100
118
  _this.container.style.top = 0;
101
119
  _this.container.style.bottom = 0;
102
120
  _this.container.style.zIndex = 100000;
103
- if (_this.props.anchor) {
104
- _this.shields = [];
105
- var _loop = function _loop(i) {
106
- var _this$props$anchor$ow2, _this$props$anchor6;
107
- _this.shields[i] = ((_this$props$anchor$ow2 = (_this$props$anchor6 = _this.props.anchor) === null || _this$props$anchor6 === void 0 ? void 0 : _this$props$anchor6.ownerDocument) !== null && _this$props$anchor$ow2 !== void 0 ? _this$props$anchor$ow2 : document).createElement("div");
108
- _this.shields[i].style.position = 'absolute';
109
- _this.shields[i].style.left = "0px";
110
- _this.shields[i].style.right = "0px";
111
- _this.shields[i].style.top = "0px";
112
- _this.shields[i].style.bottom = "0px";
113
- _this.shields[i].style.pointerEvents = 'initial';
114
- _this.shields[i].style.zIndex = 0;
115
- setTimeout(function () {
116
- return _this.shields[i].addEventListener('click', function () {
117
- var _this$props$onClose3, _this$props3;
118
- (_this$props$onClose3 = (_this$props3 = _this.props).onClose) === null || _this$props$onClose3 === void 0 || _this$props$onClose3.call(_this$props3);
119
- });
120
- }, 0);
121
- _this.container.appendChild(_this.shields[i]);
122
- };
123
- for (var i = 0; i < 4; ++i) {
124
- _loop(i);
125
- }
126
- _this.container.style.pointerEvents = 'none';
127
- } else {
128
- setTimeout(function () {
129
- return _this.container.addEventListener('click', function () {
130
- var _this$props$onClose4, _this$props4;
131
- (_this$props$onClose4 = (_this$props4 = _this.props).onClose) === null || _this$props$onClose4 === void 0 || _this$props$onClose4.call(_this$props4);
132
- });
133
- }, 0);
134
- }
121
+ _this.container.style.pointerEvents = 'none';
135
122
  _this.menuEl = null;
136
- ((_this$props$anchor$ow3 = (_this$props$anchor7 = _this.props.anchor) === null || _this$props$anchor7 === void 0 ? void 0 : _this$props$anchor7.ownerDocument) !== null && _this$props$anchor$ow3 !== void 0 ? _this$props$anchor$ow3 : document).body.appendChild(_this.container);
123
+ doc.body.appendChild(_this.container);
124
+ // Delay one cycle
125
+ setTimeout(function () {
126
+ return doc.addEventListener('pointerdown', _this.checkCloseMenu, {
127
+ capture: true
128
+ });
129
+ }, 0);
130
+ doc.addEventListener('click', _this.checkKillClick, {
131
+ capture: true
132
+ });
137
133
  return _this;
138
134
  }
139
135
  _inherits(PopupMenu, _React$PureComponent);
140
136
  return _createClass(PopupMenu, [{
141
137
  key: "componentDidMount",
142
138
  value: function componentDidMount() {
143
- var _this$props$anchor8;
144
- if (((_this$props$anchor8 = this.props.anchor) === null || _this$props$anchor8 === void 0 ? void 0 : _this$props$anchor8.nodeName) === "INPUT") {
139
+ var _this$props$anchor7;
140
+ if (((_this$props$anchor7 = this.props.anchor) === null || _this$props$anchor7 === void 0 ? void 0 : _this$props$anchor7.nodeName) === "INPUT") {
145
141
  this.props.anchor.addEventListener('keydown', this.keyNav);
146
142
  }
147
143
  }
148
144
  }, {
149
145
  key: "componentWillUnmount",
150
146
  value: function componentWillUnmount() {
151
- var _this$props$anchor$ow4, _this$props$anchor9, _this$props$anchor0, _this$props$anchor1, _this$props$anchor1$f;
152
- ((_this$props$anchor$ow4 = (_this$props$anchor9 = this.props.anchor) === null || _this$props$anchor9 === void 0 ? void 0 : _this$props$anchor9.ownerDocument) !== null && _this$props$anchor$ow4 !== void 0 ? _this$props$anchor$ow4 : document).body.removeChild(this.container);
153
- if (((_this$props$anchor0 = this.props.anchor) === null || _this$props$anchor0 === void 0 ? void 0 : _this$props$anchor0.nodeName) === "INPUT") {
147
+ var _this$props$anchor$ow2, _this$props$anchor8, _this$props$anchor9, _this$props$anchor0, _this$props$anchor0$f;
148
+ var doc = (_this$props$anchor$ow2 = (_this$props$anchor8 = this.props.anchor) === null || _this$props$anchor8 === void 0 ? void 0 : _this$props$anchor8.ownerDocument) !== null && _this$props$anchor$ow2 !== void 0 ? _this$props$anchor$ow2 : document;
149
+ doc.body.removeChild(this.container);
150
+ if (((_this$props$anchor9 = this.props.anchor) === null || _this$props$anchor9 === void 0 ? void 0 : _this$props$anchor9.nodeName) === "INPUT") {
154
151
  this.props.anchor.removeEventListener('keydown', this.keyNav);
155
152
  }
156
- (_this$props$anchor1 = this.props.anchor) === null || _this$props$anchor1 === void 0 || (_this$props$anchor1$f = _this$props$anchor1.focus) === null || _this$props$anchor1$f === void 0 || _this$props$anchor1$f.call(_this$props$anchor1);
153
+ (_this$props$anchor0 = this.props.anchor) === null || _this$props$anchor0 === void 0 || (_this$props$anchor0$f = _this$props$anchor0.focus) === null || _this$props$anchor0$f === void 0 || _this$props$anchor0$f.call(_this$props$anchor0);
154
+ doc.removeEventListener('pointerdown', this.checkCloseMenu, {
155
+ capture: true
156
+ });
157
+ if (!this.killClick) {
158
+ doc.removeEventListener('click', this.checkKillClick, {
159
+ capture: true
160
+ });
161
+ }
157
162
  }
158
163
  }, {
159
164
  key: "render",
@@ -178,12 +183,6 @@ var PopupMenu = /*#__PURE__*/function (_React$PureComponent) {
178
183
  } else {
179
184
  rect = this.props.anchor.getBoundingClientRect();
180
185
  }
181
- this.shields[0].style.height = rect.top + "px";
182
- this.shields[0].style.bottom = 0;
183
- this.shields[1].style.width = rect.left + "px";
184
- this.shields[1].style.right = 0;
185
- this.shields[2].style.left = rect.right + "px";
186
- this.shields[3].style.top = rect.bottom + "px";
187
186
  }
188
187
  var x = (_ref = this.props.align === 'right' ? (_rect = rect) === null || _rect === void 0 ? void 0 : _rect.right : (_rect2 = rect) === null || _rect2 === void 0 ? void 0 : _rect2.left) !== null && _ref !== void 0 ? _ref : this.props.x;
189
188
  var y = ((_rect$bottom = (_rect3 = rect) === null || _rect3 === void 0 ? void 0 : _rect3.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : this.props.y) - 1;
@@ -196,11 +196,6 @@ var TextInput = /*#__PURE__*/function (_React$Component) {
196
196
  (_this$props$onNoChang = (_this$props = _this.props).onNoChange) === null || _this$props$onNoChang === void 0 || _this$props$onNoChang.call(_this$props);
197
197
  }
198
198
  });
199
- _defineProperty(_this, "storeInitialHeight", function (el) {
200
- if (el) {
201
- _this.initialHeight = el.offsetHeight;
202
- }
203
- });
204
199
  _defineProperty(_this, "startResize", function (ev) {
205
200
  var container = ev.target.parentElement;
206
201
  if (!container) {
@@ -209,7 +204,7 @@ var TextInput = /*#__PURE__*/function (_React$Component) {
209
204
  var startHeight = container.offsetHeight;
210
205
  var startMouseY = ev.clientY;
211
206
  var resizeInput = function resizeInput(event) {
212
- container.style.height = Math.max(_this.initialHeight, startHeight + (event.clientY - startMouseY)) + 'px';
207
+ container.style.height = Math.max(MiscUtils.convertEmToPx(2), startHeight + (event.clientY - startMouseY)) + 'px';
213
208
  };
214
209
  document.body.style.userSelect = 'none';
215
210
  ev.view.addEventListener("pointermove", resizeInput);
@@ -221,7 +216,6 @@ var TextInput = /*#__PURE__*/function (_React$Component) {
221
216
  });
222
217
  });
223
218
  _this.focusEnterClick = false;
224
- _this.initialHeight = null;
225
219
  _this.input = null;
226
220
  _this.tooltipEl = null;
227
221
  _this.tooltipTimeout = null;
@@ -246,6 +240,7 @@ var TextInput = /*#__PURE__*/function (_React$Component) {
246
240
  var _this2 = this;
247
241
  var wrapperClassName = classNames({
248
242
  "TextInput": true,
243
+ "text-input-wrapper-multiline": this.props.multiline,
249
244
  "text-input-wrapper": true,
250
245
  "text-input-wrapper-focused": this.state.focus
251
246
  });
@@ -263,8 +258,7 @@ var TextInput = /*#__PURE__*/function (_React$Component) {
263
258
  }
264
259
  return /*#__PURE__*/React.createElement("div", {
265
260
  className: wrapperClassName + " " + (this.props.className || ""),
266
- onClick: MiscUtils.killEvent,
267
- ref: this.storeInitialHeight
261
+ onClick: MiscUtils.killEvent
268
262
  }, this.props.name ? /*#__PURE__*/React.createElement("textarea", {
269
263
  className: "text-input-form-el",
270
264
  name: this.props.name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qwc2",
3
- "version": "2026.08.05",
3
+ "version": "2026.08.07",
4
4
  "description": "QGIS Web Client",
5
5
  "author": "Sourcepole AG",
6
6
  "license": "BSD-2-Clause",
package/plugins/API.js CHANGED
@@ -536,6 +536,13 @@ var API = /*#__PURE__*/function (_React$Component) {
536
536
  _defineProperty(_this, "getState", function () {
537
537
  return _this.props.state;
538
538
  });
539
+ /**
540
+ * Return the current 3d view scene context, if a 3D view is active.
541
+ */
542
+ _defineProperty(_this, "get3dSceneContext", function () {
543
+ var _window$qwc2$__3dscen, _window$qwc;
544
+ return (_window$qwc2$__3dscen = (_window$qwc = window.qwc2).__3dscenecontext) === null || _window$qwc2$__3dscen === void 0 ? void 0 : _window$qwc2$__3dscen.call(_window$qwc);
545
+ });
539
546
  /** Fires the callback on the next click on the map.
540
547
  *
541
548
  * *NOTE*: when calling `onMapClick` through the `postMessage` interface, omit the `callback` parameter. The response will be sent via the response message.
@@ -577,6 +584,7 @@ var API = /*#__PURE__*/function (_React$Component) {
577
584
  window.qwc2.drawScratch = this.drawScratch;
578
585
  window.qwc2.drawGeometry = this.drawGeometry;
579
586
  window.qwc2.getState = this.getState;
587
+ window.qwc2.get3dSceneContext = this.get3dSceneContext;
580
588
  window.qwc2.ConfigUtils = ConfigUtils;
581
589
  window.qwc2.CoordinatesUtils = CoordinatesUtils;
582
590
  window.qwc2.EditingInterface = EditingInterface;
@@ -78,13 +78,13 @@ var EditingSupport = /*#__PURE__*/function (_React$Component) {
78
78
  } else if (f.getGeometry().getType() === "LineString") {
79
79
  return new ol.geom.MultiPoint(f.getGeometry().getCoordinates());
80
80
  } else if (f.getGeometry().getType() === "Polygon") {
81
- return new ol.geom.MultiPoint(f.getGeometry().getCoordinates()[0]);
81
+ return new ol.geom.MultiPoint(f.getGeometry().getCoordinates().flat());
82
82
  } else if (f.getGeometry().getType() === "MultiPoint") {
83
83
  return f.getGeometry();
84
84
  } else if (f.getGeometry().getType() === "MultiLineString") {
85
- return new ol.geom.MultiPoint(f.getGeometry().getCoordinates()[0]);
85
+ return new ol.geom.MultiPoint(f.getGeometry().getCoordinates().flat());
86
86
  } else if (f.getGeometry().getType() === "MultiPolygon") {
87
- return new ol.geom.MultiPoint(f.getGeometry().getCoordinates()[0][0]);
87
+ return new ol.geom.MultiPoint(f.getGeometry().getCoordinates().flat(2));
88
88
  }
89
89
  return f.getGeometry();
90
90
  };
@@ -135,7 +135,6 @@ var EditingSupport = /*#__PURE__*/function (_React$Component) {
135
135
  });
136
136
  });
137
137
  _defineProperty(_this, "setEditInteraction", function () {
138
- var _this$props$editConte;
139
138
  _this.reset();
140
139
  _this.setCurrentLayer();
141
140
  var format = new ol.format.GeoJSON();
@@ -178,7 +177,7 @@ var EditingSupport = /*#__PURE__*/function (_React$Component) {
178
177
  _this.props.map.addInteraction(_this.interaction);
179
178
  _this.interaction.setSelection([_this.currentFeature]);
180
179
  }
181
- _this.interaction.setActive(_this.props.editContext.geomType && _this.props.editContext.permissions.updatable && ((_this$props$editConte = _this.props.editContext.editConfig) === null || _this$props$editConte === void 0 || (_this$props$editConte = _this$props$editConte.permissions) === null || _this$props$editConte === void 0 ? void 0 : _this$props$editConte.updatable) === true && !_this.props.editContext.geomReadOnly && !_this.props.editContext.geomNonZeroZ);
180
+ _this.interaction.setActive(_this.props.editContext.geomType && _this.props.editContext.permissions.updatable && !_this.props.editContext.geomReadOnly && !_this.props.editContext.geomNonZeroZ);
182
181
  });
183
182
  _defineProperty(_this, "updateMeasurements", function () {
184
183
  var _this$state$measureme;
@@ -285,11 +284,14 @@ var EditingSupport = /*#__PURE__*/function (_React$Component) {
285
284
  }, {
286
285
  key: "render",
287
286
  value: function render() {
288
- var _this$props$editConte2, _this$props$editConte3;
287
+ var _this$props$editConte, _this$props$editConte2;
288
+ if (!this.props.editContext.geomType || this.props.editContext.geomReadOnly || this.props.editContext.geomNonZeroZ) {
289
+ return null;
290
+ }
289
291
  var toolbar = null;
290
292
  var locationRecorder = null;
291
293
  var measureSwitcher = null;
292
- if ((_this$props$editConte2 = this.props.editContext.feature) !== null && _this$props$editConte2 !== void 0 && _this$props$editConte2.geometry) {
294
+ if ((_this$props$editConte = this.props.editContext.feature) !== null && _this$props$editConte !== void 0 && _this$props$editConte.geometry) {
293
295
  var editButtons = [{
294
296
  key: "Node",
295
297
  tooltip: LocaleUtils.tr("redlining.draw"),
@@ -307,7 +309,7 @@ var EditingSupport = /*#__PURE__*/function (_React$Component) {
307
309
  tooltipPos: "top"
308
310
  }), this.context);
309
311
  }
310
- if (this.state.showRecordLocation && this.props.editContext.geomType) {
312
+ if (this.state.showRecordLocation) {
311
313
  var geomType = this.props.editContext.geomType.replace(/Z$/, '');
312
314
  locationRecorder = /*#__PURE__*/React.createElement(LocationRecorder, {
313
315
  drawInteraction: this.interaction,
@@ -316,7 +318,7 @@ var EditingSupport = /*#__PURE__*/function (_React$Component) {
316
318
  map: this.props.map
317
319
  });
318
320
  }
319
- if (this.props.editContext.action === "Draw" || (_this$props$editConte3 = this.props.editContext.feature) !== null && _this$props$editConte3 !== void 0 && _this$props$editConte3.geometry) {
321
+ if (this.props.editContext.action === "Draw" || (_this$props$editConte2 = this.props.editContext.feature) !== null && _this$props$editConte2 !== void 0 && _this$props$editConte2.geometry) {
320
322
  measureSwitcher = /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/React.createElement(MeasureSwitcher, {
321
323
  changeMeasureState: this.changeMeasurementState,
322
324
  geomType: this.props.editContext.geomType,
@@ -194,6 +194,9 @@ var MiscUtils = {
194
194
  capitalizeFirst: function capitalizeFirst(text) {
195
195
  return text.slice(0, 1).toUpperCase() + text.slice(1);
196
196
  },
197
+ isNumeric: function isNumeric(value) {
198
+ return typeof value === 'string' && value.trim() !== '' && String(Number(value)) === value.trim();
199
+ },
197
200
  isBrightColor: function isBrightColor(color) {
198
201
  var r;
199
202
  var g;