@ledvance/base 1.2.32 → 1.2.33
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
CHANGED
|
@@ -18,6 +18,7 @@ export interface NativeProps {
|
|
|
18
18
|
timeSchedule?: boolean
|
|
19
19
|
energieverbrauch?: object
|
|
20
20
|
moods: any[]
|
|
21
|
+
flags: any[]
|
|
21
22
|
is24HourClock: boolean
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -53,6 +54,7 @@ const initialState: NativeProps = {
|
|
|
53
54
|
timeSchedule: false,
|
|
54
55
|
energieverbrauch: {},
|
|
55
56
|
moods: [],
|
|
57
|
+
flags: [],
|
|
56
58
|
is24HourClock: true
|
|
57
59
|
}
|
|
58
60
|
|
|
@@ -114,6 +116,9 @@ const nativePropsSlice = createSlice({
|
|
|
114
116
|
setMoods(state, action: PayloadAction<any>) {
|
|
115
117
|
state.moods = action.payload
|
|
116
118
|
},
|
|
119
|
+
setFlags(state, action: PayloadAction<any>) {
|
|
120
|
+
state.flags = action.payload
|
|
121
|
+
},
|
|
117
122
|
setGroupDevices(state, action: PayloadAction<any>) {
|
|
118
123
|
state.uaGroupInfo.groupDevices = action.payload
|
|
119
124
|
},
|
|
@@ -230,6 +235,15 @@ const useMoods = (): [any[], (v: any[]) => void] => {
|
|
|
230
235
|
return [dps, setMoodsFn]
|
|
231
236
|
}
|
|
232
237
|
|
|
238
|
+
const useFlags = (): [any[], (v: any[]) => void] => {
|
|
239
|
+
const dps = useSelector(store => store.ldvModules.flags)
|
|
240
|
+
const dispatch = useDispatch()
|
|
241
|
+
const setFlagsFn = (value: any[]) => {
|
|
242
|
+
dispatch(setFlags(value))
|
|
243
|
+
}
|
|
244
|
+
return [dps, setFlagsFn]
|
|
245
|
+
}
|
|
246
|
+
|
|
233
247
|
const useGroupDevices = (): [GroupDeviceInfo[], (v: GroupDeviceInfo[]) => void] => {
|
|
234
248
|
const dps = useSelector(store => store.ldvModules.uaGroupInfo.groupDevices)
|
|
235
249
|
const dispatch = useDispatch()
|
|
@@ -345,6 +359,7 @@ export const {
|
|
|
345
359
|
setDps,
|
|
346
360
|
setTimeSchedule,
|
|
347
361
|
setMoods,
|
|
362
|
+
setFlags,
|
|
348
363
|
setGroupDevices,
|
|
349
364
|
setSystemTimeFormat,
|
|
350
365
|
setEnergieverbrauch,
|
|
@@ -363,6 +378,7 @@ export {
|
|
|
363
378
|
useRole,
|
|
364
379
|
useTimeSchedule,
|
|
365
380
|
useMoods,
|
|
381
|
+
useFlags,
|
|
366
382
|
useGroupDevices,
|
|
367
383
|
useSystemTimeFormate,
|
|
368
384
|
useEnergieverbrauch,
|