@ledvance/base 1.2.65 → 1.2.66

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.
@@ -1,4 +1,4 @@
1
- {
2
- "writeKey": "",
3
- "readKey": "a7349213573288779040-d092b120e7d6d90c7e9528ddf2aa600659f60631bd4a5c2d55de0aa2b081af1b"
1
+ {
2
+ "writeKey": "",
3
+ "readKey": "a7349213573288779040-d092b120e7d6d90c7e9528ddf2aa600659f60631bd4a5c2d55de0aa2b081af1b"
4
4
  }
package/package.json CHANGED
@@ -4,9 +4,8 @@
4
4
  "name": "@ledvance/base",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.2.65",
7
+ "version": "1.2.66",
8
8
  "scripts": {
9
- "prepublishOnly": "python update-localazy.py"
10
9
  },
11
10
  "dependencies": {
12
11
  "@reduxjs/toolkit": "^1.8.6",
@@ -329,7 +329,7 @@ export function putGroupTYDps(tyGroupId: number, dps: Record<string, any>) {
329
329
  return NativeApi.putGroupTYDps(tyGroupId, JSON.stringify(dps))
330
330
  }
331
331
 
332
- export function useGroupEzvizConfig<T>(featureKey: string): [T, (newConfig: T) => Promise<Result<any>>] {
332
+ export function useGroupEzvizConfig<GC, T extends PropertyValueTypes<GC>>(featureKey: keyof GC, defConfig?: T): [T, (newConfig: T) => Promise<Result<any>>] {
333
333
  const tyGroupId = useUAGroupInfo().tyGroupId
334
334
  const config = useUAGroupInfo().config || {}
335
335
  const dispatch = useDispatch()
@@ -345,7 +345,7 @@ export function useGroupEzvizConfig<T>(featureKey: string): [T, (newConfig: T) =
345
345
  }
346
346
  return res
347
347
  }, [])
348
- return [config[featureKey], setConfig]
348
+ return [config[featureKey] ?? defConfig, setConfig]
349
349
  }
350
350
 
351
351
  export function useGroupConfig<T>(): [T, (dps: any, newConfig: T) => Promise<Result<any>>] {