qwc2 2026.6.3 → 2026.6.4

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.
Files changed (33) hide show
  1. package/components/AttributeForm.js +20 -51
  2. package/components/AutoEditForm.js +12 -1
  3. package/components/style/App.css +4 -0
  4. package/components/widgets/MenuButton.js +5 -1
  5. package/components/widgets/NumberInput.js +1 -1
  6. package/components/widgets/PopupMenu.js +12 -17
  7. package/components/widgets/style/MenuButton.css +5 -1
  8. package/package.json +1 -1
  9. package/plugins/SensorThingsTool.js +68 -8
  10. package/plugins/style/SensorThingsTool.css +17 -3
  11. package/static/translations/bg-BG.json +3 -0
  12. package/static/translations/ca-ES.json +3 -0
  13. package/static/translations/cs-CZ.json +3 -0
  14. package/static/translations/de-CH.json +3 -0
  15. package/static/translations/de-DE.json +4 -1
  16. package/static/translations/en-US.json +3 -0
  17. package/static/translations/es-ES.json +3 -0
  18. package/static/translations/fi-FI.json +3 -0
  19. package/static/translations/fr-FR.json +4 -1
  20. package/static/translations/hu-HU.json +3 -0
  21. package/static/translations/it-IT.json +3 -0
  22. package/static/translations/ja-JP.json +3 -0
  23. package/static/translations/nl-NL.json +3 -0
  24. package/static/translations/no-NO.json +3 -0
  25. package/static/translations/pl-PL.json +3 -0
  26. package/static/translations/pt-BR.json +3 -0
  27. package/static/translations/pt-PT.json +3 -0
  28. package/static/translations/ro-RO.json +3 -0
  29. package/static/translations/ru-RU.json +3 -0
  30. package/static/translations/sv-SE.json +3 -0
  31. package/static/translations/tr-TR.json +3 -0
  32. package/static/translations/tsconfig.json +3 -0
  33. package/static/translations/uk-UA.json +3 -0
@@ -76,7 +76,7 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
76
76
  label: _this.state.formValid ? LocaleUtils.tr("editing.commit") : LocaleUtils.tr("editing.invalidform"),
77
77
  extraClasses: _this.state.formValid ? "button-accept" : "button-warning",
78
78
  type: "submit",
79
- disabled: !_this.state.formValid || captchaPending
79
+ disabled: captchaPending
80
80
  }, {
81
81
  key: 'Discard',
82
82
  icon: 'remove',
@@ -167,11 +167,10 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
167
167
  }, readOnlyMsg) : null, /*#__PURE__*/React.createElement("form", {
168
168
  action: "",
169
169
  className: "attrib-form-parent-form",
170
- onChange: function onChange(ev) {
171
- return _this.formChanged(ev);
172
- },
173
170
  onSubmit: _this.onSubmit,
174
- ref: _this.setupChangedObserver
171
+ ref: function ref(el) {
172
+ _this.form = el;
173
+ }
175
174
  }, editConfig.form ? /*#__PURE__*/React.createElement(QtDesignerForm, {
176
175
  addRelationRecord: _this.addRelationRecord,
177
176
  editConfig: editConfig,
@@ -218,7 +217,6 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
218
217
  feature: newFeature,
219
218
  changed: true
220
219
  });
221
- _this.validateFieldConstraints(newFeature);
222
220
  });
223
221
  _defineProperty(_this, "setRelationTables", function (relationTables) {
224
222
  _this.setState({
@@ -419,8 +417,6 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
419
417
  changed: false
420
418
  });
421
419
  });
422
- // Re-validate feature field constraints
423
- _this.validateFieldConstraints(feature);
424
420
  } else {
425
421
  _this.props.setEditContext(_this.props.editContext.id, {
426
422
  feature: feature,
@@ -443,37 +439,7 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
443
439
  }
444
440
  }
445
441
  });
446
- _defineProperty(_this, "setupChangedObserver", function (form) {
447
- _this.form = form;
448
- if (form) {
449
- form.observer = new MutationObserver(function () {
450
- _this.setState({
451
- formValid: form.checkValidity()
452
- });
453
- });
454
- form.observer.observe(form, {
455
- subtree: true,
456
- childList: true,
457
- attributes: true
458
- });
459
- }
460
- });
461
- _defineProperty(_this, "formChanged", function (ev) {
462
- var _ev$target;
463
- var form = ev.currentTarget;
464
- if ((_ev$target = ev.target) !== null && _ev$target !== void 0 && _ev$target.setCustomValidity) {
465
- ev.target.setCustomValidity("");
466
- }
467
- if (form) {
468
- _this.setState({
469
- formValid: form.checkValidity()
470
- });
471
- _this.props.setEditContext(_this.props.editContext.id, {
472
- changed: true
473
- });
474
- }
475
- });
476
- _defineProperty(_this, "validateFieldConstraints", function (feature) {
442
+ _defineProperty(_this, "validateForm", function (feature) {
477
443
  var validCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
478
444
  var invalidCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
479
445
  var constraintExpressions = _this.props.editContext.editConfig.fields.reduce(function (res, cur) {
@@ -487,7 +453,7 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
487
453
  return res;
488
454
  }, []);
489
455
  parseExpressionsAsync(constraintExpressions, feature, _this.props.editContext.editConfig, _this.props.iface, _this.props.editContext.mapPrefix, _this.props.map.projection, false).then(function (result) {
490
- var valid = true;
456
+ var valid = _this.form.checkValidity();
491
457
  var reasons = [];
492
458
  Object.entries(result).forEach(function (_ref5) {
493
459
  var _ref6 = _slicedToArray(_ref5, 2),
@@ -508,23 +474,27 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
508
474
  }
509
475
  }
510
476
  });
477
+ Array.from(_this.form.elements).filter(function (el) {
478
+ return el.willValidate && el.required && el.validity.valueMissing;
479
+ }).forEach(function (el) {
480
+ reasons.push("".concat(el.name, ": ").concat(LocaleUtils.tr("editing.emptyvalue")));
481
+ });
511
482
  if (!valid) {
512
483
  _this.setState({
513
484
  formValid: false
514
485
  });
515
- if (invalidCallback) {
516
- invalidCallback(reasons);
517
- }
486
+ invalidCallback === null || invalidCallback === void 0 || invalidCallback(reasons);
518
487
  } else {
519
- if (validCallback) {
520
- validCallback();
521
- }
488
+ _this.setState({
489
+ formValid: true
490
+ });
491
+ validCallback === null || validCallback === void 0 || validCallback();
522
492
  }
523
493
  });
524
494
  });
525
495
  _defineProperty(_this, "onSubmit", function (ev) {
526
496
  ev.preventDefault();
527
- _this.validateFieldConstraints(_this.props.editContext.feature, _this.doSubmit, function (reasons) {
497
+ _this.validateForm(_this.props.editContext.feature, _this.doSubmit, function (reasons) {
528
498
  /* eslint-disable-next-line */
529
499
  alert(LocaleUtils.tr("editing.contraintviolation") + ":\n" + reasons.join("\n"));
530
500
  });
@@ -826,8 +796,6 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
826
796
  changed: false
827
797
  });
828
798
  });
829
- // Re-validate feature field constraints
830
- _this.validateFieldConstraints(result);
831
799
  } else {
832
800
  _this.props.setEditContext(_this.props.editContext.id, {
833
801
  action: 'Pick',
@@ -931,8 +899,9 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
931
899
  feature: newFeature
932
900
  });
933
901
  });
934
- // Re-validate feature field constraints
935
- this.validateFieldConstraints(this.props.editContext.feature);
902
+ }
903
+ if (this.props.editContext.feature !== prevProps.editContext.feature) {
904
+ this.validateForm(this.props.editContext.feature);
936
905
  }
937
906
  }
938
907
  }, {
@@ -1,5 +1,11 @@
1
1
  var _excluded = ["multiline"];
2
2
  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); }
3
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
4
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
6
+ 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; }
7
+ 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; } }
8
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
3
9
  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); }
4
10
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
5
11
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
@@ -75,12 +81,17 @@ var AutoEditForm = /*#__PURE__*/function (_React$Component) {
75
81
  })), field.name);
76
82
  }
77
83
  } else if (constraints.values || constraints.keyvalrel) {
84
+ var _constraints$keyvalre = constraints.keyvalrel.split('.', 2),
85
+ _constraints$keyvalre2 = _slicedToArray(_constraints$keyvalre, 2),
86
+ mapPrefix = _constraints$keyvalre2[0],
87
+ keyvalrel = _constraints$keyvalre2[1];
78
88
  input = /*#__PURE__*/React.createElement("span", {
79
89
  className: "input-frame"
80
90
  }, /*#__PURE__*/React.createElement(EditComboField, {
81
91
  editIface: _this.props.iface,
82
92
  fieldId: field.id,
83
- keyvalrel: constraints.keyvalrel,
93
+ keyvalrel: keyvalrel,
94
+ mapPrefix: mapPrefix,
84
95
  name: field.id,
85
96
  readOnly: readOnly,
86
97
  required: constraints.required,
@@ -149,6 +149,10 @@ button.button-reject {
149
149
  background-color: rgb(255,127,127);
150
150
  }
151
151
 
152
+ button.button-warning:not(:disabled):hover {
153
+ background-color: #f5ce74;
154
+ }
155
+
152
156
  button.button-accept:not(:disabled):hover {
153
157
  background-color: rgb(127,225,127);
154
158
  }
@@ -85,7 +85,9 @@ var MenuButton = /*#__PURE__*/function (_React$Component) {
85
85
  buttonContents = [this.props.menuIcon ? /*#__PURE__*/React.createElement(Icon, {
86
86
  icon: this.props.menuIcon,
87
87
  key: "icon"
88
- }) : null, this.props.menuLabel ? /*#__PURE__*/React.createElement("span", null, this.props.menuLabel) : null];
88
+ }) : null, this.props.menuLabel ? /*#__PURE__*/React.createElement("span", {
89
+ key: "label"
90
+ }, this.props.menuLabel) : null];
89
91
  } else {
90
92
  buttonContents = children.filter(function (child) {
91
93
  return child.props.value === _this2.state.selected;
@@ -123,6 +125,7 @@ var MenuButton = /*#__PURE__*/function (_React$Component) {
123
125
  })), this.props.tooltip ? /*#__PURE__*/React.createElement("span", {
124
126
  className: "menubutton-tooltip " + ("menubutton-tooltip-" + this.props.tooltipPos)
125
127
  }, this.props.tooltip) : null), this.el && this.state.popup ? /*#__PURE__*/React.createElement(PopupMenu, {
128
+ align: this.props.menuAlign,
126
129
  anchor: this.el,
127
130
  className: menuClassnames,
128
131
  onClose: function onClose() {
@@ -150,6 +153,7 @@ _defineProperty(MenuButton, "propTypes", {
150
153
  children: PropTypes.array,
151
154
  className: PropTypes.string,
152
155
  disabled: PropTypes.bool,
156
+ menuAlign: PropTypes.string,
153
157
  menuClassName: PropTypes.string,
154
158
  menuIcon: PropTypes.string,
155
159
  menuLabel: PropTypes.string,
@@ -50,7 +50,7 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
50
50
  });
51
51
  _defineProperty(_this, "currentFloatValue", function () {
52
52
  if (_this.state.value === "") {
53
- return 0;
53
+ return null;
54
54
  }
55
55
  var floatValue = parseFloat(_this.state.value);
56
56
  return isNaN(floatValue) ? null : floatValue;
@@ -156,13 +156,14 @@ var PopupMenu = /*#__PURE__*/function (_React$PureComponent) {
156
156
  }, {
157
157
  key: "render",
158
158
  value: function render() {
159
- var _rect$left,
159
+ var _ref,
160
160
  _rect,
161
- _rect$bottom,
162
161
  _rect2,
163
- _ref,
164
- _rect$width,
162
+ _rect$bottom,
165
163
  _rect3,
164
+ _ref2,
165
+ _rect$width,
166
+ _rect4,
166
167
  _this$props$disabledI,
167
168
  _this2 = this;
168
169
  if (isEmpty(this.props.children)) {
@@ -182,19 +183,12 @@ var PopupMenu = /*#__PURE__*/function (_React$PureComponent) {
182
183
  this.shields[2].style.left = rect.right + "px";
183
184
  this.shields[3].style.top = rect.bottom + "px";
184
185
  }
185
- var x = (_rect$left = (_rect = rect) === null || _rect === void 0 ? void 0 : _rect.left) !== null && _rect$left !== void 0 ? _rect$left : this.props.x;
186
- var y = ((_rect$bottom = (_rect2 = rect) === null || _rect2 === void 0 ? void 0 : _rect2.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : this.props.y) - 1;
187
- var minWidth = (_ref = (_rect$width = (_rect3 = rect) === null || _rect3 === void 0 ? void 0 : _rect3.width) !== null && _rect$width !== void 0 ? _rect$width : this.props.width) !== null && _ref !== void 0 ? _ref : 0;
188
- var style = {
189
- position: 'absolute',
190
- left: x + 'px',
191
- top: y + 'px',
192
- minWidth: minWidth + 'px',
193
- maxHeight: window.innerHeight - y - 5 + 'px',
194
- overflowY: 'auto',
195
- zIndex: 1,
196
- pointerEvents: 'initial'
197
- };
186
+ 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;
187
+ 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;
188
+ var minWidth = (_ref2 = (_rect$width = (_rect4 = rect) === null || _rect4 === void 0 ? void 0 : _rect4.width) !== null && _rect$width !== void 0 ? _rect$width : this.props.width) !== null && _ref2 !== void 0 ? _ref2 : 0;
189
+ var style = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
190
+ position: 'absolute'
191
+ }, this.props.align === "right" ? "right" : "left", (this.props.align === "right" ? window.innerWidth - x : x) + 'px'), "top", y + 'px'), "minWidth", minWidth + 'px'), "maxHeight", window.innerHeight - y - 5 + 'px'), "overflowY", 'auto'), "zIndex", 1), "pointerEvents", 'initial');
198
192
  if (this.props.setMaxWidth) {
199
193
  style.maxWidth = minWidth + 'px';
200
194
  }
@@ -225,6 +219,7 @@ var PopupMenu = /*#__PURE__*/function (_React$PureComponent) {
225
219
  }]);
226
220
  }(React.PureComponent);
227
221
  _defineProperty(PopupMenu, "propTypes", {
222
+ align: PropTypes.string,
228
223
  anchor: PropTypes.object,
229
224
  children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
230
225
  className: PropTypes.string,
@@ -52,6 +52,10 @@ span.menubutton-button-content {
52
52
  align-items: center;
53
53
  }
54
54
 
55
+ span.menubutton-button-content span+span {
56
+ margin-left: 0.5em;
57
+ }
58
+
55
59
  div.menubutton span.menubotton-button-arrow {
56
60
  height: 80%;
57
61
  display: flex;
@@ -104,4 +108,4 @@ span.menubutton-tooltip-bottom {
104
108
 
105
109
  div.menubutton:hover span.menubutton-tooltip {
106
110
  display: inline;
107
- }
111
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qwc2",
3
- "version": "2026.06.03",
3
+ "version": "2026.06.04",
4
4
  "description": "QGIS Web Client",
5
5
  "author": "Sourcepole AG",
6
6
  "license": "BSD-2-Clause",
@@ -231,6 +231,8 @@ var SensorThingsTool = /*#__PURE__*/function (_React$Component) {
231
231
  * }
232
232
  */
233
233
  currentSensorLocation: null,
234
+ // automatically add all Datastreams of currently selected Location if true
235
+ addCurrentLocationDatastreams: false,
234
236
  // show currently selected Location info window if true
235
237
  showLocationInfoWindow: false,
236
238
  // currently selected Datastreams filter options
@@ -952,12 +954,11 @@ var SensorThingsTool = /*#__PURE__*/function (_React$Component) {
952
954
  icon: "remove"
953
955
  }))), /*#__PURE__*/React.createElement("div", {
954
956
  className: "sensor-things-location-select-list"
955
- }, _this.state.locationsAtPoint.map(function (location, idx) {
956
- return /*#__PURE__*/React.createElement("div", {
957
- key: "select-location-" + idx,
958
- onClickCapture: function onClickCapture() {
959
- return _this.addLocation(location);
960
- },
957
+ }, /*#__PURE__*/React.createElement("table", {
958
+ className: "sensor-things-location-select-table"
959
+ }, /*#__PURE__*/React.createElement("tbody", null, _this.state.locationsAtPoint.map(function (location, idx) {
960
+ return /*#__PURE__*/React.createElement("tr", {
961
+ key: "select-location--" + idx,
961
962
  onMouseOut: function onMouseOut() {
962
963
  return _this.setState({
963
964
  highlightedLocation: null
@@ -968,8 +969,31 @@ var SensorThingsTool = /*#__PURE__*/function (_React$Component) {
968
969
  highlightedLocation: location
969
970
  });
970
971
  }
971
- }, location.name, ": ", location.description);
972
- })));
972
+ }, /*#__PURE__*/React.createElement("td", {
973
+ onClickCapture: function onClickCapture() {
974
+ return _this.addLocation(location);
975
+ },
976
+ title: "".concat(location.name, ": ").concat(location.description)
977
+ }, location.name, ": ", location.description), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("div", {
978
+ className: "sensor-things-location-select-buttons"
979
+ }, /*#__PURE__*/React.createElement("button", {
980
+ className: "button",
981
+ onClick: function onClick() {
982
+ return _this.addLocation(location);
983
+ },
984
+ title: LocaleUtils.tr("sensorthingstool.addLocation")
985
+ }, /*#__PURE__*/React.createElement(Icon, {
986
+ icon: "plus"
987
+ })), /*#__PURE__*/React.createElement("button", {
988
+ className: "button",
989
+ onClick: function onClick() {
990
+ return _this.addFullLocation(location);
991
+ },
992
+ title: LocaleUtils.tr("sensorthingstool.addLocationAndDatastreams")
993
+ }, /*#__PURE__*/React.createElement(Icon, {
994
+ icon: "sync"
995
+ })))));
996
+ })))));
973
997
  } else {
974
998
  return null;
975
999
  }
@@ -1008,6 +1032,16 @@ var SensorThingsTool = /*#__PURE__*/function (_React$Component) {
1008
1032
  });
1009
1033
  }
1010
1034
  });
1035
+ _defineProperty(_this, "addFullLocation", function (location) {
1036
+ // remove current Datastreams
1037
+ _this.removeAllDatastreams();
1038
+ // add selected Location
1039
+ _this.addLocation(location);
1040
+ // set flag to automatically add all Datastreams of selected Location once ready
1041
+ _this.setState({
1042
+ addCurrentLocationDatastreams: true
1043
+ });
1044
+ });
1011
1045
  _defineProperty(_this, "removeSelectedLocation", function () {
1012
1046
  if (_this.state.currentSensorLocation === null) {
1013
1047
  // skip if currentSensorLocation not yet ready
@@ -1147,6 +1181,12 @@ var SensorThingsTool = /*#__PURE__*/function (_React$Component) {
1147
1181
  });
1148
1182
  }
1149
1183
  });
1184
+ _defineProperty(_this, "addDatastreams", function (datastreamIds) {
1185
+ // add multiple Datastreams
1186
+ datastreamIds.forEach(function (datastreamId) {
1187
+ _this.addDatastream(datastreamId);
1188
+ });
1189
+ });
1150
1190
  _defineProperty(_this, "removeDatastream", function (datastreamIndex) {
1151
1191
  _this.setState(function (state) {
1152
1192
  var datastreamInfoWindow = state.datastreamInfoWindow;
@@ -1181,6 +1221,18 @@ var SensorThingsTool = /*#__PURE__*/function (_React$Component) {
1181
1221
  };
1182
1222
  });
1183
1223
  });
1224
+ _defineProperty(_this, "removeAllDatastreams", function () {
1225
+ _this.setState(function (state) {
1226
+ return {
1227
+ graph: _objectSpread(_objectSpread({}, state.graph), {}, {
1228
+ datastreams: []
1229
+ }),
1230
+ datastreamInfoWindow: null,
1231
+ datastreamOptions: [],
1232
+ datastreamTableWindow: null
1233
+ };
1234
+ });
1235
+ });
1184
1236
  // NOTE: color as [<r>, <g>, <b>] (0-255)
1185
1237
  _defineProperty(_this, "optionsForThresholdLine", function (axisID, label, thresholdValue, color) {
1186
1238
  var annotationOptions = {
@@ -2963,6 +3015,14 @@ var SensorThingsTool = /*#__PURE__*/function (_React$Component) {
2963
3015
  } else if (prevState.currentSensorLocation && !this.state.currentSensorLocation) {
2964
3016
  this.props.removeLayer("sensorThingsSelection");
2965
3017
  }
3018
+ if (this.state.addCurrentLocationDatastreams && this.state.currentSensorLocation && this.state.currentSensorLocation.id === this.state.currentLocationId) {
3019
+ // add all Datastreams of current Location
3020
+ this.addDatastreams(this.state.currentSensorLocation.datastreams);
3021
+ // reset flag
3022
+ this.setState({
3023
+ addCurrentLocationDatastreams: false
3024
+ });
3025
+ }
2966
3026
  if (this.state.currentDatastreamsFilter !== prevState.currentDatastreamsFilter) {
2967
3027
  this.filterLocationDatastreams();
2968
3028
  }
@@ -163,16 +163,30 @@ div.sensor-things-location-select-header {
163
163
  }
164
164
  div.sensor-things-location-select-list {
165
165
  padding: 0.25em;
166
+ max-width: 500px;
166
167
  max-height: 16em;
167
168
  overflow-y: auto;
168
169
  }
169
- div.sensor-things-location-select-list div {
170
+ table.sensor-things-location-select-table tr:hover {
171
+ background-color: var(--button-bg-color);
172
+ }
173
+ table.sensor-things-location-select-table td {
170
174
  padding-top: 0.25em;
175
+ padding-bottom: 0.25em;
176
+ border-bottom: 1px solid var(--border-color);
171
177
  }
172
- div.sensor-things-location-select-list div:hover {
173
- font-weight: bold;
178
+ table.sensor-things-location-select-table td:nth-child(1) {
179
+ max-width: 430px;
180
+ overflow: hidden;
181
+ white-space: nowrap;
182
+ text-overflow: ellipsis;
174
183
  cursor: pointer;
175
184
  }
185
+ table.sensor-things-location-select-table td div.sensor-things-location-select-buttons {
186
+ display: flex;
187
+ padding-left: 0.25em;
188
+ font-size: 85%;
189
+ }
176
190
 
177
191
  table.sensor-things-location-info td:nth-child(1) {
178
192
  width: 8.5em;
@@ -224,6 +224,7 @@
224
224
  "create": "Създаване на",
225
225
  "discard": "Изхвърляне",
226
226
  "draw": "Начертайте",
227
+ "emptyvalue": "",
227
228
  "feature": "Функции",
228
229
  "geomnonzeroz": "Геометрията съдържа ненулеви стойности на Z и следователно е само за четене.",
229
230
  "geomreadonly": "",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "Crear",
225
225
  "discard": "Descartar",
226
226
  "draw": "Traçar",
227
+ "emptyvalue": "",
227
228
  "feature": "Element",
228
229
  "geomnonzeroz": "La geometria conté valors Z diferents de zero, per tant és de només lectura",
229
230
  "geomreadonly": "La geometria és només de lectura.",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "Vytvořit",
225
225
  "discard": "Vyřadit",
226
226
  "draw": "Kreslit",
227
+ "emptyvalue": "",
227
228
  "feature": "Prvek",
228
229
  "geomnonzeroz": "",
229
230
  "geomreadonly": "",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "Erstellen",
225
225
  "discard": "Abbrechen",
226
226
  "draw": "Zeichnen",
227
+ "emptyvalue": "Leerer Wert",
227
228
  "feature": "Objekt",
228
229
  "geomnonzeroz": "Die Geometrie enthält Z-Werte ungleich Null und ist daher nicht veränderbar.",
229
230
  "geomreadonly": "Die Geometrie ist nicht veränderbar.",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "Datastream zum Graph hinzufügen",
652
+ "addLocation": "Location hinzufügen",
653
+ "addLocationAndDatastreams": "Location hinzufügen und alle ihre Datastreams im Graph anzeigen",
651
654
  "datastreamInfo": {
652
655
  "calibration": "Kalibrierung",
653
656
  "description": "Beschreibung",
@@ -224,6 +224,7 @@
224
224
  "create": "Erstellen",
225
225
  "discard": "Abbrechen",
226
226
  "draw": "Zeichnen",
227
+ "emptyvalue": "Leerer Wert",
227
228
  "feature": "Objekt",
228
229
  "geomnonzeroz": "Die Geometrie enthält Z-Werte ungleich Null und ist daher nicht veränderbar.",
229
230
  "geomreadonly": "Die Geometrie ist nicht veränderbar",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "Datastream zum Graph hinzufügen",
652
+ "addLocation": "Location hinzufügen",
653
+ "addLocationAndDatastreams": "Location hinzufügen und alle ihre Datastreams im Graph anzeigen",
651
654
  "datastreamInfo": {
652
655
  "calibration": "Kalibrierung",
653
656
  "description": "Beschreibung",
@@ -813,7 +816,7 @@
813
816
  "title": "Titel"
814
817
  },
815
818
  "openintab": "In Tab öffnen",
816
- "restrictedcontent": "",
819
+ "restrictedcontent": "Theme mit Inhalten, die auf authentifizierte Benutzer beschränkt sind",
817
820
  "restrictedthemeinfo": "Sie sind nicht berechtigt oder sind nicht angemeldet"
818
821
  },
819
822
  "timemanager": {
@@ -224,6 +224,7 @@
224
224
  "create": "Create",
225
225
  "discard": "Discard",
226
226
  "draw": "Draw",
227
+ "emptyvalue": "Empty value",
227
228
  "feature": "Feature",
228
229
  "geomnonzeroz": "The geometry contains non-zero Z values and is therefore read only.",
229
230
  "geomreadonly": "The geometry is read only.",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "Add datastream to graph",
652
+ "addLocation": "Add location",
653
+ "addLocationAndDatastreams": "Add location and show all its datastreams in the graph",
651
654
  "datastreamInfo": {
652
655
  "calibration": "Calibration",
653
656
  "description": "Description",
@@ -224,6 +224,7 @@
224
224
  "create": "Crear",
225
225
  "discard": "Descartar",
226
226
  "draw": "Trazar",
227
+ "emptyvalue": "",
227
228
  "feature": "Elemento",
228
229
  "geomnonzeroz": "La geometría contiene valores Z diferentes de cero por lo que es sólo lectura",
229
230
  "geomreadonly": "La geometría es de solo lectura.",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "",
225
225
  "discard": "Discard",
226
226
  "draw": "Draw",
227
+ "emptyvalue": "",
227
228
  "feature": "Feature",
228
229
  "geomnonzeroz": "",
229
230
  "geomreadonly": "",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "Créer",
225
225
  "discard": "Rejeter",
226
226
  "draw": "Dessiner",
227
+ "emptyvalue": "Valeur vide",
227
228
  "feature": "Objet",
228
229
  "geomnonzeroz": "La géométrie contient des valeurs Z non nulles et ne peut donc pas être modifiée.",
229
230
  "geomreadonly": "La géométrie e peut pas être modifiée.",
@@ -533,7 +534,7 @@
533
534
  "loading": "Chargement des données..."
534
535
  },
535
536
  "portal": {
536
- "close": "",
537
+ "close": "Fermer le portail",
537
538
  "filter": "Filtrer les thèmes...",
538
539
  "menulabel": "Menu"
539
540
  },
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "Ajouter un flux de données au graphique",
652
+ "addLocation": "Ajouter un lieu",
653
+ "addLocationAndDatastreams": "Ajouter un emplacement et afficher tous ses flux de données dans le graphique",
651
654
  "datastreamInfo": {
652
655
  "calibration": "Calibration",
653
656
  "description": "Description",
@@ -224,6 +224,7 @@
224
224
  "create": "",
225
225
  "discard": "Elvetés",
226
226
  "draw": "Rajzolás",
227
+ "emptyvalue": "",
227
228
  "feature": "",
228
229
  "geomnonzeroz": "",
229
230
  "geomreadonly": "",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "Crea",
225
225
  "discard": "Annulla",
226
226
  "draw": "Disegna",
227
+ "emptyvalue": "Valore vuoto",
227
228
  "feature": "Oggetto",
228
229
  "geomnonzeroz": "La geometria contiene valori Z non nulli ed è quindi di sola lettura.",
229
230
  "geomreadonly": "La geometria è di solo lettura.",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "Aggiungi flusso di dati al grafico",
652
+ "addLocation": "Aggiungi una posizione",
653
+ "addLocationAndDatastreams": "Aggiungi una posizione e visualizza tutti i relativi flussi di dati nel grafico",
651
654
  "datastreamInfo": {
652
655
  "calibration": "Calibrazione",
653
656
  "description": "Descrizione",
@@ -224,6 +224,7 @@
224
224
  "create": "作成",
225
225
  "discard": "中止",
226
226
  "draw": "作図",
227
+ "emptyvalue": "",
227
228
  "feature": "地物",
228
229
  "geomnonzeroz": "ジオメトリが 0 でない Z 値を含んでいるため、リード・オンリーです。",
229
230
  "geomreadonly": "ジオメトリがリード・オンリーです。",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "Toevoegen",
225
225
  "discard": "Negeren",
226
226
  "draw": "Tekenen",
227
+ "emptyvalue": "",
227
228
  "feature": "Object",
228
229
  "geomnonzeroz": "De geometrie bevat geen Z-waarden en is daarom read only.",
229
230
  "geomreadonly": "",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "",
225
225
  "discard": "Forkast",
226
226
  "draw": "Tegn",
227
+ "emptyvalue": "",
227
228
  "feature": "Objekt",
228
229
  "geomnonzeroz": "",
229
230
  "geomreadonly": "",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "",
225
225
  "discard": "Odrzuć",
226
226
  "draw": "Rysuj",
227
+ "emptyvalue": "",
227
228
  "feature": "",
228
229
  "geomnonzeroz": "",
229
230
  "geomreadonly": "",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "Criar",
225
225
  "discard": "Descartar",
226
226
  "draw": "Desenhar",
227
+ "emptyvalue": "",
227
228
  "feature": "Feição",
228
229
  "geomnonzeroz": "Geometria somente de leitura",
229
230
  "geomreadonly": "",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "Criar",
225
225
  "discard": "Descartar",
226
226
  "draw": "Desenhar",
227
+ "emptyvalue": "",
227
228
  "feature": "Recurso",
228
229
  "geomnonzeroz": "Geometria Apenas para Leitura",
229
230
  "geomreadonly": "",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "Creare",
225
225
  "discard": "Renunță",
226
226
  "draw": "Desenare",
227
+ "emptyvalue": "",
227
228
  "feature": "Obiect spațial",
228
229
  "geomnonzeroz": "Geometria include valori Z și, prin urmare, nu poate fi editată",
229
230
  "geomreadonly": "",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "",
225
225
  "discard": "Отменить изменения",
226
226
  "draw": "Нарисовать",
227
+ "emptyvalue": "",
227
228
  "feature": "",
228
229
  "geomnonzeroz": "",
229
230
  "geomreadonly": "",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "",
225
225
  "discard": "Förkasta",
226
226
  "draw": "Rita",
227
+ "emptyvalue": "",
227
228
  "feature": "Objekt",
228
229
  "geomnonzeroz": "",
229
230
  "geomreadonly": "",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -224,6 +224,7 @@
224
224
  "create": "Yeni oluştur",
225
225
  "discard": "İptal",
226
226
  "draw": "Çiz",
227
+ "emptyvalue": "",
227
228
  "feature": "Obje",
228
229
  "geomnonzeroz": "Geometri, sıfır olmayan yükseklik değeri içerdiğinden salt okunur",
229
230
  "geomreadonly": "",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",
@@ -235,6 +235,7 @@
235
235
  "editing.create",
236
236
  "editing.discard",
237
237
  "editing.draw",
238
+ "editing.emptyvalue",
238
239
  "editing.feature",
239
240
  "editing.geomnonzeroz",
240
241
  "editing.geomreadonly",
@@ -563,6 +564,8 @@
563
564
  "search.themes",
564
565
  "search.unknownmore",
565
566
  "sensorthingstool.addDatastream",
567
+ "sensorthingstool.addLocation",
568
+ "sensorthingstool.addLocationAndDatastreams",
566
569
  "sensorthingstool.datastreamInfo.calibration",
567
570
  "sensorthingstool.datastreamInfo.description",
568
571
  "sensorthingstool.datastreamInfo.location",
@@ -224,6 +224,7 @@
224
224
  "create": "",
225
225
  "discard": "Скасувати зміни",
226
226
  "draw": "Намалювати",
227
+ "emptyvalue": "",
227
228
  "feature": "",
228
229
  "geomnonzeroz": "",
229
230
  "geomreadonly": "",
@@ -648,6 +649,8 @@
648
649
  },
649
650
  "sensorthingstool": {
650
651
  "addDatastream": "",
652
+ "addLocation": "",
653
+ "addLocationAndDatastreams": "",
651
654
  "datastreamInfo": {
652
655
  "calibration": "",
653
656
  "description": "",