qwc2 2026.6.17 → 2026.6.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -441,6 +441,9 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
|
|
|
441
441
|
_defineProperty(_this, "validateForm", function (feature) {
|
|
442
442
|
var validCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
443
443
|
var invalidCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
444
|
+
if (!_this.form) {
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
444
447
|
var constraintExpressions = _this.props.editContext.editConfig.fields.reduce(function (res, cur) {
|
|
445
448
|
var _cur$constraints;
|
|
446
449
|
if ((_cur$constraints = cur.constraints) !== null && _cur$constraints !== void 0 && _cur$constraints.expression) {
|
package/components/MapButton.js
CHANGED
|
@@ -56,6 +56,8 @@ var MapButton = /*#__PURE__*/function (_React$Component) {
|
|
|
56
56
|
}, /*#__PURE__*/React.createElement("button", {
|
|
57
57
|
className: "".concat(className, " ").concat(this.props.className || ""),
|
|
58
58
|
onClick: this.props.onClick,
|
|
59
|
+
onMouseEnter: this.props.onMouseEnter,
|
|
60
|
+
onMouseLeave: this.props.onMouseLeave,
|
|
59
61
|
ref: this.props.buttonRef,
|
|
60
62
|
title: this.props.tooltip
|
|
61
63
|
}, this.props.busy ? /*#__PURE__*/React.createElement(Spinner, null) : /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -77,6 +79,8 @@ _defineProperty(MapButton, "propTypes", {
|
|
|
77
79
|
icon: PropTypes.string,
|
|
78
80
|
iconSize: PropTypes.string,
|
|
79
81
|
onClick: PropTypes.func,
|
|
82
|
+
onMouseEnter: PropTypes.func,
|
|
83
|
+
onMouseLeave: PropTypes.func,
|
|
80
84
|
position: PropTypes.number,
|
|
81
85
|
tooltip: PropTypes.string
|
|
82
86
|
});
|
|
@@ -29,6 +29,7 @@ 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
33
|
var _this;
|
|
33
34
|
_classCallCheck(this, PopupMenu);
|
|
34
35
|
_this = _callSuper(this, PopupMenu, [props]);
|
|
@@ -66,7 +67,7 @@ var PopupMenu = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
66
67
|
var childCount = _this.menuEl.children.length;
|
|
67
68
|
var delta = ev.key === 'ArrowUp' ? -1 : 1;
|
|
68
69
|
var currentIndex = Array.from(_this.menuEl.children).findIndex(function (el) {
|
|
69
|
-
return document.activeElement === el || el.contains(document.activeElement);
|
|
70
|
+
return ev.view.document.activeElement === el || el.contains(ev.view.document.activeElement);
|
|
70
71
|
});
|
|
71
72
|
if (currentIndex === -1) {
|
|
72
73
|
currentIndex = delta === 1 ? childCount - 1 : 0;
|
|
@@ -91,7 +92,7 @@ var PopupMenu = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
91
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);
|
|
92
93
|
}
|
|
93
94
|
});
|
|
94
|
-
_this.container = document.createElement("div");
|
|
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");
|
|
95
96
|
_this.container.id = 'popup-container';
|
|
96
97
|
_this.container.style.position = 'fixed';
|
|
97
98
|
_this.container.style.left = 0;
|
|
@@ -102,7 +103,8 @@ var PopupMenu = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
102
103
|
if (_this.props.anchor) {
|
|
103
104
|
_this.shields = [];
|
|
104
105
|
var _loop = function _loop(i) {
|
|
105
|
-
_this
|
|
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");
|
|
106
108
|
_this.shields[i].style.position = 'absolute';
|
|
107
109
|
_this.shields[i].style.left = "0px";
|
|
108
110
|
_this.shields[i].style.right = "0px";
|
|
@@ -131,27 +133,27 @@ var PopupMenu = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
131
133
|
}, 0);
|
|
132
134
|
}
|
|
133
135
|
_this.menuEl = null;
|
|
134
|
-
document.body.appendChild(_this.container);
|
|
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);
|
|
135
137
|
return _this;
|
|
136
138
|
}
|
|
137
139
|
_inherits(PopupMenu, _React$PureComponent);
|
|
138
140
|
return _createClass(PopupMenu, [{
|
|
139
141
|
key: "componentDidMount",
|
|
140
142
|
value: function componentDidMount() {
|
|
141
|
-
var _this$props$
|
|
142
|
-
if (((_this$props$
|
|
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") {
|
|
143
145
|
this.props.anchor.addEventListener('keydown', this.keyNav);
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
148
|
}, {
|
|
147
149
|
key: "componentWillUnmount",
|
|
148
150
|
value: function componentWillUnmount() {
|
|
149
|
-
var _this$props$
|
|
150
|
-
document.body.removeChild(this.container);
|
|
151
|
-
if (((_this$props$
|
|
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") {
|
|
152
154
|
this.props.anchor.removeEventListener('keydown', this.keyNav);
|
|
153
155
|
}
|
|
154
|
-
(_this$props$
|
|
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);
|
|
155
157
|
}
|
|
156
158
|
}, {
|
|
157
159
|
key: "render",
|
package/package.json
CHANGED
|
@@ -364,6 +364,12 @@ export var BackgroundSwitcher = /*#__PURE__*/function (_React$Component) {
|
|
|
364
364
|
onClick: function onClick() {
|
|
365
365
|
return _this2.buttonClicked(nextLayer);
|
|
366
366
|
},
|
|
367
|
+
onMouseEnter: this.props.buttonClickAction === "cycle" ? function () {
|
|
368
|
+
return _this2.setSwitcherVisible(true);
|
|
369
|
+
} : null,
|
|
370
|
+
onMouseLeave: this.props.buttonClickAction === "cycle" ? function () {
|
|
371
|
+
return _this2.setSwitcherVisible(false);
|
|
372
|
+
} : null,
|
|
367
373
|
position: this.props.position,
|
|
368
374
|
tooltip: LocaleUtils.tr("tooltip.background")
|
|
369
375
|
}, this.renderSwitcher(backgroundLayers, visibleBgLayer));
|
package/plugins/ThemeBrowser.js
CHANGED
|
@@ -354,14 +354,14 @@ var ThemeBrowser = /*#__PURE__*/function (_React$Component) {
|
|
|
354
354
|
var resizeOverlay = document.createElement('div');
|
|
355
355
|
resizeOverlay.className = 'themebrowser-resize-overlay';
|
|
356
356
|
ev.view.document.body.appendChild(resizeOverlay);
|
|
357
|
-
|
|
357
|
+
ev.view.document.body.style.userSelect = 'none';
|
|
358
358
|
// ev.view.document.body.style.setProperty('cursor', 'ew-resize', 'important');
|
|
359
359
|
arrowsEl.style.display = 'none';
|
|
360
360
|
opacityEl.innerText = Math.round(startOpacity / 255 * 100) + "%";
|
|
361
361
|
ev.view.addEventListener("pointermove", computeNewOpacity);
|
|
362
362
|
ev.view.addEventListener("pointerup", function () {
|
|
363
363
|
ev.view.document.body.removeChild(resizeOverlay);
|
|
364
|
-
|
|
364
|
+
ev.view.document.body.style.userSelect = '';
|
|
365
365
|
// ev.view.document.body.style.removeProperty('cursor');
|
|
366
366
|
arrowsEl.style.display = '';
|
|
367
367
|
opacityEl.innerText = '';
|
|
@@ -89,7 +89,7 @@ var _listDir = function listDir(dir, pattern) {
|
|
|
89
89
|
var updateTsConfig = function updateTsConfig(topdir, tsconfig) {
|
|
90
90
|
var collectedMsgIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
91
91
|
var files = _listDir(topdir, /^.*\.[jt]sx?$/);
|
|
92
|
-
var trRegEx = /LocaleUtils\.tr(?:msg)?\((['"])([A-Za-z0-9._]+)\1/g;
|
|
92
|
+
var trRegEx = /LocaleUtils\.tr(?:msg)?\((['"])([A-Za-z0-9._-]+)\1/g;
|
|
93
93
|
var msgIds = new Set();
|
|
94
94
|
var _iterator2 = _createForOfIteratorHelper(files),
|
|
95
95
|
_step2;
|