@feedmepos/mf-report 5.33.3 → 5.34.1-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-BgRqim5d.js → App-BdSGNJ3L.js} +114 -113
- package/dist/{DateRangeSelect-XyU5XG5c.js → DateRangeSelect-Cre6UJLD.js} +67 -67
- package/dist/{Default.vue_vue_type_script_setup_true_lang-CC7fE3F8.js → Default.vue_vue_type_script_setup_true_lang-CvM5oewZ.js} +3 -3
- package/dist/DigestListView-BuB4JOlT.js +876 -0
- package/dist/{DigestReaderView-DSNoAESE.js → DigestReaderView-DdpTY1Ax.js} +63 -63
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-CsDiXGUk.js → DynamicWidget.vue_vue_type_script_setup_true_lang-4qBcakJs.js} +733 -733
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-D7Rsh-uY.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BL3kxHFR.js} +526 -526
- package/dist/{InsightView-CF8mQJha.js → InsightView-CZOStmyJ.js} +88 -88
- package/dist/{Integration-QMdYwTwW.js → Integration-BC-DWRpD.js} +1983 -1967
- package/dist/{Integrations-Dbx1ScOv.js → Integrations-ibKrdipe.js} +10 -10
- package/dist/{Layout-CgiplBHM.js → Layout-D0W7xdty.js} +3 -3
- package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-zW8JA7j3.js → LocationSelect.vue_vue_type_script_setup_true_lang-CJCSJkT_.js} +306 -306
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-B0q9V1x8.js → MenuTab.vue_vue_type_script_setup_true_lang-DnPC8AcN.js} +6 -6
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BVWZ8vTw.js → NavigationTab.vue_vue_type_script_setup_true_lang-CKaMBQka.js} +12784 -11760
- package/dist/{OverviewView-BbZ8WkLb.js → OverviewView-AOwgvPBq.js} +7 -7
- package/dist/{Report-BYi0pPZs.js → Report-Bs5sy1OF.js} +12 -12
- package/dist/{ReportCanvasView-CfFtVomc.js → ReportCanvasView-CYai96pI.js} +426 -426
- package/dist/{ReportEditor-BLEkGUVR.js → ReportEditor-BbsLe4B7.js} +32 -32
- package/dist/{ReportView-TG78Krm2.js → ReportView-B5Fqspyn.js} +13 -13
- package/dist/{ReportViewRoute-BUADf4Cr.js → ReportViewRoute-D2wI79x9.js} +5 -5
- package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-Cxx-TQz9.js +137 -0
- package/dist/{Setting-Curkhv9_.js → Setting-DdYXi5qR.js} +6 -6
- package/dist/{Template-BN_ds698.js → Template-YEa1E6oz.js} +80 -80
- package/dist/{TileEditor-Cfb0uXGr.js → TileEditor-CnmEhIab.js} +1566 -1566
- package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-1FKwWbpC.js → TilePageStack.vue_vue_type_script_setup_true_lang-CqWXV57r.js} +82 -82
- package/dist/{TransitionFade-D0_ZoB-O.js → TransitionFade-BmItOXFf.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-LKjvcmXa.js → app-BmNusIzI.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-DAk-bsf8.js +12 -0
- package/dist/index-6T_rmIM_.js +24722 -0
- package/dist/{report-Ci2ElGpp.js → report-NKl3Yb5J.js} +23 -23
- package/dist/style.css +1 -1
- package/dist/{useDigestFont-BxXC7U3d.js → useDigestFont-Bxq6g3WO.js} +80 -80
- package/dist/{useReportCanvasPanel-BjmRiMSh.js → useReportCanvasPanel-BN-Gq7Uj.js} +975 -976
- package/dist/{useRestaurantPermission-DX52YBfA.js → useRestaurantPermission-D8b3oI0-.js} +2 -2
- package/package.json +11 -11
- package/dist/DigestListView-Bqp4LA1w.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-DFN_8rRJ.js +0 -12
- package/dist/index-xdTpLFHc.js +0 -25511
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { ref as ye, computed as Se, defineComponent as yt,
|
|
2
|
-
import { c as Kt, _ as Jt, D as Ll, e as Pl } from "./DateRangeSelect-
|
|
3
|
-
import { e as gt } from "./index-
|
|
4
|
-
import { d as E, u as ke, c as je, a as Pe, F as Oe, ah as St, w as $e, h as Ml, j as Bl, z as zl,
|
|
5
|
-
import { b as B, C as j, Q as
|
|
1
|
+
import { ref as ye, computed as Se, defineComponent as yt, useModel as ft, watch as Ae, resolveComponent as te, openBlock as X, createElementBlock as he, createVNode as M, withCtx as ie, createElementVNode as Y, Fragment as Le, renderList as ht, createBlock as De, unref as D, createTextVNode as st, toDisplayString as be, withDirectives as $l, vShow as Gl, createCommentVNode as vt, mergeModels as rt, renderSlot as Qt, normalizeStyle as El, normalizeClass as Lt, withModifiers as mt } from "vue";
|
|
2
|
+
import { c as Kt, _ as Jt, D as Ll, e as Pl } from "./DateRangeSelect-Cre6UJLD.js";
|
|
3
|
+
import { e as gt } from "./index-6T_rmIM_.js";
|
|
4
|
+
import { d as E, u as ke, c as je, a as Pe, F as Oe, ah as St, w as $e, h as Ml, j as Bl, z as zl, t as Pt, i as ql } from "./app-BmNusIzI.js";
|
|
5
|
+
import { b as B, C as j, Q as nt, u as Me, o as Ge, p as Ue, D as ve, a as Wl, x as Mt, W as Bt, A as Ul, S as zt } from "./report-NKl3Yb5J.js";
|
|
6
6
|
import { defineStore as Ft, storeToRefs as oe } from "pinia";
|
|
7
7
|
import { detectLocale as xe } from "@feedmepos/mf-common";
|
|
8
|
-
import { u as Yt } from "./_plugin-vue_export-helper-
|
|
9
|
-
import { _ as jl } from "./SelectComponent.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { u as Yt } from "./_plugin-vue_export-helper-Bx7s49ra.js";
|
|
9
|
+
import { _ as jl } from "./SelectComponent.vue_vue_type_script_setup_true_lang-Cxx-TQz9.js";
|
|
10
10
|
var Ht = /* @__PURE__ */ ((l) => (l.generating = "GENERATING", l.completed = "COMPLETED", l.failed = "FAILED", l.canceled = "CANCELLED", l))(Ht || {});
|
|
11
|
-
const Ql = "/assets/formatChartData.worker-
|
|
11
|
+
const Ql = "/assets/formatChartData.worker-Cpgnh20a.js", dt = /* @__PURE__ */ new Map();
|
|
12
12
|
function qt(l) {
|
|
13
13
|
return new Worker(l, { type: "module" });
|
|
14
14
|
}
|
|
15
15
|
async function Kl(l) {
|
|
16
|
-
if (
|
|
17
|
-
return qt(
|
|
18
|
-
let
|
|
16
|
+
if (dt.has(l))
|
|
17
|
+
return qt(dt.get(l));
|
|
18
|
+
let a = l;
|
|
19
19
|
if (location.hostname !== new URL(import.meta.url).hostname) {
|
|
20
|
-
const
|
|
21
|
-
|
|
20
|
+
const m = new URL(l.replace(/^\//, ""), import.meta.url).href, p = await fetch(m).then((F) => F.text()), f = new Blob([p], { type: "application/javascript" });
|
|
21
|
+
a = URL.createObjectURL(f);
|
|
22
22
|
}
|
|
23
|
-
const r = qt(
|
|
24
|
-
return
|
|
23
|
+
const r = qt(a);
|
|
24
|
+
return dt.set(l, a), r;
|
|
25
25
|
}
|
|
26
|
-
async function Jl(l,
|
|
26
|
+
async function Jl(l, a) {
|
|
27
27
|
const s = await Kl(l);
|
|
28
|
-
return s.postMessage(
|
|
29
|
-
s.onmessage = async (
|
|
30
|
-
const p =
|
|
28
|
+
return s.postMessage(a), await new Promise((r) => {
|
|
29
|
+
s.onmessage = async (m) => {
|
|
30
|
+
const p = m.data;
|
|
31
31
|
s.terminate(), r(p);
|
|
32
32
|
};
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
const Yl = "mf-reportreport-sort-store", Zt = Ft(Yl, () => {
|
|
36
36
|
const l = ye([]);
|
|
37
|
-
function
|
|
38
|
-
if (
|
|
39
|
-
const f = Array.isArray(p) ? p.filter((u) => u && u.key) : [], F = l.value.findIndex((u) => u.tileIndex ===
|
|
40
|
-
F !== -1 ? l.value.splice(F, 1,
|
|
37
|
+
function a(m, p) {
|
|
38
|
+
if (m == null) return;
|
|
39
|
+
const f = Array.isArray(p) ? p.filter((u) => u && u.key) : [], F = l.value.findIndex((u) => u.tileIndex === m), b = { tileIndex: m, sorts: f };
|
|
40
|
+
F !== -1 ? l.value.splice(F, 1, b) : l.value.push(b);
|
|
41
41
|
}
|
|
42
|
-
function s(
|
|
42
|
+
function s(m) {
|
|
43
43
|
var p;
|
|
44
|
-
return
|
|
44
|
+
return m == null ? [] : ((p = l.value.find((f) => f.tileIndex === m)) == null ? void 0 : p.sorts) ?? [];
|
|
45
45
|
}
|
|
46
|
-
function r(
|
|
47
|
-
typeof
|
|
46
|
+
function r(m) {
|
|
47
|
+
typeof m == "number" ? l.value = l.value.filter((p) => p.tileIndex !== m) : l.value = [];
|
|
48
48
|
}
|
|
49
|
-
return { tileSort: l, setTileSorts:
|
|
49
|
+
return { tileSort: l, setTileSorts: a, getTileSorts: s, clearTileSorts: r };
|
|
50
50
|
}), Hl = "mf-reportreport-search-store", Zl = Ft(Hl, () => {
|
|
51
51
|
const l = ye({});
|
|
52
|
-
function
|
|
53
|
-
r != null && (
|
|
52
|
+
function a(r, m) {
|
|
53
|
+
r != null && (m ? l.value[r] = m : delete l.value[r]);
|
|
54
54
|
}
|
|
55
55
|
function s(r) {
|
|
56
56
|
if (r != null)
|
|
57
57
|
return l.value[r] || void 0;
|
|
58
58
|
}
|
|
59
|
-
return { tileSearch: l, setTileSearch:
|
|
59
|
+
return { tileSearch: l, setTileSearch: a, getTileSearch: s };
|
|
60
60
|
}), Xt = "__EMPTY__";
|
|
61
61
|
function We(l = []) {
|
|
62
62
|
return Array.from(new Set(l));
|
|
@@ -70,26 +70,26 @@ function Xl(l) {
|
|
|
70
70
|
l.operator
|
|
71
71
|
].join(":");
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
const
|
|
73
|
+
function ea(l) {
|
|
74
|
+
const a = (s, r) => E().set("hour", s).set("minute", r).set("second", 0).set("millisecond", 0).toISOString();
|
|
75
75
|
return !l.startTime || !l.endTime ? [] : [
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
a(l.startTime.hour, l.startTime.minute),
|
|
77
|
+
a(l.endTime.hour, l.endTime.minute)
|
|
78
78
|
];
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function ta(l, a) {
|
|
81
81
|
return {
|
|
82
82
|
schemaName: l.schemaName,
|
|
83
83
|
name: l.name,
|
|
84
|
-
operator:
|
|
84
|
+
operator: a.operator,
|
|
85
85
|
option: l.option ?? null,
|
|
86
|
-
values: We(
|
|
86
|
+
values: We(a.values),
|
|
87
87
|
dataFormula: l.dataFormula,
|
|
88
88
|
isGlobalFilter: !l.beforeAggregation
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
const s =
|
|
91
|
+
function la(l, a) {
|
|
92
|
+
const s = ea(a);
|
|
93
93
|
return s.length !== 2 ? null : {
|
|
94
94
|
schemaName: l.schemaName,
|
|
95
95
|
name: l.name,
|
|
@@ -100,18 +100,18 @@ function ln(l, n) {
|
|
|
100
100
|
isGlobalFilter: !l.beforeAggregation
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
var
|
|
105
|
-
const
|
|
106
|
-
...
|
|
103
|
+
function aa(l) {
|
|
104
|
+
var m, p, f, F;
|
|
105
|
+
const a = (l.filters ?? []).map((b) => ({
|
|
106
|
+
...b,
|
|
107
107
|
isGlobalFilter: !l.beforeAggregation
|
|
108
108
|
})), s = Array.from(new Set(l.values ?? []));
|
|
109
109
|
if (s.length === 1 && String(s[0]) === "EMPTY_GLOBAL_FILTER_VALUE") {
|
|
110
|
-
const
|
|
110
|
+
const b = Object.values(B).includes(
|
|
111
111
|
String(l.option ?? "")
|
|
112
|
-
), u = l.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [
|
|
112
|
+
), u = l.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [b ? "-1" : Xt];
|
|
113
113
|
return [
|
|
114
|
-
...
|
|
114
|
+
...a,
|
|
115
115
|
{
|
|
116
116
|
schemaName: l.schemaName,
|
|
117
117
|
name: l.name,
|
|
@@ -123,28 +123,28 @@ function nn(l) {
|
|
|
123
123
|
}
|
|
124
124
|
];
|
|
125
125
|
}
|
|
126
|
-
if ((((
|
|
127
|
-
const
|
|
126
|
+
if ((((m = l.customTimeRanges) == null ? void 0 : m.length) ?? 0) > 0) {
|
|
127
|
+
const b = new Set(s.map((u) => String(u)));
|
|
128
128
|
return [
|
|
129
|
-
...
|
|
129
|
+
...a,
|
|
130
130
|
...((p = l.customTimeRanges) == null ? void 0 : p.filter((u) => {
|
|
131
131
|
const L = String(u.name ?? "");
|
|
132
|
-
return
|
|
133
|
-
}).map((u) =>
|
|
132
|
+
return b.has(L);
|
|
133
|
+
}).map((u) => la(l, u)).filter((u) => !!u)) ?? []
|
|
134
134
|
];
|
|
135
135
|
}
|
|
136
136
|
if ((((f = l.customOptions) == null ? void 0 : f.length) ?? 0) > 0) {
|
|
137
|
-
const
|
|
137
|
+
const b = new Set(s.map((u) => String(u)));
|
|
138
138
|
return [
|
|
139
|
-
...
|
|
139
|
+
...a,
|
|
140
140
|
...((F = l.customOptions) == null ? void 0 : F.filter((u) => {
|
|
141
141
|
const L = String(u.label ?? "");
|
|
142
|
-
return
|
|
143
|
-
}).map((u) =>
|
|
142
|
+
return b.has(L);
|
|
143
|
+
}).map((u) => ta(l, u)).filter((u) => Array.isArray(u.values) && u.values.length > 0)) ?? []
|
|
144
144
|
];
|
|
145
145
|
}
|
|
146
|
-
return s.length === 0 ?
|
|
147
|
-
...
|
|
146
|
+
return s.length === 0 ? a : [
|
|
147
|
+
...a,
|
|
148
148
|
{
|
|
149
149
|
schemaName: l.schemaName,
|
|
150
150
|
name: l.name,
|
|
@@ -158,58 +158,58 @@ function nn(l) {
|
|
|
158
158
|
}
|
|
159
159
|
function Wt({
|
|
160
160
|
originalFilters: l,
|
|
161
|
-
globalFilters:
|
|
161
|
+
globalFilters: a,
|
|
162
162
|
schemaNames: s
|
|
163
163
|
}) {
|
|
164
|
-
const r = /* @__PURE__ */ new Map(),
|
|
165
|
-
function
|
|
166
|
-
const
|
|
164
|
+
const r = /* @__PURE__ */ new Map(), m = [], p = new Set((s ?? []).map((c) => String(c))), f = (c) => p.has(c.schemaName ?? ""), F = a.filter(f);
|
|
165
|
+
function b(c) {
|
|
166
|
+
const d = Object.values(B).includes(
|
|
167
167
|
String(c.option ?? "")
|
|
168
168
|
);
|
|
169
|
-
return c.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [
|
|
169
|
+
return c.option === B.TimeOfDay ? ["1000-01-01T23:59:59.999Z", "1000-01-01T00:00:00.000Z"] : [d ? "-1" : Xt];
|
|
170
170
|
}
|
|
171
|
-
function u(c,
|
|
172
|
-
const
|
|
173
|
-
return Number.isFinite(
|
|
171
|
+
function u(c, d) {
|
|
172
|
+
const v = typeof c == "number" ? c : Number(c), y = typeof d == "number" ? d : Number(d);
|
|
173
|
+
return Number.isFinite(v) && Number.isFinite(y) ? v - y : typeof c == "string" && typeof d == "string" ? c.localeCompare(d) : null;
|
|
174
174
|
}
|
|
175
|
-
function L(c,
|
|
176
|
-
if (c.length === 0 ||
|
|
177
|
-
const
|
|
178
|
-
return
|
|
175
|
+
function L(c, d) {
|
|
176
|
+
if (c.length === 0 || d.length === 0) return null;
|
|
177
|
+
const v = u(c[0], d[0]);
|
|
178
|
+
return v == null ? null : [v >= 0 ? c[0] : d[0]];
|
|
179
179
|
}
|
|
180
|
-
function Q(c,
|
|
181
|
-
if (c.length === 0 ||
|
|
182
|
-
const
|
|
183
|
-
return
|
|
180
|
+
function Q(c, d) {
|
|
181
|
+
if (c.length === 0 || d.length === 0) return null;
|
|
182
|
+
const v = u(c[0], d[0]);
|
|
183
|
+
return v == null ? null : [v <= 0 ? c[0] : d[0]];
|
|
184
184
|
}
|
|
185
|
-
function _(c,
|
|
186
|
-
if (c.length < 2 ||
|
|
187
|
-
const
|
|
188
|
-
if (
|
|
189
|
-
const
|
|
190
|
-
return u(
|
|
185
|
+
function _(c, d) {
|
|
186
|
+
if (c.length < 2 || d.length < 2) return null;
|
|
187
|
+
const v = u(c[0], d[0]), y = u(c[1], d[1]);
|
|
188
|
+
if (v == null || y == null) return null;
|
|
189
|
+
const N = v >= 0 ? c[0] : d[0], R = y <= 0 ? c[1] : d[1];
|
|
190
|
+
return u(N, R) == null ? null : [N, R];
|
|
191
191
|
}
|
|
192
|
-
function O(c,
|
|
193
|
-
const
|
|
194
|
-
switch (
|
|
192
|
+
function O(c, d) {
|
|
193
|
+
const v = We(c.values), y = We(d.values);
|
|
194
|
+
switch (d.operator) {
|
|
195
195
|
case j.Equal: {
|
|
196
|
-
const
|
|
197
|
-
return R.length ? R :
|
|
196
|
+
const N = new Set(y), R = v.filter((H) => N.has(H));
|
|
197
|
+
return R.length ? R : b(c);
|
|
198
198
|
}
|
|
199
199
|
case j.NotEqual:
|
|
200
200
|
case j.NotLike:
|
|
201
201
|
return We([
|
|
202
|
-
...
|
|
202
|
+
...v,
|
|
203
203
|
...y
|
|
204
204
|
]);
|
|
205
205
|
case j.GreaterThan:
|
|
206
206
|
case j.GreaterThanOrEqual:
|
|
207
|
-
return L(
|
|
207
|
+
return L(v, y);
|
|
208
208
|
case j.LessThan:
|
|
209
209
|
case j.LessThanOrEqual:
|
|
210
|
-
return Q(
|
|
210
|
+
return Q(v, y);
|
|
211
211
|
case j.Between:
|
|
212
|
-
return _(
|
|
212
|
+
return _(v, y);
|
|
213
213
|
default:
|
|
214
214
|
return null;
|
|
215
215
|
}
|
|
@@ -217,61 +217,61 @@ function Wt({
|
|
|
217
217
|
const S = (c) => {
|
|
218
218
|
if (!c || !f(c) || !Array.isArray(c.values) || c.values.length === 0)
|
|
219
219
|
return;
|
|
220
|
-
const
|
|
220
|
+
const d = {
|
|
221
221
|
...c,
|
|
222
222
|
values: We(c.values)
|
|
223
223
|
};
|
|
224
|
-
if (
|
|
225
|
-
|
|
224
|
+
if (d.option === B.TimeOfDay && d.operator === j.Between) {
|
|
225
|
+
m.push(d);
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
|
-
const y = Xl(
|
|
229
|
-
if (!
|
|
230
|
-
r.set(y,
|
|
228
|
+
const y = Xl(d), N = r.get(y);
|
|
229
|
+
if (!N) {
|
|
230
|
+
r.set(y, d);
|
|
231
231
|
return;
|
|
232
232
|
}
|
|
233
|
-
const R = O(
|
|
233
|
+
const R = O(N, d);
|
|
234
234
|
if (R == null) {
|
|
235
|
-
|
|
235
|
+
m.push(d);
|
|
236
236
|
return;
|
|
237
237
|
}
|
|
238
|
-
|
|
238
|
+
N.values = R, r.set(y, N);
|
|
239
239
|
};
|
|
240
|
-
return l.forEach(S), F.forEach(S), [...Array.from(r.values()), ...
|
|
240
|
+
return l.forEach(S), F.forEach(S), [...Array.from(r.values()), ...m];
|
|
241
241
|
}
|
|
242
|
-
function Qe(l,
|
|
242
|
+
function Qe(l, a, s) {
|
|
243
243
|
var p;
|
|
244
|
-
const r = JSON.parse(JSON.stringify(l)),
|
|
244
|
+
const r = JSON.parse(JSON.stringify(l)), m = a.filter((f) => {
|
|
245
245
|
var F;
|
|
246
246
|
return (F = f.tileIds) == null ? void 0 : F.includes(s);
|
|
247
|
-
}).flatMap((f) =>
|
|
247
|
+
}).flatMap((f) => aa(f));
|
|
248
248
|
return {
|
|
249
249
|
...r,
|
|
250
250
|
config: {
|
|
251
251
|
...r.config,
|
|
252
252
|
filters: Wt({
|
|
253
253
|
originalFilters: r.config.filters ?? [],
|
|
254
|
-
globalFilters:
|
|
254
|
+
globalFilters: m ?? [],
|
|
255
255
|
schemaNames: r.config.schemaNames
|
|
256
256
|
}),
|
|
257
257
|
joinDatasources: ((p = r.config.joinDatasources) == null ? void 0 : p.map((f, F) => {
|
|
258
|
-
var
|
|
258
|
+
var b;
|
|
259
259
|
return {
|
|
260
260
|
...f,
|
|
261
261
|
filters: Wt({
|
|
262
262
|
originalFilters: f.filters ?? [],
|
|
263
|
-
globalFilters:
|
|
264
|
-
schemaNames: (
|
|
263
|
+
globalFilters: m ?? [],
|
|
264
|
+
schemaNames: (b = r.config.joinDatasources) == null ? void 0 : b[F].schemaNames
|
|
265
265
|
})
|
|
266
266
|
};
|
|
267
267
|
})) ?? []
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
270
|
}
|
|
271
|
-
function
|
|
272
|
-
return (l == null ? void 0 : l.queryDatasource) ===
|
|
271
|
+
function na(l) {
|
|
272
|
+
return (l == null ? void 0 : l.queryDatasource) === nt.BigQuery ? nt.BigQuery : nt.Postgres;
|
|
273
273
|
}
|
|
274
|
-
const
|
|
274
|
+
const sa = [
|
|
275
275
|
"schemaNames",
|
|
276
276
|
"schemas",
|
|
277
277
|
"dimensions",
|
|
@@ -300,23 +300,23 @@ const sn = [
|
|
|
300
300
|
"periodType"
|
|
301
301
|
];
|
|
302
302
|
function el(l) {
|
|
303
|
-
const
|
|
304
|
-
for (const s of
|
|
305
|
-
delete
|
|
306
|
-
return
|
|
303
|
+
const a = { ...l.config };
|
|
304
|
+
for (const s of sa)
|
|
305
|
+
delete a[s];
|
|
306
|
+
return a;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function bt(l) {
|
|
309
309
|
return (l == null ? void 0 : l.queryVersion) === "v2";
|
|
310
310
|
}
|
|
311
311
|
function Ke({
|
|
312
312
|
report: l,
|
|
313
|
-
pageSubject:
|
|
313
|
+
pageSubject: a,
|
|
314
314
|
dateRange: s,
|
|
315
315
|
compareDateRange: r,
|
|
316
|
-
timezone:
|
|
316
|
+
timezone: m
|
|
317
317
|
}) {
|
|
318
|
-
const { canReadReportDateRange: p, canReadPageDateRange: f } = Bl(), F = (u) =>
|
|
319
|
-
return F(s) && (!
|
|
318
|
+
const { canReadReportDateRange: p, canReadPageDateRange: f } = Bl(), F = (u) => a ? f(a, u, m) : l ? p(l, u, m) : !0, b = !!(r != null && r.startDate && (r != null && r.endDate));
|
|
319
|
+
return F(s) && (!b || F(r));
|
|
320
320
|
}
|
|
321
321
|
function Je(l) {
|
|
322
322
|
if (l === "overview")
|
|
@@ -324,44 +324,44 @@ function Je(l) {
|
|
|
324
324
|
}
|
|
325
325
|
function wt({
|
|
326
326
|
selectedNavigationTab: l,
|
|
327
|
-
isEditorRoute:
|
|
327
|
+
isEditorRoute: a,
|
|
328
328
|
overviewReport: s,
|
|
329
329
|
editingReport: r,
|
|
330
|
-
currentReport:
|
|
330
|
+
currentReport: m
|
|
331
331
|
}) {
|
|
332
|
-
return l === "overview" && s ? s :
|
|
332
|
+
return l === "overview" && s ? s : a ? r ?? m : m;
|
|
333
333
|
}
|
|
334
|
-
async function tl(l,
|
|
334
|
+
async function tl(l, a) {
|
|
335
335
|
for (let s = 0; s < l.length; s++)
|
|
336
336
|
try {
|
|
337
337
|
return await l[s]();
|
|
338
338
|
} catch (r) {
|
|
339
339
|
if (r.message === "Unauthorized" || s === l.length - 1) throw r;
|
|
340
|
-
await new Promise((
|
|
340
|
+
await new Promise((m) => setTimeout(m, a));
|
|
341
341
|
}
|
|
342
342
|
throw new Error("No callback");
|
|
343
343
|
}
|
|
344
|
-
const
|
|
344
|
+
const ra = async ({
|
|
345
345
|
widget: l,
|
|
346
|
-
signal:
|
|
346
|
+
signal: a,
|
|
347
347
|
tileId: s,
|
|
348
348
|
scopedLocationIds: r,
|
|
349
|
-
scopedTimeRange:
|
|
349
|
+
scopedTimeRange: m,
|
|
350
350
|
scopedDateRange: p,
|
|
351
351
|
scopedGlobalFilters: f,
|
|
352
352
|
page: F,
|
|
353
|
-
pageRead:
|
|
353
|
+
pageRead: b,
|
|
354
354
|
search: u
|
|
355
355
|
}) => {
|
|
356
|
-
var re, Fe,
|
|
357
|
-
const { scopePath: L, requestBusinessIds: Q } = oe(ke()), { currentReport: _, editingReport: O, overviewReport: S } = Me(), { selectedNavigationTab: c, isEditorRoute:
|
|
356
|
+
var re, Fe, me, ge;
|
|
357
|
+
const { scopePath: L, requestBusinessIds: Q } = oe(ke()), { currentReport: _, editingReport: O, overviewReport: S } = Me(), { selectedNavigationTab: c, isEditorRoute: d } = je(), v = wt({
|
|
358
358
|
selectedNavigationTab: c,
|
|
359
|
-
isEditorRoute:
|
|
359
|
+
isEditorRoute: d,
|
|
360
360
|
overviewReport: S,
|
|
361
361
|
editingReport: O,
|
|
362
362
|
currentReport: _
|
|
363
363
|
}), y = Je(c), {
|
|
364
|
-
selectedRestaurantIds:
|
|
364
|
+
selectedRestaurantIds: N,
|
|
365
365
|
selectedWarehouseIds: R,
|
|
366
366
|
selectedLocationIds: H,
|
|
367
367
|
dateRange: z,
|
|
@@ -369,73 +369,73 @@ const rn = async ({
|
|
|
369
369
|
timeRange: ee,
|
|
370
370
|
timezone: le,
|
|
371
371
|
restaurants: Z,
|
|
372
|
-
warehouses:
|
|
372
|
+
warehouses: C
|
|
373
373
|
} = Pe(), { globalFilters: W } = Ge();
|
|
374
374
|
if (H.length === 0)
|
|
375
375
|
return null;
|
|
376
|
-
const
|
|
376
|
+
const ne = p ?? z, U = m ?? ee, K = f ?? W;
|
|
377
377
|
if (!Ke({
|
|
378
|
-
report:
|
|
378
|
+
report: v,
|
|
379
379
|
pageSubject: y,
|
|
380
|
-
dateRange:
|
|
380
|
+
dateRange: ne,
|
|
381
381
|
compareDateRange: q,
|
|
382
382
|
timezone: le
|
|
383
383
|
}))
|
|
384
384
|
return null;
|
|
385
|
-
const se = (r == null ? void 0 : r.filter((
|
|
385
|
+
const se = (r == null ? void 0 : r.filter((ae) => Z.some((P) => P.id === ae))) ?? N, x = (r == null ? void 0 : r.filter((ae) => C.some((P) => P.id === ae))) ?? R, k = Qe(l, K, s ?? ""), ce = {
|
|
386
386
|
fetchType: Oe.Post,
|
|
387
|
-
url:
|
|
387
|
+
url: b ? `/${L.value}/v2/query/page` : `/${L.value}/v2/query`,
|
|
388
388
|
data: {
|
|
389
389
|
...F ? { page: F } : {},
|
|
390
|
-
...
|
|
390
|
+
...b ?? {},
|
|
391
391
|
...u ? { search: u } : {},
|
|
392
392
|
widget: k,
|
|
393
|
-
dateRange: [
|
|
393
|
+
dateRange: [ne.startDate, ne.endDate],
|
|
394
394
|
compareDateRange: q.startDate && q.endDate ? [q.startDate, q.endDate] : void 0,
|
|
395
395
|
timeRange: [
|
|
396
396
|
E().tz(le).hour(Number((re = U.start) == null ? void 0 : re.hour)).minute(Number((Fe = U.start) == null ? void 0 : Fe.minute)).toISOString(),
|
|
397
|
-
E().tz(le).hour(Number((
|
|
397
|
+
E().tz(le).hour(Number((me = U.end) == null ? void 0 : me.hour)).minute(Number((ge = U.end) == null ? void 0 : ge.minute)).endOf("minutes").toISOString()
|
|
398
398
|
],
|
|
399
399
|
businessIds: Q.value,
|
|
400
400
|
restaurantIds: se,
|
|
401
401
|
warehouseIds: x,
|
|
402
402
|
timezone: le,
|
|
403
|
-
skipStringSpaceGrouping: !!(
|
|
404
|
-
reportId:
|
|
405
|
-
queryDatasource:
|
|
403
|
+
skipStringSpaceGrouping: !!(v != null && v.batch) || bt(v),
|
|
404
|
+
reportId: v == null ? void 0 : v.id,
|
|
405
|
+
queryDatasource: na(v)
|
|
406
406
|
},
|
|
407
407
|
requestConfig: {
|
|
408
408
|
timeout: 1e3 * 60 * 5,
|
|
409
|
-
signal:
|
|
409
|
+
signal: a
|
|
410
410
|
},
|
|
411
411
|
// A query is a read: a 502/503/504 from the gateway is safe to re-send.
|
|
412
412
|
retry: 2
|
|
413
413
|
};
|
|
414
414
|
return await tl([() => $e.fetch(ce)], 2e3);
|
|
415
|
-
},
|
|
415
|
+
}, Wa = async ({
|
|
416
416
|
widget: l,
|
|
417
|
-
signal:
|
|
417
|
+
signal: a,
|
|
418
418
|
tileId: s,
|
|
419
419
|
scopedDateRange: r,
|
|
420
|
-
scopedCompareDateRange:
|
|
420
|
+
scopedCompareDateRange: m
|
|
421
421
|
}) => {
|
|
422
|
-
var
|
|
423
|
-
const { scopePath: p, requestBusinessIds: f } = oe(ke()), { currentReport: F, editingReport:
|
|
422
|
+
var C, W, ne, U;
|
|
423
|
+
const { scopePath: p, requestBusinessIds: f } = oe(ke()), { currentReport: F, editingReport: b, overviewReport: u } = Me(), { selectedNavigationTab: L, isEditorRoute: Q } = je(), _ = wt({
|
|
424
424
|
selectedNavigationTab: L,
|
|
425
425
|
isEditorRoute: Q,
|
|
426
426
|
overviewReport: u,
|
|
427
|
-
editingReport:
|
|
427
|
+
editingReport: b,
|
|
428
428
|
currentReport: F
|
|
429
|
-
}), O = Je(L), { restaurants: S, warehouses: c, dateRange:
|
|
429
|
+
}), O = Je(L), { restaurants: S, warehouses: c, dateRange: d, compareDateRange: v, timeRange: y, timezone: N } = Pe(), { globalFilters: R } = Ge();
|
|
430
430
|
if (S.length === 0 && c.length === 0)
|
|
431
431
|
return { totalBytesProcessed: 0 };
|
|
432
|
-
const H = r ??
|
|
432
|
+
const H = r ?? d, z = m ?? v;
|
|
433
433
|
if (!Ke({
|
|
434
434
|
report: _,
|
|
435
435
|
pageSubject: O,
|
|
436
436
|
dateRange: H,
|
|
437
437
|
compareDateRange: z,
|
|
438
|
-
timezone:
|
|
438
|
+
timezone: N
|
|
439
439
|
}))
|
|
440
440
|
return { totalBytesProcessed: 0 };
|
|
441
441
|
const q = S.map((K) => K.id), ee = c.map((K) => K.id), le = Qe(l, R, s ?? ""), Z = {
|
|
@@ -446,54 +446,54 @@ const rn = async ({
|
|
|
446
446
|
dateRange: [H.startDate, H.endDate],
|
|
447
447
|
compareDateRange: z.startDate && z.endDate ? [z.startDate, z.endDate] : void 0,
|
|
448
448
|
timeRange: [
|
|
449
|
-
E().tz(
|
|
450
|
-
E().tz(
|
|
449
|
+
E().tz(N).hour(Number((C = y.start) == null ? void 0 : C.hour)).minute(Number((W = y.start) == null ? void 0 : W.minute)).toISOString(),
|
|
450
|
+
E().tz(N).hour(Number((ne = y.end) == null ? void 0 : ne.hour)).minute(Number((U = y.end) == null ? void 0 : U.minute)).endOf("minutes").toISOString()
|
|
451
451
|
],
|
|
452
452
|
businessIds: f.value,
|
|
453
453
|
restaurantIds: q,
|
|
454
454
|
warehouseIds: ee,
|
|
455
|
-
timezone:
|
|
455
|
+
timezone: N,
|
|
456
456
|
skipStringSpaceGrouping: !1,
|
|
457
457
|
reportId: _ == null ? void 0 : _.id,
|
|
458
|
-
queryDatasource:
|
|
458
|
+
queryDatasource: nt.BigQuery
|
|
459
459
|
},
|
|
460
460
|
requestConfig: {
|
|
461
461
|
timeout: 1e3 * 60,
|
|
462
|
-
signal:
|
|
462
|
+
signal: a
|
|
463
463
|
}
|
|
464
464
|
};
|
|
465
465
|
return $e.fetch(Z);
|
|
466
|
-
},
|
|
466
|
+
}, oa = async ({
|
|
467
467
|
widget: l,
|
|
468
|
-
signal:
|
|
468
|
+
signal: a,
|
|
469
469
|
tileId: s,
|
|
470
470
|
scopedLocationIds: r,
|
|
471
|
-
scopedTimeRange:
|
|
471
|
+
scopedTimeRange: m,
|
|
472
472
|
scopedDateRange: p,
|
|
473
473
|
scopedGlobalFilters: f,
|
|
474
474
|
page: F,
|
|
475
|
-
pageRead:
|
|
475
|
+
pageRead: b,
|
|
476
476
|
search: u
|
|
477
477
|
}) => {
|
|
478
|
-
var
|
|
479
|
-
const { scopePath: L, requestBusinessIds: Q, country: _ } = oe(ke()), { currentReport: O, editingReport: S, overviewReport: c } = Me(), { selectedNavigationTab:
|
|
480
|
-
selectedNavigationTab:
|
|
481
|
-
isEditorRoute:
|
|
478
|
+
var me, ge, ae, P;
|
|
479
|
+
const { scopePath: L, requestBusinessIds: Q, country: _ } = oe(ke()), { currentReport: O, editingReport: S, overviewReport: c } = Me(), { selectedNavigationTab: d, isEditorRoute: v } = je(), y = wt({
|
|
480
|
+
selectedNavigationTab: d,
|
|
481
|
+
isEditorRoute: v,
|
|
482
482
|
overviewReport: c,
|
|
483
483
|
editingReport: S,
|
|
484
484
|
currentReport: O
|
|
485
|
-
}),
|
|
486
|
-
if (
|
|
487
|
-
return
|
|
485
|
+
}), N = Je(d);
|
|
486
|
+
if (bt(y))
|
|
487
|
+
return ra({
|
|
488
488
|
widget: l,
|
|
489
|
-
signal:
|
|
489
|
+
signal: a,
|
|
490
490
|
tileId: s,
|
|
491
491
|
scopedLocationIds: r,
|
|
492
|
-
scopedTimeRange:
|
|
492
|
+
scopedTimeRange: m,
|
|
493
493
|
scopedDateRange: p,
|
|
494
494
|
scopedGlobalFilters: f,
|
|
495
495
|
page: F,
|
|
496
|
-
pageRead:
|
|
496
|
+
pageRead: b,
|
|
497
497
|
search: u
|
|
498
498
|
});
|
|
499
499
|
const {
|
|
@@ -504,21 +504,21 @@ const rn = async ({
|
|
|
504
504
|
compareDateRange: ee,
|
|
505
505
|
timeRange: le,
|
|
506
506
|
timezone: Z,
|
|
507
|
-
restaurants:
|
|
507
|
+
restaurants: C,
|
|
508
508
|
warehouses: W
|
|
509
|
-
} = Pe(), { globalFilters:
|
|
509
|
+
} = Pe(), { globalFilters: ne } = Ge();
|
|
510
510
|
if (z.length === 0)
|
|
511
511
|
return null;
|
|
512
|
-
const U = p ?? q, K =
|
|
512
|
+
const U = p ?? q, K = m ?? le, se = f ?? ne;
|
|
513
513
|
if (!Ke({
|
|
514
514
|
report: y,
|
|
515
|
-
pageSubject:
|
|
515
|
+
pageSubject: N,
|
|
516
516
|
dateRange: U,
|
|
517
517
|
compareDateRange: ee,
|
|
518
518
|
timezone: Z
|
|
519
519
|
}))
|
|
520
520
|
return null;
|
|
521
|
-
const x = (r == null ? void 0 : r.filter((Te) =>
|
|
521
|
+
const x = (r == null ? void 0 : r.filter((Te) => C.some((de) => de.id === Te))) ?? R, k = (r == null ? void 0 : r.filter((Te) => W.some((de) => de.id === Te))) ?? H, ce = Qe(l, se, s ?? ""), ue = {
|
|
522
522
|
fetchType: Oe.Post,
|
|
523
523
|
url: `/${L.value}/postgres-query`,
|
|
524
524
|
data: gt.getQueryRequests({
|
|
@@ -526,25 +526,25 @@ const rn = async ({
|
|
|
526
526
|
dateRange: [U.startDate, U.endDate],
|
|
527
527
|
compareDateRange: ee.startDate && ee.endDate ? [ee.startDate, ee.endDate] : void 0,
|
|
528
528
|
timeRange: [
|
|
529
|
-
E().tz(Z).hour(Number((
|
|
530
|
-
E().tz(Z).hour(Number((
|
|
529
|
+
E().tz(Z).hour(Number((me = K.start) == null ? void 0 : me.hour)).minute(Number((ge = K.start) == null ? void 0 : ge.minute)).toISOString(),
|
|
530
|
+
E().tz(Z).hour(Number((ae = K.end) == null ? void 0 : ae.hour)).minute(Number((P = K.end) == null ? void 0 : P.minute)).endOf("minutes").toISOString()
|
|
531
531
|
],
|
|
532
532
|
businessIds: Q.value,
|
|
533
533
|
restaurantIds: x,
|
|
534
534
|
warehouseIds: k,
|
|
535
535
|
timezone: Z
|
|
536
|
-
}).map((Te,
|
|
537
|
-
const Be =
|
|
536
|
+
}).map((Te, de) => {
|
|
537
|
+
const Be = de === 0 ? 3e3 : 12e3;
|
|
538
538
|
return {
|
|
539
539
|
...Te,
|
|
540
540
|
limit: x.length > 50 ? l.config.limit || Be : l.config.limit,
|
|
541
|
-
skipStringSpaceGrouping: !!(y != null && y.batch) ||
|
|
541
|
+
skipStringSpaceGrouping: !!(y != null && y.batch) || bt(y),
|
|
542
542
|
reportId: y == null ? void 0 : y.id
|
|
543
543
|
};
|
|
544
544
|
}),
|
|
545
545
|
requestConfig: {
|
|
546
546
|
timeout: 1e3 * 60 * 5,
|
|
547
|
-
signal:
|
|
547
|
+
signal: a
|
|
548
548
|
}
|
|
549
549
|
}, re = [() => $e.fetch(ue)];
|
|
550
550
|
R.length < 50 && re.push(() => $e.fetch(ue)), re.push(() => $e.fetch(ue));
|
|
@@ -555,20 +555,20 @@ const rn = async ({
|
|
|
555
555
|
country: _.value,
|
|
556
556
|
timezone: Z
|
|
557
557
|
})).data;
|
|
558
|
-
},
|
|
558
|
+
}, Ua = async ({
|
|
559
559
|
fileType: l,
|
|
560
|
-
index:
|
|
560
|
+
index: a,
|
|
561
561
|
orientationTypes: s,
|
|
562
562
|
isCombinedLocationLayout: r,
|
|
563
|
-
locationIds:
|
|
563
|
+
locationIds: m,
|
|
564
564
|
timeRange: p,
|
|
565
565
|
dateRange: f,
|
|
566
566
|
globalFilters: F
|
|
567
567
|
}) => {
|
|
568
|
-
const { scopePath:
|
|
569
|
-
let H =
|
|
570
|
-
y === "overview" &&
|
|
571
|
-
const q = y === "overview" &&
|
|
568
|
+
const { scopePath: b, requestBusinessIds: u } = oe(ke()), L = Pe(), { compareDateRange: Q } = oe(L), { restaurants: _, warehouses: O, timezone: S } = L, { globalFilters: c } = Ge(), { currentReport: d, overviewReport: v } = Me(), { selectedNavigationTab: y } = je(), { getTileSorts: N } = Zt(), { getTileSearch: R } = Zl();
|
|
569
|
+
let H = d == null ? void 0 : d.id, z = Ue(d == null ? void 0 : d.tiles);
|
|
570
|
+
y === "overview" && v && (H = v == null ? void 0 : v.id, z = Ue(v == null ? void 0 : v.tiles));
|
|
571
|
+
const q = y === "overview" && v ? v : d, ee = Je(y);
|
|
572
572
|
if (!Ke({
|
|
573
573
|
report: q,
|
|
574
574
|
pageSubject: ee,
|
|
@@ -577,37 +577,37 @@ const rn = async ({
|
|
|
577
577
|
timezone: S
|
|
578
578
|
}))
|
|
579
579
|
return;
|
|
580
|
-
const le = F ?? c, Z = z.filter((x, k) => typeof
|
|
580
|
+
const le = F ?? c, Z = z.filter((x, k) => typeof a == "number" ? k === a : !0).map((x) => Qe(x.widget, le, x.id)), C = {
|
|
581
581
|
fetchType: Oe.Post,
|
|
582
|
-
url: `/${
|
|
582
|
+
url: `/${b.value}/file?lang=${xe()}`,
|
|
583
583
|
data: {
|
|
584
584
|
configs: [
|
|
585
585
|
...Z.map((x, k) => {
|
|
586
|
-
var re, Fe,
|
|
587
|
-
const ce = R(
|
|
586
|
+
var re, Fe, me, ge;
|
|
587
|
+
const ce = R(a ?? k), ue = gt.getQueryRequests({
|
|
588
588
|
widget: x,
|
|
589
589
|
dateRange: [f.startDate, f.endDate],
|
|
590
590
|
compareDateRange: Q.value.startDate && Q.value.endDate ? [Q.value.startDate, Q.value.endDate] : void 0,
|
|
591
591
|
timeRange: [
|
|
592
592
|
E().tz(S).set("hour", Number((re = p.start) == null ? void 0 : re.hour)).set("minute", Number((Fe = p.start) == null ? void 0 : Fe.minute)).toISOString(),
|
|
593
|
-
E().tz(S).set("hour", Number((
|
|
593
|
+
E().tz(S).set("hour", Number((me = p.end) == null ? void 0 : me.hour)).set("minute", Number((ge = p.end) == null ? void 0 : ge.minute)).toISOString()
|
|
594
594
|
],
|
|
595
595
|
businessIds: u.value,
|
|
596
|
-
restaurantIds:
|
|
597
|
-
(
|
|
596
|
+
restaurantIds: m.filter(
|
|
597
|
+
(ae) => _.find((P) => P.id === ae)
|
|
598
598
|
),
|
|
599
|
-
warehouseIds:
|
|
600
|
-
(
|
|
599
|
+
warehouseIds: m.filter(
|
|
600
|
+
(ae) => O.find((P) => P.id === ae)
|
|
601
601
|
),
|
|
602
602
|
timezone: S
|
|
603
603
|
});
|
|
604
604
|
return {
|
|
605
605
|
// Every request, like the query API's search; the file service filters it in memory.
|
|
606
|
-
requests: ce ? ue.map((
|
|
607
|
-
index:
|
|
606
|
+
requests: ce ? ue.map((ae) => ({ ...ae, search: ce })) : ue,
|
|
607
|
+
index: a || k,
|
|
608
608
|
drillDimension: null,
|
|
609
609
|
...el(x),
|
|
610
|
-
globalSorts:
|
|
610
|
+
globalSorts: N(a ?? k)
|
|
611
611
|
};
|
|
612
612
|
})
|
|
613
613
|
],
|
|
@@ -620,20 +620,20 @@ const rn = async ({
|
|
|
620
620
|
responseType: "arraybuffer",
|
|
621
621
|
timeout: 1e3 * 60 * 60 * 24
|
|
622
622
|
}
|
|
623
|
-
}, { headers: W, data:
|
|
623
|
+
}, { headers: W, data: ne } = await St.rawFetch(C), U = W["content-disposition"].split("filename=")[1].replaceAll('"', ""), K = window.URL.createObjectURL(new Blob([new Uint8Array(ne).buffer])), se = document.createElement("a");
|
|
624
624
|
se.href = K, se.setAttribute("download", decodeURIComponent(U)), document.body.appendChild(se), se.click(), se.remove();
|
|
625
|
-
},
|
|
625
|
+
}, ja = async ({
|
|
626
626
|
emails: l,
|
|
627
|
-
types:
|
|
627
|
+
types: a,
|
|
628
628
|
dateRange: s,
|
|
629
629
|
timeRange: r,
|
|
630
|
-
locationIds:
|
|
630
|
+
locationIds: m,
|
|
631
631
|
orientationTypes: p,
|
|
632
632
|
isCombinedLocationLayout: f,
|
|
633
633
|
attachFiles: F,
|
|
634
|
-
globalFilters:
|
|
634
|
+
globalFilters: b
|
|
635
635
|
}) => {
|
|
636
|
-
const { businessId: u, scopePath: L, requestBusinessIds: Q } = oe(ke()), { currentReport: _, overviewReport: O } = Me(), { selectedNavigationTab: S } = je(), c = Pe(), { compareDateRange:
|
|
636
|
+
const { businessId: u, scopePath: L, requestBusinessIds: Q } = oe(ke()), { currentReport: _, overviewReport: O } = Me(), { selectedNavigationTab: S } = je(), c = Pe(), { compareDateRange: d } = oe(c), { restaurants: v, warehouses: y, timezone: N } = c, { globalFilters: R } = Ge(), { getTileSorts: H } = Zt();
|
|
637
637
|
if (l.length === 0) {
|
|
638
638
|
console.error("No email addresses provided.");
|
|
639
639
|
return;
|
|
@@ -645,11 +645,11 @@ const rn = async ({
|
|
|
645
645
|
report: le,
|
|
646
646
|
pageSubject: Z,
|
|
647
647
|
dateRange: s,
|
|
648
|
-
compareDateRange:
|
|
649
|
-
timezone:
|
|
648
|
+
compareDateRange: d.value,
|
|
649
|
+
timezone: N
|
|
650
650
|
}))
|
|
651
651
|
return;
|
|
652
|
-
const
|
|
652
|
+
const C = b ?? R, W = ee.map((U) => Qe(U.widget, C, U.id)), ne = {
|
|
653
653
|
businessId: u.value || void 0,
|
|
654
654
|
status: Ht.generating,
|
|
655
655
|
dateRange: {
|
|
@@ -664,19 +664,19 @@ const rn = async ({
|
|
|
664
664
|
requests: gt.getQueryRequests({
|
|
665
665
|
widget: U,
|
|
666
666
|
dateRange: [s.startDate, s.endDate],
|
|
667
|
-
compareDateRange:
|
|
667
|
+
compareDateRange: d.value.startDate && d.value.endDate ? [d.value.startDate, d.value.endDate] : void 0,
|
|
668
668
|
timeRange: [
|
|
669
|
-
E().tz(
|
|
670
|
-
E().tz(
|
|
669
|
+
E().tz(N).hour(Number((se = r.start) == null ? void 0 : se.hour)).minute(Number((x = r.start) == null ? void 0 : x.minute)).toISOString(),
|
|
670
|
+
E().tz(N).hour(Number((k = r.end) == null ? void 0 : k.hour)).minute(Number((ce = r.end) == null ? void 0 : ce.minute)).endOf("minutes").toISOString()
|
|
671
671
|
],
|
|
672
672
|
businessIds: Q.value,
|
|
673
|
-
restaurantIds:
|
|
674
|
-
(ue) =>
|
|
673
|
+
restaurantIds: m.filter(
|
|
674
|
+
(ue) => v.find((re) => re.id === ue)
|
|
675
675
|
),
|
|
676
|
-
warehouseIds:
|
|
676
|
+
warehouseIds: m.filter(
|
|
677
677
|
(ue) => y.find((re) => re.id === ue)
|
|
678
678
|
),
|
|
679
|
-
timezone:
|
|
679
|
+
timezone: N
|
|
680
680
|
}),
|
|
681
681
|
index: K,
|
|
682
682
|
drillDimension: null,
|
|
@@ -685,7 +685,7 @@ const rn = async ({
|
|
|
685
685
|
};
|
|
686
686
|
}),
|
|
687
687
|
reportId: z,
|
|
688
|
-
type:
|
|
688
|
+
type: a,
|
|
689
689
|
orientationTypes: p,
|
|
690
690
|
isCombinedLocationLayout: f,
|
|
691
691
|
attachFiles: F
|
|
@@ -693,73 +693,73 @@ const rn = async ({
|
|
|
693
693
|
await St.fetch({
|
|
694
694
|
fetchType: Oe.Post,
|
|
695
695
|
url: `/${L.value}/reports/email?lang=${xe()}`,
|
|
696
|
-
data:
|
|
696
|
+
data: ne,
|
|
697
697
|
requestConfig: { timeout: 1e3 * 60 * 3 }
|
|
698
698
|
});
|
|
699
|
-
},
|
|
700
|
-
const { scopePath:
|
|
699
|
+
}, Qa = async (l) => {
|
|
700
|
+
const { scopePath: a } = oe(ke());
|
|
701
701
|
await St.fetch({
|
|
702
702
|
fetchType: Oe.Post,
|
|
703
|
-
url: `/${
|
|
703
|
+
url: `/${a.value}/reports/resend-email?lang=${xe()}`,
|
|
704
704
|
data: { jobId: l },
|
|
705
705
|
requestConfig: { timeout: 1e3 * 60 * 3 }
|
|
706
706
|
});
|
|
707
|
-
},
|
|
707
|
+
}, Ka = async () => {
|
|
708
708
|
const { scopePath: l } = oe(ke());
|
|
709
709
|
return await $e.fetch({
|
|
710
710
|
fetchType: Oe.Get,
|
|
711
711
|
url: `/${l.value}/reports/email-recipients`
|
|
712
712
|
});
|
|
713
|
-
},
|
|
714
|
-
const { scopePath:
|
|
713
|
+
}, Ja = async (l) => {
|
|
714
|
+
const { scopePath: a } = oe(ke());
|
|
715
715
|
await $e.fetch({
|
|
716
716
|
fetchType: Oe.Post,
|
|
717
|
-
url: `/${
|
|
717
|
+
url: `/${a.value}/reports/email-recipient/delete`,
|
|
718
718
|
data: { email: l }
|
|
719
719
|
});
|
|
720
|
-
},
|
|
721
|
-
const l = ye({}),
|
|
720
|
+
}, ia = "mf-reportwidget-result-store", ua = Ft(ia, () => {
|
|
721
|
+
const l = ye({}), a = ye(0), s = Se(() => a.value === 0);
|
|
722
722
|
function r() {
|
|
723
|
-
|
|
723
|
+
a.value += 1;
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
|
|
725
|
+
function m() {
|
|
726
|
+
a.value = Math.max(0, a.value - 1);
|
|
727
727
|
}
|
|
728
|
-
function p(
|
|
729
|
-
if (
|
|
728
|
+
function p(b, u) {
|
|
729
|
+
if (b)
|
|
730
730
|
if (u === null)
|
|
731
|
-
l.value[
|
|
731
|
+
l.value[b] = [];
|
|
732
732
|
else {
|
|
733
|
-
const L = l.value[
|
|
734
|
-
l.value[
|
|
733
|
+
const L = l.value[b] ?? [];
|
|
734
|
+
l.value[b] = Array.from(/* @__PURE__ */ new Set([...L, ...u]));
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
|
-
function f(
|
|
738
|
-
return
|
|
737
|
+
function f(b) {
|
|
738
|
+
return b ? l.value[b] ?? [] : [];
|
|
739
739
|
}
|
|
740
740
|
function F() {
|
|
741
741
|
l.value = {};
|
|
742
742
|
}
|
|
743
743
|
return {
|
|
744
744
|
widgetResults: l,
|
|
745
|
-
widgetResultLoadingCount:
|
|
745
|
+
widgetResultLoadingCount: a,
|
|
746
746
|
isAllWidgetResultLoaded: s,
|
|
747
747
|
startWidgetResultLoading: r,
|
|
748
|
-
finishWidgetResultLoading:
|
|
748
|
+
finishWidgetResultLoading: m,
|
|
749
749
|
setWidgetResult: p,
|
|
750
750
|
getWidgetResult: f,
|
|
751
751
|
clearAllWidgetResults: F
|
|
752
752
|
};
|
|
753
|
-
}), Ut = (l,
|
|
753
|
+
}), Ut = (l, a = "en") => E().set("hour", l.hour).set("minute", l.minute).locale(a).format("h:mm A"), ca = (l, a) => {
|
|
754
754
|
const s = E().set("hour", l.hour).set("minute", l.minute);
|
|
755
|
-
return E().set("hour",
|
|
755
|
+
return E().set("hour", a.hour).set("minute", a.minute) < s ? "+1" : "";
|
|
756
756
|
};
|
|
757
|
-
function jt(l,
|
|
758
|
-
return l.isSystem ?
|
|
757
|
+
function jt(l, a) {
|
|
758
|
+
return l.isSystem ? a("reportV5.reportHour.fullDay") : l.name;
|
|
759
759
|
}
|
|
760
|
-
const
|
|
760
|
+
const ma = { class: "px-24 py-16 rounded-lg shadow-light-300" }, da = { class: "text-fm-color-typo-primary" }, pa = { class: "text-fm-color-typo-secondary" }, fa = { class: "fm-typo-en-body-lg-600 mb-8" }, ha = { class: "flex items-center justify-center w-full" }, va = { class: "fm-typo-en-body-lg-600 mb-8" }, ba = { class: "flex items-center justify-center" }, ya = { class: "flex flex-row mb-4 px-4 gap-2" }, ga = /* @__PURE__ */ yt({
|
|
761
761
|
__name: "TimeRangeSelect",
|
|
762
|
-
props: /* @__PURE__ */
|
|
762
|
+
props: /* @__PURE__ */ rt({
|
|
763
763
|
defaultDateRange: {
|
|
764
764
|
type: Array,
|
|
765
765
|
default: () => [
|
|
@@ -797,32 +797,32 @@ const mn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, pn = { class: "
|
|
|
797
797
|
},
|
|
798
798
|
selectTimeDefaultModifiers: {}
|
|
799
799
|
}),
|
|
800
|
-
emits: /* @__PURE__ */
|
|
801
|
-
setup(l, { emit:
|
|
802
|
-
const { t: s, locale: r } = Yt(),
|
|
800
|
+
emits: /* @__PURE__ */ rt(["update", "chip-closed"], ["update:timeRange", "update:selectTimeDefault"]),
|
|
801
|
+
setup(l, { emit: a }) {
|
|
802
|
+
const { t: s, locale: r } = Yt(), m = ft(l, "timeRange"), p = a, f = ft(l, "selectTimeDefault");
|
|
803
803
|
function F(S) {
|
|
804
|
-
S && (
|
|
804
|
+
S && (m.value = S, p("update", m.value)), Q.value = !1;
|
|
805
805
|
}
|
|
806
|
-
function
|
|
807
|
-
const c = S.split(":"),
|
|
806
|
+
function b(S) {
|
|
807
|
+
const c = S.split(":"), d = E().set("hour", Number(c[0])).set("minute", Number(c[1]));
|
|
808
808
|
return {
|
|
809
|
-
hours: Number(
|
|
810
|
-
minutes: Number(
|
|
811
|
-
period:
|
|
809
|
+
hours: Number(d.format("h")),
|
|
810
|
+
minutes: Number(d.format("m")),
|
|
811
|
+
period: d.format("A")
|
|
812
812
|
};
|
|
813
813
|
}
|
|
814
|
-
const u = ye(JSON.parse(JSON.stringify(
|
|
814
|
+
const u = ye(JSON.parse(JSON.stringify(m.value)));
|
|
815
815
|
function L(S, c) {
|
|
816
816
|
u.value.start = JSON.parse(JSON.stringify(S)), u.value.end = JSON.parse(JSON.stringify(c));
|
|
817
817
|
}
|
|
818
818
|
Ae(
|
|
819
|
-
() => [
|
|
819
|
+
() => [m.value, l.defaultDateRange],
|
|
820
820
|
() => {
|
|
821
|
-
if (
|
|
821
|
+
if (m.value) {
|
|
822
822
|
const S = l.defaultDateRange.findIndex(
|
|
823
823
|
(c) => {
|
|
824
|
-
var
|
|
825
|
-
return c.startTime.hour === ((
|
|
824
|
+
var d, v, y, N;
|
|
825
|
+
return c.startTime.hour === ((d = m.value.start) == null ? void 0 : d.hour) && c.startTime.minute === ((v = m.value.start) == null ? void 0 : v.minute) && c.endTime.hour === ((y = m.value.end) == null ? void 0 : y.hour) && c.endTime.minute === ((N = m.value.end) == null ? void 0 : N.minute);
|
|
826
826
|
}
|
|
827
827
|
) + 1;
|
|
828
828
|
S !== 0 ? f.value = S : f.value = l.defaultDateRange.length + 1;
|
|
@@ -835,12 +835,12 @@ const mn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, pn = { class: "
|
|
|
835
835
|
p("chip-closed", S);
|
|
836
836
|
}
|
|
837
837
|
const O = Se(() => l.label ? l.label : Kt({
|
|
838
|
-
startTime:
|
|
839
|
-
endTime:
|
|
838
|
+
startTime: m.value.start,
|
|
839
|
+
endTime: m.value.end,
|
|
840
840
|
locale: r.value
|
|
841
841
|
}));
|
|
842
842
|
return (S, c) => {
|
|
843
|
-
const
|
|
843
|
+
const d = te("FmChip"), v = te("FmRadio"), y = te("FmMenuDivider"), N = te("FmRadioGroup"), R = te("FmTimeInput"), H = te("FmButton"), z = te("FmPopover");
|
|
844
844
|
return X(), he("div", null, [
|
|
845
845
|
M(z, {
|
|
846
846
|
"show-popover": Q.value,
|
|
@@ -858,35 +858,35 @@ const mn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, pn = { class: "
|
|
|
858
858
|
default: ie(() => {
|
|
859
859
|
var q, ee, le, Z;
|
|
860
860
|
return [
|
|
861
|
-
Y("div",
|
|
862
|
-
M(
|
|
861
|
+
Y("div", ma, [
|
|
862
|
+
M(N, {
|
|
863
863
|
modelValue: f.value,
|
|
864
|
-
"onUpdate:modelValue": c[1] || (c[1] = (
|
|
864
|
+
"onUpdate:modelValue": c[1] || (c[1] = (C) => f.value = C)
|
|
865
865
|
}, {
|
|
866
866
|
default: ie(() => [
|
|
867
|
-
(X(!0), he(Le, null,
|
|
867
|
+
(X(!0), he(Le, null, ht(l.defaultDateRange, (C, W) => (X(), De(v, {
|
|
868
868
|
key: `range_${W}`,
|
|
869
869
|
value: W + 1,
|
|
870
|
-
label: D(jt)(
|
|
871
|
-
onClick: (
|
|
870
|
+
label: D(jt)(C, D(s)),
|
|
871
|
+
onClick: (ne) => L(C.startTime, C.endTime)
|
|
872
872
|
}, {
|
|
873
873
|
label: ie(() => [
|
|
874
|
-
Y("p",
|
|
875
|
-
|
|
876
|
-
$l(M(
|
|
874
|
+
Y("p", da, [
|
|
875
|
+
st(be(D(jt)(C, D(s))) + " ", 1),
|
|
876
|
+
$l(M(d, {
|
|
877
877
|
label: D(s)("report.common.default"),
|
|
878
878
|
class: "bg-fm-color-system-info-100 border-fm-color-typo-info text-fm-color-typo-info",
|
|
879
879
|
compact: ""
|
|
880
880
|
}, null, 8, ["label"]), [
|
|
881
|
-
[Gl,
|
|
881
|
+
[Gl, C.isDefault]
|
|
882
882
|
])
|
|
883
883
|
]),
|
|
884
|
-
Y("p",
|
|
884
|
+
Y("p", pa, be(D(Ut)(C.startTime, D(xe)())) + " - " + be(D(Ut)(C.endTime, D(xe)())) + " " + be(D(ca)(C.startTime, C.endTime)), 1)
|
|
885
885
|
]),
|
|
886
886
|
_: 2
|
|
887
887
|
}, 1032, ["value", "label", "onClick"]))), 128)),
|
|
888
888
|
M(y),
|
|
889
|
-
M(
|
|
889
|
+
M(v, {
|
|
890
890
|
key: "range_custom",
|
|
891
891
|
label: D(s)("report.common.custom"),
|
|
892
892
|
value: l.defaultDateRange.length + 1
|
|
@@ -895,13 +895,13 @@ const mn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, pn = { class: "
|
|
|
895
895
|
_: 1
|
|
896
896
|
}, 8, ["modelValue"]),
|
|
897
897
|
f.value === l.defaultDateRange.length + 1 ? (X(), he(Le, { key: 0 }, [
|
|
898
|
-
Y("p",
|
|
899
|
-
Y("div",
|
|
898
|
+
Y("p", fa, be(D(s)("report.date.startingTime")), 1),
|
|
899
|
+
Y("div", ha, [
|
|
900
900
|
M(R, {
|
|
901
|
-
"model-value":
|
|
902
|
-
"onUpdate:modelValue": c[2] || (c[2] = (
|
|
901
|
+
"model-value": b(`${(q = u.value.start) == null ? void 0 : q.hour}:${(ee = u.value.start) == null ? void 0 : ee.minute}`),
|
|
902
|
+
"onUpdate:modelValue": c[2] || (c[2] = (C) => {
|
|
903
903
|
if (u.value.start) {
|
|
904
|
-
const W = D(E)(`${
|
|
904
|
+
const W = D(E)(`${C.hours}:${C.minutes} ${C.period}`, "h:m A").locale(
|
|
905
905
|
D(xe)()
|
|
906
906
|
);
|
|
907
907
|
u.value.start.hour = W.get("hour"), u.value.start.minute = W.get("minute");
|
|
@@ -909,13 +909,13 @@ const mn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, pn = { class: "
|
|
|
909
909
|
})
|
|
910
910
|
}, null, 8, ["model-value"])
|
|
911
911
|
]),
|
|
912
|
-
Y("p",
|
|
913
|
-
Y("div",
|
|
912
|
+
Y("p", va, be(D(s)("report.date.endingTime")), 1),
|
|
913
|
+
Y("div", ba, [
|
|
914
914
|
M(R, {
|
|
915
|
-
"model-value":
|
|
916
|
-
"onUpdate:modelValue": c[3] || (c[3] = (
|
|
915
|
+
"model-value": b(`${(le = u.value.end) == null ? void 0 : le.hour}:${(Z = u.value.end) == null ? void 0 : Z.minute}`),
|
|
916
|
+
"onUpdate:modelValue": c[3] || (c[3] = (C) => {
|
|
917
917
|
if (u.value.end) {
|
|
918
|
-
const W = D(E)(`${
|
|
918
|
+
const W = D(E)(`${C.hours}:${C.minutes} ${C.period}`, "h:m A").locale(
|
|
919
919
|
D(xe)()
|
|
920
920
|
);
|
|
921
921
|
u.value.end.hour = W.get("hour"), u.value.end.minute = W.get("minute");
|
|
@@ -923,13 +923,13 @@ const mn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, pn = { class: "
|
|
|
923
923
|
})
|
|
924
924
|
}, null, 8, ["model-value"])
|
|
925
925
|
])
|
|
926
|
-
], 64)) :
|
|
927
|
-
Y("div",
|
|
926
|
+
], 64)) : vt("", !0),
|
|
927
|
+
Y("div", ya, [
|
|
928
928
|
c[7] || (c[7] = Y("div", { class: "grow" }, null, -1)),
|
|
929
929
|
M(H, {
|
|
930
930
|
label: D(s)("report.common.cancel"),
|
|
931
931
|
variant: "tertiary",
|
|
932
|
-
onClick: c[4] || (c[4] = (
|
|
932
|
+
onClick: c[4] || (c[4] = (C) => Q.value = !1)
|
|
933
933
|
}, null, 8, ["label"]),
|
|
934
934
|
M(H, {
|
|
935
935
|
label: D(s)("report.common.apply"),
|
|
@@ -944,9 +944,9 @@ const mn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, pn = { class: "
|
|
|
944
944
|
]);
|
|
945
945
|
};
|
|
946
946
|
}
|
|
947
|
-
}),
|
|
947
|
+
}), Ya = /* @__PURE__ */ yt({
|
|
948
948
|
__name: "BaseDialog",
|
|
949
|
-
props: /* @__PURE__ */
|
|
949
|
+
props: /* @__PURE__ */ rt({
|
|
950
950
|
title: {
|
|
951
951
|
type: String,
|
|
952
952
|
default: "Title"
|
|
@@ -963,20 +963,20 @@ const mn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, pn = { class: "
|
|
|
963
963
|
modelValue: { type: Boolean, required: !0 },
|
|
964
964
|
modelModifiers: {}
|
|
965
965
|
}),
|
|
966
|
-
emits: /* @__PURE__ */
|
|
967
|
-
setup(l, { emit:
|
|
968
|
-
const s = ft(l, "modelValue"), r = l,
|
|
966
|
+
emits: /* @__PURE__ */ rt(["confirm"], ["update:modelValue"]),
|
|
967
|
+
setup(l, { emit: a }) {
|
|
968
|
+
const s = ft(l, "modelValue"), r = l, m = a;
|
|
969
969
|
return Ae(s, () => {
|
|
970
970
|
s.value ? document.body.style.overflow = "hidden" : document.body.style.overflow = "scroll";
|
|
971
971
|
}), (p, f) => {
|
|
972
|
-
const F = te("FmButton"),
|
|
973
|
-
return X(), De(
|
|
972
|
+
const F = te("FmButton"), b = te("FmDialog");
|
|
973
|
+
return X(), De(b, {
|
|
974
974
|
modelValue: s.value,
|
|
975
975
|
"onUpdate:modelValue": f[2] || (f[2] = (u) => s.value = u),
|
|
976
976
|
overlay: ""
|
|
977
977
|
}, {
|
|
978
978
|
"dialog-header": ie(() => [
|
|
979
|
-
|
|
979
|
+
st(be(r.title), 1)
|
|
980
980
|
]),
|
|
981
981
|
default: ie(() => [
|
|
982
982
|
Qt(p.$slots, "content")
|
|
@@ -991,7 +991,7 @@ const mn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, pn = { class: "
|
|
|
991
991
|
M(F, {
|
|
992
992
|
label: r.primaryButtonLabel,
|
|
993
993
|
variant: "primary",
|
|
994
|
-
onClick: f[1] || (f[1] = (u) =>
|
|
994
|
+
onClick: f[1] || (f[1] = (u) => m("confirm"))
|
|
995
995
|
}, null, 8, ["label"])
|
|
996
996
|
]),
|
|
997
997
|
_: 3
|
|
@@ -1000,58 +1000,58 @@ const mn = { class: "px-24 py-16 rounded-lg shadow-light-300" }, pn = { class: "
|
|
|
1000
1000
|
}
|
|
1001
1001
|
});
|
|
1002
1002
|
var Ie = /* @__PURE__ */ ((l) => (l.Select = "Select", l.TextField = "TextField", l.Timestamp = "Timestamp", l))(Ie || {});
|
|
1003
|
-
function
|
|
1004
|
-
let
|
|
1003
|
+
function Sa(l) {
|
|
1004
|
+
let a = !1, s = 1;
|
|
1005
1005
|
switch (l) {
|
|
1006
1006
|
case j.Equal:
|
|
1007
1007
|
case j.NotEqual:
|
|
1008
1008
|
case j.Like:
|
|
1009
1009
|
case j.NotLike:
|
|
1010
|
-
|
|
1010
|
+
a = !1, s = 1;
|
|
1011
1011
|
break;
|
|
1012
1012
|
case j.GreaterThan:
|
|
1013
1013
|
case j.GreaterThanOrEqual:
|
|
1014
1014
|
case j.LessThan:
|
|
1015
1015
|
case j.LessThanOrEqual:
|
|
1016
|
-
|
|
1016
|
+
a = !0, s = 1;
|
|
1017
1017
|
break;
|
|
1018
1018
|
case j.Between:
|
|
1019
|
-
|
|
1019
|
+
a = !0, s = 2;
|
|
1020
1020
|
break;
|
|
1021
1021
|
}
|
|
1022
1022
|
return {
|
|
1023
|
-
fixed:
|
|
1023
|
+
fixed: a,
|
|
1024
1024
|
count: s
|
|
1025
1025
|
};
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1027
|
+
function Ha({
|
|
1028
1028
|
operator: l,
|
|
1029
|
-
dimensionOption:
|
|
1029
|
+
dimensionOption: a,
|
|
1030
1030
|
dataType: s,
|
|
1031
1031
|
t: r
|
|
1032
1032
|
}) {
|
|
1033
|
-
const { fixed:
|
|
1033
|
+
const { fixed: m, count: p } = Sa(l);
|
|
1034
1034
|
switch (s) {
|
|
1035
|
-
case
|
|
1035
|
+
case ve.String:
|
|
1036
1036
|
return {
|
|
1037
1037
|
type: "TextField",
|
|
1038
|
-
fixed:
|
|
1038
|
+
fixed: m,
|
|
1039
1039
|
count: p,
|
|
1040
1040
|
dataType: void 0,
|
|
1041
1041
|
default: ""
|
|
1042
1042
|
};
|
|
1043
|
-
case
|
|
1043
|
+
case ve.Numeric:
|
|
1044
1044
|
return {
|
|
1045
1045
|
type: "TextField",
|
|
1046
|
-
fixed:
|
|
1046
|
+
fixed: m,
|
|
1047
1047
|
count: p,
|
|
1048
1048
|
dataType: "number",
|
|
1049
1049
|
default: 0
|
|
1050
1050
|
};
|
|
1051
|
-
case
|
|
1051
|
+
case ve.Bool:
|
|
1052
1052
|
return {
|
|
1053
1053
|
type: "Select",
|
|
1054
|
-
fixed:
|
|
1054
|
+
fixed: m,
|
|
1055
1055
|
count: p,
|
|
1056
1056
|
options: [
|
|
1057
1057
|
{ label: r("report.common.yes"), value: !0 },
|
|
@@ -1059,23 +1059,23 @@ function Zn({
|
|
|
1059
1059
|
],
|
|
1060
1060
|
default: !0
|
|
1061
1061
|
};
|
|
1062
|
-
case
|
|
1062
|
+
case ve.Timestamp:
|
|
1063
1063
|
return ll({
|
|
1064
|
-
dimensionOption:
|
|
1065
|
-
fixed:
|
|
1064
|
+
dimensionOption: a,
|
|
1065
|
+
fixed: m,
|
|
1066
1066
|
count: p,
|
|
1067
1067
|
t: r
|
|
1068
1068
|
});
|
|
1069
1069
|
}
|
|
1070
1070
|
return {
|
|
1071
1071
|
type: "TextField",
|
|
1072
|
-
fixed:
|
|
1072
|
+
fixed: m,
|
|
1073
1073
|
count: p,
|
|
1074
1074
|
dataType: void 0,
|
|
1075
1075
|
default: ""
|
|
1076
1076
|
};
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1078
|
+
function Za(l) {
|
|
1079
1079
|
switch (l) {
|
|
1080
1080
|
case B.HourOfDay:
|
|
1081
1081
|
return 0;
|
|
@@ -1085,7 +1085,7 @@ function Xn(l) {
|
|
|
1085
1085
|
return;
|
|
1086
1086
|
}
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1088
|
+
function Xa(l) {
|
|
1089
1089
|
switch (l) {
|
|
1090
1090
|
case B.HourOfDay:
|
|
1091
1091
|
return 23;
|
|
@@ -1097,7 +1097,7 @@ function ea(l) {
|
|
|
1097
1097
|
}
|
|
1098
1098
|
function ll({
|
|
1099
1099
|
dimensionOption: l,
|
|
1100
|
-
fixed:
|
|
1100
|
+
fixed: a,
|
|
1101
1101
|
count: s,
|
|
1102
1102
|
t: r
|
|
1103
1103
|
}) {
|
|
@@ -1105,9 +1105,9 @@ function ll({
|
|
|
1105
1105
|
case B.HourOfDay:
|
|
1106
1106
|
return {
|
|
1107
1107
|
type: Ie.Select,
|
|
1108
|
-
fixed:
|
|
1108
|
+
fixed: a,
|
|
1109
1109
|
count: s,
|
|
1110
|
-
options: Array.from({ length: 24 }, (
|
|
1110
|
+
options: Array.from({ length: 24 }, (m, p) => ({
|
|
1111
1111
|
label: p.toString().padStart(2, "0"),
|
|
1112
1112
|
value: p.toString()
|
|
1113
1113
|
})),
|
|
@@ -1116,7 +1116,7 @@ function ll({
|
|
|
1116
1116
|
case B.DayOfWeek:
|
|
1117
1117
|
return {
|
|
1118
1118
|
type: Ie.Select,
|
|
1119
|
-
fixed:
|
|
1119
|
+
fixed: a,
|
|
1120
1120
|
count: s,
|
|
1121
1121
|
options: [
|
|
1122
1122
|
{ label: r("report.days.sunday"), value: "1" },
|
|
@@ -1132,9 +1132,9 @@ function ll({
|
|
|
1132
1132
|
case B.DayOfMonth:
|
|
1133
1133
|
return {
|
|
1134
1134
|
type: Ie.Select,
|
|
1135
|
-
fixed:
|
|
1135
|
+
fixed: a,
|
|
1136
1136
|
count: s,
|
|
1137
|
-
options: Array.from({ length: 31 }, (
|
|
1137
|
+
options: Array.from({ length: 31 }, (m, p) => ({
|
|
1138
1138
|
label: (p + 1).toString(),
|
|
1139
1139
|
value: (p + 1).toString()
|
|
1140
1140
|
})),
|
|
@@ -1143,7 +1143,7 @@ function ll({
|
|
|
1143
1143
|
case B.MonthOfYear:
|
|
1144
1144
|
return {
|
|
1145
1145
|
type: Ie.Select,
|
|
1146
|
-
fixed:
|
|
1146
|
+
fixed: a,
|
|
1147
1147
|
count: s,
|
|
1148
1148
|
options: [
|
|
1149
1149
|
{ label: r("report.months.january"), value: "1" },
|
|
@@ -1164,7 +1164,7 @@ function ll({
|
|
|
1164
1164
|
default:
|
|
1165
1165
|
return {
|
|
1166
1166
|
type: Ie.Timestamp,
|
|
1167
|
-
fixed:
|
|
1167
|
+
fixed: a,
|
|
1168
1168
|
count: s,
|
|
1169
1169
|
default: (/* @__PURE__ */ new Date()).toISOString()
|
|
1170
1170
|
};
|
|
@@ -1172,20 +1172,20 @@ function ll({
|
|
|
1172
1172
|
}
|
|
1173
1173
|
function pt({
|
|
1174
1174
|
dimensionOption: l,
|
|
1175
|
-
t:
|
|
1175
|
+
t: a
|
|
1176
1176
|
}) {
|
|
1177
1177
|
const s = ll({
|
|
1178
1178
|
dimensionOption: l,
|
|
1179
1179
|
fixed: !1,
|
|
1180
1180
|
count: 1,
|
|
1181
|
-
t:
|
|
1181
|
+
t: a
|
|
1182
1182
|
});
|
|
1183
|
-
return s.type !== Ie.Select ? [] : [{ label:
|
|
1183
|
+
return s.type !== Ie.Select ? [] : [{ label: a("report.input.unknown"), value: "" }, ...s.options];
|
|
1184
1184
|
}
|
|
1185
|
-
const
|
|
1185
|
+
const Fa = { class: "flex flex-row flex-wrap gap-2" }, wa = { class: "inline-flex max-w-[460px]" }, Da = {
|
|
1186
1186
|
key: 0,
|
|
1187
1187
|
class: "flex justify-center my-2"
|
|
1188
|
-
},
|
|
1188
|
+
}, Ta = { class: "px-2 pb-8" }, Va = { class: "flex-1 overflow-y-auto overflow-x-hidden" }, Ca = { class: "px-2 pb-8" }, Na = { class: "flex items-start w-full" }, ka = ["onClick"], Oa = { class: "fm-typo-en-body-md-400" }, _a = { key: 0 }, Ra = { class: "px-12 py-3" }, Aa = { class: "flex items-center justify-between" }, Ia = { class: "text-xs max-w-[200px]" }, xa = { class: "px-4 py-3 flex flex-row justify-end gap-2 bg-white" }, Ne = "__EMPTY__", we = "__NO_SELECTION__", en = /* @__PURE__ */ yt({
|
|
1189
1189
|
__name: "GlobalFilterSelect",
|
|
1190
1190
|
props: {
|
|
1191
1191
|
globalFilterId: {},
|
|
@@ -1197,63 +1197,63 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1197
1197
|
isDialogGlobalFilter: { type: Boolean }
|
|
1198
1198
|
},
|
|
1199
1199
|
setup(l) {
|
|
1200
|
-
const
|
|
1201
|
-
let { timeRange: f, dateRange: F, selectedLocationIds:
|
|
1200
|
+
const a = l, { t: s, locale: r } = Yt(), { currentReport: m, editingTile: p } = oe(Me());
|
|
1201
|
+
let { timeRange: f, dateRange: F, selectedLocationIds: b, timezone: u } = oe(Pe()), { globalFilters: L } = oe(Ge()), { schemas: Q } = oe(Wl()), {
|
|
1202
1202
|
showMore: _,
|
|
1203
1203
|
getGlobalFilter: O,
|
|
1204
1204
|
setGlobalFilter: S,
|
|
1205
1205
|
setIncludeUnavailable: c,
|
|
1206
|
-
getGlobalFilterKey:
|
|
1207
|
-
isMenuOpen:
|
|
1206
|
+
getGlobalFilterKey: d,
|
|
1207
|
+
isMenuOpen: v,
|
|
1208
1208
|
getGlobalFilterLabel: y,
|
|
1209
|
-
incrementAppliedTilesFiltersVersion:
|
|
1209
|
+
incrementAppliedTilesFiltersVersion: N
|
|
1210
1210
|
} = Ge();
|
|
1211
1211
|
const R = Se(() => s("report.input.empty")), H = ["NULL", "", " "];
|
|
1212
1212
|
let z;
|
|
1213
|
-
const q =
|
|
1213
|
+
const q = ua(), { getWidgetResult: ee } = q, { widgetResults: le, isAllWidgetResultLoaded: Z } = oe(q), C = ye(!1), W = ye(!1), ne = ye(""), U = ye({}), K = Se(() => {
|
|
1214
1214
|
var e;
|
|
1215
|
-
return
|
|
1216
|
-
}), se = Se(() =>
|
|
1215
|
+
return a.globalFilterId ?? ((e = m.value) == null ? void 0 : e.id) ?? "";
|
|
1216
|
+
}), se = Se(() => a.report ?? m.value), x = ye([]);
|
|
1217
1217
|
function k(e) {
|
|
1218
1218
|
return `${K.value}|instance:${e}`;
|
|
1219
1219
|
}
|
|
1220
1220
|
function ce(e) {
|
|
1221
|
-
return ct(e) ? !1 :
|
|
1221
|
+
return ct(e) ? !1 : C.value ? !0 : a.isDialogGlobalFilter ? W.value : !Z.value && e.options.length === 0;
|
|
1222
1222
|
}
|
|
1223
1223
|
function ue(e, t) {
|
|
1224
1224
|
return (e == null ? void 0 : e.startDate) === (t == null ? void 0 : t.startDate) && (e == null ? void 0 : e.endDate) === (t == null ? void 0 : t.endDate);
|
|
1225
1225
|
}
|
|
1226
1226
|
function re(e, t) {
|
|
1227
|
-
var o,
|
|
1228
|
-
return ((o = e == null ? void 0 : e.start) == null ? void 0 : o.hour) === ((
|
|
1227
|
+
var o, n, h, T, g, $, A, I;
|
|
1228
|
+
return ((o = e == null ? void 0 : e.start) == null ? void 0 : o.hour) === ((n = t == null ? void 0 : t.start) == null ? void 0 : n.hour) && ((h = e == null ? void 0 : e.start) == null ? void 0 : h.minute) === ((T = t == null ? void 0 : t.start) == null ? void 0 : T.minute) && ((g = e == null ? void 0 : e.end) == null ? void 0 : g.hour) === (($ = t == null ? void 0 : t.end) == null ? void 0 : $.hour) && ((A = e == null ? void 0 : e.end) == null ? void 0 : A.minute) === ((I = t == null ? void 0 : t.end) == null ? void 0 : I.minute);
|
|
1229
1229
|
}
|
|
1230
1230
|
function Fe(e, t) {
|
|
1231
|
-
return !e || !t ? e === t : e.length === t.length && e.every((o,
|
|
1231
|
+
return !e || !t ? e === t : e.length === t.length && e.every((o, n) => o === t[n]);
|
|
1232
1232
|
}
|
|
1233
|
-
const
|
|
1234
|
-
if (!(
|
|
1233
|
+
const me = Se(() => {
|
|
1234
|
+
if (!(a.isDialogGlobalFilter || !!p.value))
|
|
1235
1235
|
return !1;
|
|
1236
|
-
const t =
|
|
1237
|
-
return ue(t, F.value) && re(o, f.value) && Fe(
|
|
1236
|
+
const t = a.dateRange ?? F.value, o = a.timeRange ?? f.value, n = a.locationIds ?? b.value;
|
|
1237
|
+
return ue(t, F.value) && re(o, f.value) && Fe(n, b.value);
|
|
1238
1238
|
});
|
|
1239
1239
|
function ge(e) {
|
|
1240
1240
|
return e ? [...e.tileIds ?? []] : Array.from(new Set(et.value.flatMap((t) => t.tileIds ?? [])));
|
|
1241
1241
|
}
|
|
1242
|
-
function
|
|
1243
|
-
|
|
1242
|
+
function ae(e) {
|
|
1243
|
+
a.isDialogGlobalFilter || N(ge(e));
|
|
1244
1244
|
}
|
|
1245
1245
|
function P(e) {
|
|
1246
1246
|
return e.filter((t) => t !== we);
|
|
1247
1247
|
}
|
|
1248
1248
|
function Te(e) {
|
|
1249
1249
|
const t = e.some(
|
|
1250
|
-
(
|
|
1250
|
+
(n) => n === Ne || n === "NULL" || typeof n == "string" && (n === "" || n === " ")
|
|
1251
1251
|
), o = e.flatMap(
|
|
1252
|
-
(
|
|
1252
|
+
(n) => n === Ne ? [...H] : [n]
|
|
1253
1253
|
);
|
|
1254
|
-
return t ?
|
|
1254
|
+
return Array.from(t ? /* @__PURE__ */ new Set([...o, ...H]) : new Set(o));
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function de(e) {
|
|
1257
1257
|
const t = O(
|
|
1258
1258
|
e.globalFilter,
|
|
1259
1259
|
k(e.id)
|
|
@@ -1269,24 +1269,24 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1269
1269
|
selectedValues: t
|
|
1270
1270
|
});
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1272
|
+
function al(e) {
|
|
1273
1273
|
e.options = [], Be(e);
|
|
1274
1274
|
}
|
|
1275
1275
|
function Dt(e) {
|
|
1276
1276
|
e.keepSelection || Be(e);
|
|
1277
1277
|
}
|
|
1278
|
-
function
|
|
1279
|
-
const t = P(
|
|
1278
|
+
function nl(e) {
|
|
1279
|
+
const t = P(de(e));
|
|
1280
1280
|
U.value[e.id] = [...t], Be(e);
|
|
1281
1281
|
}
|
|
1282
1282
|
function sl() {
|
|
1283
|
-
var
|
|
1284
|
-
const e = F.value, t = f.value, o =
|
|
1283
|
+
var n, h, T, g;
|
|
1284
|
+
const e = F.value, t = f.value, o = b.value || [];
|
|
1285
1285
|
return JSON.stringify({
|
|
1286
1286
|
globalFilterId: K.value,
|
|
1287
1287
|
startDate: (e == null ? void 0 : e.startDate) ?? null,
|
|
1288
1288
|
endDate: (e == null ? void 0 : e.endDate) ?? null,
|
|
1289
|
-
startHour: ((
|
|
1289
|
+
startHour: ((n = t == null ? void 0 : t.start) == null ? void 0 : n.hour) ?? null,
|
|
1290
1290
|
startMinute: ((h = t == null ? void 0 : t.start) == null ? void 0 : h.minute) ?? null,
|
|
1291
1291
|
endHour: ((T = t == null ? void 0 : t.end) == null ? void 0 : T.hour) ?? null,
|
|
1292
1292
|
endMinute: ((g = t == null ? void 0 : t.end) == null ? void 0 : g.minute) ?? null,
|
|
@@ -1300,11 +1300,11 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1300
1300
|
function fe(e) {
|
|
1301
1301
|
const t = P(e.selectedValues || []);
|
|
1302
1302
|
if (t.length)
|
|
1303
|
-
return t.map((
|
|
1303
|
+
return t.map((n) => String(n));
|
|
1304
1304
|
const o = P(
|
|
1305
1305
|
O(e.globalFilter, k(e.id)).selectedValues
|
|
1306
1306
|
);
|
|
1307
|
-
return o.length ? o.map((
|
|
1307
|
+
return o.length ? o.map((n) => String(n)) : (e.globalFilter.values ?? []).map((n) => String(n));
|
|
1308
1308
|
}
|
|
1309
1309
|
function rl(e) {
|
|
1310
1310
|
if (Ve(e.selectedValues || []))
|
|
@@ -1322,19 +1322,19 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1322
1322
|
return e.includes(we);
|
|
1323
1323
|
}
|
|
1324
1324
|
function Tt(e) {
|
|
1325
|
-
return e ===
|
|
1325
|
+
return e === Ne || String(e ?? "").trim() === "";
|
|
1326
1326
|
}
|
|
1327
1327
|
function it(e) {
|
|
1328
1328
|
return [...e].sort((t, o) => {
|
|
1329
|
-
const
|
|
1330
|
-
return
|
|
1329
|
+
const n = Tt(t.value), h = Tt(o.value);
|
|
1330
|
+
return n !== h ? n ? -1 : 1 : t.label.localeCompare(o.label, r.value, {
|
|
1331
1331
|
numeric: !0,
|
|
1332
1332
|
sensitivity: "base"
|
|
1333
1333
|
});
|
|
1334
1334
|
});
|
|
1335
1335
|
}
|
|
1336
1336
|
function Vt(e) {
|
|
1337
|
-
return e.type ===
|
|
1337
|
+
return e.type === ve.String && !ze(e.globalFilter);
|
|
1338
1338
|
}
|
|
1339
1339
|
function He(e) {
|
|
1340
1340
|
return (e.options || []).map((t) => t.value);
|
|
@@ -1347,11 +1347,11 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1347
1347
|
return t.length ? t : Ve(e.selectedValues || []) ? [] : ut(e) ? He(e) : [];
|
|
1348
1348
|
}
|
|
1349
1349
|
function Ze(e, t) {
|
|
1350
|
-
const o = new Set((e.options || []).map((
|
|
1351
|
-
return P(t).filter((
|
|
1350
|
+
const o = new Set((e.options || []).map((n) => n.value));
|
|
1351
|
+
return P(t).filter((n) => o.has(n));
|
|
1352
1352
|
}
|
|
1353
1353
|
function ol(e) {
|
|
1354
|
-
const o = O(e.globalFilter, k(e.id)).selectedValues,
|
|
1354
|
+
const o = O(e.globalFilter, k(e.id)).selectedValues, n = a.isDialogGlobalFilter ? rl(e) : [];
|
|
1355
1355
|
if (Ve(e.selectedValues || []))
|
|
1356
1356
|
return [we];
|
|
1357
1357
|
if (Ve(o || []))
|
|
@@ -1359,7 +1359,7 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1359
1359
|
if ((e.options || []).map((T) => T.value).length > 0) {
|
|
1360
1360
|
const T = Ze(
|
|
1361
1361
|
e,
|
|
1362
|
-
|
|
1362
|
+
n
|
|
1363
1363
|
);
|
|
1364
1364
|
if (T.length)
|
|
1365
1365
|
return T;
|
|
@@ -1369,7 +1369,7 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1369
1369
|
if (e.keepSelection) {
|
|
1370
1370
|
const A = Ze(
|
|
1371
1371
|
e,
|
|
1372
|
-
|
|
1372
|
+
de(e)
|
|
1373
1373
|
);
|
|
1374
1374
|
if (A.length)
|
|
1375
1375
|
return A;
|
|
@@ -1380,34 +1380,34 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1380
1380
|
);
|
|
1381
1381
|
return $.length ? $ : [];
|
|
1382
1382
|
}
|
|
1383
|
-
return
|
|
1383
|
+
return n.length ? [...n] : o.length ? [...o] : e.keepSelection ? de(e) : [];
|
|
1384
1384
|
}
|
|
1385
1385
|
function il(e, t) {
|
|
1386
1386
|
const o = new Set(P(t));
|
|
1387
1387
|
if (!o.size) return !1;
|
|
1388
|
-
const
|
|
1389
|
-
return
|
|
1388
|
+
const n = (e.options || []).map((h) => h.value);
|
|
1389
|
+
return n.length ? n.every((h) => o.has(h)) : !1;
|
|
1390
1390
|
}
|
|
1391
1391
|
function ul(e) {
|
|
1392
1392
|
const t = e.selectedValues || [];
|
|
1393
1393
|
return Ve(t) || !ut(e) ? !1 : P(t).length === 0;
|
|
1394
1394
|
}
|
|
1395
1395
|
function cl(e) {
|
|
1396
|
-
const t = Ye(e), o = P(t),
|
|
1396
|
+
const t = Ye(e), o = P(t), n = Te(o), h = Ve(t);
|
|
1397
1397
|
if (ul(e))
|
|
1398
1398
|
return [];
|
|
1399
1399
|
if (il(e, t))
|
|
1400
1400
|
return [];
|
|
1401
|
-
if (!e.keepSelection ||
|
|
1402
|
-
return
|
|
1401
|
+
if (!e.keepSelection || a.isDialogGlobalFilter)
|
|
1402
|
+
return n.length ? n : h ? [Ne] : [];
|
|
1403
1403
|
if (!ut(e))
|
|
1404
|
-
return
|
|
1404
|
+
return n.length ? n : h ? [Ne] : [];
|
|
1405
1405
|
const T = new Set(
|
|
1406
1406
|
(e.options || []).filter((A) => A.available !== !1).map((A) => A.value)
|
|
1407
1407
|
), g = o.filter(
|
|
1408
1408
|
(A) => T.has(A)
|
|
1409
1409
|
), $ = Te(g);
|
|
1410
|
-
return $.length ? $ : h ? [
|
|
1410
|
+
return $.length ? $ : h ? [Ne] : [];
|
|
1411
1411
|
}
|
|
1412
1412
|
function Xe(e) {
|
|
1413
1413
|
const t = U.value[e.id];
|
|
@@ -1417,22 +1417,22 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1417
1417
|
}
|
|
1418
1418
|
e.selectedValues = ol(e), ot(e);
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function ml() {
|
|
1421
1421
|
x.value.forEach((e) => {
|
|
1422
|
-
|
|
1422
|
+
me.value || Dt(e);
|
|
1423
1423
|
});
|
|
1424
1424
|
}
|
|
1425
|
-
function
|
|
1425
|
+
function dl() {
|
|
1426
1426
|
const e = sl();
|
|
1427
|
-
|
|
1427
|
+
ne.value !== e && x.value.forEach((o) => {
|
|
1428
1428
|
if (o.keepSelection) {
|
|
1429
|
-
|
|
1429
|
+
nl(o);
|
|
1430
1430
|
return;
|
|
1431
1431
|
}
|
|
1432
1432
|
Dt(o);
|
|
1433
|
-
}),
|
|
1433
|
+
}), ne.value = e;
|
|
1434
1434
|
}
|
|
1435
|
-
const et = Se(() =>
|
|
1435
|
+
const et = Se(() => a.globalFilters ?? L.value);
|
|
1436
1436
|
function pl(e) {
|
|
1437
1437
|
return {
|
|
1438
1438
|
schemaName: e.schemaName,
|
|
@@ -1450,25 +1450,25 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1450
1450
|
return e.map((t) => pl(t));
|
|
1451
1451
|
}
|
|
1452
1452
|
function hl(e, t) {
|
|
1453
|
-
const o = `${
|
|
1453
|
+
const o = `${d(e, K.value)}|${t}`, n = O(e, k(o)), h = n.selectedValues.length ? [...n.selectedValues] : [...e.values ?? []];
|
|
1454
1454
|
return {
|
|
1455
1455
|
id: o,
|
|
1456
1456
|
globalFilter: e,
|
|
1457
|
-
search:
|
|
1458
|
-
options:
|
|
1459
|
-
type:
|
|
1457
|
+
search: n.search,
|
|
1458
|
+
options: n.options,
|
|
1459
|
+
type: Nt(e),
|
|
1460
1460
|
selectedValues: h,
|
|
1461
|
-
visibleCount:
|
|
1462
|
-
keepSelection:
|
|
1463
|
-
showAdvanced:
|
|
1461
|
+
visibleCount: n.visibleCount,
|
|
1462
|
+
keepSelection: n.keepSelection,
|
|
1463
|
+
showAdvanced: n.showAdvanced
|
|
1464
1464
|
};
|
|
1465
1465
|
}
|
|
1466
|
-
function
|
|
1466
|
+
function vl() {
|
|
1467
1467
|
x.value = et.value.map(
|
|
1468
1468
|
(e, t) => hl(e, t)
|
|
1469
1469
|
);
|
|
1470
1470
|
}
|
|
1471
|
-
const
|
|
1471
|
+
const bl = Se(
|
|
1472
1472
|
() => JSON.stringify(fl(et.value))
|
|
1473
1473
|
), yl = Se(() => {
|
|
1474
1474
|
const e = et.value.map(
|
|
@@ -1484,12 +1484,12 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1484
1484
|
Ae(
|
|
1485
1485
|
() => ({
|
|
1486
1486
|
globalFilterId: K.value,
|
|
1487
|
-
globalFiltersConfigSignature:
|
|
1487
|
+
globalFiltersConfigSignature: bl.value
|
|
1488
1488
|
}),
|
|
1489
1489
|
(e, t) => {
|
|
1490
1490
|
t && t.globalFilterId !== e.globalFilterId && x.value.forEach((o) => {
|
|
1491
1491
|
o.options = [];
|
|
1492
|
-
}),
|
|
1492
|
+
}), vl(), t && t.globalFiltersConfigSignature !== e.globalFiltersConfigSignature && ae(), Z.value && lt();
|
|
1493
1493
|
},
|
|
1494
1494
|
{ immediate: !0 }
|
|
1495
1495
|
), Ae(
|
|
@@ -1497,13 +1497,13 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1497
1497
|
Z,
|
|
1498
1498
|
f,
|
|
1499
1499
|
F,
|
|
1500
|
-
|
|
1501
|
-
() =>
|
|
1502
|
-
() =>
|
|
1503
|
-
() =>
|
|
1500
|
+
b,
|
|
1501
|
+
() => a.timeRange,
|
|
1502
|
+
() => a.dateRange,
|
|
1503
|
+
() => a.locationIds
|
|
1504
1504
|
],
|
|
1505
1505
|
async () => {
|
|
1506
|
-
|
|
1506
|
+
a.isDialogGlobalFilter ? ml() : dl(), await lt();
|
|
1507
1507
|
},
|
|
1508
1508
|
{ immediate: !0 }
|
|
1509
1509
|
), Ae(
|
|
@@ -1517,7 +1517,7 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1517
1517
|
), Ae(
|
|
1518
1518
|
() => yl.value,
|
|
1519
1519
|
async (e, t) => {
|
|
1520
|
-
e !== t && t && (
|
|
1520
|
+
e !== t && t && (a.isDialogGlobalFilter || At() || await lt());
|
|
1521
1521
|
}
|
|
1522
1522
|
), Ae(
|
|
1523
1523
|
() => r.value,
|
|
@@ -1525,9 +1525,9 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1525
1525
|
gl();
|
|
1526
1526
|
}
|
|
1527
1527
|
);
|
|
1528
|
-
function
|
|
1528
|
+
function Ct(e, t) {
|
|
1529
1529
|
var o;
|
|
1530
|
-
return t === !0 ? s("report.common.yes") || "Yes" : t === !1 ? s("report.common.no") || "No" : String(t).trim() === "" || t ===
|
|
1530
|
+
return t === !0 ? s("report.common.yes") || "Yes" : t === !1 ? s("report.common.no") || "No" : String(t).trim() === "" || t === Ne ? R.value : e.type === ve.Timestamp && e.globalFilter.option !== B.DateTime && e.globalFilter.option !== B.TimeOfDay ? ((o = pt({
|
|
1531
1531
|
dimensionOption: e.globalFilter.option,
|
|
1532
1532
|
t: s
|
|
1533
1533
|
}).find((h) => String(h.value) === String(t))) == null ? void 0 : o.label) ?? String(t) : String(t);
|
|
@@ -1537,29 +1537,29 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1537
1537
|
if (!e.options.length) return;
|
|
1538
1538
|
const t = e.options.map((o) => ({
|
|
1539
1539
|
...o,
|
|
1540
|
-
label:
|
|
1540
|
+
label: Ct(e, o.value)
|
|
1541
1541
|
}));
|
|
1542
1542
|
e.options = Vt(e) ? it(t) : t;
|
|
1543
1543
|
});
|
|
1544
1544
|
}
|
|
1545
|
-
function
|
|
1545
|
+
function Nt(e) {
|
|
1546
1546
|
var o;
|
|
1547
|
-
const t = (o = Q.value.find((
|
|
1547
|
+
const t = (o = Q.value.find((n) => n.name === e.schemaName)) == null ? void 0 : o.fields.find((n) => n.name === e.name);
|
|
1548
1548
|
return t == null ? void 0 : t.type;
|
|
1549
1549
|
}
|
|
1550
1550
|
function Sl(e) {
|
|
1551
1551
|
var $, A;
|
|
1552
1552
|
if (!se.value && !p.value) return [];
|
|
1553
1553
|
if (!(($ = e.tileIds) != null && $.length)) return [];
|
|
1554
|
-
const t = p.value ? [p.value] : Ue((A = se.value) == null ? void 0 : A.tiles), { name: o = "", schemaName:
|
|
1554
|
+
const t = p.value ? [p.value] : Ue((A = se.value) == null ? void 0 : A.tiles), { name: o = "", schemaName: n = "" } = e, h = t.filter((I) => {
|
|
1555
1555
|
var pe, w;
|
|
1556
1556
|
const G = (pe = I == null ? void 0 : I.widget) == null ? void 0 : pe.config;
|
|
1557
1557
|
if (!G || (w = e.tileIds) != null && w.length && !e.tileIds.includes(I.id)) return !1;
|
|
1558
1558
|
const i = (G.dimensions ?? []).some(
|
|
1559
|
-
(_e) => _e.schemaName ===
|
|
1559
|
+
(_e) => _e.schemaName === n && _e.name === o
|
|
1560
1560
|
), J = (G.joinDatasources ?? []).some(
|
|
1561
|
-
(_e) => (_e.dimensions ?? []).some((qe) => qe.schemaName ===
|
|
1562
|
-
), V = (G.schemaNames ?? []).includes(
|
|
1561
|
+
(_e) => (_e.dimensions ?? []).some((qe) => qe.schemaName === n && qe.name === o)
|
|
1562
|
+
), V = (G.schemaNames ?? []).includes(n);
|
|
1563
1563
|
return i || J || V;
|
|
1564
1564
|
});
|
|
1565
1565
|
if (!h.length) return [];
|
|
@@ -1572,11 +1572,11 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1572
1572
|
}, g = (I) => {
|
|
1573
1573
|
var i;
|
|
1574
1574
|
const G = (i = I.dimensions) == null ? void 0 : i.find(
|
|
1575
|
-
(J) => J.schemaName ===
|
|
1575
|
+
(J) => J.schemaName === n && J.name === o
|
|
1576
1576
|
);
|
|
1577
1577
|
return {
|
|
1578
1578
|
name: o,
|
|
1579
|
-
schemaName:
|
|
1579
|
+
schemaName: n,
|
|
1580
1580
|
label: (G == null ? void 0 : G.label) ?? o,
|
|
1581
1581
|
hide: !1,
|
|
1582
1582
|
option: e.option ?? null,
|
|
@@ -1587,19 +1587,19 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1587
1587
|
var qe, Et;
|
|
1588
1588
|
const i = (qe = G == null ? void 0 : G.widget) == null ? void 0 : qe.config;
|
|
1589
1589
|
if (!i) return I;
|
|
1590
|
-
const J = g(i), V = (i.dimensions ?? []).some((
|
|
1590
|
+
const J = g(i), V = (i.dimensions ?? []).some((Ce) => Ce.schemaName === n) || (i.schemaNames ?? []).includes(n), pe = T(
|
|
1591
1591
|
i.filters ?? [],
|
|
1592
|
-
(e.filters ?? []).filter((
|
|
1592
|
+
(e.filters ?? []).filter((Ce) => {
|
|
1593
1593
|
var Re;
|
|
1594
|
-
return (Re = i.schemaNames) == null ? void 0 : Re.includes(
|
|
1594
|
+
return (Re = i.schemaNames) == null ? void 0 : Re.includes(Ce.schemaName);
|
|
1595
1595
|
})
|
|
1596
1596
|
), w = (Et = i.joinDatasources) == null ? void 0 : Et.find(
|
|
1597
|
-
(
|
|
1597
|
+
(Ce) => (Ce.schemaNames ?? []).includes(n) || (Ce.dimensions ?? []).some((Re) => Re.schemaName === n)
|
|
1598
1598
|
), _e = T(
|
|
1599
1599
|
(w == null ? void 0 : w.filters) ?? [],
|
|
1600
|
-
(e.filters ?? []).filter((
|
|
1600
|
+
(e.filters ?? []).filter((Ce) => {
|
|
1601
1601
|
var Re;
|
|
1602
|
-
return (Re = w == null ? void 0 : w.schemaNames) == null ? void 0 : Re.includes(
|
|
1602
|
+
return (Re = w == null ? void 0 : w.schemaNames) == null ? void 0 : Re.includes(Ce.schemaName);
|
|
1603
1603
|
})
|
|
1604
1604
|
);
|
|
1605
1605
|
return I.push({
|
|
@@ -1610,7 +1610,7 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1610
1610
|
schemas: i.schemas,
|
|
1611
1611
|
dimensions: V ? [J] : [],
|
|
1612
1612
|
filters: pe,
|
|
1613
|
-
sorts: V ? [{ name: o, schemaName:
|
|
1613
|
+
sorts: V ? [{ name: o, schemaName: n, type: zt.Asc, aggregation: null, dimensionOption: null }] : [],
|
|
1614
1614
|
joinDatasources: !V && w ? [
|
|
1615
1615
|
{
|
|
1616
1616
|
...w,
|
|
@@ -1618,7 +1618,7 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1618
1618
|
sorts: [
|
|
1619
1619
|
{
|
|
1620
1620
|
name: o,
|
|
1621
|
-
schemaName:
|
|
1621
|
+
schemaName: n,
|
|
1622
1622
|
type: zt.Asc,
|
|
1623
1623
|
aggregation: null,
|
|
1624
1624
|
dimensionOption: null
|
|
@@ -1681,50 +1681,50 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1681
1681
|
return !((t = e.globalFilter.tileIds) != null && t.length);
|
|
1682
1682
|
}
|
|
1683
1683
|
function At() {
|
|
1684
|
-
return (
|
|
1684
|
+
return (a.isDialogGlobalFilter || !!p.value) && !me.value;
|
|
1685
1685
|
}
|
|
1686
1686
|
function It() {
|
|
1687
1687
|
var e;
|
|
1688
|
-
return
|
|
1688
|
+
return a.isDialogGlobalFilter && me.value && ((e = m.value) != null && e.id) ? m.value.id : K.value;
|
|
1689
1689
|
}
|
|
1690
1690
|
function tt(e) {
|
|
1691
|
-
return String(e ?? "").trim() === "" ?
|
|
1691
|
+
return String(e ?? "").trim() === "" ? Ne : String(e);
|
|
1692
1692
|
}
|
|
1693
1693
|
function Tl(e) {
|
|
1694
1694
|
var t, o;
|
|
1695
|
-
return (((t = e.customTimeRanges) == null ? void 0 : t.length) ?? 0) > 0 ? e.customTimeRanges.map((
|
|
1696
|
-
label: tt(
|
|
1697
|
-
value: tt(
|
|
1695
|
+
return (((t = e.customTimeRanges) == null ? void 0 : t.length) ?? 0) > 0 ? e.customTimeRanges.map((n) => ({
|
|
1696
|
+
label: tt(n.name),
|
|
1697
|
+
value: tt(n.name),
|
|
1698
1698
|
available: !0
|
|
1699
|
-
})) : (((o = e.customOptions) == null ? void 0 : o.length) ?? 0) > 0 ? e.customOptions.map((
|
|
1700
|
-
label: tt(
|
|
1701
|
-
value: tt(
|
|
1699
|
+
})) : (((o = e.customOptions) == null ? void 0 : o.length) ?? 0) > 0 ? e.customOptions.map((n) => ({
|
|
1700
|
+
label: tt(n.label),
|
|
1701
|
+
value: tt(n.label),
|
|
1702
1702
|
available: !0
|
|
1703
1703
|
})) : [];
|
|
1704
1704
|
}
|
|
1705
1705
|
function Vl(e) {
|
|
1706
1706
|
const t = P(e.selectedValues || []);
|
|
1707
1707
|
if (!t.length) return;
|
|
1708
|
-
const o = new Set(e.options.map((h) => h.value)),
|
|
1708
|
+
const o = new Set(e.options.map((h) => h.value)), n = t.filter((h) => !o.has(h)).map((h) => ({
|
|
1709
1709
|
value: h,
|
|
1710
|
-
label:
|
|
1710
|
+
label: Ct(e, h),
|
|
1711
1711
|
available: !1
|
|
1712
1712
|
}));
|
|
1713
|
-
if (
|
|
1714
|
-
const h = [...e.options, ...
|
|
1713
|
+
if (n.length) {
|
|
1714
|
+
const h = [...e.options, ...n];
|
|
1715
1715
|
e.options = Vt(e) ? it(h) : h;
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1718
|
+
function Cl(e) {
|
|
1719
1719
|
if (e.keepSelection) {
|
|
1720
1720
|
Vl(e);
|
|
1721
|
-
const o =
|
|
1721
|
+
const o = de(e);
|
|
1722
1722
|
e.selectedValues = o.length ? [...o] : [...e.selectedValues || []];
|
|
1723
1723
|
} else {
|
|
1724
|
-
const o = P(
|
|
1724
|
+
const o = P(de(e));
|
|
1725
1725
|
e.options = e.options.filter((T) => T.available !== !1);
|
|
1726
|
-
const
|
|
1727
|
-
(T) =>
|
|
1726
|
+
const n = new Set(e.options.map((T) => T.value)), h = o.filter(
|
|
1727
|
+
(T) => n.has(T)
|
|
1728
1728
|
);
|
|
1729
1729
|
e.selectedValues = h;
|
|
1730
1730
|
}
|
|
@@ -1733,36 +1733,36 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1733
1733
|
selectedValues: t
|
|
1734
1734
|
});
|
|
1735
1735
|
}
|
|
1736
|
-
async function
|
|
1736
|
+
async function Nl(e, t) {
|
|
1737
1737
|
var o;
|
|
1738
1738
|
if (e.options = [], !((o = e.globalFilter.tileIds) != null && o.length)) {
|
|
1739
|
-
|
|
1739
|
+
al(e);
|
|
1740
1740
|
return;
|
|
1741
1741
|
}
|
|
1742
|
-
if (!(!e.type && (e.type =
|
|
1742
|
+
if (!(!e.type && (e.type = Nt(e.globalFilter), !e.type))) {
|
|
1743
1743
|
if (ze(e.globalFilter)) {
|
|
1744
1744
|
e.options = Tl(e.globalFilter), Xe(e);
|
|
1745
1745
|
return;
|
|
1746
1746
|
}
|
|
1747
1747
|
switch (e.type) {
|
|
1748
|
-
case
|
|
1748
|
+
case ve.String:
|
|
1749
1749
|
try {
|
|
1750
|
-
const
|
|
1751
|
-
if (!
|
|
1750
|
+
const n = Sl(e.globalFilter);
|
|
1751
|
+
if (!n.length) {
|
|
1752
1752
|
e.options = [];
|
|
1753
1753
|
return;
|
|
1754
1754
|
}
|
|
1755
1755
|
const h = At(), T = [];
|
|
1756
|
-
for (const i of
|
|
1756
|
+
for (const i of n) {
|
|
1757
1757
|
if (t.aborted) return;
|
|
1758
1758
|
if (h) {
|
|
1759
|
-
const V = await
|
|
1759
|
+
const V = await oa({
|
|
1760
1760
|
widget: i,
|
|
1761
1761
|
signal: t,
|
|
1762
|
-
scopedLocationIds:
|
|
1763
|
-
scopedTimeRange:
|
|
1764
|
-
scopedDateRange:
|
|
1765
|
-
scopedGlobalFilters:
|
|
1762
|
+
scopedLocationIds: a.locationIds,
|
|
1763
|
+
scopedTimeRange: a.timeRange,
|
|
1764
|
+
scopedDateRange: a.dateRange,
|
|
1765
|
+
scopedGlobalFilters: a.globalFilters
|
|
1766
1766
|
});
|
|
1767
1767
|
(V == null ? void 0 : V.type) === Bt.Table && T.push(...V.rows.map((pe) => {
|
|
1768
1768
|
var w;
|
|
@@ -1775,34 +1775,34 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1775
1775
|
);
|
|
1776
1776
|
T.push(...J);
|
|
1777
1777
|
}
|
|
1778
|
-
const g = Array.from(new Set(T)), $ =
|
|
1778
|
+
const g = Array.from(new Set(T)), $ = de(e), A = e.keepSelection ? Array.from(/* @__PURE__ */ new Set([...g, ...$])) : g, I = new Set(T), G = new Set(g);
|
|
1779
1779
|
e.options = it(
|
|
1780
1780
|
Ul(A, {
|
|
1781
1781
|
unknownLabel: R.value,
|
|
1782
1782
|
getAvailable: (i) => e.keepSelection ? I.has(i) : G.has(i)
|
|
1783
1783
|
})
|
|
1784
1784
|
), Xe(e);
|
|
1785
|
-
} catch (
|
|
1786
|
-
if ((
|
|
1785
|
+
} catch (n) {
|
|
1786
|
+
if ((n == null ? void 0 : n.code) === "ERR_CANCELED" || (n == null ? void 0 : n.name) === "CanceledError")
|
|
1787
1787
|
return;
|
|
1788
|
-
throw
|
|
1788
|
+
throw n;
|
|
1789
1789
|
}
|
|
1790
1790
|
break;
|
|
1791
|
-
case
|
|
1791
|
+
case ve.Bool: {
|
|
1792
1792
|
e.options = [
|
|
1793
1793
|
{ label: s("report.common.yes"), value: !0 },
|
|
1794
1794
|
{ label: s("report.common.no"), value: !1 }
|
|
1795
1795
|
], Xe(e);
|
|
1796
1796
|
break;
|
|
1797
1797
|
}
|
|
1798
|
-
case
|
|
1798
|
+
case ve.Timestamp:
|
|
1799
1799
|
if (e.globalFilter.option !== B.DateTime && e.globalFilter.option !== B.TimeOfDay) {
|
|
1800
|
-
const
|
|
1801
|
-
e.options = pt({ dimensionOption:
|
|
1800
|
+
const n = e.globalFilter.option;
|
|
1801
|
+
e.options = pt({ dimensionOption: n, t: s }), e.globalFilter.values = e.options.length ? e.options.map((h) => h.value) : ["NULL"];
|
|
1802
1802
|
}
|
|
1803
1803
|
Xe(e);
|
|
1804
1804
|
break;
|
|
1805
|
-
case
|
|
1805
|
+
case ve.Numeric:
|
|
1806
1806
|
break;
|
|
1807
1807
|
}
|
|
1808
1808
|
}
|
|
@@ -1811,24 +1811,24 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1811
1811
|
if (!K.value || !x.value.length) return;
|
|
1812
1812
|
z && z.abort();
|
|
1813
1813
|
const e = new AbortController();
|
|
1814
|
-
z = e,
|
|
1814
|
+
z = e, C.value = !0, a.isDialogGlobalFilter && (W.value = !0);
|
|
1815
1815
|
try {
|
|
1816
1816
|
await Promise.all(
|
|
1817
1817
|
x.value.map(
|
|
1818
|
-
(t) =>
|
|
1818
|
+
(t) => Nl(t, e.signal)
|
|
1819
1819
|
)
|
|
1820
1820
|
);
|
|
1821
1821
|
} finally {
|
|
1822
|
-
z === e && (
|
|
1822
|
+
z === e && (C.value = !1), a.isDialogGlobalFilter && z === e && (W.value = !1);
|
|
1823
1823
|
}
|
|
1824
1824
|
}
|
|
1825
1825
|
function xt(e, t) {
|
|
1826
|
-
const o = He(e),
|
|
1827
|
-
if (
|
|
1828
|
-
const g =
|
|
1826
|
+
const o = He(e), n = Ee(e);
|
|
1827
|
+
if (n.includes(t)) {
|
|
1828
|
+
const g = n.filter(($) => $ !== t);
|
|
1829
1829
|
e.selectedValues = g.length > 0 ? g : [we];
|
|
1830
1830
|
} else {
|
|
1831
|
-
const g = [...
|
|
1831
|
+
const g = [...n, t], $ = o.length > 0 && o.every((A) => g.includes(A));
|
|
1832
1832
|
e.selectedValues = $ ? Ot(e) : g;
|
|
1833
1833
|
}
|
|
1834
1834
|
const T = Ye(e);
|
|
@@ -1837,14 +1837,14 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1837
1837
|
});
|
|
1838
1838
|
}
|
|
1839
1839
|
function $t(e, t) {
|
|
1840
|
-
const o = e.globalFilter,
|
|
1840
|
+
const o = e.globalFilter, n = t ? [
|
|
1841
1841
|
zl(Pt(t.startDate, u.value), u.value),
|
|
1842
1842
|
ql(Pt(t.endDate, u.value), u.value)
|
|
1843
1843
|
] : [];
|
|
1844
|
-
t === null ? o.values = [] : o.values =
|
|
1844
|
+
t === null ? o.values = [] : o.values = n, e.selectedValues = [...n], e.keepSelection = t !== null, S(e.globalFilter, k(e.id), {
|
|
1845
1845
|
keepSelection: e.keepSelection,
|
|
1846
|
-
selectedValues: [...
|
|
1847
|
-
}),
|
|
1846
|
+
selectedValues: [...n]
|
|
1847
|
+
}), ae(e.globalFilter);
|
|
1848
1848
|
}
|
|
1849
1849
|
function kl(e) {
|
|
1850
1850
|
const t = Ee(e);
|
|
@@ -1853,9 +1853,9 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1853
1853
|
function Ol() {
|
|
1854
1854
|
return s("report.section.filter.search");
|
|
1855
1855
|
}
|
|
1856
|
-
function
|
|
1856
|
+
function at(e) {
|
|
1857
1857
|
const t = y(e.globalFilter), o = e.options.length > 0 ? "(0 selected)" : "";
|
|
1858
|
-
if (e.type ===
|
|
1858
|
+
if (e.type === ve.Timestamp && !ze(e.globalFilter)) {
|
|
1859
1859
|
const g = fe(e), $ = g.length === 2;
|
|
1860
1860
|
if (e.globalFilter.option === B.DateTime)
|
|
1861
1861
|
return { preview: $ ? `${t} is between ${Pl({
|
|
@@ -1890,7 +1890,7 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1890
1890
|
} : { preview: t, suffix: o };
|
|
1891
1891
|
}
|
|
1892
1892
|
function _l(e) {
|
|
1893
|
-
ot(e),
|
|
1893
|
+
ot(e), ae(e.globalFilter), document.body.click();
|
|
1894
1894
|
}
|
|
1895
1895
|
function Rl(e) {
|
|
1896
1896
|
const t = O(
|
|
@@ -1909,7 +1909,7 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1909
1909
|
function Il(e) {
|
|
1910
1910
|
e.keepSelection = !e.keepSelection, c(e.keepSelection), S(e.globalFilter, k(e.id), {
|
|
1911
1911
|
keepSelection: e.keepSelection
|
|
1912
|
-
}),
|
|
1912
|
+
}), Cl(e);
|
|
1913
1913
|
}
|
|
1914
1914
|
function xl(e, t) {
|
|
1915
1915
|
return e ? e.length > t ? `${e.slice(0, t)}…` : e : R.value;
|
|
@@ -1917,22 +1917,22 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1917
1917
|
function Gt(e, t) {
|
|
1918
1918
|
var h, T, g, $;
|
|
1919
1919
|
const o = e.globalFilter;
|
|
1920
|
-
let
|
|
1920
|
+
let n = [];
|
|
1921
1921
|
if (t === null)
|
|
1922
1922
|
o.values = [];
|
|
1923
1923
|
else {
|
|
1924
1924
|
const A = E().tz(u.value).set("hour", Number((h = t.start) == null ? void 0 : h.hour)).set("minute", Number((T = t.start) == null ? void 0 : T.minute)).toISOString(), I = E().tz(u.value).set("hour", Number((g = t.end) == null ? void 0 : g.hour)).set("minute", Number(($ = t.end) == null ? void 0 : $.minute)).toISOString();
|
|
1925
|
-
|
|
1925
|
+
n = [A, I], o.values = n;
|
|
1926
1926
|
}
|
|
1927
|
-
e.selectedValues = [...
|
|
1927
|
+
e.selectedValues = [...n], e.keepSelection = t !== null, S(e.globalFilter, k(e.id), {
|
|
1928
1928
|
keepSelection: e.keepSelection,
|
|
1929
|
-
selectedValues: [...
|
|
1930
|
-
}),
|
|
1929
|
+
selectedValues: [...n]
|
|
1930
|
+
}), ae(e.globalFilter);
|
|
1931
1931
|
}
|
|
1932
1932
|
return (e, t) => {
|
|
1933
|
-
const o = te("FmCircularProgress"),
|
|
1934
|
-
return X(), he("div",
|
|
1935
|
-
(X(!0), he(Le, null,
|
|
1933
|
+
const o = te("FmCircularProgress"), n = te("FmTextField"), h = te("FmMenuItem"), T = te("FmTooltip"), g = te("FmIcon"), $ = te("FmMenuDivider"), A = te("FmSwitch"), I = te("FmButton"), G = te("FmMenu");
|
|
1934
|
+
return X(), he("div", Fa, [
|
|
1935
|
+
(X(!0), he(Le, null, ht(x.value, (i, J) => (X(), he("div", {
|
|
1936
1936
|
key: i.id
|
|
1937
1937
|
}, [
|
|
1938
1938
|
i.globalFilter.option === D(B).DateTime && !ze(i.globalFilter) ? (X(), De(Ll, {
|
|
@@ -1942,11 +1942,11 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1942
1942
|
endDate: fe(i)[1]
|
|
1943
1943
|
},
|
|
1944
1944
|
class: "w-full",
|
|
1945
|
-
label:
|
|
1945
|
+
label: at(i).preview,
|
|
1946
1946
|
removable: fe(i).length === 2,
|
|
1947
1947
|
onUpdate: (V) => $t(i, V),
|
|
1948
1948
|
onChipClosed: () => $t(i, null)
|
|
1949
|
-
}, null, 8, ["date-range", "label", "removable", "onUpdate", "onChipClosed"])) : i.globalFilter.option === D(B).TimeOfDay && !ze(i.globalFilter) ? (X(), De(
|
|
1949
|
+
}, null, 8, ["date-range", "label", "removable", "onUpdate", "onChipClosed"])) : i.globalFilter.option === D(B).TimeOfDay && !ze(i.globalFilter) ? (X(), De(ga, {
|
|
1950
1950
|
key: 1,
|
|
1951
1951
|
"time-range": {
|
|
1952
1952
|
start: fe(i)[0] ? {
|
|
@@ -1959,7 +1959,7 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1959
1959
|
} : null
|
|
1960
1960
|
},
|
|
1961
1961
|
class: "w-full",
|
|
1962
|
-
label:
|
|
1962
|
+
label: at(i).preview,
|
|
1963
1963
|
removable: fe(i).length === 2,
|
|
1964
1964
|
onUpdate: (V) => Gt(i, V),
|
|
1965
1965
|
onChipClosed: () => Gt(i, null)
|
|
@@ -1967,19 +1967,19 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1967
1967
|
key: 2,
|
|
1968
1968
|
"close-on-click": !1,
|
|
1969
1969
|
shift: !0,
|
|
1970
|
-
open: D(
|
|
1970
|
+
open: D(v)(i.id)
|
|
1971
1971
|
}, {
|
|
1972
1972
|
"menu-button": ie(() => [
|
|
1973
|
-
Y("div",
|
|
1973
|
+
Y("div", wa, [
|
|
1974
1974
|
M(Jt, {
|
|
1975
1975
|
"left-icon": "filter_alt",
|
|
1976
1976
|
"trailing-icon": "expand_more",
|
|
1977
1977
|
loading: ce(i),
|
|
1978
|
-
label:
|
|
1978
|
+
label: at(i).preview,
|
|
1979
1979
|
class: "w-full"
|
|
1980
1980
|
}, {
|
|
1981
1981
|
default: ie(() => [
|
|
1982
|
-
|
|
1982
|
+
st(be(at(i).suffix), 1)
|
|
1983
1983
|
]),
|
|
1984
1984
|
_: 2
|
|
1985
1985
|
}, 1032, ["loading", "label"])
|
|
@@ -1990,11 +1990,11 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
1990
1990
|
class: "flex flex-col bg-fm-color-neutral-white p-2 rounded-lg shadow-light-300",
|
|
1991
1991
|
style: El({ maxHeight: `${V}px`, width: pe })
|
|
1992
1992
|
}, [
|
|
1993
|
-
ce(i) ? (X(), he("div",
|
|
1993
|
+
ce(i) ? (X(), he("div", Da, [
|
|
1994
1994
|
M(o)
|
|
1995
1995
|
])) : i.options.length > 0 ? (X(), he(Le, { key: 1 }, [
|
|
1996
|
-
Y("div",
|
|
1997
|
-
M(
|
|
1996
|
+
Y("div", Ta, [
|
|
1997
|
+
M(n, {
|
|
1998
1998
|
modelValue: i.search,
|
|
1999
1999
|
"onUpdate:modelValue": [(w) => i.search = w, (w) => Dl(i, w)],
|
|
2000
2000
|
type: "text",
|
|
@@ -2003,8 +2003,8 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
2003
2003
|
class: "border px-2 pb-8 text-sm mb-1 rounded"
|
|
2004
2004
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
2005
2005
|
]),
|
|
2006
|
-
Y("div",
|
|
2007
|
-
Y("div",
|
|
2006
|
+
Y("div", Va, [
|
|
2007
|
+
Y("div", Ca, [
|
|
2008
2008
|
M(h, {
|
|
2009
2009
|
label: kl(i),
|
|
2010
2010
|
"has-checkbox": !0,
|
|
@@ -2012,7 +2012,7 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
2012
2012
|
indeterminate: !0,
|
|
2013
2013
|
onClick: (w) => Fl(i)
|
|
2014
2014
|
}, null, 8, ["label", "model-value", "onClick"]),
|
|
2015
|
-
(X(!0), he(Le, null,
|
|
2015
|
+
(X(!0), he(Le, null, ht(Rt.value[J], (w) => (X(), he(Le, {
|
|
2016
2016
|
key: w.value
|
|
2017
2017
|
}, [
|
|
2018
2018
|
w.label && w.label.length > 110 ? (X(), De(T, {
|
|
@@ -2022,10 +2022,10 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
2022
2022
|
"z-index": 2e3
|
|
2023
2023
|
}, {
|
|
2024
2024
|
content: ie(() => [
|
|
2025
|
-
|
|
2025
|
+
st(be(w.label), 1)
|
|
2026
2026
|
]),
|
|
2027
2027
|
default: ie(() => [
|
|
2028
|
-
Y("div",
|
|
2028
|
+
Y("div", Na, [
|
|
2029
2029
|
M(h, {
|
|
2030
2030
|
label: xl(w.label, 110),
|
|
2031
2031
|
"has-checkbox": !0,
|
|
@@ -2052,9 +2052,9 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
2052
2052
|
key: 0,
|
|
2053
2053
|
class: "fm-typo-en-body-md-400 -ml-2",
|
|
2054
2054
|
label: D(s)("report.section.filter.loadMore"),
|
|
2055
|
-
onClick:
|
|
2055
|
+
onClick: mt((w) => wl(i), ["stop"]),
|
|
2056
2056
|
icon: "autorenew"
|
|
2057
|
-
}, null, 8, ["label", "onClick"])) :
|
|
2057
|
+
}, null, 8, ["label", "onClick"])) : vt("", !0)
|
|
2058
2058
|
])
|
|
2059
2059
|
]),
|
|
2060
2060
|
Y("div", {
|
|
@@ -2066,12 +2066,12 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
2066
2066
|
size: "md",
|
|
2067
2067
|
class: ""
|
|
2068
2068
|
}, null, 8, ["name"]),
|
|
2069
|
-
Y("span",
|
|
2070
|
-
], 8,
|
|
2069
|
+
Y("span", Oa, be(D(s)("report.section.filter.advanced")), 1)
|
|
2070
|
+
], 8, ka),
|
|
2071
2071
|
M($),
|
|
2072
|
-
i.showAdvanced ? (X(), he("div",
|
|
2073
|
-
Y("div",
|
|
2074
|
-
Y("div",
|
|
2072
|
+
i.showAdvanced ? (X(), he("div", _a, [
|
|
2073
|
+
Y("div", Ra, [
|
|
2074
|
+
Y("div", Aa, [
|
|
2075
2075
|
M(A, {
|
|
2076
2076
|
"model-value": i.keepSelection,
|
|
2077
2077
|
label: D(s)("report.section.filter.keepSelection"),
|
|
@@ -2083,7 +2083,7 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
2083
2083
|
"z-index": 2e3
|
|
2084
2084
|
}, {
|
|
2085
2085
|
content: ie(() => [
|
|
2086
|
-
Y("div",
|
|
2086
|
+
Y("div", Ia, be(D(s)("report.section.filter.keepSelectionTooltip")), 1)
|
|
2087
2087
|
]),
|
|
2088
2088
|
default: ie(() => [
|
|
2089
2089
|
M(g, {
|
|
@@ -2096,16 +2096,16 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
2096
2096
|
})
|
|
2097
2097
|
])
|
|
2098
2098
|
])
|
|
2099
|
-
])) :
|
|
2100
|
-
Y("div",
|
|
2099
|
+
])) : vt("", !0),
|
|
2100
|
+
Y("div", xa, [
|
|
2101
2101
|
M(I, {
|
|
2102
2102
|
variant: "tertiary",
|
|
2103
2103
|
label: D(s)("report.common.cancel"),
|
|
2104
|
-
onClick:
|
|
2104
|
+
onClick: mt((w) => Rl(i), ["stop"])
|
|
2105
2105
|
}, null, 8, ["label", "onClick"]),
|
|
2106
2106
|
M(I, {
|
|
2107
2107
|
color: "primary",
|
|
2108
|
-
onClick:
|
|
2108
|
+
onClick: mt((w) => _l(i), ["stop"]),
|
|
2109
2109
|
label: D(s)("report.common.apply")
|
|
2110
2110
|
}, null, 8, ["onClick", "label"])
|
|
2111
2111
|
])
|
|
@@ -2127,24 +2127,24 @@ const wn = { class: "flex flex-row flex-wrap gap-2" }, Dn = { class: "inline-fle
|
|
|
2127
2127
|
export {
|
|
2128
2128
|
Ie as I,
|
|
2129
2129
|
Ht as R,
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2130
|
+
en as _,
|
|
2131
|
+
Ya as a,
|
|
2132
|
+
Za as b,
|
|
2133
|
+
Xa as c,
|
|
2134
|
+
Wa as d,
|
|
2135
2135
|
jt as e,
|
|
2136
|
-
|
|
2137
|
-
|
|
2136
|
+
ga as f,
|
|
2137
|
+
Ha as g,
|
|
2138
2138
|
Jl as h,
|
|
2139
|
-
|
|
2140
|
-
|
|
2139
|
+
Ua as i,
|
|
2140
|
+
ua as j,
|
|
2141
2141
|
Zl as k,
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2142
|
+
Ja as l,
|
|
2143
|
+
Ka as m,
|
|
2144
|
+
ja as n,
|
|
2145
|
+
oa as q,
|
|
2146
|
+
Qa as r,
|
|
2147
|
+
ca as s,
|
|
2148
2148
|
Ut as t,
|
|
2149
2149
|
Zt as u
|
|
2150
2150
|
};
|