Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MOB-8539]: Embedded GA #381

Merged
merged 70 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from 69 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
79de9f1
notificiation view implemented (#212)
iamavishkar Sep 15, 2023
ad05a33
Embedded msg (#232)
devcsomnicg Oct 10, 2023
b667f0d
Embedded test (#234)
devcsomnicg Nov 6, 2023
4349a6c
Embedded msgs example (#233)
devcsomnicg Nov 15, 2023
3dea67f
Embedded Messaging Dismiss Event Track (#241)
devcsomnicg Nov 15, 2023
8f38c6a
Dev 248 (Update payload to include updated placements) (#242)
devcsomnicg Nov 21, 2023
6961357
banner view implemented (#213)
iamavishkar Nov 22, 2023
68d1bf9
card view implemented (#214)
iamavishkar Nov 22, 2023
35091b5
Add embedded views to the SDK & integrate into sample app (#243)
devcsomnicg Nov 27, 2023
3704505
Add remaining events to web embedded messaging
Dec 6, 2023
846c5bf
update the test cases
Dec 6, 2023
6036f77
Add remaining events to web embedded messaging
Dec 6, 2023
be62376
Add remaining events to web embedded messaging
Dec 6, 2023
1eedc19
Revert "Add remaining events to web embedded messaging"
Dec 7, 2023
7c9c3d7
Update events.test.ts
Dec 7, 2023
d86cc95
Add remaining events to web embedded messaging (#245)
hani-iterable Dec 13, 2023
eb9d23e
resolve build error issue using dev config
hani329 Dec 20, 2023
47ab4f4
Create test (#250) (#252)
hani-iterable Jan 3, 2024
198ecf6
Embedded received event (#278)
hani-iterable Jan 4, 2024
b4d8a66
Embedded msg image (#286)
hani-iterable Jan 4, 2024
6e1a5f1
Embedded text wrap (#283)
hani-iterable Jan 4, 2024
8427d08
Embedded message button click (#273)
hani-iterable Jan 5, 2024
1fffffe
resolve error for OOTB not responding properly (#309)
hani-iterable Feb 27, 2024
579d5ab
Resolve: Content not aligned for notification view (#310)
hani-iterable Feb 27, 2024
dc080fd
set text align for default style (#311)
hani-iterable Feb 27, 2024
acd6e89
make cursor to pointer (#312)
hani-iterable Feb 27, 2024
9e54e41
Make UI responsive (#314)
hani-iterable Mar 5, 2024
3e37099
Mob 7843 (#307)
hani-iterable Mar 5, 2024
7281214
MOB-7859 (Long buttons become stacked) (#315)
hani-iterable Mar 6, 2024
60bc8b9
Lower `jest-worker@28.1.3` version (#316)
hani-iterable Mar 12, 2024
726ed49
make OOTB views unavailable for Beta (#319)
hani-iterable Mar 14, 2024
3d49569
remove markdown files for embedded (#326)
mprew97 Mar 15, 2024
21f2fbe
remove ActionHandler (#321)
hani-iterable Mar 15, 2024
ae48660
update the doc (#323)
hani-iterable Mar 18, 2024
6d377ab
Handling incoming embedded messages (#320)
hani-iterable Mar 18, 2024
ce8b425
Support custom as well default click handler (#317)
hani-iterable Mar 19, 2024
ebd5680
fix conflicts (#327)
mprew97 Mar 19, 2024
4cb8991
Mob 8058 (Web SDK: Click Handling) (#328)
hani-iterable Mar 19, 2024
764fae8
update styles (#329)
mprew97 Mar 19, 2024
8c745f0
update (#330)
mprew97 Mar 19, 2024
64dea6e
session track (#331)
mprew97 Mar 19, 2024
d638c37
add uuid as session ID (#332)
hani-iterable Mar 20, 2024
8919c92
Resolve errors (#333)
hani-iterable Mar 21, 2024
0ef20da
Merge branch 'main' of github.com:Iterable/iterable-web-sdk into embb…
mprew97 Mar 21, 2024
9e78766
fix (#340)
mprew97 Mar 26, 2024
af9f94b
Remove console statements (#341)
mprew97 Mar 26, 2024
f256808
bump version 1.1.0-beta (#342)
jyu115 Mar 27, 2024
9d8ab03
Fix beta publish issue (#344)
mprew97 Mar 27, 2024
666a3b4
OOTB Rework: Need to be pure JS/HTML/CSS (#354)
hardikmashru Apr 29, 2024
7e0f556
Web SDK is incorrectly parsing custom action objects (#358)
hardikmashru Apr 29, 2024
050801b
Update Embedded requests to not need to pass userId or email (#364)
hardikmashru Apr 29, 2024
2d487c8
Rework Embedded Session Manager (#362)
hardikmashru May 2, 2024
059f745
[MOB-8148]: clean up embedded types (#365)
mprew97 May 2, 2024
62507b4
[MOB-8405]: Add new eslint rules (#367)
mprew97 May 2, 2024
a35d136
MOB-8139 & MOB-8028 (#369)
hardikmashru May 6, 2024
4bbbf17
[MOB-8416]: easier UUID testing in sample app (#374)
mprew97 May 8, 2024
a14cfa9
fix focus bug and console error (#377)
mprew97 May 10, 2024
5d09b1a
[MOB-8425]: strengthen network interceptors (#376)
mprew97 May 10, 2024
2bfd2e3
[MOB-8475]: Remove Sample TImeout (#379)
mprew97 May 14, 2024
7194b36
Merge branch 'main' of github.com:Iterable/iterable-web-sdk into HEAD
mprew97 May 14, 2024
86d68ef
MOB 8472 (#390)
hardikmashru May 17, 2024
02045e1
Fixing placementIds issue on IterableEmbeddedManager (#392)
bradumbaugh May 20, 2024
67689ca
Merge branch 'main' into embedded-ga
mprew97 May 20, 2024
be998b4
[MOB-8503]: refactor OOTB views (#391)
mprew97 May 21, 2024
977c721
MOB-8604 (#394)
hardikmashru May 22, 2024
81c1cc8
MOB-8600 (#393)
hardikmashru May 22, 2024
65f852d
[MOB-8639]: add elements to OOTB type (#395)
mprew97 May 24, 2024
9843ffd
[MOB-8646]: targetUrl not being sent on click (#400)
mprew97 May 24, 2024
3aede4a
jwt-gen param issue (#402)
mprew97 May 28, 2024
7093fee
Merge branch 'main' of github.com:Iterable/iterable-web-sdk into HEAD
mprew97 Jun 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"presets": [
"@babel/typescript"
"@babel/preset-env",
"@babel/preset-typescript"
],
"ignore": [
"**/*.test.ts",
Expand All @@ -12,6 +13,9 @@
"@babel/proposal-class-properties",
"@babel/proposal-object-rest-spread",
"@babel/plugin-proposal-optional-chaining",
["@babel/transform-runtime", {
"regenerator": true
}],
"@babel/plugin-transform-modules-umd",
"@babel/plugin-transform-nullish-coalescing-operator",
[
Expand Down
18 changes: 16 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,26 @@
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"ignorePatterns": ["webpack.*.js"],
"ignorePatterns": [
"webpack.*.js"
],
"rules": {
"no-console": 1,
"no-duplicate-imports": 2,
"no-extra-boolean-cast": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/comma-spacing": 2,
"@typescript-eslint/explicit-function-return-type": "off",
"eqeqeq": 2
"@typescript-eslint/array-type": [
2,
{
"default": "array"
}
],
"eqeqeq": 2,
"quotes": [
2,
"single"
]
}
}
10 changes: 5 additions & 5 deletions example/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
}
}
)
.then((response) => {
.then((response: any) => {
return response.data?.token;
});
}
Expand Down Expand Up @@ -71,11 +71,11 @@ import {
const handleGetMessagesClick = (event: MouseEvent) => {
event.preventDefault();
if (startBtn.getAttribute('aria-disabled') !== 'true') {
startBtn.innerText = `Loading...`;
startBtn.innerText = 'Loading...';
startBtn.setAttribute('aria-disabled', 'true');
startBtn.className = 'disabled';
request()
.then((response) => {
.then((response: any) => {
triggerDisplayMessages(response.data.inAppMessages);
startBtn.innerText = `${response.data.inAppMessages.length} total messages retrieved!`;
})
Expand All @@ -94,7 +94,7 @@ import {
/* login */
loginBtn.setAttribute('aria-disabled', 'true');
loginBtn.className = 'disabled';
loginBtn.innerText = `Loading...`;
loginBtn.innerText = 'Loading...';
setEmail(email).then(() => {
/* enable change email button */
changeEmailBtn.classList.remove('disabled');
Expand Down Expand Up @@ -123,7 +123,7 @@ import {

changeEmailBtn.setAttribute('aria-disabled', 'true');
changeEmailBtn.className = 'disabled';
changeEmailBtn.innerText = `Loading...`;
changeEmailBtn.innerText = 'Loading...';

startBtn.setAttribute('aria-disabled', 'true');
startBtn.className = 'disabled';
Expand Down
3,225 changes: 1,515 additions & 1,710 deletions example/yarn.lock

Large diffs are not rendered by default.

17 changes: 14 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@iterable/web-sdk",
"description": "Iterable SDK for JavaScript and Node.",

"version": "1.0.10",
"homepage": "https://iterable.com/",
"repository": {
Expand Down Expand Up @@ -32,10 +33,13 @@
],
"dependencies": {
"@pabra/sortby": "^1.0.1",
"@types/ws": "8.5.4",
"axios": "^1.6.2",
"buffer": "^6.0.3",
"copy-webpack-plugin": "^11.0.0",
"idb-keyval": "^6.2.0",
"throttle-debounce": "^3.0.1",
"uuid": "^9.0.0",
"yup": "^0.32.9"
},
"scripts": {
Expand All @@ -46,7 +50,7 @@
"build": "ttsc && babel src --out-dir ./dist --extensions '.ts,.tsx' && webpack",
"build:node": "yarn build --config webpack.node.config.js",
"test": "jest --config jest.config.js --collectCoverage",
"format": "prettier --write \"src/**/*.{ts,tsx}\" \"src/**/*.{js}\" \"example/src/**/*.{ts,tsx}\" \"example/src/**/*.{js}\" --no-error-on-unmatched-pattern",
"format": "prettier --write \"src/**/*.{ts,tsx}\" \"src/**/*.{js}\" \"example/src/**/*.{ts,tsx}\" \"example/src/**/*.{js}\" \"react-example/src/**/*.{ts,tsx}\" \"react-example/src/**/*.{js}\" --no-error-on-unmatched-pattern",
"lint": "eslint src --ignore-pattern '*.test.*' --ignore-pattern '*.spec.*' --ext '.ts,.tsx'",
"typecheck": "ttsc --noEmit true --emitDeclarationOnly false",
"check-deps": "madge --extensions js,ts --circular dist",
Expand All @@ -61,27 +65,34 @@
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
"@babel/plugin-transform-modules-umd": "^7.14.5",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4",
"@babel/plugin-transform-runtime": "^7.22.15",
"@babel/preset-env": "^7.5.5",
"@babel/preset-typescript": "^7.6.0",
"@types/jest": "^27.0.2",
"@types/node": "^12.7.1",
"@types/throttle-debounce": "^2.1.0",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"@webpack-cli/serve": "^1.6.0",
"babel-plugin-module-resolver": "^5.0.0",
"axios-mock-adapter": "^1.22.0",
"babel-loader": "^9.1.3",
"babel-plugin-module-resolver": "^5.0.0",
"concurrently": "^6.3.0",
"css-loader": "^6.8.1",
"dotenv": "^10.0.0",
"eslint": "^7.14.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"fake-indexeddb": "^4.0.0",
"file-loader": "^6.2.0",
"husky": "^3.1.0",
"jest": "^27.3.1",
"lint-staged": "^11.2.6",
"madge": "^5.0.1",
"mini-css-extract-plugin": "^2.7.6",
"prettier": "^2.2.1",
"style-loader": "^3.3.3",
"ts-jest": "^27.0.7",
"ttypescript": "^1.5.15",
"typescript": "^4.9.5",
Expand All @@ -103,4 +114,4 @@
"eslint"
]
}
}
}
18 changes: 13 additions & 5 deletions react-example/.env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# To make requests from this example app make sure you first create an .env file
# and add the API key and JWT Secret to it like so (and uncomment the keys):
# API_KEY=1234
# JWT_SECRET=1234
# Optional environment variables for local development. Start by creating a
# called .env and add these values to it and change them appropriately.
# Remember to uncomment the variables!

# Only set BASE_URL if developing locally, as it will take precedence over the production api urls.
# BASE_URL="https://api.iterable.com/api"

# You can set the URL for the JWT generator here if needed
# JWT_GENERATOR=http://localhost:5000/generate
# JWT_GENERATOR=http://localhost:3000/generate

# Set this to false to prevent messages from being consumed to fetch the same message(s) when testing changes locally.
# ENABLE_INAPP_CONSUME=false

# Toggle this to true if you would need to hit our EU APIs.
# IS_EU_ITERABLE_SERVICE=false

# Convenience variable to automatically set the login email during testing.
# LOGIN_EMAIL=email@email.com
Expand Down
7 changes: 5 additions & 2 deletions react-example/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
],
"rules": {
"@typescript-eslint/no-empty-interface": "off",
"react/react-in-jsx-scope": "off"
}
"react/react-in-jsx-scope": "off",
},
"ignorePatterns": [
"node_modules/"
]
}
2 changes: 1 addition & 1 deletion react-example/cypress/integration/inapp/inapp.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as mockMessages from '../../fixtures/inapp/200.json';

const url = `/api/inApp/web/getMessages*`;
const url = '/api/inApp/web/getMessages*';

describe('Requesting In-App Messages', () => {
it('should paint the correct 200 response', () => {
Expand Down
33 changes: 17 additions & 16 deletions react-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,28 @@
"cypress": "cypress open"
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-object-rest-spread": "^7.9.5",
"@babel/core": "^7.5.0",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
"@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.9.0",
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.6.0",
"@types/jest": "^27.0.2",
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@types/styled-components": "^5.1.21",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"@types/styled-components": "^5.1.34",
"@typescript-eslint/eslint-plugin": "^2.26.0",
"@typescript-eslint/parser": "^2.26.0",
"@webpack-cli/serve": "^1.6.0",
"babel-loader": "^8.1.0",
"babel-plugin-styled-components": "^2.0.2",
"babel-loader": "^9.1.3",
"concurrently": "^6.3.0",
"css-loader": "^6.5.1",
"cypress": "^9.3.1",
"dotenv": "^10.0.0",
"eslint": "^7.14.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.28.0",
"eslint-webpack-plugin": "^3.1.0",
"eslint-webpack-plugin": "3.1.0",
"html-webpack-plugin": "^5.5.0",
"jest": "^27.3.1",
"mini-css-extract-plugin": "^2.5.2",
Expand All @@ -60,12 +58,15 @@
"typescript": "^4.6.4",
"webpack": "^5.76.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.7.3"
"webpack-dev-server": "^4.7.3",
"@types/uuid": "^9.0.2"
},
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"@iterable/web-sdk": "../",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.2.1",
"styled-components": "^5.3.3"
"styled-components": "^5.3.3",
"uuid": "^9.0.0"
}
}
Loading