@kong-ui-public/dashboard-renderer 8.4.9 → 8.4.10
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/{GeoMapRenderer-DKr9rmZa.js → GeoMapRenderer-pyhBNd6Y.js} +1 -1
- package/dist/dashboard-renderer.es.js +1 -1
- package/dist/dashboard-renderer.umd.js +3 -3
- package/dist/{index-CcH0oQcL.js → index-CFMYxvTz.js} +544 -521
- package/dist/types/components/DashboardTilePreview.vue.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -4,16 +4,16 @@ var _t = (a) => {
|
|
|
4
4
|
};
|
|
5
5
|
var fi = (a, e, t) => e in a ? ci(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
6
6
|
var bt = (a, e, t) => fi(a, typeof e != "symbol" ? e + "" : e, t), st = (a, e, t) => e.has(a) || _t("Cannot " + t);
|
|
7
|
-
var v = (a, e, t) => (st(a, e, "read from private field"), t ? t.call(a) : e.get(a)), B = (a, e, t) => e.has(a) ? _t("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t),
|
|
7
|
+
var v = (a, e, t) => (st(a, e, "read from private field"), t ? t.call(a) : e.get(a)), B = (a, e, t) => e.has(a) ? _t("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t), q = (a, e, t, i) => (st(a, e, "write to private field"), i ? i.call(a, t) : e.set(a, t), t), U = (a, e, t) => (st(a, e, "access private method"), t);
|
|
8
8
|
var Se = (a, e, t, i) => ({
|
|
9
9
|
set _(s) {
|
|
10
|
-
|
|
10
|
+
q(a, e, s, t);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
13
|
return v(a, e, i);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { ref as
|
|
16
|
+
import { ref as O, watchEffect as Ot, inject as ve, provide as gi, onMounted as Xe, computed as R, watch as ze, onUnmounted as Ze, getCurrentInstance as mi, defineComponent as j, resolveComponent as he, createBlock as A, renderSlot as De, createCommentVNode as Q, unref as E, openBlock as x, createSlots as Je, withCtx as H, createElementVNode as Y, toDisplayString as te, normalizeStyle as nt, normalizeClass as Re, createVNode as ae, mergeProps as Ht, createTextVNode as ht, createElementBlock as G, normalizeProps as pi, guardReactiveProps as yi, defineAsyncComponent as It, mergeModels as Ge, useCssVars as ut, useModel as Mt, readonly as rt, toRef as Ne, nextTick as dt, resolveDynamicComponent as qt, toHandlers as vi, Fragment as Pt, renderList as $t, useTemplateRef as _i } from "vue";
|
|
17
17
|
import { msToGranularity as ot, getFieldDataSources as Bt, stripUnknownFilters as bi, TimePeriods as wi, TIMEFRAME_LOOKUP as Ei, formatTime as wt, EXPORT_RECORD_LIMIT as xi } from "@kong-ui-public/analytics-utilities";
|
|
18
18
|
import { handleQueryError as Ci, SimpleChart as Ri, AnalyticsChart as ki, TopNTable as Ti, CsvExportModal as Si } from "@kong-ui-public/analytics-chart";
|
|
19
19
|
import zi from "swrv";
|
|
@@ -28,8 +28,8 @@ const Bi = (a) => {
|
|
|
28
28
|
return a ? !!// TODO: revisit: currently only the first check ever matters?
|
|
29
29
|
((e = Object.keys(a)) != null && e.length || (t = a.data) != null && t.length || (s = (i = a.data) == null ? void 0 : i.data) != null && s.length || !((r = a.data) != null && r.data) && typeof a.data == "object" && Object.keys(a == null ? void 0 : a.data).length) : !1;
|
|
30
30
|
};
|
|
31
|
-
function Fi(a =
|
|
32
|
-
const s =
|
|
31
|
+
function Fi(a = O({}), e, t, i = Bi) {
|
|
32
|
+
const s = O(
|
|
33
33
|
"PENDING"
|
|
34
34
|
/* PENDING */
|
|
35
35
|
);
|
|
@@ -66,6 +66,10 @@ function Fi(a = L({}), e, t, i = Bi) {
|
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
const Ui = {
|
|
69
|
+
not_configured: {
|
|
70
|
+
title: "Chart is not fully configured",
|
|
71
|
+
description: "Begin by choosing at least one metric"
|
|
72
|
+
},
|
|
69
73
|
noQueryBridge: "No query bridge provided. Unable to render dashboard.",
|
|
70
74
|
trendRange: {
|
|
71
75
|
"24h": "Last 24-hour summary",
|
|
@@ -132,8 +136,8 @@ var Ut = { exports: {} };
|
|
|
132
136
|
function r(d, u, h, l, f) {
|
|
133
137
|
if (typeof h != "function")
|
|
134
138
|
throw new TypeError("The listener must be a function");
|
|
135
|
-
var g = new s(h, l || d, f),
|
|
136
|
-
return d._events[
|
|
139
|
+
var g = new s(h, l || d, f), m = t ? t + u : u;
|
|
140
|
+
return d._events[m] ? d._events[m].fn ? d._events[m] = [d._events[m], g] : d._events[m].push(g) : (d._events[m] = g, d._eventsCount++), d;
|
|
137
141
|
}
|
|
138
142
|
function o(d, u) {
|
|
139
143
|
--d._eventsCount === 0 ? d._events = new i() : delete d._events[u];
|
|
@@ -151,54 +155,54 @@ var Ut = { exports: {} };
|
|
|
151
155
|
var h = t ? t + u : u, l = this._events[h];
|
|
152
156
|
if (!l) return [];
|
|
153
157
|
if (l.fn) return [l.fn];
|
|
154
|
-
for (var f = 0, g = l.length,
|
|
155
|
-
|
|
156
|
-
return
|
|
158
|
+
for (var f = 0, g = l.length, m = new Array(g); f < g; f++)
|
|
159
|
+
m[f] = l[f].fn;
|
|
160
|
+
return m;
|
|
157
161
|
}, n.prototype.listenerCount = function(u) {
|
|
158
162
|
var h = t ? t + u : u, l = this._events[h];
|
|
159
163
|
return l ? l.fn ? 1 : l.length : 0;
|
|
160
|
-
}, n.prototype.emit = function(u, h, l, f, g,
|
|
164
|
+
}, n.prototype.emit = function(u, h, l, f, g, m) {
|
|
161
165
|
var y = t ? t + u : u;
|
|
162
166
|
if (!this._events[y]) return !1;
|
|
163
|
-
var
|
|
164
|
-
if (
|
|
165
|
-
switch (
|
|
167
|
+
var p = this._events[y], C = arguments.length, S, z;
|
|
168
|
+
if (p.fn) {
|
|
169
|
+
switch (p.once && this.removeListener(u, p.fn, void 0, !0), C) {
|
|
166
170
|
case 1:
|
|
167
|
-
return
|
|
171
|
+
return p.fn.call(p.context), !0;
|
|
168
172
|
case 2:
|
|
169
|
-
return
|
|
173
|
+
return p.fn.call(p.context, h), !0;
|
|
170
174
|
case 3:
|
|
171
|
-
return
|
|
175
|
+
return p.fn.call(p.context, h, l), !0;
|
|
172
176
|
case 4:
|
|
173
|
-
return
|
|
177
|
+
return p.fn.call(p.context, h, l, f), !0;
|
|
174
178
|
case 5:
|
|
175
|
-
return
|
|
179
|
+
return p.fn.call(p.context, h, l, f, g), !0;
|
|
176
180
|
case 6:
|
|
177
|
-
return
|
|
181
|
+
return p.fn.call(p.context, h, l, f, g, m), !0;
|
|
178
182
|
}
|
|
179
|
-
for (
|
|
180
|
-
|
|
181
|
-
|
|
183
|
+
for (z = 1, S = new Array(C - 1); z < C; z++)
|
|
184
|
+
S[z - 1] = arguments[z];
|
|
185
|
+
p.fn.apply(p.context, S);
|
|
182
186
|
} else {
|
|
183
|
-
var
|
|
184
|
-
for (
|
|
185
|
-
switch (
|
|
187
|
+
var W = p.length, F;
|
|
188
|
+
for (z = 0; z < W; z++)
|
|
189
|
+
switch (p[z].once && this.removeListener(u, p[z].fn, void 0, !0), C) {
|
|
186
190
|
case 1:
|
|
187
|
-
|
|
191
|
+
p[z].fn.call(p[z].context);
|
|
188
192
|
break;
|
|
189
193
|
case 2:
|
|
190
|
-
|
|
194
|
+
p[z].fn.call(p[z].context, h);
|
|
191
195
|
break;
|
|
192
196
|
case 3:
|
|
193
|
-
|
|
197
|
+
p[z].fn.call(p[z].context, h, l);
|
|
194
198
|
break;
|
|
195
199
|
case 4:
|
|
196
|
-
|
|
200
|
+
p[z].fn.call(p[z].context, h, l, f);
|
|
197
201
|
break;
|
|
198
202
|
default:
|
|
199
|
-
if (!
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
if (!S) for (F = 1, S = new Array(C - 1); F < C; F++)
|
|
204
|
+
S[F - 1] = arguments[F];
|
|
205
|
+
p[z].fn.apply(p[z].context, S);
|
|
202
206
|
}
|
|
203
207
|
}
|
|
204
208
|
return !0;
|
|
@@ -211,13 +215,13 @@ var Ut = { exports: {} };
|
|
|
211
215
|
if (!this._events[g]) return this;
|
|
212
216
|
if (!h)
|
|
213
217
|
return o(this, g), this;
|
|
214
|
-
var
|
|
215
|
-
if (
|
|
216
|
-
|
|
218
|
+
var m = this._events[g];
|
|
219
|
+
if (m.fn)
|
|
220
|
+
m.fn === h && (!f || m.once) && (!l || m.context === l) && o(this, g);
|
|
217
221
|
else {
|
|
218
|
-
for (var y = 0,
|
|
219
|
-
(
|
|
220
|
-
|
|
222
|
+
for (var y = 0, p = [], C = m.length; y < C; y++)
|
|
223
|
+
(m[y].fn !== h || f && !m[y].once || l && m[y].context !== l) && p.push(m[y]);
|
|
224
|
+
p.length ? this._events[g] = p.length === 1 ? p[0] : p : o(this, g);
|
|
221
225
|
}
|
|
222
226
|
return this;
|
|
223
227
|
}, n.prototype.removeAllListeners = function(u) {
|
|
@@ -296,10 +300,10 @@ function ls(a, e, t) {
|
|
|
296
300
|
}
|
|
297
301
|
return i;
|
|
298
302
|
}
|
|
299
|
-
var
|
|
303
|
+
var ie;
|
|
300
304
|
class hs {
|
|
301
305
|
constructor() {
|
|
302
|
-
B(this,
|
|
306
|
+
B(this, ie, []);
|
|
303
307
|
}
|
|
304
308
|
enqueue(e, t) {
|
|
305
309
|
t = {
|
|
@@ -311,53 +315,53 @@ class hs {
|
|
|
311
315
|
id: t.id,
|
|
312
316
|
run: e
|
|
313
317
|
};
|
|
314
|
-
if (this.size === 0 || v(this,
|
|
315
|
-
v(this,
|
|
318
|
+
if (this.size === 0 || v(this, ie)[this.size - 1].priority >= t.priority) {
|
|
319
|
+
v(this, ie).push(i);
|
|
316
320
|
return;
|
|
317
321
|
}
|
|
318
|
-
const s = ls(v(this,
|
|
319
|
-
v(this,
|
|
322
|
+
const s = ls(v(this, ie), i, (r, o) => o.priority - r.priority);
|
|
323
|
+
v(this, ie).splice(s, 0, i);
|
|
320
324
|
}
|
|
321
325
|
setPriority(e, t) {
|
|
322
|
-
const i = v(this,
|
|
326
|
+
const i = v(this, ie).findIndex((r) => r.id === e);
|
|
323
327
|
if (i === -1)
|
|
324
328
|
throw new ReferenceError(`No promise function with the id "${e}" exists in the queue.`);
|
|
325
|
-
const [s] = v(this,
|
|
329
|
+
const [s] = v(this, ie).splice(i, 1);
|
|
326
330
|
this.enqueue(s.run, { priority: t, id: e });
|
|
327
331
|
}
|
|
328
332
|
dequeue() {
|
|
329
|
-
const e = v(this,
|
|
333
|
+
const e = v(this, ie).shift();
|
|
330
334
|
return e == null ? void 0 : e.run;
|
|
331
335
|
}
|
|
332
336
|
filter(e) {
|
|
333
|
-
return v(this,
|
|
337
|
+
return v(this, ie).filter((t) => t.priority === e.priority).map((t) => t.run);
|
|
334
338
|
}
|
|
335
339
|
get size() {
|
|
336
|
-
return v(this,
|
|
340
|
+
return v(this, ie).length;
|
|
337
341
|
}
|
|
338
342
|
}
|
|
339
|
-
|
|
340
|
-
var be, we, pe, Oe, Ee, He,
|
|
343
|
+
ie = new WeakMap();
|
|
344
|
+
var be, we, pe, Oe, Ee, He, se, xe, V, Ie, re, Ce, me, Me, je, N, Wt, Kt, Qt, Vt, Yt, Be, at, lt, Fe, jt, Ue;
|
|
341
345
|
class us extends ns {
|
|
342
346
|
// TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
|
|
343
347
|
constructor(t) {
|
|
344
348
|
var i, s;
|
|
345
349
|
super();
|
|
346
|
-
B(this,
|
|
350
|
+
B(this, N);
|
|
347
351
|
B(this, be);
|
|
348
352
|
B(this, we);
|
|
349
353
|
B(this, pe, 0);
|
|
350
354
|
B(this, Oe);
|
|
351
355
|
B(this, Ee);
|
|
352
356
|
B(this, He, 0);
|
|
353
|
-
B(this,
|
|
357
|
+
B(this, se);
|
|
354
358
|
B(this, xe);
|
|
355
|
-
B(this,
|
|
359
|
+
B(this, V);
|
|
356
360
|
B(this, Ie);
|
|
357
|
-
B(this,
|
|
361
|
+
B(this, re, 0);
|
|
358
362
|
// The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
|
|
359
363
|
B(this, Ce);
|
|
360
|
-
B(this,
|
|
364
|
+
B(this, me);
|
|
361
365
|
B(this, Me);
|
|
362
366
|
// Use to assign a unique identifier to a promise function, if not explicitly specified
|
|
363
367
|
B(this, je, 1n);
|
|
@@ -379,7 +383,7 @@ class us extends ns {
|
|
|
379
383
|
throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${((i = t.intervalCap) == null ? void 0 : i.toString()) ?? ""}\` (${typeof t.intervalCap})`);
|
|
380
384
|
if (t.interval === void 0 || !(Number.isFinite(t.interval) && t.interval >= 0))
|
|
381
385
|
throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${((s = t.interval) == null ? void 0 : s.toString()) ?? ""}\` (${typeof t.interval})`);
|
|
382
|
-
|
|
386
|
+
q(this, be, t.carryoverConcurrencyCount), q(this, we, t.intervalCap === Number.POSITIVE_INFINITY || t.interval === 0), q(this, Oe, t.intervalCap), q(this, Ee, t.interval), q(this, V, new t.queueClass()), q(this, Ie, t.queueClass), this.concurrency = t.concurrency, this.timeout = t.timeout, q(this, Me, t.throwOnTimeout === !0), q(this, me, t.autoStart === !1);
|
|
383
387
|
}
|
|
384
388
|
get concurrency() {
|
|
385
389
|
return v(this, Ce);
|
|
@@ -387,7 +391,7 @@ class us extends ns {
|
|
|
387
391
|
set concurrency(t) {
|
|
388
392
|
if (!(typeof t == "number" && t >= 1))
|
|
389
393
|
throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);
|
|
390
|
-
|
|
394
|
+
q(this, Ce, t), U(this, N, Fe).call(this);
|
|
391
395
|
}
|
|
392
396
|
/**
|
|
393
397
|
Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.
|
|
@@ -426,7 +430,7 @@ class us extends ns {
|
|
|
426
430
|
Here, the promise function with `id: '🦀'` executes last.
|
|
427
431
|
*/
|
|
428
432
|
setPriority(t, i) {
|
|
429
|
-
v(this,
|
|
433
|
+
v(this, V).setPriority(t, i);
|
|
430
434
|
}
|
|
431
435
|
async add(t, i = {}) {
|
|
432
436
|
return i.id ?? (i.id = (Se(this, je)._++).toString()), i = {
|
|
@@ -434,13 +438,13 @@ class us extends ns {
|
|
|
434
438
|
throwOnTimeout: v(this, Me),
|
|
435
439
|
...i
|
|
436
440
|
}, new Promise((s, r) => {
|
|
437
|
-
v(this,
|
|
441
|
+
v(this, V).enqueue(async () => {
|
|
438
442
|
var o;
|
|
439
|
-
Se(this,
|
|
443
|
+
Se(this, re)._++;
|
|
440
444
|
try {
|
|
441
445
|
(o = i.signal) == null || o.throwIfAborted(), Se(this, pe)._++;
|
|
442
446
|
let n = t({ signal: i.signal });
|
|
443
|
-
i.timeout && (n = as(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, U(this,
|
|
447
|
+
i.timeout && (n = as(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, U(this, N, jt).call(this, i.signal)]));
|
|
444
448
|
const d = await n;
|
|
445
449
|
s(d), this.emit("completed", d);
|
|
446
450
|
} catch (n) {
|
|
@@ -450,9 +454,9 @@ class us extends ns {
|
|
|
450
454
|
}
|
|
451
455
|
r(n), this.emit("error", n);
|
|
452
456
|
} finally {
|
|
453
|
-
U(this,
|
|
457
|
+
U(this, N, Qt).call(this);
|
|
454
458
|
}
|
|
455
|
-
}, i), this.emit("add"), U(this,
|
|
459
|
+
}, i), this.emit("add"), U(this, N, Be).call(this);
|
|
456
460
|
});
|
|
457
461
|
}
|
|
458
462
|
async addAll(t, i) {
|
|
@@ -462,19 +466,19 @@ class us extends ns {
|
|
|
462
466
|
Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.)
|
|
463
467
|
*/
|
|
464
468
|
start() {
|
|
465
|
-
return v(this,
|
|
469
|
+
return v(this, me) ? (q(this, me, !1), U(this, N, Fe).call(this), this) : this;
|
|
466
470
|
}
|
|
467
471
|
/**
|
|
468
472
|
Put queue execution on hold.
|
|
469
473
|
*/
|
|
470
474
|
pause() {
|
|
471
|
-
|
|
475
|
+
q(this, me, !0);
|
|
472
476
|
}
|
|
473
477
|
/**
|
|
474
478
|
Clear the queue.
|
|
475
479
|
*/
|
|
476
480
|
clear() {
|
|
477
|
-
|
|
481
|
+
q(this, V, new (v(this, Ie))());
|
|
478
482
|
}
|
|
479
483
|
/**
|
|
480
484
|
Can be called multiple times. Useful if you for example add additional items at a later time.
|
|
@@ -482,7 +486,7 @@ class us extends ns {
|
|
|
482
486
|
@returns A promise that settles when the queue becomes empty.
|
|
483
487
|
*/
|
|
484
488
|
async onEmpty() {
|
|
485
|
-
v(this,
|
|
489
|
+
v(this, V).size !== 0 && await U(this, N, Ue).call(this, "empty");
|
|
486
490
|
}
|
|
487
491
|
/**
|
|
488
492
|
@returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.
|
|
@@ -492,7 +496,7 @@ class us extends ns {
|
|
|
492
496
|
Note that this only limits the number of items waiting to start. There could still be up to `concurrency` jobs already running that this call does not include in its calculation.
|
|
493
497
|
*/
|
|
494
498
|
async onSizeLessThan(t) {
|
|
495
|
-
v(this,
|
|
499
|
+
v(this, V).size < t || await U(this, N, Ue).call(this, "next", () => v(this, V).size < t);
|
|
496
500
|
}
|
|
497
501
|
/**
|
|
498
502
|
The difference with `.onEmpty` is that `.onIdle` guarantees that all work from the queue has finished. `.onEmpty` merely signals that the queue is empty, but it could mean that some promises haven't completed yet.
|
|
@@ -500,13 +504,13 @@ class us extends ns {
|
|
|
500
504
|
@returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
|
|
501
505
|
*/
|
|
502
506
|
async onIdle() {
|
|
503
|
-
v(this,
|
|
507
|
+
v(this, re) === 0 && v(this, V).size === 0 || await U(this, N, Ue).call(this, "idle");
|
|
504
508
|
}
|
|
505
509
|
/**
|
|
506
510
|
Size of the queue, the number of queued items waiting to run.
|
|
507
511
|
*/
|
|
508
512
|
get size() {
|
|
509
|
-
return v(this,
|
|
513
|
+
return v(this, V).size;
|
|
510
514
|
}
|
|
511
515
|
/**
|
|
512
516
|
Size of the queue, filtered by the given options.
|
|
@@ -514,63 +518,63 @@ class us extends ns {
|
|
|
514
518
|
For example, this can be used to find the number of items remaining in the queue with a specific priority level.
|
|
515
519
|
*/
|
|
516
520
|
sizeBy(t) {
|
|
517
|
-
return v(this,
|
|
521
|
+
return v(this, V).filter(t).length;
|
|
518
522
|
}
|
|
519
523
|
/**
|
|
520
524
|
Number of running items (no longer in the queue).
|
|
521
525
|
*/
|
|
522
526
|
get pending() {
|
|
523
|
-
return v(this,
|
|
527
|
+
return v(this, re);
|
|
524
528
|
}
|
|
525
529
|
/**
|
|
526
530
|
Whether the queue is currently paused.
|
|
527
531
|
*/
|
|
528
532
|
get isPaused() {
|
|
529
|
-
return v(this,
|
|
533
|
+
return v(this, me);
|
|
530
534
|
}
|
|
531
535
|
}
|
|
532
|
-
be = new WeakMap(), we = new WeakMap(), pe = new WeakMap(), Oe = new WeakMap(), Ee = new WeakMap(), He = new WeakMap(),
|
|
536
|
+
be = new WeakMap(), we = new WeakMap(), pe = new WeakMap(), Oe = new WeakMap(), Ee = new WeakMap(), He = new WeakMap(), se = new WeakMap(), xe = new WeakMap(), V = new WeakMap(), Ie = new WeakMap(), re = new WeakMap(), Ce = new WeakMap(), me = new WeakMap(), Me = new WeakMap(), je = new WeakMap(), N = new WeakSet(), Wt = function() {
|
|
533
537
|
return v(this, we) || v(this, pe) < v(this, Oe);
|
|
534
538
|
}, Kt = function() {
|
|
535
|
-
return v(this,
|
|
539
|
+
return v(this, re) < v(this, Ce);
|
|
536
540
|
}, Qt = function() {
|
|
537
|
-
Se(this,
|
|
541
|
+
Se(this, re)._--, U(this, N, Be).call(this), this.emit("next");
|
|
538
542
|
}, Vt = function() {
|
|
539
|
-
U(this,
|
|
543
|
+
U(this, N, lt).call(this), U(this, N, at).call(this), q(this, xe, void 0);
|
|
540
544
|
}, Yt = function() {
|
|
541
545
|
const t = Date.now();
|
|
542
|
-
if (v(this,
|
|
546
|
+
if (v(this, se) === void 0) {
|
|
543
547
|
const i = v(this, He) - t;
|
|
544
548
|
if (i < 0)
|
|
545
|
-
|
|
549
|
+
q(this, pe, v(this, be) ? v(this, re) : 0);
|
|
546
550
|
else
|
|
547
|
-
return v(this, xe) === void 0 &&
|
|
548
|
-
U(this,
|
|
551
|
+
return v(this, xe) === void 0 && q(this, xe, setTimeout(() => {
|
|
552
|
+
U(this, N, Vt).call(this);
|
|
549
553
|
}, i)), !0;
|
|
550
554
|
}
|
|
551
555
|
return !1;
|
|
552
556
|
}, Be = function() {
|
|
553
|
-
if (v(this,
|
|
554
|
-
return v(this,
|
|
555
|
-
if (!v(this,
|
|
556
|
-
const t = !v(this,
|
|
557
|
-
if (v(this,
|
|
558
|
-
const i = v(this,
|
|
559
|
-
return i ? (this.emit("active"), i(), t && U(this,
|
|
557
|
+
if (v(this, V).size === 0)
|
|
558
|
+
return v(this, se) && clearInterval(v(this, se)), q(this, se, void 0), this.emit("empty"), v(this, re) === 0 && this.emit("idle"), !1;
|
|
559
|
+
if (!v(this, me)) {
|
|
560
|
+
const t = !v(this, N, Yt);
|
|
561
|
+
if (v(this, N, Wt) && v(this, N, Kt)) {
|
|
562
|
+
const i = v(this, V).dequeue();
|
|
563
|
+
return i ? (this.emit("active"), i(), t && U(this, N, at).call(this), !0) : !1;
|
|
560
564
|
}
|
|
561
565
|
}
|
|
562
566
|
return !1;
|
|
563
567
|
}, at = function() {
|
|
564
|
-
v(this, we) || v(this,
|
|
565
|
-
U(this,
|
|
566
|
-
}, v(this, Ee))),
|
|
568
|
+
v(this, we) || v(this, se) !== void 0 || (q(this, se, setInterval(() => {
|
|
569
|
+
U(this, N, lt).call(this);
|
|
570
|
+
}, v(this, Ee))), q(this, He, Date.now() + v(this, Ee)));
|
|
567
571
|
}, lt = function() {
|
|
568
|
-
v(this, pe) === 0 && v(this,
|
|
572
|
+
v(this, pe) === 0 && v(this, re) === 0 && v(this, se) && (clearInterval(v(this, se)), q(this, se, void 0)), q(this, pe, v(this, be) ? v(this, re) : 0), U(this, N, Fe).call(this);
|
|
569
573
|
}, /**
|
|
570
574
|
Executes all queued functions until it reaches the limit.
|
|
571
575
|
*/
|
|
572
576
|
Fe = function() {
|
|
573
|
-
for (; U(this,
|
|
577
|
+
for (; U(this, N, Be).call(this); )
|
|
574
578
|
;
|
|
575
579
|
}, jt = async function(t) {
|
|
576
580
|
return new Promise((i, s) => {
|
|
@@ -612,72 +616,72 @@ function cs({
|
|
|
612
616
|
definition: t,
|
|
613
617
|
chartData: i
|
|
614
618
|
}) {
|
|
615
|
-
const s =
|
|
619
|
+
const s = O(""), r = O(""), o = O(void 0), n = O(void 0), d = qe();
|
|
616
620
|
Xe(async () => {
|
|
617
|
-
var
|
|
618
|
-
s.value = await ((
|
|
621
|
+
var D, I;
|
|
622
|
+
s.value = await ((D = a == null ? void 0 : a.exploreBaseUrl) == null ? void 0 : D.call(a)) ?? "", r.value = await ((I = a == null ? void 0 : a.requestsBaseUrl) == null ? void 0 : I.call(a)) ?? "";
|
|
619
623
|
});
|
|
620
|
-
const u =
|
|
621
|
-
var
|
|
622
|
-
const
|
|
623
|
-
return
|
|
624
|
-
}), y =
|
|
624
|
+
const u = R(() => d.analytics && d.percentiles), h = R(() => !["golden_signals", "top_n", "gauge"].includes(t.value.chart.type)), l = R(() => r.value && t.value.query && t.value.query.datasource !== "llm_usage" && u.value), f = R(() => s.value && t.value.query && ["basic", "api_usage", "llm_usage", void 0].includes(t.value.query.datasource) && u.value), g = R(() => i.value ? ot(i.value.meta.granularity_ms) : void 0), m = R(() => {
|
|
625
|
+
var X;
|
|
626
|
+
const D = [...e.value.filters, ...t.value.query.filters ?? []], I = ((X = t.value.query) == null ? void 0 : X.datasource) ?? "api_usage";
|
|
627
|
+
return D.filter((fe) => Bt(fe.field).some((ke) => I === ke));
|
|
628
|
+
}), y = R(() => {
|
|
625
629
|
if (!f.value || !h.value)
|
|
626
630
|
return "";
|
|
627
|
-
const
|
|
628
|
-
return F(
|
|
629
|
-
}),
|
|
631
|
+
const D = m.value, I = t.value.query.time_range || e.value.timeSpec, X = W(I, D);
|
|
632
|
+
return F(X);
|
|
633
|
+
}), p = R(() => {
|
|
630
634
|
if (!l.value || !h.value)
|
|
631
635
|
return "";
|
|
632
|
-
const
|
|
636
|
+
const D = m.value, I = S(
|
|
633
637
|
t.value.query.time_range || e.value.timeSpec,
|
|
634
|
-
|
|
638
|
+
D
|
|
635
639
|
);
|
|
636
|
-
return C(
|
|
637
|
-
}), C = (
|
|
638
|
-
var
|
|
640
|
+
return C(I);
|
|
641
|
+
}), C = (D) => l.value ? `${r.value}?q=${JSON.stringify(D)}` : "", S = (D, I) => {
|
|
642
|
+
var X, fe;
|
|
639
643
|
return {
|
|
640
|
-
filter:
|
|
644
|
+
filter: I,
|
|
641
645
|
timeframe: {
|
|
642
|
-
timePeriodsKey:
|
|
643
|
-
start:
|
|
644
|
-
end:
|
|
646
|
+
timePeriodsKey: D.type === "relative" ? D.time_range : "custom",
|
|
647
|
+
start: D.type === "absolute" ? (X = i.value) == null ? void 0 : X.meta.start_ms : void 0,
|
|
648
|
+
end: D.type === "absolute" ? (fe = i.value) == null ? void 0 : fe.meta.end_ms : void 0
|
|
645
649
|
}
|
|
646
650
|
};
|
|
647
|
-
},
|
|
648
|
-
filter:
|
|
651
|
+
}, z = (D, I) => ({
|
|
652
|
+
filter: I,
|
|
649
653
|
timeframe: {
|
|
650
|
-
timePeriodsKey:
|
|
651
|
-
start:
|
|
652
|
-
end:
|
|
654
|
+
timePeriodsKey: D.type === "relative" ? D.time_range : "custom",
|
|
655
|
+
start: D.type === "absolute" ? D.start : void 0,
|
|
656
|
+
end: D.type === "absolute" ? D.end : void 0
|
|
653
657
|
}
|
|
654
|
-
}),
|
|
655
|
-
const
|
|
658
|
+
}), W = (D, I) => {
|
|
659
|
+
const X = t.value.query.dimensions ?? [];
|
|
656
660
|
return {
|
|
657
|
-
filters:
|
|
661
|
+
filters: I,
|
|
658
662
|
metrics: t.value.query.metrics ?? [],
|
|
659
|
-
dimensions:
|
|
660
|
-
time_range:
|
|
663
|
+
dimensions: X,
|
|
664
|
+
time_range: D,
|
|
661
665
|
granularity: t.value.query.granularity || g.value
|
|
662
666
|
};
|
|
663
|
-
}, F = (
|
|
667
|
+
}, F = (D) => {
|
|
664
668
|
if (!f.value)
|
|
665
669
|
return "";
|
|
666
|
-
const
|
|
667
|
-
return `${s.value}?q=${JSON.stringify(
|
|
670
|
+
const I = ["api_usage", "llm_usage"].includes(t.value.query.datasource) ? t.value.query.datasource : "api_usage";
|
|
671
|
+
return `${s.value}?q=${JSON.stringify(D)}&d=${I}&c=${t.value.chart.type}`;
|
|
668
672
|
};
|
|
669
|
-
return ze([l, f], ([
|
|
670
|
-
|
|
673
|
+
return ze([l, f], ([D, I]) => {
|
|
674
|
+
D && (o.value = { href: "" }), I && (n.value = { href: "" });
|
|
671
675
|
}), {
|
|
672
676
|
exploreLinkKebabMenu: y,
|
|
673
|
-
requestsLinkKebabMenu:
|
|
677
|
+
requestsLinkKebabMenu: p,
|
|
674
678
|
canShowKebabMenu: h,
|
|
675
679
|
canGenerateRequestsLink: l,
|
|
676
680
|
canGenerateExploreLink: f,
|
|
677
681
|
requestsLinkZoomActions: o,
|
|
678
682
|
exploreLinkZoomActions: n,
|
|
679
|
-
buildExploreQuery:
|
|
680
|
-
buildRequestsQueryZoomActions:
|
|
683
|
+
buildExploreQuery: W,
|
|
684
|
+
buildRequestsQueryZoomActions: z,
|
|
681
685
|
buildExploreLink: F,
|
|
682
686
|
buildRequestLink: C
|
|
683
687
|
};
|
|
@@ -720,28 +724,28 @@ function gs() {
|
|
|
720
724
|
}
|
|
721
725
|
function ms({
|
|
722
726
|
context: a,
|
|
723
|
-
globalFilters: e =
|
|
724
|
-
isFullscreen: t =
|
|
727
|
+
globalFilters: e = O([]),
|
|
728
|
+
isFullscreen: t = O(!1)
|
|
725
729
|
}) {
|
|
726
|
-
const i = qe(), s =
|
|
730
|
+
const i = qe(), s = R(() => a.value.timeSpec ? a.value.timeSpec : {
|
|
727
731
|
type: "relative",
|
|
728
732
|
time_range: i.defaultQueryTimeForOrg
|
|
729
733
|
});
|
|
730
734
|
return {
|
|
731
|
-
internalContext:
|
|
735
|
+
internalContext: R(() => {
|
|
732
736
|
var l, f, g;
|
|
733
737
|
let { tz: o, refreshInterval: n, editable: d } = a.value;
|
|
734
738
|
const u = [...a.value.filters ?? [], ...e.value];
|
|
735
739
|
if (o || (o = new Intl.DateTimeFormat().resolvedOptions().timeZone), n === void 0 && (n = Ji), t.value) {
|
|
736
|
-
let
|
|
740
|
+
let m = !1;
|
|
737
741
|
if (s.value.type === "relative")
|
|
738
|
-
|
|
742
|
+
m = ["15m", "1h", "6h", "12h", "24h"].includes(s.value.time_range);
|
|
739
743
|
else {
|
|
740
|
-
const C = s.value.start.getTime(),
|
|
741
|
-
|
|
744
|
+
const C = s.value.start.getTime(), S = s.value.end.getTime();
|
|
745
|
+
m = Math.abs(S - C) <= 864e5;
|
|
742
746
|
}
|
|
743
747
|
const y = (/* @__PURE__ */ new Date()).getTime();
|
|
744
|
-
s.value.type === "absolute" && s.value.end.getTime() < y || s.value.type === "relative" && ["previous_week", "previous_month"].includes(s.value.time_range) ? n = 0 :
|
|
748
|
+
s.value.type === "absolute" && s.value.end.getTime() < y || s.value.type === "relative" && ["previous_week", "previous_month"].includes(s.value.time_range) ? n = 0 : m ? n = es : n = ts;
|
|
745
749
|
}
|
|
746
750
|
d === void 0 && (d = !1);
|
|
747
751
|
const h = !!((g = (f = (l = mi()) == null ? void 0 : l.vnode) == null ? void 0 : f.props) != null && g.onTileTimeRangeZoom);
|
|
@@ -756,14 +760,14 @@ function ms({
|
|
|
756
760
|
})
|
|
757
761
|
};
|
|
758
762
|
}
|
|
759
|
-
const
|
|
763
|
+
const ce = {
|
|
760
764
|
useContextLinks: cs,
|
|
761
765
|
useDashboardInternalContext: ms,
|
|
762
766
|
useEvaluateFeatureFlag: is,
|
|
763
767
|
useI18n: ji,
|
|
764
768
|
useIssueQuery: gs,
|
|
765
769
|
useRequestQueue: ds
|
|
766
|
-
}, ft = /* @__PURE__ */
|
|
770
|
+
}, ft = /* @__PURE__ */ j({
|
|
767
771
|
__name: "QueryDataProvider",
|
|
768
772
|
props: {
|
|
769
773
|
context: {},
|
|
@@ -774,7 +778,7 @@ const me = {
|
|
|
774
778
|
},
|
|
775
779
|
emits: ["chart-data", "queryComplete"],
|
|
776
780
|
setup(a, { emit: e }) {
|
|
777
|
-
const t = a, i = e, { issueQuery: s } =
|
|
781
|
+
const t = a, i = e, { issueQuery: s } = ce.useIssueQuery(), r = ve(ye), o = () => t.queryReady && r ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, { data: n, error: d, isValidating: u } = zi(o, async () => {
|
|
778
782
|
try {
|
|
779
783
|
const y = await s(t.query, t.context, t.limitOverride);
|
|
780
784
|
return f.value = null, y;
|
|
@@ -787,42 +791,42 @@ const me = {
|
|
|
787
791
|
refreshInterval: t.context.refreshInterval,
|
|
788
792
|
revalidateOnFocus: !1,
|
|
789
793
|
shouldRetryOnError: !1
|
|
790
|
-
}), { state: h, swrvState: l } = Fi(n, d, u), f =
|
|
791
|
-
return ze([() => n.value, () => h.value], ([y,
|
|
792
|
-
y && (
|
|
793
|
-
}), (y,
|
|
794
|
-
const C =
|
|
795
|
-
return
|
|
794
|
+
}), { state: h, swrvState: l } = Fi(n, d, u), f = O(null), g = R(() => h.value === l.ERROR || !!f.value), m = R(() => !t.queryReady || h.value === l.PENDING);
|
|
795
|
+
return ze([() => n.value, () => h.value], ([y, p]) => {
|
|
796
|
+
y && (p === "SUCCESS_HAS_DATA" || p === "SUCCESS") && i("chart-data", y);
|
|
797
|
+
}), (y, p) => {
|
|
798
|
+
const C = he("KSkeleton"), S = he("KEmptyState");
|
|
799
|
+
return m.value || !E(n) && !g.value ? (x(), A(C, {
|
|
796
800
|
key: 0,
|
|
797
801
|
class: "chart-skeleton",
|
|
798
802
|
type: "table"
|
|
799
|
-
})) : g.value && f.value ? (x(),
|
|
803
|
+
})) : g.value && f.value ? (x(), A(S, {
|
|
800
804
|
key: 1,
|
|
801
805
|
"action-button-visible": !1,
|
|
802
806
|
"data-testid": "chart-empty-state"
|
|
803
807
|
}, Je({
|
|
804
|
-
icon:
|
|
805
|
-
f.value.type === "forbidden" ? (x(),
|
|
808
|
+
icon: H(() => [
|
|
809
|
+
f.value.type === "forbidden" ? (x(), A(E(Li), { key: 0 })) : (x(), A(E(Ai), { key: 1 }))
|
|
806
810
|
]),
|
|
807
|
-
title:
|
|
808
|
-
|
|
811
|
+
title: H(() => [
|
|
812
|
+
Y("p", null, te(f.value.message), 1)
|
|
809
813
|
]),
|
|
810
814
|
_: 2
|
|
811
815
|
}, [
|
|
812
816
|
f.value.details ? {
|
|
813
817
|
name: "default",
|
|
814
|
-
fn:
|
|
815
|
-
|
|
818
|
+
fn: H(() => [
|
|
819
|
+
Y("p", null, te(f.value.details), 1)
|
|
816
820
|
]),
|
|
817
821
|
key: "0"
|
|
818
822
|
} : void 0
|
|
819
823
|
]), 1024)) : E(n) ? De(y.$slots, "default", {
|
|
820
824
|
key: 2,
|
|
821
825
|
data: E(n)
|
|
822
|
-
}) :
|
|
826
|
+
}) : Q("", !0);
|
|
823
827
|
};
|
|
824
828
|
}
|
|
825
|
-
}), ps = /* @__PURE__ */
|
|
829
|
+
}), ps = /* @__PURE__ */ j({
|
|
826
830
|
__name: "SimpleChartRenderer",
|
|
827
831
|
props: {
|
|
828
832
|
query: {},
|
|
@@ -835,19 +839,19 @@ const me = {
|
|
|
835
839
|
exploreLink: {}
|
|
836
840
|
},
|
|
837
841
|
setup(a) {
|
|
838
|
-
const e = a, t =
|
|
839
|
-
return (i, s) => (x(),
|
|
842
|
+
const e = a, t = R(() => e.chartOptions.type === "single_value");
|
|
843
|
+
return (i, s) => (x(), A(ft, {
|
|
840
844
|
context: a.context,
|
|
841
845
|
query: a.query,
|
|
842
846
|
"query-ready": a.queryReady,
|
|
843
847
|
"refresh-counter": a.refreshCounter
|
|
844
848
|
}, {
|
|
845
|
-
default:
|
|
846
|
-
|
|
849
|
+
default: H(({ data: r }) => [
|
|
850
|
+
Y("div", {
|
|
847
851
|
class: Re(["analytics-chart", { "single-value": t.value }]),
|
|
848
852
|
style: nt({ height: `${a.height}px` })
|
|
849
853
|
}, [
|
|
850
|
-
|
|
854
|
+
ae(E(Ri), {
|
|
851
855
|
"chart-data": r,
|
|
852
856
|
"chart-options": a.chartOptions,
|
|
853
857
|
"synthetics-data-key": t.value ? void 0 : a.chartOptions.synthetics_data_key
|
|
@@ -862,7 +866,7 @@ const me = {
|
|
|
862
866
|
for (const [i, s] of e)
|
|
863
867
|
t[i] = s;
|
|
864
868
|
return t;
|
|
865
|
-
}, Rt = /* @__PURE__ */ _e(ps, [["__scopeId", "data-v-5304442e"]]), ys = { class: "analytics-chart" }, vs = /* @__PURE__ */
|
|
869
|
+
}, Rt = /* @__PURE__ */ _e(ps, [["__scopeId", "data-v-5304442e"]]), ys = { class: "analytics-chart" }, vs = /* @__PURE__ */ j({
|
|
866
870
|
__name: "BaseAnalyticsChartRenderer",
|
|
867
871
|
props: {
|
|
868
872
|
query: {},
|
|
@@ -877,29 +881,29 @@ const me = {
|
|
|
877
881
|
},
|
|
878
882
|
emits: ["edit-tile", "chart-data", "zoom-time-range", "view-requests", "select-chart-range"],
|
|
879
883
|
setup(a, { emit: e }) {
|
|
880
|
-
const t = a, i = e, { i18n: s } =
|
|
884
|
+
const t = a, i = e, { i18n: s } = ce.useI18n(), r = R(() => ({
|
|
881
885
|
type: t.chartOptions.type,
|
|
882
886
|
stacked: t.chartOptions.stacked ?? !1,
|
|
883
887
|
chartDatasetColors: t.chartOptions.chart_dataset_colors,
|
|
884
888
|
threshold: t.chartOptions.threshold,
|
|
885
889
|
hideTruncationWarning: t.query.limit !== void 0 && t.query.limit > 0
|
|
886
|
-
})), o =
|
|
890
|
+
})), o = R(() => t.context.zoomable), n = () => {
|
|
887
891
|
i("edit-tile");
|
|
888
892
|
}, d = (u) => {
|
|
889
893
|
i("chart-data", u);
|
|
890
894
|
};
|
|
891
895
|
return (u, h) => {
|
|
892
|
-
const l =
|
|
893
|
-
return x(),
|
|
896
|
+
const l = he("KDropdownItem");
|
|
897
|
+
return x(), A(ft, {
|
|
894
898
|
context: a.context,
|
|
895
899
|
query: a.query,
|
|
896
900
|
"query-ready": a.queryReady,
|
|
897
901
|
"refresh-counter": a.refreshCounter,
|
|
898
902
|
onChartData: d
|
|
899
903
|
}, {
|
|
900
|
-
default:
|
|
901
|
-
|
|
902
|
-
|
|
904
|
+
default: H(({ data: f }) => [
|
|
905
|
+
Y("div", ys, [
|
|
906
|
+
ae(E(ki), Ht({
|
|
903
907
|
"chart-data": f,
|
|
904
908
|
"chart-options": r.value,
|
|
905
909
|
"explore-link": a.exploreLink,
|
|
@@ -914,10 +918,10 @@ const me = {
|
|
|
914
918
|
}), Je({ _: 2 }, [
|
|
915
919
|
a.context.editable ? {
|
|
916
920
|
name: "menu-items",
|
|
917
|
-
fn:
|
|
918
|
-
|
|
919
|
-
default:
|
|
920
|
-
ht(
|
|
921
|
+
fn: H(() => [
|
|
922
|
+
ae(l, { onClick: n }, {
|
|
923
|
+
default: H(() => [
|
|
924
|
+
ht(te(E(s).t("renderer.edit")), 1)
|
|
921
925
|
]),
|
|
922
926
|
_: 1
|
|
923
927
|
})
|
|
@@ -931,7 +935,7 @@ const me = {
|
|
|
931
935
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]);
|
|
932
936
|
};
|
|
933
937
|
}
|
|
934
|
-
}), gt = /* @__PURE__ */ _e(vs, [["__scopeId", "data-v-52357845"]]), kt = /* @__PURE__ */
|
|
938
|
+
}), gt = /* @__PURE__ */ _e(vs, [["__scopeId", "data-v-52357845"]]), kt = /* @__PURE__ */ j({
|
|
935
939
|
__name: "BarChartRenderer",
|
|
936
940
|
props: {
|
|
937
941
|
query: {},
|
|
@@ -944,7 +948,7 @@ const me = {
|
|
|
944
948
|
exploreLink: {}
|
|
945
949
|
},
|
|
946
950
|
setup(a) {
|
|
947
|
-
return (e, t) => (x(),
|
|
951
|
+
return (e, t) => (x(), A(gt, {
|
|
948
952
|
"chart-options": a.chartOptions,
|
|
949
953
|
context: a.context,
|
|
950
954
|
"extra-props": { showAnnotations: !1 },
|
|
@@ -954,7 +958,7 @@ const me = {
|
|
|
954
958
|
"refresh-counter": a.refreshCounter
|
|
955
959
|
}, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
|
|
956
960
|
}
|
|
957
|
-
}), Tt = /* @__PURE__ */
|
|
961
|
+
}), Tt = /* @__PURE__ */ j({
|
|
958
962
|
__name: "TimeseriesChartRenderer",
|
|
959
963
|
props: {
|
|
960
964
|
query: {},
|
|
@@ -969,7 +973,7 @@ const me = {
|
|
|
969
973
|
emits: ["zoom-time-range", "select-chart-range"],
|
|
970
974
|
setup(a, { emit: e }) {
|
|
971
975
|
const t = e;
|
|
972
|
-
return (i, s) => (x(),
|
|
976
|
+
return (i, s) => (x(), A(gt, {
|
|
973
977
|
"chart-options": a.chartOptions,
|
|
974
978
|
context: a.context,
|
|
975
979
|
"explore-link": a.exploreLink,
|
|
@@ -982,7 +986,7 @@ const me = {
|
|
|
982
986
|
onZoomTimeRange: s[1] || (s[1] = (r) => t("zoom-time-range", r))
|
|
983
987
|
}, null, 8, ["chart-options", "context", "explore-link", "height", "query", "query-ready", "refresh-counter", "requests-link"]));
|
|
984
988
|
}
|
|
985
|
-
}), _s = /* @__PURE__ */
|
|
989
|
+
}), _s = /* @__PURE__ */ j({
|
|
986
990
|
__name: "GoldenSignalsRenderer",
|
|
987
991
|
props: {
|
|
988
992
|
query: {},
|
|
@@ -995,7 +999,7 @@ const me = {
|
|
|
995
999
|
exploreLink: {}
|
|
996
1000
|
},
|
|
997
1001
|
setup(a) {
|
|
998
|
-
const e = a, t =
|
|
1002
|
+
const e = a, t = R(() => {
|
|
999
1003
|
var s, r;
|
|
1000
1004
|
const i = (s = e.query) == null ? void 0 : s.datasource;
|
|
1001
1005
|
if (i && i !== "api_usage" && i !== "basic")
|
|
@@ -1016,9 +1020,9 @@ const me = {
|
|
|
1016
1020
|
return (i, s) => (x(), G("div", {
|
|
1017
1021
|
class: Re(["metric-card-tile-wrapper", { titled: !!e.chartOptions.chart_title }])
|
|
1018
1022
|
}, [
|
|
1019
|
-
|
|
1020
|
-
default:
|
|
1021
|
-
|
|
1023
|
+
ae(E(Pi), pi(yi(t.value)), {
|
|
1024
|
+
default: H(() => [
|
|
1025
|
+
ae(E($i))
|
|
1022
1026
|
]),
|
|
1023
1027
|
_: 1
|
|
1024
1028
|
}, 16)
|
|
@@ -1027,15 +1031,15 @@ const me = {
|
|
|
1027
1031
|
}), bs = /* @__PURE__ */ _e(_s, [["__scopeId", "data-v-36a73a07"]]), ws = {
|
|
1028
1032
|
class: "fallback-entity-link",
|
|
1029
1033
|
"data-testid": "entity-link-parent"
|
|
1030
|
-
}, St = /* @__PURE__ */
|
|
1034
|
+
}, St = /* @__PURE__ */ j({
|
|
1031
1035
|
__name: "FallbackEntityLink",
|
|
1032
1036
|
props: {
|
|
1033
1037
|
entityLinkData: {}
|
|
1034
1038
|
},
|
|
1035
1039
|
setup(a) {
|
|
1036
|
-
return (e, t) => (x(), G("div", ws,
|
|
1040
|
+
return (e, t) => (x(), G("div", ws, te(a.entityLinkData.label), 1));
|
|
1037
1041
|
}
|
|
1038
|
-
}), Es = /* @__PURE__ */
|
|
1042
|
+
}), Es = /* @__PURE__ */ j({
|
|
1039
1043
|
__name: "TopNTableRenderer",
|
|
1040
1044
|
props: {
|
|
1041
1045
|
query: {},
|
|
@@ -1066,21 +1070,21 @@ const me = {
|
|
|
1066
1070
|
return e.chartOptions.entity_link.replace(Et, r.id);
|
|
1067
1071
|
return "";
|
|
1068
1072
|
};
|
|
1069
|
-
return (r, o) => (x(),
|
|
1073
|
+
return (r, o) => (x(), A(ft, {
|
|
1070
1074
|
context: a.context,
|
|
1071
1075
|
query: a.query,
|
|
1072
1076
|
"query-ready": a.queryReady,
|
|
1073
1077
|
"refresh-counter": a.refreshCounter
|
|
1074
1078
|
}, {
|
|
1075
|
-
default:
|
|
1076
|
-
|
|
1079
|
+
default: H(({ data: n }) => [
|
|
1080
|
+
ae(E(Ti), {
|
|
1077
1081
|
data: n,
|
|
1078
1082
|
"synthetics-data-key": a.chartOptions.synthetics_data_key
|
|
1079
1083
|
}, Je({ _: 2 }, [
|
|
1080
1084
|
e.chartOptions.entity_link ? {
|
|
1081
1085
|
name: "name",
|
|
1082
|
-
fn:
|
|
1083
|
-
|
|
1086
|
+
fn: H(({ record: d }) => [
|
|
1087
|
+
ae(E(i), {
|
|
1084
1088
|
"entity-link-data": {
|
|
1085
1089
|
id: d.id,
|
|
1086
1090
|
label: d.name,
|
|
@@ -1096,7 +1100,7 @@ const me = {
|
|
|
1096
1100
|
_: 1
|
|
1097
1101
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]));
|
|
1098
1102
|
}
|
|
1099
|
-
}), zt = "#6c7489", xs = "12px", Dt = "20px", Nt = "32px", Xt = "20px", Cs = /* @__PURE__ */
|
|
1103
|
+
}), zt = "#6c7489", xs = "12px", Dt = "20px", Nt = "32px", Xt = "20px", Cs = /* @__PURE__ */ j({
|
|
1100
1104
|
__name: "DonutChartRenderer",
|
|
1101
1105
|
props: {
|
|
1102
1106
|
query: {},
|
|
@@ -1109,7 +1113,7 @@ const me = {
|
|
|
1109
1113
|
exploreLink: {}
|
|
1110
1114
|
},
|
|
1111
1115
|
setup(a) {
|
|
1112
|
-
return (e, t) => (x(),
|
|
1116
|
+
return (e, t) => (x(), A(gt, {
|
|
1113
1117
|
"chart-options": a.chartOptions,
|
|
1114
1118
|
context: a.context,
|
|
1115
1119
|
height: a.height,
|
|
@@ -1121,7 +1125,7 @@ const me = {
|
|
|
1121
1125
|
}), Rs = ["data-testid"], ks = {
|
|
1122
1126
|
key: 0,
|
|
1123
1127
|
class: "tile-header"
|
|
1124
|
-
}, Ts = { class: "badge-container" }, Ss = { class: "badge-text" }, zs = { key: 0 }, Ds = ["data-testid"], Ns = ["data-testid"], Ls = { class: "delete-option" }, As = ["data-testid"], Os = ["data-testid"], Hs = /* @__PURE__ */
|
|
1128
|
+
}, Ts = { class: "badge-container" }, Ss = { class: "badge-text" }, zs = { key: 0 }, Ds = ["data-testid"], Ns = ["data-testid"], Ls = { class: "delete-option" }, As = ["data-testid"], Os = ["data-testid"], Hs = /* @__PURE__ */ j({
|
|
1125
1129
|
__name: "DashboardTile",
|
|
1126
1130
|
props: /* @__PURE__ */ Ge({
|
|
1127
1131
|
context: {},
|
|
@@ -1143,32 +1147,32 @@ const me = {
|
|
|
1143
1147
|
}));
|
|
1144
1148
|
const t = parseInt(Xt, 10), i = a, s = Mt(a, "refreshCounter"), r = () => {
|
|
1145
1149
|
y.value = !0, s.value++;
|
|
1146
|
-
}, o = e, n = It(() => import("./GeoMapRenderer-
|
|
1147
|
-
exploreLinkKebabMenu:
|
|
1150
|
+
}, o = e, n = It(() => import("./GeoMapRenderer-pyhBNd6Y.js")), d = ve(ye), { i18n: u } = ce.useI18n(), h = O(), l = O({ status: "loading" }), f = O(!1), g = O(), m = O(!1), y = O(!0), {
|
|
1151
|
+
exploreLinkKebabMenu: p,
|
|
1148
1152
|
requestsLinkKebabMenu: C,
|
|
1149
|
-
canShowKebabMenu:
|
|
1150
|
-
canGenerateRequestsLink:
|
|
1151
|
-
canGenerateExploreLink:
|
|
1153
|
+
canShowKebabMenu: S,
|
|
1154
|
+
canGenerateRequestsLink: z,
|
|
1155
|
+
canGenerateExploreLink: W,
|
|
1152
1156
|
requestsLinkZoomActions: F,
|
|
1153
|
-
exploreLinkZoomActions:
|
|
1154
|
-
buildExploreQuery:
|
|
1155
|
-
buildExploreLink:
|
|
1156
|
-
buildRequestLink:
|
|
1157
|
+
exploreLinkZoomActions: D,
|
|
1158
|
+
buildExploreQuery: I,
|
|
1159
|
+
buildExploreLink: X,
|
|
1160
|
+
buildRequestLink: fe,
|
|
1157
1161
|
buildRequestsQueryZoomActions: ne
|
|
1158
|
-
} =
|
|
1162
|
+
} = ce.useContextLinks({
|
|
1159
1163
|
queryBridge: d,
|
|
1160
1164
|
chartData: rt(h),
|
|
1161
1165
|
definition: rt(Ne(i, "definition")),
|
|
1162
1166
|
context: rt(Ne(i, "context"))
|
|
1163
|
-
}), { issueQuery: ke } =
|
|
1167
|
+
}), { issueQuery: ke } = ce.useIssueQuery();
|
|
1164
1168
|
ze(() => i.definition, async (b, T) => {
|
|
1165
|
-
await dt(), g.value && (
|
|
1169
|
+
await dt(), g.value && (m.value = g.value.scrollWidth > g.value.clientWidth);
|
|
1166
1170
|
try {
|
|
1167
1171
|
JSON.stringify(b == null ? void 0 : b.query) !== JSON.stringify(T == null ? void 0 : T.query) && (y.value = !0);
|
|
1168
1172
|
} catch {
|
|
1169
1173
|
}
|
|
1170
1174
|
}, { immediate: !0, deep: !0 });
|
|
1171
|
-
const tt =
|
|
1175
|
+
const tt = R(() => u.t("csvExport.defaultFilename")), $e = R(() => S.value && !i.hideActions && (k.value || i.context.editable)), k = R(() => !!p.value || ("allow_csv_export" in i.definition.chart ? i.definition.chart.allow_csv_export : !0) || i.context.editable), M = {
|
|
1172
1176
|
timeseries_line: Tt,
|
|
1173
1177
|
timeseries_bar: Tt,
|
|
1174
1178
|
horizontal_bar: kt,
|
|
@@ -1180,16 +1184,16 @@ const me = {
|
|
|
1180
1184
|
slottable: void 0,
|
|
1181
1185
|
single_value: Rt,
|
|
1182
1186
|
choropleth_map: n
|
|
1183
|
-
}, $ =
|
|
1184
|
-
var b, T,
|
|
1187
|
+
}, $ = R(() => {
|
|
1188
|
+
var b, T, L;
|
|
1185
1189
|
return {
|
|
1186
|
-
...(b =
|
|
1187
|
-
...(T =
|
|
1188
|
-
...(
|
|
1190
|
+
...(b = P.value) != null && b.rendererEvents.supportsRequests ? { "select-chart-range": di } : {},
|
|
1191
|
+
...(T = P.value) != null && T.rendererEvents.supportsZoom ? { "zoom-time-range": hi } : {},
|
|
1192
|
+
...(L = P.value) != null && L.rendererEvents.supportsBounds ? { "bounds-change": ui } : {}
|
|
1189
1193
|
};
|
|
1190
|
-
}),
|
|
1191
|
-
var oe,
|
|
1192
|
-
const b =
|
|
1194
|
+
}), P = R(() => {
|
|
1195
|
+
var oe, ge;
|
|
1196
|
+
const b = M[i.definition.chart.type], T = !!((oe = b == null ? void 0 : b.emits) != null && oe.includes("select-chart-range")), L = !!((ge = b == null ? void 0 : b.emits) != null && ge.includes("zoom-time-range")), J = i.definition.chart.type === "choropleth_map";
|
|
1193
1197
|
return b && {
|
|
1194
1198
|
component: b,
|
|
1195
1199
|
rendererProps: {
|
|
@@ -1200,46 +1204,46 @@ const me = {
|
|
|
1200
1204
|
height: i.height - t * 2,
|
|
1201
1205
|
refreshCounter: s.value,
|
|
1202
1206
|
requestsLink: F.value,
|
|
1203
|
-
exploreLink:
|
|
1207
|
+
exploreLink: D.value
|
|
1204
1208
|
},
|
|
1205
1209
|
rendererEvents: {
|
|
1206
1210
|
supportsRequests: T,
|
|
1207
|
-
supportsZoom:
|
|
1208
|
-
supportsBounds:
|
|
1211
|
+
supportsZoom: L,
|
|
1212
|
+
supportsBounds: J
|
|
1209
1213
|
}
|
|
1210
1214
|
};
|
|
1211
|
-
}),
|
|
1215
|
+
}), Z = R(() => {
|
|
1212
1216
|
var T;
|
|
1213
1217
|
const b = (T = i.definition.query) == null ? void 0 : T.time_range;
|
|
1214
1218
|
if ((b == null ? void 0 : b.type) === "relative") {
|
|
1215
|
-
const
|
|
1216
|
-
return
|
|
1219
|
+
const L = wi.get(Ei[b.time_range]);
|
|
1220
|
+
return L ? L.display : (console.warn("Did not recognize the given relative time range:", b.time_range), b.time_range);
|
|
1217
1221
|
} else if ((b == null ? void 0 : b.type) === "absolute") {
|
|
1218
|
-
const
|
|
1219
|
-
return `${wt(b.start, { short: !0, tz:
|
|
1222
|
+
const L = b.tz || "Etc/UTC";
|
|
1223
|
+
return `${wt(b.start, { short: !0, tz: L })} - ${wt(b.end, { short: !0, tz: L })}`;
|
|
1220
1224
|
}
|
|
1221
1225
|
return null;
|
|
1222
|
-
}), Te =
|
|
1226
|
+
}), Te = R(() => {
|
|
1223
1227
|
if (i.definition.chart.type === "slottable")
|
|
1224
1228
|
return !1;
|
|
1225
|
-
const b = !!i.definition.chart.chart_title, T = i.definition.chart.type === "golden_signals" && !!i.definition.chart.description,
|
|
1226
|
-
return b ||
|
|
1227
|
-
}), yt =
|
|
1228
|
-
var T,
|
|
1229
|
+
const b = !!i.definition.chart.chart_title, T = i.definition.chart.type === "golden_signals" && !!i.definition.chart.description, L = i.showRefresh, J = $e.value && k.value && !i.isFullscreen, oe = !!Z.value;
|
|
1230
|
+
return b || J || oe || T || L;
|
|
1231
|
+
}), yt = R(() => h.value ? ot(h.value.meta.granularity_ms) : void 0), ei = R(() => ["timeseries_line", "timeseries_bar"].includes(i.definition.chart.type)), vt = R(() => {
|
|
1232
|
+
var T, L;
|
|
1229
1233
|
if (!ei.value || !i.queryReady || y.value)
|
|
1230
1234
|
return !1;
|
|
1231
|
-
const b = (
|
|
1235
|
+
const b = (L = (T = i.definition) == null ? void 0 : T.query) == null ? void 0 : L.granularity;
|
|
1232
1236
|
return !b || !yt.value ? !1 : b !== yt.value;
|
|
1233
|
-
}), ti =
|
|
1234
|
-
var
|
|
1235
|
-
const b = ot(((
|
|
1237
|
+
}), ti = R(() => {
|
|
1238
|
+
var L, J, oe;
|
|
1239
|
+
const b = ot(((L = h.value) == null ? void 0 : L.meta.granularity_ms) ?? 0) ?? "unknown", T = ((oe = (J = i.definition) == null ? void 0 : J.query) == null ? void 0 : oe.granularity) ?? "unknown";
|
|
1236
1240
|
return u.t("query_aged_out_warning", {
|
|
1237
1241
|
currentGranularity: u.t(`granularities.${b}`),
|
|
1238
1242
|
savedGranularity: u.t(`granularities.${T}`)
|
|
1239
1243
|
});
|
|
1240
|
-
}), ii =
|
|
1241
|
-
var
|
|
1242
|
-
const b = [...i.context.filters, ...i.definition.query.filters ?? []], T = ((
|
|
1244
|
+
}), ii = R(() => {
|
|
1245
|
+
var L, J;
|
|
1246
|
+
const b = [...i.context.filters, ...i.definition.query.filters ?? []], T = ((J = (L = i.definition) == null ? void 0 : L.query) == null ? void 0 : J.datasource) ?? "api_usage";
|
|
1243
1247
|
return b.filter((oe) => Bt(oe.field).some((it) => T === it));
|
|
1244
1248
|
}), si = () => {
|
|
1245
1249
|
o("edit-tile", i.definition);
|
|
@@ -1262,8 +1266,8 @@ const me = {
|
|
|
1262
1266
|
else if (h.value)
|
|
1263
1267
|
l.value = { status: "success", chartData: h.value };
|
|
1264
1268
|
else {
|
|
1265
|
-
const T = ze(h, (
|
|
1266
|
-
|
|
1269
|
+
const T = ze(h, (L) => {
|
|
1270
|
+
L && (l.value = { status: "success", chartData: L }, T());
|
|
1267
1271
|
});
|
|
1268
1272
|
}
|
|
1269
1273
|
}, hi = (b) => {
|
|
@@ -1279,11 +1283,11 @@ const me = {
|
|
|
1279
1283
|
};
|
|
1280
1284
|
o("tile-bounds-change", T);
|
|
1281
1285
|
}, di = (b) => {
|
|
1282
|
-
const T = ii.value,
|
|
1283
|
-
F.value =
|
|
1286
|
+
const T = ii.value, L = ne(b, T), J = I(b, T);
|
|
1287
|
+
F.value = z.value ? { href: fe(L) } : void 0, D.value = W.value ? { href: X(J) } : void 0;
|
|
1284
1288
|
};
|
|
1285
1289
|
return (b, T) => {
|
|
1286
|
-
const
|
|
1290
|
+
const L = he("KTooltip"), J = he("KBadge"), oe = he("KButton"), ge = he("KDropdownItem"), it = he("KDropdown");
|
|
1287
1291
|
return x(), G("div", {
|
|
1288
1292
|
class: Re(["tile-boundary", {
|
|
1289
1293
|
editable: a.context.editable,
|
|
@@ -1292,44 +1296,44 @@ const me = {
|
|
|
1292
1296
|
"data-testid": `tile-${a.tileId}`
|
|
1293
1297
|
}, [
|
|
1294
1298
|
Te.value && a.definition.chart.type !== "slottable" ? (x(), G("div", ks, [
|
|
1295
|
-
|
|
1299
|
+
ae(L, {
|
|
1296
1300
|
class: "title-tooltip",
|
|
1297
|
-
disabled: !
|
|
1301
|
+
disabled: !m.value,
|
|
1298
1302
|
"max-width": "500",
|
|
1299
1303
|
text: a.definition.chart.chart_title
|
|
1300
1304
|
}, {
|
|
1301
|
-
default:
|
|
1302
|
-
|
|
1305
|
+
default: H(() => [
|
|
1306
|
+
Y("div", {
|
|
1303
1307
|
ref_key: "titleRef",
|
|
1304
1308
|
ref: g,
|
|
1305
1309
|
class: "title"
|
|
1306
|
-
},
|
|
1310
|
+
}, te(a.definition.chart.chart_title), 513)
|
|
1307
1311
|
]),
|
|
1308
1312
|
_: 1
|
|
1309
1313
|
}, 8, ["disabled", "text"]),
|
|
1310
|
-
|
|
1311
|
-
|
|
1314
|
+
Y("div", Ts, [
|
|
1315
|
+
Z.value ? (x(), A(J, {
|
|
1312
1316
|
key: 0,
|
|
1313
1317
|
"data-testid": "time-range-badge",
|
|
1314
1318
|
tooltip: vt.value ? ti.value : void 0,
|
|
1315
1319
|
"tooltip-attributes": { maxWidth: "320px" }
|
|
1316
1320
|
}, Je({
|
|
1317
|
-
default:
|
|
1318
|
-
|
|
1321
|
+
default: H(() => [
|
|
1322
|
+
Y("span", Ss, te(Z.value), 1)
|
|
1319
1323
|
]),
|
|
1320
1324
|
_: 2
|
|
1321
1325
|
}, [
|
|
1322
1326
|
vt.value ? {
|
|
1323
1327
|
name: "icon",
|
|
1324
|
-
fn:
|
|
1325
|
-
|
|
1328
|
+
fn: H(() => [
|
|
1329
|
+
ae(E(Oi), { size: E(xs) }, null, 8, ["size"])
|
|
1326
1330
|
]),
|
|
1327
1331
|
key: "0"
|
|
1328
1332
|
} : void 0
|
|
1329
|
-
]), 1032, ["tooltip"])) :
|
|
1333
|
+
]), 1032, ["tooltip"])) : Q("", !0)
|
|
1330
1334
|
]),
|
|
1331
1335
|
a.showRefresh ? (x(), G("div", zs, [
|
|
1332
|
-
|
|
1336
|
+
ae(oe, {
|
|
1333
1337
|
appearance: "secondary",
|
|
1334
1338
|
class: "refresh-button",
|
|
1335
1339
|
disabled: y.value,
|
|
@@ -1337,13 +1341,13 @@ const me = {
|
|
|
1337
1341
|
size: "small",
|
|
1338
1342
|
onClick: r
|
|
1339
1343
|
}, {
|
|
1340
|
-
default:
|
|
1341
|
-
y.value ? (x(),
|
|
1344
|
+
default: H(() => [
|
|
1345
|
+
y.value ? (x(), A(E(Hi), {
|
|
1342
1346
|
key: 0,
|
|
1343
1347
|
role: "button",
|
|
1344
1348
|
size: E(Nt),
|
|
1345
1349
|
tabindex: "0"
|
|
1346
|
-
}, null, 8, ["size"])) : (x(),
|
|
1350
|
+
}, null, 8, ["size"])) : (x(), A(E(Ii), {
|
|
1347
1351
|
key: 1,
|
|
1348
1352
|
role: "button",
|
|
1349
1353
|
size: E(Nt),
|
|
@@ -1352,74 +1356,74 @@ const me = {
|
|
|
1352
1356
|
]),
|
|
1353
1357
|
_: 1
|
|
1354
1358
|
}, 8, ["disabled"])
|
|
1355
|
-
])) :
|
|
1359
|
+
])) : Q("", !0),
|
|
1356
1360
|
$e.value ? (x(), G("div", {
|
|
1357
1361
|
key: 1,
|
|
1358
1362
|
class: "tile-actions",
|
|
1359
1363
|
"data-testid": `tile-actions-${a.tileId}`
|
|
1360
1364
|
}, [
|
|
1361
|
-
E(
|
|
1365
|
+
E(S) && a.context.editable && !a.isFullscreen ? (x(), A(E(Mi), {
|
|
1362
1366
|
key: 0,
|
|
1363
1367
|
class: "edit-icon",
|
|
1364
1368
|
color: E(zt),
|
|
1365
1369
|
"data-testid": `edit-tile-${a.tileId}`,
|
|
1366
1370
|
size: E(Dt),
|
|
1367
1371
|
onClick: si
|
|
1368
|
-
}, null, 8, ["color", "data-testid", "size"])) :
|
|
1369
|
-
E(
|
|
1372
|
+
}, null, 8, ["color", "data-testid", "size"])) : Q("", !0),
|
|
1373
|
+
E(S) && k.value && !a.isFullscreen ? (x(), A(it, {
|
|
1370
1374
|
key: 1,
|
|
1371
1375
|
class: "dropdown",
|
|
1372
1376
|
"data-testid": `chart-action-menu-${a.tileId}`,
|
|
1373
1377
|
"kpop-attributes": { placement: "bottom-end" }
|
|
1374
1378
|
}, {
|
|
1375
|
-
items:
|
|
1376
|
-
E(
|
|
1379
|
+
items: H(() => [
|
|
1380
|
+
E(p) ? (x(), A(ge, {
|
|
1377
1381
|
key: 0,
|
|
1378
1382
|
"data-testid": `chart-jump-to-explore-${a.tileId}`,
|
|
1379
|
-
item: { label: E(u).t("jumpToExplore"), to: E(
|
|
1380
|
-
}, null, 8, ["data-testid", "item"])) :
|
|
1381
|
-
E(C) ? (x(),
|
|
1383
|
+
item: { label: E(u).t("jumpToExplore"), to: E(p) }
|
|
1384
|
+
}, null, 8, ["data-testid", "item"])) : Q("", !0),
|
|
1385
|
+
E(C) ? (x(), A(ge, {
|
|
1382
1386
|
key: 1,
|
|
1383
1387
|
"data-testid": `chart-jump-to-requests-${a.tileId}`,
|
|
1384
1388
|
item: { label: E(u).t("jumpToRequests"), to: E(C) }
|
|
1385
|
-
}, null, 8, ["data-testid", "item"])) :
|
|
1386
|
-
!("allow_csv_export" in a.definition.chart) || a.definition.chart.allow_csv_export ? (x(),
|
|
1389
|
+
}, null, 8, ["data-testid", "item"])) : Q("", !0),
|
|
1390
|
+
!("allow_csv_export" in a.definition.chart) || a.definition.chart.allow_csv_export ? (x(), A(ge, {
|
|
1387
1391
|
key: 2,
|
|
1388
1392
|
class: "chart-export-button",
|
|
1389
1393
|
"data-testid": `chart-csv-export-${a.tileId}`,
|
|
1390
1394
|
onClick: li
|
|
1391
1395
|
}, {
|
|
1392
|
-
default:
|
|
1393
|
-
|
|
1396
|
+
default: H(() => [
|
|
1397
|
+
Y("span", {
|
|
1394
1398
|
class: "chart-export-trigger",
|
|
1395
1399
|
"data-testid": `csv-export-button-${a.tileId}`
|
|
1396
|
-
},
|
|
1400
|
+
}, te(E(u).t("csvExport.exportAsCsv")), 9, Ns)
|
|
1397
1401
|
]),
|
|
1398
1402
|
_: 1
|
|
1399
|
-
}, 8, ["data-testid"])) :
|
|
1400
|
-
a.context.editable ? (x(),
|
|
1403
|
+
}, 8, ["data-testid"])) : Q("", !0),
|
|
1404
|
+
a.context.editable ? (x(), A(ge, {
|
|
1401
1405
|
key: 3,
|
|
1402
1406
|
"data-testid": `duplicate-tile-${a.tileId}`,
|
|
1403
1407
|
onClick: ri
|
|
1404
1408
|
}, {
|
|
1405
|
-
default:
|
|
1406
|
-
ht(
|
|
1409
|
+
default: H(() => [
|
|
1410
|
+
ht(te(E(u).t("renderer.duplicateTile")), 1)
|
|
1407
1411
|
]),
|
|
1408
1412
|
_: 1
|
|
1409
|
-
}, 8, ["data-testid"])) :
|
|
1410
|
-
a.context.editable ? (x(),
|
|
1413
|
+
}, 8, ["data-testid"])) : Q("", !0),
|
|
1414
|
+
a.context.editable ? (x(), A(ge, {
|
|
1411
1415
|
key: 4,
|
|
1412
1416
|
"data-testid": `remove-tile-${a.tileId}`,
|
|
1413
1417
|
onClick: ni
|
|
1414
1418
|
}, {
|
|
1415
|
-
default:
|
|
1416
|
-
|
|
1419
|
+
default: H(() => [
|
|
1420
|
+
Y("span", Ls, te(E(u).t("renderer.delete")), 1)
|
|
1417
1421
|
]),
|
|
1418
1422
|
_: 1
|
|
1419
|
-
}, 8, ["data-testid"])) :
|
|
1423
|
+
}, 8, ["data-testid"])) : Q("", !0)
|
|
1420
1424
|
]),
|
|
1421
|
-
default:
|
|
1422
|
-
|
|
1425
|
+
default: H(() => [
|
|
1426
|
+
ae(E(qi), {
|
|
1423
1427
|
class: "kebab-action-menu",
|
|
1424
1428
|
color: E(zt),
|
|
1425
1429
|
"data-testid": `kebab-action-menu-${a.tileId}`,
|
|
@@ -1427,25 +1431,25 @@ const me = {
|
|
|
1427
1431
|
}, null, 8, ["color", "data-testid", "size"])
|
|
1428
1432
|
]),
|
|
1429
1433
|
_: 1
|
|
1430
|
-
}, 8, ["data-testid"])) :
|
|
1434
|
+
}, 8, ["data-testid"])) : Q("", !0)
|
|
1431
1435
|
], 8, Ds)) : "description" in a.definition.chart ? (x(), G("div", {
|
|
1432
1436
|
key: 2,
|
|
1433
1437
|
class: "header-description",
|
|
1434
1438
|
"data-testid": `tile-description-${a.tileId}`
|
|
1435
|
-
},
|
|
1436
|
-
f.value ? (x(),
|
|
1439
|
+
}, te(a.definition.chart.description), 9, As)) : Q("", !0),
|
|
1440
|
+
f.value ? (x(), A(E(Si), {
|
|
1437
1441
|
key: 3,
|
|
1438
1442
|
"data-testid": `csv-export-modal-${a.tileId}`,
|
|
1439
1443
|
"export-state": l.value,
|
|
1440
1444
|
filename: tt.value,
|
|
1441
1445
|
onCloseModal: ai
|
|
1442
|
-
}, null, 8, ["data-testid", "export-state", "filename"])) :
|
|
1443
|
-
])) :
|
|
1444
|
-
|
|
1446
|
+
}, null, 8, ["data-testid", "export-state", "filename"])) : Q("", !0)
|
|
1447
|
+
])) : Q("", !0),
|
|
1448
|
+
Y("div", {
|
|
1445
1449
|
class: Re(["tile-content", `type-${a.definition.chart.type}`]),
|
|
1446
1450
|
"data-testid": `tile-content-${a.tileId}`
|
|
1447
1451
|
}, [
|
|
1448
|
-
|
|
1452
|
+
P.value ? (x(), A(qt(P.value.component), Ht({ key: 0 }, P.value.rendererProps, vi($.value), { onChartData: oi }), null, 16)) : Q("", !0)
|
|
1449
1453
|
], 10, Os)
|
|
1450
1454
|
], 10, Rs);
|
|
1451
1455
|
};
|
|
@@ -1461,7 +1465,7 @@ const me = {
|
|
|
1461
1465
|
for (let r = 0; r < t; r++)
|
|
1462
1466
|
i.get(r) ? s.push("auto") : s.push(`${a}px`);
|
|
1463
1467
|
return s;
|
|
1464
|
-
}, Ms = /* @__PURE__ */
|
|
1468
|
+
}, Ms = /* @__PURE__ */ j({
|
|
1465
1469
|
__name: "GridLayout",
|
|
1466
1470
|
props: {
|
|
1467
1471
|
tileHeight: {
|
|
@@ -1479,7 +1483,7 @@ const me = {
|
|
|
1479
1483
|
v2a38e79e: E(ct),
|
|
1480
1484
|
v4cc71de6: r.value
|
|
1481
1485
|
}));
|
|
1482
|
-
const e = a, t =
|
|
1486
|
+
const e = a, t = O(null), i = O(0), s = new ResizeObserver((n) => {
|
|
1483
1487
|
window.requestAnimationFrame(() => {
|
|
1484
1488
|
!Array.isArray(n) || !n.length || (i.value = n[0].contentRect.width);
|
|
1485
1489
|
});
|
|
@@ -1489,7 +1493,7 @@ const me = {
|
|
|
1489
1493
|
}), Ze(() => {
|
|
1490
1494
|
t.value && s.unobserve(t.value);
|
|
1491
1495
|
});
|
|
1492
|
-
const r =
|
|
1496
|
+
const r = R(() => Is(e.tileHeight, e.tiles).join(" ")), o = R(() => e.tiles.map((n, d) => ({
|
|
1493
1497
|
key: `tile-${d}`,
|
|
1494
1498
|
tile: n,
|
|
1495
1499
|
style: {
|
|
@@ -1859,7 +1863,7 @@ class c {
|
|
|
1859
1863
|
return !(!e || e.w === e.h || e.locked || e.noResize || (t = e.grid) != null && t.opts.disableResize || e.minW && e.minW === e.maxW || e.minH && e.minH === e.maxH);
|
|
1860
1864
|
}
|
|
1861
1865
|
}
|
|
1862
|
-
class
|
|
1866
|
+
class ue {
|
|
1863
1867
|
constructor(e = {}) {
|
|
1864
1868
|
this.addedNodes = [], this.removedNodes = [], this.defaultColumn = 12, this.column = e.column || this.defaultColumn, this.column > this.defaultColumn && (this.defaultColumn = this.column), this.maxRow = e.maxRow, this._float = e.float, this.nodes = e.nodes || [], this.onChange = e.onChange;
|
|
1865
1869
|
}
|
|
@@ -2037,7 +2041,7 @@ class he {
|
|
|
2037
2041
|
* @param resizing if out of bound, resize down or move into the grid to fit ?
|
|
2038
2042
|
*/
|
|
2039
2043
|
prepareNode(e, t) {
|
|
2040
|
-
e._id = e._id ??
|
|
2044
|
+
e._id = e._id ?? ue._idSeq++;
|
|
2041
2045
|
const i = e.id;
|
|
2042
2046
|
if (i) {
|
|
2043
2047
|
let r = 1;
|
|
@@ -2132,7 +2136,7 @@ class he {
|
|
|
2132
2136
|
if (t.pack = !0, !this.maxRow)
|
|
2133
2137
|
return this.moveNode(e, t);
|
|
2134
2138
|
let i;
|
|
2135
|
-
const s = new
|
|
2139
|
+
const s = new ue({
|
|
2136
2140
|
column: this.column,
|
|
2137
2141
|
float: this.float,
|
|
2138
2142
|
nodes: this.nodes.map((o) => o._id === e._id ? (i = { ...o }, i) : { ...o })
|
|
@@ -2154,7 +2158,7 @@ class he {
|
|
|
2154
2158
|
willItFit(e) {
|
|
2155
2159
|
if (delete e._willFitPos, !this.maxRow)
|
|
2156
2160
|
return !0;
|
|
2157
|
-
const t = new
|
|
2161
|
+
const t = new ue({
|
|
2158
2162
|
column: this.column,
|
|
2159
2163
|
float: this.float,
|
|
2160
2164
|
nodes: this.nodes.map((s) => ({ ...s }))
|
|
@@ -2182,8 +2186,8 @@ class he {
|
|
|
2182
2186
|
const l = e._moving && !t.nested;
|
|
2183
2187
|
let f = l ? this.directionCollideCoverage(e, t, n) : n[0];
|
|
2184
2188
|
if (l && f && ((h = (u = e.grid) == null ? void 0 : u.opts) != null && h.subGridDynamic) && !e.grid._isTemp) {
|
|
2185
|
-
const g = c.areaIntercept(t.rect, f._rect),
|
|
2186
|
-
g / (
|
|
2189
|
+
const g = c.areaIntercept(t.rect, f._rect), m = c.area(t.rect), y = c.area(f._rect);
|
|
2190
|
+
g / (m < y ? m : y) > 0.8 && (f.grid.makeSubGrid(f.el, void 0, e), f = void 0);
|
|
2187
2191
|
}
|
|
2188
2192
|
f ? d = !this._fixCollisions(e, r, f, t) : (d = !1, i && delete t.pack);
|
|
2189
2193
|
}
|
|
@@ -2290,7 +2294,7 @@ class he {
|
|
|
2290
2294
|
return e.forEach((r, o) => {
|
|
2291
2295
|
if (r._id === void 0) {
|
|
2292
2296
|
const n = r.id ? this.nodes.find((d) => d.id === r.id) : void 0;
|
|
2293
|
-
r._id = (n == null ? void 0 : n._id) ??
|
|
2297
|
+
r._id = (n == null ? void 0 : n._id) ?? ue._idSeq++;
|
|
2294
2298
|
}
|
|
2295
2299
|
s[o] = { x: r.x, y: r.y, w: r.w, _id: r._id };
|
|
2296
2300
|
}), this._layouts = i ? [] : this._layouts || [], this._layouts[t] = s, this;
|
|
@@ -2301,7 +2305,7 @@ class he {
|
|
|
2301
2305
|
* @param column corresponding column index to save it under
|
|
2302
2306
|
*/
|
|
2303
2307
|
cacheOneLayout(e, t) {
|
|
2304
|
-
e._id = e._id ??
|
|
2308
|
+
e._id = e._id ?? ue._idSeq++;
|
|
2305
2309
|
const i = { x: e.x, y: e.y, w: e.w, _id: e._id };
|
|
2306
2310
|
(e.autoPosition || e.x === void 0) && (delete i.x, delete i.y, e.autoPosition && (i.autoPosition = !0)), this._layouts = this._layouts || [], this._layouts[t] = this._layouts[t] || [];
|
|
2307
2311
|
const s = this.findCacheLayout(e, t);
|
|
@@ -2325,8 +2329,8 @@ class he {
|
|
|
2325
2329
|
return this;
|
|
2326
2330
|
}
|
|
2327
2331
|
}
|
|
2328
|
-
|
|
2329
|
-
const
|
|
2332
|
+
ue._idSeq = 0;
|
|
2333
|
+
const ee = {
|
|
2330
2334
|
alwaysShowResizeHandle: "mobile",
|
|
2331
2335
|
animate: !0,
|
|
2332
2336
|
auto: !0,
|
|
@@ -2359,7 +2363,7 @@ const Z = {
|
|
|
2359
2363
|
class w {
|
|
2360
2364
|
}
|
|
2361
2365
|
const le = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
|
|
2362
|
-
class
|
|
2366
|
+
class de {
|
|
2363
2367
|
}
|
|
2364
2368
|
function We(a, e) {
|
|
2365
2369
|
a.touches.length > 1 || (a.cancelable && a.preventDefault(), c.simulateMouseEvent(a.changedTouches[0], e));
|
|
@@ -2368,17 +2372,17 @@ function Jt(a, e) {
|
|
|
2368
2372
|
a.cancelable && a.preventDefault(), c.simulateMouseEvent(a, e);
|
|
2369
2373
|
}
|
|
2370
2374
|
function Ke(a) {
|
|
2371
|
-
|
|
2375
|
+
de.touchHandled || (de.touchHandled = !0, We(a, "mousedown"));
|
|
2372
2376
|
}
|
|
2373
2377
|
function Qe(a) {
|
|
2374
|
-
|
|
2378
|
+
de.touchHandled && We(a, "mousemove");
|
|
2375
2379
|
}
|
|
2376
2380
|
function Ve(a) {
|
|
2377
|
-
if (!
|
|
2381
|
+
if (!de.touchHandled)
|
|
2378
2382
|
return;
|
|
2379
|
-
|
|
2383
|
+
de.pointerLeaveTimeout && (window.clearTimeout(de.pointerLeaveTimeout), delete de.pointerLeaveTimeout);
|
|
2380
2384
|
const e = !!w.dragElement;
|
|
2381
|
-
We(a, "mouseup"), e || We(a, "click"),
|
|
2385
|
+
We(a, "mouseup"), e || We(a, "click"), de.touchHandled = !1;
|
|
2382
2386
|
}
|
|
2383
2387
|
function Ye(a) {
|
|
2384
2388
|
a.pointerType !== "mouse" && a.target.releasePointerCapture(a.pointerId);
|
|
@@ -2387,8 +2391,8 @@ function Lt(a) {
|
|
|
2387
2391
|
w.dragElement && a.pointerType !== "mouse" && Jt(a, "mouseenter");
|
|
2388
2392
|
}
|
|
2389
2393
|
function At(a) {
|
|
2390
|
-
w.dragElement && a.pointerType !== "mouse" && (
|
|
2391
|
-
delete
|
|
2394
|
+
w.dragElement && a.pointerType !== "mouse" && (de.pointerLeaveTimeout = window.setTimeout(() => {
|
|
2395
|
+
delete de.pointerLeaveTimeout, Jt(a, "mouseleave");
|
|
2392
2396
|
}, 10));
|
|
2393
2397
|
}
|
|
2394
2398
|
class et {
|
|
@@ -2944,7 +2948,7 @@ class Fs {
|
|
|
2944
2948
|
* Copyright (c) 2021-2024 Alain Dumesny
|
|
2945
2949
|
* see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
|
|
2946
2950
|
*/
|
|
2947
|
-
const
|
|
2951
|
+
const K = new Fs();
|
|
2948
2952
|
class _ {
|
|
2949
2953
|
/**
|
|
2950
2954
|
* initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
|
|
@@ -3009,7 +3013,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3009
3013
|
/** @internal create placeholder DIV as needed */
|
|
3010
3014
|
get placeholder() {
|
|
3011
3015
|
if (!this._placeholder) {
|
|
3012
|
-
this._placeholder = c.createDiv([this.opts.placeholderClass,
|
|
3016
|
+
this._placeholder = c.createDiv([this.opts.placeholderClass, ee.itemClass, this.opts.itemClass]);
|
|
3013
3017
|
const e = c.createDiv(["placeholder-content"], this._placeholder);
|
|
3014
3018
|
this.opts.placeholderText && (e.textContent = this.opts.placeholderText);
|
|
3015
3019
|
}
|
|
@@ -3028,48 +3032,48 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3028
3032
|
let s = (l = t.columnOpts) == null ? void 0 : l.breakpoints;
|
|
3029
3033
|
const r = t;
|
|
3030
3034
|
if (r.oneColumnModeDomSort && (delete r.oneColumnModeDomSort, console.log("warning: Gridstack oneColumnModeDomSort no longer supported. Use GridStackOptions.columnOpts instead.")), r.oneColumnSize || r.disableOneColumnMode === !1) {
|
|
3031
|
-
const
|
|
3035
|
+
const m = r.oneColumnSize || 768;
|
|
3032
3036
|
delete r.oneColumnSize, delete r.disableOneColumnMode, t.columnOpts = t.columnOpts || {}, s = t.columnOpts.breakpoints = t.columnOpts.breakpoints || [];
|
|
3033
|
-
let y = s.find((
|
|
3034
|
-
y ? y.w =
|
|
3037
|
+
let y = s.find((p) => p.c === 1);
|
|
3038
|
+
y ? y.w = m : (y = { c: 1, w: m }, s.push(y, { c: 12, w: m + 1 }));
|
|
3035
3039
|
}
|
|
3036
3040
|
const o = t.columnOpts;
|
|
3037
|
-
o && (!o.columnWidth && !((f = o.breakpoints) != null && f.length) ? (delete t.columnOpts, s = void 0) : o.columnMax = o.columnMax || 12), (s == null ? void 0 : s.length) > 1 && s.sort((
|
|
3041
|
+
o && (!o.columnWidth && !((f = o.breakpoints) != null && f.length) ? (delete t.columnOpts, s = void 0) : o.columnMax = o.columnMax || 12), (s == null ? void 0 : s.length) > 1 && s.sort((m, y) => (y.w || 0) - (m.w || 0));
|
|
3038
3042
|
const n = {
|
|
3039
|
-
...c.cloneDeep(
|
|
3040
|
-
column: c.toNumber(e.getAttribute("gs-column")) ||
|
|
3041
|
-
minRow: i || c.toNumber(e.getAttribute("gs-min-row")) ||
|
|
3042
|
-
maxRow: i || c.toNumber(e.getAttribute("gs-max-row")) ||
|
|
3043
|
-
staticGrid: c.toBool(e.getAttribute("gs-static")) ||
|
|
3043
|
+
...c.cloneDeep(ee),
|
|
3044
|
+
column: c.toNumber(e.getAttribute("gs-column")) || ee.column,
|
|
3045
|
+
minRow: i || c.toNumber(e.getAttribute("gs-min-row")) || ee.minRow,
|
|
3046
|
+
maxRow: i || c.toNumber(e.getAttribute("gs-max-row")) || ee.maxRow,
|
|
3047
|
+
staticGrid: c.toBool(e.getAttribute("gs-static")) || ee.staticGrid,
|
|
3044
3048
|
sizeToContent: c.toBool(e.getAttribute("gs-size-to-content")) || void 0,
|
|
3045
3049
|
draggable: {
|
|
3046
|
-
handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") ||
|
|
3050
|
+
handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || ee.draggable.handle
|
|
3047
3051
|
},
|
|
3048
3052
|
removableOptions: {
|
|
3049
|
-
accept: t.itemClass ||
|
|
3050
|
-
decline:
|
|
3053
|
+
accept: t.itemClass || ee.removableOptions.accept,
|
|
3054
|
+
decline: ee.removableOptions.decline
|
|
3051
3055
|
}
|
|
3052
3056
|
};
|
|
3053
3057
|
e.getAttribute("gs-animate") && (n.animate = c.toBool(e.getAttribute("gs-animate"))), t = c.defaults(t, n), this._initMargin(), this.checkDynamicColumn(), this.el.classList.add("gs-" + t.column), t.rtl === "auto" && (t.rtl = e.style.direction === "rtl"), t.rtl && this.el.classList.add("grid-stack-rtl");
|
|
3054
|
-
const d = this.el.closest("." +
|
|
3055
|
-
u && (u.subGrid = this, this.parentGridNode = u, this.el.classList.add("grid-stack-nested"), u.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !==
|
|
3056
|
-
const h = t.engineClass || _.engineClass ||
|
|
3058
|
+
const d = this.el.closest("." + ee.itemClass), u = d == null ? void 0 : d.gridstackNode;
|
|
3059
|
+
u && (u.subGrid = this, this.parentGridNode = u, this.el.classList.add("grid-stack-nested"), u.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== ee.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = le), this._styleSheetClass = "gs-id-" + ue._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
|
|
3060
|
+
const h = t.engineClass || _.engineClass || ue;
|
|
3057
3061
|
if (this.engine = new h({
|
|
3058
3062
|
column: this.getColumn(),
|
|
3059
3063
|
float: t.float,
|
|
3060
3064
|
maxRow: t.maxRow,
|
|
3061
|
-
onChange: (
|
|
3065
|
+
onChange: (m) => {
|
|
3062
3066
|
let y = 0;
|
|
3063
|
-
this.engine.nodes.forEach((
|
|
3064
|
-
y = Math.max(y,
|
|
3065
|
-
}),
|
|
3066
|
-
const C =
|
|
3067
|
-
C && (
|
|
3067
|
+
this.engine.nodes.forEach((p) => {
|
|
3068
|
+
y = Math.max(y, p.y + p.h);
|
|
3069
|
+
}), m.forEach((p) => {
|
|
3070
|
+
const C = p.el;
|
|
3071
|
+
C && (p._removeDOM ? (C && C.remove(), delete p._removeDOM) : this._writePosAttr(C, p));
|
|
3068
3072
|
}), this._updateStyles(!1, y);
|
|
3069
3073
|
}
|
|
3070
|
-
}), this._updateStyles(!1, 0), t.auto && (this.batchUpdate(), this.engine._loading = !0, this.getGridItems().forEach((
|
|
3071
|
-
const
|
|
3072
|
-
delete t.children,
|
|
3074
|
+
}), this._updateStyles(!1, 0), t.auto && (this.batchUpdate(), this.engine._loading = !0, this.getGridItems().forEach((m) => this._prepareElement(m)), delete this.engine._loading, this.batchUpdate(!1)), t.children) {
|
|
3075
|
+
const m = t.children;
|
|
3076
|
+
delete t.children, m.length && this.load(m);
|
|
3073
3077
|
}
|
|
3074
3078
|
this.setAnimation(), t.subGridDynamic && !w.pauseDrag && (w.pauseDrag = !0), ((g = t.draggable) == null ? void 0 : g.pause) !== void 0 && (w.pauseDrag = t.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
|
|
3075
3079
|
}
|
|
@@ -3122,13 +3126,13 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3122
3126
|
* @returns newly created grid
|
|
3123
3127
|
*/
|
|
3124
3128
|
makeSubGrid(e, t, i, s = !0) {
|
|
3125
|
-
var g,
|
|
3129
|
+
var g, m, y;
|
|
3126
3130
|
let r = e.gridstackNode;
|
|
3127
3131
|
if (r || (r = this.makeWidget(e).gridstackNode), (g = r.subGrid) != null && g.el)
|
|
3128
3132
|
return r.subGrid;
|
|
3129
3133
|
let o, n = this;
|
|
3130
3134
|
for (; n && !o; )
|
|
3131
|
-
o = (
|
|
3135
|
+
o = (m = n.opts) == null ? void 0 : m.subGridOpts, n = (y = n.parentGridNode) == null ? void 0 : y.grid;
|
|
3132
3136
|
t = c.cloneDeep({
|
|
3133
3137
|
// by default sub-grid inherit from us | parent, other than id, children, etc...
|
|
3134
3138
|
...this.opts,
|
|
@@ -3145,8 +3149,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3145
3149
|
t.column === "auto" && (d = !0, t.column = Math.max(r.w || 1, (i == null ? void 0 : i.w) || 1), delete t.columnOpts);
|
|
3146
3150
|
let u = r.el.querySelector(".grid-stack-item-content"), h, l;
|
|
3147
3151
|
if (s && (this._removeDD(r.el), l = { ...r, x: 0, y: 0 }, c.removeInternalForSave(l), delete l.subGridOpts, r.content && (l.content = r.content, delete r.content), _.addRemoveCB ? h = _.addRemoveCB(this.el, l, !0, !1) : (h = c.createDiv(["grid-stack-item"]), h.appendChild(u), u = c.createDiv(["grid-stack-item-content"], r.el)), this.prepareDragDrop(r.el)), i) {
|
|
3148
|
-
const
|
|
3149
|
-
|
|
3152
|
+
const p = d ? t.column : r.w, C = r.h + i.h, S = r.el.style;
|
|
3153
|
+
S.transition = "none", this.update(r.el, { w: p, h: C }), setTimeout(() => S.transition = null);
|
|
3150
3154
|
}
|
|
3151
3155
|
const f = r.subGrid = _.addGrid(u, t);
|
|
3152
3156
|
return i != null && i._moving && (f._isTemp = !0), d && (f._autoColumn = !0), s && f.makeWidget(h, l), i && (i._moving ? window.setTimeout(() => c.simulateMouseEvent(i._event, "mouseenter", f.el), 0) : f.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), f;
|
|
@@ -3187,7 +3191,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3187
3191
|
const r = c.cloneDeep(this.opts);
|
|
3188
3192
|
r.marginBottom === r.marginTop && r.marginRight === r.marginLeft && r.marginTop === r.marginRight && (r.margin = r.marginTop, delete r.marginTop, delete r.marginRight, delete r.marginBottom, delete r.marginLeft), r.rtl === (this.el.style.direction === "rtl") && (r.rtl = "auto"), this._isAutoCellHeight && (r.cellHeight = "auto"), this._autoColumn && (r.column = "auto");
|
|
3189
3193
|
const o = r._alwaysShowResizeHandle;
|
|
3190
|
-
return delete r._alwaysShowResizeHandle, o !== void 0 ? r.alwaysShowResizeHandle = o : delete r.alwaysShowResizeHandle, c.removeInternalAndSame(r,
|
|
3194
|
+
return delete r._alwaysShowResizeHandle, o !== void 0 ? r.alwaysShowResizeHandle = o : delete r.alwaysShowResizeHandle, c.removeInternalAndSame(r, ee), r.children = s, r;
|
|
3191
3195
|
}
|
|
3192
3196
|
return s;
|
|
3193
3197
|
}
|
|
@@ -3567,18 +3571,18 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3567
3571
|
let u;
|
|
3568
3572
|
if (t.subGrid) {
|
|
3569
3573
|
u = t.subGrid.getRow() * t.subGrid.getCellHeight(!0);
|
|
3570
|
-
const
|
|
3571
|
-
u +=
|
|
3574
|
+
const m = t.subGrid.el.getBoundingClientRect(), y = t.subGrid.el.parentElement.getBoundingClientRect();
|
|
3575
|
+
u += m.top - y.top;
|
|
3572
3576
|
} else {
|
|
3573
3577
|
if ((g = (f = t.subGridOpts) == null ? void 0 : f.children) != null && g.length)
|
|
3574
3578
|
return;
|
|
3575
3579
|
{
|
|
3576
|
-
const
|
|
3577
|
-
if (!
|
|
3580
|
+
const m = o.firstElementChild;
|
|
3581
|
+
if (!m) {
|
|
3578
3582
|
console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${_.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
|
|
3579
3583
|
return;
|
|
3580
3584
|
}
|
|
3581
|
-
u =
|
|
3585
|
+
u = m.getBoundingClientRect().height || d;
|
|
3582
3586
|
}
|
|
3583
3587
|
}
|
|
3584
3588
|
if (d === u)
|
|
@@ -3738,7 +3742,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3738
3742
|
}
|
|
3739
3743
|
/** @internal */
|
|
3740
3744
|
_prepareElement(e, t = !1, i) {
|
|
3741
|
-
i = i || this._readAttr(e), e.gridstackNode = i, i.el = e, i.grid = this, i = this.engine.addNode(i, t), this._writeAttr(e, i), e.classList.add(
|
|
3745
|
+
i = i || this._readAttr(e), e.gridstackNode = i, i.el = e, i.grid = this, i = this.engine.addNode(i, t), this._writeAttr(e, i), e.classList.add(ee.itemClass, this.opts.itemClass);
|
|
3742
3746
|
const s = c.shouldSizeToContent(i);
|
|
3743
3747
|
return s ? e.classList.add("size-to-content") : e.classList.remove("size-to-content"), s && this.resizeToContentCheck(!1, i), c.lazyLoad(i) || this.prepareDragDrop(i.el), this;
|
|
3744
3748
|
}
|
|
@@ -3844,7 +3848,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3844
3848
|
*/
|
|
3845
3849
|
/** get the global (but static to this code) DD implementation */
|
|
3846
3850
|
static getDD() {
|
|
3847
|
-
return
|
|
3851
|
+
return K;
|
|
3848
3852
|
}
|
|
3849
3853
|
/**
|
|
3850
3854
|
* call to setup dragging in from the outside (say toolbar), by specifying the class selection and options.
|
|
@@ -3857,7 +3861,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3857
3861
|
*/
|
|
3858
3862
|
static setupDragIn(e, t, i, s = document) {
|
|
3859
3863
|
(t == null ? void 0 : t.pause) !== void 0 && (w.pauseDrag = t.pause), t = { appendTo: "body", helper: "clone", ...t || {} }, (typeof e == "string" ? c.getElements(e, s) : e).forEach((o, n) => {
|
|
3860
|
-
|
|
3864
|
+
K.isDraggable(o) || K.dragIn(o, t), i != null && i[n] && (o.gridstackNode = i[n]);
|
|
3861
3865
|
});
|
|
3862
3866
|
}
|
|
3863
3867
|
/**
|
|
@@ -3936,12 +3940,12 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3936
3940
|
}
|
|
3937
3941
|
/** @internal removes any drag&drop present (called during destroy) */
|
|
3938
3942
|
_removeDD(e) {
|
|
3939
|
-
return
|
|
3943
|
+
return K.draggable(e, "destroy").resizable(e, "destroy"), e.gridstackNode && delete e.gridstackNode._initDD, delete e.ddElement, this;
|
|
3940
3944
|
}
|
|
3941
3945
|
/** @internal called to add drag over to support widgets being added externally */
|
|
3942
3946
|
_setupAcceptWidget() {
|
|
3943
3947
|
if (this.opts.staticGrid || !this.opts.acceptWidgets && !this.opts.removable)
|
|
3944
|
-
return
|
|
3948
|
+
return K.droppable(this.el, "destroy"), this;
|
|
3945
3949
|
let e, t;
|
|
3946
3950
|
const i = (s, r, o) => {
|
|
3947
3951
|
var f;
|
|
@@ -3966,7 +3970,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3966
3970
|
if (n._temporaryRemoved) {
|
|
3967
3971
|
if (n.x = Math.max(0, Math.round(u / t)), n.y = Math.max(0, Math.round(d / e)), delete n.autoPosition, this.engine.nodeBoundFix(n), !this.engine.willItFit(n)) {
|
|
3968
3972
|
if (n.autoPosition = !0, !this.engine.willItFit(n)) {
|
|
3969
|
-
|
|
3973
|
+
K.off(r, "drag");
|
|
3970
3974
|
return;
|
|
3971
3975
|
}
|
|
3972
3976
|
n._willFitPos && (c.copyPos(n, n._willFitPos), delete n._willFitPos);
|
|
@@ -3975,7 +3979,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3975
3979
|
} else
|
|
3976
3980
|
this._dragOrResize(o, s, l, n, t, e);
|
|
3977
3981
|
};
|
|
3978
|
-
return
|
|
3982
|
+
return K.droppable(this.el, {
|
|
3979
3983
|
accept: (s) => {
|
|
3980
3984
|
const r = s.gridstackNode || this._readAttr(s, !1);
|
|
3981
3985
|
if ((r == null ? void 0 : r.grid) === this)
|
|
@@ -4014,12 +4018,12 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4014
4018
|
n.grid || (n.el || (n = { ...n }), n._isExternal = !0, o.gridstackNode = n);
|
|
4015
4019
|
const d = n.w || Math.round(o.offsetWidth / t) || 1, u = n.h || Math.round(o.offsetHeight / e) || 1;
|
|
4016
4020
|
return n.grid && n.grid !== this ? (r._gridstackNodeOrig || (r._gridstackNodeOrig = n), r.gridstackNode = n = { ...n, w: d, h: u, grid: this }, delete n.x, delete n.y, this.engine.cleanupNode(n).nodeBoundFix(n), n._initDD = n._isExternal = // DOM needs to be re-parented on a drop
|
|
4017
|
-
n._temporaryRemoved = !0) : (n.w = d, n.h = u, n._temporaryRemoved = !0), _._itemRemoving(n.el, !1),
|
|
4021
|
+
n._temporaryRemoved = !0) : (n.w = d, n.h = u, n._temporaryRemoved = !0), _._itemRemoving(n.el, !1), K.on(r, "drag", i), i(s, r, o), !1;
|
|
4018
4022
|
}).on(this.el, "dropout", (s, r, o) => {
|
|
4019
4023
|
const n = (o == null ? void 0 : o.gridstackNode) || r.gridstackNode;
|
|
4020
4024
|
return n && (!n.grid || n.grid === this) && (this._leave(r, o), this._isTemp && this.removeAsSubGrid(n)), !1;
|
|
4021
4025
|
}).on(this.el, "drop", (s, r, o) => {
|
|
4022
|
-
var g,
|
|
4026
|
+
var g, m, y;
|
|
4023
4027
|
const n = (o == null ? void 0 : o.gridstackNode) || r.gridstackNode;
|
|
4024
4028
|
if ((n == null ? void 0 : n.grid) === this && !n._isExternal)
|
|
4025
4029
|
return !1;
|
|
@@ -4029,12 +4033,12 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4029
4033
|
h && this.setAnimation(!1);
|
|
4030
4034
|
const l = r._gridstackNodeOrig;
|
|
4031
4035
|
if (delete r._gridstackNodeOrig, d && (l != null && l.grid) && l.grid !== this) {
|
|
4032
|
-
const
|
|
4033
|
-
|
|
4036
|
+
const p = l.grid;
|
|
4037
|
+
p.engine.removeNodeFromLayoutCache(l), p.engine.removedNodes.push(l), p._triggerRemoveEvent()._triggerChangeEvent(), p.parentGridNode && !p.engine.nodes.length && p.opts.subGridDynamic && p.removeAsSubGrid();
|
|
4034
4038
|
}
|
|
4035
|
-
if (!n || (d && (this.engine.cleanupNode(n), n.grid = this), (g = n.grid) == null || delete g._isTemp,
|
|
4039
|
+
if (!n || (d && (this.engine.cleanupNode(n), n.grid = this), (g = n.grid) == null || delete g._isTemp, K.off(r, "drag"), o !== r ? (o.remove(), r = o) : r.remove(), this._removeDD(r), !d))
|
|
4036
4040
|
return !1;
|
|
4037
|
-
const f = (y = (
|
|
4041
|
+
const f = (y = (m = n.subGrid) == null ? void 0 : m.el) == null ? void 0 : y.gridstack;
|
|
4038
4042
|
return c.copyPos(n, this._readAttr(this.placeholder)), c.removePositioningStyles(r), u && (n.content || n.subGridOpts || _.addRemoveCB) ? (delete n.el, r = this.addWidget(n)) : (this._prepareElement(r, !0, n), this.el.appendChild(r), this.resizeToContentCheck(!1, n), f && (f.parentGridNode = n, f.opts.styleInHead || f._updateStyles(!0)), this._updateContainerHeight()), this.engine.addedNodes.push(n), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, l && l.grid ? l : void 0, n), h && this.setAnimation(this.opts.animate, !0), !1;
|
|
4039
4043
|
}), this;
|
|
4040
4044
|
}
|
|
@@ -4050,7 +4054,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4050
4054
|
if (typeof this.opts.removable != "string")
|
|
4051
4055
|
return this;
|
|
4052
4056
|
const e = document.querySelector(this.opts.removable);
|
|
4053
|
-
return e ? (!this.opts.staticGrid && !
|
|
4057
|
+
return e ? (!this.opts.staticGrid && !K.isDroppable(e) && K.droppable(e, this.opts.removableOptions).on(e, "dropover", (t, i) => _._itemRemoving(i, !0)).on(e, "dropout", (t, i) => _._itemRemoving(i, !1)), this) : this;
|
|
4054
4058
|
}
|
|
4055
4059
|
/**
|
|
4056
4060
|
* prepares the element for drag&drop - this is normally called by makeWidget() unless are are delay loading
|
|
@@ -4072,17 +4076,17 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4072
4076
|
this._dragOrResize(e, f, g, i, n, d);
|
|
4073
4077
|
}, l = (f) => {
|
|
4074
4078
|
this.placeholder.remove(), delete this.placeholder.gridstackNode, delete i._moving, delete i._event, delete i._lastTried;
|
|
4075
|
-
const g = i.w !== i._orig.w,
|
|
4076
|
-
if (!(!
|
|
4077
|
-
if (i.el =
|
|
4079
|
+
const g = i.w !== i._orig.w, m = f.target;
|
|
4080
|
+
if (!(!m.gridstackNode || m.gridstackNode.grid !== this)) {
|
|
4081
|
+
if (i.el = m, i._isAboutToRemove) {
|
|
4078
4082
|
const y = e.gridstackNode.grid;
|
|
4079
|
-
y._gsEventHandler[f.type] && y._gsEventHandler[f.type](f,
|
|
4083
|
+
y._gsEventHandler[f.type] && y._gsEventHandler[f.type](f, m), y.engine.nodes.push(i), y.removeWidget(e, !0, !0);
|
|
4080
4084
|
} else
|
|
4081
|
-
c.removePositioningStyles(
|
|
4085
|
+
c.removePositioningStyles(m), i._temporaryRemoved ? (c.copyPos(i, i._orig), this._writePosAttr(m, i), this.engine.addNode(i)) : this._writePosAttr(m, i), this._gsEventHandler[f.type] && this._gsEventHandler[f.type](f, m);
|
|
4082
4086
|
this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), f.type === "resizestop" && (Number.isInteger(i.sizeToContent) && (i.sizeToContent = i.h), this.resizeToContentCheck(g, i));
|
|
4083
4087
|
}
|
|
4084
4088
|
};
|
|
4085
|
-
|
|
4089
|
+
K.draggable(e, {
|
|
4086
4090
|
start: u,
|
|
4087
4091
|
stop: l,
|
|
4088
4092
|
drag: h
|
|
@@ -4092,7 +4096,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4092
4096
|
resize: h
|
|
4093
4097
|
}), i._initDD = !0;
|
|
4094
4098
|
}
|
|
4095
|
-
return
|
|
4099
|
+
return K.draggable(e, s ? "disable" : "enable").resizable(e, r ? "disable" : "enable"), this;
|
|
4096
4100
|
}
|
|
4097
4101
|
/** @internal handles actual drag/resize start */
|
|
4098
4102
|
_onStartMoving(e, t, i, s, r, o) {
|
|
@@ -4111,35 +4115,35 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4111
4115
|
};
|
|
4112
4116
|
if (s.el = this.placeholder, s._lastUiPosition = i.position, s._prevYPix = i.position.top, s._moving = t.type === "dragstart", delete s._lastTried, t.type === "dropover" && s._temporaryRemoved && (this.engine.addNode(s), s._moving = !0), this.engine.cacheRects(r, o, this.opts.marginTop, this.opts.marginRight, this.opts.marginBottom, this.opts.marginLeft), t.type === "resizestart") {
|
|
4113
4117
|
const d = this.getColumn() - s.x, u = (this.opts.maxRow || Number.MAX_SAFE_INTEGER) - s.y;
|
|
4114
|
-
|
|
4118
|
+
K.resizable(e, "option", "minWidth", r * Math.min(s.minW || 1, d)).resizable(e, "option", "minHeight", o * Math.min(s.minH || 1, u)).resizable(e, "option", "maxWidth", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, d)).resizable(e, "option", "maxWidthMoveLeft", r * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, s.x + s.w)).resizable(e, "option", "maxHeight", o * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, u)).resizable(e, "option", "maxHeightMoveUp", o * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, s.y + s.h));
|
|
4115
4119
|
}
|
|
4116
4120
|
}
|
|
4117
4121
|
/** @internal handles actual drag/resize */
|
|
4118
4122
|
_dragOrResize(e, t, i, s, r, o) {
|
|
4119
4123
|
const n = { ...s._orig };
|
|
4120
4124
|
let d, u = this.opts.marginLeft, h = this.opts.marginRight, l = this.opts.marginTop, f = this.opts.marginBottom;
|
|
4121
|
-
const g = Math.round(o * 0.1),
|
|
4122
|
-
if (u = Math.min(u,
|
|
4125
|
+
const g = Math.round(o * 0.1), m = Math.round(r * 0.1);
|
|
4126
|
+
if (u = Math.min(u, m), h = Math.min(h, m), l = Math.min(l, g), f = Math.min(f, g), t.type === "drag") {
|
|
4123
4127
|
if (s._temporaryRemoved)
|
|
4124
4128
|
return;
|
|
4125
|
-
const
|
|
4126
|
-
s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && c.updateScrollPosition(e, i.position,
|
|
4127
|
-
const C = i.position.left + (i.position.left > s._lastUiPosition.left ? -h : u),
|
|
4128
|
-
n.x = Math.round(C / r), n.y = Math.round(
|
|
4129
|
-
const
|
|
4129
|
+
const p = i.position.top - s._prevYPix;
|
|
4130
|
+
s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && c.updateScrollPosition(e, i.position, p);
|
|
4131
|
+
const C = i.position.left + (i.position.left > s._lastUiPosition.left ? -h : u), S = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : l);
|
|
4132
|
+
n.x = Math.round(C / r), n.y = Math.round(S / o);
|
|
4133
|
+
const z = this._extraDragRow;
|
|
4130
4134
|
if (this.engine.collide(s, n)) {
|
|
4131
|
-
const
|
|
4132
|
-
let F = Math.max(0, n.y + s.h -
|
|
4133
|
-
this.opts.maxRow &&
|
|
4135
|
+
const W = this.getRow();
|
|
4136
|
+
let F = Math.max(0, n.y + s.h - W);
|
|
4137
|
+
this.opts.maxRow && W + F > this.opts.maxRow && (F = Math.max(0, this.opts.maxRow - W)), this._extraDragRow = F;
|
|
4134
4138
|
} else
|
|
4135
4139
|
this._extraDragRow = 0;
|
|
4136
|
-
if (this._extraDragRow !==
|
|
4140
|
+
if (this._extraDragRow !== z && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
|
|
4137
4141
|
return;
|
|
4138
4142
|
} else if (t.type === "resize") {
|
|
4139
4143
|
if (n.x < 0 || (c.updateScrollResize(t, e, o), n.w = Math.round((i.size.width - u) / r), n.h = Math.round((i.size.height - l) / o), s.w === n.w && s.h === n.h) || s._lastTried && s._lastTried.w === n.w && s._lastTried.h === n.h)
|
|
4140
4144
|
return;
|
|
4141
|
-
const
|
|
4142
|
-
n.x = Math.round(
|
|
4145
|
+
const p = i.position.left + u, C = i.position.top + l;
|
|
4146
|
+
n.x = Math.round(p / r), n.y = Math.round(C / o), d = !0;
|
|
4143
4147
|
}
|
|
4144
4148
|
s._event = t, s._lastTried = n;
|
|
4145
4149
|
const y = {
|
|
@@ -4150,8 +4154,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4150
4154
|
};
|
|
4151
4155
|
if (this.engine.moveNodeCheck(s, { ...n, cellWidth: r, cellHeight: o, rect: y, resizing: d })) {
|
|
4152
4156
|
s._lastUiPosition = i.position, this.engine.cacheRects(r, o, l, h, f, u), delete s._skipDown, d && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
|
|
4153
|
-
const
|
|
4154
|
-
s._sidebarOrig || this._writePosAttr(
|
|
4157
|
+
const p = t.target;
|
|
4158
|
+
s._sidebarOrig || this._writePosAttr(p, s), this._gsEventHandler[t.type] && this._gsEventHandler[t.type](t, p);
|
|
4155
4159
|
}
|
|
4156
4160
|
}
|
|
4157
4161
|
/** @internal called when item leaving our area by either cursor dropout event
|
|
@@ -4161,7 +4165,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4161
4165
|
_leave(e, t) {
|
|
4162
4166
|
t = t || e;
|
|
4163
4167
|
const i = t.gridstackNode;
|
|
4164
|
-
if (!i || (t.style.transform = t.style.transformOrigin = null,
|
|
4168
|
+
if (!i || (t.style.transform = t.style.transformOrigin = null, K.off(e, "drag"), i._temporaryRemoved))
|
|
4165
4169
|
return;
|
|
4166
4170
|
i._temporaryRemoved = !0, this.engine.removeNode(i), i.el = i._isExternal && t ? t : e;
|
|
4167
4171
|
const s = i._sidebarOrig;
|
|
@@ -4177,9 +4181,9 @@ _.renderCB = (a, e) => {
|
|
|
4177
4181
|
};
|
|
4178
4182
|
_.resizeToContentParent = ".grid-stack-item-content";
|
|
4179
4183
|
_.Utils = c;
|
|
4180
|
-
_.Engine =
|
|
4184
|
+
_.Engine = ue;
|
|
4181
4185
|
_.GDRev = "11.5.1";
|
|
4182
|
-
const Us = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Gs = { class: "grid-stack-item-content" }, Ws = /* @__PURE__ */
|
|
4186
|
+
const Us = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Gs = { class: "grid-stack-item-content" }, Ws = /* @__PURE__ */ j({
|
|
4183
4187
|
__name: "DraggableGridLayout",
|
|
4184
4188
|
props: {
|
|
4185
4189
|
tiles: {},
|
|
@@ -4187,27 +4191,27 @@ const Us = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Gs = { cl
|
|
|
4187
4191
|
},
|
|
4188
4192
|
emits: ["update-tiles"],
|
|
4189
4193
|
setup(a, { expose: e, emit: t }) {
|
|
4190
|
-
const i = a, s = t, r =
|
|
4194
|
+
const i = a, s = t, r = O(null), o = O(new Map(i.tiles.map((g) => [`${g.id}`, g])));
|
|
4191
4195
|
let n = null;
|
|
4192
|
-
const d = (g) => `[data-id="${g}"]`, u = (g) => g.map((
|
|
4193
|
-
var
|
|
4194
|
-
const y = o.value.get(`${(
|
|
4196
|
+
const d = (g) => `[data-id="${g}"]`, u = (g) => g.map((m) => {
|
|
4197
|
+
var p;
|
|
4198
|
+
const y = o.value.get(`${(p = m.el) == null ? void 0 : p.getAttribute("data-id")}`);
|
|
4195
4199
|
if (y)
|
|
4196
4200
|
return {
|
|
4197
4201
|
...y,
|
|
4198
4202
|
layout: {
|
|
4199
|
-
position: { col: Number(
|
|
4200
|
-
size: { cols: Number(
|
|
4203
|
+
position: { col: Number(m.x), row: Number(m.y) },
|
|
4204
|
+
size: { cols: Number(m.w), rows: Number(m.h) }
|
|
4201
4205
|
}
|
|
4202
4206
|
};
|
|
4203
|
-
}).filter((
|
|
4204
|
-
n && (u(
|
|
4205
|
-
o.value.set(`${
|
|
4207
|
+
}).filter((m) => m !== void 0), h = (g, m) => {
|
|
4208
|
+
n && (u(m).forEach((p) => {
|
|
4209
|
+
o.value.set(`${p.id}`, p);
|
|
4206
4210
|
}), s("update-tiles", Array.from(o.value.values())));
|
|
4207
|
-
}, l = (g,
|
|
4208
|
-
|
|
4209
|
-
var
|
|
4210
|
-
o.value.delete(`${(
|
|
4211
|
+
}, l = (g, m) => {
|
|
4212
|
+
m.forEach((y) => {
|
|
4213
|
+
var p;
|
|
4214
|
+
o.value.delete(`${(p = y.el) == null ? void 0 : p.getAttribute("data-id")}`);
|
|
4211
4215
|
}), s("update-tiles", Array.from(o.value.values()));
|
|
4212
4216
|
};
|
|
4213
4217
|
Xe(() => {
|
|
@@ -4223,25 +4227,25 @@ const Us = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Gs = { cl
|
|
|
4223
4227
|
});
|
|
4224
4228
|
const f = (g) => {
|
|
4225
4229
|
if (n && r.value) {
|
|
4226
|
-
const
|
|
4227
|
-
|
|
4230
|
+
const m = r.value.querySelector(d(g));
|
|
4231
|
+
m && n.removeWidget(m);
|
|
4228
4232
|
}
|
|
4229
4233
|
};
|
|
4230
|
-
return ze(() => i.tiles.length, async (g,
|
|
4231
|
-
if (g >
|
|
4232
|
-
const y = i.tiles.slice(
|
|
4233
|
-
for (const
|
|
4234
|
-
o.value.set(`${
|
|
4234
|
+
return ze(() => i.tiles.length, async (g, m) => {
|
|
4235
|
+
if (g > m && n) {
|
|
4236
|
+
const y = i.tiles.slice(m);
|
|
4237
|
+
for (const p of y)
|
|
4238
|
+
o.value.set(`${p.id}`, p), await dt(), n.makeWidget(d(p.id), {
|
|
4235
4239
|
autoPosition: !0,
|
|
4236
|
-
w:
|
|
4237
|
-
h:
|
|
4240
|
+
w: p.layout.size.cols,
|
|
4241
|
+
h: p.layout.size.rows
|
|
4238
4242
|
});
|
|
4239
4243
|
}
|
|
4240
4244
|
}), Ot(() => {
|
|
4241
4245
|
i.tiles.forEach((g) => {
|
|
4242
4246
|
o.value.set(`${g.id}`, g);
|
|
4243
4247
|
});
|
|
4244
|
-
}), e({ removeWidget: f }), (g,
|
|
4248
|
+
}), e({ removeWidget: f }), (g, m) => (x(), G("div", {
|
|
4245
4249
|
ref_key: "gridContainer",
|
|
4246
4250
|
ref: r,
|
|
4247
4251
|
class: "grid-stack"
|
|
@@ -4257,7 +4261,7 @@ const Us = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Gs = { cl
|
|
|
4257
4261
|
"gs-x": y.layout.position.col,
|
|
4258
4262
|
"gs-y": y.layout.position.row
|
|
4259
4263
|
}, [
|
|
4260
|
-
|
|
4264
|
+
Y("div", Gs, [
|
|
4261
4265
|
De(g.$slots, "tile", { tile: y }, void 0, !0)
|
|
4262
4266
|
])
|
|
4263
4267
|
], 8, Us))), 128))
|
|
@@ -4269,7 +4273,7 @@ const Us = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Gs = { cl
|
|
|
4269
4273
|
}, Vs = {
|
|
4270
4274
|
key: 0,
|
|
4271
4275
|
class: "tile-container slottable-tile"
|
|
4272
|
-
}, Ys = /* @__PURE__ */
|
|
4276
|
+
}, Ys = /* @__PURE__ */ j({
|
|
4273
4277
|
__name: "DashboardRenderer",
|
|
4274
4278
|
props: /* @__PURE__ */ Ge({
|
|
4275
4279
|
context: {}
|
|
@@ -4279,146 +4283,146 @@ const Us = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Gs = { cl
|
|
|
4279
4283
|
}),
|
|
4280
4284
|
emits: /* @__PURE__ */ Ge(["edit-tile", "tile-time-range-zoom"], ["update:modelValue"]),
|
|
4281
4285
|
setup(a, { expose: e, emit: t }) {
|
|
4282
|
-
ut((
|
|
4286
|
+
ut((k) => ({
|
|
4283
4287
|
v019a5586: l.value
|
|
4284
4288
|
}));
|
|
4285
|
-
const i = a, s = t, r = Mt(a, "modelValue"), { i18n: o } =
|
|
4286
|
-
f || (console.warn("Analytics dashboards require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements")),
|
|
4287
|
-
const g = qe(),
|
|
4289
|
+
const i = a, s = t, r = Mt(a, "modelValue"), { i18n: o } = ce.useI18n(), n = O(0), d = O(null), u = O(), h = O(), l = O("scale(1)"), f = ve(ye);
|
|
4290
|
+
f || (console.warn("Analytics dashboards require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/dashboard-renderer/README.md#requirements")), ce.useRequestQueue();
|
|
4291
|
+
const g = qe(), m = R(() => i.context.timeSpec ? i.context.timeSpec : {
|
|
4288
4292
|
type: "relative",
|
|
4289
4293
|
time_range: g.defaultQueryTimeForOrg
|
|
4290
|
-
}), y =
|
|
4291
|
-
const $ =
|
|
4292
|
-
return $ !== 0 ? $ :
|
|
4293
|
-
}, C =
|
|
4294
|
+
}), y = R(() => !!i.context.timeSpec || !g.loading), p = (k, M) => {
|
|
4295
|
+
const $ = k.layout.position.row - M.layout.position.row;
|
|
4296
|
+
return $ !== 0 ? $ : k.layout.position.col - M.layout.position.col;
|
|
4297
|
+
}, C = R(() => r.value.tiles.map((k) => {
|
|
4294
4298
|
var $;
|
|
4295
|
-
let
|
|
4296
|
-
if ("description" in
|
|
4297
|
-
const
|
|
4298
|
-
const Te = `renderer.trendRange.${
|
|
4299
|
+
let M = k.definition;
|
|
4300
|
+
if ("description" in M.chart) {
|
|
4301
|
+
const P = ($ = M.chart.description) == null ? void 0 : $.replace(Zi, () => {
|
|
4302
|
+
const Te = `renderer.trendRange.${m.value.type === "absolute" ? "custom" : m.value.time_range}`;
|
|
4299
4303
|
return o.te(Te) ? o.t(Te) : "";
|
|
4300
4304
|
});
|
|
4301
|
-
|
|
4302
|
-
...
|
|
4305
|
+
M = {
|
|
4306
|
+
...M,
|
|
4303
4307
|
chart: {
|
|
4304
|
-
...
|
|
4305
|
-
description:
|
|
4308
|
+
...M.chart,
|
|
4309
|
+
description: P
|
|
4306
4310
|
}
|
|
4307
4311
|
};
|
|
4308
4312
|
}
|
|
4309
|
-
return i.context.editable && !
|
|
4313
|
+
return i.context.editable && !k.id && console.warn(
|
|
4310
4314
|
"No id provided for tile. One will be generated automatically,",
|
|
4311
4315
|
"however tracking changes to this tile may not work as expected.",
|
|
4312
|
-
|
|
4316
|
+
k
|
|
4313
4317
|
), {
|
|
4314
|
-
layout:
|
|
4315
|
-
meta:
|
|
4316
|
-
type:
|
|
4318
|
+
layout: k.layout,
|
|
4319
|
+
meta: M,
|
|
4320
|
+
type: k.type,
|
|
4317
4321
|
// Add a unique key to each tile internally.
|
|
4318
|
-
id:
|
|
4322
|
+
id: k.id ?? crypto.randomUUID()
|
|
4319
4323
|
};
|
|
4320
|
-
})),
|
|
4321
|
-
s("edit-tile",
|
|
4322
|
-
},
|
|
4323
|
-
const
|
|
4324
|
-
...
|
|
4325
|
-
chart_title:
|
|
4324
|
+
})), S = (k) => {
|
|
4325
|
+
s("edit-tile", k);
|
|
4326
|
+
}, z = (k) => k.type === "slottable", W = (k) => {
|
|
4327
|
+
const M = z(k.meta.chart) ? { ...k.meta.chart } : {
|
|
4328
|
+
...k.meta.chart,
|
|
4329
|
+
chart_title: k.meta.chart.chart_title ? `Copy of ${k.meta.chart.chart_title}` : ""
|
|
4326
4330
|
}, $ = {
|
|
4327
4331
|
id: crypto.randomUUID(),
|
|
4328
4332
|
type: "chart",
|
|
4329
4333
|
definition: {
|
|
4330
|
-
...
|
|
4331
|
-
chart:
|
|
4334
|
+
...k.meta,
|
|
4335
|
+
chart: M
|
|
4332
4336
|
},
|
|
4333
4337
|
layout: {
|
|
4334
4338
|
position: {
|
|
4335
4339
|
col: 0,
|
|
4336
4340
|
row: 0
|
|
4337
4341
|
},
|
|
4338
|
-
size:
|
|
4342
|
+
size: k.layout.size
|
|
4339
4343
|
}
|
|
4340
4344
|
};
|
|
4341
4345
|
r.value.tiles.push($);
|
|
4342
|
-
}, F = (
|
|
4343
|
-
d.value && d.value.removeWidget(
|
|
4344
|
-
},
|
|
4346
|
+
}, F = (k) => {
|
|
4347
|
+
d.value && d.value.removeWidget(k.id);
|
|
4348
|
+
}, D = () => {
|
|
4345
4349
|
n.value++;
|
|
4346
|
-
},
|
|
4347
|
-
const
|
|
4350
|
+
}, I = (k) => {
|
|
4351
|
+
const M = k.map(($) => ({
|
|
4348
4352
|
id: $.id,
|
|
4349
4353
|
type: $.type,
|
|
4350
4354
|
layout: $.layout,
|
|
4351
4355
|
definition: $.meta
|
|
4352
4356
|
}));
|
|
4353
|
-
r.value.tiles =
|
|
4354
|
-
},
|
|
4357
|
+
r.value.tiles = M.sort(p);
|
|
4358
|
+
}, X = async () => {
|
|
4355
4359
|
if (l.value = "scale(1)", await dt(), h.value) {
|
|
4356
|
-
const { availWidth:
|
|
4357
|
-
l.value = `scale(${
|
|
4360
|
+
const { availWidth: k, availHeight: M } = window.screen, { width: $, height: P } = h.value.getBoundingClientRect(), Z = Math.min(M / P, k / $);
|
|
4361
|
+
l.value = `scale(${Z})`;
|
|
4358
4362
|
}
|
|
4359
|
-
},
|
|
4363
|
+
}, fe = () => {
|
|
4360
4364
|
u.value && (document.fullscreenElement ? document.exitFullscreen() : u.value.requestFullscreen());
|
|
4361
|
-
}, ne =
|
|
4362
|
-
ne.value = document.fullscreenElement !== null, ne.value &&
|
|
4363
|
-
}, tt =
|
|
4365
|
+
}, ne = O(!1), ke = () => {
|
|
4366
|
+
ne.value = document.fullscreenElement !== null, ne.value && X();
|
|
4367
|
+
}, tt = R(() => r.value.preset_filters ?? []), { internalContext: $e } = ce.useDashboardInternalContext({
|
|
4364
4368
|
globalFilters: tt,
|
|
4365
4369
|
context: Ne(i, "context"),
|
|
4366
4370
|
isFullscreen: ne
|
|
4367
4371
|
});
|
|
4368
4372
|
return e({
|
|
4369
|
-
refresh:
|
|
4370
|
-
toggleFullscreen:
|
|
4371
|
-
}), (
|
|
4372
|
-
const $ =
|
|
4373
|
+
refresh: D,
|
|
4374
|
+
toggleFullscreen: fe
|
|
4375
|
+
}), (k, M) => {
|
|
4376
|
+
const $ = he("KAlert");
|
|
4373
4377
|
return x(), G("div", {
|
|
4374
4378
|
ref_key: "dashboardContainer",
|
|
4375
4379
|
ref: u,
|
|
4376
4380
|
class: Re(["kong-ui-public-dashboard-renderer", { "is-fullscreen": ne.value }]),
|
|
4377
4381
|
onFullscreenchange: ke
|
|
4378
4382
|
}, [
|
|
4379
|
-
|
|
4383
|
+
Y("div", {
|
|
4380
4384
|
ref_key: "layoutContainer",
|
|
4381
4385
|
ref: h,
|
|
4382
4386
|
class: "layout"
|
|
4383
4387
|
}, [
|
|
4384
4388
|
E(f) && ne.value ? (x(), G("div", Qs, [
|
|
4385
|
-
De(
|
|
4386
|
-
])) :
|
|
4387
|
-
E(f) ? (x(),
|
|
4389
|
+
De(k.$slots, "fullscreenHeader", {}, void 0, !0)
|
|
4390
|
+
])) : Q("", !0),
|
|
4391
|
+
E(f) ? (x(), A(qt(a.context.editable && !ne.value ? Ks : qs), {
|
|
4388
4392
|
key: 2,
|
|
4389
4393
|
ref_key: "gridLayoutRef",
|
|
4390
4394
|
ref: d,
|
|
4391
4395
|
"tile-height": r.value.tile_height,
|
|
4392
4396
|
tiles: C.value,
|
|
4393
|
-
onUpdateTiles:
|
|
4397
|
+
onUpdateTiles: I
|
|
4394
4398
|
}, {
|
|
4395
|
-
tile:
|
|
4396
|
-
|
|
4397
|
-
De(
|
|
4398
|
-
])) : (x(),
|
|
4399
|
-
key: ne.value ? `${
|
|
4399
|
+
tile: H(({ tile: P }) => [
|
|
4400
|
+
P.meta.chart.type === "slottable" ? (x(), G("div", Vs, [
|
|
4401
|
+
De(k.$slots, P.meta.chart.id, {}, void 0, !0)
|
|
4402
|
+
])) : (x(), A(Zt, {
|
|
4403
|
+
key: ne.value ? `${P.id}-tile` : `${P.id}-tile-fullscreen`,
|
|
4400
4404
|
"refresh-counter": n.value,
|
|
4401
|
-
"onUpdate:refreshCounter":
|
|
4405
|
+
"onUpdate:refreshCounter": M[0] || (M[0] = (Z) => n.value = Z),
|
|
4402
4406
|
class: "tile-container",
|
|
4403
4407
|
context: E($e),
|
|
4404
|
-
definition:
|
|
4405
|
-
height:
|
|
4408
|
+
definition: P.meta,
|
|
4409
|
+
height: P.layout.size.rows * (r.value.tile_height || E(Pe)) + parseInt(E(Xt), 10),
|
|
4406
4410
|
"is-fullscreen": ne.value,
|
|
4407
4411
|
"query-ready": y.value,
|
|
4408
|
-
"tile-id":
|
|
4409
|
-
onDuplicateTile: (
|
|
4410
|
-
onEditTile: (
|
|
4411
|
-
onRemoveTile: (
|
|
4412
|
-
onTileTimeRangeZoom:
|
|
4412
|
+
"tile-id": P.id,
|
|
4413
|
+
onDuplicateTile: (Z) => W(P),
|
|
4414
|
+
onEditTile: (Z) => S(P),
|
|
4415
|
+
onRemoveTile: (Z) => F(P),
|
|
4416
|
+
onTileTimeRangeZoom: M[1] || (M[1] = (Z) => s("tile-time-range-zoom", Z))
|
|
4413
4417
|
}, null, 8, ["refresh-counter", "context", "definition", "height", "is-fullscreen", "query-ready", "tile-id", "onDuplicateTile", "onEditTile", "onRemoveTile"]))
|
|
4414
4418
|
]),
|
|
4415
4419
|
_: 3
|
|
4416
|
-
}, 40, ["tile-height", "tiles"])) : (x(),
|
|
4420
|
+
}, 40, ["tile-height", "tiles"])) : (x(), A($, {
|
|
4417
4421
|
key: 1,
|
|
4418
4422
|
appearance: "danger"
|
|
4419
4423
|
}, {
|
|
4420
|
-
default:
|
|
4421
|
-
ht(
|
|
4424
|
+
default: H(() => [
|
|
4425
|
+
ht(te(E(o).t("renderer.noQueryBridge")), 1)
|
|
4422
4426
|
]),
|
|
4423
4427
|
_: 1
|
|
4424
4428
|
}))
|
|
@@ -4426,7 +4430,7 @@ const Us = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Gs = { cl
|
|
|
4426
4430
|
], 34);
|
|
4427
4431
|
};
|
|
4428
4432
|
}
|
|
4429
|
-
}), hr = /* @__PURE__ */ _e(Ys, [["__scopeId", "data-v-1fc40e84"]]), ur = /* @__PURE__ */
|
|
4433
|
+
}), hr = /* @__PURE__ */ _e(Ys, [["__scopeId", "data-v-1fc40e84"]]), ur = /* @__PURE__ */ j({
|
|
4430
4434
|
__name: "DashboardTilePreview",
|
|
4431
4435
|
props: {
|
|
4432
4436
|
context: {},
|
|
@@ -4435,50 +4439,69 @@ const Us = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Gs = { cl
|
|
|
4435
4439
|
},
|
|
4436
4440
|
emits: ["tile-time-range-zoom", "tile-bounds-change"],
|
|
4437
4441
|
setup(a, { expose: e, emit: t }) {
|
|
4438
|
-
const i = _i("root"), s = crypto.randomUUID(), r = t, o = (
|
|
4439
|
-
r("tile-time-range-zoom",
|
|
4440
|
-
}, n = (
|
|
4441
|
-
r("tile-bounds-change",
|
|
4442
|
-
}, {
|
|
4442
|
+
const i = _i("root"), s = crypto.randomUUID(), r = t, o = (C) => {
|
|
4443
|
+
r("tile-time-range-zoom", C);
|
|
4444
|
+
}, n = (C) => {
|
|
4445
|
+
r("tile-bounds-change", C);
|
|
4446
|
+
}, { i18n: d } = ce.useI18n(), { internalContext: u } = ce.useDashboardInternalContext({
|
|
4443
4447
|
globalFilters: Ne(() => a.globalFilters),
|
|
4444
4448
|
context: Ne(() => a.context)
|
|
4445
|
-
}),
|
|
4446
|
-
|
|
4449
|
+
}), h = qe(), l = R(() => !!a.context.timeSpec || !h.loading), f = R(() => {
|
|
4450
|
+
var C, S;
|
|
4451
|
+
return !((S = (C = a.definition) == null ? void 0 : C.query) != null && S.metrics) || a.definition.query.metrics.length === 0;
|
|
4452
|
+
}), g = O(Pe);
|
|
4453
|
+
let m;
|
|
4447
4454
|
Xe(() => {
|
|
4448
|
-
var
|
|
4449
|
-
const
|
|
4450
|
-
|
|
4451
|
-
const { height:
|
|
4452
|
-
|
|
4453
|
-
}),
|
|
4454
|
-
}), Ze(() =>
|
|
4455
|
-
const
|
|
4455
|
+
var S;
|
|
4456
|
+
const C = (S = i.value) == null ? void 0 : S.parentElement;
|
|
4457
|
+
C && (g.value = C.getBoundingClientRect().height, m = new ResizeObserver(([z]) => {
|
|
4458
|
+
const { height: W } = z.contentRect;
|
|
4459
|
+
g.value = W;
|
|
4460
|
+
}), m.observe(C));
|
|
4461
|
+
}), Ze(() => m == null ? void 0 : m.disconnect());
|
|
4462
|
+
const y = O(0);
|
|
4456
4463
|
return e({
|
|
4457
4464
|
refresh: () => {
|
|
4458
|
-
|
|
4465
|
+
y.value++;
|
|
4459
4466
|
}
|
|
4460
|
-
}), (
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
},
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4467
|
+
}), (C, S) => {
|
|
4468
|
+
const z = he("KEmptyState");
|
|
4469
|
+
return x(), G("div", {
|
|
4470
|
+
ref_key: "root",
|
|
4471
|
+
ref: i,
|
|
4472
|
+
"data-testid": "dashboard-tile-preview-root"
|
|
4473
|
+
}, [
|
|
4474
|
+
f.value ? (x(), A(z, {
|
|
4475
|
+
key: 0,
|
|
4476
|
+
"action-button-visible": !1,
|
|
4477
|
+
"data-testid": "chart-not-configured-empty-state"
|
|
4478
|
+
}, {
|
|
4479
|
+
title: H(() => [
|
|
4480
|
+
Y("p", null, te(E(d).t("renderer.not_configured.title")), 1)
|
|
4481
|
+
]),
|
|
4482
|
+
default: H(() => [
|
|
4483
|
+
Y("p", null, te(E(d).t("renderer.not_configured.description")), 1)
|
|
4484
|
+
]),
|
|
4485
|
+
_: 1
|
|
4486
|
+
})) : (x(), A(Zt, {
|
|
4487
|
+
key: 1,
|
|
4488
|
+
"refresh-counter": y.value,
|
|
4489
|
+
"onUpdate:refreshCounter": S[0] || (S[0] = (W) => y.value = W),
|
|
4490
|
+
context: {
|
|
4491
|
+
...E(u),
|
|
4492
|
+
editable: !1
|
|
4493
|
+
},
|
|
4494
|
+
definition: a.definition,
|
|
4495
|
+
height: g.value,
|
|
4496
|
+
"hide-actions": "",
|
|
4497
|
+
"query-ready": l.value,
|
|
4498
|
+
"show-refresh": "",
|
|
4499
|
+
"tile-id": E(s),
|
|
4500
|
+
onTileBoundsChange: n,
|
|
4501
|
+
onTileTimeRangeZoom: o
|
|
4502
|
+
}, null, 8, ["refresh-counter", "context", "definition", "height", "query-ready", "tile-id"]))
|
|
4503
|
+
], 512);
|
|
4504
|
+
};
|
|
4482
4505
|
}
|
|
4483
4506
|
}), js = (a) => {
|
|
4484
4507
|
var t;
|