@iobroker/adapter-react-v5 7.0.1 → 7.1.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.
- package/Components/404.d.ts +3 -2
- package/Components/404.js +16 -15
- package/Components/ColorPicker.d.ts +22 -8
- package/Components/ColorPicker.js +34 -17
- package/Components/ComplexCron.js +24 -24
- package/Components/CopyToClipboard.d.ts +10 -1
- package/Components/CopyToClipboard.js +17 -8
- package/Components/CustomModal.d.ts +1 -1
- package/Components/CustomModal.js +8 -8
- package/Components/FileBrowser.d.ts +11 -11
- package/Components/FileBrowser.js +173 -164
- package/Components/FileViewer.js +34 -23
- package/Components/Icon.d.ts +16 -2
- package/Components/Icon.js +19 -8
- package/Components/IconPicker.js +10 -14
- package/Components/IconSelector.d.ts +1 -1
- package/Components/IconSelector.js +64 -74
- package/Components/Image.d.ts +8 -4
- package/Components/Image.js +13 -32
- package/Components/Loader.d.ts +2 -2
- package/Components/Loader.js +244 -241
- package/Components/Loaders/MV.d.ts +6 -1
- package/Components/Loaders/MV.js +23 -7
- package/Components/Loaders/PT.d.ts +7 -2
- package/Components/Loaders/PT.js +123 -110
- package/Components/Loaders/Vendor.d.ts +2 -2
- package/Components/Loaders/Vendor.js +22 -14
- package/Components/Logo.js +16 -18
- package/Components/MDUtils.d.ts +1 -1
- package/Components/MDUtils.js +8 -4
- package/Components/ObjectBrowser.d.ts +49 -38
- package/Components/ObjectBrowser.js +757 -494
- package/Components/Router.d.ts +1 -3
- package/Components/Router.js +3 -1
- package/Components/SaveCloseButtons.d.ts +3 -3
- package/Components/SaveCloseButtons.js +3 -3
- package/Components/Schedule.d.ts +15 -15
- package/Components/Schedule.js +177 -154
- package/Components/SelectWithIcon.d.ts +2 -2
- package/Components/SelectWithIcon.js +45 -34
- package/Components/SimpleCron/index.js +83 -43
- package/Components/TabContainer.js +2 -2
- package/Components/TabContent.js +1 -1
- package/Components/TabHeader.js +1 -1
- package/Components/TableResize.d.ts +2 -2
- package/Components/TableResize.js +5 -5
- package/Components/TextWithIcon.d.ts +1 -1
- package/Components/TextWithIcon.js +10 -8
- package/Components/ToggleThemeMenu.d.ts +2 -2
- package/Components/ToggleThemeMenu.js +3 -3
- package/Components/TreeTable.d.ts +18 -18
- package/Components/TreeTable.js +76 -72
- package/Components/UploadImage.d.ts +2 -2
- package/Components/UploadImage.js +330 -326
- package/Components/Utils.d.ts +42 -22
- package/Components/Utils.js +66 -65
- package/Components/withWidth.d.ts +2 -2
- package/Components/withWidth.js +10 -6
- package/Dialogs/ComplexCron.d.ts +2 -2
- package/Dialogs/ComplexCron.js +3 -3
- package/Dialogs/Confirm.d.ts +4 -4
- package/Dialogs/Confirm.js +18 -8
- package/Dialogs/Cron.d.ts +3 -3
- package/Dialogs/Cron.js +21 -17
- package/Dialogs/Error.d.ts +3 -3
- package/Dialogs/Error.js +6 -4
- package/Dialogs/Message.d.ts +3 -3
- package/Dialogs/Message.js +6 -4
- package/Dialogs/SelectFile.d.ts +4 -4
- package/Dialogs/SelectFile.js +6 -4
- package/Dialogs/SelectID.d.ts +12 -10
- package/Dialogs/SelectID.js +12 -8
- package/Dialogs/SimpleCron.d.ts +2 -2
- package/Dialogs/SimpleCron.js +2 -2
- package/Dialogs/TextInput.d.ts +2 -2
- package/Dialogs/TextInput.js +3 -3
- package/GenericApp.d.ts +19 -13
- package/GenericApp.js +177 -134
- package/LICENSE +22 -22
- package/LegacyConnection.d.ts +240 -248
- package/LegacyConnection.js +500 -525
- package/Prompt.js +7 -7
- package/README.md +1239 -1166
- package/Theme.d.ts +1 -1
- package/Theme.js +9 -12
- package/assets/devices.json +1 -0
- package/assets/lamp_ceiling.svg +8 -8
- package/assets/lamp_table.svg +7 -7
- package/assets/no_icon.svg +9 -9
- package/assets/rooms.json +1 -0
- package/craco-module-federation.js +62 -71
- package/i18n/de.json +434 -431
- package/i18n/en.json +434 -431
- package/i18n/es.json +434 -431
- package/i18n/fr.json +434 -431
- package/i18n/it.json +434 -431
- package/i18n/nl.json +434 -431
- package/i18n/pl.json +434 -431
- package/i18n/pt.json +434 -431
- package/i18n/ru.json +434 -431
- package/i18n/uk.json +434 -431
- package/i18n/zh-cn.json +434 -431
- package/i18n.d.ts +26 -19
- package/i18n.js +28 -22
- package/icons/IconAdapter.js +2 -2
- package/icons/IconAlias.js +2 -2
- package/icons/IconChannel.js +2 -2
- package/icons/IconClearFilter.js +2 -2
- package/icons/IconClosed.js +2 -2
- package/icons/IconCopy.js +2 -2
- package/icons/IconDevice.js +2 -2
- package/icons/IconDocument.js +2 -2
- package/icons/IconDocumentReadOnly.js +2 -2
- package/icons/IconExpert.js +2 -2
- package/icons/IconFx.js +2 -2
- package/icons/IconInstance.js +2 -2
- package/icons/IconLogout.js +2 -2
- package/icons/IconNoIcon.js +2 -2
- package/icons/IconOpen.d.ts +2 -2
- package/icons/IconOpen.js +2 -2
- package/icons/IconProps.d.ts +4 -3
- package/icons/IconState.d.ts +2 -2
- package/icons/IconState.js +2 -2
- package/index.css +56 -55
- package/modulefederation.admin.config.js +31 -31
- package/package.json +5 -5
- package/src/AdminConnection.tsx +3 -3
- package/src/Components/404.tsx +122 -121
- package/src/Components/ColorPicker.tsx +343 -315
- package/src/Components/ComplexCron.tsx +544 -507
- package/src/Components/CopyToClipboard.tsx +178 -165
- package/src/Components/CustomModal.tsx +170 -163
- package/src/Components/FileBrowser.tsx +2550 -2414
- package/src/Components/FileViewer.tsx +412 -393
- package/src/Components/Icon.tsx +238 -210
- package/src/Components/IconPicker.tsx +165 -149
- package/src/Components/IconSelector.tsx +2220 -2202
- package/src/Components/Image.tsx +193 -176
- package/src/Components/Loader.tsx +328 -304
- package/src/Components/Logo.tsx +176 -166
- package/src/Components/MDUtils.tsx +104 -100
- package/src/Components/ObjectBrowser.tsx +8935 -8032
- package/src/Components/Router.tsx +90 -90
- package/src/Components/SaveCloseButtons.tsx +117 -113
- package/src/Components/Schedule.tsx +1962 -1724
- package/src/Components/SelectWithIcon.tsx +239 -197
- package/src/Components/TabContainer.tsx +57 -55
- package/src/Components/TabContent.tsx +38 -37
- package/src/Components/TabHeader.tsx +20 -19
- package/src/Components/TableResize.tsx +274 -259
- package/src/Components/TextWithIcon.tsx +159 -148
- package/src/Components/ToggleThemeMenu.tsx +52 -34
- package/src/Components/TreeTable.tsx +1002 -919
- package/src/Components/UploadImage.tsx +631 -599
- package/src/Components/Utils.tsx +1802 -1794
- package/src/Components/loader.css +231 -222
- package/src/Components/withWidth.tsx +32 -21
- package/src/Connection.tsx +5 -7
- package/src/Dialogs/ComplexCron.tsx +123 -129
- package/src/Dialogs/Confirm.tsx +185 -162
- package/src/Dialogs/Cron.tsx +192 -182
- package/src/Dialogs/Error.tsx +67 -72
- package/src/Dialogs/Message.tsx +73 -71
- package/src/Dialogs/SelectFile.tsx +280 -270
- package/src/Dialogs/SelectID.tsx +310 -298
- package/src/Dialogs/SimpleCron.tsx +100 -100
- package/src/Dialogs/TextInput.tsx +99 -107
- package/src/GenericApp.tsx +1076 -976
- package/src/LegacyConnection.tsx +3719 -3589
- package/src/Prompt.tsx +22 -20
- package/src/Theme.tsx +472 -479
- package/src/icons/IconAdapter.tsx +22 -20
- package/src/icons/IconAlias.tsx +22 -20
- package/src/icons/IconChannel.tsx +60 -21
- package/src/icons/IconClearFilter.tsx +24 -22
- package/src/icons/IconClosed.tsx +22 -17
- package/src/icons/IconCopy.tsx +21 -16
- package/src/icons/IconDevice.tsx +126 -27
- package/src/icons/IconDocument.tsx +22 -17
- package/src/icons/IconDocumentReadOnly.tsx +27 -18
- package/src/icons/IconExpert.tsx +26 -18
- package/src/icons/IconFx.tsx +38 -36
- package/src/icons/IconInstance.tsx +22 -20
- package/src/icons/IconLogout.tsx +32 -30
- package/src/icons/IconNoIcon.tsx +21 -19
- package/src/icons/IconOpen.tsx +22 -17
- package/src/icons/IconProps.tsx +16 -15
- package/src/icons/IconState.tsx +38 -17
- package/src/index.css +56 -55
- package/tasks.js +91 -0
- package/types.d.ts +141 -134
- package/Components/Loaders/PT.css +0 -109
- package/Components/Loaders/Vendor.css +0 -13
- package/Components/loader.css +0 -222
- package/Components/types.d.ts +0 -82
- package/assets/devices/Alarm Systems.svg +0 -19
- package/assets/devices/Amplifier.svg +0 -22
- package/assets/devices/Awnings.svg +0 -5
- package/assets/devices/Battery Status.svg +0 -5
- package/assets/devices/Ceiling Spotlights.svg +0 -16
- package/assets/devices/Chandelier.svg +0 -7
- package/assets/devices/Climate.svg +0 -12
- package/assets/devices/Coffee Makers.svg +0 -6
- package/assets/devices/Cold Water.svg +0 -31
- package/assets/devices/Computer.svg +0 -21
- package/assets/devices/Consumption.svg +0 -8
- package/assets/devices/Curtains.svg +0 -43
- package/assets/devices/Dishwashers.svg +0 -12
- package/assets/devices/Doors.svg +0 -6
- package/assets/devices/Doorstep.svg +0 -35
- package/assets/devices/Dryer.svg +0 -14
- package/assets/devices/Fan.svg +0 -20
- package/assets/devices/Floor Lamps.svg +0 -5
- package/assets/devices/Garage Doors.svg +0 -9
- package/assets/devices/Gates.svg +0 -32
- package/assets/devices/Hairdryer.svg +0 -23
- package/assets/devices/Handle.svg +0 -6
- package/assets/devices/Hanging Lamps.svg +0 -9
- package/assets/devices/Heater.svg +0 -44
- package/assets/devices/Hoods.svg +0 -12
- package/assets/devices/Hot Water.svg +0 -10
- package/assets/devices/Humidity.svg +0 -41
- package/assets/devices/Iron.svg +0 -5
- package/assets/devices/Irrigation.svg +0 -23
- package/assets/devices/Led Strip.svg +0 -31
- package/assets/devices/Light.svg +0 -30
- package/assets/devices/Lightings.svg +0 -46
- package/assets/devices/Lock.svg +0 -19
- package/assets/devices/Louvre.svg +0 -7
- package/assets/devices/Mowing Machine.svg +0 -9
- package/assets/devices/Music.svg +0 -13
- package/assets/devices/Outdoor Blinds.svg +0 -7
- package/assets/devices/People.svg +0 -19
- package/assets/devices/Pool.svg +0 -8
- package/assets/devices/Power Consumption.svg +0 -13
- package/assets/devices/Printer.svg +0 -10
- package/assets/devices/Pump.svg +0 -10
- package/assets/devices/Receiver.svg +0 -19
- package/assets/devices/Sconces.svg +0 -10
- package/assets/devices/Security.svg +0 -34
- package/assets/devices/Shading.svg +0 -5
- package/assets/devices/Shutters.svg +0 -11
- package/assets/devices/SmokeDetector.svg +0 -13
- package/assets/devices/Sockets.svg +0 -13
- package/assets/devices/Speaker.svg +0 -35
- package/assets/devices/Stove.svg +0 -12
- package/assets/devices/Table Lamps.svg +0 -12
- package/assets/devices/Temperature Sensors.svg +0 -28
- package/assets/devices/Tv.svg +0 -8
- package/assets/devices/Vacuum Cleaner.svg +0 -16
- package/assets/devices/Ventilation.svg +0 -12
- package/assets/devices/Washing Machines.svg +0 -16
- package/assets/devices/Water Consumption.svg +0 -6
- package/assets/devices/Water Heater.svg +0 -8
- package/assets/devices/Water.svg +0 -40
- package/assets/devices/Weather.svg +0 -28
- package/assets/devices/Window.svg +0 -8
- package/assets/rooms/Anteroom.svg +0 -53
- package/assets/rooms/Attic.svg +0 -21
- package/assets/rooms/Balcony.svg +0 -13
- package/assets/rooms/Barn.svg +0 -6
- package/assets/rooms/Basement.svg +0 -5
- package/assets/rooms/Bathroom.svg +0 -38
- package/assets/rooms/Bedroom.svg +0 -5
- package/assets/rooms/Boiler Room.svg +0 -13
- package/assets/rooms/Carport.svg +0 -17
- package/assets/rooms/Cellar.svg +0 -89
- package/assets/rooms/Chamber.svg +0 -9
- package/assets/rooms/Corridor.svg +0 -53
- package/assets/rooms/Dining Area.svg +0 -37
- package/assets/rooms/Dining Room.svg +0 -37
- package/assets/rooms/Dining.svg +0 -37
- package/assets/rooms/Dressing Room.svg +0 -5
- package/assets/rooms/Driveway.svg +0 -15
- package/assets/rooms/Entrance.svg +0 -44
- package/assets/rooms/Equipment Room.svg +0 -15
- package/assets/rooms/Front Yard.svg +0 -64
- package/assets/rooms/Gallery.svg +0 -14
- package/assets/rooms/Garage.svg +0 -20
- package/assets/rooms/Garden.svg +0 -13
- package/assets/rooms/Ground Floor.svg +0 -95
- package/assets/rooms/Guest Bathroom.svg +0 -33
- package/assets/rooms/Guest Room.svg +0 -5
- package/assets/rooms/Gym.svg +0 -5
- package/assets/rooms/Hall.svg +0 -19
- package/assets/rooms/Home Theater.svg +0 -8
- package/assets/rooms/Kitchen.svg +0 -18
- package/assets/rooms/Laundry Room.svg +0 -12
- package/assets/rooms/Living Area.svg +0 -11
- package/assets/rooms/Living Room.svg +0 -10
- package/assets/rooms/Locker Room.svg +0 -17
- package/assets/rooms/Nursery.svg +0 -5
- package/assets/rooms/Office.svg +0 -8
- package/assets/rooms/Outdoors.svg +0 -7
- package/assets/rooms/Playroom.svg +0 -6
- package/assets/rooms/Pool.svg +0 -8
- package/assets/rooms/Rear Wall.svg +0 -30
- package/assets/rooms/Second Floor.svg +0 -95
- package/assets/rooms/Shed.svg +0 -16
- package/assets/rooms/Sleeping Area.svg +0 -22
- package/assets/rooms/Stairway.svg +0 -5
- package/assets/rooms/Stairwell.svg +0 -15
- package/assets/rooms/Storeroom.svg +0 -5
- package/assets/rooms/Summer House.svg +0 -27
- package/assets/rooms/Swimming Pool.svg +0 -21
- package/assets/rooms/Terrace.svg +0 -7
- package/assets/rooms/Toilet.svg +0 -10
- package/assets/rooms/Upstairs.svg +0 -6
- package/assets/rooms/Wardrobe.svg +0 -60
- package/assets/rooms/Washroom.svg +0 -20
- package/assets/rooms/Wc.svg +0 -10
- package/assets/rooms/Windscreen.svg +0 -60
- package/assets/rooms/Workshop.svg +0 -23
- package/assets/rooms/Workspace.svg +0 -8
package/src/icons/IconFx.tsx
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type IconProps from './IconProps';
|
|
3
|
-
|
|
4
|
-
const IconFx = (props: IconProps) =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
c-1.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
c2.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type IconProps from './IconProps';
|
|
3
|
+
|
|
4
|
+
const IconFx = (props: IconProps): React.JSX.Element => (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
onClick={e => props.onClick && props.onClick(e)}
|
|
8
|
+
viewBox="0 0 95 95"
|
|
9
|
+
width={props.width || (props.fontSize === 'small' ? 16 : 20)}
|
|
10
|
+
height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}
|
|
11
|
+
className={props.className}
|
|
12
|
+
style={props.style}
|
|
13
|
+
>
|
|
14
|
+
<path
|
|
15
|
+
fill="currentColor"
|
|
16
|
+
d="M93.779,63.676c-0.981-1.082-2.24-1.653-3.639-1.653c-1.145,0-3.953,0.396-5.318,4.062
|
|
17
|
+
c-0.344,0.922-0.443,1.413-0.907,1.363c-0.786-0.078-3.845-3.346-4.845-8.145l-2.482-11.6c1.961-3.177,3.977-5.629,5.988-7.292
|
|
18
|
+
c1.08-0.882,2.314-1.349,3.808-1.43c3.815-0.26,5.203-0.74,6.14-1.399c1.547-1.115,2.397-2.728,2.397-4.542
|
|
19
|
+
c0-1.596-0.604-3.019-1.75-4.115c-1.106-1.059-2.581-1.618-4.26-1.618c-2.468,0-5.239,1.142-8.474,3.49
|
|
20
|
+
c-1.91,1.388-3.935,3.406-6.121,6.111c-0.711-2.653-1.319-3.889-1.771-4.628c-1.396-2.303-3.664-2.303-4.41-2.303l-0.813,0.013
|
|
21
|
+
l-23.045,0.544l1.297-5.506c0.828-3.593,1.915-6.436,3.226-8.45c0.638-0.98,1.614-2.148,2.638-2.148
|
|
22
|
+
c0.387,0,1.152,0.063,2.582,0.36c3.978,0.86,5.465,0.959,6.239,0.959c1.708,0,3.21-0.571,4.347-1.651
|
|
23
|
+
c1.176-1.119,1.797-2.583,1.797-4.233c0-1.29-0.424-3.156-2.445-4.722c-1.396-1.081-3.311-1.629-5.691-1.629
|
|
24
|
+
c-3.568,0-7.349,1.141-11.241,3.39c-3.862,2.232-7.038,5.317-9.438,9.171c-2.105,3.379-3.929,8.124-5.555,14.459H21.877
|
|
25
|
+
l-2.238,8.831h10.186l-7.74,31.116c-1.603,6.443-2.777,8.028-3.098,8.361c-0.875,0.904-2.68,1.094-4.04,1.094
|
|
26
|
+
c-1.683,0-3.477-0.121-5.349-0.361c-1.286-0.157-2.265-0.234-2.991-0.234c-1.878,0-3.423,0.488-4.59,1.448
|
|
27
|
+
C0.716,81.858,0,83.403,0,85.14c0,1.357,0.44,3.309,2.539,4.895c1.434,1.08,3.389,1.628,5.813,1.628
|
|
28
|
+
c6.069,0,11.725-2.411,16.813-7.165c4.947-4.624,8.571-11.413,10.773-20.195l6.119-24.935l20.87,0.354l2.244,9.64l-4.573,6.748
|
|
29
|
+
c-0.824,1.209-2.051,2.701-3.658,4.441c-0.84,0.92-1.398,1.426-1.721,1.689c-1.316-1.608-2.809-2.424-4.432-2.424
|
|
30
|
+
c-1.525,0-2.91,0.625-4.002,1.804c-1.036,1.116-1.583,2.514-1.583,4.038c0,1.83,0.783,3.459,2.264,4.709
|
|
31
|
+
c1.357,1.146,3.034,1.728,4.981,1.728c2.414,0,4.884-0.921,7.344-2.737c2.053-1.519,4.697-4.526,8.074-9.189
|
|
32
|
+
c2.17,6.24,5.248,10.252,6.714,11.927c2.313,2.644,6.049,4.22,9.993,4.22c3.348,0,5.244-1.402,6.916-2.641l0.148-0.109
|
|
33
|
+
c2.926-2.164,3.54-4.545,3.54-6.166C95.174,65.965,94.691,64.679,93.779,63.676z"
|
|
34
|
+
/>
|
|
35
|
+
</svg>
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export default IconFx;
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type IconProps from './IconProps';
|
|
3
|
-
|
|
4
|
-
// Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/
|
|
5
|
-
const IconInstance = (props: IconProps) =>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type IconProps from './IconProps';
|
|
3
|
+
|
|
4
|
+
// Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/
|
|
5
|
+
const IconInstance = (props: IconProps): React.JSX.Element => (
|
|
6
|
+
<svg
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
onClick={e => props.onClick && props.onClick(e)}
|
|
9
|
+
viewBox="0 0 512 512"
|
|
10
|
+
width={props.width || (props.fontSize === 'small' ? 16 : 20)}
|
|
11
|
+
height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}
|
|
12
|
+
className={props.className}
|
|
13
|
+
style={props.style}
|
|
14
|
+
>
|
|
15
|
+
<path
|
|
16
|
+
fill="currentColor"
|
|
17
|
+
d="M448 0L320 96v62.06l-83.03 83.03c6.79 4.25 13.27 9.06 19.07 14.87 5.8 5.8 10.62 12.28 14.87 19.07L353.94 192H416l96-128-64-64zM128 278.59L10.92 395.67c-14.55 14.55-14.55 38.15 0 52.71l52.7 52.7c14.56 14.56 38.15 14.56 52.71 0L233.41 384c29.11-29.11 29.11-76.3 0-105.41s-76.3-29.11-105.41 0z"
|
|
18
|
+
/>
|
|
19
|
+
</svg>
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export default IconInstance;
|
package/src/icons/IconLogout.tsx
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type IconProps from './IconProps';
|
|
3
|
-
|
|
4
|
-
const IconLogout = (props: IconProps) =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type IconProps from './IconProps';
|
|
3
|
+
|
|
4
|
+
const IconLogout = (props: IconProps): React.JSX.Element => (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
onClick={e => props.onClick && props.onClick(e)}
|
|
8
|
+
viewBox="0 0 512 512"
|
|
9
|
+
width={props.width || (props.fontSize === 'small' ? 16 : 20)}
|
|
10
|
+
height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}
|
|
11
|
+
className={props.className}
|
|
12
|
+
style={props.style}
|
|
13
|
+
>
|
|
14
|
+
<path
|
|
15
|
+
fill="currentColor"
|
|
16
|
+
d="M510.371,226.513c-1.088-2.603-2.645-4.971-4.629-6.955l-63.979-63.979c-8.341-8.32-21.824-8.32-30.165,0 c-8.341,8.341-8.341,21.845,0,30.165l27.584,27.584H320.013c-11.797,0-21.333,9.557-21.333,21.333s9.536,21.333,21.333,21.333 h119.168l-27.584,27.584c-8.341,8.341-8.341,21.845,0,30.165c4.16,4.181,9.621,6.251,15.083,6.251s10.923-2.069,15.083-6.251 l63.979-63.979c1.984-1.963,3.541-4.331,4.629-6.955C512.525,237.606,512.525,231.718,510.371,226.513z"
|
|
17
|
+
/>
|
|
18
|
+
<path
|
|
19
|
+
fill="currentColor"
|
|
20
|
+
d="M362.68,298.667c-11.797,0-21.333,9.557-21.333,21.333v106.667h-85.333V85.333c0-9.408-6.187-17.728-15.211-20.437
|
|
21
|
+
l-74.091-22.229h174.635v106.667c0,11.776,9.536,21.333,21.333,21.333s21.333-9.557,21.333-21.333v-128
|
|
22
|
+
C384.013,9.557,374.477,0,362.68,0H21.347c-0.768,0-1.451,0.32-2.197,0.405c-1.003,0.107-1.92,0.277-2.88,0.512
|
|
23
|
+
c-2.24,0.576-4.267,1.451-6.165,2.645c-0.469,0.299-1.045,0.32-1.493,0.661C8.44,4.352,8.376,4.587,8.205,4.715
|
|
24
|
+
C5.88,6.549,3.939,8.789,2.531,11.456c-0.299,0.576-0.363,1.195-0.597,1.792c-0.683,1.621-1.429,3.2-1.685,4.992
|
|
25
|
+
c-0.107,0.64,0.085,1.237,0.064,1.856c-0.021,0.427-0.299,0.811-0.299,1.237V448c0,10.176,7.189,18.923,17.152,20.907
|
|
26
|
+
l213.333,42.667c1.387,0.299,2.795,0.427,4.181,0.427c4.885,0,9.685-1.685,13.525-4.843c4.928-4.053,7.808-10.091,7.808-16.491
|
|
27
|
+
v-21.333H362.68c11.797,0,21.333-9.557,21.333-21.333V320C384.013,308.224,374.477,298.667,362.68,298.667z"
|
|
28
|
+
/>
|
|
29
|
+
</svg>
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export default IconLogout;
|
package/src/icons/IconNoIcon.tsx
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type IconProps from './IconProps';
|
|
3
|
-
|
|
4
|
-
const IconNoIcon = (props: IconProps) =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type IconProps from './IconProps';
|
|
3
|
+
|
|
4
|
+
const IconNoIcon = (props: IconProps): React.JSX.Element => (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
onClick={e => props.onClick && props.onClick(e)}
|
|
8
|
+
viewBox="0 0 512 512"
|
|
9
|
+
width={props.width || (props.fontSize === 'small' ? 16 : 20)}
|
|
10
|
+
height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}
|
|
11
|
+
className={props.className}
|
|
12
|
+
style={props.style}
|
|
13
|
+
>
|
|
14
|
+
<path
|
|
15
|
+
fill="#EE3333"
|
|
16
|
+
d="M256,0C114.844,0,0,114.844,0,256s114.844,256,256,256s256-114.844,256-256S397.156,0,256,0z M256,448 c-105.865,0-192-86.135-192-192c0-40.406,12.25-78.604,35.542-111.198l267.656,267.656C334.604,435.75,296.406,448,256,448z M412.458,367.198L144.802,99.542C177.396,76.25,215.594,64,256,64c105.865,0,192,86.135,192,192 C448,296.406,435.75,334.604,412.458,367.198z"
|
|
17
|
+
/>
|
|
18
|
+
</svg>
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
export default IconNoIcon;
|
package/src/icons/IconOpen.tsx
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type IconProps from './IconProps';
|
|
3
|
-
|
|
4
|
-
// Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/
|
|
5
|
-
const IconOpen = (props: IconProps) =>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import React, { type JSX } from 'react';
|
|
2
|
+
import type IconProps from './IconProps';
|
|
3
|
+
|
|
4
|
+
// Icon copied from https://github.com/FortAwesome/Font-Awesome/blob/0d1f27efb836eb2ab994ba37221849ed64a73e5c/svgs/regular/
|
|
5
|
+
const IconOpen = (props: IconProps): JSX.Element => (
|
|
6
|
+
<svg
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
onClick={e => props.onClick && props.onClick(e)}
|
|
9
|
+
viewBox="0 0 650 512"
|
|
10
|
+
width={props.width || (props.fontSize === 'small' ? 16 : 20)}
|
|
11
|
+
height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}
|
|
12
|
+
className={props.className}
|
|
13
|
+
style={props.style}
|
|
14
|
+
>
|
|
15
|
+
<path
|
|
16
|
+
fill="currentColor"
|
|
17
|
+
d="M572.694 292.093L500.27 416.248A63.997 63.997 0 0 1 444.989 448H45.025c-18.523 0-30.064-20.093-20.731-36.093l72.424-124.155A64 64 0 0 1 152 256h399.964c18.523 0 30.064 20.093 20.73 36.093zM152 224h328v-48c0-26.51-21.49-48-48-48H272l-64-64H48C21.49 64 0 85.49 0 112v278.046l69.077-118.418C86.214 242.25 117.989 224 152 224z"
|
|
18
|
+
/>
|
|
19
|
+
</svg>
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export default IconOpen;
|
package/src/icons/IconProps.tsx
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export default interface IconProps {
|
|
4
|
-
/** The width in pixels or percentage of the icon. */
|
|
5
|
-
width?: number | string;
|
|
6
|
-
/** The height in pixels or percentage of the icon. */
|
|
7
|
-
height?: number | string;
|
|
8
|
-
/** Click handler. */
|
|
9
|
-
onClick?: (e:
|
|
10
|
-
/** The class name for the SVG element. */
|
|
11
|
-
className?: string;
|
|
12
|
-
/** Styles for the SVG element. */
|
|
13
|
-
style?:
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import type { CSSProperties, MouseEvent } from 'react';
|
|
2
|
+
|
|
3
|
+
export default interface IconProps {
|
|
4
|
+
/** The width in pixels or percentage of the icon. */
|
|
5
|
+
width?: number | string;
|
|
6
|
+
/** The height in pixels or percentage of the icon. */
|
|
7
|
+
height?: number | string;
|
|
8
|
+
/** Click handler. */
|
|
9
|
+
onClick?: (e: MouseEvent) => void;
|
|
10
|
+
/** The class name for the SVG element. */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Styles for the SVG element. */
|
|
13
|
+
style?: CSSProperties;
|
|
14
|
+
/** The font size of the icon. */
|
|
15
|
+
fontSize?: 'small';
|
|
16
|
+
}
|
package/src/icons/IconState.tsx
CHANGED
|
@@ -1,17 +1,38 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type IconProps from './IconProps';
|
|
3
|
-
|
|
4
|
-
const IconState = (props: IconProps) =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import React, { type JSX } from 'react';
|
|
2
|
+
import type IconProps from './IconProps';
|
|
3
|
+
|
|
4
|
+
const IconState = (props: IconProps): JSX.Element => (
|
|
5
|
+
<svg
|
|
6
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
+
onClick={e => props.onClick && props.onClick(e)}
|
|
8
|
+
viewBox="0 0 320 320"
|
|
9
|
+
width={props.width || (props.fontSize === 'small' ? 16 : 20)}
|
|
10
|
+
height={props.height || props.width || (props.fontSize === 'small' ? 16 : 20)}
|
|
11
|
+
className={props.className}
|
|
12
|
+
style={props.style}
|
|
13
|
+
>
|
|
14
|
+
<rect
|
|
15
|
+
fill="none"
|
|
16
|
+
rx="32"
|
|
17
|
+
height="272"
|
|
18
|
+
width="267"
|
|
19
|
+
y="25"
|
|
20
|
+
x="25"
|
|
21
|
+
strokeWidth="15"
|
|
22
|
+
stroke="currentColor"
|
|
23
|
+
/>
|
|
24
|
+
<ellipse
|
|
25
|
+
fill="none"
|
|
26
|
+
ry="54"
|
|
27
|
+
rx="54"
|
|
28
|
+
cy="160"
|
|
29
|
+
cx="160"
|
|
30
|
+
fillOpacity="null"
|
|
31
|
+
strokeOpacity="null"
|
|
32
|
+
strokeWidth="15"
|
|
33
|
+
stroke="currentColor"
|
|
34
|
+
/>
|
|
35
|
+
</svg>
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export default IconState;
|
package/src/index.css
CHANGED
|
@@ -1,55 +1,56 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
3
|
-
*
|
|
4
|
-
* MIT License
|
|
5
|
-
*
|
|
6
|
-
**/
|
|
7
|
-
|
|
8
|
-
html {
|
|
9
|
-
height: 100%;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
body {
|
|
13
|
-
margin: 0;
|
|
14
|
-
padding: 0;
|
|
15
|
-
font-family: -apple-system, BlinkMacSystemFont,
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2018-2023 Denis Haev (bluefox) <dogafox@gmail.com>
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
**/
|
|
7
|
+
|
|
8
|
+
html {
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
body {
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0;
|
|
15
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans',
|
|
16
|
+
'Droid Sans', 'Helvetica Neue', sans-serif;
|
|
17
|
+
-webkit-font-smoothing: antialiased;
|
|
18
|
+
-moz-osx-font-smoothing: grayscale;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* scrollbar */
|
|
25
|
+
::-webkit-scrollbar-track {
|
|
26
|
+
background-color: #ccc;
|
|
27
|
+
border-radius: 5px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
::-webkit-scrollbar {
|
|
31
|
+
width: 5px;
|
|
32
|
+
height: 5px;
|
|
33
|
+
background-color: #ccc;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
::-webkit-scrollbar-thumb {
|
|
37
|
+
background-color: #575757;
|
|
38
|
+
border-radius: 5px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
#root {
|
|
42
|
+
height: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.App {
|
|
46
|
+
height: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@keyframes glow {
|
|
50
|
+
from {
|
|
51
|
+
background-color: initial;
|
|
52
|
+
}
|
|
53
|
+
to {
|
|
54
|
+
background-color: #58c458;
|
|
55
|
+
}
|
|
56
|
+
}
|
package/tasks.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2024 bluefox <dogafox@gmail.com>
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
**/
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
const fs = require('node:fs');
|
|
10
|
+
const { deleteFoldersRecursive, npmInstall, buildReact, copyFiles } = require('@iobroker/build-tools');
|
|
11
|
+
|
|
12
|
+
const SRC = 'src';
|
|
13
|
+
|
|
14
|
+
function copyAllFiles() {
|
|
15
|
+
deleteFoldersRecursive('admin', ['.png', '.json', 'i18n']);
|
|
16
|
+
|
|
17
|
+
copyFiles(
|
|
18
|
+
[
|
|
19
|
+
`${SRC}/build/*`,
|
|
20
|
+
`!${SRC}/build/index.html`,
|
|
21
|
+
`!${SRC}/build/static/js/main.*.chunk.js`,
|
|
22
|
+
`!${SRC}/build/static/media/*.svg`,
|
|
23
|
+
`!${SRC}/build/static/media/*.txt`,
|
|
24
|
+
`!${SRC}/build/i18n/*`,
|
|
25
|
+
`!${SRC}/build/i18n`,
|
|
26
|
+
],
|
|
27
|
+
'admin',
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
copyFiles(`${SRC}/build/index.html`, 'admin');
|
|
31
|
+
|
|
32
|
+
copyFiles(`${SRC}/build/static/js/main.*.chunk.js`, 'admin/static/js');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function clean() {
|
|
36
|
+
deleteFoldersRecursive('admin', ['.png', '.json', 'i18n']);
|
|
37
|
+
deleteFoldersRecursive(`${SRC}/build`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function installNpmLocal() {
|
|
41
|
+
if (fs.existsSync(`${SRC}/node_modules`)) {
|
|
42
|
+
return Promise.resolve();
|
|
43
|
+
}
|
|
44
|
+
return npmInstall(`${__dirname.replace(/\\/g, '/')}/${SRC}/`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function patchFiles() {
|
|
48
|
+
if (fs.existsSync(`${__dirname}/admin/index.html`)) {
|
|
49
|
+
let code = fs.readFileSync(`${__dirname}/admin/index.html`).toString('utf8');
|
|
50
|
+
code = code.replace(
|
|
51
|
+
/<script>var script=document\.createElement\("script"\).+?<\/script>/,
|
|
52
|
+
`<script type="text/javascript" src="./../../lib/js/socket.io.js"></script>`,
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
fs.writeFileSync(`${__dirname}/admin/index.html`, code);
|
|
56
|
+
}
|
|
57
|
+
if (fs.existsSync(`${__dirname}/${SRC}/build/index.html`)) {
|
|
58
|
+
let code = fs.readFileSync(`${__dirname}/${SRC}/build/index.html`).toString('utf8');
|
|
59
|
+
code = code.replace(
|
|
60
|
+
/<script>var script=document\.createElement\("script"\).+?<\/script>/,
|
|
61
|
+
`<script type="text/javascript" src="./../../lib/js/socket.io.js"></script>`,
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
fs.writeFileSync(`${SRC}/build/index.html`, code);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (process.argv.find(arg => arg === '--0-clean')) {
|
|
69
|
+
clean();
|
|
70
|
+
} else if (process.argv.find(arg => arg === '--1-npm')) {
|
|
71
|
+
npmInstall(`${__dirname.replace(/\\/g, '/')}/${SRC}/`).catch(e => {
|
|
72
|
+
console.error(`Cannot install: ${e}`);
|
|
73
|
+
process.exit(1);
|
|
74
|
+
});
|
|
75
|
+
} else if (process.argv.find(arg => arg === '--2-build')) {
|
|
76
|
+
buildReact(SRC, { rootDir: __dirname }).catch(e => {
|
|
77
|
+
console.error(`Cannot build: ${e}`);
|
|
78
|
+
process.exit(1);
|
|
79
|
+
});
|
|
80
|
+
} else if (process.argv.find(arg => arg === '--3-copy')) {
|
|
81
|
+
copyAllFiles();
|
|
82
|
+
} else if (process.argv.find(arg => arg === '--4-patch')) {
|
|
83
|
+
patchFiles();
|
|
84
|
+
} else {
|
|
85
|
+
clean();
|
|
86
|
+
|
|
87
|
+
installNpmLocal()
|
|
88
|
+
.then(() => buildReact(SRC, { rootDir: __dirname }))
|
|
89
|
+
.then(() => copyAllFiles())
|
|
90
|
+
.then(() => patchFiles());
|
|
91
|
+
}
|