@fto-consult/expo-ui 6.60.4 → 6.61.0

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.60.4",
3
+ "version": "6.61.0",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "main",
6
6
  "scripts": {
@@ -14,10 +14,11 @@ import DateLib from "$lib/date";
14
14
  import {getFetchOptions} from "$cutils/filters";
15
15
  import {setQueryParams} from "$cutils/uri";
16
16
  import {uniqid} from "$cutils";
17
- import apiFetch,{ getFetcherOptions,prepareFetchOptions } from "$capi/fetch";
17
+ import apiFetch from "$capi/fetch";
18
18
  import Icon from "$ecomponents/Icon";
19
19
  import Label from "$ecomponents/Label";
20
- import { StyleSheet,View } from "react-native";
20
+ import { StyleSheet} from "react-native";
21
+ import View from "$ecomponents/View";
21
22
  import theme from "$theme";
22
23
  import useSWR from "$swr";
23
24
  import {getRowsPerPagesLimits} from "./Common/utils";
@@ -177,15 +177,14 @@ export default class DrawerLayout extends React.PureComponent {
177
177
  {...this._panResponder.panHandlers}
178
178
  >
179
179
  {!permanent && <TouchableWithoutFeedback
180
- pointerEvents={pointerEvents}
180
+ style={{pointerEvents}}
181
181
  testID = {testID+"_TouchableWithoutFeedBack"}
182
182
  onPress={this._onOverlayClick}
183
183
  >
184
184
  <Animated.View
185
185
  testID={testID+"_Backdrow"}
186
- pointerEvents={pointerEvents}
187
186
  ref = {this._backdropRef}
188
- style={[styles.overlay,{backgroundColor:theme.colors.backdrop}, animatedOverlayStyles]}
187
+ style={[styles.overlay,{backgroundColor:theme.colors.backdrop},{pointerEvents}, animatedOverlayStyles]}
189
188
  />
190
189
  </TouchableWithoutFeedback>}
191
190
  {posRight && this.renderContent({testID})}
@@ -115,22 +115,22 @@ const FABGroup = ({
115
115
  const Item = isFormAction ? Action : FabItem;
116
116
  const itemComponentProps = isFormAction ? {Component : FabItem} : {};
117
117
  return (
118
- <View testID={testID+"_Container"} pointerEvents="box-none" style={[styles.container, style]}>
118
+ <View testID={testID+"_Container"} style={[styles.container, style]}>
119
119
  <TouchableWithoutFeedback testID={testID+"_TouchableOpacity"} onPress={close}>
120
120
  <Animated.View
121
121
  testID={testID+"_AnimatedView"}
122
- pointerEvents={open ? 'auto' : 'none'}
123
122
  style={[
124
123
  styles.backdrop,
125
124
  {
126
125
  opacity: backdropOpacity,
127
126
  backgroundColor: colors.backdrop,
127
+ pointerEvents : open ? 'auto' : 'none',
128
128
  },
129
129
  ]}
130
130
  />
131
131
  </TouchableWithoutFeedback>
132
- <SafeAreaView testID={testID+"_SafeAreaView"} pointerEvents="box-none" style={styles.safeArea}>
133
- <View testID={testID+"_ItemsContainer"} style={[styles.itemsContainer]} pointerEvents={open ? 'box-none' : 'none'}>
132
+ <SafeAreaView testID={testID+"_SafeAreaView"} style={styles.safeArea}>
133
+ <View testID={testID+"_ItemsContainer"} style={[styles.itemsContainer,{pointerEvents:open ? 'box-none' : 'none'}]}>
134
134
  {actions.map((it, i) => {
135
135
  const itemProps = {
136
136
  ...it,
@@ -148,9 +148,9 @@ const FABGroup = ({
148
148
  {
149
149
  marginHorizontal:
150
150
  typeof it.small || it.small ? 24 : 16,
151
+ pointerEvents : open ? 'box-none' : 'none',
151
152
  },
152
153
  ]}
153
- pointerEvents={open ? 'box-none' : 'none'}
154
154
  >
155
155
  <Item
156
156
  {...itemProps}
@@ -288,7 +288,7 @@ const _FabItem = function({children,label,disabled:customDisabled,pointerEvents,
288
288
  const dStyle = disabled ? disabledStyle : null;
289
289
  return <>
290
290
  {label ? (
291
- <View testID = {testID+"_LabelContainer"} style={dStyle} pointerEvents={pointerEvents}>
291
+ <View testID = {testID+"_LabelContainer"} style={[dStyle,{pointerEvents}]}>
292
292
  <Card
293
293
  testID={testID+"_Card"}
294
294
  style={
@@ -323,7 +323,6 @@ const _FabItem = function({children,label,disabled:customDisabled,pointerEvents,
323
323
  icon={icon}
324
324
  color={color}
325
325
  disabled = {disabled}
326
- pointerEvents={pointerEvents}
327
326
  style={
328
327
  [
329
328
  style,
@@ -333,6 +332,7 @@ const _FabItem = function({children,label,disabled:customDisabled,pointerEvents,
333
332
  transform: [{ scale}],
334
333
  opacity,
335
334
  backgroundColor,
335
+ pointerEvents,
336
336
  },
337
337
  ]
338
338
  }
@@ -356,6 +356,7 @@ export const FabItem = theme.withStyles(_FabItem,{displayName:"FabItemComponent"
356
356
  const styles = StyleSheet.create({
357
357
  safeArea: {
358
358
  alignItems: 'flex-end',
359
+ pointerEvents : "box-none",
359
360
  },
360
361
  itemsContainer : {
361
362
  marginBottom : 70,
@@ -363,6 +364,7 @@ const styles = StyleSheet.create({
363
364
  container: {
364
365
  ...StyleSheet.absoluteFillObject,
365
366
  justifyContent: 'flex-end',
367
+ pointerEvents : "box-none",
366
368
  },
367
369
  fab: {
368
370
  marginHorizontal: 16,
@@ -252,13 +252,12 @@ export default function ImageComponent(props){
252
252
  }
253
253
  const _label = defaultString(label);
254
254
  const isDisabled = menuItems.length > 0 ? true : false;
255
- const pointerEvents = isDisabled ? "auto" :"none";
256
255
  return <View testID={testID+"_FagmentContainer"}>
257
256
  {!createSignatureOnly ? (<Menu
258
257
  {...menuProps}
259
258
  disabled = {isDisabled}
260
259
  anchor = {(props)=>{
261
- return <View accessibilityLabel = {_label} testID={testID+"_Container"} {...containerProps} pointerEvents={disabled|| readOnly? "none":"auto"} style={[label?styles.align:null,containerProps.style,label?styles.container:null]}>
260
+ return <View accessibilityLabel = {_label} testID={testID+"_Container"} {...containerProps} style={[label?styles.align:null,containerProps.style,{pointerEvents:disabled|| readOnly? "none":"auto"},label?styles.container:null]}>
262
261
  {<Label testID={testID+"_Label"} {...labelProps} disabled={disabled} style={[styles.label,labelProps.style]}>{label}</Label>}
263
262
  {<Avatar
264
263
  resizeMethod = {"auto"}
@@ -96,10 +96,10 @@ const MenuItemComponent = React.forwardRef(({
96
96
  ) : null}
97
97
  <View
98
98
  testID={testID+"_Right2LabelContainer"}
99
- pointerEvents={!right?"none":"auto"}
100
99
  {...contentContainerProps}
101
100
  style={[
102
101
  styles.item,
102
+ {pointerEvents:!right?"none":"auto"},
103
103
  styles.content,
104
104
  !maxWidthStyle && icon ? styles.widthWithIcon : null,
105
105
  contentStyle,
@@ -111,11 +111,10 @@ const ModalComponent = React.forwardRef((props,ref)=>{
111
111
  ref={ref}
112
112
  testID={'RN__ModalComponent'}
113
113
  {...rest}
114
- pointerEvents={visible ? 'auto' : 'none'}
115
114
  accessibilityViewIsModal
116
115
  role="polite"
117
116
  onAccessibilityEscape={hideModal}
118
- style = {[styles.modal,rest.style]}
117
+ style = {[styles.modal,rest.style,{pointerEvents:visible ? 'auto' : 'none'}]}
119
118
  animationType = {animationType}
120
119
  animationDuration = {animationDuration}
121
120
  animationPosition = {animationPosition}
@@ -144,7 +143,6 @@ const ModalComponent = React.forwardRef((props,ref)=>{
144
143
  {...wrapperProps}
145
144
  ref = {contentContainerRef}
146
145
  style={[styles.contentContainer,{ marginTop: TOP_INSET, marginBottom: BOTTOM_INSET,backgroundColor:'transparent' },contentContainerProps.style]}
147
- pointerEvents="box-none"
148
146
  >
149
147
  {children}
150
148
  </Surface>
@@ -162,6 +160,7 @@ const styles = StyleSheet.create({
162
160
  },
163
161
  contentContainer: {
164
162
  ...StyleSheet.absoluteFillObject,
163
+ pointerEvents : "box-none",
165
164
  alignItems : 'center',
166
165
  justifyContent : 'center',
167
166
  flex : 1,
@@ -162,10 +162,8 @@ export default function PhoneInputComponent(props){
162
162
  disabled = {props.disabled}
163
163
  pointerEvents = {pointerEvents}
164
164
  left = {
165
- <Pressable testID={testID+"_Left"} style={[styles.flag,disabledStyle,!isFlatMode && styles.notFlatModeFlag]}
166
- //role="button"
165
+ <Pressable testID={testID+"_Left"} style={[styles.flag,{pointerEvents},disabledStyle,!isFlatMode && styles.notFlatModeFlag]}
167
166
  disabled = {props.disabled}
168
- pointerEvents = {pointerEvents}
169
167
  onPress={onPressFlag}
170
168
  >
171
169
  <>
@@ -277,17 +277,18 @@ const SimpleSelect = React.forwardRef((props,ref)=>{
277
277
  const renderingItems = getItems();
278
278
  const autoFocus = canAutoFocusSearchField({visible,items:renderingItems});
279
279
  testID = defaultStr(testID, "RN_SimpleSelectComponent");
280
+ anchorContainerProps = defaultObj(anchorContainerProps);
280
281
  anchor = <Pressable
281
282
  //role="button"
282
283
  activeOpacity={0.3}
283
284
  testID = {testID}
284
- {...defaultObj(anchorContainerProps)}
285
+ {...anchorContainerProps}
285
286
  onPress={show}
286
287
  disabled = {!isEditable}
287
- pointerEvents = {pointerEvents}
288
288
  accessibilityLabel={defaultStr(label,text)}
289
289
  rippleColor={undefined}
290
290
  onLayout={onLayout}
291
+ style = {[{pointerEvents},anchorContainerProps.style]}
291
292
  >
292
293
  {anchor}
293
294
  </Pressable>
@@ -323,10 +324,10 @@ const SimpleSelect = React.forwardRef((props,ref)=>{
323
324
  },
324
325
  isMob && {flex:1},
325
326
  !isMob && {paddingRight : 0},
326
- contentContainerProps.style
327
+ contentContainerProps.style,
328
+ {pointerEvents:contentContainerProps.pointerEvents||pointerEvents||undefined},
327
329
  ]
328
330
  }
329
- pointerEvents = {pointerEvents}
330
331
  >
331
332
  {showSearch !== false && <>
332
333
  <TextField