@superfeedback/widget 0.0.30 → 0.0.31
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.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/widget.css +1 -1
- package/dist/widget.d.ts +1 -0
- package/dist/widget.iife.js +1 -1
- package/dist/widget.js +22 -14
- package/package.json +1 -1
package/dist/widget.js
CHANGED
|
@@ -6737,19 +6737,19 @@ const ACTIONS = [
|
|
|
6737
6737
|
leaveTo: "sf:opacity-0 sf:-translate-y-1"
|
|
6738
6738
|
}]
|
|
6739
6739
|
]);
|
|
6740
|
-
var _hoisted_1$5 = { class: "grid w-80 gap-4 rounded-xl border border-solid border-gray-200 bg-white p-6 text-center" }, _hoisted_2$3 = {
|
|
6740
|
+
var _hoisted_1$5 = { class: "sf:grid sf:w-80 sf:gap-4 sf:rounded-xl sf:border sf:border-solid sf:border-gray-200 sf:bg-white sf:p-6 sf:text-center" }, _hoisted_2$3 = {
|
|
6741
6741
|
key: 0,
|
|
6742
|
-
class: "mx-auto flex size-16 items-center justify-center rounded-full bg-green-100"
|
|
6742
|
+
class: "sf:mx-auto sf:flex sf:size-16 sf:items-center sf:justify-center sf:rounded-full sf:bg-green-100"
|
|
6743
6743
|
}, _hoisted_3$3 = {
|
|
6744
6744
|
key: 1,
|
|
6745
|
-
class: "mx-auto flex size-24 items-center justify-center rounded-full bg-red-100"
|
|
6745
|
+
class: "sf:mx-auto sf:flex sf:size-24 sf:items-center sf:justify-center sf:rounded-full sf:bg-red-100"
|
|
6746
6746
|
}, _hoisted_4$2 = {
|
|
6747
6747
|
key: 2,
|
|
6748
|
-
class: "text-2xl font-bold text-gray-900"
|
|
6748
|
+
class: "sf:text-2xl sf:font-bold sf:text-gray-900"
|
|
6749
6749
|
}, _hoisted_5$1 = {
|
|
6750
6750
|
key: 3,
|
|
6751
|
-
class: "text-2xl font-bold text-gray-900"
|
|
6752
|
-
}, _hoisted_6$1 = { class: "text-sm text-gray-600" }, fd_confirmation_default = /* @__PURE__ */ defineComponent({
|
|
6751
|
+
class: "sf:text-2xl sf:font-bold sf:text-gray-900"
|
|
6752
|
+
}, _hoisted_6$1 = { class: "sf:text-sm sf:text-gray-600" }, fd_confirmation_default = /* @__PURE__ */ defineComponent({
|
|
6753
6753
|
__name: "fd-confirmation",
|
|
6754
6754
|
props: { successResponse: { type: Boolean } },
|
|
6755
6755
|
emits: ["close"],
|
|
@@ -6769,20 +6769,20 @@ var _hoisted_1$5 = { class: "grid w-80 gap-4 rounded-xl border border-solid bord
|
|
|
6769
6769
|
Uc.successResponse ? (openBlock(), createElementBlock("div", _hoisted_2$3, [createVNode(fd_icon_default, {
|
|
6770
6770
|
"icon-name": "lucide:badge-check",
|
|
6771
6771
|
"icon-size": "lg",
|
|
6772
|
-
class: "text-green-600"
|
|
6772
|
+
class: "sf:text-green-600"
|
|
6773
6773
|
})])) : (openBlock(), createElementBlock("div", _hoisted_3$3, [createVNode(fd_icon_default, {
|
|
6774
6774
|
"icon-name": "lucide:triangle-alert",
|
|
6775
6775
|
"icon-size": "lg",
|
|
6776
|
-
class: "text-red-600"
|
|
6776
|
+
class: "sf:text-red-600"
|
|
6777
6777
|
})])),
|
|
6778
|
-
Uc.successResponse ? (openBlock(), createElementBlock("h2", _hoisted_4$2, " Feedback Sent! ")) : (openBlock(), createElementBlock("h2", _hoisted_5$1, "Feedback Not Sent")),
|
|
6778
|
+
Uc.successResponse ? (openBlock(), createElementBlock("h2", _hoisted_4$2, " Feedback Sent! ")) : (openBlock(), createElementBlock("h2", _hoisted_5$1, " Feedback Not Sent ")),
|
|
6779
6779
|
createBaseVNode("p", _hoisted_6$1, toDisplayString(Uc.successResponse ? "Thank you for your feedback! We will check it out as soon as possible." : "Sorry, we couldn't send your feedback. Please try again."), 1),
|
|
6780
6780
|
createBaseVNode("button", {
|
|
6781
6781
|
class: "sf:rr-block sf:flex sf:w-full sf:items-center sf:justify-center sf:gap-2 sf:rounded-2xl sf:bg-blue-500 sf:px-6 sf:py-3 sf:text-sm sf:font-medium sf:text-white sf:shadow-md sf:transition-all sf:hover:from-blue-600 sf:hover:to-indigo-600 sf:disabled:cursor-not-allowed sf:disabled:opacity-50 sf:disabled:hover:from-blue-500 sf:disabled:hover:to-indigo-600",
|
|
6782
6782
|
onClick: bg
|
|
6783
6783
|
}, " Close "),
|
|
6784
6784
|
createBaseVNode("button", {
|
|
6785
|
-
class: "mx-auto text-sm text-gray-600 transition-colors hover:text-gray-900",
|
|
6785
|
+
class: "sf:mx-auto sf:text-sm sf:text-gray-600 sf:transition-colors sf:hover:text-gray-900",
|
|
6786
6786
|
onClick: bg
|
|
6787
6787
|
}, " Send another ")
|
|
6788
6788
|
]));
|
|
@@ -6873,11 +6873,11 @@ var _hoisted_1$5 = { class: "grid w-80 gap-4 rounded-xl border border-solid bord
|
|
|
6873
6873
|
target: "_blank",
|
|
6874
6874
|
class: "sf:text-[11px] sf:font-bold sf:text-gray-800 sf:transition-colors sf:group-hover:text-blue-500 sf:hover:text-blue-500"
|
|
6875
6875
|
}, " superfeedback ")], -1)
|
|
6876
|
-
], 2)) : createCommentVNode("", !0), jg.value === !0
|
|
6876
|
+
], 2)) : createCommentVNode("", !0), jg.value === null ? createCommentVNode("", !0) : (openBlock(), createBlock(fd_confirmation_default, {
|
|
6877
6877
|
key: 1,
|
|
6878
6878
|
onClose: bg[2] ||= (Uc) => jg.value = null,
|
|
6879
6879
|
"success-response": jg.value
|
|
6880
|
-
}, null, 8, ["success-response"]))
|
|
6880
|
+
}, null, 8, ["success-response"]))], 64));
|
|
6881
6881
|
}
|
|
6882
6882
|
});
|
|
6883
6883
|
function t(Uc, vg, yg) {
|
|
@@ -9189,16 +9189,24 @@ var _hoisted_1 = { key: 0 }, root_default = /* @__PURE__ */ defineComponent({
|
|
|
9189
9189
|
function Jg() {
|
|
9190
9190
|
return shouldDisplayWidget(bg.value?.launcherDisplayMode, bg.value?.urlMatchType, bg.value?.urlConditions);
|
|
9191
9191
|
}
|
|
9192
|
+
function Yg(Uc) {
|
|
9193
|
+
let vg = Uc.replace("#", "");
|
|
9194
|
+
vg.length === 3 && (vg = vg[0] + vg[0] + vg[1] + vg[1] + vg[2] + vg[2]);
|
|
9195
|
+
let yg = parseInt(vg.substring(0, 2), 16), bg = parseInt(vg.substring(2, 4), 16), xg = parseInt(vg.substring(4, 6), 16);
|
|
9196
|
+
return (.299 * yg + .587 * bg + .114 * xg) / 255 < .5;
|
|
9197
|
+
}
|
|
9198
|
+
let Xg = computed(() => Yg(bg.value?.triggerLabelColor || "#FBBF24") ? "sf:text-gray-100" : "sf:text-gray-900");
|
|
9192
9199
|
return useHistoryWatcherFn(() => {
|
|
9193
9200
|
typeof window < "u" && !yg.previewMode && (qg.value = Jg());
|
|
9194
9201
|
}), (Uc, Sg) => (openBlock(), createElementBlock(Fragment, null, [
|
|
9195
9202
|
unref(xg) && qg.value || yg.previewMode ? (openBlock(), createElementBlock("button", {
|
|
9196
9203
|
key: 0,
|
|
9197
|
-
class: normalizeClass(["sf:
|
|
9204
|
+
class: normalizeClass(["sf:px-3 sf:py-1 sf:z-50", [Ug.value, Xg.value]]),
|
|
9205
|
+
style: normalizeStyle({ backgroundColor: unref(bg)?.triggerLabelColor || "#FBBF24" }),
|
|
9198
9206
|
ref_key: "reference",
|
|
9199
9207
|
ref: Cg,
|
|
9200
9208
|
onClick: Dg
|
|
9201
|
-
}, toDisplayString(unref(bg)?.triggerLabel),
|
|
9209
|
+
}, toDisplayString(unref(bg)?.triggerLabel), 7)) : createCommentVNode("", !0),
|
|
9202
9210
|
(openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(Transition, null, {
|
|
9203
9211
|
default: withCtx(() => [unref(bg) ? (openBlock(), createElementBlock("section", {
|
|
9204
9212
|
key: 0,
|