@sylergydigital/issue-pin-sdk 0.6.7 → 0.6.9
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +14 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -427,17 +427,8 @@ function FeedbackProvider({
|
|
|
427
427
|
skipFederation: config.skipFederation
|
|
428
428
|
});
|
|
429
429
|
const actorError = federationDone && !actorReady && (federationError || "Unable to link your identity yet. Please retry in a moment.") ? federationError || "Unable to link your identity yet. Please retry in a moment." : null;
|
|
430
|
-
if (resolveError) {
|
|
431
|
-
console.error("[EW SDK]", resolveError);
|
|
432
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
433
|
-
}
|
|
434
|
-
if (!resolved) {
|
|
435
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
436
|
-
}
|
|
437
|
-
const onModeChangeUnified = config.onModeChange ?? (config.onFeedbackActiveChange ? ((m) => config.onFeedbackActiveChange(m === "annotate")) : void 0);
|
|
438
|
-
const controlledModeFromProps = config.mode !== void 0 ? config.mode : config.feedbackActive !== void 0 ? config.feedbackActive ? "annotate" : "view" : void 0;
|
|
439
|
-
const initialModeUncontrolled = config.mode ?? (config.feedbackActive !== void 0 ? config.feedbackActive ? "annotate" : "view" : "view");
|
|
440
430
|
const openThreadInDashboard = useCallback((threadId) => {
|
|
431
|
+
if (!resolved) return;
|
|
441
432
|
const threadPath = `/threads/${threadId}`;
|
|
442
433
|
const baseUrl = resolved.siteUrl?.replace(/\/+$/, "") || window.location.origin;
|
|
443
434
|
if (config.apiKey && autoIdentity.accessToken) {
|
|
@@ -446,7 +437,8 @@ function FeedbackProvider({
|
|
|
446
437
|
method: "POST",
|
|
447
438
|
headers: {
|
|
448
439
|
"Content-Type": "application/json",
|
|
449
|
-
Authorization: `Bearer ${autoIdentity.accessToken}
|
|
440
|
+
Authorization: `Bearer ${autoIdentity.accessToken}`,
|
|
441
|
+
apikey: resolved.supabaseAnonKey
|
|
450
442
|
},
|
|
451
443
|
body: JSON.stringify({
|
|
452
444
|
apiKey: config.apiKey,
|
|
@@ -464,7 +456,17 @@ function FeedbackProvider({
|
|
|
464
456
|
return;
|
|
465
457
|
}
|
|
466
458
|
window.open(`${baseUrl}${threadPath}`, "_blank", "noopener,noreferrer");
|
|
467
|
-
}, [resolved
|
|
459
|
+
}, [resolved, config.apiKey, autoIdentity.accessToken]);
|
|
460
|
+
if (resolveError) {
|
|
461
|
+
console.error("[EW SDK]", resolveError);
|
|
462
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
463
|
+
}
|
|
464
|
+
if (!resolved) {
|
|
465
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
466
|
+
}
|
|
467
|
+
const onModeChangeUnified = config.onModeChange ?? (config.onFeedbackActiveChange ? ((m) => config.onFeedbackActiveChange(m === "annotate")) : void 0);
|
|
468
|
+
const controlledModeFromProps = config.mode !== void 0 ? config.mode : config.feedbackActive !== void 0 ? config.feedbackActive ? "annotate" : "view" : void 0;
|
|
469
|
+
const initialModeUncontrolled = config.mode ?? (config.feedbackActive !== void 0 ? config.feedbackActive ? "annotate" : "view" : "view");
|
|
468
470
|
return /* @__PURE__ */ jsx(
|
|
469
471
|
FeedbackProviderInner,
|
|
470
472
|
{
|