From acb9981e341d99581ccbac738036cb4de19e470f Mon Sep 17 00:00:00 2001 From: Evan Greer Date: Tue, 17 May 2022 14:51:28 -0600 Subject: [PATCH 1/8] adds nav title toggling --- package.json | 4 +-- ts/IterableInbox.tsx | 46 ++++++++++++++++++---------------- ts/IterableInboxEmptyState.tsx | 4 +-- yarn.lock | 24 +++++++++--------- 4 files changed, 41 insertions(+), 37 deletions(-) diff --git a/package.json b/package.json index d5b2d396d..0b388b10a 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "@babel/core": "^7.10.2", "@testing-library/react-native": "^7.2.0", "@types/jest": "^26.0.0", - "@types/react": "^16.9.23", - "@types/react-native": "^0.62.13", + "@types/react": "^18.0.9", + "@types/react-native": "^0.67.7", "@types/react-native-vector-icons": "^6.4.10", "@types/react-test-renderer": "^17.0.1", "eslint": "^7.2.0", diff --git a/ts/IterableInbox.tsx b/ts/IterableInbox.tsx index 284128d9a..614830a0b 100644 --- a/ts/IterableInbox.tsx +++ b/ts/IterableInbox.tsx @@ -41,7 +41,8 @@ type inboxProps = { customizations?: IterableInboxCustomizations, tabBarHeight?: number, tabBarPadding?: number, - safeAreaMode?: boolean + safeAreaMode?: boolean, + showNavTitle?: boolean } const IterableInbox = ({ @@ -50,7 +51,8 @@ const IterableInbox = ({ customizations = {} as IterableInboxCustomizations, tabBarHeight = 80, tabBarPadding = 20, - safeAreaMode = true + safeAreaMode = true, + showNavTitle = true }: inboxProps) => { const defaultInboxTitle = "Inbox" const inboxDataModel = new IterableInboxDataModel() @@ -243,9 +245,11 @@ const IterableInbox = ({ function showMessageList(loading: boolean) { return ( - - {customizations?.navTitle ? customizations?.navTitle : defaultInboxTitle} - + {showNavTitle ? + + {customizations?.navTitle ? customizations?.navTitle : defaultInboxTitle} + + : null} {rowViewModels.length ? - {showMessageList(loading)} - {showMessageDisplay(rowViewModels, selectedRowViewModelIdx)} + transform: [ + { + translateX: animatedValue.interpolate({ + inputRange: [0, 1], + outputRange: [0, -width] + }) + } + ], + height: '100%', + flexDirection: 'row', + width: 2 * width, + justifyContent: 'flex-start' + }} + > + {showMessageList(loading)} + {showMessageDisplay(rowViewModels, selectedRowViewModelIdx)} return( diff --git a/ts/IterableInboxEmptyState.tsx b/ts/IterableInboxEmptyState.tsx index 1d4dff1b8..60a915223 100644 --- a/ts/IterableInboxEmptyState.tsx +++ b/ts/IterableInboxEmptyState.tsx @@ -39,7 +39,7 @@ const IterableInboxEmptyState = ({ body } = styles - container = { ...container, height: height - navTitleHeight - tabBarHeight - tabBarPadding } + // container = { ...container, height: height - navTitleHeight - tabBarHeight - tabBarPadding } if (!isPortrait) { container = { ...container, height: height - navTitleHeight } @@ -59,7 +59,7 @@ const IterableInboxEmptyState = ({ const styles = StyleSheet.create({ container: { - height: 0, + height: '100%', backgroundColor: 'whitesmoke', flexDirection: 'column', justifyContent: 'center', diff --git a/yarn.lock b/yarn.lock index 7d3619504..13507ffbd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1382,10 +1382,10 @@ dependencies: "@types/react" "*" -"@types/react-native@^0.62.13": - version "0.62.18" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.62.18.tgz#ad63691e7c44edef2beeb6af52b2eb942c3ed8a1" - integrity sha512-7QfU8EzIYxYqeXpPf8QNv2xi8hrePlgTbRATRo+plRSdVfJu7N6sAXqrFxKJp6bGLvp82GV1gczl93gqiAfXPA== +"@types/react-native@^0.67.7": + version "0.67.7" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.67.7.tgz#903b7d56fb6a95ca0de897f2925c04ee0d4adee3" + integrity sha512-G7vi9vE226diNNXVNbIa8HH/wPxMWHTHkn9iQtQSezaWzO5WNsKZZW2/TOzCehtBDVx4MZieTs6GsdtpBBttMA== dependencies: "@types/react" "*" @@ -1405,19 +1405,19 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^16.9.23": - version "16.14.25" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.25.tgz#d003f712c7563fdef5a87327f1892825af375608" - integrity sha512-cXRVHd7vBT5v1is72mmvmsg9stZrbJO04DJqFeh3Yj2tVKO6vmxg5BI+ybI6Ls7ROXRG3aFbZj9x0WA3ZAoDQw== +"@types/react@^17": + version "17.0.44" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.44.tgz#c3714bd34dd551ab20b8015d9d0dbec812a51ec7" + integrity sha512-Ye0nlw09GeMp2Suh8qoOv0odfgCoowfM/9MG6WeRD60Gq9wS90bdkdRtYbRkNhXOpG4H+YXGvj4wOWhAC0LJ1g== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^17": - version "17.0.44" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.44.tgz#c3714bd34dd551ab20b8015d9d0dbec812a51ec7" - integrity sha512-Ye0nlw09GeMp2Suh8qoOv0odfgCoowfM/9MG6WeRD60Gq9wS90bdkdRtYbRkNhXOpG4H+YXGvj4wOWhAC0LJ1g== +"@types/react@^18.0.9": + version "18.0.9" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.9.tgz#d6712a38bd6cd83469603e7359511126f122e878" + integrity sha512-9bjbg1hJHUm4De19L1cHiW0Jvx3geel6Qczhjd0qY5VKVE2X5+x77YxAepuCwVh4vrgZJdgEJw48zrhRIeF4Nw== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" From bdd9d44950b620cc49ccd26259e1fad343bfc28e Mon Sep 17 00:00:00 2001 From: Evan Greer Date: Tue, 17 May 2022 14:55:35 -0600 Subject: [PATCH 2/8] minor edits --- ts/IterableInboxEmptyState.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/IterableInboxEmptyState.tsx b/ts/IterableInboxEmptyState.tsx index 60a915223..1d4dff1b8 100644 --- a/ts/IterableInboxEmptyState.tsx +++ b/ts/IterableInboxEmptyState.tsx @@ -39,7 +39,7 @@ const IterableInboxEmptyState = ({ body } = styles - // container = { ...container, height: height - navTitleHeight - tabBarHeight - tabBarPadding } + container = { ...container, height: height - navTitleHeight - tabBarHeight - tabBarPadding } if (!isPortrait) { container = { ...container, height: height - navTitleHeight } @@ -59,7 +59,7 @@ const IterableInboxEmptyState = ({ const styles = StyleSheet.create({ container: { - height: '100%', + height: 0, backgroundColor: 'whitesmoke', flexDirection: 'column', justifyContent: 'center', From 8adb4c7738f93a7b5044f2a34ccfc9e2996da161 Mon Sep 17 00:00:00 2001 From: Evan Greer Date: Tue, 24 May 2022 14:55:01 -0600 Subject: [PATCH 3/8] reverted @types/react and @types/react-native versions --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0b388b10a..d5b2d396d 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "@babel/core": "^7.10.2", "@testing-library/react-native": "^7.2.0", "@types/jest": "^26.0.0", - "@types/react": "^18.0.9", - "@types/react-native": "^0.67.7", + "@types/react": "^16.9.23", + "@types/react-native": "^0.62.13", "@types/react-native-vector-icons": "^6.4.10", "@types/react-test-renderer": "^17.0.1", "eslint": "^7.2.0", From 2ad98733f1f3d33033d1e15991ac966de558e0ff Mon Sep 17 00:00:00 2001 From: Evan Greer Date: Tue, 24 May 2022 14:57:03 -0600 Subject: [PATCH 4/8] reverted yarn.lock file --- yarn.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/yarn.lock b/yarn.lock index 13507ffbd..adba94ec4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1382,10 +1382,10 @@ dependencies: "@types/react" "*" -"@types/react-native@^0.67.7": - version "0.67.7" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.67.7.tgz#903b7d56fb6a95ca0de897f2925c04ee0d4adee3" - integrity sha512-G7vi9vE226diNNXVNbIa8HH/wPxMWHTHkn9iQtQSezaWzO5WNsKZZW2/TOzCehtBDVx4MZieTs6GsdtpBBttMA== +"@types/react-native@^0.62.13": + version "0.62.18" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.62.18.tgz#ad63691e7c44edef2beeb6af52b2eb942c3ed8a1" + integrity sha512-7QfU8EzIYxYqeXpPf8QNv2xi8hrePlgTbRATRo+plRSdVfJu7N6sAXqrFxKJp6bGLvp82GV1gczl93gqiAfXPA== dependencies: "@types/react" "*" @@ -1405,19 +1405,19 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^17": - version "17.0.44" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.44.tgz#c3714bd34dd551ab20b8015d9d0dbec812a51ec7" - integrity sha512-Ye0nlw09GeMp2Suh8qoOv0odfgCoowfM/9MG6WeRD60Gq9wS90bdkdRtYbRkNhXOpG4H+YXGvj4wOWhAC0LJ1g== +"@types/react@^16.9.23": + version "16.14.26" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.26.tgz#82540a240ba7207ebe87d9579051bc19c9ef7605" + integrity sha512-c/5CYyciOO4XdFcNhZW1O2woVx86k4T+DO2RorHZL7EhitkNQgSD/SgpdZJAUJa/qjVgOmTM44gHkAdZSXeQuQ== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^18.0.9": - version "18.0.9" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.9.tgz#d6712a38bd6cd83469603e7359511126f122e878" - integrity sha512-9bjbg1hJHUm4De19L1cHiW0Jvx3geel6Qczhjd0qY5VKVE2X5+x77YxAepuCwVh4vrgZJdgEJw48zrhRIeF4Nw== +"@types/react@^17": + version "17.0.44" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.44.tgz#c3714bd34dd551ab20b8015d9d0dbec812a51ec7" + integrity sha512-Ye0nlw09GeMp2Suh8qoOv0odfgCoowfM/9MG6WeRD60Gq9wS90bdkdRtYbRkNhXOpG4H+YXGvj4wOWhAC0LJ1g== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" From 9fee3bbbfbba53a693d2bac8c4d049e2da1b325d Mon Sep 17 00:00:00 2001 From: Evan Greer Date: Wed, 1 Jun 2022 12:08:48 -0600 Subject: [PATCH 5/8] adds custom action handling in message display component --- package.json | 4 ++-- ts/IterableInboxMessageDisplay.tsx | 12 ++++++++++++ yarn.lock | 24 ++++++++++++------------ 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index d5b2d396d..0b388b10a 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "@babel/core": "^7.10.2", "@testing-library/react-native": "^7.2.0", "@types/jest": "^26.0.0", - "@types/react": "^16.9.23", - "@types/react-native": "^0.62.13", + "@types/react": "^18.0.9", + "@types/react-native": "^0.67.7", "@types/react-native-vector-icons": "^6.4.10", "@types/react-test-renderer": "^17.0.1", "eslint": "^7.2.0", diff --git a/ts/IterableInboxMessageDisplay.tsx b/ts/IterableInboxMessageDisplay.tsx index b36291cd0..27135c6f6 100644 --- a/ts/IterableInboxMessageDisplay.tsx +++ b/ts/IterableInboxMessageDisplay.tsx @@ -160,12 +160,24 @@ const IterableInboxMessageDisplay = ({ Iterable.trackInAppClick(rowViewModel.inAppMessage, IterableInAppLocation.inbox, URL) Iterable.trackInAppClose(rowViewModel.inAppMessage, IterableInAppLocation.inbox, IterableInAppCloseSource.link, URL) + //handle delete action if (URL === 'iterable://delete') { returnToInbox(() => deleteRow(rowViewModel.inAppMessage.messageId)) + //handle dismiss action } else if(URL === 'iterable://dismiss') { returnToInbox() + //handle external link } else if (URL.slice(0, 4) === 'http') { returnToInbox(() => Linking.openURL(URL)) + //handle custom action + } else if (URL.slice(0, 7) === 'itbl://' || URL.slice(0,9) === 'action://') { + (URL.slice(0, 7) === 'itbl://') ? action.type = URL.replace('itbl://', '') : action.type = URL.replace('action://', '') + returnToInbox(() => { + if(Iterable.savedConfig.customActionHandler) { + Iterable.savedConfig.customActionHandler(action, context) + } + }) + //handle deep link or error link } else { returnToInbox(() => { if(Iterable.savedConfig.urlHandler) { diff --git a/yarn.lock b/yarn.lock index adba94ec4..13507ffbd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1382,10 +1382,10 @@ dependencies: "@types/react" "*" -"@types/react-native@^0.62.13": - version "0.62.18" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.62.18.tgz#ad63691e7c44edef2beeb6af52b2eb942c3ed8a1" - integrity sha512-7QfU8EzIYxYqeXpPf8QNv2xi8hrePlgTbRATRo+plRSdVfJu7N6sAXqrFxKJp6bGLvp82GV1gczl93gqiAfXPA== +"@types/react-native@^0.67.7": + version "0.67.7" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.67.7.tgz#903b7d56fb6a95ca0de897f2925c04ee0d4adee3" + integrity sha512-G7vi9vE226diNNXVNbIa8HH/wPxMWHTHkn9iQtQSezaWzO5WNsKZZW2/TOzCehtBDVx4MZieTs6GsdtpBBttMA== dependencies: "@types/react" "*" @@ -1405,19 +1405,19 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^16.9.23": - version "16.14.26" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.26.tgz#82540a240ba7207ebe87d9579051bc19c9ef7605" - integrity sha512-c/5CYyciOO4XdFcNhZW1O2woVx86k4T+DO2RorHZL7EhitkNQgSD/SgpdZJAUJa/qjVgOmTM44gHkAdZSXeQuQ== +"@types/react@^17": + version "17.0.44" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.44.tgz#c3714bd34dd551ab20b8015d9d0dbec812a51ec7" + integrity sha512-Ye0nlw09GeMp2Suh8qoOv0odfgCoowfM/9MG6WeRD60Gq9wS90bdkdRtYbRkNhXOpG4H+YXGvj4wOWhAC0LJ1g== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^17": - version "17.0.44" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.44.tgz#c3714bd34dd551ab20b8015d9d0dbec812a51ec7" - integrity sha512-Ye0nlw09GeMp2Suh8qoOv0odfgCoowfM/9MG6WeRD60Gq9wS90bdkdRtYbRkNhXOpG4H+YXGvj4wOWhAC0LJ1g== +"@types/react@^18.0.9": + version "18.0.9" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.9.tgz#d6712a38bd6cd83469603e7359511126f122e878" + integrity sha512-9bjbg1hJHUm4De19L1cHiW0Jvx3geel6Qczhjd0qY5VKVE2X5+x77YxAepuCwVh4vrgZJdgEJw48zrhRIeF4Nw== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" From b450f6aa1c883cefabeda2d90fc4bf1b1c9b7c5d Mon Sep 17 00:00:00 2001 From: Evan Greer Date: Wed, 1 Jun 2022 13:02:08 -0600 Subject: [PATCH 6/8] removes support for itbl:// --- ts/IterableInboxMessageDisplay.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/IterableInboxMessageDisplay.tsx b/ts/IterableInboxMessageDisplay.tsx index 27135c6f6..9e3277d4a 100644 --- a/ts/IterableInboxMessageDisplay.tsx +++ b/ts/IterableInboxMessageDisplay.tsx @@ -170,8 +170,8 @@ const IterableInboxMessageDisplay = ({ } else if (URL.slice(0, 4) === 'http') { returnToInbox(() => Linking.openURL(URL)) //handle custom action - } else if (URL.slice(0, 7) === 'itbl://' || URL.slice(0,9) === 'action://') { - (URL.slice(0, 7) === 'itbl://') ? action.type = URL.replace('itbl://', '') : action.type = URL.replace('action://', '') + } else if (URL.slice(0,9) === 'action://') { + action.type = URL.replace('action://', '') returnToInbox(() => { if(Iterable.savedConfig.customActionHandler) { Iterable.savedConfig.customActionHandler(action, context) From d6ea0f4eebdc9af94ccc728d6503196aa5df3261 Mon Sep 17 00:00:00 2001 From: Evan Greer Date: Wed, 1 Jun 2022 13:06:44 -0600 Subject: [PATCH 7/8] reverts @types packages --- package.json | 4 ++-- yarn.lock | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 0b388b10a..d5b2d396d 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,8 @@ "@babel/core": "^7.10.2", "@testing-library/react-native": "^7.2.0", "@types/jest": "^26.0.0", - "@types/react": "^18.0.9", - "@types/react-native": "^0.67.7", + "@types/react": "^16.9.23", + "@types/react-native": "^0.62.13", "@types/react-native-vector-icons": "^6.4.10", "@types/react-test-renderer": "^17.0.1", "eslint": "^7.2.0", diff --git a/yarn.lock b/yarn.lock index 13507ffbd..adba94ec4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1382,10 +1382,10 @@ dependencies: "@types/react" "*" -"@types/react-native@^0.67.7": - version "0.67.7" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.67.7.tgz#903b7d56fb6a95ca0de897f2925c04ee0d4adee3" - integrity sha512-G7vi9vE226diNNXVNbIa8HH/wPxMWHTHkn9iQtQSezaWzO5WNsKZZW2/TOzCehtBDVx4MZieTs6GsdtpBBttMA== +"@types/react-native@^0.62.13": + version "0.62.18" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.62.18.tgz#ad63691e7c44edef2beeb6af52b2eb942c3ed8a1" + integrity sha512-7QfU8EzIYxYqeXpPf8QNv2xi8hrePlgTbRATRo+plRSdVfJu7N6sAXqrFxKJp6bGLvp82GV1gczl93gqiAfXPA== dependencies: "@types/react" "*" @@ -1405,19 +1405,19 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^17": - version "17.0.44" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.44.tgz#c3714bd34dd551ab20b8015d9d0dbec812a51ec7" - integrity sha512-Ye0nlw09GeMp2Suh8qoOv0odfgCoowfM/9MG6WeRD60Gq9wS90bdkdRtYbRkNhXOpG4H+YXGvj4wOWhAC0LJ1g== +"@types/react@^16.9.23": + version "16.14.26" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.14.26.tgz#82540a240ba7207ebe87d9579051bc19c9ef7605" + integrity sha512-c/5CYyciOO4XdFcNhZW1O2woVx86k4T+DO2RorHZL7EhitkNQgSD/SgpdZJAUJa/qjVgOmTM44gHkAdZSXeQuQ== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^18.0.9": - version "18.0.9" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.9.tgz#d6712a38bd6cd83469603e7359511126f122e878" - integrity sha512-9bjbg1hJHUm4De19L1cHiW0Jvx3geel6Qczhjd0qY5VKVE2X5+x77YxAepuCwVh4vrgZJdgEJw48zrhRIeF4Nw== +"@types/react@^17": + version "17.0.44" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.44.tgz#c3714bd34dd551ab20b8015d9d0dbec812a51ec7" + integrity sha512-Ye0nlw09GeMp2Suh8qoOv0odfgCoowfM/9MG6WeRD60Gq9wS90bdkdRtYbRkNhXOpG4H+YXGvj4wOWhAC0LJ1g== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" From 434e54c435d578c8680b0e3a700efd1e3a0727f3 Mon Sep 17 00:00:00 2001 From: Evan Greer Date: Tue, 7 Jun 2022 16:47:43 -0600 Subject: [PATCH 8/8] adds updated package to package.json --- integration-testing/package.json | 7 +- integration-testing/ts/App.tsx | 3 +- integration-testing/yarn.lock | 149 ++++++++++++++++++++++++++++--- 3 files changed, 143 insertions(+), 16 deletions(-) diff --git a/integration-testing/package.json b/integration-testing/package.json index f9dfaa6c2..a10ae80b4 100644 --- a/integration-testing/package.json +++ b/integration-testing/package.json @@ -10,11 +10,12 @@ "e2e:android-release": "npm run build:android-release && npm run test:android-release" }, "dependencies": { - "@iterable/react-native-sdk": "^1.3.0", + "@iterable/react-native-sdk": "^1.3.2", "@react-native-community/masked-view": "^0.1.10", "@react-navigation/bottom-tabs": "^5.4.5", "@react-navigation/native": "^5.4.0", "@react-navigation/stack": "^5.3.7", + "@types/react": "^18.0.12", "react": "^17.0.2", "react-native": "^0.63", "react-native-elements": "^1.2.7", @@ -31,11 +32,11 @@ "@babel/core": "^7.9.6", "@babel/runtime": "^7.9.6", "@react-native-community/eslint-config": "^0.0.7", - "@types/react-native": "0.62.x", + "@types/react-native": "^0.67.8", "@types/react-native-vector-icons": "^6.4.5", "eslint": "^6.8.0", "metro-react-native-babel-preset": "^0.59.0", "mocha": "^6.1.3", "react-test-renderer": "16.9.0" } -} \ No newline at end of file +} diff --git a/integration-testing/ts/App.tsx b/integration-testing/ts/App.tsx index 654768819..83f1c9fc6 100644 --- a/integration-testing/ts/App.tsx +++ b/integration-testing/ts/App.tsx @@ -14,12 +14,13 @@ import { IterableConfig, IterableAction, IterableActionContext, - IterableInAppMessage, IterableInAppShowResponse, IterableInAppLocation, IterableInAppDeleteSource, } from '@iterable/react-native-sdk'; +import IterableInAppMessage from '@iterable/react-native-sdk/js/IterableInAppMessage'; + import { Login } from './Login' // Consts diff --git a/integration-testing/yarn.lock b/integration-testing/yarn.lock index df2a8778e..1e4bd690d 100644 --- a/integration-testing/yarn.lock +++ b/integration-testing/yarn.lock @@ -703,10 +703,16 @@ dependencies: "@hapi/hoek" "^8.3.0" -"@iterable/react-native-sdk@^1.2.3": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@iterable/react-native-sdk/-/react-native-sdk-1.2.3.tgz#4d0a4c549ff215979b5afd7f27b1f4a96f8cf099" - integrity sha512-H9VjsKhtdoxwI3krVqkwP3je5Ar0A818e+JcF1sCnHwCpej0UNJ+LKefUxkyRQB9T2N1PWwsUWJxQlXMNfqBkA== +"@iterable/react-native-sdk@^1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@iterable/react-native-sdk/-/react-native-sdk-1.3.2.tgz#03aff1b440b7b4f58b982ebc292d4500830569f6" + integrity sha512-s+TTXQUOvcjAyp4lB9g42moAOPjiN7Gd4zWCvicO+zNcF170oZ8zSw/CJoUxvZIaFqKYIJXREeECBuDpA/p3Nw== + dependencies: + "@react-native-community/hooks" "^2.6.0" + "@react-navigation/native" "^6.0.6" + react-native-safe-area-context "^4.1.2" + react-native-vector-icons "^9.0.0" + react-native-webview "^11.14.1" "@jest/console@^24.9.0": version "24.9.0" @@ -925,6 +931,11 @@ resolved "https://registry.yarnpkg.com/@react-native-community/eslint-plugin/-/eslint-plugin-1.2.0.tgz#7d6d789ae8edf73dc9bed1246cd48277edea8066" integrity sha512-o6aam+0Ug1xGK3ABYmBm0B1YuEKfM/5kaoZO0eHbZwSpw9UzDX4G5y4Nx/K20FHqUmJHkZmLvOUFYwN4N+HqKA== +"@react-native-community/hooks@^2.6.0": + version "2.8.1" + resolved "https://registry.yarnpkg.com/@react-native-community/hooks/-/hooks-2.8.1.tgz#6e785431db49318048fdd14b601998437b6cc200" + integrity sha512-DCmCIC0Gn9m6K0Mlg2MwNmTxMEpBu5lTLsI6b/XUAv/vLGa6o+X7RhCai4FWeqkjCU36+ZOwaLzDo4NBWMXaoQ== + "@react-native-community/masked-view@^0.1.10": version "0.1.11" resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.11.tgz#2f4c6e10bee0786abff4604e39a37ded6f3980ce" @@ -959,6 +970,17 @@ query-string "^6.13.6" react-is "^16.13.0" +"@react-navigation/core@^6.2.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-6.2.1.tgz#90459f9afd25b71a9471b0706ebea2cdd2534fc4" + integrity sha512-3mjS6ujwGnPA/BC11DN9c2c42gFld6B6dQBgDedxP2djceXESpY2kVTTwISDHuqFnF7WjvRjsrDu3cKBX+JosA== + dependencies: + "@react-navigation/routers" "^6.1.0" + escape-string-regexp "^4.0.0" + nanoid "^3.1.23" + query-string "^7.0.0" + react-is "^16.13.0" + "@react-navigation/native@^3.8.4": version "3.8.4" resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.8.4.tgz#4d77f86506364ecf18b33c7f8740afb6763d0b37" @@ -976,6 +998,16 @@ escape-string-regexp "^4.0.0" nanoid "^3.1.15" +"@react-navigation/native@^6.0.6": + version "6.0.10" + resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-6.0.10.tgz#c58aa176eb0e63f3641c83a65c509faf253e4385" + integrity sha512-H6QhLeiieGxNcAJismIDXIPZgf1myr7Og8v116tezIGmincJTOcWavTd7lPHGnMMXaZg94LlVtbaBRIx9cexqw== + dependencies: + "@react-navigation/core" "^6.2.1" + escape-string-regexp "^4.0.0" + fast-deep-equal "^3.1.3" + nanoid "^3.1.23" + "@react-navigation/routers@^5.7.4": version "5.7.4" resolved "https://registry.yarnpkg.com/@react-navigation/routers/-/routers-5.7.4.tgz#8b5460e841a0c64f6c9a5fbc2a1eb832432d4fb0" @@ -983,6 +1015,13 @@ dependencies: nanoid "^3.1.15" +"@react-navigation/routers@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@react-navigation/routers/-/routers-6.1.0.tgz#d5682be88f1eb7809527c48f9cd3dedf4f344e40" + integrity sha512-8xJL+djIzpFdRW/sGlKojQ06fWgFk1c5jER9501HYJ12LF5DIJFr/tqBI2TJ6bk+y+QFu0nbNyeRC80OjRlmkA== + dependencies: + nanoid "^3.1.23" + "@react-navigation/stack@^5.3.7": version "5.14.9" resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.14.9.tgz#49c7b9316e6fb456e9766c901e0d607862f0ea7d" @@ -1046,10 +1085,10 @@ dependencies: "@types/react" "*" -"@types/react-native@0.62.x": - version "0.62.18" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.62.18.tgz#ad63691e7c44edef2beeb6af52b2eb942c3ed8a1" - integrity sha512-7QfU8EzIYxYqeXpPf8QNv2xi8hrePlgTbRATRo+plRSdVfJu7N6sAXqrFxKJp6bGLvp82GV1gczl93gqiAfXPA== +"@types/react-native@^0.67.8": + version "0.67.8" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.67.8.tgz#edaaa0527b835fffbfc34c09874722b6e4a4d1f3" + integrity sha512-xA8rYiTHvO6RoZv/LFnmEeqRuhA2y34mGB8zX3bGHe/pCt9jEStUPyUO4q1KcDc9GiGIOBD8ArfRtThprAjSfQ== dependencies: "@types/react" "*" @@ -1062,6 +1101,15 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/react@^18.0.12": + version "18.0.12" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.12.tgz#cdaa209d0a542b3fcf69cf31a03976ec4cdd8840" + integrity sha512-duF1OTASSBQtcigUvhuiTB1Ya3OvSy+xORCiEf20H0P0lzx+/KeVsA99U5UjLXSbyo1DRJDlLKqTeM1ngosqtg== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + "@types/scheduler@*": version "0.16.2" resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" @@ -1721,6 +1769,15 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + clone-deep@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" @@ -2168,7 +2225,7 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -escape-string-regexp@^2.0.0: +escape-string-regexp@2.0.0, escape-string-regexp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== @@ -2469,7 +2526,7 @@ fancy-log@^1.3.2: parse-node-version "^1.0.0" time-stamp "^1.0.0" -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -2706,7 +2763,7 @@ gensync@^1.0.0-beta.2: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-caller-file@^2.0.1: +get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -3021,7 +3078,7 @@ internal-slot@^1.0.3: has "^1.0.3" side-channel "^1.0.4" -invariant@^2.2.4: +invariant@2.2.4, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -4024,6 +4081,11 @@ nanoid@^3.1.15: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== +nanoid@^3.1.23: + version "3.3.4" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -4533,6 +4595,16 @@ query-string@^6.13.6: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" +query-string@^7.0.0: + version "7.1.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.1.1.tgz#754620669db978625a90f635f12617c271a088e1" + integrity sha512-MplouLRDHBZSG9z7fpuAAcI7aAYjDLhtsiVZsevsfaHWDS2IDdORKbSd1kWUA+V4zyva/HZoSfpwnYMMQDhb0w== + dependencies: + decode-uri-component "^0.2.0" + filter-obj "^1.1.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" @@ -4611,6 +4683,11 @@ react-native-safe-area-context@^0.7.3: resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-0.7.3.tgz#ad6bd4abbabe195332c53810e4ce5851eb21aa2a" integrity sha512-9Uqu1vlXPi+2cKW/CW6OnHxA76mWC4kF3wvlqzq4DY8hn37AeiXtLFs2WkxH4yXQRrnJdP6ivc65Lz+MqwRZAA== +react-native-safe-area-context@^4.1.2: + version "4.3.1" + resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.3.1.tgz#5cf97b25b395e0d09bc1f828920cd7da0d792ade" + integrity sha512-cEr7fknJCToTrSyDCVNg0GRdRMhyLeQa2NZwVCuzEQcWedOw/59ExomjmzCE4rxrKXs6OJbyfNtFRNyewDaHuA== + react-native-safe-area-view@^0.14.9: version "0.14.9" resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.9.tgz#90ee8383037010d9a5055a97cf97e4c1da1f0c3d" @@ -4642,6 +4719,22 @@ react-native-vector-icons@^6.6.0: prop-types "^15.7.2" yargs "^15.0.2" +react-native-vector-icons@^9.0.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-9.1.0.tgz#52eaa205f5954d567b7048eb93d58ac854a2c59e" + integrity sha512-2AHZ/h9d/+rC0odz+OwbGNlc1Lik/pHhSixn4HfC8RtQ8CxfSBZ6gg7bTLcZhdSvZN+ZEGi30Fj+ZnOSQy+smg== + dependencies: + prop-types "^15.7.2" + yargs "^16.1.1" + +react-native-webview@^11.14.1: + version "11.21.2" + resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.21.2.tgz#fe4675318b8e487a4347d30f3036bfb89ba5a09b" + integrity sha512-BgiRfRfB9J60dEzj6Z4fZQcKhPbqGhinweHdIMFtLm9GCaTZ/cTo3sOeMN9XuLgakqcqHnvHg7Abp5jT2aiOyw== + dependencies: + escape-string-regexp "2.0.0" + invariant "2.2.4" + react-native@^0.63: version "0.63.4" resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.63.4.tgz#2210fdd404c94a5fa6b423c6de86f8e48810ec36" @@ -5737,6 +5830,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -5797,6 +5899,11 @@ y18n@^4.0.0: resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" @@ -5826,6 +5933,11 @@ yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + yargs-unparser@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" @@ -5884,3 +5996,16 @@ yargs@^15.0.2, yargs@^15.1.0: which-module "^2.0.0" y18n "^4.0.0" yargs-parser "^18.1.2" + +yargs@^16.1.1: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2"