@feedmepos/mf-report 5.33.3-beta.0 → 5.34.0-beta.1
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/{App-GzjtZ_d7.js → App-DyrakazI.js} +98 -97
- package/dist/{DateRangeSelect-CfV_WX9B.js → DateRangeSelect-D5SGi6ca.js} +67 -67
- package/dist/{Default.vue_vue_type_script_setup_true_lang-Y9S0SZ7o.js → Default.vue_vue_type_script_setup_true_lang-DsTRZa_6.js} +3 -3
- package/dist/DigestListView-BnkDRa7x.js +876 -0
- package/dist/{DigestReaderView-C1aKtovl.js → DigestReaderView-ByISB4qT.js} +63 -63
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-CH2pf4XK.js → DynamicWidget.vue_vue_type_script_setup_true_lang-BKNNtuyG.js} +733 -733
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DJ-LIqFg.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DHrnVaog.js} +526 -526
- package/dist/{InsightView-O5pzXY-g.js → InsightView-CUBTqwTI.js} +88 -88
- package/dist/{Integration-DHtuuAEx.js → Integration-WDbqUebw.js} +30 -30
- package/dist/{Integrations-xK1WbyH5.js → Integrations-C5_nERZt.js} +10 -10
- package/dist/{Layout-QoN7zexW.js → Layout-BqzoK8Mg.js} +3 -3
- package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-DEeDj0JI.js → LocationSelect.vue_vue_type_script_setup_true_lang-kvdk_gEw.js} +306 -306
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-tmHI7t6B.js → MenuTab.vue_vue_type_script_setup_true_lang-B8uHS4bV.js} +6 -6
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DNrIAtGk.js → NavigationTab.vue_vue_type_script_setup_true_lang-CpexikuB.js} +12784 -11760
- package/dist/{OverviewView-CcqkLuon.js → OverviewView-mOEI9DAV.js} +7 -7
- package/dist/{Report-CcGTeCCn.js → Report-DmbTzjbj.js} +12 -12
- package/dist/{ReportCanvasView-C7CJq01e.js → ReportCanvasView-BqZ38Tsk.js} +426 -426
- package/dist/{ReportEditor-Vu592FeV.js → ReportEditor-8oAVfFdY.js} +32 -32
- package/dist/{ReportView-D-J7pmp5.js → ReportView-B6nE3qwV.js} +13 -13
- package/dist/{ReportViewRoute-TSaFpVVj.js → ReportViewRoute-DqXbM93B.js} +5 -5
- package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-Cxx-TQz9.js +137 -0
- package/dist/{Setting-tUrQLnqy.js → Setting-C01x-O-V.js} +6 -6
- package/dist/{Template-DRdVU80G.js → Template-VyBWHUXE.js} +80 -80
- package/dist/{TileEditor-CIR7d_cP.js → TileEditor-DICyBR1o.js} +1566 -1566
- package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-BtHZMHPR.js → TilePageStack.vue_vue_type_script_setup_true_lang-Dyaao76o.js} +82 -82
- package/dist/{TransitionFade-7EvXhuHo.js → TransitionFade-kXCDPEMQ.js} +170 -170
- package/dist/{XeroRedirect-CuTrP62C.js → XeroRedirect-D4sHbZe7.js} +3 -3
- package/dist/_plugin-vue_export-helper-Bx7s49ra.js +2828 -0
- package/dist/{app-1dD87x1L.js → app-BQDKX7NB.js} +5688 -13890
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-DvK7K5ca.js → formatChartData.worker-Cpgnh20a.js} +62 -62
- package/dist/assets/{processTableData.worker-C3l4iUXL.js → processTableData.worker-B7I6PElJ.js} +64 -64
- package/dist/{chart-BywXiz4O.js → chart-DU0N9V2o.js} +7 -4
- package/dist/currency-8SmajsvB.js +12 -0
- package/dist/index-BQ8NJuCA.js +24722 -0
- package/dist/{report-B547gOvv.js → report-CcXsPATD.js} +23 -23
- package/dist/style.css +1 -1
- package/dist/{useDigestFont-CVDCu0Is.js → useDigestFont-CjZZOIRM.js} +80 -80
- package/dist/{useReportCanvasPanel-DLt-AkFQ.js → useReportCanvasPanel-dWlB_xvo.js} +975 -976
- package/dist/{useRestaurantPermission-BtRjWi-p.js → useRestaurantPermission-D3G7ET0Z.js} +2 -2
- package/package.json +11 -11
- package/dist/DigestListView-DJQikkEC.js +0 -876
- package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js +0 -137
- package/dist/_plugin-vue_export-helper-C6QDExPN.js +0 -2718
- package/dist/currency-BXCfWg4A.js +0 -12
- package/dist/index-B_yQyaGT.js +0 -25511
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as ut, ref as d, computed as
|
|
2
|
-
import { useRoute as
|
|
3
|
-
import { u as ct, _ as vt } from "./_plugin-vue_export-helper-
|
|
1
|
+
import { defineComponent as ut, ref as d, computed as _, watch as $e, onMounted as dt, onBeforeUnmount as He, resolveComponent as se, openBlock as s, createElementBlock as p, createElementVNode as r, createVNode as D, toDisplayString as c, createCommentVNode as x, Fragment as Pe, renderList as Ne, normalizeClass as Ue, createBlock as ne, nextTick as qe, unref as a, withCtx as fe, isRef as lt, withDirectives as ea, vShow as ta, withKeys as aa, withModifiers as oa } from "vue";
|
|
2
|
+
import { useRoute as ra, useRouter as na } from "vue-router";
|
|
3
|
+
import { u as ct, _ as vt } from "./_plugin-vue_export-helper-Bx7s49ra.js";
|
|
4
4
|
import { storeToRefs as je } from "pinia";
|
|
5
5
|
import { useSnackbar as sa } from "@feedmepos/ui-library";
|
|
6
|
-
import { g as la, r as ia, f as ua, h as da, u as ca, c as va, b as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { D as
|
|
9
|
-
import { a as
|
|
10
|
-
import { u as Ca } from "./report-
|
|
6
|
+
import { g as la, r as ia, f as ua, h as da, u as ca, c as va, b as ma, a as fa, R as pa, e as ya, p as ba, i as ha, j as ga, k as it, l as wa } from "./useReportCanvasPanel-dWlB_xvo.js";
|
|
7
|
+
import { _ as ka } from "./LocationSelect.vue_vue_type_script_setup_true_lang-kvdk_gEw.js";
|
|
8
|
+
import { D as _a } from "./DateRangeSelect-D5SGi6ca.js";
|
|
9
|
+
import { a as mt, j as xa } from "./app-BQDKX7NB.js";
|
|
10
|
+
import { u as Ca } from "./report-CcXsPATD.js";
|
|
11
11
|
import { u as Sa } from "./global-loader-BuxFfehu.js";
|
|
12
12
|
import { r as Ra } from "./i18n-DbyciK4x.js";
|
|
13
13
|
const Va = ["aria-label"], Aa = { class: "flex h-64 shrink-0 items-center gap-12 border-b border-fm-color-border-secondary px-[20px]" }, $a = { class: "fm-typo-en-body-md-600 grow" }, Ea = ["aria-label", "disabled"], Fa = { class: "min-h-0 grow overflow-y-auto px-[20px] py-[20px]" }, Da = { class: "fm-typo-en-body-md-400 mb-[20px] text-fm-color-typo-secondary" }, Ia = { class: "mb-24 rounded-[12px] border border-fm-color-border-secondary p-16" }, Ta = { class: "mb-8 flex items-center gap-8" }, Oa = { class: "fm-typo-en-body-md-600 grow" }, Ba = { class: "fm-typo-en-body-sm-600 rounded-md bg-fm-color-neutral-gray-100 px-8 py-4" }, La = {
|
|
@@ -30,7 +30,7 @@ const Va = ["aria-label"], Aa = { class: "flex h-64 shrink-0 items-center gap-12
|
|
|
30
30
|
}, Ya = { class: "fm-typo-en-body-md-400 line-clamp-3 block break-words" }, eo = {
|
|
31
31
|
"data-testid": "canvas-version-author",
|
|
32
32
|
class: "mt-8 flex items-center gap-8 text-fm-color-typo-secondary"
|
|
33
|
-
}, to = { class: "fm-typo-en-body-sm-400 line-clamp-1 break-words" }, ao = { class: "shrink-0 border-t border-fm-color-border-secondary p-[20px]" }, oo = { class: "fm-typo-en-body-sm-400 mb-4 text-fm-color-typo-secondary" },
|
|
33
|
+
}, to = { class: "fm-typo-en-body-sm-400 line-clamp-1 break-words" }, ao = { class: "shrink-0 border-t border-fm-color-border-secondary p-[20px]" }, oo = { class: "fm-typo-en-body-sm-400 mb-4 text-fm-color-typo-secondary" }, ro = { class: "fm-typo-en-body-md-400 mb-16 max-h-[120px] overflow-y-auto whitespace-pre-wrap break-words" }, no = {
|
|
34
34
|
key: 0,
|
|
35
35
|
role: "alert",
|
|
36
36
|
class: "fm-typo-en-body-md-400 mb-12 text-fm-color-typo-error"
|
|
@@ -53,203 +53,203 @@ const Va = ["aria-label"], Aa = { class: "flex h-64 shrink-0 items-center gap-12
|
|
|
53
53
|
busy: { type: Boolean }
|
|
54
54
|
},
|
|
55
55
|
emits: ["close", "restored", "restoring"],
|
|
56
|
-
setup(
|
|
57
|
-
const
|
|
58
|
-
let
|
|
59
|
-
function
|
|
60
|
-
const V = new Date(
|
|
61
|
-
return Number.isFinite(V.getTime()) ? new Intl.DateTimeFormat(C.value, { ...
|
|
56
|
+
setup(A, { emit: le }) {
|
|
57
|
+
const U = A, K = le, { t: m, locale: C } = ct(), l = (o, n = {}) => m(`reportV5.reportCanvas.history.${o}`, n), E = d([]), I = d(!0), Z = d(!1), te = d(!1), v = d(!1), i = d(!1), T = d(), ie = d(), ae = d(), q = d(), z = _(() => E.value.find((o) => o.id === T.value)), w = _(() => U.hasDraft || U.busy || v.value);
|
|
58
|
+
let j = !0, G = null;
|
|
59
|
+
function ue(o, n) {
|
|
60
|
+
const V = new Date(o);
|
|
61
|
+
return Number.isFinite(V.getTime()) ? new Intl.DateTimeFormat(C.value, { ...n, timeZone: U.timezone }).format(
|
|
62
62
|
V
|
|
63
63
|
) : l("unknownDate");
|
|
64
64
|
}
|
|
65
|
-
const
|
|
66
|
-
function R(
|
|
67
|
-
return b(
|
|
65
|
+
const de = (o) => ue(o, { dateStyle: "medium", timeStyle: "short" }), f = (o) => ue(o, { hour: "numeric", minute: "2-digit", second: "2-digit" }), b = (o) => ue(o, { year: "numeric", month: "2-digit", day: "2-digit" });
|
|
66
|
+
function R(o) {
|
|
67
|
+
return b(o) === b((/* @__PURE__ */ new Date()).toISOString()) ? l("today") : ue(o, { month: "long", day: "numeric", year: "numeric" });
|
|
68
68
|
}
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
for (const
|
|
72
|
-
const V = b(
|
|
73
|
-
|
|
69
|
+
const O = _(() => {
|
|
70
|
+
const o = [];
|
|
71
|
+
for (const n of [...E.value].sort((V, H) => Date.parse(H.at) - Date.parse(V.at))) {
|
|
72
|
+
const V = b(n.at), H = o.find((ge) => ge.key === V);
|
|
73
|
+
H ? H.versions.push(n) : o.push({ key: V, label: R(n.at), versions: [n] });
|
|
74
74
|
}
|
|
75
|
-
return
|
|
76
|
-
}),
|
|
77
|
-
var
|
|
78
|
-
return
|
|
79
|
-
},
|
|
80
|
-
var
|
|
81
|
-
return ((
|
|
75
|
+
return o;
|
|
76
|
+
}), P = (o) => {
|
|
77
|
+
var n;
|
|
78
|
+
return o.id === ((n = E.value[0]) == null ? void 0 : n.id);
|
|
79
|
+
}, Q = (o) => o.prompt.trim() || l("noPrompt"), J = (o) => o.restoredFrom ? l("restoredFrom", { at: de(o.restoredFrom) }) : "", ve = (o) => [J(o), Q(o)].filter(Boolean).join(" "), Ce = (o) => {
|
|
80
|
+
var n, V;
|
|
81
|
+
return ((n = o.author) == null ? void 0 : n.name) || ((V = o.author) == null ? void 0 : V.email) || l("unknownUser");
|
|
82
82
|
};
|
|
83
83
|
async function he() {
|
|
84
|
-
|
|
84
|
+
I.value = !0, Z.value = !1;
|
|
85
85
|
try {
|
|
86
|
-
const
|
|
87
|
-
|
|
86
|
+
const o = await la(U.reportId);
|
|
87
|
+
j && (E.value = o);
|
|
88
88
|
} catch {
|
|
89
|
-
|
|
89
|
+
j && (Z.value = !0);
|
|
90
90
|
} finally {
|
|
91
|
-
|
|
91
|
+
j && (I.value = !1);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
v.value ||
|
|
94
|
+
function X(o) {
|
|
95
|
+
v.value || P(o) || (T.value = T.value === o.id ? void 0 : o.id, i.value = !1, te.value = !1);
|
|
96
96
|
}
|
|
97
97
|
async function Se() {
|
|
98
|
-
var
|
|
99
|
-
!
|
|
98
|
+
var o;
|
|
99
|
+
!z.value || w.value || (i.value = !0, await qe(), (o = ae.value) == null || o.focus());
|
|
100
100
|
}
|
|
101
101
|
async function S() {
|
|
102
|
-
var
|
|
103
|
-
i.value = !1,
|
|
102
|
+
var o;
|
|
103
|
+
i.value = !1, te.value = !1, await qe(), (o = q.value) == null || o.focus();
|
|
104
104
|
}
|
|
105
|
-
async function
|
|
106
|
-
if (!(!
|
|
107
|
-
v.value = !0,
|
|
105
|
+
async function oe() {
|
|
106
|
+
if (!(!z.value || w.value || !i.value)) {
|
|
107
|
+
v.value = !0, K("restoring", !0), te.value = !1;
|
|
108
108
|
try {
|
|
109
|
-
const
|
|
110
|
-
|
|
109
|
+
const o = await ia(U.reportId, z.value.id);
|
|
110
|
+
j && K("restored", o);
|
|
111
111
|
} catch {
|
|
112
|
-
|
|
112
|
+
j && (te.value = !0);
|
|
113
113
|
} finally {
|
|
114
|
-
v.value = !1,
|
|
114
|
+
v.value = !1, K("restoring", !1);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
function pe(
|
|
119
|
-
|
|
118
|
+
function pe(o) {
|
|
119
|
+
o.key === "Escape" && (o.stopPropagation(), !v.value && (i.value ? S() : K("close")));
|
|
120
120
|
}
|
|
121
|
-
return $e(w, (
|
|
122
|
-
|
|
121
|
+
return $e(w, (o) => {
|
|
122
|
+
o && !v.value && (i.value = !1);
|
|
123
123
|
}), dt(() => {
|
|
124
|
-
var
|
|
125
|
-
|
|
124
|
+
var o;
|
|
125
|
+
G = document.activeElement, (o = ie.value) == null || o.focus(), he();
|
|
126
126
|
}), He(() => {
|
|
127
|
-
|
|
128
|
-
}), (
|
|
129
|
-
const V =
|
|
127
|
+
j = !1, G == null || G.focus();
|
|
128
|
+
}), (o, n) => {
|
|
129
|
+
const V = se("FmIcon"), H = se("FmButton"), ge = se("FmAvatar");
|
|
130
130
|
return s(), p("aside", {
|
|
131
131
|
"data-testid": "canvas-versions",
|
|
132
132
|
class: "flex h-full min-h-0 flex-col border-l border-fm-color-border-secondary bg-fm-color-neutral-white text-fm-color-typo-primary",
|
|
133
133
|
"aria-label": l("title"),
|
|
134
134
|
onKeydown: pe
|
|
135
135
|
}, [
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
r("header", Aa, [
|
|
137
|
+
D(V, {
|
|
138
138
|
name: "history",
|
|
139
139
|
size: "md",
|
|
140
140
|
class: "text-fm-color-typo-secondary"
|
|
141
141
|
}),
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
r("h2", $a, c(l("title")), 1),
|
|
143
|
+
r("button", {
|
|
144
144
|
ref_key: "closeButton",
|
|
145
|
-
ref:
|
|
145
|
+
ref: ie,
|
|
146
146
|
"data-testid": "canvas-versions-close",
|
|
147
147
|
class: "history-button flex h-[36px] w-[36px] items-center justify-center rounded-md text-fm-color-typo-secondary",
|
|
148
148
|
"aria-label": l("close"),
|
|
149
149
|
disabled: v.value,
|
|
150
|
-
onClick:
|
|
150
|
+
onClick: n[0] || (n[0] = (W) => K("close"))
|
|
151
151
|
}, [
|
|
152
|
-
|
|
152
|
+
D(V, {
|
|
153
153
|
name: "close",
|
|
154
154
|
size: "md"
|
|
155
155
|
})
|
|
156
156
|
], 8, Ea)
|
|
157
157
|
]),
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
r("div", Fa, [
|
|
159
|
+
r("p", Da, c(l("intro")), 1),
|
|
160
|
+
r("div", Ia, [
|
|
161
|
+
r("div", Ta, [
|
|
162
|
+
n[1] || (n[1] = r("span", {
|
|
163
163
|
class: "h-8 w-8 rounded-full bg-fm-color-primary",
|
|
164
164
|
"aria-hidden": "true"
|
|
165
165
|
}, null, -1)),
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
r("span", Oa, c(l("current")), 1),
|
|
167
|
+
r("span", Ba, c(l("published")), 1)
|
|
168
168
|
]),
|
|
169
|
-
|
|
169
|
+
A.publishedAt ? (s(), p("p", La, c(de(A.publishedAt)), 1)) : x("", !0)
|
|
170
170
|
]),
|
|
171
|
-
|
|
171
|
+
I.value ? (s(), p("div", {
|
|
172
172
|
key: 0,
|
|
173
173
|
role: "status",
|
|
174
174
|
class: "space-y-16",
|
|
175
175
|
"aria-label": l("loading")
|
|
176
176
|
}, [
|
|
177
|
-
|
|
178
|
-
(s(), p(Pe, null, Ne(3, (
|
|
179
|
-
key:
|
|
177
|
+
r("p", Pa, c(l("loading")), 1),
|
|
178
|
+
(s(), p(Pe, null, Ne(3, (W) => r("div", {
|
|
179
|
+
key: W,
|
|
180
180
|
class: "rounded-lg border border-fm-color-border-secondary p-16",
|
|
181
181
|
"aria-hidden": "true"
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
]))), 64))
|
|
186
|
-
], 8, za)) :
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
182
|
+
}, [...n[2] || (n[2] = [
|
|
183
|
+
r("div", { class: "mb-12 h-12 w-1/3 rounded bg-fm-color-neutral-gray-100" }, null, -1),
|
|
184
|
+
r("div", { class: "h-12 w-3/4 rounded bg-fm-color-neutral-gray-100" }, null, -1)
|
|
185
|
+
])])), 64))
|
|
186
|
+
], 8, za)) : Z.value ? (s(), p("div", Na, [
|
|
187
|
+
r("p", Ua, c(l("loadFailed")), 1),
|
|
188
|
+
r("p", qa, c(l("loadFailedHint")), 1),
|
|
189
|
+
D(H, {
|
|
190
190
|
variant: "secondary",
|
|
191
191
|
label: l("retry"),
|
|
192
192
|
onClick: he
|
|
193
193
|
}, null, 8, ["label"])
|
|
194
|
-
])) :
|
|
195
|
-
|
|
194
|
+
])) : E.value.length ? x("", !0) : (s(), p("div", ja, [
|
|
195
|
+
D(V, {
|
|
196
196
|
name: "history",
|
|
197
197
|
size: "lg",
|
|
198
198
|
class: "mb-12 text-fm-color-typo-secondary"
|
|
199
199
|
}),
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
r("p", Ha, c(l("empty")), 1),
|
|
201
|
+
r("p", Ma, c(l("emptyHint")), 1)
|
|
202
202
|
])),
|
|
203
|
-
(s(!0), p(Pe, null, Ne(
|
|
204
|
-
key:
|
|
203
|
+
(s(!0), p(Pe, null, Ne(I.value || Z.value ? [] : O.value, (W) => (s(), p("section", {
|
|
204
|
+
key: W.key,
|
|
205
205
|
class: "mb-[20px]"
|
|
206
206
|
}, [
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
(s(!0), p(Pe, null, Ne(
|
|
207
|
+
r("h3", Ka, c(W.label), 1),
|
|
208
|
+
r("ul", Ja, [
|
|
209
|
+
(s(!0), p(Pe, null, Ne(W.versions, (h) => {
|
|
210
210
|
var ye, we, Re;
|
|
211
211
|
return s(), p("li", {
|
|
212
212
|
key: h.id,
|
|
213
213
|
"data-testid": "canvas-version-row",
|
|
214
214
|
class: "relative mb-8"
|
|
215
215
|
}, [
|
|
216
|
-
|
|
216
|
+
n[3] || (n[3] = r("span", {
|
|
217
217
|
class: "history-dot absolute top-[20px] h-8 w-8 rounded-full border border-fm-color-border-secondary bg-fm-color-neutral-white",
|
|
218
218
|
"aria-hidden": "true"
|
|
219
219
|
}, null, -1)),
|
|
220
|
-
|
|
220
|
+
r("button", {
|
|
221
221
|
class: Ue([
|
|
222
222
|
"history-button w-full rounded-lg border p-12 text-left",
|
|
223
|
-
|
|
223
|
+
T.value === h.id ? "border-fm-color-primary bg-fm-color-primary-50" : "border-transparent"
|
|
224
224
|
]),
|
|
225
|
-
"aria-expanded":
|
|
226
|
-
"aria-controls":
|
|
227
|
-
"aria-current":
|
|
228
|
-
disabled: v.value ||
|
|
229
|
-
onClick: (Ee) =>
|
|
225
|
+
"aria-expanded": T.value === h.id,
|
|
226
|
+
"aria-controls": T.value === h.id ? "canvas-version-details" : void 0,
|
|
227
|
+
"aria-current": P(h) ? "true" : void 0,
|
|
228
|
+
disabled: v.value || P(h),
|
|
229
|
+
onClick: (Ee) => X(h)
|
|
230
230
|
}, [
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
r("span", Za, [
|
|
232
|
+
r("time", {
|
|
233
233
|
datetime: h.at,
|
|
234
|
-
title:
|
|
234
|
+
title: de(h.at),
|
|
235
235
|
class: "fm-typo-en-body-sm-400 grow text-fm-color-typo-secondary"
|
|
236
|
-
}, c(
|
|
237
|
-
|
|
236
|
+
}, c(f(h.at)), 9, Ga),
|
|
237
|
+
P(h) ? (s(), p("span", Qa, c(l("currentBadge")), 1)) : T.value === h.id ? (s(), ne(V, {
|
|
238
238
|
key: 1,
|
|
239
239
|
name: "check",
|
|
240
240
|
size: "sm",
|
|
241
241
|
class: "text-fm-color-primary"
|
|
242
242
|
})) : x("", !0)
|
|
243
243
|
]),
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
244
|
+
J(h) ? (s(), p("span", Xa, c(J(h)), 1)) : x("", !0),
|
|
245
|
+
r("span", Ya, c(Q(h)), 1),
|
|
246
|
+
r("span", eo, [
|
|
247
|
+
D(ge, {
|
|
248
248
|
size: "sm",
|
|
249
249
|
name: ((ye = h.author) == null ? void 0 : ye.name) || ((we = h.author) == null ? void 0 : we.email) || "?",
|
|
250
250
|
src: (Re = h.author) == null ? void 0 : Re.photoUrl
|
|
251
251
|
}, null, 8, ["name", "src"]),
|
|
252
|
-
|
|
252
|
+
r("span", to, c(Ce(h)), 1)
|
|
253
253
|
])
|
|
254
254
|
], 10, Wa)
|
|
255
255
|
]);
|
|
@@ -257,35 +257,35 @@ const Va = ["aria-label"], Aa = { class: "flex h-64 shrink-0 items-center gap-12
|
|
|
257
257
|
])
|
|
258
258
|
]))), 128))
|
|
259
259
|
]),
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
r("footer", ao, [
|
|
261
|
+
z.value ? (s(), p("div", {
|
|
262
262
|
key: 0,
|
|
263
263
|
id: "canvas-version-details",
|
|
264
264
|
ref_key: "details",
|
|
265
|
-
ref:
|
|
265
|
+
ref: q,
|
|
266
266
|
tabindex: "-1",
|
|
267
267
|
class: "history-details"
|
|
268
268
|
}, [
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
r("p", oo, c(l("savedBy", { user: Ce(z.value), at: de(z.value.at) })), 1),
|
|
270
|
+
r("p", ro, c(i.value ? l("confirmHint") : ve(z.value)), 1),
|
|
271
|
+
te.value ? (s(), p("p", no, c(l("restoreFailed")), 1)) : x("", !0),
|
|
272
|
+
A.hasDraft || A.busy ? (s(), p("p", so, c(l(A.hasDraft ? "draftHint" : "busyHint")), 1)) : x("", !0),
|
|
273
273
|
i.value ? (s(), p("div", lo, [
|
|
274
|
-
|
|
274
|
+
r("button", {
|
|
275
275
|
ref_key: "cancelButton",
|
|
276
|
-
ref:
|
|
276
|
+
ref: ae,
|
|
277
277
|
class: "history-button fm-typo-en-body-md-600 rounded-lg px-16 py-12",
|
|
278
278
|
disabled: v.value,
|
|
279
279
|
onClick: S
|
|
280
280
|
}, c(l("cancel")), 9, io),
|
|
281
|
-
|
|
281
|
+
D(H, {
|
|
282
282
|
"data-testid": "canvas-version-confirm",
|
|
283
283
|
variant: "primary",
|
|
284
284
|
label: l(v.value ? "restoring" : "confirm"),
|
|
285
285
|
disabled: w.value,
|
|
286
|
-
onClick:
|
|
286
|
+
onClick: oe
|
|
287
287
|
}, null, 8, ["label", "disabled"])
|
|
288
|
-
])) : (s(), ne(
|
|
288
|
+
])) : (s(), ne(H, {
|
|
289
289
|
key: 3,
|
|
290
290
|
"data-testid": "canvas-version-restore",
|
|
291
291
|
class: "w-full",
|
|
@@ -296,51 +296,51 @@ const Va = ["aria-label"], Aa = { class: "flex h-64 shrink-0 items-center gap-12
|
|
|
296
296
|
onClick: Se
|
|
297
297
|
}, null, 8, ["label", "disabled"]))
|
|
298
298
|
], 512)) : (s(), p("p", uo, c(l("selectHint")), 1)),
|
|
299
|
-
|
|
299
|
+
r("p", co, c(l("timezone", { timezone: A.timezone })), 1)
|
|
300
300
|
])
|
|
301
301
|
], 40, Va);
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
|
-
}),
|
|
305
|
-
function yo(
|
|
306
|
-
const { timezone:
|
|
307
|
-
function
|
|
308
|
-
|
|
304
|
+
}), mo = /* @__PURE__ */ vt(vo, [["__scopeId", "data-v-7df5ac71"]]), fo = 2e3, po = 10 * 6e4;
|
|
305
|
+
function yo(A, le, U, K) {
|
|
306
|
+
const { timezone: m } = je(mt()), C = d(null), l = d(null), E = d(!1), I = d(""), Z = [];
|
|
307
|
+
function te(f) {
|
|
308
|
+
Z.push(f);
|
|
309
309
|
}
|
|
310
310
|
let v;
|
|
311
311
|
function i() {
|
|
312
312
|
v !== void 0 && (window.clearInterval(v), v = void 0);
|
|
313
313
|
}
|
|
314
|
-
function
|
|
315
|
-
var
|
|
316
|
-
v !== void 0 ||
|
|
314
|
+
function T() {
|
|
315
|
+
var f;
|
|
316
|
+
v !== void 0 || le.value || ((f = C.value) == null ? void 0 : f.status) === "running" && (v = window.setInterval(() => void ie(), fo));
|
|
317
317
|
}
|
|
318
|
-
async function
|
|
319
|
-
var
|
|
320
|
-
if (
|
|
318
|
+
async function ie() {
|
|
319
|
+
var f;
|
|
320
|
+
if (le.value) {
|
|
321
321
|
i();
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
324
|
try {
|
|
325
|
-
const { run: b } = await da(
|
|
326
|
-
b &&
|
|
325
|
+
const { run: b } = await da(A, K == null ? void 0 : K.value);
|
|
326
|
+
b && ae(b), ((f = C.value) == null ? void 0 : f.status) !== "running" ? i() : C.value.updatedAt && Date.now() - new Date(C.value.updatedAt).getTime() > po && (E.value = !0, i());
|
|
327
327
|
} catch {
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function ae(f, b) {
|
|
331
331
|
b !== void 0 && (l.value = b);
|
|
332
|
-
const R =
|
|
333
|
-
var
|
|
334
|
-
const
|
|
335
|
-
return
|
|
332
|
+
const R = f.sections.some((O) => {
|
|
333
|
+
var Q;
|
|
334
|
+
const P = (Q = C.value) == null ? void 0 : Q.sections.find((J) => J.id === O.id);
|
|
335
|
+
return O.status === "ok" && (P == null ? void 0 : P.status) !== "ok";
|
|
336
336
|
});
|
|
337
|
-
C.value =
|
|
337
|
+
C.value = f, E.value = !1, R && Z.forEach((O) => O()), T();
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function q(f) {
|
|
340
340
|
var R;
|
|
341
|
-
if (
|
|
342
|
-
const b =
|
|
343
|
-
Array.isArray(b.sections) &&
|
|
341
|
+
if (f.name !== "build_run") return;
|
|
342
|
+
const b = f.data;
|
|
343
|
+
Array.isArray(b.sections) && ae(
|
|
344
344
|
{
|
|
345
345
|
runId: b.runId ? String(b.runId) : void 0,
|
|
346
346
|
status: b.status ?? "running",
|
|
@@ -348,68 +348,68 @@ function yo(me, se, N, M) {
|
|
|
348
348
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
349
349
|
},
|
|
350
350
|
// first snapshot of this turn claims the anchor; later ones keep it
|
|
351
|
-
(R = C.value) != null && R.runId && C.value.runId === b.runId ? void 0 : (
|
|
351
|
+
(R = C.value) != null && R.runId && C.value.runId === b.runId ? void 0 : (U == null ? void 0 : U.value) ?? null
|
|
352
352
|
);
|
|
353
353
|
}
|
|
354
|
-
function
|
|
355
|
-
i(), C.value = null, l.value = null,
|
|
354
|
+
function z() {
|
|
355
|
+
i(), C.value = null, l.value = null, E.value = !1, I.value = "";
|
|
356
356
|
}
|
|
357
|
-
function w(
|
|
358
|
-
|
|
357
|
+
function w(f, b = []) {
|
|
358
|
+
f && f.status !== "ok" && ae(f, G(f, b));
|
|
359
359
|
}
|
|
360
|
-
function
|
|
361
|
-
l.value || !C.value || (l.value =
|
|
360
|
+
function j(f) {
|
|
361
|
+
l.value || !C.value || (l.value = G(C.value, f));
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
if (!
|
|
363
|
+
function G(f, b) {
|
|
364
|
+
if (!f.runId) return null;
|
|
365
365
|
const R = b.find(
|
|
366
|
-
(
|
|
367
|
-
(
|
|
368
|
-
var
|
|
369
|
-
return
|
|
366
|
+
(O) => O.role === "assistant" && O.parts.some(
|
|
367
|
+
(P) => {
|
|
368
|
+
var Q;
|
|
369
|
+
return P.type === "data-build_run" && ((Q = P.data) == null ? void 0 : Q.runId) === f.runId;
|
|
370
370
|
}
|
|
371
371
|
)
|
|
372
372
|
);
|
|
373
373
|
return (R == null ? void 0 : R.id) ?? null;
|
|
374
374
|
}
|
|
375
|
-
async function
|
|
375
|
+
async function ue(f) {
|
|
376
376
|
var b;
|
|
377
377
|
if (!(!((b = C.value) != null && b.runId) || C.value.status === "running")) {
|
|
378
|
-
|
|
378
|
+
I.value = "";
|
|
379
379
|
try {
|
|
380
380
|
const { run: R } = await ua(
|
|
381
|
-
|
|
381
|
+
A,
|
|
382
382
|
C.value.runId,
|
|
383
|
-
|
|
384
|
-
|
|
383
|
+
f,
|
|
384
|
+
a(m.value)
|
|
385
385
|
);
|
|
386
|
-
|
|
386
|
+
ae(R);
|
|
387
387
|
} catch (R) {
|
|
388
|
-
|
|
388
|
+
I.value = R instanceof Error ? R.message : String(R);
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
async function
|
|
393
|
-
|
|
392
|
+
async function de() {
|
|
393
|
+
E.value = !1, await ie();
|
|
394
394
|
}
|
|
395
395
|
return He(i), {
|
|
396
396
|
run: C,
|
|
397
397
|
anchorId: l,
|
|
398
|
-
stale:
|
|
399
|
-
retryError:
|
|
398
|
+
stale: E,
|
|
399
|
+
retryError: I,
|
|
400
400
|
seed: w,
|
|
401
|
-
reanchor:
|
|
402
|
-
clear:
|
|
403
|
-
noteEvent:
|
|
404
|
-
retry:
|
|
405
|
-
refresh:
|
|
406
|
-
onLanded:
|
|
401
|
+
reanchor: j,
|
|
402
|
+
clear: z,
|
|
403
|
+
noteEvent: q,
|
|
404
|
+
retry: ue,
|
|
405
|
+
refresh: de,
|
|
406
|
+
onLanded: te
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
-
const bo = "page_filters", ho = { class: "flex min-w-0 grow flex-col" }, go = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap" }, wo = { class: "relative shrink-0" },
|
|
409
|
+
const bo = "page_filters", ho = { class: "flex min-w-0 grow flex-col" }, go = { class: "fm-typo-en-title-md-600 block min-w-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap" }, wo = { class: "relative shrink-0" }, ko = {
|
|
410
410
|
key: 0,
|
|
411
411
|
class: "flex items-center gap-8 border-b border-fm-color-border-secondary px-16 py-8"
|
|
412
|
-
},
|
|
412
|
+
}, _o = {
|
|
413
413
|
key: 0,
|
|
414
414
|
class: "flex min-w-0 grow items-start overflow-x-auto scrollbar-hide"
|
|
415
415
|
}, xo = {
|
|
@@ -441,154 +441,154 @@ const bo = "page_filters", ho = { class: "flex min-w-0 grow flex-col" }, go = {
|
|
|
441
441
|
reportId: {},
|
|
442
442
|
viewOnly: { type: Boolean }
|
|
443
443
|
},
|
|
444
|
-
setup(
|
|
445
|
-
const
|
|
444
|
+
setup(A) {
|
|
445
|
+
const le = A, U = ra(), K = na(), { t: m, te: C } = ct(), l = Ca(), { currentReport: E } = je(l), I = _(() => {
|
|
446
446
|
var e;
|
|
447
|
-
return Ra(
|
|
448
|
-
}),
|
|
447
|
+
return Ra(m, C, (e = E.value) == null ? void 0 : e.name, "other");
|
|
448
|
+
}), Z = sa(), { promptLoader: te } = Sa(), v = le.reportId || String(U.query.reportId ?? ""), i = d(), T = d(""), ie = _(() => {
|
|
449
449
|
var e;
|
|
450
450
|
return ((e = i.value) == null ? void 0 : e.state) === "draft";
|
|
451
|
-
}),
|
|
451
|
+
}), ae = _(() => {
|
|
452
452
|
var e, t;
|
|
453
453
|
return ((t = (e = i.value) == null ? void 0 : e.unpublishedTurnIds) == null ? void 0 : t.length) ?? 0;
|
|
454
|
-
}),
|
|
455
|
-
function
|
|
454
|
+
}), q = d(!1), z = d(""), w = d(!1), j = d(!1), G = d(!1);
|
|
455
|
+
function ue() {
|
|
456
456
|
w.value = !0, S.value = !1;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
459
|
-
|
|
458
|
+
function de() {
|
|
459
|
+
G.value || (w.value ? w.value = !1 : X.value = !1);
|
|
460
460
|
}
|
|
461
|
-
async function
|
|
462
|
-
await Ae(() => Promise.resolve(e)), w.value = !1,
|
|
461
|
+
async function f(e) {
|
|
462
|
+
await Ae(() => Promise.resolve(e)), w.value = !1, j.value = !0;
|
|
463
463
|
}
|
|
464
|
-
const { isAdmin: b, canUpdate: R } = xa(),
|
|
464
|
+
const { isAdmin: b, canUpdate: R } = xa(), O = _(() => !le.viewOnly && b.value), P = _(
|
|
465
465
|
() => {
|
|
466
466
|
var e;
|
|
467
|
-
return !
|
|
467
|
+
return !le.viewOnly && !!((e = E.value) != null && e.editable) && R(E.value);
|
|
468
468
|
}
|
|
469
|
-
),
|
|
470
|
-
() =>
|
|
471
|
-
),
|
|
469
|
+
), Q = _(
|
|
470
|
+
() => P.value ? [{ label: m("report.common.rename"), value: "rename", isPrimary: !1 }] : []
|
|
471
|
+
), J = d(!1), ve = d("");
|
|
472
472
|
function Ce() {
|
|
473
|
-
|
|
473
|
+
ve.value = I.value, J.value = !0;
|
|
474
474
|
}
|
|
475
475
|
async function he() {
|
|
476
|
-
const e =
|
|
477
|
-
if (!(!e || !t) && (
|
|
476
|
+
const e = E.value, t = ve.value.trim();
|
|
477
|
+
if (!(!e || !t) && (J.value = !1, t !== I.value))
|
|
478
478
|
try {
|
|
479
|
-
await
|
|
479
|
+
await te(() => l.createOrUpdateReport({ ...e, name: t })), Z.open({ message: m("report.messages.saveSuccess"), type: "success" });
|
|
480
480
|
} catch {
|
|
481
|
-
|
|
482
|
-
message:
|
|
481
|
+
Z.open({
|
|
482
|
+
message: m("report.messages.failedToAction", { action: m("report.common.rename") }),
|
|
483
483
|
type: "error"
|
|
484
484
|
});
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
const
|
|
488
|
-
get: () =>
|
|
487
|
+
const X = d(!1), Se = d(), S = d(!1), oe = d(!1), pe = d(), o = d(), n = _({
|
|
488
|
+
get: () => oe.value ? pe.value : o.value,
|
|
489
489
|
set: (e) => {
|
|
490
|
-
|
|
490
|
+
oe.value ? pe.value = e : o.value = e;
|
|
491
491
|
}
|
|
492
|
-
}), V =
|
|
492
|
+
}), V = _(
|
|
493
493
|
() => {
|
|
494
494
|
var e;
|
|
495
|
-
return !!
|
|
495
|
+
return !!n.value && !((e = i.value) != null && e.sections.some(
|
|
496
496
|
(t) => {
|
|
497
497
|
var u, g;
|
|
498
|
-
return t.id === ((u =
|
|
498
|
+
return t.id === ((u = n.value) == null ? void 0 : u.sectionId) && t.version === ((g = n.value) == null ? void 0 : g.version);
|
|
499
499
|
}
|
|
500
500
|
));
|
|
501
501
|
}
|
|
502
|
-
),
|
|
502
|
+
), H = d({});
|
|
503
503
|
function ge(e, t) {
|
|
504
504
|
var u;
|
|
505
505
|
return String(
|
|
506
|
-
((u = e.config) == null ? void 0 : u.title) ||
|
|
506
|
+
((u = e.config) == null ? void 0 : u.title) || H.value[e.id] || m("reportV5.reportAi.chat.widgetNumber", { number: t + 1 })
|
|
507
507
|
);
|
|
508
508
|
}
|
|
509
|
-
const
|
|
510
|
-
get: () =>
|
|
509
|
+
const W = d([]), h = d([]), ye = _({
|
|
510
|
+
get: () => oe.value ? W.value : h.value,
|
|
511
511
|
set: (e) => {
|
|
512
|
-
|
|
512
|
+
oe.value ? W.value = e : h.value = e;
|
|
513
513
|
}
|
|
514
514
|
});
|
|
515
515
|
function we() {
|
|
516
|
-
|
|
516
|
+
n.value = void 0, ye.value = [], S.value = !1;
|
|
517
517
|
}
|
|
518
518
|
function Re() {
|
|
519
|
-
const e =
|
|
519
|
+
const e = n.value;
|
|
520
520
|
if (!(e != null && e.element)) return we();
|
|
521
521
|
const { element: t, ...u } = e, g = ye.value.shift();
|
|
522
|
-
|
|
522
|
+
n.value = g ? { ...u, element: g, elementText: g.text ?? "", elementTag: g.tag } : u;
|
|
523
523
|
}
|
|
524
524
|
function Ee(e) {
|
|
525
525
|
e.key === "Escape" && (S.value = !1);
|
|
526
526
|
}
|
|
527
|
-
function
|
|
527
|
+
function ft(e, t = []) {
|
|
528
528
|
var g;
|
|
529
|
-
if (!S.value ||
|
|
530
|
-
const u = (g = i.value) == null ? void 0 : g.sections.find((
|
|
531
|
-
!u || u.version !== e.version || (
|
|
529
|
+
if (!S.value || Y.value) return;
|
|
530
|
+
const u = (g = i.value) == null ? void 0 : g.sections.find((F) => F.id === e.sectionId);
|
|
531
|
+
!u || u.version !== e.version || (n.value = {
|
|
532
532
|
...e,
|
|
533
|
-
viewParams: JSON.parse(JSON.stringify(
|
|
534
|
-
viewIntent: JSON.parse(JSON.stringify(
|
|
533
|
+
viewParams: JSON.parse(JSON.stringify(k.params.value)),
|
|
534
|
+
viewIntent: JSON.parse(JSON.stringify(k.intent.value)),
|
|
535
535
|
label: e.label || ge(u, i.value.sections.indexOf(u))
|
|
536
|
-
}, ye.value = t, S.value = !1,
|
|
536
|
+
}, ye.value = t, S.value = !1, X.value = !0);
|
|
537
537
|
}
|
|
538
|
-
const
|
|
538
|
+
const B = d(""), Me = d(""), Ke = d("");
|
|
539
539
|
function Je(e) {
|
|
540
|
-
return
|
|
541
|
-
const t =
|
|
542
|
-
|
|
540
|
+
return M.stashDraft(B.value, o.value), N.clear(), e().then(() => {
|
|
541
|
+
const t = M.recallDraft();
|
|
542
|
+
B.value = t.text, o.value = t.target, h.value = [], S.value = !1;
|
|
543
543
|
});
|
|
544
544
|
}
|
|
545
545
|
async function pt(e) {
|
|
546
546
|
if (tt.value) return;
|
|
547
|
-
const t = e ? pe.value : void 0, u = e ? [...
|
|
547
|
+
const t = e ? pe.value : void 0, u = e ? [...W.value] : [];
|
|
548
548
|
let g = !1;
|
|
549
549
|
await Je(async () => {
|
|
550
|
-
g = await
|
|
551
|
-
}), g && e && (
|
|
550
|
+
g = await M.startChat();
|
|
551
|
+
}), g && e && (oe.value = !1, o.value = t, h.value = u, pe.value = void 0, W.value = [], B.value = e, await Ve());
|
|
552
552
|
}
|
|
553
553
|
const yt = (e) => Je(async () => {
|
|
554
|
-
const t = await
|
|
555
|
-
|
|
554
|
+
const t = await M.select(e);
|
|
555
|
+
N.seed(t, ke.value);
|
|
556
556
|
});
|
|
557
557
|
async function Ve() {
|
|
558
|
-
const e =
|
|
559
|
-
if (!(!e || V.value ||
|
|
560
|
-
if (Ke.value = e,
|
|
561
|
-
|
|
558
|
+
const e = B.value.trim();
|
|
559
|
+
if (!(!e || V.value || Y.value)) {
|
|
560
|
+
if (Ke.value = e, B.value = "", await zt(e, n.value), Ye.value) {
|
|
561
|
+
B.value || (B.value = Ke.value);
|
|
562
562
|
return;
|
|
563
563
|
}
|
|
564
564
|
we();
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
function bt(e) {
|
|
568
|
-
const t =
|
|
568
|
+
const t = M.takeUnsent(e);
|
|
569
569
|
if (t)
|
|
570
|
-
return
|
|
570
|
+
return B.value = t.text, n.value = t.target, Ve();
|
|
571
571
|
}
|
|
572
572
|
function ht(e) {
|
|
573
|
-
|
|
573
|
+
Y.value || (B.value = m("reportV5.reportAi.build.askBuilderPrompt", { title: e }), n.value = void 0);
|
|
574
574
|
}
|
|
575
575
|
async function gt() {
|
|
576
|
-
const e = await
|
|
577
|
-
!e ||
|
|
576
|
+
const e = await M.stop();
|
|
577
|
+
!e || B.value.trim() || (B.value = e.text, n.value = e.target);
|
|
578
578
|
}
|
|
579
579
|
function wt(e) {
|
|
580
|
-
const t =
|
|
581
|
-
t && (
|
|
580
|
+
const t = M.requestOf(e);
|
|
581
|
+
t && (B.value = t.text, n.value = t.target);
|
|
582
582
|
}
|
|
583
|
-
function
|
|
584
|
-
const t =
|
|
583
|
+
function kt(e) {
|
|
584
|
+
const t = M.requestOf(e);
|
|
585
585
|
if (t)
|
|
586
|
-
return
|
|
586
|
+
return B.value = t.text, n.value = t.target, Ve();
|
|
587
587
|
}
|
|
588
|
-
const
|
|
589
|
-
messages:
|
|
588
|
+
const k = ca(v), M = va(v), {
|
|
589
|
+
messages: ke,
|
|
590
590
|
sessionId: We,
|
|
591
|
-
title:
|
|
591
|
+
title: _t,
|
|
592
592
|
chats: xt,
|
|
593
593
|
chatsCursor: Ze,
|
|
594
594
|
chatsLoading: Ct,
|
|
@@ -613,63 +613,63 @@ const bo = "page_filters", ho = { class: "flex min-w-0 grow flex-col" }, go = {
|
|
|
613
613
|
onLifecycle: Pt,
|
|
614
614
|
onSettled: Nt,
|
|
615
615
|
onResumed: Ut
|
|
616
|
-
} =
|
|
616
|
+
} = M, Y = _(() => Qe.value || Ot.value), { dateRange: Fe, selectedLocationIds: De, locations: et, timezone: qt } = je(mt()), N = yo(v, Qe, Xe, We), tt = _(
|
|
617
617
|
() => {
|
|
618
618
|
var e;
|
|
619
|
-
return
|
|
619
|
+
return Y.value || Ge.value || ((e = N.run.value) == null ? void 0 : e.status) === "running";
|
|
620
620
|
}
|
|
621
|
-
), at =
|
|
621
|
+
), at = _(
|
|
622
622
|
() => {
|
|
623
623
|
var e;
|
|
624
624
|
return ((e = i.value) == null ? void 0 : e.sections.filter((t) => t.id !== bo)) ?? [];
|
|
625
625
|
}
|
|
626
|
-
), ot =
|
|
627
|
-
get: () =>
|
|
626
|
+
), ot = _(() => at.value.length === 0), rt = _({
|
|
627
|
+
get: () => O.value && X.value || w.value,
|
|
628
628
|
set: (e) => {
|
|
629
|
-
|
|
629
|
+
X.value = e, e || (w.value = !1);
|
|
630
630
|
}
|
|
631
|
-
}), { root: jt, drawer: Ht, docked: Ie, modal: Te } =
|
|
631
|
+
}), { root: jt, drawer: Ht, docked: Ie, modal: Te } = ma(rt, S), Mt = _(
|
|
632
632
|
() => {
|
|
633
633
|
var e;
|
|
634
634
|
return ((e = i.value) == null ? void 0 : e.sections.some((t) => t.status === "pending")) ?? !1;
|
|
635
635
|
}
|
|
636
|
-
), Kt =
|
|
637
|
-
onSelectSection:
|
|
636
|
+
), Kt = _(() => Y.value ? At.value ?? "working" : Mt.value ? "loading" : "updating"), ee = fa(Se, {
|
|
637
|
+
onSelectSection: ft,
|
|
638
638
|
onCancelSelection: () => {
|
|
639
639
|
S.value = !1;
|
|
640
640
|
},
|
|
641
641
|
onSetParams: (e, t) => {
|
|
642
|
-
|
|
642
|
+
k.setParams(e, t);
|
|
643
643
|
},
|
|
644
644
|
onSectionRendered: (e, t, u) => {
|
|
645
|
-
u && (
|
|
645
|
+
u && (H.value = { ...H.value, [e]: u }), Oe(e, t, "ok");
|
|
646
646
|
},
|
|
647
647
|
onSectionError: (e, t, u) => {
|
|
648
648
|
console.warn("[report-canvas] section failed", { reportId: v, sectionId: e, message: u }), Oe(e, t, "error", u);
|
|
649
649
|
},
|
|
650
650
|
onSectionLayout: (e, t, u) => {
|
|
651
|
-
var
|
|
652
|
-
const g = (
|
|
651
|
+
var F;
|
|
652
|
+
const g = (F = i.value) == null ? void 0 : F.sections.find(($) => $.id === e);
|
|
653
653
|
(g == null ? void 0 : g.status) === "ok" && Oe(e, t, "ok", void 0, u);
|
|
654
654
|
}
|
|
655
655
|
});
|
|
656
|
-
|
|
657
|
-
|
|
656
|
+
k.onResult((e) => ee.pushRows(e)), k.onParamsChanged(() => ee.pushParams(k.paramState())), k.bindStore(), $e([S, n, ee.ready, Y], () => {
|
|
657
|
+
ee.setCommentMode(S.value && !Y.value, n.value);
|
|
658
658
|
});
|
|
659
|
-
async function Oe(e, t, u, g,
|
|
660
|
-
var
|
|
661
|
-
const
|
|
662
|
-
if (
|
|
663
|
-
const
|
|
664
|
-
if (!(
|
|
665
|
-
`) ===
|
|
659
|
+
async function Oe(e, t, u, g, F) {
|
|
660
|
+
var me, xe;
|
|
661
|
+
const $ = (me = i.value) == null ? void 0 : me.sections.find((be) => be.id === e);
|
|
662
|
+
if (!$ || t !== $.version) return;
|
|
663
|
+
const ce = u === "error" ? g ?? "the section failed to render" : void 0, re = F ?? $.warnings ?? [];
|
|
664
|
+
if (!($.status === u && $.error === ce && ($.warnings ?? []).join(`
|
|
665
|
+
`) === re.join(`
|
|
666
666
|
`))) {
|
|
667
|
-
|
|
667
|
+
$.status = u, $.error = ce, $.warnings = re.length ? re : void 0;
|
|
668
668
|
try {
|
|
669
669
|
await wa(
|
|
670
670
|
v,
|
|
671
671
|
e,
|
|
672
|
-
{ version: t, status: u, error:
|
|
672
|
+
{ version: t, status: u, error: ce, warnings: re },
|
|
673
673
|
(xe = i.value) == null ? void 0 : xe.state
|
|
674
674
|
);
|
|
675
675
|
} catch (be) {
|
|
@@ -678,32 +678,32 @@ const bo = "page_filters", ho = { class: "flex min-w-0 grow flex-col" }, go = {
|
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
680
|
async function Ae(e) {
|
|
681
|
-
if (!
|
|
682
|
-
|
|
681
|
+
if (!q.value) {
|
|
682
|
+
q.value = !0, z.value = "";
|
|
683
683
|
try {
|
|
684
684
|
const t = await e();
|
|
685
|
-
i.value = t,
|
|
685
|
+
i.value = t, k.load(t), await ee.init(t.sections, k.paramState(), k.env());
|
|
686
686
|
} catch (t) {
|
|
687
|
-
|
|
687
|
+
z.value = t instanceof Error ? t.message : String(t);
|
|
688
688
|
} finally {
|
|
689
|
-
|
|
689
|
+
q.value = !1;
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
693
|
const Jt = () => Ae(() => ba(v)), Wt = () => Ae(() => ha(v)), Zt = (e) => Ae(() => ga(v, e));
|
|
694
694
|
async function Gt() {
|
|
695
695
|
try {
|
|
696
|
-
|
|
696
|
+
T.value = "";
|
|
697
697
|
const e = await it(v);
|
|
698
|
-
i.value = e,
|
|
698
|
+
i.value = e, k.load(e), O.value && ot.value && Ie.value && (X.value = !0), await qe(), await ee.init(e.sections, k.paramState(), k.env());
|
|
699
699
|
} catch (e) {
|
|
700
|
-
|
|
700
|
+
T.value = e instanceof Error ? e.message : String(e);
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
703
|
const Be = /* @__PURE__ */ new Set();
|
|
704
|
-
let
|
|
704
|
+
let _e = null, Le = !1;
|
|
705
705
|
function ze() {
|
|
706
|
-
return
|
|
706
|
+
return _e ? (Le = !0, _e) : (_e = (async () => {
|
|
707
707
|
do {
|
|
708
708
|
Le = !1;
|
|
709
709
|
try {
|
|
@@ -713,122 +713,122 @@ const bo = "page_filters", ho = { class: "flex min-w-0 grow flex-col" }, go = {
|
|
|
713
713
|
}
|
|
714
714
|
} while (Le);
|
|
715
715
|
})().finally(() => {
|
|
716
|
-
|
|
717
|
-
}),
|
|
716
|
+
_e = null;
|
|
717
|
+
}), _e);
|
|
718
718
|
}
|
|
719
719
|
async function Qt() {
|
|
720
|
-
var
|
|
721
|
-
const e = (((
|
|
722
|
-
(((
|
|
720
|
+
var ce, re;
|
|
721
|
+
const e = (((ce = i.value) == null ? void 0 : ce.sections) ?? []).map((L) => L.id), t = new Map(
|
|
722
|
+
(((re = i.value) == null ? void 0 : re.sections) ?? []).map((L) => [L.id, L.version])
|
|
723
723
|
), u = await it(v);
|
|
724
724
|
i.value = u;
|
|
725
725
|
const g = [...Be];
|
|
726
|
-
Be.clear(),
|
|
727
|
-
const
|
|
728
|
-
if (
|
|
729
|
-
await
|
|
726
|
+
Be.clear(), k.applyCanvas(u, g) && ee.pushParams(k.paramState());
|
|
727
|
+
const F = u.sections.map((L) => L.id);
|
|
728
|
+
if (F.length !== e.length || F.some((L, me) => L !== e[me])) {
|
|
729
|
+
await ee.init(u.sections, k.paramState(), k.env());
|
|
730
730
|
return;
|
|
731
731
|
}
|
|
732
|
-
const
|
|
733
|
-
(
|
|
732
|
+
const $ = u.sections.filter(
|
|
733
|
+
(L) => t.get(L.id) !== L.version
|
|
734
734
|
);
|
|
735
|
-
|
|
735
|
+
$.length && await ee.swapSections($);
|
|
736
736
|
}
|
|
737
737
|
const Xt = ["param_written", "sql_written", "section_written", "deleted", "reordered", "restored"];
|
|
738
738
|
Pt((e) => {
|
|
739
|
-
e.name === "sql_written" && typeof e.data.queryId == "string" && Be.add(e.data.queryId), Xt.includes(e.name) && ze(),
|
|
740
|
-
}), Nt(() => void ze()), Ut((e) =>
|
|
741
|
-
i.value &&
|
|
739
|
+
e.name === "sql_written" && typeof e.data.queryId == "string" && Be.add(e.data.queryId), Xt.includes(e.name) && ze(), N.noteEvent(e);
|
|
740
|
+
}), Nt(() => void ze()), Ut((e) => N.seed(e, ke.value)), $e(ke, (e) => N.reanchor(e)), N.onLanded(() => void ze()), $e([et, qt], () => {
|
|
741
|
+
i.value && ee.pushEnv(k.env());
|
|
742
742
|
});
|
|
743
|
-
const Yt =
|
|
744
|
-
() => Object.values(
|
|
743
|
+
const Yt = _(
|
|
744
|
+
() => Object.values(k.results.value).some((e) => e.truncated)
|
|
745
745
|
);
|
|
746
746
|
return dt(async () => {
|
|
747
|
-
window.addEventListener("keydown", Ee), await Gt(),
|
|
747
|
+
window.addEventListener("keydown", Ee), await Gt(), O.value && N.seed(await Lt(), ke.value);
|
|
748
748
|
}), He(() => window.removeEventListener("keydown", Ee)), (e, t) => {
|
|
749
|
-
var
|
|
750
|
-
const u =
|
|
749
|
+
var L, me, xe, be, nt, st;
|
|
750
|
+
const u = se("FmTooltip"), g = se("FmPageHead"), F = se("FmButton"), $ = se("FmIcon"), ce = se("FmTextField"), re = se("FmDialog");
|
|
751
751
|
return s(), p("div", {
|
|
752
752
|
ref_key: "root",
|
|
753
753
|
ref: jt,
|
|
754
754
|
class: "relative flex h-full min-h-0 w-full"
|
|
755
755
|
}, [
|
|
756
|
-
|
|
757
|
-
|
|
756
|
+
r("div", ho, [
|
|
757
|
+
A.viewOnly ? x("", !0) : (s(), ne(g, {
|
|
758
758
|
key: 0,
|
|
759
759
|
class: "remove-line-clamping shrink-0",
|
|
760
|
-
title:
|
|
760
|
+
title: I.value,
|
|
761
761
|
"back-button": !0,
|
|
762
|
-
actions:
|
|
763
|
-
"onClick:back": t[0] || (t[0] = (y) =>
|
|
762
|
+
actions: Q.value,
|
|
763
|
+
"onClick:back": t[0] || (t[0] = (y) => a(K).push({ name: "reports", query: a(U).query })),
|
|
764
764
|
"onClick:action": t[1] || (t[1] = (y) => y === "rename" && Ce())
|
|
765
765
|
}, {
|
|
766
766
|
title: fe(() => [
|
|
767
|
-
|
|
768
|
-
content:
|
|
767
|
+
D(u, {
|
|
768
|
+
content: I.value,
|
|
769
769
|
placement: "bottom",
|
|
770
770
|
"z-index": 2e3,
|
|
771
771
|
class: "flex min-w-0 max-w-full justify-start"
|
|
772
772
|
}, {
|
|
773
773
|
default: fe(() => [
|
|
774
|
-
|
|
774
|
+
r("p", go, c(I.value), 1)
|
|
775
775
|
]),
|
|
776
776
|
_: 1
|
|
777
777
|
}, 8, ["content"])
|
|
778
778
|
]),
|
|
779
779
|
_: 1
|
|
780
780
|
}, 8, ["title", "actions"])),
|
|
781
|
-
|
|
782
|
-
!
|
|
783
|
-
((
|
|
784
|
-
|
|
785
|
-
modelValue:
|
|
781
|
+
r("div", wo, [
|
|
782
|
+
!A.viewOnly || ((L = i.value) == null ? void 0 : L.hostFilters) !== !1 ? (s(), p("div", ko, [
|
|
783
|
+
((me = i.value) == null ? void 0 : me.hostFilters) !== !1 ? (s(), p("div", _o, [
|
|
784
|
+
D(ka, {
|
|
785
|
+
modelValue: a(De),
|
|
786
786
|
"onUpdate:modelValue": t[3] || (t[3] = (y) => lt(De) ? De.value = y : null),
|
|
787
|
-
options:
|
|
787
|
+
options: a(et)
|
|
788
788
|
}, {
|
|
789
789
|
default: fe(() => [
|
|
790
|
-
|
|
791
|
-
"date-range":
|
|
790
|
+
D(_a, {
|
|
791
|
+
"date-range": a(Fe),
|
|
792
792
|
"onUpdate:dateRange": t[2] || (t[2] = (y) => lt(Fe) ? Fe.value = y : null)
|
|
793
793
|
}, null, 8, ["date-range"])
|
|
794
794
|
]),
|
|
795
795
|
_: 1
|
|
796
796
|
}, 8, ["modelValue", "options"])
|
|
797
797
|
])) : (s(), p("div", xo)),
|
|
798
|
-
at.value.length && !
|
|
799
|
-
(xe = i.value) != null && xe.canEdit && ((be = i.value) != null && be.publishedAt) ? (s(), ne(
|
|
798
|
+
at.value.length && !A.viewOnly ? (s(), p("div", Co, [
|
|
799
|
+
(xe = i.value) != null && xe.canEdit && ((be = i.value) != null && be.publishedAt) ? (s(), ne(F, {
|
|
800
800
|
key: 0,
|
|
801
801
|
"data-testid": "canvas-versions-open",
|
|
802
802
|
variant: "tertiary",
|
|
803
803
|
"prepend-icon": "history",
|
|
804
|
-
label:
|
|
804
|
+
label: a(m)("reportV5.reportCanvas.draft.history"),
|
|
805
805
|
"aria-expanded": w.value,
|
|
806
|
-
onClick:
|
|
806
|
+
onClick: ue
|
|
807
807
|
}, null, 8, ["label", "aria-expanded"])) : x("", !0),
|
|
808
|
-
|
|
808
|
+
O.value ? (s(), ne(u, {
|
|
809
809
|
key: 1,
|
|
810
810
|
placement: "bottom",
|
|
811
|
-
content:
|
|
811
|
+
content: a(m)(
|
|
812
812
|
S.value ? "reportV5.reportAi.chat.cancelSelection" : "reportV5.reportAi.chat.commentWidget"
|
|
813
813
|
)
|
|
814
814
|
}, {
|
|
815
815
|
default: fe(() => [
|
|
816
|
-
|
|
816
|
+
r("button", {
|
|
817
817
|
"data-testid": "canvas-comment-toggle",
|
|
818
818
|
class: Ue(["canvas-comment-target flex h-32 w-32 items-center justify-center rounded-md text-fm-color-typo-secondary disabled:opacity-50", S.value && "bg-fm-color-neutral-gray-100 text-fm-color-primary"]),
|
|
819
819
|
"aria-pressed": S.value,
|
|
820
|
-
"aria-label":
|
|
821
|
-
disabled:
|
|
820
|
+
"aria-label": a(m)("reportV5.reportAi.chat.commentWidget"),
|
|
821
|
+
disabled: Y.value || w.value,
|
|
822
822
|
onClick: t[4] || (t[4] = (y) => S.value = !S.value)
|
|
823
|
-
}, t[19] || (t[19] = [
|
|
824
|
-
|
|
823
|
+
}, [...t[19] || (t[19] = [
|
|
824
|
+
r("svg", {
|
|
825
825
|
width: "20",
|
|
826
826
|
height: "20",
|
|
827
827
|
viewBox: "0 0 20 20",
|
|
828
828
|
fill: "none",
|
|
829
829
|
"aria-hidden": "true"
|
|
830
830
|
}, [
|
|
831
|
-
|
|
831
|
+
r("path", {
|
|
832
832
|
d: "M5 3.5h5a6.5 6.5 0 1 1-6.5 6.5V5A1.5 1.5 0 0 1 5 3.5Z",
|
|
833
833
|
stroke: "currentColor",
|
|
834
834
|
"stroke-width": "1.5",
|
|
@@ -836,191 +836,191 @@ const bo = "page_filters", ho = { class: "flex min-w-0 grow flex-col" }, go = {
|
|
|
836
836
|
"stroke-linejoin": "round"
|
|
837
837
|
})
|
|
838
838
|
], -1)
|
|
839
|
-
]), 10, So)
|
|
839
|
+
])], 10, So)
|
|
840
840
|
]),
|
|
841
841
|
_: 1
|
|
842
842
|
}, 8, ["content"])) : x("", !0),
|
|
843
|
-
|
|
843
|
+
O.value && !X.value && !w.value ? (s(), ne(F, {
|
|
844
844
|
key: 2,
|
|
845
845
|
"data-testid": "report-canvas-chat-open",
|
|
846
846
|
variant: "tertiary",
|
|
847
847
|
"prepend-icon": "auto_awesome",
|
|
848
|
-
label:
|
|
849
|
-
onClick: t[5] || (t[5] = (y) =>
|
|
848
|
+
label: a(m)("reportV5.reportAi.chat.open"),
|
|
849
|
+
onClick: t[5] || (t[5] = (y) => X.value = !0)
|
|
850
850
|
}, null, 8, ["label"])) : x("", !0)
|
|
851
851
|
])) : x("", !0)
|
|
852
852
|
])) : x("", !0)
|
|
853
853
|
]),
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
F
|
|
854
|
+
ie.value && !A.viewOnly ? (s(), p("div", Ro, [
|
|
855
|
+
r("span", Vo, c(a(m)("reportV5.reportCanvas.draft.pending", { count: ae.value })), 1),
|
|
856
|
+
r("span", Ao, c(a(m)("reportV5.reportCanvas.draft.hint")), 1),
|
|
857
|
+
z.value ? (s(), p("span", $o, c(z.value), 1)) : x("", !0),
|
|
858
|
+
D(F, {
|
|
859
859
|
"data-testid": "canvas-draft-discard",
|
|
860
860
|
variant: "tertiary",
|
|
861
|
-
label:
|
|
862
|
-
disabled:
|
|
861
|
+
label: a(m)("reportV5.reportCanvas.draft.discard"),
|
|
862
|
+
disabled: q.value,
|
|
863
863
|
onClick: Wt
|
|
864
864
|
}, null, 8, ["label", "disabled"]),
|
|
865
|
-
F
|
|
865
|
+
D(F, {
|
|
866
866
|
"data-testid": "canvas-draft-publish",
|
|
867
867
|
variant: "primary",
|
|
868
|
-
label:
|
|
869
|
-
disabled:
|
|
868
|
+
label: a(m)("reportV5.reportCanvas.draft.publish"),
|
|
869
|
+
disabled: q.value,
|
|
870
870
|
onClick: Jt
|
|
871
871
|
}, null, 8, ["label", "disabled"])
|
|
872
872
|
])) : x("", !0),
|
|
873
|
-
|
|
874
|
-
|
|
873
|
+
j.value ? (s(), p("div", Eo, [
|
|
874
|
+
D($, {
|
|
875
875
|
name: "check_circle",
|
|
876
876
|
size: "sm"
|
|
877
877
|
}),
|
|
878
|
-
|
|
879
|
-
|
|
878
|
+
r("span", Fo, c(a(m)("reportV5.reportCanvas.history.restored")), 1),
|
|
879
|
+
r("button", {
|
|
880
880
|
class: "flex h-32 w-32 items-center justify-center rounded-md",
|
|
881
|
-
"aria-label":
|
|
882
|
-
onClick: t[6] || (t[6] = (y) =>
|
|
881
|
+
"aria-label": a(m)("reportV5.reportCanvas.draft.close"),
|
|
882
|
+
onClick: t[6] || (t[6] = (y) => j.value = !1)
|
|
883
883
|
}, [
|
|
884
|
-
|
|
884
|
+
D($, {
|
|
885
885
|
name: "close",
|
|
886
886
|
size: "sm"
|
|
887
887
|
})
|
|
888
888
|
], 8, Do)
|
|
889
889
|
])) : x("", !0),
|
|
890
|
-
Yt.value ? (s(), p("div", Io, c(
|
|
891
|
-
|
|
892
|
-
ea(
|
|
890
|
+
Yt.value ? (s(), p("div", Io, c(a(m)("reportV5.reportCanvas.canvas.truncated")), 1)) : x("", !0),
|
|
891
|
+
T.value ? (s(), p("p", To, c(T.value), 1)) : x("", !0),
|
|
892
|
+
ea(r("iframe", {
|
|
893
893
|
ref_key: "frame",
|
|
894
894
|
ref: Se,
|
|
895
895
|
"data-testid": "report-canvas-frame",
|
|
896
896
|
class: "min-h-0 grow border-0",
|
|
897
|
-
srcdoc:
|
|
897
|
+
srcdoc: a(pa),
|
|
898
898
|
sandbox: "allow-scripts",
|
|
899
|
-
title:
|
|
899
|
+
title: a(m)("reportV5.reportCanvas.canvas.title")
|
|
900
900
|
}, null, 8, Oo), [
|
|
901
|
-
[ta, !
|
|
901
|
+
[ta, !T.value]
|
|
902
902
|
])
|
|
903
903
|
]),
|
|
904
|
-
|
|
904
|
+
a(Te) ? (s(), p("button", {
|
|
905
905
|
key: 0,
|
|
906
906
|
type: "button",
|
|
907
907
|
tabindex: "-1",
|
|
908
908
|
"aria-hidden": "true",
|
|
909
909
|
"data-testid": "canvas-scrim",
|
|
910
910
|
class: "canvas-scrim absolute inset-0 z-20 cursor-default",
|
|
911
|
-
onClick:
|
|
911
|
+
onClick: de
|
|
912
912
|
})) : x("", !0),
|
|
913
|
-
!
|
|
913
|
+
!A.viewOnly && rt.value && (a(Ie) || !S.value) ? (s(), p("div", {
|
|
914
914
|
key: 1,
|
|
915
915
|
ref_key: "drawer",
|
|
916
916
|
ref: Ht,
|
|
917
917
|
class: Ue(
|
|
918
|
-
|
|
918
|
+
a(Ie) ? "w-[380px] shrink-0" : "absolute inset-y-0 right-0 z-30 w-full max-w-[380px] shadow-lg"
|
|
919
919
|
),
|
|
920
|
-
role:
|
|
921
|
-
"aria-modal":
|
|
922
|
-
"aria-label":
|
|
920
|
+
role: a(Te) ? "dialog" : void 0,
|
|
921
|
+
"aria-modal": a(Te) ? "true" : void 0,
|
|
922
|
+
"aria-label": a(m)(w.value ? "reportV5.reportCanvas.draft.history" : "reportV5.reportAi.chat.title")
|
|
923
923
|
}, [
|
|
924
|
-
w.value ? (s(), ne(
|
|
924
|
+
w.value ? (s(), ne(mo, {
|
|
925
925
|
key: 0,
|
|
926
|
-
"report-id":
|
|
927
|
-
"published-at": (
|
|
928
|
-
timezone:
|
|
929
|
-
"has-draft":
|
|
930
|
-
busy:
|
|
926
|
+
"report-id": a(v),
|
|
927
|
+
"published-at": (nt = i.value) == null ? void 0 : nt.publishedAt,
|
|
928
|
+
timezone: a(k).env().timezone,
|
|
929
|
+
"has-draft": ie.value,
|
|
930
|
+
busy: Y.value || q.value,
|
|
931
931
|
onClose: t[7] || (t[7] = (y) => w.value = !1),
|
|
932
|
-
onRestored:
|
|
933
|
-
onRestoring: t[8] || (t[8] = (y) =>
|
|
932
|
+
onRestored: f,
|
|
933
|
+
onRestoring: t[8] || (t[8] = (y) => G.value = y)
|
|
934
934
|
}, null, 8, ["report-id", "published-at", "timezone", "has-draft", "busy"])) : (s(), ne(ya, {
|
|
935
935
|
key: 1,
|
|
936
936
|
"home-draft": Me.value,
|
|
937
937
|
"onUpdate:homeDraft": t[9] || (t[9] = (y) => Me.value = y),
|
|
938
|
-
"home-open":
|
|
939
|
-
"onUpdate:homeOpen": t[10] || (t[10] = (y) =>
|
|
940
|
-
messages:
|
|
941
|
-
draft:
|
|
942
|
-
target:
|
|
938
|
+
"home-open": oe.value,
|
|
939
|
+
"onUpdate:homeOpen": t[10] || (t[10] = (y) => oe.value = y),
|
|
940
|
+
messages: a(ke),
|
|
941
|
+
draft: B.value,
|
|
942
|
+
target: n.value,
|
|
943
943
|
"target-stale": V.value,
|
|
944
|
-
streaming:
|
|
945
|
-
"turn-id":
|
|
944
|
+
streaming: Y.value,
|
|
945
|
+
"turn-id": a(Xe),
|
|
946
946
|
phase: Kt.value,
|
|
947
|
-
slow:
|
|
948
|
-
"started-at":
|
|
949
|
-
error:
|
|
950
|
-
interrupted:
|
|
947
|
+
slow: a(It),
|
|
948
|
+
"started-at": a(Tt),
|
|
949
|
+
error: a(Ye),
|
|
950
|
+
interrupted: a($t),
|
|
951
951
|
blank: ot.value,
|
|
952
|
-
run:
|
|
953
|
-
"run-anchor-id":
|
|
954
|
-
"run-stale":
|
|
955
|
-
"retry-error":
|
|
952
|
+
run: a(N).run.value,
|
|
953
|
+
"run-anchor-id": a(N).anchorId.value,
|
|
954
|
+
"run-stale": a(N).stale.value,
|
|
955
|
+
"retry-error": a(N).retryError.value,
|
|
956
956
|
"undoable-turn-ids": ((st = i.value) == null ? void 0 : st.unpublishedTurnIds) ?? [],
|
|
957
|
-
undoing:
|
|
958
|
-
"unsent-ids":
|
|
959
|
-
"no-reply-id":
|
|
960
|
-
"chat-id":
|
|
961
|
-
"chat-title":
|
|
962
|
-
chats:
|
|
963
|
-
"chats-cursor":
|
|
964
|
-
"chats-loading":
|
|
965
|
-
"chats-error":
|
|
966
|
-
switching:
|
|
957
|
+
undoing: q.value,
|
|
958
|
+
"unsent-ids": a(Dt),
|
|
959
|
+
"no-reply-id": a(Bt),
|
|
960
|
+
"chat-id": a(We),
|
|
961
|
+
"chat-title": a(_t),
|
|
962
|
+
chats: a(xt),
|
|
963
|
+
"chats-cursor": a(Ze),
|
|
964
|
+
"chats-loading": a(Ct),
|
|
965
|
+
"chats-error": a(St),
|
|
966
|
+
switching: a(Ge),
|
|
967
967
|
busy: tt.value,
|
|
968
|
-
stoppable:
|
|
969
|
-
stopping:
|
|
970
|
-
earlier:
|
|
971
|
-
"loading-earlier":
|
|
972
|
-
"onUpdate:draft": t[11] || (t[11] = (y) =>
|
|
968
|
+
stoppable: a(Et),
|
|
969
|
+
stopping: a(Ft),
|
|
970
|
+
earlier: a(Rt),
|
|
971
|
+
"loading-earlier": a(Vt),
|
|
972
|
+
"onUpdate:draft": t[11] || (t[11] = (y) => B.value = y),
|
|
973
973
|
onClearTarget: Re,
|
|
974
974
|
onSubmit: Ve,
|
|
975
|
-
onClose: t[12] || (t[12] = (y) =>
|
|
976
|
-
onRetry:
|
|
975
|
+
onClose: t[12] || (t[12] = (y) => X.value = !1),
|
|
976
|
+
onRetry: a(N).retry,
|
|
977
977
|
onUndo: Zt,
|
|
978
978
|
onResend: bt,
|
|
979
|
-
onAskAgain:
|
|
979
|
+
onAskAgain: kt,
|
|
980
980
|
onEditRequest: wt,
|
|
981
981
|
onStop: gt,
|
|
982
982
|
onAskBuilder: ht,
|
|
983
|
-
onCheckStatus:
|
|
983
|
+
onCheckStatus: a(N).refresh,
|
|
984
984
|
onNewChat: pt,
|
|
985
985
|
onSelectChat: yt,
|
|
986
|
-
onLoadChats: t[13] || (t[13] = (y) =>
|
|
987
|
-
onLoadMoreChats: t[14] || (t[14] = (y) =>
|
|
988
|
-
onLoadEarlier: t[15] || (t[15] = (y) =>
|
|
986
|
+
onLoadChats: t[13] || (t[13] = (y) => a(M).loadChats()),
|
|
987
|
+
onLoadMoreChats: t[14] || (t[14] = (y) => a(M).loadChats(a(Ze) ?? void 0)),
|
|
988
|
+
onLoadEarlier: t[15] || (t[15] = (y) => a(M).loadEarlier())
|
|
989
989
|
}, null, 8, ["home-draft", "home-open", "messages", "draft", "target", "target-stale", "streaming", "turn-id", "phase", "slow", "started-at", "error", "interrupted", "blank", "run", "run-anchor-id", "run-stale", "retry-error", "undoable-turn-ids", "undoing", "unsent-ids", "no-reply-id", "chat-id", "chat-title", "chats", "chats-cursor", "chats-loading", "chats-error", "switching", "busy", "stoppable", "stopping", "earlier", "loading-earlier", "onRetry", "onCheckStatus"]))
|
|
990
990
|
], 10, Bo)) : x("", !0),
|
|
991
|
-
|
|
991
|
+
P.value ? (s(), ne(re, {
|
|
992
992
|
key: 2,
|
|
993
|
-
modelValue:
|
|
994
|
-
"onUpdate:modelValue": t[18] || (t[18] = (y) =>
|
|
993
|
+
modelValue: J.value,
|
|
994
|
+
"onUpdate:modelValue": t[18] || (t[18] = (y) => J.value = y),
|
|
995
995
|
overlay: !0,
|
|
996
996
|
"dismiss-away": !0
|
|
997
997
|
}, {
|
|
998
998
|
"dialog-header": fe(() => [
|
|
999
|
-
|
|
999
|
+
r("p", Lo, c(a(m)("report.common.rename")), 1)
|
|
1000
1000
|
]),
|
|
1001
1001
|
default: fe(() => [
|
|
1002
|
-
|
|
1002
|
+
r("div", {
|
|
1003
1003
|
onKeydown: aa(oa(he, ["prevent"]), ["enter"])
|
|
1004
1004
|
}, [
|
|
1005
|
-
|
|
1006
|
-
modelValue:
|
|
1007
|
-
"onUpdate:modelValue": t[16] || (t[16] = (y) =>
|
|
1008
|
-
label:
|
|
1009
|
-
placeholder:
|
|
1005
|
+
D(ce, {
|
|
1006
|
+
modelValue: ve.value,
|
|
1007
|
+
"onUpdate:modelValue": t[16] || (t[16] = (y) => ve.value = y),
|
|
1008
|
+
label: a(m)("report.view.report.name"),
|
|
1009
|
+
placeholder: a(m)("report.view.report.enter")
|
|
1010
1010
|
}, null, 8, ["modelValue", "label", "placeholder"])
|
|
1011
1011
|
], 40, zo)
|
|
1012
1012
|
]),
|
|
1013
1013
|
"dialog-footer": fe(() => [
|
|
1014
|
-
t[20] || (t[20] =
|
|
1015
|
-
F
|
|
1016
|
-
label:
|
|
1014
|
+
t[20] || (t[20] = r("div", { class: "grow" }, null, -1)),
|
|
1015
|
+
D(F, {
|
|
1016
|
+
label: a(m)("report.common.cancel"),
|
|
1017
1017
|
variant: "tertiary",
|
|
1018
|
-
onClick: t[17] || (t[17] = (y) =>
|
|
1018
|
+
onClick: t[17] || (t[17] = (y) => J.value = !1)
|
|
1019
1019
|
}, null, 8, ["label"]),
|
|
1020
|
-
F
|
|
1021
|
-
label:
|
|
1020
|
+
D(F, {
|
|
1021
|
+
label: a(m)("report.common.save"),
|
|
1022
1022
|
variant: "primary",
|
|
1023
|
-
disabled:
|
|
1023
|
+
disabled: ve.value.trim() === "",
|
|
1024
1024
|
onClick: he
|
|
1025
1025
|
}, null, 8, ["label", "disabled"])
|
|
1026
1026
|
]),
|