@luzmo/embed 5.0.13-beta.1 → 5.0.14-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.libs.cjs ADDED
@@ -0,0 +1,1191 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var __decorateClass = (decorators, target, key, kind) => {
30
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
31
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
32
+ if (decorator = decorators[i])
33
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
34
+ if (kind && result)
35
+ __defProp(target, key, result);
36
+ return result;
37
+ };
38
+
39
+ // libs/embed-libs/embed/src/index.libs.ts
40
+ var index_libs_exports = {};
41
+ __export(index_libs_exports, {
42
+ LuzmoDashboardWebComponent: () => LuzmoDashboardWebComponent,
43
+ LuzmoVizItemWebComponent: () => LuzmoVizItemWebComponent
44
+ });
45
+ module.exports = __toCommonJS(index_libs_exports);
46
+
47
+ // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-web-component.ts
48
+ var import_decorators2 = require("lit/decorators.js");
49
+
50
+ // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-base.ts
51
+ var SharedLib2 = __toESM(require("@luzmo/shared-embed"), 1);
52
+ var import_lit2 = require("lit");
53
+ var import_decorators = require("lit/decorators.js");
54
+ var import_style_map = require("lit/directives/style-map.js");
55
+ var import_shared_embed = require("@luzmo/shared-embed");
56
+
57
+ // libs/embed-libs/embed/package.json
58
+ var version = "5.0.14-beta.0";
59
+
60
+ // libs/embed-libs/embed/src/lib/luzmo-service.ts
61
+ var LuzmoService = class {
62
+ constructor() {
63
+ this._components = [];
64
+ }
65
+ };
66
+ var luzmo_service_default = new LuzmoService();
67
+
68
+ // libs/embed-libs/embed/src/lib/helper/event-bus-handler.ts
69
+ var SharedLib = __toESM(require("@luzmo/shared-embed"), 1);
70
+ var _setEventHandler = () => {
71
+ if (typeof window.__luzmoMessageHandler === "function") {
72
+ return;
73
+ }
74
+ window.__luzmoMessageHandler = (event) => {
75
+ const dashboardComponent = luzmo_service_default._components.find(
76
+ (c) => event.data.name === c._iframeId
77
+ );
78
+ if (!dashboardComponent) {
79
+ return;
80
+ }
81
+ switch (event.data?.type) {
82
+ case "load": {
83
+ dashboardComponent.dispatchEvent(
84
+ new CustomEvent("load", { detail: { data: event.data } })
85
+ );
86
+ if (dashboardComponent._loadTimeoutHandle) {
87
+ clearTimeout(dashboardComponent._loadTimeoutHandle);
88
+ dashboardComponent._loadTimeoutHandle = void 0;
89
+ }
90
+ dashboardComponent.iframeLoaded = true;
91
+ dashboardComponent.dimensions = event.data.dimensions;
92
+ dashboardComponent._calculateDimAfterDashboardLoaded();
93
+ break;
94
+ }
95
+ case "error": {
96
+ dashboardComponent.dashboardError = true;
97
+ if (dashboardComponent._loadTimeoutHandle) {
98
+ clearTimeout(dashboardComponent._loadTimeoutHandle);
99
+ dashboardComponent._loadTimeoutHandle = void 0;
100
+ }
101
+ dashboardComponent.iframeLoaded = true;
102
+ dashboardComponent._displayError();
103
+ break;
104
+ }
105
+ case "data": {
106
+ SharedLib.resolvePromise(
107
+ dashboardComponent,
108
+ event.data.requestId,
109
+ event.data.data
110
+ );
111
+ break;
112
+ }
113
+ case "filters": {
114
+ SharedLib.resolvePromise(
115
+ dashboardComponent,
116
+ event.data.requestId,
117
+ event.data.filters
118
+ );
119
+ break;
120
+ }
121
+ case "getAccessibleDashboards": {
122
+ SharedLib.resolvePromise(
123
+ dashboardComponent,
124
+ event.data.requestId,
125
+ event.data.accessibleDashboards
126
+ );
127
+ break;
128
+ }
129
+ case "dashboardAction": {
130
+ dashboardComponent.dispatchEvent(
131
+ new CustomEvent("dashboardAction", { detail: { data: event.data } })
132
+ );
133
+ break;
134
+ }
135
+ case "export": {
136
+ if (event.data.error) {
137
+ SharedLib.rejectPromise(
138
+ dashboardComponent,
139
+ event.data.requestId,
140
+ event.data
141
+ );
142
+ } else {
143
+ dashboardComponent.dispatchEvent(
144
+ new CustomEvent("exported", { detail: { data: event.data } })
145
+ );
146
+ SharedLib.resolvePromise(
147
+ dashboardComponent,
148
+ event.data.requestId,
149
+ event.data
150
+ );
151
+ }
152
+ break;
153
+ }
154
+ case "changedFilters": {
155
+ dashboardComponent.dispatchEvent(
156
+ new CustomEvent("changedFilters", { detail: { data: event.data } })
157
+ );
158
+ break;
159
+ }
160
+ case "customEvent": {
161
+ dashboardComponent.dispatchEvent(
162
+ new CustomEvent("customEvent", { detail: { data: event.data } })
163
+ );
164
+ break;
165
+ }
166
+ case "chartsRendered":
167
+ case "itemsRendered": {
168
+ event.data.type = "itemsRendered";
169
+ dashboardComponent.dispatchEvent(
170
+ new CustomEvent("itemsRendered", { detail: { data: event.data } })
171
+ );
172
+ break;
173
+ }
174
+ case "setEditMode": {
175
+ if (event.data.error) {
176
+ SharedLib.rejectPromise(
177
+ dashboardComponent,
178
+ event.data.requestId,
179
+ event.data
180
+ );
181
+ } else {
182
+ SharedLib.resolvePromise(
183
+ dashboardComponent,
184
+ event.data.requestId,
185
+ event.data
186
+ );
187
+ dashboardComponent.params.editMode = event.data.editMode;
188
+ dashboardComponent._containerStyle = SharedLib.containerStyles(dashboardComponent);
189
+ if (dashboardComponent.dimensions) {
190
+ SharedLib._setCalculatedDimensions(dashboardComponent);
191
+ }
192
+ }
193
+ break;
194
+ }
195
+ case "setFilters": {
196
+ event.data.error ? SharedLib.rejectPromise(
197
+ dashboardComponent,
198
+ event.data.requestId,
199
+ event.data
200
+ ) : SharedLib.resolvePromise(
201
+ dashboardComponent,
202
+ event.data.requestId,
203
+ event.data
204
+ );
205
+ break;
206
+ }
207
+ case "setPreview": {
208
+ event.data.error ? SharedLib.rejectPromise(
209
+ dashboardComponent,
210
+ event.data.requestId,
211
+ event.data
212
+ ) : SharedLib.resolvePromise(
213
+ dashboardComponent,
214
+ event.data.requestId,
215
+ event.data
216
+ );
217
+ break;
218
+ }
219
+ }
220
+ };
221
+ window.addEventListener("message", window.__luzmoMessageHandler, false);
222
+ };
223
+
224
+ // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-styles.ts
225
+ var import_lit = require("lit");
226
+ var dashboardStyles = import_lit.css`
227
+ :host {
228
+ display: block;
229
+ }
230
+
231
+ @-webkit-keyframes spin {
232
+ 0% {
233
+ -webkit-transform: rotate(0deg);
234
+ transform: rotate(0deg);
235
+ }
236
+ 100% {
237
+ -webkit-transform: rotate(360deg);
238
+ transform: rotate(360deg);
239
+ }
240
+ }
241
+
242
+ @keyframes spin {
243
+ 0% {
244
+ -webkit-transform: rotate(0deg);
245
+ transform: rotate(0deg);
246
+ }
247
+ 100% {
248
+ -webkit-transform: rotate(360deg);
249
+ transform: rotate(360deg);
250
+ }
251
+ }
252
+ :host {
253
+ position: relative;
254
+ width: 100%;
255
+ }
256
+
257
+ .luzmo-embed-dashboard {
258
+ background: transparent;
259
+ padding: 0;
260
+ border: 0;
261
+ }
262
+
263
+ .luzmo-embed-container-ede {
264
+ width: 100%;
265
+ height: 100%;
266
+ }
267
+
268
+ .luzmo-container-loader {
269
+ width: 100%;
270
+ position: relative;
271
+ }
272
+
273
+ .luzmo-lc {
274
+ margin: 0 auto;
275
+ }
276
+
277
+ .luzmo-loading-message {
278
+ width: 100%;
279
+ height: 20px;
280
+ text-align: center;
281
+ margin-bottom: 16px;
282
+ font-family: Helvetica, Arial, sans-serif;
283
+ font-size: 14px;
284
+ }
285
+
286
+ .luzmo-loading-circle {
287
+ box-sizing: border-box;
288
+ margin: 16px auto;
289
+ position: relative;
290
+ text-indent: -9999em;
291
+ animation: spin 0.6s infinite linear;
292
+ }
293
+
294
+ .luzmo-loading-circle,
295
+ .luzmo-loading-circle:after {
296
+ border-radius: 50%;
297
+ width: 32px;
298
+ height: 32px;
299
+ }
300
+
301
+ .itemEmbedding:after {
302
+ width: 24px;
303
+ height: 24px;
304
+ }
305
+
306
+ .luzmo-error {
307
+ background: transparent;
308
+ padding: 48px 0;
309
+ margin: 0 auto;
310
+ width: 80%;
311
+ border: 0;
312
+ text-align: center;
313
+ min-height: 192px;
314
+ }
315
+
316
+ .dashboard-error {
317
+ font-size: 30px;
318
+ background: transparent;
319
+ padding: 48px 0;
320
+ margin: 0 auto;
321
+ width: 80%;
322
+ border: 0;
323
+ text-align: center;
324
+ min-height: 192px;
325
+ }
326
+
327
+ .luzmo-loader {
328
+ top: 0;
329
+ left: 0;
330
+ width: 100%;
331
+ min-height: 400px;
332
+ position: absolute;
333
+ transition-duration: 0.3s;
334
+ }
335
+ `;
336
+
337
+ // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-base.ts
338
+ var LuzmoDashboard = class extends import_lit2.LitElement {
339
+ constructor(inputParameters) {
340
+ super();
341
+ this.language = "auto";
342
+ this.screenMode = "auto";
343
+ this.switchScreenModeOnResize = true;
344
+ this.editMode = "view";
345
+ this.experimental = false;
346
+ this.iframeStyle = {};
347
+ this._containerStyle = {};
348
+ this._loaderStyle = {};
349
+ this._lcStyle = {};
350
+ this._loadingCircleStyle = {};
351
+ this._containerLoaderStyle = {};
352
+ this._loaderMsg = "";
353
+ this._itemEmbedding = false;
354
+ this.browserError = false;
355
+ this.browserErrorMsg = "";
356
+ this.dashboardError = false;
357
+ this.browserNotSupported = [];
358
+ this.VERSION = version + "-wc-luzmo";
359
+ this.isLibraryLoaded = false;
360
+ this.currentAuthKey = null;
361
+ this.currentAuthToken = null;
362
+ this.attributesMap = {
363
+ dashboardId: "dashboard-id",
364
+ dashboardSlug: "dashboard-slug",
365
+ itemId: "item-id",
366
+ language: "language",
367
+ qeVersion: "qe-version",
368
+ screenMode: "screen-mode",
369
+ switchScreenModeOnResize: "switch-screen-mode-on-resize",
370
+ authKey: "auth-key",
371
+ authToken: "auth-token",
372
+ editMode: "edit-mode",
373
+ mainColor: "main-color",
374
+ accentColor: "accent-color",
375
+ loaderBackground: "loader-background",
376
+ loaderFontColor: "loader-font-color",
377
+ loaderSpinnerColor: "loader-spinner-color",
378
+ loaderSpinnerBackground: "loader-spinner-background",
379
+ appServer: "app-server",
380
+ apiHost: "api-host",
381
+ itemDimensions: "item-dimensions",
382
+ timezoneId: "timezone-id"
383
+ };
384
+ this.loaderSize = 32;
385
+ this.borderWidth = 3;
386
+ this.minHeight = 400;
387
+ this._containerId = SharedLib2.uuidv4();
388
+ this._iframeId = `luzmo-dashboard-${this._containerId}`;
389
+ this.iframeLoaded = false;
390
+ this.promises = {};
391
+ this.setInputParameters(inputParameters);
392
+ this.params = this._setOptions();
393
+ this._onResize = () => {
394
+ if (this.shadowRoot?.querySelector(".dashboard-container")) {
395
+ this.containerWidth = this.luzmoEmbedContainer.offsetWidth;
396
+ if (this.params.switchScreenModeOnResize && this.params.screenMode === "auto") {
397
+ for (const d of SharedLib2.EXTENTS) {
398
+ if (d.width[0] <= window.innerWidth && window.innerWidth <= d.width[1]) {
399
+ this.currentScreenMode = d.mode;
400
+ }
401
+ }
402
+ }
403
+ if (this.iframeLoaded) {
404
+ this._calculateDimAfterDashboardLoaded();
405
+ } else {
406
+ if (this.dimensions) {
407
+ this.containerWidth = this.luzmoEmbedContainer.offsetWidth;
408
+ SharedLib2._setCalculatedDimensions(this);
409
+ }
410
+ }
411
+ }
412
+ };
413
+ this._resizeObserver = new ResizeObserver((entries) => {
414
+ window.requestAnimationFrame(() => {
415
+ if (!Array.isArray(entries) || entries.length === 0) {
416
+ return;
417
+ }
418
+ this._onResize();
419
+ });
420
+ });
421
+ }
422
+ loadLibrary(appServer) {
423
+ if (import_shared_embed.remotesMap[appServer]) {
424
+ return Promise.resolve(import_shared_embed.remotesMap[appServer].module);
425
+ }
426
+ import_shared_embed.remotesMap[appServer] = {
427
+ url: appServer?.startsWith("http://localhost") ? `${SharedLib2.removeTrailingSlash(appServer)}/remoteEntry.mjs` : `${SharedLib2.removeTrailingSlash(appServer)}/dashboard-app/remoteEntry.mjs`,
428
+ format: "esm",
429
+ from: "vite",
430
+ module: void 0
431
+ };
432
+ return (0, import_shared_embed.__federationMethodGetRemote)(appServer, "./DashboardApp").then((module2) => {
433
+ const wrappedModule = (0, import_shared_embed.__federationMethodWrapDefault)(module2, true);
434
+ import_shared_embed.remotesMap[appServer].module = wrappedModule;
435
+ return wrappedModule;
436
+ });
437
+ }
438
+ setInputParameters(inputParameters) {
439
+ if (!inputParameters) {
440
+ return;
441
+ }
442
+ const params = [
443
+ "dashboardId",
444
+ "dashboardSlug",
445
+ "itemId",
446
+ "language",
447
+ "qeVersion",
448
+ "screenMode",
449
+ "switchScreenModeOnResize",
450
+ "accentColor",
451
+ "mainColor",
452
+ "authToken",
453
+ "authKey",
454
+ "editMode",
455
+ "loaderBackground",
456
+ "loaderFontColor",
457
+ "loaderSpinnerColor",
458
+ "loaderSpinnerBackground",
459
+ "timezoneId",
460
+ "itemDimensions",
461
+ "apiHost"
462
+ ];
463
+ for (const key of params) {
464
+ const value = inputParameters[key];
465
+ if (value) {
466
+ this[key] = value;
467
+ }
468
+ }
469
+ if (inputParameters.experimental) {
470
+ this.experimental = inputParameters.experimental;
471
+ }
472
+ if (inputParameters.appServer) {
473
+ this.appServer = SharedLib2.addTrailingSlash(inputParameters.appServer);
474
+ }
475
+ }
476
+ // Set resize event listener
477
+ connectedCallback() {
478
+ super.connectedCallback();
479
+ }
480
+ // Set resize event listener
481
+ disconnectedCallback() {
482
+ super.disconnectedCallback();
483
+ this._resizeObserver.disconnect();
484
+ for (const promiseKey of Object.keys(this.promises)) {
485
+ this.promises[promiseKey].reject(
486
+ new Error("Dashboard component was removed")
487
+ );
488
+ }
489
+ }
490
+ firstUpdated() {
491
+ this._loaderMsg = SharedLib2.getLoader(this)?.loadingMsg;
492
+ this._loaderStyles();
493
+ luzmo_service_default._components.push(this);
494
+ this.initComponent();
495
+ if (this.luzmoEmbedContainer) {
496
+ this._resizeObserver.observe(this.luzmoEmbedContainer);
497
+ }
498
+ }
499
+ initComponent() {
500
+ this.params = this._setOptions();
501
+ if (this.getIsViewMode()) {
502
+ this.loadLibrary(this.params.appServer).then(async () => {
503
+ this.isLibraryLoaded = true;
504
+ await this.updateComplete;
505
+ const oldReference = this.renderRoot.querySelector("dashboard-component");
506
+ this.dashboardReference = oldReference.cloneNode(true);
507
+ oldReference.replaceWith(this.dashboardReference);
508
+ this.dashboardReference.addEventListener("load", (payload) => {
509
+ this.containerWidth = this.dashboardReference.offsetWidth;
510
+ this.dimensions = payload.detail.dimensions;
511
+ SharedLib2._setCalculatedDimensions(this);
512
+ window.dispatchEvent(new Event("resize"));
513
+ this.dispatchEvent(new CustomEvent("load", payload));
514
+ });
515
+ this.dashboardReference.addEventListener("itemsRendered", (payload) => this.dispatchEvent(new CustomEvent("itemsRendered", payload)));
516
+ this.dashboardReference.addEventListener("customEvent", (payload) => this.dispatchEvent(new CustomEvent("customEvent", payload)));
517
+ this.dashboardReference.addEventListener("changedFilters", (payload) => this.dispatchEvent(new CustomEvent("changedFilters", payload)));
518
+ this.dashboardReference.addEventListener("dashboardAction", (payload) => this.dispatchEvent(new CustomEvent("dashboardAction", payload)));
519
+ this.dashboardReference.addEventListener("export", (payload) => this.dispatchEvent(new CustomEvent("exported", payload)));
520
+ this.setAllAttributes();
521
+ });
522
+ } else {
523
+ this.containerWidth = this.container?.clientWidth;
524
+ SharedLib2._extendAndValidate(this);
525
+ SharedLib2._browserCheck(this);
526
+ this._setupLoader();
527
+ if (!this.params.error) {
528
+ this._loaderStyles();
529
+ _setEventHandler();
530
+ this._iframeUrl = SharedLib2.createIframeUrl(this);
531
+ this.iframe?.setAttribute("src", this._iframeUrl);
532
+ this.iframeStyle = SharedLib2.calculateIframeStyles(this);
533
+ }
534
+ }
535
+ }
536
+ setAllAttributes() {
537
+ if (this.dashboardReference) {
538
+ for (const key in this.attributesMap) {
539
+ if (!["authKey", "authToken", "apiHost", "itemDimensions"].includes(key) && this.params[key]) {
540
+ this.dashboardReference.setAttribute(this.attributesMap[key], this.params[key]);
541
+ }
542
+ if (this.params.itemDimensions) {
543
+ this.dashboardReference.setAttribute("item-dimensions", JSON.stringify(this.params.itemDimensions));
544
+ }
545
+ if (this.params.apiHost) {
546
+ this.dashboardReference.setAttribute("api-host", SharedLib2.removeTrailingSlash(this.params.apiHost));
547
+ }
548
+ if (this.params.key) {
549
+ this.dashboardReference.setAttribute("auth-key", this.params.key);
550
+ }
551
+ if (this.params.token) {
552
+ this.dashboardReference.setAttribute("auth-token", this.params.token);
553
+ }
554
+ }
555
+ }
556
+ }
557
+ // Reload dashboard when triggerproperty changes
558
+ updated(changedProperties) {
559
+ const triggerProperties = /* @__PURE__ */ new Set([
560
+ "dashboardId",
561
+ "dashboardSlug",
562
+ "itemId",
563
+ "language",
564
+ "qeVersion",
565
+ "editMode",
566
+ "screenMode",
567
+ "switchScreenModeOnResize",
568
+ "authToken",
569
+ "authKey",
570
+ "appServer",
571
+ "timezoneId",
572
+ "itemDimensions"
573
+ ]);
574
+ if (this.getIsViewMode()) {
575
+ if (this.dashboardReference) {
576
+ for (const [propertyName] of changedProperties.entries()) {
577
+ if (propertyName === "appSever") {
578
+ this.loadLibrary(changedProperties[propertyName]).then(async () => {
579
+ this.isLibraryLoaded = true;
580
+ await this.updateComplete;
581
+ this.dashboardReference = this.renderRoot.querySelector("dashboard-component");
582
+ this.setAllAttributes();
583
+ });
584
+ } else if (this.attributesMap[propertyName]) {
585
+ const mappedAttributeName = this.attributesMap[propertyName] ?? propertyName;
586
+ const attributeValue = typeof this[propertyName] === "object" ? JSON.stringify(this[propertyName]) : this[propertyName]?.toString() || this[propertyName];
587
+ this.dashboardReference.setAttribute(mappedAttributeName, attributeValue);
588
+ }
589
+ }
590
+ }
591
+ } else {
592
+ for (const [propertyName] of changedProperties.entries()) {
593
+ if (triggerProperties.has(propertyName) && propertyName !== "editMode") {
594
+ this.iframeLoaded = false;
595
+ if (this._loadTimeoutHandle) {
596
+ clearTimeout(this._loadTimeoutHandle);
597
+ }
598
+ this._loadTimeoutHandle = setTimeout(() => {
599
+ console.error(
600
+ "Failed to load dashboard, appServer is likely down or unreachable."
601
+ );
602
+ }, 15 * 1e3);
603
+ this.params = this._setOptions();
604
+ SharedLib2._extendAndValidate(this);
605
+ this._setupLoader();
606
+ this._loaderStyles();
607
+ this._iframeUrl = SharedLib2.createIframeUrl(this);
608
+ if (this.iframe) {
609
+ this._updateIframeUrl();
610
+ }
611
+ this.iframeStyle = SharedLib2.calculateIframeStyles(this);
612
+ } else if (triggerProperties.has(propertyName) && propertyName === "editMode") {
613
+ if (this.iframeLoaded) {
614
+ this.setEditMode(this.editMode);
615
+ }
616
+ this.params = this._setOptions();
617
+ }
618
+ }
619
+ }
620
+ }
621
+ // Set params
622
+ _setOptions() {
623
+ const defaultParameters = {
624
+ dashboardId: this.dashboardId,
625
+ dashboardSlug: this.dashboardSlug
626
+ };
627
+ if (this.itemId) {
628
+ defaultParameters.itemId = this.itemId;
629
+ this._itemEmbedding = true;
630
+ } else {
631
+ this._itemEmbedding = false;
632
+ }
633
+ if (this.language) {
634
+ defaultParameters.language = this.language;
635
+ }
636
+ if (this.qeVersion) {
637
+ defaultParameters.qeVersion = this.qeVersion;
638
+ }
639
+ if (this.screenMode) {
640
+ defaultParameters.screenMode = this.screenMode;
641
+ }
642
+ defaultParameters.switchScreenModeOnResize = this.switchScreenModeOnResize;
643
+ if (this.authToken) {
644
+ defaultParameters.token = this.authToken;
645
+ }
646
+ if (this.authKey) {
647
+ defaultParameters.key = this.authKey;
648
+ }
649
+ if (this.editMode) {
650
+ defaultParameters.editMode = this.editMode;
651
+ }
652
+ if (this.mainColor) {
653
+ defaultParameters.mainColor = this.mainColor;
654
+ }
655
+ if (this.accentColor) {
656
+ defaultParameters.accentColor = this.accentColor;
657
+ }
658
+ if (this.loaderBackground) {
659
+ defaultParameters.loaderBackground = this.loaderBackground;
660
+ }
661
+ if (this.loaderFontColor) {
662
+ defaultParameters.loaderFontColor = this.loaderFontColor;
663
+ }
664
+ if (this.loaderSpinnerColor) {
665
+ defaultParameters.loaderSpinnerColor = this.loaderSpinnerColor;
666
+ }
667
+ if (this.loaderSpinnerBackground) {
668
+ defaultParameters.loaderSpinnerBackground = this.loaderSpinnerBackground;
669
+ }
670
+ if (this.timezoneId) {
671
+ defaultParameters.timezoneId = this.timezoneId;
672
+ }
673
+ if (this.itemDimensions) {
674
+ defaultParameters.itemDimensions = this.itemDimensions;
675
+ }
676
+ if (this.appServer) {
677
+ this.appServer = this.getIsViewMode() ? SharedLib2.removeTrailingSlash(this.appServer) : SharedLib2.addTrailingSlash(this.appServer);
678
+ defaultParameters.appServer = this.appServer;
679
+ } else {
680
+ this.appServer = SharedLib2.addTrailingSlash(
681
+ SharedLib2.DEFAULT_PARAMETERS.appServer
682
+ );
683
+ defaultParameters.appServer = this.appServer;
684
+ }
685
+ if (this.apiHost) {
686
+ this.apiHost = this.getIsViewMode() ? SharedLib2.removeTrailingSlash(this.apiHost) : SharedLib2.addTrailingSlash(this.apiHost);
687
+ defaultParameters.apiHost = this.apiHost;
688
+ } else {
689
+ this.apiHost = this.appServer.includes("luzmo.com") ? this.appServer.replace("app", "api") : this.appServer;
690
+ defaultParameters.apiHost = this.apiHost;
691
+ }
692
+ this.currentAuthKey = this.authKey;
693
+ this.currentAuthToken = this.authToken;
694
+ return defaultParameters;
695
+ }
696
+ _updateIframeUrl() {
697
+ SharedLib2.updateIframeUrl(this.iframe, this._iframeUrl);
698
+ }
699
+ // Setup loader / browser error
700
+ _setupLoader() {
701
+ const data = SharedLib2.getLoader(this);
702
+ this._loaderMsg = data.loadingMsg;
703
+ if (data.errorMsg) {
704
+ this.browserError = true;
705
+ this.browserErrorMsg = data.errorMsg;
706
+ this._displayError();
707
+ }
708
+ }
709
+ _displayError() {
710
+ if (this.dashboardError) {
711
+ this._loaderStyles();
712
+ this.iframeStyle.opacity = 1;
713
+ }
714
+ if (this.browserError) {
715
+ this._containerStyle.display = "none";
716
+ }
717
+ }
718
+ _calculateDimAfterDashboardLoaded() {
719
+ this.dashboardError = false;
720
+ this._loaderStyles();
721
+ SharedLib2._setCalculatedDimensions(this);
722
+ }
723
+ // Set loader styles
724
+ _loaderStyles() {
725
+ this._containerStyle = SharedLib2.containerStyles(this);
726
+ this._loaderStyle = SharedLib2.loaderStyles(this);
727
+ this._loadingCircleStyle = SharedLib2.plStyles(this);
728
+ this._containerLoaderStyle = SharedLib2.containerLoaderStyles(this);
729
+ this._lcStyle = SharedLib2.lcStyles(this);
730
+ }
731
+ static get styles() {
732
+ return [dashboardStyles];
733
+ }
734
+ render() {
735
+ let toBeRenderedHTML;
736
+ const loader = import_lit2.html`
737
+ <div
738
+ class="luzmo-container-loader"
739
+ id="luzmo-container-loader-${this._containerId}"
740
+ style=${(0, import_style_map.styleMap)(
741
+ this._containerLoaderStyle
742
+ )}
743
+ >
744
+ <div
745
+ class="luzmo-loader"
746
+ id="luzmo-loader-${this._containerId}"
747
+ style=${(0, import_style_map.styleMap)(this._loaderStyle)}
748
+ >
749
+ <div
750
+ class="luzmo-lc"
751
+ style=${(0, import_style_map.styleMap)(this._lcStyle)}
752
+ >
753
+ <div
754
+ class="luzmo-loading-circle"
755
+ style=${(0, import_style_map.styleMap)(
756
+ this._loadingCircleStyle
757
+ )}
758
+ ></div>
759
+ ${this._itemEmbedding ? "" : import_lit2.html`
760
+ <div
761
+ class="luzmo-loading-message"
762
+ style=${(0, import_style_map.styleMap)({ color: this.loaderFontColor })}
763
+ >
764
+ ${this._loaderMsg}
765
+ </div>
766
+ `}
767
+ </div>
768
+ </div>
769
+ </div>
770
+ `;
771
+ if (this.getIsViewMode()) {
772
+ toBeRenderedHTML = this.isLibraryLoaded ? import_lit2.html`
773
+ ${this.dashboardId || this.dashboardSlug ? import_lit2.html`
774
+ <dashboard-component dashboard-id="${this.params.dashboardId}" app-server="${this.params.appServer}"
775
+ api-host="${this.params.apiHost}"></dashboard-component>` : import_lit2.html`
776
+ <div id="luzmo-error-${this._containerId}">
777
+ <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
778
+ </div>
779
+ `}
780
+ ` : import_lit2.html`${loader}`;
781
+ } else {
782
+ toBeRenderedHTML = import_lit2.html`
783
+ ${this.dashboardId || this.dashboardSlug ? import_lit2.html`
784
+ ${loader}
785
+ <iframe
786
+ class="luzmo-embed-dashboard"
787
+ id="${this._iframeId}"
788
+ name="${this._iframeId}"
789
+ style=${(0, import_style_map.styleMap)(this.iframeStyle)}
790
+ src="${this._iframeUrl}"
791
+ frameborder="0"
792
+ ></iframe>
793
+ ` : import_lit2.html`<!-- the dashboard will inititialize when you provide a dashboardSlug or a dashboardId -->`}
794
+ ${this.browserError ? import_lit2.html`
795
+ <div id="luzmo-error-${this._containerId}">
796
+ <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
797
+ </div>
798
+ ` : ""}
799
+ `;
800
+ }
801
+ return import_lit2.html`
802
+ <div class="${import_shared_embed.luzmoEmbedContainerClass} ${!this.getIsViewMode() ? `${import_shared_embed.luzmoEmbedContainerClass}-ede` : ""}">
803
+ <div
804
+ class="dashboard-container"
805
+ style=${(0, import_style_map.styleMap)(Object.assign({}, this._containerStyle, {
806
+ width: this.iframeStyle.width ?? "100%",
807
+ height: this.iframeStyle.height ?? "100%"
808
+ }))}
809
+ >
810
+ ${toBeRenderedHTML}
811
+ </div>
812
+ </div>
813
+
814
+ `;
815
+ }
816
+ getDashboards() {
817
+ return new Promise(
818
+ (resolve) => resolve(luzmo_service_default._components)
819
+ );
820
+ }
821
+ // Public methods
822
+ getData(itemId) {
823
+ if (this.getIsViewMode() && this.dashboardReference) {
824
+ return this.dashboardReference.getData(itemId);
825
+ }
826
+ if (!this.getIsViewMode()) {
827
+ return SharedLib2.getData(this, this.iframe, itemId);
828
+ }
829
+ return Promise.reject();
830
+ }
831
+ getFilters() {
832
+ if (this.getIsViewMode() && this.dashboardReference) {
833
+ return this.dashboardReference.getFilters();
834
+ }
835
+ if (!this.getIsViewMode()) {
836
+ return SharedLib2.getFilters(this, this.iframe);
837
+ }
838
+ return Promise.reject();
839
+ }
840
+ setFilters(itemId, filters) {
841
+ if (this.getIsViewMode() && this.dashboardReference) {
842
+ return this.dashboardReference.setFilters(itemId, filters);
843
+ }
844
+ if (!this.getIsViewMode()) {
845
+ return SharedLib2.setFilters(this, this.iframe, itemId, filters);
846
+ }
847
+ return Promise.reject();
848
+ }
849
+ setAuthorization(key, token) {
850
+ this.currentAuthKey = key;
851
+ this.currentAuthToken = token;
852
+ if (this.getIsViewMode() && this.dashboardReference) {
853
+ return this.dashboardReference.setAuthorization(key, token);
854
+ }
855
+ if (!this.getIsViewMode()) {
856
+ return SharedLib2.setAuthorization(this, this.iframe, key, token);
857
+ }
858
+ return Promise.reject();
859
+ }
860
+ refreshData(itemId) {
861
+ if (this.getIsViewMode() && this.dashboardReference) {
862
+ return this.dashboardReference.refreshData(itemId);
863
+ }
864
+ if (!this.getIsViewMode()) {
865
+ return itemId ? SharedLib2.refreshData(this, this.iframe, itemId) : SharedLib2.refreshData(this, this.iframe);
866
+ }
867
+ return Promise.reject();
868
+ }
869
+ reloadDashboard() {
870
+ if (this.getIsViewMode() && this.dashboardReference) {
871
+ return this.dashboardReference.reloadDashboard();
872
+ }
873
+ if (!this.getIsViewMode()) {
874
+ return SharedLib2.reloadDashboard(this, this.iframe);
875
+ }
876
+ return Promise.reject();
877
+ }
878
+ exportDashboard(format) {
879
+ if (this.getIsViewMode() && this.dashboardReference) {
880
+ return this.dashboardReference.exportDashboard(format);
881
+ }
882
+ if (!this.getIsViewMode()) {
883
+ return format ? SharedLib2.exportDashboard(this, this.iframe, format) : SharedLib2.exportDashboard(this, this.iframe);
884
+ }
885
+ return Promise.reject();
886
+ }
887
+ getAccessibleDashboards() {
888
+ return SharedLib2.getAccessibleDashboards(this);
889
+ }
890
+ addFilters(itemId, filters) {
891
+ return this.dashboardReference.addFilters(itemId, filters);
892
+ }
893
+ setEditMode(editMode) {
894
+ if (this.dashboardReference && editMode === "view") {
895
+ this.editMode = "view";
896
+ this.params.editMode = "view";
897
+ this.initComponent();
898
+ return Promise.resolve({
899
+ type: "setEditMode",
900
+ editMode
901
+ });
902
+ }
903
+ if (this.dashboardReference && ["editFull", "editLimited"].includes(editMode)) {
904
+ this.editMode = editMode;
905
+ this.params.editMode = editMode;
906
+ this.initComponent();
907
+ return Promise.resolve({
908
+ type: "setEditMode",
909
+ editMode
910
+ });
911
+ }
912
+ if (this.getIsViewMode() && this.dashboardReference) {
913
+ return this.dashboardReference.setEditMode(editMode);
914
+ }
915
+ if (!this.getIsViewMode()) {
916
+ return SharedLib2.setEditMode(this, this.iframe, editMode);
917
+ }
918
+ return Promise.reject();
919
+ }
920
+ setPreview(preview) {
921
+ if (this.getIsViewMode() && this.dashboardReference) {
922
+ return this.dashboardReference.setPreview(preview);
923
+ }
924
+ return SharedLib2.setPreview(this, this.iframe, preview);
925
+ }
926
+ getIsViewMode() {
927
+ return this.experimental && this.params.editMode === "view" || this.params.editMode === void 0;
928
+ }
929
+ };
930
+ __decorateClass([
931
+ (0, import_decorators.query)(".dashboard-container")
932
+ ], LuzmoDashboard.prototype, "container", 2);
933
+ __decorateClass([
934
+ (0, import_decorators.query)(`.${import_shared_embed.luzmoEmbedContainerClass}`)
935
+ ], LuzmoDashboard.prototype, "luzmoEmbedContainer", 2);
936
+ __decorateClass([
937
+ (0, import_decorators.query)("iframe")
938
+ ], LuzmoDashboard.prototype, "iframe", 2);
939
+ __decorateClass([
940
+ (0, import_decorators.property)()
941
+ ], LuzmoDashboard.prototype, "dashboardId", 2);
942
+ __decorateClass([
943
+ (0, import_decorators.property)()
944
+ ], LuzmoDashboard.prototype, "dashboardSlug", 2);
945
+ __decorateClass([
946
+ (0, import_decorators.property)()
947
+ ], LuzmoDashboard.prototype, "itemId", 2);
948
+ __decorateClass([
949
+ (0, import_decorators.property)()
950
+ ], LuzmoDashboard.prototype, "language", 2);
951
+ __decorateClass([
952
+ (0, import_decorators.property)()
953
+ ], LuzmoDashboard.prototype, "qeVersion", 2);
954
+ __decorateClass([
955
+ (0, import_decorators.property)()
956
+ ], LuzmoDashboard.prototype, "screenMode", 2);
957
+ __decorateClass([
958
+ (0, import_decorators.property)({
959
+ converter: {
960
+ fromAttribute: (value) => value === "true",
961
+ toAttribute: String
962
+ }
963
+ })
964
+ ], LuzmoDashboard.prototype, "switchScreenModeOnResize", 2);
965
+ __decorateClass([
966
+ (0, import_decorators.property)()
967
+ ], LuzmoDashboard.prototype, "editMode", 2);
968
+ __decorateClass([
969
+ (0, import_decorators.property)()
970
+ ], LuzmoDashboard.prototype, "mainColor", 2);
971
+ __decorateClass([
972
+ (0, import_decorators.property)()
973
+ ], LuzmoDashboard.prototype, "accentColor", 2);
974
+ __decorateClass([
975
+ (0, import_decorators.property)()
976
+ ], LuzmoDashboard.prototype, "authToken", 2);
977
+ __decorateClass([
978
+ (0, import_decorators.property)()
979
+ ], LuzmoDashboard.prototype, "authKey", 2);
980
+ __decorateClass([
981
+ (0, import_decorators.property)()
982
+ ], LuzmoDashboard.prototype, "loaderBackground", 2);
983
+ __decorateClass([
984
+ (0, import_decorators.property)()
985
+ ], LuzmoDashboard.prototype, "loaderFontColor", 2);
986
+ __decorateClass([
987
+ (0, import_decorators.property)()
988
+ ], LuzmoDashboard.prototype, "loaderSpinnerColor", 2);
989
+ __decorateClass([
990
+ (0, import_decorators.property)()
991
+ ], LuzmoDashboard.prototype, "loaderSpinnerBackground", 2);
992
+ __decorateClass([
993
+ (0, import_decorators.property)()
994
+ ], LuzmoDashboard.prototype, "appServer", 2);
995
+ __decorateClass([
996
+ (0, import_decorators.property)()
997
+ ], LuzmoDashboard.prototype, "timezoneId", 2);
998
+ __decorateClass([
999
+ (0, import_decorators.property)()
1000
+ ], LuzmoDashboard.prototype, "apiHost", 2);
1001
+ __decorateClass([
1002
+ (0, import_decorators.property)({ type: Object })
1003
+ ], LuzmoDashboard.prototype, "itemDimensions", 2);
1004
+ __decorateClass([
1005
+ (0, import_decorators.property)({
1006
+ converter: {
1007
+ fromAttribute: (value) => value === "true",
1008
+ toAttribute: String
1009
+ }
1010
+ })
1011
+ ], LuzmoDashboard.prototype, "experimental", 2);
1012
+ __decorateClass([
1013
+ (0, import_decorators.property)({ attribute: false })
1014
+ ], LuzmoDashboard.prototype, "_containerId", 2);
1015
+ __decorateClass([
1016
+ (0, import_decorators.property)({ attribute: false })
1017
+ ], LuzmoDashboard.prototype, "_iframeId", 2);
1018
+ __decorateClass([
1019
+ (0, import_decorators.property)({ attribute: false })
1020
+ ], LuzmoDashboard.prototype, "params", 2);
1021
+ __decorateClass([
1022
+ (0, import_decorators.property)({ attribute: false })
1023
+ ], LuzmoDashboard.prototype, "_iframeUrl", 2);
1024
+ __decorateClass([
1025
+ (0, import_decorators.property)({ attribute: false })
1026
+ ], LuzmoDashboard.prototype, "iframeLoaded", 2);
1027
+ __decorateClass([
1028
+ (0, import_decorators.property)({ attribute: false })
1029
+ ], LuzmoDashboard.prototype, "promises", 2);
1030
+ __decorateClass([
1031
+ (0, import_decorators.property)({ attribute: false })
1032
+ ], LuzmoDashboard.prototype, "iframeStyle", 2);
1033
+ __decorateClass([
1034
+ (0, import_decorators.property)({ attribute: false })
1035
+ ], LuzmoDashboard.prototype, "_containerStyle", 2);
1036
+ __decorateClass([
1037
+ (0, import_decorators.property)({ attribute: false })
1038
+ ], LuzmoDashboard.prototype, "_loaderStyle", 2);
1039
+ __decorateClass([
1040
+ (0, import_decorators.property)({ attribute: false })
1041
+ ], LuzmoDashboard.prototype, "_lcStyle", 2);
1042
+ __decorateClass([
1043
+ (0, import_decorators.property)({ attribute: false })
1044
+ ], LuzmoDashboard.prototype, "_loadingCircleStyle", 2);
1045
+ __decorateClass([
1046
+ (0, import_decorators.property)({ attribute: false })
1047
+ ], LuzmoDashboard.prototype, "_containerLoaderStyle", 2);
1048
+ __decorateClass([
1049
+ (0, import_decorators.property)({ attribute: false })
1050
+ ], LuzmoDashboard.prototype, "_loaderMsg", 2);
1051
+ __decorateClass([
1052
+ (0, import_decorators.property)({ attribute: false })
1053
+ ], LuzmoDashboard.prototype, "containerWidth", 2);
1054
+ __decorateClass([
1055
+ (0, import_decorators.property)({ attribute: false })
1056
+ ], LuzmoDashboard.prototype, "dimensions", 2);
1057
+ __decorateClass([
1058
+ (0, import_decorators.property)({ attribute: false })
1059
+ ], LuzmoDashboard.prototype, "currentScreenMode", 2);
1060
+ __decorateClass([
1061
+ (0, import_decorators.property)({ attribute: false })
1062
+ ], LuzmoDashboard.prototype, "_itemEmbedding", 2);
1063
+ __decorateClass([
1064
+ (0, import_decorators.property)({ attribute: false })
1065
+ ], LuzmoDashboard.prototype, "browserError", 2);
1066
+ __decorateClass([
1067
+ (0, import_decorators.property)({ attribute: false })
1068
+ ], LuzmoDashboard.prototype, "browserErrorMsg", 2);
1069
+ __decorateClass([
1070
+ (0, import_decorators.property)({ attribute: false })
1071
+ ], LuzmoDashboard.prototype, "dashboardError", 2);
1072
+ __decorateClass([
1073
+ (0, import_decorators.property)({ attribute: false })
1074
+ ], LuzmoDashboard.prototype, "browserNotSupported", 2);
1075
+ __decorateClass([
1076
+ (0, import_decorators.property)()
1077
+ ], LuzmoDashboard.prototype, "VERSION", 2);
1078
+ __decorateClass([
1079
+ (0, import_decorators.state)()
1080
+ ], LuzmoDashboard.prototype, "isLibraryLoaded", 2);
1081
+ __decorateClass([
1082
+ (0, import_decorators.state)()
1083
+ ], LuzmoDashboard.prototype, "dashboardReference", 2);
1084
+ __decorateClass([
1085
+ (0, import_decorators.state)()
1086
+ ], LuzmoDashboard.prototype, "currentAuthKey", 2);
1087
+ __decorateClass([
1088
+ (0, import_decorators.state)()
1089
+ ], LuzmoDashboard.prototype, "currentAuthToken", 2);
1090
+
1091
+ // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-web-component.ts
1092
+ var LuzmoDashboardWebComponent = class extends LuzmoDashboard {
1093
+ };
1094
+ LuzmoDashboardWebComponent = __decorateClass([
1095
+ (0, import_decorators2.customElement)("luzmo-dashboard-web-component")
1096
+ ], LuzmoDashboardWebComponent);
1097
+
1098
+ // libs/embed-libs/embed/src/lib/viz-item/viz-item-web-component.ts
1099
+ var import_decorators4 = require("lit/decorators.js");
1100
+
1101
+ // libs/embed-libs/embed/src/lib/viz-item/viz-item.base.ts
1102
+ var import_decorators3 = require("lit/decorators.js");
1103
+ var import_lit3 = require("lit");
1104
+ var SharedLib3 = __toESM(require("@luzmo/shared-embed"), 1);
1105
+ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1106
+ constructor() {
1107
+ super();
1108
+ this.appServer = "https://app.luzmo.com";
1109
+ this.apiHost = "https://api.luzmo.com";
1110
+ this.slots = [];
1111
+ this.options = {
1112
+ title: {
1113
+ en: ""
1114
+ },
1115
+ theme: "default"
1116
+ };
1117
+ this.VERSION = version + "-wc-luzmo";
1118
+ }
1119
+ static {
1120
+ // Static styles to set host display to block, else it is not shown at all for some reason.
1121
+ this.styles = import_lit3.css`
1122
+ :host {
1123
+ display: block;
1124
+ width: 100%;
1125
+ height: 100%;
1126
+ }
1127
+ `;
1128
+ }
1129
+ async firstUpdated(_changedProperties) {
1130
+ super.firstUpdated(_changedProperties);
1131
+ console.log(this.appServer);
1132
+ await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1133
+ this.chartElement = document.createElement("chart-component");
1134
+ this.chartElement.setAttribute("embedding-mode", "chart");
1135
+ this.updateVizItemProperties();
1136
+ this.renderRoot.append(this.chartElement);
1137
+ }
1138
+ updateVizItemProperties() {
1139
+ if (this.chartElement) {
1140
+ for (const key in SharedLib3.libraryTypeToWebComponentTypeMapping) {
1141
+ const value = this[key];
1142
+ if (value) {
1143
+ const attributeValue = ["appServer", "apiHost"].includes(key) ? SharedLib3.removeTrailingSlash(value) : value;
1144
+ this.chartElement.setAttribute(
1145
+ SharedLib3.libraryTypeToWebComponentTypeMapping[key],
1146
+ typeof attributeValue === "object" ? JSON.stringify(attributeValue) : attributeValue
1147
+ );
1148
+ }
1149
+ }
1150
+ }
1151
+ }
1152
+ render() {
1153
+ return import_lit3.html``;
1154
+ }
1155
+ };
1156
+ __decorateClass([
1157
+ (0, import_decorators3.property)()
1158
+ ], LuzmoBaseVizItem.prototype, "appServer", 2);
1159
+ __decorateClass([
1160
+ (0, import_decorators3.property)()
1161
+ ], LuzmoBaseVizItem.prototype, "apiHost", 2);
1162
+ __decorateClass([
1163
+ (0, import_decorators3.property)({ type: Array })
1164
+ ], LuzmoBaseVizItem.prototype, "slots", 2);
1165
+ __decorateClass([
1166
+ (0, import_decorators3.property)({ type: Object })
1167
+ ], LuzmoBaseVizItem.prototype, "options", 2);
1168
+ __decorateClass([
1169
+ (0, import_decorators3.property)()
1170
+ ], LuzmoBaseVizItem.prototype, "type", 2);
1171
+ __decorateClass([
1172
+ (0, import_decorators3.property)()
1173
+ ], LuzmoBaseVizItem.prototype, "authKey", 2);
1174
+ __decorateClass([
1175
+ (0, import_decorators3.property)()
1176
+ ], LuzmoBaseVizItem.prototype, "authToken", 2);
1177
+ __decorateClass([
1178
+ (0, import_decorators3.property)()
1179
+ ], LuzmoBaseVizItem.prototype, "VERSION", 2);
1180
+
1181
+ // libs/embed-libs/embed/src/lib/viz-item/viz-item-web-component.ts
1182
+ var LuzmoVizItemWebComponent = class extends LuzmoBaseVizItem {
1183
+ };
1184
+ LuzmoVizItemWebComponent = __decorateClass([
1185
+ (0, import_decorators4.customElement)("luzmo-viz-item-web-component")
1186
+ ], LuzmoVizItemWebComponent);
1187
+ // Annotate the CommonJS export names for ESM import in node:
1188
+ 0 && (module.exports = {
1189
+ LuzmoDashboardWebComponent,
1190
+ LuzmoVizItemWebComponent
1191
+ });