@olea-bps/base 1.0.0 → 1.0.2

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.
@@ -21,7 +21,6 @@ import * as SecureStore from 'expo-secure-store';
21
21
  import { useTranslation } from 'react-i18next';
22
22
  import { useSelector } from 'react-redux';
23
23
  import { useTheme } from 'react-native-paper';
24
- import notifee, { TriggerType } from '@notifee/react-native';
25
24
  import { DateTime } from 'luxon';
26
25
 
27
26
  /**
@@ -318,59 +317,6 @@ function UserContextProvider({ children }) {
318
317
  [refreshToken, refreshTokenAt, discovery]
319
318
  );
320
319
 
321
- useEffect(
322
- () => {
323
- if (refreshToken && refreshTokenAt && refreshTokenExpiresAt) {
324
- notifee.requestPermission()
325
- .then(
326
- notificationSettings =>
327
- notifee.createChannel({
328
- id: RefreshTokenReqiredNotificationChannelId,
329
- name: t('authentication:notificationChannelName'),
330
- description: t('authentication:notificationChannelDescription'),
331
- lights: true,
332
- sound: 'default',
333
- })
334
- ).then(
335
- channelId => {
336
- const refreshTokenExpiresAtMillisecond = refreshTokenAt * 1000;
337
- const refreshTokenExpiresAtDateTime = DateTime.fromMillis(refreshTokenExpiresAtMillisecond, { locale: language });
338
- const refreshTokenExpiresAtDateLocaleString = refreshTokenExpiresAtDateTime.toLocaleString(DateTime.DATE_SHORT);
339
- const refreshTokenExpiresAtTimeLocaleString = refreshTokenExpiresAtDateTime.toLocaleString(DateTime.TIME_SIMPLE);
340
- return notifee.createTriggerNotification(
341
- {
342
- id: RefreshTokenReqiredNotificationId,
343
- title: t(
344
- 'authentication:tokenInvalidNotification',
345
- {
346
- refreshTokenExpiresAtDate: refreshTokenExpiresAtDateLocaleString,
347
- refreshTokenExpiresAtTime: refreshTokenExpiresAtTimeLocaleString
348
-
349
- }
350
- ),
351
- android: {
352
- channelId: channelId,
353
- showChronometer: true,
354
- chronometerDirection: 'down',
355
- timestamp: refreshTokenExpiresAt * 1000,
356
- smallIcon: RefreshTokenReqiredNotificationIcon,
357
- },
358
- },
359
- {
360
- type: TriggerType.TIMESTAMP,
361
- timestamp: refreshTokenExpiresAtMillisecond,
362
- }
363
- );
364
- }
365
- )
366
- } else {
367
- notifee.cancelDisplayedNotification(RefreshTokenReqiredNotificationId);
368
- notifee.cancelTriggerNotification(RefreshTokenReqiredNotificationId);
369
- }
370
- },
371
- [refreshToken && refreshTokenAt, language, t]
372
- )
373
-
374
320
  function login() {
375
321
  return promptAsync()
376
322
  .then(
package/index.js CHANGED
@@ -156,6 +156,12 @@ export {
156
156
  useLogoutEffect,
157
157
  } from './context/context-user';
158
158
 
159
+ export {
160
+ default as InfoContextProvider,
161
+ useInfoContext,
162
+ usePendingInfos,
163
+ } from './context/context-info-dialog';
164
+
159
165
  // Exports Contexts libraries
160
166
 
161
167
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olea-bps/base",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "OLEA base library",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -27,42 +27,42 @@
27
27
  ],
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "redux": "^4.0.5",
31
- "redux-persist": "^6.0.0",
32
- "react-redux": "^9.2.0",
33
- "react-native-webview": "13.16.0",
34
- "react-native-vector-icons": "^10.2.0",
35
- "react-native-uuid": "^2.0.3",
36
- "react-native-tab-view": "^4.1.3",
37
- "react-native-swipe-gestures": "^1.0.5",
38
- "react-native-svg": "15.15.4",
39
- "react-native-paper": "^5.14.5",
40
- "react-native-modalbox": "^2.0.2",
41
- "react-native-elements": "^3.4.3",
42
- "moment": "^2.29.4",
43
- "jwt-decode": "4.0.0",
44
- "expo-web-browser": "~14.2.0",
45
- "expo-linear-gradient": "~15.0.7",
46
- "expo-crypto": "~14.1.4",
47
- "expo-auth-session": "~6.2.1",
48
- "expo-application": "^6.1.5",
49
- "@react-navigation/native": "^7.1.9",
50
- "@react-navigation/drawer": "^7.3.12",
51
- "@react-native-firebase/messaging": "^22.2.0",
52
- "@react-native-firebase/app": "^22.2.0",
53
- "@react-native-community/netinfo": "^11.4.1",
54
- "@react-native-async-storage/async-storage": "~2.2.0",
30
+ "@notifee/react-native": "^9.1.8",
55
31
  "@novu/client": "^2.6.6",
56
- "@notifee/react-native": "^9.1.8"
32
+ "@react-native-async-storage/async-storage": "~2.2.0",
33
+ "@react-native-community/netinfo": "^11.4.1",
34
+ "@react-native-firebase/app": "^22.2.0",
35
+ "@react-native-firebase/messaging": "^22.2.0",
36
+ "@react-navigation/drawer": "^7.3.12",
37
+ "@react-navigation/native": "^7.1.9",
38
+ "expo-application": "~7.0.8",
39
+ "expo-auth-session": "~7.0.11",
40
+ "expo-crypto": "~15.0.9",
41
+ "expo-linear-gradient": "~15.0.7",
42
+ "expo-web-browser": "~15.0.10",
43
+ "jwt-decode": "4.0.0",
44
+ "moment": "^2.29.4",
45
+ "react-native-elements": "^3.4.3",
46
+ "react-native-modalbox": "^2.0.2",
47
+ "react-native-paper": "^5.14.5",
48
+ "react-native-svg": "15.15.4",
49
+ "react-native-swipe-gestures": "^1.0.5",
50
+ "react-native-tab-view": "^4.1.3",
51
+ "react-native-uuid": "^2.0.3",
52
+ "react-native-vector-icons": "^10.2.0",
53
+ "react-native-webview": "13.16.0",
54
+ "react-redux": "^9.2.0",
55
+ "redux": "^4.0.5",
56
+ "redux-persist": "^6.0.0"
57
57
  },
58
58
  "peerDependencies": {
59
- "redux": "^4.0.5",
60
59
  "react": "^19.0.0",
61
- "react-redux": "^9.2.0",
62
60
  "react-native": "^0.81.0",
63
- "react-native-paper": "^5.0.0"
61
+ "react-native-paper": "^5.0.0",
62
+ "react-redux": "^9.2.0",
63
+ "redux": "^4.0.5"
64
64
  },
65
65
  "devDependencies": {
66
- "@expo/vector-icons": "^14.1.0"
66
+ "@expo/vector-icons": "^15.0.3"
67
67
  }
68
- }
68
+ }