@ledvance/base 1.1.12 → 1.1.13
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
|
@@ -16,7 +16,7 @@ let groupFeatureListener: EmitterSubscription|null
|
|
|
16
16
|
|
|
17
17
|
interface GroupFeatureEvent {
|
|
18
18
|
tyGroupId: number
|
|
19
|
-
config:
|
|
19
|
+
config: string
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
interface DeviceEvent {
|
|
@@ -57,7 +57,7 @@ export const addListener = (store) => {
|
|
|
57
57
|
uaGroupInfo: {
|
|
58
58
|
tyGroupId: event.tyGroupId,
|
|
59
59
|
pId: '',
|
|
60
|
-
config: event.config,
|
|
60
|
+
config: JSON.parse(event.config),
|
|
61
61
|
dps: {}
|
|
62
62
|
},
|
|
63
63
|
}
|
package/src/composeLayout.tsx
CHANGED
|
@@ -153,7 +153,7 @@ const composeLayout = (component: React.ComponentType) => {
|
|
|
153
153
|
tyGroupId: uaGroupInfo.tyGroupId,
|
|
154
154
|
dps: {...dps, ...JSON.parse(uaGroupInfo.dps)},
|
|
155
155
|
pId: uaGroupInfo.pId,
|
|
156
|
-
config: uaGroupInfo.config || {},
|
|
156
|
+
config: JSON.parse(uaGroupInfo.config || '{}'),
|
|
157
157
|
},
|
|
158
158
|
familyName: uaGroupInfo.familyName,
|
|
159
159
|
}
|
|
@@ -43,7 +43,7 @@ export declare function useGroupConfig<T>(): [T, (dps: any, newConfig: T) => Pro
|
|
|
43
43
|
*/
|
|
44
44
|
export declare function useGroupConfigFeature<GC, GCPT extends {
|
|
45
45
|
[K in keyof GC]: GC[K];
|
|
46
|
-
}[keyof GC]>(key: keyof GC, extraDps?: any): [GCPT, (value: GCPT) => Promise<Result<any>>];
|
|
46
|
+
}[keyof GC]>(key: keyof GC, extraDps?: any): [GCPT, (value: GCPT, dpValue: any) => Promise<Result<any>>];
|
|
47
47
|
export declare const ldvModules: import("@reduxjs/toolkit").Reducer<NativeProps, import("@reduxjs/toolkit").AnyAction>;
|
|
48
48
|
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>;
|
|
49
49
|
export { simpleSetDps, simpleSetDp, useDeviceId, useDeviceInfo, useDp, useDps, useFamilyName, useTimeSchedule, useEnergieverbrauch, };
|
|
@@ -222,12 +222,12 @@ export function useGroupConfig<T>(): [T, (dps: any, newConfig: T) => Promise<Res
|
|
|
222
222
|
* @param extraDps
|
|
223
223
|
*/
|
|
224
224
|
export function useGroupConfigFeature<GC, GCPT extends { [K in keyof GC]: GC[K] }[keyof GC]>
|
|
225
|
-
(key: keyof GC, extraDps: any = {}): [GCPT, (value: GCPT) => Promise<Result<any>>] {
|
|
225
|
+
(key: keyof GC, extraDps: any = {}): [GCPT, (value: GCPT, dpValue: any) => Promise<Result<any>>] {
|
|
226
226
|
const [groupConfig, setGroupConfig] = useGroupConfig<GC>()
|
|
227
|
-
const setGroupConfigFeature = async (value: GCPT) => {
|
|
227
|
+
const setGroupConfigFeature = async (value: GCPT, dpValue: any) => {
|
|
228
228
|
return await setGroupConfig(
|
|
229
229
|
{
|
|
230
|
-
[GlobalParams.dpSchemaMap[snakeCase(key as string)].dp]:
|
|
230
|
+
[GlobalParams.dpSchemaMap[snakeCase(key as string)].dp]: dpValue,
|
|
231
231
|
...extraDps,
|
|
232
232
|
},
|
|
233
233
|
{
|