@trycourier/courier-react-native 2.5.1 → 3.0.0
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/android/build.gradle +1 -1
- package/android/src/main/java/com/courierreactnative/CourierInboxViewManager.kt +187 -0
- package/android/src/main/java/com/courierreactnative/CourierPreferencesViewManager.kt +128 -0
- package/android/src/main/java/com/courierreactnative/CourierReactNativePackage.kt +3 -1
- package/android/src/main/java/com/courierreactnative/Extensions.kt +68 -1
- package/courier-react-native.podspec +1 -1
- package/ios/{CourierReactNativeViewManager.m → CourierInboxReactNativeManager.m} +1 -1
- package/ios/CourierInboxReactNativeManager.swift +159 -0
- package/ios/CourierPreferencesReactNativeManager.m +11 -0
- package/ios/CourierPreferencesReactNativeManager.swift +140 -0
- package/ios/Utils.swift +70 -0
- package/lib/commonjs/index.js +38 -14
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/Android_CourierSheet.js +6 -0
- package/lib/commonjs/models/Android_CourierSheet.js.map +1 -0
- package/lib/commonjs/models/CourierButton.js +6 -0
- package/lib/commonjs/models/CourierButton.js.map +1 -0
- package/lib/commonjs/models/CourierFont.js +2 -0
- package/lib/commonjs/models/CourierFont.js.map +1 -0
- package/lib/commonjs/models/CourierInboxTheme.js +4 -0
- package/lib/commonjs/models/CourierInfoViewStyle.js +6 -0
- package/lib/commonjs/models/CourierInfoViewStyle.js.map +1 -0
- package/lib/commonjs/models/CourierPreferencesTheme.js +6 -0
- package/lib/commonjs/models/CourierPreferencesTheme.js.map +1 -0
- package/lib/commonjs/models/iOS_CourierCell.js +2 -0
- package/lib/commonjs/models/iOS_CourierCell.js.map +1 -0
- package/lib/commonjs/models/iOS_CourierSheet.js +6 -0
- package/lib/commonjs/models/iOS_CourierSheet.js.map +1 -0
- package/lib/commonjs/views/CourierInboxView.js +1 -1
- package/lib/commonjs/views/CourierInboxView.js.map +1 -1
- package/lib/commonjs/views/CourierPreferencesView.js +37 -0
- package/lib/commonjs/views/CourierPreferencesView.js.map +1 -0
- package/lib/module/index.js +9 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/Android_CourierSheet.js +2 -0
- package/lib/module/models/Android_CourierSheet.js.map +1 -0
- package/lib/module/models/CourierButton.js +2 -0
- package/lib/module/models/CourierButton.js.map +1 -0
- package/lib/module/models/CourierFont.js +2 -0
- package/lib/module/models/CourierFont.js.map +1 -0
- package/lib/module/models/CourierInboxTheme.js +1 -1
- package/lib/module/models/CourierInfoViewStyle.js +2 -0
- package/lib/module/models/CourierInfoViewStyle.js.map +1 -0
- package/lib/module/models/CourierPreferencesTheme.js +2 -0
- package/lib/module/models/CourierPreferencesTheme.js.map +1 -0
- package/lib/module/models/iOS_CourierCell.js +2 -0
- package/lib/module/models/iOS_CourierCell.js.map +1 -0
- package/lib/module/models/iOS_CourierSheet.js +2 -0
- package/lib/module/models/iOS_CourierSheet.js.map +1 -0
- package/lib/module/views/CourierInboxView.js +1 -1
- package/lib/module/views/CourierInboxView.js.map +1 -1
- package/lib/module/views/CourierPreferencesView.js +29 -0
- package/lib/module/views/CourierPreferencesView.js.map +1 -0
- package/lib/typescript/index.d.ts +9 -3
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/models/Android_CourierSheet.d.ts +7 -0
- package/lib/typescript/models/Android_CourierSheet.d.ts.map +1 -0
- package/lib/typescript/models/CourierButton.d.ts +7 -0
- package/lib/typescript/models/CourierButton.d.ts.map +1 -0
- package/lib/typescript/models/CourierFont.d.ts +6 -0
- package/lib/typescript/models/CourierFont.d.ts.map +1 -0
- package/lib/typescript/models/CourierInboxTheme.d.ts +9 -19
- package/lib/typescript/models/CourierInboxTheme.d.ts.map +1 -1
- package/lib/typescript/models/CourierInfoViewStyle.d.ts +7 -0
- package/lib/typescript/models/CourierInfoViewStyle.d.ts.map +1 -0
- package/lib/typescript/models/CourierPreferencesTheme.d.ts +35 -0
- package/lib/typescript/models/CourierPreferencesTheme.d.ts.map +1 -0
- package/lib/typescript/models/CourierUserPreferencesTopic.d.ts +3 -1
- package/lib/typescript/models/CourierUserPreferencesTopic.d.ts.map +1 -1
- package/lib/typescript/models/iOS_CourierCell.d.ts +12 -0
- package/lib/typescript/models/iOS_CourierCell.d.ts.map +1 -0
- package/lib/typescript/models/iOS_CourierSheet.d.ts +6 -0
- package/lib/typescript/models/iOS_CourierSheet.d.ts.map +1 -0
- package/lib/typescript/views/CourierPreferencesView.d.ts +15 -0
- package/lib/typescript/views/CourierPreferencesView.d.ts.map +1 -0
- package/package.json +5 -2
- package/src/index.tsx +9 -3
- package/src/models/Android_CourierSheet.tsx +7 -0
- package/src/models/CourierButton.tsx +7 -0
- package/src/models/CourierFont.tsx +5 -0
- package/src/models/CourierInboxTheme.tsx +9 -21
- package/src/models/CourierInfoViewStyle.tsx +7 -0
- package/src/models/CourierPreferencesTheme.tsx +34 -0
- package/src/models/CourierUserPreferencesTopic.tsx +3 -1
- package/src/models/iOS_CourierCell.tsx +6 -0
- package/src/models/iOS_CourierSheet.tsx +6 -0
- package/src/views/CourierInboxView.tsx +12 -12
- package/src/views/CourierPreferencesView.tsx +53 -0
- package/android/src/main/java/com/courierreactnative/CourierReactNativeViewManager.kt +0 -225
- package/ios/CourierReactNativeViewManager.swift +0 -302
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["models/Android_CourierSheet.tsx"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["models/CourierButton.tsx"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["models/CourierFont.tsx"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=CourierInboxTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["models/CourierInfoViewStyle.tsx"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["models/CourierPreferencesTheme.tsx"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["models/iOS_CourierCell.tsx"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["models/iOS_CourierSheet.tsx"],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect } from "react";
|
|
2
2
|
import { Platform, requireNativeComponent, UIManager, DeviceEventEmitter } from "react-native";
|
|
3
|
-
const ComponentName = '
|
|
3
|
+
const ComponentName = 'CourierInboxView';
|
|
4
4
|
const LINKING_ERROR = `The package '@trycourier/courier-react-native' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
|
|
5
5
|
ios: "- You have run 'pod install'\n",
|
|
6
6
|
default: ''
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","Platform","requireNativeComponent","UIManager","DeviceEventEmitter","ComponentName","LINKING_ERROR","select","ios","default","CourierInbox","getViewManagerConfig","Error","CourierInboxView","props","onClickInboxMessageAtIndexListener","undefined","onClickInboxActionForMessageAtIndexListener","onScrollInboxListener","_onClickInboxMessageA","_onClickInboxActionFo","_onScrollInboxListene","remove","_onClickInboxMessageA2","OS","onClickInboxMessageAtIndex","addListener","event","index","message","_onClickInboxActionFo2","onClickInboxActionForMessageAtIndex","action","_onScrollInboxListene2","onScrollInbox","contentOffset","createElement","theme","light","dark","nativeEvent","style"],"sourceRoot":"../../../src","sources":["views/CourierInboxView.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,QAAQ,EAAEC,sBAAsB,EAAEC,SAAS,EAAaC,kBAAkB,QAA6B,cAAc;AAgB9H,MAAMC,aAAa,GAAG,
|
|
1
|
+
{"version":3,"names":["React","useEffect","Platform","requireNativeComponent","UIManager","DeviceEventEmitter","ComponentName","LINKING_ERROR","select","ios","default","CourierInbox","getViewManagerConfig","Error","CourierInboxView","props","onClickInboxMessageAtIndexListener","undefined","onClickInboxActionForMessageAtIndexListener","onScrollInboxListener","_onClickInboxMessageA","_onClickInboxActionFo","_onScrollInboxListene","remove","_onClickInboxMessageA2","OS","onClickInboxMessageAtIndex","addListener","event","index","message","_onClickInboxActionFo2","onClickInboxActionForMessageAtIndex","action","_onScrollInboxListene2","onScrollInbox","contentOffset","createElement","theme","light","dark","nativeEvent","style"],"sourceRoot":"../../../src","sources":["views/CourierInboxView.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,QAAQ,EAAEC,sBAAsB,EAAEC,SAAS,EAAaC,kBAAkB,QAA6B,cAAc;AAgB9H,MAAMC,aAAa,GAAG,kBAAkB;AAExC,MAAMC,aAAa,GAChB,2FAA0F,GAC3FL,QAAQ,CAACM,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,YAAY,GAChBP,SAAS,CAACQ,oBAAoB,CAACN,aAAa,CAAC,IAAI,IAAI,GACjDH,sBAAsB,CAAwBG,aAAa,CAAC,GAC5D,MAAM;EACJ,MAAM,IAAIO,KAAK,CAACN,aAAa,CAAC;AAChC,CAAC;AAEP,OAAO,MAAMO,gBAAgB,GAAIC,KAA4B,IAAK;EAEhE,IAAIC,kCAAmE,GAAGC,SAAS;EACnF,IAAIC,2CAA4E,GAAGD,SAAS;EAC5F,IAAIE,qBAAsD,GAAGF,SAAS;EAEtEhB,SAAS,CAAC,MAAM;IAEd,OAAO,MAAM;MAAA,IAAAmB,qBAAA,EAAAC,qBAAA,EAAAC,qBAAA;MACX,CAAAF,qBAAA,G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AA0B,CAACE,KAAK,CAACa,WAAW,CAAE;IAC1FT,mCAAmC,EAAGJ,KAAU,IAAKI,mCAAmC,CAACJ,KAAK,CAACa,WAAW,CAAE;IAC5GN,aAAa,EAAGP,KAAU,IAAKO,aAAa,CAACP,KAAK,CAACa,WAAW,CAAE;IAChEC,KAAK,EAAE3B,KAAK,CAAC2B;EAAM,CACpB,CAAC;AAGN,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Platform, requireNativeComponent, UIManager } from "react-native";
|
|
3
|
+
const ComponentName = 'CourierPreferencesView';
|
|
4
|
+
const LINKING_ERROR = `The package '@trycourier/courier-react-native' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
|
|
5
|
+
ios: "- You have run 'pod install'\n",
|
|
6
|
+
default: ''
|
|
7
|
+
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
|
|
8
|
+
const CourierPreferences = UIManager.getViewManagerConfig(ComponentName) != null ? requireNativeComponent(ComponentName) : () => {
|
|
9
|
+
throw new Error(LINKING_ERROR);
|
|
10
|
+
};
|
|
11
|
+
export const CourierPreferencesView = props => {
|
|
12
|
+
const onPreferenceError = event => {
|
|
13
|
+
// Parse the native event data
|
|
14
|
+
if (props.onPreferenceError) {
|
|
15
|
+
const message = event["error"];
|
|
16
|
+
props.onPreferenceError(message);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
return /*#__PURE__*/React.createElement(CourierPreferences, {
|
|
20
|
+
mode: props.mode,
|
|
21
|
+
theme: props.theme ?? {
|
|
22
|
+
light: undefined,
|
|
23
|
+
dark: undefined
|
|
24
|
+
},
|
|
25
|
+
onPreferenceError: event => onPreferenceError(event.nativeEvent),
|
|
26
|
+
style: props.style
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=CourierPreferencesView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Platform","requireNativeComponent","UIManager","ComponentName","LINKING_ERROR","select","ios","default","CourierPreferences","getViewManagerConfig","Error","CourierPreferencesView","props","onPreferenceError","event","message","createElement","mode","theme","light","undefined","dark","nativeEvent","style"],"sourceRoot":"../../../src","sources":["views/CourierPreferencesView.tsx"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,sBAAsB,EAAEC,SAAS,QAAmB,cAAc;AAarF,MAAMC,aAAa,GAAG,wBAAwB;AAE9C,MAAMC,aAAa,GAChB,2FAA0F,GAC3FJ,QAAQ,CAACK,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,kBAAkB,GACtBN,SAAS,CAACO,oBAAoB,CAACN,aAAa,CAAC,IAAI,IAAI,GACjDF,sBAAsB,CAA0BE,aAAa,CAAC,GAC9D,MAAM;EACJ,MAAM,IAAIO,KAAK,CAACN,aAAa,CAAC;AAChC,CAAC;AAEP,OAAO,MAAMO,sBAAsB,GAAIC,KAA8B,IAAK;EAExE,MAAMC,iBAAiB,GAAIC,KAAU,IAAK;IAExC;IACA,IAAIF,KAAK,CAACC,iBAAiB,EAAE;MAE3B,MAAME,OAAO,GAAGD,KAAK,CAAC,OAAO,CAAC;MAC9BF,KAAK,CAACC,iBAAiB,CAACE,OAAO,CAAC;IAElC;EAEF,CAAC;EAED,oBACEhB,KAAA,CAAAiB,aAAA,CAACR,kBAAkB;IACjBS,IAAI,EAAEL,KAAK,CAACK,IAAK;IACjBC,KAAK,EAAEN,KAAK,CAACM,KAAK,IAAI;MAAEC,KAAK,EAAEC,SAAS;MAAEC,IAAI,EAAED;IAAU,CAAE;IAC5DP,iBAAiB,EAAGC,KAAU,IAAKD,iBAAiB,CAACC,KAAK,CAACQ,WAAW,CAAE;IACxEC,KAAK,EAAEX,KAAK,CAACW;EAAM,CACpB,CAAC;AAGN,CAAC"}
|
|
@@ -8,13 +8,19 @@ import { CourierUserPreferencesChannel } from './models/CourierUserPreferencesCh
|
|
|
8
8
|
import { CourierUserPreferencesStatus } from './models/CourierUserPreferencesStatus';
|
|
9
9
|
import { CourierPushProvider } from './models/CourierPushProvider';
|
|
10
10
|
export { CourierInboxView } from './views/CourierInboxView';
|
|
11
|
+
export { CourierPreferencesView } from './views/CourierPreferencesView';
|
|
11
12
|
export { CourierInboxListener } from './models/CourierInboxListener';
|
|
12
13
|
export { CourierPushListener } from './models/CourierPushListener';
|
|
13
14
|
export { CourierAuthenticationListener } from './models/CourierAuthenticationListener';
|
|
14
15
|
export { CourierUserPreferencesChannel } from './models/CourierUserPreferencesChannel';
|
|
15
16
|
export { CourierUserPreferencesStatus } from './models/CourierUserPreferencesStatus';
|
|
16
17
|
export { CourierPushProvider } from './models/CourierPushProvider';
|
|
17
|
-
export {
|
|
18
|
+
export { CourierFont } from './models/CourierFont';
|
|
19
|
+
export { CourierButton } from './models/CourierButton';
|
|
20
|
+
export { CourierInfoViewStyle } from './models/CourierInfoViewStyle';
|
|
21
|
+
export { iOS_CourierCell } from './models/iOS_CourierCell';
|
|
22
|
+
export { iOS_CourierSheet } from './models/iOS_CourierSheet';
|
|
23
|
+
export { CourierInboxButtonStyle, CourierInboxTextStyle, CourierInboxUnreadIndicatorStyle, CourierInboxTheme } from './models/CourierInboxTheme';
|
|
18
24
|
export type iOSForegroundPresentationOptions = 'sound' | 'badge' | 'list' | 'banner';
|
|
19
25
|
declare class Courier {
|
|
20
26
|
private static _sharedInstance;
|
|
@@ -79,8 +85,8 @@ declare class Courier {
|
|
|
79
85
|
onPushNotificationDelivered?: (push: any) => void;
|
|
80
86
|
}): CourierPushListener;
|
|
81
87
|
/**
|
|
82
|
-
* Gets the user id that is currently being used
|
|
83
|
-
* This is the user id associated with the
|
|
88
|
+
* Gets the user id that is currently being used.
|
|
89
|
+
* This is the user id associated with the network requests the sdk does.
|
|
84
90
|
*/
|
|
85
91
|
get userId(): string | undefined;
|
|
86
92
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAInE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,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E,MAAM,CAAA;KAAE,GAAG,MAAM;IAuBjE;;;OAGG;IACU,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAI1C;;;OAGG;IACU,uBAAuB,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAI/D;;;;OAIG;IACI,uBAAuB,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAI9D;;OAEG;IACU,kBAAkB,CAAC,KAAK,CAAC,EAAE;QAAE,gBAAgB,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAItG;;OAEG;IACU,uBAAuB,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAItG;;OAEG;IACU,uBAAuB,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,4BAA4B,CAAC;QAAC,gBAAgB,EAAE,OAAO,CAAC;QAAC,aAAa,EAAE,6BAA6B,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAIjM;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Android_CourierSheet.d.ts","sourceRoot":"","sources":["../../../src/models/Android_CourierSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CourierButton.d.ts","sourceRoot":"","sources":["../../../src/models/CourierButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CourierFont.d.ts","sourceRoot":"","sources":["../../../src/models/CourierFont.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -1,37 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
color?: string;
|
|
5
|
-
}
|
|
1
|
+
import { CourierButton } from "./CourierButton";
|
|
2
|
+
import { CourierFont } from "./CourierFont";
|
|
3
|
+
import { CourierInfoViewStyle } from "./CourierInfoViewStyle";
|
|
6
4
|
export interface CourierInboxButtonStyle {
|
|
7
|
-
unread?:
|
|
8
|
-
read?:
|
|
9
|
-
}
|
|
10
|
-
export interface CourierInboxButton {
|
|
11
|
-
font?: CourierInboxFont;
|
|
12
|
-
backgroundColor?: string;
|
|
13
|
-
cornerRadius?: number;
|
|
5
|
+
unread?: CourierButton;
|
|
6
|
+
read?: CourierButton;
|
|
14
7
|
}
|
|
15
8
|
export interface CourierInboxTextStyle {
|
|
16
|
-
unread?:
|
|
17
|
-
read?:
|
|
18
|
-
}
|
|
19
|
-
export interface CourierInboxInfoViewStyle {
|
|
20
|
-
font?: CourierInboxFont;
|
|
21
|
-
button?: CourierInboxButton;
|
|
9
|
+
unread?: CourierFont;
|
|
10
|
+
read?: CourierFont;
|
|
22
11
|
}
|
|
23
12
|
export interface CourierInboxUnreadIndicatorStyle {
|
|
24
13
|
indicator?: 'dot' | 'line';
|
|
25
14
|
color?: string;
|
|
26
15
|
}
|
|
27
16
|
export interface CourierInboxTheme {
|
|
17
|
+
brandId?: string;
|
|
28
18
|
loadingIndicatorColor?: string;
|
|
29
19
|
unreadIndicatorStyle?: CourierInboxUnreadIndicatorStyle;
|
|
30
20
|
titleStyle?: CourierInboxTextStyle;
|
|
31
21
|
timeStyle?: CourierInboxTextStyle;
|
|
32
22
|
bodyStyle?: CourierInboxTextStyle;
|
|
33
23
|
buttonStyle?: CourierInboxButtonStyle;
|
|
34
|
-
infoViewStyle?:
|
|
24
|
+
infoViewStyle?: CourierInfoViewStyle;
|
|
35
25
|
iOS?: {
|
|
36
26
|
messageAnimationStyle?: 'fade' | 'right' | 'left' | 'top' | 'bottom' | 'none' | 'middle' | 'automatic';
|
|
37
27
|
cellStyles?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CourierInboxTheme.d.ts","sourceRoot":"","sources":["../../../src/models/CourierInboxTheme.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"CourierInboxTheme.d.ts","sourceRoot":"","sources":["../../../src/models/CourierInboxTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAE7D,MAAM,WAAW,uBAAuB;IACtC,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,IAAI,CAAC,EAAE,aAAa,CAAA;CACrB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB;AAED,MAAM,WAAW,gCAAgC;IAC/C,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,oBAAoB,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|
+
import { Android_CourierSheet } from "./Android_CourierSheet";
|
|
2
|
+
import { CourierButton } from "./CourierButton";
|
|
3
|
+
import { CourierFont } from "./CourierFont";
|
|
4
|
+
import { CourierInfoViewStyle } from "./CourierInfoViewStyle";
|
|
5
|
+
import { iOS_CourierCell } from "./iOS_CourierCell";
|
|
6
|
+
import { iOS_CourierSheet } from "./iOS_CourierSheet";
|
|
7
|
+
export type CourierPreferencesChannel = 'direct_message' | 'email' | 'push' | 'sms' | 'webhook';
|
|
8
|
+
export type CourierPreferencesMode = {
|
|
9
|
+
type: 'topic';
|
|
10
|
+
} | {
|
|
11
|
+
type: 'channels';
|
|
12
|
+
channels: CourierPreferencesChannel[];
|
|
13
|
+
};
|
|
14
|
+
export interface CourierPreferencesTheme {
|
|
15
|
+
brandId?: string;
|
|
16
|
+
loadingIndicatorColor?: string;
|
|
17
|
+
sectionTitleFont?: CourierFont;
|
|
18
|
+
topicTitleFont?: CourierFont;
|
|
19
|
+
topicSubtitleFont?: CourierFont;
|
|
20
|
+
topicButton?: CourierButton;
|
|
21
|
+
sheetTitleFont?: CourierFont;
|
|
22
|
+
infoViewStyle?: CourierInfoViewStyle;
|
|
23
|
+
iOS?: {
|
|
24
|
+
topicCellStyles?: iOS_CourierCell;
|
|
25
|
+
sheetSettingStyles?: iOS_CourierSheet;
|
|
26
|
+
sheetCornerRadius?: number;
|
|
27
|
+
sheetCellStyles?: iOS_CourierCell;
|
|
28
|
+
};
|
|
29
|
+
android?: {
|
|
30
|
+
topicDividerItemDecoration?: 'none' | 'vertical';
|
|
31
|
+
sheetDividerItemDecoration?: 'none' | 'vertical';
|
|
32
|
+
sheetSettingStyles?: Android_CourierSheet;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=CourierPreferencesTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CourierPreferencesTheme.d.ts","sourceRoot":"","sources":["../../../src/models/CourierPreferencesTheme.tsx"],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BAAkB,CAAC,EAAE,oBAAoB,CAAA;KAC1C,CAAA;CACF"}
|
|
@@ -2,9 +2,11 @@ import { CourierUserPreferencesChannel } from "./CourierUserPreferencesChannel";
|
|
|
2
2
|
import { CourierUserPreferencesStatus } from "./CourierUserPreferencesStatus";
|
|
3
3
|
export interface CourierUserPreferencesTopic {
|
|
4
4
|
defaultStatus?: string;
|
|
5
|
-
hasCustomRouting?:
|
|
5
|
+
hasCustomRouting?: boolean;
|
|
6
6
|
customRouting?: CourierUserPreferencesChannel[];
|
|
7
7
|
status?: CourierUserPreferencesStatus;
|
|
8
|
+
setionName?: string;
|
|
9
|
+
setionId?: string;
|
|
8
10
|
topicId?: string;
|
|
9
11
|
topicName?: string;
|
|
10
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CourierUserPreferencesTopic.d.ts","sourceRoot":"","sources":["../../../src/models/CourierUserPreferencesTopic.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,MAAM,WAAW,2BAA2B;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"CourierUserPreferencesTopic.d.ts","sourceRoot":"","sources":["../../../src/models/CourierUserPreferencesTopic.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,MAAM,WAAW,2BAA2B;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,6BAA6B,EAAE,CAAC;IAChD,MAAM,CAAC,EAAE,4BAA4B,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface iOS_CourierCell {
|
|
2
|
+
separatorStyle?: 'none' | 'singleLine' | 'singleLineEtched';
|
|
3
|
+
separatorInsets?: {
|
|
4
|
+
top?: number;
|
|
5
|
+
left?: number;
|
|
6
|
+
bottom?: number;
|
|
7
|
+
right?: number;
|
|
8
|
+
};
|
|
9
|
+
separatorColor?: string;
|
|
10
|
+
selectionStyle?: 'none' | 'blue' | 'gray' | 'default';
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=iOS_CourierCell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iOS_CourierCell.d.ts","sourceRoot":"","sources":["../../../src/models/iOS_CourierCell.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,kBAAkB,CAAA;IAC3D,eAAe,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAClF,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CACtD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iOS_CourierSheet.d.ts","sourceRoot":"","sources":["../../../src/models/iOS_CourierSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ViewStyle } from "react-native";
|
|
3
|
+
import { CourierPreferencesMode, CourierPreferencesTheme } from "src/models/CourierPreferencesTheme";
|
|
4
|
+
type CourierPreferencesProps = {
|
|
5
|
+
mode?: CourierPreferencesMode;
|
|
6
|
+
theme?: {
|
|
7
|
+
light?: CourierPreferencesTheme;
|
|
8
|
+
dark?: CourierPreferencesTheme;
|
|
9
|
+
};
|
|
10
|
+
onPreferenceError?: (message: string) => void;
|
|
11
|
+
style?: ViewStyle;
|
|
12
|
+
};
|
|
13
|
+
export declare const CourierPreferencesView: (props: CourierPreferencesProps) => React.JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=CourierPreferencesView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CourierPreferencesView.d.ts","sourceRoot":"","sources":["../../../src/views/CourierPreferencesView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAA+C,SAAS,EAAE,MAAM,cAAc,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAErG,KAAK,uBAAuB,GAAG;IAC7B,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAC9B,KAAK,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,uBAAuB,CAAC;QAChC,IAAI,CAAC,EAAE,uBAAuB,CAAA;KAC/B,CAAC;IACF,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAiBF,eAAO,MAAM,sBAAsB,UAAW,uBAAuB,sBAuBpE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trycourier/courier-react-native",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Inbox & Push Notifications for React Native",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"pod-install": "^0.1.0",
|
|
73
73
|
"prettier": "^2.0.5",
|
|
74
74
|
"react": "18.2.0",
|
|
75
|
-
"react-native": "0.
|
|
75
|
+
"react-native": "0.73.7",
|
|
76
76
|
"react-native-builder-bob": "^0.21.3",
|
|
77
77
|
"release-it": "^15.0.0",
|
|
78
78
|
"turbo": "^1.10.7",
|
|
@@ -161,5 +161,8 @@
|
|
|
161
161
|
}
|
|
162
162
|
]
|
|
163
163
|
]
|
|
164
|
+
},
|
|
165
|
+
"dependencies": {
|
|
166
|
+
"react-native-toast-message": "^2.2.0"
|
|
164
167
|
}
|
|
165
168
|
}
|
package/src/index.tsx
CHANGED
|
@@ -19,13 +19,19 @@ import { Events, Utils } from './utils';
|
|
|
19
19
|
|
|
20
20
|
// Exports
|
|
21
21
|
export { CourierInboxView } from './views/CourierInboxView';
|
|
22
|
+
export { CourierPreferencesView } from './views/CourierPreferencesView';
|
|
22
23
|
export { CourierInboxListener } from './models/CourierInboxListener';
|
|
23
24
|
export { CourierPushListener } from './models/CourierPushListener';
|
|
24
25
|
export { CourierAuthenticationListener } from './models/CourierAuthenticationListener';
|
|
25
26
|
export { CourierUserPreferencesChannel } from './models/CourierUserPreferencesChannel';
|
|
26
27
|
export { CourierUserPreferencesStatus } from './models/CourierUserPreferencesStatus';
|
|
27
28
|
export { CourierPushProvider } from './models/CourierPushProvider';
|
|
28
|
-
export {
|
|
29
|
+
export { CourierFont } from './models/CourierFont';
|
|
30
|
+
export { CourierButton } from './models/CourierButton';
|
|
31
|
+
export { CourierInfoViewStyle } from './models/CourierInfoViewStyle';
|
|
32
|
+
export { iOS_CourierCell } from './models/iOS_CourierCell';
|
|
33
|
+
export { iOS_CourierSheet } from './models/iOS_CourierSheet';
|
|
34
|
+
export { CourierInboxButtonStyle, CourierInboxTextStyle, CourierInboxUnreadIndicatorStyle, CourierInboxTheme } from './models/CourierInboxTheme';
|
|
29
35
|
export type iOSForegroundPresentationOptions = 'sound' | 'badge' | 'list' | 'banner';
|
|
30
36
|
|
|
31
37
|
const LINKING_ERROR =
|
|
@@ -207,8 +213,8 @@ class Courier {
|
|
|
207
213
|
}
|
|
208
214
|
|
|
209
215
|
/**
|
|
210
|
-
* Gets the user id that is currently being used
|
|
211
|
-
* This is the user id associated with the
|
|
216
|
+
* Gets the user id that is currently being used.
|
|
217
|
+
* This is the user id associated with the network requests the sdk does.
|
|
212
218
|
*/
|
|
213
219
|
get userId(): string | undefined {
|
|
214
220
|
return CourierReactNativeModules.getUserId() ?? undefined
|
|
@@ -1,28 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
color?: string
|
|
5
|
-
}
|
|
1
|
+
import { CourierButton } from "./CourierButton"
|
|
2
|
+
import { CourierFont } from "./CourierFont"
|
|
3
|
+
import { CourierInfoViewStyle } from "./CourierInfoViewStyle"
|
|
6
4
|
|
|
7
5
|
export interface CourierInboxButtonStyle {
|
|
8
|
-
unread?:
|
|
9
|
-
read?:
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface CourierInboxButton {
|
|
13
|
-
font?: CourierInboxFont
|
|
14
|
-
backgroundColor?: string
|
|
15
|
-
cornerRadius?: number
|
|
6
|
+
unread?: CourierButton
|
|
7
|
+
read?: CourierButton
|
|
16
8
|
}
|
|
17
9
|
|
|
18
10
|
export interface CourierInboxTextStyle {
|
|
19
|
-
unread?:
|
|
20
|
-
read?:
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface CourierInboxInfoViewStyle {
|
|
24
|
-
font?: CourierInboxFont
|
|
25
|
-
button?: CourierInboxButton
|
|
11
|
+
unread?: CourierFont
|
|
12
|
+
read?: CourierFont
|
|
26
13
|
}
|
|
27
14
|
|
|
28
15
|
export interface CourierInboxUnreadIndicatorStyle {
|
|
@@ -31,13 +18,14 @@ export interface CourierInboxUnreadIndicatorStyle {
|
|
|
31
18
|
}
|
|
32
19
|
|
|
33
20
|
export interface CourierInboxTheme {
|
|
21
|
+
brandId?: string,
|
|
34
22
|
loadingIndicatorColor?: string
|
|
35
23
|
unreadIndicatorStyle?: CourierInboxUnreadIndicatorStyle
|
|
36
24
|
titleStyle?: CourierInboxTextStyle
|
|
37
25
|
timeStyle?: CourierInboxTextStyle
|
|
38
26
|
bodyStyle?: CourierInboxTextStyle
|
|
39
27
|
buttonStyle?: CourierInboxButtonStyle
|
|
40
|
-
infoViewStyle?:
|
|
28
|
+
infoViewStyle?: CourierInfoViewStyle
|
|
41
29
|
iOS?: {
|
|
42
30
|
messageAnimationStyle?: 'fade' | 'right' | 'left' | 'top' | 'bottom' | 'none' | 'middle' | 'automatic',
|
|
43
31
|
cellStyles?: {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Android_CourierSheet } from "./Android_CourierSheet";
|
|
2
|
+
import { CourierButton } from "./CourierButton";
|
|
3
|
+
import { CourierFont } from "./CourierFont"
|
|
4
|
+
import { CourierInfoViewStyle } from "./CourierInfoViewStyle";
|
|
5
|
+
import { iOS_CourierCell } from "./iOS_CourierCell";
|
|
6
|
+
import { iOS_CourierSheet } from "./iOS_CourierSheet";
|
|
7
|
+
|
|
8
|
+
export type CourierPreferencesChannel = 'direct_message' | 'email' | 'push' | 'sms' | 'webhook';
|
|
9
|
+
|
|
10
|
+
export type CourierPreferencesMode =
|
|
11
|
+
| { type: 'topic' }
|
|
12
|
+
| { type: 'channels', channels: CourierPreferencesChannel[] };
|
|
13
|
+
|
|
14
|
+
export interface CourierPreferencesTheme {
|
|
15
|
+
brandId?: string
|
|
16
|
+
loadingIndicatorColor?: string
|
|
17
|
+
sectionTitleFont?: CourierFont
|
|
18
|
+
topicTitleFont?: CourierFont
|
|
19
|
+
topicSubtitleFont?: CourierFont
|
|
20
|
+
topicButton?: CourierButton
|
|
21
|
+
sheetTitleFont?: CourierFont
|
|
22
|
+
infoViewStyle?: CourierInfoViewStyle
|
|
23
|
+
iOS?: {
|
|
24
|
+
topicCellStyles?: iOS_CourierCell
|
|
25
|
+
sheetSettingStyles?: iOS_CourierSheet
|
|
26
|
+
sheetCornerRadius?: number
|
|
27
|
+
sheetCellStyles?: iOS_CourierCell
|
|
28
|
+
},
|
|
29
|
+
android?: {
|
|
30
|
+
topicDividerItemDecoration?: 'none' | 'vertical'
|
|
31
|
+
sheetDividerItemDecoration?: 'none' | 'vertical'
|
|
32
|
+
sheetSettingStyles?: Android_CourierSheet
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -3,9 +3,11 @@ import { CourierUserPreferencesStatus } from "./CourierUserPreferencesStatus";
|
|
|
3
3
|
|
|
4
4
|
export interface CourierUserPreferencesTopic {
|
|
5
5
|
defaultStatus?: string;
|
|
6
|
-
hasCustomRouting?:
|
|
6
|
+
hasCustomRouting?: boolean;
|
|
7
7
|
customRouting?: CourierUserPreferencesChannel[];
|
|
8
8
|
status?: CourierUserPreferencesStatus;
|
|
9
|
+
setionName?: string;
|
|
10
|
+
setionId?: string;
|
|
9
11
|
topicId?: string;
|
|
10
12
|
topicName?: string;
|
|
11
13
|
}
|