@iobroker/adapter-react-v5 4.7.2 → 4.7.4
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/404.js +3 -3
- package/Components/ColorPicker.d.ts +1 -1
- package/Components/ColorPicker.js +16 -16
- package/Components/ColorPicker.js.map +1 -1
- package/Components/ComplexCron.js +3 -6
- package/Components/ComplexCron.js.map +1 -1
- package/Components/FileBrowser.js +5 -5
- package/Components/FileBrowser.js.map +1 -1
- package/Components/JsonConfigComponent/ChipInput.js +4 -5
- package/Components/JsonConfigComponent/ChipInput.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigCheckLicense.js +2 -2
- package/Components/JsonConfigComponent/ConfigTable.js +2 -2
- package/Components/Loader.js +5 -5
- package/Components/Loaders/PT.js +5 -5
- package/Components/Loaders/Vendor.js +5 -5
- package/Components/ObjectBrowser.js +9 -8
- package/Components/ObjectBrowser.js.map +1 -1
- package/Components/TableResize.js +5 -5
- package/Dialogs/Confirm.js +5 -5
- package/Dialogs/Confirm.js.map +1 -1
- package/Dialogs/Error.js +5 -5
- package/Dialogs/Error.js.map +1 -1
- package/Dialogs/Message.js +5 -5
- package/Dialogs/Message.js.map +1 -1
- package/Dialogs/SelectFile.js +5 -5
- package/Dialogs/SelectFile.js.map +1 -1
- package/Dialogs/SelectID.js +5 -5
- package/Dialogs/SelectID.js.map +1 -1
- package/GenericApp.js +5 -5
- package/LegacyConnection.d.ts +2 -1
- package/LegacyConnection.js +14 -8
- package/LegacyConnection.js.map +1 -1
- package/README.md +12 -5
- package/package.json +7 -7
|
@@ -24,11 +24,11 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
24
24
|
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) { (0, _defineProperty2["default"])(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; }
|
|
25
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); }; }
|
|
26
26
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
* Copyright 2022-2023, Denis Haev <dogafox@gmail.com>
|
|
28
|
+
*
|
|
29
|
+
* MIT License
|
|
30
|
+
*
|
|
31
|
+
**/
|
|
32
32
|
var styles = function styles() {
|
|
33
33
|
return {
|
|
34
34
|
table: {
|
package/Dialogs/Confirm.js
CHANGED
|
@@ -26,11 +26,11 @@ var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
|
|
|
26
26
|
var _i18n = _interopRequireDefault(require("../i18n"));
|
|
27
27
|
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); }; }
|
|
28
28
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
* Copyright 2019-2023 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
30
|
+
*
|
|
31
|
+
* MIT License
|
|
32
|
+
*
|
|
33
|
+
**/ // please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined
|
|
34
34
|
var styles = {
|
|
35
35
|
suppress: {
|
|
36
36
|
fontSize: 12
|
package/Dialogs/Confirm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Confirm.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_Button","_Dialog","_DialogActions","_DialogContent","_DialogContentText","_DialogTitle","_FormControlLabel","_Checkbox","_Check","_Close","_i18n","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","styles","suppress","fontSize","suppressRoot","marginTop","DialogConfirm","_React$Component","_inherits2","_super","props","_this","_classCallCheck2","dialogName","suppressQuestionMinutes","Error","parseInt","window","_localStorage","localStorage","getItem","Date","now","removeItem","state","_createClass2","key","value","handleOk","setItem","onClose","handleCancel","render","_this2","setTimeout","createElement","open","maxWidth","fullWidth","undefined","event","reason","id","title","I18n","t","icon","text","classes","label","root","control","concat","checked","onChange","setState","suppressText","variant","onClick","color","autoFocus","startIcon","ok","cancel","React","Component","propTypes","PropTypes","func","isRequired","bool","string","object","number","_export","withStyles","_default","exports"],"sources":["Confirm.js"],"sourcesContent":["/**\n * Copyright 2019-2023 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\n\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogContentText from '@mui/material/DialogContentText';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Checkbox from '@mui/material/Checkbox';\n\nimport IconCheck from '@mui/icons-material/Check';\nimport IconClose from '@mui/icons-material/Close';\n\nimport I18n from '../i18n';\n\nconst styles = {\n suppress: {\n fontSize: 12,\n },\n suppressRoot: {\n marginTop: 16,\n },\n};\n\n/**\n * @typedef {object} DialogConfirmProps\n * @property {string} [title] The dialog title; default: Are you sure? (translated)\n * @property {string} text The dialog text.\n * @property {string} [ok] The ok button text; default: OK (translated)\n * @property {string} [cancel] The cancel button text; default: Cancel (translated)\n * @property {string} [suppressQuestionMinutes] interval in minutes for which the confirm dialog will be suppressed if activated.\n * @property {string} [suppressText] The suppress checkbox text; default: Suppress question for next %s minutes (translated)\n * @property {string} [dialogName] Name of the dialog. Used only with suppressQuestionMinutes to store the user choice\n * @property {(ok: boolean) => void} [onClose] Close handler.\n *\n * @extends {React.Component<DialogConfirmProps>}\n */\nclass DialogConfirm extends React.Component {\n constructor(props) {\n super(props);\n\n if (!this.props.dialogName && this.props.suppressQuestionMinutes) {\n throw new Error('dialogName required if suppressQuestionMinutes used');\n }\n let suppress = false;\n\n if (this.props.suppressQuestionMinutes) {\n suppress = parseInt((window._localStorage || window.localStorage).getItem(this.props.dialogName), 10) || 0;\n\n if (!suppress) {\n suppress = false;\n } else if (Date.now() > suppress) {\n (window._localStorage || window.localStorage).removeItem(this.props.dialogName);\n suppress = false;\n }\n }\n\n this.state = {\n suppress,\n };\n }\n\n handleOk() {\n if (this.state.suppress) {\n (window._localStorage || window.localStorage).setItem(this.props.dialogName, Date.now() + this.props.suppressQuestionMinutes * 60000);\n }\n this.props.onClose && this.props.onClose(true);\n }\n\n handleCancel() {\n this.props.onClose && this.props.onClose(false);\n }\n\n render() {\n if (typeof this.state.suppress === 'number') {\n setTimeout(() => this.props.onClose && this.props.onClose(true), 100);\n return null;\n }\n\n return <Dialog\n open={!0}\n maxWidth=\"md\"\n fullWidth={this.props.fullWidth !== undefined ? this.props.fullWidth : true}\n onClose={(event, reason) => {\n if (reason !== 'backdropClick' && reason !== 'escapeKeyDown') {\n this.handleCancel();\n }\n }}\n aria-labelledby=\"ar_confirmation_dialog_title\"\n aria-describedby=\"ar_confirmation_dialog_description\"\n >\n <DialogTitle id=\"ar_confirmation_dialog_title\">{this.props.title || I18n.t('ra_Are you sure?')}</DialogTitle>\n <DialogContent>\n <DialogContentText id=\"ar_confirmation_dialog_description\">\n {this.props.icon || null}\n {this.props.text}\n {this.props.suppressQuestionMinutes ? <br /> : null}\n {this.props.suppressQuestionMinutes ? <FormControlLabel\n classes={{ label: this.props.classes.suppress, root: this.props.classes.suppressRoot }}\n control={<Checkbox id={`ar_dialog_confirm_suppress_${this.props.dialogName || ''}`} checked={!!this.state.suppress} onChange={() => this.setState({ suppress: !this.state.suppress })} />}\n label={this.props.suppressText || I18n.t('ra_Suppress question for next %s minutes', this.props.suppressQuestionMinutes)}\n /> : null}\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button\n id={`ar_dialog_confirm_ok_${this.props.dialogName || ''}`}\n variant=\"contained\"\n onClick={() => this.handleOk()}\n color=\"primary\"\n autoFocus\n startIcon={<IconCheck />}\n >\n {this.props.ok || I18n.t('ra_Ok')}\n </Button>\n <Button\n id={`ar_dialog_confirm_cancel_${this.props.dialogName || ''}`}\n variant=\"contained\"\n onClick={() => this.handleCancel()}\n color=\"grey\"\n startIcon={<IconClose />}\n >\n {this.props.cancel || I18n.t('ra_Cancel')}\n </Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nDialogConfirm.propTypes = {\n onClose: PropTypes.func.isRequired,\n fullWidth: PropTypes.bool,\n title: PropTypes.string,\n text: PropTypes.string,\n ok: PropTypes.string,\n cancel: PropTypes.string,\n icon: PropTypes.object,\n suppressQuestionMinutes: PropTypes.number,\n suppressText: PropTypes.string,\n dialogName: PropTypes.string,\n};\n\nconst _export = withStyles(styles)(DialogConfirm);\nexport default _export;\n"],"mappings":";;;;;;;;;;;;AAQA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,OAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,cAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,kBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,YAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,iBAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,SAAA,GAAAX,sBAAA,CAAAC,OAAA;AAEA,IAAAW,MAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,MAAA,GAAAb,sBAAA,CAAAC,OAAA;AAEA,IAAAa,KAAA,GAAAd,sBAAA,CAAAC,OAAA;AAA2B,SAAAc,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAF,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,mBAAAP,MAAA;AAAA,SAAAJ,0BAAA,eAAAO,OAAA,qBAAAA,OAAA,CAAAC,SAAA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aAAA,CAAC1D,MAAA,WAAS,MAAE;MAAE,GAExB,IAAI,CAACiC,KAAK,CAACqD,MAAM,IAAInB,gBAAI,CAACC,CAAC,CAAC,WAAW,CACpC,CACG,CACX,CAAC;IACb;EAAC;EAAA,OAAAvC,aAAA;AAAA,EAzFuB0D,iBAAK,CAACC,SAAS;AA4F3C3D,aAAa,CAAC4D,SAAS,GAAG;EACtBpC,OAAO,EAAEqC,qBAAS,CAACC,IAAI,CAACC,UAAU;EAClC/B,SAAS,EAAE6B,qBAAS,CAACG,IAAI;EACzB3B,KAAK,EAAEwB,qBAAS,CAACI,MAAM;EACvBxB,IAAI,EAAEoB,qBAAS,CAACI,MAAM;EACtBT,EAAE,EAAEK,qBAAS,CAACI,MAAM;EACpBR,MAAM,EAAEI,qBAAS,CAACI,MAAM;EACxBzB,IAAI,EAAEqB,qBAAS,CAACK,MAAM;EACtB1D,uBAAuB,EAAEqD,qBAAS,CAACM,MAAM;EACzCjB,YAAY,EAAEW,qBAAS,CAACI,MAAM;EAC9B1D,UAAU,EAAEsD,qBAAS,CAACI;AAC1B,CAAC;AAED,IAAMG,OAAO,GAAG,IAAAC,kBAAU,EAAC1E,MAAM,CAAC,CAACK,aAAa,CAAC;AAAC,IAAAsE,QAAA,GAAAC,OAAA,cACnCH,OAAO"}
|
|
1
|
+
{"version":3,"file":"Confirm.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_Button","_Dialog","_DialogActions","_DialogContent","_DialogContentText","_DialogTitle","_FormControlLabel","_Checkbox","_Check","_Close","_i18n","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","styles","suppress","fontSize","suppressRoot","marginTop","DialogConfirm","_React$Component","_inherits2","_super","props","_this","_classCallCheck2","dialogName","suppressQuestionMinutes","Error","parseInt","window","_localStorage","localStorage","getItem","Date","now","removeItem","state","_createClass2","key","value","handleOk","setItem","onClose","handleCancel","render","_this2","setTimeout","createElement","open","maxWidth","fullWidth","undefined","event","reason","id","title","I18n","t","icon","text","classes","label","root","control","concat","checked","onChange","setState","suppressText","variant","onClick","color","autoFocus","startIcon","ok","cancel","React","Component","propTypes","PropTypes","func","isRequired","bool","string","object","number","_export","withStyles","_default","exports"],"sources":["Confirm.js"],"sourcesContent":["/**\n * Copyright 2019-2023 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\n\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogContentText from '@mui/material/DialogContentText';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport FormControlLabel from '@mui/material/FormControlLabel';\nimport Checkbox from '@mui/material/Checkbox';\n\nimport IconCheck from '@mui/icons-material/Check';\nimport IconClose from '@mui/icons-material/Close';\n\nimport I18n from '../i18n';\n\nconst styles = {\n suppress: {\n fontSize: 12,\n },\n suppressRoot: {\n marginTop: 16,\n },\n};\n\n/**\n * @typedef {object} DialogConfirmProps\n * @property {string} [title] The dialog title; default: Are you sure? (translated)\n * @property {string} text The dialog text.\n * @property {string} [ok] The ok button text; default: OK (translated)\n * @property {string} [cancel] The cancel button text; default: Cancel (translated)\n * @property {string} [suppressQuestionMinutes] interval in minutes for which the confirm dialog will be suppressed if activated.\n * @property {string} [suppressText] The suppress checkbox text; default: Suppress question for next %s minutes (translated)\n * @property {string} [dialogName] Name of the dialog. Used only with suppressQuestionMinutes to store the user choice\n * @property {(ok: boolean) => void} [onClose] Close handler.\n *\n * @extends {React.Component<DialogConfirmProps>}\n */\nclass DialogConfirm extends React.Component {\n constructor(props) {\n super(props);\n\n if (!this.props.dialogName && this.props.suppressQuestionMinutes) {\n throw new Error('dialogName required if suppressQuestionMinutes used');\n }\n let suppress = false;\n\n if (this.props.suppressQuestionMinutes) {\n suppress = parseInt((window._localStorage || window.localStorage).getItem(this.props.dialogName), 10) || 0;\n\n if (!suppress) {\n suppress = false;\n } else if (Date.now() > suppress) {\n (window._localStorage || window.localStorage).removeItem(this.props.dialogName);\n suppress = false;\n }\n }\n\n this.state = {\n suppress,\n };\n }\n\n handleOk() {\n if (this.state.suppress) {\n (window._localStorage || window.localStorage).setItem(this.props.dialogName, Date.now() + this.props.suppressQuestionMinutes * 60000);\n }\n this.props.onClose && this.props.onClose(true);\n }\n\n handleCancel() {\n this.props.onClose && this.props.onClose(false);\n }\n\n render() {\n if (typeof this.state.suppress === 'number') {\n setTimeout(() => this.props.onClose && this.props.onClose(true), 100);\n return null;\n }\n\n return <Dialog\n open={!0}\n maxWidth=\"md\"\n fullWidth={this.props.fullWidth !== undefined ? this.props.fullWidth : true}\n onClose={(event, reason) => {\n if (reason !== 'backdropClick' && reason !== 'escapeKeyDown') {\n this.handleCancel();\n }\n }}\n aria-labelledby=\"ar_confirmation_dialog_title\"\n aria-describedby=\"ar_confirmation_dialog_description\"\n >\n <DialogTitle id=\"ar_confirmation_dialog_title\">{this.props.title || I18n.t('ra_Are you sure?')}</DialogTitle>\n <DialogContent>\n <DialogContentText id=\"ar_confirmation_dialog_description\">\n {this.props.icon || null}\n {this.props.text}\n {this.props.suppressQuestionMinutes ? <br /> : null}\n {this.props.suppressQuestionMinutes ? <FormControlLabel\n classes={{ label: this.props.classes.suppress, root: this.props.classes.suppressRoot }}\n control={<Checkbox id={`ar_dialog_confirm_suppress_${this.props.dialogName || ''}`} checked={!!this.state.suppress} onChange={() => this.setState({ suppress: !this.state.suppress })} />}\n label={this.props.suppressText || I18n.t('ra_Suppress question for next %s minutes', this.props.suppressQuestionMinutes)}\n /> : null}\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button\n id={`ar_dialog_confirm_ok_${this.props.dialogName || ''}`}\n variant=\"contained\"\n onClick={() => this.handleOk()}\n color=\"primary\"\n autoFocus\n startIcon={<IconCheck />}\n >\n {this.props.ok || I18n.t('ra_Ok')}\n </Button>\n <Button\n id={`ar_dialog_confirm_cancel_${this.props.dialogName || ''}`}\n variant=\"contained\"\n onClick={() => this.handleCancel()}\n color=\"grey\"\n startIcon={<IconClose />}\n >\n {this.props.cancel || I18n.t('ra_Cancel')}\n </Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nDialogConfirm.propTypes = {\n onClose: PropTypes.func.isRequired,\n fullWidth: PropTypes.bool,\n title: PropTypes.string,\n text: PropTypes.string,\n ok: PropTypes.string,\n cancel: PropTypes.string,\n icon: PropTypes.object,\n suppressQuestionMinutes: PropTypes.number,\n suppressText: PropTypes.string,\n dialogName: PropTypes.string,\n};\n\nconst _export = withStyles(styles)(DialogConfirm);\nexport default _export;\n"],"mappings":";;;;;;;;;;;;AAQA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,OAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,cAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,kBAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,YAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,iBAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,SAAA,GAAAX,sBAAA,CAAAC,OAAA;AAEA,IAAAW,MAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,MAAA,GAAAb,sBAAA,CAAAC,OAAA;AAEA,IAAAa,KAAA,GAAAd,sBAAA,CAAAC,OAAA;AAA2B,SAAAc,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17,11 +17,11 @@ var _iconsMaterial = require("@mui/icons-material");
|
|
|
17
17
|
var _i18n = _interopRequireDefault(require("../i18n"));
|
|
18
18
|
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); }; }
|
|
19
19
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /**
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
* Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
21
|
+
*
|
|
22
|
+
* MIT License
|
|
23
|
+
*
|
|
24
|
+
**/ // please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined
|
|
25
25
|
/**
|
|
26
26
|
* @typedef {object} DialogErrorProps
|
|
27
27
|
* @property {string} [title] The dialog title; default: Error (translated)
|
package/Dialogs/Error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Error.js","names":["_react","_interopRequireDefault","require","_propTypes","_material","_iconsMaterial","_i18n","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","DialogError","_React$Component","_inherits2","_super","_classCallCheck2","_createClass2","key","value","handleOk","props","onClose","render","_this","createElement","Dialog","open","maxWidth","fullWidth","undefined","DialogTitle","id","title","I18n","t","DialogContent","DialogContentText","text","DialogActions","Button","variant","onClick","color","autoFocus","startIcon","Check","React","Component","propTypes","PropTypes","func","isRequired","bool","string","oneOfType","element","_export","_default","exports"],"sources":["Error.js"],"sourcesContent":["/**\n * Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n} from '@mui/material';\n\nimport { Check as IconCheck } from '@mui/icons-material';\n\nimport I18n from '../i18n';\n\n/**\n * @typedef {object} DialogErrorProps\n * @property {string} [title] The dialog title; default: Error (translated)\n * @property {string | JSX.Element} text The dialog text.\n * @property {() => void} [onClose] Close handler.\n * @property {{titleBackground: string; titleColor: string}} classes The styling class names.\n *\n * @extends {React.Component<DialogErrorProps>}\n */\nclass DialogError extends React.Component {\n handleOk() {\n this.props.onClose && this.props.onClose();\n }\n\n render() {\n return <Dialog\n open={!0}\n maxWidth=\"sm\"\n fullWidth={this.props.fullWidth !== undefined ? this.props.fullWidth : true}\n onClose={() => this.handleOk()}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n <DialogTitle id=\"ar_alert_dialog_title\">\n {this.props.title || I18n.t('ra_Error')}\n </DialogTitle>\n <DialogContent>\n <DialogContentText id=\"ar_alert_dialog_description\">\n {this.props.text || I18n.t('ra_Unknown error!')}\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button\n id=\"ar_dialog_error_ok\"\n variant=\"contained\"\n onClick={() => this.handleOk()}\n color=\"primary\"\n autoFocus\n startIcon={<IconCheck />}\n >\n {I18n.t('ra_Ok')}\n </Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nDialogError.propTypes = {\n onClose: PropTypes.func.isRequired,\n fullWidth: PropTypes.bool,\n title: PropTypes.string,\n text: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element,\n ]),\n};\n\n/** @type {typeof DialogError} */\nconst _export = DialogError;\nexport default _export;\n"],"mappings":";;;;;;;;;;;;AAOA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AASA,IAAAG,cAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AAA2B,SAAAK,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAF,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,mBAAAP,MAAA;AAAA,SAAAJ,0BAAA,eAAAO,OAAA,qBAAAA,OAAA,CAAAC,SAAA,oBAAAD,OAAA,CAAAC,SAAA,CAAAI,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,OAAA,CAAAC,SAAA,CAAAM,OAAA,8CAAAI,CAAA,sBArB3B;AACA;AACA;AACA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"Error.js","names":["_react","_interopRequireDefault","require","_propTypes","_material","_iconsMaterial","_i18n","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","DialogError","_React$Component","_inherits2","_super","_classCallCheck2","_createClass2","key","value","handleOk","props","onClose","render","_this","createElement","Dialog","open","maxWidth","fullWidth","undefined","DialogTitle","id","title","I18n","t","DialogContent","DialogContentText","text","DialogActions","Button","variant","onClick","color","autoFocus","startIcon","Check","React","Component","propTypes","PropTypes","func","isRequired","bool","string","oneOfType","element","_export","_default","exports"],"sources":["Error.js"],"sourcesContent":["/**\n * Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n} from '@mui/material';\n\nimport { Check as IconCheck } from '@mui/icons-material';\n\nimport I18n from '../i18n';\n\n/**\n * @typedef {object} DialogErrorProps\n * @property {string} [title] The dialog title; default: Error (translated)\n * @property {string | JSX.Element} text The dialog text.\n * @property {() => void} [onClose] Close handler.\n * @property {{titleBackground: string; titleColor: string}} classes The styling class names.\n *\n * @extends {React.Component<DialogErrorProps>}\n */\nclass DialogError extends React.Component {\n handleOk() {\n this.props.onClose && this.props.onClose();\n }\n\n render() {\n return <Dialog\n open={!0}\n maxWidth=\"sm\"\n fullWidth={this.props.fullWidth !== undefined ? this.props.fullWidth : true}\n onClose={() => this.handleOk()}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n >\n <DialogTitle id=\"ar_alert_dialog_title\">\n {this.props.title || I18n.t('ra_Error')}\n </DialogTitle>\n <DialogContent>\n <DialogContentText id=\"ar_alert_dialog_description\">\n {this.props.text || I18n.t('ra_Unknown error!')}\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button\n id=\"ar_dialog_error_ok\"\n variant=\"contained\"\n onClick={() => this.handleOk()}\n color=\"primary\"\n autoFocus\n startIcon={<IconCheck />}\n >\n {I18n.t('ra_Ok')}\n </Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nDialogError.propTypes = {\n onClose: PropTypes.func.isRequired,\n fullWidth: PropTypes.bool,\n title: PropTypes.string,\n text: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.element,\n ]),\n};\n\n/** @type {typeof DialogError} */\nconst _export = DialogError;\nexport default _export;\n"],"mappings":";;;;;;;;;;;;AAOA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AASA,IAAAG,cAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AAA2B,SAAAK,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAF,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,mBAAAP,MAAA;AAAA,SAAAJ,0BAAA,eAAAO,OAAA,qBAAAA,OAAA,CAAAC,SAAA,oBAAAD,OAAA,CAAAC,SAAA,CAAAI,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,OAAA,CAAAC,SAAA,CAAAM,OAAA,8CAAAI,CAAA,sBArB3B;AACA;AACA;AACA;AACA;AACA,IALA,CAMA;AAiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA,IASMC,WAAW,0BAAAC,gBAAA;EAAA,IAAAC,UAAA,aAAAF,WAAA,EAAAC,gBAAA;EAAA,IAAAE,MAAA,GAAAzB,YAAA,CAAAsB,WAAA;EAAA,SAAAA,YAAA;IAAA,IAAAI,gBAAA,mBAAAJ,WAAA;IAAA,OAAAG,MAAA,CAAAZ,KAAA,OAAAD,SAAA;EAAA;EAAA,IAA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I,CAACJ,QAAQ,CAAC,CAAC;QAAA,CAAC;QAC/BuB,KAAK,EAAC,SAAS;QACfC,SAAS;QACTC,SAAS,eAAE9D,MAAA,YAAA0C,aAAA,CAACrC,cAAA,CAAA0D,KAAS,MAAE;MAAE,GAExBZ,gBAAI,CAACC,CAAC,CAAC,OAAO,CACX,CACG,CACX,CAAC;IACb;EAAC;EAAA,OAAAvB,WAAA;AAAA,EAnCqBmC,iBAAK,CAACC,SAAS;AAsCzCpC,WAAW,CAACqC,SAAS,GAAG;EACpB3B,OAAO,EAAE4B,qBAAS,CAACC,IAAI,CAACC,UAAU;EAClCvB,SAAS,EAAEqB,qBAAS,CAACG,IAAI;EACzBpB,KAAK,EAAEiB,qBAAS,CAACI,MAAM;EACvBhB,IAAI,EAAEY,qBAAS,CAACK,SAAS,CAAC,CACtBL,qBAAS,CAACI,MAAM,EAChBJ,qBAAS,CAACM,OAAO,CACpB;AACL,CAAC;;AAED;AACA,IAAMC,OAAO,GAAG7C,WAAW;AAAC,IAAA8C,QAAA,GAAAC,OAAA,cACbF,OAAO"}
|
package/Dialogs/Message.js
CHANGED
|
@@ -22,11 +22,11 @@ var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
|
|
|
22
22
|
var _i18n = _interopRequireDefault(require("../i18n"));
|
|
23
23
|
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); }; }
|
|
24
24
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
* Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
26
|
+
*
|
|
27
|
+
* MIT License
|
|
28
|
+
*
|
|
29
|
+
**/ // please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined
|
|
30
30
|
/**
|
|
31
31
|
* @typedef {object} DialogMessageProps
|
|
32
32
|
* @property {string} [title] The dialog title; default: Message (translated)
|
package/Dialogs/Message.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.js","names":["_react","_interopRequireDefault","require","_propTypes","_Button","_Dialog","_DialogActions","_DialogContent","_DialogContentText","_DialogTitle","_Close","_i18n","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","DialogMessage","_React$Component","_inherits2","_super","_classCallCheck2","_createClass2","key","value","handleOk","props","onClose","render","_this","createElement","open","maxWidth","fullWidth","undefined","id","title","I18n","t","style","marginRight","icon","text","variant","onClick","color","autoFocus","startIcon","ok","React","Component","propTypes","PropTypes","bool","func","isRequired","string","object","_default","exports"],"sources":["Message.js"],"sourcesContent":["/**\n * Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\n\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogContentText from '@mui/material/DialogContentText';\nimport DialogTitle from '@mui/material/DialogTitle';\n\nimport IconClose from '@mui/icons-material/Close';\n\nimport I18n from '../i18n';\n\n/**\n * @typedef {object} DialogMessageProps\n * @property {string} [title] The dialog title; default: Message (translated)\n * @property {string} text The dialog text.\n * @property {() => void} [onClose] Close handler.\n *\n * @extends {React.Component<DialogMessageProps>}\n */\nclass DialogMessage extends React.Component {\n handleOk() {\n this.props.onClose && this.props.onClose();\n }\n\n render() {\n return <Dialog\n open={!0}\n maxWidth=\"sm\"\n fullWidth={this.props.fullWidth !== undefined ? this.props.fullWidth : true}\n onClose={() => this.handleOk()}\n aria-labelledby=\"ar_dialog_message_title\"\n aria-describedby=\"ar_dialog_message_description\"\n >\n <DialogTitle id=\"ar_dialog_message_title\">{this.props.title || I18n.t('ra_Message')}</DialogTitle>\n <DialogContent>\n <DialogContentText id=\"ar_dialog_message_description\">\n <span style={{ marginRight: this.props.icon ? 8 : 0 }}>\n {this.props.icon || null}\n </span>\n {this.props.text}\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button id=\"ar_dialog_message_ok\" variant=\"contained\" onClick={() => this.handleOk()} color=\"primary\" autoFocus startIcon={<IconClose />}>{this.props.ok || I18n.t('ra_Close')}</Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nDialogMessage.propTypes = {\n fullWidth: PropTypes.bool,\n onClose: PropTypes.func.isRequired,\n title: PropTypes.string,\n text: PropTypes.string,\n ok: PropTypes.string,\n icon: PropTypes.object,\n};\n\nexport default DialogMessage;\n"],"mappings":";;;;;;;;;;;;AAQA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,cAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,cAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,kBAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,YAAA,GAAAR,sBAAA,CAAAC,OAAA;AAEA,IAAAQ,MAAA,GAAAT,sBAAA,CAAAC,OAAA;AAEA,IAAAS,KAAA,GAAAV,sBAAA,CAAAC,OAAA;AAA2B,SAAAU,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,aAAAL,OAAA,GAAAM,MAAA,MAAAL,yBAAA,QAAAM,SAAA,OAAAF,gBAAA,mBAAAG,WAAA,EAAAF,MAAA,GAAAG,OAAA,CAAAC,SAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAJ,SAAA,YAAAD,MAAA,GAAAF,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,mBAAAP,MAAA;AAAA,SAAAJ,0BAAA,eAAAO,OAAA,qBAAAA,OAAA,CAAAC,SAAA,oBAAAD,OAAA,CAAAC,SAAA,CAAAI,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,OAAA,CAAAC,SAAA,CAAAM,OAAA,8CAAAI,CAAA,sBApB3B;AACA;AACA;AACA;AACA;AACA,
|
|
1
|
+
{"version":3,"file":"Message.js","names":["_react","_interopRequireDefault","require","_propTypes","_Button","_Dialog","_DialogActions","_DialogContent","_DialogContentText","_DialogTitle","_Close","_i18n","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","arguments","apply","_possibleConstructorReturn2","sham","Proxy","Boolean","prototype","valueOf","call","e","DialogMessage","_React$Component","_inherits2","_super","_classCallCheck2","_createClass2","key","value","handleOk","props","onClose","render","_this","createElement","open","maxWidth","fullWidth","undefined","id","title","I18n","t","style","marginRight","icon","text","variant","onClick","color","autoFocus","startIcon","ok","React","Component","propTypes","PropTypes","bool","func","isRequired","string","object","_default","exports"],"sources":["Message.js"],"sourcesContent":["/**\n * Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\n\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogContentText from '@mui/material/DialogContentText';\nimport DialogTitle from '@mui/material/DialogTitle';\n\nimport IconClose from '@mui/icons-material/Close';\n\nimport I18n from '../i18n';\n\n/**\n * @typedef {object} DialogMessageProps\n * @property {string} [title] The dialog title; default: Message (translated)\n * @property {string} text The dialog text.\n * @property {() => void} [onClose] Close handler.\n *\n * @extends {React.Component<DialogMessageProps>}\n */\nclass DialogMessage extends React.Component {\n handleOk() {\n this.props.onClose && this.props.onClose();\n }\n\n render() {\n return <Dialog\n open={!0}\n maxWidth=\"sm\"\n fullWidth={this.props.fullWidth !== undefined ? this.props.fullWidth : true}\n onClose={() => this.handleOk()}\n aria-labelledby=\"ar_dialog_message_title\"\n aria-describedby=\"ar_dialog_message_description\"\n >\n <DialogTitle id=\"ar_dialog_message_title\">{this.props.title || I18n.t('ra_Message')}</DialogTitle>\n <DialogContent>\n <DialogContentText id=\"ar_dialog_message_description\">\n <span style={{ marginRight: this.props.icon ? 8 : 0 }}>\n {this.props.icon || null}\n </span>\n {this.props.text}\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button id=\"ar_dialog_message_ok\" variant=\"contained\" onClick={() => this.handleOk()} color=\"primary\" autoFocus startIcon={<IconClose />}>{this.props.ok || I18n.t('ra_Close')}</Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nDialogMessage.propTypes = {\n fullWidth: PropTypes.bool,\n onClose: PropTypes.func.isRequired,\n title: PropTypes.string,\n text: PropTypes.string,\n ok: PropTypes.string,\n icon: PropTypes.object,\n};\n\nexport default DialogMessage;\n"],"mappings":";;;;;;;;;;;;AAQA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,s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ACVN,MAAA,YAAA+C,aAAA,CAAC3C,OAAA,WAAM;QAACgD,EAAE,EAAC,sBAAsB;QAACQ,OAAO,EAAC,WAAW;QAACC,OAAO,EAAE,SAAAA,QAAA;UAAA,OAAMf,KAAI,CAACJ,QAAQ,CAAC,CAAC;QAAA,CAAC;QAACoB,KAAK,EAAC,SAAS;QAACC,SAAS;QAACC,SAAS,eAAEhE,MAAA,YAAA+C,aAAA,CAACrC,MAAA,WAAS,MAAE;MAAE,GAAE,IAAI,CAACiC,KAAK,CAACsB,EAAE,IAAIX,gBAAI,CAACC,CAAC,CAAC,UAAU,CAAU,CAC5K,CACX,CAAC;IACb;EAAC;EAAA,OAAArB,aAAA;AAAA,EA3BuBgC,iBAAK,CAACC,SAAS;AA8B3CjC,aAAa,CAACkC,SAAS,GAAG;EACtBlB,SAAS,EAAEmB,qBAAS,CAACC,IAAI;EACzB1B,OAAO,EAAEyB,qBAAS,CAACE,IAAI,CAACC,UAAU;EAClCnB,KAAK,EAAEgB,qBAAS,CAACI,MAAM;EACvBd,IAAI,EAAEU,qBAAS,CAACI,MAAM;EACtBR,EAAE,EAAEI,qBAAS,CAACI,MAAM;EACpBf,IAAI,EAAEW,qBAAS,CAACK;AACpB,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAEa1C,aAAa"}
|
package/Dialogs/SelectFile.js
CHANGED
|
@@ -25,11 +25,11 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
25
25
|
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) { (0, _defineProperty2["default"])(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; }
|
|
26
26
|
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); }; }
|
|
27
27
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
* Copyright 2022-2023 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
29
|
+
*
|
|
30
|
+
* MIT License
|
|
31
|
+
*
|
|
32
|
+
*/ // please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined
|
|
33
33
|
var styles = function styles() {
|
|
34
34
|
return {
|
|
35
35
|
headerID: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectFile.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_material","_iconsMaterial","_Utils","_i18n","_FileBrowser","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","headerID","fontWeight","fontStyle","dialog","height","dialogMobile","padding","width","maxWidth","maxHeight","content","overflow","contentMobile","titleRoot","whiteSpace","display","textOverflow","DialogSelectFile","_React$Component","_inherits2","_super","props","_this","_classCallCheck2","dialogName","concat","filters","window","_localStorage","localStorage","getItem","JSON","parse","selected","_typeof2","_toConsumableArray2","id","state","_createClass2","key","value","handleCancel","onClose","handleOk","onOk","multiSelect","Array","isArray","render","_this2","title","createElement","I18n","className","classes","Dialog","paper","Utils","clsx","fullWidth","open","DialogTitle","root","DialogContent","ready","imagePrefix","prefix","allowUpload","allowDownload","allowCreateFolder","allowDelete","allowView","showViewTypeButton","showToolbar","limitPath","filterFiles","filterByType","restrictToFolder","allowNonRestricted","onSelect","isDoubleClick","isFolder","setState","selectOnlyFolders","lang","getLanguage","socket","themeType","themeName","showExpertButton","expertMode","showTypeSelector","DialogActions","Button","variant","onClick","startIcon","Check","disabled","color","ok","Cancel","cancel","React","Component","propTypes","PropTypes","string","oneOfType","array","object","func","isRequired","bool","arrayOf","_export","withStyles","_default","exports"],"sources":["SelectFile.jsx"],"sourcesContent":["/*\n * Copyright 2022-2023 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n */\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport {\n Button,\n DialogTitle,\n DialogContent,\n DialogActions,\n Dialog,\n} from '@mui/material';\n\nimport {\n Cancel as IconCancel,\n Check as IconOk,\n} from '@mui/icons-material';\n\nimport Utils from '../Components/Utils';\nimport I18n from '../i18n';\nimport FileBrowser from '../Components/FileBrowser';\n\nconst styles = () => ({\n headerID: {\n fontWeight: 'bold',\n fontStyle: 'italic',\n },\n dialog: {\n height: '95%',\n },\n dialogMobile: {\n padding: 4,\n width: '100%',\n maxWidth: '100%',\n maxHeight: 'calc(100% - 16px)',\n height: '100%',\n },\n content: {\n height: '100%',\n overflow: 'hidden',\n },\n contentMobile: {\n padding: '8px 4px',\n },\n titleRoot: {\n whiteSpace: 'nowrap',\n width: 'calc(100% - 72px)',\n overflow: 'hidden',\n display: 'inline-block',\n textOverflow: 'ellipsis',\n },\n});\n\n/**\n * @typedef {object} DialogSelectFileProps\n * @property {boolean} [dialogName] PropTypes.string, // where to store settings in localStorage * @property {string} [title] The dialog title; default: Please select object ID... (translated)\n * @property {boolean} [multiSelect] Set to true to allow the selection of multiple IDs.\n * @property {string} [imagePrefix] Prefix (default: '.')\n * @property {boolean} [showExpertButton] Show the expert button?\n * @property {ioBroker.Languages} [lang] The language.\n * @property {import('../Connection').default} socket The socket connection.\n * @property {string} [themeName] Theme name.\n * @property {string} [themeType] Theme type.\n * @property {string | string[]} [selected] The selected IDs.\n * @property {string} [ok] The ok button text; default: OK (translated)\n * @property {string} [cancel] The cancel button text; default: Cancel (translated)\n * @property {boolean} [socket] Socket class (required)\n * @property {boolean} [allowUpload] If download of files enabled\n * @property {boolean} [allowDownload] If download of files enabled\n * @property {boolean} [allowCreateFolder] If creation of folders enabled\n * @property {boolean} [allowDelete] If creation of folders enabled\n * @property {boolean} [allowView] if tile view enabled (default true)\n * @property {boolean} [showToolbar] Show toolbar (default true)\n * @property {array} [limitPath] Limit file browser to one specific objectID of type meta and following path (like vis.0/main)\n * @property {array} [filterFiles] like `['png', 'svg', 'bmp', 'jpg', 'jpeg', 'gif']`\n * @property {string} [filterByType] images, code, txt, audio, video\n * @property {bool} [selectOnlyFolders] allow only folder's selection * @property {() => void} onClose Close handler that is always called when the dialog is closed.\n * @property {(selected: string | string[] | undefined) => void} onOk Handler that is called when the user presses OK or by double click.\n * @property {{headerID: string; dialog: string; content: string}} [classes] The styling class names.\n *\n * @extends {React.Component<DialogSelectIDProps>}\n */\nclass DialogSelectFile extends React.Component {\n /**\n * @param {DialogSelectFileProps} props\n */\n constructor(props) {\n super(props);\n this.dialogName = this.props.dialogName || 'default';\n this.dialogName = `SelectFile.${this.dialogName}`;\n\n this.filters = (window._localStorage || window.localStorage).getItem(this.dialogName) || '{}';\n\n try {\n this.filters = JSON.parse(this.filters);\n } catch (e) {\n this.filters = {};\n }\n\n if (props.filters) {\n this.filters = { ...this.filters, ...props.filters };\n }\n\n let selected = this.props.selected || [];\n if (typeof selected !== 'object') {\n selected = [selected];\n } else {\n selected = [...selected];\n }\n selected = selected.filter(id => id);\n\n this.state = {\n selected,\n };\n }\n\n handleCancel() {\n this.props.onClose();\n }\n\n handleOk() {\n this.props.onOk(this.props.multiSelect || !Array.isArray(this.state.selected) ? this.state.selected : this.state.selected[0] || '');\n this.props.onClose();\n }\n\n render() {\n let title;\n if (this.state.selected.length) {\n if (!Array.isArray(this.state.selected) || this.state.selected.length === 1) {\n title = [\n <span key=\"selected\">\n {I18n.t('ra_Selected')}\n \n </span>,\n <span key=\"id\" className={this.props.classes.headerID}>\n {this.state.selected}\n </span>,\n ];\n } else {\n title = [\n <span key=\"selected\">\n {I18n.t('ra_Selected')}\n \n </span>,\n <span key=\"id\" className={this.props.classes.headerID}>\n {I18n.t('%s items', this.state.selected.length)}\n </span>,\n ];\n }\n } else {\n title = this.props.title || I18n.t('ra_Please select file...');\n }\n\n return <Dialog\n onClose={() => {}}\n maxWidth={false}\n classes={{ paper: Utils.clsx(this.props.classes.dialog, this.props.classes.dialogMobile) }}\n fullWidth\n open={!0}\n aria-labelledby=\"ar_dialog_selectfile_title\"\n >\n <DialogTitle id=\"ar_dialog_selectfile_title\" classes={{ root: this.props.classes.titleRoot }}>{title}</DialogTitle>\n <DialogContent className={Utils.clsx(this.props.classes.content, this.props.classes.contentMobile)}>\n <FileBrowser\n ready\n imagePrefix={this.props.imagePrefix || this.props.prefix || '../'} // prefix is for back compatibility\n allowUpload={!!this.props.allowUpload}\n allowDownload={this.props.allowDownload !== false}\n allowCreateFolder={!!this.props.allowCreateFolder}\n allowDelete={!!this.props.allowDelete}\n allowView={this.props.allowView !== false}\n showViewTypeButton={this.props.showViewTypeButton !== false}\n showToolbar={this.props.showToolbar !== false}\n limitPath={this.props.limitPath}\n filterFiles={this.props.filterFiles}\n filterByType={this.props.filterByType}\n selected={this.props.selected}\n restrictToFolder={this.props.restrictToFolder}\n allowNonRestricted={this.props.allowNonRestricted}\n onSelect={(selected, isDoubleClick, isFolder) => {\n this.setState({ selected }, () =>\n isDoubleClick && (!this.props.selectOnlyFolders || isFolder) && this.handleOk());\n }}\n t={this.props.t || I18n.t}\n lang={this.props.lang || I18n.getLanguage()}\n socket={this.props.socket}\n themeType={this.props.themeType}\n themeName={this.props.themeName}\n showExpertButton={this.props.showExpertButton}\n expertMode={this.props.expertMode}\n showTypeSelector={this.props.showTypeSelector}\n />\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" onClick={() => this.handleOk()} startIcon={<IconOk />} disabled={!this.state.selected.length} color=\"primary\">{this.props.ok || I18n.t('ra_Ok')}</Button>\n <Button color=\"grey\" variant=\"contained\" onClick={() => this.handleCancel()} startIcon={<IconCancel />}>{this.props.cancel || I18n.t('ra_Cancel')}</Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nDialogSelectFile.propTypes = {\n imagePrefix: PropTypes.string,\n dialogName: PropTypes.string, // where to store settings in localStorage\n selected: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.array, // not implemented\n ]),\n classes: PropTypes.object,\n onClose: PropTypes.func.isRequired,\n onOk: PropTypes.func.isRequired,\n ok: PropTypes.string,\n cancel: PropTypes.string,\n socket: PropTypes.object.isRequired,\n allowUpload: PropTypes.bool,\n allowDownload: PropTypes.bool,\n allowCreateFolder: PropTypes.bool,\n allowDelete: PropTypes.bool,\n allowView: PropTypes.bool, // allow view of files\n showToolbar: PropTypes.bool,\n filterFiles: PropTypes.arrayOf(PropTypes.string), // array of extensions ['png', 'svg', 'bmp', 'jpg', 'jpeg', 'gif']\n filterByType: PropTypes.string, // e.g. images\n limitPath: PropTypes.string,\n selectOnlyFolders: PropTypes.bool,\n showViewTypeButton: PropTypes.bool, // Allow switch views Table<=>Rows\n showTypeSelector: PropTypes.bool, // If type selector should be shown\n restrictToFolder: PropTypes.string, // If defined, allow selecting only files from this folder\n allowNonRestricted: PropTypes.bool, // If restrictToFolder defined, allow selecting files outside of this folder\n\n title: PropTypes.string,\n lang: PropTypes.string,\n\n themeName: PropTypes.string,\n themeType: PropTypes.string,\n showExpertButton: PropTypes.bool,\n expertMode: PropTypes.bool, // force expert mode\n multiSelect: PropTypes.bool, // not implemented\n};\n\n/** @type {typeof DialogSelectFile} */\nconst _export = withStyles(styles)(DialogSelectFile);\nexport default _export;\n"],"mappings":";;;;;;;;;;;;;;;AAOA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AAQA,IAAAI,cAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,KAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,YAAA,GAAAR,sBAAA,CAAAC,OAAA;AAAoD,SAAAQ,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,SAA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C,CAACkB,gBAAgB,CAAC;AAAC,IAAAoG,QAAA,GAAAC,OAAA,cACtCH,OAAO"}
|
|
1
|
+
{"version":3,"file":"SelectFile.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_material","_iconsMaterial","_Utils","_i18n","_FileBrowser","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","headerID","fontWeight","fontStyle","dialog","height","dialogMobile","padding","width","maxWidth","maxHeight","content","overflow","contentMobile","titleRoot","whiteSpace","display","textOverflow","DialogSelectFile","_React$Component","_inherits2","_super","props","_this","_classCallCheck2","dialogName","concat","filters","window","_localStorage","localStorage","getItem","JSON","parse","selected","_typeof2","_toConsumableArray2","id","state","_createClass2","key","value","handleCancel","onClose","handleOk","onOk","multiSelect","Array","isArray","render","_this2","title","createElement","I18n","className","classes","Dialog","paper","Utils","clsx","fullWidth","open","DialogTitle","root","DialogContent","ready","imagePrefix","prefix","allowUpload","allowDownload","allowCreateFolder","allowDelete","allowView","showViewTypeButton","showToolbar","limitPath","filterFiles","filterByType","restrictToFolder","allowNonRestricted","onSelect","isDoubleClick","isFolder","setState","selectOnlyFolders","lang","getLanguage","socket","themeType","themeName","showExpertButton","expertMode","showTypeSelector","DialogActions","Button","variant","onClick","startIcon","Check","disabled","color","ok","Cancel","cancel","React","Component","propTypes","PropTypes","string","oneOfType","array","object","func","isRequired","bool","arrayOf","_export","withStyles","_default","exports"],"sources":["SelectFile.jsx"],"sourcesContent":["/*\n * Copyright 2022-2023 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n */\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport {\n Button,\n DialogTitle,\n DialogContent,\n DialogActions,\n Dialog,\n} from '@mui/material';\n\nimport {\n Cancel as IconCancel,\n Check as IconOk,\n} from '@mui/icons-material';\n\nimport Utils from '../Components/Utils';\nimport I18n from '../i18n';\nimport FileBrowser from '../Components/FileBrowser';\n\nconst styles = () => ({\n headerID: {\n fontWeight: 'bold',\n fontStyle: 'italic',\n },\n dialog: {\n height: '95%',\n },\n dialogMobile: {\n padding: 4,\n width: '100%',\n maxWidth: '100%',\n maxHeight: 'calc(100% - 16px)',\n height: '100%',\n },\n content: {\n height: '100%',\n overflow: 'hidden',\n },\n contentMobile: {\n padding: '8px 4px',\n },\n titleRoot: {\n whiteSpace: 'nowrap',\n width: 'calc(100% - 72px)',\n overflow: 'hidden',\n display: 'inline-block',\n textOverflow: 'ellipsis',\n },\n});\n\n/**\n * @typedef {object} DialogSelectFileProps\n * @property {boolean} [dialogName] PropTypes.string, // where to store settings in localStorage * @property {string} [title] The dialog title; default: Please select object ID... (translated)\n * @property {boolean} [multiSelect] Set to true to allow the selection of multiple IDs.\n * @property {string} [imagePrefix] Prefix (default: '.')\n * @property {boolean} [showExpertButton] Show the expert button?\n * @property {ioBroker.Languages} [lang] The language.\n * @property {import('../Connection').default} socket The socket connection.\n * @property {string} [themeName] Theme name.\n * @property {string} [themeType] Theme type.\n * @property {string | string[]} [selected] The selected IDs.\n * @property {string} [ok] The ok button text; default: OK (translated)\n * @property {string} [cancel] The cancel button text; default: Cancel (translated)\n * @property {boolean} [socket] Socket class (required)\n * @property {boolean} [allowUpload] If download of files enabled\n * @property {boolean} [allowDownload] If download of files enabled\n * @property {boolean} [allowCreateFolder] If creation of folders enabled\n * @property {boolean} [allowDelete] If creation of folders enabled\n * @property {boolean} [allowView] if tile view enabled (default true)\n * @property {boolean} [showToolbar] Show toolbar (default true)\n * @property {array} [limitPath] Limit file browser to one specific objectID of type meta and following path (like vis.0/main)\n * @property {array} [filterFiles] like `['png', 'svg', 'bmp', 'jpg', 'jpeg', 'gif']`\n * @property {string} [filterByType] images, code, txt, audio, video\n * @property {bool} [selectOnlyFolders] allow only folder's selection * @property {() => void} onClose Close handler that is always called when the dialog is closed.\n * @property {(selected: string | string[] | undefined) => void} onOk Handler that is called when the user presses OK or by double click.\n * @property {{headerID: string; dialog: string; content: string}} [classes] The styling class names.\n *\n * @extends {React.Component<DialogSelectIDProps>}\n */\nclass DialogSelectFile extends React.Component {\n /**\n * @param {DialogSelectFileProps} props\n */\n constructor(props) {\n super(props);\n this.dialogName = this.props.dialogName || 'default';\n this.dialogName = `SelectFile.${this.dialogName}`;\n\n this.filters = (window._localStorage || window.localStorage).getItem(this.dialogName) || '{}';\n\n try {\n this.filters = JSON.parse(this.filters);\n } catch (e) {\n this.filters = {};\n }\n\n if (props.filters) {\n this.filters = { ...this.filters, ...props.filters };\n }\n\n let selected = this.props.selected || [];\n if (typeof selected !== 'object') {\n selected = [selected];\n } else {\n selected = [...selected];\n }\n selected = selected.filter(id => id);\n\n this.state = {\n selected,\n };\n }\n\n handleCancel() {\n this.props.onClose();\n }\n\n handleOk() {\n this.props.onOk(this.props.multiSelect || !Array.isArray(this.state.selected) ? this.state.selected : this.state.selected[0] || '');\n this.props.onClose();\n }\n\n render() {\n let title;\n if (this.state.selected.length) {\n if (!Array.isArray(this.state.selected) || this.state.selected.length === 1) {\n title = [\n <span key=\"selected\">\n {I18n.t('ra_Selected')}\n \n </span>,\n <span key=\"id\" className={this.props.classes.headerID}>\n {this.state.selected}\n </span>,\n ];\n } else {\n title = [\n <span key=\"selected\">\n {I18n.t('ra_Selected')}\n \n </span>,\n <span key=\"id\" className={this.props.classes.headerID}>\n {I18n.t('%s items', this.state.selected.length)}\n </span>,\n ];\n }\n } else {\n title = this.props.title || I18n.t('ra_Please select file...');\n }\n\n return <Dialog\n onClose={() => {}}\n maxWidth={false}\n classes={{ paper: Utils.clsx(this.props.classes.dialog, this.props.classes.dialogMobile) }}\n fullWidth\n open={!0}\n aria-labelledby=\"ar_dialog_selectfile_title\"\n >\n <DialogTitle id=\"ar_dialog_selectfile_title\" classes={{ root: this.props.classes.titleRoot }}>{title}</DialogTitle>\n <DialogContent className={Utils.clsx(this.props.classes.content, this.props.classes.contentMobile)}>\n <FileBrowser\n ready\n imagePrefix={this.props.imagePrefix || this.props.prefix || '../'} // prefix is for back compatibility\n allowUpload={!!this.props.allowUpload}\n allowDownload={this.props.allowDownload !== false}\n allowCreateFolder={!!this.props.allowCreateFolder}\n allowDelete={!!this.props.allowDelete}\n allowView={this.props.allowView !== false}\n showViewTypeButton={this.props.showViewTypeButton !== false}\n showToolbar={this.props.showToolbar !== false}\n limitPath={this.props.limitPath}\n filterFiles={this.props.filterFiles}\n filterByType={this.props.filterByType}\n selected={this.props.selected}\n restrictToFolder={this.props.restrictToFolder}\n allowNonRestricted={this.props.allowNonRestricted}\n onSelect={(selected, isDoubleClick, isFolder) => {\n this.setState({ selected }, () =>\n isDoubleClick && (!this.props.selectOnlyFolders || isFolder) && this.handleOk());\n }}\n t={this.props.t || I18n.t}\n lang={this.props.lang || I18n.getLanguage()}\n socket={this.props.socket}\n themeType={this.props.themeType}\n themeName={this.props.themeName}\n showExpertButton={this.props.showExpertButton}\n expertMode={this.props.expertMode}\n showTypeSelector={this.props.showTypeSelector}\n />\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" onClick={() => this.handleOk()} startIcon={<IconOk />} disabled={!this.state.selected.length} color=\"primary\">{this.props.ok || I18n.t('ra_Ok')}</Button>\n <Button color=\"grey\" variant=\"contained\" onClick={() => this.handleCancel()} startIcon={<IconCancel />}>{this.props.cancel || I18n.t('ra_Cancel')}</Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nDialogSelectFile.propTypes = {\n imagePrefix: PropTypes.string,\n dialogName: PropTypes.string, // where to store settings in localStorage\n selected: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.array, // not implemented\n ]),\n classes: PropTypes.object,\n onClose: PropTypes.func.isRequired,\n onOk: PropTypes.func.isRequired,\n ok: PropTypes.string,\n cancel: PropTypes.string,\n socket: PropTypes.object.isRequired,\n allowUpload: PropTypes.bool,\n allowDownload: PropTypes.bool,\n allowCreateFolder: PropTypes.bool,\n allowDelete: PropTypes.bool,\n allowView: PropTypes.bool, // allow view of files\n showToolbar: PropTypes.bool,\n filterFiles: PropTypes.arrayOf(PropTypes.string), // array of extensions ['png', 'svg', 'bmp', 'jpg', 'jpeg', 'gif']\n filterByType: PropTypes.string, // e.g. images\n limitPath: PropTypes.string,\n selectOnlyFolders: PropTypes.bool,\n showViewTypeButton: PropTypes.bool, // Allow switch views Table<=>Rows\n showTypeSelector: PropTypes.bool, // If type selector should be shown\n restrictToFolder: PropTypes.string, // If defined, allow selecting only files from this folder\n allowNonRestricted: PropTypes.bool, // If restrictToFolder defined, allow selecting files outside of this folder\n\n title: PropTypes.string,\n lang: PropTypes.string,\n\n themeName: PropTypes.string,\n themeType: PropTypes.string,\n showExpertButton: PropTypes.bool,\n expertMode: PropTypes.bool, // force expert mode\n multiSelect: PropTypes.bool, // not implemented\n};\n\n/** @type {typeof DialogSelectFile} */\nconst _export = withStyles(styles)(DialogSelectFile);\nexport default _export;\n"],"mappings":";;;;;;;;;;;;;;;AAOA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AAQA,IAAAI,cAAA,GAAAJ,OAAA;AAKA,IAAAK,MAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,KAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,YAAA,GAAAR,sBAAA,CAAAC,OAAA;AAAoD,SAAAQ,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ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,EAAEuB,qBAAS,CAACO,IAAI;EACjCzC,kBAAkB,EAAEkC,qBAAS,CAACO,IAAI;EAAE;EACpCtB,gBAAgB,EAAEe,qBAAS,CAACO,IAAI;EAAE;EAClCpC,gBAAgB,EAAE6B,qBAAS,CAACC,MAAM;EAAE;EACpC7B,kBAAkB,EAAE4B,qBAAS,CAACO,IAAI;EAAE;;EAEpC/D,KAAK,EAAEwD,qBAAS,CAACC,MAAM;EACvBvB,IAAI,EAAEsB,qBAAS,CAACC,MAAM;EAEtBnB,SAAS,EAAEkB,qBAAS,CAACC,MAAM;EAC3BpB,SAAS,EAAEmB,qBAAS,CAACC,MAAM;EAC3BlB,gBAAgB,EAAEiB,qBAAS,CAACO,IAAI;EAChCvB,UAAU,EAAEgB,qBAAS,CAACO,IAAI;EAAE;EAC5BpE,WAAW,EAAE6D,qBAAS,CAACO,IAAI,CAAE;AACjC,CAAC;;AAED;AACA,IAAME,OAAO,GAAG,IAAAC,kBAAU,EAACrH,MAAM,CAAC,CAACkB,gBAAgB,CAAC;AAAC,IAAAoG,QAAA,GAAAC,OAAA,cACtCH,OAAO"}
|
package/Dialogs/SelectID.js
CHANGED
|
@@ -29,11 +29,11 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
29
29
|
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) { (0, _defineProperty2["default"])(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; }
|
|
30
30
|
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); }; }
|
|
31
31
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
* Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
33
|
+
*
|
|
34
|
+
* MIT License
|
|
35
|
+
*
|
|
36
|
+
**/ // please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined
|
|
37
37
|
var styles = function styles() {
|
|
38
38
|
return {
|
|
39
39
|
headerID: {
|
package/Dialogs/SelectID.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectID.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_Button","_DialogTitle","_DialogContent","_DialogActions","_Dialog","_Cancel","_Check","_Utils","_i18n","_ObjectBrowser","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","headerID","fontWeight","fontStyle","dialog","height","dialogMobile","padding","width","maxWidth","maxHeight","content","overflow","contentMobile","titleRoot","whiteSpace","display","textOverflow","DialogSelectID","_React$Component","_inherits2","_super","props","_this","_classCallCheck2","dialogName","concat","filters","window","_localStorage","localStorage","getItem","JSON","parse","selected","_typeof2","id","state","name","_createClass2","key","value","handleCancel","onClose","handleOk","onOk","multiSelect","render","_this2","title","createElement","I18n","className","classes","paper","Utils","clsx","fullWidth","open","root","foldersFirst","imagePrefix","prefix","defaultFilters","showExpertButton","undefined","expertMode","style","columns","types","lang","getLanguage","socket","notEditable","themeName","themeType","customFilter","onFilterChanged","filterConfig","setItem","stringify","onSelect","isDouble","setState","filterFunc","variant","onClick","startIcon","disabled","color","ok","cancel","React","Component","propTypes","PropTypes","string","object","bool","func","isRequired","oneOfType","array","_export","withStyles","_default","exports"],"sources":["SelectID.js"],"sourcesContent":["/**\n * Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Button from '@mui/material/Button';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogActions from '@mui/material/DialogActions';\nimport Dialog from '@mui/material/Dialog';\n\nimport IconCancel from '@mui/icons-material/Cancel';\nimport IconOk from '@mui/icons-material/Check';\n\nimport Utils from '../Components/Utils';\nimport I18n from '../i18n';\nimport ObjectBrowser from '../Components/ObjectBrowser';\n\nconst styles = () => ({\n headerID: {\n fontWeight: 'bold',\n fontStyle: 'italic',\n },\n dialog: {\n height: '95%',\n },\n dialogMobile: {\n padding: 4,\n width: '100%',\n maxWidth: '100%',\n maxHeight: 'calc(100% - 16px)',\n height: '100%',\n },\n content: {\n height: '100%',\n overflow: 'hidden',\n },\n contentMobile: {\n padding: '8px 4px',\n },\n titleRoot: {\n whiteSpace: 'nowrap',\n width: 'calc(100% - 72px)',\n overflow: 'hidden',\n display: 'inline-block',\n textOverflow: 'ellipsis',\n },\n});\n\n/**\n * @typedef {object} DialogSelectIDProps\n * @property {string} [dialogName] The internal name of the dialog; default: \"default\"\n * @property {string} [title] The dialog title; default: Please select object ID... (translated)\n * @property {boolean} [multiSelect] Set to true to allow the selection of multiple IDs.\n * @property {boolean} [foldersFirst] Show folders before any leaves.\n * @property {string} [imagePrefix] Prefix (default: '.')\n * @property {boolean} [showExpertButton] Show the expert button?\n * @property {import('../Components/types').ObjectBrowserColumn[]} [columns] Columns to display; default: 'name', 'type', 'role', 'room', 'func', 'val'\n * @property {import('../Components/types').ObjectBrowserType[]} [types] Object types to show; default: 'state' only\n * @property {ioBroker.Languages} [lang] The language.\n * @property {import('../Connection').default} socket The socket connection.\n * @property {boolean} [notEditable] Can't objects be edited? (default: true)\n * @property {string} [themeName] Theme name.\n * @property {string} [themeType] Theme type.\n * @property {import('../Components/types').ObjectBrowserCustomFilter} [customFilter] Custom filter.\n * @property {string | string[]} [selected] The selected IDs.\n * @property {string} [ok] The ok button text; default: OK (translated)\n * @property {string} [cancel] The cancel button text; default: Cancel (translated)\n * @property {() => void} onClose Close handler that is always called when the dialog is closed.\n * @property {(selected: string | string[] | undefined, name: string) => void} onOk Handler that is called when the user presses OK.\n * @property {{headerID: string; dialog: string; content: string}} [classes] The styling class names.\n *\n * @extends {React.Component<DialogSelectIDProps>}\n */\nclass DialogSelectID extends React.Component {\n /**\n * @param {DialogSelectIDProps} props\n */\n constructor(props) {\n super(props);\n this.dialogName = this.props.dialogName || 'default';\n this.dialogName = `SelectID.${this.dialogName}`;\n\n this.filters = (window._localStorage || window.localStorage).getItem(this.dialogName) || '{}';\n\n try {\n this.filters = JSON.parse(this.filters);\n } catch (e) {\n this.filters = {};\n }\n\n if (props.filters) {\n this.filters = { ...this.filters, ...props.filters };\n }\n\n let selected = this.props.selected || [];\n if (typeof selected !== 'object') {\n selected = [selected];\n }\n selected = selected.filter(id => id);\n\n this.state = {\n selected,\n name: '',\n };\n }\n\n handleCancel() {\n this.props.onClose();\n }\n\n handleOk() {\n this.props.onOk(this.props.multiSelect ? this.state.selected : this.state.selected[0] || '', this.state.name);\n this.props.onClose();\n }\n\n render() {\n let title;\n if (this.state.name || this.state.selected.length) {\n if (this.state.selected.length === 1) {\n title = [\n <span key=\"selected\">\n {I18n.t('ra_Selected')}\n \n </span>,\n <span key=\"id\" className={this.props.classes.headerID}>\n {(this.state.name || this.state.selected) + (this.state.name ? ` [${this.state.selected}]` : '')}\n </span>,\n ];\n } else {\n title = [\n <span key=\"selected\">\n {I18n.t('ra_Selected')}\n \n </span>,\n <span key=\"id\" className={this.props.classes.headerID}>\n {I18n.t('%s items', this.state.selected.length)}\n </span>,\n ];\n }\n } else {\n title = this.props.title || I18n.t('ra_Please select object ID...');\n }\n\n return <Dialog\n onClose={() => {}}\n maxWidth={false}\n classes={{ paper: Utils.clsx(this.props.classes.dialog, this.props.classes.dialogMobile) }}\n fullWidth\n open={!0}\n aria-labelledby=\"ar_dialog_selectid_title\"\n >\n <DialogTitle id=\"ar_dialog_selectid_title\" classes={{ root: this.props.classes.titleRoot }}>{title}</DialogTitle>\n <DialogContent className={Utils.clsx(this.props.classes.content, this.props.classes.contentMobile)}>\n <ObjectBrowser\n foldersFirst={this.props.foldersFirst}\n imagePrefix={this.props.imagePrefix || this.props.prefix} // prefix is for back compatibility\n defaultFilters={this.filters}\n dialogName={this.dialogName}\n showExpertButton={this.props.showExpertButton !== undefined ? this.props.showExpertButton : true}\n expertMode={this.props.expertMode}\n style={{ width: '100%', height: '100%' }}\n columns={this.props.columns || ['name', 'type', 'role', 'room', 'func', 'val']}\n types={this.props.types || ['state']}\n root={this.props.root}\n t={I18n.t}\n lang={this.props.lang || I18n.getLanguage()}\n socket={this.props.socket}\n selected={this.state.selected}\n multiSelect={this.props.multiSelect}\n notEditable={this.props.notEditable === undefined ? true : this.props.notEditable}\n name={this.state.name}\n themeName={this.props.themeName}\n themeType={this.props.themeType}\n customFilter={this.props.customFilter}\n onFilterChanged={filterConfig => {\n this.filters = filterConfig;\n (window._localStorage || window.localStorage).setItem(this.dialogName, JSON.stringify(filterConfig));\n }}\n onSelect={(selected, name, isDouble) => {\n if (JSON.stringify(selected) !== JSON.stringify(this.state.selected)) {\n this.setState({ selected, name }, () =>\n isDouble && this.handleOk());\n } else if (isDouble) {\n this.handleOk();\n }\n }}\n filterFunc={this.props.filterFunc}\n />\n </DialogContent>\n <DialogActions>\n <Button id={`ar_dialog_selectid_ok_${this.props.dialogName || ''}`} variant=\"contained\" onClick={() => this.handleOk()} startIcon={<IconOk />} disabled={!this.state.selected.length} color=\"primary\">{this.props.ok || I18n.t('ra_Ok')}</Button>\n <Button id={`ar_dialog_selectid_cancel_${this.props.dialogName || ''}`} color=\"grey\" variant=\"contained\" onClick={() => this.handleCancel()} startIcon={<IconCancel />}>{this.props.cancel || I18n.t('ra_Cancel')}</Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nDialogSelectID.propTypes = {\n dialogName: PropTypes.string, // where to store settings in localStorage\n classes: PropTypes.object,\n notEditable: PropTypes.bool,\n onClose: PropTypes.func.isRequired,\n onOk: PropTypes.func.isRequired,\n title: PropTypes.string,\n lang: PropTypes.string,\n foldersFirst: PropTypes.bool,\n selected: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.array,\n ]),\n filters: PropTypes.object, // predefined filter fields, like {\"id\":\"\",\"name\":\"\",\"room\":\"\",\"func\":\"\",\"role\":\"level\",\"type\":\"\",\"custom\":\"\"}\n customFilter: PropTypes.object, // optional {common: {custom: true}} or {common: {custom: 'sql.0'}}\n socket: PropTypes.object.isRequired,\n cancel: PropTypes.string,\n imagePrefix: PropTypes.string,\n ok: PropTypes.string,\n themeName: PropTypes.string,\n themeType: PropTypes.string,\n showExpertButton: PropTypes.bool,\n expertMode: PropTypes.bool, // force expert mode\n multiSelect: PropTypes.bool,\n types: PropTypes.array, // optional ['state', 'instance', 'channel']\n columns: PropTypes.array, // optional ['name', 'type', 'role', 'room', 'func', 'val', 'buttons']\n root: PropTypes.string, // optional. Root of tree. Show only this branch of tree\n\n filterFunc: PropTypes.func, // function to filter out all unnecessary objects. It cannot be used together with \"types\"\n // Example for function: `obj => obj.common && obj.common.type === 'boolean'` to show only boolean states\n};\n\n/** @type {typeof DialogSelectID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AE6B,qBAAS,CAACG,IAAI;EAAE;EAC5BpD,WAAW,EAAEiD,qBAAS,CAACG,IAAI;EAC3B7B,KAAK,EAAE0B,qBAAS,CAACO,KAAK;EAAI;EAC1BlC,OAAO,EAAE2B,qBAAS,CAACO,KAAK;EAAE;EAC1B3C,IAAI,EAAEoC,qBAAS,CAACC,MAAM;EAAI;;EAE1BZ,UAAU,EAAEW,qBAAS,CAACI,IAAI,CAAE;EACA;AAChC,CAAC;;AAED;AACA,IAAMI,OAAO,GAAG,IAAAC,kBAAU,EAACxG,MAAM,CAAC,CAACkB,cAAc,CAAC;AAAC,IAAAuF,QAAA,GAAAC,OAAA,cACpCH,OAAO"}
|
|
1
|
+
{"version":3,"file":"SelectID.js","names":["_react","_interopRequireDefault","require","_propTypes","_styles","_Button","_DialogTitle","_DialogContent","_DialogActions","_Dialog","_Cancel","_Check","_Utils","_i18n","_ObjectBrowser","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","headerID","fontWeight","fontStyle","dialog","height","dialogMobile","padding","width","maxWidth","maxHeight","content","overflow","contentMobile","titleRoot","whiteSpace","display","textOverflow","DialogSelectID","_React$Component","_inherits2","_super","props","_this","_classCallCheck2","dialogName","concat","filters","window","_localStorage","localStorage","getItem","JSON","parse","selected","_typeof2","id","state","name","_createClass2","key","value","handleCancel","onClose","handleOk","onOk","multiSelect","render","_this2","title","createElement","I18n","className","classes","paper","Utils","clsx","fullWidth","open","root","foldersFirst","imagePrefix","prefix","defaultFilters","showExpertButton","undefined","expertMode","style","columns","types","lang","getLanguage","socket","notEditable","themeName","themeType","customFilter","onFilterChanged","filterConfig","setItem","stringify","onSelect","isDouble","setState","filterFunc","variant","onClick","startIcon","disabled","color","ok","cancel","React","Component","propTypes","PropTypes","string","object","bool","func","isRequired","oneOfType","array","_export","withStyles","_default","exports"],"sources":["SelectID.js"],"sourcesContent":["/**\n * Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\n// please do not delete React, as without it other projects could not be compiled: ReferenceError: React is not defined\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@mui/styles';\n\nimport Button from '@mui/material/Button';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogActions from '@mui/material/DialogActions';\nimport Dialog from '@mui/material/Dialog';\n\nimport IconCancel from '@mui/icons-material/Cancel';\nimport IconOk from '@mui/icons-material/Check';\n\nimport Utils from '../Components/Utils';\nimport I18n from '../i18n';\nimport ObjectBrowser from '../Components/ObjectBrowser';\n\nconst styles = () => ({\n headerID: {\n fontWeight: 'bold',\n fontStyle: 'italic',\n },\n dialog: {\n height: '95%',\n },\n dialogMobile: {\n padding: 4,\n width: '100%',\n maxWidth: '100%',\n maxHeight: 'calc(100% - 16px)',\n height: '100%',\n },\n content: {\n height: '100%',\n overflow: 'hidden',\n },\n contentMobile: {\n padding: '8px 4px',\n },\n titleRoot: {\n whiteSpace: 'nowrap',\n width: 'calc(100% - 72px)',\n overflow: 'hidden',\n display: 'inline-block',\n textOverflow: 'ellipsis',\n },\n});\n\n/**\n * @typedef {object} DialogSelectIDProps\n * @property {string} [dialogName] The internal name of the dialog; default: \"default\"\n * @property {string} [title] The dialog title; default: Please select object ID... (translated)\n * @property {boolean} [multiSelect] Set to true to allow the selection of multiple IDs.\n * @property {boolean} [foldersFirst] Show folders before any leaves.\n * @property {string} [imagePrefix] Prefix (default: '.')\n * @property {boolean} [showExpertButton] Show the expert button?\n * @property {import('../Components/types').ObjectBrowserColumn[]} [columns] Columns to display; default: 'name', 'type', 'role', 'room', 'func', 'val'\n * @property {import('../Components/types').ObjectBrowserType[]} [types] Object types to show; default: 'state' only\n * @property {ioBroker.Languages} [lang] The language.\n * @property {import('../Connection').default} socket The socket connection.\n * @property {boolean} [notEditable] Can't objects be edited? (default: true)\n * @property {string} [themeName] Theme name.\n * @property {string} [themeType] Theme type.\n * @property {import('../Components/types').ObjectBrowserCustomFilter} [customFilter] Custom filter.\n * @property {string | string[]} [selected] The selected IDs.\n * @property {string} [ok] The ok button text; default: OK (translated)\n * @property {string} [cancel] The cancel button text; default: Cancel (translated)\n * @property {() => void} onClose Close handler that is always called when the dialog is closed.\n * @property {(selected: string | string[] | undefined, name: string) => void} onOk Handler that is called when the user presses OK.\n * @property {{headerID: string; dialog: string; content: string}} [classes] The styling class names.\n *\n * @extends {React.Component<DialogSelectIDProps>}\n */\nclass DialogSelectID extends React.Component {\n /**\n * @param {DialogSelectIDProps} props\n */\n constructor(props) {\n super(props);\n this.dialogName = this.props.dialogName || 'default';\n this.dialogName = `SelectID.${this.dialogName}`;\n\n this.filters = (window._localStorage || window.localStorage).getItem(this.dialogName) || '{}';\n\n try {\n this.filters = JSON.parse(this.filters);\n } catch (e) {\n this.filters = {};\n }\n\n if (props.filters) {\n this.filters = { ...this.filters, ...props.filters };\n }\n\n let selected = this.props.selected || [];\n if (typeof selected !== 'object') {\n selected = [selected];\n }\n selected = selected.filter(id => id);\n\n this.state = {\n selected,\n name: '',\n };\n }\n\n handleCancel() {\n this.props.onClose();\n }\n\n handleOk() {\n this.props.onOk(this.props.multiSelect ? this.state.selected : this.state.selected[0] || '', this.state.name);\n this.props.onClose();\n }\n\n render() {\n let title;\n if (this.state.name || this.state.selected.length) {\n if (this.state.selected.length === 1) {\n title = [\n <span key=\"selected\">\n {I18n.t('ra_Selected')}\n \n </span>,\n <span key=\"id\" className={this.props.classes.headerID}>\n {(this.state.name || this.state.selected) + (this.state.name ? ` [${this.state.selected}]` : '')}\n </span>,\n ];\n } else {\n title = [\n <span key=\"selected\">\n {I18n.t('ra_Selected')}\n \n </span>,\n <span key=\"id\" className={this.props.classes.headerID}>\n {I18n.t('%s items', this.state.selected.length)}\n </span>,\n ];\n }\n } else {\n title = this.props.title || I18n.t('ra_Please select object ID...');\n }\n\n return <Dialog\n onClose={() => {}}\n maxWidth={false}\n classes={{ paper: Utils.clsx(this.props.classes.dialog, this.props.classes.dialogMobile) }}\n fullWidth\n open={!0}\n aria-labelledby=\"ar_dialog_selectid_title\"\n >\n <DialogTitle id=\"ar_dialog_selectid_title\" classes={{ root: this.props.classes.titleRoot }}>{title}</DialogTitle>\n <DialogContent className={Utils.clsx(this.props.classes.content, this.props.classes.contentMobile)}>\n <ObjectBrowser\n foldersFirst={this.props.foldersFirst}\n imagePrefix={this.props.imagePrefix || this.props.prefix} // prefix is for back compatibility\n defaultFilters={this.filters}\n dialogName={this.dialogName}\n showExpertButton={this.props.showExpertButton !== undefined ? this.props.showExpertButton : true}\n expertMode={this.props.expertMode}\n style={{ width: '100%', height: '100%' }}\n columns={this.props.columns || ['name', 'type', 'role', 'room', 'func', 'val']}\n types={this.props.types || ['state']}\n root={this.props.root}\n t={I18n.t}\n lang={this.props.lang || I18n.getLanguage()}\n socket={this.props.socket}\n selected={this.state.selected}\n multiSelect={this.props.multiSelect}\n notEditable={this.props.notEditable === undefined ? true : this.props.notEditable}\n name={this.state.name}\n themeName={this.props.themeName}\n themeType={this.props.themeType}\n customFilter={this.props.customFilter}\n onFilterChanged={filterConfig => {\n this.filters = filterConfig;\n (window._localStorage || window.localStorage).setItem(this.dialogName, JSON.stringify(filterConfig));\n }}\n onSelect={(selected, name, isDouble) => {\n if (JSON.stringify(selected) !== JSON.stringify(this.state.selected)) {\n this.setState({ selected, name }, () =>\n isDouble && this.handleOk());\n } else if (isDouble) {\n this.handleOk();\n }\n }}\n filterFunc={this.props.filterFunc}\n />\n </DialogContent>\n <DialogActions>\n <Button id={`ar_dialog_selectid_ok_${this.props.dialogName || ''}`} variant=\"contained\" onClick={() => this.handleOk()} startIcon={<IconOk />} disabled={!this.state.selected.length} color=\"primary\">{this.props.ok || I18n.t('ra_Ok')}</Button>\n <Button id={`ar_dialog_selectid_cancel_${this.props.dialogName || ''}`} color=\"grey\" variant=\"contained\" onClick={() => this.handleCancel()} startIcon={<IconCancel />}>{this.props.cancel || I18n.t('ra_Cancel')}</Button>\n </DialogActions>\n </Dialog>;\n }\n}\n\nDialogSelectID.propTypes = {\n dialogName: PropTypes.string, // where to store settings in localStorage\n classes: PropTypes.object,\n notEditable: PropTypes.bool,\n onClose: PropTypes.func.isRequired,\n onOk: PropTypes.func.isRequired,\n title: PropTypes.string,\n lang: PropTypes.string,\n foldersFirst: PropTypes.bool,\n selected: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.array,\n ]),\n filters: PropTypes.object, // predefined filter fields, like {\"id\":\"\",\"name\":\"\",\"room\":\"\",\"func\":\"\",\"role\":\"level\",\"type\":\"\",\"custom\":\"\"}\n customFilter: PropTypes.object, // optional {common: {custom: true}} or {common: {custom: 'sql.0'}}\n socket: PropTypes.object.isRequired,\n cancel: PropTypes.string,\n imagePrefix: PropTypes.string,\n ok: PropTypes.string,\n themeName: PropTypes.string,\n themeType: PropTypes.string,\n showExpertButton: PropTypes.bool,\n expertMode: PropTypes.bool, // force expert mode\n multiSelect: PropTypes.bool,\n types: PropTypes.array, // optional ['state', 'instance', 'channel']\n columns: PropTypes.array, // optional ['name', 'type', 'role', 'room', 'func', 'val', 'buttons']\n root: PropTypes.string, // optional. Root of tree. Show only this branch of tree\n\n filterFunc: PropTypes.func, // function to filter out all unnecessary objects. It cannot be used together with \"types\"\n // Example for function: `obj => obj.common && obj.common.type === 'boolean'` to show only boolean states\n};\n\n/** @type {typeof DialogSelectID} */\nconst _export = withStyles(styles)(DialogSelectID);\nexport default _export;\n"],"mappings":";;;;;;;;;;;;;;AAOA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAA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E;EAC1B3C,IAAI,EAAEoC,qBAAS,CAACC,MAAM;EAAI;;EAE1BZ,UAAU,EAAEW,qBAAS,CAACI,IAAI,CAAE;EACA;AAChC,CAAC;;AAED;AACA,IAAMI,OAAO,GAAG,IAAAC,kBAAU,EAACxG,MAAM,CAAC,CAACkB,cAAc,CAAC;AAAC,IAAAuF,QAAA,GAAAC,OAAA,cACpCH,OAAO"}
|
package/GenericApp.js
CHANGED
|
@@ -37,11 +37,11 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
37
37
|
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) { (0, _defineProperty2["default"])(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; }
|
|
38
38
|
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); }; }
|
|
39
39
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
* Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
41
|
+
*
|
|
42
|
+
* MIT License
|
|
43
|
+
*
|
|
44
|
+
**/
|
|
45
45
|
// import './index.css';
|
|
46
46
|
var cssStyle = "\nhtml {\n height: 100%;\n}\n\nbody {\n margin: 0;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n/* scrollbar */\n::-webkit-scrollbar-track {\n background-color: #ccc;\n border-radius: 5px;\n}\n\n::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n background-color: #ccc;\n}\n\n::-webkit-scrollbar-thumb {\n background-color: #575757;\n border-radius: 5px;\n}\n\n#root {\n height: 100%;\n}\n\n.App {\n height: 100%;\n}\n\n@keyframes glow {\n from {\n background-color: initial;\n }\n to {\n background-color: #58c458;\n }\n}\n";
|
|
47
47
|
|
package/LegacyConnection.d.ts
CHANGED
|
@@ -202,10 +202,11 @@ declare class Connection {
|
|
|
202
202
|
instanceMessage(messageType: string, sourceInstance: string, data: object): void;
|
|
203
203
|
/**
|
|
204
204
|
* Gets all states.
|
|
205
|
+
* @param {string} pattern The pattern to filter states.
|
|
205
206
|
* @param {boolean} disableProgressUpdate don't call onProgress() when done
|
|
206
207
|
* @returns {Promise<Record<string, ioBroker.State>>}
|
|
207
208
|
*/
|
|
208
|
-
getStates(disableProgressUpdate: boolean): Promise<Record<string, ioBroker.State>>;
|
|
209
|
+
getStates(pattern: string, disableProgressUpdate: boolean): Promise<Record<string, ioBroker.State>>;
|
|
209
210
|
/**
|
|
210
211
|
* Gets the given state.
|
|
211
212
|
* @param {string} id The state ID.
|