@ledvance/base 1.1.99 → 1.2.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.
@@ -49,7 +49,7 @@ export declare function useGroupConfig<T>(): [T, (dps: any, newConfig: T) => Pro
49
49
  */
50
50
  export declare function useGroupConfigFeature<GC, GCPT extends {
51
51
  [K in keyof GC]: GC[K];
52
- }[keyof GC]>(key: keyof GC, dpKey?: string): [GCPT, (value: GCPT, dpValue: any, extraDps?: any, extraConfig?: any) => Promise<Result<any>>];
52
+ }[keyof GC]>(key: keyof GC, dpKey?: string): [GCPT | undefined, (value: GCPT, dpValue: any, extraDps?: any, extraConfig?: any) => Promise<Result<any>>];
53
53
  export declare const useFanMaxSpeed: () => 3 | 20;
54
54
  export declare const isUVCFanDevice: () => boolean;
55
55
  export declare const ldvModules: import("@reduxjs/toolkit").Reducer<NativeProps, import("@reduxjs/toolkit").AnyAction>;
@@ -221,7 +221,7 @@ export function useUAGroupInfo(): UAGroupInfo {
221
221
 
222
222
  export function useGroupConfig<T>(): [T, (dps: any, newConfig: T) => Promise<Result<any>>] {
223
223
  const tyGroupId = useUAGroupInfo().tyGroupId
224
- const config = useUAGroupInfo().config as T
224
+ const config = useUAGroupInfo().config || {}
225
225
  const dispatch = useDispatch()
226
226
  const { setGroupConfig } = nativePropsSlice.actions
227
227
  const setConfig = useCallback(async (dps: any, newConfig: T) => {
@@ -243,7 +243,7 @@ export function useGroupConfig<T>(): [T, (dps: any, newConfig: T) => Promise<Res
243
243
  * @param dpKey
244
244
  */
245
245
  export function useGroupConfigFeature<GC, GCPT extends { [K in keyof GC]: GC[K] }[keyof GC]>
246
- (key: keyof GC, dpKey?: string): [GCPT, (value: GCPT, dpValue: any, extraDps?: any, extraConfig?: any) => Promise<Result<any>>] {
246
+ (key: keyof GC, dpKey?: string): [GCPT | undefined, (value: GCPT, dpValue: any, extraDps?: any, extraConfig?: any) => Promise<Result<any>>] {
247
247
  const [groupConfig, setGroupConfig] = useGroupConfig<GC>()
248
248
  const setGroupConfigFeature = async (value: GCPT, dpValue: any, extraDps?: any, extraConfig?: any) => {
249
249
  return await setGroupConfig(
@@ -258,7 +258,7 @@ export function useGroupConfigFeature<GC, GCPT extends { [K in keyof GC]: GC[K]
258
258
  },
259
259
  )
260
260
  }
261
- return [groupConfig[key] as GCPT, setGroupConfigFeature]
261
+ return [groupConfig[key] as (GCPT | undefined), setGroupConfigFeature]
262
262
  }
263
263
 
264
264
  export const useFanMaxSpeed = () => {
Binary file
Binary file
Binary file
@@ -65,5 +65,6 @@ declare const _default: {
65
65
  ic_minus: any;
66
66
  ic_plus: any;
67
67
  ic_disabled_light: any;
68
+ ic_top_arrow: any;
68
69
  };
69
70
  export default _default;
package/src/res/index.ts CHANGED
@@ -64,5 +64,6 @@ export default {
64
64
  ic_text_field_input_error: require('./ic_text_field_input_error.png'),
65
65
  ic_minus: require('./ic_minus.png'),
66
66
  ic_plus: require('./ic_plus.png'),
67
- ic_disabled_light: require('./ic_disabled_light.png')
67
+ ic_disabled_light: require('./ic_disabled_light.png'),
68
+ ic_top_arrow: require('./ic_top_arrow.png'),
68
69
  }
@@ -1,4 +1,4 @@
1
- export declare const loopText: (loop: any) => string;
1
+ export declare const loopText: (loop: any, time?: string) => string;
2
2
  export declare const loopTommorrowText: (loop: any, isTommorrow: any) => string;
3
3
  export declare const toFixed: (str: any, count: any) => string;
4
4
  export declare function getArray(arr: any, size: any): string[];