@kontextso/sdk-react-native 2.0.0-rc.1 → 2.0.0-rc.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.
- package/dist/index.d.mts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.js +3 -44
- package/dist/index.mjs +3 -34
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { FormatProps
|
|
2
|
+
import { FormatProps } from '@kontextso/sdk-react';
|
|
3
|
+
export { AdsProvider } from '@kontextso/sdk-react';
|
|
3
4
|
|
|
4
5
|
declare const InlineAd: ({ code, messageId, wrapper, ...props }: FormatProps) => react_jsx_runtime.JSX.Element;
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export { AdsProvider, InlineAd };
|
|
7
|
+
export { InlineAd };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { FormatProps
|
|
2
|
+
import { FormatProps } from '@kontextso/sdk-react';
|
|
3
|
+
export { AdsProvider } from '@kontextso/sdk-react';
|
|
3
4
|
|
|
4
5
|
declare const InlineAd: ({ code, messageId, wrapper, ...props }: FormatProps) => react_jsx_runtime.JSX.Element;
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export { AdsProvider, InlineAd };
|
|
7
|
+
export { InlineAd };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,20 +15,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
19
|
|
|
30
20
|
// src/index.ts
|
|
31
21
|
var index_exports = {};
|
|
32
22
|
__export(index_exports, {
|
|
33
|
-
AdsProvider: () => AdsProvider,
|
|
23
|
+
AdsProvider: () => import_sdk_react3.AdsProvider,
|
|
34
24
|
InlineAd: () => InlineAd_default
|
|
35
25
|
});
|
|
36
26
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -242,9 +232,7 @@ var InlineAd_default = InlineAd;
|
|
|
242
232
|
|
|
243
233
|
// src/context/AdsProvider.tsx
|
|
244
234
|
var import_sdk_react2 = require("@kontextso/sdk-react");
|
|
245
|
-
var
|
|
246
|
-
var import_react_native_device_info = __toESM(require("react-native-device-info"));
|
|
247
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
235
|
+
var import_sdk_react3 = require("@kontextso/sdk-react");
|
|
248
236
|
ErrorUtils.setGlobalHandler((error, isFatal) => {
|
|
249
237
|
if (!isFatal) {
|
|
250
238
|
import_sdk_react2.log.warn(error);
|
|
@@ -252,36 +240,7 @@ ErrorUtils.setGlobalHandler((error, isFatal) => {
|
|
|
252
240
|
import_sdk_react2.log.error(error);
|
|
253
241
|
}
|
|
254
242
|
});
|
|
255
|
-
|
|
256
|
-
try {
|
|
257
|
-
const os = import_react_native2.Platform.OS;
|
|
258
|
-
const systemVersion = import_react_native_device_info.default.getSystemVersion();
|
|
259
|
-
const reactNativeVersion = import_react_native2.Platform.constants.reactNativeVersion.toString();
|
|
260
|
-
const model = import_react_native_device_info.default.getModel();
|
|
261
|
-
const brand = import_react_native_device_info.default.getBrand();
|
|
262
|
-
const deviceId = import_react_native_device_info.default.getDeviceId();
|
|
263
|
-
const deviceType = import_react_native_device_info.default.getDeviceType();
|
|
264
|
-
const appBundleId = import_react_native_device_info.default.getBundleId();
|
|
265
|
-
const appVersion = import_react_native_device_info.default.getVersion();
|
|
266
|
-
return {
|
|
267
|
-
os,
|
|
268
|
-
systemVersion,
|
|
269
|
-
reactNativeVersion,
|
|
270
|
-
model,
|
|
271
|
-
brand,
|
|
272
|
-
deviceId,
|
|
273
|
-
deviceType,
|
|
274
|
-
appBundleId,
|
|
275
|
-
appVersion
|
|
276
|
-
};
|
|
277
|
-
} catch (error) {
|
|
278
|
-
console.error(error);
|
|
279
|
-
}
|
|
280
|
-
return {};
|
|
281
|
-
};
|
|
282
|
-
var AdsProvider = (props) => {
|
|
283
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_sdk_react2.AdsProviderInternal, { ...props, getDevice });
|
|
284
|
-
};
|
|
243
|
+
console.log("AdsProviderInternal", import_sdk_react2.AdsProviderInternal);
|
|
285
244
|
// Annotate the CommonJS export names for ESM import in node:
|
|
286
245
|
0 && (module.exports = {
|
|
287
246
|
AdsProvider,
|
package/dist/index.mjs
CHANGED
|
@@ -205,9 +205,7 @@ var InlineAd_default = InlineAd;
|
|
|
205
205
|
|
|
206
206
|
// src/context/AdsProvider.tsx
|
|
207
207
|
import { AdsProviderInternal, log } from "@kontextso/sdk-react";
|
|
208
|
-
import {
|
|
209
|
-
import DeviceInfo from "react-native-device-info";
|
|
210
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
208
|
+
import { AdsProvider as AdsProvider2 } from "@kontextso/sdk-react";
|
|
211
209
|
ErrorUtils.setGlobalHandler((error, isFatal) => {
|
|
212
210
|
if (!isFatal) {
|
|
213
211
|
log.warn(error);
|
|
@@ -215,37 +213,8 @@ ErrorUtils.setGlobalHandler((error, isFatal) => {
|
|
|
215
213
|
log.error(error);
|
|
216
214
|
}
|
|
217
215
|
});
|
|
218
|
-
|
|
219
|
-
try {
|
|
220
|
-
const os = Platform.OS;
|
|
221
|
-
const systemVersion = DeviceInfo.getSystemVersion();
|
|
222
|
-
const reactNativeVersion = Platform.constants.reactNativeVersion.toString();
|
|
223
|
-
const model = DeviceInfo.getModel();
|
|
224
|
-
const brand = DeviceInfo.getBrand();
|
|
225
|
-
const deviceId = DeviceInfo.getDeviceId();
|
|
226
|
-
const deviceType = DeviceInfo.getDeviceType();
|
|
227
|
-
const appBundleId = DeviceInfo.getBundleId();
|
|
228
|
-
const appVersion = DeviceInfo.getVersion();
|
|
229
|
-
return {
|
|
230
|
-
os,
|
|
231
|
-
systemVersion,
|
|
232
|
-
reactNativeVersion,
|
|
233
|
-
model,
|
|
234
|
-
brand,
|
|
235
|
-
deviceId,
|
|
236
|
-
deviceType,
|
|
237
|
-
appBundleId,
|
|
238
|
-
appVersion
|
|
239
|
-
};
|
|
240
|
-
} catch (error) {
|
|
241
|
-
console.error(error);
|
|
242
|
-
}
|
|
243
|
-
return {};
|
|
244
|
-
};
|
|
245
|
-
var AdsProvider = (props) => {
|
|
246
|
-
return /* @__PURE__ */ jsx3(AdsProviderInternal, { ...props, getDevice });
|
|
247
|
-
};
|
|
216
|
+
console.log("AdsProviderInternal", AdsProviderInternal);
|
|
248
217
|
export {
|
|
249
|
-
AdsProvider,
|
|
218
|
+
AdsProvider2 as AdsProvider,
|
|
250
219
|
InlineAd_default as InlineAd
|
|
251
220
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kontextso/sdk-react-native",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.2",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"react-native-webview": "^13.15.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@kontextso/sdk-react": "^1.2.
|
|
54
|
+
"@kontextso/sdk-react": "^1.2.1"
|
|
55
55
|
},
|
|
56
56
|
"files": [
|
|
57
57
|
"dist/*"
|