qwc2 2026.8.21 → 2026.8.24
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.
|
@@ -258,11 +258,12 @@ var AttributeForm = /*#__PURE__*/function (_React$Component) {
|
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
260
|
_defineProperty(_this, "addRelationRecord", function (table) {
|
|
261
|
+
var initialProperties = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
261
262
|
var newRelationValues = _objectSpread({}, _this.props.editContext.feature.relationValues);
|
|
262
263
|
var editConfig = _this.props.editConfigs[_this.props.editContext.mapPrefix][table.split('.').slice(-1)];
|
|
263
264
|
getFeatureTemplate(editConfig, {
|
|
264
265
|
type: "Feature",
|
|
265
|
-
properties: {}
|
|
266
|
+
properties: _objectSpread({}, initialProperties)
|
|
266
267
|
}, _this.props.iface, _this.props.editContext.mapPrefix, _this.props.map.projection, function (newRelFeature) {
|
|
267
268
|
newRelFeature.__status__ = "empty";
|
|
268
269
|
if (editConfig.geomType === null) {
|
|
@@ -5,6 +5,7 @@ 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); }
|
|
8
9
|
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; }
|
|
9
10
|
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; }
|
|
10
11
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -276,22 +277,23 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
|
|
|
276
277
|
elname = nametransform(widget.name);
|
|
277
278
|
}
|
|
278
279
|
if (widget.component) {
|
|
279
|
-
return /*#__PURE__*/React.createElement(widget.component, {
|
|
280
|
+
return /*#__PURE__*/React.createElement(widget.component, _extends({
|
|
280
281
|
addRelationRecord: _this.props.addRelationRecord,
|
|
281
282
|
constraints: constraints,
|
|
282
283
|
editConfigs: _this.props.editConfigs,
|
|
283
284
|
feature: _this.props.feature,
|
|
285
|
+
iface: _this.props.iface,
|
|
284
286
|
mapPrefix: _this.props.mapPrefix,
|
|
285
287
|
name: elname,
|
|
286
|
-
onChange: function onChange(val) {
|
|
287
|
-
return updateField(widget.name, val);
|
|
288
|
+
onChange: function onChange(val, fieldName) {
|
|
289
|
+
return updateField(fieldName !== null && fieldName !== void 0 ? fieldName : widget.name, val);
|
|
288
290
|
},
|
|
289
291
|
readOnly: _this.props.readOnly,
|
|
290
292
|
removeRelationRecord: _this.props.removeRelationRecord,
|
|
291
293
|
reorderRelationRecord: _this.props.reorderRelationRecord,
|
|
292
294
|
updateRelationField: _this.props.updateRelationField,
|
|
293
295
|
widget: widget
|
|
294
|
-
});
|
|
296
|
+
}, widget.props));
|
|
295
297
|
} else if (widget["class"] === "QLabel") {
|
|
296
298
|
if (widget.name.startsWith("img__")) {
|
|
297
299
|
var _feature$properties$w2, _feature$properties2;
|
|
@@ -973,6 +975,7 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
|
|
|
973
975
|
json.fields = fields;
|
|
974
976
|
json.buttons = buttons;
|
|
975
977
|
json.nrels = nrels;
|
|
978
|
+
json.relationTables = relationTables;
|
|
976
979
|
if (FormPreprocessors[_this.props.editConfig.editDataset]) {
|
|
977
980
|
FormPreprocessors[_this.props.editConfig.editDataset](json, _this.props.feature, function (formData) {
|
|
978
981
|
if (_this.state.loadingReqId === loadingReqId) {
|
|
@@ -990,7 +993,7 @@ var QtDesignerForm = /*#__PURE__*/function (_React$Component) {
|
|
|
990
993
|
loadingReqId: null
|
|
991
994
|
});
|
|
992
995
|
}
|
|
993
|
-
_this.props.setRelationTables(relationTables);
|
|
996
|
+
_this.props.setRelationTables(json.relationTables);
|
|
994
997
|
});
|
|
995
998
|
});
|
|
996
999
|
_defineProperty(_this, "reformatWidget", function (widget, relationTables, fields, buttons, nrels, externalFields, widgets, counters) {
|
|
@@ -54,6 +54,9 @@ var SearchWidget = /*#__PURE__*/function (_React$Component) {
|
|
|
54
54
|
resultsVisible: false
|
|
55
55
|
});
|
|
56
56
|
_defineProperty(_this, "renderResults", function () {
|
|
57
|
+
var _this$props$renderIte, _this$props$renderGro;
|
|
58
|
+
var renderItem = (_this$props$renderIte = _this.props.renderItem) !== null && _this$props$renderIte !== void 0 ? _this$props$renderIte : _this.renderItem;
|
|
59
|
+
var renderGroupTitle = (_this$props$renderGro = _this.props.renderGroupTitle) !== null && _this$props$renderGro !== void 0 ? _this$props$renderGro : _this.renderGroupTitle;
|
|
57
60
|
return /*#__PURE__*/React.createElement(PopupMenu, {
|
|
58
61
|
anchor: _this.input,
|
|
59
62
|
className: "search-widget-results",
|
|
@@ -68,24 +71,32 @@ var SearchWidget = /*#__PURE__*/function (_React$Component) {
|
|
|
68
71
|
var _group$type;
|
|
69
72
|
return _this.props.resultTypeFilter.includes((_group$type = group.type) !== null && _group$type !== void 0 ? _group$type : SearchResultType.PLACE);
|
|
70
73
|
}).map(function (group) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}, /*#__PURE__*/React.createElement("span", null, (_group$title = group.title) !== null && _group$title !== void 0 ? _group$title : LocaleUtils.tr(group.titlemsgid))), group.items.map(function (item) {
|
|
77
|
-
item.text = (item.label !== undefined ? item.label : item.text || '').replace(/<\/?\w+\s*\/?>/g, '');
|
|
78
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
79
|
-
className: "search-widget-results-item",
|
|
80
|
-
key: group.id + ":" + item.id,
|
|
81
|
-
onClick: function onClick() {
|
|
82
|
-
return _this.resultSelected(group, item);
|
|
83
|
-
},
|
|
84
|
-
title: item.text
|
|
85
|
-
}, item.text);
|
|
74
|
+
return [renderGroupTitle(group), group.items.map(function (item) {
|
|
75
|
+
var text = (item.label !== undefined ? item.label : item.text || '').replace(/<\/?\w+\s*\/?>/g, '');
|
|
76
|
+
return renderItem(group, _objectSpread(_objectSpread({}, item), {}, {
|
|
77
|
+
text: text
|
|
78
|
+
}));
|
|
86
79
|
})];
|
|
87
80
|
}).flat());
|
|
88
81
|
});
|
|
82
|
+
_defineProperty(_this, "renderGroupTitle", function (group) {
|
|
83
|
+
var _group$title;
|
|
84
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
className: "search-widget-results-group-title",
|
|
86
|
+
disabled: true,
|
|
87
|
+
key: group.id
|
|
88
|
+
}, /*#__PURE__*/React.createElement("span", null, (_group$title = group.title) !== null && _group$title !== void 0 ? _group$title : LocaleUtils.tr(group.titlemsgid)));
|
|
89
|
+
});
|
|
90
|
+
_defineProperty(_this, "renderItem", function (group, item) {
|
|
91
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: "search-widget-results-item",
|
|
93
|
+
key: group.id + ":" + item.id,
|
|
94
|
+
onClick: function onClick() {
|
|
95
|
+
return _this.resultSelected(group, item);
|
|
96
|
+
},
|
|
97
|
+
title: item.text
|
|
98
|
+
}, item.text);
|
|
99
|
+
});
|
|
89
100
|
_defineProperty(_this, "textChanged", function (ev) {
|
|
90
101
|
_this.setState({
|
|
91
102
|
text: ev.target.value,
|
|
@@ -232,6 +243,8 @@ _defineProperty(SearchWidget, "propTypes", {
|
|
|
232
243
|
className: PropTypes.string,
|
|
233
244
|
placeholder: PropTypes.string,
|
|
234
245
|
queryGeometries: PropTypes.bool,
|
|
246
|
+
renderGroupTitle: PropTypes.func,
|
|
247
|
+
renderItem: PropTypes.func,
|
|
235
248
|
resultSelected: PropTypes.func.isRequired,
|
|
236
249
|
resultTypeFilter: PropTypes.array,
|
|
237
250
|
searchParams: PropTypes.shape({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qwc2",
|
|
3
|
-
"version": "2026.08.
|
|
3
|
+
"version": "2026.08.24",
|
|
4
4
|
"description": "QGIS Web Client",
|
|
5
5
|
"author": "Sourcepole AG",
|
|
6
6
|
"license": "BSD-2-Clause",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"url": "^0.11.4",
|
|
103
103
|
"utif": "^3.1.0",
|
|
104
104
|
"uuid": "^14.0.0",
|
|
105
|
-
"xlsx": "
|
|
105
|
+
"xlsx": "npm:@stackline/xlsx@^1.0.6"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
108
|
"@babel/cli": "^7.28.6",
|