@ledvance/base 1.2.99 → 1.3.1

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.2.99",
7
+ "version": "1.3.1",
8
8
  "scripts": {
9
9
  "prepublishOnly": "python update-localazy.py"
10
10
  },
@@ -4,12 +4,15 @@ import AdvanceCard, { AdvancedData } from './AdvanceCard'
4
4
  import Spacer from './Spacer'
5
5
  import { useNavigation } from '@react-navigation/core'
6
6
  import { Utils } from 'tuya-panel-kit'
7
+ import { getMicrophoneAccess } from '@ledvance/base/src/api/native'
7
8
 
8
9
  const { convertX: cx } = Utils.RatioUtils
9
10
 
11
+ const MusicRouterKey = ['ui_biz_music', 'group_ui_biz_music']
12
+
10
13
  export interface AdvanceListProps {
11
14
  advanceData: AdvancedData[],
12
- onAdvanceItemClick?: (advanceData: AdvancedData, index: number) => Promise<void> | undefined
15
+ onAdvanceItemClick?: (advanceData: AdvancedData, index: number) => void | undefined
13
16
  }
14
17
 
15
18
  function AdvanceList(props: AdvanceListProps) {
@@ -21,9 +24,16 @@ function AdvanceList(props: AdvanceListProps) {
21
24
  <View style={styles.item}>
22
25
  <AdvanceCard
23
26
  data={item}
24
- onPress={() => {
25
- if (!onAdvanceItemClick || onAdvanceItemClick(item, index)) {
26
- navigation.navigate(item.router.key, item.router.params)
27
+ onPress={async () => {
28
+ if(MusicRouterKey.includes(item.router.key)){
29
+ getMicrophoneAccess().then(res =>{
30
+ if(!res) return
31
+ navigation.navigate(item.router.key, item.router.params)
32
+ })
33
+ }else{
34
+ if (!onAdvanceItemClick || onAdvanceItemClick(item, index)) {
35
+ navigation.navigate(item.router.key, item.router.params)
36
+ }
27
37
  }
28
38
  }}>
29
39
  {item.icons && <View style={{
@@ -9,20 +9,19 @@ export interface CircularProgressProps extends PropsWithChildren<ViewProps> {
9
9
  }
10
10
 
11
11
  export function CircularProgress(props: CircularProgressProps) {
12
- return <Progress
13
- foreColor={{
14
- '0%': '#f60',
15
- '100%': '#f60',
16
- }}
12
+ return <Progress.Double
17
13
  style={[{ width: props.size, height: props.size }, props.style]}
18
14
  disabled={true}
19
- needMaxCircle={true}
20
- thumbRadius={Math.trunc(props.strokeWidth / 2)}
15
+ thumbRadius={Math.trunc(props.strokeWidth / 2) - 0.5}
16
+ minThumbFill={'#f60'}
17
+ minThumbStroke={'#f60'}
21
18
  thumbStroke={'#f60'}
22
19
  thumbFill={'#f60'}
23
20
  thumbStrokeWidth={0}
24
21
  scaleHeight={props.strokeWidth}
25
- value={props.progress}
22
+ minValue={0}
23
+ maxValue={props.progress}
24
+ foreColor={'#f60'}
26
25
  startDegree={270}
27
26
  andDegree={360}
28
27
  renderCenterView={
@@ -1,4 +1,4 @@
1
- import React, { PropsWithChildren, useCallback, useEffect, useMemo } from 'react'
1
+ import React, { PropsWithChildren, ReactChild, useCallback, useEffect, useMemo } from 'react'
2
2
  import { Image, StyleSheet, Text, TouchableOpacity, View, ViewProps } from 'react-native'
3
3
  import { Modal, Utils } from 'tuya-panel-kit'
4
4
  import { useReactive, useUpdateEffect } from 'ahooks'
@@ -59,6 +59,7 @@ interface DrawToolViewProps extends PropsWithChildren<ViewProps> {
59
59
  hideDisableLight?: boolean
60
60
  hideColorize?: boolean
61
61
  ledNumModalVisible?: boolean
62
+ deviceGroupContent?: ReactChild
62
63
  }
63
64
 
64
65
  const DrawToolView = (props: DrawToolViewProps) => {
@@ -233,6 +234,7 @@ const DrawToolView = (props: DrawToolViewProps) => {
233
234
  </Modal>}
234
235
  {props.children}
235
236
  </>}
237
+ {props.deviceGroupContent ? props.deviceGroupContent : undefined}
236
238
  </Card>
237
239
  )
238
240
  }
@@ -2911,7 +2911,7 @@ export default {
2911
2911
  "country_MT": "Malta",
2912
2912
  "country_MX": "Mexiko",
2913
2913
  "country_NA": "Namibia",
2914
- "country_NG": "Nigerien",
2914
+ "country_NG": "Nigeria",
2915
2915
  "country_NL": "Niederlande",
2916
2916
  "country_NO": "Norwegen",
2917
2917
  "country_NZ": "Neuseeland",
@@ -8179,7 +8179,7 @@ export default {
8179
8179
  "flashing_fs_toggle_state2": "Повільна анімація",
8180
8180
  "generation_data_description_text": "показує вироблену енергію",
8181
8181
  "group_conflict_feature": "Зверніть увагу, що всі конфліктні графіки (якщо такі є) будуть деактивовані.",
8182
- "group_energytotal": "Total Energy",
8182
+ "group_energytotal": "Загальне споживання енергії",
8183
8183
  "group_feature_biological_rhythm_applyfor_information": "Можливо, не всі пристрої підтримують функцію «Біологічний ритм».",
8184
8184
  "group_feature_music_secondsection_note": "Світло синхронізується з музикою, яку збирає мікрофон смартфона",
8185
8185
  "groups_settings_optionbox_option3": "Синхронізація сонячних пристроїв",