@iobroker/adapter-react-v5 4.6.12 → 4.7.0

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.
Files changed (36) hide show
  1. package/Components/FileViewer.js +1 -1
  2. package/Components/FileViewer.js.map +1 -1
  3. package/Components/JsonConfigComponent/ConfigColor.d.ts +2 -1
  4. package/Components/JsonConfigComponent/ConfigFile.js +1 -1
  5. package/Components/JsonConfigComponent/ConfigFile.js.map +1 -1
  6. package/Components/JsonConfigComponent/ConfigFileSelector.js +4 -4
  7. package/Components/JsonConfigComponent/ConfigFileSelector.js.map +1 -1
  8. package/Components/JsonConfigComponent/ConfigGeneric.d.ts +68 -67
  9. package/Components/JsonConfigComponent/ConfigGeneric.js +600 -665
  10. package/Components/JsonConfigComponent/ConfigInterface.d.ts +14 -0
  11. package/Components/JsonConfigComponent/ConfigInterface.js +146 -0
  12. package/Components/JsonConfigComponent/ConfigInterface.js.map +1 -0
  13. package/Components/JsonConfigComponent/ConfigJsonEditor.d.ts +0 -1
  14. package/Components/JsonConfigComponent/ConfigJsonEditor.js +6 -11
  15. package/Components/JsonConfigComponent/ConfigJsonEditor.js.map +1 -1
  16. package/Components/JsonConfigComponent/ConfigLicense.d.ts +2 -1
  17. package/Components/JsonConfigComponent/ConfigNumber.d.ts +16 -2
  18. package/Components/JsonConfigComponent/ConfigNumber.js +105 -201
  19. package/Components/JsonConfigComponent/ConfigPattern.d.ts +2 -1
  20. package/Components/JsonConfigComponent/ConfigPort.d.ts +1 -1
  21. package/Components/JsonConfigComponent/ConfigPort.js +159 -210
  22. package/Components/JsonConfigComponent/ConfigUUID.d.ts +2 -1
  23. package/Components/JsonConfigComponent/wrapper/AdminConnection.d.ts +2 -0
  24. package/Components/JsonConfigComponent/wrapper/AdminConnection.js +7 -0
  25. package/Components/MDUtils.js +3 -3
  26. package/Components/MDUtils.js.map +1 -1
  27. package/Components/SimpleCron/cron2text.js +31 -36
  28. package/Components/SimpleCron/cron2text.js.map +1 -1
  29. package/Components/SimpleCron/index.js +10 -10
  30. package/Components/SimpleCron/index.js.map +1 -1
  31. package/LegacyConnection.js.map +1 -1
  32. package/README.md +1 -1
  33. package/package.json +1 -1
  34. package/Components/JsonConfigComponent/ConfigGeneric.js.map +0 -1
  35. package/Components/JsonConfigComponent/ConfigNumber.js.map +0 -1
  36. package/Components/JsonConfigComponent/ConfigPort.js.map +0 -1
@@ -1,227 +1,176 @@
1
1
  "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports["default"] = void 0;
8
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
11
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
12
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
13
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
14
- var _react = _interopRequireDefault(require("react"));
15
- var _propTypes = _interopRequireDefault(require("prop-types"));
16
- var _styles = require("@mui/styles");
17
- var _material = require("@mui/material");
18
- var _i18n = _interopRequireDefault(require("./wrapper/i18n"));
19
- var _ConfigGeneric2 = _interopRequireDefault(require("./ConfigGeneric"));
20
- 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); }; }
21
- 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; } }
22
- var styles = function styles() {
23
- return {
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const styles_1 = require("@mui/styles");
8
+ const material_1 = require("@mui/material");
9
+ const i18n_1 = __importDefault(require("./wrapper/i18n"));
10
+ const ConfigGeneric_1 = __importDefault(require("./ConfigGeneric"));
11
+ const styles = () => ({
24
12
  indeterminate: {
25
- opacity: 0.5
13
+ opacity: 0.5,
26
14
  },
27
15
  control: {
28
- flexDirection: 'row',
29
- width: '100%'
16
+ flexDirection: 'row',
17
+ width: '100%',
30
18
  },
31
19
  warning: {
32
- '& .Mui-error': {
33
- color: 'orange'
34
- }
35
- }
36
- };
37
- };
38
- var ConfigPort = /*#__PURE__*/function (_ConfigGeneric) {
39
- (0, _inherits2["default"])(ConfigPort, _ConfigGeneric);
40
- var _super = _createSuper(ConfigPort);
41
- function ConfigPort() {
42
- (0, _classCallCheck2["default"])(this, ConfigPort);
43
- return _super.apply(this, arguments);
44
- }
45
- (0, _createClass2["default"])(ConfigPort, [{
46
- key: "componentDidMount",
47
- value: function componentDidMount() {
48
- var _this = this;
49
- (0, _get2["default"])((0, _getPrototypeOf2["default"])(ConfigPort.prototype), "componentDidMount", this).call(this);
50
- var _value = _ConfigGeneric2["default"].getValue(this.props.data, this.props.attr);
51
- if (_value === null || _value === undefined) {
52
- _value = '';
53
- }
54
- this.setState({
55
- _value: _value.toString(),
56
- oldValue: _value.toString()
57
- });
58
-
59
- // read all instances
60
- this.props.socket.getAdapterInstances().then(function (instances) {
61
- var ownId = "system.adapter.".concat(_this.props.adapterName, ".").concat(_this.props.instance);
62
- var ports = [];
63
- instances.forEach(function (instance) {
64
- var _instance$native;
65
- // ignore own instance
66
- if (instance._id === ownId) {
67
- return;
68
- }
69
- // if let's encrypt is enabled and update is enabled, then add port to check
70
- if (instance !== null && instance !== void 0 && instance["native"] && instance["native"].secure && instance["native"].leEnabled && instance["native"].leUpdate) {
71
- var _instance$common;
72
- var _port = parseInt(instance["native"].leCheckPort || instance["native"].lePort, 10);
73
- _port && ports.push({
74
- name: "".concat(instance._id.replace('system.adapter.', ''), " (LE)"),
75
- port: _port,
76
- enabled: (_instance$common = instance.common) === null || _instance$common === void 0 ? void 0 : _instance$common.enabled
77
- });
78
- }
79
- var port = parseInt(instance === null || instance === void 0 || (_instance$native = instance["native"]) === null || _instance$native === void 0 ? void 0 : _instance$native.port, 10);
80
- if (port) {
81
- var _instance$common2;
82
- ports.push({
83
- name: instance._id.replace('system.adapter.', ''),
84
- port: port,
85
- enabled: (_instance$common2 = instance.common) === null || _instance$common2 === void 0 ? void 0 : _instance$common2.enabled
86
- });
87
- }
88
- });
89
- _this.setState({
90
- ports: ports
20
+ '& .Mui-error': {
21
+ color: 'orange',
22
+ },
23
+ },
24
+ });
25
+ class ConfigPort extends ConfigGeneric_1.default {
26
+ async componentDidMount() {
27
+ super.componentDidMount();
28
+ let _value = ConfigGeneric_1.default.getValue(this.props.data, this.props.attr);
29
+ if (_value === null || _value === undefined) {
30
+ _value = '';
31
+ }
32
+ this.setState({ _value: _value.toString(), oldValue: _value.toString() });
33
+ // read all instances
34
+ const instances = await this.props.socket.getAdapterInstances();
35
+ const ownId = `system.adapter.${this.props.adapterName}.${this.props.instance}`;
36
+ const instanceObj = await this.props.socket.getObject(ownId);
37
+ const ownHostname = instanceObj === null || instanceObj === void 0 ? void 0 : instanceObj.common.host;
38
+ const ports = [];
39
+ instances
40
+ .forEach(instance => {
41
+ var _a, _b, _c, _d;
42
+ // ignore own instance and instances on another host
43
+ if (!instance || instance._id === ownId || instance.common.host !== ownHostname) {
44
+ return;
45
+ }
46
+ // check port only if bind attribute is present too
47
+ if (!((_a = instance.native) === null || _a === void 0 ? void 0 : _a.bind)) {
48
+ return;
49
+ }
50
+ // if let's encrypt is enabled and update is enabled, then add port to check
51
+ if ((instance === null || instance === void 0 ? void 0 : instance.native) &&
52
+ instance.native.secure &&
53
+ instance.native.leEnabled &&
54
+ instance.native.leUpdate) {
55
+ const port = parseInt(instance.native.leCheckPort || instance.native.lePort, 10);
56
+ port && ports.push({
57
+ name: `${instance._id.replace('system.adapter.', '')} (LE)`,
58
+ port,
59
+ v6bind: instance.native.bind.includes(':') ? instance.native.bind : instance.native.v6bind,
60
+ bind: instance.native.bind,
61
+ enabled: !!((_b = instance.common) === null || _b === void 0 ? void 0 : _b.enabled),
62
+ });
63
+ }
64
+ const port = parseInt((_c = instance === null || instance === void 0 ? void 0 : instance.native) === null || _c === void 0 ? void 0 : _c.port, 10);
65
+ if (port) {
66
+ ports.push({
67
+ name: instance._id.replace('system.adapter.', ''),
68
+ bind: instance.native.bind,
69
+ v6bind: instance.native.bind.includes(':') ? instance.native.bind : instance.native.v6bind,
70
+ port,
71
+ enabled: !!((_d = instance.common) === null || _d === void 0 ? void 0 : _d.enabled),
72
+ });
73
+ }
91
74
  });
92
- });
75
+ this.setState({ ports });
93
76
  }
94
- }, {
95
- key: "checkValue",
96
- value: function checkValue(value) {
97
- if (value === null || value === undefined) {
77
+ static getDerivedStateFromProps(props, state) {
78
+ const _value = ConfigGeneric_1.default.getValue(props.data, props.attr);
79
+ if (_value === null || _value === undefined ||
80
+ state.oldValue === null || state.oldValue === undefined ||
81
+ (_value.toString() !== parseInt(state._value, 10).toString() &&
82
+ _value.toString() !== state.oldValue.toString())) {
83
+ return { _value };
84
+ }
98
85
  return null;
99
- }
100
- var min = this.props.schema.min || 20;
101
- var max = this.props.schema.max || 0xFFFF;
102
- value = value.toString().trim();
103
- var f = value === '' ? 0 : parseInt(value, 10);
104
- if (value !== '' && Number.isNaN(f)) {
105
- return 'ra_Not a number';
106
- }
107
-
108
- // eslint-disable-next-line no-restricted-properties
109
- if (value !== '' && window.isFinite(value)) {
110
- if (f < min) {
111
- return 'ra_Too small';
86
+ }
87
+ checkValue(value) {
88
+ if (value === null || value === undefined) {
89
+ return null;
112
90
  }
113
- if (f > max) {
114
- return 'ra_Too big';
91
+ const min = this.props.schema.min || 20;
92
+ const max = this.props.schema.max || 0xFFFF;
93
+ value = value.toString().trim();
94
+ const f = value === '' ? 0 : parseInt(value, 10);
95
+ if (value !== '' && Number.isNaN(f)) {
96
+ return 'ra_Not a number';
115
97
  }
116
- if (value === '' || value === '-' || Number.isNaN(f)) {
117
- return 'ra_Not a number';
98
+ // eslint-disable-next-line no-restricted-properties
99
+ if (value !== '' && window.isFinite(Number(value))) {
100
+ if (f < min) {
101
+ return 'ra_Too small';
102
+ }
103
+ if (f > max) {
104
+ return 'ra_Too big';
105
+ }
106
+ if (value === '' || value === '-' || Number.isNaN(f)) {
107
+ return 'ra_Not a number';
108
+ }
109
+ return null;
118
110
  }
119
- return null;
120
- }
121
- return 'ra_Not a number';
111
+ return 'ra_Not a number';
122
112
  }
123
- }, {
124
- key: "renderItem",
125
- value: function renderItem(error, disabled /* , defaultValue */) {
126
- var _this2 = this;
127
- if (this.state.oldValue !== null && this.state.oldValue !== undefined) {
128
- this.updateTimeout && clearTimeout(this.updateTimeout);
129
- this.updateTimeout = setTimeout(function () {
130
- _this2.updateTimeout = null;
131
- _this2.setState({
132
- oldValue: null
133
- });
134
- }, 30);
135
- } else if (this.updateTimeout) {
136
- clearTimeout(this.updateTimeout);
137
- this.updateTimeout = null;
138
- }
139
- var min = this.props.schema.min || 20;
140
- var max = this.props.schema.max || 0xFFFF;
141
- var warning;
142
- if (this.state.ports) {
143
- var num = parseInt(this.state._value, 10);
144
- var idx = this.state.ports.findIndex(function (item) {
145
- return item.port === num && item.enabled;
146
- });
147
- if (idx !== -1) {
148
- error = _i18n["default"].t('ra_Port is already used by %s', this.state.ports[idx].name);
149
- } else {
150
- idx = this.state.ports.findIndex(function (item) {
151
- return item.port === num && !item.enabled;
152
- });
153
- if (idx !== -1) {
154
- warning = true;
155
- error = _i18n["default"].t('ra_Port could be used by %s', this.state.ports[idx].name);
156
- }
113
+ renderItem(error, disabled) {
114
+ if (this.state.oldValue !== null && this.state.oldValue !== undefined) {
115
+ this.updateTimeout && clearTimeout(this.updateTimeout);
116
+ this.updateTimeout = setTimeout(() => {
117
+ this.updateTimeout = undefined;
118
+ this.setState({ oldValue: null });
119
+ }, 30);
157
120
  }
158
- }
159
- if (!error && this.state._value !== null && this.state._value !== undefined) {
160
- error = this.checkValue(this.state._value);
161
- if (error) {
162
- error = _i18n["default"].t(error);
121
+ else if (this.updateTimeout) {
122
+ clearTimeout(this.updateTimeout);
123
+ this.updateTimeout = undefined;
163
124
  }
164
- }
165
- return /*#__PURE__*/_react["default"].createElement(_material.TextField, {
166
- variant: "standard",
167
- type: "number",
168
- fullWidth: true,
169
- inputProps: {
170
- min: min,
171
- max: max,
172
- readOnly: this.props.schema.readOnly || false
173
- },
174
- value: this.state._value === null || this.state._value === undefined ? '' : this.state._value,
175
- error: !!error,
176
- disabled: !!disabled,
177
- className: warning ? this.props.classes.warning : '',
178
- onChange: function onChange(e) {
179
- var _value = e.target.value.toString().replace(/[^0-9]/g, '');
180
- var _error = _this2.checkValue(_value);
181
- if (_error) {
182
- _this2.onError(_this2.props.attr, _i18n["default"].t(_error));
183
- } else {
184
- _this2.onError(_this2.props.attr); // clear error
185
- }
186
-
187
- _this2.setState({
188
- _value: _value,
189
- oldValue: _this2.state._value
190
- }, function () {
191
- if (_value.trim() === parseInt(_value, 10).toString()) {
192
- _this2.onChange(_this2.props.attr, parseInt(_value, 10) || 0);
125
+ const min = this.props.schema.min || 20;
126
+ const max = this.props.schema.max || 0xFFFF;
127
+ let warning;
128
+ if (this.state.ports) {
129
+ const num = parseInt(this.state._value, 10);
130
+ // filter ports only with the same bind address
131
+ // todo: IPv6 (v6bind or '::/0')
132
+ const ports = this.state.ports.filter(item => !this.props.data.bind ||
133
+ this.props.data.bind === item.bind ||
134
+ this.props.data.bind === '0.0.0.0' ||
135
+ item.bind === '0.0.0.0');
136
+ let idx = ports.findIndex(item => item.port === num && item.enabled);
137
+ if (idx !== -1) {
138
+ error = i18n_1.default.t('ra_Port is already used by %s', this.state.ports[idx].name);
193
139
  }
194
- });
195
- },
196
- placeholder: this.getText(this.props.schema.placeholder),
197
- label: this.getText(this.props.schema.label),
198
- helperText: error && typeof error === 'string' ? error : this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation)
199
- });
200
- }
201
- }], [{
202
- key: "getDerivedStateFromProps",
203
- value: function getDerivedStateFromProps(props, state) {
204
- var _value = _ConfigGeneric2["default"].getValue(props.data, props.attr);
205
- if (_value === null || _value === undefined || state.oldValue === null || state.oldValue === undefined || _value.toString() !== parseInt(state._value, 10).toString() && _value.toString() !== state.oldValue.toString()) {
206
- return {
207
- _value: _value
208
- };
209
- }
210
- return null;
140
+ else {
141
+ idx = ports.findIndex(item => item.port === num && !item.enabled);
142
+ if (idx !== -1) {
143
+ warning = true;
144
+ error = i18n_1.default.t('ra_Port could be used by %s', this.state.ports[idx].name);
145
+ }
146
+ }
147
+ }
148
+ if (!error && this.state._value !== null && this.state._value !== undefined) {
149
+ error = this.checkValue(this.state._value);
150
+ if (typeof error === 'string') {
151
+ error = i18n_1.default.t(error);
152
+ }
153
+ }
154
+ return react_1.default.createElement(material_1.TextField, { variant: "standard", type: "number", fullWidth: true, inputProps: {
155
+ min,
156
+ max,
157
+ readOnly: this.props.schema.readOnly || false,
158
+ }, value: this.state._value === null || this.state._value === undefined ? '' : this.state._value, error: !!error, disabled: !!disabled, className: warning ? this.props.classes.warning : '', onChange: e => {
159
+ const _value = Number(e.target.value.toString().replace(/[^0-9]/g, '')).toString();
160
+ const _error = this.checkValue(_value);
161
+ if (_error) {
162
+ this.onError(this.props.attr, i18n_1.default.t(_error));
163
+ }
164
+ else {
165
+ this.onError(this.props.attr); // clear error
166
+ }
167
+ this.setState({ _value, oldValue: this.state._value }, () => {
168
+ if (_value.trim() === parseInt(_value, 10).toString()) {
169
+ this.onChange(this.props.attr, parseInt(_value, 10) || 0);
170
+ }
171
+ });
172
+ }, placeholder: this.getText(this.props.schema.placeholder), label: this.getText(this.props.schema.label), helperText: error && typeof error === 'string' ? error : this.renderHelp(this.props.schema.help, this.props.schema.helpLink, this.props.schema.noTranslation) });
211
173
  }
212
- }]);
213
- return ConfigPort;
214
- }(_ConfigGeneric2["default"]);
215
- ConfigPort.propTypes = {
216
- socket: _propTypes["default"].object.isRequired,
217
- themeType: _propTypes["default"].string,
218
- themeName: _propTypes["default"].string,
219
- style: _propTypes["default"].object,
220
- className: _propTypes["default"].string,
221
- data: _propTypes["default"].object.isRequired,
222
- schema: _propTypes["default"].object,
223
- onError: _propTypes["default"].func,
224
- onChange: _propTypes["default"].func
225
- };
226
- var _default = exports["default"] = (0, _styles.withStyles)(styles)(ConfigPort);
227
- //# sourceMappingURL=ConfigPort.js.map
174
+ }
175
+ // @ts-expect-error check later on
176
+ exports.default = (0, styles_1.withStyles)(styles)(ConfigPort);
@@ -1,5 +1,6 @@
1
1
  export default ConfigUUID;
2
- declare class ConfigUUID extends ConfigGeneric {
2
+ declare class ConfigUUID extends ConfigGeneric<any, any> {
3
+ constructor(props: any);
3
4
  componentDidMount(): Promise<void>;
4
5
  renderItem(error: any, disabled: any): React.JSX.Element;
5
6
  }
@@ -0,0 +1,2 @@
1
+ import AdminConnection from '../../../AdminConnection';
2
+ export default AdminConnection;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const AdminConnection_1 = __importDefault(require("../../../AdminConnection"));
7
+ exports.default = AdminConnection_1.default;
@@ -40,9 +40,9 @@ var MDUtils = /*#__PURE__*/function () {
40
40
  }, {
41
41
  key: "getTitle",
42
42
  value: function getTitle(text) {
43
- var _MDUtils$extractHeade = MDUtils.extractHeader(text),
44
- body = _MDUtils$extractHeade.body,
45
- header = _MDUtils$extractHeade.header;
43
+ var result = MDUtils.extractHeader(text);
44
+ var body = result.body;
45
+ var header = result.header;
46
46
  if (!header.title) {
47
47
  // remove {docsify-bla}
48
48
  body = body.replace(/{[^}]*}/g, '');
@@ -1 +1 @@
1
- {"version":3,"file":"MDUtils.js","names":["_react","_interopRequireDefault","require","_copyToClipboard","MDUtils","_classCallCheck2","_createClass2","key","value","text2link","text","m","match","replace","trim","toLowerCase","openLink","url","target","window","location","open","getTitle","_MDUtils$extractHeade","extractHeader","body","header","title","lines","split","i","length","startsWith","substring","attrs","pos","indexOf","_header","forEach","line","_pos","attr","parseFloat","toString","removeDocsify","doc","onCopy","e","copy","stopPropagation","preventDefault","_default","exports"],"sources":["MDUtils.js"],"sourcesContent":["/**\n * Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport copy from './copy-to-clipboard';\n\nclass MDUtils {\n static text2link(text) {\n const m = text.match(/\\d+\\.\\)\\s/);\n if (m) {\n text = text.replace(m[0], m[0].replace(/\\s/, '&nbsp;'));\n }\n\n return text.replace(/[^a-zA-Zа-яА-Я0-9]/g, '').trim().replace(/\\s/g, '').toLowerCase();\n }\n\n static openLink(url, target) {\n if (target === 'this') {\n window.location = url;\n } else {\n window.open(url, target || '_blank');\n }\n }\n\n static getTitle(text) {\n let { body, header } = MDUtils.extractHeader(text);\n if (!header.title) {\n // remove {docsify-bla}\n body = body.replace(/{[^}]*}/g, '');\n body = body.trim();\n const lines = body.replace(/\\r/g, '').split('\\n');\n for (let i = 0; i < lines.length; i++) {\n if (lines[i].startsWith('# ')) {\n return lines[i].substring(2).trim();\n }\n }\n return '';\n }\n\n return header.title;\n }\n\n static extractHeader(text) {\n const attrs = {};\n if (text.substring(0, 3) === '---') {\n const pos = text.substring(3).indexOf('\\n---');\n if (pos !== -1) {\n const _header = text.substring(3, pos + 3);\n const lines = _header.replace(/\\r/g, '').split('\\n');\n lines.forEach(line => {\n if (!line.trim()) {\n return;\n }\n const _pos = line.indexOf(':');\n if (_pos !== -1) {\n const attr = line.substring(0, _pos).trim();\n attrs[attr] = line.substring(_pos + 1).trim();\n attrs[attr] = attrs[attr].replace(/^['\"]|['\"]$/g, '');\n if (attrs[attr] === 'true') {\n attrs[attr] = true;\n } else if (attrs[attr] === 'false') {\n attrs[attr] = false;\n } else if (parseFloat(attrs[attr]).toString() === attrs[attr]) {\n attrs[attr] = parseFloat(attrs[attr]);\n }\n } else {\n attrs[line.trim()] = true;\n }\n });\n text = text.substring(pos + 7);\n }\n }\n return { header: attrs, body: text };\n }\n\n static removeDocsify(text) {\n const m = text.match(/{docsify-[^}]*}/g);\n if (m) {\n m.forEach(doc => text = text.replace(doc, ''));\n }\n return text;\n }\n\n static onCopy(e, text) {\n copy(text);\n e && e.stopPropagation();\n e && e.preventDefault();\n }\n}\n\nexport default MDUtils;\n"],"mappings":";;;;;;;;;AAMA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAPA;AACA;AACA;AACA;AACA;AACA;AALA,IASME,OAAO;EAAA,SAAAA,QAAA;IAAA,IAAAC,gBAAA,mBAAAD,OAAA;EAAA;EAAA,IAAAE,aAAA,aAAAF,OAAA;IAAAG,GAAA;IAAAC,KAAA,EACT,SAAAC,UAAiBC,IAAI,EAAE;MACnB,IAAMC,CAAC,GAAGD,IAAI,CAACE,KAAK,CAAC,WAAW,CAAC;MACjC,IAAID,CAAC,EAAE;QACHD,IAAI,GAAGA,IAAI,CAACG,OAAO,CAACF,CAAC,CAAC,CAAC,CAAC,EAAEA,CAAC,CAAC,CAAC,CAAC,CAACE,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;MAC3D;MAEA,OAAOH,IAAI,CAACG,OAAO,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAACC,IAAI,CAAC,CAAC,CAACD,OAA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AACR,KAAK,CAACO,IAAI,CAAC,CAAC,CAACE,QAAQ,CAAC,CAAC,KAAKT,KAAK,CAACO,IAAI,CAAC,EAAE;gBAC3DP,KAAK,CAACO,IAAI,CAAC,GAAGC,UAAU,CAACR,KAAK,CAACO,IAAI,CAAC,CAAC;cACzC;YACJ,CAAC,MAAM;cACHP,KAAK,CAACK,IAAI,CAACzB,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI;YAC7B;UACJ,CAAC,CAAC;UACFJ,IAAI,GAAGA,IAAI,CAACuB,SAAS,CAACE,GAAG,GAAG,CAAC,CAAC;QAClC;MACJ;MACA,OAAO;QAAET,MAAM,EAAEQ,KAAK;QAAET,IAAI,EAAEf;MAAK,CAAC;IACxC;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAoC,cAAqBlC,IAAI,EAAE;MACvB,IAAMC,CAAC,GAAGD,IAAI,CAACE,KAAK,CAAC,kBAAkB,CAAC;MACxC,IAAID,CAAC,EAAE;QACHA,CAAC,CAAC2B,OAAO,CAAC,UAAAO,GAAG;UAAA,OAAInC,IAAI,GAAGA,IAAI,CAACG,OAAO,CAACgC,GAAG,EAAE,EAAE,CAAC;QAAA,EAAC;MAClD;MACA,OAAOnC,IAAI;IACf;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAsC,OAAcC,CAAC,EAAErC,IAAI,EAAE;MACnB,IAAAsC,2BAAI,EAACtC,IAAI,CAAC;MACVqC,CAAC,IAAIA,CAAC,CAACE,eAAe,CAAC,CAAC;MACxBF,CAAC,IAAIA,CAAC,CAACG,cAAc,CAAC,CAAC;IAC3B;EAAC;EAAA,OAAA9C,OAAA;AAAA;AAAA,IAAA+C,QAAA,GAAAC,OAAA,cAGUhD,OAAO"}
1
+ {"version":3,"file":"MDUtils.js","names":["_react","_interopRequireDefault","require","_copyToClipboard","MDUtils","_classCallCheck2","_createClass2","key","value","text2link","text","m","match","replace","trim","toLowerCase","openLink","url","target","window","location","open","getTitle","result","extractHeader","body","header","title","lines","split","i","length","startsWith","substring","attrs","pos","indexOf","_header","forEach","line","_pos","attr","parseFloat","toString","removeDocsify","doc","onCopy","e","copy","stopPropagation","preventDefault","_default","exports"],"sources":["MDUtils.js"],"sourcesContent":["/**\n * Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>\n *\n * MIT License\n *\n **/\nimport React from 'react';\nimport copy from './copy-to-clipboard';\n\nclass MDUtils {\n static text2link(text) {\n const m = text.match(/\\d+\\.\\)\\s/);\n if (m) {\n text = text.replace(m[0], m[0].replace(/\\s/, '&nbsp;'));\n }\n\n return text.replace(/[^a-zA-Zа-яА-Я0-9]/g, '').trim().replace(/\\s/g, '').toLowerCase();\n }\n\n static openLink(url, target) {\n if (target === 'this') {\n window.location = url;\n } else {\n window.open(url, target || '_blank');\n }\n }\n\n static getTitle(text) {\n const result = MDUtils.extractHeader(text);\n let body = result.body;\n const header = result.header;\n if (!header.title) {\n // remove {docsify-bla}\n body = body.replace(/{[^}]*}/g, '');\n body = body.trim();\n const lines = body.replace(/\\r/g, '').split('\\n');\n for (let i = 0; i < lines.length; i++) {\n if (lines[i].startsWith('# ')) {\n return lines[i].substring(2).trim();\n }\n }\n return '';\n }\n\n return header.title;\n }\n\n static extractHeader(text) {\n const attrs = {};\n if (text.substring(0, 3) === '---') {\n const pos = text.substring(3).indexOf('\\n---');\n if (pos !== -1) {\n const _header = text.substring(3, pos + 3);\n const lines = _header.replace(/\\r/g, '').split('\\n');\n lines.forEach(line => {\n if (!line.trim()) {\n return;\n }\n const _pos = line.indexOf(':');\n if (_pos !== -1) {\n const attr = line.substring(0, _pos).trim();\n attrs[attr] = line.substring(_pos + 1).trim();\n attrs[attr] = attrs[attr].replace(/^['\"]|['\"]$/g, '');\n if (attrs[attr] === 'true') {\n attrs[attr] = true;\n } else if (attrs[attr] === 'false') {\n attrs[attr] = false;\n } else if (parseFloat(attrs[attr]).toString() === attrs[attr]) {\n attrs[attr] = parseFloat(attrs[attr]);\n }\n } else {\n attrs[line.trim()] = true;\n }\n });\n text = text.substring(pos + 7);\n }\n }\n return { header: attrs, body: text };\n }\n\n static removeDocsify(text) {\n const m = text.match(/{docsify-[^}]*}/g);\n if (m) {\n m.forEach(doc => text = text.replace(doc, ''));\n }\n return text;\n }\n\n static onCopy(e, text) {\n copy(text);\n e && e.stopPropagation();\n e && e.preventDefault();\n }\n}\n\nexport default MDUtils;\n"],"mappings":";;;;;;;;;AAMA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAPA;AACA;AACA;AACA;AACA;AACA;AALA,IASME,OAAO;EAAA,SAAAA,QAAA;IAAA,IAAAC,gBAAA,mBAAAD,OAAA;EAAA;EAAA,IAAAE,aAAA,aAAAF,OAAA;IAAAG,GAAA;IAAAC,KAAA,EACT,SAAAC,UAAiBC,IAAI,EAAE;MACnB,IAAMC,CAAC,GAAGD,IAAI,CAACE,KAAK,CAAC,WAAW,CAAC;MACjC,IAAID,CAAC,EAAE;QACHD,IAAI,GAAGA,IAAI,CAACG,OAAO,CAACF,CAAC,CAAC,CAAC,CAAC,EAAEA,CAAC,CAAC,CAAC,CAAC,CAACE,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;MAC3D;MAEA,OAAOH,IAAI,CAACG,OAAO,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAACC,IAAI,CAAC,CAAC,CAACD,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAACE,WAAW,CAAC,CAAC;IAC1F;EAAC;IAAAR,GAAA;IAAAC,KAAA,EAED,SAAAQ,SAAgBC,GAAG,EAAEC,MAAM,EAAE;MACzB,IAAIA,MAAM,KAAK,MAAM,EAAE;QACnBC,MAAM,CAACC,QAAQ,GAAGH,GAAG;MACzB,CAAC,MAAM;QACHE,MAAM,CAACE,IAAI,CAACJ,GAAG,EAAEC,MAAM,IAAI,QAAQ,CAAC;MACxC;IACJ;EAAC;IAAAX,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uB,SAAS,CAACE,GAAG,GAAG,CAAC,CAAC;QAClC;MACJ;MACA,OAAO;QAAET,MAAM,EAAEQ,KAAK;QAAET,IAAI,EAAEf;MAAK,CAAC;IACxC;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAoC,cAAqBlC,IAAI,EAAE;MACvB,IAAMC,CAAC,GAAGD,IAAI,CAACE,KAAK,CAAC,kBAAkB,CAAC;MACxC,IAAID,CAAC,EAAE;QACHA,CAAC,CAAC2B,OAAO,CAAC,UAAAO,GAAG;UAAA,OAAInC,IAAI,GAAGA,IAAI,CAACG,OAAO,CAACgC,GAAG,EAAE,EAAE,CAAC;QAAA,EAAC;MAClD;MACA,OAAOnC,IAAI;IACf;EAAC;IAAAH,GAAA;IAAAC,KAAA,EAED,SAAAsC,OAAcC,CAAC,EAAErC,IAAI,EAAE;MACnB,IAAAsC,2BAAI,EAACtC,IAAI,CAAC;MACVqC,CAAC,IAAIA,CAAC,CAACE,eAAe,CAAC,CAAC;MACxBF,CAAC,IAAIA,CAAC,CAACG,cAAc,CAAC,CAAC;IAC3B;EAAC;EAAA,OAAA9C,OAAA;AAAA;AAAA,IAAA+C,QAAA,GAAAC,OAAA,cAGUhD,OAAO"}
@@ -434,55 +434,50 @@ function cronToText(cronspec, withSeconds, locale) {
434
434
  if (!_schedule.d && !_schedule.D) {
435
435
  outputText += " ".concat(locale['every day'], " ");
436
436
  }
437
- } else {
437
+ } else if (_schedule.h) {
438
+ // runs only at specific hours
438
439
  // Otherwise, list out every specified hour/minute value.
439
-
440
- if (_schedule.h) {
441
- // runs only at specific hours
442
- if (_schedule.m) {
443
- // and only at specific minutes
444
- if (_withSeconds) {
445
- if (!_schedule.s || _schedule.s.length === 60) {
446
- outputText += "".concat(locale['second of every'], " ").concat(numberList(_schedule.m), " ").concat(locale['minute past the'], " ").concat(numberList(_schedule.h), " ").concat(locale.hour);
447
- } else {
448
- outputText += "".concat(numberList(_schedule.s), " ").concat(locale['second of every'], " ").concat(numberList(_schedule.m), " ").concat(locale['minute past the'], " ").concat(numberList(_schedule.h), " ").concat(locale.hour);
449
- }
450
- } else {
451
- outputText += "".concat(numberList(_schedule.m), " ").concat(locale['minute past the'], " ").concat(numberList(_schedule.h), " ").concat(locale.hour);
452
- }
453
- } else {
454
- // specific hours, but every minute
455
- if (_withSeconds) {
456
- if (!_schedule.s || _schedule.s.length === 60) {
457
- outputText += "".concat(locale['second of every'], " ").concat(locale['minute of'], " ").concat(numberList(_schedule.h), " ").concat(locale.hour);
458
- } else {
459
- outputText += "".concat(numberList(_schedule.s), " ").concat(locale['second of every'], " ").concat(locale['minute of'], " ").concat(numberList(_schedule.h), " ").concat(locale.hour);
460
- }
461
- } else {
462
- outputText += "".concat(locale['minute of'], " ").concat(numberList(_schedule.h), " ").concat(locale.hour);
463
- }
464
- }
465
- } else if (_schedule.m) {
466
- // every hour, but specific minutes
440
+ if (_schedule.m) {
441
+ // and only at specific minutes
467
442
  if (_withSeconds) {
468
443
  if (!_schedule.s || _schedule.s.length === 60) {
469
- outputText += "".concat(locale['second of every'], " ").concat(numberList(_schedule.m), " ").concat(locale['minute every hour']);
444
+ outputText += "".concat(locale['second of every'], " ").concat(numberList(_schedule.m), " ").concat(locale['minute past the'], " ").concat(numberList(_schedule.h), " ").concat(locale.hour);
470
445
  } else {
471
- outputText += "".concat(numberList(_schedule.s), " ").concat(locale['second of every'], " ").concat(numberList(_schedule.m), " ").concat(locale['minute every hour']);
446
+ outputText += "".concat(numberList(_schedule.s), " ").concat(locale['second of every'], " ").concat(numberList(_schedule.m), " ").concat(locale['minute past the'], " ").concat(numberList(_schedule.h), " ").concat(locale.hour);
472
447
  }
473
448
  } else {
474
- outputText += "".concat(numberList(_schedule.m), " ").concat(locale['minute every hour']);
449
+ outputText += "".concat(numberList(_schedule.m), " ").concat(locale['minute past the'], " ").concat(numberList(_schedule.h), " ").concat(locale.hour);
475
450
  }
476
451
  } else if (_withSeconds) {
452
+ // specific hours, but every minute
477
453
  if (!_schedule.s || _schedule.s.length === 60) {
478
- outputText += locale.second;
454
+ outputText += "".concat(locale['second of every'], " ").concat(locale['minute of'], " ").concat(numberList(_schedule.h), " ").concat(locale.hour);
479
455
  } else {
480
- outputText += "".concat(numberList(_schedule.s), " ").concat(locale.second);
456
+ outputText += "".concat(numberList(_schedule.s), " ").concat(locale['second of every'], " ").concat(locale['minute of'], " ").concat(numberList(_schedule.h), " ").concat(locale.hour);
481
457
  }
482
458
  } else {
483
- // cronspec has "*" for both hour and minute
484
- outputText += locale.minute;
459
+ outputText += "".concat(locale['minute of'], " ").concat(numberList(_schedule.h), " ").concat(locale.hour);
485
460
  }
461
+ } else if (_schedule.m) {
462
+ // every hour, but specific minutes
463
+ if (_withSeconds) {
464
+ if (!_schedule.s || _schedule.s.length === 60) {
465
+ outputText += "".concat(locale['second of every'], " ").concat(numberList(_schedule.m), " ").concat(locale['minute every hour']);
466
+ } else {
467
+ outputText += "".concat(numberList(_schedule.s), " ").concat(locale['second of every'], " ").concat(numberList(_schedule.m), " ").concat(locale['minute every hour']);
468
+ }
469
+ } else {
470
+ outputText += "".concat(numberList(_schedule.m), " ").concat(locale['minute every hour']);
471
+ }
472
+ } else if (_withSeconds) {
473
+ if (!_schedule.s || _schedule.s.length === 60) {
474
+ outputText += locale.second;
475
+ } else {
476
+ outputText += "".concat(numberList(_schedule.s), " ").concat(locale.second);
477
+ }
478
+ } else {
479
+ // cronspec has "*" for both hour and minute
480
+ outputText += locale.minute;
486
481
  }
487
482
  if (_schedule.D) {
488
483
  // runs only on specific day(s) of month