@ledvance/base 1.2.12 → 1.2.14
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/package.json +1 -1
- package/src/components/ApplyForDeviceList.d.ts +2 -2
- package/src/components/ApplyForDeviceList.tsx +20 -5
- package/src/components/ldvPresetView.tsx +1 -1
- package/src/hooks/Hooks.d.ts +2 -0
- package/src/hooks/Hooks.ts +9 -0
- package/src/i18n/strings.d.ts +28 -549
- package/src/i18n/strings.ts +56 -577
- package/src/models/modules/NativePropsSlice.d.ts +4 -2
- package/src/models/modules/NativePropsSlice.tsx +20 -3
|
@@ -10,6 +10,7 @@ export interface NativeProps {
|
|
|
10
10
|
timeSchedule?: boolean;
|
|
11
11
|
energieverbrauch?: object;
|
|
12
12
|
moods: any[];
|
|
13
|
+
groupDevices: any[];
|
|
13
14
|
}
|
|
14
15
|
export interface DeviceInfo {
|
|
15
16
|
devId: string;
|
|
@@ -40,6 +41,7 @@ interface DpState {
|
|
|
40
41
|
declare const useDeviceInfo: () => DevInfo<DpState>;
|
|
41
42
|
declare const useTimeSchedule: () => [v: boolean | undefined, f: any];
|
|
42
43
|
declare const useMoods: () => [any[], (v: any[]) => void];
|
|
44
|
+
declare const useGroupDevices: () => [any[], (v: any[]) => void];
|
|
43
45
|
declare const useEnergieverbrauch: () => (object | undefined)[];
|
|
44
46
|
export declare const useEngergyGeneration: () => boolean;
|
|
45
47
|
export declare function useUAGroupInfo(): UAGroupInfo;
|
|
@@ -55,5 +57,5 @@ export declare function useFeatureHook<GC, T extends PropertyValueTypes<GC>>(fea
|
|
|
55
57
|
export declare const useFanMaxSpeed: () => 3 | 20;
|
|
56
58
|
export declare const isUVCFanDevice: () => boolean;
|
|
57
59
|
export declare const ldvModules: import("@reduxjs/toolkit").Reducer<NativeProps, import("@reduxjs/toolkit").AnyAction>;
|
|
58
|
-
export declare const setNativeProps: import("@reduxjs/toolkit").ActionCreatorWithPayload<NativeProps, string>, setGroupNativeProps: import("@reduxjs/toolkit").ActionCreatorWithPayload<NativeProps, string>, setDps: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>, setTimeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>, setEnergieverbrauch: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>;
|
|
59
|
-
export { asyncSetDps, simpleSetDps, simpleSetDp, useDeviceId, useDeviceInfo, useDp, useScaledDp, useDps, useFamilyName, useRole, useTimeSchedule, useMoods, useEnergieverbrauch, };
|
|
60
|
+
export declare const setNativeProps: import("@reduxjs/toolkit").ActionCreatorWithPayload<NativeProps, string>, setGroupNativeProps: import("@reduxjs/toolkit").ActionCreatorWithPayload<NativeProps, string>, setDps: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>, setTimeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>, setMoods: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>, setGroupDevices: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>, setEnergieverbrauch: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, string>;
|
|
61
|
+
export { asyncSetDps, simpleSetDps, simpleSetDp, useDeviceId, useDeviceInfo, useDp, useScaledDp, useDps, useFamilyName, useRole, useTimeSchedule, useMoods, useGroupDevices, useEnergieverbrauch, };
|
|
@@ -17,6 +17,7 @@ export interface NativeProps {
|
|
|
17
17
|
timeSchedule?: boolean
|
|
18
18
|
energieverbrauch?: object
|
|
19
19
|
moods: any[]
|
|
20
|
+
groupDevices: any[]
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export interface DeviceInfo {
|
|
@@ -49,6 +50,7 @@ const initialState: NativeProps = {
|
|
|
49
50
|
timeSchedule: false,
|
|
50
51
|
energieverbrauch: {},
|
|
51
52
|
moods: [],
|
|
53
|
+
groupDevices: []
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
// energy generation
|
|
@@ -106,6 +108,9 @@ const nativePropsSlice = createSlice({
|
|
|
106
108
|
setMoods(state, action: PayloadAction<any>) {
|
|
107
109
|
state.moods = action.payload
|
|
108
110
|
},
|
|
111
|
+
setGroupDevices(state, action: PayloadAction<any>){
|
|
112
|
+
state.groupDevices = action.payload
|
|
113
|
+
}
|
|
109
114
|
},
|
|
110
115
|
})
|
|
111
116
|
|
|
@@ -210,10 +215,19 @@ const useTimeSchedule = (): [v: boolean | undefined, f: any] => {
|
|
|
210
215
|
const useMoods = (): [any[], (v: any[]) => void] => {
|
|
211
216
|
const dps = useSelector(store => store.ldvModules.moods)
|
|
212
217
|
const dispatch = useDispatch()
|
|
213
|
-
const
|
|
214
|
-
dispatch(
|
|
218
|
+
const setMoodsFn = (value: any[]) => {
|
|
219
|
+
dispatch(setMoods(value))
|
|
215
220
|
}
|
|
216
|
-
return [dps,
|
|
221
|
+
return [dps, setMoodsFn]
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const useGroupDevices = (): [any[], (v: any[]) => void] =>{
|
|
225
|
+
const dps = useSelector(store => store.ldvModules.groupDevices)
|
|
226
|
+
const dispatch = useDispatch()
|
|
227
|
+
const setGroupDevicesFn = (value: any[]) => {
|
|
228
|
+
dispatch(setGroupDevices(value))
|
|
229
|
+
}
|
|
230
|
+
return [dps, setGroupDevicesFn]
|
|
217
231
|
}
|
|
218
232
|
|
|
219
233
|
const useEnergieverbrauch = () => {
|
|
@@ -310,6 +324,8 @@ export const {
|
|
|
310
324
|
setGroupNativeProps,
|
|
311
325
|
setDps,
|
|
312
326
|
setTimeSchedule,
|
|
327
|
+
setMoods,
|
|
328
|
+
setGroupDevices,
|
|
313
329
|
setEnergieverbrauch,
|
|
314
330
|
} = nativePropsSlice.actions
|
|
315
331
|
|
|
@@ -326,5 +342,6 @@ export {
|
|
|
326
342
|
useRole,
|
|
327
343
|
useTimeSchedule,
|
|
328
344
|
useMoods,
|
|
345
|
+
useGroupDevices,
|
|
329
346
|
useEnergieverbrauch,
|
|
330
347
|
}
|