Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/#1043-data-table-rewrite' into #…
Browse files Browse the repository at this point in the history
…1090-customerInvoice-new-data-table
  • Loading branch information
josh-griffin committed Aug 15, 2019
2 parents 75b6541 + 5f6e965 commit fb2a4e1
Show file tree
Hide file tree
Showing 10 changed files with 1,196 additions and 1,176 deletions.
7 changes: 4 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ android {
versionCode appVersionCode
versionName getAppVersion()
ndk {
abiFilters "armeabi-v7a", "x86"
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
signingConfigs {
Expand All @@ -131,7 +131,7 @@ android {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
buildTypes {
Expand All @@ -146,7 +146,7 @@ android {
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a":3, "x86_64":4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
Expand All @@ -157,6 +157,7 @@ android {
}

dependencies {
implementation project(':@react-native-community_async-storage')
implementation project(':react-native-screens')
implementation project(':react-native-gesture-handler')
implementation project(':react-native-device-info')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.app.Application;

import com.facebook.react.ReactApplication;
import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;
import com.swmansion.rnscreens.RNScreensPackage;
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
import com.learnium.RNDeviceInfo.RNDeviceInfo;
Expand Down Expand Up @@ -32,6 +33,7 @@ protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new RNDeviceInfo(),
new MainReactPackage(),
new AsyncStoragePackage(),
new RNScreensPackage(),
new RNGestureHandlerPackage(),
new RealmReactPackage(),
Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
rootProject.name = 'mSupplyMobile'
include ':@react-native-community_async-storage'
project(':@react-native-community_async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/async-storage/android')
include ':react-native-screens'
project(':react-native-screens').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-screens/android')
include ':app'
Expand Down
19 changes: 19 additions & 0 deletions ios/mSupplyMobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
FFC521D2445D47F0A3C0D14F /* libRNGestureHandler.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 47CEDAFD62084BE5ABB31D57 /* libRNGestureHandler.a */; };
6633D44036D64CB1B01F2DA0 /* Fontisto.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EC3A366CC521426BB810BEF5 /* Fontisto.ttf */; };
E29761E94ABA44BFB8831CE4 /* libRNScreens.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B16C381AE574D07AF997F7E /* libRNScreens.a */; };
5D6F3A47713445C7954BE62B /* libRNCAsyncStorage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E4811B0DBE14875A1D77D47 /* libRNCAsyncStorage.a */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -410,6 +411,8 @@
EC3A366CC521426BB810BEF5 /* Fontisto.ttf */ = {isa = PBXFileReference; name = "Fontisto.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
10DC4E1C8EC94353B00D8FDC /* RNScreens.xcodeproj */ = {isa = PBXFileReference; name = "RNScreens.xcodeproj"; path = "../node_modules/react-native-screens/ios/RNScreens.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
7B16C381AE574D07AF997F7E /* libRNScreens.a */ = {isa = PBXFileReference; name = "libRNScreens.a"; path = "libRNScreens.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
BEB55D3AB2114BA0975873EF /* RNCAsyncStorage.xcodeproj */ = {isa = PBXFileReference; name = "RNCAsyncStorage.xcodeproj"; path = "../node_modules/@react-native-community/async-storage/ios/RNCAsyncStorage.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
6E4811B0DBE14875A1D77D47 /* libRNCAsyncStorage.a */ = {isa = PBXFileReference; name = "libRNCAsyncStorage.a"; path = "libRNCAsyncStorage.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -448,6 +451,7 @@
DA5C8BF362114FDD85A6F025 /* libRNDeviceInfo.a in Frameworks */,
FFC521D2445D47F0A3C0D14F /* libRNGestureHandler.a in Frameworks */,
E29761E94ABA44BFB8831CE4 /* libRNScreens.a in Frameworks */,
5D6F3A47713445C7954BE62B /* libRNCAsyncStorage.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -649,6 +653,7 @@
1AB7E044A89A458F9114074F /* RNDeviceInfo.xcodeproj */,
EA69520CF6334BA88A9538AE /* RNGestureHandler.xcodeproj */,
10DC4E1C8EC94353B00D8FDC /* RNScreens.xcodeproj */,
BEB55D3AB2114BA0975873EF /* RNCAsyncStorage.xcodeproj */,
);
name = Libraries;
sourceTree = "<group>";
Expand Down Expand Up @@ -1327,6 +1332,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -1338,6 +1344,7 @@
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-screens/ios",
"$(SRCROOT)/../node_modules/@react-native-community/async-storage/ios",
);
};
name = Debug;
Expand Down Expand Up @@ -1369,6 +1376,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -1380,6 +1388,7 @@
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-screens/ios",
"$(SRCROOT)/../node_modules/@react-native-community/async-storage/ios",
);
};
name = Release;
Expand Down Expand Up @@ -1410,6 +1419,7 @@
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-screens/ios",
"$(SRCROOT)/../node_modules/@react-native-community/async-storage/ios",
);
};
name = Debug;
Expand Down Expand Up @@ -1439,6 +1449,7 @@
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-screens/ios",
"$(SRCROOT)/../node_modules/@react-native-community/async-storage/ios",
);
};
name = Release;
Expand Down Expand Up @@ -1478,6 +1489,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -1489,6 +1501,7 @@
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-screens/ios",
"$(SRCROOT)/../node_modules/@react-native-community/async-storage/ios",
);
};
name = Debug;
Expand Down Expand Up @@ -1528,6 +1541,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -1539,6 +1553,7 @@
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-screens/ios",
"$(SRCROOT)/../node_modules/@react-native-community/async-storage/ios",
);
};
name = Release;
Expand Down Expand Up @@ -1577,6 +1592,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -1588,6 +1604,7 @@
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-screens/ios",
"$(SRCROOT)/../node_modules/@react-native-community/async-storage/ios",
);
};
name = Debug;
Expand Down Expand Up @@ -1626,6 +1643,7 @@
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -1637,6 +1655,7 @@
"$(SRCROOT)/../node_modules/react-native-device-info/ios/RNDeviceInfo",
"$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**",
"$(SRCROOT)/../node_modules/react-native-screens/ios",
"$(SRCROOT)/../node_modules/@react-native-community/async-storage/ios",
);
};
name = Release;
Expand Down
34 changes: 14 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"preset": "react-native"
},
"resolutions": {
"react-devtools-core": "3.5.1"
"react-devtools-core": "3.6.0",
"lodash": "4.17.14"
},
"husky": {
"hooks": {
Expand All @@ -48,6 +49,7 @@
]
},
"dependencies": {
"@react-native-community/async-storage": "^1.5.0",
"@react-navigation/core": "^3.0.3",
"bugsnag-react-native": "^2.21.1",
"prop-types": "^15.7.2",
Expand All @@ -68,7 +70,7 @@
"react-navigation-redux-helpers": "^3.0.0",
"react-navigation-tabs": "^0.4.0",
"react-redux": "^6.0.0",
"realm": "^2.22.0",
"realm": "^2.29.0",
"redux": "^4.0.1",
"redux-persist": "^5.10.0",
"redux-persist-error-handler": "^0.1.1",
Expand All @@ -77,30 +79,22 @@
"sussol-utilities": "^0.5.1"
},
"devDependencies": {
"@babel/core": "^7.2.2",
"babel-eslint": "^10.0.1",
"@babel/core": "^7.5.0",
"babel-eslint": "^10.0.2",
"babel-jest": "^24.0.0",
"babel-polyfill": "^6.26.0",
"babel-preset-react-native": "^4.0.1",
"enzyme": "^3.8.0",
"eslint": "^5.12.1",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jsx-a11y": "^6.2.0",
"eslint-config-airbnb": "^17.1.1",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.12.4",
"expect": "^24.0.0",
"expect-jsx": "^5.0.0",
"flow-bin": "^0.91.0",
"husky": "^1.3.1",
"jest-cli": "^24.0.0",
"eslint-plugin-react": "^7.14.2",
"husky": "^3.0.0",
"jest": "^24.8.0",
"lint-staged": "^8.1.0",
"metro-react-native-babel-preset": "^0.51.1",
"prettier": "^1.16.0",
"promise-sync-es6": "^0.1.4",
"react-addons-test-utils": "^15.6.2",
"react-native-mock": "^0.3.1",
"react-test-renderer": "^16.7.0",
"sinon": "^7.2.3"
"prettier": "^1.18.2",
"react-test-renderer": "^16.7.0"
}
}
2 changes: 1 addition & 1 deletion src/Store.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncStorage } from 'react-native';
import AsyncStorage from '@react-native-community/async-storage';
import { persistStore, persistReducer } from 'redux-persist';
import { applyMiddleware, createStore } from 'redux';
import thunk from 'redux-thunk';
Expand Down
2 changes: 1 addition & 1 deletion src/dataMigration.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Sustainable Solutions (NZ) Ltd. 2019
*/

import { AsyncStorage } from 'react-native';
import AsyncStorage from '@react-native-community/async-storage';

import { compareVersions } from './utilities';
import { SETTINGS_KEYS } from './settings';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/SupplierRequisitionPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import {
ToggleSelector,
ToggleBar,
} from '../widgets';
import { BottomConfirmModal, PageContentModal } from '../widgets/modals';

import { BottomConfirmModal, PageContentModal } from '../widgets/modals';
import globalStyles from '../globalStyles';

const DATA_TYPES_SYNCHRONISED = ['RequisitionItem', 'Item', 'ItemBatch'];
Expand Down
2 changes: 1 addition & 1 deletion src/settings/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncStorage } from 'react-native';
import AsyncStorage from '@react-native-community/async-storage';

export { MobileAppSettings } from './MobileAppSettings';

Expand Down
Loading

0 comments on commit fb2a4e1

Please sign in to comment.