@fto-consult/expo-ui 2.36.2 → 2.36.4

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": "2.36.2",
3
+ "version": "2.36.4",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -43,7 +43,7 @@ import notify from "$cnotify";
43
43
  import FileSystem from "$file-system";
44
44
  import sprintf from "$cutils/sprintf";
45
45
 
46
- export const TIMEOUT = 200;
46
+ export const TIMEOUT = 100;
47
47
 
48
48
  export const donutChart = {
49
49
  isChart : true,
@@ -1272,15 +1272,15 @@ export default class CommonDatagridComponent extends AppComponent {
1272
1272
  if(!isObj(this.state.sectionListColumns) || !Array.isArray(this.preparedColumns?.sectionListColumnsMenuItems))return;
1273
1273
  const menuItems = this.preparedColumns?.sectionListColumnsMenuItems;
1274
1274
  if(!menuItems.length) return;
1275
- const sectionListColumns = {...this.state.sectionListColumns};
1276
- if(enable !== true && isObj(sectionListColumns[columnName])){
1277
- delete sectionListColumns[columnName];
1278
- } else {
1279
- sectionListColumns[columnName] = {field:columnName};
1280
- }
1281
1275
  setTimeout(()=>{
1282
- const {sectionListColumns:pSListColumns} = this.prepareColumns({sectionListColumns});
1283
1276
  this.setIsLoading(true,()=>{
1277
+ const sectionListColumns = {...this.state.sectionListColumns};
1278
+ if(enable !== true && isObj(sectionListColumns[columnName])){
1279
+ delete sectionListColumns[columnName];
1280
+ } else {
1281
+ sectionListColumns[columnName] = {field:columnName};
1282
+ }
1283
+ const {sectionListColumns:pSListColumns} = this.prepareColumns({sectionListColumns});
1284
1284
  this.prepareData({data:this.INITIAL_STATE.data,sectionListColumns:pSListColumns},(state)=>{
1285
1285
  this.setState({...state,sectionListColumns:pSListColumns},()=>{
1286
1286
  this.setIsLoading(false,false);
@@ -158,7 +158,7 @@ const SWRDatagridComponent = React.forwardRef((props,ref)=>{
158
158
  const fPathRef = React.useRef(defaultStr(fetchPathKey,uniqid("fetchPath")));
159
159
  fetchPath = defaultStr(fetchPath,table.queryPath,tableName.toLowerCase()).trim();
160
160
  if(fetchPath){
161
- fetchPath = setQueryParams(fetchPath,fPathRef.current,fPathRef.current)
161
+ fetchPath = setQueryParams(fetchPath,"SWRFetchPathKey",fPathRef.current)
162
162
  }
163
163
  const innerRef = React.useRef(null);
164
164
  const showProgressRef = React.useRef(true);
@@ -23,7 +23,6 @@ export default function DatabaseStatisticContainer ({dashboardProps,onRefreshAll
23
23
  const [count,setCount] = React.useState(0);
24
24
  const datagridRef = React.useRef(null);
25
25
  let {} = props;
26
- title = defaultStr(title)
27
26
  table = defaultObj(table);
28
27
  const dbStatistics = defaultObj(table.databaseStatistics,table.databaseStatisticsProps);
29
28
  const databaseStatisticsFields = defaultObj(table.databaseStatisticsFields);
@@ -106,6 +105,8 @@ export default function DatabaseStatisticContainer ({dashboardProps,onRefreshAll
106
105
  },[columns])();
107
106
  const counUpStyle = {fontSize:20,fontWeight:'bold',color:theme.colors.secondaryOnSurface};
108
107
  title = React.isValidElement(title,true)?<Label splitText numberOfLines={1} color={theme.colors.primaryOnSurface} style={[{fontSize:15}]}>{title}</Label>: null;
108
+ const titleText = title && React.getTextContent(title) || null;
109
+ const titleItem = titleText && {text:titleText,icon,divider:true} || null;
109
110
  return withDashboard ? <Dashboard
110
111
  chartProps = {{
111
112
  stroke: {
@@ -154,7 +155,7 @@ export default function DatabaseStatisticContainer ({dashboardProps,onRefreshAll
154
155
  </View>
155
156
  <Menu
156
157
  testID={testID+"_Menu"}
157
- items = {[...context.renderMenu(),onRefreshAllItem]}
158
+ items = {[titleItem,...context.renderMenu(),onRefreshAllItem]}
158
159
  anchor = {(p)=><Pressable {...p} style={[theme.styles.pl1]} testID={testID+"_MenuAnchor"}>
159
160
  <Label
160
161
  textCenter
@@ -179,6 +180,7 @@ export default function DatabaseStatisticContainer ({dashboardProps,onRefreshAll
179
180
  return <Menu
180
181
  testID={testID+"_Menu"}
181
182
  items = {[
183
+ titleItem,
182
184
  {
183
185
  icon : "refresh",
184
186
  onPress : refresh,