@iobroker/adapter-react-v5 4.6.13 → 4.7.1

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.
@@ -76,18 +76,6 @@ declare const _export: typeof ColorPicker;
76
76
  * @extends {React.Component<ColorPickerProps>}
77
77
  */
78
78
  declare class ColorPicker extends React.Component<ColorPickerProps, any, any> {
79
- /**
80
- * Get the state derived from the given properties and state.
81
- * @param {{ color: Color; }} props
82
- * @param {{ color: Color; }} state
83
- */
84
- static getDerivedStateFromProps(props: {
85
- color: Color;
86
- }, state: {
87
- color: Color;
88
- }): {
89
- color: any;
90
- };
91
79
  /**
92
80
  * Convert the given color to hex ('#rrggbb') or rgba ('rgba(r,g,b,a)') format.
93
81
  * @param {Color} [color]
@@ -122,6 +110,12 @@ declare class ColorPicker extends React.Component<ColorPickerProps, any, any> {
122
110
  * @private
123
111
  */
124
112
  private handleChange;
113
+ /**
114
+ * IF the props are updated from outside, they should override the state
115
+ * @param _prevProps
116
+ * @param prevState
117
+ */
118
+ componentDidUpdate(_prevProps: any, prevState: any): void;
125
119
  renderCustomPalette(): React.JSX.Element;
126
120
  render(): React.JSX.Element;
127
121
  }
@@ -37,7 +37,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
37
37
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
38
38
  * See the License for the specific language governing permissions and
39
39
  * limitations under the License.
40
- **/
40
+ */
41
41
  var styles = function styles(theme) {
42
42
  return {
43
43
  color: {
@@ -172,13 +172,23 @@ var ColorPicker = /*#__PURE__*/function (_React$Component) {
172
172
  };
173
173
  return _this;
174
174
  }
175
-
176
- /**
177
- * Get the state derived from the given properties and state.
178
- * @param {{ color: Color; }} props
179
- * @param {{ color: Color; }} state
180
- */
181
175
  (0, _createClass2["default"])(ColorPicker, [{
176
+ key: "componentDidUpdate",
177
+ value:
178
+ /**
179
+ * IF the props are updated from outside, they should override the state
180
+ * @param _prevProps
181
+ * @param prevState
182
+ */
183
+ function componentDidUpdate(_prevProps, prevState) {
184
+ var color = ColorPicker.getColor(this.props.color || this.props.value);
185
+ if (color !== prevState.color) {
186
+ this.setState({
187
+ color: color
188
+ });
189
+ }
190
+ }
191
+ }, {
182
192
  key: "renderCustomPalette",
183
193
  value: function renderCustomPalette() {
184
194
  var _this2 = this;
@@ -213,9 +223,9 @@ var ColorPicker = /*#__PURE__*/function (_React$Component) {
213
223
  key: "render",
214
224
  value: function render() {
215
225
  var _this3 = this;
216
- var color = ColorPicker.getColor(this.state.color);
217
226
  var style = _objectSpread({}, this.props.style || {});
218
227
  style.position = 'relative';
228
+ var color = this.state.color;
219
229
  return /*#__PURE__*/_react["default"].createElement("div", {
220
230
  style: style,
221
231
  className: this.props.className || ''
@@ -293,18 +303,6 @@ var ColorPicker = /*#__PURE__*/function (_React$Component) {
293
303
  }, /*#__PURE__*/_react["default"].createElement(_iconsMaterial.Close, null)), this.renderCustomPalette()) : null);
294
304
  }
295
305
  }], [{
296
- key: "getDerivedStateFromProps",
297
- value: function getDerivedStateFromProps(props, state) {
298
- var pColor = ColorPicker.getColor(props.value || props.color);
299
- var sColor = ColorPicker.getColor(state.color);
300
- if (pColor !== sColor) {
301
- return {
302
- color: props.value || props.color
303
- };
304
- }
305
- return null;
306
- }
307
- }, {
308
306
  key: "getColor",
309
307
  value:
310
308
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPicker.js","names":["_react","_interopRequireDefault","require","_reactColor","_propTypes","_styles","_material","_iconsMaterial","_Utils","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","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","key","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","target","IconButton","size","Delete","Utils","clsx","handleClick","undefined","border","boxSizing","Menu","list","open","onClose","ChromePicker","onChangeComplete","_color","Close","getDerivedStateFromProps","pColor","sColor","isHex","_typeof2","rgb","toString","padStart","g","b","a","rgb2hex","m","match","parseInt","React","Component","propTypes","PropTypes","bool","string","func","isRequired","object","array","_export","withStyles","_default","exports"],"sources":["ColorPicker.js"],"sourcesContent":["/**\n * Copyright 2018-2023 Denis Haev (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';\n\nimport {\n TextField, Menu, IconButton, Button,\n} 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=\"ar_color_picker_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: 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,OAAA,GAAAH,OAAA;AAEA,IAAAI,SAAA,GAAAJ,OAAA;AAGA,IAAAK,cAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAP,sBAAA,CAAAC,OAAA;AAA4B,SAAAO,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,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AAC,IAAIA,CAAC,CAAC1I,MAAM,KAAK,CAAC,OAAAiD,MAAA,CAAO9D,CAAC,EAAA8D,MAAA,CAAGqF,CAAC,EAAArF,MAAA,CAAGsF,CAAC,IAAKJ,GAAG;IACtD;EAAC;EAAA,OAAAlE,WAAA;AAAA,EA5EqB4E,iBAAK,CAACC,SAAS;AAqKzC7E,WAAW,CAAC8E,SAAS,GAAG;EACpB3C,QAAQ,EAAE4C,qBAAS,CAACC,IAAI;EACxBjE,KAAK,EAAEgE,qBAAS,CAACE,MAAM;EACvBpE,QAAQ,EAAEkE,qBAAS,CAACG,IAAI,CAACC,UAAU;EACnC5C,KAAK,EAAEwC,qBAAS,CAACE,MAAM;EACvBzC,IAAI,EAAEuC,qBAAS,CAACE,MAAM;EAAE;EACxB3D,KAAK,EAAEyD,qBAAS,CAACK,MAAM;EACvB1D,SAAS,EAAEqD,qBAAS,CAACE,MAAM;EAC3B7D,aAAa,EAAE2D,qBAAS,CAACM;AAC7B,CAAC;;AAED;AACA,IAAMC,OAAO,GAAG,IAAAC,kBAAU,EAAC/H,MAAM,CAAC,CAACwC,WAAW,CAAC;AAAC,IAAAwF,QAAA,GAAAC,OAAA,cACjCH,OAAO"}
1
+ {"version":3,"file":"ColorPicker.js","names":["_react","_interopRequireDefault","require","_reactColor","_propTypes","_styles","_material","_iconsMaterial","_Utils","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","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","key","componentDidUpdate","_prevProps","prevState","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","target","IconButton","size","Delete","Utils","clsx","handleClick","undefined","border","boxSizing","Menu","list","open","onClose","ChromePicker","onChangeComplete","_color","Close","isHex","_typeof2","rgb","toString","padStart","g","b","a","rgb2hex","m","match","parseInt","React","Component","propTypes","PropTypes","bool","string","func","isRequired","object","array","_export","withStyles","_default","exports"],"sources":["ColorPicker.js"],"sourcesContent":["/**\n * Copyright 2018-2023 Denis Haev (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';\n\nimport {\n TextField, Menu, IconButton, Button,\n} 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 * @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 /**\n * IF the props are updated from outside, they should override the state\n * @param _prevProps\n * @param prevState\n */\n componentDidUpdate(_prevProps, prevState) {\n const color = ColorPicker.getColor(this.props.color || this.props.value);\n\n if (color !== prevState.color) {\n this.setState({ color });\n }\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 style = { ...(this.props.style || {}) };\n style.position = 'relative';\n const { color } = this.state;\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=\"ar_color_picker_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: 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,OAAA,GAAAH,OAAA;AAEA,IAAAI,SAAA,GAAAJ,OAAA;AAGA,IAAAK,cAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAP,sBAAA,CAAAC,OAAA;AAA4B,SAAAO,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,QAAAe,gBAAA,aAAAhB,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAE,MAAA,CAAAc,yBAAA,GAAAd,MAAA,CAAAe,gBAAA,CAAAlB,CAAA,EAAAG,MAAA,CAAAc,yBAAA,CAAAf,CA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ACC,IAAI;EACxBjE,KAAK,EAAEgE,qBAAS,CAACE,MAAM;EACvBpE,QAAQ,EAAEkE,qBAAS,CAACG,IAAI,CAACC,UAAU;EACnCzC,KAAK,EAAEqC,qBAAS,CAACE,MAAM;EACvBtC,IAAI,EAAEoC,qBAAS,CAACE,MAAM;EAAE;EACxBxD,KAAK,EAAEsD,qBAAS,CAACK,MAAM;EACvBvD,SAAS,EAAEkD,qBAAS,CAACE,MAAM;EAC3B1D,aAAa,EAAEwD,qBAAS,CAACM;AAC7B,CAAC;;AAED;AACA,IAAMC,OAAO,GAAG,IAAAC,kBAAU,EAAC/H,MAAM,CAAC,CAACwC,WAAW,CAAC;AAAC,IAAAwF,QAAA,GAAAC,OAAA,cACjCH,OAAO"}
@@ -345,8 +345,9 @@ var styles = function styles(theme) {
345
345
  paddingLeft: 2,
346
346
  paddingRight: 2,
347
347
  cursor: 'pointer',
348
+ color: '#CCC',
348
349
  '&:hover': {
349
- background: theme.palette.mode === 'dark' ? '#333' : '#CCC'
350
+ background: '#333'
350
351
  }
351
352
  },
352
353
  backgroundImageLight: {
@@ -1929,21 +1930,6 @@ var FileBrowser = /*#__PURE__*/function (_Component) {
1929
1930
  }
1930
1931
  return null;
1931
1932
  }
1932
-
1933
- /*
1934
- updateItemsAcl(info) {
1935
- const folders = JSON.parse(JSON.stringify(this.state.folders));
1936
- let changed;
1937
- info.forEach(it => {
1938
- const item = this.findItem(it.id, folders);
1939
- if (item && JSON.stringify(item.acl) !== JSON.stringify(it.acl)) {
1940
- item.acl = it.acl;
1941
- changed = true;
1942
- }
1943
- });
1944
- changed && this.setState({ folders });
1945
- }
1946
- */
1947
1933
  }, {
1948
1934
  key: "changeToPath",
1949
1935
  value: function changeToPath() {