@kontextso/sdk-react-native 0.0.5-rc.1 → 0.0.5-rc.3
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 +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +2 -21
- package/dist/index.mjs +2 -20
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -143,7 +143,6 @@ interface AdsProviderProps {
|
|
|
143
143
|
throwError?: boolean;
|
|
144
144
|
}
|
|
145
145
|
declare const VISITOR_ID_KEY = "brain-visitor-id";
|
|
146
|
-
declare const AdsProviderWithoutBoundary: ({ children, messages, publisherToken, isLoading, adserverUrl, isDisabled, character, conversationId, userId, logLevel, onAdView, onAdClick, ...props }: AdsProviderProps) => react_jsx_runtime.JSX.Element;
|
|
147
146
|
declare const AdsProvider: ({ children, messages, publisherToken, isLoading, adserverUrl, isDisabled, character, conversationId, userId, logLevel, onAdView, onAdClick, ...props }: AdsProviderProps) => react_jsx_runtime.JSX.Element;
|
|
148
147
|
|
|
149
|
-
export { type AdStyles, AdsContext, AdsProvider, type AdsProviderProps,
|
|
148
|
+
export { type AdStyles, AdsContext, AdsProvider, type AdsProviderProps, type ContextType, InlineAd, VISITOR_ID_KEY, useAd };
|
package/dist/index.d.ts
CHANGED
|
@@ -143,7 +143,6 @@ interface AdsProviderProps {
|
|
|
143
143
|
throwError?: boolean;
|
|
144
144
|
}
|
|
145
145
|
declare const VISITOR_ID_KEY = "brain-visitor-id";
|
|
146
|
-
declare const AdsProviderWithoutBoundary: ({ children, messages, publisherToken, isLoading, adserverUrl, isDisabled, character, conversationId, userId, logLevel, onAdView, onAdClick, ...props }: AdsProviderProps) => react_jsx_runtime.JSX.Element;
|
|
147
146
|
declare const AdsProvider: ({ children, messages, publisherToken, isLoading, adserverUrl, isDisabled, character, conversationId, userId, logLevel, onAdView, onAdClick, ...props }: AdsProviderProps) => react_jsx_runtime.JSX.Element;
|
|
148
147
|
|
|
149
|
-
export { type AdStyles, AdsContext, AdsProvider, type AdsProviderProps,
|
|
148
|
+
export { type AdStyles, AdsContext, AdsProvider, type AdsProviderProps, type ContextType, InlineAd, VISITOR_ID_KEY, useAd };
|
package/dist/index.js
CHANGED
|
@@ -32,7 +32,6 @@ var src_exports = {};
|
|
|
32
32
|
__export(src_exports, {
|
|
33
33
|
AdsContext: () => AdsContext,
|
|
34
34
|
AdsProvider: () => AdsProvider,
|
|
35
|
-
AdsProviderWithoutBoundary: () => AdsProviderWithoutBoundary,
|
|
36
35
|
InlineAd: () => InlineAd_default,
|
|
37
36
|
VISITOR_ID_KEY: () => VISITOR_ID_KEY,
|
|
38
37
|
useAd: () => useAd
|
|
@@ -202,7 +201,7 @@ var parseMessageText = (text) => {
|
|
|
202
201
|
var import_loglevel = __toESM(require("loglevel"));
|
|
203
202
|
|
|
204
203
|
// package.json
|
|
205
|
-
var version = "0.0.5-rc.
|
|
204
|
+
var version = "0.0.5-rc.2";
|
|
206
205
|
|
|
207
206
|
// src/hooks/useInitializeAds.tsx
|
|
208
207
|
async function initialize(adServerUrl, publisherToken, userId, conversationId, legacyVisitorId, character) {
|
|
@@ -766,7 +765,6 @@ var captureErrorFn = (adServerUrl, error, componentStack, context) => {
|
|
|
766
765
|
});
|
|
767
766
|
};
|
|
768
767
|
var ErrorBoundary = class extends import_react4.default.Component {
|
|
769
|
-
static contextType = AdsContext;
|
|
770
768
|
constructor(props) {
|
|
771
769
|
super(props);
|
|
772
770
|
this.state = {
|
|
@@ -779,7 +777,6 @@ var ErrorBoundary = class extends import_react4.default.Component {
|
|
|
779
777
|
};
|
|
780
778
|
}
|
|
781
779
|
componentDidCatch(error, info) {
|
|
782
|
-
const contextValue = this.context;
|
|
783
780
|
const adServerUrl = this.props.adserverUrl;
|
|
784
781
|
const props = [
|
|
785
782
|
"adserverUrl",
|
|
@@ -792,23 +789,8 @@ var ErrorBoundary = class extends import_react4.default.Component {
|
|
|
792
789
|
"isLoading",
|
|
793
790
|
"messages"
|
|
794
791
|
];
|
|
795
|
-
let contextProps = {};
|
|
796
|
-
if (contextValue) {
|
|
797
|
-
contextProps = props.reduce(
|
|
798
|
-
(acc, prop) => {
|
|
799
|
-
acc[prop] = contextValue[prop];
|
|
800
|
-
return acc;
|
|
801
|
-
},
|
|
802
|
-
{}
|
|
803
|
-
);
|
|
804
|
-
} else {
|
|
805
|
-
contextProps = {
|
|
806
|
-
...this.props.reqBodyParams,
|
|
807
|
-
adServerUrl
|
|
808
|
-
};
|
|
809
|
-
}
|
|
810
792
|
if (adServerUrl) {
|
|
811
|
-
captureErrorFn(adServerUrl, error, info.componentStack,
|
|
793
|
+
captureErrorFn(adServerUrl, error, info.componentStack, this.props.reqBodyParams);
|
|
812
794
|
}
|
|
813
795
|
}
|
|
814
796
|
render() {
|
|
@@ -1349,7 +1331,6 @@ var InlineAd_default = InlineAd;
|
|
|
1349
1331
|
0 && (module.exports = {
|
|
1350
1332
|
AdsContext,
|
|
1351
1333
|
AdsProvider,
|
|
1352
|
-
AdsProviderWithoutBoundary,
|
|
1353
1334
|
InlineAd,
|
|
1354
1335
|
VISITOR_ID_KEY,
|
|
1355
1336
|
useAd
|
package/dist/index.mjs
CHANGED
|
@@ -175,7 +175,7 @@ var parseMessageText = (text) => {
|
|
|
175
175
|
import log from "loglevel";
|
|
176
176
|
|
|
177
177
|
// package.json
|
|
178
|
-
var version = "0.0.5-rc.
|
|
178
|
+
var version = "0.0.5-rc.2";
|
|
179
179
|
|
|
180
180
|
// src/hooks/useInitializeAds.tsx
|
|
181
181
|
async function initialize(adServerUrl, publisherToken, userId, conversationId, legacyVisitorId, character) {
|
|
@@ -739,7 +739,6 @@ var captureErrorFn = (adServerUrl, error, componentStack, context) => {
|
|
|
739
739
|
});
|
|
740
740
|
};
|
|
741
741
|
var ErrorBoundary = class extends React.Component {
|
|
742
|
-
static contextType = AdsContext;
|
|
743
742
|
constructor(props) {
|
|
744
743
|
super(props);
|
|
745
744
|
this.state = {
|
|
@@ -752,7 +751,6 @@ var ErrorBoundary = class extends React.Component {
|
|
|
752
751
|
};
|
|
753
752
|
}
|
|
754
753
|
componentDidCatch(error, info) {
|
|
755
|
-
const contextValue = this.context;
|
|
756
754
|
const adServerUrl = this.props.adserverUrl;
|
|
757
755
|
const props = [
|
|
758
756
|
"adserverUrl",
|
|
@@ -765,23 +763,8 @@ var ErrorBoundary = class extends React.Component {
|
|
|
765
763
|
"isLoading",
|
|
766
764
|
"messages"
|
|
767
765
|
];
|
|
768
|
-
let contextProps = {};
|
|
769
|
-
if (contextValue) {
|
|
770
|
-
contextProps = props.reduce(
|
|
771
|
-
(acc, prop) => {
|
|
772
|
-
acc[prop] = contextValue[prop];
|
|
773
|
-
return acc;
|
|
774
|
-
},
|
|
775
|
-
{}
|
|
776
|
-
);
|
|
777
|
-
} else {
|
|
778
|
-
contextProps = {
|
|
779
|
-
...this.props.reqBodyParams,
|
|
780
|
-
adServerUrl
|
|
781
|
-
};
|
|
782
|
-
}
|
|
783
766
|
if (adServerUrl) {
|
|
784
|
-
captureErrorFn(adServerUrl, error, info.componentStack,
|
|
767
|
+
captureErrorFn(adServerUrl, error, info.componentStack, this.props.reqBodyParams);
|
|
785
768
|
}
|
|
786
769
|
}
|
|
787
770
|
render() {
|
|
@@ -1324,7 +1307,6 @@ var InlineAd_default = InlineAd;
|
|
|
1324
1307
|
export {
|
|
1325
1308
|
AdsContext,
|
|
1326
1309
|
AdsProvider,
|
|
1327
|
-
AdsProviderWithoutBoundary,
|
|
1328
1310
|
InlineAd_default as InlineAd,
|
|
1329
1311
|
VISITOR_ID_KEY,
|
|
1330
1312
|
useAd
|