@fto-consult/expo-ui 8.82.6 → 8.82.8

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.82.6",
3
+ "version": "8.82.8",
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": {
@@ -106,7 +106,7 @@ const AppBarComponent = React.forwardRef((props,ref)=> {
106
106
  return setLayout({...Dimensions.get("window")});
107
107
  }
108
108
  const rightContent = typeof right =='function' ? right ({drawerRef,context,isMobile:Dimensions.isMobileMedia(),isDesktop:Dimensions.isDesktopMedia(),isTablet:Dimensions.isTabletMedia(),isPhone:Dimensions.isPhoneMedia(),dimensions,...dimensions}): right;
109
- const splitedActions = isSplitedActions(actions)? actions: splitActions({...appBarProps,windowWidth:layout.width,canGoBack:back || options.back?true:false,isAppBarAction:true,onBackActionPress,goBack,route,navigation,actions});
109
+ const splitedActions = isSplitedActions(actions)? actions: splitActions({windowWidth:layout.width,...appBarProps,canGoBack:back || options.back?true:false,isAppBarAction:true,onBackActionPress,goBack,route,navigation,actions});
110
110
  const onPageResize = bindResizeEvent !== false ? (e)=>{
111
111
  if(!e || !e.nativeEvent || !e.nativeEvent.layout) return null;
112
112
  const {width,height} = e.nativeEvent.layout;
@@ -8,6 +8,7 @@ import Action from "$ecomponents/Form/Action";
8
8
  import Menu from "$ecomponents/Menu";
9
9
  import Icon,{ MORE_ICON } from "$ecomponents/Icon";
10
10
  import {isAllowedFromStr} from "$cauth/perms";
11
+ import breakpoints from "$cdimensions/breakpoints";
11
12
 
12
13
  export const ACTION_ICON_SIZE = 30;
13
14
 
@@ -31,6 +32,7 @@ export const getThemeColors = ()=>{
31
32
 
32
33
  const renderAction = ({action,isAlert,actionProps,opts,isAppBarAction,isAppBarActionStyle,key,ActionComponent,isMobile}) => {
33
34
  let {Component,isFormAction,...rest} = action;
35
+ isFormAction = typeof isFormAction === 'boolean' ? isFormAction : isNonNullString(action.formName);
34
36
  actionProps = defaultObj(actionProps);
35
37
  rest = Object.assign({},rest);
36
38
  rest["aria-label"] = defaultStr(rest["aria-label"],rest.title,rest.text,rest.label,rest.children);
@@ -86,7 +88,7 @@ export const splitActions = (args)=>{
86
88
  onAlertRequestClose = defaultFunc(onAlertRequestClose);
87
89
  }
88
90
  opts = defaultObj(opts);
89
- const isMobile = isMobileOrTabletMedia();
91
+ const isMobile = isMobileOrTabletMedia() || typeof opts.windowWidth =="number" && opts.windowWidth < breakpoints.all.md;
90
92
  const isAppBarAction = opts.isAppBarAction && isMobile ? true : false;
91
93
  const ActionComponent = isAppBarAction ? Icon : Button;
92
94
  let menus = []
@@ -139,6 +139,7 @@ export default class DrawerLayout extends React.PureComponent {
139
139
  this.closeDrawer();
140
140
  return false;
141
141
  }}
142
+ windowWidth = {this.getDrawerWidth()}
142
143
  {...appBarProps}
143
144
  backActionProps = {extendObj(true,{},appBarProps.backActionProps,{icon:this.state.portalProps?.closeIcon || !isPositionRight == 'left'? 'chevron-left' : 'chevron-right'})}
144
145
  />