@fto-consult/expo-ui 6.77.1 → 6.77.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": "6.77.
|
3
|
+
"version": "6.77.4",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"main": "main",
|
6
6
|
"scripts": {
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"@expo/html-elements": "^0.5.1",
|
72
72
|
"@expo/vector-icons": "^13.0.0",
|
73
73
|
"@faker-js/faker": "^8.0.2",
|
74
|
-
"@fto-consult/common": "^3.62.
|
74
|
+
"@fto-consult/common": "^3.62.9",
|
75
75
|
"@pchmn/expo-material3-theme": "^1.3.1",
|
76
76
|
"@react-native-async-storage/async-storage": "1.18.2",
|
77
77
|
"@react-native-community/datetimepicker": "7.2.0",
|
@@ -43,7 +43,7 @@ import {convertToSQL} from "$ecomponents/Filter";
|
|
43
43
|
import events from "../events";
|
44
44
|
import {MORE_ICON} from "$ecomponents/Icon"
|
45
45
|
import ActivityIndicator from "$ecomponents/ActivityIndicator";
|
46
|
-
import {createPDF,createTableHeader,fields as pdfFields,pageHeaderMargin} from "$cpdf";
|
46
|
+
import {createPDF,createTableHeader,fields as pdfFields,pageHeaderMargin,sprintf as pdfSprintf} from "$cpdf";
|
47
47
|
import {isWeb,isMobileNative} from "$cplatform";
|
48
48
|
|
49
49
|
export const TIMEOUT = 100;
|
@@ -368,7 +368,12 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
368
368
|
}
|
369
369
|
/*** si une ligne peut être selectionable */
|
370
370
|
canSelectRow(row){
|
371
|
-
|
371
|
+
const s = isObj(row) && row.isSectionListHeader !== true ? true : false;
|
372
|
+
if(!s) return false;
|
373
|
+
if(typeof this.props.isRowSelectable =='function'){
|
374
|
+
return !!this.props.isRowSelectable({row,rowData:row,context:this});
|
375
|
+
}
|
376
|
+
return true;
|
372
377
|
}
|
373
378
|
prepareSectionListColumns(props){
|
374
379
|
props = defaultObj(props,this.props);
|
@@ -1843,21 +1848,18 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
1843
1848
|
const {data,config:cConfig,pdfConfig} = opts;
|
1844
1849
|
const config = extendObj({},pdfConfig,cConfig);
|
1845
1850
|
data[0] = createTableHeader(data[0],config);
|
1846
|
-
const
|
1851
|
+
const pT = defaultStr(config.pdfDocumentTitle).trim();
|
1852
|
+
const pdfDocumentTitle = pT ? pdfSprintf(pT,{fontSize : 20,color : "red"}) : null;
|
1847
1853
|
const content = [{
|
1848
1854
|
table : {
|
1849
1855
|
body : data,
|
1850
1856
|
}
|
1851
1857
|
}];
|
1852
1858
|
if(pdfDocumentTitle){
|
1853
|
-
content.unshift(
|
1854
|
-
text : pdfDocumentTitle,
|
1855
|
-
fontSize : 16,
|
1856
|
-
color : "red",
|
1857
|
-
bold : true,
|
1858
|
-
margin : pageHeaderMargin,
|
1859
|
-
})
|
1859
|
+
content.unshift(pdfDocumentTitle);
|
1860
1860
|
}
|
1861
|
+
config.showPreloader = typeof config.showPreloader ==="function"? config.showPreloader : Preloader.open;
|
1862
|
+
config.hidePreloader = typeof config.hidePreloader =="function"? config.hidePreloader : Preloader.close;
|
1861
1863
|
const pdf = createPDF({
|
1862
1864
|
content,
|
1863
1865
|
},config);
|
@@ -3934,6 +3936,7 @@ const chartDisplayType = PropTypes.oneOf(Object.keys(displayTypes).filter(type=>
|
|
3934
3936
|
return typeof x =='object' && x && typeof x.disabled !== true && x.isChart === true && true || false;
|
3935
3937
|
}));
|
3936
3938
|
CommonDatagridComponent.propTypes = {
|
3939
|
+
isRowSelectable : PropTypes.func,//spécifie si la ligne rowData est selectionable : function({row,rowData,context})=><boolean>
|
3937
3940
|
title : PropTypes.oneOfType([
|
3938
3941
|
PropTypes.func,
|
3939
3942
|
PropTypes.string,
|