@ledvance/base 1.1.43 → 1.1.44

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
@@ -4,7 +4,7 @@
4
4
  "name": "@ledvance/base",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.1.43",
7
+ "version": "1.1.44",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@reduxjs/toolkit": "^1.8.6",
@@ -43,11 +43,12 @@ 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 dpKey
46
47
  * @param extraDps
47
48
  */
48
49
  export declare function useGroupConfigFeature<GC, GCPT extends {
49
50
  [K in keyof GC]: GC[K];
50
- }[keyof GC]>(key: keyof GC, extraDps?: any): [GCPT, (value: GCPT, dpValue: any) => Promise<Result<any>>];
51
+ }[keyof GC]>(key: keyof GC, dpKey?: string, extraDps?: any): [GCPT, (value: GCPT, dpValue: any) => Promise<Result<any>>];
51
52
  export declare const useFanMaxSpeed: () => 3 | 20;
52
53
  export declare const ldvModules: import("@reduxjs/toolkit").Reducer<NativeProps, import("@reduxjs/toolkit").AnyAction>;
53
54
  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
- "urcqn70htlshvigb"
55
+ 'urcqn70htlshvigb',
56
56
  ]
57
57
 
58
58
  const nativePropsSlice = createSlice({
@@ -231,15 +231,16 @@ 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 dpKey
234
235
  * @param extraDps
235
236
  */
236
237
  export function useGroupConfigFeature<GC, GCPT extends { [K in keyof GC]: GC[K] }[keyof GC]>
237
- (key: keyof GC, extraDps: any = {}): [GCPT, (value: GCPT, dpValue: any) => Promise<Result<any>>] {
238
+ (key: keyof GC, dpKey?: string, extraDps: any = {}): [GCPT, (value: GCPT, dpValue: any) => Promise<Result<any>>] {
238
239
  const [groupConfig, setGroupConfig] = useGroupConfig<GC>()
239
240
  const setGroupConfigFeature = async (value: GCPT, dpValue: any) => {
240
241
  return await setGroupConfig(
241
242
  {
242
- [GlobalParams.dpSchemaMap[snakeCase(key as string)].dp]: dpValue,
243
+ [!!dpKey ? dpKey : GlobalParams.dpSchemaMap[snakeCase(key as string)].dp]: dpValue,
243
244
  ...extraDps,
244
245
  },
245
246
  {
@@ -251,10 +252,9 @@ export function useGroupConfigFeature<GC, GCPT extends { [K in keyof GC]: GC[K]
251
252
  return [groupConfig[key] as GCPT, setGroupConfigFeature]
252
253
  }
253
254
 
254
- export const useFanMaxSpeed = () =>{
255
+ export const useFanMaxSpeed = () => {
255
256
  const {productId} = useDeviceInfo()
256
- const maxSpeed = fanProductList.includes(productId) ? 20 : 3
257
- return maxSpeed
257
+ return fanProductList.includes(productId) ? 20 : 3
258
258
  }
259
259
 
260
260
  export const ldvModules = nativePropsSlice.reducer