@ledvance/base 1.1.43 → 1.1.45
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
|
@@ -43,11 +43,11 @@ export declare function useGroupConfig<T>(): [T, (dps: any, newConfig: T) => Pro
|
|
|
43
43
|
* @template GC GroupConfig
|
|
44
44
|
* @template GCPT GroupConfigPropertyType
|
|
45
45
|
* @param key
|
|
46
|
-
* @param
|
|
46
|
+
* @param dpKey
|
|
47
47
|
*/
|
|
48
48
|
export declare function useGroupConfigFeature<GC, GCPT extends {
|
|
49
49
|
[K in keyof GC]: GC[K];
|
|
50
|
-
}[keyof GC]>(key: keyof GC,
|
|
50
|
+
}[keyof GC]>(key: keyof GC, dpKey?: string): [GCPT, (value: GCPT, dpValue: any, extraDps: any) => Promise<Result<any>>];
|
|
51
51
|
export declare const useFanMaxSpeed: () => 3 | 20;
|
|
52
52
|
export declare const ldvModules: import("@reduxjs/toolkit").Reducer<NativeProps, import("@reduxjs/toolkit").AnyAction>;
|
|
53
53
|
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>;
|
|
@@ -52,7 +52,7 @@ const productList = [
|
|
|
52
52
|
]
|
|
53
53
|
|
|
54
54
|
const fanProductList = [
|
|
55
|
-
|
|
55
|
+
'urcqn70htlshvigb',
|
|
56
56
|
]
|
|
57
57
|
|
|
58
58
|
const nativePropsSlice = createSlice({
|
|
@@ -231,15 +231,15 @@ export function useGroupConfig<T>(): [T, (dps: any, newConfig: T) => Promise<Res
|
|
|
231
231
|
* @template GC GroupConfig
|
|
232
232
|
* @template GCPT GroupConfigPropertyType
|
|
233
233
|
* @param key
|
|
234
|
-
* @param
|
|
234
|
+
* @param dpKey
|
|
235
235
|
*/
|
|
236
236
|
export function useGroupConfigFeature<GC, GCPT extends { [K in keyof GC]: GC[K] }[keyof GC]>
|
|
237
|
-
(key: keyof GC,
|
|
237
|
+
(key: keyof GC, dpKey?: string): [GCPT, (value: GCPT, dpValue: any, extraDps: any) => Promise<Result<any>>] {
|
|
238
238
|
const [groupConfig, setGroupConfig] = useGroupConfig<GC>()
|
|
239
|
-
const setGroupConfigFeature = async (value: GCPT, dpValue: any) => {
|
|
239
|
+
const setGroupConfigFeature = async (value: GCPT, dpValue: any, extraDps: any = {}) => {
|
|
240
240
|
return await setGroupConfig(
|
|
241
241
|
{
|
|
242
|
-
[GlobalParams.dpSchemaMap[snakeCase(key as string)].dp]: dpValue,
|
|
242
|
+
[!!dpKey ? dpKey : GlobalParams.dpSchemaMap[snakeCase(key as string)].dp]: dpValue,
|
|
243
243
|
...extraDps,
|
|
244
244
|
},
|
|
245
245
|
{
|
|
@@ -251,10 +251,9 @@ export function useGroupConfigFeature<GC, GCPT extends { [K in keyof GC]: GC[K]
|
|
|
251
251
|
return [groupConfig[key] as GCPT, setGroupConfigFeature]
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
export const useFanMaxSpeed = () =>{
|
|
254
|
+
export const useFanMaxSpeed = () => {
|
|
255
255
|
const {productId} = useDeviceInfo()
|
|
256
|
-
|
|
257
|
-
return maxSpeed
|
|
256
|
+
return fanProductList.includes(productId) ? 20 : 3
|
|
258
257
|
}
|
|
259
258
|
|
|
260
259
|
export const ldvModules = nativePropsSlice.reducer
|