qwc2 2025.5.26 → 2025.5.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qwc2",
3
- "version": "2025.05.26",
3
+ "version": "2025.05.27",
4
4
  "description": "QGIS Web Client",
5
5
  "author": "Sourcepole AG",
6
6
  "license": "BSD-2-Clause",
@@ -4,6 +4,6 @@ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof
4
4
  *
5
5
  * This source code is licensed under the BSD-style license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
- */import React from"react";import{connect}from"react-redux";import classnames from"classnames";import PropTypes from"prop-types";import{setCurrentTask}from"../actions/task";import Icon from"../components/Icon";import ConfigUtils from"../utils/ConfigUtils";import LocaleUtils from"../utils/LocaleUtils";import ThemeUtils from"../utils/ThemeUtils";/**
7
+ */import React from"react";import{connect}from"react-redux";import PropTypes from"prop-types";import{setCurrentTask}from"../actions/task";import MapButton from"../components/MapButton";import ConfigUtils from"../utils/ConfigUtils";import LocaleUtils from"../utils/LocaleUtils";import ThemeUtils from"../utils/ThemeUtils";/**
8
8
  * Generic map button to launch a task.
9
- */var TaskButton=/*#__PURE__*/function(_React$Component){function TaskButton(){var _this;_classCallCheck(this,TaskButton);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}_this=_callSuper(this,TaskButton,[].concat(args));_defineProperty(_this,"buttonClicked",function(){var mapClickAction=ConfigUtils.getPluginConfig(_this.props.task).mapClickAction;_this.props.setCurrentTask(_this.props.currentTask===_this.props.task?null:_this.props.task,_this.props.mode,mapClickAction)});return _this}_inherits(TaskButton,_React$Component);return _createClass(TaskButton,[{key:"render",value:function render(){if(!ThemeUtils.themeFlagsAllowed(this.props.theme,this.props.themeFlagWhitelist,this.props.themeFlagBlacklist)){return null}var right=this.props.mapMargins.right;var bottom=this.props.mapMargins.bottom;var style={right:"calc(1.5em + "+right+"px)",bottom:"calc(var(--bottombar-height) + "+bottom+"px + "+(3+4*this.props.position)+"em)"};var classes=classnames({"map-button":true,"map-button-active":this.props.currentTask===this.props.task});var title=LocaleUtils.tr("appmenu.items."+this.props.task+(this.props.mode||""));return/*#__PURE__*/React.createElement("button",{className:classes,onClick:this.buttonClicked,style:style,title:title},/*#__PURE__*/React.createElement(Icon,{icon:this.props.icon}))}}])}(React.Component);_defineProperty(TaskButton,"propTypes",{currentTask:PropTypes.string,/** The icon name. */icon:PropTypes.string,mapMargins:PropTypes.object,/** The task mode. */mode:PropTypes.string,/** The position slot index of the map button, from the bottom (0: bottom slot). */position:PropTypes.number,setCurrentTask:PropTypes.func,/** The task name. */task:PropTypes.string,theme:PropTypes.object,/** Omit the button in themes matching one of these flags. */themeFlagBlacklist:PropTypes.arrayOf(PropTypes.string),/** Only show the button in themes matching one of these flags. */themeFlagWhitelist:PropTypes.arrayOf(PropTypes.string)});_defineProperty(TaskButton,"defaultProps",{position:1});var selector=function selector(state){return{currentTask:state.task.id,mapMargins:state.windows.mapMargins,theme:state.theme.current}};export default connect(selector,{setCurrentTask:setCurrentTask})(TaskButton);
9
+ */var TaskButton=/*#__PURE__*/function(_React$Component){function TaskButton(){var _this;_classCallCheck(this,TaskButton);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}_this=_callSuper(this,TaskButton,[].concat(args));_defineProperty(_this,"buttonClicked",function(){var mapClickAction=ConfigUtils.getPluginConfig(_this.props.task).mapClickAction;_this.props.setCurrentTask(_this.props.currentTask===_this.props.task?null:_this.props.task,_this.props.mode,mapClickAction)});return _this}_inherits(TaskButton,_React$Component);return _createClass(TaskButton,[{key:"render",value:function render(){if(!ThemeUtils.themeFlagsAllowed(this.props.theme,this.props.themeFlagWhitelist,this.props.themeFlagBlacklist)){return null}var title=LocaleUtils.tr("appmenu.items."+this.props.task+(this.props.mode||""));return/*#__PURE__*/React.createElement(MapButton,{icon:this.props.icon,onClick:this.buttonClicked,position:this.props.position,tooltip:title})}}])}(React.Component);_defineProperty(TaskButton,"propTypes",{currentTask:PropTypes.string,/** The icon name. */icon:PropTypes.string,/** The task mode. */mode:PropTypes.string,/** The position slot index of the map button, from the bottom (0: bottom slot). */position:PropTypes.number,setCurrentTask:PropTypes.func,/** The task name. */task:PropTypes.string,theme:PropTypes.object,/** Omit the button in themes matching one of these flags. */themeFlagBlacklist:PropTypes.arrayOf(PropTypes.string),/** Only show the button in themes matching one of these flags. */themeFlagWhitelist:PropTypes.arrayOf(PropTypes.string)});_defineProperty(TaskButton,"defaultProps",{position:1});var selector=function selector(state){return{currentTask:state.task.id,theme:state.theme.current}};export default connect(selector,{setCurrentTask:setCurrentTask})(TaskButton);