@iobroker/adapter-react-v5 4.0.18 → 4.0.20
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/ColorPicker.js +9 -3
- package/Components/ColorPicker.js.map +1 -1
- package/README.md +7 -0
- package/i18n/de.json +7 -1
- package/i18n/en.json +7 -1
- package/i18n/es.json +7 -1
- package/i18n/fr.json +7 -1
- package/i18n/it.json +7 -1
- package/i18n/nl.json +7 -1
- package/i18n/pl.json +7 -1
- package/i18n/pt.json +7 -1
- package/i18n/ru.json +7 -1
- package/i18n/uk.json +7 -1
- package/i18n/zh-cn.json +7 -1
- package/package.json +3 -3
|
@@ -19,6 +19,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
19
19
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
|
20
20
|
var _material = require("@mui/material");
|
|
21
21
|
var _iconsMaterial = require("@mui/icons-material");
|
|
22
|
+
var _Utils = _interopRequireDefault(require("./Utils"));
|
|
22
23
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
24
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24
25
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
@@ -38,7 +39,7 @@ var styles = function styles(theme) {
|
|
|
38
39
|
swatch: {
|
|
39
40
|
marginTop: 16,
|
|
40
41
|
padding: 5,
|
|
41
|
-
background:
|
|
42
|
+
background: theme.palette.background.paper,
|
|
42
43
|
borderRadius: 1,
|
|
43
44
|
boxShadow: '0 0 0 1px rgba(0,0,0,.1)',
|
|
44
45
|
display: 'inline-block',
|
|
@@ -211,7 +212,7 @@ var ColorPicker = /*#__PURE__*/function (_React$Component) {
|
|
|
211
212
|
style: color ? {
|
|
212
213
|
width: 'calc(100% - 80px)'
|
|
213
214
|
} : {
|
|
214
|
-
width: 'calc(100% -
|
|
215
|
+
width: 'calc(100% - 56px)',
|
|
215
216
|
marginRight: 8
|
|
216
217
|
},
|
|
217
218
|
label: this.props.label || this.props.name || 'color',
|
|
@@ -235,9 +236,14 @@ var ColorPicker = /*#__PURE__*/function (_React$Component) {
|
|
|
235
236
|
cursor: 'default'
|
|
236
237
|
}
|
|
237
238
|
}, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Delete, null)) : null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
238
|
-
className: "".
|
|
239
|
+
className: _Utils["default"].clsx(this.props.classes.swatch, this.props.disabled && this.props.classes.swatchDisabled),
|
|
239
240
|
onClick: function onClick(e) {
|
|
240
241
|
return !_this3.props.disabled && _this3.handleClick(e);
|
|
242
|
+
},
|
|
243
|
+
style: {
|
|
244
|
+
background: color ? undefined : 'transparent',
|
|
245
|
+
border: color ? undefined : '1px dashed #ccc',
|
|
246
|
+
boxSizing: 'border-box'
|
|
241
247
|
}
|
|
242
248
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
243
249
|
className: this.props.classes.color,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.js","names":["_react","_interopRequireDefault","require","_reactColor","_propTypes","_withStyles","_material","_iconsMaterial","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","styles","theme","color","width","height","borderRadius","delButton","marginTop","swatch","padding","background","boxShadow","display","cursor","verticalAlign","swatchDisabled","opacity","popover","backgroundColor","textAlign","popoverList","closeButton","concat","palette","paper","secondary","main","cover","position","top","right","bottom","left","textDense","marginBottom","picker","iconButton","button","minWidth","minHeight","ColorPicker","_React$Component","_inherits2","_super","props","_this","_classCallCheck2","_assertThisInitialized2","setState","displayColorPicker","state","anchorEl","currentTarget","onChange","getColor","value","_createClass2","renderCustomPalette","_this2","customPalette","createElement","style","flexWrap","map","Button","className","classes","onClick","handleChange","setTimeout","handleClose","render","_this3","TextField","disabled","variant","id","marginRight","label","name","margin","root","IconButton","size","Delete","handleClick","Menu","list","open","onClose","ChromePicker","onChangeComplete","_color","Close","getDerivedStateFromProps","pColor","sColor","isHex","_typeof2","rgb","r","toString","padStart","g","b","a","rgb2hex","m","match","parseInt","React","Component","propTypes","PropTypes","bool","string","func","isRequired","array","_export","withStyles","_default","exports"],"sources":["ColorPicker.js"],"sourcesContent":["/**\n * Copyright 2018-2022 bluefox <dogafox@gmail.com>\n *\n * Licensed under the Creative Commons Attribution-NonCommercial License, Version 4.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://creativecommons.org/licenses/by-nc/4.0/legalcode.txt\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\nimport React from 'react';\nimport { ChromePicker } from 'react-color';\nimport PropTypes from 'prop-types';\nimport withStyles from '@mui/styles/withStyles';\n\nimport { TextField, Menu, IconButton, Button } from '@mui/material';\nimport { Delete as IconDelete, Close as IconClose } from '@mui/icons-material';\n\nconst styles = theme => ({\n color: {\n width: 36,\n height: 14,\n borderRadius: 2,\n },\n delButton: {\n // width: 32,\n // height: 32,\n marginTop: 16,\n },\n swatch: {\n marginTop: 16,\n padding: 5,\n background: '#fff',\n borderRadius: 1,\n boxShadow: '0 0 0 1px rgba(0,0,0,.1)',\n display: 'inline-block',\n cursor: 'pointer',\n verticalAlign: 'middle',\n },\n swatchDisabled: {\n opacity: 0.5,\n cursor: 'default',\n },\n popover: {\n // position: 'absolute',\n // zIndex: 2,\n backgroundColor: '#00000000',\n textAlign: 'right',\n },\n popoverList: {\n padding: 0,\n },\n closeButton: {\n backgroundColor: `${theme.palette.background.paper} !important`,\n borderRadius: '0 0 25% 25%',\n '&:hover': {\n backgroundColor: `${theme.palette.secondary.main} !important`,\n },\n },\n cover: {\n position: 'fixed',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n },\n textDense: {\n marginTop: 0,\n marginBottom: 0,\n },\n picker: {\n background: `${theme.palette.background.paper} !important`,\n },\n iconButton: {\n width: 16,\n height: 16,\n },\n button: {\n width: 32,\n height: 32,\n minWidth: 32,\n minHeight: 32,\n },\n});\n\n/**\n * @typedef {object} Rgb\n * @property {number} r The red component of the color (0-255).\n * @property {number} g The green component of the color (0-255).\n * @property {number} b The blue component of the color (0-255).\n * @property {number} a The alpha component of the color (0-255).\n *\n * @typedef {string | Rgb | { rgb: Rgb }} Color Definition of a color.\n *\n * @typedef {object} ColorPickerProps\n * @property {boolean} [disabled] Set to true to disable the color picker.\n * @property {Color} [value] The currently selected color.\n * @property {(rgba: string) => void} [onChange] The color change callback.\n * @property {string} [name] The name.\n * @property {React.CSSProperties} [style] Additional styling for this component.\n * @property {string} [className] The CSS class name.\n * @property {boolean} [openAbove] Open the color picker above the field?\n *\n * @extends {React.Component<ColorPickerProps>}\n */\nclass ColorPicker extends React.Component {\n /**\n * @param {Readonly<ColorPickerProps>} props\n */\n constructor(props) {\n super(props);\n this.state = {\n displayColorPicker: false,\n color: this.props.value || this.props.color,\n anchorEl: null,\n };\n }\n\n /**\n * Get the state derived from the given properties and state.\n * @param {{ color: Color; }} props\n * @param {{ color: Color; }} state\n */\n static getDerivedStateFromProps(props, state) {\n const pColor = ColorPicker.getColor(props.value || props.color);\n const sColor = ColorPicker.getColor(state.color);\n if (pColor !== sColor) {\n return { color: props.value || props.color };\n }\n return null;\n }\n\n /**\n * @private\n */\n handleClick = e => {\n this.setState({ displayColorPicker: !this.state.displayColorPicker, anchorEl: this.state.displayColorPicker ? null : e.currentTarget });\n };\n\n /**\n * @private\n */\n handleClose = () => {\n this.setState({ displayColorPicker: false, anchorEl: null });\n };\n\n /**\n * Convert the given color to hex ('#rrggbb') or rgba ('rgba(r,g,b,a)') format.\n * @param {Color} [color]\n * @param {boolean} [isHex] The returning string should be in hex format\n * @returns {string} the hex or rgba representation of the given color.\n */\n static getColor(color, isHex) {\n if (color && typeof color === 'object') {\n if (color.rgb) {\n if (isHex) {\n return `#${color.rgb.r.toString(16).padStart(2, '0')}${color.rgb.g.toString(16).padStart(2, '0')}${color.rgb.b.toString(16).padStart(2, '0')}`;\n }\n return `rgba(${color.rgb.r},${color.rgb.g},${color.rgb.b},${color.rgb.a})`;\n }\n if (isHex) {\n return `#${color.r.toString(16).padStart(2, '0')}${color.g.toString(16).padStart(2, '0')}${color.b.toString(16).padStart(2, '0')}`;\n }\n return `rgba(${color.r},${color.g},${color.b},${color.a})`;\n }\n return isHex ? ColorPicker.rgb2hex(color || '') : color || '';\n }\n\n /**\n * Convert rgb() or rgba() format to hex format #rrggbb.\n * @param {string} rgb\n * @returns {string}\n */\n static rgb2hex(rgb) {\n const m = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n\n const r = parseInt(m[1], 10).toString(16).padStart(2, '0');\n const g = parseInt(m[2], 10).toString(16).padStart(2, '0');\n const b = parseInt(m[3], 10).toString(16).padStart(2, '0');\n\n return m && m.length === 4 ? `#${r}${g}${b}` : rgb;\n }\n\n /**\n * @private\n */\n handleChange = color => {\n this.setState({ color }, () =>\n this.props.onChange && this.props.onChange(ColorPicker.getColor(color)));\n };\n\n renderCustomPalette() {\n if (!this.props.customPalette) {\n return null;\n }\n return <div style={{ width: '100%', display: 'flex', flexWrap: 'flex' }}>\n {this.props.customPalette.map(color =>\n <Button\n className={this.props.classes.button}\n key={color}\n onClick={() => {\n this.handleChange(color);\n setTimeout(() => this.handleClose(), 300);\n }}\n >\n <div className={this.props.classes.iconButton} style={{ background: color }} />\n </Button>)}\n </div>;\n }\n\n render() {\n const color = ColorPicker.getColor(this.state.color);\n\n const style = {...(this.props.style || {})};\n style.position = 'relative';\n\n return <div\n style={ style }\n className={this.props.className || ''}\n >\n <TextField\n disabled={this.props.disabled}\n variant=\"standard\"\n id=\"name\"\n style={color ? { width: 'calc(100% - 80px)' } : { width: 'calc(100% - 54px)', marginRight: 8 }}\n label={this.props.label || this.props.name || 'color'}\n value={color}\n margin=\"dense\"\n classes={{ root: this.props.classes.textDense }}\n onChange={e => this.handleChange(e.target.value)}\n />\n {color ? <IconButton\n disabled={this.props.disabled}\n onClick={() => this.handleChange('')}\n size=\"small\"\n className={this.props.classes.delButton}\n style={color ? {} : { opacity: 0, cursor: 'default' }}\n >\n <IconDelete />\n </IconButton> : null}\n <div className={`${this.props.classes.swatch}${this.props.disabled ? ` ${this.props.classes.swatchDisabled}` : ''}`} onClick={e => !this.props.disabled && this.handleClick(e)}>\n <div className={this.props.classes.color} style={{ background: color }} />\n </div>\n { this.state.displayColorPicker && !this.props.disabled ? <Menu\n classes={{ paper: this.props.classes.popover, list: this.props.classes.popoverList }}\n anchorEl={this.state.anchorEl}\n open={!0}\n onClose={() => this.handleClose()}\n >\n <ChromePicker\n className={this.props.classes.picker}\n color={this.state.color}\n onChangeComplete={_color => this.handleChange(_color)}\n styles={{ picker: { background: '#112233' } }}\n />\n <IconButton className={this.props.classes.closeButton} onClick={() => this.handleClose()}><IconClose /></IconButton>\n {this.renderCustomPalette()}\n </Menu> : null }\n </div>;\n }\n}\n\nColorPicker.propTypes = {\n disabled: PropTypes.bool,\n value: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n label: PropTypes.string,\n name: PropTypes.string, // same as label\n style: PropTypes.object,\n className: PropTypes.string,\n customPalette: PropTypes.array,\n};\n\n/** @type {typeof ColorPicker} */\nconst _export = withStyles(styles)(ColorPicker);\nexport default _export;\n"],"mappings":";;;;;;;;;;;;;;;AAeA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AAA+E,SAAAM,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,cAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAA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KL,GAAG;IACtD;EAAC;EAAA,OAAA3D,WAAA;AAAA,EA5EqBsE,iBAAK,CAACC,SAAS;AA6JzCvE,WAAW,CAACwE,SAAS,GAAG;EACpBtC,QAAQ,EAAEuC,qBAAS,CAACC,IAAI;EACxB3D,KAAK,EAAE0D,qBAAS,CAACE,MAAM;EACvB9D,QAAQ,EAAE4D,qBAAS,CAACG,IAAI,CAACC,UAAU;EACnCvC,KAAK,EAAEmC,qBAAS,CAACE,MAAM;EACvBpC,IAAI,EAAEkC,qBAAS,CAACE,MAAM;EAAE;EACxBtD,KAAK,EAAEoD,qBAAS,CAAC7J,MAAM;EACvB6G,SAAS,EAAEgD,qBAAS,CAACE,MAAM;EAC3BxD,aAAa,EAAEsD,qBAAS,CAACK;AAC7B,CAAC;;AAED;AACA,IAAMC,OAAO,GAAG,IAAAC,sBAAU,EAACxH,MAAM,CAAC,CAACwC,WAAW,CAAC;AAAC,IAAAiF,QAAA,GACjCF,OAAO;AAAAG,OAAA,cAAAD,QAAA"}
|
|
1
|
+
{"version":3,"file":"ColorPicker.js","names":["_react","_interopRequireDefault","require","_reactColor","_propTypes","_withStyles","_material","_iconsMaterial","_Utils","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","styles","theme","color","width","height","borderRadius","delButton","marginTop","swatch","padding","background","palette","paper","boxShadow","display","cursor","verticalAlign","swatchDisabled","opacity","popover","backgroundColor","textAlign","popoverList","closeButton","concat","secondary","main","cover","position","top","right","bottom","left","textDense","marginBottom","picker","iconButton","button","minWidth","minHeight","ColorPicker","_React$Component","_inherits2","_super","props","_this","_classCallCheck2","_assertThisInitialized2","setState","displayColorPicker","state","anchorEl","currentTarget","onChange","getColor","value","_createClass2","renderCustomPalette","_this2","customPalette","createElement","style","flexWrap","map","Button","className","classes","onClick","handleChange","setTimeout","handleClose","render","_this3","TextField","disabled","variant","id","marginRight","label","name","margin","root","IconButton","size","Delete","Utils","clsx","handleClick","undefined","border","boxSizing","Menu","list","open","onClose","ChromePicker","onChangeComplete","_color","Close","getDerivedStateFromProps","pColor","sColor","isHex","_typeof2","rgb","r","toString","padStart","g","b","a","rgb2hex","m","match","parseInt","React","Component","propTypes","PropTypes","bool","string","func","isRequired","array","_export","withStyles","_default","exports"],"sources":["ColorPicker.js"],"sourcesContent":["/**\n * Copyright 2018-2022 bluefox <dogafox@gmail.com>\n *\n * Licensed under the Creative Commons Attribution-NonCommercial License, Version 4.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://creativecommons.org/licenses/by-nc/4.0/legalcode.txt\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\nimport React from 'react';\nimport { ChromePicker } from 'react-color';\nimport PropTypes from 'prop-types';\nimport withStyles from '@mui/styles/withStyles';\n\nimport { TextField, Menu, IconButton, Button } from '@mui/material';\nimport { Delete as IconDelete, Close as IconClose } from '@mui/icons-material';\n\nimport Utils from './Utils';\n\nconst styles = theme => ({\n color: {\n width: 36,\n height: 14,\n borderRadius: 2,\n },\n delButton: {\n // width: 32,\n // height: 32,\n marginTop: 16,\n },\n swatch: {\n marginTop: 16,\n padding: 5,\n background: theme.palette.background.paper,\n borderRadius: 1,\n boxShadow: '0 0 0 1px rgba(0,0,0,.1)',\n display: 'inline-block',\n cursor: 'pointer',\n verticalAlign: 'middle',\n },\n swatchDisabled: {\n opacity: 0.5,\n cursor: 'default',\n },\n popover: {\n // position: 'absolute',\n // zIndex: 2,\n backgroundColor: '#00000000',\n textAlign: 'right',\n },\n popoverList: {\n padding: 0,\n },\n closeButton: {\n backgroundColor: `${theme.palette.background.paper} !important`,\n borderRadius: '0 0 25% 25%',\n '&:hover': {\n backgroundColor: `${theme.palette.secondary.main} !important`,\n },\n },\n cover: {\n position: 'fixed',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n },\n textDense: {\n marginTop: 0,\n marginBottom: 0,\n },\n picker: {\n background: `${theme.palette.background.paper} !important`,\n },\n iconButton: {\n width: 16,\n height: 16,\n },\n button: {\n width: 32,\n height: 32,\n minWidth: 32,\n minHeight: 32,\n },\n});\n\n/**\n * @typedef {object} Rgb\n * @property {number} r The red component of the color (0-255).\n * @property {number} g The green component of the color (0-255).\n * @property {number} b The blue component of the color (0-255).\n * @property {number} a The alpha component of the color (0-255).\n *\n * @typedef {string | Rgb | { rgb: Rgb }} Color Definition of a color.\n *\n * @typedef {object} ColorPickerProps\n * @property {boolean} [disabled] Set to true to disable the color picker.\n * @property {Color} [value] The currently selected color.\n * @property {(rgba: string) => void} [onChange] The color change callback.\n * @property {string} [name] The name.\n * @property {React.CSSProperties} [style] Additional styling for this component.\n * @property {string} [className] The CSS class name.\n * @property {boolean} [openAbove] Open the color picker above the field?\n *\n * @extends {React.Component<ColorPickerProps>}\n */\nclass ColorPicker extends React.Component {\n /**\n * @param {Readonly<ColorPickerProps>} props\n */\n constructor(props) {\n super(props);\n this.state = {\n displayColorPicker: false,\n color: this.props.value || this.props.color,\n anchorEl: null,\n };\n }\n\n /**\n * Get the state derived from the given properties and state.\n * @param {{ color: Color; }} props\n * @param {{ color: Color; }} state\n */\n static getDerivedStateFromProps(props, state) {\n const pColor = ColorPicker.getColor(props.value || props.color);\n const sColor = ColorPicker.getColor(state.color);\n if (pColor !== sColor) {\n return { color: props.value || props.color };\n }\n return null;\n }\n\n /**\n * @private\n */\n handleClick = e => {\n this.setState({ displayColorPicker: !this.state.displayColorPicker, anchorEl: this.state.displayColorPicker ? null : e.currentTarget });\n };\n\n /**\n * @private\n */\n handleClose = () => {\n this.setState({ displayColorPicker: false, anchorEl: null });\n };\n\n /**\n * Convert the given color to hex ('#rrggbb') or rgba ('rgba(r,g,b,a)') format.\n * @param {Color} [color]\n * @param {boolean} [isHex] The returning string should be in hex format\n * @returns {string} the hex or rgba representation of the given color.\n */\n static getColor(color, isHex) {\n if (color && typeof color === 'object') {\n if (color.rgb) {\n if (isHex) {\n return `#${color.rgb.r.toString(16).padStart(2, '0')}${color.rgb.g.toString(16).padStart(2, '0')}${color.rgb.b.toString(16).padStart(2, '0')}`;\n }\n return `rgba(${color.rgb.r},${color.rgb.g},${color.rgb.b},${color.rgb.a})`;\n }\n if (isHex) {\n return `#${color.r.toString(16).padStart(2, '0')}${color.g.toString(16).padStart(2, '0')}${color.b.toString(16).padStart(2, '0')}`;\n }\n return `rgba(${color.r},${color.g},${color.b},${color.a})`;\n }\n return isHex ? ColorPicker.rgb2hex(color || '') : color || '';\n }\n\n /**\n * Convert rgb() or rgba() format to hex format #rrggbb.\n * @param {string} rgb\n * @returns {string}\n */\n static rgb2hex(rgb) {\n const m = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n\n const r = parseInt(m[1], 10).toString(16).padStart(2, '0');\n const g = parseInt(m[2], 10).toString(16).padStart(2, '0');\n const b = parseInt(m[3], 10).toString(16).padStart(2, '0');\n\n return m && m.length === 4 ? `#${r}${g}${b}` : rgb;\n }\n\n /**\n * @private\n */\n handleChange = color => {\n this.setState({ color }, () =>\n this.props.onChange && this.props.onChange(ColorPicker.getColor(color)));\n };\n\n renderCustomPalette() {\n if (!this.props.customPalette) {\n return null;\n }\n return <div style={{ width: '100%', display: 'flex', flexWrap: 'flex' }}>\n {this.props.customPalette.map(color =>\n <Button\n className={this.props.classes.button}\n key={color}\n onClick={() => {\n this.handleChange(color);\n setTimeout(() => this.handleClose(), 300);\n }}\n >\n <div className={this.props.classes.iconButton} style={{ background: color }} />\n </Button>)}\n </div>;\n }\n\n render() {\n const color = ColorPicker.getColor(this.state.color);\n\n const style = {...(this.props.style || {})};\n style.position = 'relative';\n\n return <div\n style={ style }\n className={this.props.className || ''}\n >\n <TextField\n disabled={this.props.disabled}\n variant=\"standard\"\n id=\"name\"\n style={color ? { width: 'calc(100% - 80px)' } : { width: 'calc(100% - 56px)', marginRight: 8 }}\n label={this.props.label || this.props.name || 'color'}\n value={color}\n margin=\"dense\"\n classes={{ root: this.props.classes.textDense }}\n onChange={e => this.handleChange(e.target.value)}\n />\n {color ? <IconButton\n disabled={this.props.disabled}\n onClick={() => this.handleChange('')}\n size=\"small\"\n className={this.props.classes.delButton}\n style={color ? {} : { opacity: 0, cursor: 'default' }}\n >\n <IconDelete />\n </IconButton> : null}\n <div\n className={Utils.clsx(this.props.classes.swatch, this.props.disabled && this.props.classes.swatchDisabled)}\n onClick={e => !this.props.disabled && this.handleClick(e)}\n style={{\n background: color ? undefined : 'transparent',\n border: color ? undefined : '1px dashed #ccc',\n boxSizing: 'border-box',\n }}\n >\n <div className={this.props.classes.color} style={{ background: color }} />\n </div>\n { this.state.displayColorPicker && !this.props.disabled ? <Menu\n classes={{ paper: this.props.classes.popover, list: this.props.classes.popoverList }}\n anchorEl={this.state.anchorEl}\n open={!0}\n onClose={() => this.handleClose()}\n >\n <ChromePicker\n className={this.props.classes.picker}\n color={this.state.color}\n onChangeComplete={_color => this.handleChange(_color)}\n styles={{ picker: { background: '#112233' } }}\n />\n <IconButton className={this.props.classes.closeButton} onClick={() => this.handleClose()}><IconClose /></IconButton>\n {this.renderCustomPalette()}\n </Menu> : null }\n </div>;\n }\n}\n\nColorPicker.propTypes = {\n disabled: PropTypes.bool,\n value: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n label: PropTypes.string,\n name: PropTypes.string, // same as label\n style: PropTypes.object,\n className: PropTypes.string,\n customPalette: PropTyp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iE,qBAAS,CAACG,IAAI,CAACC,UAAU;EACnC5C,KAAK,EAAEwC,qBAAS,CAACE,MAAM;EACvBzC,IAAI,EAAEuC,qBAAS,CAACE,MAAM;EAAE;EACxB3D,KAAK,EAAEyD,qBAAS,CAAClK,MAAM;EACvB6G,SAAS,EAAEqD,qBAAS,CAACE,MAAM;EAC3B7D,aAAa,EAAE2D,qBAAS,CAACK;AAC7B,CAAC;;AAED;AACA,IAAMC,OAAO,GAAG,IAAAC,sBAAU,EAAC7H,MAAM,CAAC,CAACwC,WAAW,CAAC;AAAC,IAAAsF,QAAA,GACjCF,OAAO;AAAAG,OAAA,cAAAD,QAAA"}
|
package/README.md
CHANGED
|
@@ -661,6 +661,13 @@ socket.getObjectViewCustom('custom', 'state', 'startKey', 'endKey')
|
|
|
661
661
|
-->
|
|
662
662
|
|
|
663
663
|
## Changelog
|
|
664
|
+
### 4.0.20 (2023-03-21)
|
|
665
|
+
* (bluefox) Color picker was improved
|
|
666
|
+
|
|
667
|
+
### 4.0.19 (2023-03-20)
|
|
668
|
+
* (bluefox) Packages were updated
|
|
669
|
+
* (bluefox) Added new translations
|
|
670
|
+
|
|
664
671
|
### 4.0.18 (2023-03-16)
|
|
665
672
|
* (bluefox) Packages were updated
|
|
666
673
|
|
package/i18n/de.json
CHANGED
|
@@ -363,5 +363,11 @@
|
|
|
363
363
|
"ra_Take position from system settings": "Position aus den Systemeinstellungen übernehmen",
|
|
364
364
|
"ra_Port is already used by %s": "Port wird bereits von %s verwendet",
|
|
365
365
|
"ra_Port could be used by %s": "Port könnte von %s verwendet werden",
|
|
366
|
-
"ra_filter_customs_without": "ohne"
|
|
366
|
+
"ra_filter_customs_without": "ohne",
|
|
367
|
+
"ra_Use iobroker.acme adapter for letsencrypt certificates": "Verwenden Sie den iobroker.acme-Adapter für letsencrypt-Zertifikate",
|
|
368
|
+
"ra_Do not use let's encrypt": "Verwenden Sie nicht let's encrypt",
|
|
369
|
+
"ra_Use all available let's encrypt certificates": "Verwenden Sie alle verfügbaren Zertifikate von let's encrypt",
|
|
370
|
+
"ra_Public certificate": "Öffentliches Zertifikat",
|
|
371
|
+
"ra_Private certificate": "Privates Zertifikat",
|
|
372
|
+
"ra_Chained certificate": "Chained Zertifikat"
|
|
367
373
|
}
|
package/i18n/en.json
CHANGED
|
@@ -363,5 +363,11 @@
|
|
|
363
363
|
"ra_Take position from system settings": "Take position from system settings",
|
|
364
364
|
"ra_Port is already used by %s": "Port is already used by %s",
|
|
365
365
|
"ra_Port could be used by %s": "Port could be used by %s",
|
|
366
|
-
"ra_filter_customs_without": "without"
|
|
366
|
+
"ra_filter_customs_without": "without",
|
|
367
|
+
"ra_Use iobroker.acme adapter for letsencrypt certificates": "Use iobroker.acme adapter for letsencrypt certificates",
|
|
368
|
+
"ra_Do not use let's encrypt": "Do not use let's encrypt",
|
|
369
|
+
"ra_Use all available let's encrypt certificates": "Use all available let's encrypt certificates",
|
|
370
|
+
"ra_Public certificate": "Public certificate",
|
|
371
|
+
"ra_Private certificate": "Private certificate",
|
|
372
|
+
"ra_Chained certificate": "Chained certificate"
|
|
367
373
|
}
|
package/i18n/es.json
CHANGED
|
@@ -363,5 +363,11 @@
|
|
|
363
363
|
"ra_Take position from system settings": "Tomar posición desde la configuración del sistema",
|
|
364
364
|
"ra_Port is already used by %s": "El puerto ya está en uso por %s",
|
|
365
365
|
"ra_Port could be used by %s": "El puerto podría ser utilizado por %s",
|
|
366
|
-
"ra_filter_customs_without": "sin"
|
|
366
|
+
"ra_filter_customs_without": "sin",
|
|
367
|
+
"ra_Use iobroker.acme adapter for letsencrypt certificates": "Use el adaptador iobroker.acme para los certificados de letsencrypt",
|
|
368
|
+
"ra_Do not use let's encrypt": "No use vamos a cifrar",
|
|
369
|
+
"ra_Use all available let's encrypt certificates": "Utilice todos los certificados let's encrypt disponibles",
|
|
370
|
+
"ra_Public certificate": "Certificado público",
|
|
371
|
+
"ra_Private certificate": "certificado privado",
|
|
372
|
+
"ra_Chained certificate": "certificado encadenado"
|
|
367
373
|
}
|
package/i18n/fr.json
CHANGED
|
@@ -363,5 +363,11 @@
|
|
|
363
363
|
"ra_Take position from system settings": "Prendre position à partir des paramètres système",
|
|
364
364
|
"ra_Port is already used by %s": "Le port est déjà utilisé par %s",
|
|
365
365
|
"ra_Port could be used by %s": "Le port pourrait être utilisé par %s",
|
|
366
|
-
"ra_filter_customs_without": "sans"
|
|
366
|
+
"ra_filter_customs_without": "sans",
|
|
367
|
+
"ra_Use iobroker.acme adapter for letsencrypt certificates": "Utiliser l'adaptateur iobroker.acme pour les certificats Letsencrypt",
|
|
368
|
+
"ra_Do not use let's encrypt": "Ne pas utiliser let's encrypt",
|
|
369
|
+
"ra_Use all available let's encrypt certificates": "Utilisez tous les certificats let's encrypt disponibles",
|
|
370
|
+
"ra_Public certificate": "Certificat public",
|
|
371
|
+
"ra_Private certificate": "Certificat privé",
|
|
372
|
+
"ra_Chained certificate": "Certificat chaîné"
|
|
367
373
|
}
|
package/i18n/it.json
CHANGED
|
@@ -363,5 +363,11 @@
|
|
|
363
363
|
"ra_Take position from system settings": "Prendi posizione dalle impostazioni di sistema",
|
|
364
364
|
"ra_Port is already used by %s": "La porta è già utilizzata da %s",
|
|
365
365
|
"ra_Port could be used by %s": "La porta potrebbe essere utilizzata da %s",
|
|
366
|
-
"ra_filter_customs_without": "senza"
|
|
366
|
+
"ra_filter_customs_without": "senza",
|
|
367
|
+
"ra_Use iobroker.acme adapter for letsencrypt certificates": "Utilizzare l'adattatore iobroker.acme per i certificati letsencrypt",
|
|
368
|
+
"ra_Do not use let's encrypt": "Non utilizzare crittografiamo",
|
|
369
|
+
"ra_Use all available let's encrypt certificates": "Usa tutti i certificati Let's Encrypt disponibili",
|
|
370
|
+
"ra_Public certificate": "Certificato pubblico",
|
|
371
|
+
"ra_Private certificate": "Certificato privato",
|
|
372
|
+
"ra_Chained certificate": "Certificato incatenato"
|
|
367
373
|
}
|
package/i18n/nl.json
CHANGED
|
@@ -363,5 +363,11 @@
|
|
|
363
363
|
"ra_Take position from system settings": "Neem positie over van systeeminstellingen",
|
|
364
364
|
"ra_Port is already used by %s": "Poort wordt al gebruikt door %s",
|
|
365
365
|
"ra_Port could be used by %s": "Poort kan worden gebruikt door %s",
|
|
366
|
-
"ra_filter_customs_without": "zonder"
|
|
366
|
+
"ra_filter_customs_without": "zonder",
|
|
367
|
+
"ra_Use iobroker.acme adapter for letsencrypt certificates": "Gebruik de iobroker.acme-adapter voor letsencrypt-certificaten",
|
|
368
|
+
"ra_Do not use let's encrypt": "Gebruik geen let's encrypt",
|
|
369
|
+
"ra_Use all available let's encrypt certificates": "Gebruik alle beschikbare Let's Encrypt-certificaten",
|
|
370
|
+
"ra_Public certificate": "Openbaar certificaat",
|
|
371
|
+
"ra_Private certificate": "Privé certificaat",
|
|
372
|
+
"ra_Chained certificate": "Geketend certificaat"
|
|
367
373
|
}
|
package/i18n/pl.json
CHANGED
|
@@ -363,5 +363,11 @@
|
|
|
363
363
|
"ra_Take position from system settings": "Zajmij pozycję z ustawień systemowych",
|
|
364
364
|
"ra_Port is already used by %s": "Port jest już używany przez %s",
|
|
365
365
|
"ra_Port could be used by %s": "Port może być używany przez %s",
|
|
366
|
-
"ra_filter_customs_without": "bez"
|
|
366
|
+
"ra_filter_customs_without": "bez",
|
|
367
|
+
"ra_Use iobroker.acme adapter for letsencrypt certificates": "Użyj adaptera iobroker.acme dla certyfikatów letsencrypt",
|
|
368
|
+
"ra_Do not use let's encrypt": "Nie używaj zaszyfrujmy",
|
|
369
|
+
"ra_Use all available let's encrypt certificates": "Użyj wszystkich dostępnych certyfikatów Let's Encrypt",
|
|
370
|
+
"ra_Public certificate": "Certyfikat publiczny",
|
|
371
|
+
"ra_Private certificate": "Prywatny certyfikat",
|
|
372
|
+
"ra_Chained certificate": "Certyfikat łańcuchowy"
|
|
367
373
|
}
|
package/i18n/pt.json
CHANGED
|
@@ -363,5 +363,11 @@
|
|
|
363
363
|
"ra_Take position from system settings": "Tomar posição a partir das configurações do sistema",
|
|
364
364
|
"ra_Port is already used by %s": "A porta já está sendo usada por %s",
|
|
365
365
|
"ra_Port could be used by %s": "A porta pode ser usada por %s",
|
|
366
|
-
"ra_filter_customs_without": "sem"
|
|
366
|
+
"ra_filter_customs_without": "sem",
|
|
367
|
+
"ra_Use iobroker.acme adapter for letsencrypt certificates": "Use o adaptador iobroker.acme para certificados letsencrypt",
|
|
368
|
+
"ra_Do not use let's encrypt": "Não use vamos criptografar",
|
|
369
|
+
"ra_Use all available let's encrypt certificates": "Use todos os certificados disponíveis vamos criptografar",
|
|
370
|
+
"ra_Public certificate": "certificado público",
|
|
371
|
+
"ra_Private certificate": "certificado privado",
|
|
372
|
+
"ra_Chained certificate": "certificado encadeado"
|
|
367
373
|
}
|
package/i18n/ru.json
CHANGED
|
@@ -363,5 +363,11 @@
|
|
|
363
363
|
"ra_Take position from system settings": "Занять позицию из системных настроек",
|
|
364
364
|
"ra_Port is already used by %s": "Порт уже используется %s",
|
|
365
365
|
"ra_Port could be used by %s": "Порт может использоваться %s",
|
|
366
|
-
"ra_filter_customs_without": "без"
|
|
366
|
+
"ra_filter_customs_without": "без",
|
|
367
|
+
"ra_Use iobroker.acme adapter for letsencrypt certificates": "Используйте адаптер iobroker.acme для сертификатов letsencrypt",
|
|
368
|
+
"ra_Do not use let's encrypt": "Не используйте Let’s Encrypt",
|
|
369
|
+
"ra_Use all available let's encrypt certificates": "Используйте все доступные сертификаты let’s encrypt",
|
|
370
|
+
"ra_Public certificate": "Публичный сертификат",
|
|
371
|
+
"ra_Private certificate": "Частный сертификат",
|
|
372
|
+
"ra_Chained certificate": "Chained сертификат"
|
|
367
373
|
}
|
package/i18n/uk.json
CHANGED
|
@@ -363,5 +363,11 @@
|
|
|
363
363
|
"ra_Take position from system settings": "Займіть позицію в налаштуваннях системи",
|
|
364
364
|
"ra_Port is already used by %s": "Порт уже використовується %s",
|
|
365
365
|
"ra_Port could be used by %s": "Порт може використовуватися %s",
|
|
366
|
-
"ra_filter_customs_without": "без"
|
|
366
|
+
"ra_filter_customs_without": "без",
|
|
367
|
+
"ra_Use iobroker.acme adapter for letsencrypt certificates": "Використовуйте адаптер iobroker.acme для сертифікатів letsencrypt",
|
|
368
|
+
"ra_Do not use let's encrypt": "Не використовуйте let's encrypt",
|
|
369
|
+
"ra_Use all available let's encrypt certificates": "Використовуйте всі доступні сертифікати let's encrypt",
|
|
370
|
+
"ra_Public certificate": "Публічний сертифікат",
|
|
371
|
+
"ra_Private certificate": "Приватний сертифікат",
|
|
372
|
+
"ra_Chained certificate": "Прикутий сертифікат"
|
|
367
373
|
}
|
package/i18n/zh-cn.json
CHANGED
|
@@ -363,5 +363,11 @@
|
|
|
363
363
|
"ra_Take position from system settings": "从系统设置中获取位置",
|
|
364
364
|
"ra_Port is already used by %s": "端口已被 %s 使用",
|
|
365
365
|
"ra_Port could be used by %s": "%s 可以使用端口",
|
|
366
|
-
"ra_filter_customs_without": "没有"
|
|
366
|
+
"ra_filter_customs_without": "没有",
|
|
367
|
+
"ra_Use iobroker.acme adapter for letsencrypt certificates": "使用 iobroker.acme 适配器获取 letsencrypt 证书",
|
|
368
|
+
"ra_Do not use let's encrypt": "不要使用让我们加密",
|
|
369
|
+
"ra_Use all available let's encrypt certificates": "使用所有可用的让我们加密证书",
|
|
370
|
+
"ra_Public certificate": "公共证书",
|
|
371
|
+
"ra_Private certificate": "私有证书",
|
|
372
|
+
"ra_Chained certificate": "链式证书"
|
|
367
373
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/adapter-react-v5",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.20",
|
|
4
4
|
"description": "React classes to develop admin interfaces for ioBroker with react.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "bluefox",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@mui/x-date-pickers": "6.0.2",
|
|
36
36
|
"@iobroker/socket-client": "^2.0.5",
|
|
37
37
|
"react-cropper": "^2.3.2",
|
|
38
|
-
"@sentry/browser": "^7.
|
|
39
|
-
"@sentry/integrations": "^7.
|
|
38
|
+
"@sentry/browser": "^7.44.1",
|
|
39
|
+
"@sentry/integrations": "^7.44.1",
|
|
40
40
|
"@types/iobroker": "^4.0.5",
|
|
41
41
|
"react-color": "^2.19.3",
|
|
42
42
|
"react-colorful": "^5.6.1",
|