@eohjsc/react-native-smart-city 0.4.25 → 0.4.27

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.
@@ -10,17 +10,17 @@
10
10
  // original location:
11
11
  // - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
12
12
 
13
- def DEFAULT_COMPILE_SDK_VERSION = 28
14
- def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
15
- def DEFAULT_MIN_SDK_VERSION = 16
16
- def DEFAULT_TARGET_SDK_VERSION = 28
13
+ def DEFAULT_COMPILE_SDK_VERSION = 33
14
+ def DEFAULT_BUILD_TOOLS_VERSION = '30.0.3'
15
+ def DEFAULT_MIN_SDK_VERSION = 24
16
+ def DEFAULT_TARGET_SDK_VERSION = 33
17
17
 
18
18
  def safeExtGet(prop, fallback) {
19
19
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
20
20
  }
21
21
 
22
22
  apply plugin: 'com.android.library'
23
- apply plugin: 'maven'
23
+ apply plugin: 'maven-publish'
24
24
 
25
25
  buildscript {
26
26
  // The Android Gradle plugin is only required when opening the android folder stand-alone.
@@ -38,9 +38,6 @@ buildscript {
38
38
  }
39
39
  }
40
40
 
41
- apply plugin: 'com.android.library'
42
- apply plugin: 'maven'
43
-
44
41
  android {
45
42
  compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
46
43
  buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)
@@ -106,17 +103,17 @@ def configureReactNativePom(def pom) {
106
103
  afterEvaluate { project ->
107
104
  // some Gradle build hooks ref:
108
105
  // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html
109
- task androidJavadoc(type: Javadoc) {
110
- source = android.sourceSets.main.java.srcDirs
111
- classpath += files(android.bootClasspath)
112
- classpath += files(project.getConfigurations().getByName('compile').asList())
113
- include '**/*.java'
114
- }
115
-
116
- task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
117
- classifier = 'javadoc'
118
- from androidJavadoc.destinationDir
119
- }
106
+ // task androidJavadoc(type: Javadoc) {
107
+ // source = android.sourceSets.main.java.srcDirs
108
+ // classpath += files(android.bootClasspath)
109
+ // classpath += files(project.getConfigurations().getByName('compile').asList())
110
+ // include '**/*.java'
111
+ // }
112
+
113
+ // task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
114
+ // classifier = 'javadoc'
115
+ // from androidJavadoc.destinationDir
116
+ // }
120
117
 
121
118
  task androidSourcesJar(type: Jar) {
122
119
  classifier = 'sources'
@@ -135,15 +132,13 @@ afterEvaluate { project ->
135
132
 
136
133
  artifacts {
137
134
  archives androidSourcesJar
138
- archives androidJavadocJar
135
+ // archives androidJavadocJar
139
136
  }
140
137
 
141
138
  task installArchives(type: Upload) {
142
139
  configuration = configurations.archives
143
- repositories.mavenDeployer {
144
- // Deploy to react-native-event-bridge/maven, ready to publish to npm
145
- repository url: "file://${projectDir}/../android/maven"
146
- configureReactNativePom pom
140
+ repositories.maven {
141
+ url = uri("file://${projectDir}/../android/maven")
147
142
  }
148
143
  }
149
144
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eohjsc/react-native-smart-city",
3
3
  "title": "React Native Smart Home",
4
- "version": "0.4.25",
4
+ "version": "0.4.27",
5
5
  "description": "TODO",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -128,6 +128,7 @@
128
128
  "apisauce": "^2.1.5",
129
129
  "axios": "^0.19.2",
130
130
  "base-64": "^1.0.0",
131
+ "buffer": "^6.0.3",
131
132
  "deprecated-react-native-prop-types": "^2.3.0",
132
133
  "dotenv": "^8.2.0",
133
134
  "google-libphonenumber": "^3.2.10",
@@ -135,7 +136,8 @@
135
136
  "i18n-js": "^3.7.1",
136
137
  "i18next": "^20.1.0",
137
138
  "lodash": "^4.17.19",
138
- "lottie-react-native": "4.0.3",
139
+ "lottie-ios": "3.4.1",
140
+ "lottie-react-native": "5.1.4",
139
141
  "moment": "^2.27.0",
140
142
  "moment-timezone": "^0.5.32",
141
143
  "numeral": "^2.0.6",
@@ -4,7 +4,7 @@ import * as Progress from 'react-native-progress';
4
4
 
5
5
  import Text from '../Text';
6
6
  import { HeaderCustom } from '../Header';
7
- import { getPusher } from '../../utils/Pusher';
7
+ // import { getPusher } from '../../utils/Pusher';
8
8
  import { ModalCustom } from '../Modal';
9
9
  import { Colors, Constants } from '../../configs';
10
10
  import styles from './styles';
@@ -74,13 +74,13 @@ const Processing = ({
74
74
  }, [setHidePopupTurnOnGuide, setIsRecallChipScan]);
75
75
 
76
76
  useEffect(() => {
77
- const channel = getPusher().subscribe(channelName);
78
- channel.bind('progress', (message) => {
79
- processMessage(channel, message);
80
- });
81
- return () => {
82
- getPusher().unsubscribe(channelName);
83
- };
77
+ // const channel = getPusher().subscribe(channelName);
78
+ // channel.bind('progress', (message) => {
79
+ // processMessage(channel, message);
80
+ // });
81
+ // return () => {
82
+ // getPusher().unsubscribe(channelName);
83
+ // };
84
84
  }, [channelName, complete, fail, processMessage]);
85
85
 
86
86
  useEffect(() => {
@@ -4,7 +4,7 @@ import moment from 'moment';
4
4
  import { API } from '../../../configs';
5
5
  import HistoryChart from '../../../commons/Device/HistoryChart';
6
6
  import { axiosGet } from '../../../utils/Apis/axios';
7
- import { getPusher } from '../../../utils/Pusher';
7
+ // import { getPusher } from '../../../utils/Pusher';
8
8
 
9
9
  const fetchDataS3 = async (url) => {
10
10
  const { data } = await axiosGet(url, {
@@ -87,31 +87,30 @@ export const updateConfigChart = async (
87
87
  );
88
88
 
89
89
  data.configs.map((config) => {
90
- if (config.middle.not_ready.length > 0) {
91
- const channel = getPusher().subscribe(config.middle.channel);
92
- channel.bind('caching-value-log-process', async () => {
93
- await Promise.all(
94
- config.middle.not_ready.map((item) =>
95
- (async () => {
96
- item.data = await fetchDataS3(item.url);
97
- })()
98
- )
99
- );
100
- const middleDataByDay = [
101
- ...config.middle.not_ready,
102
- ...config.middle.ready,
103
- ];
104
-
105
- middleDataByDay.sort((a, b) => (a.date > b.date ? 1 : -1)); // small to large
106
- const middleData = middleDataByDay.map((x) => x.data).flat();
107
- data_by_id[config.id] = [...config.head, ...middleData, ...config.tail];
108
- setChartData((chartData) => {
109
- const index = chartData.map((c) => c.id).indexOf(config.id);
110
- chartData[index].data = data_by_id[config.id];
111
- return [...chartData];
112
- });
113
- });
114
- }
90
+ // if (config.middle.not_ready.length > 0) {
91
+ // const channel = getPusher().subscribe(config.middle.channel);
92
+ // channel.bind('caching-value-log-process', async () => {
93
+ // await Promise.all(
94
+ // config.middle.not_ready.map((item) =>
95
+ // (async () => {
96
+ // item.data = await fetchDataS3(item.url);
97
+ // })()
98
+ // )
99
+ // );
100
+ // const middleDataByDay = [
101
+ // ...config.middle.not_ready,
102
+ // ...config.middle.ready,
103
+ // ];
104
+ // middleDataByDay.sort((a, b) => (a.date > b.date ? 1 : -1)); // small to large
105
+ // const middleData = middleDataByDay.map((x) => x.data).flat();
106
+ // data_by_id[config.id] = [...config.head, ...middleData, ...config.tail];
107
+ // setChartData((chartData) => {
108
+ // const index = chartData.map((c) => c.id).indexOf(config.id);
109
+ // chartData[index].data = data_by_id[config.id];
110
+ // return [...chartData];
111
+ // });
112
+ // });
113
+ // }
115
114
  });
116
115
  };
117
116
 
@@ -48,8 +48,8 @@ const watchConfig = (configId) => {
48
48
  return;
49
49
  }
50
50
  watchingConfigs[configId] = 1;
51
- const channel = getPusher().subscribe(`private-config_v2-${configId}`);
52
- channel.bind('new-value', updateGlobalValue.bind(channel, configId));
51
+ // const channel = getPusher().subscribe(`private-config_v2-${configId}`);
52
+ // channel.bind('new-value', updateGlobalValue.bind(channel, configId));
53
53
  };
54
54
 
55
55
  const unwatchConfig = (configId) => {
@@ -54,10 +54,10 @@ const ConnectingModbusDevice = ({ route }) => {
54
54
 
55
55
  useEffect(() => {
56
56
  if (channelNameTemp) {
57
- const channel = getPusher().subscribe(channelNameTemp);
58
- channel.bind('change_modbus_address_completed', (messageRes) => {
59
- setIsChangeAddressSuccess(messageRes.success);
60
- });
57
+ // const channel = getPusher().subscribe(channelNameTemp);
58
+ // channel.bind('change_modbus_address_completed', (messageRes) => {
59
+ // setIsChangeAddressSuccess(messageRes.success);
60
+ // });
61
61
  }
62
62
  }, [channelNameTemp, setIsChangeAddressSuccess]);
63
63
 
@@ -40,10 +40,10 @@ const destroyPusher = () => {
40
40
 
41
41
  // eslint-disable-next-line promise/prefer-await-to-callbacks
42
42
  export const watchHanetCheckinData = (hanetCamera, callback) => {
43
- const channel = getPusher().subscribe(
44
- `private-hanet-camera-${hanetCamera.device_id}`
45
- );
46
- channel.bind('new-checkin-data', callback);
43
+ // const channel = getPusher().subscribe(
44
+ // `private-hanet-camera-${hanetCamera.device_id}`
45
+ // );
46
+ // channel.bind('new-checkin-data', callback);
47
47
  };
48
48
 
49
49
  export const unwatchHanetCheckinData = (hanetCamera) => {
@@ -2,8 +2,8 @@ import { getPusher, destroyPusher } from './Pusher';
2
2
 
3
3
  // eslint-disable-next-line promise/prefer-await-to-callbacks
4
4
  export const watchNotificationData = (user, callback) => {
5
- const channel = getPusher().subscribe(`private-user-${user.id}`);
6
- channel.bind('new-notification', callback);
5
+ // const channel = getPusher().subscribe(`private-user-${user.id}`);
6
+ // channel.bind('new-notification', callback);
7
7
  };
8
8
 
9
9
  export const unwatchNotificationData = (user) => {