@fto-consult/expo-ui 6.30.0 → 6.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.config.json +1 -1
- package/package.json +1 -1
- package/src/components/Datagrid/Accordion/Row.js +0 -1
- package/src/components/Datagrid/Accordion/index.js +7 -3
- package/src/components/Datagrid/Table/index.js +6 -2
- package/src/components/Datagrid/utils.js +4 -6
- package/src/components/Table/Header/Cell/index.native.js +4 -4
- package/src/components/Table/Header/CellWrapper.js +4 -4
- package/src/components/Table/Header/index.js +2 -2
- package/src/components/Table/Row/Cell/Content.native.js +1 -2
- package/src/components/Table/Row/Cell/index.js +6 -4
- package/src/components/Table/styles.js +1 -1
- package/src/screens/Help/openLibraries.js +1 -1
package/app.config.json
CHANGED
package/package.json
CHANGED
|
@@ -517,7 +517,9 @@ const DatagridFactory = (Factory)=>{
|
|
|
517
517
|
</View>
|
|
518
518
|
return <DatagridProvider context={this}>
|
|
519
519
|
<View testID={testID+"_Container"} pointerEvents={pointerEvents} style={[styles.container,this.props.style]} collapsable={false}>
|
|
520
|
-
<View testID={testID+"_AccordionHeader"} style={[styles.accordionHeader]} ref={
|
|
520
|
+
<View testID={testID+"_AccordionHeader"} style={[styles.accordionHeader]} ref={(el)=>{
|
|
521
|
+
this.layoutRef.current = el;
|
|
522
|
+
}} onLayout={this.updateLayout.bind(this)}>
|
|
521
523
|
{this.props.showActions !== false ? <DatagridActions
|
|
522
524
|
testID={testID+"_Actions"}
|
|
523
525
|
pointerEvents = {pointerEvents}
|
|
@@ -564,7 +566,9 @@ const DatagridFactory = (Factory)=>{
|
|
|
564
566
|
renderItem = {this.renderItem.bind(this)}
|
|
565
567
|
items = {this.state.data}
|
|
566
568
|
isLoading = {isLoading}
|
|
567
|
-
ref = {
|
|
569
|
+
ref = {(el)=>{
|
|
570
|
+
this.listRef.current = el;
|
|
571
|
+
}}
|
|
568
572
|
style = {[styles.list,rest.style]}
|
|
569
573
|
backToTopRef = {backToTopRef?(e)=>{
|
|
570
574
|
return this.backToTopRef.current;
|
|
@@ -620,7 +624,7 @@ const styles = StyleSheet.create({
|
|
|
620
624
|
maxHeight : 60
|
|
621
625
|
},
|
|
622
626
|
list : {
|
|
623
|
-
paddingHorizontal : 10,
|
|
627
|
+
paddingHorizontal : isNativeMobile()? 10:0,
|
|
624
628
|
},
|
|
625
629
|
container : {
|
|
626
630
|
position : 'relative',
|
|
@@ -287,7 +287,9 @@ const DatagridFactory = (Factory)=>{
|
|
|
287
287
|
</View> : null;
|
|
288
288
|
return <DatagridProvider context={this}>
|
|
289
289
|
<View style={[styles.container,{flex:1}]} testID={testID+"_TableContainer"} pointerEvents={pointerEvents}>
|
|
290
|
-
<View ref={
|
|
290
|
+
<View ref={(el)=>{
|
|
291
|
+
this.layoutRef.current = el;
|
|
292
|
+
}} testID={testID+"_LayoutContainer"}>
|
|
291
293
|
{this.props.showActions !== false ? <DatagridActions
|
|
292
294
|
pointerEvents = {pointerEvents}
|
|
293
295
|
title = {this.renderDataSourceSelector()}
|
|
@@ -301,7 +303,9 @@ const DatagridFactory = (Factory)=>{
|
|
|
301
303
|
{this.renderChart()}
|
|
302
304
|
</View> :
|
|
303
305
|
<Table
|
|
304
|
-
ref = {
|
|
306
|
+
ref = {(el)=>{
|
|
307
|
+
this.listRef.current = el;
|
|
308
|
+
}}
|
|
305
309
|
{...rest}
|
|
306
310
|
withDatagridContext
|
|
307
311
|
sortedColumn = {sortedColumn}
|
|
@@ -27,8 +27,6 @@ export const IMPUTED_COLOR = "#943542";
|
|
|
27
27
|
|
|
28
28
|
export const IMPUTED_TEXT_COLOR = "white";
|
|
29
29
|
|
|
30
|
-
export const ROW_BORDER_COLOR = "#ced4da";
|
|
31
|
-
|
|
32
30
|
export const ROW_BORDER_WIDTH = 1;
|
|
33
31
|
|
|
34
32
|
export const SELECTABLE_COLUMN_WIDTH = 30;
|
|
@@ -108,13 +106,13 @@ export const SELECTED_BORDER_COLOR = "rgb(251, 207, 232)";
|
|
|
108
106
|
export const ROW_BORDER_STYLE = {
|
|
109
107
|
marginHorizontal : 0,
|
|
110
108
|
marginVertical : 0,
|
|
111
|
-
borderLeftColor
|
|
109
|
+
get borderLeftColor(){return theme.colors.divider;},
|
|
112
110
|
borderLeftWidth : 0,
|
|
113
|
-
borderBottomColor
|
|
111
|
+
get borderBottomColor(){return theme.colors.divider;},
|
|
114
112
|
borderBottomWidth : ROW_BORDER_WIDTH,
|
|
115
|
-
borderRightColor
|
|
113
|
+
get borderRightColor(){return theme.colors.divider;},
|
|
116
114
|
borderRightWidth : 0,
|
|
117
|
-
borderTopColor
|
|
115
|
+
get borderTopColor(){return theme.colors.divider;},
|
|
118
116
|
borderTopWidth : 0,
|
|
119
117
|
borderStyle : "solid",
|
|
120
118
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import View from "$ecomponents/View";
|
|
2
2
|
import React from "$react";
|
|
3
3
|
import styles from "../../styles";
|
|
4
|
-
const
|
|
5
|
-
return <View ref={ref} {...props} style={[style,width && {width}]}/>
|
|
4
|
+
const TableHeaderCellComponentNative = React.forwardRef(({width,style,...props},ref)=>{
|
|
5
|
+
return <View ref={ref} {...props} style={[styles.cell,style,width && {width}]}/>
|
|
6
6
|
});
|
|
7
|
-
|
|
8
|
-
export default
|
|
7
|
+
TableHeaderCellComponentNative.displayName = "TableTableHeaderCellComponentNative";
|
|
8
|
+
export default TableHeaderCellComponentNative;
|
|
@@ -2,17 +2,17 @@ import React from "$react";
|
|
|
2
2
|
import {useTable,useGetColumnProps} from "../hooks";
|
|
3
3
|
import {defaultObj,defaultVal} from "$cutils";
|
|
4
4
|
import styles from "../styles";
|
|
5
|
-
import
|
|
5
|
+
import RowCell from "./Cell";
|
|
6
6
|
import Label from "$ecomponents/Label";
|
|
7
7
|
import theme from "$theme";
|
|
8
8
|
|
|
9
9
|
export default function HeaderCellWrapper({columnField,isFilter,isFooter}){
|
|
10
10
|
const {render,sortedColumn,filtersValues,...props} = useGetColumnProps({columnField,isFilter,isFooter});
|
|
11
11
|
const columnDef = props.columnDef;
|
|
12
|
-
const rProps = isFilter ? sortedColumn : undefined;
|
|
13
12
|
const isHeader = !isFilter && !isFooter;
|
|
13
|
+
const rProps = isHeader ? sortedColumn : undefined;
|
|
14
14
|
const width = props.width;
|
|
15
|
-
const {containerProps
|
|
15
|
+
const {containerProps} = props;
|
|
16
16
|
return React.useMemo(()=>{
|
|
17
17
|
let content = typeof render ==='function' ? render(props) : isHeader ? defaultVal(columnDef?.text,columnDef?.label,columnField):null;
|
|
18
18
|
const wStyle = width && {width} || null;
|
|
@@ -21,6 +21,6 @@ export default function HeaderCellWrapper({columnField,isFilter,isFooter}){
|
|
|
21
21
|
} else if(isFooter){
|
|
22
22
|
content = <Label primary textBold children={content}/>
|
|
23
23
|
}
|
|
24
|
-
return <
|
|
24
|
+
return <RowCell {...containerProps} width={width} columnDef={columnDef} columnField={columnField} style={[styles.headerItem,styles.headerItemOrCell,styles.filterCell,containerProps.style,styles.cell,columnDef.style]} children={content}/>
|
|
25
25
|
},[columnField,width,rProps]);
|
|
26
26
|
}
|
|
@@ -15,14 +15,14 @@ import styles from "../styles";
|
|
|
15
15
|
import CellWrapper from "./CellWrapper";
|
|
16
16
|
|
|
17
17
|
export default function RowHeaderComponent({isFilter,isFooter,isHeader,className,children:cChildren,...rest}){
|
|
18
|
-
const {showHeaders,visibleColsNames,filterable,visibleColsNamesStr,headerContainerProps,footerContainerProps,filtersContainerProps,showFilters,filters,showFooters} = useTable();
|
|
18
|
+
const {showHeaders,visibleColsNames,colsWidths,filterable,visibleColsNamesStr,headerContainerProps,footerContainerProps,filtersContainerProps,showFilters,filters,showFooters} = useTable();
|
|
19
19
|
const canV = showHeaders === false ? false : Array.isArray(children)? !!children.length : true;
|
|
20
20
|
const visible = canV && (isHeader ? true : isFilter ? !!showFilters && filterable !== false : isFooter ? !!showFooters: true);
|
|
21
21
|
const containerProps = defaultObj( isHeader ? headerContainerProps : isFooter ? footerContainerProps : filtersContainerProps);
|
|
22
22
|
const style = filters ? styles.filters : isFooter ? styles.footer : null;
|
|
23
23
|
const children = React.useMemo(()=>{
|
|
24
24
|
return visibleColsNames.map((columnField,index)=>{
|
|
25
|
-
return <CellWrapper isFilter={isFilter} isFooter={isFooter} key={columnField} columnField={columnField} columIndex={index}/>
|
|
25
|
+
return <CellWrapper width={colsWidths[columnField]} isFilter={isFilter} isFooter={isFooter} key={columnField} columnField={columnField} columIndex={index}/>
|
|
26
26
|
});
|
|
27
27
|
},[visibleColsNamesStr]);
|
|
28
28
|
if(!visible) return null;
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
// license that can be found in the LICENSE file.
|
|
4
4
|
import React from "react";
|
|
5
5
|
import View from "$ecomponents/View";
|
|
6
|
-
|
|
7
|
-
function TableCellContentComponent({children,width,columnField,style,colSpan,...rest}){
|
|
6
|
+
function TableCellContentComponent({children,columnField,style,colSpan,width,...rest}){
|
|
8
7
|
return (<View testID={"RN_TableRowCellContentComponent"} {...rest} style={[style,width && {width}]}>
|
|
9
8
|
{children}
|
|
10
9
|
</View>);
|
|
@@ -4,23 +4,25 @@ import { useTable } from "../../hooks";
|
|
|
4
4
|
import {defaultObj} from "$cutils";
|
|
5
5
|
import Label from "$ecomponents/Label";
|
|
6
6
|
import styles from "../../styles";
|
|
7
|
+
|
|
7
8
|
const TableRowCellComponent = React.forwardRef(({children,columnDef,className,columnField,rowData,colSpan,isSectionListHeader,rowIndex,style,...rest},ref)=>{
|
|
8
9
|
if(isSectionListHeader){
|
|
9
10
|
return <CellContent colSpan={colSpan} className={className} ref={ref} style={[styles.sectionListHeader,styles.cell,style]} >
|
|
10
11
|
{children}
|
|
11
12
|
</CellContent>
|
|
12
13
|
}
|
|
13
|
-
const {renderCell} = useTable();
|
|
14
|
+
const {renderCell,colsWidths} = useTable();
|
|
15
|
+
const width = colsWidths && columnField ? colsWidths[columnField] : undefined;
|
|
14
16
|
const {content,containerProps} = React.useMemo(()=>{
|
|
15
|
-
const rArgs = {...rest,columnDef,columnField,rowData,rowIndex,containerProps : {}};
|
|
17
|
+
const rArgs = {...rest,columnDef,columnField,rowData,width,rowIndex,containerProps : {}};
|
|
16
18
|
const r = typeof renderCell =='function' && renderCell (rArgs) || children;
|
|
17
19
|
return {
|
|
18
20
|
content : r && React.isValidElement(r,true)? r : children,
|
|
19
21
|
containerProps : defaultObj(rArgs.containerProps)
|
|
20
22
|
}
|
|
21
23
|
},[children]);
|
|
22
|
-
return (<CellContent ref={ref} {...containerProps} columnField={columnField} style={[styles.cell,style,containerProps.style]} >
|
|
23
|
-
|
|
24
|
+
return (<CellContent ref={ref} {...containerProps} width={width} columnField={columnField} style={[styles.cell,style,containerProps.style]} >
|
|
25
|
+
<Label>{content}</Label>
|
|
24
26
|
</CellContent>);
|
|
25
27
|
});
|
|
26
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = {"@fto-consult/expo-ui":{"name":"@fto-consult/expo-ui","version":"6.
|
|
1
|
+
module.exports = {"@fto-consult/expo-ui":{"name":"@fto-consult/expo-ui","version":"6.30.1","repository":{"type":"git","url":"git+https://github.com/borispipo/expo-ui.git"},"homepage":"https://github.com/borispipo/expo-ui#readme"},"@emotion/native":{"version":"11.11.0","url":"https://emotion.sh","license":"MIT"},"@emotion/react":{"version":"11.11.1","url":"https://github.com/emotion-js/emotion/tree/main/packages/react","license":"MIT"},"@expo/html-elements":{"version":"0.5.1","url":"https://github.com/expo/expo/tree/main/packages/html-elements","license":"MIT"},"@expo/metro-config":{"version":"0.10.7","url":"https://github.com/expo/expo.git","license":"MIT"},"@expo/vector-icons":{"version":"13.0.0","url":"https://expo.github.io/vector-icons","license":"MIT"},"@expo/webpack-config":{"version":"19.0.0","url":"https://github.com/expo/expo-cli.git","license":"MIT"},"@faker-js/faker":{"version":"8.0.2","url":"https://github.com/faker-js/faker.git","license":"MIT"},"@fto-consult/common":{"version":"3.29.8","url":"https://github.com/borispipo/common#readme","license":"ISC"},"@pchmn/expo-material3-theme":{"version":"1.3.1","url":"https://github.com/pchmn/expo-material3-theme#readme","license":"MIT"},"@react-native-async-storage/async-storage":{"version":"1.18.2","url":"https://github.com/react-native-async-storage/async-storage#readme","license":"MIT"},"@react-native-community/datetimepicker":{"version":"7.2.0","url":"https://github.com/react-native-community/datetimepicker#readme","license":"MIT"},"@react-native-community/netinfo":{"version":"9.3.10","url":"https://github.com/react-native-netinfo/react-native-netinfo#readme","license":"MIT"},"@react-native/assets-registry":{"version":"0.72.0","url":"git@github.com:facebook/react-native.git","license":"MIT"},"@react-navigation/native":{"version":"6.1.7","url":"https://reactnavigation.org","license":"MIT"},"@react-navigation/native-stack":{"version":"6.9.13","url":"https://github.com/software-mansion/react-native-screens#readme","license":"MIT"},"@shopify/flash-list":{"version":"1.4.3","url":"https://shopify.github.io/flash-list/","license":"MIT"},"apexcharts":{"version":"3.42.0","url":"https://apexcharts.com","license":"MIT"},"babel-plugin-inline-dotenv":{"version":"1.7.0","url":"https://github.com/brysgo/babel-plugin-inline-dotenv#readme","license":"ISC"},"babel-plugin-module-resolver":{"version":"5.0.0","url":"https://github.com/tleunen/babel-plugin-module-resolver.git","license":"MIT"},"expo":{"version":"49.0.8","url":"https://github.com/expo/expo/tree/main/packages/expo","license":"MIT"},"expo-camera":{"version":"13.4.2","url":"https://docs.expo.dev/versions/latest/sdk/camera/","license":"MIT"},"expo-clipboard":{"version":"4.3.1","url":"https://docs.expo.dev/versions/latest/sdk/clipboard","license":"MIT"},"expo-font":{"version":"11.4.0","url":"https://docs.expo.dev/versions/latest/sdk/font/","license":"MIT"},"expo-image-picker":{"version":"14.3.2","url":"https://docs.expo.dev/versions/latest/sdk/imagepicker/","license":"MIT"},"expo-linking":{"version":"5.0.2","url":"https://docs.expo.dev/versions/latest/sdk/linking","license":"MIT"},"expo-sqlite":{"version":"11.3.2","url":"https://docs.expo.dev/versions/latest/sdk/sqlite/","license":"MIT"},"expo-status-bar":{"version":"1.6.0","url":"https://docs.expo.dev/versions/latest/sdk/status-bar/","license":"MIT"},"expo-system-ui":{"version":"2.4.0","url":"https://docs.expo.dev/versions/latest/sdk/system-ui","license":"MIT"},"expo-web-browser":{"version":"12.3.2","url":"https://docs.expo.dev/versions/latest/sdk/webbrowser/","license":"MIT"},"file-saver":{"version":"2.0.5","url":"https://github.com/eligrey/FileSaver.js#readme","license":"MIT"},"fs-extra":{"version":"11.1.1","url":"https://github.com/jprichardson/node-fs-extra","license":"MIT"},"google-libphonenumber":{"version":"3.2.33","url":"https://ruimarinho.github.io/google-libphonenumber/","license":"(MIT AND Apache-2.0)"},"htmlparser2-without-node-native":{"version":"3.9.2","url":"git://github.com/fb55/htmlparser2.git","license":"MIT"},"pdfmake":{"version":"0.2.7","url":"http://pdfmake.org","license":"MIT"},"process":{"version":"0.11.10","url":"git://github.com/shtylman/node-process.git","license":"MIT"},"prop-types":{"version":"15.8.1","url":"https://facebook.github.io/react/","license":"MIT"},"react":{"version":"18.2.0","url":"https://reactjs.org/","license":"MIT"},"react-content-loader":{"version":"6.2.1","url":"https://github.com/danilowoz/react-content-loader","license":"MIT"},"react-dom":{"version":"18.2.0","url":"https://reactjs.org/","license":"MIT"},"react-native":{"version":"0.72.4","license":"MIT"},"react-native-big-list":{"version":"1.6.1","url":"https://marcocesarato.github.io/react-native-big-list-docs/","license":"GPL-3.0-or-later"},"react-native-blob-util":{"version":"0.18.6","url":"https://github.com/RonRadtke/react-native-blob-util","license":"MIT"},"react-native-gesture-handler":{"version":"2.12.1","url":"https://github.com/software-mansion/react-native-gesture-handler#readme","license":"MIT"},"react-native-iphone-x-helper":{"version":"1.3.1","url":"https://github.com/ptelad/react-native-iphone-x-helper#readme","license":"MIT"},"react-native-mime-types":{"version":"2.4.0","license":"MIT"},"react-native-paper":{"version":"5.10.3","url":"https://callstack.github.io/react-native-paper","license":"MIT"},"react-native-paper-dates":{"version":"0.18.17","url":"https://github.com/web-ridge/react-native-paper-dates#readme","license":"MIT"},"react-native-reanimated":{"version":"3.3.0","url":"https://github.com/software-mansion/react-native-reanimated#readme","license":"MIT"},"react-native-safe-area-context":{"version":"4.6.3","url":"https://github.com/th3rdwave/react-native-safe-area-context#readme","license":"MIT"},"react-native-screens":{"version":"3.22.1","url":"https://github.com/software-mansion/react-native-screens#readme","license":"MIT"},"react-native-svg":{"version":"13.9.0","url":"https://github.com/react-native-community/react-native-svg","license":"MIT"},"react-native-web":{"version":"0.19.7","url":"git://github.com/necolas/react-native-web.git","license":"MIT"},"react-native-webview":{"version":"13.2.2","url":"https://github.com/react-native-webview/react-native-webview#readme","license":"MIT"},"react-virtuoso":{"version":"4.5.0","url":"https://virtuoso.dev/","license":"MIT"},"sharp-cli":{"version":"4.1.1","url":"https://github.com/vseventer/sharp-cli","license":"MIT"},"tippy.js":{"version":"6.3.7","url":"https://atomiks.github.io/tippyjs/","license":"MIT"},"uninstall":{"version":"0.0.0","license":"MIT"},"websql":{"version":"2.0.3","url":"git://github.com/nolanlawson/node-websql.git","license":"Apache-2.0"},"xlsx":{"version":"0.18.5","url":"https://sheetjs.com/","license":"Apache-2.0"}};
|