@luzmo/embed 5.0.5 → 5.0.6

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.js CHANGED
@@ -1,766 +1,61 @@
1
- "use strict";
2
- var _a;
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const SharedLib = require("@luzmo/shared-embed");
5
- function _interopNamespaceDefault(e2) {
6
- const n3 = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
7
- if (e2) {
8
- for (const k2 in e2) {
9
- if (k2 !== "default") {
10
- const d2 = Object.getOwnPropertyDescriptor(e2, k2);
11
- Object.defineProperty(n3, k2, d2.get ? d2 : {
12
- enumerable: true,
13
- get: () => e2[k2]
14
- });
15
- }
16
- }
17
- }
18
- n3.default = e2;
19
- return Object.freeze(n3);
20
- }
21
- const SharedLib__namespace = /* @__PURE__ */ _interopNamespaceDefault(SharedLib);
22
- /**
23
- * @license
24
- * Copyright 2019 Google LLC
25
- * SPDX-License-Identifier: BSD-3-Clause
26
- */
27
- const t$3 = globalThis, e$5 = t$3.ShadowRoot && (void 0 === t$3.ShadyCSS || t$3.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$2 = Symbol(), o$4 = /* @__PURE__ */ new WeakMap();
28
- let n$4 = class n {
29
- constructor(t2, e2, o2) {
30
- if (this._$cssResult$ = true, o2 !== s$2)
31
- throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
32
- this.cssText = t2, this.t = e2;
33
- }
34
- get styleSheet() {
35
- let t2 = this.o;
36
- const s2 = this.t;
37
- if (e$5 && void 0 === t2) {
38
- const e2 = void 0 !== s2 && 1 === s2.length;
39
- e2 && (t2 = o$4.get(s2)), void 0 === t2 && ((this.o = t2 = new CSSStyleSheet()).replaceSync(this.cssText), e2 && o$4.set(s2, t2));
40
- }
41
- return t2;
42
- }
43
- toString() {
44
- return this.cssText;
45
- }
46
- };
47
- const r$5 = (t2) => new n$4("string" == typeof t2 ? t2 : t2 + "", void 0, s$2), i$4 = (t2, ...e2) => {
48
- const o2 = 1 === t2.length ? t2[0] : e2.reduce((e3, s2, o3) => e3 + ((t3) => {
49
- if (true === t3._$cssResult$)
50
- return t3.cssText;
51
- if ("number" == typeof t3)
52
- return t3;
53
- throw Error("Value passed to 'css' function must be a 'css' function result: " + t3 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
54
- })(s2) + t2[o3 + 1], t2[0]);
55
- return new n$4(o2, t2, s$2);
56
- }, S$1 = (s2, o2) => {
57
- if (e$5)
58
- s2.adoptedStyleSheets = o2.map((t2) => t2 instanceof CSSStyleSheet ? t2 : t2.styleSheet);
59
- else
60
- for (const e2 of o2) {
61
- const o3 = document.createElement("style"), n3 = t$3.litNonce;
62
- void 0 !== n3 && o3.setAttribute("nonce", n3), o3.textContent = e2.cssText, s2.appendChild(o3);
63
- }
64
- }, c$2 = e$5 ? (t2) => t2 : (t2) => t2 instanceof CSSStyleSheet ? ((t3) => {
65
- let e2 = "";
66
- for (const s2 of t3.cssRules)
67
- e2 += s2.cssText;
68
- return r$5(e2);
69
- })(t2) : t2;
70
- /**
71
- * @license
72
- * Copyright 2017 Google LLC
73
- * SPDX-License-Identifier: BSD-3-Clause
74
- */
75
- const { is: i$3, defineProperty: e$4, getOwnPropertyDescriptor: r$4, getOwnPropertyNames: h$1, getOwnPropertySymbols: o$3, getPrototypeOf: n$3 } = Object, a$1 = globalThis, c$1 = a$1.trustedTypes, l$1 = c$1 ? c$1.emptyScript : "", p$1 = a$1.reactiveElementPolyfillSupport, d$1 = (t2, s2) => t2, u$1 = { toAttribute(t2, s2) {
76
- switch (s2) {
77
- case Boolean:
78
- t2 = t2 ? l$1 : null;
79
- break;
80
- case Object:
81
- case Array:
82
- t2 = null == t2 ? t2 : JSON.stringify(t2);
83
- }
84
- return t2;
85
- }, fromAttribute(t2, s2) {
86
- let i3 = t2;
87
- switch (s2) {
88
- case Boolean:
89
- i3 = null !== t2;
90
- break;
91
- case Number:
92
- i3 = null === t2 ? null : Number(t2);
93
- break;
94
- case Object:
95
- case Array:
96
- try {
97
- i3 = JSON.parse(t2);
98
- } catch (t3) {
99
- i3 = null;
100
- }
101
- }
102
- return i3;
103
- } }, f$1 = (t2, s2) => !i$3(t2, s2), y$1 = { attribute: true, type: String, converter: u$1, reflect: false, hasChanged: f$1 };
104
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), a$1.litPropertyMetadata ?? (a$1.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
105
- class b extends HTMLElement {
106
- static addInitializer(t2) {
107
- this._$Ei(), (this.l ?? (this.l = [])).push(t2);
108
- }
109
- static get observedAttributes() {
110
- return this.finalize(), this._$Eh && [...this._$Eh.keys()];
111
- }
112
- static createProperty(t2, s2 = y$1) {
113
- if (s2.state && (s2.attribute = false), this._$Ei(), this.elementProperties.set(t2, s2), !s2.noAccessor) {
114
- const i3 = Symbol(), r2 = this.getPropertyDescriptor(t2, i3, s2);
115
- void 0 !== r2 && e$4(this.prototype, t2, r2);
116
- }
117
- }
118
- static getPropertyDescriptor(t2, s2, i3) {
119
- const { get: e2, set: h2 } = r$4(this.prototype, t2) ?? { get() {
120
- return this[s2];
121
- }, set(t3) {
122
- this[s2] = t3;
123
- } };
124
- return { get() {
125
- return e2 == null ? void 0 : e2.call(this);
126
- }, set(s3) {
127
- const r2 = e2 == null ? void 0 : e2.call(this);
128
- h2.call(this, s3), this.requestUpdate(t2, r2, i3);
129
- }, configurable: true, enumerable: true };
130
- }
131
- static getPropertyOptions(t2) {
132
- return this.elementProperties.get(t2) ?? y$1;
133
- }
134
- static _$Ei() {
135
- if (this.hasOwnProperty(d$1("elementProperties")))
136
- return;
137
- const t2 = n$3(this);
138
- t2.finalize(), void 0 !== t2.l && (this.l = [...t2.l]), this.elementProperties = new Map(t2.elementProperties);
139
- }
140
- static finalize() {
141
- if (this.hasOwnProperty(d$1("finalized")))
142
- return;
143
- if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
144
- const t3 = this.properties, s2 = [...h$1(t3), ...o$3(t3)];
145
- for (const i3 of s2)
146
- this.createProperty(i3, t3[i3]);
147
- }
148
- const t2 = this[Symbol.metadata];
149
- if (null !== t2) {
150
- const s2 = litPropertyMetadata.get(t2);
151
- if (void 0 !== s2)
152
- for (const [t3, i3] of s2)
153
- this.elementProperties.set(t3, i3);
154
- }
155
- this._$Eh = /* @__PURE__ */ new Map();
156
- for (const [t3, s2] of this.elementProperties) {
157
- const i3 = this._$Eu(t3, s2);
158
- void 0 !== i3 && this._$Eh.set(i3, t3);
159
- }
160
- this.elementStyles = this.finalizeStyles(this.styles);
161
- }
162
- static finalizeStyles(s2) {
163
- const i3 = [];
164
- if (Array.isArray(s2)) {
165
- const e2 = new Set(s2.flat(1 / 0).reverse());
166
- for (const s3 of e2)
167
- i3.unshift(c$2(s3));
168
- } else
169
- void 0 !== s2 && i3.push(c$2(s2));
170
- return i3;
171
- }
172
- static _$Eu(t2, s2) {
173
- const i3 = s2.attribute;
174
- return false === i3 ? void 0 : "string" == typeof i3 ? i3 : "string" == typeof t2 ? t2.toLowerCase() : void 0;
175
- }
176
- constructor() {
177
- super(), this._$Ep = void 0, this.isUpdatePending = false, this.hasUpdated = false, this._$Em = null, this._$Ev();
178
- }
179
- _$Ev() {
180
- var _a2;
181
- this._$Eg = new Promise((t2) => this.enableUpdating = t2), this._$AL = /* @__PURE__ */ new Map(), this._$ES(), this.requestUpdate(), (_a2 = this.constructor.l) == null ? void 0 : _a2.forEach((t2) => t2(this));
182
- }
183
- addController(t2) {
184
- var _a2;
185
- (this._$E_ ?? (this._$E_ = /* @__PURE__ */ new Set())).add(t2), void 0 !== this.renderRoot && this.isConnected && ((_a2 = t2.hostConnected) == null ? void 0 : _a2.call(t2));
186
- }
187
- removeController(t2) {
188
- var _a2;
189
- (_a2 = this._$E_) == null ? void 0 : _a2.delete(t2);
190
- }
191
- _$ES() {
192
- const t2 = /* @__PURE__ */ new Map(), s2 = this.constructor.elementProperties;
193
- for (const i3 of s2.keys())
194
- this.hasOwnProperty(i3) && (t2.set(i3, this[i3]), delete this[i3]);
195
- t2.size > 0 && (this._$Ep = t2);
196
- }
197
- createRenderRoot() {
198
- const t2 = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
199
- return S$1(t2, this.constructor.elementStyles), t2;
200
- }
201
- connectedCallback() {
202
- var _a2;
203
- this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(true), (_a2 = this._$E_) == null ? void 0 : _a2.forEach((t2) => {
204
- var _a3;
205
- return (_a3 = t2.hostConnected) == null ? void 0 : _a3.call(t2);
206
- });
207
- }
208
- enableUpdating(t2) {
209
- }
210
- disconnectedCallback() {
211
- var _a2;
212
- (_a2 = this._$E_) == null ? void 0 : _a2.forEach((t2) => {
213
- var _a3;
214
- return (_a3 = t2.hostDisconnected) == null ? void 0 : _a3.call(t2);
215
- });
216
- }
217
- attributeChangedCallback(t2, s2, i3) {
218
- this._$AK(t2, i3);
219
- }
220
- _$EO(t2, s2) {
221
- var _a2;
222
- const i3 = this.constructor.elementProperties.get(t2), e2 = this.constructor._$Eu(t2, i3);
223
- if (void 0 !== e2 && true === i3.reflect) {
224
- const r2 = (void 0 !== ((_a2 = i3.converter) == null ? void 0 : _a2.toAttribute) ? i3.converter : u$1).toAttribute(s2, i3.type);
225
- this._$Em = t2, null == r2 ? this.removeAttribute(e2) : this.setAttribute(e2, r2), this._$Em = null;
226
- }
227
- }
228
- _$AK(t2, s2) {
229
- var _a2;
230
- const i3 = this.constructor, e2 = i3._$Eh.get(t2);
231
- if (void 0 !== e2 && this._$Em !== e2) {
232
- const t3 = i3.getPropertyOptions(e2), r2 = "function" == typeof t3.converter ? { fromAttribute: t3.converter } : void 0 !== ((_a2 = t3.converter) == null ? void 0 : _a2.fromAttribute) ? t3.converter : u$1;
233
- this._$Em = e2, this[e2] = r2.fromAttribute(s2, t3.type), this._$Em = null;
234
- }
235
- }
236
- requestUpdate(t2, s2, i3) {
237
- if (void 0 !== t2) {
238
- if (i3 ?? (i3 = this.constructor.getPropertyOptions(t2)), !(i3.hasChanged ?? f$1)(this[t2], s2))
239
- return;
240
- this.C(t2, s2, i3);
241
- }
242
- false === this.isUpdatePending && (this._$Eg = this._$EP());
243
- }
244
- C(t2, s2, i3) {
245
- this._$AL.has(t2) || this._$AL.set(t2, s2), true === i3.reflect && this._$Em !== t2 && (this._$ET ?? (this._$ET = /* @__PURE__ */ new Set())).add(t2);
246
- }
247
- async _$EP() {
248
- this.isUpdatePending = true;
249
- try {
250
- await this._$Eg;
251
- } catch (t3) {
252
- Promise.reject(t3);
253
- }
254
- const t2 = this.scheduleUpdate();
255
- return null != t2 && await t2, !this.isUpdatePending;
256
- }
257
- scheduleUpdate() {
258
- return this.performUpdate();
259
- }
260
- performUpdate() {
261
- var _a2;
262
- if (!this.isUpdatePending)
263
- return;
264
- if (!this.hasUpdated) {
265
- if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
266
- for (const [t4, s3] of this._$Ep)
267
- this[t4] = s3;
268
- this._$Ep = void 0;
269
- }
270
- const t3 = this.constructor.elementProperties;
271
- if (t3.size > 0)
272
- for (const [s3, i3] of t3)
273
- true !== i3.wrapped || this._$AL.has(s3) || void 0 === this[s3] || this.C(s3, this[s3], i3);
274
- }
275
- let t2 = false;
276
- const s2 = this._$AL;
277
- try {
278
- t2 = this.shouldUpdate(s2), t2 ? (this.willUpdate(s2), (_a2 = this._$E_) == null ? void 0 : _a2.forEach((t3) => {
279
- var _a3;
280
- return (_a3 = t3.hostUpdate) == null ? void 0 : _a3.call(t3);
281
- }), this.update(s2)) : this._$Ej();
282
- } catch (s3) {
283
- throw t2 = false, this._$Ej(), s3;
284
- }
285
- t2 && this._$AE(s2);
286
- }
287
- willUpdate(t2) {
288
- }
289
- _$AE(t2) {
290
- var _a2;
291
- (_a2 = this._$E_) == null ? void 0 : _a2.forEach((t3) => {
292
- var _a3;
293
- return (_a3 = t3.hostUpdated) == null ? void 0 : _a3.call(t3);
294
- }), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t2)), this.updated(t2);
295
- }
296
- _$Ej() {
297
- this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = false;
298
- }
299
- get updateComplete() {
300
- return this.getUpdateComplete();
301
- }
302
- getUpdateComplete() {
303
- return this._$Eg;
304
- }
305
- shouldUpdate(t2) {
306
- return true;
307
- }
308
- update(t2) {
309
- this._$ET && (this._$ET = this._$ET.forEach((t3) => this._$EO(t3, this[t3]))), this._$Ej();
310
- }
311
- updated(t2) {
312
- }
313
- firstUpdated(t2) {
314
- }
315
- }
316
- b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[d$1("elementProperties")] = /* @__PURE__ */ new Map(), b[d$1("finalized")] = /* @__PURE__ */ new Map(), p$1 == null ? void 0 : p$1({ ReactiveElement: b }), (a$1.reactiveElementVersions ?? (a$1.reactiveElementVersions = [])).push("2.0.3");
317
- /**
318
- * @license
319
- * Copyright 2017 Google LLC
320
- * SPDX-License-Identifier: BSD-3-Clause
321
- */
322
- const t$2 = globalThis, i$2 = t$2.trustedTypes, s$1 = i$2 ? i$2.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, e$3 = "$lit$", h = `lit$${(Math.random() + "").slice(9)}$`, o$2 = "?" + h, n$2 = `<${o$2}>`, r$3 = document, l = () => r$3.createComment(""), c = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, a = Array.isArray, u = (t2) => a(t2) || "function" == typeof (t2 == null ? void 0 : t2[Symbol.iterator]), d = "[ \n\f\r]", f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, _ = />/g, m = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^
323
- \f\r"'\`<>=]|("|')|))|$)`, "g"), p = /'/g, g = /"/g, $ = /^(?:script|style|textarea|title)$/i, y = (t2) => (i3, ...s2) => ({ _$litType$: t2, strings: i3, values: s2 }), x = y(1), w = Symbol.for("lit-noChange"), T = Symbol.for("lit-nothing"), A = /* @__PURE__ */ new WeakMap(), E = r$3.createTreeWalker(r$3, 129);
324
- function C(t2, i3) {
325
- if (!Array.isArray(t2) || !t2.hasOwnProperty("raw"))
326
- throw Error("invalid template strings array");
327
- return void 0 !== s$1 ? s$1.createHTML(i3) : i3;
328
- }
329
- const P = (t2, i3) => {
330
- const s2 = t2.length - 1, o2 = [];
331
- let r2, l2 = 2 === i3 ? "<svg>" : "", c2 = f;
332
- for (let i4 = 0; i4 < s2; i4++) {
333
- const s3 = t2[i4];
334
- let a2, u2, d2 = -1, y2 = 0;
335
- for (; y2 < s3.length && (c2.lastIndex = y2, u2 = c2.exec(s3), null !== u2); )
336
- y2 = c2.lastIndex, c2 === f ? "!--" === u2[1] ? c2 = v : void 0 !== u2[1] ? c2 = _ : void 0 !== u2[2] ? ($.test(u2[2]) && (r2 = RegExp("</" + u2[2], "g")), c2 = m) : void 0 !== u2[3] && (c2 = m) : c2 === m ? ">" === u2[0] ? (c2 = r2 ?? f, d2 = -1) : void 0 === u2[1] ? d2 = -2 : (d2 = c2.lastIndex - u2[2].length, a2 = u2[1], c2 = void 0 === u2[3] ? m : '"' === u2[3] ? g : p) : c2 === g || c2 === p ? c2 = m : c2 === v || c2 === _ ? c2 = f : (c2 = m, r2 = void 0);
337
- const x2 = c2 === m && t2[i4 + 1].startsWith("/>") ? " " : "";
338
- l2 += c2 === f ? s3 + n$2 : d2 >= 0 ? (o2.push(a2), s3.slice(0, d2) + e$3 + s3.slice(d2) + h + x2) : s3 + h + (-2 === d2 ? i4 : x2);
339
- }
340
- return [C(t2, l2 + (t2[s2] || "<?>") + (2 === i3 ? "</svg>" : "")), o2];
341
- };
342
- class V {
343
- constructor({ strings: t2, _$litType$: s2 }, n3) {
344
- let r2;
345
- this.parts = [];
346
- let c2 = 0, a2 = 0;
347
- const u2 = t2.length - 1, d2 = this.parts, [f2, v2] = P(t2, s2);
348
- if (this.el = V.createElement(f2, n3), E.currentNode = this.el.content, 2 === s2) {
349
- const t3 = this.el.content.firstChild;
350
- t3.replaceWith(...t3.childNodes);
351
- }
352
- for (; null !== (r2 = E.nextNode()) && d2.length < u2; ) {
353
- if (1 === r2.nodeType) {
354
- if (r2.hasAttributes())
355
- for (const t3 of r2.getAttributeNames())
356
- if (t3.endsWith(e$3)) {
357
- const i3 = v2[a2++], s3 = r2.getAttribute(t3).split(h), e2 = /([.?@])?(.*)/.exec(i3);
358
- d2.push({ type: 1, index: c2, name: e2[2], strings: s3, ctor: "." === e2[1] ? k : "?" === e2[1] ? H : "@" === e2[1] ? I : R }), r2.removeAttribute(t3);
359
- } else
360
- t3.startsWith(h) && (d2.push({ type: 6, index: c2 }), r2.removeAttribute(t3));
361
- if ($.test(r2.tagName)) {
362
- const t3 = r2.textContent.split(h), s3 = t3.length - 1;
363
- if (s3 > 0) {
364
- r2.textContent = i$2 ? i$2.emptyScript : "";
365
- for (let i3 = 0; i3 < s3; i3++)
366
- r2.append(t3[i3], l()), E.nextNode(), d2.push({ type: 2, index: ++c2 });
367
- r2.append(t3[s3], l());
368
- }
369
- }
370
- } else if (8 === r2.nodeType)
371
- if (r2.data === o$2)
372
- d2.push({ type: 2, index: c2 });
373
- else {
374
- let t3 = -1;
375
- for (; -1 !== (t3 = r2.data.indexOf(h, t3 + 1)); )
376
- d2.push({ type: 7, index: c2 }), t3 += h.length - 1;
377
- }
378
- c2++;
379
- }
380
- }
381
- static createElement(t2, i3) {
382
- const s2 = r$3.createElement("template");
383
- return s2.innerHTML = t2, s2;
384
- }
385
- }
386
- function N(t2, i3, s2 = t2, e2) {
387
- var _a2, _b;
388
- if (i3 === w)
389
- return i3;
390
- let h2 = void 0 !== e2 ? (_a2 = s2._$Co) == null ? void 0 : _a2[e2] : s2._$Cl;
391
- const o2 = c(i3) ? void 0 : i3._$litDirective$;
392
- return (h2 == null ? void 0 : h2.constructor) !== o2 && ((_b = h2 == null ? void 0 : h2._$AO) == null ? void 0 : _b.call(h2, false), void 0 === o2 ? h2 = void 0 : (h2 = new o2(t2), h2._$AT(t2, s2, e2)), void 0 !== e2 ? (s2._$Co ?? (s2._$Co = []))[e2] = h2 : s2._$Cl = h2), void 0 !== h2 && (i3 = N(t2, h2._$AS(t2, i3.values), h2, e2)), i3;
393
- }
394
- class S {
395
- constructor(t2, i3) {
396
- this._$AV = [], this._$AN = void 0, this._$AD = t2, this._$AM = i3;
397
- }
398
- get parentNode() {
399
- return this._$AM.parentNode;
400
- }
401
- get _$AU() {
402
- return this._$AM._$AU;
403
- }
404
- u(t2) {
405
- const { el: { content: i3 }, parts: s2 } = this._$AD, e2 = ((t2 == null ? void 0 : t2.creationScope) ?? r$3).importNode(i3, true);
406
- E.currentNode = e2;
407
- let h2 = E.nextNode(), o2 = 0, n3 = 0, l2 = s2[0];
408
- for (; void 0 !== l2; ) {
409
- if (o2 === l2.index) {
410
- let i4;
411
- 2 === l2.type ? i4 = new M(h2, h2.nextSibling, this, t2) : 1 === l2.type ? i4 = new l2.ctor(h2, l2.name, l2.strings, this, t2) : 6 === l2.type && (i4 = new L(h2, this, t2)), this._$AV.push(i4), l2 = s2[++n3];
412
- }
413
- o2 !== (l2 == null ? void 0 : l2.index) && (h2 = E.nextNode(), o2++);
414
- }
415
- return E.currentNode = r$3, e2;
416
- }
417
- p(t2) {
418
- let i3 = 0;
419
- for (const s2 of this._$AV)
420
- void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i3), i3 += s2.strings.length - 2) : s2._$AI(t2[i3])), i3++;
421
- }
422
- }
423
- class M {
424
- get _$AU() {
425
- var _a2;
426
- return ((_a2 = this._$AM) == null ? void 0 : _a2._$AU) ?? this._$Cv;
427
- }
428
- constructor(t2, i3, s2, e2) {
429
- this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = t2, this._$AB = i3, this._$AM = s2, this.options = e2, this._$Cv = (e2 == null ? void 0 : e2.isConnected) ?? true;
430
- }
431
- get parentNode() {
432
- let t2 = this._$AA.parentNode;
433
- const i3 = this._$AM;
434
- return void 0 !== i3 && 11 === (t2 == null ? void 0 : t2.nodeType) && (t2 = i3.parentNode), t2;
435
- }
436
- get startNode() {
437
- return this._$AA;
438
- }
439
- get endNode() {
440
- return this._$AB;
441
- }
442
- _$AI(t2, i3 = this) {
443
- t2 = N(this, t2, i3), c(t2) ? t2 === T || null == t2 || "" === t2 ? (this._$AH !== T && this._$AR(), this._$AH = T) : t2 !== this._$AH && t2 !== w && this._(t2) : void 0 !== t2._$litType$ ? this.g(t2) : void 0 !== t2.nodeType ? this.$(t2) : u(t2) ? this.T(t2) : this._(t2);
444
- }
445
- k(t2) {
446
- return this._$AA.parentNode.insertBefore(t2, this._$AB);
447
- }
448
- $(t2) {
449
- this._$AH !== t2 && (this._$AR(), this._$AH = this.k(t2));
450
- }
451
- _(t2) {
452
- this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t2 : this.$(r$3.createTextNode(t2)), this._$AH = t2;
453
- }
454
- g(t2) {
455
- var _a2;
456
- const { values: i3, _$litType$: s2 } = t2, e2 = "number" == typeof s2 ? this._$AC(t2) : (void 0 === s2.el && (s2.el = V.createElement(C(s2.h, s2.h[0]), this.options)), s2);
457
- if (((_a2 = this._$AH) == null ? void 0 : _a2._$AD) === e2)
458
- this._$AH.p(i3);
459
- else {
460
- const t3 = new S(e2, this), s3 = t3.u(this.options);
461
- t3.p(i3), this.$(s3), this._$AH = t3;
462
- }
463
- }
464
- _$AC(t2) {
465
- let i3 = A.get(t2.strings);
466
- return void 0 === i3 && A.set(t2.strings, i3 = new V(t2)), i3;
467
- }
468
- T(t2) {
469
- a(this._$AH) || (this._$AH = [], this._$AR());
470
- const i3 = this._$AH;
471
- let s2, e2 = 0;
472
- for (const h2 of t2)
473
- e2 === i3.length ? i3.push(s2 = new M(this.k(l()), this.k(l()), this, this.options)) : s2 = i3[e2], s2._$AI(h2), e2++;
474
- e2 < i3.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i3.length = e2);
475
- }
476
- _$AR(t2 = this._$AA.nextSibling, i3) {
477
- var _a2;
478
- for ((_a2 = this._$AP) == null ? void 0 : _a2.call(this, false, true, i3); t2 && t2 !== this._$AB; ) {
479
- const i4 = t2.nextSibling;
480
- t2.remove(), t2 = i4;
481
- }
482
- }
483
- setConnected(t2) {
484
- var _a2;
485
- void 0 === this._$AM && (this._$Cv = t2, (_a2 = this._$AP) == null ? void 0 : _a2.call(this, t2));
486
- }
487
- }
488
- class R {
489
- get tagName() {
490
- return this.element.tagName;
491
- }
492
- get _$AU() {
493
- return this._$AM._$AU;
494
- }
495
- constructor(t2, i3, s2, e2, h2) {
496
- this.type = 1, this._$AH = T, this._$AN = void 0, this.element = t2, this.name = i3, this._$AM = e2, this.options = h2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = T;
497
- }
498
- _$AI(t2, i3 = this, s2, e2) {
499
- const h2 = this.strings;
500
- let o2 = false;
501
- if (void 0 === h2)
502
- t2 = N(this, t2, i3, 0), o2 = !c(t2) || t2 !== this._$AH && t2 !== w, o2 && (this._$AH = t2);
503
- else {
504
- const e3 = t2;
505
- let n3, r2;
506
- for (t2 = h2[0], n3 = 0; n3 < h2.length - 1; n3++)
507
- r2 = N(this, e3[s2 + n3], i3, n3), r2 === w && (r2 = this._$AH[n3]), o2 || (o2 = !c(r2) || r2 !== this._$AH[n3]), r2 === T ? t2 = T : t2 !== T && (t2 += (r2 ?? "") + h2[n3 + 1]), this._$AH[n3] = r2;
508
- }
509
- o2 && !e2 && this.O(t2);
510
- }
511
- O(t2) {
512
- t2 === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t2 ?? "");
513
- }
514
- }
515
- class k extends R {
516
- constructor() {
517
- super(...arguments), this.type = 3;
518
- }
519
- O(t2) {
520
- this.element[this.name] = t2 === T ? void 0 : t2;
521
- }
522
- }
523
- class H extends R {
524
- constructor() {
525
- super(...arguments), this.type = 4;
526
- }
527
- O(t2) {
528
- this.element.toggleAttribute(this.name, !!t2 && t2 !== T);
529
- }
530
- }
531
- class I extends R {
532
- constructor(t2, i3, s2, e2, h2) {
533
- super(t2, i3, s2, e2, h2), this.type = 5;
534
- }
535
- _$AI(t2, i3 = this) {
536
- if ((t2 = N(this, t2, i3, 0) ?? T) === w)
537
- return;
538
- const s2 = this._$AH, e2 = t2 === T && s2 !== T || t2.capture !== s2.capture || t2.once !== s2.once || t2.passive !== s2.passive, h2 = t2 !== T && (s2 === T || e2);
539
- e2 && this.element.removeEventListener(this.name, this, s2), h2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
540
- }
541
- handleEvent(t2) {
542
- var _a2;
543
- "function" == typeof this._$AH ? this._$AH.call(((_a2 = this.options) == null ? void 0 : _a2.host) ?? this.element, t2) : this._$AH.handleEvent(t2);
544
- }
545
- }
546
- class L {
547
- constructor(t2, i3, s2) {
548
- this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i3, this.options = s2;
549
- }
550
- get _$AU() {
551
- return this._$AM._$AU;
552
- }
553
- _$AI(t2) {
554
- N(this, t2);
555
- }
556
- }
557
- const Z = t$2.litHtmlPolyfillSupport;
558
- Z == null ? void 0 : Z(V, M), (t$2.litHtmlVersions ?? (t$2.litHtmlVersions = [])).push("3.1.1");
559
- const j = (t2, i3, s2) => {
560
- const e2 = (s2 == null ? void 0 : s2.renderBefore) ?? i3;
561
- let h2 = e2._$litPart$;
562
- if (void 0 === h2) {
563
- const t3 = (s2 == null ? void 0 : s2.renderBefore) ?? null;
564
- e2._$litPart$ = h2 = new M(i3.insertBefore(l(), t3), t3, void 0, s2 ?? {});
565
- }
566
- return h2._$AI(t2), h2;
567
- };
568
- /**
569
- * @license
570
- * Copyright 2017 Google LLC
571
- * SPDX-License-Identifier: BSD-3-Clause
572
- */
573
- class s extends b {
574
- constructor() {
575
- super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
576
- }
577
- createRenderRoot() {
578
- var _a2;
579
- const t2 = super.createRenderRoot();
580
- return (_a2 = this.renderOptions).renderBefore ?? (_a2.renderBefore = t2.firstChild), t2;
581
- }
582
- update(t2) {
583
- const i3 = this.render();
584
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t2), this._$Do = j(i3, this.renderRoot, this.renderOptions);
585
- }
586
- connectedCallback() {
587
- var _a2;
588
- super.connectedCallback(), (_a2 = this._$Do) == null ? void 0 : _a2.setConnected(true);
589
- }
590
- disconnectedCallback() {
591
- var _a2;
592
- super.disconnectedCallback(), (_a2 = this._$Do) == null ? void 0 : _a2.setConnected(false);
593
- }
594
- render() {
595
- return w;
596
- }
597
- }
598
- s._$litElement$ = true, s["finalized"] = true, (_a = globalThis.litElementHydrateSupport) == null ? void 0 : _a.call(globalThis, { LitElement: s });
599
- const r$2 = globalThis.litElementPolyfillSupport;
600
- r$2 == null ? void 0 : r$2({ LitElement: s });
601
- (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.3");
602
- /**
603
- * @license
604
- * Copyright 2017 Google LLC
605
- * SPDX-License-Identifier: BSD-3-Clause
606
- */
607
- const t$1 = (t2) => (e2, o2) => {
608
- void 0 !== o2 ? o2.addInitializer(() => {
609
- customElements.define(t2, e2);
610
- }) : customElements.define(t2, e2);
611
- };
612
- /**
613
- * @license
614
- * Copyright 2017 Google LLC
615
- * SPDX-License-Identifier: BSD-3-Clause
616
- */
617
- const o$1 = { attribute: true, type: String, converter: u$1, reflect: false, hasChanged: f$1 }, r$1 = (t2 = o$1, e2, r2) => {
618
- const { kind: n3, metadata: i3 } = r2;
619
- let s2 = globalThis.litPropertyMetadata.get(i3);
620
- if (void 0 === s2 && globalThis.litPropertyMetadata.set(i3, s2 = /* @__PURE__ */ new Map()), s2.set(r2.name, t2), "accessor" === n3) {
621
- const { name: o2 } = r2;
622
- return { set(r3) {
623
- const n4 = e2.get.call(this);
624
- e2.set.call(this, r3), this.requestUpdate(o2, n4, t2);
625
- }, init(e3) {
626
- return void 0 !== e3 && this.C(o2, void 0, t2), e3;
627
- } };
628
- }
629
- if ("setter" === n3) {
630
- const { name: o2 } = r2;
631
- return function(r3) {
632
- const n4 = this[o2];
633
- e2.call(this, r3), this.requestUpdate(o2, n4, t2);
634
- };
635
- }
636
- throw Error("Unsupported decorator location: " + n3);
637
- };
638
- function n$1(t2) {
639
- return (e2, o2) => "object" == typeof o2 ? r$1(t2, e2, o2) : ((t3, e3, o3) => {
640
- const r2 = e3.hasOwnProperty(o3);
641
- return e3.constructor.createProperty(o3, r2 ? { ...t3, wrapped: true } : t3), r2 ? Object.getOwnPropertyDescriptor(e3, o3) : void 0;
642
- })(t2, e2, o2);
643
- }
644
- /**
645
- * @license
646
- * Copyright 2017 Google LLC
647
- * SPDX-License-Identifier: BSD-3-Clause
648
- */
649
- function r(r2) {
650
- return n$1({ ...r2, state: true, attribute: false });
651
- }
652
- /**
653
- * @license
654
- * Copyright 2017 Google LLC
655
- * SPDX-License-Identifier: BSD-3-Clause
656
- */
657
- const e$2 = (e2, t2, c2) => (c2.configurable = true, c2.enumerable = true, Reflect.decorate && "object" != typeof t2 && Object.defineProperty(e2, t2, c2), c2);
658
- /**
659
- * @license
660
- * Copyright 2017 Google LLC
661
- * SPDX-License-Identifier: BSD-3-Clause
662
- */
663
- function e$1(e2, r2) {
664
- return (n3, s2, i3) => {
665
- const o2 = (t2) => {
666
- var _a2;
667
- return ((_a2 = t2.renderRoot) == null ? void 0 : _a2.querySelector(e2)) ?? null;
668
- };
669
- if (r2) {
670
- const { get: e3, set: r3 } = "object" == typeof s2 ? n3 : i3 ?? (() => {
671
- const t2 = Symbol();
672
- return { get() {
673
- return this[t2];
674
- }, set(e4) {
675
- this[t2] = e4;
676
- } };
677
- })();
678
- return e$2(n3, s2, { get() {
679
- let t2 = e3.call(this);
680
- return void 0 === t2 && (t2 = o2(this), (null !== t2 || this.hasUpdated) && r3.call(this, t2)), t2;
681
- } });
682
- }
683
- return e$2(n3, s2, { get() {
684
- return o2(this);
685
- } });
686
- };
687
- }
688
- /**
689
- * @license
690
- * Copyright 2017 Google LLC
691
- * SPDX-License-Identifier: BSD-3-Clause
692
- */
693
- const t = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, e = (t2) => (...e2) => ({ _$litDirective$: t2, values: e2 });
694
- let i$1 = class i {
695
- constructor(t2) {
696
- }
697
- get _$AU() {
698
- return this._$AM._$AU;
699
- }
700
- _$AT(t2, e2, i3) {
701
- this._$Ct = t2, this._$AM = e2, this._$Ci = i3;
702
- }
703
- _$AS(t2, e2) {
704
- return this.update(t2, e2);
705
- }
706
- update(t2, e2) {
707
- return this.render(...e2);
708
- }
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result)
9
+ __defProp(target, key, result);
10
+ return result;
709
11
  };
710
- /**
711
- * @license
712
- * Copyright 2018 Google LLC
713
- * SPDX-License-Identifier: BSD-3-Clause
714
- */
715
- const n2 = "important", i2 = " !" + n2, o = e(class extends i$1 {
716
- constructor(t$12) {
717
- var _a2;
718
- if (super(t$12), t$12.type !== t.ATTRIBUTE || "style" !== t$12.name || ((_a2 = t$12.strings) == null ? void 0 : _a2.length) > 2)
719
- throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
720
- }
721
- render(t2) {
722
- return Object.keys(t2).reduce((e2, r2) => {
723
- const s2 = t2[r2];
724
- return null == s2 ? e2 : e2 + `${r2 = r2.includes("-") ? r2 : r2.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s2};`;
725
- }, "");
726
- }
727
- update(e2, [r2]) {
728
- const { style: s2 } = e2.element;
729
- if (void 0 === this.ut)
730
- return this.ut = new Set(Object.keys(r2)), this.render(r2);
731
- for (const t2 of this.ut)
732
- null == r2[t2] && (this.ut.delete(t2), t2.includes("-") ? s2.removeProperty(t2) : s2[t2] = null);
733
- for (const t2 in r2) {
734
- const e3 = r2[t2];
735
- if (null != e3) {
736
- this.ut.add(t2);
737
- const r3 = "string" == typeof e3 && e3.endsWith(i2);
738
- t2.includes("-") || r3 ? s2.setProperty(t2, r3 ? e3.slice(0, -11) : e3, r3 ? n2 : "") : s2[t2] = e3;
739
- }
740
- }
741
- return w;
742
- }
743
- });
744
- const version = "5.0.5";
745
- class LuzmoService {
12
+
13
+ // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-component.ts
14
+ import * as SharedLib2 from "@luzmo/shared-embed";
15
+ import {
16
+ html,
17
+ LitElement
18
+ } from "lit";
19
+ import {
20
+ customElement,
21
+ property,
22
+ query,
23
+ state
24
+ } from "lit/decorators.js";
25
+ import {
26
+ styleMap
27
+ } from "lit/directives/style-map.js";
28
+ import {
29
+ __federationMethodGetRemote,
30
+ __federationMethodWrapDefault,
31
+ remotesMap
32
+ } from "@luzmo/shared-embed";
33
+
34
+ // libs/embed-libs/embed/package.json
35
+ var version = "5.0.6";
36
+
37
+ // libs/embed-libs/embed/src/lib/luzmo-service.ts
38
+ var LuzmoService = class {
746
39
  constructor() {
747
40
  this._components = [];
748
41
  }
749
- }
750
- const LuzmoService$1 = new LuzmoService();
751
- const _setEventHandler = () => {
42
+ };
43
+ var luzmo_service_default = new LuzmoService();
44
+
45
+ // libs/embed-libs/embed/src/lib/helper/event-bus-handler.ts
46
+ import * as SharedLib from "@luzmo/shared-embed";
47
+ var _setEventHandler = () => {
752
48
  if (typeof window.__luzmoMessageHandler === "function") {
753
49
  return;
754
50
  }
755
51
  window.__luzmoMessageHandler = (event) => {
756
- var _a2;
757
- const dashboardComponent = LuzmoService$1._components.find(
758
- (c2) => event.data.name === c2._iframeId
52
+ const dashboardComponent = luzmo_service_default._components.find(
53
+ (c) => event.data.name === c._iframeId
759
54
  );
760
55
  if (!dashboardComponent) {
761
56
  return;
762
57
  }
763
- switch ((_a2 = event.data) == null ? void 0 : _a2.type) {
58
+ switch (event.data?.type) {
764
59
  case "load": {
765
60
  dashboardComponent.dispatchEvent(
766
61
  new CustomEvent("load", { detail: { data: event.data } })
@@ -785,7 +80,7 @@ const _setEventHandler = () => {
785
80
  break;
786
81
  }
787
82
  case "data": {
788
- SharedLib__namespace.resolvePromise(
83
+ SharedLib.resolvePromise(
789
84
  dashboardComponent,
790
85
  event.data.requestId,
791
86
  event.data.data
@@ -793,7 +88,7 @@ const _setEventHandler = () => {
793
88
  break;
794
89
  }
795
90
  case "filters": {
796
- SharedLib__namespace.resolvePromise(
91
+ SharedLib.resolvePromise(
797
92
  dashboardComponent,
798
93
  event.data.requestId,
799
94
  event.data.filters
@@ -801,7 +96,7 @@ const _setEventHandler = () => {
801
96
  break;
802
97
  }
803
98
  case "getAccessibleDashboards": {
804
- SharedLib__namespace.resolvePromise(
99
+ SharedLib.resolvePromise(
805
100
  dashboardComponent,
806
101
  event.data.requestId,
807
102
  event.data.accessibleDashboards
@@ -816,7 +111,7 @@ const _setEventHandler = () => {
816
111
  }
817
112
  case "export": {
818
113
  if (event.data.error) {
819
- SharedLib__namespace.rejectPromise(
114
+ SharedLib.rejectPromise(
820
115
  dashboardComponent,
821
116
  event.data.requestId,
822
117
  event.data
@@ -825,7 +120,7 @@ const _setEventHandler = () => {
825
120
  dashboardComponent.dispatchEvent(
826
121
  new CustomEvent("exported", { detail: { data: event.data } })
827
122
  );
828
- SharedLib__namespace.resolvePromise(
123
+ SharedLib.resolvePromise(
829
124
  dashboardComponent,
830
125
  event.data.requestId,
831
126
  event.data
@@ -855,31 +150,31 @@ const _setEventHandler = () => {
855
150
  }
856
151
  case "setEditMode": {
857
152
  if (event.data.error) {
858
- SharedLib__namespace.rejectPromise(
153
+ SharedLib.rejectPromise(
859
154
  dashboardComponent,
860
155
  event.data.requestId,
861
156
  event.data
862
157
  );
863
158
  } else {
864
- SharedLib__namespace.resolvePromise(
159
+ SharedLib.resolvePromise(
865
160
  dashboardComponent,
866
161
  event.data.requestId,
867
162
  event.data
868
163
  );
869
164
  dashboardComponent.params.editMode = event.data.editMode;
870
- dashboardComponent._containerStyle = SharedLib__namespace.containerStyles(dashboardComponent);
165
+ dashboardComponent._containerStyle = SharedLib.containerStyles(dashboardComponent);
871
166
  if (dashboardComponent.dimensions) {
872
- SharedLib__namespace._setCalculatedDimensions(dashboardComponent);
167
+ SharedLib._setCalculatedDimensions(dashboardComponent);
873
168
  }
874
169
  }
875
170
  break;
876
171
  }
877
172
  case "setFilters": {
878
- event.data.error ? SharedLib__namespace.rejectPromise(
173
+ event.data.error ? SharedLib.rejectPromise(
879
174
  dashboardComponent,
880
175
  event.data.requestId,
881
176
  event.data
882
- ) : SharedLib__namespace.resolvePromise(
177
+ ) : SharedLib.resolvePromise(
883
178
  dashboardComponent,
884
179
  event.data.requestId,
885
180
  event.data
@@ -887,11 +182,11 @@ const _setEventHandler = () => {
887
182
  break;
888
183
  }
889
184
  case "setPreview": {
890
- event.data.error ? SharedLib__namespace.rejectPromise(
185
+ event.data.error ? SharedLib.rejectPromise(
891
186
  dashboardComponent,
892
187
  event.data.requestId,
893
188
  event.data
894
- ) : SharedLib__namespace.resolvePromise(
189
+ ) : SharedLib.resolvePromise(
895
190
  dashboardComponent,
896
191
  event.data.requestId,
897
192
  event.data
@@ -902,7 +197,10 @@ const _setEventHandler = () => {
902
197
  };
903
198
  window.addEventListener("message", window.__luzmoMessageHandler, false);
904
199
  };
905
- const dashboardStyles = i$4`
200
+
201
+ // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-styles.ts
202
+ import { css } from "lit";
203
+ var dashboardStyles = css`
906
204
  @-webkit-keyframes spin {
907
205
  0% {
908
206
  -webkit-transform: rotate(0deg);
@@ -1003,25 +301,16 @@ const dashboardStyles = i$4`
1003
301
  transition-duration: 0.3s;
1004
302
  }
1005
303
  `;
1006
- var __defProp = Object.defineProperty;
1007
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
1008
- var __decorateClass = (decorators, target, key, kind) => {
1009
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
1010
- for (var i3 = decorators.length - 1, decorator; i3 >= 0; i3--)
1011
- if (decorator = decorators[i3])
1012
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1013
- if (kind && result)
1014
- __defProp(target, key, result);
1015
- return result;
1016
- };
1017
- exports.LuzmoDashboard = class LuzmoDashboard extends s {
304
+
305
+ // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-component.ts
306
+ var LuzmoDashboard = class extends LitElement {
1018
307
  constructor(inputParameters) {
1019
308
  super();
1020
309
  this.language = "auto";
1021
310
  this.screenMode = "auto";
1022
311
  this.switchScreenModeOnResize = true;
1023
312
  this.editMode = "view";
1024
- this.dev = false;
313
+ this.experimental = false;
1025
314
  this.iframeStyle = {};
1026
315
  this._containerStyle = {};
1027
316
  this._loaderStyle = {};
@@ -1061,20 +350,19 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1061
350
  this.loaderSize = 32;
1062
351
  this.borderWidth = 3;
1063
352
  this.minHeight = 400;
1064
- this._containerId = SharedLib__namespace.uuidv4();
353
+ this._containerId = SharedLib2.uuidv4();
1065
354
  this._iframeId = `luzmo-dashboard-${this._containerId}`;
1066
355
  this.iframeLoaded = false;
1067
356
  this.promises = {};
1068
357
  this.setInputParameters(inputParameters);
1069
358
  this.params = this._setOptions();
1070
359
  this._onResize = () => {
1071
- var _a2;
1072
- if ((_a2 = this.shadowRoot) == null ? void 0 : _a2.querySelector(".dashboard-container")) {
360
+ if (this.shadowRoot?.querySelector(".dashboard-container")) {
1073
361
  this.containerWidth = this.container.clientWidth;
1074
362
  if (this.params.switchScreenModeOnResize && this.params.screenMode === "auto") {
1075
- for (const d2 of SharedLib__namespace.EXTENTS) {
1076
- if (d2.width[0] <= window.innerWidth && window.innerWidth <= d2.width[1]) {
1077
- this.currentScreenMode = d2.mode;
363
+ for (const d of SharedLib2.EXTENTS) {
364
+ if (d.width[0] <= window.innerWidth && window.innerWidth <= d.width[1]) {
365
+ this.currentScreenMode = d.mode;
1078
366
  }
1079
367
  }
1080
368
  }
@@ -1093,13 +381,13 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1093
381
  });
1094
382
  }
1095
383
  loadLibrary(appServer) {
1096
- if (SharedLib.remotesMap[appServer]) {
1097
- return Promise.resolve(SharedLib.remotesMap[appServer].module);
384
+ if (remotesMap[appServer]) {
385
+ return Promise.resolve(remotesMap[appServer].module);
1098
386
  }
1099
- SharedLib.remotesMap[appServer] = { url: (appServer == null ? void 0 : appServer.startsWith("http://localhost")) ? `${SharedLib__namespace.removeTrailingSlash(appServer)}/remoteEntry.mjs` : `${SharedLib__namespace.removeTrailingSlash(appServer)}/dashboard-app/remoteEntry.mjs`, format: "esm", from: "vite", module: void 0 };
1100
- return SharedLib.__federationMethodGetRemote(appServer, "./DashboardApp").then((module2) => {
1101
- const wrappedModule = SharedLib.__federationMethodWrapDefault(module2, true);
1102
- SharedLib.remotesMap[appServer].module = wrappedModule;
387
+ remotesMap[appServer] = { url: appServer?.startsWith("http://localhost") ? `${SharedLib2.removeTrailingSlash(appServer)}/remoteEntry.mjs` : `${SharedLib2.removeTrailingSlash(appServer)}/dashboard-app/remoteEntry.mjs`, format: "esm", from: "vite", module: void 0 };
388
+ return __federationMethodGetRemote(appServer, "./DashboardApp").then((module) => {
389
+ const wrappedModule = __federationMethodWrapDefault(module, true);
390
+ remotesMap[appServer].module = wrappedModule;
1103
391
  return wrappedModule;
1104
392
  });
1105
393
  }
@@ -1134,11 +422,11 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1134
422
  this[key] = value;
1135
423
  }
1136
424
  }
1137
- if (inputParameters.dev) {
1138
- this.dev = inputParameters.dev;
425
+ if (inputParameters.experimental) {
426
+ this.experimental = inputParameters.experimental;
1139
427
  }
1140
428
  if (inputParameters.appServer) {
1141
- this.appServer = SharedLib__namespace.addTrailingSlash(inputParameters.appServer);
429
+ this.appServer = SharedLib2.addTrailingSlash(inputParameters.appServer);
1142
430
  }
1143
431
  }
1144
432
  // Set resize event listener
@@ -1156,14 +444,12 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1156
444
  }
1157
445
  }
1158
446
  firstUpdated() {
1159
- var _a2;
1160
- this._loaderMsg = (_a2 = SharedLib__namespace.getLoader(this)) == null ? void 0 : _a2.loadingMsg;
447
+ this._loaderMsg = SharedLib2.getLoader(this)?.loadingMsg;
1161
448
  this._loaderStyles();
1162
- LuzmoService$1._components.push(this);
449
+ luzmo_service_default._components.push(this);
1163
450
  this.initComponent();
1164
451
  }
1165
452
  initComponent() {
1166
- var _a2, _b;
1167
453
  this.params = this._setOptions();
1168
454
  if (this.getIsViewMode()) {
1169
455
  this.loadLibrary(this.params.appServer).then(async () => {
@@ -1172,25 +458,25 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1172
458
  const oldReference = this.renderRoot.querySelector("dashboard-component");
1173
459
  this.dashboardReference = oldReference.cloneNode(true);
1174
460
  oldReference.replaceWith(this.dashboardReference);
1175
- this.dashboardReference.addEventListener("load", (payload) => this.dispatchEvent(new CustomEvent("load", payload)));
1176
- this.dashboardReference.addEventListener("itemsRendered", (payload) => this.dispatchEvent(new CustomEvent("itemsRendered", payload)));
1177
- this.dashboardReference.addEventListener("customEvent", (payload) => this.dispatchEvent(new CustomEvent("customEvent", payload)));
1178
- this.dashboardReference.addEventListener("changedFilters", (payload) => this.dispatchEvent(new CustomEvent("changedFilters", payload)));
1179
- this.dashboardReference.addEventListener("dashboardAction", (payload) => this.dispatchEvent(new CustomEvent("dashboardAction", payload)));
1180
- this.dashboardReference.addEventListener("export", (payload) => this.dispatchEvent(new CustomEvent("exported", payload)));
461
+ this.dashboardReference.addEventListener("load", (payload) => this.dispatchEvent(new CustomEvent("load", payload.detail)));
462
+ this.dashboardReference.addEventListener("itemsRendered", (payload) => this.dispatchEvent(new CustomEvent("itemsRendered", payload.detail)));
463
+ this.dashboardReference.addEventListener("customEvent", (payload) => this.dispatchEvent(new CustomEvent("customEvent", payload.detail)));
464
+ this.dashboardReference.addEventListener("changedFilters", (payload) => this.dispatchEvent(new CustomEvent("changedFilters", payload.detail)));
465
+ this.dashboardReference.addEventListener("dashboardAction", (payload) => this.dispatchEvent(new CustomEvent("dashboardAction", payload.detail)));
466
+ this.dashboardReference.addEventListener("export", (payload) => this.dispatchEvent(new CustomEvent("exported", payload.detail)));
1181
467
  this.setAllAttributes();
1182
468
  });
1183
469
  } else {
1184
- this.containerWidth = (_a2 = this.container) == null ? void 0 : _a2.clientWidth;
1185
- SharedLib__namespace._extendAndValidate(this);
1186
- SharedLib__namespace._browserCheck(this);
470
+ this.containerWidth = this.container?.clientWidth;
471
+ SharedLib2._extendAndValidate(this);
472
+ SharedLib2._browserCheck(this);
1187
473
  this._setupLoader();
1188
474
  if (!this.params.error) {
1189
475
  this._loaderStyles();
1190
476
  _setEventHandler();
1191
- this._iframeUrl = SharedLib__namespace.createIframeUrl(this);
1192
- (_b = this.iframe) == null ? void 0 : _b.setAttribute("src", this._iframeUrl);
1193
- this.iframeStyle = SharedLib__namespace.calculateIframeStyles(this);
477
+ this._iframeUrl = SharedLib2.createIframeUrl(this);
478
+ this.iframe?.setAttribute("src", this._iframeUrl);
479
+ this.iframeStyle = SharedLib2.calculateIframeStyles(this);
1194
480
  }
1195
481
  if (this.container) {
1196
482
  this._resizeObserver.observe(this.container);
@@ -1200,11 +486,14 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1200
486
  setAllAttributes() {
1201
487
  if (this.dashboardReference) {
1202
488
  for (const key in this.attributesMap) {
1203
- if (!["authKey", "authToken", "apiHost"].includes(key) && this.params[key]) {
489
+ if (!["authKey", "authToken", "apiHost", "itemDimensions"].includes(key) && this.params[key]) {
1204
490
  this.dashboardReference.setAttribute(this.attributesMap[key], this.params[key]);
1205
491
  }
492
+ if (this.params.itemDimensions) {
493
+ this.dashboardReference.setAttribute("item-dimensions", JSON.stringify(this.params.itemDimensions));
494
+ }
1206
495
  if (this.params.apiHost) {
1207
- this.dashboardReference.setAttribute("api-host", SharedLib__namespace.removeTrailingSlash(this.params.apiHost));
496
+ this.dashboardReference.setAttribute("api-host", SharedLib2.removeTrailingSlash(this.params.apiHost));
1208
497
  }
1209
498
  if (this.params.key) {
1210
499
  this.dashboardReference.setAttribute("auth-key", this.params.key);
@@ -1232,7 +521,24 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1232
521
  "timezoneId",
1233
522
  "itemDimensions"
1234
523
  ]);
1235
- if (!this.getIsViewMode()) {
524
+ if (this.getIsViewMode()) {
525
+ if (this.dashboardReference) {
526
+ for (const [propertyName] of changedProperties.entries()) {
527
+ if (propertyName === "appSever") {
528
+ this.loadLibrary(changedProperties[propertyName]).then(async () => {
529
+ this.isLibraryLoaded = true;
530
+ await this.updateComplete;
531
+ this.dashboardReference = this.renderRoot.querySelector("dashboard-component");
532
+ this.setAllAttributes();
533
+ });
534
+ } else if (this.attributesMap[propertyName]) {
535
+ const mappedAttributeName = this.attributesMap[propertyName] ?? propertyName;
536
+ const attributeValue = typeof this[propertyName] === "object" ? JSON.stringify(this[propertyName]) : this[propertyName]?.toString() || this[propertyName];
537
+ this.dashboardReference.setAttribute(mappedAttributeName, attributeValue);
538
+ }
539
+ }
540
+ }
541
+ } else {
1236
542
  for (const [propertyName] of changedProperties.entries()) {
1237
543
  if (triggerProperties.has(propertyName) && propertyName !== "editMode") {
1238
544
  this.iframeLoaded = false;
@@ -1245,14 +551,14 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1245
551
  );
1246
552
  }, 15 * 1e3);
1247
553
  this.params = this._setOptions();
1248
- SharedLib__namespace._extendAndValidate(this);
554
+ SharedLib2._extendAndValidate(this);
1249
555
  this._setupLoader();
1250
556
  this._loaderStyles();
1251
- this._iframeUrl = SharedLib__namespace.createIframeUrl(this);
557
+ this._iframeUrl = SharedLib2.createIframeUrl(this);
1252
558
  if (this.iframe) {
1253
559
  this._updateIframeUrl();
1254
560
  }
1255
- this.iframeStyle = SharedLib__namespace.calculateIframeStyles(this);
561
+ this.iframeStyle = SharedLib2.calculateIframeStyles(this);
1256
562
  } else if (triggerProperties.has(propertyName) && propertyName === "editMode") {
1257
563
  if (this.iframeLoaded) {
1258
564
  this.setEditMode(this.editMode);
@@ -1260,21 +566,6 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1260
566
  this.params = this._setOptions();
1261
567
  }
1262
568
  }
1263
- } else {
1264
- if (this.dashboardReference) {
1265
- for (const [propertyName] of changedProperties.entries()) {
1266
- if (propertyName === "appSever") {
1267
- this.loadLibrary(changedProperties[propertyName]).then(async () => {
1268
- this.isLibraryLoaded = true;
1269
- await this.updateComplete;
1270
- this.dashboardReference = this.renderRoot.querySelector("dashboard-component");
1271
- this.setAllAttributes();
1272
- });
1273
- } else if (this.attributesMap[propertyName]) {
1274
- this.dashboardReference.setAttribute(this.attributesMap[propertyName] ?? propertyName, this[propertyName]);
1275
- }
1276
- }
1277
- }
1278
569
  }
1279
570
  }
1280
571
  // Set params
@@ -1333,29 +624,29 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1333
624
  defaultParameters.itemDimensions = this.itemDimensions;
1334
625
  }
1335
626
  if (this.appServer) {
1336
- this.appServer = this.getIsViewMode() ? SharedLib__namespace.removeTrailingSlash(this.appServer) : SharedLib__namespace.addTrailingSlash(this.appServer);
627
+ this.appServer = this.getIsViewMode() ? SharedLib2.removeTrailingSlash(this.appServer) : SharedLib2.addTrailingSlash(this.appServer);
1337
628
  defaultParameters.appServer = this.appServer;
1338
629
  } else {
1339
- this.appServer = SharedLib__namespace.addTrailingSlash(
1340
- SharedLib__namespace.DEFAULT_PARAMETERS.appServer
630
+ this.appServer = SharedLib2.addTrailingSlash(
631
+ SharedLib2.DEFAULT_PARAMETERS.appServer
1341
632
  );
1342
633
  defaultParameters.appServer = this.appServer;
1343
634
  }
1344
635
  if (this.apiHost) {
1345
- this.apiHost = this.getIsViewMode() ? SharedLib__namespace.removeTrailingSlash(this.apiHost) : SharedLib__namespace.addTrailingSlash(this.apiHost);
636
+ this.apiHost = this.getIsViewMode() ? SharedLib2.removeTrailingSlash(this.apiHost) : SharedLib2.addTrailingSlash(this.apiHost);
1346
637
  defaultParameters.apiHost = this.apiHost;
1347
638
  } else {
1348
- this.apiHost = this.appServer.endsWith("luzmo.com/") ? this.appServer.replace("app", "api") : this.appServer;
639
+ this.apiHost = this.appServer.includes("luzmo.com") ? this.appServer.replace("app", "api") : this.appServer;
1349
640
  defaultParameters.apiHost = this.apiHost;
1350
641
  }
1351
642
  return defaultParameters;
1352
643
  }
1353
644
  _updateIframeUrl() {
1354
- SharedLib__namespace.updateIframeUrl(this.iframe, this._iframeUrl);
645
+ SharedLib2.updateIframeUrl(this.iframe, this._iframeUrl);
1355
646
  }
1356
647
  // Setup loader / browser error
1357
648
  _setupLoader() {
1358
- const data = SharedLib__namespace.getLoader(this);
649
+ const data = SharedLib2.getLoader(this);
1359
650
  this._loaderMsg = data.loadingMsg;
1360
651
  if (data.errorMsg) {
1361
652
  this.browserError = true;
@@ -1375,48 +666,48 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1375
666
  _calculateDimAfterDashboardLoaded() {
1376
667
  this.dashboardError = false;
1377
668
  this._loaderStyles();
1378
- SharedLib__namespace._setCalculatedDimensions(this);
669
+ SharedLib2._setCalculatedDimensions(this);
1379
670
  }
1380
671
  // Set loader styles
1381
672
  _loaderStyles() {
1382
- this._containerStyle = SharedLib__namespace.containerStyles(this);
1383
- this._loaderStyle = SharedLib__namespace.loaderStyles(this);
1384
- this._loadingCircleStyle = SharedLib__namespace.plStyles(this);
1385
- this._containerLoaderStyle = SharedLib__namespace.containerLoaderStyles(this);
1386
- this._lcStyle = SharedLib__namespace.lcStyles(this);
673
+ this._containerStyle = SharedLib2.containerStyles(this);
674
+ this._loaderStyle = SharedLib2.loaderStyles(this);
675
+ this._loadingCircleStyle = SharedLib2.plStyles(this);
676
+ this._containerLoaderStyle = SharedLib2.containerLoaderStyles(this);
677
+ this._lcStyle = SharedLib2.lcStyles(this);
1387
678
  }
1388
679
  static get styles() {
1389
680
  return [dashboardStyles];
1390
681
  }
1391
682
  render() {
1392
- let toBeRenderedHTML = x``;
1393
- const loader = x`
683
+ let toBeRenderedHTML = html``;
684
+ const loader = html`
1394
685
  <div
1395
686
  class="luzmo-container-loader"
1396
687
  id="luzmo-container-loader-${this._containerId}"
1397
- style=${o(
688
+ style=${styleMap(
1398
689
  this._containerLoaderStyle
1399
690
  )}
1400
691
  >
1401
692
  <div
1402
693
  class="luzmo-loader"
1403
694
  id="luzmo-loader-${this._containerId}"
1404
- style=${o(this._loaderStyle)}
695
+ style=${styleMap(this._loaderStyle)}
1405
696
  >
1406
697
  <div
1407
698
  class="luzmo-lc"
1408
- style=${o(this._lcStyle)}
699
+ style=${styleMap(this._lcStyle)}
1409
700
  >
1410
701
  <div
1411
702
  class="luzmo-loading-circle"
1412
- style=${o(
703
+ style=${styleMap(
1413
704
  this._loadingCircleStyle
1414
705
  )}
1415
706
  ></div>
1416
- ${this._itemEmbedding ? "" : x`
707
+ ${this._itemEmbedding ? "" : html`
1417
708
  <div
1418
709
  class="luzmo-loading-message"
1419
- style=${o({ color: this.loaderFontColor })}
710
+ style=${styleMap({ color: this.loaderFontColor })}
1420
711
  >
1421
712
  ${this._loaderMsg}
1422
713
  </div>
@@ -1425,38 +716,41 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1425
716
  </div>
1426
717
  </div>
1427
718
  `;
1428
- if (!this.getIsViewMode()) {
1429
- toBeRenderedHTML = x`
1430
- ${this.dashboardId || this.dashboardSlug ? x`
719
+ if (this.getIsViewMode()) {
720
+ toBeRenderedHTML = this.isLibraryLoaded ? html`
721
+ ${this.dashboardId || this.dashboardSlug ? html`<dashboard-component dashboard-id="${this.params.dashboardId}" app-server="${this.params.appServer}" api-host="${this.params.apiHost}"></dashboard-component>` : html`
722
+ <div id="luzmo-error-${this._containerId}">
723
+ <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
724
+ </div>
725
+ `}
726
+ ` : html`${loader}`;
727
+ } else {
728
+ toBeRenderedHTML = html`
729
+ ${this.dashboardId || this.dashboardSlug ? html`
1431
730
  ${loader}
1432
731
  <iframe
1433
732
  class="luzmo-embed-dashboard"
1434
733
  id="${this._iframeId}"
1435
734
  name="${this._iframeId}"
1436
- style=${o(this.iframeStyle)}
735
+ style=${styleMap(this.iframeStyle)}
1437
736
  src="${this._iframeUrl}"
1438
737
  frameborder="0"
1439
738
  ></iframe>
1440
- ` : x`<!-- the dashboard will inititialize when you provide a dashboardSlug or a dashboardId -->`}
1441
- ${this.browserError ? x`
739
+ ` : html`<!-- the dashboard will inititialize when you provide a dashboardSlug or a dashboardId -->`}
740
+ ${this.browserError ? html`
1442
741
  <div id="luzmo-error-${this._containerId}">
1443
742
  <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
1444
743
  </div>
1445
744
  ` : ""}
1446
745
  `;
1447
- } else {
1448
- toBeRenderedHTML = this.isLibraryLoaded ? x`
1449
- ${this.dashboardId || this.dashboardSlug ? x`<dashboard-component dashboard-id="${this.params.dashboardId}" app-server="${this.params.appServer}" api-host="${this.params.apiHost}"></dashboard-component>` : x`
1450
- <div id="luzmo-error-${this._containerId}">
1451
- <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
1452
- </div>
1453
- `}
1454
- ` : x`${loader}`;
1455
746
  }
1456
- return x`
747
+ return html`
1457
748
  <div
1458
749
  class="dashboard-container"
1459
- style=${o(this._containerStyle)}
750
+ style=${styleMap(Object.assign({}, this._containerStyle, {
751
+ width: this.iframeStyle.width ?? "100%",
752
+ height: this.iframeStyle.height ?? "100%"
753
+ }))}
1460
754
  >
1461
755
  ${toBeRenderedHTML}
1462
756
  </div>
@@ -1464,7 +758,7 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1464
758
  }
1465
759
  getDashboards() {
1466
760
  return new Promise(
1467
- (resolve) => resolve(LuzmoService$1._components)
761
+ (resolve) => resolve(luzmo_service_default._components)
1468
762
  );
1469
763
  }
1470
764
  // Public methods
@@ -1473,7 +767,7 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1473
767
  return this.dashboardReference.getData(itemId);
1474
768
  }
1475
769
  if (!this.getIsViewMode()) {
1476
- return SharedLib__namespace.getData(this, this.iframe, itemId);
770
+ return SharedLib2.getData(this, this.iframe, itemId);
1477
771
  }
1478
772
  return Promise.reject();
1479
773
  }
@@ -1482,16 +776,16 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1482
776
  return this.dashboardReference.getFilters();
1483
777
  }
1484
778
  if (!this.getIsViewMode()) {
1485
- return SharedLib__namespace.getFilters(this, this.iframe);
779
+ return SharedLib2.getFilters(this, this.iframe);
1486
780
  }
1487
781
  return Promise.reject();
1488
782
  }
1489
783
  setFilters(itemId, filters) {
1490
784
  if (this.getIsViewMode() && this.dashboardReference) {
1491
- return Promise.reject();
785
+ return this.dashboardReference.setFilters(itemId, filters);
1492
786
  }
1493
787
  if (!this.getIsViewMode()) {
1494
- return SharedLib__namespace.setFilters(this, this.iframe, itemId, filters);
788
+ return SharedLib2.setFilters(this, this.iframe, itemId, filters);
1495
789
  }
1496
790
  return Promise.reject();
1497
791
  }
@@ -1500,7 +794,7 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1500
794
  return this.dashboardReference.setAuthorization(key, token);
1501
795
  }
1502
796
  if (!this.getIsViewMode()) {
1503
- return SharedLib__namespace.setAuthorization(this, this.iframe, key, token);
797
+ return SharedLib2.setAuthorization(this, this.iframe, key, token);
1504
798
  }
1505
799
  return Promise.reject();
1506
800
  }
@@ -1509,7 +803,7 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1509
803
  return this.dashboardReference.refreshData(itemId);
1510
804
  }
1511
805
  if (!this.getIsViewMode()) {
1512
- return itemId ? SharedLib__namespace.refreshData(this, this.iframe, itemId) : SharedLib__namespace.refreshData(this, this.iframe);
806
+ return itemId ? SharedLib2.refreshData(this, this.iframe, itemId) : SharedLib2.refreshData(this, this.iframe);
1513
807
  }
1514
808
  return Promise.reject();
1515
809
  }
@@ -1518,7 +812,7 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1518
812
  return this.dashboardReference.reloadDashboard();
1519
813
  }
1520
814
  if (!this.getIsViewMode()) {
1521
- return SharedLib__namespace.reloadDashboard(this, this.iframe);
815
+ return SharedLib2.reloadDashboard(this, this.iframe);
1522
816
  }
1523
817
  return Promise.reject();
1524
818
  }
@@ -1527,19 +821,22 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1527
821
  return this.dashboardReference.exportDashboard(format);
1528
822
  }
1529
823
  if (!this.getIsViewMode()) {
1530
- return format ? SharedLib__namespace.exportDashboard(this, this.iframe, format) : SharedLib__namespace.exportDashboard(this, this.iframe);
824
+ return format ? SharedLib2.exportDashboard(this, this.iframe, format) : SharedLib2.exportDashboard(this, this.iframe);
1531
825
  }
1532
826
  return Promise.reject();
1533
827
  }
1534
828
  getAccessibleDashboards() {
1535
829
  if (!this.getIsViewMode()) {
1536
- return SharedLib__namespace.getAccessibleDashboards(this, this.iframe);
830
+ return SharedLib2.getAccessibleDashboards(this, this.iframe);
1537
831
  }
1538
832
  if (this.getIsViewMode() && this.dashboardReference) {
1539
833
  return this.dashboardReference.getAccessibleDashboards();
1540
834
  }
1541
835
  return Promise.reject();
1542
836
  }
837
+ addFilters(itemId, filters) {
838
+ return this.dashboardReference.addFilters(itemId, filters);
839
+ }
1543
840
  setEditMode(editMode) {
1544
841
  if (this.dashboardReference && editMode === "view") {
1545
842
  this.editMode = "view";
@@ -1563,7 +860,7 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1563
860
  return this.dashboardReference.setEditMode(editMode);
1564
861
  }
1565
862
  if (!this.getIsViewMode()) {
1566
- return SharedLib__namespace.setEditMode(this, this.iframe, editMode);
863
+ return SharedLib2.setEditMode(this, this.iframe, editMode);
1567
864
  }
1568
865
  return Promise.reject();
1569
866
  }
@@ -1571,161 +868,164 @@ exports.LuzmoDashboard = class LuzmoDashboard extends s {
1571
868
  if (this.getIsViewMode() && this.dashboardReference) {
1572
869
  return this.dashboardReference.setPreview(preview);
1573
870
  }
1574
- return SharedLib__namespace.setPreview(this, this.iframe, preview);
871
+ return SharedLib2.setPreview(this, this.iframe, preview);
1575
872
  }
1576
873
  getIsViewMode() {
1577
- if (this.dev && this.params.editMode === "view" || this.params.editMode === void 0) {
874
+ if (this.experimental && this.params.editMode === "view" || this.params.editMode === void 0) {
1578
875
  return true;
1579
876
  }
1580
877
  return false;
1581
878
  }
1582
879
  };
1583
880
  __decorateClass([
1584
- e$1(".dashboard-container")
1585
- ], exports.LuzmoDashboard.prototype, "container", 2);
881
+ query(".dashboard-container")
882
+ ], LuzmoDashboard.prototype, "container", 2);
1586
883
  __decorateClass([
1587
- e$1("iframe")
1588
- ], exports.LuzmoDashboard.prototype, "iframe", 2);
884
+ query("iframe")
885
+ ], LuzmoDashboard.prototype, "iframe", 2);
1589
886
  __decorateClass([
1590
- n$1()
1591
- ], exports.LuzmoDashboard.prototype, "dashboardId", 2);
887
+ property()
888
+ ], LuzmoDashboard.prototype, "dashboardId", 2);
1592
889
  __decorateClass([
1593
- n$1()
1594
- ], exports.LuzmoDashboard.prototype, "dashboardSlug", 2);
890
+ property()
891
+ ], LuzmoDashboard.prototype, "dashboardSlug", 2);
1595
892
  __decorateClass([
1596
- n$1()
1597
- ], exports.LuzmoDashboard.prototype, "itemId", 2);
893
+ property()
894
+ ], LuzmoDashboard.prototype, "itemId", 2);
1598
895
  __decorateClass([
1599
- n$1()
1600
- ], exports.LuzmoDashboard.prototype, "language", 2);
896
+ property()
897
+ ], LuzmoDashboard.prototype, "language", 2);
1601
898
  __decorateClass([
1602
- n$1()
1603
- ], exports.LuzmoDashboard.prototype, "qeVersion", 2);
899
+ property()
900
+ ], LuzmoDashboard.prototype, "qeVersion", 2);
1604
901
  __decorateClass([
1605
- n$1()
1606
- ], exports.LuzmoDashboard.prototype, "screenMode", 2);
902
+ property()
903
+ ], LuzmoDashboard.prototype, "screenMode", 2);
1607
904
  __decorateClass([
1608
- n$1({
905
+ property({
1609
906
  converter: {
1610
907
  fromAttribute: (value) => value === "true",
1611
908
  toAttribute: String
1612
909
  }
1613
910
  })
1614
- ], exports.LuzmoDashboard.prototype, "switchScreenModeOnResize", 2);
911
+ ], LuzmoDashboard.prototype, "switchScreenModeOnResize", 2);
1615
912
  __decorateClass([
1616
- n$1()
1617
- ], exports.LuzmoDashboard.prototype, "editMode", 2);
913
+ property()
914
+ ], LuzmoDashboard.prototype, "editMode", 2);
1618
915
  __decorateClass([
1619
- n$1()
1620
- ], exports.LuzmoDashboard.prototype, "mainColor", 2);
916
+ property()
917
+ ], LuzmoDashboard.prototype, "mainColor", 2);
1621
918
  __decorateClass([
1622
- n$1()
1623
- ], exports.LuzmoDashboard.prototype, "accentColor", 2);
919
+ property()
920
+ ], LuzmoDashboard.prototype, "accentColor", 2);
1624
921
  __decorateClass([
1625
- n$1()
1626
- ], exports.LuzmoDashboard.prototype, "authToken", 2);
922
+ property()
923
+ ], LuzmoDashboard.prototype, "authToken", 2);
1627
924
  __decorateClass([
1628
- n$1()
1629
- ], exports.LuzmoDashboard.prototype, "authKey", 2);
925
+ property()
926
+ ], LuzmoDashboard.prototype, "authKey", 2);
1630
927
  __decorateClass([
1631
- n$1()
1632
- ], exports.LuzmoDashboard.prototype, "loaderBackground", 2);
928
+ property()
929
+ ], LuzmoDashboard.prototype, "loaderBackground", 2);
1633
930
  __decorateClass([
1634
- n$1()
1635
- ], exports.LuzmoDashboard.prototype, "loaderFontColor", 2);
931
+ property()
932
+ ], LuzmoDashboard.prototype, "loaderFontColor", 2);
1636
933
  __decorateClass([
1637
- n$1()
1638
- ], exports.LuzmoDashboard.prototype, "loaderSpinnerColor", 2);
934
+ property()
935
+ ], LuzmoDashboard.prototype, "loaderSpinnerColor", 2);
1639
936
  __decorateClass([
1640
- n$1()
1641
- ], exports.LuzmoDashboard.prototype, "loaderSpinnerBackground", 2);
937
+ property()
938
+ ], LuzmoDashboard.prototype, "loaderSpinnerBackground", 2);
1642
939
  __decorateClass([
1643
- n$1()
1644
- ], exports.LuzmoDashboard.prototype, "appServer", 2);
940
+ property()
941
+ ], LuzmoDashboard.prototype, "appServer", 2);
1645
942
  __decorateClass([
1646
- n$1()
1647
- ], exports.LuzmoDashboard.prototype, "timezoneId", 2);
943
+ property()
944
+ ], LuzmoDashboard.prototype, "timezoneId", 2);
1648
945
  __decorateClass([
1649
- n$1()
1650
- ], exports.LuzmoDashboard.prototype, "apiHost", 2);
946
+ property()
947
+ ], LuzmoDashboard.prototype, "apiHost", 2);
1651
948
  __decorateClass([
1652
- n$1({ type: Object })
1653
- ], exports.LuzmoDashboard.prototype, "itemDimensions", 2);
949
+ property({ type: Object })
950
+ ], LuzmoDashboard.prototype, "itemDimensions", 2);
1654
951
  __decorateClass([
1655
- n$1()
1656
- ], exports.LuzmoDashboard.prototype, "dev", 2);
952
+ property()
953
+ ], LuzmoDashboard.prototype, "experimental", 2);
1657
954
  __decorateClass([
1658
- n$1({ attribute: false })
1659
- ], exports.LuzmoDashboard.prototype, "_containerId", 2);
955
+ property({ attribute: false })
956
+ ], LuzmoDashboard.prototype, "_containerId", 2);
1660
957
  __decorateClass([
1661
- n$1({ attribute: false })
1662
- ], exports.LuzmoDashboard.prototype, "_iframeId", 2);
958
+ property({ attribute: false })
959
+ ], LuzmoDashboard.prototype, "_iframeId", 2);
1663
960
  __decorateClass([
1664
- n$1({ attribute: false })
1665
- ], exports.LuzmoDashboard.prototype, "params", 2);
961
+ property({ attribute: false })
962
+ ], LuzmoDashboard.prototype, "params", 2);
1666
963
  __decorateClass([
1667
- n$1({ attribute: false })
1668
- ], exports.LuzmoDashboard.prototype, "_iframeUrl", 2);
964
+ property({ attribute: false })
965
+ ], LuzmoDashboard.prototype, "_iframeUrl", 2);
1669
966
  __decorateClass([
1670
- n$1({ attribute: false })
1671
- ], exports.LuzmoDashboard.prototype, "iframeLoaded", 2);
967
+ property({ attribute: false })
968
+ ], LuzmoDashboard.prototype, "iframeLoaded", 2);
1672
969
  __decorateClass([
1673
- n$1({ attribute: false })
1674
- ], exports.LuzmoDashboard.prototype, "promises", 2);
970
+ property({ attribute: false })
971
+ ], LuzmoDashboard.prototype, "promises", 2);
1675
972
  __decorateClass([
1676
- n$1({ attribute: false })
1677
- ], exports.LuzmoDashboard.prototype, "iframeStyle", 2);
973
+ property({ attribute: false })
974
+ ], LuzmoDashboard.prototype, "iframeStyle", 2);
1678
975
  __decorateClass([
1679
- n$1({ attribute: false })
1680
- ], exports.LuzmoDashboard.prototype, "_containerStyle", 2);
976
+ property({ attribute: false })
977
+ ], LuzmoDashboard.prototype, "_containerStyle", 2);
1681
978
  __decorateClass([
1682
- n$1({ attribute: false })
1683
- ], exports.LuzmoDashboard.prototype, "_loaderStyle", 2);
979
+ property({ attribute: false })
980
+ ], LuzmoDashboard.prototype, "_loaderStyle", 2);
1684
981
  __decorateClass([
1685
- n$1({ attribute: false })
1686
- ], exports.LuzmoDashboard.prototype, "_lcStyle", 2);
982
+ property({ attribute: false })
983
+ ], LuzmoDashboard.prototype, "_lcStyle", 2);
1687
984
  __decorateClass([
1688
- n$1({ attribute: false })
1689
- ], exports.LuzmoDashboard.prototype, "_loadingCircleStyle", 2);
985
+ property({ attribute: false })
986
+ ], LuzmoDashboard.prototype, "_loadingCircleStyle", 2);
1690
987
  __decorateClass([
1691
- n$1({ attribute: false })
1692
- ], exports.LuzmoDashboard.prototype, "_containerLoaderStyle", 2);
988
+ property({ attribute: false })
989
+ ], LuzmoDashboard.prototype, "_containerLoaderStyle", 2);
1693
990
  __decorateClass([
1694
- n$1({ attribute: false })
1695
- ], exports.LuzmoDashboard.prototype, "_loaderMsg", 2);
991
+ property({ attribute: false })
992
+ ], LuzmoDashboard.prototype, "_loaderMsg", 2);
1696
993
  __decorateClass([
1697
- n$1({ attribute: false })
1698
- ], exports.LuzmoDashboard.prototype, "containerWidth", 2);
994
+ property({ attribute: false })
995
+ ], LuzmoDashboard.prototype, "containerWidth", 2);
1699
996
  __decorateClass([
1700
- n$1({ attribute: false })
1701
- ], exports.LuzmoDashboard.prototype, "dimensions", 2);
997
+ property({ attribute: false })
998
+ ], LuzmoDashboard.prototype, "dimensions", 2);
1702
999
  __decorateClass([
1703
- n$1({ attribute: false })
1704
- ], exports.LuzmoDashboard.prototype, "currentScreenMode", 2);
1000
+ property({ attribute: false })
1001
+ ], LuzmoDashboard.prototype, "currentScreenMode", 2);
1705
1002
  __decorateClass([
1706
- n$1({ attribute: false })
1707
- ], exports.LuzmoDashboard.prototype, "_itemEmbedding", 2);
1003
+ property({ attribute: false })
1004
+ ], LuzmoDashboard.prototype, "_itemEmbedding", 2);
1708
1005
  __decorateClass([
1709
- n$1({ attribute: false })
1710
- ], exports.LuzmoDashboard.prototype, "browserError", 2);
1006
+ property({ attribute: false })
1007
+ ], LuzmoDashboard.prototype, "browserError", 2);
1711
1008
  __decorateClass([
1712
- n$1({ attribute: false })
1713
- ], exports.LuzmoDashboard.prototype, "browserErrorMsg", 2);
1009
+ property({ attribute: false })
1010
+ ], LuzmoDashboard.prototype, "browserErrorMsg", 2);
1714
1011
  __decorateClass([
1715
- n$1({ attribute: false })
1716
- ], exports.LuzmoDashboard.prototype, "dashboardError", 2);
1012
+ property({ attribute: false })
1013
+ ], LuzmoDashboard.prototype, "dashboardError", 2);
1717
1014
  __decorateClass([
1718
- n$1({ attribute: false })
1719
- ], exports.LuzmoDashboard.prototype, "browserNotSupported", 2);
1015
+ property({ attribute: false })
1016
+ ], LuzmoDashboard.prototype, "browserNotSupported", 2);
1720
1017
  __decorateClass([
1721
- n$1({ attribute: false })
1722
- ], exports.LuzmoDashboard.prototype, "VERSION", 2);
1018
+ property({ attribute: false })
1019
+ ], LuzmoDashboard.prototype, "VERSION", 2);
1723
1020
  __decorateClass([
1724
- r()
1725
- ], exports.LuzmoDashboard.prototype, "isLibraryLoaded", 2);
1021
+ state()
1022
+ ], LuzmoDashboard.prototype, "isLibraryLoaded", 2);
1726
1023
  __decorateClass([
1727
- r()
1728
- ], exports.LuzmoDashboard.prototype, "dashboardReference", 2);
1729
- exports.LuzmoDashboard = __decorateClass([
1730
- t$1("luzmo-dashboard")
1731
- ], exports.LuzmoDashboard);
1024
+ state()
1025
+ ], LuzmoDashboard.prototype, "dashboardReference", 2);
1026
+ LuzmoDashboard = __decorateClass([
1027
+ customElement("luzmo-dashboard")
1028
+ ], LuzmoDashboard);
1029
+ export {
1030
+ LuzmoDashboard
1031
+ };