Skip to content

Commit 74895a3

Browse files
authored
Merge pull request #10 from adjust/v100
Version 1.0.0
2 parents 777deb3 + 91c5d58 commit 74895a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+532
-474
lines changed

.eslintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020
"rules": {
2121
"indent": [
2222
"error",
23-
2
23+
2,
24+
{
25+
"SwitchCase": 1
26+
}
2427
],
2528
"quotes": [
2629
"error",

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Version 1.0.0 (23rd November 2023)
2+
3+
The first release of a new Adjust Smart Banner SDK!
4+
5+
#### Added
6+
- Three sizes of banner: small, medium and large.
7+
- Banner custom colors and images support.
8+
- Automatic detection of browser language and ability to force SDK to show banners in chosen language.
9+
- Placement conditions support: choose pages where show banners.
10+
- UTM parameters passing to campaign parameters.
11+
- Dynamic deeplinks.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Adjust GmbH, https://www.adjust.com
3+
Copyright (c) 2023 Adjust GmbH, https://www.adjust.com
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ The sdk is also available through CDN and then accessible through global `Adjust
2828
To <a id="loading-snippet">load Smart Banner SDK through CDN</a> paste the following snippet into the `<head>` tag:
2929
```html
3030
<script type="application/javascript">
31-
!function(e,n,t,a,o,s,r,i,c){var d=o+"_q";e[o]=e[o]||{},e[d]=e[d]||[];for(var u=0;u<s.length;u++)r(e[o],e[d],s[u]);i=n.createElement(t),c=n.getElementsByTagName(t)[0],i.async=!0,i.src="https://cdn.adjust.com/adjust-smart-banner-latest.min.js",i.onload=function(){e[o]=e[o].default;for(var n=0;n<e[d].length;n++)e[o][e[d][n][0]]?e[o][e[d][n][0]].apply(e[o],e[d][n][1]):console.error("No such function found in "+o+": "+e[d][n][0]);e[d]=[]},c.parentNode.insertBefore(i,c)}(window,document,"script",0,"AdjustSmartBanner",["init","show","hide","setLanguage","setIosDeepLinkPath","setAndroidDeepLinkPath","setContext","setAndroidAppSchema","setDeepLinkPath"],(function(e,n,t){e[t]=function(){n.push([t,arguments])}}));
31+
!function(n,t,e,o,a,s,r,i,c){var u=a+"_q";n[a]=n[a]||{},n[u]=n[u]||[];for(var d=0;d<s.length;d++)r(n[a],n[u],s[d]);i=t.createElement(e),c=t.getElementsByTagName(e)[0],i.async=!0,i.src="https://cdn.adjust.com/adjust-smart-banner-latest.min.js",i.onload=function(){n[a]=n[a].default;for(var t=0;t<n[u].length;t++)n[a][n[u][t][0]]?n[a][n[u][t][0]].apply(n[a],n[u][t][1]):console.error("No such function found in "+a+": "+n[u][t][0]);n[u]=[]},c.parentNode.insertBefore(i,c)}(window,document,"script",0,"AdjustSmartBanner",["init","show","hide","setLanguage","setIosDeepLinkPath","setAndroidDeepLinkPath","setContext"],(function(n,t,e){n[e]=function(){t.push([e,arguments])}}));
3232
</script>
3333
```
3434

35-
When loading the sdk through CDN we suggest using minified version. You can target specific version like `https://cdn.adjust.com/adjust-smart-banner-0.0.7.min.js`, or you can target latest version `https://cdn.adjust.com/adjust-smart-banner-latest.min.js` if you want automatic updates without need to change the target file. The sdk files are cached so they are served as fast as possible, and the cache is refreshed every half an hour. If you want updates immediately make sure to target specific version.
35+
When loading the sdk through CDN we suggest using minified version. You can target specific version like `https://cdn.adjust.com/adjust-smart-banner-1.0.0.min.js`, or you can target latest version `https://cdn.adjust.com/adjust-smart-banner-latest.min.js` if you want automatic updates without need to change the target file. The sdk files are cached so they are served as fast as possible, and the cache is refreshed every half an hour. If you want updates immediately make sure to target specific version.
3636

3737

3838
## <a id="initialization">Initialization</a>
@@ -100,16 +100,6 @@ AdjustSmartBanner.init({
100100

101101
These parameters allow you to specify where your user lands in your app when they click on banner. For further information see [Deeplinks](#deeplinks).
102102

103-
##### <a id="init-schema">**androidAppSchema**</a> `string`
104-
105-
> [!WARNING]
106-
> Parameter `androidAppSchema` is deprecated, please don't use it anymore.
107-
108-
##### <a id="init-deeplinkpath">**deepLinkPath**</a> `string`
109-
110-
> [!WARNING]
111-
> Parameter `deepLinkPath` is deprecated, please use [`androidDeepLinkPath`](#init-androiddeeplinkpath) and [`iosDeepLinkPath`](#init-iosdeeplinkpath) respectivetely the platform where you want deeplink path to be changed.
112-
113103
##### <a id="init-androiddeeplinkpath">**androidDeepLinkPath**</a> `string`
114104

115105
Overrides Android deeplink path, which allows you to change user destination in your mobile app when they click on banner.
@@ -349,16 +339,6 @@ AdjustSmartBanner.setContext({ product_id: "999888" });
349339

350340
There are several functions to set custom deeplink path or deeplink path template and its context.
351341

352-
#### <a id="deeplinks-setters-schema">**setAndroidAppScheme**</a>
353-
354-
> [!WARNING]
355-
> Method `setAndroidAppSchema` is deprecated, please don't use it anymore.
356-
357-
#### <a id="deeplinks-setters-deeplinkpath">**setDeepLinkPath**</a>
358-
359-
> [!WARNING]
360-
> Method `setDeepLinkPath` is deprecated and will be removed, please use [`setAndroidDeepLinkPath`](#init-androiddeeplinkpath) and [`setIosDeepLinkPath`](#init-iosdeeplinkpath) respectivetely the platform where you want deeplink path to be changed.
361-
362342
#### <a id="deeplinks-setters-androidDeeplinkpath">**setAndroidDeepLinkPath**</a>
363343

364344
Accepts a string representing deep link path or deeplint path template.

demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"test": "echo \"Error: no test specified\" && exit 1"
1111
},
1212
"dependencies": {
13-
"@adjustcom/smart-banner-sdk": "^0.0.7",
13+
"@adjustcom/smart-banner-sdk": "^1.0.0",
1414
"lorem-ipsum": "^2.0.8"
1515
},
1616
"author": "Adjust GmbH",

loading-snippet.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@
4040
'setLanguage',
4141
'setIosDeepLinkPath',
4242
'setAndroidDeepLinkPath',
43-
'setContext',
44-
45-
/* deprecated functions */
46-
'setAndroidAppSchema',
47-
'setDeepLinkPath'
43+
'setContext'
4844
],
4945
function (context, queue, methodName) {
5046
context[methodName] = function () {

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adjustcom/smart-banner-sdk-project",
3-
"version": "0.0.1",
3+
"version": "1.0.0",
44
"description": "Adjust Smart Banner SDK",
55
"scripts": {
66
"build": "npm run build --workspace=layout && npm run build --workspace=sdk && npm run build:snippet && npm run copy",

sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adjustcom/smart-banner-sdk",
3-
"version": "0.0.7",
3+
"version": "1.0.0",
44
"description": "Adjust Smart Banner SDK",
55
"scripts": {
66
"build:sdk": "webpack --config ./webpack.config.js",

sdk/src/data/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { DeviceOS } from '@utils/detect-os';
2+
import { Logger } from '@utils/logger';
13
import { SmartBannerResponseData, SmartBannerData } from './types';
24
import { AsyncDataSource } from './data-source';
35
import { convertResponseToSmartBanners } from './converters/response-to-smart-banners';
4-
import { DeviceOS } from '../utils/detect-os';
5-
import { Logger } from '../utils/logger';
66
import { Network } from '../network/network';
77

88
/**

0 commit comments

Comments
 (0)