@kontextso/sdk-react-native 0.0.5-rc.7 → 0.0.5
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 +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +2 -8
- package/dist/index.mjs +2 -8
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -140,7 +140,6 @@ interface AdsProviderProps {
|
|
|
140
140
|
logLevel?: any;
|
|
141
141
|
conversationId?: string;
|
|
142
142
|
styles?: AdStyles;
|
|
143
|
-
throwError?: boolean;
|
|
144
143
|
}
|
|
145
144
|
declare const VISITOR_ID_KEY = "brain-visitor-id";
|
|
146
145
|
declare const AdsProvider: ({ children, messages, publisherToken, isLoading, adserverUrl, isDisabled, character, conversationId, userId, logLevel, onAdView, onAdClick, ...props }: AdsProviderProps) => react_jsx_runtime.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -140,7 +140,6 @@ interface AdsProviderProps {
|
|
|
140
140
|
logLevel?: any;
|
|
141
141
|
conversationId?: string;
|
|
142
142
|
styles?: AdStyles;
|
|
143
|
-
throwError?: boolean;
|
|
144
143
|
}
|
|
145
144
|
declare const VISITOR_ID_KEY = "brain-visitor-id";
|
|
146
145
|
declare const AdsProvider: ({ children, messages, publisherToken, isLoading, adserverUrl, isDisabled, character, conversationId, userId, logLevel, onAdView, onAdClick, ...props }: AdsProviderProps) => react_jsx_runtime.JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -201,7 +201,7 @@ var parseMessageText = (text) => {
|
|
|
201
201
|
var import_loglevel = __toESM(require("loglevel"));
|
|
202
202
|
|
|
203
203
|
// package.json
|
|
204
|
-
var version = "0.0.5-rc.
|
|
204
|
+
var version = "0.0.5-rc.8";
|
|
205
205
|
|
|
206
206
|
// src/hooks/useInitializeAds.tsx
|
|
207
207
|
async function initialize(adServerUrl, publisherToken, userId, conversationId, legacyVisitorId, character) {
|
|
@@ -764,8 +764,6 @@ var captureErrorFn = (adServerUrl, error, componentStack, context) => {
|
|
|
764
764
|
})
|
|
765
765
|
}).catch((e) => {
|
|
766
766
|
import_loglevel4.default.warn("Error reporting client error", e);
|
|
767
|
-
}).finally(() => {
|
|
768
|
-
import_loglevel4.default.warn(error, componentStack);
|
|
769
767
|
});
|
|
770
768
|
};
|
|
771
769
|
var ErrorBoundary = class extends import_react4.default.Component {
|
|
@@ -860,9 +858,6 @@ var AdsProviderWithoutBoundary = ({
|
|
|
860
858
|
publisherToken
|
|
861
859
|
});
|
|
862
860
|
const ads = mergeAds({ initAds, preloadAds, streamAds, viewedAds });
|
|
863
|
-
if (props.throwError && Math.random() < 0.5) {
|
|
864
|
-
throw new Error("Test error");
|
|
865
|
-
}
|
|
866
861
|
const markAdAsViewed = (ad) => {
|
|
867
862
|
import_loglevel5.default.debug("[Brain] Calling onAdView");
|
|
868
863
|
onAdView && onAdView({
|
|
@@ -953,8 +948,7 @@ var AdsProvider = ({
|
|
|
953
948
|
userId,
|
|
954
949
|
logLevel,
|
|
955
950
|
onAdView,
|
|
956
|
-
onAdClick
|
|
957
|
-
throwError: props.throwError
|
|
951
|
+
onAdClick
|
|
958
952
|
}
|
|
959
953
|
)
|
|
960
954
|
}
|
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.8";
|
|
179
179
|
|
|
180
180
|
// src/hooks/useInitializeAds.tsx
|
|
181
181
|
async function initialize(adServerUrl, publisherToken, userId, conversationId, legacyVisitorId, character) {
|
|
@@ -738,8 +738,6 @@ var captureErrorFn = (adServerUrl, error, componentStack, context) => {
|
|
|
738
738
|
})
|
|
739
739
|
}).catch((e) => {
|
|
740
740
|
log4.warn("Error reporting client error", e);
|
|
741
|
-
}).finally(() => {
|
|
742
|
-
log4.warn(error, componentStack);
|
|
743
741
|
});
|
|
744
742
|
};
|
|
745
743
|
var ErrorBoundary = class extends React.Component {
|
|
@@ -834,9 +832,6 @@ var AdsProviderWithoutBoundary = ({
|
|
|
834
832
|
publisherToken
|
|
835
833
|
});
|
|
836
834
|
const ads = mergeAds({ initAds, preloadAds, streamAds, viewedAds });
|
|
837
|
-
if (props.throwError && Math.random() < 0.5) {
|
|
838
|
-
throw new Error("Test error");
|
|
839
|
-
}
|
|
840
835
|
const markAdAsViewed = (ad) => {
|
|
841
836
|
log5.debug("[Brain] Calling onAdView");
|
|
842
837
|
onAdView && onAdView({
|
|
@@ -927,8 +922,7 @@ var AdsProvider = ({
|
|
|
927
922
|
userId,
|
|
928
923
|
logLevel,
|
|
929
924
|
onAdView,
|
|
930
|
-
onAdClick
|
|
931
|
-
throwError: props.throwError
|
|
925
|
+
onAdClick
|
|
932
926
|
}
|
|
933
927
|
)
|
|
934
928
|
}
|