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