qwc2 2026.1.31 → 2026.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/AttributeTableWidget.js +19 -6
- package/components/EditUploadField.js +11 -9
- package/components/PluginsContainer.js +3 -4
- package/components/ResizeableWindow.js +11 -18
- package/components/style/AttributeTableWidget.css +19 -0
- package/package.json +1 -1
- package/plugins/map/RedliningSupport.js +1 -0
- package/stores/StandardStore.js +4 -1
- package/utils/ServiceLayerUtils.js +1 -1
- package/utils/expr_grammar/grammar.js +1 -1
- package/utils/expr_grammar/grammar.ne +1 -1
|
@@ -657,15 +657,21 @@ var AttributeTableWidget = /*#__PURE__*/function (_React$Component) {
|
|
|
657
657
|
var resize = {
|
|
658
658
|
anchor: resizeCol ? ev.clientX : ev.clientY,
|
|
659
659
|
element: element,
|
|
660
|
-
initial: initial
|
|
660
|
+
initial: initial,
|
|
661
|
+
newsize: initial
|
|
661
662
|
};
|
|
663
|
+
var contentsEl = element.parentElement.parentElement.parentElement.parentElement;
|
|
664
|
+
var origin = contentsEl.getBoundingClientRect()[resizeCol ? "left" : "top"];
|
|
665
|
+
var resizeLine = document.createElement('div');
|
|
666
|
+
resizeLine.className = resizeCol ? 'attribtable-resize-line-vert' : 'attribtable-resize-line-horiz';
|
|
667
|
+
resizeLine.style[resizeCol ? "left" : "top"] = resize.anchor - origin + "px";
|
|
668
|
+
contentsEl.appendChild(resizeLine);
|
|
662
669
|
var resizeDo = resizeCol ? function (event) {
|
|
663
|
-
|
|
664
|
-
resize.
|
|
665
|
-
resize.element.style.width = Math.max(resize.initial + delta, 16) + "px";
|
|
670
|
+
resizeLine.style.left = event.clientX - origin + "px";
|
|
671
|
+
resize.newsize = resize.initial + event.clientX - resize.anchor;
|
|
666
672
|
} : function (event) {
|
|
667
|
-
|
|
668
|
-
resize.
|
|
673
|
+
resizeLine.style.top = event.clientY - origin + "px";
|
|
674
|
+
resize.newsize = resize.initial + event.clientY - resize.anchor;
|
|
669
675
|
};
|
|
670
676
|
var eventShield = ev.view.document.createElement("div");
|
|
671
677
|
eventShield.className = '__event_shield';
|
|
@@ -674,8 +680,15 @@ var AttributeTableWidget = /*#__PURE__*/function (_React$Component) {
|
|
|
674
680
|
ev.view.addEventListener("pointermove", resizeDo);
|
|
675
681
|
ev.view.addEventListener("pointerup", function (event) {
|
|
676
682
|
event.view.document.body.removeChild(eventShield);
|
|
683
|
+
contentsEl.removeChild(resizeLine);
|
|
677
684
|
event.view.removeEventListener("pointermove", resizeDo);
|
|
678
685
|
event.view.document.body.classList.remove(resizeCol ? 'ewresizing' : 'nsresizing');
|
|
686
|
+
if (resizeCol) {
|
|
687
|
+
resize.element.style.minWidth = Math.max(resize.newsize, 16) + "px";
|
|
688
|
+
resize.element.style.width = Math.max(resize.newsize, 16) + "px";
|
|
689
|
+
} else {
|
|
690
|
+
resize.element.style.height = Math.max(resize.newsize, 16) + "px";
|
|
691
|
+
}
|
|
679
692
|
}, {
|
|
680
693
|
once: true
|
|
681
694
|
});
|
|
@@ -27,7 +27,6 @@ import React from 'react';
|
|
|
27
27
|
import mime from 'mime-to-extensions';
|
|
28
28
|
import PropTypes from 'prop-types';
|
|
29
29
|
import { v4 as uuidv4 } from 'uuid';
|
|
30
|
-
import { showImageEditor } from '../utils/ImageEditor';
|
|
31
30
|
import LocaleUtils from '../utils/LocaleUtils';
|
|
32
31
|
import Icon from './Icon';
|
|
33
32
|
import ButtonBar from './widgets/ButtonBar';
|
|
@@ -115,15 +114,18 @@ var EditUploadField = /*#__PURE__*/function (_React$Component) {
|
|
|
115
114
|
var fileType = mime.lookup(fileValue);
|
|
116
115
|
var fileUrl = _this.props.iface.resolveAttachmentUrl(_this.props.dataset, fileValue);
|
|
117
116
|
var imageData = fileType && fileType.startsWith('image/') ? fileUrl : _this.state.imageData;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
import('../utils/ImageEditor').then(function (_ref) {
|
|
118
|
+
var showImageEditor = _ref.showImageEditor;
|
|
119
|
+
showImageEditor(imageData, function (newImageData) {
|
|
120
|
+
_this.setState({
|
|
121
|
+
imageData: newImageData,
|
|
122
|
+
imageFilename: fileValue.replace(/.*\//, '')
|
|
123
|
+
});
|
|
124
|
+
_this.props.updateField(_this.props.fieldId, '');
|
|
125
|
+
_this.props.updateFile(_this.props.fieldId, new File([_this.dataUriToBlob(newImageData)], uuidv4() + ".jpg", {
|
|
126
|
+
type: "image/jpeg"
|
|
127
|
+
}));
|
|
122
128
|
});
|
|
123
|
-
_this.props.updateField(_this.props.fieldId, '');
|
|
124
|
-
_this.props.updateFile(_this.props.fieldId, new File([_this.dataUriToBlob(newImageData)], uuidv4() + ".jpg", {
|
|
125
|
-
type: "image/jpeg"
|
|
126
|
-
}));
|
|
127
129
|
});
|
|
128
130
|
} else if (action === "Clear") {
|
|
129
131
|
_this.clearImage();
|
|
@@ -1,6 +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 _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
3
|
-
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
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; }
|
|
5
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; }
|
|
6
5
|
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
@@ -30,7 +29,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
29
|
* This source code is licensed under the BSD-style license found in the
|
|
31
30
|
* LICENSE file in the root directory of this source tree.
|
|
32
31
|
*/
|
|
33
|
-
import React from 'react';
|
|
32
|
+
import React, { Suspense } from 'react';
|
|
34
33
|
import { connect } from 'react-redux';
|
|
35
34
|
import PropTypes from 'prop-types';
|
|
36
35
|
import ConfigUtils from '../utils/ConfigUtils';
|
|
@@ -71,9 +70,9 @@ var PluginsContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
71
70
|
var themeDevicePluginConfig = ((_this$props$theme = _this.props.theme) === null || _this$props$theme === void 0 || (_this$props$theme = _this$props$theme.config) === null || _this$props$theme === void 0 || (_this$props$theme = _this$props$theme[device]) === null || _this$props$theme === void 0 || (_this$props$theme = _this$props$theme.plugins) === null || _this$props$theme === void 0 ? void 0 : _this$props$theme[pluginConf.name]) || {};
|
|
72
71
|
var themePluginConfig = ((_this$props$theme2 = _this.props.theme) === null || _this$props$theme2 === void 0 || (_this$props$theme2 = _this$props$theme2.config) === null || _this$props$theme2 === void 0 || (_this$props$theme2 = _this$props$theme2.plugins) === null || _this$props$theme2 === void 0 ? void 0 : _this$props$theme2[pluginConf.name]) || {};
|
|
73
72
|
var cfg = _objectSpread(_objectSpread(_objectSpread({}, pluginConf.cfg || {}), themePluginConfig), themeDevicePluginConfig);
|
|
74
|
-
return /*#__PURE__*/React.createElement(
|
|
73
|
+
return /*#__PURE__*/React.createElement(Suspense, {
|
|
75
74
|
key: (_pluginConf$key = pluginConf.key) !== null && _pluginConf$key !== void 0 ? _pluginConf$key : pluginConf.name
|
|
76
|
-
}, cfg));
|
|
75
|
+
}, /*#__PURE__*/React.createElement(Plugin, cfg));
|
|
77
76
|
});
|
|
78
77
|
});
|
|
79
78
|
_defineProperty(_this, "setupTouchEvents", function (el) {
|
|
@@ -230,21 +230,15 @@ var ResizeableWindow = /*#__PURE__*/function (_React$Component) {
|
|
|
230
230
|
minWidth: _this.props.minWidth,
|
|
231
231
|
onDragStart: _this.onDragStart,
|
|
232
232
|
onDragStop: _this.onDragStop,
|
|
233
|
-
onMouseDown:
|
|
234
|
-
return _this.props.raiseWindow(_this.id);
|
|
235
|
-
},
|
|
233
|
+
onMouseDown: _this.raiseWindow,
|
|
236
234
|
onResizeStop: _this.onResizeStop,
|
|
237
235
|
ref: _this.initRnd
|
|
238
236
|
}, /*#__PURE__*/React.createElement("div", {
|
|
239
237
|
className: "resizeable-window-contents",
|
|
240
|
-
onFocus:
|
|
241
|
-
return _this.props.raiseWindow(_this.id);
|
|
242
|
-
}
|
|
238
|
+
onFocus: _this.raiseWindow
|
|
243
239
|
}, _this.renderTitleBar(), /*#__PURE__*/React.createElement("div", {
|
|
244
240
|
className: bodyclasses,
|
|
245
|
-
onMouseDown:
|
|
246
|
-
return _this.props.raiseWindow(_this.id);
|
|
247
|
-
},
|
|
241
|
+
onMouseDown: _this.raiseWindow,
|
|
248
242
|
onScroll: _this.preventScroll
|
|
249
243
|
}, /*#__PURE__*/React.createElement("div", {
|
|
250
244
|
className: "resizeable-window-drag-shield",
|
|
@@ -263,6 +257,11 @@ var ResizeableWindow = /*#__PURE__*/function (_React$Component) {
|
|
|
263
257
|
ev.target.scrollTop = 0;
|
|
264
258
|
}
|
|
265
259
|
});
|
|
260
|
+
_defineProperty(_this, "raiseWindow", function () {
|
|
261
|
+
if (_this.props.windowStacking[_this.props.windowStacking.length - 1] !== _this.id) {
|
|
262
|
+
_this.props.raiseWindow(_this.id);
|
|
263
|
+
}
|
|
264
|
+
});
|
|
266
265
|
_defineProperty(_this, "setInitialSize", function (container) {
|
|
267
266
|
if (!container) {
|
|
268
267
|
return;
|
|
@@ -467,15 +466,9 @@ var ResizeableWindow = /*#__PURE__*/function (_React$Component) {
|
|
|
467
466
|
_this.id = uuidv4();
|
|
468
467
|
_this.portalNode = props.usePortal ? portals.createHtmlPortalNode() : null;
|
|
469
468
|
if (_this.portalNode) {
|
|
470
|
-
_this.portalNode.element.addEventListener('click',
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
_this.portalNode.element.addEventListener('focus', function () {
|
|
474
|
-
return _this.props.raiseWindow(_this.id);
|
|
475
|
-
});
|
|
476
|
-
_this.portalNode.element.addEventListener('focusin', function () {
|
|
477
|
-
return _this.props.raiseWindow(_this.id);
|
|
478
|
-
});
|
|
469
|
+
_this.portalNode.element.addEventListener('click', _this.raiseWindow);
|
|
470
|
+
_this.portalNode.element.addEventListener('focus', _this.raiseWindow);
|
|
471
|
+
_this.portalNode.element.addEventListener('focusin', _this.raiseWindow);
|
|
479
472
|
}
|
|
480
473
|
return _this;
|
|
481
474
|
}
|
|
@@ -219,3 +219,22 @@ body.nsresizing, body.nsresizing * {
|
|
|
219
219
|
cursor: ns-resize!important;
|
|
220
220
|
user-select: none;
|
|
221
221
|
}
|
|
222
|
+
|
|
223
|
+
div.attribtable-resize-line-vert,
|
|
224
|
+
div.attribtable-resize-line-horiz {
|
|
225
|
+
position: absolute;
|
|
226
|
+
z-index: 2;
|
|
227
|
+
background-color: var(--border-color);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
div.attribtable-resize-line-vert {
|
|
231
|
+
width: 4px;
|
|
232
|
+
top: 0;
|
|
233
|
+
bottom: 0;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
div.attribtable-resize-line-horiz {
|
|
237
|
+
height: 4px;
|
|
238
|
+
left: 0;
|
|
239
|
+
right: 0;
|
|
240
|
+
}
|
package/package.json
CHANGED
|
@@ -200,6 +200,7 @@ var RedliningSupport = /*#__PURE__*/function (_React$Component) {
|
|
|
200
200
|
feature.set('measurements', undefined);
|
|
201
201
|
feature.set('segment_labels', undefined);
|
|
202
202
|
feature.set('label', '');
|
|
203
|
+
feature.set('end_label', undefined);
|
|
203
204
|
}
|
|
204
205
|
});
|
|
205
206
|
_defineProperty(_this, "updateMeasurements", function (ev) {
|
package/stores/StandardStore.js
CHANGED
|
@@ -37,7 +37,10 @@ export var createStore = function createStore(reducers) {
|
|
|
37
37
|
preloadedState: defaultState,
|
|
38
38
|
middleware: function middleware(getDefaultMiddleware) {
|
|
39
39
|
var middleware = getDefaultMiddleware({
|
|
40
|
-
serializableCheck: false
|
|
40
|
+
serializableCheck: false,
|
|
41
|
+
immutableCheck: {
|
|
42
|
+
ignoredPaths: ['theme.themes']
|
|
43
|
+
}
|
|
41
44
|
});
|
|
42
45
|
if (enableDevTools) {
|
|
43
46
|
middleware.push(logger);
|
|
@@ -359,7 +359,7 @@ var ServiceLayerUtils = {
|
|
|
359
359
|
dimensions: dimensions,
|
|
360
360
|
styles: styles,
|
|
361
361
|
style: style,
|
|
362
|
-
serverType: translationsUrl ? 'qgis' :
|
|
362
|
+
serverType: translationsUrl ? 'qgis' : undefined // If there is a translationsUrl, assume it is the qwc-ogc-service
|
|
363
363
|
};
|
|
364
364
|
},
|
|
365
365
|
getWFSLayers: function getWFSLayers(capabilities, calledServiceUrl, mapCrs) {
|
|
@@ -1921,7 +1921,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
1921
1921
|
"literal": ")"
|
|
1922
1922
|
}],
|
|
1923
1923
|
"postprocess": function postprocess(d) {
|
|
1924
|
-
return d[4].includes(d[8]);
|
|
1924
|
+
return asFilter(d) ? [d[4], "HAS", d[8]] : d[4].includes(d[8]);
|
|
1925
1925
|
}
|
|
1926
1926
|
}, {
|
|
1927
1927
|
"name": "N$string$51",
|
|
@@ -135,7 +135,7 @@ N -> float {% id %}
|
|
|
135
135
|
| "array_all" _ "(" _ P0 _ "," _ P0 _ ")" {% function(d) { return d[8].every(val => d[4].includes(val)); } %}
|
|
136
136
|
| "array_append" _ "(" _ P0 _ "," _ P0 _ ")" {% function(d) { return [...d[4], d[8]]; } %}
|
|
137
137
|
| "array_cat" _ "(" _ P0 _ "," _ P0 _ ")" {% function(d) { return [...d[4], ...d[8]]; } %}
|
|
138
|
-
| "array_contains" _ "(" _ P0 _ "," _ P0 _ ")" {% function(d) { return d[4].includes(d[8]); } %}
|
|
138
|
+
| "array_contains" _ "(" _ P0 _ "," _ P0 _ ")" {% function(d) { return asFilter(d) ? [d[4], "HAS", d[8]] : d[4].includes(d[8]); } %}
|
|
139
139
|
| "array_count" _ "(" _ P0 _ "," _ P0 _ ")" {% function(d) { return d[4].filter(val => val === d[8]).length; } %}
|
|
140
140
|
| "array_distinct" _ "(" _ P0 _ ")" {% function(d) { return [...new Set(d[4])].sort((a,b) => a-b); } %}
|
|
141
141
|
# "array_filter" _ "(" _ P0 _ "," _ P1 _ ")" TODO
|