@ixon-cdk/iframe-adapter 1.21.0 → 1.22.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +408 -394
- package/dist/index.umd.cjs +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
var P = Object.defineProperty;
|
|
2
|
-
var j = (t, e, n) => e in t ? P(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
-
var p = (t, e, n) => (j(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
1
|
const l = "cdk:cmpctx:", r = {
|
|
5
2
|
// Lifecycle
|
|
6
3
|
Create: `${l}create`,
|
|
@@ -54,7 +51,7 @@ const l = "cdk:cmpctx:", r = {
|
|
|
54
51
|
NavigateByUrl: `${l}navigatebyurl`,
|
|
55
52
|
SetTimeRange: `${l}settimerange`,
|
|
56
53
|
TimeRangeChange: `${l}timerangechange`
|
|
57
|
-
},
|
|
54
|
+
}, U = [
|
|
58
55
|
"color-scheme",
|
|
59
56
|
"background",
|
|
60
57
|
"on-background",
|
|
@@ -67,50 +64,53 @@ const l = "cdk:cmpctx:", r = {
|
|
|
67
64
|
"success",
|
|
68
65
|
"on-success"
|
|
69
66
|
];
|
|
70
|
-
function
|
|
71
|
-
return window.addEventListener("message",
|
|
67
|
+
function Qe({ iframe: t, context: e }) {
|
|
68
|
+
return window.addEventListener("message", o, !1), e.ontimerangechange = (...n) => {
|
|
72
69
|
t.contentWindow && t.contentWindow.postMessage(
|
|
73
70
|
{
|
|
74
71
|
type: r.TimeRangeChange,
|
|
75
|
-
payload:
|
|
72
|
+
payload: n
|
|
76
73
|
},
|
|
77
74
|
"*"
|
|
78
75
|
);
|
|
79
|
-
}, e.onvpnclientstatuschange = (...
|
|
76
|
+
}, e.onvpnclientstatuschange = (...n) => {
|
|
80
77
|
t.contentWindow && t.contentWindow.postMessage(
|
|
81
78
|
{
|
|
82
79
|
type: r.VpnClientStatusChange,
|
|
83
|
-
payload:
|
|
80
|
+
payload: n
|
|
84
81
|
},
|
|
85
82
|
"*"
|
|
86
83
|
);
|
|
87
84
|
}, {
|
|
88
85
|
destroy() {
|
|
89
|
-
window.removeEventListener("message",
|
|
86
|
+
window.removeEventListener("message", o, !1);
|
|
90
87
|
}
|
|
91
88
|
};
|
|
92
|
-
function n
|
|
89
|
+
function s(n) {
|
|
93
90
|
return {
|
|
94
|
-
_apiLinkEntries: [...
|
|
95
|
-
_designTokenEntries:
|
|
96
|
-
appData:
|
|
97
|
-
componentBaseUrl:
|
|
98
|
-
destroyed:
|
|
99
|
-
mode:
|
|
100
|
-
inputs:
|
|
101
|
-
timeRange:
|
|
102
|
-
timeRangeIsAdjustable:
|
|
103
|
-
vpnClientStatus:
|
|
91
|
+
_apiLinkEntries: [...n._getApiLinks().entries()],
|
|
92
|
+
_designTokenEntries: U.map((a) => [a, n.getDesignToken(a)]),
|
|
93
|
+
appData: n.appData,
|
|
94
|
+
componentBaseUrl: n.componentBaseUrl,
|
|
95
|
+
destroyed: n.destroyed,
|
|
96
|
+
mode: n.mode,
|
|
97
|
+
inputs: n.inputs,
|
|
98
|
+
timeRange: n.timeRange,
|
|
99
|
+
timeRangeIsAdjustable: n.timeRangeIsAdjustable,
|
|
100
|
+
vpnClientStatus: n.vpnClientStatus
|
|
104
101
|
};
|
|
105
102
|
}
|
|
106
|
-
function
|
|
107
|
-
if (
|
|
108
|
-
switch (
|
|
103
|
+
function o(n) {
|
|
104
|
+
if (o._clients = o._clients || /* @__PURE__ */ new Map([]), n.source === t.contentWindow)
|
|
105
|
+
switch (n.data.type) {
|
|
106
|
+
/**
|
|
107
|
+
* Lifecycle
|
|
108
|
+
*/
|
|
109
109
|
case r.Create:
|
|
110
110
|
t.contentWindow.postMessage(
|
|
111
111
|
{
|
|
112
112
|
type: r.Created,
|
|
113
|
-
payload:
|
|
113
|
+
payload: s(e)
|
|
114
114
|
},
|
|
115
115
|
"*"
|
|
116
116
|
);
|
|
@@ -118,72 +118,81 @@ function nt({ iframe: t, context: e }) {
|
|
|
118
118
|
case r.Destroy:
|
|
119
119
|
e.destroy();
|
|
120
120
|
break;
|
|
121
|
+
/**
|
|
122
|
+
* BackendComponentClient
|
|
123
|
+
*/
|
|
121
124
|
case r.BackendComponentClientCreate: {
|
|
122
|
-
const { clientId: a } =
|
|
123
|
-
|
|
125
|
+
const { clientId: a } = n.data.payload, i = e.createBackendComponentClient(a);
|
|
126
|
+
o._clients.set(a, i);
|
|
124
127
|
break;
|
|
125
128
|
}
|
|
126
129
|
case r.BackendComponentClientDestroy: {
|
|
127
|
-
const { clientId: a } =
|
|
128
|
-
|
|
130
|
+
const { clientId: a } = n.data.payload;
|
|
131
|
+
o._clients.has(a) && (o._clients.get(a).destroy(), o._clients.delete(a));
|
|
129
132
|
break;
|
|
130
133
|
}
|
|
131
134
|
case r.BackendComponentClientCall: {
|
|
132
|
-
const { clientId: a, callId: i, functionName:
|
|
133
|
-
let
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
const { clientId: a, callId: i, functionName: d, functionArguments: c } = n.data.payload;
|
|
136
|
+
let p = o._clients.get(a);
|
|
137
|
+
p && !p._destroyed && p.call(d, c).then((A) => {
|
|
138
|
+
p && !p.destroyed && t.contentWindow.postMessage(
|
|
136
139
|
{
|
|
137
140
|
type: r.BackendComponentClientCallResult,
|
|
138
|
-
payload: { callId: i, result:
|
|
141
|
+
payload: { callId: i, result: A }
|
|
139
142
|
},
|
|
140
143
|
"*"
|
|
141
144
|
);
|
|
142
145
|
});
|
|
143
146
|
break;
|
|
144
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* LoggingDataClient
|
|
150
|
+
*/
|
|
145
151
|
case r.LoggingDataClientCreate: {
|
|
146
|
-
const { clientId: a } =
|
|
147
|
-
|
|
152
|
+
const { clientId: a } = n.data.payload, i = e.createLoggingDataClient(a);
|
|
153
|
+
o._clients.set(a, i);
|
|
148
154
|
break;
|
|
149
155
|
}
|
|
150
156
|
case r.LoggingDataClientDestroy: {
|
|
151
|
-
const { clientId: a } =
|
|
152
|
-
|
|
157
|
+
const { clientId: a } = n.data.payload;
|
|
158
|
+
o._clients.has(a) && (o._clients.get(a).destroy(), o._clients.delete(a));
|
|
153
159
|
break;
|
|
154
160
|
}
|
|
155
161
|
case r.LoggingDataClientQuery: {
|
|
156
|
-
const { clientId: a, queryId: i, query:
|
|
157
|
-
let
|
|
158
|
-
|
|
159
|
-
|
|
162
|
+
const { clientId: a, queryId: i, query: d } = n.data.payload;
|
|
163
|
+
let c = o._clients.get(a);
|
|
164
|
+
c && !c._destroyed && c.query(d, (p) => {
|
|
165
|
+
c._destroyed || t.contentWindow.postMessage(
|
|
160
166
|
{
|
|
161
167
|
type: r.LoggingDataClientQueryResult,
|
|
162
|
-
payload: { queryId: i, results:
|
|
168
|
+
payload: { queryId: i, results: p }
|
|
163
169
|
},
|
|
164
170
|
"*"
|
|
165
171
|
);
|
|
166
172
|
});
|
|
167
173
|
break;
|
|
168
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* ResourceDataClient
|
|
177
|
+
*/
|
|
169
178
|
case r.ResourceDataClientCreate: {
|
|
170
|
-
const { clientId: a } =
|
|
171
|
-
|
|
179
|
+
const { clientId: a } = n.data.payload, i = e.createResourceDataClient(a);
|
|
180
|
+
o._clients.set(a, i);
|
|
172
181
|
break;
|
|
173
182
|
}
|
|
174
183
|
case r.ResourceDataClientDestroy: {
|
|
175
|
-
const { clientId: a } =
|
|
176
|
-
|
|
184
|
+
const { clientId: a } = n.data.payload;
|
|
185
|
+
o._clients.has(a) && (o._clients.get(a).destroy(), o._clients.delete(a));
|
|
177
186
|
break;
|
|
178
187
|
}
|
|
179
188
|
case r.ResourceDataClientQuery: {
|
|
180
|
-
const { clientId: a, queryId: i, query:
|
|
181
|
-
let
|
|
182
|
-
|
|
183
|
-
|
|
189
|
+
const { clientId: a, queryId: i, query: d } = n.data.payload;
|
|
190
|
+
let c = o._clients.get(a);
|
|
191
|
+
c && !c._destroyed && c.query(d, (p) => {
|
|
192
|
+
c._destroyed || t.contentWindow.postMessage(
|
|
184
193
|
{
|
|
185
194
|
type: r.ResourceDataClientQueryResult,
|
|
186
|
-
payload: { queryId: i, results:
|
|
195
|
+
payload: { queryId: i, results: p }
|
|
187
196
|
},
|
|
188
197
|
"*"
|
|
189
198
|
);
|
|
@@ -191,13 +200,13 @@ function nt({ iframe: t, context: e }) {
|
|
|
191
200
|
break;
|
|
192
201
|
}
|
|
193
202
|
case r.ResourceDataClientRender: {
|
|
194
|
-
const { clientId: a, queryId: i, query:
|
|
195
|
-
let
|
|
196
|
-
|
|
197
|
-
|
|
203
|
+
const { clientId: a, queryId: i, query: d } = n.data.payload;
|
|
204
|
+
let c = o._clients.get(a);
|
|
205
|
+
c && !c._destroyed && c.render(d, (p) => {
|
|
206
|
+
c._destroyed || t.contentWindow.postMessage(
|
|
198
207
|
{
|
|
199
208
|
type: r.ResourceDataClientRenderResult,
|
|
200
|
-
payload: { queryId: i, results:
|
|
209
|
+
payload: { queryId: i, results: p }
|
|
201
210
|
},
|
|
202
211
|
"*"
|
|
203
212
|
);
|
|
@@ -205,10 +214,10 @@ function nt({ iframe: t, context: e }) {
|
|
|
205
214
|
break;
|
|
206
215
|
}
|
|
207
216
|
case r.ResourceDataClientUpdate: {
|
|
208
|
-
const { clientId: a, updateId: i, update:
|
|
209
|
-
let
|
|
210
|
-
|
|
211
|
-
|
|
217
|
+
const { clientId: a, updateId: i, update: d } = n.data.payload;
|
|
218
|
+
let c = o._clients.get(a);
|
|
219
|
+
c && !c._destroyed && c.update(d).then(() => {
|
|
220
|
+
c && !c._destroyed && t.contentWindow.postMessage(
|
|
212
221
|
{
|
|
213
222
|
type: r.ResourceDataClientUpdated,
|
|
214
223
|
payload: { updateId: i }
|
|
@@ -218,144 +227,154 @@ function nt({ iframe: t, context: e }) {
|
|
|
218
227
|
});
|
|
219
228
|
break;
|
|
220
229
|
}
|
|
230
|
+
/**
|
|
231
|
+
* ActionBottomSheet
|
|
232
|
+
*/
|
|
221
233
|
case r.OpenActionBottomSheet:
|
|
222
|
-
e.openActionBottomSheet(
|
|
234
|
+
e.openActionBottomSheet(n.data.payload.options).then((a) => {
|
|
223
235
|
t.contentWindow.postMessage({ type: r.OpenActionBottomSheetResult, payload: { result: a } }, "*");
|
|
224
236
|
});
|
|
225
237
|
break;
|
|
238
|
+
/**
|
|
239
|
+
* ActionMenu
|
|
240
|
+
*/
|
|
226
241
|
case r.OpenActionMenu:
|
|
227
242
|
{
|
|
228
|
-
const a =
|
|
243
|
+
const a = n.data.payload.targetRect, i = {
|
|
229
244
|
getBoundingClientRect: () => {
|
|
230
|
-
const
|
|
245
|
+
const d = t.getBoundingClientRect();
|
|
231
246
|
return {
|
|
232
247
|
...JSON.parse(JSON.stringify(a)),
|
|
233
|
-
top:
|
|
234
|
-
x:
|
|
248
|
+
top: d.top + a.top,
|
|
249
|
+
x: d.x + a.x
|
|
235
250
|
};
|
|
236
251
|
}
|
|
237
252
|
};
|
|
238
|
-
e.openActionMenu(i,
|
|
239
|
-
t.contentWindow.postMessage({ type: r.OpenActionMenuResult, payload: { result:
|
|
253
|
+
e.openActionMenu(i, n.data.payload.options).then((d) => {
|
|
254
|
+
t.contentWindow.postMessage({ type: r.OpenActionMenuResult, payload: { result: d } }, "*");
|
|
240
255
|
});
|
|
241
256
|
}
|
|
242
257
|
break;
|
|
258
|
+
/**
|
|
259
|
+
* Dialogs
|
|
260
|
+
*/
|
|
243
261
|
case r.OpenAlertDialog:
|
|
244
|
-
e.openAlertDialog(
|
|
262
|
+
e.openAlertDialog(n.data.payload.options).then((a) => {
|
|
245
263
|
t.contentWindow.postMessage({ type: r.OpenAlertDialogResult, payload: { result: a } }, "*");
|
|
246
264
|
});
|
|
247
265
|
break;
|
|
248
266
|
case r.OpenConfirmDialog:
|
|
249
|
-
e.openConfirmDialog(
|
|
267
|
+
e.openConfirmDialog(n.data.payload.options).then((a) => {
|
|
250
268
|
t.contentWindow.postMessage({ type: r.OpenConfirmDialogResult, payload: { result: a } }, "*");
|
|
251
269
|
});
|
|
252
270
|
break;
|
|
253
271
|
case r.OpenContentDialog:
|
|
254
|
-
e.openContentDialog(
|
|
272
|
+
e.openContentDialog(n.data.payload.options).then((a) => {
|
|
255
273
|
t.contentWindow.postMessage({ type: r.OpenContentDialogResult, payload: { result: a } }, "*");
|
|
256
274
|
});
|
|
257
275
|
break;
|
|
258
276
|
case r.OpenFormDialog:
|
|
259
|
-
e.openFormDialog(
|
|
277
|
+
e.openFormDialog(n.data.payload.options).then((a) => {
|
|
260
278
|
t.contentWindow.postMessage({ type: r.OpenFormDialogResult, payload: { result: a } }, "*");
|
|
261
279
|
});
|
|
262
280
|
break;
|
|
281
|
+
/**
|
|
282
|
+
* SelectPanel
|
|
283
|
+
*/
|
|
263
284
|
case r.OpenSelectPanel:
|
|
264
285
|
{
|
|
265
|
-
const a =
|
|
286
|
+
const a = n.data.payload.targetRect, i = {
|
|
266
287
|
getBoundingClientRect: () => {
|
|
267
|
-
const
|
|
288
|
+
const d = t.getBoundingClientRect();
|
|
268
289
|
return {
|
|
269
290
|
...JSON.parse(JSON.stringify(a)),
|
|
270
|
-
top:
|
|
271
|
-
x:
|
|
291
|
+
top: d.top + a.top,
|
|
292
|
+
x: d.x + a.x
|
|
272
293
|
};
|
|
273
294
|
}
|
|
274
295
|
};
|
|
275
|
-
e.openSelectPanel(i,
|
|
276
|
-
t.contentWindow.postMessage({ type: r.OpenSelectPanelResult, payload: { result:
|
|
296
|
+
e.openSelectPanel(i, n.data.payload.options).then((d) => {
|
|
297
|
+
t.contentWindow.postMessage({ type: r.OpenSelectPanelResult, payload: { result: d } }, "*");
|
|
277
298
|
});
|
|
278
299
|
}
|
|
279
300
|
break;
|
|
280
301
|
case r.OpenToast:
|
|
281
|
-
e.openToast(
|
|
282
|
-
const { id: i } =
|
|
302
|
+
e.openToast(n.data.payload.options).then((a) => {
|
|
303
|
+
const { id: i } = n.data.payload;
|
|
283
304
|
t.contentWindow && t.contentWindow.postMessage({ type: r.OpenToastResult, payload: { id: i, result: a } }, "*");
|
|
284
305
|
});
|
|
285
306
|
break;
|
|
307
|
+
/**
|
|
308
|
+
* VPN
|
|
309
|
+
*/
|
|
286
310
|
case r.ShowVpnStatusDetails:
|
|
287
|
-
e.showVpnStatusDetails(
|
|
311
|
+
e.showVpnStatusDetails(n.data.payload.agentId);
|
|
288
312
|
break;
|
|
289
313
|
case r.ToggleVpn:
|
|
290
|
-
e.toggleVpn(
|
|
314
|
+
e.toggleVpn(n.data.payload.agentId);
|
|
291
315
|
break;
|
|
316
|
+
/**
|
|
317
|
+
* Miscellaneous
|
|
318
|
+
*/
|
|
292
319
|
case r.NavigateByUrl:
|
|
293
|
-
e.navigateByUrl(
|
|
320
|
+
e.navigateByUrl(n.data.payload.url);
|
|
294
321
|
break;
|
|
295
322
|
case r.SetTimeRange:
|
|
296
|
-
e.setTimeRange(
|
|
323
|
+
e.setTimeRange(n.data.payload.timeRange);
|
|
297
324
|
break;
|
|
298
325
|
}
|
|
299
326
|
}
|
|
300
327
|
}
|
|
301
|
-
class
|
|
302
|
-
constructor(e,
|
|
303
|
-
this.query = e, this.variable =
|
|
328
|
+
class q {
|
|
329
|
+
constructor(e, s, o, n) {
|
|
330
|
+
this.query = e, this.variable = s, this.tag = o, this._onCancel = n, Object.freeze(this);
|
|
304
331
|
}
|
|
305
332
|
cancel() {
|
|
306
333
|
this._onCancel && this._onCancel();
|
|
307
334
|
}
|
|
308
335
|
}
|
|
309
|
-
var
|
|
310
|
-
|
|
311
|
-
var
|
|
312
|
-
const $ = W;
|
|
313
|
-
var Q = $.Symbol;
|
|
314
|
-
const C = Q;
|
|
315
|
-
var E = Object.prototype, z = E.hasOwnProperty, G = E.toString, f = C ? C.toStringTag : void 0;
|
|
316
|
-
function J(t) {
|
|
317
|
-
var e = z.call(t, f), n = t[f];
|
|
336
|
+
var P = typeof global == "object" && global && global.Object === Object && global, j = typeof self == "object" && self && self.Object === Object && self, O = P || j || Function("return this")(), m = O.Symbol, v = Object.prototype, B = v.hasOwnProperty, F = v.toString, w = m ? m.toStringTag : void 0;
|
|
337
|
+
function H(t) {
|
|
338
|
+
var e = B.call(t, w), s = t[w];
|
|
318
339
|
try {
|
|
319
|
-
t[
|
|
320
|
-
var
|
|
340
|
+
t[w] = void 0;
|
|
341
|
+
var o = !0;
|
|
321
342
|
} catch {
|
|
322
343
|
}
|
|
323
|
-
var
|
|
324
|
-
return
|
|
344
|
+
var n = F.call(t);
|
|
345
|
+
return o && (e ? t[w] = s : delete t[w]), n;
|
|
325
346
|
}
|
|
326
|
-
var
|
|
327
|
-
function
|
|
328
|
-
return
|
|
347
|
+
var V = Object.prototype, N = V.toString;
|
|
348
|
+
function W(t) {
|
|
349
|
+
return N.call(t);
|
|
329
350
|
}
|
|
330
|
-
var
|
|
331
|
-
function
|
|
332
|
-
return t == null ? t === void 0 ?
|
|
351
|
+
var Q = "[object Null]", z = "[object Undefined]", I = m ? m.toStringTag : void 0;
|
|
352
|
+
function G(t) {
|
|
353
|
+
return t == null ? t === void 0 ? z : Q : I && I in Object(t) ? H(t) : W(t);
|
|
333
354
|
}
|
|
334
|
-
function
|
|
355
|
+
function T(t) {
|
|
335
356
|
var e = typeof t;
|
|
336
357
|
return t != null && (e == "object" || e == "function");
|
|
337
358
|
}
|
|
338
|
-
var
|
|
339
|
-
function
|
|
340
|
-
if (!
|
|
359
|
+
var J = "[object AsyncFunction]", K = "[object Function]", X = "[object GeneratorFunction]", Y = "[object Proxy]";
|
|
360
|
+
function Z(t) {
|
|
361
|
+
if (!T(t))
|
|
341
362
|
return !1;
|
|
342
|
-
var e =
|
|
343
|
-
return e ==
|
|
363
|
+
var e = G(t);
|
|
364
|
+
return e == K || e == X || e == J || e == Y;
|
|
344
365
|
}
|
|
345
|
-
var
|
|
346
|
-
|
|
347
|
-
var v = function() {
|
|
348
|
-
var t = /[^.]+$/.exec(O && O.keys && O.keys.IE_PROTO || "");
|
|
366
|
+
var R = O["__core-js_shared__"], M = (function() {
|
|
367
|
+
var t = /[^.]+$/.exec(R && R.keys && R.keys.IE_PROTO || "");
|
|
349
368
|
return t ? "Symbol(src)_1." + t : "";
|
|
350
|
-
}();
|
|
351
|
-
function
|
|
352
|
-
return !!
|
|
369
|
+
})();
|
|
370
|
+
function x(t) {
|
|
371
|
+
return !!M && M in t;
|
|
353
372
|
}
|
|
354
|
-
var
|
|
355
|
-
function
|
|
373
|
+
var ee = Function.prototype, te = ee.toString;
|
|
374
|
+
function ae(t) {
|
|
356
375
|
if (t != null) {
|
|
357
376
|
try {
|
|
358
|
-
return
|
|
377
|
+
return te.call(t);
|
|
359
378
|
} catch {
|
|
360
379
|
}
|
|
361
380
|
try {
|
|
@@ -365,166 +384,164 @@ function ce(t) {
|
|
|
365
384
|
}
|
|
366
385
|
return "";
|
|
367
386
|
}
|
|
368
|
-
var
|
|
369
|
-
"^" +
|
|
387
|
+
var ne = /[\\^$.*+?()[\]{}|]/g, oe = /^\[object .+?Constructor\]$/, se = Function.prototype, re = Object.prototype, ie = se.toString, le = re.hasOwnProperty, de = RegExp(
|
|
388
|
+
"^" + ie.call(le).replace(ne, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
370
389
|
);
|
|
371
|
-
function
|
|
372
|
-
if (!
|
|
390
|
+
function ce(t) {
|
|
391
|
+
if (!T(t) || x(t))
|
|
373
392
|
return !1;
|
|
374
|
-
var e =
|
|
375
|
-
return e.test(
|
|
393
|
+
var e = Z(t) ? de : oe;
|
|
394
|
+
return e.test(ae(t));
|
|
376
395
|
}
|
|
377
|
-
function
|
|
378
|
-
return t
|
|
396
|
+
function pe(t, e) {
|
|
397
|
+
return t?.[e];
|
|
379
398
|
}
|
|
380
|
-
function
|
|
381
|
-
var
|
|
382
|
-
return
|
|
399
|
+
function E(t, e) {
|
|
400
|
+
var s = pe(t, e);
|
|
401
|
+
return ce(s) ? s : void 0;
|
|
383
402
|
}
|
|
384
|
-
function
|
|
403
|
+
function ue(t, e) {
|
|
385
404
|
return t === e || t !== t && e !== e;
|
|
386
405
|
}
|
|
387
|
-
var
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
this.__data__ = m ? m(null) : {}, this.size = 0;
|
|
406
|
+
var f = E(Object, "create");
|
|
407
|
+
function ge() {
|
|
408
|
+
this.__data__ = f ? f(null) : {}, this.size = 0;
|
|
391
409
|
}
|
|
392
|
-
function
|
|
410
|
+
function ye(t) {
|
|
393
411
|
var e = this.has(t) && delete this.__data__[t];
|
|
394
412
|
return this.size -= e ? 1 : 0, e;
|
|
395
413
|
}
|
|
396
|
-
var
|
|
397
|
-
function
|
|
414
|
+
var he = "__lodash_hash_undefined__", we = Object.prototype, fe = we.hasOwnProperty;
|
|
415
|
+
function me(t) {
|
|
398
416
|
var e = this.__data__;
|
|
399
|
-
if (
|
|
400
|
-
var
|
|
401
|
-
return
|
|
417
|
+
if (f) {
|
|
418
|
+
var s = e[t];
|
|
419
|
+
return s === he ? void 0 : s;
|
|
402
420
|
}
|
|
403
|
-
return
|
|
421
|
+
return fe.call(e, t) ? e[t] : void 0;
|
|
404
422
|
}
|
|
405
|
-
var
|
|
406
|
-
function
|
|
423
|
+
var Ce = Object.prototype, _e = Ce.hasOwnProperty;
|
|
424
|
+
function De(t) {
|
|
407
425
|
var e = this.__data__;
|
|
408
|
-
return
|
|
409
|
-
}
|
|
410
|
-
var
|
|
411
|
-
function
|
|
412
|
-
var
|
|
413
|
-
return this.size += this.has(t) ? 0 : 1,
|
|
414
|
-
}
|
|
415
|
-
function
|
|
416
|
-
var e = -1,
|
|
417
|
-
for (this.clear(); ++e <
|
|
418
|
-
var
|
|
419
|
-
this.set(
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
function
|
|
426
|
+
return f ? e[t] !== void 0 : _e.call(e, t);
|
|
427
|
+
}
|
|
428
|
+
var Re = "__lodash_hash_undefined__";
|
|
429
|
+
function be(t, e) {
|
|
430
|
+
var s = this.__data__;
|
|
431
|
+
return this.size += this.has(t) ? 0 : 1, s[t] = f && e === void 0 ? Re : e, this;
|
|
432
|
+
}
|
|
433
|
+
function g(t) {
|
|
434
|
+
var e = -1, s = t == null ? 0 : t.length;
|
|
435
|
+
for (this.clear(); ++e < s; ) {
|
|
436
|
+
var o = t[e];
|
|
437
|
+
this.set(o[0], o[1]);
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
g.prototype.clear = ge;
|
|
441
|
+
g.prototype.delete = ye;
|
|
442
|
+
g.prototype.get = me;
|
|
443
|
+
g.prototype.has = De;
|
|
444
|
+
g.prototype.set = be;
|
|
445
|
+
function Oe() {
|
|
428
446
|
this.__data__ = [], this.size = 0;
|
|
429
447
|
}
|
|
430
|
-
function
|
|
431
|
-
for (var
|
|
432
|
-
if (
|
|
433
|
-
return
|
|
448
|
+
function C(t, e) {
|
|
449
|
+
for (var s = t.length; s--; )
|
|
450
|
+
if (ue(t[s][0], e))
|
|
451
|
+
return s;
|
|
434
452
|
return -1;
|
|
435
453
|
}
|
|
436
|
-
var
|
|
437
|
-
function
|
|
438
|
-
var e = this.__data__,
|
|
439
|
-
if (
|
|
454
|
+
var Se = Array.prototype, Ie = Se.splice;
|
|
455
|
+
function Me(t) {
|
|
456
|
+
var e = this.__data__, s = C(e, t);
|
|
457
|
+
if (s < 0)
|
|
440
458
|
return !1;
|
|
441
|
-
var
|
|
442
|
-
return
|
|
443
|
-
}
|
|
444
|
-
function
|
|
445
|
-
var e = this.__data__,
|
|
446
|
-
return
|
|
447
|
-
}
|
|
448
|
-
function
|
|
449
|
-
return
|
|
450
|
-
}
|
|
451
|
-
function
|
|
452
|
-
var
|
|
453
|
-
return
|
|
454
|
-
}
|
|
455
|
-
function
|
|
456
|
-
var e = -1,
|
|
457
|
-
for (this.clear(); ++e <
|
|
458
|
-
var
|
|
459
|
-
this.set(
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
var
|
|
468
|
-
|
|
469
|
-
function Ve() {
|
|
459
|
+
var o = e.length - 1;
|
|
460
|
+
return s == o ? e.pop() : Ie.call(e, s, 1), --this.size, !0;
|
|
461
|
+
}
|
|
462
|
+
function $e(t) {
|
|
463
|
+
var e = this.__data__, s = C(e, t);
|
|
464
|
+
return s < 0 ? void 0 : e[s][1];
|
|
465
|
+
}
|
|
466
|
+
function ve(t) {
|
|
467
|
+
return C(this.__data__, t) > -1;
|
|
468
|
+
}
|
|
469
|
+
function Te(t, e) {
|
|
470
|
+
var s = this.__data__, o = C(s, t);
|
|
471
|
+
return o < 0 ? (++this.size, s.push([t, e])) : s[o][1] = e, this;
|
|
472
|
+
}
|
|
473
|
+
function h(t) {
|
|
474
|
+
var e = -1, s = t == null ? 0 : t.length;
|
|
475
|
+
for (this.clear(); ++e < s; ) {
|
|
476
|
+
var o = t[e];
|
|
477
|
+
this.set(o[0], o[1]);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
h.prototype.clear = Oe;
|
|
481
|
+
h.prototype.delete = Me;
|
|
482
|
+
h.prototype.get = $e;
|
|
483
|
+
h.prototype.has = ve;
|
|
484
|
+
h.prototype.set = Te;
|
|
485
|
+
var Ee = E(O, "Map");
|
|
486
|
+
function Le() {
|
|
470
487
|
this.size = 0, this.__data__ = {
|
|
471
|
-
hash: new
|
|
472
|
-
map: new (
|
|
473
|
-
string: new
|
|
488
|
+
hash: new g(),
|
|
489
|
+
map: new (Ee || h)(),
|
|
490
|
+
string: new g()
|
|
474
491
|
};
|
|
475
492
|
}
|
|
476
|
-
function
|
|
493
|
+
function ke(t) {
|
|
477
494
|
var e = typeof t;
|
|
478
495
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
479
496
|
}
|
|
480
|
-
function
|
|
481
|
-
var
|
|
482
|
-
return
|
|
497
|
+
function _(t, e) {
|
|
498
|
+
var s = t.__data__;
|
|
499
|
+
return ke(e) ? s[typeof e == "string" ? "string" : "hash"] : s.map;
|
|
483
500
|
}
|
|
484
|
-
function
|
|
485
|
-
var e =
|
|
501
|
+
function Ae(t) {
|
|
502
|
+
var e = _(this, t).delete(t);
|
|
486
503
|
return this.size -= e ? 1 : 0, e;
|
|
487
504
|
}
|
|
488
|
-
function
|
|
489
|
-
return
|
|
505
|
+
function Ue(t) {
|
|
506
|
+
return _(this, t).get(t);
|
|
490
507
|
}
|
|
491
|
-
function
|
|
492
|
-
return
|
|
508
|
+
function qe(t) {
|
|
509
|
+
return _(this, t).has(t);
|
|
493
510
|
}
|
|
494
|
-
function
|
|
495
|
-
var
|
|
496
|
-
return
|
|
511
|
+
function Pe(t, e) {
|
|
512
|
+
var s = _(this, t), o = s.size;
|
|
513
|
+
return s.set(t, e), this.size += s.size == o ? 0 : 1, this;
|
|
497
514
|
}
|
|
498
|
-
function
|
|
499
|
-
var e = -1,
|
|
500
|
-
for (this.clear(); ++e <
|
|
501
|
-
var
|
|
502
|
-
this.set(
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
var
|
|
511
|
-
function
|
|
515
|
+
function y(t) {
|
|
516
|
+
var e = -1, s = t == null ? 0 : t.length;
|
|
517
|
+
for (this.clear(); ++e < s; ) {
|
|
518
|
+
var o = t[e];
|
|
519
|
+
this.set(o[0], o[1]);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
y.prototype.clear = Le;
|
|
523
|
+
y.prototype.delete = Ae;
|
|
524
|
+
y.prototype.get = Ue;
|
|
525
|
+
y.prototype.has = qe;
|
|
526
|
+
y.prototype.set = Pe;
|
|
527
|
+
var je = "Expected a function";
|
|
528
|
+
function S(t, e) {
|
|
512
529
|
if (typeof t != "function" || e != null && typeof e != "function")
|
|
513
|
-
throw new TypeError(
|
|
514
|
-
var
|
|
515
|
-
var
|
|
516
|
-
if (a.has(
|
|
517
|
-
return a.get(
|
|
518
|
-
var i = t.apply(this,
|
|
519
|
-
return
|
|
530
|
+
throw new TypeError(je);
|
|
531
|
+
var s = function() {
|
|
532
|
+
var o = arguments, n = e ? e.apply(this, o) : o[0], a = s.cache;
|
|
533
|
+
if (a.has(n))
|
|
534
|
+
return a.get(n);
|
|
535
|
+
var i = t.apply(this, o);
|
|
536
|
+
return s.cache = a.set(n, i) || a, i;
|
|
520
537
|
};
|
|
521
|
-
return
|
|
538
|
+
return s.cache = new (S.Cache || y)(), s;
|
|
522
539
|
}
|
|
523
|
-
|
|
524
|
-
const
|
|
525
|
-
class
|
|
526
|
-
constructor(e,
|
|
527
|
-
this.locale = e, this.queryRef =
|
|
540
|
+
S.Cache = y;
|
|
541
|
+
const Be = 2, L = 1, k = "";
|
|
542
|
+
class D {
|
|
543
|
+
constructor(e, s, o) {
|
|
544
|
+
this.locale = e, this.queryRef = s, this.rawValue = o;
|
|
528
545
|
}
|
|
529
546
|
/**
|
|
530
547
|
* Creates a LoggingDataValue.
|
|
@@ -533,19 +550,17 @@ class R {
|
|
|
533
550
|
* @param queryRef a reference to the query that produced this value
|
|
534
551
|
* @param rawValue the raw value
|
|
535
552
|
*/
|
|
536
|
-
static create(e,
|
|
537
|
-
return
|
|
553
|
+
static create(e, s, o) {
|
|
554
|
+
return s.query.postAggr === "count" ? new Fe(e, s, o) : new D(e, s, o);
|
|
538
555
|
}
|
|
539
|
-
getDecimals(e =
|
|
556
|
+
getDecimals(e = Be) {
|
|
540
557
|
return this.decimals ?? this.queryRef.query.decimals ?? e;
|
|
541
558
|
}
|
|
542
559
|
getFactor() {
|
|
543
|
-
|
|
544
|
-
return this.factor ?? this.queryRef.query.factor ?? ((n = (e = this.queryRef.tag) == null ? void 0 : e.variable) != null && n.factor ? parseFloat(this.queryRef.tag.variable.factor) : null) ?? ((s = this.queryRef.variable) != null && s.factor ? parseFloat(this.queryRef.variable.factor) : null) ?? A;
|
|
560
|
+
return this.factor ?? this.queryRef.query.factor ?? (this.queryRef.tag?.variable?.factor ? parseFloat(this.queryRef.tag.variable.factor) : null) ?? (this.queryRef.variable?.factor ? parseFloat(this.queryRef.variable.factor) : null) ?? L;
|
|
545
561
|
}
|
|
546
562
|
getUnit() {
|
|
547
|
-
|
|
548
|
-
return this.unit ?? this.queryRef.query.unit ?? ((n = (e = this.queryRef.tag) == null ? void 0 : e.variable) == null ? void 0 : n.unit) ?? ((s = this.queryRef.variable) == null ? void 0 : s.unit) ?? U;
|
|
563
|
+
return this.unit ?? this.queryRef.query.unit ?? this.queryRef.tag?.variable?.unit ?? this.queryRef.variable?.unit ?? k;
|
|
549
564
|
}
|
|
550
565
|
setDecimals(e) {
|
|
551
566
|
this.decimals = e;
|
|
@@ -561,67 +576,66 @@ class R {
|
|
|
561
576
|
return this.rawValue;
|
|
562
577
|
}
|
|
563
578
|
toString() {
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
const q = {
|
|
579
|
+
const e = this.locale ?? void 0, s = S((o, n, a, i) => {
|
|
580
|
+
const d = {
|
|
567
581
|
style: "decimal",
|
|
568
|
-
minimumFractionDigits: Math.floor(
|
|
569
|
-
maximumFractionDigits: Math.floor(
|
|
582
|
+
minimumFractionDigits: Math.floor(n),
|
|
583
|
+
maximumFractionDigits: Math.floor(n)
|
|
570
584
|
};
|
|
571
|
-
return `${new Intl.NumberFormat(
|
|
585
|
+
return `${new Intl.NumberFormat(i, d).format(o)}${a ? " " + a : ""}`;
|
|
572
586
|
});
|
|
573
|
-
return this.rawValue === null ? "" : this.queryRef.query.postAggr === "count" ?
|
|
587
|
+
return this.rawValue === null ? "" : this.queryRef.query.postAggr === "count" ? s(this.rawValue, this.getDecimals(0), this.unit ?? this.queryRef.query.unit, e) : this.queryRef.variable?.type === "str" ? this.rawValue : this.queryRef.variable?.type === "bool" ? this.rawValue ? "True" : "False" : this.queryRef.variable?.type === "int" ? s(
|
|
574
588
|
this.rawValue,
|
|
575
589
|
Number.isInteger(this.getFactor()) ? this.getDecimals(0) : this.getDecimals(),
|
|
576
590
|
this.getUnit(),
|
|
577
591
|
e
|
|
578
|
-
) :
|
|
592
|
+
) : this.queryRef.variable?.type === "float" ? s(this.rawValue, this.getDecimals(), this.getUnit(), e) : String(this.getValue());
|
|
579
593
|
}
|
|
580
594
|
}
|
|
581
|
-
class
|
|
595
|
+
class Fe extends D {
|
|
582
596
|
getFactor() {
|
|
583
|
-
return this.factor ?? this.queryRef.query.factor ??
|
|
597
|
+
return this.factor ?? this.queryRef.query.factor ?? L;
|
|
584
598
|
}
|
|
585
599
|
getUnit() {
|
|
586
|
-
return this.unit ?? this.queryRef.query.unit ??
|
|
600
|
+
return this.unit ?? this.queryRef.query.unit ?? k;
|
|
587
601
|
}
|
|
588
602
|
}
|
|
589
|
-
function
|
|
590
|
-
return t.map(({ queryRef:
|
|
591
|
-
const a = new
|
|
603
|
+
function $(t) {
|
|
604
|
+
return t.map(({ queryRef: s, time: o, value: n }) => {
|
|
605
|
+
const a = new q(s.query, s.variable, s.tag), i = D.create(n.locale, a, n.rawValue);
|
|
592
606
|
return {
|
|
593
607
|
queryRef: a,
|
|
594
|
-
time:
|
|
608
|
+
time: o,
|
|
595
609
|
value: i
|
|
596
610
|
};
|
|
597
611
|
});
|
|
598
612
|
}
|
|
599
|
-
class
|
|
613
|
+
class u extends Error {
|
|
600
614
|
constructor(e = "Method is not implemented") {
|
|
601
615
|
super(e), this.name = "NotImplementedError", this.message = e, this.stack = `NotImplementedError: ${e}`;
|
|
602
616
|
}
|
|
603
617
|
}
|
|
604
|
-
class
|
|
618
|
+
class He {
|
|
619
|
+
ontimerangechange = null;
|
|
620
|
+
onvpnclientstatuschange = null;
|
|
621
|
+
_getApiLinks;
|
|
622
|
+
_getDesignTokens;
|
|
623
|
+
appData;
|
|
624
|
+
componentBaseUrl;
|
|
625
|
+
destroyed;
|
|
626
|
+
mode;
|
|
627
|
+
inputs;
|
|
628
|
+
inputMap;
|
|
629
|
+
timeRange;
|
|
630
|
+
timeRangeIsAdjustable;
|
|
631
|
+
vpnClientStatus;
|
|
632
|
+
getDesignToken;
|
|
605
633
|
constructor(e) {
|
|
606
|
-
p(this, "ontimerangechange", null);
|
|
607
|
-
p(this, "onvpnclientstatuschange", null);
|
|
608
|
-
p(this, "_getApiLinks");
|
|
609
|
-
p(this, "_getDesignTokens");
|
|
610
|
-
p(this, "appData");
|
|
611
|
-
p(this, "componentBaseUrl");
|
|
612
|
-
p(this, "destroyed");
|
|
613
|
-
p(this, "mode");
|
|
614
|
-
p(this, "inputs");
|
|
615
|
-
p(this, "inputMap");
|
|
616
|
-
p(this, "timeRange");
|
|
617
|
-
p(this, "timeRangeIsAdjustable");
|
|
618
|
-
p(this, "vpnClientStatus");
|
|
619
|
-
p(this, "getDesignToken");
|
|
620
634
|
this._getApiLinks = () => new Map(e._apiLinkEntries), this._getDesignTokens = () => new Map(e._designTokenEntries), this.appData = e.appData, this.componentBaseUrl = e.componentBaseUrl, this.destroyed = e.destroyed, this.mode = e.mode, this.inputs = e.inputs, this.inputMap = new Map(Object.entries(this.inputs)), this.timeRange = e.timeRange, this.timeRangeIsAdjustable = e.timeRangeIsAdjustable, this.vpnClientStatus = e.vpnClientStatus, this._messageHandler = this._messageHandler.bind(this), window.addEventListener("message", this._messageHandler, !1);
|
|
621
|
-
const
|
|
622
|
-
|
|
623
|
-
const
|
|
624
|
-
|
|
635
|
+
const s = (a) => this._getDesignTokens().get(a) ?? "";
|
|
636
|
+
s.var = (a) => `var(--uic-${a})`, this.getDesignToken = s;
|
|
637
|
+
const o = new CSSStyleSheet(), n = e._designTokenEntries.map(([a, i]) => `--uic-${a}:${i}`);
|
|
638
|
+
o.replaceSync(`:root {${n.join(";")}}`), window.document.adoptedStyleSheets.push(o);
|
|
625
639
|
}
|
|
626
640
|
_messageHandler(e) {
|
|
627
641
|
if (e.source === window.parent)
|
|
@@ -642,7 +656,7 @@ class Ye {
|
|
|
642
656
|
payload: { clientId: e }
|
|
643
657
|
},
|
|
644
658
|
"*"
|
|
645
|
-
), new
|
|
659
|
+
), new Ve(e);
|
|
646
660
|
}
|
|
647
661
|
createLoggingDataClient() {
|
|
648
662
|
const e = crypto.randomUUID();
|
|
@@ -652,10 +666,10 @@ class Ye {
|
|
|
652
666
|
payload: { clientId: e }
|
|
653
667
|
},
|
|
654
668
|
"*"
|
|
655
|
-
), new
|
|
669
|
+
), new Ne(e);
|
|
656
670
|
}
|
|
657
671
|
createObjectStorageClient() {
|
|
658
|
-
throw new
|
|
672
|
+
throw new u();
|
|
659
673
|
}
|
|
660
674
|
createResourceDataClient() {
|
|
661
675
|
const e = crypto.randomUUID();
|
|
@@ -665,71 +679,71 @@ class Ye {
|
|
|
665
679
|
payload: { clientId: e }
|
|
666
680
|
},
|
|
667
681
|
"*"
|
|
668
|
-
), new
|
|
682
|
+
), new We(e);
|
|
669
683
|
}
|
|
670
684
|
createTooltip() {
|
|
671
|
-
throw new
|
|
685
|
+
throw new u();
|
|
672
686
|
}
|
|
673
687
|
destroy() {
|
|
674
688
|
window.parent.postMessage({ type: r.Destroy }, "*"), window.removeEventListener("message", this._messageHandler, !1), this.destroyed = !0;
|
|
675
689
|
}
|
|
676
|
-
getApiUrl(e,
|
|
677
|
-
const
|
|
678
|
-
if (!
|
|
690
|
+
getApiUrl(e, s) {
|
|
691
|
+
const o = this._getApiLinks().get(e);
|
|
692
|
+
if (!o)
|
|
679
693
|
throw new Error("IxApiError: entry not found");
|
|
680
|
-
return
|
|
681
|
-
if (
|
|
682
|
-
return
|
|
683
|
-
const i = new URL(
|
|
684
|
-
return i.searchParams.set(a,
|
|
685
|
-
},
|
|
694
|
+
return s ? Object.keys(s).sort().reduce((n, a) => {
|
|
695
|
+
if (n.includes(`{${a}}`))
|
|
696
|
+
return n.replace(`{${a}}`, s[a]);
|
|
697
|
+
const i = new URL(n);
|
|
698
|
+
return i.searchParams.set(a, s[a]), decodeURIComponent(i.href);
|
|
699
|
+
}, o.href) : o.href;
|
|
686
700
|
}
|
|
687
701
|
navigateByUrl(e) {
|
|
688
702
|
window.parent.postMessage({ type: r.NavigateByUrl, payload: { url: e } }, "*");
|
|
689
703
|
}
|
|
690
704
|
openActionBottomSheet(e) {
|
|
691
|
-
return new Promise((
|
|
692
|
-
window.addEventListener("message",
|
|
693
|
-
function
|
|
694
|
-
|
|
705
|
+
return new Promise((s) => {
|
|
706
|
+
window.addEventListener("message", o, !1), window.parent.postMessage({ type: r.OpenActionBottomSheet, payload: { options: e } }, "*");
|
|
707
|
+
function o(n) {
|
|
708
|
+
n.source === window.parent && n.data.type === r.OpenActionBottomSheetResult && (window.removeEventListener("message", o, !1), s(n.data.payload.result));
|
|
695
709
|
}
|
|
696
710
|
});
|
|
697
711
|
}
|
|
698
|
-
openActionMenu(e,
|
|
699
|
-
return new Promise((
|
|
712
|
+
openActionMenu(e, s) {
|
|
713
|
+
return new Promise((o) => {
|
|
700
714
|
window.addEventListener("message", a, !1);
|
|
701
|
-
const
|
|
702
|
-
window.parent.postMessage({ type: r.OpenActionMenu, payload: { targetRect:
|
|
715
|
+
const n = e.getBoundingClientRect();
|
|
716
|
+
window.parent.postMessage({ type: r.OpenActionMenu, payload: { targetRect: n, options: s } }, "*");
|
|
703
717
|
function a(i) {
|
|
704
|
-
i.source === window.parent && i.data.type === r.OpenActionMenuResult && (window.removeEventListener("message", a, !1),
|
|
718
|
+
i.source === window.parent && i.data.type === r.OpenActionMenuResult && (window.removeEventListener("message", a, !1), o(i.data.payload.result));
|
|
705
719
|
}
|
|
706
720
|
});
|
|
707
721
|
}
|
|
708
722
|
openAlertDialog(e) {
|
|
709
|
-
return new Promise((
|
|
710
|
-
window.addEventListener("message",
|
|
711
|
-
function
|
|
712
|
-
|
|
723
|
+
return new Promise((s) => {
|
|
724
|
+
window.addEventListener("message", o, !1), window.parent.postMessage({ type: r.OpenAlertDialog, payload: { options: e } }, "*");
|
|
725
|
+
function o(n) {
|
|
726
|
+
n.source === window.parent && n.data.type === r.OpenAlertDialogResult && (window.removeEventListener("message", o, !1), s(n.data.payload.result));
|
|
713
727
|
}
|
|
714
728
|
});
|
|
715
729
|
}
|
|
716
730
|
openConfirmDialog(e) {
|
|
717
|
-
return new Promise((
|
|
718
|
-
window.addEventListener("message",
|
|
719
|
-
function
|
|
720
|
-
|
|
731
|
+
return new Promise((s) => {
|
|
732
|
+
window.addEventListener("message", o, !1), window.parent.postMessage({ type: r.OpenConfirmDialog, payload: { options: e } }, "*");
|
|
733
|
+
function o(n) {
|
|
734
|
+
n.source === window.parent && n.data.type === r.OpenConfirmDialogResult && (window.removeEventListener("message", o, !1), s(n.data.payload.result));
|
|
721
735
|
}
|
|
722
736
|
});
|
|
723
737
|
}
|
|
724
738
|
openContentDialog(e) {
|
|
725
739
|
if (typeof e.onopened == "function")
|
|
726
|
-
throw new
|
|
740
|
+
throw new u('The "onopened" option is not implemented');
|
|
727
741
|
if (typeof e.onclose == "function")
|
|
728
|
-
throw new
|
|
742
|
+
throw new u('The "onclose" option is not implemented');
|
|
729
743
|
if (e.pagination)
|
|
730
|
-
throw new
|
|
731
|
-
return new Promise((
|
|
732
|
-
window.addEventListener("message",
|
|
744
|
+
throw new u('The "pagination" option is not implemented');
|
|
745
|
+
return new Promise((s) => {
|
|
746
|
+
window.addEventListener("message", o, !1), window.parent.postMessage(
|
|
733
747
|
{
|
|
734
748
|
type: r.OpenContentDialog,
|
|
735
749
|
payload: {
|
|
@@ -738,44 +752,44 @@ class Ye {
|
|
|
738
752
|
},
|
|
739
753
|
"*"
|
|
740
754
|
);
|
|
741
|
-
function
|
|
742
|
-
|
|
755
|
+
function o(n) {
|
|
756
|
+
n.source === window.parent && n.data.type === r.OpenContentDialogResult && (window.removeEventListener("message", o, !1), s(n.data.payload.result));
|
|
743
757
|
}
|
|
744
758
|
});
|
|
745
759
|
}
|
|
746
760
|
openFormDialog(e) {
|
|
747
|
-
return new Promise((
|
|
748
|
-
window.addEventListener("message",
|
|
749
|
-
function
|
|
750
|
-
|
|
761
|
+
return new Promise((s) => {
|
|
762
|
+
window.addEventListener("message", o, !1), window.parent.postMessage({ type: r.OpenFormDialog, payload: { options: e } }, "*");
|
|
763
|
+
function o(n) {
|
|
764
|
+
n.source === window.parent && n.data.type === r.OpenFormDialogResult && (window.removeEventListener("message", o, !1), s(n.data.payload.result));
|
|
751
765
|
}
|
|
752
766
|
});
|
|
753
767
|
}
|
|
754
|
-
openSelectPanel(e,
|
|
755
|
-
return new Promise((
|
|
768
|
+
openSelectPanel(e, s) {
|
|
769
|
+
return new Promise((o) => {
|
|
756
770
|
window.addEventListener("message", a, !1);
|
|
757
|
-
const
|
|
758
|
-
window.parent.postMessage({ type: r.OpenSelectPanel, payload: { targetRect:
|
|
771
|
+
const n = e.getBoundingClientRect();
|
|
772
|
+
window.parent.postMessage({ type: r.OpenSelectPanel, payload: { targetRect: n, options: s } }, "*");
|
|
759
773
|
function a(i) {
|
|
760
|
-
i.source === window.parent && i.data.type === r.OpenSelectPanelResult && (window.removeEventListener("message", a, !1),
|
|
774
|
+
i.source === window.parent && i.data.type === r.OpenSelectPanelResult && (window.removeEventListener("message", a, !1), o(i.data.payload.result));
|
|
761
775
|
}
|
|
762
776
|
});
|
|
763
777
|
}
|
|
764
778
|
openToast(...e) {
|
|
765
|
-
return new Promise((
|
|
779
|
+
return new Promise((s) => {
|
|
766
780
|
window.addEventListener("message", a, !1);
|
|
767
|
-
const
|
|
768
|
-
window.parent.postMessage({ type: r.OpenToast, payload: { id:
|
|
781
|
+
const o = crypto.randomUUID(), n = typeof e[0] == "string" ? { ...e[1], message: e[0] } : e[0];
|
|
782
|
+
window.parent.postMessage({ type: r.OpenToast, payload: { id: o, options: n } }, "*");
|
|
769
783
|
function a(i) {
|
|
770
|
-
i.source === window.parent && i.data.type === r.OpenToastResult && i.data.payload.id ===
|
|
784
|
+
i.source === window.parent && i.data.type === r.OpenToastResult && i.data.payload.id === o && (window.removeEventListener("message", a, !1), s(i.data.payload.result));
|
|
771
785
|
}
|
|
772
786
|
});
|
|
773
787
|
}
|
|
774
788
|
sanitizeHtml() {
|
|
775
|
-
throw new
|
|
789
|
+
throw new u();
|
|
776
790
|
}
|
|
777
791
|
saveAsFile() {
|
|
778
|
-
throw new
|
|
792
|
+
throw new u();
|
|
779
793
|
}
|
|
780
794
|
setTimeRange(e) {
|
|
781
795
|
window.parent.postMessage(
|
|
@@ -796,36 +810,36 @@ class Ye {
|
|
|
796
810
|
);
|
|
797
811
|
}
|
|
798
812
|
testVpnAccess() {
|
|
799
|
-
throw new
|
|
813
|
+
throw new u();
|
|
800
814
|
}
|
|
801
815
|
toggleVpn(e) {
|
|
802
816
|
window.parent.postMessage({ type: r.ToggleVpn, payload: { agentId: e } }, "*");
|
|
803
817
|
}
|
|
804
818
|
translate() {
|
|
805
|
-
throw new
|
|
819
|
+
throw new u();
|
|
806
820
|
}
|
|
807
821
|
}
|
|
808
|
-
class
|
|
822
|
+
class Ve {
|
|
809
823
|
constructor(e) {
|
|
810
824
|
this.id = e;
|
|
811
825
|
}
|
|
812
|
-
call(e,
|
|
813
|
-
return new Promise((
|
|
814
|
-
const
|
|
826
|
+
call(e, s) {
|
|
827
|
+
return new Promise((o) => {
|
|
828
|
+
const n = crypto.randomUUID();
|
|
815
829
|
window.addEventListener("message", a, !1), window.parent.postMessage(
|
|
816
830
|
{
|
|
817
831
|
type: r.BackendComponentClientCall,
|
|
818
832
|
payload: {
|
|
819
833
|
clientId: this.id,
|
|
820
|
-
callId:
|
|
834
|
+
callId: n,
|
|
821
835
|
functionName: e,
|
|
822
|
-
functionArguments:
|
|
836
|
+
functionArguments: s
|
|
823
837
|
}
|
|
824
838
|
},
|
|
825
839
|
"*"
|
|
826
840
|
);
|
|
827
841
|
function a(i) {
|
|
828
|
-
i.source === window.parent && i.data.type === r.BackendComponentClientCallResult && i.data.payload.callId ===
|
|
842
|
+
i.source === window.parent && i.data.type === r.BackendComponentClientCallResult && i.data.payload.callId === n && (window.removeEventListener("message", a, !1), o(i.data.payload.result));
|
|
829
843
|
}
|
|
830
844
|
});
|
|
831
845
|
}
|
|
@@ -839,33 +853,33 @@ class Ze {
|
|
|
839
853
|
);
|
|
840
854
|
}
|
|
841
855
|
}
|
|
842
|
-
class
|
|
856
|
+
class Ne {
|
|
843
857
|
constructor(e) {
|
|
844
858
|
this.id = e;
|
|
845
859
|
}
|
|
846
|
-
query(e,
|
|
847
|
-
const
|
|
848
|
-
return window.addEventListener("message",
|
|
860
|
+
query(e, s) {
|
|
861
|
+
const o = crypto.randomUUID();
|
|
862
|
+
return window.addEventListener("message", n, !1), window.parent.postMessage(
|
|
849
863
|
{
|
|
850
864
|
type: r.LoggingDataClientQuery,
|
|
851
|
-
payload: { clientId: this.id, queryId:
|
|
865
|
+
payload: { clientId: this.id, queryId: o, query: e }
|
|
852
866
|
},
|
|
853
867
|
"*"
|
|
854
868
|
), () => {
|
|
855
|
-
window.removeEventListener("message",
|
|
869
|
+
window.removeEventListener("message", n, !1);
|
|
856
870
|
};
|
|
857
|
-
function
|
|
858
|
-
if (a.source === window.parent && a.data.type === r.LoggingDataClientQueryResult && a.data.payload.queryId ===
|
|
871
|
+
function n(a) {
|
|
872
|
+
if (a.source === window.parent && a.data.type === r.LoggingDataClientQueryResult && a.data.payload.queryId === o) {
|
|
859
873
|
const { results: i } = a.data.payload;
|
|
860
874
|
if (e.length)
|
|
861
875
|
if (!e.queries || e.format !== "csv") {
|
|
862
|
-
const
|
|
863
|
-
|
|
876
|
+
const d = i.map((c) => $(c));
|
|
877
|
+
s(d);
|
|
864
878
|
} else
|
|
865
|
-
throw new
|
|
879
|
+
throw new u();
|
|
866
880
|
else {
|
|
867
|
-
const
|
|
868
|
-
|
|
881
|
+
const d = $(i);
|
|
882
|
+
s(d);
|
|
869
883
|
}
|
|
870
884
|
}
|
|
871
885
|
}
|
|
@@ -880,53 +894,53 @@ class xe {
|
|
|
880
894
|
);
|
|
881
895
|
}
|
|
882
896
|
}
|
|
883
|
-
class
|
|
897
|
+
class We {
|
|
884
898
|
constructor(e) {
|
|
885
899
|
this.id = e;
|
|
886
900
|
}
|
|
887
|
-
query(e,
|
|
888
|
-
const
|
|
889
|
-
return window.addEventListener("message",
|
|
901
|
+
query(e, s) {
|
|
902
|
+
const o = crypto.randomUUID();
|
|
903
|
+
return window.addEventListener("message", n, !1), window.parent.postMessage(
|
|
890
904
|
{
|
|
891
905
|
type: r.ResourceDataClientQuery,
|
|
892
|
-
payload: { clientId: this.id, queryId:
|
|
906
|
+
payload: { clientId: this.id, queryId: o, query: e }
|
|
893
907
|
},
|
|
894
908
|
"*"
|
|
895
909
|
), () => {
|
|
896
|
-
window.removeEventListener("message",
|
|
910
|
+
window.removeEventListener("message", n, !1);
|
|
897
911
|
};
|
|
898
|
-
function
|
|
899
|
-
a.source === window.parent && a.data.type === r.ResourceDataClientQueryResult && a.data.payload.queryId ===
|
|
912
|
+
function n(a) {
|
|
913
|
+
a.source === window.parent && a.data.type === r.ResourceDataClientQueryResult && a.data.payload.queryId === o && s(a.data.payload.results);
|
|
900
914
|
}
|
|
901
915
|
}
|
|
902
916
|
update(e) {
|
|
903
|
-
return new Promise((
|
|
904
|
-
const
|
|
905
|
-
window.addEventListener("message",
|
|
917
|
+
return new Promise((s) => {
|
|
918
|
+
const o = crypto.randomUUID();
|
|
919
|
+
window.addEventListener("message", n, !1), window.parent.postMessage(
|
|
906
920
|
{
|
|
907
921
|
type: r.ResourceDataClientUpdate,
|
|
908
|
-
payload: { clientId: this.id, updateId:
|
|
922
|
+
payload: { clientId: this.id, updateId: o, update: e }
|
|
909
923
|
},
|
|
910
924
|
"*"
|
|
911
925
|
);
|
|
912
|
-
function
|
|
913
|
-
a.source === window.parent && a.data.type === r.ResourceDataClientUpdated && a.data.payload.updateId ===
|
|
926
|
+
function n(a) {
|
|
927
|
+
a.source === window.parent && a.data.type === r.ResourceDataClientUpdated && a.data.payload.updateId === o && (window.removeEventListener("message", n, !1), s());
|
|
914
928
|
}
|
|
915
929
|
});
|
|
916
930
|
}
|
|
917
|
-
render(e,
|
|
918
|
-
const
|
|
919
|
-
return window.addEventListener("message",
|
|
931
|
+
render(e, s) {
|
|
932
|
+
const o = crypto.randomUUID();
|
|
933
|
+
return window.addEventListener("message", n, !1), window.parent.postMessage(
|
|
920
934
|
{
|
|
921
935
|
type: r.ResourceDataClientRender,
|
|
922
|
-
payload: { clientId: this.id, queryId:
|
|
936
|
+
payload: { clientId: this.id, queryId: o, query: e }
|
|
923
937
|
},
|
|
924
938
|
"*"
|
|
925
939
|
), () => {
|
|
926
|
-
window.removeEventListener("message",
|
|
940
|
+
window.removeEventListener("message", n, !1);
|
|
927
941
|
};
|
|
928
|
-
function
|
|
929
|
-
a.source === window.parent && a.data.type === r.ResourceDataClientRenderResult && a.data.payload.queryId ===
|
|
942
|
+
function n(a) {
|
|
943
|
+
a.source === window.parent && a.data.type === r.ResourceDataClientRenderResult && a.data.payload.queryId === o && s(a.data.payload.results);
|
|
930
944
|
}
|
|
931
945
|
}
|
|
932
946
|
destroy() {
|
|
@@ -939,17 +953,17 @@ class et {
|
|
|
939
953
|
);
|
|
940
954
|
}
|
|
941
955
|
}
|
|
942
|
-
function
|
|
956
|
+
function b(t) {
|
|
943
957
|
const e = !!(t && t.migrateInputs);
|
|
944
|
-
return !e &&
|
|
958
|
+
return !e && b.__cache__ ? Promise.resolve(b.__cache__) : new Promise((s) => {
|
|
945
959
|
window.addEventListener(
|
|
946
960
|
"message",
|
|
947
|
-
function
|
|
948
|
-
if (
|
|
949
|
-
let a =
|
|
961
|
+
function o(n) {
|
|
962
|
+
if (n.source === window.parent && n.data && n.data.type === r.Created) {
|
|
963
|
+
let a = n.data.payload;
|
|
950
964
|
e && (a.inputs = t.migrateInputs(a.inputs, null));
|
|
951
|
-
const i = new
|
|
952
|
-
|
|
965
|
+
const i = new He(a);
|
|
966
|
+
s(i), e || (b.__cache__ = i), window.removeEventListener("message", o, !1);
|
|
953
967
|
}
|
|
954
968
|
},
|
|
955
969
|
!1
|
|
@@ -957,6 +971,6 @@ function S(t) {
|
|
|
957
971
|
});
|
|
958
972
|
}
|
|
959
973
|
export {
|
|
960
|
-
|
|
961
|
-
|
|
974
|
+
Qe as connect,
|
|
975
|
+
b as getComponentContext
|
|
962
976
|
};
|