@feedmepos/mf-report 5.5.10 → 5.5.11-beta.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/{App-CI59NhMr.js → App-BCCZItsv.js} +42 -42
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-C3Dsnzzo.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-CN3UKRaQ.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-HE3jlz2q.js → Default.vue_vue_type_script_setup_true_lang-D7TqpbQ9.js} +2 -2
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-Blu98Lu7.js +1082 -0
- package/dist/{InsightView-CArL6hDD.js → InsightView-bZx6j8q5.js} +6 -6
- package/dist/{Integration-CYsx29Kj.js → Integration-CoavOChV.js} +3 -3
- package/dist/{Integrations-RluH7jrn.js → Integrations-B6ACZi86.js} +3 -3
- package/dist/{Layout-BhKNg55v.js → Layout-CVsorGV9.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-B_N9ULY9.js → MenuTab.vue_vue_type_script_setup_true_lang-AopNmaX1.js} +3 -3
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DULwCyXt.js → NavigationTab.vue_vue_type_script_setup_true_lang-4LIEfrJG.js} +5 -5
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-CCA1l-Cz.js → NoData.vue_vue_type_script_setup_true_lang-DI4X_DSc.js} +1 -1
- package/dist/{OverviewView-CQGrtNQb.js → OverviewView-D7wq9voi.js} +5 -5
- package/dist/{Report-Cl-cAzXC.js → Report-St-N-XGu.js} +90 -89
- package/dist/{ReportEditor-CWjNbjr_.js → ReportEditor-BhaqAf-H.js} +176 -175
- package/dist/ReportView-BqHk2OOl.js +190 -0
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-CXYvLXnR.js → SelectComponent.vue_vue_type_script_setup_true_lang-BVs1C4af.js} +1 -1
- package/dist/{Setting-DC_StvBp.js → Setting-CF6M_Gb2.js} +4 -4
- package/dist/TileEditor-Dh1OSYsO.js +2538 -0
- package/dist/{TransitionFade-DdNpeVds.js → TransitionFade-z9aoIr9s.js} +5 -5
- package/dist/app.js +1616 -71
- package/dist/{global-loader-KvOGLx9k.js → global-loader-BqFQzk46.js} +1 -1
- package/dist/i18n-Cif1I9J2.js +11 -0
- package/dist/{index-CW2xYO89.js → index-DqqTHE7n.js} +1 -1
- package/dist/{report-schema-Zw8e6-XZ.js → report-schema-OJAFh4P6.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{v4-CHk_oNmT.js → v4-HCTsB306.js} +1 -1
- package/package.json +1 -1
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-DxpesBb1.js +0 -1074
- package/dist/ReportView-ChiQMhSH.js +0 -180
- package/dist/TileEditor-DNuK7pwX.js +0 -2514
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { defineComponent as S, mergeModels as $, useModel as M, ref as N, computed as P, resolveComponent as c, createBlock as
|
|
2
|
-
import { W as
|
|
3
|
-
import { a as
|
|
4
|
-
import { storeToRefs as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { useBreakpoints as A, FmButtonColorThemeVariant as
|
|
7
|
-
import { u as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { u as
|
|
11
|
-
|
|
1
|
+
import { defineComponent as S, mergeModels as $, useModel as M, ref as N, computed as P, resolveComponent as c, createBlock as C, openBlock as s, withCtx as m, createElementVNode as y, createVNode as a, unref as e, normalizeClass as E, createTextVNode as ge, toDisplayString as O, createElementBlock as h, Fragment as q, renderSlot as Q, createCommentVNode as U, watch as _e, resolveDynamicComponent as X, isRef as Y, renderList as H, onMounted as ye, normalizeStyle as Ce } from "vue";
|
|
2
|
+
import { W as be, i as Ve, S as ke, d as Fe, T as xe, _ as he } from "./TransitionFade-z9aoIr9s.js";
|
|
3
|
+
import { a as Z, v as ee } from "./v4-HCTsB306.js";
|
|
4
|
+
import { storeToRefs as oe } from "pinia";
|
|
5
|
+
import { useRouter as te, useRoute as le } from "vue-router";
|
|
6
|
+
import { useBreakpoints as A, FmButtonColorThemeVariant as I, useSnackbar as we } from "@feedmepos/ui-library";
|
|
7
|
+
import { u as re } from "./message-dialog-UoMWOnil.js";
|
|
8
|
+
import { _ as ne } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-Blu98Lu7.js";
|
|
9
|
+
import { _ as ae } from "./NoData.vue_vue_type_script_setup_true_lang-DI4X_DSc.js";
|
|
10
|
+
import { u as L, f as $e } from "./global-loader-BqFQzk46.js";
|
|
11
|
+
import { r as K } from "./i18n-Cif1I9J2.js";
|
|
12
|
+
const Se = /* @__PURE__ */ S({
|
|
12
13
|
__name: "WidgetDialog",
|
|
13
14
|
props: /* @__PURE__ */ $({
|
|
14
15
|
isOpen: { type: Boolean }
|
|
@@ -18,40 +19,40 @@ const we = /* @__PURE__ */ S({
|
|
|
18
19
|
}),
|
|
19
20
|
emits: /* @__PURE__ */ $(["isOpen"], ["update:modelValue"]),
|
|
20
21
|
setup(p, { emit: u }) {
|
|
21
|
-
const { t:
|
|
22
|
+
const { t: o } = L(), { breakpoints: l } = A(), g = M(p, "modelValue"), i = p, r = u;
|
|
22
23
|
function n() {
|
|
23
24
|
r("isOpen", !1);
|
|
24
25
|
}
|
|
25
26
|
function v() {
|
|
26
27
|
t.value && (g.value = t.value, t.value = void 0, r("isOpen", !1));
|
|
27
28
|
}
|
|
28
|
-
const t = N(),
|
|
29
|
-
return (B,
|
|
29
|
+
const t = N(), k = P(() => !t.value);
|
|
30
|
+
return (B, w) => {
|
|
30
31
|
const R = c("FmButton"), T = c("FmDialog");
|
|
31
|
-
return s(),
|
|
32
|
+
return s(), C(T, {
|
|
32
33
|
"model-value": i.isOpen
|
|
33
34
|
}, {
|
|
34
35
|
"dialog-header": m(() => [
|
|
35
|
-
|
|
36
|
+
ge(O(e(o)("report.widget.type")), 1)
|
|
36
37
|
]),
|
|
37
38
|
default: m(() => [
|
|
38
|
-
a(
|
|
39
|
+
a(be, {
|
|
39
40
|
modelValue: t.value,
|
|
40
|
-
"onUpdate:modelValue":
|
|
41
|
-
class: E(`grid ${
|
|
41
|
+
"onUpdate:modelValue": w[0] || (w[0] = (f) => t.value = f),
|
|
42
|
+
class: E(`grid ${e(l).lg || e(l).md ? "grid-cols-3 gap-3" : "grid-cols-2 gap-3"}`),
|
|
42
43
|
"child-class": "p-[8px] flex flex-col"
|
|
43
44
|
}, null, 8, ["modelValue", "class"])
|
|
44
45
|
]),
|
|
45
46
|
"dialog-footer": m(() => [
|
|
46
|
-
|
|
47
|
+
w[1] || (w[1] = y("div", { class: "grow" }, null, -1)),
|
|
47
48
|
a(R, {
|
|
48
|
-
label: o
|
|
49
|
+
label: e(o)("report.common.cancel"),
|
|
49
50
|
variant: "tertiary",
|
|
50
51
|
onClick: n
|
|
51
52
|
}, null, 8, ["label"]),
|
|
52
53
|
a(R, {
|
|
53
|
-
label: o
|
|
54
|
-
disabled:
|
|
54
|
+
label: e(o)("report.common.confirm"),
|
|
55
|
+
disabled: k.value,
|
|
55
56
|
onClick: v
|
|
56
57
|
}, null, 8, ["label", "disabled"])
|
|
57
58
|
]),
|
|
@@ -59,7 +60,7 @@ const we = /* @__PURE__ */ S({
|
|
|
59
60
|
}, 8, ["model-value"]);
|
|
60
61
|
};
|
|
61
62
|
}
|
|
62
|
-
}),
|
|
63
|
+
}), Re = { class: "fm-typo-en-body-lg-600" }, z = /* @__PURE__ */ S({
|
|
63
64
|
__name: "ReportEditorTabHeader",
|
|
64
65
|
props: /* @__PURE__ */ $({
|
|
65
66
|
icon: {
|
|
@@ -72,22 +73,22 @@ const we = /* @__PURE__ */ S({
|
|
|
72
73
|
}),
|
|
73
74
|
emits: ["update:modelValue"],
|
|
74
75
|
setup(p) {
|
|
75
|
-
const { t: u } =
|
|
76
|
+
const { t: u } = L(), o = M(p, "modelValue"), l = p;
|
|
76
77
|
return (g, i) => {
|
|
77
78
|
const r = c("FmIcon");
|
|
78
|
-
return s(),
|
|
79
|
+
return s(), h("div", {
|
|
79
80
|
class: "px-6 py-16 flex items-center gap-2 bg-fm-color-neutral-white border cursor-pointer",
|
|
80
|
-
onClick: i[0] || (i[0] = (n) =>
|
|
81
|
+
onClick: i[0] || (i[0] = (n) => o.value = !o.value)
|
|
81
82
|
}, [
|
|
82
|
-
|
|
83
|
-
i[1] || (i[1] =
|
|
83
|
+
y("p", Re, O(e(u)("report.editor.customizeReport")), 1),
|
|
84
|
+
i[1] || (i[1] = y("div", { class: "grow" }, null, -1)),
|
|
84
85
|
a(r, {
|
|
85
86
|
name: l.icon
|
|
86
87
|
}, null, 8, ["name"])
|
|
87
88
|
]);
|
|
88
89
|
};
|
|
89
90
|
}
|
|
90
|
-
}),
|
|
91
|
+
}), Te = /* @__PURE__ */ S({
|
|
91
92
|
__name: "ReportEditorTabDesktop",
|
|
92
93
|
props: {
|
|
93
94
|
modelValue: { required: !0, default: !1 },
|
|
@@ -96,16 +97,16 @@ const we = /* @__PURE__ */ S({
|
|
|
96
97
|
emits: ["update:modelValue"],
|
|
97
98
|
setup(p) {
|
|
98
99
|
const u = M(p, "modelValue");
|
|
99
|
-
return (
|
|
100
|
+
return (o, l) => (s(), h(q, null, [
|
|
100
101
|
a(z, {
|
|
101
102
|
modelValue: u.value,
|
|
102
103
|
"onUpdate:modelValue": l[0] || (l[0] = (g) => u.value = g),
|
|
103
104
|
icon: "keyboard_double_arrow_left"
|
|
104
105
|
}, null, 8, ["modelValue"]),
|
|
105
|
-
|
|
106
|
+
Q(o.$slots, "default")
|
|
106
107
|
], 64));
|
|
107
108
|
}
|
|
108
|
-
}),
|
|
109
|
+
}), Me = /* @__PURE__ */ S({
|
|
109
110
|
__name: "ReportEditorTabMobile",
|
|
110
111
|
props: {
|
|
111
112
|
modelValue: { required: !0, default: !1 },
|
|
@@ -114,9 +115,9 @@ const we = /* @__PURE__ */ S({
|
|
|
114
115
|
emits: ["update:modelValue"],
|
|
115
116
|
setup(p) {
|
|
116
117
|
const u = M(p, "modelValue");
|
|
117
|
-
return (
|
|
118
|
+
return (o, l) => {
|
|
118
119
|
const g = c("FmTopSheet"), i = c("FmCard");
|
|
119
|
-
return s(),
|
|
120
|
+
return s(), C(i, { class: "fixed bottom-0 w-full" }, {
|
|
120
121
|
default: m(() => [
|
|
121
122
|
a(z, {
|
|
122
123
|
modelValue: u.value,
|
|
@@ -134,7 +135,7 @@ const we = /* @__PURE__ */ S({
|
|
|
134
135
|
"onUpdate:modelValue": l[1] || (l[1] = (r) => u.value = r),
|
|
135
136
|
icon: "keyboard_double_arrow_down"
|
|
136
137
|
}, null, 8, ["modelValue"]),
|
|
137
|
-
u.value ?
|
|
138
|
+
u.value ? Q(o.$slots, "default", { key: 0 }) : U("", !0)
|
|
138
139
|
]),
|
|
139
140
|
_: 3
|
|
140
141
|
}, 8, ["modelValue"])
|
|
@@ -143,7 +144,7 @@ const we = /* @__PURE__ */ S({
|
|
|
143
144
|
});
|
|
144
145
|
};
|
|
145
146
|
}
|
|
146
|
-
}),
|
|
147
|
+
}), Be = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Oe = { class: "flex flex-col gap-24" }, qe = { class: "line-clamp-2 overflow-hidden" }, ie = /* @__PURE__ */ S({
|
|
147
148
|
__name: "ReportEditorTab",
|
|
148
149
|
props: /* @__PURE__ */ $({
|
|
149
150
|
hideConfiguration: {
|
|
@@ -156,153 +157,153 @@ const we = /* @__PURE__ */ S({
|
|
|
156
157
|
}),
|
|
157
158
|
emits: /* @__PURE__ */ $(["hideConfiguration"], ["update:modelValue"]),
|
|
158
159
|
setup(p, { emit: u }) {
|
|
159
|
-
const
|
|
160
|
-
|
|
160
|
+
const o = M(p, "modelValue"), { breakpoints: l } = A(), g = p, i = u, r = te(), n = le(), v = N(), { currentSelectWidgetType: t, categories: k, editingTile: B, editingIndex: w } = oe(Z()), { promptMessage: R } = re(), T = N(!1), { t: f, te: b } = L();
|
|
161
|
+
_e(
|
|
161
162
|
() => t.value,
|
|
162
163
|
() => {
|
|
163
|
-
t.value !== void 0 && (
|
|
164
|
+
t.value !== void 0 && (o.value.tiles.push(Ve(t.value)), w.value = o.value.tiles.length - 1, B.value = o.value.tiles[o.value.tiles.length - 1], r.push({
|
|
164
165
|
name: "tileEditor",
|
|
165
166
|
query: n.query
|
|
166
167
|
}));
|
|
167
168
|
},
|
|
168
169
|
{ immediate: !0 }
|
|
169
170
|
);
|
|
170
|
-
const
|
|
171
|
+
const F = [
|
|
171
172
|
{
|
|
172
|
-
label:
|
|
173
|
+
label: f("report.common.edit"),
|
|
173
174
|
selected: !1,
|
|
174
175
|
variant: "tertiary",
|
|
175
|
-
onClick: (
|
|
176
|
-
|
|
176
|
+
onClick: (V) => {
|
|
177
|
+
w.value = V, B.value = JSON.parse(JSON.stringify(o.value.tiles[V])), r.push({
|
|
177
178
|
name: "tileEditor",
|
|
178
179
|
query: n.query
|
|
179
180
|
});
|
|
180
181
|
}
|
|
181
182
|
},
|
|
182
183
|
{
|
|
183
|
-
label:
|
|
184
|
+
label: f("report.common.duplicate"),
|
|
184
185
|
selected: !1,
|
|
185
186
|
variant: "tertiary",
|
|
186
|
-
onClick: (
|
|
187
|
-
|
|
187
|
+
onClick: (V) => {
|
|
188
|
+
o.value.tiles.push(JSON.parse(JSON.stringify(o.value.tiles[V])));
|
|
188
189
|
}
|
|
189
190
|
},
|
|
190
191
|
{
|
|
191
|
-
label:
|
|
192
|
+
label: f("report.common.remove"),
|
|
192
193
|
selected: !1,
|
|
193
194
|
variant: "destructive",
|
|
194
|
-
onClick: async (
|
|
195
|
+
onClick: async (V) => {
|
|
195
196
|
await R({
|
|
196
|
-
title:
|
|
197
|
-
message:
|
|
198
|
-
title:
|
|
197
|
+
title: f("report.editor.deleteWidget"),
|
|
198
|
+
message: f("report.editor.deleteWidgetConfirm", {
|
|
199
|
+
title: o.value.tiles[V].widget.title
|
|
199
200
|
})
|
|
200
|
-
}) && (
|
|
201
|
+
}) && (o.value.tiles = o.value.tiles.filter((G, W) => W !== V));
|
|
201
202
|
}
|
|
202
203
|
}
|
|
203
|
-
],
|
|
204
|
-
label:
|
|
205
|
-
value:
|
|
204
|
+
], x = P(() => k.value.map((V) => ({
|
|
205
|
+
label: f(`report.category.${V.name}`),
|
|
206
|
+
value: V.id
|
|
206
207
|
})));
|
|
207
|
-
return (
|
|
208
|
-
const
|
|
209
|
-
return s(),
|
|
208
|
+
return (V, d) => {
|
|
209
|
+
const G = c("FmTextField"), W = c("FmSelect"), j = c("FmButton"), se = c("FmIcon"), ue = c("FmTooltip"), de = c("FmMenuItem"), me = c("FmMenu"), ce = c("FmListItem"), pe = c("FmList"), fe = c("FmForm");
|
|
210
|
+
return s(), C(X(e(l).lg || e(l).md ? Te : Me), {
|
|
210
211
|
"model-value": g.hideConfiguration,
|
|
211
|
-
"onUpdate:modelValue":
|
|
212
|
+
"onUpdate:modelValue": d[5] || (d[5] = (_) => i("hideConfiguration", _))
|
|
212
213
|
}, {
|
|
213
214
|
default: m(() => [
|
|
214
|
-
a(
|
|
215
|
-
modelValue:
|
|
216
|
-
"onUpdate:modelValue":
|
|
215
|
+
a(Se, {
|
|
216
|
+
modelValue: e(t),
|
|
217
|
+
"onUpdate:modelValue": d[0] || (d[0] = (_) => Y(t) ? t.value = _ : null),
|
|
217
218
|
"is-open": T.value,
|
|
218
|
-
onIsOpen:
|
|
219
|
+
onIsOpen: d[1] || (d[1] = (_) => T.value = _)
|
|
219
220
|
}, null, 8, ["modelValue", "is-open"]),
|
|
220
|
-
a(
|
|
221
|
+
a(fe, {
|
|
221
222
|
ref_key: "form",
|
|
222
223
|
ref: v,
|
|
223
224
|
class: "px-6 py-16 flex flex-col gap-24 overflow-y-auto overflow-x-hidden"
|
|
224
225
|
}, {
|
|
225
226
|
default: m(() => [
|
|
226
|
-
a(
|
|
227
|
+
a(ke, { class: "border-solid" }, {
|
|
227
228
|
header: m(() => [
|
|
228
|
-
|
|
229
|
-
|
|
229
|
+
y("p", null, O(e(f)("report.editor.reportInfo")), 1),
|
|
230
|
+
d[6] || (d[6] = y("div", { class: "grow" }, null, -1))
|
|
230
231
|
]),
|
|
231
232
|
content: m(() => [
|
|
232
|
-
|
|
233
|
-
a(
|
|
234
|
-
modelValue:
|
|
235
|
-
"onUpdate:modelValue":
|
|
236
|
-
label:
|
|
237
|
-
placeholder:
|
|
233
|
+
y("div", Be, [
|
|
234
|
+
a(G, {
|
|
235
|
+
modelValue: o.value.name,
|
|
236
|
+
"onUpdate:modelValue": d[2] || (d[2] = (_) => o.value.name = _),
|
|
237
|
+
label: e(f)("report.editor.reportTitle"),
|
|
238
|
+
placeholder: e(f)("report.editor.placeholder")
|
|
238
239
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
239
|
-
a(
|
|
240
|
-
modelValue:
|
|
241
|
-
"onUpdate:modelValue":
|
|
242
|
-
label:
|
|
243
|
-
items:
|
|
240
|
+
a(W, {
|
|
241
|
+
modelValue: o.value.category,
|
|
242
|
+
"onUpdate:modelValue": d[3] || (d[3] = (_) => o.value.category = _),
|
|
243
|
+
label: e(f)("report.common.category"),
|
|
244
|
+
items: x.value
|
|
244
245
|
}, null, 8, ["modelValue", "label", "items"])
|
|
245
246
|
])
|
|
246
247
|
]),
|
|
247
248
|
_: 1
|
|
248
249
|
}),
|
|
249
|
-
|
|
250
|
-
a(
|
|
251
|
-
label:
|
|
250
|
+
y("div", Oe, [
|
|
251
|
+
a(j, {
|
|
252
|
+
label: e(f)("report.editor.addWidget"),
|
|
252
253
|
variant: "secondary",
|
|
253
254
|
icon: "add",
|
|
254
255
|
"icon-position": "prepend",
|
|
255
|
-
"border-color":
|
|
256
|
-
"text-color":
|
|
257
|
-
onClick:
|
|
256
|
+
"border-color": e(I).ColorPrimary,
|
|
257
|
+
"text-color": e(I).ColorPrimary,
|
|
258
|
+
onClick: d[4] || (d[4] = (_) => T.value = !0)
|
|
258
259
|
}, null, 8, ["label", "border-color", "text-color"]),
|
|
259
|
-
a(
|
|
260
|
+
a(pe, null, {
|
|
260
261
|
default: m(() => [
|
|
261
|
-
a(
|
|
262
|
-
list:
|
|
262
|
+
a(e(Fe), {
|
|
263
|
+
list: o.value.tiles,
|
|
263
264
|
"item-key": "id",
|
|
264
265
|
class: "flex flex-col gap-2 cursor-grab",
|
|
265
266
|
handle: ".handle"
|
|
266
267
|
}, {
|
|
267
|
-
item: m(({ element:
|
|
268
|
-
a(
|
|
268
|
+
item: m(({ element: _, index: D }) => [
|
|
269
|
+
a(ce, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
|
|
269
270
|
default: m(() => [
|
|
270
|
-
a(
|
|
271
|
+
a(se, {
|
|
271
272
|
name: "drag_handle",
|
|
272
273
|
class: "handle"
|
|
273
274
|
}),
|
|
274
|
-
a(
|
|
275
|
-
content:
|
|
275
|
+
a(ue, {
|
|
276
|
+
content: _.widget.title ? e(K)(e(f), e(b), _.widget.title, "other") : e(f)("report.editor.widget", { index: D + 1 }),
|
|
276
277
|
class: "handle"
|
|
277
278
|
}, {
|
|
278
279
|
default: m(() => [
|
|
279
|
-
|
|
280
|
+
y("p", qe, O(_.widget.title ? e(K)(e(f), e(b), _.widget.title, "other") : e(f)("report.editor.widget", { index: D + 1 })), 1)
|
|
280
281
|
]),
|
|
281
282
|
_: 2
|
|
282
283
|
}, 1032, ["content"]),
|
|
283
|
-
|
|
284
|
-
a(
|
|
284
|
+
d[7] || (d[7] = y("div", { class: "grow" }, null, -1)),
|
|
285
|
+
a(me, {
|
|
285
286
|
trigger: "click",
|
|
286
287
|
shift: !0,
|
|
287
288
|
"stop-click-propagation": !0
|
|
288
289
|
}, {
|
|
289
290
|
"menu-button": m(() => [
|
|
290
|
-
a(
|
|
291
|
+
a(j, {
|
|
291
292
|
"append-icon": "more_vert",
|
|
292
293
|
variant: "tertiary"
|
|
293
294
|
})
|
|
294
295
|
]),
|
|
295
296
|
default: m(() => [
|
|
296
|
-
(s(),
|
|
297
|
-
key:
|
|
298
|
-
onClick: (
|
|
297
|
+
(s(), h(q, null, H(F, (J, ve) => a(de, {
|
|
298
|
+
key: ve,
|
|
299
|
+
onClick: (De) => J.onClick(D)
|
|
299
300
|
}, {
|
|
300
301
|
label: m(() => [
|
|
301
|
-
|
|
302
|
+
y("p", {
|
|
302
303
|
class: E(
|
|
303
|
-
|
|
304
|
+
J.variant === "destructive" ? " text-fm-color-system-error-300" : ""
|
|
304
305
|
)
|
|
305
|
-
}, O(
|
|
306
|
+
}, O(J.label), 3)
|
|
306
307
|
]),
|
|
307
308
|
_: 2
|
|
308
309
|
}, 1032, ["onClick"])), 64))
|
|
@@ -327,11 +328,11 @@ const we = /* @__PURE__ */ S({
|
|
|
327
328
|
}, 8, ["model-value"]);
|
|
328
329
|
};
|
|
329
330
|
}
|
|
330
|
-
}),
|
|
331
|
+
}), Ue = { class: "flex flex-col bg-fm-color-neutral-white w-[400px]" }, Ne = { class: "flex bg-fm-color-neutral-white w-[88px]" }, Pe = { class: "w-full overflow-y-auto" }, Ee = {
|
|
331
332
|
key: 0,
|
|
332
333
|
class: "w-full grid grid-cols-12 gap-[24px] p-24",
|
|
333
334
|
style: { backgroundColor: "#F6F8FC" }
|
|
334
|
-
},
|
|
335
|
+
}, Ie = /* @__PURE__ */ S({
|
|
335
336
|
__name: "ReportEditorDesktop",
|
|
336
337
|
props: /* @__PURE__ */ $({
|
|
337
338
|
hideConfiguration: { type: Boolean, required: !0, default: !1 }
|
|
@@ -342,20 +343,20 @@ const we = /* @__PURE__ */ S({
|
|
|
342
343
|
}),
|
|
343
344
|
emits: /* @__PURE__ */ $(["hideConfiguration"], ["update:modelValue"]),
|
|
344
345
|
setup(p, { emit: u }) {
|
|
345
|
-
const
|
|
346
|
+
const o = M(p, "modelValue"), l = p, g = u;
|
|
346
347
|
return (i, r) => {
|
|
347
348
|
const n = c("FmCircularProgress"), v = c("FmButton");
|
|
348
|
-
return s(),
|
|
349
|
-
|
|
350
|
-
a(
|
|
349
|
+
return s(), h("div", null, [
|
|
350
|
+
o.value ? (s(), h(q, { key: 1 }, [
|
|
351
|
+
a(xe, {
|
|
351
352
|
"model-value": !l.hideConfiguration
|
|
352
353
|
}, {
|
|
353
354
|
right: m(() => [
|
|
354
|
-
|
|
355
|
-
|
|
355
|
+
y("div", Ue, [
|
|
356
|
+
o.value ? (s(), C(ie, {
|
|
356
357
|
key: 0,
|
|
357
|
-
modelValue:
|
|
358
|
-
"onUpdate:modelValue": r[0] || (r[0] = (t) =>
|
|
358
|
+
modelValue: o.value,
|
|
359
|
+
"onUpdate:modelValue": r[0] || (r[0] = (t) => o.value = t),
|
|
359
360
|
"hide-configuration": l.hideConfiguration,
|
|
360
361
|
onHideConfiguration: r[1] || (r[1] = (t) => {
|
|
361
362
|
g("hideConfiguration", t);
|
|
@@ -364,12 +365,12 @@ const we = /* @__PURE__ */ S({
|
|
|
364
365
|
])
|
|
365
366
|
]),
|
|
366
367
|
left: m(() => [
|
|
367
|
-
|
|
368
|
+
y("div", Ne, [
|
|
368
369
|
a(v, {
|
|
369
370
|
variant: "secondary",
|
|
370
371
|
icon: "keyboard_double_arrow_right",
|
|
371
|
-
"border-color":
|
|
372
|
-
"text-color":
|
|
372
|
+
"border-color": e(I).ColorPrimary,
|
|
373
|
+
"text-color": e(I).ColorPrimary,
|
|
373
374
|
class: "m-24 my-16",
|
|
374
375
|
size: "md",
|
|
375
376
|
onClick: r[2] || (r[2] = (t) => g("hideConfiguration", !l.hideConfiguration))
|
|
@@ -378,21 +379,21 @@ const we = /* @__PURE__ */ S({
|
|
|
378
379
|
]),
|
|
379
380
|
_: 1
|
|
380
381
|
}, 8, ["model-value"]),
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
(s(!0),
|
|
384
|
-
key: `${
|
|
382
|
+
y("div", Pe, [
|
|
383
|
+
o.value.tiles.length > 0 ? (s(), h("div", Ee, [
|
|
384
|
+
(s(!0), h(q, null, H(o.value.tiles, (t, k) => (s(), C(ne, {
|
|
385
|
+
key: `${e(ee)()}_${k}`,
|
|
385
386
|
"model-value": t,
|
|
386
|
-
index:
|
|
387
|
+
index: k,
|
|
387
388
|
"hide-export": !0
|
|
388
389
|
}, null, 8, ["model-value", "index"]))), 128))
|
|
389
|
-
])) : (s(),
|
|
390
|
+
])) : (s(), C(ae, { key: 1 }))
|
|
390
391
|
])
|
|
391
|
-
], 64)) : (s(),
|
|
392
|
+
], 64)) : (s(), C(n, { key: 0 }))
|
|
392
393
|
]);
|
|
393
394
|
};
|
|
394
395
|
}
|
|
395
|
-
}),
|
|
396
|
+
}), Le = {
|
|
396
397
|
key: 0,
|
|
397
398
|
class: "grid grid-cols-12 gap-[16px]"
|
|
398
399
|
}, We = /* @__PURE__ */ S({
|
|
@@ -406,120 +407,120 @@ const we = /* @__PURE__ */ S({
|
|
|
406
407
|
}),
|
|
407
408
|
emits: /* @__PURE__ */ $(["hideConfiguration"], ["update:modelValue"]),
|
|
408
409
|
setup(p, { emit: u }) {
|
|
409
|
-
const
|
|
410
|
+
const o = M(p, "modelValue"), l = p, g = u;
|
|
410
411
|
return (i, r) => {
|
|
411
412
|
const n = c("FmCircularProgress"), v = c("FmCard");
|
|
412
|
-
return s(),
|
|
413
|
-
|
|
413
|
+
return s(), h("div", null, [
|
|
414
|
+
o.value ? (s(), h(q, { key: 1 }, [
|
|
414
415
|
a(v, { class: "px-5 pb-28" }, {
|
|
415
416
|
default: m(() => [
|
|
416
|
-
|
|
417
|
-
(s(!0),
|
|
418
|
-
key: `${
|
|
417
|
+
o.value.tiles.length > 0 ? (s(), h("div", Le, [
|
|
418
|
+
(s(!0), h(q, null, H(o.value.tiles, (t, k) => (s(), C(ne, {
|
|
419
|
+
key: `${e(ee)()}_${k}`,
|
|
419
420
|
"model-value": t,
|
|
420
|
-
index:
|
|
421
|
+
index: k,
|
|
421
422
|
"hide-export": !0
|
|
422
423
|
}, null, 8, ["model-value", "index"]))), 128))
|
|
423
|
-
])) : (s(),
|
|
424
|
+
])) : (s(), C(ae, { key: 1 }))
|
|
424
425
|
]),
|
|
425
426
|
_: 1
|
|
426
427
|
}),
|
|
427
|
-
|
|
428
|
+
o.value ? (s(), C(ie, {
|
|
428
429
|
key: 0,
|
|
429
|
-
modelValue:
|
|
430
|
-
"onUpdate:modelValue": r[0] || (r[0] = (t) =>
|
|
430
|
+
modelValue: o.value,
|
|
431
|
+
"onUpdate:modelValue": r[0] || (r[0] = (t) => o.value = t),
|
|
431
432
|
"hide-configuration": l.hideConfiguration,
|
|
432
433
|
onHideConfiguration: r[1] || (r[1] = (t) => {
|
|
433
434
|
g("hideConfiguration", t);
|
|
434
435
|
})
|
|
435
436
|
}, null, 8, ["modelValue", "hide-configuration"])) : U("", !0)
|
|
436
|
-
], 64)) : (s(),
|
|
437
|
+
], 64)) : (s(), C(n, { key: 0 }))
|
|
437
438
|
]);
|
|
438
439
|
};
|
|
439
440
|
}
|
|
440
|
-
}),
|
|
441
|
+
}), eo = /* @__PURE__ */ S({
|
|
441
442
|
__name: "ReportEditor",
|
|
442
443
|
setup(p) {
|
|
443
|
-
const u =
|
|
444
|
-
var
|
|
445
|
-
return !((
|
|
446
|
-
}),
|
|
447
|
-
var
|
|
448
|
-
return ((
|
|
449
|
-
}), B =
|
|
444
|
+
const u = te(), o = le(), l = Z(), { promptLoader: g } = $e(), { t: i } = L(), { currentReport: r, editingReport: n } = oe(l), { breakpoints: v } = A(), t = P(() => {
|
|
445
|
+
var b;
|
|
446
|
+
return !((b = n.value) != null && b.editable);
|
|
447
|
+
}), k = P(() => {
|
|
448
|
+
var b;
|
|
449
|
+
return ((b = n.value) == null ? void 0 : b.name) ?? i("report.editor.newReport");
|
|
450
|
+
}), B = we(), { promptMessage: w } = re(), R = N(!1);
|
|
450
451
|
async function T() {
|
|
451
452
|
if (!n.value || n.value.tiles.length === 0) {
|
|
452
453
|
B.open({ message: i("report.messages.noWidget"), type: "error" });
|
|
453
454
|
return;
|
|
454
455
|
}
|
|
455
|
-
const
|
|
456
|
-
if (await
|
|
456
|
+
const b = t.value ? i("report.common.clone") : i("report.common.save");
|
|
457
|
+
if (await w({
|
|
457
458
|
title: `${i("report.messages.saveReport")}`,
|
|
458
|
-
message: i("report.messages.confirmAction", { action:
|
|
459
|
+
message: i("report.messages.confirmAction", { action: b, name: k.value })
|
|
459
460
|
}))
|
|
460
461
|
try {
|
|
461
462
|
await g(async () => {
|
|
462
463
|
if (t.value) {
|
|
463
|
-
const
|
|
464
|
-
|
|
464
|
+
const x = JSON.parse(JSON.stringify(n.value));
|
|
465
|
+
x.editable = !0, x.id = "", x.name = `${x.name} ${i("report.common.duplicate")}`, await l.createOrUpdateReport(x);
|
|
465
466
|
} else
|
|
466
467
|
n.value && await l.createOrUpdateReport(n.value);
|
|
467
468
|
u.push({
|
|
468
469
|
name: "reportView",
|
|
469
|
-
query:
|
|
470
|
+
query: o.query
|
|
470
471
|
});
|
|
471
472
|
});
|
|
472
|
-
} catch (
|
|
473
|
-
console.log(
|
|
474
|
-
message: i("report.messages.failedToAction", { action:
|
|
473
|
+
} catch (x) {
|
|
474
|
+
console.log(x), B.open({
|
|
475
|
+
message: i("report.messages.failedToAction", { action: b }),
|
|
475
476
|
type: "error"
|
|
476
477
|
});
|
|
477
478
|
}
|
|
478
479
|
}
|
|
479
|
-
async function
|
|
480
|
+
async function f() {
|
|
480
481
|
var F;
|
|
481
482
|
if (!n.value) return;
|
|
482
|
-
await
|
|
483
|
+
await w({
|
|
483
484
|
title: i("report.common.report", 1),
|
|
484
485
|
message: i("report.editor.notSaved", { name: (F = n.value) == null ? void 0 : F.name })
|
|
485
486
|
}) && (n.value = JSON.parse(JSON.stringify(r.value)), u.back());
|
|
486
487
|
}
|
|
487
|
-
return
|
|
488
|
+
return ye(() => {
|
|
488
489
|
n.value || u.push({ name: "reports" });
|
|
489
|
-
}), (
|
|
490
|
-
const
|
|
491
|
-
return s(),
|
|
490
|
+
}), (b, F) => {
|
|
491
|
+
const x = c("FmChip"), V = c("FmPageHead");
|
|
492
|
+
return s(), C(he, null, {
|
|
492
493
|
default: m(() => [
|
|
493
|
-
a(
|
|
494
|
+
a(V, {
|
|
494
495
|
actions: [
|
|
495
|
-
{ label:
|
|
496
|
+
{ label: e(i)("report.common.cancel"), value: "cancel", isPrimary: !1 },
|
|
496
497
|
{ label: "Save Report", value: "save", isPrimary: !0, prependIcon: "download" }
|
|
497
498
|
],
|
|
498
|
-
"onClick:action": F[0] || (F[0] = (
|
|
499
|
-
|
|
499
|
+
"onClick:action": F[0] || (F[0] = (d) => {
|
|
500
|
+
d === "cancel" && f(), d === "save" && T();
|
|
500
501
|
})
|
|
501
502
|
}, {
|
|
502
503
|
title: m(() => [
|
|
503
|
-
|
|
504
|
-
class: E(`${
|
|
505
|
-
}, O(
|
|
506
|
-
!
|
|
504
|
+
y("p", {
|
|
505
|
+
class: E(`${e(v).sm || e(v).xs ? "hidden" : ""} fm-typo-en-title-md-600`)
|
|
506
|
+
}, O(k.value), 3),
|
|
507
|
+
!e(n) || e(n).tiles.length <= 0 ? (s(), C(x, {
|
|
507
508
|
key: 0,
|
|
508
|
-
label:
|
|
509
|
+
label: e(i)("report.editor.draft"),
|
|
509
510
|
icon: "hexagon",
|
|
510
511
|
selectable: !1
|
|
511
512
|
}, null, 8, ["label"])) : U("", !0)
|
|
512
513
|
]),
|
|
513
514
|
_: 1
|
|
514
515
|
}, 8, ["actions"]),
|
|
515
|
-
|
|
516
|
+
e(n) ? (s(), C(X(e(v).lg || e(v).md ? Ie : We), {
|
|
516
517
|
key: 0,
|
|
517
|
-
modelValue:
|
|
518
|
-
"onUpdate:modelValue": F[1] || (F[1] = (
|
|
519
|
-
class: E(`${
|
|
520
|
-
style:
|
|
518
|
+
modelValue: e(n),
|
|
519
|
+
"onUpdate:modelValue": F[1] || (F[1] = (d) => Y(n) ? n.value = d : null),
|
|
520
|
+
class: E(`${e(v).lg || e(v).md ? "flex" : ""} w-full`),
|
|
521
|
+
style: Ce({ height: `calc( 100% - ${e(v).lg || e(v).md ? 72 : 64}px)` }),
|
|
521
522
|
"hide-configuration": R.value,
|
|
522
|
-
onHideConfiguration: F[2] || (F[2] = (
|
|
523
|
+
onHideConfiguration: F[2] || (F[2] = (d) => R.value = d)
|
|
523
524
|
}, null, 40, ["modelValue", "class", "style", "hide-configuration"])) : U("", !0)
|
|
524
525
|
]),
|
|
525
526
|
_: 1
|
|
@@ -528,5 +529,5 @@ const we = /* @__PURE__ */ S({
|
|
|
528
529
|
}
|
|
529
530
|
});
|
|
530
531
|
export {
|
|
531
|
-
|
|
532
|
+
eo as default
|
|
532
533
|
};
|