@fto-consult/expo-ui 8.76.0 → 8.76.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": "8.76.
|
3
|
+
"version": "8.76.2",
|
4
4
|
"description": "Bibliothèque de composants UI Expo,react-native",
|
5
5
|
"react-native-paper-doc": "https://github.com/callstack/react-native-paper/tree/main/docs/docs/guides",
|
6
6
|
"scripts": {
|
@@ -9,6 +9,9 @@ import theme from "$theme"
|
|
9
9
|
import {styles as rStyles,getRowStyle} from "../utils";
|
10
10
|
import { useIsRowSelected,useDatagrid} from "../hooks";
|
11
11
|
import {HStack} from "$ecomponents/Stack";
|
12
|
+
import { isMobileNative, isReactNativeWebview} from "$cplatform";
|
13
|
+
|
14
|
+
const isNative = isMobileNative() || isReactNativeWebview();
|
12
15
|
|
13
16
|
const DatagridAccordionRow = React.forwardRef(({selectable,
|
14
17
|
rowKey,
|
@@ -81,10 +84,7 @@ const DatagridAccordionRow = React.forwardRef(({selectable,
|
|
81
84
|
const wrapStyle = React.useMemo(()=>{
|
82
85
|
return getRowStyle({row:item,index,selected,numColumns,isAccordion:true,rowIndex:index});
|
83
86
|
},[selected,numColumns]);
|
84
|
-
const viewWrapperStyle = [selectable !== false && theme.styles.cursorPointer];
|
85
|
-
if(!hasAvatar){
|
86
|
-
viewWrapperStyle.push(styles.hasNotAvatar);
|
87
|
-
}
|
87
|
+
const viewWrapperStyle = [selectable !== false && theme.styles.cursorPointer,hasAvatar ? styles.hasAvatar : styles.hasNotAvatar];
|
88
88
|
if(selected) {
|
89
89
|
const handleAvatarRowToggle = (event)=>{
|
90
90
|
React.stopEventPropagation(event);
|
@@ -238,7 +238,9 @@ const styles = StyleSheet.create({
|
|
238
238
|
},
|
239
239
|
container : {
|
240
240
|
paddingVertical : 0,
|
241
|
-
|
241
|
+
paddingLeft : isNative ? 7 : 2,
|
242
|
+
//paddingHorizontal : 7,
|
243
|
+
paddingRight : 7,
|
242
244
|
marginHorizontal : 0,
|
243
245
|
flexWrap : 'nowrap',
|
244
246
|
justifyContent : 'center',
|
@@ -249,14 +251,17 @@ const styles = StyleSheet.create({
|
|
249
251
|
marginRight : 10,
|
250
252
|
},
|
251
253
|
hasNotAvatar : {
|
252
|
-
borderLeftWidth :
|
254
|
+
borderLeftWidth : 7,
|
253
255
|
paddingLeft : 0,
|
254
256
|
height : "100%",
|
255
257
|
borderLeftColor : "transparent",
|
256
258
|
},
|
259
|
+
hasAvatar : {
|
260
|
+
paddingLeft : isNative ? 10 : 7,
|
261
|
+
},
|
257
262
|
selected : {
|
258
|
-
paddingHorizontal : 0,
|
259
|
-
paddingVertical : 0,
|
263
|
+
//paddingHorizontal : 0,
|
264
|
+
//paddingVertical : 0,
|
260
265
|
},
|
261
266
|
contentContainerNotAvatar : {
|
262
267
|
paddingLeft : 2,
|
package/src/pdf/print.web.js
CHANGED
@@ -8,12 +8,14 @@ export default function print(pdfMakeInstance,options,...rest){
|
|
8
8
|
if(isElectron()){
|
9
9
|
return electronPrint(pdfMakeInstance,options,...rest);
|
10
10
|
}
|
11
|
+
logRNWebview("printing pdf, check if can post react native webview message ? "+canPostWebviewMessage());
|
11
12
|
if(canPostWebviewMessage()){
|
13
|
+
let fileName = defaultStr(options?.fileName);
|
14
|
+
if(!fileName){
|
15
|
+
fileName = "printed-pdf-"+DateLib.format(new Date(),"dd-mm-yyyy HH MM ss");
|
16
|
+
}
|
17
|
+
logRNWebview(`will print native webview on filename +`+fileName);
|
12
18
|
return pdfMakeInstance.getBase64((content)=>{
|
13
|
-
let fileName = defaultStr(options?.fileName);
|
14
|
-
if(!fileName){
|
15
|
-
fileName = "printed-pdf-"+DateLib.format(new Date(),"dd-mm-yyyy HH MM ss");
|
16
|
-
}
|
17
19
|
const ext = getFileExtension(fileName,true);
|
18
20
|
if(!ext || ext.toLowerCase() !=="pdf"){
|
19
21
|
fileName+=".pdf";
|