@fto-consult/expo-ui 6.52.5 → 6.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/components/Chart/appexChart/appexChart.html +4 -4
- package/src/components/Datagrid/Accordion/Filters.js +3 -7
- package/src/components/Datagrid/Accordion/index.js +0 -5
- package/src/components/Datagrid/Common/Common.js +46 -27
- package/src/components/Datagrid/SWRDatagrid.js +0 -1
- package/src/components/Datagrid/Table/Filter.js +32 -20
- package/src/components/Datagrid/Table/Filters.js +19 -24
- package/src/components/Datagrid/Table/FiltersMenu.js +1 -1
- package/src/components/Datagrid/Table/index.js +5 -3
- package/src/components/Datagrid/Table/styles.js +6 -2
- package/src/components/Datagrid/hooks/index.js +7 -1
- package/src/components/Dropdown/index.js +2 -3
- package/src/components/Filter/index.js +37 -13
- package/src/components/Form/Fields/Field.js +11 -6
- package/src/components/Form/Fields/SelectField.js +0 -1
- package/src/components/Form/Fields/SelectTableData/Component.js +6 -4
- package/src/components/Form/FormData/componentsTypes.js +3 -2
- package/src/components/List/Virtuoso/index.js +7 -4
- package/src/components/Table/Header/Filters.js +37 -0
- package/src/components/Table/Header/index.js +3 -2
- package/src/components/Table/Headers/index.js +24 -0
- package/src/components/Table/VirtuosoTable/index.js +7 -2
- package/src/components/Table/index.js +16 -15
- package/src/context/Provider.js +5 -2
- package/src/screens/Help/openLibraries.js +1 -1
- package/src/components/Datagrid/Table/hooks.js +0 -9
@@ -92,6 +92,7 @@ export const getFilterComponentProps = (_props)=>{
|
|
92
92
|
const sanitizedType = type.replaceAll("_","").toLowerCase().trim();
|
93
93
|
props = defaultObj(props);
|
94
94
|
props.label = defaultStr(label,text);
|
95
|
+
const SelectTableData = React.isComponent(componentTypes['selecttabledata']) ? componentTypes['selecttabledata'] : componentTypes.SelectTableData
|
95
96
|
if(sanitizedType.startsWith("select")){
|
96
97
|
props.inputProps = Object.assign({},props.inputProps);
|
97
98
|
props.inputProps.placeholder = defaultStr(props.inputProps.placeholder,i18n.lang("search.."))
|
@@ -99,7 +100,7 @@ export const getFilterComponentProps = (_props)=>{
|
|
99
100
|
if(sanitizedType ==='selectcountry'){
|
100
101
|
component = componentTypes.SelectCountry;
|
101
102
|
} else if(sanitizedType ==='selecttabledata'){
|
102
|
-
component =
|
103
|
+
component = SelectTableData;
|
103
104
|
} else if(React.isComponent(componentTypes[type])){
|
104
105
|
component = componentTypes[type];
|
105
106
|
} else if(React.isComponent(componentTypes[sanitizedType])){
|
@@ -122,7 +123,7 @@ export const getFilterComponentProps = (_props)=>{
|
|
122
123
|
} else if(type == 'dateformat' || type =='select_dateformat' || type =='select_date_format') {
|
123
124
|
component = componentTypes.SelectDateFormat;
|
124
125
|
} else if(isNonNullString(props.foreignKeyColumn) && isNonNullString(props.foreignKeyTable)) {
|
125
|
-
component =
|
126
|
+
component = SelectTableData;
|
126
127
|
type = "select";
|
127
128
|
} else if(React.isComponent(componentTypes[type]) && componentTypes[type] !== false) {
|
128
129
|
component = componentTypes[type];
|
@@ -33,7 +33,7 @@ const propTypes = {
|
|
33
33
|
isScrolling : PropTypes.func,
|
34
34
|
};
|
35
35
|
/***@see : https://virtuoso.dev/virtuoso-api-reference/ */
|
36
|
-
const VirtuosoListComponent = React.forwardRef(({onRender,id,fixedHeaderContent,numColumns:cNumCol,rowProps,renderTable,listClassName,components,itemProps,windowWidth,responsive,testID,renderItem,onEndReached,onLayout,onContentSizeChange,onScroll,isScrolling,estimatedItemSize,onEndReachedThreshold,containerProps,style,autoSizedStyle,...props},ref)=>{
|
36
|
+
const VirtuosoListComponent = React.forwardRef(({onRender,id,tableHeadId,fixedHeaderContent,numColumns:cNumCol,rowProps,renderTable,listClassName,components,itemProps,windowWidth,responsive,testID,renderItem,onEndReached,onLayout,onContentSizeChange,onScroll,isScrolling,estimatedItemSize,onEndReachedThreshold,containerProps,style,autoSizedStyle,...props},ref)=>{
|
37
37
|
if(renderTable){
|
38
38
|
responsive = false;
|
39
39
|
}
|
@@ -56,7 +56,7 @@ const VirtuosoListComponent = React.forwardRef(({onRender,id,fixedHeaderContent,
|
|
56
56
|
const idRef = React.useRef(defaultStr(id,uniqid("virtuoso-list-id")));
|
57
57
|
id = idRef.current;
|
58
58
|
const containerId = `${id}-container`;
|
59
|
-
const headId =
|
59
|
+
const headId = React.useRef(defaultStr(tableHeadId,`${id}-table-head`)).current;
|
60
60
|
testID = defaultStr(testID,containerProps.testID,"RN_VirtuosoListComponent");
|
61
61
|
const listId = `${id}-list`;
|
62
62
|
const listRef = React.useRef(null);
|
@@ -158,6 +158,7 @@ const VirtuosoListComponent = React.forwardRef(({onRender,id,fixedHeaderContent,
|
|
158
158
|
}
|
159
159
|
return null;
|
160
160
|
}
|
161
|
+
components = defaultObj(components);
|
161
162
|
return <View {...containerProps} {...props} id={containerId} className={classNames("virtuoso-list-container",renderTable&& "virtuoso-list-container-render-table")} style={[{flex:1},containerProps.style,style,autoSizedStyle,{minWidth:'100%',height:'100%',maxWidth:'100%'}]} onLayout={onLayout} testID={testID}>
|
162
163
|
<Component
|
163
164
|
{...r2}
|
@@ -188,11 +189,12 @@ const VirtuosoListComponent = React.forwardRef(({onRender,id,fixedHeaderContent,
|
|
188
189
|
...(renderTable ? {
|
189
190
|
TableRow: TableRowComponent,
|
190
191
|
}:{}),
|
191
|
-
...
|
192
|
+
...components,
|
192
193
|
...(renderTable ? {
|
193
194
|
TableHead : React.forwardRef((props,ref)=>{
|
194
195
|
const restProps = {id:headId,className:classNames(props.className,"virtuoso-list-render-table-thead")};
|
195
|
-
|
196
|
+
const Thead = React.useMemo(()=>React.isComponent(components.TableHead)? components.TableHead : "thead",[]);
|
197
|
+
return <Thead ref={ref} {...props} {...restProps}/>
|
196
198
|
})
|
197
199
|
} : {})
|
198
200
|
}}
|
@@ -202,6 +204,7 @@ const VirtuosoListComponent = React.forwardRef(({onRender,id,fixedHeaderContent,
|
|
202
204
|
|
203
205
|
VirtuosoListComponent.propTypes = {
|
204
206
|
...propTypes,
|
207
|
+
tableHeadId : PropTypes.string,//l'id du header de la table virtuoso
|
205
208
|
fixedHeaderContent : PropTypes.func,//la fonction rendant le contenu fixe du tableau
|
206
209
|
renderTable : PropTypes.bool,//si le composant Table sera rendu
|
207
210
|
numColumns : PropTypes.number,
|
@@ -0,0 +1,37 @@
|
|
1
|
+
// Copyright 2023 @fto-consult/Boris Fouomene. All rights reserved.
|
2
|
+
// Use of this source code is governed by a BSD-style
|
3
|
+
// license that can be found in the LICENSE file.
|
4
|
+
|
5
|
+
import React from "$react";
|
6
|
+
import PropTypes from "prop-types";
|
7
|
+
import { StyleSheet } from "react-native";
|
8
|
+
import {defaultObj} from "$cutils";
|
9
|
+
import { useTable } from "../hooks";
|
10
|
+
import styles from "../styles";
|
11
|
+
import CellWrapper from "./CellWrapper";
|
12
|
+
|
13
|
+
export default function TableFiltersCellComponent({isFilter,isFooter,className,...rest}){
|
14
|
+
const {visibleColsNames,colsWidths,filterable,visibleColsNamesStr,filtersContainerProps,showFilters,filters} = useTable();
|
15
|
+
const visible = !!showFilters && filterable !== false
|
16
|
+
const containerProps = defaultObj(filtersContainerProps);
|
17
|
+
const style = filters ? styles.filters : null;
|
18
|
+
const children = React.useStableMemo(()=>{
|
19
|
+
console.log("rendering filter ",visibleColsNamesStr);
|
20
|
+
return visibleColsNames.map((columnField,index)=>{
|
21
|
+
return <CellWrapper width={colsWidths[columnField]} key={columnField} columnField={columnField} columIndex={index}/>
|
22
|
+
});
|
23
|
+
},[visibleColsNamesStr]);
|
24
|
+
React.useMemo(()=>{
|
25
|
+
console.log("will render me ",visibleColsNames)
|
26
|
+
},[])
|
27
|
+
return null;
|
28
|
+
}
|
29
|
+
|
30
|
+
TableFiltersCellComponent.propTypes = {
|
31
|
+
visible : PropTypes.bool,
|
32
|
+
}
|
33
|
+
|
34
|
+
|
35
|
+
const hStyle = StyleSheet.create({
|
36
|
+
hidden : {height:0,opacity:0,display:'none'}
|
37
|
+
});
|
@@ -13,6 +13,7 @@ const Component = isNative ? View : "tr";
|
|
13
13
|
import { useTable } from "../hooks";
|
14
14
|
import styles from "../styles";
|
15
15
|
import CellWrapper from "./CellWrapper";
|
16
|
+
import Filters from "./Filters";
|
16
17
|
|
17
18
|
export default function RowHeaderComponent({isFilter,isFooter,isHeader,className,children:cChildren,...rest}){
|
18
19
|
const {showHeaders,visibleColsNames,colsWidths,filterable,visibleColsNamesStr,headerContainerProps,footerContainerProps,filtersContainerProps,showFilters,filters,showFooters} = useTable();
|
@@ -25,7 +26,7 @@ export default function RowHeaderComponent({isFilter,isFooter,isHeader,className
|
|
25
26
|
return <CellWrapper width={colsWidths[columnField]} isFilter={isFilter} isFooter={isFooter} key={columnField} columnField={columnField} columIndex={index}/>
|
26
27
|
});
|
27
28
|
},[visibleColsNamesStr]);
|
28
|
-
if(!visible) return null;
|
29
|
+
if(!visible && !isFilter) return null;
|
29
30
|
const rP = isNative ? rest : {className:classNames(className,"table-footer-or-header-row")}
|
30
31
|
return <Component {...rP} {...containerProps} style={StyleSheet.flatten([styles.header,style,rest.style,containerProps.style,!visible && hStyle.hidden])}>
|
31
32
|
{children}
|
@@ -38,5 +39,5 @@ RowHeaderComponent.propTypes = {
|
|
38
39
|
|
39
40
|
|
40
41
|
const hStyle = StyleSheet.create({
|
41
|
-
hidden : {
|
42
|
+
hidden : {opacity:0,display:'none'}
|
42
43
|
});
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import styles from "../styles";
|
2
|
+
import Header from "../Header/index";
|
3
|
+
import theme from "$theme";
|
4
|
+
import {useTable} from "../hooks";
|
5
|
+
import React from "$react";
|
6
|
+
import {classNames} from "$cutils";
|
7
|
+
|
8
|
+
const TableHeadersWrapperComponent = React.forwardRef(({className},ref)=>{
|
9
|
+
const {testID,tableHeadId} = useTable();
|
10
|
+
const content = React.useMemo(()=><>
|
11
|
+
<Header isHeader={true} testID={testID+"_TableHeader"}/>
|
12
|
+
<Header isFilter={true} testID={testID+"_TableFilters"} style={[styles.header,styles.filters,theme.styles.pt0,theme.styles.pb0,theme.styles.ml0,theme.styles.mr0]}/>
|
13
|
+
<Header isFooter testID={testID+"_TableFooter"} style={[styles.header,styles.footers,theme.styles.pt0,theme.styles.pb0,theme.styles.ml0,theme.styles.mr0]}/>
|
14
|
+
</>,[])
|
15
|
+
return <thead ref={ref} id={tableHeadId} className={classNames(className,"virtuoso-list-render-table-thead")}
|
16
|
+
style = {{zIndex:100, position: 'sticky', top: 0 ,width:"100%"}}
|
17
|
+
>
|
18
|
+
{content}
|
19
|
+
</thead>
|
20
|
+
});
|
21
|
+
|
22
|
+
export default TableHeadersWrapperComponent;
|
23
|
+
|
24
|
+
|
@@ -1,5 +1,10 @@
|
|
1
1
|
import { StyleSheet } from "react-native"
|
2
2
|
import {classNames} from "$cutils";
|
3
|
-
|
4
|
-
|
3
|
+
import React from "$react";
|
4
|
+
import Headers from "../Headers";
|
5
|
+
export default function VirtuosoTableComponent({style,className,children,...props}){
|
6
|
+
return <table{...props} className={classNames(className,"virtuoso-table-component")} style={StyleSheet.flatten([{position:"relative",borderCollapse: 'separate',width:"100%" },style])}>
|
7
|
+
{<Headers className={classNames("virtuoso-table-headers")}/>}
|
8
|
+
{children}
|
9
|
+
</table>
|
5
10
|
}
|
@@ -16,6 +16,7 @@ import {getRowStyle} from "$ecomponents/Datagrid/utils";
|
|
16
16
|
import ScrollNative from "./ScrollNative";
|
17
17
|
import VirtuosoTableComponent from "./VirtuosoTable";
|
18
18
|
import EmptyPlaceholder from "./EmptyPlaceholder";
|
19
|
+
import Headers from "./Headers";
|
19
20
|
export {styles};
|
20
21
|
|
21
22
|
const isSCrollingRef = React.createRef();
|
@@ -52,7 +53,7 @@ const getOnScrollCb = (refs,pos,cb2)=>{
|
|
52
53
|
return isMobileNative()? cb : debounce(cb,200);
|
53
54
|
}
|
54
55
|
|
55
|
-
const TableComponent = React.forwardRef(({containerProps,listContainerStyle,onRender,height,progressBar,renderListContent,children,renderEmpty,renderItem,headerScrollViewProps,footerScrollViewProps,scrollViewProps,renderFooterCell,footerCellContainerProps,filterCellContainerProps,headerCellContainerProps,headerProps,rowProps:customRowProps,cellContainerProps,hasFooters,renderHeaderCell,renderFilterCell,columnProps,getRowKey,columnsWidths,colsWidths,columns,...props},tableRef)=>{
|
56
|
+
const TableComponent = React.forwardRef(({containerProps,tableHeadId,fixedHeaderContent,listContainerStyle,onRender,height,progressBar,renderListContent,children,renderEmpty,renderItem,headerScrollViewProps,footerScrollViewProps,scrollViewProps,renderFooterCell,footerCellContainerProps,filterCellContainerProps,headerCellContainerProps,headerProps,rowProps:customRowProps,cellContainerProps,hasFooters,renderHeaderCell,renderFilterCell,columnProps,getRowKey,columnsWidths,colsWidths,columns,...props},tableRef)=>{
|
56
57
|
containerProps = defaultObj(containerProps);
|
57
58
|
cellContainerProps = defaultObj(cellContainerProps);
|
58
59
|
scrollViewProps = defaultObj(scrollViewProps);
|
@@ -142,13 +143,6 @@ const TableComponent = React.forwardRef(({containerProps,listContainerStyle,onRe
|
|
142
143
|
}
|
143
144
|
}
|
144
145
|
};
|
145
|
-
const headerFootersFilters = React.useMemo(()=>{
|
146
|
-
return <>
|
147
|
-
<Header isHeader={true} testID={testID+"_TableHeader"}/>
|
148
|
-
<Header isFilter={true} testID={testID+"_TableFilters"} style={[styles.header,styles.filters,theme.styles.pt0,theme.styles.pb0,theme.styles.ml0,theme.styles.mr0]}/>
|
149
|
-
<Header isFooter testID={testID+"_TableFooter"} style={[styles.header,styles.footers,theme.styles.pt0,theme.styles.pb0,theme.styles.ml0,theme.styles.mr0]}/>
|
150
|
-
</>
|
151
|
-
},[])
|
152
146
|
return <View testID= {testID+"_Container"} {...containerProps} onLayout={(e)=>{
|
153
147
|
layoutRef.current = e.nativeEvent.layout;
|
154
148
|
if(containerProps.onLayout){
|
@@ -167,7 +161,7 @@ const TableComponent = React.forwardRef(({containerProps,listContainerStyle,onRe
|
|
167
161
|
showsHorizontalScrollIndicator
|
168
162
|
>
|
169
163
|
<View testID={testID+"Header2FootersWrapper"} style={[theme.styles.w100]}>
|
170
|
-
{
|
164
|
+
{<Headers/>}
|
171
165
|
</View>
|
172
166
|
</ScrollView>
|
173
167
|
</RNView>}
|
@@ -200,6 +194,7 @@ const TableComponent = React.forwardRef(({containerProps,listContainerStyle,onRe
|
|
200
194
|
renderTable
|
201
195
|
columns = {columns}
|
202
196
|
{...props}
|
197
|
+
tableHeadId = {tableHeadId}
|
203
198
|
onContentSizeChange = {(width,height)=>{
|
204
199
|
if(props.onContentSizeChange){
|
205
200
|
props.onContentSizeChange(width,height);
|
@@ -247,10 +242,9 @@ const TableComponent = React.forwardRef(({containerProps,listContainerStyle,onRe
|
|
247
242
|
renderItem = {({item,index})=>{
|
248
243
|
return <Row rowData={item} index={index} testID={testID+"_Row_"+index}/>
|
249
244
|
}}
|
250
|
-
fixedHeaderContent={
|
251
|
-
return headerFootersFilters;
|
252
|
-
}}
|
245
|
+
fixedHeaderContent={undefined}
|
253
246
|
components = {{
|
247
|
+
TableHead,
|
254
248
|
TableRow: (props) => {
|
255
249
|
const index = props['data-index'];
|
256
250
|
const item = getRowByIndex(index) || props?.item || null;
|
@@ -288,6 +282,12 @@ const ColumnType = PropTypes.shape({
|
|
288
282
|
text : PropTypes.string,
|
289
283
|
});
|
290
284
|
|
285
|
+
const TableHead = React.forwardRef((p,ref)=>{
|
286
|
+
return <thead {...p} ref={ref} className={classNames(p.className,"virtuoso-table-head")}/>
|
287
|
+
});
|
288
|
+
|
289
|
+
TableHead.displayName = "VirtuosoTableHeaderTableComponent";
|
290
|
+
|
291
291
|
|
292
292
|
TableComponent.popTypes = {
|
293
293
|
containerProps : PropTypes.object,
|
@@ -337,10 +337,11 @@ TableComponent.popTypes = {
|
|
337
337
|
|
338
338
|
TableComponent.displayName = "TableComponent";
|
339
339
|
|
340
|
-
const TableComponentProvider = React.forwardRef(({children,id,renderCell,testID,withDatagridContext,getRowKey,filter,data,...props},ref)=>{
|
340
|
+
const TableComponentProvider = React.forwardRef(({children,id,tableHeadId,renderCell,testID,withDatagridContext,getRowKey,filter,data,...props},ref)=>{
|
341
341
|
testID = props.testID = defaultStr(testID,"RN_TableComponent");
|
342
342
|
const idRef = React.useRef(defaultStr(id,uniqid("virtuoso-table-list-id")));
|
343
343
|
id = idRef.current;
|
344
|
+
tableHeadId = defaultStr(tableHeadId,`${id}-table-head`)
|
344
345
|
const prepatedColumns = usePrepareColumns({...props,id});
|
345
346
|
const keyExtractor = typeof getRowKey =='function'? getRowKey : React.getKey;
|
346
347
|
const items = React.useMemo(()=>{
|
@@ -348,11 +349,11 @@ const TableComponentProvider = React.forwardRef(({children,id,renderCell,testID,
|
|
348
349
|
return data.filter((i,...rest)=>isObj(i) && !!filter(i,...rest));
|
349
350
|
},[data]);
|
350
351
|
const getItem = (index)=>items[index]||null;
|
351
|
-
return <TableContext.Provider value={{...props,...prepatedColumns,id,getItem,getRowByIndex:getItem,testID,data,withDatagridContext,keyExtractor,
|
352
|
+
return <TableContext.Provider value={{...props,...prepatedColumns,id,tableHeadId,getItem,getRowByIndex:getItem,testID,data,withDatagridContext,keyExtractor,
|
352
353
|
renderCell,
|
353
354
|
items
|
354
355
|
}}>
|
355
|
-
<TableComponent {...props} id={id} ref={ref}/>
|
356
|
+
<TableComponent {...props} id={id} tableHeadId={tableHeadId} ref={ref}/>
|
356
357
|
</TableContext.Provider>
|
357
358
|
});
|
358
359
|
TableComponentProvider.displayName = "TableComponentProvider";
|
package/src/context/Provider.js
CHANGED
@@ -10,6 +10,7 @@ import Login from "$eauth/Login";
|
|
10
10
|
import {modes} from "$ecomponents/TextField";
|
11
11
|
import {isMobileMedia} from "$cdimensions";
|
12
12
|
import { prepareScreens } from "./TableData";
|
13
|
+
import {extendFormFields} from "$ecomponents/Form/Fields";
|
13
14
|
|
14
15
|
|
15
16
|
/*****
|
@@ -28,6 +29,7 @@ import { prepareScreens } from "./TableData";
|
|
28
29
|
image{ReactComponent} :,
|
29
30
|
text {ReactComponent}
|
30
31
|
},
|
32
|
+
customFormFields{Object}, //les composant personalisés des forms fields
|
31
33
|
loginPropsMutator : ({object})=><{object}>, la fonction permettant de muter les props du composant Login,
|
32
34
|
tableLinkPropsMutator : ({object})=><{object}>, la fonction permettant de muter les props du composant TableLink,
|
33
35
|
TableDataScreen | TableDataScreenItem : {ReactComponent}, le composant TableDataScreenItem, à utiliser pour le rendu des écrans
|
@@ -41,11 +43,12 @@ import { prepareScreens } from "./TableData";
|
|
41
43
|
},
|
42
44
|
realm : {}, //les options de configurations de la base de données realmdb
|
43
45
|
*/
|
44
|
-
const Provider = ({children,getTableData,handleHelpScreen,navigation,swrConfig,components,convertFiltersToSQL,getStructData,tablesData,structsData,...props})=>{
|
46
|
+
const Provider = ({children,getTableData,handleHelpScreen,navigation,swrConfig,components:cComponents,convertFiltersToSQL,getStructData,tablesData,structsData,...props})=>{
|
45
47
|
const {extendAppTheme} = appConfig;
|
46
48
|
const { theme : pTheme } = useMaterial3Theme();
|
47
49
|
navigation = defaultObj(navigation);
|
48
|
-
components = defaultObj(
|
50
|
+
const {customFormFields,...components} = defaultObj(cComponents);
|
51
|
+
extendFormFields(customFormFields);
|
49
52
|
structsData = isObj(structsData)? structsData : null;
|
50
53
|
appConfig.tablesData = tablesData;
|
51
54
|
handleHelpScreen = handleHelpScreen === false ? false : true;
|
@@ -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.53.0","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.49.0","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.8","url":"https://reactnavigation.org","license":"MIT"},"@react-navigation/native-stack":{"version":"6.9.14","url":"https://github.com/software-mansion/react-native-screens#readme","license":"MIT"},"@react-navigation/stack":{"version":"6.3.18","url":"https://reactnavigation.org/docs/stack-navigator/","license":"MIT"},"@shopify/flash-list":{"version":"1.4.3","url":"https://shopify.github.io/flash-list/","license":"MIT"},"apexcharts":{"version":"3.43.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.13","url":"https://github.com/expo/expo/tree/main/packages/expo","license":"MIT"},"expo-camera":{"version":"13.4.4","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.3","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"},"is-plain-obj":{"version":"4.1.0","license":"MIT"},"js-base64":{"version":"3.7.5","license":"BSD-3-Clause"},"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.5","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.6","url":"https://callstack.github.io/react-native-paper","license":"MIT"},"react-native-paper-dates":{"version":"0.19.7","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.9","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.6.0","url":"https://virtuoso.dev/","license":"MIT"},"sharp-cli":{"version":"2.1.0","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"}};
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { useDatagrid as ud } from "../hooks";
|
2
|
-
export const useDatagrid = ()=>{
|
3
|
-
const {context} = ud();
|
4
|
-
const visible = context && typeof context?.canShowFilters =='function' && context.canShowFilters()|| false;
|
5
|
-
const isLoading = context && context.isLoading() || false;
|
6
|
-
const r = typeof context?.getPreparedColumns =='function'? context?.getPreparedColumns() : {};
|
7
|
-
const columns = typeof context?.getColumns =='function' && context.getColumns() || {}
|
8
|
-
return {...r,visible,isLoading,context,columns};
|
9
|
-
}
|