@feedmepos/mf-report 5.7.4 → 5.7.5-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-CKdHPrlw.js → App-CIj6vVKq.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-MQ0PDHS-.js → Default.vue_vue_type_script_setup_true_lang-CzQsu4PQ.js} +2 -2
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-DokEr03U.js → DynamicWidget.vue_vue_type_script_setup_true_lang-DfLZrXsr.js} +4 -4
- package/dist/{InsightView-BbEc8H4o.js → InsightView-B98sHmT5.js} +156 -149
- package/dist/{Integration-D61lmDoO.js → Integration-DES_DTg-.js} +3 -3
- package/dist/{Integrations-BiJVCGrp.js → Integrations-DS6q4VX4.js} +3 -3
- package/dist/{Layout-D7KVahWl.js → Layout-DH2D5ulh.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-3aQidzm3.js → MenuTab.vue_vue_type_script_setup_true_lang-BctJOF4M.js} +3 -3
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CcHkFVHo.js → NavigationTab.vue_vue_type_script_setup_true_lang-cUCKgLFM.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-CNGSA27Y.js → OverviewView-C1yXNyvT.js} +5 -5
- package/dist/{Report-Hq2yj8Ox.js → Report-CViV53uf.js} +4 -4
- package/dist/{ReportEditor-BQdseFOk.js → ReportEditor-DFK07SDJ.js} +191 -197
- package/dist/{ReportView-zs3iDfhW.js → ReportView-CZ60he1O.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-Ddg3XPiq.js → Setting-C8qg3PnX.js} +4 -4
- package/dist/{TileEditor-BLsGvreq.js → TileEditor-FjYMPDA6.js} +8 -8
- package/dist/{TransitionFade-C7yNEw8X.js → TransitionFade-BdZQPsqs.js} +4 -4
- package/dist/app.js +11 -11
- 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/{v4-Cbq0RSpY.js → v4-CJhKiNw8.js} +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { W as Ve, i as ke, S as
|
|
3
|
-
import { a as ee, v as oe } from "./v4-
|
|
1
|
+
import { defineComponent as R, mergeModels as $, useModel as B, ref as N, computed as P, resolveComponent as m, createBlock as V, openBlock as u, withCtx as d, createElementVNode as y, createVNode as n, unref as e, normalizeClass as E, createTextVNode as _e, toDisplayString as q, createElementBlock as w, Fragment as U, renderSlot as X, createCommentVNode as L, watch as ye, resolveDynamicComponent as Y, isRef as Z, renderList as A, onMounted as Ce, normalizeStyle as be } from "vue";
|
|
2
|
+
import { W as Ve, i as ke, S as xe, d as Fe, T as we, _ as he } from "./TransitionFade-BdZQPsqs.js";
|
|
3
|
+
import { a as ee, v as oe } from "./v4-CJhKiNw8.js";
|
|
4
4
|
import { storeToRefs as te } from "pinia";
|
|
5
5
|
import { useRouter as le, useRoute as re } from "vue-router";
|
|
6
6
|
import { useBreakpoints as G, FmButtonColorThemeVariant as I, useSnackbar as $e } from "@feedmepos/ui-library";
|
|
7
7
|
import { u as ne } from "./message-dialog-UoMWOnil.js";
|
|
8
|
-
import { _ as ae } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { _ as ie } from "./NoData.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { u as
|
|
8
|
+
import { _ as ae } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-DfLZrXsr.js";
|
|
9
|
+
import { _ as ie } from "./NoData.vue_vue_type_script_setup_true_lang-EVDtMqna.js";
|
|
10
|
+
import { u as W, f as Se } from "./global-loader-DqYGIXIo.js";
|
|
11
11
|
import { r as Q } from "./i18n-Cif1I9J2.js";
|
|
12
|
-
const Re = /* @__PURE__ */
|
|
12
|
+
const Re = /* @__PURE__ */ R({
|
|
13
13
|
__name: "WidgetDialog",
|
|
14
14
|
props: /* @__PURE__ */ $({
|
|
15
15
|
isOpen: { type: Boolean }
|
|
@@ -18,25 +18,25 @@ const Re = /* @__PURE__ */ S({
|
|
|
18
18
|
modelModifiers: {}
|
|
19
19
|
}),
|
|
20
20
|
emits: /* @__PURE__ */ $(["isOpen"], ["update:modelValue"]),
|
|
21
|
-
setup(c, { emit:
|
|
22
|
-
const { t: o } =
|
|
23
|
-
function
|
|
21
|
+
setup(c, { emit: i }) {
|
|
22
|
+
const { t: o } = W(), { breakpoints: l } = G(), g = B(c, "modelValue"), s = c, r = i;
|
|
23
|
+
function a() {
|
|
24
24
|
r("isOpen", !1);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
t.value && (
|
|
26
|
+
function v() {
|
|
27
|
+
t.value && (g.value = t.value, t.value = void 0, r("isOpen", !1));
|
|
28
28
|
}
|
|
29
|
-
const t =
|
|
30
|
-
return (
|
|
31
|
-
const
|
|
32
|
-
return
|
|
33
|
-
"model-value":
|
|
29
|
+
const t = N(), k = P(() => !t.value);
|
|
30
|
+
return (O, h) => {
|
|
31
|
+
const T = m("FmButton"), M = m("FmDialog");
|
|
32
|
+
return u(), V(M, {
|
|
33
|
+
"model-value": s.isOpen
|
|
34
34
|
}, {
|
|
35
35
|
"dialog-header": d(() => [
|
|
36
|
-
_e(
|
|
36
|
+
_e(q(e(o)("report.widget.type")), 1)
|
|
37
37
|
]),
|
|
38
38
|
default: d(() => [
|
|
39
|
-
|
|
39
|
+
n(Ve, {
|
|
40
40
|
modelValue: t.value,
|
|
41
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"}`),
|
|
@@ -44,23 +44,23 @@ const Re = /* @__PURE__ */ S({
|
|
|
44
44
|
}, null, 8, ["modelValue", "class"])
|
|
45
45
|
]),
|
|
46
46
|
"dialog-footer": d(() => [
|
|
47
|
-
h[1] || (h[1] =
|
|
48
|
-
|
|
47
|
+
h[1] || (h[1] = y("div", { class: "grow" }, null, -1)),
|
|
48
|
+
n(T, {
|
|
49
49
|
label: e(o)("report.common.cancel"),
|
|
50
50
|
variant: "tertiary",
|
|
51
|
-
onClick:
|
|
51
|
+
onClick: a
|
|
52
52
|
}, null, 8, ["label"]),
|
|
53
|
-
|
|
53
|
+
n(T, {
|
|
54
54
|
label: e(o)("report.common.confirm"),
|
|
55
|
-
disabled:
|
|
56
|
-
onClick:
|
|
55
|
+
disabled: k.value,
|
|
56
|
+
onClick: v
|
|
57
57
|
}, null, 8, ["label", "disabled"])
|
|
58
58
|
]),
|
|
59
59
|
_: 1
|
|
60
60
|
}, 8, ["model-value"]);
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
}), Te = { class: "fm-typo-en-body-lg-600" }, H = /* @__PURE__ */
|
|
63
|
+
}), Te = { class: "fm-typo-en-body-lg-600" }, H = /* @__PURE__ */ R({
|
|
64
64
|
__name: "ReportEditorTabHeader",
|
|
65
65
|
props: /* @__PURE__ */ $({
|
|
66
66
|
icon: {
|
|
@@ -73,22 +73,22 @@ const Re = /* @__PURE__ */ S({
|
|
|
73
73
|
}),
|
|
74
74
|
emits: ["update:modelValue"],
|
|
75
75
|
setup(c) {
|
|
76
|
-
const { t:
|
|
77
|
-
return (
|
|
76
|
+
const { t: i } = W(), o = B(c, "modelValue"), l = c;
|
|
77
|
+
return (g, s) => {
|
|
78
78
|
const r = m("FmIcon");
|
|
79
|
-
return
|
|
79
|
+
return u(), w("div", {
|
|
80
80
|
class: "px-6 py-16 flex items-center gap-2 bg-fm-color-neutral-white border cursor-pointer",
|
|
81
|
-
onClick:
|
|
81
|
+
onClick: s[0] || (s[0] = (a) => o.value = !o.value)
|
|
82
82
|
}, [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
y("p", Te, q(e(i)("report.editor.customizeReport")), 1),
|
|
84
|
+
s[1] || (s[1] = y("div", { class: "grow" }, null, -1)),
|
|
85
|
+
n(r, {
|
|
86
86
|
name: l.icon
|
|
87
87
|
}, null, 8, ["name"])
|
|
88
88
|
]);
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
-
}), Me = /* @__PURE__ */
|
|
91
|
+
}), Me = /* @__PURE__ */ R({
|
|
92
92
|
__name: "ReportEditorTabDesktop",
|
|
93
93
|
props: {
|
|
94
94
|
modelValue: { required: !0, default: !1 },
|
|
@@ -96,17 +96,17 @@ const Re = /* @__PURE__ */ S({
|
|
|
96
96
|
},
|
|
97
97
|
emits: ["update:modelValue"],
|
|
98
98
|
setup(c) {
|
|
99
|
-
const
|
|
100
|
-
return (o, l) => (
|
|
101
|
-
|
|
102
|
-
modelValue:
|
|
103
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
99
|
+
const i = B(c, "modelValue");
|
|
100
|
+
return (o, l) => (u(), w(U, null, [
|
|
101
|
+
n(H, {
|
|
102
|
+
modelValue: i.value,
|
|
103
|
+
"onUpdate:modelValue": l[0] || (l[0] = (g) => i.value = g),
|
|
104
104
|
icon: "keyboard_double_arrow_left"
|
|
105
105
|
}, null, 8, ["modelValue"]),
|
|
106
106
|
X(o.$slots, "default")
|
|
107
107
|
], 64));
|
|
108
108
|
}
|
|
109
|
-
}), Be = /* @__PURE__ */
|
|
109
|
+
}), Be = /* @__PURE__ */ R({
|
|
110
110
|
__name: "ReportEditorTabMobile",
|
|
111
111
|
props: {
|
|
112
112
|
modelValue: { required: !0, default: !1 },
|
|
@@ -114,28 +114,28 @@ const Re = /* @__PURE__ */ S({
|
|
|
114
114
|
},
|
|
115
115
|
emits: ["update:modelValue"],
|
|
116
116
|
setup(c) {
|
|
117
|
-
const
|
|
117
|
+
const i = B(c, "modelValue");
|
|
118
118
|
return (o, l) => {
|
|
119
|
-
const
|
|
120
|
-
return
|
|
119
|
+
const g = m("FmTopSheet"), s = m("FmCard");
|
|
120
|
+
return u(), V(s, { class: "fixed bottom-0 w-full" }, {
|
|
121
121
|
default: d(() => [
|
|
122
|
-
|
|
123
|
-
modelValue:
|
|
124
|
-
"onUpdate:modelValue": l[0] || (l[0] = (r) =>
|
|
122
|
+
n(H, {
|
|
123
|
+
modelValue: i.value,
|
|
124
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => i.value = r),
|
|
125
125
|
icon: "keyboard_double_arrow_up"
|
|
126
126
|
}, null, 8, ["modelValue"]),
|
|
127
|
-
|
|
128
|
-
modelValue:
|
|
129
|
-
"onUpdate:modelValue": l[2] || (l[2] = (r) =>
|
|
127
|
+
n(g, {
|
|
128
|
+
modelValue: i.value,
|
|
129
|
+
"onUpdate:modelValue": l[2] || (l[2] = (r) => i.value = r),
|
|
130
130
|
"fullscreen-size": "sm"
|
|
131
131
|
}, {
|
|
132
132
|
default: d(() => [
|
|
133
|
-
|
|
134
|
-
modelValue:
|
|
135
|
-
"onUpdate:modelValue": l[1] || (l[1] = (r) =>
|
|
133
|
+
n(H, {
|
|
134
|
+
modelValue: i.value,
|
|
135
|
+
"onUpdate:modelValue": l[1] || (l[1] = (r) => i.value = r),
|
|
136
136
|
icon: "keyboard_double_arrow_down"
|
|
137
137
|
}, null, 8, ["modelValue"]),
|
|
138
|
-
|
|
138
|
+
i.value ? X(o.$slots, "default", { key: 0 }) : L("", !0)
|
|
139
139
|
]),
|
|
140
140
|
_: 3
|
|
141
141
|
}, 8, ["modelValue"])
|
|
@@ -144,7 +144,7 @@ const Re = /* @__PURE__ */ S({
|
|
|
144
144
|
});
|
|
145
145
|
};
|
|
146
146
|
}
|
|
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__ */
|
|
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__ */ R({
|
|
148
148
|
__name: "ReportEditorTab",
|
|
149
149
|
props: /* @__PURE__ */ $({
|
|
150
150
|
hideConfiguration: {
|
|
@@ -156,14 +156,14 @@ const Re = /* @__PURE__ */ S({
|
|
|
156
156
|
modelModifiers: {}
|
|
157
157
|
}),
|
|
158
158
|
emits: /* @__PURE__ */ $(["hideConfiguration"], ["update:modelValue"]),
|
|
159
|
-
setup(c, { emit:
|
|
160
|
-
const o =
|
|
159
|
+
setup(c, { emit: i }) {
|
|
160
|
+
const o = B(c, "modelValue"), { breakpoints: l } = G(), g = c, s = i, r = le(), a = re(), v = N(), { currentSelectWidgetType: t, categories: k, editingTile: O, editingIndex: h } = te(ee()), { promptMessage: T } = ne(), M = N(!1), { t: p, te: C } = W(), b = N(void 0);
|
|
161
161
|
ye(
|
|
162
162
|
() => t.value,
|
|
163
163
|
() => {
|
|
164
|
-
t.value !== void 0 && (
|
|
164
|
+
t.value !== void 0 && (b.value = ke(t.value), O.value = b.value, h.value = -1, r.push({
|
|
165
165
|
name: "tileEditor",
|
|
166
|
-
query:
|
|
166
|
+
query: a.query
|
|
167
167
|
}));
|
|
168
168
|
},
|
|
169
169
|
{ immediate: !0 }
|
|
@@ -173,10 +173,10 @@ const Re = /* @__PURE__ */ S({
|
|
|
173
173
|
label: p("report.common.edit"),
|
|
174
174
|
selected: !1,
|
|
175
175
|
variant: "tertiary",
|
|
176
|
-
onClick: (
|
|
177
|
-
h.value =
|
|
176
|
+
onClick: (F) => {
|
|
177
|
+
h.value = F, O.value = JSON.parse(JSON.stringify(o.value.tiles[F])), r.push({
|
|
178
178
|
name: "tileEditor",
|
|
179
|
-
query:
|
|
179
|
+
query: a.query
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
182
|
},
|
|
@@ -184,126 +184,126 @@ const Re = /* @__PURE__ */ S({
|
|
|
184
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
192
|
label: p("report.common.remove"),
|
|
193
193
|
selected: !1,
|
|
194
194
|
variant: "destructive",
|
|
195
|
-
onClick: async (
|
|
196
|
-
await
|
|
195
|
+
onClick: async (F) => {
|
|
196
|
+
await T({
|
|
197
197
|
title: p("report.editor.deleteWidget"),
|
|
198
198
|
message: p("report.editor.deleteWidgetConfirm", {
|
|
199
|
-
title: o.value.tiles[
|
|
199
|
+
title: o.value.tiles[F].widget.title
|
|
200
200
|
})
|
|
201
|
-
}) && (o.value.tiles = o.value.tiles.filter((j, D) => D !==
|
|
201
|
+
}) && (o.value.tiles = o.value.tiles.filter((j, D) => D !== F));
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
],
|
|
205
|
-
label: p(`report.category.${
|
|
206
|
-
value:
|
|
204
|
+
], S = P(() => k.value.map((F) => ({
|
|
205
|
+
label: p(`report.category.${F.name}`),
|
|
206
|
+
value: F.id
|
|
207
207
|
})));
|
|
208
|
-
return (
|
|
208
|
+
return (F, f) => {
|
|
209
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
|
|
211
|
-
"model-value":
|
|
212
|
-
"onUpdate:modelValue":
|
|
210
|
+
return u(), V(Y(e(l).lg || e(l).md ? Me : Be), {
|
|
211
|
+
"model-value": g.hideConfiguration,
|
|
212
|
+
"onUpdate:modelValue": f[5] || (f[5] = (_) => s("hideConfiguration", _))
|
|
213
213
|
}, {
|
|
214
214
|
default: d(() => [
|
|
215
|
-
|
|
215
|
+
n(Re, {
|
|
216
216
|
modelValue: e(t),
|
|
217
|
-
"onUpdate:modelValue":
|
|
218
|
-
"is-open":
|
|
219
|
-
onIsOpen:
|
|
217
|
+
"onUpdate:modelValue": f[0] || (f[0] = (_) => Z(t) ? t.value = _ : null),
|
|
218
|
+
"is-open": M.value,
|
|
219
|
+
onIsOpen: f[1] || (f[1] = (_) => M.value = _)
|
|
220
220
|
}, null, 8, ["modelValue", "is-open"]),
|
|
221
|
-
|
|
221
|
+
n(ve, {
|
|
222
222
|
ref_key: "form",
|
|
223
|
-
ref:
|
|
223
|
+
ref: v,
|
|
224
224
|
class: "px-6 py-16 flex flex-col gap-24 overflow-y-auto overflow-x-hidden"
|
|
225
225
|
}, {
|
|
226
226
|
default: d(() => [
|
|
227
|
-
|
|
227
|
+
n(xe, { class: "border-solid" }, {
|
|
228
228
|
header: d(() => [
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
y("p", null, q(e(p)("report.editor.reportInfo")), 1),
|
|
230
|
+
f[6] || (f[6] = y("div", { class: "grow" }, null, -1))
|
|
231
231
|
]),
|
|
232
232
|
content: d(() => [
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
y("div", Oe, [
|
|
234
|
+
n(j, {
|
|
235
235
|
modelValue: o.value.name,
|
|
236
|
-
"onUpdate:modelValue":
|
|
236
|
+
"onUpdate:modelValue": f[2] || (f[2] = (_) => o.value.name = _),
|
|
237
237
|
label: e(p)("report.editor.reportTitle"),
|
|
238
238
|
placeholder: e(p)("report.editor.placeholder")
|
|
239
239
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
240
|
-
|
|
240
|
+
n(D, {
|
|
241
241
|
modelValue: o.value.category,
|
|
242
|
-
"onUpdate:modelValue":
|
|
242
|
+
"onUpdate:modelValue": f[3] || (f[3] = (_) => o.value.category = _),
|
|
243
243
|
label: e(p)("report.common.category"),
|
|
244
|
-
items:
|
|
244
|
+
items: S.value
|
|
245
245
|
}, null, 8, ["modelValue", "label", "items"])
|
|
246
246
|
])
|
|
247
247
|
]),
|
|
248
248
|
_: 1
|
|
249
249
|
}),
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
y("div", qe, [
|
|
251
|
+
n(K, {
|
|
252
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: f[4] || (f[4] = (_) => M.value = !0)
|
|
259
259
|
}, null, 8, ["label", "border-color", "text-color"]),
|
|
260
|
-
|
|
260
|
+
n(fe, null, {
|
|
261
261
|
default: d(() => [
|
|
262
|
-
|
|
262
|
+
n(e(Fe), {
|
|
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: d(({ element:
|
|
269
|
-
|
|
268
|
+
item: d(({ element: _, index: J }) => [
|
|
269
|
+
n(pe, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
|
|
270
270
|
default: d(() => [
|
|
271
|
-
|
|
271
|
+
n(ue, {
|
|
272
272
|
name: "drag_handle",
|
|
273
273
|
class: "handle"
|
|
274
274
|
}),
|
|
275
|
-
|
|
276
|
-
content:
|
|
275
|
+
n(de, {
|
|
276
|
+
content: _.widget.title ? e(Q)(e(p), e(C), _.widget.title, "other") : e(p)("report.editor.widget", { index: J + 1 }),
|
|
277
277
|
class: "handle"
|
|
278
278
|
}, {
|
|
279
279
|
default: d(() => [
|
|
280
|
-
|
|
280
|
+
y("p", Ue, q(_.widget.title ? e(Q)(e(p), e(C), _.widget.title, "other") : e(p)("report.editor.widget", { index: J + 1 })), 1)
|
|
281
281
|
]),
|
|
282
282
|
_: 2
|
|
283
283
|
}, 1032, ["content"]),
|
|
284
|
-
|
|
285
|
-
|
|
284
|
+
f[7] || (f[7] = y("div", { class: "grow" }, null, -1)),
|
|
285
|
+
n(ce, {
|
|
286
286
|
trigger: "click",
|
|
287
287
|
shift: !0,
|
|
288
288
|
"stop-click-propagation": !0
|
|
289
289
|
}, {
|
|
290
290
|
"menu-button": d(() => [
|
|
291
|
-
|
|
291
|
+
n(K, {
|
|
292
292
|
"append-icon": "more_vert",
|
|
293
293
|
variant: "tertiary"
|
|
294
294
|
})
|
|
295
295
|
]),
|
|
296
296
|
default: d(() => [
|
|
297
|
-
(
|
|
297
|
+
(u(), w(U, null, A(x, (z, ge) => n(me, {
|
|
298
298
|
key: ge,
|
|
299
299
|
onClick: (Je) => z.onClick(J)
|
|
300
300
|
}, {
|
|
301
301
|
label: d(() => [
|
|
302
|
-
|
|
302
|
+
y("p", {
|
|
303
303
|
class: E(
|
|
304
304
|
z.variant === "destructive" ? " text-fm-color-system-error-300" : ""
|
|
305
305
|
)
|
|
306
|
-
},
|
|
306
|
+
}, q(z.label), 3)
|
|
307
307
|
]),
|
|
308
308
|
_: 2
|
|
309
309
|
}, 1032, ["onClick"])), 64))
|
|
@@ -332,7 +332,7 @@ const Re = /* @__PURE__ */ S({
|
|
|
332
332
|
key: 0,
|
|
333
333
|
class: "w-full grid grid-cols-12 gap-[24px] p-24",
|
|
334
334
|
style: { backgroundColor: "#F6F8FC" }
|
|
335
|
-
}, Le = /* @__PURE__ */
|
|
335
|
+
}, Le = /* @__PURE__ */ R({
|
|
336
336
|
__name: "ReportEditorDesktop",
|
|
337
337
|
props: /* @__PURE__ */ $({
|
|
338
338
|
hideConfiguration: { type: Boolean, required: !0, default: !1 }
|
|
@@ -342,61 +342,61 @@ const Re = /* @__PURE__ */ S({
|
|
|
342
342
|
modelModifiers: {}
|
|
343
343
|
}),
|
|
344
344
|
emits: /* @__PURE__ */ $(["hideConfiguration"], ["update:modelValue"]),
|
|
345
|
-
setup(c, { emit:
|
|
346
|
-
const o =
|
|
347
|
-
return (
|
|
348
|
-
const
|
|
349
|
-
return
|
|
350
|
-
o.value ? (
|
|
351
|
-
|
|
345
|
+
setup(c, { emit: i }) {
|
|
346
|
+
const o = B(c, "modelValue"), l = c, g = i;
|
|
347
|
+
return (s, r) => {
|
|
348
|
+
const a = m("FmCircularProgress"), v = m("FmButton");
|
|
349
|
+
return u(), w("div", null, [
|
|
350
|
+
o.value ? (u(), w(U, { key: 1 }, [
|
|
351
|
+
n(we, {
|
|
352
352
|
"model-value": !l.hideConfiguration
|
|
353
353
|
}, {
|
|
354
354
|
right: d(() => [
|
|
355
|
-
|
|
356
|
-
o.value ? (
|
|
355
|
+
y("div", Ne, [
|
|
356
|
+
o.value ? (u(), V(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
|
+
g("hideConfiguration", t);
|
|
363
363
|
})
|
|
364
|
-
}, null, 8, ["modelValue", "hide-configuration"])) :
|
|
364
|
+
}, null, 8, ["modelValue", "hide-configuration"])) : L("", !0)
|
|
365
365
|
])
|
|
366
366
|
]),
|
|
367
367
|
left: d(() => [
|
|
368
|
-
|
|
369
|
-
|
|
368
|
+
y("div", Pe, [
|
|
369
|
+
n(v, {
|
|
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) => g("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 ? (
|
|
384
|
-
(
|
|
385
|
-
key: `${e(oe)()}_${
|
|
382
|
+
y("div", Ee, [
|
|
383
|
+
o.value.tiles.length > 0 ? (u(), w("div", Ie, [
|
|
384
|
+
(u(!0), w(U, null, A(o.value.tiles, (t, k) => (u(), V(ae, {
|
|
385
|
+
key: `${e(oe)()}_${k}`,
|
|
386
386
|
"model-value": t,
|
|
387
|
-
index:
|
|
387
|
+
index: k,
|
|
388
388
|
"hide-export": !0
|
|
389
389
|
}, null, 8, ["model-value", "index"]))), 128))
|
|
390
|
-
])) : (
|
|
390
|
+
])) : (u(), V(ie, { key: 1 }))
|
|
391
391
|
])
|
|
392
|
-
], 64)) : (
|
|
392
|
+
], 64)) : (u(), V(a, { 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
|
-
}, De = /* @__PURE__ */
|
|
399
|
+
}, De = /* @__PURE__ */ R({
|
|
400
400
|
__name: "ReportEditorMobile",
|
|
401
401
|
props: /* @__PURE__ */ $({
|
|
402
402
|
hideConfiguration: { type: Boolean, required: !0, default: !1 }
|
|
@@ -406,122 +406,116 @@ const Re = /* @__PURE__ */ S({
|
|
|
406
406
|
modelModifiers: {}
|
|
407
407
|
}),
|
|
408
408
|
emits: /* @__PURE__ */ $(["hideConfiguration"], ["update:modelValue"]),
|
|
409
|
-
setup(c, { emit:
|
|
410
|
-
const o =
|
|
411
|
-
return (
|
|
412
|
-
const
|
|
413
|
-
return
|
|
414
|
-
o.value ? (
|
|
415
|
-
|
|
409
|
+
setup(c, { emit: i }) {
|
|
410
|
+
const o = B(c, "modelValue"), l = c, g = i;
|
|
411
|
+
return (s, r) => {
|
|
412
|
+
const a = m("FmCircularProgress"), v = m("FmCard");
|
|
413
|
+
return u(), w("div", null, [
|
|
414
|
+
o.value ? (u(), w(U, { key: 1 }, [
|
|
415
|
+
n(v, { class: "px-5 pb-28" }, {
|
|
416
416
|
default: d(() => [
|
|
417
|
-
o.value.tiles.length > 0 ? (
|
|
418
|
-
(
|
|
419
|
-
key: `${e(oe)()}_${
|
|
417
|
+
o.value.tiles.length > 0 ? (u(), w("div", We, [
|
|
418
|
+
(u(!0), w(U, null, A(o.value.tiles, (t, k) => (u(), V(ae, {
|
|
419
|
+
key: `${e(oe)()}_${k}`,
|
|
420
420
|
"model-value": t,
|
|
421
|
-
index:
|
|
421
|
+
index: k,
|
|
422
422
|
"hide-export": !0
|
|
423
423
|
}, null, 8, ["model-value", "index"]))), 128))
|
|
424
|
-
])) : (
|
|
424
|
+
])) : (u(), V(ie, { key: 1 }))
|
|
425
425
|
]),
|
|
426
426
|
_: 1
|
|
427
427
|
}),
|
|
428
|
-
o.value ? (
|
|
428
|
+
o.value ? (u(), V(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
|
+
g("hideConfiguration", t);
|
|
435
435
|
})
|
|
436
|
-
}, null, 8, ["modelValue", "hide-configuration"])) :
|
|
437
|
-
], 64)) : (
|
|
436
|
+
}, null, 8, ["modelValue", "hide-configuration"])) : L("", !0)
|
|
437
|
+
], 64)) : (u(), V(a, { key: 0 }))
|
|
438
438
|
]);
|
|
439
439
|
};
|
|
440
440
|
}
|
|
441
|
-
}), oo = /* @__PURE__ */
|
|
441
|
+
}), oo = /* @__PURE__ */ R({
|
|
442
442
|
__name: "ReportEditor",
|
|
443
443
|
setup(c) {
|
|
444
|
-
const
|
|
445
|
-
var
|
|
446
|
-
return !((
|
|
447
|
-
}),
|
|
448
|
-
var
|
|
449
|
-
return ((
|
|
450
|
-
}),
|
|
451
|
-
async function
|
|
452
|
-
if (!
|
|
453
|
-
|
|
444
|
+
const i = le(), o = re(), l = ee(), { promptLoader: g } = Se(), { t: s } = W(), { currentReport: r, editingReport: a } = te(l), { breakpoints: v } = G(), t = P(() => {
|
|
445
|
+
var C;
|
|
446
|
+
return !((C = a.value) != null && C.editable);
|
|
447
|
+
}), k = P(() => {
|
|
448
|
+
var C;
|
|
449
|
+
return ((C = a.value) == null ? void 0 : C.name) ?? s("report.editor.newReport");
|
|
450
|
+
}), O = $e(), { promptMessage: h } = ne(), T = N(!1);
|
|
451
|
+
async function M() {
|
|
452
|
+
if (!a.value || a.value.tiles.length === 0) {
|
|
453
|
+
O.open({ message: s("report.messages.noWidget"), type: "error" });
|
|
454
454
|
return;
|
|
455
455
|
}
|
|
456
|
-
const
|
|
456
|
+
const C = t.value ? s("report.common.clone") : s("report.common.save");
|
|
457
457
|
if (await h({
|
|
458
|
-
title: `${
|
|
459
|
-
message:
|
|
458
|
+
title: `${s("report.messages.saveReport")}`,
|
|
459
|
+
message: s("report.messages.confirmAction", { action: C, name: k.value })
|
|
460
460
|
}))
|
|
461
461
|
try {
|
|
462
|
-
await
|
|
462
|
+
await g(async () => {
|
|
463
463
|
if (t.value) {
|
|
464
|
-
const x = JSON.parse(JSON.stringify(
|
|
465
|
-
x.editable = !0, x.id = "", x.name = `${x.name} ${
|
|
464
|
+
const x = JSON.parse(JSON.stringify(a.value));
|
|
465
|
+
x.editable = !0, x.id = "", x.name = `${x.name} ${s("report.common.duplicate")}`, await l.createOrUpdateReport(x);
|
|
466
466
|
} else
|
|
467
|
-
|
|
468
|
-
|
|
467
|
+
a.value && await l.createOrUpdateReport(a.value);
|
|
468
|
+
i.push({
|
|
469
469
|
name: "reportView",
|
|
470
470
|
query: o.query
|
|
471
471
|
});
|
|
472
472
|
});
|
|
473
473
|
} catch (x) {
|
|
474
|
-
console.log(x),
|
|
475
|
-
message:
|
|
474
|
+
console.log(x), O.open({
|
|
475
|
+
message: s("report.messages.failedToAction", { action: C }),
|
|
476
476
|
type: "error"
|
|
477
477
|
});
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
async function p() {
|
|
481
|
-
var
|
|
482
|
-
if (!
|
|
481
|
+
var b;
|
|
482
|
+
if (!a.value) return;
|
|
483
483
|
await h({
|
|
484
|
-
title:
|
|
485
|
-
message:
|
|
486
|
-
}) && (
|
|
484
|
+
title: s("report.common.report", 1),
|
|
485
|
+
message: s("report.editor.notSaved", { name: (b = a.value) == null ? void 0 : b.name })
|
|
486
|
+
}) && (a.value = JSON.parse(JSON.stringify(r.value)), i.back());
|
|
487
487
|
}
|
|
488
|
-
return
|
|
489
|
-
|
|
490
|
-
}), (
|
|
491
|
-
const x = m("
|
|
492
|
-
return
|
|
488
|
+
return Ce(() => {
|
|
489
|
+
a.value || i.push({ name: "reports" });
|
|
490
|
+
}), (C, b) => {
|
|
491
|
+
const x = m("FmPageHead");
|
|
492
|
+
return u(), V(he, null, {
|
|
493
493
|
default: d(() => [
|
|
494
|
-
|
|
494
|
+
n(x, {
|
|
495
495
|
actions: [
|
|
496
|
-
{ label: e(
|
|
496
|
+
{ label: e(s)("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": b[0] || (b[0] = (S) => {
|
|
500
|
+
S === "cancel" && p(), S === "save" && M();
|
|
501
501
|
})
|
|
502
502
|
}, {
|
|
503
503
|
title: d(() => [
|
|
504
|
-
|
|
505
|
-
class: E(`${e(
|
|
506
|
-
},
|
|
507
|
-
!e(n) || e(n).tiles.length <= 0 ? (s(), C(x, {
|
|
508
|
-
key: 0,
|
|
509
|
-
label: e(i)("report.editor.draft"),
|
|
510
|
-
icon: "hexagon",
|
|
511
|
-
selectable: !1
|
|
512
|
-
}, null, 8, ["label"])) : N("", !0)
|
|
504
|
+
y("p", {
|
|
505
|
+
class: E(`${e(v).sm || e(v).xs ? "hidden" : ""} fm-typo-en-title-md-600`)
|
|
506
|
+
}, q(k.value), 3)
|
|
513
507
|
]),
|
|
514
508
|
_: 1
|
|
515
509
|
}, 8, ["actions"]),
|
|
516
|
-
e(
|
|
510
|
+
e(a) ? (u(), V(Y(e(v).lg || e(v).md ? Le : De), {
|
|
517
511
|
key: 0,
|
|
518
|
-
modelValue: e(
|
|
519
|
-
"onUpdate:modelValue":
|
|
520
|
-
class: E(`${e(
|
|
521
|
-
style:
|
|
522
|
-
"hide-configuration":
|
|
523
|
-
onHideConfiguration:
|
|
524
|
-
}, null, 40, ["modelValue", "class", "style", "hide-configuration"])) :
|
|
512
|
+
modelValue: e(a),
|
|
513
|
+
"onUpdate:modelValue": b[1] || (b[1] = (S) => Z(a) ? a.value = S : null),
|
|
514
|
+
class: E(`${e(v).lg || e(v).md ? "flex" : ""} w-full`),
|
|
515
|
+
style: be({ height: `calc( 100% - ${e(v).lg || e(v).md ? 72 : 64}px)` }),
|
|
516
|
+
"hide-configuration": T.value,
|
|
517
|
+
onHideConfiguration: b[2] || (b[2] = (S) => T.value = S)
|
|
518
|
+
}, null, 40, ["modelValue", "class", "style", "hide-configuration"])) : L("", !0)
|
|
525
519
|
]),
|
|
526
520
|
_: 1
|
|
527
521
|
});
|