@iobroker/adapter-react-v5 3.1.25 → 3.1.28
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.d.ts +3 -0
- package/Components/ColorPicker.d.ts +138 -0
- package/Components/ComplexCron.d.ts +8 -0
- package/Components/CustomModal.d.ts +3 -0
- package/Components/FileBrowser.d.ts +125 -0
- package/Components/FileViewer.d.ts +80 -0
- package/Components/FileViewer.js +10 -9
- package/Components/FileViewer.js.map +1 -1
- package/Components/Icon.d.ts +21 -0
- package/Components/IconPicker.d.ts +64 -0
- package/Components/IconPicker.js.map +1 -1
- package/Components/IconSelector.d.ts +25 -0
- package/Components/Image.d.ts +64 -0
- package/Components/JsonConfigComponent/ChipInput.d.ts +13 -0
- package/Components/JsonConfigComponent/ConfigAlive.d.ts +10 -0
- package/Components/JsonConfigComponent/ConfigAutocomplete.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCRON.d.ts +15 -0
- package/Components/JsonConfigComponent/ConfigCertificateSelect.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCheckbox.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigChip.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigColor.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCoordinates.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCustom.d.ts +26 -0
- package/Components/JsonConfigComponent/ConfigCustom.js +4 -3
- package/Components/JsonConfigComponent/ConfigCustom.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigDatePicker.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigFile.d.ts +15 -0
- package/Components/JsonConfigComponent/ConfigFileSelector.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigFunc.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigGeneric.d.ts +71 -0
- package/Components/JsonConfigComponent/ConfigGeneric.js +9 -7
- package/Components/JsonConfigComponent/ConfigGeneric.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigIP.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigImageUpload.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigInstanceSelect.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigJsonEditor.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigLanguage.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigLanguage.js +1 -1
- package/Components/JsonConfigComponent/ConfigLanguage.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigNumber.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigNumber.js +33 -11
- package/Components/JsonConfigComponent/ConfigNumber.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigObjectId.d.ts +17 -0
- package/Components/JsonConfigComponent/ConfigPanel.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigPanel.js +1 -0
- package/Components/JsonConfigComponent/ConfigPanel.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigPassword.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigPattern.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigRoom.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigSelect.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigSelectSendTo.d.ts +17 -0
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js +3 -3
- package/Components/JsonConfigComponent/ConfigSelectSendTo.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigSendto.d.ts +18 -0
- package/Components/JsonConfigComponent/ConfigSendto.js +85 -24
- package/Components/JsonConfigComponent/ConfigSendto.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigSetState.d.ts +18 -0
- package/Components/JsonConfigComponent/ConfigSlider.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticDivider.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticHeader.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticImage.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticText.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticText.js +45 -4
- package/Components/JsonConfigComponent/ConfigStaticText.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigTable.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigTable.js +36 -25
- package/Components/JsonConfigComponent/ConfigTable.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigTabs.d.ts +33 -0
- package/Components/JsonConfigComponent/ConfigText.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigText.js +15 -12
- package/Components/JsonConfigComponent/ConfigText.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigTextSendTo.d.ts +10 -0
- package/Components/JsonConfigComponent/ConfigTimePicker.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigTopic.d.ts +17 -0
- package/Components/JsonConfigComponent/ConfigUser.d.ts +14 -0
- package/Components/JsonConfigComponent/index.d.ts +27 -0
- package/Components/JsonConfigComponent/index.js +4 -6
- package/Components/JsonConfigComponent/index.js.map +1 -1
- package/Components/Loader.d.ts +37 -0
- package/Components/Loaders/PT.d.ts +41 -0
- package/Components/Loaders/Vendor.d.ts +41 -0
- package/Components/Logo.d.ts +59 -0
- package/Components/MDUtils.d.ts +12 -0
- package/Components/ObjectBrowser.d.ts +632 -0
- package/Components/ObjectBrowser.js +57 -12
- package/Components/ObjectBrowser.js.map +1 -1
- package/Components/Router.d.ts +35 -0
- package/Components/SaveCloseButtons.d.ts +64 -0
- package/Components/Schedule.d.ts +7 -0
- package/Components/SelectWithIcon.d.ts +21 -0
- package/Components/SimpleCron/cron2text.d.ts +8 -0
- package/Components/SimpleCron/cronText.d.ts +2 -0
- package/Components/SimpleCron/index.d.ts +8 -0
- package/Components/SimpleCron/jquery.cron.locale.d.ts +2 -0
- package/Components/TabContainer.d.ts +42 -0
- package/Components/TabContent.d.ts +32 -0
- package/Components/TabHeader.d.ts +13 -0
- package/Components/TableResize.d.ts +14 -0
- package/Components/TextWithIcon.d.ts +3 -0
- package/Components/ToggleThemeMenu.d.ts +8 -0
- package/Components/TreeTable.d.ts +3 -0
- package/Components/UploadImage.d.ts +2 -0
- package/Components/Utils.d.ts +334 -0
- package/Components/copy-to-clipboard.d.ts +2 -0
- package/Components/withWidth.d.ts +2 -0
- package/Connection.d.ts +766 -0
- package/Connection.js +87 -17
- package/Connection.js.map +1 -1
- package/Dialogs/ComplexCron.d.ts +15 -0
- package/Dialogs/Confirm.d.ts +48 -0
- package/Dialogs/Cron.d.ts +15 -0
- package/Dialogs/Error.d.ts +49 -0
- package/Dialogs/FileSelect.d.ts +148 -0
- package/Dialogs/FileSelect.js +2 -1
- package/Dialogs/FileSelect.js.map +1 -1
- package/Dialogs/Message.d.ts +39 -0
- package/Dialogs/SelectID.d.ts +161 -0
- package/Dialogs/SimpleCron.d.ts +14 -0
- package/Dialogs/TextInput.d.ts +87 -0
- package/GenericApp.d.ts +213 -0
- package/Prompt.d.ts +5 -0
- package/README.md +9 -1
- package/Theme.d.ts +7 -0
- package/assets/devices/parseNames.d.ts +1 -0
- package/assets/rooms/parseNames.d.ts +1 -0
- package/i18n/de.json +2 -1
- package/i18n/en.json +2 -1
- package/i18n/es.json +2 -1
- package/i18n/fr.json +2 -1
- package/i18n/it.json +2 -1
- package/i18n/nl.json +2 -1
- package/i18n/pl.json +2 -1
- package/i18n/pt.json +2 -1
- package/i18n/ru.json +2 -1
- package/i18n/zh-cn.json +2 -1
- package/i18n.d.ts +92 -0
- package/icons/IconAdapter.d.ts +11 -0
- package/icons/IconAlias.d.ts +11 -0
- package/icons/IconChannel.d.ts +11 -0
- package/icons/IconClearFilter.d.ts +11 -0
- package/icons/IconClosed.d.ts +11 -0
- package/icons/IconCopy.d.ts +38 -0
- package/icons/IconDevice.d.ts +11 -0
- package/icons/IconDocument.d.ts +11 -0
- package/icons/IconDocumentReadOnly.d.ts +11 -0
- package/icons/IconExpert.d.ts +38 -0
- package/icons/IconFx.d.ts +11 -0
- package/icons/IconInstance.d.ts +11 -0
- package/icons/IconLogout.d.ts +38 -0
- package/icons/IconNoIcon.d.ts +38 -0
- package/icons/IconOpen.d.ts +11 -0
- package/icons/IconState.d.ts +11 -0
- package/index.d.ts +113 -0
- package/package.json +8 -8
package/Connection.js
CHANGED
|
@@ -909,18 +909,26 @@ var Connection = /*#__PURE__*/function () {
|
|
|
909
909
|
* Sets the given state value.
|
|
910
910
|
* @param {string} id The state ID.
|
|
911
911
|
* @param {string | number | boolean | ioBroker.State | ioBroker.SettableState | null} val The state value.
|
|
912
|
+
* @param {boolean | null} ack Acknowledge flag
|
|
912
913
|
* @returns {Promise<void>}
|
|
913
914
|
*/
|
|
914
915
|
|
|
915
916
|
}, {
|
|
916
917
|
key: "setState",
|
|
917
|
-
value: function setState(id, val) {
|
|
918
|
+
value: function setState(id, val, ack) {
|
|
918
919
|
var _this10 = this;
|
|
919
920
|
|
|
920
921
|
if (!this.connected) {
|
|
921
922
|
return Promise.reject(NOT_CONNECTED);
|
|
922
923
|
}
|
|
923
924
|
|
|
925
|
+
if (typeof ack === 'boolean') {
|
|
926
|
+
val = {
|
|
927
|
+
val: val,
|
|
928
|
+
ack: ack
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
|
|
924
932
|
return new Promise(function (resolve, reject) {
|
|
925
933
|
return _this10._socket.emit('setState', id, val, function (err) {
|
|
926
934
|
return err ? reject(err) : resolve();
|
|
@@ -3138,6 +3146,13 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3138
3146
|
});
|
|
3139
3147
|
});
|
|
3140
3148
|
return this._promises.compactAdapters;
|
|
3149
|
+
}
|
|
3150
|
+
}, {
|
|
3151
|
+
key: "getAdaptersResetCache",
|
|
3152
|
+
value: function getAdaptersResetCache(adapter) {
|
|
3153
|
+
adapter = adapter || '';
|
|
3154
|
+
this._promises.compactAdapters = null;
|
|
3155
|
+
this._promises['adapter_' + adapter] = null;
|
|
3141
3156
|
} // returns very optimized information for adapters to minimize connection load
|
|
3142
3157
|
|
|
3143
3158
|
}, {
|
|
@@ -3163,6 +3178,13 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3163
3178
|
});
|
|
3164
3179
|
});
|
|
3165
3180
|
return this._promises.compactInstances;
|
|
3181
|
+
}
|
|
3182
|
+
}, {
|
|
3183
|
+
key: "getAdapternInstancesResetCache",
|
|
3184
|
+
value: function getAdapternInstancesResetCache(adapter) {
|
|
3185
|
+
adapter = adapter || '';
|
|
3186
|
+
this._promises.compactInstances = null;
|
|
3187
|
+
this._promises['instances_' + adapter] = null;
|
|
3166
3188
|
} // returns very optimized information for adapters to minimize connection load
|
|
3167
3189
|
// reads only version of installed adapter
|
|
3168
3190
|
|
|
@@ -3214,12 +3236,66 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3214
3236
|
});
|
|
3215
3237
|
return this._promises.installedCompact[host];
|
|
3216
3238
|
} // returns very optimized information for adapters to minimize connection load
|
|
3239
|
+
// reads only version of installed adapter
|
|
3217
3240
|
|
|
3218
3241
|
}, {
|
|
3219
|
-
key: "
|
|
3220
|
-
value: function
|
|
3242
|
+
key: "getCompactSystemRepositories",
|
|
3243
|
+
value: function getCompactSystemRepositories(update, cmdTimeout) {
|
|
3221
3244
|
var _this73 = this;
|
|
3222
3245
|
|
|
3246
|
+
if (Connection.isWeb()) {
|
|
3247
|
+
return Promise.reject('Allowed only in admin');
|
|
3248
|
+
}
|
|
3249
|
+
|
|
3250
|
+
this._promises.installedCompact = this._promises.installedCompact || {};
|
|
3251
|
+
|
|
3252
|
+
if (!this.connected) {
|
|
3253
|
+
return Promise.reject(NOT_CONNECTED);
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3256
|
+
this._promises.getCompactSystemRepositories = new Promise(function (resolve, reject) {
|
|
3257
|
+
var timeout = setTimeout(function () {
|
|
3258
|
+
if (timeout) {
|
|
3259
|
+
timeout = null;
|
|
3260
|
+
reject('getCompactSystemRepositories timeout');
|
|
3261
|
+
}
|
|
3262
|
+
}, cmdTimeout || _this73.props.cmdTimeout);
|
|
3263
|
+
|
|
3264
|
+
_this73._socket.emit('getCompactSystemRepositories', function (data) {
|
|
3265
|
+
if (timeout) {
|
|
3266
|
+
clearTimeout(timeout);
|
|
3267
|
+
timeout = null;
|
|
3268
|
+
|
|
3269
|
+
if (data === PERMISSION_ERROR) {
|
|
3270
|
+
reject('May not read "getCompactSystemRepositories"');
|
|
3271
|
+
} else if (!data) {
|
|
3272
|
+
reject('Cannot read "getCompactSystemRepositories"');
|
|
3273
|
+
} else {
|
|
3274
|
+
resolve(data);
|
|
3275
|
+
}
|
|
3276
|
+
}
|
|
3277
|
+
});
|
|
3278
|
+
});
|
|
3279
|
+
return this._promises.getCompactSystemRepositories;
|
|
3280
|
+
}
|
|
3281
|
+
}, {
|
|
3282
|
+
key: "getInstalledResetCache",
|
|
3283
|
+
value: function getInstalledResetCache(host) {
|
|
3284
|
+
this._promises.repoCompact = null;
|
|
3285
|
+
this._promises.repo = null;
|
|
3286
|
+
}
|
|
3287
|
+
/**
|
|
3288
|
+
* Get the list of all hosts in compact form (only _id, common.name, common.icon, common.color, native.hardware.networkInterfaces)
|
|
3289
|
+
* @param {boolean} [update] Force update.
|
|
3290
|
+
* @returns {Promise<ioBroker.Object[]>}
|
|
3291
|
+
*/
|
|
3292
|
+
|
|
3293
|
+
}, {
|
|
3294
|
+
key: "getCompactSystemConfig",
|
|
3295
|
+
value: // returns very optimized information for adapters to minimize connection load
|
|
3296
|
+
function getCompactSystemConfig(update) {
|
|
3297
|
+
var _this74 = this;
|
|
3298
|
+
|
|
3223
3299
|
if (!update && this._promises.systemConfigCommon) {
|
|
3224
3300
|
return this._promises.systemConfigCommon;
|
|
3225
3301
|
}
|
|
@@ -3229,7 +3305,7 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3229
3305
|
}
|
|
3230
3306
|
|
|
3231
3307
|
this._promises.systemConfigCommon = new Promise(function (resolve, reject) {
|
|
3232
|
-
return
|
|
3308
|
+
return _this74._socket.emit('getCompactSystemConfig', function (err, systemConfig) {
|
|
3233
3309
|
return err ? reject(err) : resolve(systemConfig);
|
|
3234
3310
|
});
|
|
3235
3311
|
});
|
|
@@ -3246,7 +3322,7 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3246
3322
|
}, {
|
|
3247
3323
|
key: "getCompactRepository",
|
|
3248
3324
|
value: function getCompactRepository(host, update, timeoutMs) {
|
|
3249
|
-
var
|
|
3325
|
+
var _this75 = this;
|
|
3250
3326
|
|
|
3251
3327
|
if (Connection.isWeb()) {
|
|
3252
3328
|
return Promise.reject('Allowed only in admin');
|
|
@@ -3270,9 +3346,9 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3270
3346
|
timeout = null;
|
|
3271
3347
|
reject('getCompactRepository timeout');
|
|
3272
3348
|
}
|
|
3273
|
-
}, timeoutMs ||
|
|
3349
|
+
}, timeoutMs || _this75.props.cmdTimeout);
|
|
3274
3350
|
|
|
3275
|
-
|
|
3351
|
+
_this75._socket.emit('getCompactRepository', host, function (data) {
|
|
3276
3352
|
if (timeout) {
|
|
3277
3353
|
clearTimeout(timeout);
|
|
3278
3354
|
timeout = null;
|
|
@@ -3289,16 +3365,10 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3289
3365
|
});
|
|
3290
3366
|
return this._promises.repoCompact;
|
|
3291
3367
|
}
|
|
3292
|
-
/**
|
|
3293
|
-
* Get the list of all hosts in compact form (only _id, common.name, common.icon, common.color, native.hardware.networkInterfaces)
|
|
3294
|
-
* @param {boolean} [update] Force update.
|
|
3295
|
-
* @returns {Promise<ioBroker.Object[]>}
|
|
3296
|
-
*/
|
|
3297
|
-
|
|
3298
3368
|
}, {
|
|
3299
3369
|
key: "getCompactHosts",
|
|
3300
3370
|
value: function getCompactHosts(update) {
|
|
3301
|
-
var
|
|
3371
|
+
var _this76 = this;
|
|
3302
3372
|
|
|
3303
3373
|
if (Connection.isWeb()) {
|
|
3304
3374
|
return Promise.reject('Allowed only in admin');
|
|
@@ -3313,7 +3383,7 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3313
3383
|
}
|
|
3314
3384
|
|
|
3315
3385
|
this._promises.hostsCompact = new Promise(function (resolve, reject) {
|
|
3316
|
-
return
|
|
3386
|
+
return _this76._socket.emit('getCompactHosts', function (err, hosts) {
|
|
3317
3387
|
return err ? reject(err) : resolve(hosts);
|
|
3318
3388
|
});
|
|
3319
3389
|
});
|
|
@@ -3363,14 +3433,14 @@ var Connection = /*#__PURE__*/function () {
|
|
|
3363
3433
|
}, {
|
|
3364
3434
|
key: "logout",
|
|
3365
3435
|
value: function logout() {
|
|
3366
|
-
var
|
|
3436
|
+
var _this77 = this;
|
|
3367
3437
|
|
|
3368
3438
|
if (!this.connected) {
|
|
3369
3439
|
return Promise.reject(NOT_CONNECTED);
|
|
3370
3440
|
}
|
|
3371
3441
|
|
|
3372
3442
|
return new Promise(function (resolve, reject) {
|
|
3373
|
-
return
|
|
3443
|
+
return _this77._socket.emit('logout', function (err) {
|
|
3374
3444
|
return err ? reject(err) : resolve(null);
|
|
3375
3445
|
});
|
|
3376
3446
|
});
|