qwc2 2025.11.26 → 2025.12.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.
|
@@ -1100,7 +1100,7 @@ var IdentifyViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
1100
1100
|
return htmlReactParser(text, options);
|
|
1101
1101
|
});
|
|
1102
1102
|
_defineProperty(_this, "attributeLinkClicked", function (ev) {
|
|
1103
|
-
_this.props.openExternalUrl(ev.
|
|
1103
|
+
_this.props.openExternalUrl(ev.currentTarget.href, ev.target.target, {
|
|
1104
1104
|
docked: _this.props.iframeDialogsInitiallyDocked
|
|
1105
1105
|
});
|
|
1106
1106
|
ev.preventDefault();
|
|
@@ -1,14 +1,14 @@
|
|
|
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
|
+
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
|
+
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
|
+
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; }
|
|
2
6
|
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
3
7
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
+
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; } }
|
|
4
9
|
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
5
10
|
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
6
|
-
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; } } }; }
|
|
7
|
-
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; } }
|
|
8
11
|
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; }
|
|
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); }
|
|
10
|
-
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; }
|
|
11
|
-
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; }
|
|
12
12
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
13
|
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); } }
|
|
14
14
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
@@ -59,7 +59,10 @@ var PluginsContainer = /*#__PURE__*/function (_React$Component) {
|
|
|
59
59
|
_defineProperty(_this, "renderPlugins", function () {
|
|
60
60
|
var device = ConfigUtils.isMobile() ? 'mobile' : 'desktop';
|
|
61
61
|
var plugins = PluginStore.getPlugins();
|
|
62
|
-
return _this.props.pluginsConfig.
|
|
62
|
+
return _toConsumableArray(_this.props.pluginsConfig).sort(function (a, b) {
|
|
63
|
+
var _ref, _a$order;
|
|
64
|
+
return (_ref = (_a$order = a.order) !== null && _a$order !== void 0 ? _a$order : 0 - b.order) !== null && _ref !== void 0 ? _ref : 0;
|
|
65
|
+
}).map(function (pluginConf) {
|
|
63
66
|
var _this$props$theme, _this$props$theme2, _pluginConf$key;
|
|
64
67
|
var Plugin = plugins[pluginConf.name + "Plugin"];
|
|
65
68
|
if (!Plugin) {
|
|
@@ -199,7 +199,6 @@ var AppContainerComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
199
199
|
}, {
|
|
200
200
|
key: "render",
|
|
201
201
|
value: function render() {
|
|
202
|
-
// Filter 2D plugins
|
|
203
202
|
var device = ConfigUtils.isMobile() ? 'mobile' : 'desktop';
|
|
204
203
|
var pluginsConf = this.props.localConfig.plugins[device];
|
|
205
204
|
return /*#__PURE__*/React.createElement(PluginsContainer, {
|
package/package.json
CHANGED
package/plugins/LayerTree.js
CHANGED
|
@@ -166,7 +166,7 @@ var LayerTree = /*#__PURE__*/function (_React$Component) {
|
|
|
166
166
|
"layertree-item-menubutton": true,
|
|
167
167
|
"layertree-item-menubutton-active": _this.state.activestylemenu === groupId
|
|
168
168
|
});
|
|
169
|
-
var allowRemove = ConfigUtils.getConfigProp("allowRemovingThemeLayers", _this.props.theme) === true || layer.role !== LayerRole.THEME;
|
|
169
|
+
var allowRemove = _this.props.allowRemovingThemeLayers || ConfigUtils.getConfigProp("allowRemovingThemeLayers", _this.props.theme) === true || layer.role !== LayerRole.THEME;
|
|
170
170
|
var allowReordering = ConfigUtils.getConfigProp("allowReorderingLayers", _this.props.theme) === true && !_this.state.filterinvisiblelayers;
|
|
171
171
|
var sortable = allowReordering && ConfigUtils.getConfigProp("preventSplittingGroupsWhenReordering", _this.props.theme) === true;
|
|
172
172
|
var styles = layer.type === "wms" && path.length === 0 ? _this.getLayerStyles(layer) : null;
|
|
@@ -252,7 +252,7 @@ var LayerTree = /*#__PURE__*/function (_React$Component) {
|
|
|
252
252
|
return null;
|
|
253
253
|
}
|
|
254
254
|
var sublayerId = layer.id + ":" + sublayer.name;
|
|
255
|
-
var allowRemove = ConfigUtils.getConfigProp("allowRemovingThemeLayers", _this.props.theme) === true || layer.role !== LayerRole.THEME;
|
|
255
|
+
var allowRemove = _this.props.allowRemovingThemeLayers || ConfigUtils.getConfigProp("allowRemovingThemeLayers", _this.props.theme) === true || layer.role !== LayerRole.THEME;
|
|
256
256
|
var allowReordering = ConfigUtils.getConfigProp("allowReorderingLayers", _this.props.theme) === true;
|
|
257
257
|
var checkboxstate = sublayer.visibility === true ? 'checked' : 'unchecked';
|
|
258
258
|
if (inMutuallyExclusiveGroup) {
|
|
@@ -355,7 +355,7 @@ var LayerTree = /*#__PURE__*/function (_React$Component) {
|
|
|
355
355
|
}
|
|
356
356
|
var allowOptions = layer.type !== "placeholder" && layer.type !== "separator";
|
|
357
357
|
var flattenGroups = ConfigUtils.getConfigProp("flattenLayerTreeGroups", _this.props.theme) || _this.props.flattenGroups;
|
|
358
|
-
var allowSeparators =
|
|
358
|
+
var allowSeparators = allowReordering && (_this.props.allowLayerTreeSeparators || ConfigUtils.getConfigProp("allowLayerTreeSeparators", _this.props.theme));
|
|
359
359
|
var separatorTitle = LocaleUtils.tr("layertree.separator");
|
|
360
360
|
var separatorTooltip = LocaleUtils.tr("layertree.separatortooltip");
|
|
361
361
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1031,7 +1031,7 @@ var LayerTree = /*#__PURE__*/function (_React$Component) {
|
|
|
1031
1031
|
});
|
|
1032
1032
|
}
|
|
1033
1033
|
var deleteAllLayersIcon = null;
|
|
1034
|
-
if (ConfigUtils.getConfigProp("allowRemovingThemeLayers") === true) {
|
|
1034
|
+
if (this.props.allowRemovingThemeLayers || ConfigUtils.getConfigProp("allowRemovingThemeLayers") === true) {
|
|
1035
1035
|
var deleteAllLayersTooltip = LocaleUtils.tr("layertree.deletealllayers");
|
|
1036
1036
|
deleteAllLayersIcon = /*#__PURE__*/React.createElement(Icon, {
|
|
1037
1037
|
className: "layertree-delete-legend",
|
|
@@ -1082,8 +1082,12 @@ _defineProperty(LayerTree, "propTypes", {
|
|
|
1082
1082
|
allowCompare: PropTypes.bool,
|
|
1083
1083
|
/** Whether to allow importing external layers. */
|
|
1084
1084
|
allowImport: PropTypes.bool,
|
|
1085
|
+
/** Whether to allow adding layer tree separators. */
|
|
1086
|
+
allowLayerTreeSeparators: PropTypes.bool,
|
|
1085
1087
|
/** Whether to allow enabling map tips. */
|
|
1086
1088
|
allowMapTips: PropTypes.bool,
|
|
1089
|
+
/** Whether to allow removing theme layers. */
|
|
1090
|
+
allowRemovingThemeLayers: PropTypes.bool,
|
|
1087
1091
|
/** Whether to allow selection of identifyable layers. The `showQueryableIcon` property should be `true` to be able to select identifyable layers. */
|
|
1088
1092
|
allowSelectIdentifyableLayers: PropTypes.bool,
|
|
1089
1093
|
/** Whether to display a BBOX dependent legend. Can be `true|false|"theme"`, latter means only for theme layers. */
|
package/plugins/MapTip.js
CHANGED
|
@@ -177,7 +177,7 @@ var MapTip = /*#__PURE__*/function (_React$Component) {
|
|
|
177
177
|
return htmlReactParser(text, options);
|
|
178
178
|
});
|
|
179
179
|
_defineProperty(_this, "attributeLinkClicked", function (ev) {
|
|
180
|
-
_this.props.openExternalUrl(ev.
|
|
180
|
+
_this.props.openExternalUrl(ev.currentTarget.href, ev.target.target, {
|
|
181
181
|
docked: _this.props.iframeDialogsInitiallyDocked
|
|
182
182
|
});
|
|
183
183
|
ev.preventDefault();
|
package/utils/IdentifyUtils.js
CHANGED
|
@@ -295,6 +295,10 @@ var IdentifyUtils = {
|
|
|
295
295
|
if (htmlContent.length > 0) {
|
|
296
296
|
featureResult.properties.htmlContent = htmlContent[0].textContent;
|
|
297
297
|
featureResult.properties.htmlContentInline = htmlContent[0].getAttribute("inline") === "1" || htmlContent[0].getAttribute("inline") === "true";
|
|
298
|
+
featureResult.properties.htmlContent = featureResult.properties.htmlContent.replace(/translate\(([^)]+)\)/g, function (match, cap) {
|
|
299
|
+
var _translations$layers$2, _translations$layers2;
|
|
300
|
+
return (_translations$layers$2 = translations === null || translations === void 0 || (_translations$layers2 = translations.layers) === null || _translations$layers2 === void 0 || (_translations$layers2 = _translations$layers2[layername]) === null || _translations$layers2 === void 0 || (_translations$layers2 = _translations$layers2.fields) === null || _translations$layers2 === void 0 ? void 0 : _translations$layers2[cap]) !== null && _translations$layers$2 !== void 0 ? _translations$layers$2 : cap;
|
|
301
|
+
});
|
|
298
302
|
}
|
|
299
303
|
if (!isEmpty(attrmapping)) {
|
|
300
304
|
featureResult.attribnames = attrmapping;
|