@ledvance/ui-biz-bundle 1.1.117 → 1.1.118

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,68 +4,38 @@
4
4
  "name": "@ledvance/ui-biz-bundle",
5
5
  "pid": [],
6
6
  "uiid": "",
7
- "version": "1.1.117",
7
+ "version": "1.1.118",
8
8
  "scripts": {},
9
9
  "dependencies": {
10
10
  "@ledvance/base": "^1.x",
11
11
  "@ledvance/react-native-echarts-pro": "^1.x",
12
- "@reduxjs/toolkit": "^1.8.6",
13
- "@tuya/tuya-panel-api": "^1.12.0",
14
12
  "@tuya/tuya-panel-lamp-sdk": "^1.14.1",
15
13
  "ahooks": "^2.x",
16
- "buffer": "^6.0.3",
17
- "dayjs": "^1.11.5",
18
- "events": "^1.1.1",
19
- "lodash": "^4.17.19",
20
- "moment": "^2.20.1",
14
+ "dayjs": "^1.11.13",
15
+ "lodash": "^4.17.21",
21
16
  "prop-types": "^15.6.1",
22
17
  "react": "16.8.3",
23
- "react-addons-shallow-compare": "^15.6.2",
24
18
  "react-native": "0.59.10",
25
- "react-native-render-html": "^6.3.4",
26
19
  "react-native-svg": "5.5.1",
27
20
  "react-redux": "^7.2.1",
28
- "redux": "^4.0.0",
29
- "redux-actions": "^2.6.1",
30
- "redux-logger": "^3.0.6",
31
- "redux-observable": "^1.0.0",
32
- "redux-thunk": "^2.3.0",
33
- "rxjs": "^6.3.1",
34
- "rxjs-compat": "^6.3.1",
35
- "style-equal": "^1.0.0",
36
21
  "tuya-panel-kit": "^4.9.4"
37
22
  },
38
23
  "devDependencies": {
39
24
  "@babel/plugin-proposal-decorators": "^7.12.1",
40
- "@commitlint/cli": "^11.0.0",
41
- "@tuya/tuya-panel-patches": "^0.59.10",
42
- "@types/lodash": "^4.14.137",
43
- "@types/react": "^16.0.4",
44
- "@types/react-native": "^0.60.0",
45
- "@types/react-redux": "^7.1.2",
46
- "@types/redux": "^3.6.0",
47
- "@types/redux-actions": "^2.6.1",
48
- "@types/redux-logger": "^3.0.7",
25
+ "@types/lodash": "^4.17.13",
26
+ "@types/react": "17.0.83",
27
+ "@types/react-native": "^0.65",
49
28
  "@types/tuya-panel-kit": "^4.7.3",
50
- "babel-jest": "^22.1.0",
51
29
  "babel-plugin-import": "^1.11.0",
52
30
  "babel-plugin-module-resolver": "^4.0.0",
53
31
  "babel-plugin-transform-decorators-legacy": "^1.3.4",
54
32
  "babel-plugin-transform-remove-console": "^6.9.4",
55
- "commitizen": "^4.2.2",
56
- "commitlint-config-cz": "^0.13.2",
57
- "cz-customizable": "^6.3.0",
58
- "eslint-config-airbnb": "^18.2.1",
59
33
  "eslint-config-tuya": "^1.0.0",
60
34
  "eslint-import-resolver-alias": "^1.1.2",
61
35
  "eslint-import-resolver-react-native": "^0.2.0",
62
36
  "eslint-plugin-react-native": "^3.10.0",
63
- "husky": "^4.3.0",
64
- "jest": "^22.1.1",
65
37
  "metro-react-native-babel-preset": "^0.63.0",
66
38
  "react-native-typescript-transformer": "^1.2.13",
67
- "react-test-renderer": "^16.2.0",
68
- "standard-version": "^9.0.0",
69
39
  "typescript": "^4.1.2"
70
40
  },
71
41
  "jest": {
@@ -1,6 +1,6 @@
1
1
  import { useDps } from "@ledvance/base/src/models/modules/NativePropsSlice";
2
2
  import { FlagPageProps } from "./FlagPage";
3
- import { SceneNodeTransitionMode } from "@ledvance/ui-biz-bundle/src/modules/scene/SceneInfo";
3
+ import { SceneNodeTransitionMode } from "../scene/SceneInfo";
4
4
  import { WORK_MODE, nToHS, parseJSON, toFixed } from "@tuya/tuya-panel-lamp-sdk/lib/utils";
5
5
  import { FlagItemInfo, FlagUiInfo, defFlagList } from "./FlagInfo";
6
6
  import { hex2Int } from "@ledvance/base/src/utils/common";
@@ -8,7 +8,7 @@ import { spliceByStep } from "@ledvance/base/src/utils/common";
8
8
  import { useMemo, useState } from "react";
9
9
  import { useUpdateEffect } from "ahooks";
10
10
  import { NativeApi } from "@ledvance/base/src/api/native";
11
- import { stripDp2Obj } from "@ledvance/ui-biz-bundle/src/modules/scene/SceneAction";
11
+ import { stripDp2Obj } from "../scene/SceneAction";
12
12
  import { cloneDeep } from "lodash";
13
13
 
14
14
  export interface ExtraParams extends FlagPageProps, FlagOption {
@@ -67,7 +67,7 @@ export const useFlag: UseFlagType = (flagCode, extra) => {
67
67
  extraDps[extra.brightValueCode!] = flagItem.whiteColors[0]?.brightness * 10
68
68
  extraDps[extra.temperatureCode!] = flagItem.whiteColors[0]?.colorTemp * 10
69
69
  }else{
70
- extraDps[extra.switchLedCode] = true
70
+ extraDps[extra.switchLedCode] = true
71
71
  extraDps[extra.workModeCode] = WORK_MODE.COLOUR
72
72
  }
73
73
  return setDps(extraDps)
@@ -2,8 +2,8 @@ import { useEffect, useState } from 'react'
2
2
  import { useUpdateEffect } from "ahooks"
3
3
  import { useDeviceId, useDp, useDps } from '@ledvance/base/src/models/modules/NativePropsSlice'
4
4
  import { ColorParser } from '@ledvance/base/src/utils/ColorParser'
5
- import { dp2Obj, obj2Dp } from '@ledvance/ui-biz-bundle/src/modules/timeSchedule/mix/MixLightActions'
6
- import { MixLightBean } from '@ledvance/ui-biz-bundle/src/modules/timeSchedule/mix/MixLightBean'
5
+ import { dp2Obj, obj2Dp } from '../timeSchedule/mix/MixLightActions'
6
+ import { MixLightBean } from '../timeSchedule/mix/MixLightBean'
7
7
  import { Formatter } from '@tuya/tuya-panel-lamp-sdk'
8
8
  import { DreamMusicDataType, dreamMusicData } from './MusicDataBean'
9
9
  import { Result } from '@ledvance/base/src/models/modules/Result'
@@ -96,7 +96,7 @@ export const useMusicData = (dpKey: string): any[] => {
96
96
  const sendData = {
97
97
  [dpKey]: musicDpData,
98
98
  ...extraDp
99
- }
99
+ }
100
100
  const controlResult: any = await setDps(sendData)
101
101
  return {
102
102
  result: { success: controlResult.result },
@@ -14,7 +14,7 @@ import LdvScheduleItem from './LdvScheduleItem'
14
14
  import { showDialog } from '@ledvance/base/src/utils/common'
15
15
  import { useReactive } from 'ahooks'
16
16
  import { cloneDeep } from 'lodash'
17
- import { ui_biz_routerKey } from 'navigation/Routers'
17
+ import { ui_biz_routerKey } from '../../navigation/Routers'
18
18
  import { JudgeTimeScheduleProps } from './TimeScheduleBean'
19
19
 
20
20
  const { convertX: cx } = Utils.RatioUtils
@@ -1,8 +1,8 @@
1
1
  import { NavigationProp, ParamListBase } from '@react-navigation/native';
2
- import { AddMoodPageParams } from 'modules/mood/AddMoodPage';
3
- import { StaticMoodEditorPageParams } from 'modules/mood/StaticMoodEditorPage';
2
+ import { AddMoodPageParams } from '../modules/mood/AddMoodPage';
3
+ import { StaticMoodEditorPageParams } from '../modules/mood/StaticMoodEditorPage';
4
4
  import { StackNavigationProp } from '@react-navigation/stack';
5
- import { SelectPageParams } from 'modules/select/SelectPage';
5
+ import { SelectPageParams } from '../modules/select/SelectPage';
6
6
  export declare function toStaticMoodEditorPage(navigation: NavigationProp<ParamListBase>, params: StaticMoodEditorPageParams): void;
7
7
  export declare function toDynamicMoodEditorPage(navigation: NavigationProp<ParamListBase>, params: StaticMoodEditorPageParams): void;
8
8
  export declare function toAddMoodPage(navigation: NavigationProp<ParamListBase>, params: AddMoodPageParams): void;
@@ -132,6 +132,9 @@ export async function saveMixSceneList(devId: string, sceneList: DiySceneInfo[])
132
132
 
133
133
 
134
134
  function decodeLoveScenes(dpValue: string): number[] {
135
+ if (!dpValue) {
136
+ return []
137
+ }
135
138
  const loveScenes: number[] = [];
136
139
  for (let i = 2; i < dpValue.length; i += 4) {
137
140
  const groupHex = dpValue.slice(i, i + 4);
@@ -8,8 +8,8 @@ import {
8
8
  getDpResultByHour,
9
9
  getDpResultByMonth
10
10
  } from "@ledvance/base/src/models/TuyaApi";
11
- import {DateType} from "@ledvance/ui-biz-bundle/src/newModules/energyConsumption/co2Data";
12
- import {OverviewItem} from "@ledvance/ui-biz-bundle/src/newModules/energyConsumption/EnergyConsumptionPage";
11
+ import {DateType} from "./co2Data";
12
+ import {OverviewItem} from "./EnergyConsumptionPage";
13
13
  import {overDays} from "@ledvance/base/src/utils/index";
14
14
  import dayjs from "dayjs";
15
15
  import {isEmpty} from "lodash";
@@ -10,7 +10,7 @@ import { useReactive, useUpdateEffect } from "ahooks";
10
10
  import { SwitchInchingPageParams, useCountdown1, useSwitchInching } from "./SwithInchingAction";
11
11
  import { useParams } from "@ledvance/base/src/hooks/Hooks";
12
12
  import ThemeType from '@ledvance/base/src/config/themeType'
13
- import { useConflictTask } from "hooks/DeviceDpStateHooks";
13
+ import { useConflictTask } from "../../hooks/DeviceDpStateHooks";
14
14
  import { showDialog } from "@ledvance/base/src/utils/common";
15
15
 
16
16
  const { convertX: cx } = Utils.RatioUtils
package/tsconfig.json CHANGED
@@ -48,4 +48,4 @@
48
48
  },
49
49
  "include": ["src/**/*.ts","src/**/*.tsx"],
50
50
  "exclude": ["node_modules",".yalc"]
51
- }
51
+ }