@fto-consult/expo-ui 2.45.0 → 2.45.3

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.45.0",
3
+ "version": "2.45.3",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -61,7 +61,7 @@
61
61
  "@emotion/native": "^11.10.0",
62
62
  "@expo/html-elements": "^0.2.0",
63
63
  "@expo/vector-icons": "^13.0.0",
64
- "@fto-consult/common": "^2.6.0",
64
+ "@fto-consult/common": "^2.7.2",
65
65
  "@gorhom/portal": "^1.0.14",
66
66
  "@react-native-async-storage/async-storage": "~1.17.3",
67
67
  "@react-native-community/datetimepicker": "6.5.2",
@@ -38,6 +38,7 @@ import sprintf from "$cutils/sprintf";
38
38
  import { renderRowCell,formatValue,arrayValueSeparator } from "./utils";
39
39
  import {ScrollView} from "react-native";
40
40
  import Button from "$ecomponents/Button";
41
+ import stableHash from "stable-hash";
41
42
  import * as XLSX from "xlsx";
42
43
 
43
44
  export const TIMEOUT = 100;
@@ -3382,7 +3383,7 @@ export default class CommonDatagridComponent extends AppComponent {
3382
3383
  return false;
3383
3384
  }
3384
3385
  UNSAFE_componentWillReceiveProps(nextProps){
3385
- if(React.areEquals(nextProps.data,(this.props.data))) {
3386
+ if(React.areEquals(nextProps.data,this.props.data) || (stableHash(nextProps.data) === stableHash(this.props.data))) {
3386
3387
  return false;
3387
3388
  }
3388
3389
  this.setIsLoading(true,true);
@@ -3,6 +3,7 @@ import {isObj,defaultStr} from "$utils";
3
3
  import View from "$ecomponents/View";
4
4
  import Portal from "$ecomponents/Portal";
5
5
  import theme,{Colors} from "$theme";
6
+ import stableHash from "stable-hash";
6
7
  import Dimensions,{isMobileMedia,isTabletMedia,isDesktopMedia} from "$dimensions";
7
8
  import {
8
9
  StyleSheet,
@@ -344,17 +345,19 @@ export default class DropdownAlert extends Component {
344
345
  return this.queue.size;
345
346
  };
346
347
  _processQueue = () => {
347
- let data = this.queue.firstItem;
348
- console.log("will open ",data,this.alertData);
349
- if(data && React.areEquals(data,this.alertData)){
350
- this.queue.dequeue();
351
- this._processQueue();
348
+ const data = this.queue.firstItem;
349
+ if(data && this.activeData){
350
+ if(data.type == this.activeData.type && React.getTextContent(data.title) == React.getTextContent(this.activeData.title) && React.getTextContent(data.message) == React.getTextContent(this.activeData.message)){
351
+ this.queue.dequeue();
352
+ return this._processQueue();
353
+ }
352
354
  }
353
355
  if (data) {
354
356
  this.open(data);
355
357
  }
356
358
  };
357
359
  open = (data = {}) => {
360
+ this.activeData = data;
358
361
  this.alertData = data;
359
362
  const position = data.top || this.isKeyboardOpen() ? "top" : data.position;
360
363
  this.setState({isOpen: true,position},()=>{