From 90a8b211e68d8dab24734866a87b07e9dcf2e2ce Mon Sep 17 00:00:00 2001 From: fuhexu Date: Thu, 23 May 2019 18:01:13 -0400 Subject: [PATCH 1/5] >_< --- src/NavigatorNavigationBar.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/NavigatorNavigationBar.js b/src/NavigatorNavigationBar.js index 61d50e9..d5bffaf 100644 --- a/src/NavigatorNavigationBar.js +++ b/src/NavigatorNavigationBar.js @@ -140,6 +140,9 @@ class NavigatorNavigationBar extends React.Component { var component = this._components[componentName].get(this.props.navState.routeStack[index]); var props = this._getReusableProps(componentName, index); if (component && interpolate[componentName](props.style, amount)) { + if (Number.isFinite(props.style.left)) { + delete props.style.left; + } props.pointerEvents = props.style.opacity === 0 ? 'none' : 'box-none'; component.setNativeProps(props); } From 40c8d3c16f989eee1cb91072f680f3e58aa38cc8 Mon Sep 17 00:00:00 2001 From: fuhexu Date: Thu, 23 May 2019 19:40:08 -0400 Subject: [PATCH 2/5] asdf --- src/NavigatorNavigationBar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NavigatorNavigationBar.js b/src/NavigatorNavigationBar.js index d5bffaf..4b913d6 100644 --- a/src/NavigatorNavigationBar.js +++ b/src/NavigatorNavigationBar.js @@ -140,7 +140,7 @@ class NavigatorNavigationBar extends React.Component { var component = this._components[componentName].get(this.props.navState.routeStack[index]); var props = this._getReusableProps(componentName, index); if (component && interpolate[componentName](props.style, amount)) { - if (Number.isFinite(props.style.left)) { + if (isNan(props.style.left)) { delete props.style.left; } props.pointerEvents = props.style.opacity === 0 ? 'none' : 'box-none'; From 1f486d6bc7185102dcc3a1760855f8b750e05e3a Mon Sep 17 00:00:00 2001 From: fuhexu Date: Thu, 23 May 2019 19:49:16 -0400 Subject: [PATCH 3/5] asdf --- src/NavigatorNavigationBar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NavigatorNavigationBar.js b/src/NavigatorNavigationBar.js index 4b913d6..df3944c 100644 --- a/src/NavigatorNavigationBar.js +++ b/src/NavigatorNavigationBar.js @@ -140,7 +140,7 @@ class NavigatorNavigationBar extends React.Component { var component = this._components[componentName].get(this.props.navState.routeStack[index]); var props = this._getReusableProps(componentName, index); if (component && interpolate[componentName](props.style, amount)) { - if (isNan(props.style.left)) { + if (isNaN(props.style.left)) { delete props.style.left; } props.pointerEvents = props.style.opacity === 0 ? 'none' : 'box-none'; From 93114d5a4da17157c37f96cd0f618d2e185f65e5 Mon Sep 17 00:00:00 2001 From: Chang-han Jong Date: Tue, 15 Sep 2020 00:56:54 -0400 Subject: [PATCH 4/5] try to publish here --- package.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6fd3942..d0c45d2 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,16 @@ { - "name": "react-native-deprecated-custom-components", + "name": "@click-therapeutics-org/react-native-deprecated-custom-components", "version": "0.1.1", "description": "Deprecated custom components that originally shipped with React Native", "repository": { "type": "git", "url": "git@github.com:facebookarchive/react-native-custom-components.git" }, - "main": "src/CustomComponents.js", + "scripts": { + "build": "npx babel src --out-dir dist --copy-files", + "prepublishOnly": "npm run build" + }, + "main": "dist/CustomComponents.js", "dependencies": { "fbjs": "~0.8.9", "immutable": "~3.7.6", @@ -15,6 +19,10 @@ "react-timer-mixin": "^0.13.2", "rebound": "^0.0.13" }, + "devDependencies": { + "@babel/cli": "^7.11.5", + "@babel/core": "^7.11.5" + }, "peerDependencies": { "react-native": "*" } From 7e9d565b27df9af935c17d901f030a53b6124a75 Mon Sep 17 00:00:00 2001 From: Chang-han Jong Date: Tue, 15 Sep 2020 01:08:38 -0400 Subject: [PATCH 5/5] fix --- .babelrc | 9 +++++++++ package.json | 7 +++++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .babelrc diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..a9e3ddf --- /dev/null +++ b/.babelrc @@ -0,0 +1,9 @@ +{ + "plugins": [ + "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-object-rest-spread" + ], + "presets": [ + "module:metro-react-native-babel-preset" + ] +} diff --git a/package.json b/package.json index d0c45d2..8dc9bf1 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "git@github.com:facebookarchive/react-native-custom-components.git" }, "scripts": { - "build": "npx babel src --out-dir dist --copy-files", + "build": "npx babel ./src --out-dir ./dist --copy-files", "prepublishOnly": "npm run build" }, "main": "dist/CustomComponents.js", @@ -21,7 +21,10 @@ }, "devDependencies": { "@babel/cli": "^7.11.5", - "@babel/core": "^7.11.5" + "@babel/core": "^7.11.5", + "@babel/plugin-proposal-class-properties": "^7.10.4", + "@babel/plugin-proposal-object-rest-spread": "^7.11.0", + "metro-react-native-babel-preset": "^0.56.4" }, "peerDependencies": { "react-native": "*"