@mhosaic/feedback 0.33.0 → 0.34.0
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/{chunk-RR6UB75B.mjs → chunk-J45ACCSP.mjs} +85 -4
- package/dist/chunk-J45ACCSP.mjs.map +1 -0
- package/dist/embed.min.js +21 -5
- package/dist/embed.min.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/react.mjs +1 -1
- package/dist/vue.d.ts +29 -0
- package/dist/vue.mjs +44 -0
- package/dist/vue.mjs.map +1 -0
- package/dist/widget.min.js +22 -6
- package/dist/widget.min.js.map +1 -1
- package/package.json +16 -7
- package/dist/chunk-RR6UB75B.mjs.map +0 -1
|
@@ -773,6 +773,10 @@ var DEFAULT_STRINGS = {
|
|
|
773
773
|
"mine.empty.title": "No reports yet",
|
|
774
774
|
"mine.empty.body": "Once you send feedback you can follow the thread here.",
|
|
775
775
|
"mine.refresh": "Refresh",
|
|
776
|
+
"mine.validate.banner": "{count} fix(es) awaiting your confirmation",
|
|
777
|
+
"mine.validate.confirm": "Fix works",
|
|
778
|
+
"mine.validate.reopen": "Still broken",
|
|
779
|
+
"mine.validate.view": "Review",
|
|
776
780
|
"diag.run": "Diagnose",
|
|
777
781
|
"diag.running": "Checking the connection\u2026",
|
|
778
782
|
"diag.offline": "You appear to be offline. Reconnect and retry.",
|
|
@@ -969,6 +973,10 @@ var FRENCH_STRINGS = {
|
|
|
969
973
|
"mine.empty.title": "Aucun rapport",
|
|
970
974
|
"mine.empty.body": "Apr\xE8s votre premier envoi vous pourrez suivre la conversation ici.",
|
|
971
975
|
"mine.refresh": "Actualiser",
|
|
976
|
+
"mine.validate.banner": "{count} correctif(s) \xE0 confirmer",
|
|
977
|
+
"mine.validate.confirm": "Corrig\xE9 \u2713",
|
|
978
|
+
"mine.validate.reopen": "Toujours cass\xE9",
|
|
979
|
+
"mine.validate.view": "Voir",
|
|
972
980
|
"diag.run": "Diagnostiquer",
|
|
973
981
|
"diag.running": "V\xE9rification de la connexion\u2026",
|
|
974
982
|
"diag.offline": "Vous semblez hors ligne. Reconnectez-vous puis r\xE9essayez.",
|
|
@@ -3657,6 +3665,20 @@ function MineList({ api, externalId, strings, onSelect, onOpenSeq }) {
|
|
|
3657
3665
|
const [error, setError] = useState7(null);
|
|
3658
3666
|
const [refreshing, setRefreshing] = useState7(false);
|
|
3659
3667
|
const [filter, setFilter] = useState7("all");
|
|
3668
|
+
const [validating, setValidating] = useState7(null);
|
|
3669
|
+
const validate = async (reportId, kind) => {
|
|
3670
|
+
setValidating(reportId);
|
|
3671
|
+
try {
|
|
3672
|
+
if (kind === "confirm") await api.closeAsResolved(reportId, externalId);
|
|
3673
|
+
else await api.reopenUnresolved(reportId, externalId);
|
|
3674
|
+
await fetchRows();
|
|
3675
|
+
} catch (err) {
|
|
3676
|
+
if (typeof console !== "undefined") console.warn("[mhosaic] validate:", err);
|
|
3677
|
+
if (mountedRef.current) setError(strings["mine.error"]);
|
|
3678
|
+
} finally {
|
|
3679
|
+
if (mountedRef.current) setValidating(null);
|
|
3680
|
+
}
|
|
3681
|
+
};
|
|
3660
3682
|
const [jumpValue, setJumpValue] = useState7("");
|
|
3661
3683
|
const [jumpError, setJumpError] = useState7(false);
|
|
3662
3684
|
const [jumping, setJumping] = useState7(false);
|
|
@@ -3746,6 +3768,21 @@ function MineList({ api, externalId, strings, onSelect, onOpenSeq }) {
|
|
|
3746
3768
|
] })
|
|
3747
3769
|
] }),
|
|
3748
3770
|
jumpError && /* @__PURE__ */ jsx11("div", { class: "mine-jump-error error", role: "alert", children: strings["mine.jump.not_found"] }),
|
|
3771
|
+
rows && rows.some((r) => r.status === "awaiting_validation") && /* @__PURE__ */ jsxs11("div", { class: "validate-banner", role: "status", children: [
|
|
3772
|
+
/* @__PURE__ */ jsx11("span", { children: strings["mine.validate.banner"].replace(
|
|
3773
|
+
"{count}",
|
|
3774
|
+
String(rows.filter((r) => r.status === "awaiting_validation").length)
|
|
3775
|
+
) }),
|
|
3776
|
+
/* @__PURE__ */ jsx11(
|
|
3777
|
+
"button",
|
|
3778
|
+
{
|
|
3779
|
+
type: "button",
|
|
3780
|
+
class: "btn",
|
|
3781
|
+
onClick: () => setFilter("awaiting_validation"),
|
|
3782
|
+
children: strings["mine.validate.view"]
|
|
3783
|
+
}
|
|
3784
|
+
)
|
|
3785
|
+
] }),
|
|
3749
3786
|
rows && rows.length > 0 && /* @__PURE__ */ jsx11(KpiStrip, { rows, filter, onFilter: setFilter, strings }),
|
|
3750
3787
|
isLoading && /* @__PURE__ */ jsx11("div", { class: "mine-loading", children: strings["mine.loading"] }),
|
|
3751
3788
|
error && /* @__PURE__ */ jsxs11("div", { class: "error", children: [
|
|
@@ -3757,7 +3794,35 @@ function MineList({ api, externalId, strings, onSelect, onOpenSeq }) {
|
|
|
3757
3794
|
/* @__PURE__ */ jsx11("p", { children: strings["mine.empty.body"] })
|
|
3758
3795
|
] }),
|
|
3759
3796
|
visibleEmpty && /* @__PURE__ */ jsx11("div", { class: "mine-empty", children: /* @__PURE__ */ jsx11("p", { children: strings["mine.filter.empty"] }) }),
|
|
3760
|
-
visibleRows && visibleRows.length > 0 && /* @__PURE__ */ jsx11("ul", { class: "mine-rows", children: visibleRows.map((row) => /* @__PURE__ */
|
|
3797
|
+
visibleRows && visibleRows.length > 0 && /* @__PURE__ */ jsx11("ul", { class: "mine-rows", children: visibleRows.map((row) => /* @__PURE__ */ jsxs11("li", { children: [
|
|
3798
|
+
/* @__PURE__ */ jsx11(ReportRow, { row, strings, onClick: () => onSelect(row) }),
|
|
3799
|
+
row.status === "awaiting_validation" && /* @__PURE__ */ jsxs11("div", { class: "validate-actions", children: [
|
|
3800
|
+
/* @__PURE__ */ jsx11(
|
|
3801
|
+
"button",
|
|
3802
|
+
{
|
|
3803
|
+
type: "button",
|
|
3804
|
+
class: "btn",
|
|
3805
|
+
disabled: validating === row.id,
|
|
3806
|
+
onClick: () => {
|
|
3807
|
+
void validate(row.id, "confirm");
|
|
3808
|
+
},
|
|
3809
|
+
children: strings["mine.validate.confirm"]
|
|
3810
|
+
}
|
|
3811
|
+
),
|
|
3812
|
+
/* @__PURE__ */ jsx11(
|
|
3813
|
+
"button",
|
|
3814
|
+
{
|
|
3815
|
+
type: "button",
|
|
3816
|
+
class: "btn btn--ghost",
|
|
3817
|
+
disabled: validating === row.id,
|
|
3818
|
+
onClick: () => {
|
|
3819
|
+
void validate(row.id, "reopen");
|
|
3820
|
+
},
|
|
3821
|
+
children: strings["mine.validate.reopen"]
|
|
3822
|
+
}
|
|
3823
|
+
)
|
|
3824
|
+
] })
|
|
3825
|
+
] })) })
|
|
3761
3826
|
] });
|
|
3762
3827
|
}
|
|
3763
3828
|
|
|
@@ -4775,6 +4840,22 @@ var WIDGET_STYLES = `
|
|
|
4775
4840
|
}
|
|
4776
4841
|
.mine-empty strong { display: block; color: var(--mfb-text); margin-bottom: 4px; }
|
|
4777
4842
|
|
|
4843
|
+
.validate-banner {
|
|
4844
|
+
display: flex;
|
|
4845
|
+
align-items: center;
|
|
4846
|
+
justify-content: space-between;
|
|
4847
|
+
gap: 8px;
|
|
4848
|
+
padding: 8px 12px;
|
|
4849
|
+
margin-bottom: 8px;
|
|
4850
|
+
border: 1px solid var(--mfb-accent, #2563eb);
|
|
4851
|
+
border-radius: 8px;
|
|
4852
|
+
font-size: 13px;
|
|
4853
|
+
}
|
|
4854
|
+
.validate-actions {
|
|
4855
|
+
display: flex;
|
|
4856
|
+
gap: 8px;
|
|
4857
|
+
margin: 4px 0 8px;
|
|
4858
|
+
}
|
|
4778
4859
|
.mine-rows {
|
|
4779
4860
|
list-style: none;
|
|
4780
4861
|
margin: 0;
|
|
@@ -6483,8 +6564,8 @@ function createFeedback(config) {
|
|
|
6483
6564
|
capture_method: captureMethod,
|
|
6484
6565
|
technical_context
|
|
6485
6566
|
};
|
|
6486
|
-
if ("0.
|
|
6487
|
-
payload.widget_version = "0.
|
|
6567
|
+
if ("0.34.0") {
|
|
6568
|
+
payload.widget_version = "0.34.0";
|
|
6488
6569
|
}
|
|
6489
6570
|
if (manualScreenshots?.length) {
|
|
6490
6571
|
payload.screenshots = manualScreenshots;
|
|
@@ -6610,4 +6691,4 @@ function createFeedback(config) {
|
|
|
6610
6691
|
export {
|
|
6611
6692
|
createFeedback
|
|
6612
6693
|
};
|
|
6613
|
-
//# sourceMappingURL=chunk-
|
|
6694
|
+
//# sourceMappingURL=chunk-J45ACCSP.mjs.map
|