From 75c24c054b74f543efc02d3e76a4d0b8b6a633fc Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 09:46:31 +0800 Subject: [PATCH 01/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91baronha-ting=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/baronha-ting.md | 162 ++++++++++++++++++++++----------------------- 1 file changed, 79 insertions(+), 83 deletions(-) diff --git a/en/baronha-ting.md b/en/baronha-ting.md index 723d4294..1674017e 100644 --- a/en/baronha-ting.md +++ b/en/baronha-ting.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

@baronha/ting

@@ -12,16 +12,15 @@

-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/ting) +> [!TIP] [GitHub address](https://github.com/react-native-oh-library/ting) +## Installation and Usage -## 安装与使用 +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/ting Releases](https://github.com/react-native-oh-library/ting/releases). -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/ting Releases](https://github.com/react-native-oh-library/ting/releases),并下载适用版本的 tgz 包。 +Go to the project directory and execute the following instruction: -进入到工程目录并输入以下命令: - -> [!TIP] # 处替换为 tgz 包的路径 +> [!TIP] Replace the content with the path of the .tgz package at the comment sign (#). @@ -39,9 +38,9 @@ yarn add @react-native-oh-tpl/ting@file:# -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js import { View } from "react-native"; @@ -73,17 +72,17 @@ const App = () => { export default App; ``` -## 使用 Codegen +## Use Codegen -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[Codegen 使用文档](/zh-cn/codegen.md)。 +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/zh-cn/codegen.md). ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +Open the `harmony` directory of the HarmonyOS project in DevEco Studio. -### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 +### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project ```json { @@ -94,18 +93,15 @@ export default App; } ``` -### 2.引入原生端代码 - -目前有两种方法: +### 2. Introducing Native Code -1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法); -2. 直接链接源码。 +Currently, two methods are available: -方法一:通过 har 包引入(推荐) +Method 1 (recommended): Use the HAR file. -> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 +> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. -打开 `entry/oh-package.json5`,添加以下依赖 +Open `entry/oh-package.json5` file and add the following dependencies: ```json "dependencies": { @@ -114,22 +110,22 @@ export default App; } ``` -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -方法二:直接链接源码 +Method 2: Directly link to the source code. -> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) +> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). -### 3.在 ArkTs 侧引入 RNTingPackage +### 3. Introducing RNTingPackage to ArkTS -打开 `entry/src/main/ets/RNPackagesFactory.ets`,添加: +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... @@ -143,90 +139,90 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 4. Running -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -然后编译、运行即可。 +Then build and run the code. -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/ting Releases](https://github.com/react-native-oh-library/ting/releases) +Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/ting Releases](https://github.com/react-native-oh-library/ting/releases) -## 属性 +## Properties -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. ### ToastOptions -| Name | Description | Type | Required | Platform | HarmonyOS Support | -|----------------------|---------------------------------------------------------|------|----------|----------|---------------------| -| title | The text for the toast’s title | string | no | All | yes | -| message | The text for the toast’s message | string | no | All | yes | -| titleColor | The color of the title text in hexadecimal format | string | no | All | yes | -| messageColor | The color of the message text in hexadecimal format | string | no | All | yes | -| preset | The preset style of the toast. Options include done (success), error (error), none (no style), or spinner (loading spinner) | string | no | All | partially | -| duration | The lifetime of the toast (seconds) | number | no | All | yes | -| haptic | The type of haptic feedback. Options include success (success), warning (warning), error (error), or none (no haptic feedback) | string | no | iOS | yes | -| shouldDismissByDrag | Whether the toast can be dismissed by dragging | boolean | no | All | yes | -| position | Toast is displayed from top or bottom | string | no | All |yes | -| backgroundColor | The background color of the toast in hexadecimal format| string | no | All |yes | -| icon | A custom icon for the toast | object | no | All | yes | -| progressColor | The color of the progress spinner for the spinner preset style | string | no | Android | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------- | -------- | -------- | ----------------- | +| title | The text for the toast’s title | string | no | All | yes | +| message | The text for the toast’s message | string | no | All | yes | +| titleColor | The color of the title text in hexadecimal format | string | no | All | yes | +| messageColor | The color of the message text in hexadecimal format | string | no | All | yes | +| preset | The preset style of the toast. Options include done (success), error (error), none (no style), or spinner (loading spinner) | string | no | All | partially | +| duration | The lifetime of the toast (seconds) | number | no | All | yes | +| haptic | The type of haptic feedback. Options include success (success), warning (warning), error (error), or none (no haptic feedback) | string | no | iOS | yes | +| shouldDismissByDrag | Whether the toast can be dismissed by dragging | boolean | no | All | yes | +| position | Toast is displayed from top or bottom | string | no | All | yes | +| backgroundColor | The background color of the toast in hexadecimal format | string | no | All | yes | +| icon | A custom icon for the toast | object | no | All | yes | +| progressColor | The color of the progress spinner for the spinner preset style | string | no | Android | yes | ### AlertOptions -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ---- | ----------- | ---- | -------- | -------- | ------------------ | -| title | The text for the toast’s title | string | no | All | yes | -| message | The text for the toast’s message | string | no | All | yes | -| titleColor | The color of the title text in hexadecimal format | string | no | All | yes | -| messageColor | The color of the message text in hexadecimal format | string | no | All | yes | -| preset | The preset style of the toast. Options include done (success), error (error), none (no style), or spinner (loading spinner) | string | no | All | partially | -| duration | The lifetime of the toast (seconds) | number | no | All | yes | -| haptic | The type of haptic feedback. Options include success (success), warning (warning), error (error), or none (no haptic feedback) | string | no | iOS | yes | -| shouldDismissByTap | Whether the toast can be dismissed by tapping | boolean | no | All | yes | -| backgroundColor | The background color of the toast in hexadecimal format| string | no | All |yes | -| borderRadius | The border radius of the toast box, which determines how rounded the corners are | number | no | All | yes | -| blurBackdrop | The intensity of the background blur effect on Android platforms | number | no | Android | no | -| backdropOpacity | The opacity of the background blur effect on Android platforms, with a range from 0 (fully transparent) to 1 (fully opaque) | number | no | All | yes | -| icon | A custom icon for the toast | object | no | All | yes | -| progressColor | The color of the progress spinner for the spinner preset style | string | no | Android | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------- | -------- | -------- | ----------------- | +| title | The text for the toast’s title | string | no | All | yes | +| message | The text for the toast’s message | string | no | All | yes | +| titleColor | The color of the title text in hexadecimal format | string | no | All | yes | +| messageColor | The color of the message text in hexadecimal format | string | no | All | yes | +| preset | The preset style of the toast. Options include done (success), error (error), none (no style), or spinner (loading spinner) | string | no | All | partially | +| duration | The lifetime of the toast (seconds) | number | no | All | yes | +| haptic | The type of haptic feedback. Options include success (success), warning (warning), error (error), or none (no haptic feedback) | string | no | iOS | yes | +| shouldDismissByTap | Whether the toast can be dismissed by tapping | boolean | no | All | yes | +| backgroundColor | The background color of the toast in hexadecimal format | string | no | All | yes | +| borderRadius | The border radius of the toast box, which determines how rounded the corners are | number | no | All | yes | +| blurBackdrop | The intensity of the background blur effect on Android platforms | number | no | Android | no | +| backdropOpacity | The opacity of the background blur effect on Android platforms, with a range from 0 (fully transparent) to 1 (fully opaque) | number | no | All | yes | +| icon | A custom icon for the toast | object | no | All | yes | +| progressColor | The color of the progress spinner for the spinner preset style | string | no | Android | yes | ## API -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ---- | ----------- | ---- | -------- | -------- | ------------------ | -| toast | Displays a Toast notification | function | yes | All | yes | -| alert | Displays an Alert dialog | function | yes | All | yes | -| dismissAlert | Closes the currently displayed Alert dialog | function | yes | All | yes | -| setup | Configures global settings for Toast and Alert | function | yes | All | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ------------ | ---------------------------------------------- | -------- | -------- | -------- | ----------------- | +| toast | Displays a Toast notification | function | yes | All | yes | +| alert | Displays an Alert dialog | function | yes | All | yes | +| dismissAlert | Closes the currently displayed Alert dialog | function | yes | All | yes | +| setup | Configures global settings for Toast and Alert | function | yes | All | yes | -## 遗留问题 +## Known Issues -- [ ] AlertOptions和ToastOptions中的preset:done,动画效果未实现。[issue#3](https://github.com/react-native-oh-library/ting/issues/3) +- [ ] AlertOptions 和 ToastOptions 中的 preset:done,动画效果未实现。[issue#3](https://github.com/react-native-oh-library/ting/issues/3) -## 其他 +## Others -- AlertOptions中的blurBackdrop参数配置后,iOS不支持,Android无效果。 +- AlertOptions 中的 blurBackdrop 参数配置后,iOS 不支持,Android 无效果。 -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/baronha/ting/blob/main/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file +This project is licensed under [The MIT License (MIT)](https://github.com/baronha/ting/blob/main/LICENSE). -- Gitee From 1f4b8ef8a8605874b7ea07c700dda3eae9da6081 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 09:47:46 +0800 Subject: [PATCH 02/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91galio-framework=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/galio-framework.md | 502 +++++++++++++++++++++--------------------- 1 file changed, 249 insertions(+), 253 deletions(-) diff --git a/en/galio-framework.md b/en/galio-framework.md index 902143fc..cf0aeaf1 100644 --- a/en/galio-framework.md +++ b/en/galio-framework.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

galio-framework

@@ -12,12 +12,9 @@

+> [!TIP] [Github address](https://github.com/galio-org/galio) - - -> [!TIP] [Github 地址](https://github.com/galio-org/galio) - -## 安装与使用 +## Installation and Usage @@ -35,109 +32,109 @@ yarn add galio-framework@0.8.0 -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js -import { Card, Block, theme } from 'galio-framework'; -import React, { useState } from 'react'; -import { Image, ScrollView, StyleSheet, Text, View } from 'react-native'; +import { Card, Block, theme } from "galio-framework"; +import React, { useState } from "react"; +import { Image, ScrollView, StyleSheet, Text, View } from "react-native"; const CardDemo = () => { - return ( - - - - ) + return ( + + + + ); }; const styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: '#fff', - }, - accordion: { - borderWidth: 1, - borderColor: '#ccc', - borderRadius: 5, - overflow: 'hidden', - shadowRadius: 10 - }, - listStyle: { - borderTopWidth: 10, - borderTopColor: 'red', - }, - headerStyle: { - backgroundColor: '#5E72E4', - padding: 10, - }, - contentStyle: { - paddingVertical: 10, - paddingHorizontal: 20, - fontWeight: 'bold' + container: { + flex: 1, + backgroundColor: "#fff", + }, + accordion: { + borderWidth: 1, + borderColor: "#ccc", + borderRadius: 5, + overflow: "hidden", + shadowRadius: 10, + }, + listStyle: { + borderTopWidth: 10, + borderTopColor: "red", + }, + headerStyle: { + backgroundColor: "#5E72E4", + padding: 10, + }, + contentStyle: { + paddingVertical: 10, + paddingHorizontal: 20, + fontWeight: "bold", + }, + inputArea: { + width: "100%", + height: "15%", + borderWidth: 2, + borderColor: "#000000", + marginTop: 8, + justifyContent: "center", + alignItems: "center", + backgroundColor: "white", + }, + baseText: { + width: "100%", + height: "100%", + fontWeight: "bold", + textAlign: "center", + fontSize: 16, + }, + shadow: { + shadowColor: "red", + shadowOffset: { + width: 10, + height: 3, }, - inputArea: { - width: '100%', - height: '15%', - borderWidth: 2, - borderColor: '#000000', - marginTop: 8, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: "white" - }, - baseText: { - width: '100%', - height: '100%', - fontWeight: 'bold', - textAlign: 'center', - fontSize: 16, - }, - shadow: { - shadowColor: "red", - shadowOffset: { - width: 10, - height: 3, - }, - }, - viewShadow: { - elevation: 1.5, - shadowColor: "#FF9C09", - shadowOffset: { width: 0, height: 0 }, - shadowOpacity: 1, - shadowRadius: 1.5, - }, - cardImageRadius: { - borderRadius: 30, - opacity:0.5 - }, - imageBlockStyle: { - borderColor: 'blue', - borderWidth: 5, - borderBlockColor: 'yellow' - }, - footerStyle: { - color: 'yellow', - backgroundColor: '#FF7167', - fontSize: 10, - fontWeight: 'bold', - borderRadius:10 - } + }, + viewShadow: { + elevation: 1.5, + shadowColor: "#FF9C09", + shadowOffset: { width: 0, height: 0 }, + shadowOpacity: 1, + shadowRadius: 1.5, + }, + cardImageRadius: { + borderRadius: 30, + opacity: 0.5, + }, + imageBlockStyle: { + borderColor: "blue", + borderWidth: 5, + borderBlockColor: "yellow", + }, + footerStyle: { + color: "yellow", + backgroundColor: "#FF7167", + fontSize: 10, + fontWeight: "bold", + borderRadius: 10, + }, }); export default CardDemo; @@ -145,42 +142,42 @@ export default CardDemo; ## Link -本库依赖react-native-vector-icons,如已在鸿蒙工程中引入过该库,则无需再次引入。 +The HarmonyOS implementation of this library depends on the native code from react-native-vector-icons. If this library is included into your HarmonyOS application, there is no need to include it again; you can skip the steps in this section and use it directly. -如未引入请参照[react-native-vector-icons 文档](/zh-cn/react-native-vector-icons.md)进行引入 +If it is not included, follow the guide provided in [react-native-vector-icons 文档](/zh-cn/react-native-vector-icons.md) to add it to your project. -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -本文档内容基于以下版本验证通过: +This document is verified based on the following versions: 1. RNOH: 0.72.27; SDK: HarmonyOS NEXT Developer Beta1 5.0.0.25(API Version 12 Canary4); IDE: DevEco Studio 5.0.3.400SP7; ROM: 3.0.0.29; -## 属性 +## Properties -详情请见[galio](https://galio.io/docs/#/components) +For details, see[galio](https://galio.io/docs/#/components) -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The Platform column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 Yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of HarmonyOS Support is yes, it means that the HarmonyOS platform supports this property; no means the opposite; partially means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. ### [Accordion](https://galio.io/docs/#/components/accordion?id=accordion) -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| :--------------: | :----------------------------------------------------------: | :-------: | :------: | :---------: | :---------------: | -| style | Styling the Block which encapsulates the whole FlatList used for rendering the elements. | object | no | iOS/Android | Yes | -| dataArray | Array of objects with the following keys: title, content, icon: { name, family, size, color, style} | array | no | iOS/Android | Yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :--------------: | :--------------------------------------------------------------------------------------------------------------: | :-------: | :------: | :---------: | :---------------: | +| style | Styling the Block which encapsulates the whole FlatList used for rendering the elements. | object | no | iOS/Android | Yes | +| dataArray | Array of objects with the following keys: title, content, icon: { name, family, size, color, style} | array | no | iOS/Android | Yes | | opened | Index number representing which of the elements of your array should be opened when the component first renders. | number | no | iOS/Android | Yes | -| listStyle | FlatList style prop. | object | no | iOS/Android | Yes | -| icon | Icon for the un-expanded piece of content | component | no | iOS/Android | Yes | -| expandedIcon | Icon used when the content is expanded. | component | no | iOS/Android | Yes | -| headerStyle | Object styling the header of the Accordion. | object | no | iOS/Android | Yes | -| contentStyle | Object styling the content section of the Accordion. | object | no | iOS/Android | Yes | -| onAccordionClose | Function called when the user closes one of the Accordion's items. | function | no | iOS/Android | Yes | -| onAccordionOpen | Function called when the user expands one of the Accordion's items. | function | no | iOS/Android | Yes | +| listStyle | FlatList style prop. | object | no | iOS/Android | Yes | +| icon | Icon for the un-expanded piece of content | component | no | iOS/Android | Yes | +| expandedIcon | Icon used when the content is expanded. | component | no | iOS/Android | Yes | +| headerStyle | Object styling the header of the Accordion. | object | no | iOS/Android | Yes | +| contentStyle | Object styling the content section of the Accordion. | object | no | iOS/Android | Yes | +| onAccordionClose | Function called when the user closes one of the Accordion's items. | function | no | iOS/Android | Yes | +| onAccordionOpen | Function called when the user expands one of the Accordion's items. | function | no | iOS/Android | Yes | -### [Block](https://github.com/galio-org/galio/blob/master/LICENSE.md) +### [Block](https://github.com/galio-org/galio/blob/master/LICENSE.md) | Name | Description | Type | Required | Platform | HarmonyOS Support | | :---------: | :------------------------------------------------: | :-------------: | :------: | :---------: | :---------------: | @@ -203,73 +200,73 @@ export default CardDemo; ### [Button](https://galio.io/docs/#/components/button?id=button) -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| :---------: | :----------------------------------------------------------: | :-------------: | :------: | :---------: | :---------------: | -| capitalize | Transforms the first character in a capital letter | boolean | no | iOS/Android | Yes | -| color | your options are: 'primary', 'theme', 'warning', 'succes', 'transparent' or your own color | string | no | iOS/Android | Yes | -| disabled | Disables the button | boolean | no | iOS/Android | Yes | -| icon | pick whatever icon you want from Expo's icons | boolean, string | no | iOS/Android | Yes | -| iconColor | sets the icon's color | boolean, string | no | iOS/Android | Yes | -| iconFamily | pick whatever icon family suits the icon you chose from Expo's icons | number | no | iOS/Android | Yes | -| iconSize | sets the icon's size | boolean | no | iOS/Android | Yes | -| loading | Uses the for the loading effect | boolean | no | iOS/Android | Yes | -| loadingSize | your options are: 'small', 'large' | boolean | no | iOS/Android | Yes | -| lowercase | makes all letters lowercase | boolean | no | iOS/Android | Yes | -| onlyIcon | adds specific styling for using only an icon in your button | boolean | no | iOS/Android | Yes | -| opacity | changes the button's opacity | boolean | no | iOS/Android | Yes | -| radius | changes the button's radius | string | no | No | No | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :---------: | :--------------------------------------------------------------------------------------------------: | :-------------: | :------: | :---------: | :---------------: | +| capitalize | Transforms the first character in a capital letter | boolean | no | iOS/Android | Yes | +| color | your options are: 'primary', 'theme', 'warning', 'succes', 'transparent' or your own color | string | no | iOS/Android | Yes | +| disabled | Disables the button | boolean | no | iOS/Android | Yes | +| icon | pick whatever icon you want from Expo's icons | boolean, string | no | iOS/Android | Yes | +| iconColor | sets the icon's color | boolean, string | no | iOS/Android | Yes | +| iconFamily | pick whatever icon family suits the icon you chose from Expo's icons | number | no | iOS/Android | Yes | +| iconSize | sets the icon's size | boolean | no | iOS/Android | Yes | +| loading | Uses the for the loading effect | boolean | no | iOS/Android | Yes | +| loadingSize | your options are: 'small', 'large' | boolean | no | iOS/Android | Yes | +| lowercase | makes all letters lowercase | boolean | no | iOS/Android | Yes | +| onlyIcon | adds specific styling for using only an icon in your button | boolean | no | iOS/Android | Yes | +| opacity | changes the button's opacity | boolean | no | iOS/Android | Yes | +| radius | changes the button's radius | string | no | No | No | | shadowColor | the default shadowColor is based on the button's color but you can also write a specific shadowColor | string | no | iOS/Android | Yes | -| shadowColor | removes shadow | boolean | no | iOS/Android | Yes | -| size | your options are: 'large', 'small' | number | no | iOS/Android | Yes | -| uppercase | makes all letters uppercase | boolean | no | iOS/Android | Yes | +| shadowColor | removes shadow | boolean | no | iOS/Android | Yes | +| size | your options are: 'large', 'small' | number | no | iOS/Android | Yes | +| uppercase | makes all letters uppercase | boolean | no | iOS/Android | Yes | ### [Card](https://galio.io/docs/#/components/card?id=card) -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| :-------------: | :----------------------------------------------------------: | :-------------: | :------: | :---------: | :---------------: | -| card | adding the necessary styles | boolean | no | iOS/Android | Yes | -| shadow | adding the necessary styles for shadows | boolean | no | iOS/Android | Yes | -| borderless | adding the card's border | boolean | no | iOS/Android | Yes | -| image | write your relative path or URL to the image | string | no | iOS/Android | Yes | -| imageBlockStyle | styles for the Block wrapping the Image | string | no | iOS/Android | Yes | -| imageStyle | styles for the Image | object | no | iOS/Android | Yes | -| avatar | write your relative path or URL to the avatar's image | string | no | iOS/Android | Yes | -| location | where is this coming from? write the location of the author | string | no | iOS/Android | Yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :-------------: | :----------------------------------------------------------------------------------------------: | :-------------: | :------: | :---------: | :---------------: | +| card | adding the necessary styles | boolean | no | iOS/Android | Yes | +| shadow | adding the necessary styles for shadows | boolean | no | iOS/Android | Yes | +| borderless | adding the card's border | boolean | no | iOS/Android | Yes | +| image | write your relative path or URL to the image | string | no | iOS/Android | Yes | +| imageBlockStyle | styles for the Block wrapping the Image | string | no | iOS/Android | Yes | +| imageStyle | styles for the Image | object | no | iOS/Android | Yes | +| avatar | write your relative path or URL to the avatar's image | string | no | iOS/Android | Yes | +| location | where is this coming from? write the location of the author | string | no | iOS/Android | Yes | | locationColor | the default locationColor is based on themes.COLORS.MUTED, but you can also write your own color | boolean, string | no | iOS/Android | Yes | -| title | write your main card's title | string | no | iOS/Android | Yes | -| titleColor | change your title's color | string | no | iOS/Android | Yes | -| caption | write your main card's title | string | no | iOS/Android | Yes | -| captionColor | change your caption's color | string | no | iOS/Android | Yes | -| footerStyle | styles for the block wrapping the whole author's section | object | no | iOS/Android | Yes | +| title | write your main card's title | string | no | iOS/Android | Yes | +| titleColor | change your title's color | string | no | iOS/Android | Yes | +| caption | write your main card's title | string | no | iOS/Android | Yes | +| captionColor | change your caption's color | string | no | iOS/Android | Yes | +| footerStyle | styles for the block wrapping the whole author's section | object | no | iOS/Android | Yes | ### [Checkbox](https://galio.io/docs/#/components/checkbox?id=checkbox) -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| :-----------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :------: | :---------: | :---------------: | -| checkboxStyle | By sending an object you can style the checkbox's color, size and more | any | no | iOS/Android | Yes | -| disabled | This disables the possibility of the checkbox being used. | boolean | no | iOS/Android | Yes | -| flexDirection | Maybe you need the checkbox to be on top of an image? You can do that with this prop. | oneOf(['row', 'row-reverse', 'column', 'column-reverse']), string | no | iOS/Android | Yes | -| iconColor | This prop changes the icon color. | string | no | iOS/Android | Yes | -| iconName | This prop changes the icon. | string | no | iOS/Android | Yes | -| iconSize | This prop changes the size of the icon. | number | no | iOS/Android | Yes | -| iconFamily | In case you need an icon from a different package, this prop helps you change the icon package. | string | no | iOS/Android | Yes | -| image | This allows you to place an image instead of text. | string | no | iOS/Android | Yes | -| imageStyle | Style the way your image looks here! | any | no | iOS/Android | Yes | -| initialValue | Should the initial state of your checkbox be false or true? | boolean | no | iOS/Android | Yes | -| label | The text next to your checkbox. | string | no | iOS/Android | Yes | -| labelStyle | Style your checkbox's text | any | no | iOS/Android | Yes | -| onChange | This prop take an arrow function and everytime the user presses the checkbox the function is called. | function | no | iOS/Android | Yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :-----------: | :--------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------: | :------: | :---------: | :---------------: | +| checkboxStyle | By sending an object you can style the checkbox's color, size and more | any | no | iOS/Android | Yes | +| disabled | This disables the possibility of the checkbox being used. | boolean | no | iOS/Android | Yes | +| flexDirection | Maybe you need the checkbox to be on top of an image? You can do that with this prop. | oneOf(['row', 'row-reverse', 'column', 'column-reverse']), string | no | iOS/Android | Yes | +| iconColor | This prop changes the icon color. | string | no | iOS/Android | Yes | +| iconName | This prop changes the icon. | string | no | iOS/Android | Yes | +| iconSize | This prop changes the size of the icon. | number | no | iOS/Android | Yes | +| iconFamily | In case you need an icon from a different package, this prop helps you change the icon package. | string | no | iOS/Android | Yes | +| image | This allows you to place an image instead of text. | string | no | iOS/Android | Yes | +| imageStyle | Style the way your image looks here! | any | no | iOS/Android | Yes | +| initialValue | Should the initial state of your checkbox be false or true? | boolean | no | iOS/Android | Yes | +| label | The text next to your checkbox. | string | no | iOS/Android | Yes | +| labelStyle | Style your checkbox's text | any | no | iOS/Android | Yes | +| onChange | This prop take an arrow function and everytime the user presses the checkbox the function is called. | function | no | iOS/Android | Yes | ### [Deck Swiper](https://galio.io/docs/#/components/deckswiper?id=deck-swiper) -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| :-----------------: | :----------------------------------------------------------: | :------: | :------: | :---------: | :---------------: | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :-----------------: | :-------------------------------------------------------------------: | :------: | :------: | :---------: | :---------------: | | style | Styling the Block which encapsulates the components used for swiping. | object | no | iOS/Android | Yes | -| components | An array of components used for building the deck. | array | no | iOS/Android | Yes | -| onSwipeRight | Function called when the user swipes right. | function | no | iOS/Android | Yes | -| onSwipeLeft | Function called when the user swipes left. | function | no | iOS/Android | Yes | -| focusedElementStyle | Styling for the first element of the deck. | object | no | iOS/Android | Yes | -| nextElementStyle | Styling for the elements underneath the first element of the deck. | object | no | iOS/Android | Yes | +| components | An array of components used for building the deck. | array | no | iOS/Android | Yes | +| onSwipeRight | Function called when the user swipes right. | function | no | iOS/Android | Yes | +| onSwipeLeft | Function called when the user swipes left. | function | no | iOS/Android | Yes | +| focusedElementStyle | Styling for the first element of the deck. | object | no | iOS/Android | Yes | +| nextElementStyle | Styling for the elements underneath the first element of the deck. | object | no | iOS/Android | Yes | ### [Icon](https://galio.io/docs/#/components/icon?id=icon) @@ -282,55 +279,55 @@ export default CardDemo; ### [Input](https://galio.io/docs/#/components/input?id=input) -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| :------------------: | :----------------------------------------------------------: | :-----: | :------: | :---------: | :---------------: | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----: | :------: | :---------: | :---------------: | | type | this is basically the TextInput's keyboardType prop and it has the next options: 'default', 'number-pad', 'decimal-pad', 'numeric', 'email-address', 'phone-pad'. | string | no | iOS/Android | Yes | -| password | Tells the input that this is going to be a password input | boolean | no | iOS/Android | Yes | -| placeholderTextColor | Sets the placeholder's text color | string | no | iOS/Android | Yes | -| label | Sets the label of the input | string | no | iOS/Android | Yes | -| bgColor | Sets the Input's backgroundColor | string | no | iOS/Android | Yes | -| rounded | Sets the corners to be rounded | boolean | no | iOS/Android | Yes | -| borderless | Sets the Input's borderWidth to 0 | boolean | no | iOS/Android | Yes | -| viewPass | Adds the functionality of pressing a button in order to see your password's letters | boolean | no | iOS/Android | Yes | -| icon | Choose your Icon's name from Expo's icon list | string | no | iOS/Android | Yes | -| iconColor | Changes the Icon's color | string | no | iOS/Android | Yes | -| family | Choose your Icon's family from the same list | string | no | iOS/Android | Yes | -| color | Sets the Input's text color. | string | no | iOS/Android | Yes | -| help | Sets a helper line for more information regarding your input. | string | no | iOS/Android | Yes | -| left | Sets the Icon to the left of the Input. | boolean | no | iOS/Android | Yes | -| right | Sets the Icon to the right of the Input. | boolean | no | iOS/Android | Yes | -| topHelp | Sets the helper line above the input. | boolean | no | iOS/Android | Yes | -| bottomHelp | Sets the helper line below the input. | boolean | no | iOS/Android | Yes | +| password | Tells the input that this is going to be a password input | boolean | no | iOS/Android | Yes | +| placeholderTextColor | Sets the placeholder's text color | string | no | iOS/Android | Yes | +| label | Sets the label of the input | string | no | iOS/Android | Yes | +| bgColor | Sets the Input's backgroundColor | string | no | iOS/Android | Yes | +| rounded | Sets the corners to be rounded | boolean | no | iOS/Android | Yes | +| borderless | Sets the Input's borderWidth to 0 | boolean | no | iOS/Android | Yes | +| viewPass | Adds the functionality of pressing a button in order to see your password's letters | boolean | no | iOS/Android | Yes | +| icon | Choose your Icon's name from Expo's icon list | string | no | iOS/Android | Yes | +| iconColor | Changes the Icon's color | string | no | iOS/Android | Yes | +| family | Choose your Icon's family from the same list | string | no | iOS/Android | Yes | +| color | Sets the Input's text color. | string | no | iOS/Android | Yes | +| help | Sets a helper line for more information regarding your input. | string | no | iOS/Android | Yes | +| left | Sets the Icon to the left of the Input. | boolean | no | iOS/Android | Yes | +| right | Sets the Icon to the right of the Input. | boolean | no | iOS/Android | Yes | +| topHelp | Sets the helper line above the input. | boolean | no | iOS/Android | Yes | +| bottomHelp | Sets the helper line below the input. | boolean | no | iOS/Android | Yes | ### [NavBar](https://galio.io/docs/#/components/navbar?id=navbar) -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| :-----------: | :----------------------------------------------------------: | :----------: | :------: | :---------: | :---------------: | -| back | Adds a back button for your navBar. | boolean | no | iOS/Android | Yes | -| transparent | Sets the backgroundColor and borderColor to 'transparent' | boolean | no | iOS/Android | Yes | -| title | Title of the NavBar | node, string | no | iOS/Android | Yes | -| titleStyle | Sets the styling for the title | object | no | iOS/Android | Yes | -| left | Left side of the NavBar | node | no | iOS/Android | Yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :-----------: | :-----------------------------------------------------------: | :----------: | :------: | :---------: | :---------------: | +| back | Adds a back button for your navBar. | boolean | no | iOS/Android | Yes | +| transparent | Sets the backgroundColor and borderColor to 'transparent' | boolean | no | iOS/Android | Yes | +| title | Title of the NavBar | node, string | no | iOS/Android | Yes | +| titleStyle | Sets the styling for the title | object | no | iOS/Android | Yes | +| left | Left side of the NavBar | node | no | iOS/Android | Yes | | leftStyle | Sets the styling for the View wrapping the left side element. | object | no | iOS/Android | Yes | -| leftIconColor | Sets the color of the left side's icon. | string | no | iOS/Android | Yes | -| onLeftPress | Function for the left side of the navbar | function | no | iOS/Android | Yes | -| right | Right side of the NavBar | node | no | iOS/Android | Yes | +| leftIconColor | Sets the color of the left side's icon. | string | no | iOS/Android | Yes | +| onLeftPress | Function for the left side of the navbar | function | no | iOS/Android | Yes | +| right | Right side of the NavBar | node | no | iOS/Android | Yes | | rightStyle | Sets the styling for the View wrapping the left side element. | object | no | iOS/Android | Yes | ### [Radio](https://galio.io/docs/#/components/radio?id=radio) -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| :-------------: | :---------------------------------------: | :----------------------------------------------------------: | :------: | :---------: | :---------------: | -| color | color. | string | no | iOS/Android | Yes | -| containerStyle | Container Style | any | no | iOS/Android | Yes | -| radioOuterStyle | Title of the NavBar | any | no | iOS/Android | Yes | -| radioInnerStyle | Sets the styling for the title | any | no | iOS/Android | Yes | -| disabled | Prohibited Use | boolean | no | iOS/Android | Yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :-------------: | :---------------------------------------: | :-------------------------------------------------------------------: | :------: | :---------: | :---------------: | +| color | color. | string | no | iOS/Android | Yes | +| containerStyle | Container Style | any | no | iOS/Android | Yes | +| radioOuterStyle | Title of the NavBar | any | no | iOS/Android | Yes | +| radioInnerStyle | Sets the styling for the title | any | no | iOS/Android | Yes | +| disabled | Prohibited Use | boolean | no | iOS/Android | Yes | | flexDirection | Determines the direction of the main axis | oneOfType(['row', 'row-reverse', 'column', 'column-reverse']), string | no | iOS/Android | Yes | -| initialValue | Initial Value | boolean | no | iOS/Android | Yes | -| label | Label | string | no | iOS/Android | Yes | -| labelStyle | Label Styles | any | no | iOS/Android | Yes | -| onChange | Change when radio is seleted | function | no | iOS/Android | Yes | +| initialValue | Initial Value | boolean | no | iOS/Android | Yes | +| label | Label | string | no | iOS/Android | Yes | +| labelStyle | Label Styles | any | no | iOS/Android | Yes | +| onChange | Change when radio is seleted | function | no | iOS/Android | Yes | ### [Text](https://galio.io/docs/#/components/text?id=text) @@ -350,58 +347,57 @@ export default CardDemo; ### [Toast Notification](https://galio.io/docs/#/components/toastnotification?id=toast-notification) -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| :---------------: | :----------------------------------------------------------: | :---------: | :------: | :---------: | :---------------: | -| style | Styling the Block which encapsulate | object | no | iOS/Android | Yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :---------------: | :--------------------------------------------------------------------------------------------------: | :---------: | :------: | :---------: | :---------------: | +| style | Styling the Block which encapsulate | object | no | iOS/Android | Yes | | children | The content of your toast notification. You can even just write a text or create your own component. | node/string | no | iOS/Android | Yes | -| isShow | Toggle between the toast being shown or not. | bool | no | iOS/Android | Yes | -| positionIndicator | one of: 'top', 'center', 'bottom' | string | no | iOS/Android | Yes | -| positionOffset | Whether to use positioning | number | no | iOS/Android | Yes | -| fadeInDuration | The number of ms for the fade in animation. | number | no | iOS/Android | Yes | -| fadeOutDuration | The number of ms for the fade out animation. | number | no | iOS/Android | Yes | -| color | one of: 'primary', 'theme', 'info', 'warning', 'success' | string | no | iOS/Android | Yes | -| round | Maybe you want a rounded toast notification? | boolean | no | iOS/Android | Yes | -| textStyle | Style object for the children prop used as a string. | object | no | iOS/Android | Yes | +| isShow | Toggle between the toast being shown or not. | bool | no | iOS/Android | Yes | +| positionIndicator | one of: 'top', 'center', 'bottom' | string | no | iOS/Android | Yes | +| positionOffset | Whether to use positioning | number | no | iOS/Android | Yes | +| fadeInDuration | The number of ms for the fade in animation. | number | no | iOS/Android | Yes | +| fadeOutDuration | The number of ms for the fade out animation. | number | no | iOS/Android | Yes | +| color | one of: 'primary', 'theme', 'info', 'warning', 'success' | string | no | iOS/Android | Yes | +| round | Maybe you want a rounded toast notification? | boolean | no | iOS/Android | Yes | +| textStyle | Style object for the children prop used as a string. | object | no | iOS/Android | Yes | ### [Slider](https://galio.io/docs/#/components/slider?id=slider) -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| :---------------: | :----------------------------------------------------------: | :------: | :------: | :---------: | :---------------: | -| activeColor | This sets the active color of your slider. | string | no | iOS/Android | Yes | -| value | The initial value at which the thumb of the slider is positioned | number | no | iOS/Android | Yes | -| disabled | This prop makes the slider unusable to the user. | boolean | no | iOS/Android | Yes | -| minimumValue | Sets the minimum value for the Slider. | number | no | iOS/Android | Yes | -| maximumValue | Sets the maximum value for the Slider. | number | no | iOS/Android | Yes | -| trackStyle | By passing an object you can style the track of the Slider. | any | no | iOS/Android | Yes | -| thumbStyle | By passing an object you can style the thumb of the Slider. | any | no | iOS/Android | Yes | -| step | This is a stepper. It sets fixed values for the thumb. | number | no | iOS/Android | Yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :---------------: | :----------------------------------------------------------------------------------------------: | :------: | :------: | :---------: | :---------------: | +| activeColor | This sets the active color of your slider. | string | no | iOS/Android | Yes | +| value | The initial value at which the thumb of the slider is positioned | number | no | iOS/Android | Yes | +| disabled | This prop makes the slider unusable to the user. | boolean | no | iOS/Android | Yes | +| minimumValue | Sets the minimum value for the Slider. | number | no | iOS/Android | Yes | +| maximumValue | Sets the maximum value for the Slider. | number | no | iOS/Android | Yes | +| trackStyle | By passing an object you can style the track of the Slider. | any | no | iOS/Android | Yes | +| thumbStyle | By passing an object you can style the thumb of the Slider. | any | no | iOS/Android | Yes | +| step | This is a stepper. It sets fixed values for the thumb. | number | no | iOS/Android | Yes | | onSlidingComplete | By passing an arrow function you can decide what is going to happen when the Sliding is complete | function | no | iOS/Android | Yes | -| onSlidingStart | By passing an arrow function you can decide what is going to happen when the Sliding starts | function | no | iOS/Android | Yes | -| onValueChange | By passing an arrow function you can decide what is going to happen when the Sliding is moving. | function | no | iOS/Android | Yes | +| onSlidingStart | By passing an arrow function you can decide what is going to happen when the Sliding starts | function | no | iOS/Android | Yes | +| onValueChange | By passing an arrow function you can decide what is going to happen when the Sliding is moving. | function | no | iOS/Android | Yes | ### [Switch](https://galio.io/docs/#/components/switch?id=switch) -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| :-----------------: | :------------------------------------------: | :----------------------------------------------------------: | :------: | :---------: | :---------------: | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :-----------------: | :------------------------------------------: | :----------------------------------------------------------------------------: | :------: | :---------: | :---------------: | | color | Switch Color | oneOfType(['primary', 'theme', 'error', 'warning', 'success', 'info']), string | no | No | No | -| disabled | Whether the switch is disabled | boolean | no | iOS/Android | Yes | -| initialValue | Initial value | boolean | no | iOS/Android | Yes | -| trackColor | track Color | object | no | iOS/Android | Yes | -| ios_backgroundColor | ios background color | string | no | iOS/Android | Yes | -| onChange | Events that occur when the switch is changed | function | yes | iOS/Android | Yes | +| disabled | Whether the switch is disabled | boolean | no | iOS/Android | Yes | +| initialValue | Initial value | boolean | no | iOS/Android | Yes | +| trackColor | track Color | object | no | iOS/Android | Yes | +| ios_backgroundColor | ios background color | string | no | iOS/Android | Yes | +| onChange | Events that occur when the switch is changed | function | yes | iOS/Android | Yes | ### [GalioTheme](https://galio.io/docs/?ref=galio-repo#/GalioTheme?id=galiotheme-usage) -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| :---: | :----------------------------------------------------------: | :----: | :------: | :---------: | :---------------: | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :---: | :----------------------------------------------------------------------------------------------------------------: | :----: | :------: | :---------: | :---------------: | | color | Theme color, [COLORS reference table](https://galio.io/docs/?ref=galio-repo#/GalioTheme?id=colors-reference-table) | Object | no | iOS/Android | Yes | -| size | Set Font Size, [SIZES reference table](https://galio.io/docs/?ref=galio-repo#/GalioTheme?id=sizes-reference-table) | Object | no | iOS/Android | Yes | - -## 遗留问题 +| size | Set Font Size, [SIZES reference table](https://galio.io/docs/?ref=galio-repo#/GalioTheme?id=sizes-reference-table) | Object | no | iOS/Android | Yes | -## 其他 +## Known Issues -## 开源协议 +## Others -本项目基于 [The MIT License(MIT)](https://github.com/galio-org/galio/blob/master/LICENSE.md),请自由地享受和参与开源。 +## License +This project is licensed under [The MIT License(MIT)](https://github.com/galio-org/galio/blob/master/LICENSE.md). -- Gitee From 0a9bc4f2af815c5833b2b0450e294ace00bbe3c6 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 09:48:37 +0800 Subject: [PATCH 03/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91klarna-platform-colors=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/klarna-platform-colors.md | 97 +++++++++++++++++------------------- 1 file changed, 47 insertions(+), 50 deletions(-) diff --git a/en/klarna-platform-colors.md b/en/klarna-platform-colors.md index ad4f4497..a2887206 100644 --- a/en/klarna-platform-colors.md +++ b/en/klarna-platform-colors.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

@klarna/platform-colors

@@ -13,15 +13,15 @@

-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/platform-colors) +> [!TIP] [Github address](https://github.com/react-native-oh-library/platform-colors) -## 安装与使用 +## Installation and Usage -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/platform-colors Releases](https://github.com/react-native-oh-library/platform-colors/releases),并下载适用版本的 tgz 包。 +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/platform-colors Releases](https://github.com/react-native-oh-library/platform-colors/releases). -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: -> [!TIP] # 处替换为 tgz 包的路径 +> [!TIP] Replace the content with the path of the .tgz package at the comment sign (#). @@ -37,13 +37,13 @@ npm install @react-native-oh-tpl/platform-colors@file:# yarn add @react-native-oh-tpl/platform-colors@file:# ``` -生成资源文件: +Generate resource files: ```bash npx @react-native-oh-tpl/platform-colors ``` -> [!TIP] 第一次运行该命令时,它将提示您要为哪些平台生成文件,确定后将在工程根目录创建具有以下格式的文件: +> [!TIP] The first time you run the command it will prompt you which platforms you want to generate files for which will create a file with the following format: ```js // platform-colors.config.js @@ -74,9 +74,9 @@ module.exports = { }; ``` -现在检查你的 android, ios 和 harmony 文件夹。您应该在每个平台上都有您的颜色定义。 +Now go ahead and inspect your android, ios and web folders. You should have your color definitions on each platform. -当您需要修改颜色资源时,只需更改`colors`配置,然后再次执行以下命令即可生成最新的颜色资源 +You need to re-run the command after each change to the config to update the generated files. ```bash npx @react-native-oh-tpl/platform-colors @@ -84,9 +84,9 @@ npx @react-native-oh-tpl/platform-colors -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```ts import React from "react"; @@ -171,17 +171,17 @@ const styles = StyleSheet.create({ }); ``` -## 使用 Codegen +## Use Codegen -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/zh-cn/codegen.md). ## Link -目前鸿蒙暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. -首先需要使用 DevEco Studio 打开项目里的鸿蒙工程 `harmony` +Open the `harmony` directory of the HarmonyOS project in DevEco Studio. -### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 +### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project ```json { @@ -192,18 +192,15 @@ const styles = StyleSheet.create({ } ``` -### 2.引入原生端代码 +### 2. Introducing Native Code -目前有两种方法: +Currently, two methods are available: -1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法); -2. 直接链接源码。 +Method 1 (recommended): Use the HAR file. -方法一:通过 har 包引入(推荐) +> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. -> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 - -打开 `entry/oh-package.json5`,添加以下依赖 +Open `entry/oh-package.json5` file and add the following dependencies: ```json "dependencies": { @@ -212,22 +209,22 @@ const styles = StyleSheet.create({ } ``` -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -方法二:直接链接源码 +Method 2: Directly link to the source code. -> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) +> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). -### 3.在 ArkTs 侧引入 RNPlatformColorsPackage +### 3. Introducing RNPlatformColorsPackage to ArkTS -打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... @@ -241,36 +238,36 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 4. Running -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -然后编译、运行即可。 +Then build and run the code. -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/platform-colors Releases](https://github.com/react-native-oh-library/platform-colors/releases) +Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/platform-colors Releases](https://github.com/react-native-oh-library/platform-colors/releases) -## 属性 +## Properties -### platform-colors.config.js 配置文件属性 +### platform-colors.config.js configuration files Properties -> 详情见 [@klarna/platform-colors 文档](https://github.com/klarna-incubator/platform-colors) +> details [@klarna/platform-colors documentation](https://github.com/klarna-incubator/platform-colors) -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. | Name | Description | Type | Required | Platform | HarmonyOS Support | | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | ----------- | ----------------- | @@ -284,9 +281,9 @@ ohpm install ## API -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. | Name | Description | Type | Required | Platform | HarmonyOS Support | | ---------------- | ------------------------------------ | -------- | -------- | ----------- | ----------------- | @@ -313,10 +310,10 @@ resolveColor(color: ColorValue): Promise; | ----- | -------------------------------------------------------------------------------------------------------------- | ---------------- | -------- | ----------- | ----------------- | | color | Color value obtained through the PlatformColor interface.
Example: resolveColor(PlatformColor('coloeName')) | React.ColorValue | Yes | iOS/Android | Yes | -## 遗留问题 +## Known Issues -## 其他 +## Others -## 开源协议 +## License -本项目基于 [Apache License 2.0](https://github.com/klarna-incubator/platform-colors/blob/master/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [Apache License 2.0](https://github.com/klarna-incubator/platform-colors/blob/master/LICENSE). -- Gitee From d18673f21d20174294ea25cb98b14b38dde00bee Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 09:49:25 +0800 Subject: [PATCH 04/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-content-loader=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-content-loader.md | 137 +++++++++++++++++++------------------ 1 file changed, 72 insertions(+), 65 deletions(-) diff --git a/en/react-content-loader.md b/en/react-content-loader.md index 0464395d..132c28f1 100644 --- a/en/react-content-loader.md +++ b/en/react-content-loader.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-content-loader

@@ -12,16 +12,15 @@

-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-content-loader) +> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-content-loader) -## 安装与使用 +## Installation and Usage -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-content-loader Releases](https://github.com/react-native-oh-library/react-content-loader/releases),并下载适用版本的 tgz 包。 +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-content-loader Releases](https://github.com/react-native-oh-library/react-content-loader/releases). +Go to the project directory and execute the following instruction: -进入到工程目录并输入以下命令: - -> [!TIP] # 处替换为 tgz 包的路径 +> [!TIP] Replace the content with the path of the .tgz package at the comment sign (#). @@ -39,84 +38,92 @@ yarn add @react-native-oh-tpl/react-content-loader@file:# -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js -import ContentLoader, { Facebook, Code, List, BulletList, Instagram, Rect, Circle } from 'react-content-loader/native' -import { View, ScrollView } from "react-native" +import ContentLoader, { + Facebook, + Code, + List, + BulletList, + Instagram, + Rect, + Circle, +} from "react-content-loader/native"; +import { View, ScrollView } from "react-native"; export function AppExample() { - return - - - - - - - - - - - - + return ( + + + + + + + + + + + + + + ); } - ``` + ## Link -本库依赖@react-native-oh-tpl/react-native-svg,如已在鸿蒙工程中引入过该库,则无需再次引入。 +The HarmonyOS implementation of this library depends on the native code from @react-native-oh-tpl/react-native-svg. If this library is included into your HarmonyOS application, there is no need to include it again; you can skip the steps in this section and use it directly. -如未引入请参照[@react-native-oh-tpl/react-native-svg 文档](/zh-cn/react-native-svg-capi.md)进行引入 +If it is not included, follow the guide provided in [@react-native-oh-tpl/react-native-svg](/zh-cn/react-native-svg-capi.md) to add it to your project. +## Constraints -## 约束与限制 +### Compatibility -### 兼容性 +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. +Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-content-loader Releases](https://github.com/react-native-oh-library/react-content-loader/releases) -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +## Properties -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-content-loader Releases](https://github.com/react-native-oh-library/react-content-loader/releases) +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. -## 属性 +### Options -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | -------- | -------------- | ----------------- | +| animate | Opt-out of animations with false | boolean | no | all | yes | +| speed | Animation speed in seconds | number | no | all | yes | +| rtl | Content right-to-left | boolean | no | all | yes | +| backgroundColor | Used as background of animation | string | no | all | yes | +| viewBox | Use viewBox props to set a custom viewBox value,for more information about how to use it,read the article [How to Scale SVG](https://css-tricks.com/scale-svg/) | string | no | all | yes | +| foregroundColor | Used as the foreground of animation | string | no | all | yes | +| interval | Animation interval in seconds | number | no | all | yes | +| beforeMask | Define custom shapes before content | JSX.Element | no | all | partially | +| uniqueKey | Use the same value of prop key, that will solve inconsistency on the SSR | string | no | React DOM only | no | +| title | It's used to describe what element it is. Use '' (empty string) to remove. | string | no | React DOM only | no | +| baseUrl | Required if you're using `` document ``. This prop is common used as: `` which will fill the SVG attribute with the relative path. Related [#93](https://github.com/danilowoz/react-content-loader/issues/93). | string | no | React DOM only | no | +| backgroundOpacity | Background opacity (0 = transparent, 1 = opaque)used to solve an issue in [Safari](#safari--ios) | number | no | React DOM only | no | +| foregroundOpacity | Animation opacity (0 = transparent, 1 = opaque)used to solve an issue in [Safari](#safari--ios) | number | no | React DOM only | no | +| style | css style | React.CSSProperties | no | React DOM only | no | -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +## Known Issues -### Options +- [ ] beforeMaskProperties 设置非 svg 暴露出来的组件时无效: [issue#256](https://github.com/react-native-oh-library/react-native-harmony-svg/issues/256) + +## Others + +## License -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ---- | ----------- | ---- | -------- | -------- | ------------------ | -| animate | Opt-out of animations with false | boolean | no | all | yes | -| speed | Animation speed in seconds | number | no | all | yes | -| rtl | Content right-to-left | boolean | no | all | yes | -| backgroundColor | Used as background of animation | string | no | all | yes | -| viewBox | Use viewBox props to set a custom viewBox value,for more information about how to use it,read the article [How to Scale SVG](https://css-tricks.com/scale-svg/) | string | no | all | yes | -| foregroundColor | Used as the foreground of animation | string | no | all | yes | -| interval | Animation interval in seconds | number | no | all | yes | -| beforeMask | Define custom shapes before content | JSX.Element | no | all | partially | -| uniqueKey | Use the same value of prop key, that will solve inconsistency on the SSR | string | no | React DOM only | no | -| title | It's used to describe what element it is. Use '' (empty string) to remove. | string | no | React DOM only | no | -| baseUrl | Required if you're using `` document ``. This prop is common used as: `` which will fill the SVG attribute with the relative path. Related [#93](https://github.com/danilowoz/react-content-loader/issues/93). | string | no | React DOM only | no | -| backgroundOpacity | Background opacity (0 = transparent, 1 = opaque)used to solve an issue in [Safari](#safari--ios) | number | no | React DOM only | no | -| foregroundOpacity | Animation opacity (0 = transparent, 1 = opaque)used to solve an issue in [Safari](#safari--ios) | number | no | React DOM only | no | -| style | css style | React.CSSProperties | no | React DOM only | no | - - -## 遗留问题 -- [ ] beforeMask属性设置非svg暴露出来的组件时无效: [issue#256](https://github.com/react-native-oh-library/react-native-harmony-svg/issues/256) -## 其他 - -## 开源协议 - -本项目基于 [The MIT License (MIT)](https://github.com/danilowoz/react-content-loader/blob/master/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file +This project is licensed under [The MIT License (MIT)](https://github.com/danilowoz/react-content-loader/blob/master/LICENSE). -- Gitee From 9673440ad55784134c913d213ee92b22ed44ce68 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 09:57:01 +0800 Subject: [PATCH 05/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-countdown-circle-timer=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-countdown-circle-timer.md | 124 +++++++++++++++-------------- 1 file changed, 63 insertions(+), 61 deletions(-) diff --git a/en/react-countdown-circle-timer.md b/en/react-countdown-circle-timer.md index 326bd8f1..5b9744bd 100644 --- a/en/react-countdown-circle-timer.md +++ b/en/react-countdown-circle-timer.md @@ -1,5 +1,4 @@ - -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-countdown-circle-timer

@@ -13,10 +12,9 @@

+> [!TIP] [ GitHub address](https://github.com/vydimitrov/react-countdown-circle-timer) -> [!TIP] [Github 地址](https://github.com/vydimitrov/react-countdown-circle-timer) - -## 安装与使用 +## Installation and Usage @@ -34,22 +32,21 @@ yarn add react-native-countdown-circle-timer@3.2.1 -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js -import React, { useState } from 'react' -import { View, StyleSheet, Button, Text, ScrollView } from 'react-native'; -import { CountdownCircleTimer } from 'react-native-countdown-circle-timer' +import React, { useState } from "react"; +import { View, StyleSheet, Button, Text, ScrollView } from "react-native"; +import { CountdownCircleTimer } from "react-native-countdown-circle-timer"; +export function SwitchDemo() { + const [isPlaying, setIsPlaying] = useState(true); + const [count, setCount] = useState(15); -export function SwitchDemo(){ - const [isPlaying, setIsPlaying] = useState(true) - const [count, setCount] = useState(15) - - return( - + return ( + { - console.log('Counter is ', count) - console.log('Remaining time is ', remainingTime) + console.log("Counter is ", count); + console.log("Remaining time is ", remainingTime); }} onComplete={() => ({ shouldRepeat: true })} > {({ remainingTime }) => remainingTime} - - + + - ) - } - const styles = StyleSheet.create({ - container: { - alignItems: "center", - justifyContent: "center", - backgroundColor:"#fff", - - } - }); + ); +} +const styles = StyleSheet.create({ + container: { + alignItems: "center", + justifyContent: "center", + backgroundColor: "#fff", + }, +}); ``` + ## Link -本库 HarmonyOS 侧实现依赖@react-native-oh-tpl/react-native-svg 的原生端代码,如已在 HarmonyOS 工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。 +The HarmonyOS implementation of this library depends on the native code from @react-native-oh-tpl/react-native-svg. If this library is included into your HarmonyOS application, there is no need to include it again; you can skip the steps in this section and use it directly. -如未引入请参照[@react-native-oh-tpl/react-native-svg 文档的 Link 章节](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-svg-capi.md#link)进行引入 +If it is not included, follow the guide provided in [@react-native-oh-tpl/react-native-svg](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-svg-capi.md#link) to add it to your project. -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -本文档内容基于以下版本验证通过: +This document is verified based on the following versions: 1. RNOH: 0.72.27; SDK: HarmonyOS-NEXT-DB1 5.0.0.25; IDE: DevEco Studio 5.0.3.400SP7; ROM: 3.0.0.29; -## 属性 - -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +## Properties -> [!TIP] "HarmonyOS Support"列为 Yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| :----------------: | :----------------------------------------------------------: | :-----------------: | :------: | :---------: | :---------------: | -| colors | colors prop is either:(Single valid color in any format or URL to a gradient;Array of colors in HEX format. At least 2 colors should be provided) | `string & string[]` | No | Android/iOS | Yes | -| colorsTime | Indicates the time when a color should switch to the next color. The first number is the countdown duration and the last one is 0 or goal. Works only when colors is an array of HEX colors | number[] | No | Android/iOS | Yes | -| isPlaying | Play or pause animation | boolean | No | Android/iOS | Yes | -| initialRemainingTime | Set the initial remaining time if it is different than the duration | number | No | Android/iOS | Yes | -| updateInterval | Update interval in seconds. Determines how often the timer updates. When set to 0 the value will update on each key frame | number | No | Android/iOS | Yes | -| size | Width and height of the SVG element | number | No | Android/iOS | Yes | -| strokeWidth | Path stroke width | number | No | Android/iOS | Yes | -| trailStrokeWidth | Trail stroke width | number | No | Android/iOS | Yes | -| strokeLinecap | Path stroke line cap | `round 、 square 、 butt` | No | Android/iOS | Yes | -| rotation | Progress path rotation direction| `clockwise 、 counterclockwise` | No | Android/iOS | Yes | -| isGrowing | Indicated if the progress path should be growing instead of shrinking | boolean | No | Android/iOS | Yes | -| trailColor | Circle trail color - takes any valid color format| string | No | Android/iOS | Yes | -| isSmoothColorTransition |Indicates if the colors should smoothly transition to the next color | boolean | No | Android/iOS | Yes | -| children | Render function to customize the time/content in the center of the circle | function | No | Android/iOS |Yes -| onComplete | On animation complete event handler | function | No | Android/iOS | Yes | -| onUpdate | On remaining time update event handler | function | No | Android/iOS | Yes | +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :---------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------: | :------: | :---------: | :---------------: | +| colors | colors prop is either:(Single valid color in any format or URL to a gradient;Array of colors in HEX format. At least 2 colors should be provided) | `string & string[]` | No | Android/iOS | Yes | +| colorsTime | Indicates the time when a color should switch to the next color. The first number is the countdown duration and the last one is 0 or goal. Works only when colors is an array of HEX colors | number[] | No | Android/iOS | Yes | +| isPlaying | Play or pause animation | boolean | No | Android/iOS | Yes | +| initialRemainingTime | Set the initial remaining time if it is different than the duration | number | No | Android/iOS | Yes | +| updateInterval | Update interval in seconds. Determines how often the timer updates. When set to 0 the value will update on each key frame | number | No | Android/iOS | Yes | +| size | Width and height of the SVG element | number | No | Android/iOS | Yes | +| strokeWidth | Path stroke width | number | No | Android/iOS | Yes | +| trailStrokeWidth | Trail stroke width | number | No | Android/iOS | Yes | +| strokeLinecap | Path stroke line cap | `round 、 square 、 butt` | No | Android/iOS | Yes | +| rotation | Progress path rotation direction | `clockwise 、 counterclockwise` | No | Android/iOS | Yes | +| isGrowing | Indicated if the progress path should be growing instead of shrinking | boolean | No | Android/iOS | Yes | +| trailColor | Circle trail color - takes any valid color format | string | No | Android/iOS | Yes | +| isSmoothColorTransition | Indicates if the colors should smoothly transition to the next color | boolean | No | Android/iOS | Yes | +| children | Render function to customize the time/content in the center of the circle | function | No | Android/iOS | Yes | +| onComplete | On animation complete event handler | function | No | Android/iOS | Yes | +| onUpdate | On remaining time update event handler | function | No | Android/iOS | Yes | -## 遗留问题 +## Known Issues -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/vydimitrov/react-countdown-circle-timer/blob/master/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/vydimitrov/react-countdown-circle-timer/blob/master/LICENSE). -- Gitee From 68850fcbd5ebfe4fc6da6b046f0b276230e8c9b3 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 09:57:47 +0800 Subject: [PATCH 06/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-audio-recorder-player=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-audio-recorder-player.md | 149 ++++++++++++----------- 1 file changed, 78 insertions(+), 71 deletions(-) diff --git a/en/react-native-audio-recorder-player.md b/en/react-native-audio-recorder-player.md index 50fb1e13..5b22ff47 100644 --- a/en/react-native-audio-recorder-player.md +++ b/en/react-native-audio-recorder-player.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-native-audio-recorder-player

@@ -12,15 +12,15 @@

-> [!tip] [Github 地址](https://github.com/react-native-oh-library/react-native-audio-recorder-player) +> [!tip] [ GitHub address](https://github.com/react-native-oh-library/react-native-audio-recorder-player) -## 安装与使用 +## Installation and Usage -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-audio-recorder-player Releases](https://github.com/react-native-oh-library/react-native-audio-recorder-player/releases),并下载适用版本的 tgz 包。 +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-audio-recorder-player Releases](https://github.com/react-native-oh-library/react-native-audio-recorder-player/releases). -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: -> [!tip] # 处替换为 tgz 包的路径 +> [!tip] Replace the content with the path of the .tgz package at the comment sign (#). #### **npm** @@ -34,9 +34,9 @@ npm install @react-native-oh-tpl/react-native-audio-recorder-player@file:# yarn add @react-native-oh-tpl/react-native-audio-recorder-player@file:# ``` -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js import AudioRecorderPlayer, { @@ -510,13 +510,14 @@ class Page extends Component { export default Page; ``` + ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +Open the `harmony` directory of the HarmonyOS project in DevEco Studio. -### 在工程根目录的 `oh-package.json5` 添加 overrides 字段 +### Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project ```json { @@ -526,18 +527,16 @@ export default Page; } } ``` -### 引入原生端代码 -目前有两种方法: +### Introducing Native Code -1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法); -2. 直接链接源码。 +Currently, two methods are available: -方法一:通过 har 包引入(推荐) +Method 1 (recommended): Use the HAR file. -> [!tip] har 包位于三方库安装路径的 `harmony` 文件夹下。 +> [!tip] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. -打开 `entry/oh-package.json5`,添加以下依赖 +Open `entry/oh-package.json5` file and add the following dependencies: ```json "dependencies": { @@ -546,21 +545,23 @@ export default Page; "@react-native-oh-tpl/react-native-audio-recorder-player": "file:../../node_modules/@react-native-oh-tpl/react-native-audio-recorder-player/harmony/audio_recorder_player.har" } ``` -点击右上角的 `sync` 按钮 -或者在终端执行: +Click the `sync` button in the upper right corner. + +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -方法二:直接链接源码 -> [!tip] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) +Method 2: Directly link to the source code. + +> [!tip] or details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). -### 配置 CMakeLists 和引入 RNAudioRecorderPlayerPackage +### Configuring CMakeLists and Introducing RNAudioRecorderPlayerPackage -打开 `entry/src/main/cpp/CMakeLists.txt`,添加: +Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff project(rnapp) @@ -597,7 +598,8 @@ target_link_libraries(rnoh_app PUBLIC rnoh_sample_package) + target_link_libraries(rnoh_app PUBLIC rnoh_audio_recorder_player) # RNOH_END: manual_package_linking_2 ``` -打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +Open `entry/src/main/cpp/PackageProvider.cpp` and add the following code: ```diff #include "RNOH/PackageProvider.h" @@ -615,9 +617,10 @@ std::vector> PackageProvider::getPackages(Package::Cont }; } ``` -### 在 ArkTs 侧引入 react-native-audio-recorder-player Package -打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: +### Introducing react-native-audio-recorder-player Package to ArkTS + +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff + import {RNAudioRecorderPlayerPackage} from '@react-native-oh-tpl/react-native-audio-recorder-player/ts'; @@ -629,31 +632,33 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` -### 运行 -点击右上角的 `sync` 按钮 +### Running -或者在终端执行: +Click the `sync` button in the upper right corner. + +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -然后编译、运行即可。 -## 约束与限制 +Then build and run the code. + +## Constraints -### 兼容性 +### Compatibility -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-library/react-native-audio-recorder-player Releases](https://github.com/react-native-oh-library/react-native-audio-recorder-player/releases) +Check the release version information in the release address of the third-party library: [@react-native-oh-library/react-native-audio-recorder-player Releases](https://github.com/react-native-oh-library/react-native-audio-recorder-player/releases) -### 权限要求 +### Permission Requirements -#### 在 entry 目录下的module.json5中添加权限 +#### Include applicable permissions in the module.json5 file within the entry directory. -打开 `entry/src/main/module.json5`,添加: +Open the `entry/src/main/module.json5` file and add the following code: ```diff ... @@ -672,9 +677,10 @@ ohpm install ] ] ``` -#### 在 entry 目录下添加申请权限的原因 -打开 `entry/src/main/resources/base/element/string.json`,添加: +#### Apply the reasons for applicable permission in the entry directory. + +Open the `entry/src/main/resources/base/element/string.json` file and add the following code: ```diff ... @@ -687,36 +693,37 @@ ohpm install ] } ``` + ## API -> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 - -> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 - -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -------- | -------- | ----------------- | -| `mmss` | Convert milliseconds to minute:second string | function(milliseconds:number): string | No | Android,iOS | yes | -| `mmssss` | Convert milliseconds to minute:second:milliseconds string | function(milliseconds:number): string | No | Android,iOS | yes | -| `setSubscriptionDuration` | Set default callback time when starting recorder or player. Default to 0.5 which is 500ms| function(seconds:float):void | No | Android,iOS | yes | -| `addRecordBackListener` |Get callback from native module. Will receive currentPosition, currentMetering (if configured in startRecorder). | function(callBack:(value:RecordBackType)=>void): void | No | Android,iOS | yes | -| `removeRecordBackListener` |Removes recordBack listener. | function(): void | No | Android,iOS | yes | -| `addPlayBackListener` | Get callback from native module. Will receive duration, currentPosition. | function(callBack:(value: PlayBackType)=>void): void | No | Android,iOS | yes | -| `removePlayBackListener` | Removes playback listener. | function(): void | No | Android,iOS | yes | -| `startRecorder` |Start recording. Not passing uri will save audio in default location. | function(uri?:string,audioSets?: AudioSet,meteringEnabled?: boolean): Promise< string > | No | Android,iOS | yes | -| `pauseRecorder` | Pause recording. | function() : Promise< string > | No | Android,iOS | yes | -| `resumeRecorder` | Resume recording. | function() : Promise< string > | No | Android,iOS | yes | -| `stopRecorder` | Stop recording. | function() : Promise< string > | No | Android,iOS | yes | -| `startPlayer` | Start playing. Not passing the param will play audio in default location. | function(uri?:string,httpHeaders?:Record) : Promise< string > | No | Android,iOS | yes | -| `stopPlayer` | Stop playing. | function() : Promise< string > | No | Android,iOS | yes | -| `pausePlayer` | Pause playing. | function() : Promise< string > | No | Android,iOS | yes | -| `resumePlayer` | Resume playing. | function() : Promise< string > | No | Android,iOS | yes | -| `seekToPlayer` | Seek audio. | function(milliseconds:number) : Promise< string > | No | Android,iOS | yes | -| `setVolume` | Set volume of audio player (default 1.0, range: 0.0 ~ 1.0). | function(volume:float) : Promise< string > | No | Android,iOS | yes | - -## 遗留问题 - -## 其他 - -## 开源协议 - -本项目基于 [The MIT License (MIT)](https://github.com/hyochan/react-native-audio-recorder-player/blob/main/LICENSE) ,请自由地享受和参与开源。 +> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library. + +> [!tip] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. + +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| -------------------------- | ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -------- | ------------ | ----------------- | +| `mmss` | Convert milliseconds to minute:second string | function(milliseconds:number): string | No | Android,iOS | yes | +| `mmssss` | Convert milliseconds to minute:second:milliseconds string | function(milliseconds:number): string | No | Android,iOS | yes | +| `setSubscriptionDuration` | Set default callback time when starting recorder or player. Default to 0.5 which is 500ms | function(seconds:float):void | No | Android,iOS | yes | +| `addRecordBackListener` | Get callback from native module. Will receive currentPosition, currentMetering (if configured in startRecorder). | function(callBack:(value:RecordBackType)=>void): void | No | Android,iOS | yes | +| `removeRecordBackListener` | Removes recordBack listener. | function(): void | No | Android,iOS | yes | +| `addPlayBackListener` | Get callback from native module. Will receive duration, currentPosition. | function(callBack:(value: PlayBackType)=>void): void | No | Android,iOS | yes | +| `removePlayBackListener` | Removes playback listener. | function(): void | No | Android,iOS | yes | +| `startRecorder` | Start recording. Not passing uri will save audio in default location. | function(uri?:string,audioSets?: AudioSet,meteringEnabled?: boolean): Promise< string > | No | Android,iOS | yes | +| `pauseRecorder` | Pause recording. | function() : Promise< string > | No | Android,iOS | yes | +| `resumeRecorder` | Resume recording. | function() : Promise< string > | No | Android,iOS | yes | +| `stopRecorder` | Stop recording. | function() : Promise< string > | No | Android,iOS | yes | +| `startPlayer` | Start playing. Not passing the param will play audio in default location. | function(uri?:string,httpHeaders?:Record) : Promise< string > | No | Android,iOS | yes | +| `stopPlayer` | Stop playing. | function() : Promise< string > | No | Android,iOS | yes | +| `pausePlayer` | Pause playing. | function() : Promise< string > | No | Android,iOS | yes | +| `resumePlayer` | Resume playing. | function() : Promise< string > | No | Android,iOS | yes | +| `seekToPlayer` | Seek audio. | function(milliseconds:number) : Promise< string > | No | Android,iOS | yes | +| `setVolume` | Set volume of audio player (default 1.0, range: 0.0 ~ 1.0). | function(volume:float) : Promise< string > | No | Android,iOS | yes | + +## Known Issues + +## Others + +## License + +This project is licensed under [The MIT License (MIT)](https://github.com/hyochan/react-native-audio-recorder-player/blob/main/LICENSE). -- Gitee From cb944c510758c3c08aa4b04918f5cf52a154c923 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:01:09 +0800 Subject: [PATCH 07/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91rn-sliding-up-panel=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/rn-sliding-up-panel.md | 88 +++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/en/rn-sliding-up-panel.md b/en/rn-sliding-up-panel.md index 97eb827a..e83704e7 100644 --- a/en/rn-sliding-up-panel.md +++ b/en/rn-sliding-up-panel.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

rn-sliding-up-panel

@@ -12,11 +12,11 @@

-> [!TIP] [Github 地址](https://github.com/octopitus/rn-sliding-up-panel) +> [!TIP] [ GitHub address](https://github.com/octopitus/rn-sliding-up-panel) -## 安装与使用 +## Installation and Usage -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: @@ -34,9 +34,9 @@ yarn add rn-sliding-up-panel@2.4.6 -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js import React, { createRef } from 'react'; @@ -171,58 +171,58 @@ const styles = StyleSheet.create({ ``` -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -本文档内容基于以下版本验证通过: +This document is verified based on the following versions: 1. RNOH: 0.72.27; SDK: HarmonyOS-Next-DB1 5.0.0.25; IDE: DevEco Studio 5.0.3.400SP7; ROM: 3.0.0.25; -## 属性 +## Properties -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. ### Props -| Name | Description | Type | Default | Required | Platform | HarmonyOS Support | -| --- | --- | --- | --- | --- | --- | --- | -| animatedValue | An **Animated.Value** number between the top and bottom of draggable range. This number represents the position of the panel. If you update this prop, the panel will correspondingly update to the frame at that progress value. Default to **Animated.Value(0)** (Hidden at bottom of screen). | Animated.Value | 0 | No | All | yes | -| draggableRange | Boundary limits for draggable area. `top` default to visible height of device, `bottom` default to 0. | {top: number, bottom: number} | 0 | No | All | yes | -| snappingPoints | Must be an incremental array of number and all values must be within the `top` & `bottom` of draggableRange. | number[] | null | No | All | yes | -| minimumVelocityThreshold | Velocity threshold in **pixel/s** to trigger the fling animation after you release finger. Default is 0.1. | number | 0.1 | No | All | yes | -| minimumDistanceThreshold | Distance threshold in **pixel** (virtual, not physical) to trigger the fling animation after you release finger. Default is 0.24. | number | 0.24 | No | All | yes | -| height | Height of panel. Typically this should equal to the top value of `draggablerange.` | number | null | No | All | yes | -| friction | Determines how quickly the fling animation settles down and stops. The higher the value, the faster the velocity decreases. Default is 0.998. | number | 0.998 | No | All | yes | -| backdropOpacity | Opacity of the backdrop when the panel is active. Default is 0.75. | number | 0.75 | No | All | yes | -| containerStyle | Custom style for the container. | Style | null | No | All | yes | -| backdropStyle | Custom style for the backdrop. | Style | null | No | All | yes | -| showBackdrop | Controls the visibility of backdrop. Default `true`. | boolean | true | No | All | yes | -| allowMomentum | If `false`, panel will not continue to move when you release your finger. | boolean | null | No | All | yes | -| allowDragging | Default `true`. Setting this to `false` to disable dragging. | boolean | true | No | All | yes | -| avoidKeyboard | If `true` every time animated value changes keyboard will be dismissed. Default `true`. | boolean | true | No | All | yes | -| onBackButtonPress | By default when you press back button (Android) the panel will be closed (Move to `bottom` position of `draggableRange`). Implement this function if you want to custom the behavior. Returning `true` means the event has been handled. | () => boolean | null | No | All | yes | -| onDragStart | Called when the panel is about to start dragging. | (position: number, gestureState: GestureState) => void | null | No | All | yes | -| onDragEnd | Called when you release your finger. | (position: number: gestureState: GestureState) => void | null | No | All | yes | -| onMomentumDragStart | Called when the momentum drag starts. Works exactly the same way of [ScrollView#onMomentumScrollBegin](https://facebook.github.io/react-native/docs/scrollview#onmomentumscrollbegin). | (position: number) => void | null | No | All | yes | -| onMomentumDragEnd | Called when the momentum drag ends. Works exactly the same way of [ScrollView#onMomentumScrollEnd](https://facebook.github.io/react-native/docs/scrollview#onmomentumscrollend). | (position: number) => void | null | No | All | yes | -| onBottomReached | Called when the panel is hidden / reaches the bottom of the screen. | () => void | null | No | All | yes | -| children | Accepts passing a function as component. Invoked with `dragHandlers` (that can be passed into another View like this ``) when the panel is mounted. Useful when you want only a part of your content becomes the drag handler. | React.Element \| Function | null | No | All | yes | +| Name | Description | Type | Default | Required | Platform | HarmonyOS Support | +| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ | ------- | -------- | -------- | ----------------- | +| animatedValue | An **Animated.Value** number between the top and bottom of draggable range. This number represents the position of the panel. If you update this prop, the panel will correspondingly update to the frame at that progress value. Default to **Animated.Value(0)** (Hidden at bottom of screen). | Animated.Value | 0 | No | All | yes | +| draggableRange | Boundary limits for draggable area. `top` default to visible height of device, `bottom` default to 0. | {top: number, bottom: number} | 0 | No | All | yes | +| snappingPoints | Must be an incremental array of number and all values must be within the `top` & `bottom` of draggableRange. | number[] | null | No | All | yes | +| minimumVelocityThreshold | Velocity threshold in **pixel/s** to trigger the fling animation after you release finger. Default is 0.1. | number | 0.1 | No | All | yes | +| minimumDistanceThreshold | Distance threshold in **pixel** (virtual, not physical) to trigger the fling animation after you release finger. Default is 0.24. | number | 0.24 | No | All | yes | +| height | Height of panel. Typically this should equal to the top value of `draggablerange.` | number | null | No | All | yes | +| friction | Determines how quickly the fling animation settles down and stops. The higher the value, the faster the velocity decreases. Default is 0.998. | number | 0.998 | No | All | yes | +| backdropOpacity | Opacity of the backdrop when the panel is active. Default is 0.75. | number | 0.75 | No | All | yes | +| containerStyle | Custom style for the container. | Style | null | No | All | yes | +| backdropStyle | Custom style for the backdrop. | Style | null | No | All | yes | +| showBackdrop | Controls the visibility of backdrop. Default `true`. | boolean | true | No | All | yes | +| allowMomentum | If `false`, panel will not continue to move when you release your finger. | boolean | null | No | All | yes | +| allowDragging | Default `true`. Setting this to `false` to disable dragging. | boolean | true | No | All | yes | +| avoidKeyboard | If `true` every time animated value changes keyboard will be dismissed. Default `true`. | boolean | true | No | All | yes | +| onBackButtonPress | By default when you press back button (Android) the panel will be closed (Move to `bottom` position of `draggableRange`). Implement this function if you want to custom the behavior. Returning `true` means the event has been handled. | () => boolean | null | No | All | yes | +| onDragStart | Called when the panel is about to start dragging. | (position: number, gestureState: GestureState) => void | null | No | All | yes | +| onDragEnd | Called when you release your finger. | (position: number: gestureState: GestureState) => void | null | No | All | yes | +| onMomentumDragStart | Called when the momentum drag starts. Works exactly the same way of [ScrollView#onMomentumScrollBegin](https://facebook.github.io/react-native/docs/scrollview#onmomentumscrollbegin). | (position: number) => void | null | No | All | yes | +| onMomentumDragEnd | Called when the momentum drag ends. Works exactly the same way of [ScrollView#onMomentumScrollEnd](https://facebook.github.io/react-native/docs/scrollview#onmomentumscrollend). | (position: number) => void | null | No | All | yes | +| onBottomReached | Called when the panel is hidden / reaches the bottom of the screen. | () => void | null | No | All | yes | +| children | Accepts passing a function as component. Invoked with `dragHandlers` (that can be passed into another View like this ``) when the panel is mounted. Useful when you want only a part of your content becomes the drag handler. | React.Element \| Function | null | No | All | yes | ### Methods -| Name | Description | Type | Default | Required | Platform | HarmonyOS Support | -| --- | --- | --- | --- | --- | --- | --- | -| show | Calling `show()` without any parameter will showmove the panel to top position (of draggableRange). | Function(value?: number \| Object) | null | No | All | yes | -| hide | Move the panel to the bottom position of draggable range. Note: This method is triggered if you touch the backdrop (If it's visible). | Function | null | No | All | yes | -| scrollIntoView | Typically you don't need to use this method, But if an element is stuck under the keyboard or out of view, you can use this ensure it is visible within the viewable area. | Function(node: number) | null | No | All | yes | +| Name | Description | Type | Default | Required | Platform | HarmonyOS Support | +| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | ------- | -------- | -------- | ----------------- | +| show | Calling `show()` without any parameter will showmove the panel to top position (of draggableRange). | Function(value?: number \| Object) | null | No | All | yes | +| hide | Move the panel to the bottom position of draggable range. Note: This method is triggered if you touch the backdrop (If it's visible). | Function | null | No | All | yes | +| scrollIntoView | Typically you don't need to use this method, But if an element is stuck under the keyboard or out of view, you can use this ensure it is visible within the viewable area. | Function(node: number) | null | No | All | yes | -## 遗留问题 +## Known Issues -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/octopitus/rn-sliding-up-panel/blob/master/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/octopitus/rn-sliding-up-panel/blob/master/LICENSE). -- Gitee From 5a79761ca521b18a2971812282c0e2d344946475 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:02:19 +0800 Subject: [PATCH 08/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91reassure=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/reassure.md | 112 ++++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 58 deletions(-) diff --git a/en/reassure.md b/en/reassure.md index 5a0b0ddd..922551c8 100644 --- a/en/reassure.md +++ b/en/reassure.md @@ -1,6 +1,4 @@ - - -> 模板版本:v0.2.2 +> Template version: v0.2.2

reassure

@@ -15,9 +13,9 @@

-> [!TIP] [Github 地址](https://github.com/callstack/reassure) +> [!TIP] [GitHub address](https://github.com/callstack/reassure) -## 安装与使用 +## Installation and Usage @@ -35,15 +33,15 @@ yarn add reassure@1.0.0 -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. 文件名称结尾必须包含`.perf-test.`,比如:MeasureFunction.perf-test.tsx ```js -import {measureFunction} from 'reassure'; -import {test} from '@jest/globals'; +import { measureFunction } from "reassure"; +import { test } from "@jest/globals"; function fib(n: number): number { if (n <= 1) { @@ -53,30 +51,29 @@ function fib(n: number): number { return fib(n - 1) + fib(n - 2); } -test('MeasureFunction runs 10', async () => { - await measureFunction(() => fib(20), {runs: 10}); +test("MeasureFunction runs 10", async () => { + await measureFunction(() => fib(20), { runs: 10 }); }); -test('MeasureFunction runs 20', async () => { - await measureFunction(() => fib(30), {runs: 20}); +test("MeasureFunction runs 20", async () => { + await measureFunction(() => fib(30), { runs: 20 }); }); -test('MeasureFunction warmupRuns 10', async () => { - await measureFunction(() => fib(30), {warmupRuns: 10}); +test("MeasureFunction warmupRuns 10", async () => { + await measureFunction(() => fib(30), { warmupRuns: 10 }); }); -test('MeasureFunction warmupRuns 20', async () => { - await measureFunction(() => fib(30), {warmupRuns: 20}); +test("MeasureFunction warmupRuns 20", async () => { + await measureFunction(() => fib(30), { warmupRuns: 20 }); }); -test('MeasureFunction writeFile false', async () => { - await measureFunction(() => fib(30), {writeFile: false}); +test("MeasureFunction writeFile false", async () => { + await measureFunction(() => fib(30), { writeFile: false }); }); -test('MeasureFunction writeFile true', async () => { - await measureFunction(() => fib(30), {writeFile: true}); +test("MeasureFunction writeFile true", async () => { + await measureFunction(() => fib(30), { writeFile: true }); }); - ``` ## 基础配置 @@ -86,8 +83,8 @@ test('MeasureFunction writeFile true', async () => { ```js /** @type {import('ts-jest').JestConfigWithTsJest} */ module.exports = { - preset: 'react-native', - setupFilesAfterEnv: ['./jest-setup.js'], + preset: "react-native", + setupFilesAfterEnv: ["./jest-setup.js"], }; ``` @@ -95,10 +92,9 @@ module.exports = { ```js /* eslint-disable no-undef */ -import {configure} from 'reassure'; - -configure({testingLibrary: 'react-native'}); +import { configure } from "reassure"; +configure({ testingLibrary: "react-native" }); ``` ### 安装 jest @@ -109,7 +105,7 @@ configure({testingLibrary: 'react-native'}); npm install --save-dev jest@29.2.1 ``` -### 安装 babel-jest +### 安装 babel-jest 如已安装 babel-jest,可忽略 @@ -131,53 +127,53 @@ npx reassure 性能报告默认在当前工程根目录的`.reassure`文件夹中 -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -本文档内容基于以下版本验证通过: +This document is verified based on the following versions: 1. RNOH:0.72.27; SDK:HarmonyOS NEXT Developer Beta1 5.0.0.25 (API Version 12 Canary4); IDE:DevEco Studio 5.0.3.400SP7; ROM:3.0.0.25; ## API -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| --------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -------- | -------- | ----------------- | -| measureRenders | rendering the passed screen inside a `React.Profiler` component, measuring its performance and writing results to the output file | async function measureRenders(
ui: React.ReactElement,
options?: MeasureRendersOptions,
): Promise { | no | all | yes | -| measureFunction | Allows you to wrap any synchronous function, measure its performance and write results to the output file | async function measureFunction(
fn: () => void,
options?: MeasureFunctionOptions,
): Promise { | no | all | yes | -| resetToDefaults | Reset current config to the original `defaultConfig` object | Function | no | all | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| --------------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | ----------------- | +| measureRenders | rendering the passed screen inside a `React.Profiler` component, measuring its performance and writing results to the output file | async function measureRenders(
ui: React.ReactElement,
options?: MeasureRendersOptions,
): Promise { | no | all | yes | +| measureFunction | Allows you to wrap any synchronous function, measure its performance and write results to the output file | async function measureFunction(
fn: () => void,
options?: MeasureFunctionOptions,
): Promise { | no | all | yes | +| resetToDefaults | Reset current config to the original `defaultConfig` object | Function | no | all | yes | **MeasureRendersOptions** -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ---------- | ------------------------------------------------------------ | --------------------------------------------------- | -------- | -------- | ----------------- | -| runs | number of runs per series for the particular test | number | no | all | yes | -| warmupRuns | number of additional warmup runs that will be done and discarded before the actual runs | number | no | all | yes | -| wrapper | React component, such as a Provider, which the ui will be wrapped with | React.ComponentType<{children: React.ReactElement}> | no | all | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ---------- | ------------------------------------------------------------------------------------------------ | --------------------------------------------------- | -------- | -------- | ----------------- | +| runs | number of runs per series for the particular test | number | no | all | yes | +| warmupRuns | number of additional warmup runs that will be done and discarded before the actual runs | number | no | all | yes | +| wrapper | React component, such as a Provider, which the ui will be wrapped with | React.ComponentType<{children: React.ReactElement}> | no | all | yes | | scenario | a custom async function, which defines user interaction within the ui by utilized RNTL functions | (screen: any) => Promise | no | all | yes | -| writeFile | should write output to file | boolean | no | all | yes | +| writeFile | should write output to file | boolean | no | all | yes | **MeasureFunctionOptions** -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ---------- | ------------------------------------------------------------ | ------- | -------- | -------- | ----------------- | -| runs | number of runs per series for the particular test | number | no | all | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ---------- | --------------------------------------------------------------------------------------- | ------- | -------- | -------- | ----------------- | +| runs | number of runs per series for the particular test | number | no | all | yes | | warmupRuns | number of additional warmup runs that will be done and discarded before the actual runs | number | no | all | yes | -| writeFile | should write output to file | boolean | no | all | yes | +| writeFile | should write output to file | boolean | no | all | yes | **configure** -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| -------------- | ------------------------------------------------------------ | -------------- | -------- | -------- | ----------------- | -| runs | number of runs per series for the particular test | number | no | all | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| -------------- | --------------------------------------------------------------------------------------- | -------------- | -------- | -------- | ----------------- | +| runs | number of runs per series for the particular test | number | no | all | yes | | warmupRuns | number of additional warmup runs that will be done and discarded before the actual runs | number | no | all | yes | -| outputFile | should write output to file | boolean | no | all | yes | -| verbose | make Reassure log more, e.g. for debugging purposes | boolean | no | all | yes | -| testingLibrary | where to look for `render` and `cleanup` functions | TestingLibrary | no | all | yes | +| outputFile | should write output to file | boolean | no | all | yes | +| verbose | make Reassure log more, e.g. for debugging purposes | boolean | no | all | yes | +| testingLibrary | where to look for `render` and `cleanup` functions | TestingLibrary | no | all | yes | **dangerReassure** @@ -186,10 +182,10 @@ npx reassure | inputFilePath | Enter the path to the file | number | no | all | yes | | debug | Enable the debug mode. | number | no | all | yes | -## 遗留问题 +## Known Issues -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/callstack/reassure/blob/main/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/callstack/reassure/blob/main/LICENSE). -- Gitee From 7c5b4c2847146159da50666344ea1251754ba45b Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:02:52 +0800 Subject: [PATCH 09/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-autolink=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-autoLink.md | 183 ++++++++++++++++++------------------ 1 file changed, 90 insertions(+), 93 deletions(-) diff --git a/en/react-native-autoLink.md b/en/react-native-autoLink.md index 69397aa6..85728ced 100644 --- a/en/react-native-autoLink.md +++ b/en/react-native-autoLink.md @@ -1,6 +1,6 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-native-autolink

@@ -14,10 +14,9 @@

+> [!TIP] [ GitHub address](https://github.com/joshswan/react-native-autolink) -> [!TIP] [Github 地址](https://github.com/joshswan/react-native-autolink) - -## 安装与使用 +## Installation and Usage @@ -35,110 +34,108 @@ yarn add react-native-autolink@4.2.0 -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js -import React from 'react'; -import { View, Text, StyleSheet } from 'react-native'; -import Autolink from 'react-native-autolink'; +import React from "react"; +import { View, Text, StyleSheet } from "react-native"; +import Autolink from "react-native-autolink"; const AutolinkDemo = () => { - return ( - - - Here is a demo of react-native-autolink: - - - - ) + return ( + + Here is a demo of react-native-autolink: + + + ); }; const styles = StyleSheet.create({ - container: { - flex: 1, - padding: 20, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#f0f0f0', - }, - text: { - fontSize: 18, - marginBottom: 10, - }, - autolink: { - fontSize: 16, - lineHeight: 24, - }, - link: { - color: 'blue', - textDecorationLine: 'underline', - }, - customLink: { - color: 'red', - textDecorationLine: 'underline', - }, - customText: { - color: 'red', - } + container: { + flex: 1, + padding: 20, + justifyContent: "center", + alignItems: "center", + backgroundColor: "#f0f0f0", + }, + text: { + fontSize: 18, + marginBottom: 10, + }, + autolink: { + fontSize: 16, + lineHeight: 24, + }, + link: { + color: "blue", + textDecorationLine: "underline", + }, + customLink: { + color: "red", + textDecorationLine: "underline", + }, + customText: { + color: "red", + }, }); export default AutolinkDemo; ``` -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -本文档内容基于以下版本验证通过: +This document is verified based on the following versions: 1. RNOH: 0.72.27; SDK: HarmonyOS-NEXT-DB1; IDE: DevEco Studio 5.0.3.400SP7; ROM: 3.0.0.29; -## 属性 - -> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 - -> [!tip] "HarmonyOS Support"列为 Yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 - -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| :----------------: | :----------------------------------------------------------: | :-----------------: | :------: | :---------: | :---------------: | -| component | Override the component used as the output container. | React.ComponentType | No | Android/IOS | Yes | -| email | Whether to link emails (`mailto:{email}`). | boolean | No | Android/IOS | Yes | -| hashtag | Whether to link hashtags to supplied service. Possible values: `false` (disabled), `"facebook"`, `"instagram"`, `"twitter"`. | boolean or string | No | Android/IOS | Yes | -| linkProps | Attributes applied to link Text components. | TextProps | No | Android/IOS | Yes | -| linkStyle | Styles applied to link Text components. *Note:* Will be overriden if `style` supplied in [`linkProps`](https://github.com/joshswan/react-native-autolink#linkprops). | TextStyle | No | Android/IOS | Yes | -| matchers | Array of custom matcher objects with optional press handlers, styling, and text/url extraction. | CustomMatcher[] | No | Android/IOS | Yes | -| mention | Whether to link mentions/handles to supplied service. Possible values: `false` (disabled), `"instagram"`, `"soundcloud"`, `"twitter"`. | boolean or string | No | Android/IOS | Yes | -| onPress | Override default link press behavior. Signature: `(url: string, match: Match) => void`. | function | No | Android/IOS | Yes | -| onLongPress | Handle link long press events. Signature: `(url: string, match: Match) => void`. | function | No | Android/IOS | Yes | -| phone | Whether to link phone numbers. Possible values: `false` (disabled), `true` (`tel:{number}`), `"sms"` or `"text"` (`sms:{number}`). | boolean or string | No | Android/IOS | Yes | -| renderLink | Override default link rendering behavior. Signature: `(text: string, match: Match, index: number) => React.ReactNode`. | function | No | Android/IOS | Yes | -| renderText | Override default text rendering behavior. Signature: `(text: string, index: number) => React.ReactNode`. | function | No | Android/IOS | Yes | -| showAlert | Whether to display an alert before leaving the app (for privacy or accidental clicks). | boolean | No | Android/IOS | Yes | -| stripPrefix | Whether to strip protocol from URL link text (e.g. `https://github.com` -> `github.com`). | boolean | No | Android/IOS | Yes | -| stripTrailingSlash | Whether to strip trailing slashes from URL link text (e.g. `github.com/` -> `github.com`). | boolean | No | Android/IOS | Yes | -| text | The string to parse for links. | string | Yes | Android/IOS | Yes | -| textProps | Attributes applied to non-link Text components. | TextProps | No | Android/IOS | Yes | -| truncate | Maximum length of URL link text. Possible values: `0` (disabled), `1+` (maximum length). | number | No | Android/IOS | Yes | -| truncateChars | Characters to replace truncated URL link text segments with (e.g. `github.com/../repo`) | string | No | Android/IOS | Yes | -| truncateLocation | Override truncation location. Possible values: `"smart"`, `"end"`, `"middle"`. | string | No | Android/IOS | Yes | -| url | Whether to link URLs. Possible values: `false` (disabled), `true`, `UrlConfig` (see below). | boolean or object | No | Android/IOS | Yes | -| useNativeSchemes | Whether to use native app schemes (e.g. `twitter://`) rather than web URLs when linking to services for hashtag and mention links. | boolean | No | Android/IOS | Yes | - -## 遗留问题 - -## 其他 - -## 开源协议 - -本项目基于 [The MIT License](https://github.com/joshswan/react-native-autolink/blob/master/LICENSE) ,请自由地享受和参与开源。 - - \ No newline at end of file +## Properties + +> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library. + +> [!tip] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. + +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| :----------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------: | :------: | :---------: | :---------------: | +| component | Override the component used as the output container. | React.ComponentType | No | Android/IOS | Yes | +| email | Whether to link emails (`mailto:{email}`). | boolean | No | Android/IOS | Yes | +| hashtag | Whether to link hashtags to supplied service. Possible values: `false` (disabled), `"facebook"`, `"instagram"`, `"twitter"`. | boolean or string | No | Android/IOS | Yes | +| linkProps | Attributes applied to link Text components. | TextProps | No | Android/IOS | Yes | +| linkStyle | Styles applied to link Text components. _Note:_ Will be overriden if `style` supplied in [`linkProps`](https://github.com/joshswan/react-native-autolink#linkprops). | TextStyle | No | Android/IOS | Yes | +| matchers | Array of custom matcher objects with optional press handlers, styling, and text/url extraction. | CustomMatcher[] | No | Android/IOS | Yes | +| mention | Whether to link mentions/handles to supplied service. Possible values: `false` (disabled), `"instagram"`, `"soundcloud"`, `"twitter"`. | boolean or string | No | Android/IOS | Yes | +| onPress | Override default link press behavior. Signature: `(url: string, match: Match) => void`. | function | No | Android/IOS | Yes | +| onLongPress | Handle link long press events. Signature: `(url: string, match: Match) => void`. | function | No | Android/IOS | Yes | +| phone | Whether to link phone numbers. Possible values: `false` (disabled), `true` (`tel:{number}`), `"sms"` or `"text"` (`sms:{number}`). | boolean or string | No | Android/IOS | Yes | +| renderLink | Override default link rendering behavior. Signature: `(text: string, match: Match, index: number) => React.ReactNode`. | function | No | Android/IOS | Yes | +| renderText | Override default text rendering behavior. Signature: `(text: string, index: number) => React.ReactNode`. | function | No | Android/IOS | Yes | +| showAlert | Whether to display an alert before leaving the app (for privacy or accidental clicks). | boolean | No | Android/IOS | Yes | +| stripPrefix | Whether to strip protocol from URL link text (e.g. `https://github.com` -> `github.com`). | boolean | No | Android/IOS | Yes | +| stripTrailingSlash | Whether to strip trailing slashes from URL link text (e.g. `github.com/` -> `github.com`). | boolean | No | Android/IOS | Yes | +| text | The string to parse for links. | string | Yes | Android/IOS | Yes | +| textProps | Attributes applied to non-link Text components. | TextProps | No | Android/IOS | Yes | +| truncate | Maximum length of URL link text. Possible values: `0` (disabled), `1+` (maximum length). | number | No | Android/IOS | Yes | +| truncateChars | Characters to replace truncated URL link text segments with (e.g. `github.com/../repo`) | string | No | Android/IOS | Yes | +| truncateLocation | Override truncation location. Possible values: `"smart"`, `"end"`, `"middle"`. | string | No | Android/IOS | Yes | +| url | Whether to link URLs. Possible values: `false` (disabled), `true`, `UrlConfig` (see below). | boolean or object | No | Android/IOS | Yes | +| useNativeSchemes | Whether to use native app schemes (e.g. `twitter://`) rather than web URLs when linking to services for hashtag and mention links. | boolean | No | Android/IOS | Yes | + +## Known Issues + +## Others + +## License + +This project is licensed under [The MIT License](https://github.com/joshswan/react-native-autolink/blob/master/LICENSE). + + -- Gitee From d9d4807e1fce34413a0e94e12c6046e58c2082c9 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:03:52 +0800 Subject: [PATCH 10/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-autocomplete-input=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-autocomplete-input.md | 251 ++++++++++++++------------ 1 file changed, 133 insertions(+), 118 deletions(-) diff --git a/en/react-native-autocomplete-input.md b/en/react-native-autocomplete-input.md index c7889418..5dbf5b40 100644 --- a/en/react-native-autocomplete-input.md +++ b/en/react-native-autocomplete-input.md @@ -1,5 +1,6 @@ -> 模板版本:v0.2.2 + +> Template version: v0.2.2

react-native-autocomplete-input

@@ -14,12 +15,13 @@

+> [!TIP] [ GitHub address](https://github.com/byteburgers/react-native-autocomplete-input) -> [!TIP] [Github 地址](https://github.com/byteburgers/react-native-autocomplete-input) +## Installation and Usage -## 安装与使用 -进入到工程目录并输入以下命令: + +Go to the project directory and execute the following instruction: #### **npm** @@ -35,150 +37,163 @@ yarn add react-native-autocomplete-input@5.4.0 -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: ```js -import React, { Component } from 'react'; -import { View, Text, StyleSheet, TouchableOpacity} from 'react-native'; -import AutocompleteInput from 'react-native-autocomplete-input'; - +import React, { Component } from "react"; +import { View, Text, StyleSheet, TouchableOpacity } from "react-native"; +import AutocompleteInput from "react-native-autocomplete-input"; const styles = StyleSheet.create({ - containerStyle: { - borderColor: "#e0494e", - borderWidth: 5, - borderRadius: 15, - width: '100%' - }, - inputContainerStyle: { - borderWidth: 3, - borderColor: "green", - - }, - listContainerStyle: { - backgroundColor: "yellow" - }, - itemText: { - paddingTop: 10, - paddingBottom: 10, - - }, - + containerStyle: { + borderColor: "#e0494e", + borderWidth: 5, + borderRadius: 15, + width: "100%", + }, + inputContainerStyle: { + borderWidth: 3, + borderColor: "green", + }, + listContainerStyle: { + backgroundColor: "yellow", + }, + itemText: { + paddingTop: 10, + paddingBottom: 10, + }, }); interface AutocompleteItem { - id: number; - value: string; + id: number; + value: string; } -const testArray: AutocompleteItem[] = [{ id: 1, value: 'Aabbbbbbb' }, { id: 2, value: 'BBFFFFF' }, { id: 3, value: 'ccccccbbb' }] +const testArray: AutocompleteItem[] = [ + { id: 1, value: "Aabbbbbbb" }, + { id: 2, value: "BBFFFFF" }, + { id: 3, value: "ccccccbbb" }, +]; function filterData(query: string): AutocompleteItem[] { - if (query) { - const filteredItems = testArray.filter(item => item.value.toLowerCase().includes(query.toLowerCase())); - return filteredItems; - } else { - return []; - } + if (query) { + const filteredItems = testArray.filter((item) => + item.value.toLowerCase().includes(query.toLowerCase()) + ); + return filteredItems; + } else { + return []; + } } function compare(selectName: string, value: string): boolean { - return selectName === value; + return selectName === value; } class App extends Component { - state = { - query: '', - isVisible: true, - selectName: '' - }; - - render() { - const { query, isVisible } = this.state; - const data = filterData(query); - return ( - - { - - if (text.trim() !== this.state.selectName.trim()) { - this.setState({ - isVisible: false, - selectName: text - }); - } else { - this.setState({ - isVisible: false, - selectName: text - }); - } - this.setState({ query: text}); - console.log("--------onChangeText--++++isVisible:" + isVisible) - }} - - onShowResults={() => { console.log("--------+++++++++ onShowResults "); }} - - hideResults={isVisible} - - flatListProps={{ - keyExtractor: (_, idx) => String(idx), - keyboardShouldPersistTaps: 'always', - renderItem: ({ item }) => { - return ( - { - this.setState({ query: item.value, isVisible: true, selectName: item.value }); - console.log("--------onPress--++++isVisible:" + isVisible) - }}> - {item.value} - - ) - }, - }} - /> - - ); - } + state = { + query: "", + isVisible: true, + selectName: "", + }; + + render() { + const { query, isVisible } = this.state; + const data = filterData(query); + return ( + + { + if (text.trim() !== this.state.selectName.trim()) { + this.setState({ + isVisible: false, + selectName: text, + }); + } else { + this.setState({ + isVisible: false, + selectName: text, + }); + } + this.setState({ query: text }); + console.log("--------onChangeText--++++isVisible:" + isVisible); + }} + onShowResults={() => { + console.log("--------+++++++++ onShowResults "); + }} + hideResults={isVisible} + flatListProps={{ + keyExtractor: (_, idx) => String(idx), + keyboardShouldPersistTaps: "always", + renderItem: ({ item }) => { + return ( + { + this.setState({ + query: item.value, + isVisible: true, + selectName: item.value, + }); + console.log("--------onPress--++++isVisible:" + isVisible); + }} + > + {item.value} + + ); + }, + }} + /> + + ); + } } - - export default App; ``` -## 约束与限制 -### 兼容性 +## Constraints + +### Compatibility -本文档内容基于以下版本验证通过: +This document is verified based on the following versions: RNOH:0.72.27; SDK:HarmonyOS-Next-DB1 5.0.0.25; IDE:DevEco Studio 5.0.3.400SP7; ROM:3.0.0.25; -## 属性 -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +## Properties -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ------------------- | ------------------------------------------------------------ | -------- | -------- | ----------- | ----------------- | -| containerStyle | These styles will be applied to the container which surrounds the autocomplete component. | style | no | Android/iOS | yes | -| hideResults | Set to `true` to hide the suggestion list. | bool | no | Android/iOS | yes | +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. + +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | ----------- | ----------------- | +| containerStyle | These styles will be applied to the container which surrounds the autocomplete component. | style | no | Android/iOS | yes | +| hideResults | Set to `true` to hide the suggestion list. | bool | no | Android/iOS | yes | | data | An array with suggestion items to be rendered in `renderItem({ item, i })`. Any array with length > 0 will open the suggestion list and any array with length < 1 will hide the list. | array | no | Android/iOS | yes | -| inputContainerStyle | These styles will be applied to the container which surrounds the textInput component. | style | no | Android/iOS | yes | -| listContainerStyle | These styles will be applied to the container which surrounds the result list. | style | no | Android/iOS | yes | -| onShowResults | will be called when the autocomplete suggestions appear or disappear. | function | no | Android/iOS | yes | -| renderTextInput | render custom TextInput. All props passed to this function. | function | no | Android/iOS | yes | -| flatListProps | custom props to FlatList. | object | no | Android/iOS | yes | -| renderResultList | render custom result list. Can be used to replace FlatList. All props passed to this function. | function | no | Android/iOS | yes | +| inputContainerStyle | These styles will be applied to the container which surrounds the textInput component. | style | no | Android/iOS | yes | +| listContainerStyle | These styles will be applied to the container which surrounds the result list. | style | no | Android/iOS | yes | +| onShowResults | will be called when the autocomplete suggestions appear or disappear. | function | no | Android/iOS | yes | +| renderTextInput | render custom TextInput. All props passed to this function. | function | no | Android/iOS | yes | +| flatListProps | custom props to FlatList. | object | no | Android/iOS | yes | +| renderResultList | render custom result list. Can be used to replace FlatList. All props passed to this function. | function | no | Android/iOS | yes | + +## Known Issues -## 遗留问题 +## Others -## 其他 +## License -## 开源协议 +This project is licensed under [The MIT License (MIT)](https://github.com/byteburgers/react-native-autocomplete-input/blob/main/LICENSE). -本项目基于 [The MIT License (MIT)](https://github.com/byteburgers/react-native-autocomplete-input/blob/main/LICENSE) ,请自由地享受和参与开源。 - \ No newline at end of file + -- Gitee From 4b531eb7c52e9c5fd6fdc59fd6fd1408b45918bb Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:04:17 +0800 Subject: [PATCH 11/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-awesome-gallery=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-awesome-gallery.md | 46 +++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/en/react-native-awesome-gallery.md b/en/react-native-awesome-gallery.md index 5ac5a65b..14462ea6 100644 --- a/en/react-native-awesome-gallery.md +++ b/en/react-native-awesome-gallery.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-native-awesome-gallery

@@ -13,11 +13,11 @@

-> [!TIP] [Github 地址](https://github.com/Flair-Dev/react-native-awesome-gallery) +> [!TIP] [GitHub address](https://github.com/Flair-Dev/react-native-awesome-gallery) -## 安装与使用 +## Installation and Usage -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: @@ -35,7 +35,7 @@ yarn add react-native-awesome-gallery@0.4.2 -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: ```ts import React from 'react'; @@ -66,25 +66,25 @@ export default function App() { ## Link -本库 HarmonyOS 侧实现依赖@react-native-oh-tpl/react-native-gesture-handler、@react-native-oh-tpl/react-native-reanimated 的原生端代码,如已在 HarmonyOS 工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。 +The HarmonyOS implementation of this library depends on the native code from @react-native-oh-tpl/react-native-gesture-handler、@react-native-oh-tpl/react-native-reanimated. If this library is included into your HarmonyOS application, there is no need to include it again; you can skip the steps in this section and use it directly. -如未引入请参照[@react-native-oh-tpl/react-native-gesture-handler 文档](/zh-cn/react-native-gesture-handler.md)、[@react-native-oh-tpl/react-native-reanimated 文档](/zh-cn/react-native-reanimated.md)进行引入 +If it is not included, follow the guide provided in [@react-native-oh-tpl/react-native-gesture-handler](/zh-cn/react-native-gesture-handler.md)、[@react-native-oh-tpl/react-native-reanimated](/zh-cn/react-native-reanimated.md) to add it to your project. -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -本文档内容基于以下版本验证通过: +This document is verified based on the following versions: 1. RNOH: 0.72.28; SDK: HarmonyOS-NEXT-DB5 5.0.0.60; IDE: DevEco Studio 5.0.3.655; ROM: 3.0.0.36; 2. RNOH: 0.72.29; SDK: HarmonyOS-NEXT-DB6 5.0.0.61; IDE: DevEco Studio 5.0.3.706; ROM: 5.0.0.60; -## 属性 +## Properties -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. | Name | Description | Type | Required | Platform | HarmonyOS Support | | ----------------- | ------------------------------- | -------------- | -------- | ----------- | ----------------- | @@ -111,11 +111,11 @@ export default function App() { | containerDimensions | Dimensions object for the View that wraps gallery. | {width: number, height: number} | No | iOS/Android | Yes | | style | Is double tap enabled | Style of container | No | iOS/Android | Yes | -## 事件 +## Event -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. | Name | Description | Type | Required | Platform | HarmonyOS Support | | ------------------ | -------------------------------------------------- | ---------------- | -------- | ----------- | ----------------- | @@ -128,23 +128,23 @@ export default function App() { | onScaleEnd(scale: number) | Fired when pinch gesture ends. Use case: add haptic feedback when user finished gesture with scale > maxScale or scale < 1 | function | No | iOS/Android | Yes | | onPanStart() | Fired when pan gesture starts | function | No | iOS/Android | Yes | -## 静态方法 +## Properties -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. | Name | Description | Type | Required | Platform | HarmonyOS Support | | ------------------ | -------------------------------------------------- | ---------------- | -------- | ----------- | ----------------- | | setIndex | Sets active index | (newIndex: number, animated?: boolean) => void | No | iOS/Android | Yes | | reset | Resets scale, translation | (animated?: boolean) => void | No | iOS/Android | Yes | -## 遗留问题 +## Known Issues - [ ] onTranslationYChange事件设置后,拖动图片会发生异常,iOS 和 Android平台均有该问题: [issue#84](https://github.com/pavelbabenko/react-native-awesome-gallery/issues/84) - [x] react-native-gesture-handler库Gesture.Tap()事件无法获取正确的当前坐标和手指数,导致doubleTapScale、doubleTapInterval、doubleTapEnabled、onDoubleTap不生效: [issue#21](https://github.com/react-native-oh-library/react-native-harmony-gesture-handler/issues/21) -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/pavelbabenko/react-native-awesome-gallery/blob/main/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file +This project is licensed under [The MIT License (MIT)](https://github.com/pavelbabenko/react-native-awesome-gallery/blob/main/LICENSE). \ No newline at end of file -- Gitee From 6cb26bc7c62952d04c3b85140e639f0c9dc29259 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:04:45 +0800 Subject: [PATCH 12/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-background-fetch=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-background-fetch.md | 94 ++++++++++++++--------------- 1 file changed, 44 insertions(+), 50 deletions(-) diff --git a/en/react-native-background-fetch.md b/en/react-native-background-fetch.md index 42e9b6ab..7e3c77b8 100644 --- a/en/react-native-background-fetch.md +++ b/en/react-native-background-fetch.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-native-background-fetch

@@ -13,15 +13,15 @@

-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-background-fetch) +> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-background-fetch) -## 安装与使用 +## Installation and Usage -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-background-fetch Releases](https://github.com/react-native-oh-library/react-native-background-fetch/releases),并下载适用版本的 tgz 包。 +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-background-fetch Releases](https://github.com/react-native-oh-library/react-native-background-fetch/releases). -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: -> [!TIP] # 处替换为 tgz 包的路径 +> [!TIP] Replace the content with the path of the .tgz package at the comment sign (#). @@ -39,9 +39,9 @@ yarn add @react-native-oh-tpl/react-native-background-fetch@file:# -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js import React from "react"; @@ -198,17 +198,17 @@ const styles = StyleSheet.create({ export default App; ``` -## 使用 Codegen +## Use Codegen -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/zh-cn/codegen.md). ## Link -目前鸿蒙暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. -首先需要使用 DevEco Studio 打开项目里的鸿蒙工程 `harmony` +Open the `harmony` directory of the HarmonyOS project in DevEco Studio. -### 在工程根目录的 `oh-package.json5` 添加 overrides 字段 +### Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project ```json { @@ -219,18 +219,15 @@ export default App; } ``` -### 引入原生端代码 +### Introducing Native Code -目前有两种方法: +Currently, two methods are available: -1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法); -2. 直接链接源码。 +Method 1 (recommended): Use the HAR file. -方法一:通过 har 包引入(推荐) +> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. -> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 - -打开 `entry/oh-package.json5`,添加以下依赖 +Open `entry/oh-package.json5` file and add the following dependencies: ```json "dependencies": { @@ -239,22 +236,22 @@ export default App; } ``` -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -方法二:直接链接源码 +Method 2: Directly link to the source code. -> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) +> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). -### 在 ArkTs 侧引入 RNBackgroundFetchPackage +### Introducing RNBackgroundFetchPackage to ArkTS -打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... @@ -268,7 +265,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 在 ArkTs 侧引入 RNBackgroundFetchExtensionAbility +### Introducing RNBackgroundFetchExtensionAbility to ArkTS 1. 打开 `entry/src/main/ets`,新建目录及 ArkTS 文件,新建一个目录并命名为 WorkSchedulerExtension。在 WorkSchedulerExtension 目录下,新建一个 ArkTS 文件并命名为 WorkSchedulerExtension.ets,用以实现延迟任务回调接口。 @@ -277,12 +274,10 @@ import { workScheduler } from "@kit.BackgroundTasksKit"; import RNBackgroundFetchExtensionAbility from "@react-native-oh-tpl/react-native-background-fetch/src/main/ets/WorkSchedulerExtension/WorkSchedulerExtension"; export default class MyWorkSchedulerExtensionAbility extends RNBackgroundFetchExtensionAbility { - // 延迟任务开始回调 onWorkStart(workInfo: workScheduler.WorkInfo) { super.onWorkStart(workInfo); } - // 延迟任务结束回调 onWorkStop(workInfo: workScheduler.WorkInfo) { super.onWorkStop(workInfo); } @@ -305,34 +300,34 @@ export default class MyWorkSchedulerExtensionAbility extends RNBackgroundFetchEx } ``` -### 运行 +### Running -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -然后编译、运行即可。 +Then build and run the code. -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-background-fetch Releases](https://github.com/react-native-oh-library/react-native-background-fetch/releases) +Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-background-fetch Releases](https://github.com/react-native-oh-library/react-native-background-fetch/releases) ## API ### BackgroundFetch -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. | Name | Description | Type | Params | Required | Platform | HarmonyOS Support | | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------ | -------- | -------- | ----------------- | @@ -422,18 +417,17 @@ BackgroundFetch.status(callback?: (status: BackgroundFetchStatus) => void): Prom | `BackgroundFetchStatus.STATUS_DENIED` | The user explicitly disabled background behavior for this app or for the whole system. | `BackgroundFetchStatus` | yes | iOS | no | | `BackgroundFetchStatus.STATUS_AVAILABLE` | Background fetch is available and enabled. | `BackgroundFetchStatus` | yes | all | yes | -## 遗留问题 - -- [ ] configure 接口部分参数不支持harmonyOS。[issue#2](https://github.com/react-native-oh-library/react-native-background-fetch/issues/2) -- [ ] scheduleTask 接口部分参数不支持harmonyOS。[issue#4](https://github.com/react-native-oh-library/react-native-background-fetch/issues/4) +## Known Issues -## 其他 +- [ ] configure 接口部分参数不支持 harmonyOS。[issue#2](https://github.com/react-native-oh-library/react-native-background-fetch/issues/2) +- [ ] scheduleTask 接口部分参数不支持 harmonyOS。[issue#4](https://github.com/react-native-oh-library/react-native-background-fetch/issues/4) -- iOS可能需要数天的时间才能启动机器学习算法并开始触发常规事件。同时,您应该定期将应用程序带到前台,以使用用户的行为训练iOS机器学习算法。之后iOS才会定期执行任务。 -- Android中,不需要机器算法介入,configure函数可以每15分钟调用一次,scheduleTask可以最低每隔1分钟调用一次。 -- HarmonyOS中,系统会根据内存、功耗、设备温度、用户使用习惯等统一调度,如当系统内存资源不足或温度达到一定挡位时,系统将延迟调度该任务。假如你设置20分钟后执行,第一次任务不一定是20分钟就会执行,有可能十几分钟就执行了,往后的任务得起码2小时以后才会执行,更多详情请查看下面的链接内容。https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/work-scheduler-V5 +## Others +- iOS 可能需要数天的时间才能启动机器学习算法并开始触发常规事件。同时,您应该定期将应用程序带到前台,以使用用户的行为训练 iOS 机器学习算法。之后 iOS 才会定期执行任务。 +- Android 中,不需要机器算法介入,configure 函数可以每 15 分钟调用一次,scheduleTask 可以最低每隔 1 分钟调用一次。 +- HarmonyOS 中,系统会根据内存、功耗、设备温度、用户使用习惯等统一调度,如当系统内存资源不足或温度达到一定挡位时,系统将延迟调度该任务。假如你设置 20 分钟后执行,第一次任务不一定是 20 分钟就会执行,有可能十几分钟就执行了,往后的任务得起码 2 小时以后才会执行,更多详情请查看下面的链接内容。https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/work-scheduler-V5 -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/transistorsoft/react-native-background-fetch/blob/master/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/transistorsoft/react-native-background-fetch/blob/master/LICENSE). -- Gitee From d50a0f0c55b1475eaf281b73b70becaf965231a5 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:05:15 +0800 Subject: [PATCH 13/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-barcode-builder=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-barcode-builder.md | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/en/react-native-barcode-builder.md b/en/react-native-barcode-builder.md index a2e8b37a..fbdcedcc 100644 --- a/en/react-native-barcode-builder.md +++ b/en/react-native-barcode-builder.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-native-barcode-builder

@@ -12,15 +12,15 @@

-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-barcode-builder) +> [!TIP] [ GitHub address](https://github.com/react-native-oh-library/react-native-barcode-builder) -## 安装与使用 +## Installation and Usage -1、请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-barcode-builder](https://github.com/react-native-oh-library/react-native-barcode-builder/releases),并下载适用版本的 tgz 包。 +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-barcode-builder](https://github.com/react-native-oh-library/react-native-barcode-builder/releases). -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: -> [!TIP] # 处替换为 tgz 包的路径 +> [!TIP] Replace the content with the path of the .tgz package at the comment sign (#). @@ -38,9 +38,9 @@ yarn add @react-native-oh-tpl/react-native-barcode-builder@file:# -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js import React, { useEffect } from "react"; @@ -76,27 +76,27 @@ export const BarcodeBuilderExample = () => { ## Link -本库鸿蒙侧实现依赖@react-native-oh-tpl/react-native-svg 的原生端代码,如已在鸿蒙工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。 +The HarmonyOS implementation of this library depends on the native code from @react-native-oh-tpl/react-native-svg. If this library is included into your HarmonyOS application, there is no need to include it again; you can skip the steps in this section and use it directly. -如未引入请参照[@react-native-oh-tpl/react-native-svg 文档](/zh-cn/react-native-svg-capi.md)进行引入 +If it is not included, follow the guide provided in [@react-native-oh-tpl/react-native-svg docs](/zh-cn/react-native-svg-capi.md) to add it to your project. -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-barcode-builder](https://github.com/react-native-oh-library/react-native-barcode-builder) +Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-barcode-builder](https://github.com/react-native-oh-library/react-native-barcode-builder) -## 属性 +## Properties ### Barcode -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. -该库为 UI 组件库,通过配置属性标签,实现对应的功能。 +该库为 UI 组件库,通过配置 Properties 标签,实现对应的功能。 | Name | Type | Description | Required | Platform | HarmonyOS Support | | ---------- | -------- | ------------------------------------------------------------------------------------------------ | -------- | ----------- | ----------------- | @@ -110,6 +110,6 @@ export const BarcodeBuilderExample = () => { | background | string | Background color of the barcode. | no | iOS/Android | yes | | onError | function | Handler for invalid barcode of selected format. | no | iOS/Android | yes | -## 开源协议 +## License -本项目基于 [The Apache License (Apache)](https://github.com/wonsikin/react-native-barcode-builder/blob/master/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The Apache License (Apache)](https://github.com/wonsikin/react-native-barcode-builder/blob/master/LICENSE). -- Gitee From 7a4f5953f2d5a46681b43f4b5c292b4739fa2712 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:05:41 +0800 Subject: [PATCH 14/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-bars=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-bars.md | 182 ++++++++++++++++++++-------------------- 1 file changed, 90 insertions(+), 92 deletions(-) diff --git a/en/react-native-bars.md b/en/react-native-bars.md index d18c2043..c4b87302 100644 --- a/en/react-native-bars.md +++ b/en/react-native-bars.md @@ -1,5 +1,6 @@ -模板版本:v0.2.2 + +Template version: v0.2.2

react-native-bars

@@ -14,17 +15,15 @@

+> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-bars) -> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-bars) - - -## 安装与使用 +## Installation and Usage -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-bars Releases](https://github.com/react-native-oh-library/react-native-bars/releases),并下载适用版本的 tgz 包。 +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-bars Releases](https://github.com/react-native-oh-library/react-native-bars/releases). -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: -> [!TIP] # 处替换为 tgz 包的路径 +> [!TIP] Replace the content with the path of the .tgz package at the comment sign (#). @@ -42,46 +41,46 @@ yarn add @react-native-oh-tpl/react-native-bars@file:# -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js -import * as React from 'react'; -import { Switch, Text, View } from 'react-native'; -import { StatusBar } from "react-native-bars"; +import * as React from "react"; +import { Switch, Text, View } from "react-native"; +import { StatusBar } from "react-native-bars"; export function BarExample() { - const [isEnabled, setIsEnabled] = React.useState(false); - const toggleSwitch = () => setIsEnabled(previousState => !previousState); + const toggleSwitch = () => setIsEnabled((previousState) => !previousState); return ( - - - 关 dark-content/ 开 light-content - - + + + close dark-content/ open light-content + + ); } - ``` +## Use Codegen + +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/zh-cn/codegen.md). + ## Link -目前鸿蒙暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. -首先需要使用 DevEco Studio 打开项目里的鸿蒙工程 `harmony` +Open the `harmony` directory of the HarmonyOS project in DevEco Studio. -### 1.在工程根目录的 `oh-package.json5` 添加 overrides字段 +### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project ```json { @@ -92,47 +91,40 @@ export function BarExample() { } ``` -## 使用 Codegen - -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 - -### 2.引入原生端代码 +### 2. Introducing Native Code -目前有两种方法: +Currently, two methods are available: -1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法); -2. 直接链接源码。 +Method 1 (recommended): Use the HAR file. -方法一:通过 har 包引入(推荐) +> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. -> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 - -打开 `entry/oh-package.json5`,添加以下依赖 +Open `entry/oh-package.json5` file and add the following dependencies: ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", "@react-native-oh-tpl/react-native-bars": "file:../../node_modules/@react-native-oh-tpl/react-native-bars/harmony/bars.har" - + } ``` -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -方法二:直接链接源码 -> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) +Method 2: Directly link to the source code. +> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). -### 3.在 ArkTs 侧引入 RNBarsPackage +### 3. Introducing RNBarsPackage to ArkTS -打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... @@ -146,77 +138,83 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 4. Running -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -然后编译、运行即可。 - -### 兼容性 +Then build and run the code. -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +## Constraints -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-bars Releases](https://github.com/react-native-oh-library/react-native-bars/releases) +### Compatibility +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. +Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-bars Releases](https://github.com/react-native-oh-library/react-native-bars/releases) -## 属性 +## Properties -> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 +> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!tip] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. ### StatusBar -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ---- | ----------- | ---- | -------- | ---- | ------------ | -| barStyle | Status Bar Style | string | yes | all | yes| -| animated | Should transition between status bar property changes be animated? (has no effect on Android) | boolean | no | all | yes| + +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| -------- | --------------------------------------------------------------------------------------------- | ------- | -------- | -------- | ----------------- | +| barStyle | Status Bar Style | string | yes | all | yes | +| animated | Should transition between status bar property changes be animated? (has no effect on Android) | boolean | no | all | yes | ### NavigationBar -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ---- | ----------- | ---- | -------- | ---- | ------------ | -| barStyle | Navigation Bar Style | string | yes | all | no| + +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| -------- | -------------------- | ------ | -------- | -------- | ----------------- | +| barStyle | Navigation Bar Style | string | yes | all | no | ### SystemBar -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ---- | ----------- | ---- | -------- | ---- | ------------ | -| barStyle | System Style | string | yes | all | no| -| animated | Should transition between status bar property changes be animated? (has no effect on Android) | boolean | no | all | no| -## 静态方法 +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| -------- | --------------------------------------------------------------------------------------------- | ------- | -------- | -------- | ----------------- | +| barStyle | System Style | string | yes | all | no | +| animated | Should transition between status bar property changes be animated? (has no effect on Android) | boolean | no | all | no | -> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 +## Properties -> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library. + +> [!tip] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. ### StatusBar -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ---- | ----------- | ---- | -------- | -------- | ------------------ | -| pushStackEntry | Add an instance to the heap queue | StatusBar.pushStackEntry(props) | no | all | yes | -| popStackEntry | Delete an instance from the heap queue | StatusBar.popStackEntry(entry/*: StatusBarProps*/): void; | no | all | yes | -| replaceStackEntry | Replace an instance of the heap queue | const entry: StatusBarProps = StatusBar.replaceStackEntry(entry ,props ) | no | all | yes | + +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ----------------- | -------------------------------------- | ------------------------------------------------------------------------ | -------- | -------- | ----------------- | +| pushStackEntry | Add an instance to the heap queue | StatusBar.pushStackEntry(props) | no | all | yes | +| popStackEntry | Delete an instance from the heap queue | StatusBar.popStackEntry(entry/_: StatusBarProps_/): void; | no | all | yes | +| replaceStackEntry | Replace an instance of the heap queue | const entry: StatusBarProps = StatusBar.replaceStackEntry(entry ,props ) | no | all | yes | ### NavigationBar -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ---- | ----------- | ---- | -------- | -------- | ------------------ | -| pushStackEntry | Add an instance to the heap queue |NavigationBar.pushStackEntry(props) | no | all | no | -| popStackEntry | Delete an instance from the heap queue | NavigationBar.popStackEntry(entry/*: NavigationBarProps*/): void; | no | all | no | -| replaceStackEntry | Replace an instance of the heap queue |const entry: NavigationBarProps = NavigationBar.replaceStackEntry(entry ,props ) | no | all | no| -## 遗留问题 +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ----------------- | -------------------------------------- | -------------------------------------------------------------------------------- | -------- | -------- | ----------------- | +| pushStackEntry | Add an instance to the heap queue | NavigationBar.pushStackEntry(props) | no | all | no | +| popStackEntry | Delete an instance from the heap queue | NavigationBar.popStackEntry(entry/_: NavigationBarProps_/): void; | no | all | no | +| replaceStackEntry | Replace an instance of the heap queue | const entry: NavigationBarProps = NavigationBar.replaceStackEntry(entry ,props ) | no | all | no | + +## Known Issues + +- [ ] react-native-bars 不支持 NavigationBar 问题: [issue#16](https://github.com/react-native-oh-library/react-native-bars/issues/16) -- [ ] react-native-bars不支持NavigationBar问题: [issue#16](https://github.com/react-native-oh-library/react-native-bars/issues/16) +## Others -## 其他 +## License -## 开源协议 +This project is licensed under [The MIT License (MIT)](https://github.com/zoontek/react-native-bars/blob/main/LICENSE). -本项目基于 [The MIT License (MIT)](https://github.com/zoontek/react-native-bars/blob/main/LICENSE) ,请自由地享受和参与开源。 - \ No newline at end of file + -- Gitee From f4f69d566c5c4cff156b9ff6945f9595d6302b72 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:06:09 +0800 Subject: [PATCH 15/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-ble-manager=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-ble-manager.md | 186 ++++++++++++++++----------------- 1 file changed, 90 insertions(+), 96 deletions(-) diff --git a/en/react-native-ble-manager.md b/en/react-native-ble-manager.md index fa99ff26..a50e70ef 100644 --- a/en/react-native-ble-manager.md +++ b/en/react-native-ble-manager.md @@ -1,6 +1,6 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-native-ble-manager

@@ -15,17 +15,15 @@

+> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-ble-manager) +## Installation and Usage -> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-ble-manager) +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-ble-manager Releases](https://github.com/react-native-oh-library/react-native-ble-manager/releases). -## 安装与使用 +Go to the project directory and execute the following instruction: -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-ble-manager Releases](https://github.com/react-native-oh-library/react-native-ble-manager/releases),并下载适用版本的 tgz 包。 - -进入到工程目录并输入以下命令: - -> [!TIP] # 处替换为 tgz 包的路径 +> [!TIP] Replace the content with the path of the .tgz package at the comment sign (#). @@ -43,9 +41,9 @@ yarn add @react-native-oh-tpl/react-native-ble-manager@file:# -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js import React, { useState, useEffect } from 'react'; @@ -139,14 +137,14 @@ export default function BleManagerDemo() { }}>
- @@ -163,12 +161,12 @@ export default function BleManagerDemo() { }}> - - @@ -226,7 +224,7 @@ export default function BleManagerDemo() { @@ -240,7 +238,7 @@ export default function BleManagerDemo() { BleManager - + - - + + + + ); }; export default App; ``` -## 使用 Codegen +## Use Codegen -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/zh-cn/codegen.md). ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +Open the `harmony` directory of the HarmonyOS project in DevEco Studio. -### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 +### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project ```json { @@ -92,18 +99,15 @@ export default App; } ``` -### 2.引入原生端代码 - -目前有两种方法: +### 2. Introducing Native Code -1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法); -2. 直接链接源码。 +Currently, two methods are available: -方法一:通过 har 包引入(推荐) +Method 1 (recommended): Use the HAR file. -> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 +> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. -打开 `entry/oh-package.json5`,添加以下依赖 +Open `entry/oh-package.json5` file and add the following dependencies: ```json "dependencies": { @@ -112,23 +116,22 @@ export default App; } ``` -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -方法二:直接链接源码 +Method 2: Directly link to the source code. -> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) +> [!TIP] or details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). +### 3. Introducing RNDefaultPreferencePackage to ArkTS -### 3.在 ArkTs 侧引入 RNDefaultPreferencePackage - -打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... @@ -143,53 +146,51 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 4. Running -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -然后编译、运行即可。 +Then build and run the code. -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-default-preference Releases](https://github.com/react-native-oh-library/react-native-default-preference/releases) - ## API -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 - -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ---- | ----------- | ---- | -------- | -------- | ------------------ | -| get | Take out key-value pairs | function | yes | Android、iOS | yes | -| set | Set key-value pairs | function | yes | Android、iOS | yes | -| clear | Clear key-value pairs | function | yes | Android、iOS | yes | -| getMultiple | Take out multiple key-value pairs | function | yes | Android、iOS | yes | -| setMultiple | Set multiple key-value pairs | function | yes | Android、iOS | yes | -| clearMultiple | Clear multiple key-value pairs | function | yes | Android、iOS | yes | -| getAll | Take out all key-value pairs | function | no | Android、iOS | yes | -| clearAll | Clear all key-value pairs | function | no | Android、iOS | yes | -| getName | Gets the name of the Preferences instance. | function | no | Android、iOS | yes | -| setName | Sets the name of the Preferences instance. | function | yes | Android、iOS | yes | +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ------------- | ------------------------------------------ | -------- | -------- | ------------ | ----------------- | +| get | Take out key-value pairs | function | yes | Android、iOS | yes | +| set | Set key-value pairs | function | yes | Android、iOS | yes | +| clear | Clear key-value pairs | function | yes | Android、iOS | yes | +| getMultiple | Take out multiple key-value pairs | function | yes | Android、iOS | yes | +| setMultiple | Set multiple key-value pairs | function | yes | Android、iOS | yes | +| clearMultiple | Clear multiple key-value pairs | function | yes | Android、iOS | yes | +| getAll | Take out all key-value pairs | function | no | Android、iOS | yes | +| clearAll | Clear all key-value pairs | function | no | Android、iOS | yes | +| getName | Gets the name of the Preferences instance. | function | no | Android、iOS | yes | +| setName | Sets the name of the Preferences instance. | function | yes | Android、iOS | yes | -## 遗留问题 +## Known Issues -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/kevinresol/react-native-default-preference/blob/master/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/kevinresol/react-native-default-preference/blob/master/LICENSE). -- Gitee From 25f99af5dc577fbb11dfcd8dc14753aca952a80d Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:09:00 +0800 Subject: [PATCH 20/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-dismiss-keyboard=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-dismiss-keyboard.md | 210 ++++++++++++++-------------- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/en/react-native-dismiss-keyboard.md b/en/react-native-dismiss-keyboard.md index a0b9c4ec..9d580cbd 100644 --- a/en/react-native-dismiss-keyboard.md +++ b/en/react-native-dismiss-keyboard.md @@ -1,5 +1,6 @@ -> 模板版本:v0.2.0 + +> Template version: v0.2.0

react-native-dismiss-keyboard

@@ -13,13 +14,11 @@

-> [!TIP] [Github 地址](https://github.com/DanielMSchmidt/react-native-dismiss-keyboard) - +> [!TIP] [GitHub address](https://github.com/DanielMSchmidt/react-native-dismiss-keyboard) -## 安装与使用 - -进入到工程目录并输入以下命令: +## Installation and Usage +Go to the project directory and execute the following instruction: @@ -37,125 +36,126 @@ yarn add react-native-dismiss-keyboard@1.0.0 -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: ->[!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js -import React, { Component } from 'react'; +import React, { Component } from "react"; import { - AppRegistry, - StyleSheet, - TextInput, - View, - Text, - Keyboard -} from 'react-native'; + AppRegistry, + StyleSheet, + TextInput, + View, + Text, + Keyboard, +} from "react-native"; export default class ReactNativeDismissKeyboardExample extends Component { - - keyboardDidShowListener = null; - keyboardDidHideListener = null; - state = { KeyboardShown: false }; - - constructor(props) { - super(props); - this.keyboardDidShowListener = null; - this.keyboardDidHideListener = null; - this.state = { KeyboardShown: false }; - } - - //键盘弹出事件响应 - keyboardDidShowHandler(event) { - this.setState({ KeyboardShown: true }); - console.log(event.endCoordinates.height); - } - - //键盘隐藏事件响应 - keyboardDidHideHandler(event) { - this.setState({ KeyboardShown: false }); - } - - //强制隐藏键盘 - dissmissKeyboard() { - Keyboard.dismiss(); - console.log("输入框当前焦点状态:" + this.refs.bottomInput.isFocused()); - } - - render() { - return ( - - - - - 收起键盘 - - - - ) - } + keyboardDidShowListener = null; + keyboardDidHideListener = null; + state = { KeyboardShown: false }; + + constructor(props) { + super(props); + this.keyboardDidShowListener = null; + this.keyboardDidHideListener = null; + this.state = { KeyboardShown: false }; + } + + keyboardDidShowHandler(event) { + this.setState({ KeyboardShown: true }); + console.log(event.endCoordinates.height); + } + + keyboardDidHideHandler(event) { + this.setState({ KeyboardShown: false }); + } + + dissmissKeyboard() { + Keyboard.dismiss(); + console.log("the current focus state of the input box" + this.refs.bottomInput.isFocused()); + } + + render() { + return ( + + + + + close keyboard + + + + ); + } } const styles = StyleSheet.create({ - container: { - flex: 1, - paddingTop: 15, - backgroundColor: '#ffffff' - }, - flexDirection: { - flexDirection: 'row' - }, - inputHeight: { - height: 35, - alignItems: 'center' - }, - textInputStyle: { - flex: 1, - height: 35, - fontSize: 18, - borderWidth: 1, - borderColor: '#4CAF50', - borderRadius: 8, - marginRight: 8 - }, - buttonStyle: { - fontSize: 20, - color: 'white', - width: 100, - textAlign: 'center', - backgroundColor: '#4CA300' - }, + container: { + flex: 1, + paddingTop: 15, + backgroundColor: "#ffffff", + }, + flexDirection: { + flexDirection: "row", + }, + inputHeight: { + height: 35, + alignItems: "center", + }, + textInputStyle: { + flex: 1, + height: 35, + fontSize: 18, + borderWidth: 1, + borderColor: "#4CAF50", + borderRadius: 8, + marginRight: 8, + }, + buttonStyle: { + fontSize: 20, + color: "white", + width: 100, + textAlign: "center", + backgroundColor: "#4CA300", + }, }); ``` -## 约束与限制 -### 兼容性 +## Constraints -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 电脑ROM。 +### Compatibility -本文档内容基于以下版本验证通过: +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. + +This document is verified based on the following versions: 1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Beta1 B.0.18、IDE:DevEco Studio 5.0.3.200; ROM:2.0.0.18; -## 属性 +## Properties + +> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library. + +> [!tip] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. -> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 +| Prop | Description | Type | Required | Platform | HarmonyOS Support | +| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | -------- | ----------------- | +| `addListener` | Register a JavaScript function that listens to handle native keyboard notification events. | function | no | All | yes | +| `dismiss` | Retract the pop-up keyboard and make the current text box lose focus. | function | no | All | yes | +| `scheduleLayoutAnimation` | Used to synchronize changes in the size or position of a TextInput (or other keyboard attachment view) with keyboard movements. | function | no | All | yes | +| `isVisible` | Whether the keyboard is currently displayed. | function | no | All | yes | +| `metrics` | If a soft keyboard is displayed, return the size of the soft keyboard. | function | no | All | yes | -> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +## Known Issues -| Prop | Description | Type | Required | Platform | HarmonyOS Support | -| ----- | ----- | -------- | -------- | -------- | -------- | -| `addListener` | Register a JavaScript function that listens to handle native keyboard notification events. | function | no | All | yes | -| `dismiss` | Retract the pop-up keyboard and make the current text box lose focus. | function | no | All | yes | -| `scheduleLayoutAnimation` |Used to synchronize changes in the size or position of a TextInput (or other keyboard attachment view) with keyboard movements.| function | no | All | yes | -| `isVisible` | Whether the keyboard is currently displayed.| function | no | All | yes | -| `metrics` | If a soft keyboard is displayed, return the size of the soft keyboard.| function | no | All | yes | +## Others -## 遗留问题 +## License -## 其他 +This project is licensed under [The MIT License (MIT)](https://github.com/DanielMSchmidt/react-native-dismiss-keyboard/blob/master/LICENSE). -## 开源协议 -本项目基于 [The MIT License (MIT)](https://github.com/DanielMSchmidt/react-native-dismiss-keyboard/blob/master/LICENSE) ,请自由地享受和参与开源。 - \ No newline at end of file + -- Gitee From 1ba1c170a2da8b195993796e72ed73b042a5829e Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:09:31 +0800 Subject: [PATCH 21/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-email-link=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-email-link.md | 89 +++++++++++++++++------------------ 1 file changed, 43 insertions(+), 46 deletions(-) diff --git a/en/react-native-email-link.md b/en/react-native-email-link.md index 499b18c5..27206361 100644 --- a/en/react-native-email-link.md +++ b/en/react-native-email-link.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-native-email-link

@@ -12,15 +12,15 @@

-> [!tip] [Github 地址](https://github.com/react-native-oh-library/react-native-email-link) +> [!tip] [GitHub address](https://github.com/react-native-oh-library/react-native-email-link) -## 安装与使用 +## Installation and Usage -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-email-link Releases](https://github.com/react-native-oh-library/react-native-email-link/releases),并下载适用版本的 tgz 包。 +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-email-link Releases](https://github.com/react-native-oh-library/react-native-email-link/releases). -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: -> [!TIP] # 处替换为 tgz 包的路径 +> [!TIP] Replace the content with the path of the .tgz package at the comment sign (#). @@ -38,9 +38,9 @@ yarn add @react-native-oh-tpl/react-native-email-link@file:# -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js import React, { useState } from "react"; @@ -60,7 +60,7 @@ import { export function EmailLinkExample() { const [emailClients, setEmailClients] = useState( - "点击getEmailClients按钮获取邮箱信息" + "click button getEmailClients to get email information" ); return ( @@ -147,17 +147,17 @@ const styles = StyleSheet.create({ }); ``` -## 使用 Codegen +## Use Codegen -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/codegen.md)。 +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/zh-cn/codegen.md). ## Link -目前鸿蒙暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. -首先需要使用 DevEco Studio 打开项目里的鸿蒙工程 `harmony` +Open the `harmony` directory of the HarmonyOS project in DevEco Studio. -### 1.在工程根目录的 `oh-package.json` 添加 overrides 字段 +### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project ```json { @@ -168,18 +168,15 @@ const styles = StyleSheet.create({ } ``` -### 2.引入原生端代码 +### 2. Introducing Native Code -目前有两种方法: +Currently, two methods are available: -1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法); -2. 直接链接源码。 +Method 1 (recommended): Use the HAR file. -方法一:通过 har 包引入(推荐) +> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. -> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 - -打开 `entry/oh-package.json5`,添加以下依赖 +Open `entry/oh-package.json5` file and add the following dependencies: ```json "dependencies": { @@ -188,22 +185,22 @@ const styles = StyleSheet.create({ } ``` -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -方法二:直接链接源码 +Method 2: Directly link to the source code. -> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) +> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). -### 3.在 ArkTs 侧引入 RNEmailLinkPackage +### 3. Introducing RNEmailLinkPackage to ArkTS -打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... @@ -217,32 +214,32 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 4. Running -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -然后编译、运行即可。 +Then build and run the code. -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-email-link Releases](https://github.com/react-native-oh-library/react-native-email-link/releases) +Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-email-link Releases](https://github.com/react-native-oh-library/react-native-email-link/releases) ## API -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. | Name | Description | Type | Required | Platform | HarmonyOS Support | | ----------------- | ------------------------------------------------------------------------------------------------------ | -------- | -------- | -------- | ----------------- | @@ -250,7 +247,7 @@ ohpm install | `openComposer` | Used to open a new email authoring interface that allows users to create emails directly from the app. | function | No | All | yes | | `getEmailClients` | Get a list of all supported mail client applications installed on the device. | function | No | All | yes | -**openInbox 方法参数** +**openInbox method parameters** | Name | Description | Type | Required | Platform | HarmonyOS Support | | ------------------------------ | ----------------------------------------------------------------------------------------- | ---------------- | -------- | -------- | ----------------- | | `title` | Text for the top of the ActionSheet or Intent | string | no | All | no | @@ -260,7 +257,7 @@ ohpm install | `defaultEmailLabel` | Text for first button of the ActionSheet | function | no | iOS | no | | `newTask` | If true, the email Intent will be started in a new Android task. Else, the Intent will be launched in the current task | boolean | no | Android | no | -**openComposer 方法参数** +**openComposer method parameters** | Name | Description | Type | Required | Platform | HarmonyOS Support | | ------------------------------ | ----------------------------------------------------------------------------------------- | ---------------- | -------- | -------- | ----------------- | | `app` | App to open the composer with| string | no | All | yes | @@ -276,14 +273,14 @@ ohpm install | `body` | Email's body | string | no | All | yes | | `encodeBody` | Apply encodeURIComponent to the email's body | boolean | no | All | yes | -## 遗留问题 +## Known Issues -- [ ] 目前只支持 harmonyOS 系统自带邮箱,本库支持邮箱均未适配harmonyOS Next。[issues#5](https://github.com/react-native-oh-library/react-native-email-link/issues/5) +- [ ] 目前只支持 harmonyOS 系统自带邮箱,本库支持邮箱均未适配 harmonyOS Next。[issues#5](https://github.com/react-native-oh-library/react-native-email-link/issues/5) -## 其他 +## Others -- title、message、cancelLabel、 removeText、defaultEmailLabel、newTask属性暂不支持,与iOS表现一致。[issue#141](https://github.com/tschoffelen/react-native-email-link/issues/141)。 +- title、message、cancelLabel、 removeText、defaultEmailLabel、newTaskProperties 暂不支持,与 iOS 表现一致。[issue#141](https://github.com/tschoffelen/react-native-email-link/issues/141)。 -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/tschoffelen/react-native-email-link/blob/master/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/tschoffelen/react-native-email-link/blob/master/LICENSE). -- Gitee From d3fed6cc7bcf66af65f8e5e7bb80b93257791abc Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:09:59 +0800 Subject: [PATCH 22/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-error-boundary=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-error-boundary.md | 113 +++++++++++++++--------------- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/en/react-native-error-boundary.md b/en/react-native-error-boundary.md index 92ef7f33..cb82d096 100644 --- a/en/react-native-error-boundary.md +++ b/en/react-native-error-boundary.md @@ -1,6 +1,6 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-native-error-boundary

@@ -15,11 +15,11 @@

-> [!TIP] [Github 地址](https://github.com/carloscuesta/react-native-error-boundary) +> [!TIP] [ GitHub address](https://github.com/carloscuesta/react-native-error-boundary) -## 安装与使用 +## Installation and Usage -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: @@ -37,91 +37,94 @@ yarn add react-native-error-boundary@1.2.4 -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```ts -import React, { PropsWithChildren, useState } from 'react'; -import { StyleSheet, Button } from 'react-native'; -import ErrorBoundary from 'react-native-error-boundary'; +import React, { PropsWithChildren, useState } from "react"; +import { StyleSheet, Button } from "react-native"; +import ErrorBoundary from "react-native-error-boundary"; export const ErrorBoundaryDefaultExample = () => { - const [shouldThrow, setShouldThrow] = useState(false); - - return ( - - +
FileAccess.readFile() - + - 读取的文件内容:{fileContent} + read the file contents: {fileContent} FileAccess.unlink() - + FileAccess.mkdir() - + - 新目录路径:{mkdirParam} + new directory path: {mkdirParam} FileAccess.mv() - + FileAccess.stat() - + - 文件信息:{statInfo} + file information: {statInfo} FileAccess.exists() - + - 文件是否存在:{isExists === '' ? '' : isExists ? '存在' : '不存在'} + does the file exist: {isExists === '' ? '' : isExists ? 'exist' : 'does not exist'} FileAccess.cp() - + FileAccess.isDir() - + - 是否是目录:{dirOrNot === '' ? '' : dirOrNot ? '是' : '不是'} + is it a directory: {dirOrNot === '' ? '' : dirOrNot ? 'yes' : 'no'} FileAccess.ls() - + - 目录中的文件:{lsList} + files in the directory: {lsList} FileAccess.df() - + - 可用空间:{freeSize ? (freeSize / (1024 * 1024 * 1024)).toFixed(2) : ''}GB - 总空间:{totalSize ? (totalSize / (1024 * 1024 * 1024)).toFixed(2) : ''}GB + available space: {freeSize ? (freeSize / (1024 * 1024 * 1024)).toFixed(2) : ''}GB + total space: {totalSize ? (totalSize / (1024 * 1024 * 1024)).toFixed(2) : ''}GB FileAccess.hash() - + - 哈希值:{hashValue} + hash value: {hashValue} FileAccess.unzip() - + FileAccess.statDir() - + - 以下为目录下的文件信息: + the following is the file information in the directory {statDirInfo.map((item, index) => ({JSON.stringify(item)}))} FileAccess.readFileChunk() - + - 读取的部分文件内容:{readFileChunkInfo} + read part of the file content: {readFileChunkInfo} FileAccess.appendFile() - + FileAccess.concatFiles() - + - 写入的字节数:{concatBeyts} + number of bytes written: {concatBeyts} ); @@ -318,17 +301,17 @@ const styles = StyleSheet.create({ ``` -## 使用 Codegen +## Use Codegen -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/zh-cn/codegen.md). ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +Open the `harmony` directory of the HarmonyOS project in DevEco Studio. -### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 +### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project ``` { @@ -339,18 +322,15 @@ const styles = StyleSheet.create({ } ``` -### 2.引入原生端代码 +### 2. Introducing Native Code -目前有两种方法: +Currently, two methods are available: -1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法); -2. 直接链接源码。 +Method 1 (recommended): Use the HAR file. -方法一:通过 har 包引入 +> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. -> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 - -打开 `entry/oh-package.json5`,添加以下依赖 +Open `entry/oh-package.json5` file and add the following dependencies: ```json "dependencies": { @@ -359,22 +339,22 @@ const styles = StyleSheet.create({ } ``` -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -方法二:直接链接源码 +Method 2: Directly link to the source code. -> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) +> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). -### 3.在 ArkTs 侧引入 RNFileAccessPackage +### 3. Introducing RNFileAccessPackage to ArkTS -打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... @@ -388,32 +368,32 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 4. Running -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -然后编译、运行即可。 +Then build and run the code. -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-file-access Releases](https://github.com/react-native-oh-library/react-native-file-access/releases) +Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-file-access Releases](https://github.com/react-native-oh-library/react-native-file-access/releases) ## API -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. #### File System Access API @@ -441,10 +421,10 @@ ohpm install | unzip | Extract a zip archive. | Function | No | iOS/Android | Yes | | writeFile | Write content to a file. | Function | No | iOS/Android | Yes | -## 遗留问题 +## Known Issues -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/alpha0010/react-native-file-access/blob/master/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/alpha0010/react-native-file-access/blob/master/LICENSE). -- Gitee From 92ca3d272e00ca28cdc1375ff6ffd8a9ac7f50f5 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:11:13 +0800 Subject: [PATCH 25/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-file-viewer=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-file-viewer.md | 276 ++++++++++++++++++--------------- 1 file changed, 147 insertions(+), 129 deletions(-) diff --git a/en/react-native-file-viewer.md b/en/react-native-file-viewer.md index 130d2429..b4a7a34c 100644 --- a/en/react-native-file-viewer.md +++ b/en/react-native-file-viewer.md @@ -1,6 +1,6 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-native-file-viewer @@ -15,15 +15,15 @@

-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-file-viewer) +> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-file-viewer) -## 安装与使用 +## Installation and Usage -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-file-viewer Releases](https://github.com/react-native-oh-library/react-native-file-viewer/releases),并下载适用版本的 tgz 包。 +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-file-viewer Releases](https://github.com/react-native-oh-library/react-native-file-viewer/releases). -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: -> [!TIP] # 处替换为 tgz 包的路径 +> [!TIP] Replace the content with the path of the .tgz package at the comment sign (#). @@ -41,9 +41,9 @@ yarn add @react-native-oh-tpl/react-native-file-viewer@file:# -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js import { StyleSheet, ScrollView, Text, TouchableOpacity } from "react-native"; @@ -51,99 +51,120 @@ import DocumentPicker from "react-native-document-picker"; import FileViewer from "react-native-file-viewer"; export function FlieViewerExample() { - const FileViewerTest = async (option?: any) => { - try { - // 使用react-native-document-picker来选择本地文件进行打开 - const res: any = await DocumentPicker.pick({ - type: [DocumentPicker.types.allFiles] - }); - // uri 为本地文件绝对路径 - await FileViewer?.open(res[0].uri, option); - } catch (e) { - // error - } - }; - - const onDismissCb = () => { - // do sth ... - }; - - return ( - - FileViewerTest()} style={styles.btn}> - Toogle Status Bar - - FileViewerTest("show_displayName string")} style={styles.btn}> - Toogle Status Bar (displayName str) - - FileViewerTest({ displayName: "show_displayName option" })} style={styles.btn}> - Toogle Status Bar (displayName opt) - - FileViewerTest({ showOpenWithDialog: true, onDismiss: onDismissCb })} style={styles.btn}> - Toogle Status Bar (onDismiss) - - FileViewerTest({ showOpenWithDialog: true })} style={styles.btn}> - Toogle Status Bar (showOpenWithDialog) - - FileViewerTest({ showAppsSuggestions: true })} style={styles.btn}> - Toogle Status Bar (showAppsSuggestions) - - - ); + const FileViewerTest = async (option?: any) => { + try { + const res: any = await DocumentPicker.pick({ + type: [DocumentPicker.types.allFiles], + }); + await FileViewer?.open(res[0].uri, option); + } catch (e) { + // error + } + }; + + const onDismissCb = () => { + // do sth ... + }; + + return ( + + FileViewerTest()} style={styles.btn}> + Toogle Status Bar + + FileViewerTest("show_displayName string")} + style={styles.btn} + > + Toogle Status Bar (displayName str) + + + FileViewerTest({ displayName: "show_displayName option" }) + } + style={styles.btn} + > + Toogle Status Bar (displayName opt) + + + FileViewerTest({ showOpenWithDialog: true, onDismiss: onDismissCb }) + } + style={styles.btn} + > + Toogle Status Bar (onDismiss) + + FileViewerTest({ showOpenWithDialog: true })} + style={styles.btn} + > + + Toogle Status Bar (showOpenWithDialog) + + + FileViewerTest({ showAppsSuggestions: true })} + style={styles.btn} + > + + Toogle Status Bar (showAppsSuggestions) + + + + ); } const styles = StyleSheet.create({ - TextInput: { - height: 40, - borderColor: "#ccc", - borderWidth: 1, - borderRadius: 4, - width: "90%" - }, - btn: { - borderRadius: 10, - display: "flex", - justifyContent: "center", - alignItems: "center", - padding: 10, - margin: 10, - backgroundColor: "blue" - }, - btnText: { - fontWeight: "bold", - color: "#fff", - fontSize: 20 - }, - selectBtn: { - padding: 8, - margin: 3, - fontSize: 18, - borderWidth: 1, - borderRadius: 8, - borderColor: "#753c13" - }, - selectBtnActive: { - padding: 8, - margin: 3, - backgroundColor: "#e2803b", - fontSize: 18, - borderRadius: 8, - borderWidth: 1 - } + TextInput: { + height: 40, + borderColor: "#ccc", + borderWidth: 1, + borderRadius: 4, + width: "90%", + }, + btn: { + borderRadius: 10, + display: "flex", + justifyContent: "center", + alignItems: "center", + padding: 10, + margin: 10, + backgroundColor: "blue", + }, + btnText: { + fontWeight: "bold", + color: "#fff", + fontSize: 20, + }, + selectBtn: { + padding: 8, + margin: 3, + fontSize: 18, + borderWidth: 1, + borderRadius: 8, + borderColor: "#753c13", + }, + selectBtnActive: { + padding: 8, + margin: 3, + backgroundColor: "#e2803b", + fontSize: 18, + borderRadius: 8, + borderWidth: 1, + }, }); ``` -## 使用 Codegen +## Use Codegen -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/zh-cn/codegen.md). ## Link -目前鸿蒙暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. -首先需要使用 DevEco Studio 打开项目里的鸿蒙工程 `harmony` +Open the `harmony` directory of the HarmonyOS project in DevEco Studio. -### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 +### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project ```json { @@ -154,18 +175,15 @@ const styles = StyleSheet.create({ } ``` -### 2.引入原生端代码 +### 2. Introducing Native Code -目前有两种方法: +Currently, two methods are available: -1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法); -2. 直接链接源码。 +Method 1 (recommended): Use the HAR file. -方法一:通过 har 包引入(推荐) +> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. -> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 - -打开 `entry/oh-package.json5`,添加以下依赖 +Open `entry/oh-package.json5` file and add the following dependencies: ```json "dependencies": { @@ -174,22 +192,22 @@ const styles = StyleSheet.create({ } ``` -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -方法二:直接链接源码 +Method 2: Directly link to the source code. -> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) +> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). -### 3.在 ArkTs 侧引入 RNFileViewerTurboModule Package +### 3. Introducing RNFileViewerTurboModule Package to ArkTS -打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... @@ -203,58 +221,58 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 4. Running -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -然后编译、运行即可。 +Then build and run the code. -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-file-viewer Releases](https://github.com/react-native-oh-library/react-native-file-viewer/releases) +Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-file-viewer Releases](https://github.com/react-native-oh-library/react-native-file-viewer/releases) ## API -> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 +> [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!tip] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. ### `open(filepath: string, options?: Object): Promise` -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| --- | --- | --- | --- | --- | --- | -| **filepath** | The absolute path where the file is stored. The file needs to have a valid extension to be successfully detected. Use [react-native-fs constants](https://github.com/itinance/react-native-fs#constants) to determine the absolute path correctly. | string | yes | All | yes | -| **options** (optional) | Some options to customize the behaviour. See below. | Object | no | All | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------- | -------- | ----------------- | +| **filepath** | The absolute path where the file is stored. The file needs to have a valid extension to be successfully detected. Use [react-native-fs constants](https://github.com/itinance/react-native-fs#constants) to determine the absolute path correctly. | string | yes | All | yes | +| **options** (optional) | Some options to customize the behaviour. See below. | Object | no | All | yes | #### Options -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| --- | --- | --- | --- | --- | --- | -| **displayName** (optional) | Customize the QuickLook title. | string | no | iOS | yes | -| **onDismiss** (optional) | Callback invoked when the viewer is being dismissed. | function | no | All | partially | -| **showOpenWithDialog** (optional) | If there is more than one app that can open the file, show an _Open With_ dialogue box. | boolean | no | Android | yes | -| **showAppsSuggestions** (optional) | If there is not an installed app that can open the file, open the Play Store with suggested apps. | boolean | no | Android | partially | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ---------------------------------- | ------------------------------------------------------------------------------------------------- | -------- | -------- | -------- | ----------------- | +| **displayName** (optional) | Customize the QuickLook title. | string | no | iOS | yes | +| **onDismiss** (optional) | Callback invoked when the viewer is being dismissed. | function | no | All | partially | +| **showOpenWithDialog** (optional) | If there is more than one app that can open the file, show an _Open With_ dialogue box. | boolean | no | Android | yes | +| **showAppsSuggestions** (optional) | If there is not an installed app that can open the file, open the Play Store with suggested apps. | boolean | no | Android | partially | -## 遗留问题 +## Known Issues -- [x] HarmonyOS端暂不支持关闭预览窗口的回调函数调用: [issue#1](https://github.com/react-native-oh-library/react-native-file-viewer/issues/4) -- [x] HarmonyOS端无法直接跳转到应用市场的推荐应用页,目前只能跳转到应用市场首页: [issue#2](https://github.com/react-native-oh-library/react-native-file-viewer/issues/5) +- [x] HarmonyOS 端暂不支持关闭预览窗口的回调函数调用: [issue#1](https://github.com/react-native-oh-library/react-native-file-viewer/issues/4) +- [x] HarmonyOS 端无法直接跳转到应用市场的推荐应用页,目前只能跳转到应用市场首页: [issue#2](https://github.com/react-native-oh-library/react-native-file-viewer/issues/5) -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/vinzscam/react-native-file-viewer/blob/master/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/vinzscam/react-native-file-viewer/blob/master/LICENSE). -- Gitee From ead336a8afdfbfc63d55a6fe4508c0fb6ab2f9a8 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:13:23 +0800 Subject: [PATCH 26/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-gifted-charts=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-gifted-charts.md | 1722 +++++++++++++++--------------- 1 file changed, 865 insertions(+), 857 deletions(-) diff --git a/en/react-native-gifted-charts.md b/en/react-native-gifted-charts.md index 48077a16..9de599f8 100644 --- a/en/react-native-gifted-charts.md +++ b/en/react-native-gifted-charts.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-native-gifted-charts

@@ -14,15 +14,15 @@

-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-gifted-charts) +> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-gifted-charts) -## 安装与使用 +## Installation and Usage -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-gifted-charts Releases](https://github.com/react-native-oh-library/react-native-gifted-charts/releases),并下载适用版本的 tgz 包 +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-gifted-charts Releases](https://github.com/react-native-oh-library/react-native-gifted-charts/releases). -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: ->[!TIP] # 处替换为 tgz 包的路径 +> [!TIP] Replace the content with the path of the .tgz package at the comment sign (#). @@ -40,12 +40,17 @@ yarn add @react-native-oh-tpl/react-native-gifted-charts@file:# -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```jsx -import { BarChart, LineChart, PieChart, PopulationPyramid } from "react-native-gifted-charts"; +import { + BarChart, + LineChart, + PieChart, + PopulationPyramid, +} from "react-native-gifted-charts"; export default function () { const data = [{ value: 50 }, { value: 80 }, { value: 90 }, { value: 70 }]; @@ -55,958 +60,961 @@ export default function () { - + - ) + ); } ``` ## Link -本库鸿蒙侧实现依赖@react-native-oh-tpl/react-native-svg、@react-native-oh-tpl/react-native-linear-gradient 的原生端代码,如已在鸿蒙工程中引入过这两个库,则无需再次引入,可跳过本章节步骤,直接使用。 +The HarmonyOS implementation of this library depends on the native code from @react-native-oh-tpl/react-native-svg、@react-native-oh-tpl/react-native-linear-gradient. If this library is included into your HarmonyOS application, there is no need to include it again; you can skip the steps in this section and use it directly. -如未引入请参照[@react-native-oh-tpl/react-native-svg 文档](/zh-cn/react-native-svg-capi.md)、[@react-native-oh-tpl/react-native-linear-gradient 文档](/zh-cn/react-native-linear-gradient.md)进行引入 +If it is not included, follow the guide provided in [@react-native-oh-tpl/react-native-svg](/zh-cn/react-native-svg-capi.md)、[@react-native-oh-tpl/react-native-linear-gradient](/zh-cn/react-native-linear-gradient.md) to add it to your project. -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-gifted-charts Releases](https://github.com/react-native-oh-library/react-native-gifted-charts/releases) +Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-gifted-charts Releases](https://github.com/react-native-oh-library/react-native-gifted-charts/releases) -## 属性 +## Properties -详情见 [react-native-gifted-charts](https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts) Props tables +For details, see [react-native-gifted-charts](https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts) Props tables -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. ### BarChart, Horizontal BarChart and Stacked Bar Chart **Basic props** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| data | An item object represents a bar in the bar chart. It is described in the next table. | barDataItem[] | no | all | yes -| width | Width of the Bar chart | number | no | all | yes -| height | Height of the Bar chart (excluding the bottom label) | number | no | all | yes -| onPress | Callback function called on press of a Bar (takes item and index as parameter) | Function | no | all | yes -| onLongPress | Callback function called on long press of a Bar (takes item and index as parameter) | Function | no | all | yes -| onPressOut | Callback function called on press out of a Bar (takes item and index as parameter) | Function | no | all | yes -| focusBarOnPress | used to focus a bar on press by applying styles defined in focusedBarConfig | boolean | no | all | yes -| focusedBarConfig | styles for the focused bar including color, width, opacity, borderRadius etc | FocusedBarConfig | no | all | yes -| focusedBarIndex | index of the initially focused bar, works only when focusBarOnPress is | number | no | all | yes -| maxValue | Maximum value shown in the Y axis | number | no | all | yes -| yAxisOffset | Starting (minimum) value in the Y axis (value at the origin) | number | no | all | yes -| mostNegativeValue | The most negative value shown in the Y axis (to be used only if the data set has negative values too) | number | no | all | yes -| noOfSections | Number of sections in the Y axis | number | no | all | yes -| noOfSectionsBelowXAxis | Number of sections in the Y axis below X axis (in case the data set has negative values too) | number | no | all | yes -| stepValue | Value of 1 step/section in the Y axis | number | no | all | yes -| stepHeight | Height of 1 step/section in the Yaxis | number | no | all | yes -| negativeStepValue| Value of 1 step/section in the Y axis for negative values (in the 4th quadrant) | number | no | all | yes -| negativeStepHeight | Height of 1 step/section in the Y axis for negative values (in the 4th quadrant) | number | no | all | yes -| spacing | Distance between 2 consecutive bars in the Bar chart | number | no | all | yes -| backgroundColor | Background color of the Bar chart | ColorValue | no | all | yes -| sectionColors | Background color of the horizontal sections of the chart | ColorValue | no | all | yes -| scrollref | ref object that can be used to control the horizontal ScrollView inside which the chart is rendered | any | no | all | yes -| scrollToIndex | scroll to a particular index on chart load | number | no | all | yes -| disableScroll | To disable horizontal scroll | boolean | no | all | yes -| showScrollIndicator | To show horizontal scroll indicator| boolean | no | all | yes -| indicatorColor | (iOS only) The color of the scroll indicators - ('black', 'white' or 'default') | String | no | iOS | yes -| showLine | To show a Line chart over the Bar chart with the same data | boolean | no | all | yes -| lineData | The data object for the line chart (use only when showLine is true). To hide any datapoint pass hideDataPoint prop as true in specific data item. | Array of items | no | all | yes -| lineConfig | Properties of the Line chart shown over the Bar chart (lineConfigType) is described below | lineConfigType | no | all | yes -| lineData2 | The data object for the second line chart (use only when showLine is true) | Array of items | no | all | yes -| lineConfig2 | Properties of the second Line chart shown over the Bar chart (lineConfigType) is described below | lineConfigType | no | all | yes -| lineBehindBars | When set to true, the line chart will appear behind the Bars in case of overlap | boolean | no | all | yes -| autoShiftLabels | When set to true, automatically shifts the X axis labels for negative values | boolean | no | all | yes -| scrollToEnd | When set to true, the chart automatically scrolls to the rightmost bar | boolean | no | all | yes -| scrollAnimation | When set to true, scroll animation is visible when the chart automatically scrolls to the rightmost bar | boolean | no | all | yes -| scrollEventThrottle | (only for iOS) see https://reactnative.dev/docs/scrollview#scrolleventthrottle-ios| number | no | iOS | yes -| onScroll | callback function called when the chart is scrolled horizontally | Function | no | all | yes -| onMomentumScrollEnd | callback function called when scroll is completed | Function | no | all | yes -| initialSpacing | distance of the first bar from the Y axis | number | no | all | yes -| renderTooltip | tooltip component appearing above the bar when it is pressed, takes item and index as parameters | Function | no | all | yes -| leftShiftForTooltip | The distance by which the tooltip component should shift towards left | number | no | all | yes -| leftShiftForLastIndexTooltip | The distance by which the tooltip component of the last bar should shift towards left | number | no | all | yes -| adjustToWidth | When set to true, it auto-computes the barWidth and spacing to fit the chart in the available width / parentWidth | boolean | no | all | yes -| parentWidth | The width of the parent View or the width that the chart should auto-fit into when `adjustToWidth` is true | number | no | all | yes +| data | An item object represents a bar in the bar chart. It is described in the next table. | barDataItem[] | no | all | yes +| width | Width of the Bar chart | number | no | all | yes +| height | Height of the Bar chart (excluding the bottom label) | number | no | all | yes +| onPress | Callback function called on press of a Bar (takes item and index as parameter) | Function | no | all | yes +| onLongPress | Callback function called on long press of a Bar (takes item and index as parameter) | Function | no | all | yes +| onPressOut | Callback function called on press out of a Bar (takes item and index as parameter) | Function | no | all | yes +| focusBarOnPress | used to focus a bar on press by applying styles defined in focusedBarConfig | boolean | no | all | yes +| focusedBarConfig | styles for the focused bar including color, width, opacity, borderRadius etc | FocusedBarConfig | no | all | yes +| focusedBarIndex | index of the initially focused bar, works only when focusBarOnPress is | number | no | all | yes +| maxValue | Maximum value shown in the Y axis | number | no | all | yes +| yAxisOffset | Starting (minimum) value in the Y axis (value at the origin) | number | no | all | yes +| mostNegativeValue | The most negative value shown in the Y axis (to be used only if the data set has negative values too) | number | no | all | yes +| noOfSections | Number of sections in the Y axis | number | no | all | yes +| noOfSectionsBelowXAxis | Number of sections in the Y axis below X axis (in case the data set has negative values too) | number | no | all | yes +| stepValue | Value of 1 step/section in the Y axis | number | no | all | yes +| stepHeight | Height of 1 step/section in the Yaxis | number | no | all | yes +| negativeStepValue| Value of 1 step/section in the Y axis for negative values (in the 4th quadrant) | number | no | all | yes +| negativeStepHeight | Height of 1 step/section in the Y axis for negative values (in the 4th quadrant) | number | no | all | yes +| spacing | Distance between 2 consecutive bars in the Bar chart | number | no | all | yes +| backgroundColor | Background color of the Bar chart | ColorValue | no | all | yes +| sectionColors | Background color of the horizontal sections of the chart | ColorValue | no | all | yes +| scrollref | ref object that can be used to control the horizontal ScrollView inside which the chart is rendered | any | no | all | yes +| scrollToIndex | scroll to a particular index on chart load | number | no | all | yes +| disableScroll | To disable horizontal scroll | boolean | no | all | yes +| showScrollIndicator | To show horizontal scroll indicator| boolean | no | all | yes +| indicatorColor | (iOS only) The color of the scroll indicators - ('black', 'white' or 'default') | String | no | iOS | yes +| showLine | To show a Line chart over the Bar chart with the same data | boolean | no | all | yes +| lineData | The data object for the line chart (use only when showLine is true). To hide any datapoint pass hideDataPoint prop as true in specific data item. | Array of items | no | all | yes +| lineConfig | Properties of the Line chart shown over the Bar chart (lineConfigType) is described below | lineConfigType | no | all | yes +| lineData2 | The data object for the second line chart (use only when showLine is true) | Array of items | no | all | yes +| lineConfig2 | Properties of the second Line chart shown over the Bar chart (lineConfigType) is described below | lineConfigType | no | all | yes +| lineBehindBars | When set to true, the line chart will appear behind the Bars in case of overlap | boolean | no | all | yes +| autoShiftLabels | When set to true, automatically shifts the X axis labels for negative values | boolean | no | all | yes +| scrollToEnd | When set to true, the chart automatically scrolls to the rightmost bar | boolean | no | all | yes +| scrollAnimation | When set to true, scroll animation is visible when the chart automatically scrolls to the rightmost bar | boolean | no | all | yes +| scrollEventThrottle | (only for iOS) see https://reactnative.dev/docs/scrollview#scrolleventthrottle-ios| number | no | iOS | yes +| onScroll | callback function called when the chart is scrolled horizontally | Function | no | all | yes +| onMomentumScrollEnd | callback function called when scroll is completed | Function | no | all | yes +| initialSpacing | distance of the first bar from the Y axis | number | no | all | yes +| renderTooltip | tooltip component appearing above the bar when it is pressed, takes item and index as parameters | Function | no | all | yes +| leftShiftForTooltip | The distance by which the tooltip component should shift towards left | number | no | all | yes +| leftShiftForLastIndexTooltip | The distance by which the tooltip component of the last bar should shift towards left | number | no | all | yes +| adjustToWidth | When set to true, it auto-computes the barWidth and spacing to fit the chart in the available width / parentWidth | boolean | no | all | yes +| parentWidth | The width of the parent View or the width that the chart should auto-fit into when `adjustToWidth` is true | number | no | all | yes **Combine Line Chart using showLine** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| initialSpacing | distance of the first data point from the Y axis | number | no | all | yes -| curved | To show curved line joining the data points | boolean | no | all | yes -| isAnimated | To show animates Line Chart | boolean | no | all | yes -| delay | Delay (in milliseconds) before starting the animation of the line | number | no | all | yes -| thickness | Thickness of the Line | number | no | all | yes -| color | Color of the Line | ColorValue | no | all | yes -| hideDataPoints | To hide data points along the Line chart | boolean | no | all | yes -| dataPointsShape | Shape of the data points (_'rectangular'_ or _'circular'_) | String | no | all | yes -| dataPointsWidth | Width of data points (when data points' shape is rectangular) | number | no | all | yes -| dataPointsHeight | Height of data points (when data points' shape is rectangular) | number | no | all | yes -| dataPointsColor | Color of the data points | ColorValue | no | all | yes -| dataPointsRadius | Radius of data points (when data points' shape is _circular_) | number | no | all | yes -| textColor | Color of the dataPointText | ColorValue | no | all | yes -| textFontSize | Font size of the dataPointText | number | no | all | yes -| textShiftX | To shift the dataPointText text horizontally | number | no | all | yes -| textShiftY | To shift the dataPointText text vertically | number | no | all | yes -| shiftY | To shift the Line chart up or down by the given quantity m | number | no | all | yes -| startIndex | Start index for data line (used to display data lines having breaks) | number | no | all | yes -| endIndex | End index for data line (used to display data lines having breaks) | number | no | all | yes +| initialSpacing | distance of the first data point from the Y axis | number | no | all | yes +| curved | To show curved line joining the data points | boolean | no | all | yes +| isAnimated | To show animates Line Chart | boolean | no | all | yes +| delay | Delay (in milliseconds) before starting the animation of the line | number | no | all | yes +| thickness | Thickness of the Line | number | no | all | yes +| color | Color of the Line | ColorValue | no | all | yes +| hideDataPoints | To hide data points along the Line chart | boolean | no | all | yes +| dataPointsShape | Shape of the data points (_'rectangular'_ or _'circular'_) | String | no | all | yes +| dataPointsWidth | Width of data points (when data points' shape is rectangular) | number | no | all | yes +| dataPointsHeight | Height of data points (when data points' shape is rectangular) | number | no | all | yes +| dataPointsColor | Color of the data points | ColorValue | no | all | yes +| dataPointsRadius | Radius of data points (when data points' shape is _circular_) | number | no | all | yes +| textColor | Color of the dataPointText | ColorValue | no | all | yes +| textFontSize | Font size of the dataPointText | number | no | all | yes +| textShiftX | To shift the dataPointText text horizontally | number | no | all | yes +| textShiftY | To shift the dataPointText text vertically | number | no | all | yes +| shiftY | To shift the Line chart up or down by the given quantity m | number | no | all | yes +| startIndex | Start index for data line (used to display data lines having breaks) | number | no | all | yes +| endIndex | End index for data line (used to display data lines having breaks) | number | no | all | yes **Item description (barDataItem)** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| value | Value of the item representing height of the bar | number | no | all | yes -| barWidth | Width of the bar | number | no | all | yes -| onPress | Function called on pressing the bar | function | no | all | yes -| onLongPress | Function called on long pressing the bar | function | no | all | yes -| onPressOut | Callback function called on press out of a bar | Function | no | all | yes -| disablePress | Prop to disable the press action, defaults to false | boolean | no | all | yes -| frontColor | Color of the bar | ColorValue | no | all | yes -| sideColor | Color of the side view of the bar, only for 3 D | ColorValue | no | all | yes -| sideWidth | Width of the side view of the bar, only for 3 D | number | no | all | yes -| topColor | Color of the top view of the bar, only for 3 D | ColorValue | no | all | yes -| barStyle | style object for the Bars | object | no | all | yes -| showGradient | Prop to enable linear gradient for the bar color, defaults to false | boolean | no | all | yes -| gradientColor | Along with frontColor, this prop constitutes the 2 colors for gradient | ColorValue | no | all | yes -| label | Label text appearing below the bar (under the X axis) | string | no | all | yes -| labelWidth | Width of the Label text appearing below the bar (under the X axis) | number | no | all | yes -| labelTextStyle | Style object for the label text appearing below the bar | object | no | all | yes -| labelComponent | Custom label component appearing below the bar | Component | no | all | yes -| labelsDistanceFromXaxis | Distance of the X Axis label from the X axis | number | no | all | yes -| topLabelComponent | Custom component appearing above the bar | Component | no | all | yes -| topLabelContainerStyle | Style object for the container of the custom component appearing above the bar| object | no | all | yes -| cappedBars | To show caps on the top of bar | boolean | no | all | yes -| capThickness | Thickness of the bar cap | number | no | all | yes -| capColor | Color of the bar cap | ColorValue | no | all | yes -| capRadius | Border radius of the bar cap | number | no | all | yes -| barBorderRadius | Border radius of the bar | number | no | all | yes -| barBorderTopLeftRadius | Top left border radius of the bar | number| no | all | yes -| barBorderTopRightRadius | Top right border radius of the bar | number | no | all | yes -| barBorderBottomLeftRadius | Bottom left border radius of the bar | number | no | all | yes -| barBorderBottomRightRadius | Bottom right border radius of the bar| number | no | all | yes -| barMarginBottom | margin at the bottom of the bar (above X axis) | number | no | all | yes -| spacing | Distance of the next Bar from the currennt Bar | number | no | all | yes -| barBackgroundPattern | A svg component containing the background pattern for bars | Component | no | all | yes -| patternId | ID of the pattern component | String | no | all | yes -| leftShiftForTooltip | The distance by which the tooltip component should shift towards left | number | no | all | yes -| showXAxisIndex | show small graduation at the X axis for the corresponding bar | boolean | no | all | yes +| value | Value of the item representing height of the bar | number | no | all | yes +| barWidth | Width of the bar | number | no | all | yes +| onPress | Function called on pressing the bar | function | no | all | yes +| onLongPress | Function called on long pressing the bar | function | no | all | yes +| onPressOut | Callback function called on press out of a bar | Function | no | all | yes +| disablePress | Prop to disable the press action, defaults to false | boolean | no | all | yes +| frontColor | Color of the bar | ColorValue | no | all | yes +| sideColor | Color of the side view of the bar, only for 3 D | ColorValue | no | all | yes +| sideWidth | Width of the side view of the bar, only for 3 D | number | no | all | yes +| topColor | Color of the top view of the bar, only for 3 D | ColorValue | no | all | yes +| barStyle | style object for the Bars | object | no | all | yes +| showGradient | Prop to enable linear gradient for the bar color, defaults to false | boolean | no | all | yes +| gradientColor | Along with frontColor, this prop constitutes the 2 colors for gradient | ColorValue | no | all | yes +| label | Label text appearing below the bar (under the X axis) | string | no | all | yes +| labelWidth | Width of the Label text appearing below the bar (under the X axis) | number | no | all | yes +| labelTextStyle | Style object for the label text appearing below the bar | object | no | all | yes +| labelComponent | Custom label component appearing below the bar | Component | no | all | yes +| labelsDistanceFromXaxis | Distance of the X Axis label from the X axis | number | no | all | yes +| topLabelComponent | Custom component appearing above the bar | Component | no | all | yes +| topLabelContainerStyle | Style object for the container of the custom component appearing above the bar| object | no | all | yes +| cappedBars | To show caps on the top of bar | boolean | no | all | yes +| capThickness | Thickness of the bar cap | number | no | all | yes +| capColor | Color of the bar cap | ColorValue | no | all | yes +| capRadius | Border radius of the bar cap | number | no | all | yes +| barBorderRadius | Border radius of the bar | number | no | all | yes +| barBorderTopLeftRadius | Top left border radius of the bar | number| no | all | yes +| barBorderTopRightRadius | Top right border radius of the bar | number | no | all | yes +| barBorderBottomLeftRadius | Bottom left border radius of the bar | number | no | all | yes +| barBorderBottomRightRadius | Bottom right border radius of the bar| number | no | all | yes +| barMarginBottom | margin at the bottom of the bar (above X axis) | number | no | all | yes +| spacing | Distance of the next Bar from the currennt Bar | number | no | all | yes +| barBackgroundPattern | A svg component containing the background pattern for bars | Component | no | all | yes +| patternId | ID of the pattern component | String | no | all | yes +| leftShiftForTooltip | The distance by which the tooltip component should shift towards left | number | no | all | yes +| showXAxisIndex | show small graduation at the X axis for the corresponding bar | boolean | no | all | yes **Axes and rules related props** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| xAxisLength | X axis length | number | no | all | yes -| xAxisColor | X axis color | ColorValue | no | all | yes -| xAxisThickness | X axis thickness | number | no | all | yes -| yAxisColor | Y axis color | ColorValue | no | all | yes -| yAxisThickness | Y axis thickness | number | no | all | yes -| yAxisExtraHeight | Extra length of Y axis at the top | number | no | all | yes -| xAxisType | solid or dotted/dashed | RuleType | no | all | yes -| yAxisLabelWidth | Width of the Y axis Label container | number | no | all | yes -| yAxisTextStyle | Style object for the Y axis text style | object | no | all | yes -| yAxisTextNumberOfLines | Number of lines for y axis label text | number | no | all | yes -| yAxisLabelContainerStyle | Style object for the Y axis label container | object | no | all | yes -| trimYAxisAtTop | Removes the extra length of the Y axis from the top | boolean | no | all | yes -| horizontalRulesStyle | Style object for the horizontal rules container | object | no | all | yes -| showFractionalValues | Allow fractional values for the Y axis label | boolean | no | all | yes -| roundToDigits | Rounds the y axis values to given number of digits after decimal point | number | no | all | yes -| yAxisLabelPrefix | The String prepended to the y axis label text (for example- '$') | String | no | all | yes -| yAxisLabelSuffix | The String appended to the y axis label text | String | no | all | yes -| hideYAxisText | To hide Y axis label text | boolean | no | all | yes -| formatYLabel | a callback function that takes the label generated by the library and modifies it. | (label: string) => string | no | all | yes -| yAxisSide | Tells which side of the chart, should the y axis be present, defaults to 'left' | String | no | all | yes -| rulesLength | Length of the horizontal rules | number | no | all | yes -| rulesColor | Color of the horizontal rules | ColorValue | no | all | yes -| rulesThickness | Thickness of the horizontal rules | number | no | all | yes -| hideRules | To hide the horizontal rules | boolean | no | all | yes -| rulesType | solid or dotted/dashed | RuleType | no | all | yes -| dashWidth | width of each dash | number | no | all | yes -| dashGap | gap between 2 dashes | number | no | all | yes -| rulesConfigArray | Array of rulesConfig objects, used to customise the properties (like color, type etc) of specific rules | Array | no | all | yes -| referenceLine1Config | properties of reference line like thickness, color etc (described below the table) | referenceConfigType | no | all | yes -| referenceLine1Position | position of reference line | number | no | all | yes -| showReferenceLine2 | show second reference line | boolean | no | all | yes -| referenceLine2Config | properties of reference line like thickness, color etc (described below the table) | referenceConfigType | no | all | yes -| referenceLine2Position | position of second reference line | number | no | all | yes -| showReferenceLine3 | show third reference line | boolean | no | all | yes -| referenceLine3Config | properties of reference line like thickness, color etc (described below the table) | referenceConfigType | no | all | yes -| referenceLine3Position | position of third reference line | number | no | all | yes -| referenceLinesOverChartContent | used to render the reference lines over the rest of the chart content. | boolean | no | all | yes -| showVerticalLines | To show vertical lines | boolean | no | all | yes -| verticalLinesColor | Color of the vertical lines | ColorValue | no | all | yes -| verticallinesThickness | Thickness of the vertical lines | number | no | all | yes -| verticalLinesHeight | Height of the vertical lines | number | no | all | yes -| verticalLinesStrokeDashArray | Array of 2 numbers denoting the dashWidth and dashGap of the lines. Used to render dashed/dotted vertical line | Array | no | all | yes -| verticalLinesShift | vertical lines are aligned with bars. Shift them left or right using +ve or -ve value of verticalLinesShift | number | no | all | yes -| verticalLinesZIndex | Z index of the vertical lines | number | no | all | yes -| noOfVerticalLines | Number of vertical lines displayed | number | no | all | yes -| verticalLinesSpacing | Distance between consecutive vertical lines | number | no | all | yes -| showXAxisIndices | To show the pointers on the X axis | boolean | no | all | yes -| xAxisIndicesHeight | Height of the pointers on the X axis | number | no | all | yes -| xAxisIndicesWidth | Width of the pointers on the X axis | number | no | all | yes -| xAxisIndicesColor | Color of the pointers on the X axis | ColorValue | no | all | yes -| showYAxisIndices | To show the pointers on the Y axis | boolean | no | all | yes -| yAxisIndicesHeight | Height of the pointers on the Y axis | number | no | all | yes -| yAxisIndicesWidth | Width of the pointers on the Y axis | number | no | all | yes -| yAxisIndicesColor | Color of the pointers on the X axis | ColorValue | no | all | yes -| yAxisLabelTexts | Array of label texts to be displayed along y axis | Array | no | all | yes -| xAxisLabelTexts | Array of label texts to be displayed below x axis | Array | no | all | yes -| xAxisLabelTextStyle | Style of label texts to be displayed below x axis | object | no | all | yes -| rotateLabel | To rotate the X axis labels (by 60deg) | boolean | no | all | yes -| hideAxesAndRules | To hide axes, rules, labels altogether | boolean | no | all | yes -| hideOrigin | To hide the y Axis label at origin (i.e. 0) | boolean | no | all | yes -| labelWidth | Width of the Label text appearing below the bar (under the X axis) | number | no | all | yes -| labelsDistanceFromXaxis | Distance of the X Axis label from the X axis | number | no | all | yes -| xAxisTextNumberOfLines | Number of lines for x axis label text | number | no | all | yes -| xAxisLabelsHeight | Height of X axis labels container | number | no | all | yes -| xAxisLabelsVerticalShift | prop to adjust the vertical position of X axis labels (move X axis labels up or down) | number | no | all | yes -| labelsExtraHeight | used to display large rotated labels on X-axis (use this only when using the **rotateLabel** prop) | number | no | all | yes -| secondaryYAxis | displays and controls the properties of the secondary Y axis on the right side | secondaryYAxisType | no | all | yes -| secondaryData | the secondary data that will be rendered along the secondary Y axis | Array of items | no | all | yes +| xAxisLength | X axis length | number | no | all | yes +| xAxisColor | X axis color | ColorValue | no | all | yes +| xAxisThickness | X axis thickness | number | no | all | yes +| yAxisColor | Y axis color | ColorValue | no | all | yes +| yAxisThickness | Y axis thickness | number | no | all | yes +| yAxisExtraHeight | Extra length of Y axis at the top | number | no | all | yes +| xAxisType | solid or dotted/dashed | RuleType | no | all | yes +| yAxisLabelWidth | Width of the Y axis Label container | number | no | all | yes +| yAxisTextStyle | Style object for the Y axis text style | object | no | all | yes +| yAxisTextNumberOfLines | Number of lines for y axis label text | number | no | all | yes +| yAxisLabelContainerStyle | Style object for the Y axis label container | object | no | all | yes +| trimYAxisAtTop | Removes the extra length of the Y axis from the top | boolean | no | all | yes +| horizontalRulesStyle | Style object for the horizontal rules container | object | no | all | yes +| showFractionalValues | Allow fractional values for the Y axis label | boolean | no | all | yes +| roundToDigits | Rounds the y axis values to given number of digits after decimal point | number | no | all | yes +| yAxisLabelPrefix | The String prepended to the y axis label text (for example- '$') | String | no | all | yes +| yAxisLabelSuffix | The String appended to the y axis label text | String | no | all | yes +| hideYAxisText | To hide Y axis label text | boolean | no | all | yes +| formatYLabel | a callback function that takes the label generated by the library and modifies it. | (label: string) => string | no | all | yes +| yAxisSide | Tells which side of the chart, should the y axis be present, defaults to 'left' | String | no | all | yes +| rulesLength | Length of the horizontal rules | number | no | all | yes +| rulesColor | Color of the horizontal rules | ColorValue | no | all | yes +| rulesThickness | Thickness of the horizontal rules | number | no | all | yes +| hideRules | To hide the horizontal rules | boolean | no | all | yes +| rulesType | solid or dotted/dashed | RuleType | no | all | yes +| dashWidth | width of each dash | number | no | all | yes +| dashGap | gap between 2 dashes | number | no | all | yes +| rulesConfigArray | Array of rulesConfig objects, used to customise the properties (like color, type etc) of specific rules | Array | no | all | yes +| referenceLine1Config | properties of reference line like thickness, color etc (described below the table) | referenceConfigType | no | all | yes +| referenceLine1Position | position of reference line | number | no | all | yes +| showReferenceLine2 | show second reference line | boolean | no | all | yes +| referenceLine2Config | properties of reference line like thickness, color etc (described below the table) | referenceConfigType | no | all | yes +| referenceLine2Position | position of second reference line | number | no | all | yes +| showReferenceLine3 | show third reference line | boolean | no | all | yes +| referenceLine3Config | properties of reference line like thickness, color etc (described below the table) | referenceConfigType | no | all | yes +| referenceLine3Position | position of third reference line | number | no | all | yes +| referenceLinesOverChartContent | used to render the reference lines over the rest of the chart content. | boolean | no | all | yes +| showVerticalLines | To show vertical lines | boolean | no | all | yes +| verticalLinesColor | Color of the vertical lines | ColorValue | no | all | yes +| verticallinesThickness | Thickness of the vertical lines | number | no | all | yes +| verticalLinesHeight | Height of the vertical lines | number | no | all | yes +| verticalLinesStrokeDashArray | Array of 2 numbers denoting the dashWidth and dashGap of the lines. Used to render dashed/dotted vertical line | Array | no | all | yes +| verticalLinesShift | vertical lines are aligned with bars. Shift them left or right using +ve or -ve value of verticalLinesShift | number | no | all | yes +| verticalLinesZIndex | Z index of the vertical lines | number | no | all | yes +| noOfVerticalLines | Number of vertical lines displayed | number | no | all | yes +| verticalLinesSpacing | Distance between consecutive vertical lines | number | no | all | yes +| showXAxisIndices | To show the pointers on the X axis | boolean | no | all | yes +| xAxisIndicesHeight | Height of the pointers on the X axis | number | no | all | yes +| xAxisIndicesWidth | Width of the pointers on the X axis | number | no | all | yes +| xAxisIndicesColor | Color of the pointers on the X axis | ColorValue | no | all | yes +| showYAxisIndices | To show the pointers on the Y axis | boolean | no | all | yes +| yAxisIndicesHeight | Height of the pointers on the Y axis | number | no | all | yes +| yAxisIndicesWidth | Width of the pointers on the Y axis | number | no | all | yes +| yAxisIndicesColor | Color of the pointers on the X axis | ColorValue | no | all | yes +| yAxisLabelTexts | Array of label texts to be displayed along y axis | Array | no | all | yes +| xAxisLabelTexts | Array of label texts to be displayed below x axis | Array | no | all | yes +| xAxisLabelTextStyle | Style of label texts to be displayed below x axis | object | no | all | yes +| rotateLabel | To rotate the X axis labels (by 60deg) | boolean | no | all | yes +| hideAxesAndRules | To hide axes, rules, labels altogether | boolean | no | all | yes +| hideOrigin | To hide the y Axis label at origin (i.e. 0) | boolean | no | all | yes +| labelWidth | Width of the Label text appearing below the bar (under the X axis) | number | no | all | yes +| labelsDistanceFromXaxis | Distance of the X Axis label from the X axis | number | no | all | yes +| xAxisTextNumberOfLines | Number of lines for x axis label text | number | no | all | yes +| xAxisLabelsHeight | Height of X axis labels container | number | no | all | yes +| xAxisLabelsVerticalShift | prop to adjust the vertical position of X axis labels (move X axis labels up or down) | number | no | all | yes +| labelsExtraHeight | used to display large rotated labels on X-axis (use this only when using the **rotateLabel** prop) | number | no | all | yes +| secondaryYAxis | displays and controls the properties of the secondary Y axis on the right side | secondaryYAxisType | no | all | yes +| secondaryData | the secondary data that will be rendered along the secondary Y axis | Array of items | no | all | yes **Bar related props** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| barWidth | Width of the bar | number | no | all | yes -| barStyle | style object for the Bars | object | no | all | yes -| isThreeD | Prop to render 3 dimensional bars | boolean | no | all | yes -| frontColor | Color of the bar | ColorValue | no | all | yes -| sideColor | Color of the side view of the bar, only for 3 D | ColorValue | no | all | yes -| topColor | Color of the top view of the bar, only for 3 D | ColorValue | no | all | yes -| sideWidth | Width of the side view of the bar, only for 3 D | number | no | all | yes -| showGradient | Prop to enable linear gradient for the bar color | boolean | no | all | yes -| gradientColor | Along with frontColor, gradientColor constitutes the 2 colors for gradient | ColorValue | no | all | yes -| roundedTop | To show rounded top | boolean | no | all | yes -| roundedBottom | To show rounded bottom | boolean | no | all | yes -| activeOpacity | activeOpacity on pressing the bar | number | no | all | yes -| disablePress | Prop to disable the bar press action | boolean | no | all | yes -| barBorderWidth | Border width of the bar | number | no | all | yes -| barBorderColor | Border color of the bar | ColorValue | no | all | yes -| barBorderRadius | Border radius of the bar | number | no | all | yes -| barBorderTopLeftRadius | Top left border radius of the bar | number | no | all | yes -| barBorderTopRightRadius | Top right border radius of the bar | number | no | all | yes -| barBorderBottomLeftRadius | Bottom left border radius of the bar | number | no | all | yes -| barBorderBottomRightRadius | Bottom right border radius of the bar | number | no | all | yes -| barMarginBottom | margin at the bottom of the bar (above X axis) | number | no | all | yes -| barBackgroundPattern | A svg component containing the background pattern for bars | Component | no | all | yes -| patternId | ID of the pattern component | String | no | all | yes -| minHeight | Minimum height of the Bars | number | no | all | yes +| barWidth | Width of the bar | number | no | all | yes +| barStyle | style object for the Bars | object | no | all | yes +| isThreeD | Prop to render 3 dimensional bars | boolean | no | all | yes +| frontColor | Color of the bar | ColorValue | no | all | yes +| sideColor | Color of the side view of the bar, only for 3 D | ColorValue | no | all | yes +| topColor | Color of the top view of the bar, only for 3 D | ColorValue | no | all | yes +| sideWidth | Width of the side view of the bar, only for 3 D | number | no | all | yes +| showGradient | Prop to enable linear gradient for the bar color | boolean | no | all | yes +| gradientColor | Along with frontColor, gradientColor constitutes the 2 colors for gradient | ColorValue | no | all | yes +| roundedTop | To show rounded top | boolean | no | all | yes +| roundedBottom | To show rounded bottom | boolean | no | all | yes +| activeOpacity | activeOpacity on pressing the bar | number | no | all | yes +| disablePress | Prop to disable the bar press action | boolean | no | all | yes +| barBorderWidth | Border width of the bar | number | no | all | yes +| barBorderColor | Border color of the bar | ColorValue | no | all | yes +| barBorderRadius | Border radius of the bar | number | no | all | yes +| barBorderTopLeftRadius | Top left border radius of the bar | number | no | all | yes +| barBorderTopRightRadius | Top right border radius of the bar | number | no | all | yes +| barBorderBottomLeftRadius | Bottom left border radius of the bar | number | no | all | yes +| barBorderBottomRightRadius | Bottom right border radius of the bar | number | no | all | yes +| barMarginBottom | margin at the bottom of the bar (above X axis) | number | no | all | yes +| barBackgroundPattern | A svg component containing the background pattern for bars | Component | no | all | yes +| patternId | ID of the pattern component | String | no | all | yes +| minHeight | Minimum height of the Bars | number | no | all | yes **Animation related props** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| isAnimated | To show animates BarChart. Animation occurs onLoad and on value change | boolean | no | all | yes -| animationDuration | Duration of the animations | number | no | all | yes -| animationEasing | Easing applied to the animation | Easing | no | all | yes +| isAnimated | To show animates BarChart. Animation occurs onLoad and on value change | boolean | no | all | yes +| animationDuration | Duration of the animations | number | no | all | yes +| animationEasing | Easing applied to the animation | Easing | no | all | yes **Pagination related props** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| onEndReached | Callback function called when the chart is scrolled upto end | Function | no | all | yes -| onStartReached | Callback function called when the chart is scrolled upto start | Function | no | all | yes +| onEndReached | Callback function called when the chart is scrolled upto end | Function | no | all | yes +| onStartReached | Callback function called when the chart is scrolled upto start | Function | no | all | yes **Bar related props for making Capped Bar chart** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| cappedBars | To show caps on the top of bars | boolean | no | all | yes -| capThickness | Thickness of the bar caps | number | no | all | yes -| capColor | Color of the bar caps | ColorValue | no | all | yes -| capRadius | Border radius of the bar caps | number | no | all | yes +| cappedBars | To show caps on the top of bars | boolean | no | all | yes +| capThickness | Thickness of the bar caps | number | no | all | yes +| capColor | Color of the bar caps | ColorValue | no | all | yes +| capRadius | Border radius of the bar caps | number | no | all | yes **pointerConfig** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| height | Height of the pointer | number | no | all | yes -| width | width of the pointer | number | no | all | yes -| radius | radius of the pointer | number | no | all | yes -| pointerColor | pointer color | ColorValue | no | all | yes -| pointerColorsForDataSet | When using pointers with dataSet, you can set pointer colors on each data line using the pointerColorsForDataSet which is an array of color values. | ColorValue[] | no | all | yes -| secondaryPointerColor | Secondary pointer color | ColorValue | no | all | yes -| pointerComponent | is a function that returns the component to be rendered as a pointer | Function | no | all | yes -| showPointerStrip | show pointer bar | boolean | no | all | yes -| pointerStripWidth | width of the pointer bar | number | no | all | yes -| pointerStripHeight | height of the pointer bar | number | no | all | yes -| pointerStripColor | color of the pointer bar | ColorValue | no | all | yes -| pointerStripUptoDataPoint | Pointer stripped to data point | boolean | no | all | yes -| pointerLabelComponent | is a function that returns the component to be rendered as a Label. It takes 2 parameters - 1. an array of items 2 | Function | no | all | yes -| stripOverPointer | strip to over pointer | boolean | no | all | yes -| autoAdjustPointerLabelPosition | Adjust the position of the pointer | boolean | no | all | yes -| shiftPointerLabelX | x-axis displacement pointer label | number | no | all | yes -| shiftPointerLabelY | y-axis displacement pointer label | number | no | all | yes -| pointerLabelWidth | pointer label width | number | no | all | yes -| pointerLabelHeight | pointer label height | number | no | all | yes -| pointerVanishDelay | Pointer disappearance delay | number | no | all | yes -| activatePointersOnLongPress |Long press to activate pointer | boolean | no | all | yes -| activatePointersDelay | activation pointer delay | number | no | all | yes -| persistPointer | persistent pointer | boolean | no | all | yes -| strokeDashArray | Array of 2 numbers denoting the dashWidth and dashGap of the lines. Used to render dashed/dotted pointer | number[] | no | all | yes -| barTouchable | touchable bar | boolean | no | all | yes -| pointerEvents | pointer event in Bars | PointerEvents | no | all | yes -| stripBehindBars | hide the strip in Bars | boolean | no | all | yes +| height | Height of the pointer | number | no | all | yes +| width | width of the pointer | number | no | all | yes +| radius | radius of the pointer | number | no | all | yes +| pointerColor | pointer color | ColorValue | no | all | yes +| pointerColorsForDataSet | When using pointers with dataSet, you can set pointer colors on each data line using the pointerColorsForDataSet which is an array of color values. | ColorValue[] | no | all | yes +| secondaryPointerColor | Secondary pointer color | ColorValue | no | all | yes +| pointerComponent | is a function that returns the component to be rendered as a pointer | Function | no | all | yes +| showPointerStrip | show pointer bar | boolean | no | all | yes +| pointerStripWidth | width of the pointer bar | number | no | all | yes +| pointerStripHeight | height of the pointer bar | number | no | all | yes +| pointerStripColor | color of the pointer bar | ColorValue | no | all | yes +| pointerStripUptoDataPoint | Pointer stripped to data point | boolean | no | all | yes +| pointerLabelComponent | is a function that returns the component to be rendered as a Label. It takes 2 parameters - 1. an array of items 2 | Function | no | all | yes +| stripOverPointer | strip to over pointer | boolean | no | all | yes +| autoAdjustPointerLabelPosition | Adjust the position of the pointer | boolean | no | all | yes +| shiftPointerLabelX | x-axis displacement pointer label | number | no | all | yes +| shiftPointerLabelY | y-axis displacement pointer label | number | no | all | yes +| pointerLabelWidth | pointer label width | number | no | all | yes +| pointerLabelHeight | pointer label height | number | no | all | yes +| pointerVanishDelay | Pointer disappearance delay | number | no | all | yes +| activatePointersOnLongPress |Long press to activate pointer | boolean | no | all | yes +| activatePointersDelay | activation pointer delay | number | no | all | yes +| persistPointer | persistent pointer | boolean | no | all | yes +| strokeDashArray | Array of 2 numbers denoting the dashWidth and dashGap of the lines. Used to render dashed/dotted pointer | number[] | no | all | yes +| barTouchable | touchable bar | boolean | no | all | yes +| pointerEvents | pointer event in Bars | PointerEvents | no | all | yes +| stripBehindBars | hide the strip in Bars | boolean | no | all | yes **Props for horizontal BarChart** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| horizontal | Render horizontal | boolean | no | all | yes -| rtl | Render the chart from right to left | boolean | no | all | yes -| shiftX | Shift the chart towards left or right by given value (only in horizontal charts) | number | no | all | yes -| shiftY | Shift the chart upwards or downwards by given value (only in horizontal charts) | number | no | all | yes -| rotateYAxisTexts | angle by which the Y axis label texts should rotate in horizontal charts | number | no | all | yes -| yAxisAtTop | In horizontal BarCharts the Y axis appears at bottom by default. Set it to true for otherwise | boolean | no | all | yes -| intactTopLabel | To rotate the top label component to make it intact with the Bars | boolean | no | all | yes +| horizontal | Render horizontal | boolean | no | all | yes +| rtl | Render the chart from right to left | boolean | no | all | yes +| shiftX | Shift the chart towards left or right by given value (only in horizontal charts) | number | no | all | yes +| shiftY | Shift the chart upwards or downwards by given value (only in horizontal charts) | number | no | all | yes +| rotateYAxisTexts | angle by which the Y axis label texts should rotate in horizontal charts | number | no | all | yes +| yAxisAtTop | In horizontal BarCharts the Y axis appears at bottom by default. Set it to true for otherwise | boolean | no | all | yes +| intactTopLabel | To rotate the top label component to make it intact with the Bars | boolean | no | all | yes **Props for Stacked Bar Charts** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| stackData | A stack array represents a stack of bars in the bar chart. It is described in the next table | Array of stack arrays | no | all | yes -| barBorderRadius | Border radius of each bar of the stack | number| no | all | yes -| barBorderTopLeftRadius | Top left border radius of each bar of the stack | number| no | all | yes -| barBorderTopRightRadius | Top right border radius of each bar of the stack | number | no | all | yes -| barBorderBottomLeftRadius | Bottom left border radius of each bar of the stack | number | no | all | yes -| barBorderBottomRightRadius | Bottom right border radius of each bar of the stack | number | no | all | yes -| stackBorderRadius | Border radius of the top and bottom bars of the stack | number | no | all | yes -| stackBorderTopLeftRadius | Top left border radius of the top bar of the stack | number| no | all | yes -| stackBorderTopRightRadius | Top right border radius of the top bar of the stack | number | no | all | yes -| stackBorderBottomLeftRadius | Bottom left border radius of the bottom bar of the stack | number | no | all | yes -| stackBorderBottomRightRadius | Bottom right border radius of the bottom bar of the stack | number | no | all | yes -| autoShiftLabelsForNegativeStacks | Whether the x axis labels should auto shift to a position below the bar, if the bar is under x-axis due to negative value | boolean| no | all | yes +| stackData | A stack array represents a stack of bars in the bar chart. It is described in the next table | Array of stack arrays | no | all | yes +| barBorderRadius | Border radius of each bar of the stack | number| no | all | yes +| barBorderTopLeftRadius | Top left border radius of each bar of the stack | number| no | all | yes +| barBorderTopRightRadius | Top right border radius of each bar of the stack | number | no | all | yes +| barBorderBottomLeftRadius | Bottom left border radius of each bar of the stack | number | no | all | yes +| barBorderBottomRightRadius | Bottom right border radius of each bar of the stack | number | no | all | yes +| stackBorderRadius | Border radius of the top and bottom bars of the stack | number | no | all | yes +| stackBorderTopLeftRadius | Top left border radius of the top bar of the stack | number| no | all | yes +| stackBorderTopRightRadius | Top right border radius of the top bar of the stack | number | no | all | yes +| stackBorderBottomLeftRadius | Bottom left border radius of the bottom bar of the stack | number | no | all | yes +| stackBorderBottomRightRadius | Bottom right border radius of the bottom bar of the stack | number | no | all | yes +| autoShiftLabelsForNegativeStacks | Whether the x axis labels should auto shift to a position below the bar, if the bar is under x-axis due to negative value | boolean| no | all | yes **Stack Array description** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| stacks array | A stack is made of 1 or more objects of the type described in the next table | Array of stack items| no | all | yes -| label | Label text appearing below the stack (under the X axis) | string | no | all | yes -| labelTextStyle | Style object for the label text appearing below the stack | object| no | all | yes -| barWidth | Width of the stack bar | number| no | all | yes -| spacing | Distance between 2 consecutive bars in the stack Bar chart | number| no | all | yes -| borderRadius | Border radius of each bar of the stack | number| no | all | yes -| borderTopLeftRadius | Top left border radius of the top bar of the stack | number| no | all | yes -| borderTopRightRadius | Top right border radius of the top bar of the stack | number| no | all | yes -| borderBottomLeftRadius | Bottom left border radius of the bottom bar of the stack | number| no | all | yes -| borderBottomRightRadius | Bottom right border radius of the bottom bar of the stack | number| no | all | yes +| stacks array | A stack is made of 1 or more objects of the type described in the next table | Array of stack items| no | all | yes +| label | Label text appearing below the stack (under the X axis) | string | no | all | yes +| labelTextStyle | Style object for the label text appearing below the stack | object| no | all | yes +| barWidth | Width of the stack bar | number| no | all | yes +| spacing | Distance between 2 consecutive bars in the stack Bar chart | number| no | all | yes +| borderRadius | Border radius of each bar of the stack | number| no | all | yes +| borderTopLeftRadius | Top left border radius of the top bar of the stack | number| no | all | yes +| borderTopRightRadius | Top right border radius of the top bar of the stack | number| no | all | yes +| borderBottomLeftRadius | Bottom left border radius of the bottom bar of the stack | number| no | all | yes +| borderBottomRightRadius | Bottom right border radius of the bottom bar of the stack | number| no | all | yes **Stack item description** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| value | Value of the item representing height of the stack item | number | no | all | yes -| color | Color of the stack item | ColorValue | no | all | yes -| onPress | Function called on pressing the stack item | function | no | all | yes -| onLongPress | Function called on long pressing the stack item | function | no | all | yes -| onPressOut | Callback function called on press out of a bar | Function | no | all | yes -| marginBottom | margin below a particular stack sectio | number n | no | all | yes -| barBorderRadius | Border radius of a stack section | number | no | all | yes -| borderTopLeftRadius | borderTopLeftRadius for a stack section | number | no | all | yes -| borderTopRightRadius | borderTopRightRadius for a stack section | number | no | all | yes -| borderBottomLeftRadius | borderBottomLeftRadius for a stack section | number | no | all | yes -| borderBottomRightRadius | borderBottomRightRadius for a stack section | number | no | all | yes -| showGradient | Prop to enable linear gradient for the bar color, defaults to false | boolean | no | all | yes -| gradientColor | Along with frontColor, this prop constitutes the 2 colors for gradient| ColorValue | no | all | yes -| barWidth | Width of the bar | number | no | all | yes -| showXAxisIndex | show small graduation at the X axis for the corresponding stack | boolean | no | all | yes +| value | Value of the item representing height of the stack item | number | no | all | yes +| color | Color of the stack item | ColorValue | no | all | yes +| onPress | Function called on pressing the stack item | function | no | all | yes +| onLongPress | Function called on long pressing the stack item | function | no | all | yes +| onPressOut | Callback function called on press out of a bar | Function | no | all | yes +| marginBottom | margin below a particular stack sectio | number n | no | all | yes +| barBorderRadius | Border radius of a stack section | number | no | all | yes +| borderTopLeftRadius | borderTopLeftRadius for a stack section | number | no | all | yes +| borderTopRightRadius | borderTopRightRadius for a stack section | number | no | all | yes +| borderBottomLeftRadius | borderBottomLeftRadius for a stack section | number | no | all | yes +| borderBottomRightRadius | borderBottomRightRadius for a stack section | number | no | all | yes +| showGradient | Prop to enable linear gradient for the bar color, defaults to false | boolean | no | all | yes +| gradientColor | Along with frontColor, this prop constitutes the 2 colors for gradient| ColorValue | no | all | yes +| barWidth | Width of the bar | number | no | all | yes +| showXAxisIndex | show small graduation at the X axis for the corresponding stack | boolean | no | all | yes ### LineChart and AreaChart **Basic props** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| data | An item object represents a point in the line chart. It is described in the next table. | Array | no | all | yes -| data2 | Second set of dataPoint for the second line | Array | no | all | yes -| data3 | Third set of dataPoint for the third line | Array | no | all | yes -| data4 | Fourth set of dataPoint for the fourth line | Array | no | all | yes -| data5 | Fifth set of dataPoint for the third line| Array | no | all | yes -| dataSet | Array of data sets (used instead of using `data2`, `data3`, `data4` etc) | Array| no | all | yes -| width | Width of the Bar chart | number | no | all | yes -| height| Height of the Bar chart (excluding the bottom label) | number | no | all | yes -| overflowTop | Extra space at the top of the chart to make room for dataPointText | number | no | all | yes -| overflowBottom | Extra space at the bottom of the chart to make room for dataPoints or dataPointText | number | no | all | yes -| maxValue | Maximum value shown in the Y axis | number | no | all | yes -| mostNegativeValue | The most negative value shown in the Y axis (to be used only if the data set has negative values too) | number | no | all | yes -| noOfSections | Number of sections in the Y axis | number | no | all | yes -| noOfSectionsBelowXAxis | Number of sections in the Y axis below X axis (in case the data set has negative values too)| number | no | all | yes -| stepValue | Value of 1 step/section in the Y axis | number | no | all | yes -| stepHeight | Height of 1 step/section in the Y axis| number | no | all | yes -| negativeStepValue | Value of 1 step/section in the Y axis for negative values (in the 4th quadrant)| number | no | all | yes -| negativeStepHeight | Height of 1 step/section in the Y axis for negative values (in the 4th quadrant) | number | no | all | yes -| spacing | Distance between 2 consecutive bars in the Bar chart | number | no | all | yes -| adjustToWidth | When set to true, it auto computes the spacing value to fit the Line chart in the available width | boolean | no | all | yes -| backgroundColor | Background color of the Bar chart | ColorValue | no | all | yes -| sectionColors | Background color of the horizontal sections of the chart | ColorValue | no | all | yes -| scrollref | ref object that can be used to control the horizontal ScrollView inside which the chart is rendered | any | no | all | yes -| scrollToIndex | scroll to a particular index on chart load | number | no | all | yes -| disableScroll | To disable horizontal scroll | boolean | no | all | yes -| showScrollIndicator | To show horizontal scroll indicator | boolean | no | all | yes -| indicatorColor | (iOS only) The color of the scroll indicators - ('black', 'white' or 'default') | String | no | all | yes -| isAnimated | To show animated Line or Area Chart. Animation occurs when the chart load for the first time | boolean | no | all | yes -| animateOnDataChange | To show animation on change in data. A smooth transition takes place between the iold and new line | boolean | no | all | yes -| onDataChangeAnimationDuration | Duration (milliseconds) in which the transition animation takes place on a change in data | number | no | all | yes -| onPress | The callback function that handles the press event. `item` and `index` are received as props | Function | no | all | yes -| scrollToEnd | When set to true, the chart automatically scrolls to the rightmost data point | boolean | no | all | yes -| scrollAnimation | When set to true, scroll animation is visible when the chart automatically scrolls to the rightmost data point | boolean | no | all | yes -| scrollEventThrottle | (only for iOS) see https://reactnative.dev/docs/scrollview#scrolleventthrottle-ios | number | no | iOS | yes -| onScroll | callback function called when the chart is scrolled horizontally| Function | no | all | yes -| onMomentumScrollEnd | callback function called when scroll is completed | Function| no | all | yes -| initialSpacing | distance of the first data point from the Y axis| number | no | all | yes -| endSpacing | distance/padding left at the end of the line chart | number | no | all | yes +| data | An item object represents a point in the line chart. It is described in the next table. | Array | no | all | yes +| data2 | Second set of dataPoint for the second line | Array | no | all | yes +| data3 | Third set of dataPoint for the third line | Array | no | all | yes +| data4 | Fourth set of dataPoint for the fourth line | Array | no | all | yes +| data5 | Fifth set of dataPoint for the third line| Array | no | all | yes +| dataSet | Array of data sets (used instead of using `data2`, `data3`, `data4` etc) | Array| no | all | yes +| width | Width of the Bar chart | number | no | all | yes +| height| Height of the Bar chart (excluding the bottom label) | number | no | all | yes +| overflowTop | Extra space at the top of the chart to make room for dataPointText | number | no | all | yes +| overflowBottom | Extra space at the bottom of the chart to make room for dataPoints or dataPointText | number | no | all | yes +| maxValue | Maximum value shown in the Y axis | number | no | all | yes +| mostNegativeValue | The most negative value shown in the Y axis (to be used only if the data set has negative values too) | number | no | all | yes +| noOfSections | Number of sections in the Y axis | number | no | all | yes +| noOfSectionsBelowXAxis | Number of sections in the Y axis below X axis (in case the data set has negative values too)| number | no | all | yes +| stepValue | Value of 1 step/section in the Y axis | number | no | all | yes +| stepHeight | Height of 1 step/section in the Y axis| number | no | all | yes +| negativeStepValue | Value of 1 step/section in the Y axis for negative values (in the 4th quadrant)| number | no | all | yes +| negativeStepHeight | Height of 1 step/section in the Y axis for negative values (in the 4th quadrant) | number | no | all | yes +| spacing | Distance between 2 consecutive bars in the Bar chart | number | no | all | yes +| adjustToWidth | When set to true, it auto computes the spacing value to fit the Line chart in the available width | boolean | no | all | yes +| backgroundColor | Background color of the Bar chart | ColorValue | no | all | yes +| sectionColors | Background color of the horizontal sections of the chart | ColorValue | no | all | yes +| scrollref | ref object that can be used to control the horizontal ScrollView inside which the chart is rendered | any | no | all | yes +| scrollToIndex | scroll to a particular index on chart load | number | no | all | yes +| disableScroll | To disable horizontal scroll | boolean | no | all | yes +| showScrollIndicator | To show horizontal scroll indicator | boolean | no | all | yes +| indicatorColor | (iOS only) The color of the scroll indicators - ('black', 'white' or 'default') | String | no | all | yes +| isAnimated | To show animated Line or Area Chart. Animation occurs when the chart load for the first time | boolean | no | all | yes +| animateOnDataChange | To show animation on change in data. A smooth transition takes place between the iold and new line | boolean | no | all | yes +| onDataChangeAnimationDuration | Duration (milliseconds) in which the transition animation takes place on a change in data | number | no | all | yes +| onPress | The callback function that handles the press event. `item` and `index` are received as props | Function | no | all | yes +| scrollToEnd | When set to true, the chart automatically scrolls to the rightmost data point | boolean | no | all | yes +| scrollAnimation | When set to true, scroll animation is visible when the chart automatically scrolls to the rightmost data point | boolean | no | all | yes +| scrollEventThrottle | (only for iOS) see https://reactnative.dev/docs/scrollview#scrolleventthrottle-ios | number | no | iOS | yes +| onScroll | callback function called when the chart is scrolled horizontally| Function | no | all | yes +| onMomentumScrollEnd | callback function called when scroll is completed | Function| no | all | yes +| initialSpacing | distance of the first data point from the Y axis| number | no | all | yes +| endSpacing | distance/padding left at the end of the line chart | number | no | all | yes **Item description (lineDataItem)** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| value| Value of the item representing representing its position | number | no | all | yes -| onPress | Function called on pressing the data point | function | no | all | yes -| label | Label text appearing under the X axis | string | no | all | yes -| labelTextStyle | Style object for the label text appearing under the X axis | object | no | all | yes -| labelComponent | custom label component appearing under the X axis | Function | no | all | yes -| yAxisLabelText | Y axis label text | string | no | all | yes -| dataPointText | Text appearing near the data points | string | no | all | yes -| textShiftX | To shift the dataPointText text horizontally | number | no | all | yes -| textShiftY | To shift the dataPointText text vertically | number | no | all | yes -| textColor | Color of the dataPointText | ColorValue| no | all | yes -| textFontSize | Font size of the dataPointText | number | no | all | yes -| dataPointHeight | Height of the data point (when data point's shape is rectangular) | number | no | all | yes -| dataPointWidth | Width of the data point (when data point's shape is rectangular) | number | no | all | yes -| dataPointRadius | Radius of the data point (when data points' shape is circular) | number| no | all | yes -| dataPointColor | Color of the data point | ColorValue | no | all | yes -| dataPointShape | Shape of the data point (rectangular or circular) defaults to circular | string | no | all | yes -| hideDataPoint | To hide the data point | boolean | no | all | yes -| showVerticalLine | When set to true, a vertical line will be displayed along that data point | boolean | no | all | yes -| verticalLineUptoDataPoint | When set to true, it sets the height of the vertical line upto the corresponding data point | boolean | no | all | yes -| verticalLineColor | Color of the vertical Line displayed along the data point | ColorValue | no | all | yes -| verticalLineThickness | Thickness of the vertical Line displayed along the data point | number| no | all | yes -| dataPointLabelWidth | width of the label shown beside a data point | number | no | all | yes -| dataPointLabelShiftX | horizontal shift of a label from its corresponding data point | number | no | all | yes -| dataPointLabelShiftY | vertical shift of a label from its corresponding data point | number | no | all | yes -| dataPointLabelComponent | custom component rendered above a data point| Function | no | all | yes -| focusedDataPointLabelComponent | custom component rendered above a data point only when focused/selected (when the user presses) | Function | no | all | yes -| showStrip | To show a vertical strip along the data point (even if it's not focused/selected) | boolean | no | all | yes -| stripHeight | Height of the vertical strip that becomes visible on pressing the corresponding area of the chart, or when showStrip is set to true | number| no | all | yes -| stripWidth | Width of the vertical strip that becomes visible on pressing the corresponding area of the chart, or when showStrip is set to true | number| no | all | yes -| stripColor | Color of the vertical strip that becomes visible on pressing the corresponding area of the chart, or when showStrip is set to true | ColorValue| no | all | yes -| stripOpacity | Opacity of the vertical strip that becomes visible on pressing the corresponding area of the chart, or when showStrip is set to true | number| no | all | yes -| pointerShiftX | Shifts the pointer for that item horizontally by given quantity (used only when pointerConfig prop is passed) | number| no | all | yes -| pointerShiftY | Shifts the pointer for that item vertically by given quantity (used only when pointerConfig prop is passed) | number | no | all | yes +| value| Value of the item representing representing its position | number | no | all | yes +| onPress | Function called on pressing the data point | function | no | all | yes +| label | Label text appearing under the X axis | string | no | all | yes +| labelTextStyle | Style object for the label text appearing under the X axis | object | no | all | yes +| labelComponent | custom label component appearing under the X axis | Function | no | all | yes +| yAxisLabelText | Y axis label text | string | no | all | yes +| dataPointText | Text appearing near the data points | string | no | all | yes +| textShiftX | To shift the dataPointText text horizontally | number | no | all | yes +| textShiftY | To shift the dataPointText text vertically | number | no | all | yes +| textColor | Color of the dataPointText | ColorValue| no | all | yes +| textFontSize | Font size of the dataPointText | number | no | all | yes +| dataPointHeight | Height of the data point (when data point's shape is rectangular) | number | no | all | yes +| dataPointWidth | Width of the data point (when data point's shape is rectangular) | number | no | all | yes +| dataPointRadius | Radius of the data point (when data points' shape is circular) | number| no | all | yes +| dataPointColor | Color of the data point | ColorValue | no | all | yes +| dataPointShape | Shape of the data point (rectangular or circular) defaults to circular | string | no | all | yes +| hideDataPoint | To hide the data point | boolean | no | all | yes +| showVerticalLine | When set to true, a vertical line will be displayed along that data point | boolean | no | all | yes +| verticalLineUptoDataPoint | When set to true, it sets the height of the vertical line upto the corresponding data point | boolean | no | all | yes +| verticalLineColor | Color of the vertical Line displayed along the data point | ColorValue | no | all | yes +| verticalLineThickness | Thickness of the vertical Line displayed along the data point | number| no | all | yes +| dataPointLabelWidth | width of the label shown beside a data point | number | no | all | yes +| dataPointLabelShiftX | horizontal shift of a label from its corresponding data point | number | no | all | yes +| dataPointLabelShiftY | vertical shift of a label from its corresponding data point | number | no | all | yes +| dataPointLabelComponent | custom component rendered above a data point| Function | no | all | yes +| focusedDataPointLabelComponent | custom component rendered above a data point only when focused/selected (when the user presses) | Function | no | all | yes +| showStrip | To show a vertical strip along the data point (even if it's not focused/selected) | boolean | no | all | yes +| stripHeight | Height of the vertical strip that becomes visible on pressing the corresponding area of the chart, or when showStrip is set to true | number| no | all | yes +| stripWidth | Width of the vertical strip that becomes visible on pressing the corresponding area of the chart, or when showStrip is set to true | number| no | all | yes +| stripColor | Color of the vertical strip that becomes visible on pressing the corresponding area of the chart, or when showStrip is set to true | ColorValue| no | all | yes +| stripOpacity | Opacity of the vertical strip that becomes visible on pressing the corresponding area of the chart, or when showStrip is set to true | number| no | all | yes +| pointerShiftX | Shifts the pointer for that item horizontally by given quantity (used only when pointerConfig prop is passed) | number| no | all | yes +| pointerShiftY | Shifts the pointer for that item vertically by given quantity (used only when pointerConfig prop is passed) | number | no | all | yes **Pagination related props** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| onEndReached | Callback function called when the chart is scrolled upto end | Function | no | all | yes -| onStartReached | Callback function called when the chart is scrolled upto start | Function | no | all | yes +| onEndReached | Callback function called when the chart is scrolled upto end | Function | no | all | yes +| onStartReached | Callback function called when the chart is scrolled upto start | Function | no | all | yes **Axes and rules related props** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| xAxisLength | X axis length | number | no | all | yes -| xAxisColor| X axis color | ColorValue | no | all | yes -| xAxisThickness | X axis thickness | number | no | all | yes -| xAxisType | solid or dotted/dashed | RuleType | no | all | yes -| yAxisColor | Y axis color | ColorValue | no | all | yes -| yAxisThickness | Y axis thickness | number | no | all | yes -| yAxisLabelWidth | Width of the Y axis Label container | number | no | all | ye -| yAxisTextStyle | Style object for the Y axis text style | object | no | all | yes -| yAxisTextNumberOfLines | Number of lines for y axis label text | number | no | all | yes -| yAxisLabelContainerStyle | Style object for the Y axis label container | object | no | all | yes -| trimYAxisAtTop | Removes the extra length of the Y axis from the top | boolean | no | all | yes -| yAxisExtraHeight | Extra length of Y axis at the top | number | no | all | yes -| yAxisOffset | Starting value on Y Axis | number | no | all | yes -| horizontalRulesStyle | Style object for the horizontal rules container | object | no | all | yes -| showFractionalValues | Allow fractional values for the Y axis label | boolean | no | all | yes -| roundToDigits | Rounds the y axis values to given number of digits after decimal point | number | no | all | yes -| yAxisLabelPrefix | The String prepended to the y axis label text (for example- '$') | String| no | all | yes -| yAxisLabelSuffix |The String appended to the y axis label text | String| no | all | yes -| hideYAxisText | To hide Y axis label text | boolean | no | all | yes -| formatYLabel | a callback function that takes the label generated by the library and modifies it. | (label: string) => string | no | all | yes -| yAxisSide | Tells which side of the chart, should the y axis be present, defaults to 'left' | String | no | all | yes -| rulesLength | Length of the horizontal | number | no | all | yes -| rulesColor | Color of the horizontal rules | ColorValue | no | all | yes | -| rulesThickness | Thickness of the horizontal | number | no | all | yes -| hideRules | To hide the horizontal | boolean | no | all | yes -| rulesType | solid or dotted/dashed | RuleType | no | all | yes -| dashWidth | width of each dash | number | no | all | yes -| dashGap | gap between 2 | number | no | all | yes -| rulesConfigArray | Array of rulesConfig objects, used to customise the properties (like color, type etc) of specific rules | Array | no | all | yes -| showReferenceLine1 | show reference line | boolean | no | all | yes -| referenceLine1Config | properties of reference line like thickness, color etc (described below the table) | referenceConfigType | no | all | yes -| referenceLine1Position | position of reference | number | no | all | yes -| showReferenceLine2 | show second reference | boolean | no | all | yes -| referenceLine2Config | properties of reference line like thickness, color etc (described below the table) | referenceConfigType| no | all | yes -| referenceLine2Position | position of second reference | number | no | all | yes -| showReferenceLine3 | show third reference | boolean | no | all | yes -| referenceLine3Config | properties of reference line like thickness, color etc (described below the table) | referenceConfigType | no | all | yes -| referenceLine3Position | position of third reference line | number| no | all | yes -| showVerticalLines | To show vertical lines | boolean | no | all | yes -| verticalLinesUptoDataPoint | To set the height of the vertical lines upto the corresponding data point| boolean | no | all | yes -| verticallinesThickness | Thickness of the vertical lines | number | no | all | yes -| verticalLinesHeight | Height of the vertical lines | number | no | all | yes -| verticalLinesStrokeDashArray | Array of 2 numbers denoting the dashWidth and dashGap of the lines. Used to render dashed/dotted vertical line | Array| no | all |yes -| verticalLinesShift | vertical lines are aligned with data point. Shift them left or right using +ve or -ve value of verticalLinesShift| number| no | all |yes -| verticalLinesZIndex | Z index of the vertical lines | number | no | all | yes -| noOfVerticalLines | Number of vertical lines displayed | number | no | all | yes -| verticalLinesSpacing | Distance between consecutive vertical lines | number | no | all | yes -| showXAxisIndices | To show the pointers on the X axis| boolean | no | all | yes -| xAxisIndicesHeight | Height of the pointers on the X axis | number | no | all | yes -| xAxisIndicesWidth | Width of the pointers on the X axis | number | no | all | yes -| xAxisIndicesColor | Color of the pointers on the X axis | ColorValue | no | all | yes -| showYAxisIndices | To show the pointers on the Y axis | boolean | no | all | yes -| yAxisIndicesHeight | Height of the pointers on the Y axis | number | no | all | yes -| yAxisIndicesWidth | Width of the pointers on the Y axis | number | no | all | yes -| yAxisIndicesColor | Color of the pointers on the X axis | ColorValue | no | all | yes -| yAxisIndicesColor | To hide axes, rules, labels altogether | boolean | no | all | yes -| yAxisLabelTexts | Array of label texts to be displayed along y axis | Array| no | all |yes -| xAxisLabelTexts | Array of label texts to be displayed below x axis | Array| no | all |yes -| xAxisLabelTextStyle | Style of label texts to be displayed below x axis | object | no | all | yes -| xAxisTextNumberOfLines | Number of lines for x axis label text | number | no | all | yes -| xAxisLabelsHeight | Height of X axis labels container | number | no | all | yes -| xAxisLabelsVerticalShift | prop to adjust the vertical position of X axis labels (move X axis labels up or down) | number | no | all |yes -| rotateLabel | To rotate the X axis labels (by 60deg) | boolean | no | all | yes -| hideOrigin | To hide the y Axis label at origin (i.e. 0) | boolean | no | all | ye -| secondaryYAxis | displays and controls the properties of the secondary Y axis on the right side | secondaryYAxisType | no | all |yes -| secondaryData | the secondary data that will be rendered along the secondary Y axis | Array of items | no | all |yes -| secondaryLineConfig | properties of the secondary data line (secondaryLineConfigType is described below) | secondaryLineConfigType| no | all |yes +| xAxisLength | X axis length | number | no | all | yes +| xAxisColor| X axis color | ColorValue | no | all | yes +| xAxisThickness | X axis thickness | number | no | all | yes +| xAxisType | solid or dotted/dashed | RuleType | no | all | yes +| yAxisColor | Y axis color | ColorValue | no | all | yes +| yAxisThickness | Y axis thickness | number | no | all | yes +| yAxisLabelWidth | Width of the Y axis Label container | number | no | all | ye +| yAxisTextStyle | Style object for the Y axis text style | object | no | all | yes +| yAxisTextNumberOfLines | Number of lines for y axis label text | number | no | all | yes +| yAxisLabelContainerStyle | Style object for the Y axis label container | object | no | all | yes +| trimYAxisAtTop | Removes the extra length of the Y axis from the top | boolean | no | all | yes +| yAxisExtraHeight | Extra length of Y axis at the top | number | no | all | yes +| yAxisOffset | Starting value on Y Axis | number | no | all | yes +| horizontalRulesStyle | Style object for the horizontal rules container | object | no | all | yes +| showFractionalValues | Allow fractional values for the Y axis label | boolean | no | all | yes +| roundToDigits | Rounds the y axis values to given number of digits after decimal point | number | no | all | yes +| yAxisLabelPrefix | The String prepended to the y axis label text (for example- '$') | String| no | all | yes +| yAxisLabelSuffix |The String appended to the y axis label text | String| no | all | yes +| hideYAxisText | To hide Y axis label text | boolean | no | all | yes +| formatYLabel | a callback function that takes the label generated by the library and modifies it. | (label: string) => string | no | all | yes +| yAxisSide | Tells which side of the chart, should the y axis be present, defaults to 'left' | String | no | all | yes +| rulesLength | Length of the horizontal | number | no | all | yes +| rulesColor | Color of the horizontal rules | ColorValue | no | all | yes | +| rulesThickness | Thickness of the horizontal | number | no | all | yes +| hideRules | To hide the horizontal | boolean | no | all | yes +| rulesType | solid or dotted/dashed | RuleType | no | all | yes +| dashWidth | width of each dash | number | no | all | yes +| dashGap | gap between 2 | number | no | all | yes +| rulesConfigArray | Array of rulesConfig objects, used to customise the properties (like color, type etc) of specific rules | Array | no | all | yes +| showReferenceLine1 | show reference line | boolean | no | all | yes +| referenceLine1Config | properties of reference line like thickness, color etc (described below the table) | referenceConfigType | no | all | yes +| referenceLine1Position | position of reference | number | no | all | yes +| showReferenceLine2 | show second reference | boolean | no | all | yes +| referenceLine2Config | properties of reference line like thickness, color etc (described below the table) | referenceConfigType| no | all | yes +| referenceLine2Position | position of second reference | number | no | all | yes +| showReferenceLine3 | show third reference | boolean | no | all | yes +| referenceLine3Config | properties of reference line like thickness, color etc (described below the table) | referenceConfigType | no | all | yes +| referenceLine3Position | position of third reference line | number| no | all | yes +| showVerticalLines | To show vertical lines | boolean | no | all | yes +| verticalLinesUptoDataPoint | To set the height of the vertical lines upto the corresponding data point| boolean | no | all | yes +| verticallinesThickness | Thickness of the vertical lines | number | no | all | yes +| verticalLinesHeight | Height of the vertical lines | number | no | all | yes +| verticalLinesStrokeDashArray | Array of 2 numbers denoting the dashWidth and dashGap of the lines. Used to render dashed/dotted vertical line | Array| no | all |yes +| verticalLinesShift | vertical lines are aligned with data point. Shift them left or right using +ve or -ve value of verticalLinesShift| number| no | all |yes +| verticalLinesZIndex | Z index of the vertical lines | number | no | all | yes +| noOfVerticalLines | Number of vertical lines displayed | number | no | all | yes +| verticalLinesSpacing | Distance between consecutive vertical lines | number | no | all | yes +| showXAxisIndices | To show the pointers on the X axis| boolean | no | all | yes +| xAxisIndicesHeight | Height of the pointers on the X axis | number | no | all | yes +| xAxisIndicesWidth | Width of the pointers on the X axis | number | no | all | yes +| xAxisIndicesColor | Color of the pointers on the X axis | ColorValue | no | all | yes +| showYAxisIndices | To show the pointers on the Y axis | boolean | no | all | yes +| yAxisIndicesHeight | Height of the pointers on the Y axis | number | no | all | yes +| yAxisIndicesWidth | Width of the pointers on the Y axis | number | no | all | yes +| yAxisIndicesColor | Color of the pointers on the X axis | ColorValue | no | all | yes +| yAxisIndicesColor | To hide axes, rules, labels altogether | boolean | no | all | yes +| yAxisLabelTexts | Array of label texts to be displayed along y axis | Array| no | all |yes +| xAxisLabelTexts | Array of label texts to be displayed below x axis | Array| no | all |yes +| xAxisLabelTextStyle | Style of label texts to be displayed below x axis | object | no | all | yes +| xAxisTextNumberOfLines | Number of lines for x axis label text | number | no | all | yes +| xAxisLabelsHeight | Height of X axis labels container | number | no | all | yes +| xAxisLabelsVerticalShift | prop to adjust the vertical position of X axis labels (move X axis labels up or down) | number | no | all |yes +| rotateLabel | To rotate the X axis labels (by 60deg) | boolean | no | all | yes +| hideOrigin | To hide the y Axis label at origin (i.e. 0) | boolean | no | all | ye +| secondaryYAxis | displays and controls the properties of the secondary Y axis on the right side | secondaryYAxisType | no | all |yes +| secondaryData | the secondary data that will be rendered along the secondary Y axis | Array of items | no | all |yes +| secondaryLineConfig | properties of the secondary data line (secondaryLineConfigType is described below) | secondaryLineConfigType| no | all |yes **Line related props** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| curved | To show curved line joining the data points | boolean| no | all |yes -| color | Color of the lines joining the data points | ColorValue | no | all | yes -| color1| Color of the lines joining the first set of data points | ColorValue | no | all | yes -| color2 | Color of the lines joining the second set of data points | ColorValue| no | all | yes -| color3 | Color of the lines joining the third set of data points | ColorValue| no | all | yes -| color4 | Color of the lines joining the fourth set of data points | ColorValue| no | all | yes -| color5 | Color of the lines joining the fifth set of data points | ColorValue| no | all | yes -| thickness | Thickness of the lines joining the data points | number| no | all | yes -| thickness1 | Thickness of the lines joining the first set of data points | number | no | all | yes -| thickness2 | Thickness of the lines joining the second set of data points | number | no | all | yes -| thickness3 | Thickness of the lines joining the third set of data points | number | no | all | yes -| thickness4 | Thickness of the lines joining the fourth set of data points | number| no | all | yes -| thickness5 | Thickness of the lines joining the fifth set of data points | number | no | all | yes -| zIndex1 | zIndex of the lines joining the first set of data points | number | no | all | yes -| zIndex2 | zIndex of the lines joining the second set of data points | number | no | all | yes -| zIndex3 | zIndex of the lines joining the third set of data points| number | no | all | yes -| zIndex4 | zIndex of the lines joining the fourth set of data points | number | no | all | yes -| zIndex5 | zIndex of the lines joining the fifth set of data points | number | no | all | yes -| strokeDashArray | Array of 2 numbers denoting the dashWidth and dashGap of the lines. Used to render dashed/dotted line chart | Array| no | all | yes -| strokeDashArray1 | Array of 2 numbers denoting the dashWidth and dashGap of line1. Used to render dashed/dotted line chart| Array | no | all | yes -| strokeDashArray2| Array of 2 numbers denoting the dashWidth and dashGap of line2. Used to render dashed/dotted line chart | Array| no | all | yes -| strokeDashArray3 | Array of 2 numbers denoting the dashWidth and dashGap of line3. Used to render dashed/dotted line chart | Array| no | all | yes -| strokeDashArray4 | Array of 2 numbers denoting the dashWidth and dashGap of line4. Used to render dashed/dotted line chart | Array| no | all | yes -| strokeDashArray5 | Array of 2 numbers denoting the dashWidth and dashGap of line5. Used to render dashed/dotted line chart | Array | no | all | yes -| lineSegments | Array of objects used to customize segments (parts) of line | Array | no | all | yes -| lineSegments2 | Array of objects used to customize segments (parts) of line2 | Array | no | all | yes -| lineSegments3 | Array of objects used to customize segments (parts) of line3 | Array | no | all | yes -| lineSegments4 | Array of objects used to customize segments (parts) of line4 | Array | no | all | yes -| lineSegments5 | Array of objects used to customize segments (parts) of line5 | Array | no | all | yes -| highlightedRange | renders the parts of lines lying in a given data range with a different style (color, thickness,type)| HighlightedRange | no | all | yes -| startIndex | Start index for data line (used to display data lines having breaks) | number | no | all | yes -| startIndex1 | Start index for data line 1 (used to display data lines having breaks) | number| no | all | yes -| startIndex2 | Start index for data line 2 (used to display data lines having breaks) | number | no | all | yes -| startIndex3 | Start index for data line 3 (used to display data lines having breaks) | number | no | all | yes -| startIndex4 | Start index for data line 4 (used to display data lines having breaks) | number | no | all | yes -| startIndex5 | Start index for data line 5 (used to display data lines having breaks) | number| no | all | yes -| endIndex | End index for data line (used to display data lines having breaks) | number| no | all | yes -| endIndex1 | End index for data line 1 (used to display data lines having breaks) | number | no | all | yes -| endIndex2 | End index for data line 2 (used to display data lines having breaks) | number| no | all | yes -| endIndex3 | End index for data line 3 (used to display data lines having breaks) | number| no | all | yes -| endIndex4 | End index for data line 4 (used to display data lines having breaks) | number | no | all | yes -| endIndex5 | End index for data line 5 (used to display data lines having breaks) | number| no | all | yes -| lineGradient | this prop is used to render the line with a gradient blend of colors | boolean| no | all | yes -| lineGradientComponent | this prop defines the svg gradient that should be applied to the line (requires lineGradient to be truthy) | Function| no | all | yes -| lineGradientId | id of the (needed along with lineGradientComponent prop) | string| no | all | yes -| lineGradientDirection | 'vertical'/'horizontal' | string | no | all | yes -| lineGradientStartColor | Start gradient color for the line (requires lineGradient to be truthy) | string| no | all | yes -| lineGradientEndColor | End gradient color for the line (requires lineGradient to be truthy) | string | no | all | yes +| curved | To show curved line joining the data points | boolean| no | all |yes +| color | Color of the lines joining the data points | ColorValue | no | all | yes +| color1| Color of the lines joining the first set of data points | ColorValue | no | all | yes +| color2 | Color of the lines joining the second set of data points | ColorValue| no | all | yes +| color3 | Color of the lines joining the third set of data points | ColorValue| no | all | yes +| color4 | Color of the lines joining the fourth set of data points | ColorValue| no | all | yes +| color5 | Color of the lines joining the fifth set of data points | ColorValue| no | all | yes +| thickness | Thickness of the lines joining the data points | number| no | all | yes +| thickness1 | Thickness of the lines joining the first set of data points | number | no | all | yes +| thickness2 | Thickness of the lines joining the second set of data points | number | no | all | yes +| thickness3 | Thickness of the lines joining the third set of data points | number | no | all | yes +| thickness4 | Thickness of the lines joining the fourth set of data points | number| no | all | yes +| thickness5 | Thickness of the lines joining the fifth set of data points | number | no | all | yes +| zIndex1 | zIndex of the lines joining the first set of data points | number | no | all | yes +| zIndex2 | zIndex of the lines joining the second set of data points | number | no | all | yes +| zIndex3 | zIndex of the lines joining the third set of data points| number | no | all | yes +| zIndex4 | zIndex of the lines joining the fourth set of data points | number | no | all | yes +| zIndex5 | zIndex of the lines joining the fifth set of data points | number | no | all | yes +| strokeDashArray | Array of 2 numbers denoting the dashWidth and dashGap of the lines. Used to render dashed/dotted line chart | Array| no | all | yes +| strokeDashArray1 | Array of 2 numbers denoting the dashWidth and dashGap of line1. Used to render dashed/dotted line chart| Array | no | all | yes +| strokeDashArray2| Array of 2 numbers denoting the dashWidth and dashGap of line2. Used to render dashed/dotted line chart | Array| no | all | yes +| strokeDashArray3 | Array of 2 numbers denoting the dashWidth and dashGap of line3. Used to render dashed/dotted line chart | Array| no | all | yes +| strokeDashArray4 | Array of 2 numbers denoting the dashWidth and dashGap of line4. Used to render dashed/dotted line chart | Array| no | all | yes +| strokeDashArray5 | Array of 2 numbers denoting the dashWidth and dashGap of line5. Used to render dashed/dotted line chart | Array | no | all | yes +| lineSegments | Array of objects used to customize segments (parts) of line | Array | no | all | yes +| lineSegments2 | Array of objects used to customize segments (parts) of line2 | Array | no | all | yes +| lineSegments3 | Array of objects used to customize segments (parts) of line3 | Array | no | all | yes +| lineSegments4 | Array of objects used to customize segments (parts) of line4 | Array | no | all | yes +| lineSegments5 | Array of objects used to customize segments (parts) of line5 | Array | no | all | yes +| highlightedRange | renders the parts of lines lying in a given data range with a different style (color, thickness,type)| HighlightedRange | no | all | yes +| startIndex | Start index for data line (used to display data lines having breaks) | number | no | all | yes +| startIndex1 | Start index for data line 1 (used to display data lines having breaks) | number| no | all | yes +| startIndex2 | Start index for data line 2 (used to display data lines having breaks) | number | no | all | yes +| startIndex3 | Start index for data line 3 (used to display data lines having breaks) | number | no | all | yes +| startIndex4 | Start index for data line 4 (used to display data lines having breaks) | number | no | all | yes +| startIndex5 | Start index for data line 5 (used to display data lines having breaks) | number| no | all | yes +| endIndex | End index for data line (used to display data lines having breaks) | number| no | all | yes +| endIndex1 | End index for data line 1 (used to display data lines having breaks) | number | no | all | yes +| endIndex2 | End index for data line 2 (used to display data lines having breaks) | number| no | all | yes +| endIndex3 | End index for data line 3 (used to display data lines having breaks) | number| no | all | yes +| endIndex4 | End index for data line 4 (used to display data lines having breaks) | number | no | all | yes +| endIndex5 | End index for data line 5 (used to display data lines having breaks) | number| no | all | yes +| lineGradient | this prop is used to render the line with a gradient blend of colors | boolean| no | all | yes +| lineGradientComponent | this prop defines the svg gradient that should be applied to the line (requires lineGradient to be truthy) | Function| no | all | yes +| lineGradientId | id of the (needed along with lineGradientComponent prop) | string| no | all | yes +| lineGradientDirection | 'vertical'/'horizontal' | string | no | all | yes +| lineGradientStartColor | Start gradient color for the line (requires lineGradient to be truthy) | string| no | all | yes +| lineGradientEndColor | End gradient color for the line (requires lineGradient to be truthy) | string | no | all | yes **The arrow** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| showArrows | To show an arrow at the end of each data line | boolean | no | all | yes -| arrowConfig | Object describing the properties of the arrows like length, width, strokeWidth, strokeColor, fillColor | arrowType | no | all | yes -| showArrow1 | To show an arrow at the end of the first data line | boolean | no | all | yes -| arrowConfig1 | Object describing the properties of the first arrow | arrowType| no | all | yes -| showArrow2 | To show an arrow at the end of the second data line | boolean | no | all | yes -| arrowConfig2 | Object describing the properties of the second arrow | arrowType | no | all | yes -| showArrow3 | To show an arrow at the end of the third data line | boolean | no | all | yes -| arrowConfig3 | Object describing the properties of the third arrow | arrowType | no | all | yes -| showArrow4 | To show an arrow at the end of the fourth data line| boolean | no | all | yes -| arrowConfig4 | Object describing the properties of the fourth arrow| arrowType | no | all | yes -| showArrow5 | To show an arrow at the end of the fifth data line | boolean | no | all | yes -| arrowConfig5| Object describing the properties of the fifth arrow | arrowType | no | all | yes +| showArrows | To show an arrow at the end of each data line | boolean | no | all | yes +| arrowConfig | Object describing the properties of the arrows like length, width, strokeWidth, strokeColor, fillColor | arrowType | no | all | yes +| showArrow1 | To show an arrow at the end of the first data line | boolean | no | all | yes +| arrowConfig1 | Object describing the properties of the first arrow | arrowType| no | all | yes +| showArrow2 | To show an arrow at the end of the second data line | boolean | no | all | yes +| arrowConfig2 | Object describing the properties of the second arrow | arrowType | no | all | yes +| showArrow3 | To show an arrow at the end of the third data line | boolean | no | all | yes +| arrowConfig3 | Object describing the properties of the third arrow | arrowType | no | all | yes +| showArrow4 | To show an arrow at the end of the fourth data line| boolean | no | all | yes +| arrowConfig4 | Object describing the properties of the fourth arrow| arrowType | no | all | yes +| showArrow5 | To show an arrow at the end of the fifth data line | boolean | no | all | yes +| arrowConfig5| Object describing the properties of the fifth arrow | arrowType | no | all | yes **Data points related props** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| hideDataPoints | To hide data points | boolean | no | all | yes -| dataPointsHeight | Height of data points (when data points' shape is rectangular) | number | no | all | yes -| dataPointsWidth | Width of data points (when data points' shape is rectangular) | number| no | all | yes -| dataPointsRadius | Radius of data points (when data points' shape is circular) | number| no | all | yes -| dataPointsColor | Color of the data points | ColorValue | no | all | yes -| dataPointsShape | Shape of the data points (_'rectangular'_ or _'circular'_) | string| no | all | yes -| hideDataPoints1 | To hide data points for the first set of data | boolean | no | all | yes -| dataPointsHeight1 | Height of data points for the first dataset (when data points' shape is rectangular) | number | no | all | yes -| dataPointsWidth1 | Width of data points for the first dataset (when data points' shape is rectangular) | number| no | all | yes -| dataPointsRadius1 | Radius of data points for the first dataset (when data points' shape is circular) | number| no | all | yes -| dataPointsColor1 | Color of data points for the first dataset | ColorValue | no | all | yes -| dataPointsShape1 | Shape of data points for the first dataset | string | no | all | yes -| hideDataPoints2 | To hide data points for the second set of data | boolean | no | all | yes -| dataPointsHeight2 | Height of data points for the second dataset (when data points' shape is rectangular) | number| no | all | yes -| dataPointsWidth2 | Width of data points for the second dataset (when data points' shape is rectangular) | number | no | all | yes -| dataPointsRadius2 | Radius of data points for the second dataset (when data points' shape is circular) | number| no | all | yes -| dataPointsColor2 | Color of data points for the second dataset | ColorValue| no | all | yes -| dataPointsShape2 | Shape of data points for the second dataset (_'rectangular'_ or _'circular'_) | string| no | all | yes -| hideDataPoints3 | To hide data points for the third set of data | boolean | no | all | yes -| dataPointsHeight3 | Height of data points for the third dataset (when data points' shape is rectangular) | number | no | all | yes -| dataPointsWidth3 | Width of data points for the third dataset (when data points' shape is rectangular) | number | no | all | yes -| dataPointsRadius3 | Radius of data points for the third dataset (when data points' shape is circular) | number | no | all | yes -| dataPointsColor3 | Color of data points for the third dataset | ColorValue| no | all | yes -| dataPointsShape3 | Shape of data points for the third dataset (_'rectangular'_ or _'circular'_) | string| no | all | yes -| hideDataPoints4 | To hide data points for the fourth set of data | boolean | no | all | yes -| dataPointsHeight4 | Height of data points for the fourth dataset (when data points' shape is rectangular) | number | no | all | yes -| dataPointsWidth4 | Width of data points for the fourth dataset (when data points' shape is rectangular) | number | no | all | yes -| dataPointsRadius4 | Radius of data points for the fourth dataset (when data points' shape is circular) | number| no | all | yes -| dataPointsColor4 | Color of data points for the fourth dataset | ColorValue| no | all | yes -| dataPointsShape4 | Shape of data points for the fourth dataset (_'rectangular'_ or _'circular'_) | string| no | all | yes -| hideDataPoints5 | To hide data points for the fifth set of data | boolean | no | all | yes -| dataPointsHeight5 | Height of data points for the fifth dataset (when data points' shape is rectangular) | number | no | all | yes -| dataPointsWidth5 | Width of data points for the fifth dataset (when data points' shape is rectangular) | number| no | all | yes -| dataPointsRadius5 | Radius of data points for the fifth dataset (when data points' shape is circular) | number | no | all | yes -| dataPointsColor5 | Color of data points for the fifth dataset | ColorValue| no | all | yes -| dataPointsShape5 | Shape of data points for the fifth dataset (_'rectangular'_ or _'circular'_) | string| no | all | yes -| focusedDataPointIndex | Index of the focused data point, works only when focusEnabled prop is used | number | no | all | yes -| focusedDataPointShape | Shape of the data points when focused due to press event | String | no | all | yes -| focusedDataPointWidth | Width of the data points when focused due to press event | number | no | all | yes -| focusedDataPointHeight | Height of the data points when focused due to press event | number | no | all | yes -| focusedDataPointColor | Color of the data points when focused due to press event | ColorValue | no | all | yes -| focusedDataPointRadius | Radius of the data points when focused due to press event | number| no | all | yes -| focusedCustomDataPoint | Custom data point when focused due to press event| Function| no | all | yes -| textColor | Color of the dataPointText | ColorValue | no | all | yes -| textFontSize | Font size of the dataPointText | number | no | all | yes -| textShiftX | To shift the dataPointText text horizontally | number | no | all | yes -| textShiftY | To shift the dataPointText text vertically | number | no | all | yes -| customDataPoint | A callback function to render a custom component as the data points | Function | no | all | yes -| dataPointLabelWidth | width of the label shown beside a data point | number | no | all | yes -| dataPointLabelShiftX | horizontal shift of a label from its corresponding data point | number | no | all | yes -| dataPointLabelShiftY | vertical shift of a label from its corresponding data point | number | no | all | yes -| showValuesAsDataPointsText | When set to true, the data item value will be shown as a label text near data point | boolean | no | all | yes -| pointerColorsForDataSet | When using pointers with dataSet, you can set pointer colors on each data line using this array | ColorValue[] | no | all | yes - +| hideDataPoints | To hide data points | boolean | no | all | yes +| dataPointsHeight | Height of data points (when data points' shape is rectangular) | number | no | all | yes +| dataPointsWidth | Width of data points (when data points' shape is rectangular) | number| no | all | yes +| dataPointsRadius | Radius of data points (when data points' shape is circular) | number| no | all | yes +| dataPointsColor | Color of the data points | ColorValue | no | all | yes +| dataPointsShape | Shape of the data points (_'rectangular'_ or _'circular'_) | string| no | all | yes +| hideDataPoints1 | To hide data points for the first set of data | boolean | no | all | yes +| dataPointsHeight1 | Height of data points for the first dataset (when data points' shape is rectangular) | number | no | all | yes +| dataPointsWidth1 | Width of data points for the first dataset (when data points' shape is rectangular) | number| no | all | yes +| dataPointsRadius1 | Radius of data points for the first dataset (when data points' shape is circular) | number| no | all | yes +| dataPointsColor1 | Color of data points for the first dataset | ColorValue | no | all | yes +| dataPointsShape1 | Shape of data points for the first dataset | string | no | all | yes +| hideDataPoints2 | To hide data points for the second set of data | boolean | no | all | yes +| dataPointsHeight2 | Height of data points for the second dataset (when data points' shape is rectangular) | number| no | all | yes +| dataPointsWidth2 | Width of data points for the second dataset (when data points' shape is rectangular) | number | no | all | yes +| dataPointsRadius2 | Radius of data points for the second dataset (when data points' shape is circular) | number| no | all | yes +| dataPointsColor2 | Color of data points for the second dataset | ColorValue| no | all | yes +| dataPointsShape2 | Shape of data points for the second dataset (_'rectangular'_ or _'circular'_) | string| no | all | yes +| hideDataPoints3 | To hide data points for the third set of data | boolean | no | all | yes +| dataPointsHeight3 | Height of data points for the third dataset (when data points' shape is rectangular) | number | no | all | yes +| dataPointsWidth3 | Width of data points for the third dataset (when data points' shape is rectangular) | number | no | all | yes +| dataPointsRadius3 | Radius of data points for the third dataset (when data points' shape is circular) | number | no | all | yes +| dataPointsColor3 | Color of data points for the third dataset | ColorValue| no | all | yes +| dataPointsShape3 | Shape of data points for the third dataset (_'rectangular'_ or _'circular'_) | string| no | all | yes +| hideDataPoints4 | To hide data points for the fourth set of data | boolean | no | all | yes +| dataPointsHeight4 | Height of data points for the fourth dataset (when data points' shape is rectangular) | number | no | all | yes +| dataPointsWidth4 | Width of data points for the fourth dataset (when data points' shape is rectangular) | number | no | all | yes +| dataPointsRadius4 | Radius of data points for the fourth dataset (when data points' shape is circular) | number| no | all | yes +| dataPointsColor4 | Color of data points for the fourth dataset | ColorValue| no | all | yes +| dataPointsShape4 | Shape of data points for the fourth dataset (_'rectangular'_ or _'circular'_) | string| no | all | yes +| hideDataPoints5 | To hide data points for the fifth set of data | boolean | no | all | yes +| dataPointsHeight5 | Height of data points for the fifth dataset (when data points' shape is rectangular) | number | no | all | yes +| dataPointsWidth5 | Width of data points for the fifth dataset (when data points' shape is rectangular) | number| no | all | yes +| dataPointsRadius5 | Radius of data points for the fifth dataset (when data points' shape is circular) | number | no | all | yes +| dataPointsColor5 | Color of data points for the fifth dataset | ColorValue| no | all | yes +| dataPointsShape5 | Shape of data points for the fifth dataset (_'rectangular'_ or _'circular'_) | string| no | all | yes +| focusedDataPointIndex | Index of the focused data point, works only when focusEnabled prop is used | number | no | all | yes +| focusedDataPointShape | Shape of the data points when focused due to press event | String | no | all | yes +| focusedDataPointWidth | Width of the data points when focused due to press event | number | no | all | yes +| focusedDataPointHeight | Height of the data points when focused due to press event | number | no | all | yes +| focusedDataPointColor | Color of the data points when focused due to press event | ColorValue | no | all | yes +| focusedDataPointRadius | Radius of the data points when focused due to press event | number| no | all | yes +| focusedCustomDataPoint | Custom data point when focused due to press event| Function| no | all | yes +| textColor | Color of the dataPointText | ColorValue | no | all | yes +| textFontSize | Font size of the dataPointText | number | no | all | yes +| textShiftX | To shift the dataPointText text horizontally | number | no | all | yes +| textShiftY | To shift the dataPointText text vertically | number | no | all | yes +| customDataPoint | A callback function to render a custom component as the data points | Function | no | all | yes +| dataPointLabelWidth | width of the label shown beside a data point | number | no | all | yes +| dataPointLabelShiftX | horizontal shift of a label from its corresponding data point | number | no | all | yes +| dataPointLabelShiftY | vertical shift of a label from its corresponding data point | number | no | all | yes +| showValuesAsDataPointsText | When set to true, the data item value will be shown as a label text near data point | boolean | no | all | yes +| pointerColorsForDataSet | When using pointers with dataSet, you can set pointer colors on each data line using this array | ColorValue[] | no | all | yes **pointerConfig** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| height | Height of the pointer | number | no | all | yes -| width | width of the pointer | number | no | all | yes -| radius | radius of the pointer | number | no | all | yes -| pointerColor | pointer color | ColorValue | no | all | yes -| pointer1Color | pointer color | ColorValue | no | all | yes -| pointer2Color | pointer color | ColorValue | no | all | yes -| pointer3Color | pointer color | ColorValue | no | all | yes -| pointer4Color | pointer color | ColorValue | no | all | yes -| pointer5Color | pointer color | ColorValue | no | all | yes -| pointerColorsForDataSet | When using pointers with dataSet, you can set pointer colors on each data line using the pointerColorsForDataSet which is an array of color values. | ColorValue[] | no | all | yes -| secondaryPointerColor | Secondary pointer color | ColorValue | no | all | yes -| pointerComponent | is a function that returns the component to be rendered as a pointer | Function | no | all | yes -| showPointerStrip | show pointer bar | boolean | no | all | yes -| pointerStripWidth | width of the pointer bar | number | no | all | yes -| pointerStripHeight | height of dthe pointer bar | number | no | all | yes -| pointerStripColor | color of the pointer bar | ColorValue | no | all | yes -| pointerStripUptoDataPoint | Pointer stripped to data point | boolean | no | all | yes -| pointerLabelComponent | is a function that returns the component to be rendered as a Label. It takes 2 parameters - 1. an array of items 2 | Function | no | all | yes -| stripOverPointer | strip to over pointer | boolean | no | all | yes -| autoAdjustPointerLabelPosition | Adjust the position of the pointer | boolean | no | all | yes -| shiftPointerLabelX | x-axis displacement pointer label | number | no | all | yes -| shiftPointerLabelY | y-axis displacement pointer label | number | no | all | yes -| pointerLabelWidth | pointer label width | number | no | all | yes -| pointerLabelHeight | pointer label height | number | no | all | yes -| pointerVanishDelay | Pointer disappearance delay | number | no | all | yes -| activatePointersOnLongPress |Long press to activate pointer | boolean | no | all | yes -| activatePointersDelay | activation pointer delay | number | no | all | yes -| persistPointer | persistent pointer | boolean | no | all | yes -| hidePointer1 | hidden pointer | boolean | no | all | yes -| hidePointer2 | hidden pointer | boolean | no | all | yes -| hidePointer3 | hidden pointer | boolean | no | all | yes -| hidePointer4 | hidden pointer | boolean | no | all | yes -| hidePointer5 | hidden pointer | boolean | no | all | yes -| hideSecondaryPointer | Hide auxiliary pointer | boolean | no | all | yes -| strokeDashArray | Array of 2 numbers denoting the dashWidth and dashGap of the lines. Used to render dashed/dotted pointer | number[] | no | all | yes - +| height | Height of the pointer | number | no | all | yes +| width | width of the pointer | number | no | all | yes +| radius | radius of the pointer | number | no | all | yes +| pointerColor | pointer color | ColorValue | no | all | yes +| pointer1Color | pointer color | ColorValue | no | all | yes +| pointer2Color | pointer color | ColorValue | no | all | yes +| pointer3Color | pointer color | ColorValue | no | all | yes +| pointer4Color | pointer color | ColorValue | no | all | yes +| pointer5Color | pointer color | ColorValue | no | all | yes +| pointerColorsForDataSet | When using pointers with dataSet, you can set pointer colors on each data line using the pointerColorsForDataSet which is an array of color values. | ColorValue[] | no | all | yes +| secondaryPointerColor | Secondary pointer color | ColorValue | no | all | yes +| pointerComponent | is a function that returns the component to be rendered as a pointer | Function | no | all | yes +| showPointerStrip | show pointer bar | boolean | no | all | yes +| pointerStripWidth | width of the pointer bar | number | no | all | yes +| pointerStripHeight | height of dthe pointer bar | number | no | all | yes +| pointerStripColor | color of the pointer bar | ColorValue | no | all | yes +| pointerStripUptoDataPoint | Pointer stripped to data point | boolean | no | all | yes +| pointerLabelComponent | is a function that returns the component to be rendered as a Label. It takes 2 parameters - 1. an array of items 2 | Function | no | all | yes +| stripOverPointer | strip to over pointer | boolean | no | all | yes +| autoAdjustPointerLabelPosition | Adjust the position of the pointer | boolean | no | all | yes +| shiftPointerLabelX | x-axis displacement pointer label | number | no | all | yes +| shiftPointerLabelY | y-axis displacement pointer label | number | no | all | yes +| pointerLabelWidth | pointer label width | number | no | all | yes +| pointerLabelHeight | pointer label height | number | no | all | yes +| pointerVanishDelay | Pointer disappearance delay | number | no | all | yes +| activatePointersOnLongPress |Long press to activate pointer | boolean | no | all | yes +| activatePointersDelay | activation pointer delay | number | no | all | yes +| persistPointer | persistent pointer | boolean | no | all | yes +| hidePointer1 | hidden pointer | boolean | no | all | yes +| hidePointer2 | hidden pointer | boolean | no | all | yes +| hidePointer3 | hidden pointer | boolean | no | all | yes +| hidePointer4 | hidden pointer | boolean | no | all | yes +| hidePointer5 | hidden pointer | boolean | no | all | yes +| hideSecondaryPointer | Hide auxiliary pointer | boolean | no | all | yes +| strokeDashArray | Array of 2 numbers denoting the dashWidth and dashGap of the lines. Used to render dashed/dotted pointer | number[] | no | all | yes **onFocus and strip related props** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| focusEnabled | If set true, allows users to press on the chart and focuses the nearest data point (focus event can be then handled using the `onFocus` prop) | boolean| no | all | yes -| onFocus | The callback function that handles the focus event. `item` and `index` are received as props | Function| no | all | yes -| focusedDataPointIndex | Index of the focused data point, used to set initially focused data point and to override the focus behaviour on onFocus | number| no | all | yes -| showDataPointOnFocus | If set true, it shows the data point corresponding to the focused area of the chart | boolean | no | all | yes -| showStripOnFocus | If set true, it shows a vertical strip corresponding to the focused area of the chart | boolean | no | all | yes -| showTextOnFocus | If set true, it shows the data point text corresponding to the focused area of the chart | boolean | no | all | yes -| showDataPointLabelOnFocus | If set true, it shows the data point corresponding to the focused area of the chart | boolea| no | all | yes -| stripHeight | Height of the vertical strip that becomes visible on pressing the corresponding area of the chart | number | no | all | yes -| stripWidth | Width of the vertical strip that becomes visible on pressing the corresponding area of the chart | number | no | all | yes -| stripColor | Color of the vertical strip that becomes visible on pressing the corresponding area of the chart | ColorValue| no | all | yes -| stripOpacity | Opacity of the vertical strip that becomes visible on pressing the corresponding area of the chart | number | no | all | yes -| unFocusOnPressOut | If set true, it unselects/unfocuses the focused/selected data point | boolean| no | all | yes -| delayBeforeUnFocus | Delay (in milliseconds) between the release of the press and ghe unfocusing of the data point | number | no | all | yes -| focusedDataPointShape | Shape of the data points when focused due to press | String | no | all | yes -| focusedDataPointWidth | Width of the data points when focused due to press | number | no | all | yes -| focusedDataPointHeight | Height of the data points when focused due to press | number | no | all | yes -| focusedDataPointColor | Color of the data points when focused due to press | ColorValue | no | all | yes -| focusedDataPointRadius | Radius of the data points when focused due to press | number | no | all | yes -| focusedCustomDataPoint | Custom data point when focused due to press event | Function | no | all | yes +| focusEnabled | If set true, allows users to press on the chart and focuses the nearest data point (focus event can be then handled using the `onFocus` prop) | boolean| no | all | yes +| onFocus | The callback function that handles the focus event. `item` and `index` are received as props | Function| no | all | yes +| focusedDataPointIndex | Index of the focused data point, used to set initially focused data point and to override the focus behaviour on onFocus | number| no | all | yes +| showDataPointOnFocus | If set true, it shows the data point corresponding to the focused area of the chart | boolean | no | all | yes +| showStripOnFocus | If set true, it shows a vertical strip corresponding to the focused area of the chart | boolean | no | all | yes +| showTextOnFocus | If set true, it shows the data point text corresponding to the focused area of the chart | boolean | no | all | yes +| showDataPointLabelOnFocus | If set true, it shows the data point corresponding to the focused area of the chart | boolea| no | all | yes +| stripHeight | Height of the vertical strip that becomes visible on pressing the corresponding area of the chart | number | no | all | yes +| stripWidth | Width of the vertical strip that becomes visible on pressing the corresponding area of the chart | number | no | all | yes +| stripColor | Color of the vertical strip that becomes visible on pressing the corresponding area of the chart | ColorValue| no | all | yes +| stripOpacity | Opacity of the vertical strip that becomes visible on pressing the corresponding area of the chart | number | no | all | yes +| unFocusOnPressOut | If set true, it unselects/unfocuses the focused/selected data point | boolean| no | all | yes +| delayBeforeUnFocus | Delay (in milliseconds) between the release of the press and ghe unfocusing of the data point | number | no | all | yes +| focusedDataPointShape | Shape of the data points when focused due to press | String | no | all | yes +| focusedDataPointWidth | Width of the data points when focused due to press | number | no | all | yes +| focusedDataPointHeight | Height of the data points when focused due to press | number | no | all | yes +| focusedDataPointColor | Color of the data points when focused due to press | ColorValue | no | all | yes +| focusedDataPointRadius | Radius of the data points when focused due to press | number | no | all | yes +| focusedCustomDataPoint | Custom data point when focused due to press event | Function | no | all | yes **Props for Area Chart** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| areaChart | If set true, renders area chart instead of line chart | boolean| no | all | yes -| areaChart1 | If set true, renders area chart for 1st data set instead of line chart | boolean | no | all | yes -| areaChart2 | If set true, renders area chart for 2nd data set instead of line chartt | boolean | no | all | yes -| areaChart3 | If set true, renders area chart for 3rd data set instead of line chartt | boolean | no | all | yes -| areaChart4 | If set true, renders area chart for 4th data set instead of line chartt | boolean | no | all | yes -| areaChart5 | If set true, renders area chart for 5th data set instead of line chartt | boolean | no | all | yes -| startFillColor | Start gradient color for the area chart | ColorValue | no | all | yes -| endFillColor | End gradient color for the area chart | ColorValue | no | all | yes -| startOpacity | Start gradient opacity for the area chart | number | no | all | yes -| endOpacity | End gradient opacity for the area chart | number | no | all | yes -| startFillColor1 | Start gradient color for the first dataset of the area chart | ColorValue| no | all | yes -| endFillColor1 | End gradient color for the first dataset of the area chart | ColorValue | no | all | yes -| startOpacity1 | Start gradient opacity for the first dataset of the area chart | number | no | all | yes -| endOpacity1 | End gradient opacity for the first dataset of the area chart | number | no | all | yes -| startFillColor2 | Start gradient color for the second dataset of the area chart | ColorValue | no | all | yes -| endFillColor2 | End gradient color for the second dataset of the area chart | ColorValue | no | all | yes -| startOpacity2 | Start gradient color for the second dataset of the area chart | number | no | all | yes -| endOpacity2 | End gradient opacity for the second dataset of the area chart | number | no | all | yes -| startFillColor3 | Start gradient color for the third dataset of the area chart | ColorValue| no | all | yes -| endFillColor3 | End gradient color for the third dataset of the area chart | ColorValue | no | all | yes -| startOpacity3 | Start gradient color for the third dataset of the area chart | number | no | all | yes -| endOpacity3 | End gradient opacity for the third dataset of the area chart | number | no | all | yes -| startFillColor4 | Start gradient color for the fourth dataset of the area chart | ColorValue | no | all | yes -| endFillColor4 | End gradient color for the fourth dataset of the area chart | ColorValue | no | all | yes -| startOpacity4 | Start gradient color for the fourth dataset of the area chart | number | no | all | yes -| endOpacity4 | End gradient opacity for the fourth dataset of the area chart | number | no | all | yes -| startFillColor5 | Start gradient color for the fifth dataset of the area chart | ColorValue | no | all | yes -| endFillColor5 | End gradient color for the fifth dataset of the area chart | ColorValue | no | all | yes -| startOpacity5 | Start gradient color for the fifth dataset of the area chart | number | no | all | yes -| endOpacity5 | End gradient opacity for the fifth dataset of the area chart | number | no | all | yes -| gradientDirection | Direction of the gradient (_'horizontal'_ or _'vertical'_) | string | no | all | yes -| areaGradientComponent | this prop defines the svg gradient that should be applied to the area (requires areaChart to be truthy) | Function| no | all | yes -| areaGradientId | id of the (needed along with areaGradientComponent prop) | string | no | all | yes +| areaChart | If set true, renders area chart instead of line chart | boolean| no | all | yes +| areaChart1 | If set true, renders area chart for 1st data set instead of line chart | boolean | no | all | yes +| areaChart2 | If set true, renders area chart for 2nd data set instead of line chartt | boolean | no | all | yes +| areaChart3 | If set true, renders area chart for 3rd data set instead of line chartt | boolean | no | all | yes +| areaChart4 | If set true, renders area chart for 4th data set instead of line chartt | boolean | no | all | yes +| areaChart5 | If set true, renders area chart for 5th data set instead of line chartt | boolean | no | all | yes +| startFillColor | Start gradient color for the area chart | ColorValue | no | all | yes +| endFillColor | End gradient color for the area chart | ColorValue | no | all | yes +| startOpacity | Start gradient opacity for the area chart | number | no | all | yes +| endOpacity | End gradient opacity for the area chart | number | no | all | yes +| startFillColor1 | Start gradient color for the first dataset of the area chart | ColorValue| no | all | yes +| endFillColor1 | End gradient color for the first dataset of the area chart | ColorValue | no | all | yes +| startOpacity1 | Start gradient opacity for the first dataset of the area chart | number | no | all | yes +| endOpacity1 | End gradient opacity for the first dataset of the area chart | number | no | all | yes +| startFillColor2 | Start gradient color for the second dataset of the area chart | ColorValue | no | all | yes +| endFillColor2 | End gradient color for the second dataset of the area chart | ColorValue | no | all | yes +| startOpacity2 | Start gradient color for the second dataset of the area chart | number | no | all | yes +| endOpacity2 | End gradient opacity for the second dataset of the area chart | number | no | all | yes +| startFillColor3 | Start gradient color for the third dataset of the area chart | ColorValue| no | all | yes +| endFillColor3 | End gradient color for the third dataset of the area chart | ColorValue | no | all | yes +| startOpacity3 | Start gradient color for the third dataset of the area chart | number | no | all | yes +| endOpacity3 | End gradient opacity for the third dataset of the area chart | number | no | all | yes +| startFillColor4 | Start gradient color for the fourth dataset of the area chart | ColorValue | no | all | yes +| endFillColor4 | End gradient color for the fourth dataset of the area chart | ColorValue | no | all | yes +| startOpacity4 | Start gradient color for the fourth dataset of the area chart | number | no | all | yes +| endOpacity4 | End gradient opacity for the fourth dataset of the area chart | number | no | all | yes +| startFillColor5 | Start gradient color for the fifth dataset of the area chart | ColorValue | no | all | yes +| endFillColor5 | End gradient color for the fifth dataset of the area chart | ColorValue | no | all | yes +| startOpacity5 | Start gradient color for the fifth dataset of the area chart | number | no | all | yes +| endOpacity5 | End gradient opacity for the fifth dataset of the area chart | number | no | all | yes +| gradientDirection | Direction of the gradient (_'horizontal'_ or _'vertical'_) | string | no | all | yes +| areaGradientComponent | this prop defines the svg gradient that should be applied to the area (requires areaChart to be truthy) | Function| no | all | yes +| areaGradientId | id of the (needed along with areaGradientComponent prop) | string | no | all | yes ### PieChart and DonutChart **Basic props** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| data | An item object represents a section in the Pie chart. Descibed in the next table | pieDataItem[] | no | all | yes -| radius | Radius of the Pie | number | no | all | yes -| initialAngle | Starting angle in radians (illustrated below this table)| number | no | all | yes -| isThreeD | If set to true, it rotates and translates the chart to give it a 3D effect | boolean | no | all | yes -| showGradient | Prop to enable radial gradient for the Pie sections | boolean | no | all | yes -| gradientCenterColor | Gradient color at the center of the Pie chart | ColorValue | no | all | yes -| onPress | Callback function called on press of Pie sections (takes item and index as parameter) | Function | no | all | yes -| focusOnPress | When set to true, the pressed section of the Pie chart will have a bigger radius, hence appear focused | boolean | no | all | yes -| toggleFocusOnPress | When set to true, if the user presses an already focused pie section, it will be unfocused | boolean | no | all | yes -| extraRadiusForFocused | Extra radius for the focused Pie section | number | no | all | yes -| inwardExtraLengthForFocused | Extra length of focused Pie section towards the center (only for donut charts) | number | no | all | yes -| sectionAutoFocus | In case you don't want focusOnPress but want a particular section to autofocus, this prop will be needed | boolean | no | all | yes -| onLabelPress | Callback function called on press of a Label (takes item and index as parameter) | Function | no | all | yes -| tiltAngle | The angle by which the chart should be tilted | Angle in deg | no | all | yes -| shadow | Shadow to the Pie chart, when set to true, it enhances the 3D effect | boolean | no | all | yes -| shadowColor | Color of the shadow | ColorValue | no | all | yes -| shadowWidth | Width of the shadow | number | no | all | yes -| strokeWidth | Stroke (line) width for the Pie chart and its section | number | no | all | yes -| strokeColor | Stroke (line) color | ColorValue | no | all | yes -| backgroundColor | Background color of the container that contains the Pie chart | ColorValue | no | all | yes -| showText | When set to true, displays text on the Pie sections | boolean | no | all | yes -| textColor | Color of the label texts | ColorValue | no | all | yes -| textSize | Size of the label texts (max allowed: radius / 5) | number | no | all | yes -| fontStyle | Style of the text - 'normal', 'italic' or 'oblique'| string| no | all | yes -| fontWeight | Weight of the text - 'bold', 'bolder', 'lighter', '100', '200' etc | string | no | all | yes -| font | Font family of the text - 'Arial', 'Cursive', 'Comic Sans MS' etc | string | no | all | yes -| showTextBackground | When set to true, displays background for text on the Pie sections | boolean | no | all | yes -| textBackgroundColor | Background color for the label texts | ColorValue | no | all | yes -| textBackgroundRadius | Radius for the background of the text labels | number | no | all | yes -| showValuesAsLabels | When set to true, the values of the Pie sections are displayed as labels | boolean | no | all | yes -| centerLabelComponent | Component to be rendered at the center of the Pie chart | Function | no | all | yes -| semiCircle | When set to true, renders the Pie Chart in a semi-circle. donut semiCircle charts look like a speed-meter | boolean | no | all | yes -| labelsPosition | Tells where inside the Pie sections should the labels be shown- 'onBorder', 'outward', 'inward' or 'mid' | string | no | all | yes -| pieInnerComponent | Svg element to be rendered inside each Pie like a label (position controlled by 'labelsPosition' ) | () => svg element | no | all | yes -| paddingHorizontal | horizontal padding in the chart svg component (useful to accomodate _"onBorder"_ labels) | number | no | all | yes -| paddingVertical | vertical padding in the chart svg component (useful to accomodate _"onBorder"_ labels) | number | no | all | yes -| isAnimated | To show animates PieProChart. Animation occurs onLoad and on value change | boolean | no | all | yes -| animationDuration | Duration of the animations, only fro PieProChart | number| no | all | yes -| curvedStartEdges | Bend start edge, only fro PieProChart | boolean | no | all | yes -| curvedEndEdges | Bend end edge, only fro PieProChart | boolean | no | all | yes -| edgesRadius | Bend radius, only fro PieProChart | number | no | all | yes +| data | An item object represents a section in the Pie chart. Descibed in the next table | pieDataItem[] | no | all | yes +| radius | Radius of the Pie | number | no | all | yes +| initialAngle | Starting angle in radians (illustrated below this table)| number | no | all | yes +| isThreeD | If set to true, it rotates and translates the chart to give it a 3D effect | boolean | no | all | yes +| showGradient | Prop to enable radial gradient for the Pie sections | boolean | no | all | yes +| gradientCenterColor | Gradient color at the center of the Pie chart | ColorValue | no | all | yes +| onPress | Callback function called on press of Pie sections (takes item and index as parameter) | Function | no | all | yes +| focusOnPress | When set to true, the pressed section of the Pie chart will have a bigger radius, hence appear focused | boolean | no | all | yes +| toggleFocusOnPress | When set to true, if the user presses an already focused pie section, it will be unfocused | boolean | no | all | yes +| extraRadiusForFocused | Extra radius for the focused Pie section | number | no | all | yes +| inwardExtraLengthForFocused | Extra length of focused Pie section towards the center (only for donut charts) | number | no | all | yes +| sectionAutoFocus | In case you don't want focusOnPress but want a particular section to autofocus, this prop will be needed | boolean | no | all | yes +| onLabelPress | Callback function called on press of a Label (takes item and index as parameter) | Function | no | all | yes +| tiltAngle | The angle by which the chart should be tilted | Angle in deg | no | all | yes +| shadow | Shadow to the Pie chart, when set to true, it enhances the 3D effect | boolean | no | all | yes +| shadowColor | Color of the shadow | ColorValue | no | all | yes +| shadowWidth | Width of the shadow | number | no | all | yes +| strokeWidth | Stroke (line) width for the Pie chart and its section | number | no | all | yes +| strokeColor | Stroke (line) color | ColorValue | no | all | yes +| backgroundColor | Background color of the container that contains the Pie chart | ColorValue | no | all | yes +| showText | When set to true, displays text on the Pie sections | boolean | no | all | yes +| textColor | Color of the label texts | ColorValue | no | all | yes +| textSize | Size of the label texts (max allowed: radius / 5) | number | no | all | yes +| fontStyle | Style of the text - 'normal', 'italic' or 'oblique'| string| no | all | yes +| fontWeight | Weight of the text - 'bold', 'bolder', 'lighter', '100', '200' etc | string | no | all | yes +| font | Font family of the text - 'Arial', 'Cursive', 'Comic Sans MS' etc | string | no | all | yes +| showTextBackground | When set to true, displays background for text on the Pie sections | boolean | no | all | yes +| textBackgroundColor | Background color for the label texts | ColorValue | no | all | yes +| textBackgroundRadius | Radius for the background of the text labels | number | no | all | yes +| showValuesAsLabels | When set to true, the values of the Pie sections are displayed as labels | boolean | no | all | yes +| centerLabelComponent | Component to be rendered at the center of the Pie chart | Function | no | all | yes +| semiCircle | When set to true, renders the Pie Chart in a semi-circle. donut semiCircle charts look like a speed-meter | boolean | no | all | yes +| labelsPosition | Tells where inside the Pie sections should the labels be shown- 'onBorder', 'outward', 'inward' or 'mid' | string | no | all | yes +| pieInnerComponent | Svg element to be rendered inside each Pie like a label (position controlled by 'labelsPosition' ) | () => svg element | no | all | yes +| paddingHorizontal | horizontal padding in the chart svg component (useful to accomodate _"onBorder"_ labels) | number | no | all | yes +| paddingVertical | vertical padding in the chart svg component (useful to accomodate _"onBorder"_ labels) | number | no | all | yes +| isAnimated | To show animates PieProChart. Animation occurs onLoad and on value change | boolean | no | all | yes +| animationDuration | Duration of the animations, only fro PieProChart | number| no | all | yes +| curvedStartEdges | Bend start edge, only fro PieProChart | boolean | no | all | yes +| curvedEndEdges | Bend end edge, only fro PieProChart | boolean | no | all | yes +| edgesRadius | Bend radius, only fro PieProChart | number | no | all | yes **Item description (pieDataItem)** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| value | Value of the item, representing a section of the Pie chart | number | no | all | yes -| shiftX | Translates (shifts) the particular section horizontally by given value | number | no | all | yes -| shiftY | Translates (shifts) the particular section vertically by given value | number | no | all | yes -| shiftTextX | Translates (shifts) the position of label text horizontally | number | no | all | yes -| shiftTextY | Translates (shifts) the position of label text vertically | number | no | all | yes -| shiftTextBackgroundX | Shifts the background of label text horizontally (default value is shiftTextX) | number | no | all | yes -| shiftTextBackgroundY | Shifts the background of label text vertically (default value is shiftTextY) | number | no | all | yes -| color | Color (background color) of the section | ColorValue | no | all | yes -| text | Label text for the sections | string | no | all | yes -| textColor | Color of the text (label) inside the section | ColorValue | no | all | yes -| textSize | Size of the text (label) inside the section | number | no | all | yes -| fontStyle | Style of the text - 'normal', 'italic' or 'oblique' | string | no | all | yes -| fontWeight | Weight of the text - 'bold', 'bolder', 'lighter', '100', '200' etc | string | no | all | yes -| font | Font family of the text - 'Arial', 'Cursive', 'Comic Sans MS' etc | string | no | all | yes -| textBackgroundColor | Background color for the label text | ColorValue | no | all | yes -| textBackgroundRadius | Radius for the background of the text label| number | no | all | yes -| labelPosition | Tells where inside the Pie sections should the labels be shown- 'onBorder', 'outward', 'inward' or 'mid' | string | no | all | yes -| onPress | Callback function called on press of Pie sections (takes item and index as parameter) | Function | no | all | yes -| onLabelPress | Callback function called on press of a Label (takes item and index as parameter) | Function | no | all | yes -| strokeWidth | Stroke (line) width for the Pie chart and its section | number | no | all | yes -| strokeColor | Stroke (line) color | ColorValue | no | all | yes -| focused | When set to true, the section for that item is focused, sectionAutoFocus must be set true in order to use this property | boolean | no | all | yes -| pieInnerComponent | Svg element to be rendered inside the Pie like a label (position controlled by 'labelsPosition' ) | () => svg element | no | all | yes +| value | Value of the item, representing a section of the Pie chart | number | no | all | yes +| shiftX | Translates (shifts) the particular section horizontally by given value | number | no | all | yes +| shiftY | Translates (shifts) the particular section vertically by given value | number | no | all | yes +| shiftTextX | Translates (shifts) the position of label text horizontally | number | no | all | yes +| shiftTextY | Translates (shifts) the position of label text vertically | number | no | all | yes +| shiftTextBackgroundX | Shifts the background of label text horizontally (default value is shiftTextX) | number | no | all | yes +| shiftTextBackgroundY | Shifts the background of label text vertically (default value is shiftTextY) | number | no | all | yes +| color | Color (background color) of the section | ColorValue | no | all | yes +| text | Label text for the sections | string | no | all | yes +| textColor | Color of the text (label) inside the section | ColorValue | no | all | yes +| textSize | Size of the text (label) inside the section | number | no | all | yes +| fontStyle | Style of the text - 'normal', 'italic' or 'oblique' | string | no | all | yes +| fontWeight | Weight of the text - 'bold', 'bolder', 'lighter', '100', '200' etc | string | no | all | yes +| font | Font family of the text - 'Arial', 'Cursive', 'Comic Sans MS' etc | string | no | all | yes +| textBackgroundColor | Background color for the label text | ColorValue | no | all | yes +| textBackgroundRadius | Radius for the background of the text label| number | no | all | yes +| labelPosition | Tells where inside the Pie sections should the labels be shown- 'onBorder', 'outward', 'inward' or 'mid' | string | no | all | yes +| onPress | Callback function called on press of Pie sections (takes item and index as parameter) | Function | no | all | yes +| onLabelPress | Callback function called on press of a Label (takes item and index as parameter) | Function | no | all | yes +| strokeWidth | Stroke (line) width for the Pie chart and its section | number | no | all | yes +| strokeColor | Stroke (line) color | ColorValue | no | all | yes +| focused | When set to true, the section for that item is focused, sectionAutoFocus must be set true in order to use this property | boolean | no | all | yes +| pieInnerComponent | Svg element to be rendered inside the Pie like a label (position controlled by 'labelsPosition' ) | () => svg element | no | all | yes **Donut chart related props** -| Name | Description | Type | Required | Platform | HarmonyOS Support | +| Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | -| donut | When set to true, renders a Donut chart (makes an inner ring) | boolean | no | all | yes -| innerRadius | Radius of the inner ring | number | no | all | yes -| innerCircleColor | Color of the inner ring | ColorValue| no | all | yes -| innerCircleBorderWidth | Stroke (border) width of the inner ring | number | no | all | yes -| innerCircleBorderColor | Stroke (border) color of the inner ring | ColorValue | no | all | yes -| shiftInnerCenterX | Shifts the inner ring horizontally to enhance the 3D effect | number | no | all | yes -| shiftInnerCenterY | Shifts the inner ring vertically to enhance the 3D effect | number | no | all | yes +| donut | When set to true, renders a Donut chart (makes an inner ring) | boolean | no | all | yes +| innerRadius | Radius of the inner ring | number | no | all | yes +| innerCircleColor | Color of the inner ring | ColorValue| no | all | yes +| innerCircleBorderWidth | Stroke (border) width of the inner ring | number | no | all | yes +| innerCircleBorderColor | Stroke (border) color of the inner ring | ColorValue | no | all | yes +| shiftInnerCenterX | Shifts the inner ring horizontally to enhance the 3D effect | number | no | all | yes +| shiftInnerCenterY | Shifts the inner ring vertically to enhance the 3D effect | number | no | all | yes ### Population Pyramid **base props** -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ---- | ----------- | ---- | -------- | -------- | ------------------ | -| height | height of chart body (excluding x-axis labels) | number | no | all | yes -| width | width of chart body | number | no | all | yes -| data | array of objects, each object is described by **popnPyramidDataItem** | Array | no | all | yes -| hideRules | when set to true, hides horizontal rules (which are displayed in the background of the charts) | boolean | no | all | yes -| rulesThickness | thickness of the horizontal rules | number | no | all | yes -| rulesColor | color of the horizontal rules | ColorValue | no | all | yes -| rulesType| type of the horizontal rules - SOLID or DASHED/DOTTED | RuleTypes | no | all | yes -| dashWidth | width of each dash in the horizontal rules | number | no | all | yes -| dashGap | gap between each dash in the horizontal rules | number | no | all | yes -| stepHeight| height of each step/horizontal section in the chart body | number | no | all | yes -| verticalMarginBetweenBars| self explanatory | number | no | all | yes -| hideYAxisText | hide Y axis labels, when not set to true, a gap will be left to the left of the chart | boolean | no | all | yes -| yAxisLabelWidth | self explanatory | number | no | all | yes -| yAxisColor | self explanatory | ColorValue | no | all | yes -| yAxisThickness | self explanatory | number | no | all | yes -| yAxisStrokeDashArray | used to render a dashed or dotted Y axis line ([dashWidth,dashGap]) | Array | no | all | yes -| xAxisColor | self explanatory | ColorValue | no | all | yes -| xAxisThickness | self explanatory | number | no | all | yes -| xAxisType | type of X-axis- SOLID, DASHED or DOTTED | RuleTypes | no | all | yes -| xAxisNoOfSections | number of sections in X-axis (in both left and right parts) | number | no | all | yes -| showXAxisIndices | when set to true, shows small lines (indices) at each section of x-axis | boolean | no | all | yes -| xAxisIndicesWidth | width of x axis indices | number | no | all | yes -| xAxisIndicesHeight | height of x axis indices | number | no | all | yes -| xAxisIndicesColor | color of of x axis indices | ColorValue | no | all | yes -| xAxisIndicesShiftY | used to shift x axis indices downwards or upwards | number | no | all | yes -| showXAxisLabelTexts | self explanatory | boolean | no | all | yes -| xAxisLabelFontSize | self explanatory | number | no | all | yes -| xAxisLabelColor | self explanatory | ColorValue | no | all | yes -| xAxisLabelFontStyle | self explanatory | FontStyle | no | all | yes -| xAxisLabelFontWeight | self explanatory | FontWeight | no | all | yes -| xAxisLabelFontFamily | self explanatory | string | no | all | yes -| xAxisLabelShiftX | horizontally shifts the x axis labels by given value | number | no | all | yes -| xAxisLabelShiftY | vertically shifts the x axis labels by given value | number | no | all | yes -| xAxisRoundToDigits | number of decimal places upto which x axis labels will be displayed | number | no | all | yes -| xAxisLabelPrefix | The String prepended to the x axis label text (for example- '$') | string | no | all | yes -| xAxisLabelSuffix | The String appended to the x axis label text | string | no | all | yes -| formatXAxisLabels | a callback function that takes the label generated by the library and modifies it | (label: string) => string | no | all | yes -| showVerticalLines | show vertical lines (similar to horiz rules) in background of the chart | boolean | no | all | yes -| verticalLinesColor | Color of the vertical lines | ColorValue | no | all | yes -| verticalLinesThickness | Thickness of the vertical lines | number | no | all | yes -| verticalLinesStrokeDashArray | used to render dashed or dotted vertical lines ([dashWidth,dashGap]) | Array | no | all | yes -| noOfSections | Number of sections (and horiz rules) in the Y axis | number | no | all | yes -| barsMapToYAxisSections | this prop tells whether the number of sections in the Y axis is equal to the length of data array | boolean | no | all | yes -| showYAxisIndices | when set to true, shows small lines (indices) at each section of y-axis | boolean | no | all | yes -| yAxisIndicesWidth | width of y axis indices | number | no | all | yes -| yAxisIndicesHeight | height of y axis indices | number | no | all | yes -| yAxisIndicesColor | color of of x axis indices | ColorValue | no | all | yes -| yAxisLabelColor | color of of x axis label text | ColorValue | no | all | yes -| yAxisLabelFontSize | font size of of of x axis label text =| number | no | all | yes -| yAxisLabelTextMarginRight | space left between the y axis labels and the y axis line | number | no | all | yes -| yAxisLabelTexts | An array of string labels to be rendered as Y axis labels (top to bottom) | Array | no | all | yes -| yAxisLabelFontStyle | self explanatory | FontStyle | no | all | yes -| yAxisLabelFontWeight | self explanatory | FontWeight | no | all | yes -| yAxisLabelFontFamily | self explanatory | string | no | all | yes -| showValuesAsBarLabels | when set to true, displays the left and right values as labels beside the respective bars | boolean | no | all | yes -| showMidAxis | when set to true, displays an axis in the mid - between the left and right halves of the pyramid | boolean | no | all | yes -| midAxisThickness | thickness of the mid axis lines | number | no | all | yes -| midAxisLabelWidth | width of the mid axis | number | no | all | yes -| midAxisColor | color of the mid axis lines | ColorValue | no | all | yes -| midAxisLeftColor | color of the left mid axis line | ColorValue | no | all | yes -| midAxisRightColor | color of the right mid axis line | ColorValue | no | all | yes -| midAxisStrokeDashArray | used to render dashed or dotted mid axis lines ([dashWidth,dashGap]) | Array | no | all | yes -| midAxisLabelFontSize | self explanatory | number | no | all | yes -| midAxisLabelColor | self explanatory | ColorValue | no | all | yes -| midAxisLabelFontStyle | self explanatory | FontStyle | no | all | yes -| midAxisLabelFontWeight | self explanatory | FontWeight | no | all | yes -| midAxisLabelFontFamily | self explanatory | string | no | all | yes -| barLabelWidth | width of the labels displayed behind the bars (both left and right bars) | number | no | all | yes -| barLabelFontSize | font size of the labels displayed behind the bars (both left and right bars) | number | no | all | yes -| barLabelColor | color of the of the labels displayed behind the bars (both left and right bars) | ColorValue | no | all | yes -| barLabelFontStyle | font style of the labels displayed behind the bars (both left and right bars) | FontStyle | no | all | yes -| barLabelFontWeight | font weight of the labels displayed behind the bars (both left and right bars) | FontWeight | no | all | yes -| barLabelFontFamily | font family of the labels displayed behind the bars (both left and right bars) | string | no | all | yes -| leftBarLabelWidth | width of the labels displayed behind the left bars | number | no | all | yes -| leftBarLabelFontSize | font size of the labels displayed behind the left bars | number | no | all | yes -| leftBarLabelColor | color of the labels displayed behind the left bars | ColorValue | no | all | yes -| leftBarLabelFontStyle | font style of the labels displayed behind the left bars | FontStyle | no | all | yes -| leftBarLabelFontWeight | font weight of the labels displayed behind the left bars | FontWeight | no | all | yes -| leftBarLabelFontFamily | font family of the labels displayed behind the left bars | string | no | all | yes -| leftBarLabelShift | value by which the left bar labels should be shifted horizontally (kind of margin b/w label and bar) | number | no | all | yes -| leftBarLabelPrefix | The String prepended to the left bar label text (for example- '$') | string | no | all | yes -| leftBarLabelSuffix | The String appended to the left bar label text | string | no | all | yes -| rightBarLabelWidth | width of the labels displayed behind the right bars | number | no | all | yes -| rightBarLabelFontSize | font size of the labels displayed behind the right bars | number | no | all | yes -| rightBarLabelColor | color of the labels displayed behind the right bars | ColorValue | no | all | yes -| rightBarLabelFontStyle | font style of the labels displayed behind the right bars | FontStyle | no | all | yes -| rightBarLabelFontWeight | font weight of the labels displayed behind the right bars | FontWeight | no | all | yes -| rightBarLabelFontFamily | font family of the labels displayed behind the right bars | string | no | all | yes -| rightBarLabelShift | value by which the right bar labels should be shifted horizontally (kind of margin b/w label and bar) | number | no | all | yes -| rightBarLabelPrefix | The String prepended to the right bar label text (for example- '$') | string | no | all | yes -| rightBarLabelSuffix | The String appended to the right bar label text | string | no | all | yes -| formatBarLabels | a callback function that takes the label generated by the library and modifies it | (label: string) => string | no | all | yes -| leftBarColor | color of the bars displayed in the left half of the pyramid | ColorValue | no | all | yes -| rightBarColor | color of the bars displayed in the right half of the pyramid | ColorValue | no | all | yes -| leftBarBorderColor | border color of the bars displayed in the left half of the pyramid | ColorValue | no | all | yes -| rightBarBorderColor | border color of the bars displayed in the right half of the pyramid | ColorValue | no | all | yes -| barBorderWidth | boder width of the bars (both left and right bars) | number | no | all | yes -| leftBarBorderWidth | boder width of the bars displayed in the left half of the pyramid | number | no | all | yes -| rightBarBorderWidth | boder width of the bars displayed in the right half of the pyramid | number | no | all | yes -| barBorderRadius | boder radius of the bars | number | no | all | yes -| leftBarBorderRadius | boder width of the bars displayed in the left half of the pyramid | number | no | all | yes -| rightBarBorderRadius | boder width of the bars displayed in the right half of the pyramid| number | no | all | yes -| allCornersRounded | when set to true, border radius will apply to all the four corners of the bars, else applied only on outer edges | boolean | no | all | yes -| showSurplus | shows surplus values on the edges in highlighted colors (extra width of the bigger bar is highlighted ) | boolean | no | all | yes -| showSurplusLeft | shows surplus values on the left edges in highlighted colors (extra width of the bigger bar is highlighted ) | boolean | no | all | yes -| showSurplusRight | shows surplus values on the right edges in highlighted colors (extra width of the bigger bar is highlighted ) | boolean | no | all | yes -| leftSurplusColor | highlight color of the left surplus | ColorValue | no | all | yes -| leftSurplusBorderColor | border color of the left surplus | ColorValue | no | all | yes -| rightSurplusColor | highlight color of the right surplus | ColorValue | no | all | yes -| rightSurplusBorderColor | border color of the right surplus | ColorValue | no | all | yes -| leftSurplusBorderWidth | border width of the left surplus | number | no | all | yes -| rightSurplusBorderWidth | border width of the right surplus | number | no | all | yes - -## 遗留问题 - -- [ ] PieChart设置圆环设置为3D,中间圆环显示问题,svg问题。 [issue#7](https://github.com/react-native-oh-library/react-native-gifted-charts/issues/7) -- [X] BarChart设置barBackgroundPattern显示问题,svg问题。 [issue#6](https://github.com/react-native-oh-library/react-native-gifted-charts/issues/6) -- [ ] LineChart设置customDataPoint不显示,svg问题。 [issue#8](https://github.com/react-native-oh-library/react-native-gifted-charts/issues/8) -- [ ] PieChartPro饼图设置animated为true,动画会卡顿,RN框架问题。 [issue#9](https://github.com/react-native-oh-library/react-native-gifted-charts/issues/9) - -## 其他 - -## 开源协议 - -本项目基于 [The MIT License (MIT)](https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/blob/master/LICENSE) ,请自由地享受和参与开源。 +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ---------------------------- | ---------------------------------------------------------------------------------------------------------------- | -------------------------- | -------- | -------- | ----------------- | +| height | height of chart body (excluding x-axis labels) | number | no | all | yes | +| width | width of chart body | number | no | all | yes | +| data | array of objects, each object is described by **popnPyramidDataItem** | Array | no | all | yes | +| hideRules | when set to true, hides horizontal rules (which are displayed in the background of the charts) | boolean | no | all | yes | +| rulesThickness | thickness of the horizontal rules | number | no | all | yes | +| rulesColor | color of the horizontal rules | ColorValue | no | all | yes | +| rulesType | type of the horizontal rules - SOLID or DASHED/DOTTED | RuleTypes | no | all | yes | +| dashWidth | width of each dash in the horizontal rules | number | no | all | yes | +| dashGap | gap between each dash in the horizontal rules | number | no | all | yes | +| stepHeight | height of each step/horizontal section in the chart body | number | no | all | yes | +| verticalMarginBetweenBars | self explanatory | number | no | all | yes | +| hideYAxisText | hide Y axis labels, when not set to true, a gap will be left to the left of the chart | boolean | no | all | yes | +| yAxisLabelWidth | self explanatory | number | no | all | yes | +| yAxisColor | self explanatory | ColorValue | no | all | yes | +| yAxisThickness | self explanatory | number | no | all | yes | +| yAxisStrokeDashArray | used to render a dashed or dotted Y axis line ([dashWidth,dashGap]) | Array | no | all | yes | +| xAxisColor | self explanatory | ColorValue | no | all | yes | +| xAxisThickness | self explanatory | number | no | all | yes | +| xAxisType | type of X-axis- SOLID, DASHED or DOTTED | RuleTypes | no | all | yes | +| xAxisNoOfSections | number of sections in X-axis (in both left and right parts) | number | no | all | yes | +| showXAxisIndices | when set to true, shows small lines (indices) at each section of x-axis | boolean | no | all | yes | +| xAxisIndicesWidth | width of x axis indices | number | no | all | yes | +| xAxisIndicesHeight | height of x axis indices | number | no | all | yes | +| xAxisIndicesColor | color of of x axis indices | ColorValue | no | all | yes | +| xAxisIndicesShiftY | used to shift x axis indices downwards or upwards | number | no | all | yes | +| showXAxisLabelTexts | self explanatory | boolean | no | all | yes | +| xAxisLabelFontSize | self explanatory | number | no | all | yes | +| xAxisLabelColor | self explanatory | ColorValue | no | all | yes | +| xAxisLabelFontStyle | self explanatory | FontStyle | no | all | yes | +| xAxisLabelFontWeight | self explanatory | FontWeight | no | all | yes | +| xAxisLabelFontFamily | self explanatory | string | no | all | yes | +| xAxisLabelShiftX | horizontally shifts the x axis labels by given value | number | no | all | yes | +| xAxisLabelShiftY | vertically shifts the x axis labels by given value | number | no | all | yes | +| xAxisRoundToDigits | number of decimal places upto which x axis labels will be displayed | number | no | all | yes | +| xAxisLabelPrefix | The String prepended to the x axis label text (for example- '$') | string | no | all | yes | +| xAxisLabelSuffix | The String appended to the x axis label text | string | no | all | yes | +| formatXAxisLabels | a callback function that takes the label generated by the library and modifies it | (label: string) => string | no | all | yes | +| showVerticalLines | show vertical lines (similar to horiz rules) in background of the chart | boolean | no | all | yes | +| verticalLinesColor | Color of the vertical lines | ColorValue | no | all | yes | +| verticalLinesThickness | Thickness of the vertical lines | number | no | all | yes | +| verticalLinesStrokeDashArray | used to render dashed or dotted vertical lines ([dashWidth,dashGap]) | Array | no | all | yes | +| noOfSections | Number of sections (and horiz rules) in the Y axis | number | no | all | yes | +| barsMapToYAxisSections | this prop tells whether the number of sections in the Y axis is equal to the length of data array | boolean | no | all | yes | +| showYAxisIndices | when set to true, shows small lines (indices) at each section of y-axis | boolean | no | all | yes | +| yAxisIndicesWidth | width of y axis indices | number | no | all | yes | +| yAxisIndicesHeight | height of y axis indices | number | no | all | yes | +| yAxisIndicesColor | color of of x axis indices | ColorValue | no | all | yes | +| yAxisLabelColor | color of of x axis label text | ColorValue | no | all | yes | +| yAxisLabelFontSize | font size of of of x axis label text = | number | no | all | yes | +| yAxisLabelTextMarginRight | space left between the y axis labels and the y axis line | number | no | all | yes | +| yAxisLabelTexts | An array of string labels to be rendered as Y axis labels (top to bottom) | Array | no | all | yes | +| yAxisLabelFontStyle | self explanatory | FontStyle | no | all | yes | +| yAxisLabelFontWeight | self explanatory | FontWeight | no | all | yes | +| yAxisLabelFontFamily | self explanatory | string | no | all | yes | +| showValuesAsBarLabels | when set to true, displays the left and right values as labels beside the respective bars | boolean | no | all | yes | +| showMidAxis | when set to true, displays an axis in the mid - between the left and right halves of the pyramid | boolean | no | all | yes | +| midAxisThickness | thickness of the mid axis lines | number | no | all | yes | +| midAxisLabelWidth | width of the mid axis | number | no | all | yes | +| midAxisColor | color of the mid axis lines | ColorValue | no | all | yes | +| midAxisLeftColor | color of the left mid axis line | ColorValue | no | all | yes | +| midAxisRightColor | color of the right mid axis line | ColorValue | no | all | yes | +| midAxisStrokeDashArray | used to render dashed or dotted mid axis lines ([dashWidth,dashGap]) | Array | no | all | yes | +| midAxisLabelFontSize | self explanatory | number | no | all | yes | +| midAxisLabelColor | self explanatory | ColorValue | no | all | yes | +| midAxisLabelFontStyle | self explanatory | FontStyle | no | all | yes | +| midAxisLabelFontWeight | self explanatory | FontWeight | no | all | yes | +| midAxisLabelFontFamily | self explanatory | string | no | all | yes | +| barLabelWidth | width of the labels displayed behind the bars (both left and right bars) | number | no | all | yes | +| barLabelFontSize | font size of the labels displayed behind the bars (both left and right bars) | number | no | all | yes | +| barLabelColor | color of the of the labels displayed behind the bars (both left and right bars) | ColorValue | no | all | yes | +| barLabelFontStyle | font style of the labels displayed behind the bars (both left and right bars) | FontStyle | no | all | yes | +| barLabelFontWeight | font weight of the labels displayed behind the bars (both left and right bars) | FontWeight | no | all | yes | +| barLabelFontFamily | font family of the labels displayed behind the bars (both left and right bars) | string | no | all | yes | +| leftBarLabelWidth | width of the labels displayed behind the left bars | number | no | all | yes | +| leftBarLabelFontSize | font size of the labels displayed behind the left bars | number | no | all | yes | +| leftBarLabelColor | color of the labels displayed behind the left bars | ColorValue | no | all | yes | +| leftBarLabelFontStyle | font style of the labels displayed behind the left bars | FontStyle | no | all | yes | +| leftBarLabelFontWeight | font weight of the labels displayed behind the left bars | FontWeight | no | all | yes | +| leftBarLabelFontFamily | font family of the labels displayed behind the left bars | string | no | all | yes | +| leftBarLabelShift | value by which the left bar labels should be shifted horizontally (kind of margin b/w label and bar) | number | no | all | yes | +| leftBarLabelPrefix | The String prepended to the left bar label text (for example- '$') | string | no | all | yes | +| leftBarLabelSuffix | The String appended to the left bar label text | string | no | all | yes | +| rightBarLabelWidth | width of the labels displayed behind the right bars | number | no | all | yes | +| rightBarLabelFontSize | font size of the labels displayed behind the right bars | number | no | all | yes | +| rightBarLabelColor | color of the labels displayed behind the right bars | ColorValue | no | all | yes | +| rightBarLabelFontStyle | font style of the labels displayed behind the right bars | FontStyle | no | all | yes | +| rightBarLabelFontWeight | font weight of the labels displayed behind the right bars | FontWeight | no | all | yes | +| rightBarLabelFontFamily | font family of the labels displayed behind the right bars | string | no | all | yes | +| rightBarLabelShift | value by which the right bar labels should be shifted horizontally (kind of margin b/w label and bar) | number | no | all | yes | +| rightBarLabelPrefix | The String prepended to the right bar label text (for example- '$') | string | no | all | yes | +| rightBarLabelSuffix | The String appended to the right bar label text | string | no | all | yes | +| formatBarLabels | a callback function that takes the label generated by the library and modifies it | (label: string) => string | no | all | yes | +| leftBarColor | color of the bars displayed in the left half of the pyramid | ColorValue | no | all | yes | +| rightBarColor | color of the bars displayed in the right half of the pyramid | ColorValue | no | all | yes | +| leftBarBorderColor | border color of the bars displayed in the left half of the pyramid | ColorValue | no | all | yes | +| rightBarBorderColor | border color of the bars displayed in the right half of the pyramid | ColorValue | no | all | yes | +| barBorderWidth | boder width of the bars (both left and right bars) | number | no | all | yes | +| leftBarBorderWidth | boder width of the bars displayed in the left half of the pyramid | number | no | all | yes | +| rightBarBorderWidth | boder width of the bars displayed in the right half of the pyramid | number | no | all | yes | +| barBorderRadius | boder radius of the bars | number | no | all | yes | +| leftBarBorderRadius | boder width of the bars displayed in the left half of the pyramid | number | no | all | yes | +| rightBarBorderRadius | boder width of the bars displayed in the right half of the pyramid | number | no | all | yes | +| allCornersRounded | when set to true, border radius will apply to all the four corners of the bars, else applied only on outer edges | boolean | no | all | yes | +| showSurplus | shows surplus values on the edges in highlighted colors (extra width of the bigger bar is highlighted ) | boolean | no | all | yes | +| showSurplusLeft | shows surplus values on the left edges in highlighted colors (extra width of the bigger bar is highlighted ) | boolean | no | all | yes | +| showSurplusRight | shows surplus values on the right edges in highlighted colors (extra width of the bigger bar is highlighted ) | boolean | no | all | yes | +| leftSurplusColor | highlight color of the left surplus | ColorValue | no | all | yes | +| leftSurplusBorderColor | border color of the left surplus | ColorValue | no | all | yes | +| rightSurplusColor | highlight color of the right surplus | ColorValue | no | all | yes | +| rightSurplusBorderColor | border color of the right surplus | ColorValue | no | all | yes | +| leftSurplusBorderWidth | border width of the left surplus | number | no | all | yes | +| rightSurplusBorderWidth | border width of the right surplus | number | no | all | yes | + +## Known Issues + +- [ ] PieChart 设置圆环设置为 3D,中间圆环显示问题,svg 问题。 [issue#7](https://github.com/react-native-oh-library/react-native-gifted-charts/issues/7) +- [x] BarChart 设置 barBackgroundPattern 显示问题,svg 问题。 [issue#6](https://github.com/react-native-oh-library/react-native-gifted-charts/issues/6) +- [ ] LineChart 设置 customDataPoint 不显示,svg 问题。 [issue#8](https://github.com/react-native-oh-library/react-native-gifted-charts/issues/8) +- [ ] PieChartPro 饼图设置 animated 为 true,动画会卡顿,RN 框架问题。 [issue#9](https://github.com/react-native-oh-library/react-native-gifted-charts/issues/9) + +## Others + +## License + +This project is licensed under [The MIT License (MIT)](https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/blob/master/LICENSE). -- Gitee From b7c2496d8051cda8359791d09f6f302af77db370 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:13:50 +0800 Subject: [PATCH 27/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-graph=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-graph.md | 210 +++++++++++++++++++-------------------- 1 file changed, 103 insertions(+), 107 deletions(-) diff --git a/en/react-native-graph.md b/en/react-native-graph.md index d5264d4b..bd84de31 100644 --- a/en/react-native-graph.md +++ b/en/react-native-graph.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-native-graph

@@ -12,150 +12,146 @@

-> [!TIP] [Github 地址](https://github.com/margelo/react-native-graph) +> [!TIP] [ GitHub address](https://github.com/margelo/react-native-graph) -## 安装与使用 +## Installation and Usage - -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install react-native-graph@1.1.0 +npm install react-natvie-graph@1.1.0 ``` #### **yarn** ```bash -yarn add react-native-graph@1.1.0 +yarn add react-natvie-graph@1.1.0 ``` -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: ```ts -import React, { useState } from 'react' -import { View, StyleSheet, Text, Button } from 'react-native' -import { LineGraph } from 'react-native-graph' -import { GestureHandlerRootView } from 'react-native-gesture-handler'; +import React, { useState } from "react"; +import { View, StyleSheet, Text, Button } from "react-native"; +import { LineGraph } from "react-native-graph"; +import { GestureHandlerRootView } from "react-native-gesture-handler"; interface GraphPoint { - value: number - date: Date - } + value: number; + date: Date; +} interface GraphXRange { - min: Date; - max: Date; + min: Date; + max: Date; } interface GraphYRange { - min: number; - max: number; + min: number; + max: number; } interface GraphPathRange { - x: GraphXRange; - y: GraphYRange; + x: GraphXRange; + y: GraphYRange; } type GraphRange = Partial; type Color = string | Float32Array | number | number[]; -export default function() { - const generateRandomGraphData=(length: number): GraphPoint[]=>{ - return Array(length) - .fill(0) - .map((_, index) => ({ - date: new Date( - new Date(2000, 0, 1).getTime() + 1000 * 60 * 60 * 24 * index - ), - value: Math.random()*10, - })) - } - const POINT_COUNT=50 - const POINTS = generateRandomGraphData(POINT_COUNT) - const [points, setPoints] = useState(POINTS) - const [isAnimated, setIsAnimated] = useState(true) - const [enablePanGesture, setEnablePanGesture] = useState(false) - - const color='#dd4400' - - - return ( - - +export default function () { + const generateRandomGraphData = (length: number): GraphPoint[] => { + return Array(length) + .fill(0) + .map((_, index) => ({ + date: new Date( + new Date(2000, 0, 1).getTime() + 1000 * 60 * 60 * 24 * index + ), + value: Math.random() * 10, + })); + }; + const POINT_COUNT = 50; + const POINTS = generateRandomGraphData(POINT_COUNT); + const [points, setPoints] = useState(POINTS); + const [isAnimated, setIsAnimated] = useState(true); + const [enablePanGesture, setEnablePanGesture] = useState(false); + + const color = "#dd4400"; + + return ( + + {`enablePanGesture value is ${enablePanGesture}`} - + + {colors.rawResult} [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. -> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 - -打开 `entry/oh-package.json5`,添加以下依赖 +Open `entry/oh-package.json5` file and add the following dependencies: ```json "dependencies": { @@ -238,22 +235,22 @@ const styles = StyleSheet.create({ } ``` -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -方法二:直接链接源码 +Method 2: Directly link to the source code. -> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) +> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). -### 3.在 ArkTs 侧引入 RNImageColorsPackage +### 3. Introducing RNImageColorsPackage to ArkTS -打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... @@ -267,63 +264,61 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 4. Running -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -然后编译、运行即可。 +Then build and run the code. -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-image-colors Releases](https://github.com/react-native-oh-library/react-native-image-colors/releases) +Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-image-colors Releases](https://github.com/react-native-oh-library/react-native-image-colors/releases) ## API ### ImageColors.getColors(uri: string, config?: Config): Promise +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 - -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. | Name | Description | Type | Required | Platform | HarmonyOS Support | | --------- | ------------------------------------- | -------- | -------- | -------- | ----------------- | | getColors | Fetch prominent colors from an image. | Function | yes | all | yes | - ### Uri A string which can be: -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| --------- | ------------------------------------- | -------- | -------- | -------- | ----------------- | -| uri | 1. URL: [`https://i.imgur.com/O3XSdU7.jpg`](https://i.imgur.com/O3XSdU7.jpg);
2. Local file: const catImg = require('./images/cat.jpg');
3. Base64: const catImgBase64 = 'data:image/jpeg;base64,/9j/4Ri...' | string | yes | all | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ | -------- | -------- | ----------------- | +| uri | 1. URL: [`https://i.imgur.com/O3XSdU7.jpg`](https://i.imgur.com/O3XSdU7.jpg);
2. Local file: const catImg = require('./images/cat.jpg');
3. Base64: const catImgBase64 = 'data:image/jpeg;base64,/9j/4Ri...' | string | yes | all | yes | - > The mime type prefix for base64 is required (e.g. data:image/png;base64). +> The mime type prefix for base64 is required (e.g. data:image/png;base64). ### Config The config object is optional. -| Name | Description | Type | Required | Default | Supported | HarmonyOS Support | -| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | ----------- | ------------------- | ----------------- | ----------------- | -| `fallback` | If a color property couldn't be retrieved, it will default to this hex color string | `string` | no | `"#000000"` | all | yes | -| `cache` | Enables in-memory caching of the result - skip downloading the same image next time. | `boolean` | no | `false` | all | yes | -| `key` | Unique key to use for the cache entry. The image URI is used as the unique key by default. You should explicitly pass a key if you enable caching and you're using a base64 string as the URI. | `string` | no | `undefined` | all | yes | -| `headers` | HTTP headers to be sent along with the GET request to download the image | `Record` | no | `undefined` | iOS, Android | yes | -| `pixelSpacing` | How many pixels to skip when iterating over image pixels. Higher means better performance (**note**: value cannot be lower than 1). | `number` | no | `5` | Android | no | -| `quality` | Highest implies no downscaling and very good colors. | `'lowest'`
`'low'`
`'high'`
`'highest'` | no | `'low'` | iOS, Web | no | +| Name | Description | Type | Required | Default | Supported | HarmonyOS Support | +| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | -------- | ----------- | ------------ | ----------------- | +| `fallback` | If a color property couldn't be retrieved, it will default to this hex color string | `string` | no | `"#000000"` | all | yes | +| `cache` | Enables in-memory caching of the result - skip downloading the same image next time. | `boolean` | no | `false` | all | yes | +| `key` | Unique key to use for the cache entry. The image URI is used as the unique key by default. You should explicitly pass a key if you enable caching and you're using a base64 string as the URI. | `string` | no | `undefined` | all | yes | +| `headers` | HTTP headers to be sent along with the GET request to download the image | `Record` | no | `undefined` | iOS, Android | yes | +| `pixelSpacing` | How many pixels to skip when iterating over image pixels. Higher means better performance (**note**: value cannot be lower than 1). | `number` | no | `5` | Android | no | +| `quality` | Highest implies no downscaling and very good colors. | `'lowest'`
`'low'`
`'high'`
`'highest'` | no | `'low'` | iOS, Web | no | ### ImageColorsResult @@ -331,35 +326,34 @@ Every result object contains a respective `platform` key to help narrow down the HarmonyImageColors -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ------------------------ | --------------------------------------------------- | ----------- | -------- | --------- | ----------------- | -| `mainColor` | The main colors of the image. | `string` | no | harmonyOS | yes | -| `largestProportionColor` | The color with the highest proportion in the image. | `string` | no | harmonyOS | yes | -| `highestSaturationColor` | The color with the highest saturation in the image. | `string` | no | harmonyOS | yes | -| `averageColor` | The average color of the image. | `string` | no | harmonyOS | yes | -| `platform` | The platform is HarmonyOS. | `string` | no | all | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ------------------------ | --------------------------------------------------- | -------- | -------- | --------- | ----------------- | +| `mainColor` | The main colors of the image. | `string` | no | harmonyOS | yes | +| `largestProportionColor` | The color with the highest proportion in the image. | `string` | no | harmonyOS | yes | +| `highestSaturationColor` | The color with the highest saturation in the image. | `string` | no | harmonyOS | yes | +| `averageColor` | The average color of the image. | `string` | no | harmonyOS | yes | +| `platform` | The platform is HarmonyOS. | `string` | no | all | yes | ### ImageColors.cache -| Name | Description | Type | Required | Params | Platform | HarmonyOS Support | -| --------- | ------------------------------------- | -------- | -------- | -------- | -------- | ----------------- | -| getItem | Read cache result. | Function | no | key: string | all | yes | -| setItem | Set a cached result. | Function | no | key: string, value: ImageColorsResult | all | yes | -| removeItem | Delete a cached result. | Function | no | key: string | all | yes | -| clear | Clearing the cache. | Function | no | | all | yes | - +| Name | Description | Type | Required | Params | Platform | HarmonyOS Support | +| ---------- | ----------------------- | -------- | -------- | ------------------------------------- | -------- | ----------------- | +| getItem | Read cache result. | Function | no | key: string | all | yes | +| setItem | Set a cached result. | Function | no | key: string, value: ImageColorsResult | all | yes | +| removeItem | Delete a cached result. | Function | no | key: string | all | yes | +| clear | Clearing the cache. | Function | no | | all | yes | ### Notes + - Since the implementation of each platform is different you can get **different color results for each**. - This module is a wrapper around the [Palette](https://developer.android.com/reference/androidx/palette/graphics/Palette) class on Android, [UIImageColors](https://github.com/jathu/UIImageColors) on iOS and [node-vibrant](https://github.com/Vibrant-Colors/node-vibrant) for the web and [@ohos.effectKit](https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/js-apis-effectkit-V5) on harmonyOS. +## Known Issues -## 遗留问题 - -- [x] harmonyOS获取颜色值暂时只能得到固定的一种颜色,暂不支持通过传入`pixelSpacing`或`quality`参数来计算获取不同精确度的颜色值。[issue链接](https://github.com/react-native-oh-library/react-native-image-colors/issues/16) +- [x] harmonyOS 获取颜色值暂时只能得到固定的一种颜色,暂不支持通过传入`pixelSpacing`或`quality`参数来计算获取不同精确度的颜色值。[issue 链接](https://github.com/react-native-oh-library/react-native-image-colors/issues/16) -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/osamaqarem/react-native-image-colors/blob/master/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/osamaqarem/react-native-image-colors/blob/master/LICENSE). -- Gitee From 88f7e40eb266337e55eccd7dbb3b09cd37441a98 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:16:02 +0800 Subject: [PATCH 31/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-image-marker=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-image-marker.md | 535 ++++++++++++++++---------------- 1 file changed, 270 insertions(+), 265 deletions(-) diff --git a/en/react-native-image-marker.md b/en/react-native-image-marker.md index be1f7462..5e626570 100644 --- a/en/react-native-image-marker.md +++ b/en/react-native-image-marker.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-native-image-marker

@@ -12,16 +12,15 @@

+> [!TIP] [ GitHub address](https://github.com/react-native-oh-library/react-native-image-marker) -> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-image-marker) +## Installation and Usage -## 安装与使用 +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-image-marker Releases](https://github.com/react-native-oh-library/react-native-image-marker/releases). -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-image-marker Releases](https://github.com/react-native-oh-library/react-native-image-marker/releases),并下载适用版本的 tgz 包。 +Go to the project directory and execute the following instruction: -进入到工程目录并输入以下命令: - -> [!TIP] # 处替换为 tgz 包的路径 +> [!TIP] Replace the content with the path of the .tgz package at the comment sign (#). @@ -39,164 +38,175 @@ yarn add @react-native-oh-tpl/react-native-image-marker@file:# -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```tsx import Marker, { - Position, ImageMarkOptions, TextMarkOptions - } from 'react-native-image-marker' + Position, + ImageMarkOptions, + TextMarkOptions, +} from "react-native-image-marker"; import React, { useState } from "react"; -import { StyleSheet, ScrollView, Text, View, Button, Image } from "react-native"; -import { Colors } from 'react-native/Libraries/NewAppScreen'; +import { + StyleSheet, + ScrollView, + Text, + View, + Button, + Image, +} from "react-native"; +import { Colors } from "react-native/Libraries/NewAppScreen"; export const ImageMarkerText = () => { - const [texturl, setTextMarkUrl] = useState(''); - const [imageurl,setImageMarkUrl] = useState(''); - const text_options: TextMarkOptions = { - backgroundImage: { src: 'https://developer.huawei.com/allianceCmsResource/resource/HUAWEI_Developer_VUE/images/yuekan/xintexing00.jpg' }, - watermarkTexts: [{ - text: 'hello world \n 你好', + const [texturl, setTextMarkUrl] = useState(""); + const [imageurl, setImageMarkUrl] = useState(""); + const text_options: TextMarkOptions = { + backgroundImage: { + src: "https://developer.huawei.com/allianceCmsResource/resource/HUAWEI_Developer_VUE/images/yuekan/xintexing00.jpg", + }, + watermarkTexts: [ + { + text: "hello world \n hello", position: { position: Position.topLeft, }, style: { - color: '#FFFF00', + color: "#FFFF00", fontSize: 30, - fontName: 'Arial', + fontName: "Arial", rotate: 30, textBackgroundStyle: { - padding: '10% 10%', - color: '#02B96B', + padding: "10% 10%", + color: "#02B96B", }, shadowStyle: { dx: 10, dy: 10, radius: 10, - color: '#008F6D', + color: "#008F6D", }, strikeThrough: true, underline: true, }, - }, { - text: 'hello world \n 你好', + }, + { + text: "hello world \n hello", position: { position: Position.center, }, style: { - color: '#FFFF00', + color: "#FFFF00", fontSize: 30, - fontName: 'Arial', + fontName: "Arial", textBackgroundStyle: { - padding: '10% 10%', - color: '#0FFF00', + padding: "10% 10%", + color: "#0FFF00", }, strikeThrough: true, underline: true, }, - }], - } + }, + ], + }; - const image_options: ImageMarkOptions = { - backgroundImage: { src: 'https://developer.huawei.com/allianceCmsResource/resource/HUAWEI_Developer_VUE/images/yuekan/xintexing00.jpg' }, - watermarkImages: [{ - src: 'https://developer.huawei.com/allianceCmsResource/resource/HUAWEI_Developer_VUE/images/yingyongicon.png', - rotate:20, + const image_options: ImageMarkOptions = { + backgroundImage: { + src: "https://developer.huawei.com/allianceCmsResource/resource/HUAWEI_Developer_VUE/images/yuekan/xintexing00.jpg", + }, + watermarkImages: [ + { + src: "https://developer.huawei.com/allianceCmsResource/resource/HUAWEI_Developer_VUE/images/yingyongicon.png", + rotate: 20, position: { position: Position.topLeft, }, }, { - src: 'https://developer.huawei.com/allianceCmsResource/resource/HUAWEI_Developer_VUE/images/yingyongicon.png', - rotate:50, + src: "https://developer.huawei.com/allianceCmsResource/resource/HUAWEI_Developer_VUE/images/yingyongicon.png", + rotate: 50, position: { position: Position.bottomCenter, }, - } + }, ], - } + }; - const markText = () => { - Marker.markText(text_options).then((result) => { - setTextMarkUrl(result) - }).catch(error => { - console.log('error', error) + const markText = () => { + Marker.markText(text_options) + .then((result) => { + setTextMarkUrl(result); }) - } - - const markImage = () => { - Marker.markImage(image_options).then((result) => { - setImageMarkUrl(result) - }).catch(error => { - console.log('error', error) + .catch((error) => { + console.log("error", error); + }); + }; + + const markImage = () => { + Marker.markImage(image_options) + .then((result) => { + setImageMarkUrl(result); }) - } - return ( - - - - - {"image marker"} - - - - - - {`${this.state.isRecognizing}`} - - - - - - - - - - - - ); + }); + } catch (e) { + console.error(e); } + }; + + render() { + return ( + + + {`${this.state.started}`} + + + + {`${this.state.recognized}`} + + + + {`${this.state.error}`} + + + + {this.state.results.map((result, index) => { + return ( + + {result} + + ); + })} + + + + {this.state.partialResults.map((result, index) => { + return ( + + {result} + + ); + })} + + + + {` ${this.state.end}`} + + + + {`${this.state.isAvailable}`} + + + + + {`${this.state.isRecognizing}`} + + + + + + + + + + + + ); + } } const styles = StyleSheet.create({ - button: { - width: 50, - height: 50, - }, - container: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#F5FCFF', - }, - welcome: { - fontSize: 20, - textAlign: 'center', - margin: 10, - }, - action: { - textAlign: 'center', - color: '#0000FF', - marginVertical: 5, - fontWeight: 'bold', - }, - instructions: { - textAlign: 'center', - color: '#333333', - marginBottom: 5, - }, - stat: { - textAlign: 'center', - color: '#B0171F', - marginBottom: 1, - }, - baseArea: { - width: '100%', - height: 30, - borderRadius: 4, - borderColor: '#000000', - marginTop: 6, - backgroundColor: '#FFFFFF', - flexDirection: 'row', - alignItems: 'center', - paddingLeft: 8, - paddingRight: 8, - marginBottom: 20, - }, + button: { + width: 50, + height: 50, + }, + container: { + flex: 1, + justifyContent: "center", + alignItems: "center", + backgroundColor: "#F5FCFF", + }, + welcome: { + fontSize: 20, + textAlign: "center", + margin: 10, + }, + action: { + textAlign: "center", + color: "#0000FF", + marginVertical: 5, + fontWeight: "bold", + }, + instructions: { + textAlign: "center", + color: "#333333", + marginBottom: 5, + }, + stat: { + textAlign: "center", + color: "#B0171F", + marginBottom: 1, + }, + baseArea: { + width: "100%", + height: 30, + borderRadius: 4, + borderColor: "#000000", + marginTop: 6, + backgroundColor: "#FFFFFF", + flexDirection: "row", + alignItems: "center", + paddingLeft: 8, + paddingRight: 8, + marginBottom: 20, + }, }); export default VoiceTest; ``` -## 使用 Codegen -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 +## Use Codegen + +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/zh-cn/codegen.md). ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +Open the `harmony` directory of the HarmonyOS project in DevEco Studio. -### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 +### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project ```json { @@ -380,18 +387,15 @@ export default VoiceTest; } ``` -### 2.引入原生端代码 +### 2. Introducing Native Code -目前有两种方法: +Currently, two methods are available: -1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法); -2. 直接链接源码。 +Method 1 (recommended): Use the HAR file. -方法一:通过 har 包引入(推荐) +> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. -> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 - -打开 `entry/oh-package.json5`,添加以下依赖 +Open `entry/oh-package.json5` file and add the following dependencies: ```json "dependencies": { @@ -400,22 +404,22 @@ export default VoiceTest; } ``` -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -方法二:直接链接源码 +Method 2: Directly link to the source code. -> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) +> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). -### 3.在 ArkTs 侧引入 RNVoicePackage +### 3. Introducing RNVoicePackage to ArkTS -打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... @@ -430,29 +434,30 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 4. Running -点击右上角的 `sync` 按钮 +Click the `sync` button in the upper right corner. -或者在终端执行: +Alternatively, run the following instruction on the terminal: ```bash cd entry ohpm install ``` -然后编译、运行即可。 +Then build and run the code. + +## Constraints -## 约束与限制 +### Compatibility -### 兼容性 +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/voice Releases](https://github.com/react-native-oh-library/voice/releases) -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/voice Releases](https://github.com/react-native-oh-library/voice/releases) +### Permission Requirements -### 权限要求 -由于此库涉及语音识别会使用到系统录音功能,使用时需要配置对应的权限,权限需配置在entry/src目录下module.json5和entry/src/main/resources/base/element目录下string.json文件 +由于此库涉及语音识别会使用到系统录音功能,使用时需要配置对应的权限,权限需配置在 entry/src 目录下 module.json5 和 entry/src/main/resources/base/element 目录下 string.json 文件 打开 `module.json5`,添加: @@ -472,6 +477,7 @@ ohpm install + } ] ``` + 打开 `string.json`,添加权限申请原因: ```diff @@ -490,45 +496,46 @@ ohpm install ## API -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. -> 详情见 [react-native-voice/voice](https://github.com/react-native-voice/voice) +> For details, see [react-native-voice/voice](https://github.com/react-native-voice/voice) -| Name | Description | Type | Required | Platform | HarmonyOS Support | -|-----------------------------|-----------------------------------------------------------------------------------|-------------------|----------|----------|-------------------| -| Voice.isAvailable()| Checks whether a speech recognition service is available on the system. | Promise<0 \| 1> | no | Android, iOS | yes | -| Voice.start(locale) | Starts listening for speech for a specific locale. Returns null if no error occurs. | Promise | no | Android, iOS | yes | -| Voice.stop() | Stops listening for speech. Returns null if no error occurs. | Promise | no | Android, iOS | yes | -| Voice.cancel() | Cancels the speech recognition. Returns null if no error occurs. | Promise | no | Android, iOS | yes | -| Voice.destroy() | Destroys the current SpeechRecognizer instance. Returns null if no error occurs. | Promise | no | Android, iOS | yes | -| Voice.removeAllListeners() | Cleans/nullifies overridden Voice static methods. | void | no | Android, iOS | yes | -| Voice.isRecognizing() | Return if the SpeechRecognizer is recognizing. | Promise<0 \| 1> | no | Android, iOS | yes | -| Voice.getSpeechRecognitionServices() | Returns a list of the speech recognition engines available on the device. (Example: ['com.google.android.googlequicksearchbox'] if Google is the only one available.) | Promise | no | Android | no | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -------- | ------------ | ----------------- | +| Voice.isAvailable() | Checks whether a speech recognition service is available on the system. | Promise<0 \| 1> | no | Android, iOS | yes | +| Voice.start(locale) | Starts listening for speech for a specific locale. Returns null if no error occurs. | Promise | no | Android, iOS | yes | +| Voice.stop() | Stops listening for speech. Returns null if no error occurs. | Promise | no | Android, iOS | yes | +| Voice.cancel() | Cancels the speech recognition. Returns null if no error occurs. | Promise | no | Android, iOS | yes | +| Voice.destroy() | Destroys the current SpeechRecognizer instance. Returns null if no error occurs. | Promise | no | Android, iOS | yes | +| Voice.removeAllListeners() | Cleans/nullifies overridden Voice static methods. | void | no | Android, iOS | yes | +| Voice.isRecognizing() | Return if the SpeechRecognizer is recognizing. | Promise<0 \| 1> | no | Android, iOS | yes | +| Voice.getSpeechRecognitionServices() | Returns a list of the speech recognition engines available on the device. (Example: ['com.google.android.googlequicksearchbox'] if Google is the only one available.) | Promise | no | Android | no | ## 事件回调 -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. + +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ------------------------------------- | ------------------------------------------------------ | :------- | -------- | ------------ | ----------------- | +| `Voice.onSpeechStart(event)` | Invoked when .start() is called without error. | function | no | Android, iOS | yes | +| `Voice.onSpeechRecognized(event)` | Invoked when speech is recognized. | function | no | Android, iOS | yes | +| `Voice.onSpeechEnd(event)` | Invoked when SpeechRecognizer stops recognition. | function | no | Android, iOS | yes | +| `Voice.onSpeechError(event)` | Invoked when an error occurs. | function | no | Android, iOS | yes | +| `Voice.onSpeechResults(event)` | Invoked when SpeechRecognizer is finished recognizing. | function | no | Android, iOS | yes | +| `Voice.onSpeechPartialResults(event)` | Invoked when any results are computed. | function | no | Android, iOS | yes | +| `Voice.onSpeechVolumeChanged(event)` | Invoked when pitch that is recognized changed. | function | no | Android | no | -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ------------------- | --------------------------------------------------------------------------------------------------------------------------------- | :------- |--------| ---------------------------------------------- |-----------------| -| `Voice.onSpeechStart(event)` | Invoked when .start() is called without error. | function | no | Android, iOS | yes | -| `Voice.onSpeechRecognized(event)` | Invoked when speech is recognized. | function | no | Android, iOS | yes | -| `Voice.onSpeechEnd(event)` | Invoked when SpeechRecognizer stops recognition. | function | no | Android, iOS | yes | -| `Voice.onSpeechError(event)` | Invoked when an error occurs. | function | no | Android, iOS | yes | -| `Voice.onSpeechResults(event)` | Invoked when SpeechRecognizer is finished recognizing. | function | no | Android, iOS | yes | -| `Voice.onSpeechPartialResults(event)` | Invoked when any results are computed. | function | no | Android, iOS | yes | -| `Voice.onSpeechVolumeChanged(event)` | Invoked when pitch that is recognized changed. | function | no | Android | no | +## Known Issues -## 遗留问题 +- [ ] 原库支持在线和离线模式,HarmonyOS 侧暂只支持离线 问题: [issue#2](https://github.com/react-native-oh-library/voice/issues/2) +- [ ] 原库支持多种区域和语言,HarmonyOS 侧暂只支持中文 问题: [issue#3](https://github.com/react-native-oh-library/voice/issues/3) -- [ ] 原库支持在线和离线模式,HarmonyOS侧暂只支持离线 问题: [issue#2](https://github.com/react-native-oh-library/voice/issues/2) -- [ ] 原库支持多种区域和语言,HarmonyOS侧暂只支持中文 问题: [issue#3](https://github.com/react-native-oh-library/voice/issues/3) -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/react-native-voice/voice/blob/master/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file +This project is licensed under [The MIT License (MIT)](https://github.com/react-native-voice/voice/blob/master/LICENSE). -- Gitee From f27565b37a78baab59c1e6b0d1a5c6ca626ab40d Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:39:49 +0800 Subject: [PATCH 78/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-walkthrough-tooltip=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-walkthrough-tooltip.md | 88 ++++++++++++++------------ 1 file changed, 46 insertions(+), 42 deletions(-) diff --git a/en/react-native-walkthrough-tooltip.md b/en/react-native-walkthrough-tooltip.md index 8a31923c..96b2e0b5 100644 --- a/en/react-native-walkthrough-tooltip.md +++ b/en/react-native-walkthrough-tooltip.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-native-walkthrough-tooltip

@@ -13,11 +13,11 @@

+> [!TIP] [GitHub address](https://github.com/jasongaare/react-native-walkthrough-tooltip) ->[!TIP] [Github 地址](https://github.com/jasongaare/react-native-walkthrough-tooltip) -## 安装与使用 +## Installation and Usage -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: #### **npm** @@ -30,7 +30,8 @@ npm install react-native-walkthrough-tooltip@1.6.0 ```bash yarn add react-native-walkthrough-tooltip@1.6.0 ``` -下面的代码展示了这个库的基本使用场景: + +The following code shows the basic use scenario of the repository: ```js import React, { useState } from "react"; @@ -53,46 +54,49 @@ export const TestTooltip = ({ text, style }) => { }; ``` -## 约束与限制 -### 兼容性 +## Constraints + +### Compatibility -本文档内容基于以下版本验证通过: +This document is verified based on the following versions: 1. RNOH: 0.72.5; SDK: HarmonyOS-NEXT-DB1 5.0.0.25; IDE: DevEco Studio 5.0.3.403; ROM: 3.0.0.25; +### Properties + +[!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. + +[!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. + +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | -------- | -------- | ----------------- | +| accessible | Set this to false if you do not want the root touchable element to be accessible. [See docs on accessible here](https://reactnative.dev/docs/accessibility#accessibility-properties) | bool | No | All | Yes | +| allowChildInteraction | By default, the user can touch and interact with the child element. When this prop is false, the user cannot interact with the child element while the tooltip is visible. | bool | No | All | Yes | +| arrowSize | The dimensions of the arrow on the bubble pointing to the highlighted element | Size | No | All | Yes | +| backgroundColor | Color of the fullscreen background beneath the tooltip. Overrides the backgroundStyle prop | string | No | All | Yes | +| childContentSpacing | The distance between the tooltip-rendered child and the arrow pointing to it | number | No | All | Yes | +| closeOnChildInteraction | When child interaction is allowed, this prop determines if onClose should be called when the user interacts with the child element. Default is true (usually means the tooltip will dismiss once the user touches the element highlighted) | bool | No | All | Yes | +| closeOnContentInteraction | this prop determines if onClose should be called when the user interacts with the content element. Default is true (usually means the tooltip will dismiss once the user touches the content element) | bool | No | All | Yes | +| content | This is the view displayed in the tooltip popover bubble | function/Element | Yes | All | Yes | +| displayInsets | The number of pixels to inset the tooltip on the screen (think of it like padding). The tooltip bubble should never render outside of these insets, so you may need to adjust your content accordingly | object | No | All | Yes | +| disableShadow | When true, tooltips will not appear elevated. Disabling shadows will remove the warning: RCTView has a shadow set but cannot calculate shadow efficiently on IOS devices. | bool | No | All | Yes | +| isVisible | When true, tooltip is displayed | bool | Yes | All | Yes | +| onClose | Callback fired when the user taps the tooltip background overlay | function | Yes | All | Yes | +| placement | Where to position the tooltip - options: top, bottom, left, right, center. Default is top for tooltips rendered with children Default is center for tooltips rendered without children.NOTE: center is only available with a childless placement, and the content will be centered within the bounds defined by the displayInsets. | string | Yes | All | Yes | +| showChildInTooltip | Set this to false if you do NOT want to display the child alongside the tooltip when the tooltip is visible | bool | No | All | Yes | +| supportedOrientations | This prop allows you to control the supported orientations the tooltip modal can be displayed. It correlates directly with [the prop for React Native's Modal component](https://reactnative.dev/docs/modal#supportedorientations) (has no effect if useReactNativeModal is false) | bool | No | iOS | No | +| topAdjustment | Value which provides additional vertical offest for the child element displayed in a tooltip. Commonly set to: Platform.OS === 'android' ? -StatusBar.currentHeight : 0 due to an issue with React Native's measure function on Android | number | No | All | Yes | +| horizontalAdjustment | Value which provides additional horizontal offest for the child element displayed in a tooltip. This is useful for adjusting the horizontal positioning of a highlighted child element if needed | number | No | All | Yes | +| useInteractionManager | Set this to true if you want the tooltip to wait to become visible until the callback for InteractionManager.runAfterInteractions is executed. Can be useful if you need to wait for navigation transitions to complete, etc.[ See docs on InteractionManager here](https://reactnative.dev/docs/interactionmanager) | bool | No | All | Yes | +| useReactNativeModal | By default, this library uses a component from React Native. If you need to disable this, and simply render an absolutely positioned full-screen view, set useReactNativeModal={false}. This is especially useful if you desire to render a Tooltip while you have a different Modal rendered. | bool | No | All | Yes | + +## Known Issues + +- [ ] supportedOrientations 在 HarmonyOS 不支持 + +## Others + +## License -### 属性 -[!TIP]"Platform"列表示该属性在原三方库上支持的平台。 - -[!TIP]"HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果 -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ------------------- | ------------------------------------------------------------ | -------- | -------- | ----------- | ----------------- | -| accessible | Set this to false if you do not want the root touchable element to be accessible. [See docs on accessible here](https://reactnative.dev/docs/accessibility#accessibility-properties) | bool| No | All |Yes | -| allowChildInteraction |By default, the user can touch and interact with the child element. When this prop is false, the user cannot interact with the child element while the tooltip is visible. | bool | No | All | Yes | -| arrowSize |The dimensions of the arrow on the bubble pointing to the highlighted element | Size | No |All | Yes -| backgroundColor |Color of the fullscreen background beneath the tooltip. Overrides the backgroundStyle prop | string | No |All | Yes -| childContentSpacing | The distance between the tooltip-rendered child and the arrow pointing to it | number | No |All | Yes -| closeOnChildInteraction | When child interaction is allowed, this prop determines if onClose should be called when the user interacts with the child element. Default is true (usually means the tooltip will dismiss once the user touches the element highlighted) | bool | No |All | Yes -| closeOnContentInteraction |this prop determines if onClose should be called when the user interacts with the content element. Default is true (usually means the tooltip will dismiss once the user touches the content element) | bool |No | All | Yes -| content | This is the view displayed in the tooltip popover bubble | function/Element |Yes | All | Yes -| displayInsets | The number of pixels to inset the tooltip on the screen (think of it like padding). The tooltip bubble should never render outside of these insets, so you may need to adjust your content accordingly | object |No | All | Yes -| disableShadow | When true, tooltips will not appear elevated. Disabling shadows will remove the warning: RCTView has a shadow set but cannot calculate shadow efficiently on IOS devices. | bool |No | All | Yes -| isVisible | When true, tooltip is displayed | bool |Yes | All | Yes -| onClose | Callback fired when the user taps the tooltip background overlay | function |Yes | All | Yes -| placement | Where to position the tooltip - options: top, bottom, left, right, center. Default is top for tooltips rendered with children Default is center for tooltips rendered without children.NOTE: center is only available with a childless placement, and the content will be centered within the bounds defined by the displayInsets. | string |Yes | All | Yes -| showChildInTooltip | Set this to false if you do NOT want to display the child alongside the tooltip when the tooltip is visible | bool |No | All | Yes -| supportedOrientations |This prop allows you to control the supported orientations the tooltip modal can be displayed. It correlates directly with [the prop for React Native's Modal component](https://reactnative.dev/docs/modal#supportedorientations) (has no effect if useReactNativeModal is false) | bool |No | iOS | No -| topAdjustment | Value which provides additional vertical offest for the child element displayed in a tooltip. Commonly set to: Platform.OS === 'android' ? -StatusBar.currentHeight : 0 due to an issue with React Native's measure function on Android| number |No | All | Yes -| horizontalAdjustment |Value which provides additional horizontal offest for the child element displayed in a tooltip. This is useful for adjusting the horizontal positioning of a highlighted child element if needed | number |No | All | Yes -| useInteractionManager | Set this to true if you want the tooltip to wait to become visible until the callback for InteractionManager.runAfterInteractions is executed. Can be useful if you need to wait for navigation transitions to complete, etc.[ See docs on InteractionManager here](https://reactnative.dev/docs/interactionmanager) | bool |No | All | Yes -| useReactNativeModal | By default, this library uses a component from React Native. If you need to disable this, and simply render an absolutely positioned full-screen view, set useReactNativeModal={false}. This is especially useful if you desire to render a Tooltip while you have a different Modal rendered. | bool |No | All | Yes -## 遗留问题 - -- [ ] supportedOrientations在HarmonyOS不支持 - -## 其他 - -## 开源协议 - -本项目基于 [The MIT License (MIT)](https://github.com/jasongaare/react-native-walkthrough-tooltip/blob/master/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file +This project is licensed under [The MIT License (MIT)](https://github.com/jasongaare/react-native-walkthrough-tooltip/blob/master/LICENSE). -- Gitee From c94dc1cf3635cb9ae65f22588158c44a089cb7bb Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:40:05 +0800 Subject: [PATCH 79/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-native-reanimated-bottom-sheet=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-navigation-bottom-sheet.md | 104 ++++++++++++++-------------- 1 file changed, 51 insertions(+), 53 deletions(-) diff --git a/en/react-navigation-bottom-sheet.md b/en/react-navigation-bottom-sheet.md index 5202d304..c1558986 100644 --- a/en/react-navigation-bottom-sheet.md +++ b/en/react-navigation-bottom-sheet.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

@th3rdwave/react-navigation-bottom-sheet

@@ -12,11 +12,11 @@

-> [!TIP] [Github 地址](https://github.com/th3rdwave/react-navigation-bottom-sheet) +> [!TIP] [GitHub address](https://github.com/th3rdwave/react-navigation-bottom-sheet) -## 安装与使用 +## Installation and Usage -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: @@ -34,7 +34,7 @@ yarn add @th3rdwave/react-navigation-bottom-sheet@0.3.2 -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: > [!TIP] 本示例依赖 react-native-gesture-handler 库,参照[@react-native-oh-tpl/react-native-gesture-handler 文档](/zh-cn/react-native-gesture-handler.md)进行引入。 @@ -199,73 +199,71 @@ const styles = StyleSheet.create({ }); ``` -## Link -本库鸿蒙侧实现依赖@react-native-oh-tpl/react-native-gesture-handler、@react-native-oh-tpl/react-native-reanimated 的原生端代码,如已在鸿蒙工程中引入过这两个库,则无需再次引入,可跳过本章节步骤,直接使用。 +## Link -如未引入请参照[@react-native-oh-tpl/react-native-gesture-handler 文档](/zh-cn/react-native-gesture-handler.md)、[@react-native-oh-tpl/react-native-reanimated 文档](/zh-cn/react-native-reanimated.md)进行引入 +The HarmonyOS implementation of this library depends on the native code from @react-native-oh-tpl/react-native-gesture-handler、@react-native-oh-tpl/react-native-reanimated. If this library is included into your HarmonyOS application, there is no need to include it again; you can skip the steps in this section and use it directly. -## 约束与限制 +If it is not included, follow the guide provided in [@react-native-oh-tpl/react-native-gesture-handler 文档](/zh-cn/react-native-gesture-handler.md)、[@react-native-oh-tpl/react-native-reanimated 文档](/zh-cn/react-native-reanimated.md) to add it to your project. -### 兼容性 +## Constraints +### Compatibility -本文档内容基于以下版本验证通过: +This document is verified based on the following versions: 1. RNOH: 0.72.29; SDK: HarmonyOS-NEXT-DB6 5.0.0.61 (API Version 12 Beta6); IDE: DevEco Studio 5.0.3.706; ROM: 3.0.0.61; -## 属性 -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +## Properties -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. ### Navigation options -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ---- | ----------- | ---- | -------- | -------- | ------------------ | -| snapPoints | Points for the bottom sheet to snap to, points should be sorted from bottom to top. It accepts array of number and string. | Array | YES | ALL | YES | -| backgroundStyle | View style to be applied to the background component. | ViewStyle | NO | ALL | YES | -| index | Initial snap index. You also could provide -1 to initiate bottom sheet in closed state. | number | NO | ALL | YES | -| detached | Defines whether the bottom sheet is attached to the bottom or no. | boolean | NO | ALL | YES | -| overDragResistanceFactor | Defines how violently sheet has to be stopped while over dragging. | number | NO | ALL | YES | -| enableOverDrag | Enable over drag for the sheet. | boolean | NO | ALL | YES | -| enablePanDownToClose | Enable pan down gesture to close the sheet. | boolean | NO |ALL| YES | -| enableHandlePanningGesture | Enable handle panning gesture interaction. | boolean | NO |ALL| YES | -| enableContentPanningGesture | Enable content panning gesture interaction. | boolean | NO |ALL| YES | -| enableDynamicSizing | Enable dynamic sizing for content view and scrollable content size. | boolean | NO | ALL | YES | -| animateOnMount | This will initially mount the sheet closed and when it's mounted and calculated the layout, it will snap to initial snap point index. | boolean | NO | ALL | YES | -| style | View style to be applied at the sheet container, it also could be an AnimatedStyle. This is helpful to add shadow to the sheet. | ViewStyle | NO | ALL | YES | -| handleStyle | View style to be applied to the handle component. | ViewStyle | NO | ALL | YES | -| handleIndicatorStyle | View style to be applied to the handle indicator component. | ViewStyle | NO | ALL | YES | -| handleHeight | Handle height helps to calculate the internal container and sheet layouts. If handleComponent is provided, the library internally will calculate its layout, unless handleHeight is provided too.| number | NO | ALL | YES | -| contentHeight | Content height helps dynamic snap points calculation.| number | NO | ALL | YES | -| topInset | Top inset to be added to the bottom sheet container, usually it comes from @react-navigation/stack hook useHeaderHeight or from react-native-safe-area-context hook useSafeArea.| number | NO | ALL | YES | -| bottomInset |Bottom inset to be added to the bottom sheet container.| number | NO | ALL | YES | -| maxDynamicContentSize |Max dynamic content size height to limit the bottom sheet height from exceeding a provided size.| number | NO | ALL | YES | -| keyboardBehavior |Defines the keyboard appearance behavior.| 'extend' or 'fillParent' or 'interactive' | NO |NO| NO | -| keyboardBlurBehavior |Defines the keyboard blur behavior.| 'none' or 'restore' | NO | NO | NO | -| animationConfigs |Animation configs, this could be created by:|function | NO | ALL | YES | -| handleComponent |Component to be placed as a sheet handle.|React.FC\ | NO | ALL | YES | -| backdropComponent |Component to be placed as a sheet backdrop, by default is set to null, however the library also provide a default implementation BottomSheetBackdrop of a backdrop but you will need to provide it manually.|React.FC\ | NO | ALL | YES | -| backgroundComponent |Component to be placed as a sheet background.|React.FC\ | NO | ALL | YES | -| footerComponent |Component to be placed as a sheet footer.|React.FC\ | NO | ALL | YES | - +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------- | -------- | -------- | ----------------- | +| snapPoints | Points for the bottom sheet to snap to, points should be sorted from bottom to top. It accepts array of number and string. | Array | YES | ALL | YES | +| backgroundStyle | View style to be applied to the background component. | ViewStyle | NO | ALL | YES | +| index | Initial snap index. You also could provide -1 to initiate bottom sheet in closed state. | number | NO | ALL | YES | +| detached | Defines whether the bottom sheet is attached to the bottom or no. | boolean | NO | ALL | YES | +| overDragResistanceFactor | Defines how violently sheet has to be stopped while over dragging. | number | NO | ALL | YES | +| enableOverDrag | Enable over drag for the sheet. | boolean | NO | ALL | YES | +| enablePanDownToClose | Enable pan down gesture to close the sheet. | boolean | NO | ALL | YES | +| enableHandlePanningGesture | Enable handle panning gesture interaction. | boolean | NO | ALL | YES | +| enableContentPanningGesture | Enable content panning gesture interaction. | boolean | NO | ALL | YES | +| enableDynamicSizing | Enable dynamic sizing for content view and scrollable content size. | boolean | NO | ALL | YES | +| animateOnMount | This will initially mount the sheet closed and when it's mounted and calculated the layout, it will snap to initial snap point index. | boolean | NO | ALL | YES | +| style | View style to be applied at the sheet container, it also could be an AnimatedStyle. This is helpful to add shadow to the sheet. | ViewStyle | NO | ALL | YES | +| handleStyle | View style to be applied to the handle component. | ViewStyle | NO | ALL | YES | +| handleIndicatorStyle | View style to be applied to the handle indicator component. | ViewStyle | NO | ALL | YES | +| handleHeight | Handle height helps to calculate the internal container and sheet layouts. If handleComponent is provided, the library internally will calculate its layout, unless handleHeight is provided too. | number | NO | ALL | YES | +| contentHeight | Content height helps dynamic snap points calculation. | number | NO | ALL | YES | +| topInset | Top inset to be added to the bottom sheet container, usually it comes from @react-navigation/stack hook useHeaderHeight or from react-native-safe-area-context hook useSafeArea. | number | NO | ALL | YES | +| bottomInset | Bottom inset to be added to the bottom sheet container. | number | NO | ALL | YES | +| maxDynamicContentSize | Max dynamic content size height to limit the bottom sheet height from exceeding a provided size. | number | NO | ALL | YES | +| keyboardBehavior | Defines the keyboard appearance behavior. | 'extend' or 'fillParent' or 'interactive' | NO | NO | NO | +| keyboardBlurBehavior | Defines the keyboard blur behavior. | 'none' or 'restore' | NO | NO | NO | +| animationConfigs | Animation configs, this could be created by: | function | NO | ALL | YES | +| handleComponent | Component to be placed as a sheet handle. | React.FC\ | NO | ALL | YES | +| backdropComponent | Component to be placed as a sheet backdrop, by default is set to null, however the library also provide a default implementation BottomSheetBackdrop of a backdrop but you will need to provide it manually. | React.FC\ | NO | ALL | YES | +| backgroundComponent | Component to be placed as a sheet background. | React.FC\ | NO | ALL | YES | +| footerComponent | Component to be placed as a sheet footer. | React.FC\ | NO | ALL | YES | ### Navigation helpers -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ---- | ----------- | ---- | -------- | -------- | ------------------ | -| snapTo | Snaps the current sheet to index. | (index: number) => void | NO | ALL | YES | - +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ------ | --------------------------------- | ----------------------- | -------- | -------- | ----------------- | +| snapTo | Snaps the current sheet to index. | (index: number) => void | NO | ALL | YES | -## 遗留问题 +## Known Issues -## 其他 -- keyboardBehavior属性暂不支持,与iOS表现一致。[issue#24](https://github.com/th3rdwave/react-navigation-bottom-sheet/issues/24) -- keyboardBlurBehavior属性暂不支持,与iOS表现一致。[issue#25](https://github.com/th3rdwave/react-navigation-bottom-sheet/issues/25) +## Others +- keyboardBehaviorProperties 暂不支持,与 iOS 表现一致。[issue#24](https://github.com/th3rdwave/react-navigation-bottom-sheet/issues/24) +- keyboardBlurBehaviorProperties 暂不支持,与 iOS 表现一致。[issue#25](https://github.com/th3rdwave/react-navigation-bottom-sheet/issues/25) -## 开源协议 +## License -本项目基于 [The MIT License (MIT )](https://github.com/th3rdwave/react-navigation-bottom-sheet/blob/main/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file +This project is licensed under [The MIT License (MIT )](https://github.com/th3rdwave/react-navigation-bottom-sheet/blob/main/LICENSE). -- Gitee From e2b18c46121506c012528129afdb3a4ef435f358 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:40:23 +0800 Subject: [PATCH 80/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-navigation-header-buttons=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-navigation-header-buttons.md | 157 ++++++++++++-------------- 1 file changed, 74 insertions(+), 83 deletions(-) diff --git a/en/react-navigation-header-buttons.md b/en/react-navigation-header-buttons.md index 489a9a69..5d4c9ac5 100644 --- a/en/react-navigation-header-buttons.md +++ b/en/react-navigation-header-buttons.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-navigation-header-buttons

@@ -13,12 +13,13 @@

-> [!TIP] [Github 地址](https://github.com/vonovak/react-navigation-header-buttons) +> [!TIP] [ GitHub address](https://github.com/vonovak/react-navigation-header-buttons) -## 安装与使用 +## Installation and Usage -进入到工程目录并输入以下命令: + +Go to the project directory and execute the following instruction: #### **npm** @@ -32,8 +33,8 @@ npm i react-navigation-header-buttons@12.0.0 yarn add react-navigation-header-buttons@12.0.0 ``` +在 tsconfig.json 文件中添加如下代码: -在tsconfig.json文件中添加如下代码: ```json "compilerOptions": { ... @@ -46,7 +47,9 @@ yarn add react-navigation-header-buttons@12.0.0 } ``` -在metro.config.js文件中添加如下代码: + +在 metro.config.js 文件中添加如下代码: + ```js const config = { ... @@ -63,13 +66,13 @@ module.exports = mergeConfig( -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. ```js -import * as React from 'react'; -import MaterialIcons from '@expo/vector-icons/MaterialIcons'; +import * as React from "react"; +import MaterialIcons from "@expo/vector-icons/MaterialIcons"; import { HeaderButtons, Item, @@ -80,41 +83,41 @@ import { HiddenItemProps, HeaderButtonProps, HeaderButton, -} from 'react-navigation-header-buttons'; -import { Text } from 'react-native'; +} from "react-navigation-header-buttons"; +import { Text } from "react-native"; const MaterialHeaderButton = (props: HeaderButtonProps) => ( ); -const EditItem = ({ onPress }: Pick) => { +const EditItem = ({ onPress }: Pick) => { return ; }; -const ReusableHiddenItem = ({ onPress }: Pick) => ( +const ReusableHiddenItem = ({ onPress }: Pick) => ( ); export function UsageWithIcons({ navigation }) { React.useLayoutEffect(() => { navigation.setOptions({ - title: 'Demo', + title: "Demo", headerRight: () => ( alert('search')} + onPress={() => alert("search")} /> - alert('Edit')} /> + alert("Edit")} /> ( )} > - alert('hidden1')} /> + alert("hidden1")} /> - alert('hidden2')} /> + alert("hidden2")} /> ), @@ -125,101 +128,89 @@ export function UsageWithIcons({ navigation }) { } ``` -## 约束与限制 +## Constraints -### 兼容性 +### Compatibility -本文档内容基于以下版本验证通过: +This document is verified based on the following versions: 1. RNOH:0.72.26; SDK:HarmonyOS NEXT Developer Beta1 5.0.0.25; IDE:DevEco Studio 5.0.3.300SP2; ROM:3.0.0.24(Canary3); -## 属性 +## Properties ### HeaderButtons -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 - -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 - - - -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- | ------- | -------- | ----------- | -| HeaderButtonComponent | component that renders the buttons, HeaderButton by default |`ComponentType`| no | iOS/Android | yes | -| children | whatever you want to render inside |`ReactNode`| yes | iOS/Android | yes | -| left | whether the HeaderButtons are on the left from header title |boolean| no | iOS/Android | yes | -| preset | headers are typically rendered in Stack Navigator, however, you can also render them in a Tab Navigator header. Pass 'tabHeader' if button margins are missing. |`’tabHeader’/‘stackHeader’`| no | iOS/Android | yes | +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | -------- | ----------- | ----------------- | +| HeaderButtonComponent | component that renders the buttons, HeaderButton by default | `ComponentType` | no | iOS/Android | yes | +| children | whatever you want to render inside | `ReactNode` | yes | iOS/Android | yes | +| left | whether the HeaderButtons are on the left from header title | boolean | no | iOS/Android | yes | +| preset | headers are typically rendered in Stack Navigator, however, you can also render them in a Tab Navigator header. Pass 'tabHeader' if button margins are missing. | `’tabHeader’/‘stackHeader’` | no | iOS/Android | yes | ### Item -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 - -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. - -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- | ------- | -------- | ----------- | -| title | title for the button, required |string| no | iOS/Android | yes | -| onPress | function to call on press |function| no | iOS/Android | yes | -| iconName | icon name, used together with the IconComponent prop |string| no | iOS/Android | yes | -| style | style to apply to the touchable element that wraps the button |` ViewStyle`| no | iOS/Android | yes | -| buttonStyle | style to apply to the text / icon |` ViewStyle`| no | iOS/Android | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ----------- | ------------------------------------------------------------- | ------------ | -------- | ----------- | ----------------- | +| title | title for the button, required | string | no | iOS/Android | yes | +| onPress | function to call on press | function | no | iOS/Android | yes | +| iconName | icon name, used together with the IconComponent prop | string | no | iOS/Android | yes | +| style | style to apply to the touchable element that wraps the button | ` ViewStyle` | no | iOS/Android | yes | +| buttonStyle | style to apply to the text / icon | ` ViewStyle` | no | iOS/Android | yes | ### OverflowMenu -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 - -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. - -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- | ------- | -------- | ----------- | -| OverflowIcon | React element or component for the overflow icon |` ReactElement / ComponentType`| no | iOS/Android | yes | -| style | optional styles for overflow button|`ViewStyle`| no | iOS/Android | yes | -| onPress | function that is called when overflow menu is pressed. |function| no | iOS/Android | yes | -| left | whether the OverflowMenu is on the left from header title |boolean| no | iOS/Android | yes | -| children | the overflow items|`ReactNode`| yes | iOS/Android | yes | -| preset | headers are typically rendered in Stack Navigator, however, you can also render them in a Tab Navigator header. Pass 'tabHeader' if button margins are missing. |` 'tabHeader' / 'stackHeader'`| no | iOS/Android | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | ----------- | ----------------- | +| OverflowIcon | React element or component for the overflow icon | ` ReactElement / ComponentType` | no | iOS/Android | yes | +| style | optional styles for overflow button | `ViewStyle` | no | iOS/Android | yes | +| onPress | function that is called when overflow menu is pressed. | function | no | iOS/Android | yes | +| left | whether the OverflowMenu is on the left from header title | boolean | no | iOS/Android | yes | +| children | the overflow items | `ReactNode` | yes | iOS/Android | yes | +| preset | headers are typically rendered in Stack Navigator, however, you can also render them in a Tab Navigator header. Pass 'tabHeader' if button margins are missing. | ` 'tabHeader' / 'stackHeader'` | no | iOS/Android | yes | ### HiddenItem -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 - -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. - -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- | ------- | -------- | ----------- | -| title |title for the button, required |string| no | iOS/Android | yes | -| style | style to apply to the touchable element that wraps the text|`ViewStyle`| no | iOS/Android | yes | -| titleStyle | style to apply to the text |`TextStyle`| no | iOS/Android | yes | -| onPress |function to call on press |function| no | iOS/Android | yes | -| disabled | disabled 'item' is greyed out and onPress is not called on touch |boolean| no | iOS/Android | yes | - +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ---------- | ---------------------------------------------------------------- | ----------- | -------- | ----------- | ----------------- | +| title | title for the button, required | string | no | iOS/Android | yes | +| style | style to apply to the touchable element that wraps the text | `ViewStyle` | no | iOS/Android | yes | +| titleStyle | style to apply to the text | `TextStyle` | no | iOS/Android | yes | +| onPress | function to call on press | function | no | iOS/Android | yes | +| disabled | disabled 'item' is greyed out and onPress is not called on touch | boolean | no | iOS/Android | yes | ### HeaderButton -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 - -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ------------ | ---------------------------------------------------------------------------------------------- | ----------- | -------- | ----------- | ----------------- | +| title | title for the button, required | string | no | iOS/Android | yes | +| style | style to apply to the touchable element that wraps the text | `ViewStyle` | no | iOS/Android | yes | +| onPress | function to call on press | function | no | iOS/Android | yes | +| renderButton | You can fully customize what it renders inside of the PlatformPressable using the renderButton | ReactNode | no | iOS/Android | yes | -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------- | ------- | -------- | ----------- | -| title |title for the button, required |string| no | iOS/Android | yes | -| style | style to apply to the touchable element that wraps the text|`ViewStyle`| no | iOS/Android | yes | -| onPress |function to call on press |function| no | iOS/Android | yes | -| renderButton |You can fully customize what it renders inside of the PlatformPressable using the renderButton |ReactNode | no | iOS/Android | yes | -## 遗留问题 +## Known Issues -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/vonovak/react-navigation-header-buttons/blob/master/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/vonovak/react-navigation-header-buttons/blob/master/LICENSE). -- Gitee From 4390cfcb00885475b14ae456a7d25b07c4858b85 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:40:43 +0800 Subject: [PATCH 81/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91react-navigation=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-navigation.md | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/en/react-navigation.md b/en/react-navigation.md index 8a30e65e..03990120 100644 --- a/en/react-navigation.md +++ b/en/react-navigation.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

react-navigation

@@ -12,33 +12,30 @@

-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-navigation) - +> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-navigation) ## Packages -| 序号 | 原库名 | 原库基线版本 | HarmonyOSReleases | 文档链接(相对路径) | -|----|-------------------------------------------------------------------------------------------------------------------------------------------|--------|--------------------------------------------------------------------------------------------------------------------|--------------------------------------------------| -| 1 | [@react-navigation/bottom-tabs](https://github.com/react-navigation/react-navigation/tree/6.x/packages/bottom-tabs) | 6.5.20 | - | [链接](/zh-cn/react-navigation-bottom-tabs.md) | -| 2 | [@react-navigation/core](https://github.com/react-navigation/react-navigation/tree/6.x/packages/core) | 6.4.16 | - | [链接](/zh-cn/react-navigation-core.md) | -| 3 | [@react-navigation/devtools](https://github.com/react-navigation/react-navigation/tree/6.x/packages/devtools) | 6.0.26 | - | [链接](/zh-cn/react-navigation-devtools.md) | -| 4 | [@react-navigation/drawer](https://github.com/react-native-oh-library/react-navigation/tree/sig/packages/drawer) | 6.7.1 | [@react-native-oh-tpl/drawer](https://github.com/react-native-oh-library/react-navigation/releases) | [链接](/zh-cn/react-navigation-drawer.md) | -| 5 | [@react-navigation/elements](https://github.com/react-native-oh-library/react-navigation/tree/sig/packages/elements) | 1.3.21 | [@react-native-oh-tpl/elements](https://github.com/react-native-oh-library/react-navigation/releases) | [链接](/zh-cn/react-navigation-elements.md) | -| 6 | [@react-navigation/material-bottom-tabs](https://github.com/react-navigation/react-navigation/tree/6.x/packages/material-bottom-tabs) | 6.2.28 | - | [链接](/zh-cn/react-navigation-material-bottom-tabs.md) | -| 7 | [@react-navigation/material-top-tabs](https://github.com/react-navigation/react-navigation/tree/6.x/packages/material-top-tabs) | 6.6.13 | - | [链接](/zh-cn/react-navigation-material-top-tabs.md) | -| 8 | [@react-navigation/native-stack](https://github.com/react-native-oh-library/react-navigation/tree/sig/packages/native-stack) | 6.9.26 | [@react-native-oh-tpl/native-stack](https://github.com/react-native-oh-library/react-navigation/releases) | [链接](/zh-cn/react-navigation-native-stack.md) | -| 9 | [@react-navigation/native](https://github.com/react-navigation/react-navigation/tree/6.x/packages/native) | 6.1.17 | - | [链接](/zh-cn/react-navigation-native.md) | -| 10 | [@react-navigation/routers](https://github.com/react-navigation/react-navigation/tree/6.x/packages/routers) | 6.1.9 | - | [链接](/zh-cn/react-navigation-routers.md) | -| 11 | [@react-navigation/stack](https://github.com/react-native-oh-library/react-navigation/tree/sig/packages/stack) | 6.4.0 | [@react-native-oh-tpl/stack](https://github.com/react-native-oh-library/react-navigation/releases) | [链接](/zh-cn/react-navigation-stack.md) | -| 12 | [react-native-tab-view](https://github.com/react-native-oh-library/react-navigation/tree/sig/packages/react-native-tab-view) | 3.5.2 | [@react-native-oh-tpl/react-native-tab-view](https://github.com/react-native-oh-library/react-navigation/releases) | [链接](/zh-cn/react-native-tab-view.md) | -| 13 | [flipper-plugin-react-navigation](https://github.com/react-navigation/react-navigation/tree/6.x/packages/flipper-plugin-react-navigation) | 1.3.32 | - | [链接](/zh-cn/flipper-plugin-react-navigation.md) | +| 序号 | 原库名 | 原库基线版本 | HarmonyOSReleases | 文档链接(相对路径) | +| ---- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------- | +| 1 | [@react-navigation/bottom-tabs](https://github.com/react-navigation/react-navigation/tree/6.x/packages/bottom-tabs) | 6.5.20 | - | [链接](/zh-cn/react-navigation-bottom-tabs.md) | +| 2 | [@react-navigation/core](https://github.com/react-navigation/react-navigation/tree/6.x/packages/core) | 6.4.16 | - | [链接](/zh-cn/react-navigation-core.md) | +| 3 | [@react-navigation/devtools](https://github.com/react-navigation/react-navigation/tree/6.x/packages/devtools) | 6.0.26 | - | [链接](/zh-cn/react-navigation-devtools.md) | +| 4 | [@react-navigation/drawer](https://github.com/react-native-oh-library/react-navigation/tree/sig/packages/drawer) | 6.7.1 | [@react-native-oh-tpl/drawer](https://github.com/react-native-oh-library/react-navigation/releases) | [链接](/zh-cn/react-navigation-drawer.md) | +| 5 | [@react-navigation/elements](https://github.com/react-native-oh-library/react-navigation/tree/sig/packages/elements) | 1.3.21 | [@react-native-oh-tpl/elements](https://github.com/react-native-oh-library/react-navigation/releases) | [链接](/zh-cn/react-navigation-elements.md) | +| 6 | [@react-navigation/material-bottom-tabs](https://github.com/react-navigation/react-navigation/tree/6.x/packages/material-bottom-tabs) | 6.2.28 | - | [链接](/zh-cn/react-navigation-material-bottom-tabs.md) | +| 7 | [@react-navigation/material-top-tabs](https://github.com/react-navigation/react-navigation/tree/6.x/packages/material-top-tabs) | 6.6.13 | - | [链接](/zh-cn/react-navigation-material-top-tabs.md) | +| 8 | [@react-navigation/native-stack](https://github.com/react-native-oh-library/react-navigation/tree/sig/packages/native-stack) | 6.9.26 | [@react-native-oh-tpl/native-stack](https://github.com/react-native-oh-library/react-navigation/releases) | [链接](/zh-cn/react-navigation-native-stack.md) | +| 9 | [@react-navigation/native](https://github.com/react-navigation/react-navigation/tree/6.x/packages/native) | 6.1.17 | - | [链接](/zh-cn/react-navigation-native.md) | +| 10 | [@react-navigation/routers](https://github.com/react-navigation/react-navigation/tree/6.x/packages/routers) | 6.1.9 | - | [链接](/zh-cn/react-navigation-routers.md) | +| 11 | [@react-navigation/stack](https://github.com/react-native-oh-library/react-navigation/tree/sig/packages/stack) | 6.4.0 | [@react-native-oh-tpl/stack](https://github.com/react-native-oh-library/react-navigation/releases) | [链接](/zh-cn/react-navigation-stack.md) | +| 12 | [react-native-tab-view](https://github.com/react-native-oh-library/react-navigation/tree/sig/packages/react-native-tab-view) | 3.5.2 | [@react-native-oh-tpl/react-native-tab-view](https://github.com/react-native-oh-library/react-navigation/releases) | [链接](/zh-cn/react-native-tab-view.md) | +| 13 | [flipper-plugin-react-navigation](https://github.com/react-navigation/react-navigation/tree/6.x/packages/flipper-plugin-react-navigation) | 1.3.32 | - | [链接](/zh-cn/flipper-plugin-react-navigation.md) | ## 依赖关系 ![image](/img/react-navigation-dependency.png) +## License - -## 开源协议 - -本项目基于 [The MIT License (MIT)](https://github.com/react-navigation/react-navigation/blob/6.x/packages/core/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/react-navigation/react-navigation/blob/6.x/packages/core/LICENSE). -- Gitee From 5d7e6c4ed00eb98835505276692eeebef0bec658 Mon Sep 17 00:00:00 2001 From: ljje <1370314186@qq.com> Date: Mon, 14 Oct 2024 10:41:27 +0800 Subject: [PATCH 82/82] =?UTF-8?q?docs:=20[Issues:=20#IAWGSR]=20=E7=BF=BB?= =?UTF-8?q?=E8=AF=91rn-emoji-keyboard=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/rn-emoji-keyboard.md | 88 +++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/en/rn-emoji-keyboard.md b/en/rn-emoji-keyboard.md index 1067d4c4..42c3c94b 100644 --- a/en/rn-emoji-keyboard.md +++ b/en/rn-emoji-keyboard.md @@ -1,4 +1,4 @@ -> 模板版本:v0.2.2 +> Template version: v0.2.2

rn-emoji-keyboard

@@ -12,15 +12,15 @@

-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/rn-emoji-keyboard) +> [!TIP] [GitHub address](https://github.com/react-native-oh-library/rn-emoji-keyboard) -## 安装与使用 +## Installation and Usage -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/rn-emoji-keyboard Releases](https://github.com/react-native-oh-library/rn-emoji-keyboard/releases),并下载适用版本的 tgz 包。 +Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/rn-emoji-keyboard Releases](https://github.com/react-native-oh-library/rn-emoji-keyboard/releases). -进入到工程目录并输入以下命令: +Go to the project directory and execute the following instruction: -> [!TIP] # 处替换为 tgz 包的路径 +> [!TIP] Replace the content with the path of the .tgz package at the comment sign (#). @@ -38,11 +38,12 @@ yarn add @react-native-oh-tpl/rn-emoji-keyboard@file:# -下面的代码展示了这个库的基本使用场景: +The following code shows the basic use scenario of the repository: -> [!WARNING] 使用时 import 的库名不变。 +> [!WARNING] The name of the imported repository remains unchanged. + +> [!TIP] 本示例依赖@react-native-async-storage/async-storage 库,参照[@react-native-async-storage/async-storage 文档](/zh-cn/react-native-async-storage-async-storage.md)进行引入 -> [!TIP] 本示例依赖@react-native-async-storage/async-storage库,参照[@react-native-async-storage/async-storage文档](/zh-cn/react-native-async-storage-async-storage.md)进行引入 ```ts import React from "react"; import { StyleSheet, Button, Text } from "react-native"; @@ -139,20 +140,21 @@ const styles = StyleSheet.create({ }); ``` -## 约束与限制 +## Constraints + +### Compatibility -### 兼容性 +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 +Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/rn-emoji-keyboard Releases](https://github.com/react-native-oh-library/rn-emoji-keyboard/releases) -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/rn-emoji-keyboard Releases](https://github.com/react-native-oh-library/rn-emoji-keyboard/releases) +## Properties -## 属性 -详细请查看 [rn-emoji-keyboard 的文档介绍](https://github.com/TheWidlarzGroup/rn-emoji-keyboard) +For details, see [rn-emoji-keyboard docs](https://github.com/TheWidlarzGroup/rn-emoji-keyboard) -> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 +> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 +> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. | Name | Description | Type | Required | Platform | HarmonyOS Support | | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ | -------- | ----------- | ----------------- | @@ -215,39 +217,39 @@ const styles = StyleSheet.create({ ### Full list of EmojisByCategory type -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ----- | ----------- | ------------- | -------- | ----------- | ----------------- | -| title | EmojisByCategory title | CategoryTypes | yes | iOS/Android | yes | -| data | EmojisByCategory emoji data | JsonEmoji[] | yes | iOS/Android | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ----- | --------------------------- | ------------- | -------- | ----------- | ----------------- | +| title | EmojisByCategory title | CategoryTypes | yes | iOS/Android | yes | +| data | EmojisByCategory emoji data | JsonEmoji[] | yes | iOS/Android | yes | ### Full list of CategoryTypes type -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ----- | ----------- | ------------- | -------- | ----------- | ----------------- | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| --------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------- | ----------------- | | `CategoryTypes` | CategoryTypes type | "search" \| "smileys_emotion" \| "people_body" \| "animals_nature" \| "food_drink" \| "travel_places" \| "activities" \| "objects" \| "symbols" \| "flags" \| "recently_used" | no | iOS/Android | yes | ### Full list of JsonEmoji type -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ----------- | ----------- | -------- | -------- | ----------- | ----------------- | -| emoji | JsonEmoji emoji | string | yes | iOS/Android | yes | -| name | JsonEmoji name | string | yes | iOS/Android | yes | -| v | JsonEmoji version | string | yes | iOS/Android | yes | -| toneEnabled | JsonEmoji toneEnabled | boolean | yes | iOS/Android | yes | -| keywords | JsonEmoji keywords | string[] | no | iOS/Android | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ----------- | --------------------- | -------- | -------- | ----------- | ----------------- | +| emoji | JsonEmoji emoji | string | yes | iOS/Android | yes | +| name | JsonEmoji name | string | yes | iOS/Android | yes | +| v | JsonEmoji version | string | yes | iOS/Android | yes | +| toneEnabled | JsonEmoji toneEnabled | boolean | yes | iOS/Android | yes | +| keywords | JsonEmoji keywords | string[] | no | iOS/Android | yes | ### Full list of EmojiType type -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ----------- | ----------- | -------- | -------- | ----------- | ----------------- | -| emoji | EmojiType emoji | string | yes | iOS/Android | yes | -| name | EmojiType name | string | yes | iOS/Android | yes | -| slug | EmojiType slug | string | yes | iOS/Android | yes | -| unicode_version | EmojiType version | string | yes | iOS/Android | yes | -| toneEnabled | EmojiType toneEnabled | boolean | yes | iOS/Android | yes | -| alreadySelected | EmojiType alreadySelected | boolean | no | iOS/Android | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| --------------- | ------------------------- | ------- | -------- | ----------- | ----------------- | +| emoji | EmojiType emoji | string | yes | iOS/Android | yes | +| name | EmojiType name | string | yes | iOS/Android | yes | +| slug | EmojiType slug | string | yes | iOS/Android | yes | +| unicode_version | EmojiType version | string | yes | iOS/Android | yes | +| toneEnabled | EmojiType toneEnabled | boolean | yes | iOS/Android | yes | +| alreadySelected | EmojiType alreadySelected | boolean | no | iOS/Android | yes | -## 静态方法 +## Properties ### useRecentPicksPersistence @@ -266,13 +268,13 @@ Async storage? - sure. Backend as store - no problem. Choose how you want to han | `initialization` | This property is used at the very beginning to restore previous state. | Function | yes | iOS/Android | yes | | `onStateChange` | This property is used every time when user selects emoji and keyboard has enabled enableRecentlyUsed props | Function | yes | iOS/Android | yes | -## 遗留问题 +## Known Issues - [x] rn-emoji-keyboard 的键盘弹出后回弹默认高度表情键盘无法点击: [issue#1](https://github.com/react-native-oh-library/rn-emoji-keyboard/issues/1) - [ ] rn-emoji-keyboard 展开旋钮动画卡顿: [issue#2](https://github.com/react-native-oh-library/rn-emoji-keyboard/issues/2) -## 其他 +## Others -## 开源协议 +## License -本项目基于 [The MIT License (MIT)](https://github.com/TheWidlarzGroup/rn-emoji-keyboard/blob/master/LICENSE) ,请自由地享受和参与开源。 +This project is licensed under [The MIT License (MIT)](https://github.com/TheWidlarzGroup/rn-emoji-keyboard/blob/master/LICENSE). -- Gitee