@fto-consult/expo-ui 6.53.0 → 6.53.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.53.0",
3
+ "version": "6.53.2",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "main",
6
6
  "scripts": {
@@ -18,8 +18,7 @@ import { useDatagrid } from "../hooks";
18
18
  const MIN_WIDTH = 250;
19
19
  let windowWidth = Dimensions.get("window").width;
20
20
 
21
- const FiltersAccordionComponent = React.forwardRef(({children,label,testID:cTestID,filterTitle:customFilterTitle,visible:customVisible,orOperator,andOperator,onToggleFilters,...rest},ref)=>{
22
- const {filters,filteredColumns,context} = useDatagrid();
21
+ const FiltersAccordionComponent = React.forwardRef(({children,filters,filteredColumns,context,label,testID:cTestID,filterTitle:customFilterTitle,visible:customVisible,orOperator,andOperator,onToggleFilters,...rest},ref)=>{
23
22
  const testID = defaultStr(testID,"RN_AccordionFilters");
24
23
  const [visibleColumns,setVisibleColumns] = React.useState(filteredColumns);
25
24
  const [visible,setVisible] = React.useState(defaultBool(customVisible,false));
@@ -456,8 +456,13 @@ const DatagridFactory = (Factory)=>{
456
456
  {this.isFilterable() ? <View>
457
457
  <FiltersAccordionComponent
458
458
  testID={testID+"_HeaderFilters"}
459
+ isLoading = {isLoading}
460
+ filters = {headerFilters}
461
+ visibleColumns = {visibleColumnsNames}
459
462
  orOperator = {filterOrOperator}
460
463
  andOperator = {filterAndOperator}
464
+ filteredColumns = {filteredColumns}
465
+ context = {this}
461
466
  />
462
467
  </View> : null}
463
468
  <View pointerEvents={pointerEvents} testID={testID+"_HeaderPagination"} style = {styles.paginationItem}>
@@ -2552,7 +2552,8 @@ export default class CommonDatagridComponent extends AppComponent {
2552
2552
  },100);
2553
2553
  return false;
2554
2554
  },
2555
- title : title,
2555
+ title,
2556
+ label,
2556
2557
  icon : visible?CHECKED_ICON_NAME : null,
2557
2558
  right : false ? (p)=><Icon {...p} icon="material-gear"
2558
2559
  onPress = {(e)=>{console.log(e," is pressed toddd config")}}
@@ -35,29 +35,21 @@ export default function DatagridTableFilterComponent({columnField,visible:cVisib
35
35
  delete filteredProps.value;
36
36
  }
37
37
  label = label || text;
38
- const left = React.isValidElement(label,true) ? (p)=>{
39
- <Label style={[styles.filterLabel]}>
40
- {label}
41
- </Label>
42
- }:undefined;
43
- return <Filter
44
- {...rest}
45
- {...filteredProps}
46
- withLabel={false}
47
- containerProps = {{
48
- style : [styles.filterContainer]
49
- }}
50
- testID={testID+"_DatagridFilterComponent_"+columnField}
51
- anchorProps = {{size:20,style:[theme.styles.noMargin,theme.styles.noPadding]}}
52
- left = {left}
53
- inputProps = {{left}}
54
- />
55
38
  return <View testID={testID+"_DatagridFilterTableContainer"} style={[styles.filter,getMenuStyle(),!visible && styles.hidden]}>
56
39
  <View testID={testID+"_DatagridTableFilterContent"} style={[theme.styles.row,theme.styles.alignItemsCenter,theme.styles.justifyContentStart,!visible && styles.hidden]}>
57
40
  {React.isValidElement(label,true) ? <Label style={[styles.filterLabel]}>
58
41
  {label}
59
42
  </Label>:null}
60
-
43
+ <Filter
44
+ {...rest}
45
+ {...filteredProps}
46
+ withLabel={false}
47
+ containerProps = {{
48
+ style : [styles.filterContainer]
49
+ }}
50
+ testID={testID+"_DatagridFilterComponent_"+columnField}
51
+ anchorProps = {{size:20,style:[theme.styles.noMargin,theme.styles.noPadding]}}
52
+ />
61
53
  </View>
62
54
  </View>;
63
55
  }
@@ -15,7 +15,7 @@ import Footer from "../Footer/Footer";
15
15
  import theme from "$theme";
16
16
  import Table,{styles as tableStyles} from "$ecomponents/Table";
17
17
  import DatagridProvider from "../hooks/Provider";
18
- import Filters from "./Filters";
18
+ import Filters from "../Filters";
19
19
 
20
20
 
21
21
  const DatagridFactory = (Factory)=>{
@@ -298,13 +298,6 @@ const DatagridFactory = (Factory)=>{
298
298
  /> : null}
299
299
  {rPagination}
300
300
  {progressBar}
301
- {/**
302
- <Filters
303
- testID={testID+"_DatagridTableHeaderFilters"}
304
- orOperator = {this.props.filterOrOperator}
305
- andOperator = {this.props.filterAndOperator}
306
- />
307
- */}
308
301
  </View>
309
302
  {canRenderChart ?
310
303
  <View testID={testID+"_ChartContainer"} {...chartContainerProps} style={[theme.styles.w100,chartContainerProps.style]}>