@luzmo/embed 5.0.9 → 5.0.11

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/CHANGELOG.md CHANGED
@@ -1,6 +1,18 @@
1
1
 
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [5.0.11] - 2024-03-18
5
+
6
+ ### Updates
7
+
8
+ - Correct typings are now exposed from @luzmo/embed.
9
+
10
+ ## [5.0.10] - 2024-03-11
11
+
12
+ ### Bugfixes
13
+
14
+ - Use display block for the luzmo-dashboard component
15
+
4
16
  ## [5.0.9] - 2024-03-07
5
17
 
6
18
  ### Bugfixes
package/README.md CHANGED
@@ -62,13 +62,13 @@ OR
62
62
  Below a list of available properties on the dashboard web component
63
63
 
64
64
  | Property | Type | Description |
65
- | -------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
66
- | `dashboardId` | string | The id of the Luzmo dashboard you wish to embed |
67
- | `dashboardSlug` | string | The slug of the Luzmo dashboard you wish to embed (if a dashboardId is supplied that one will be used) |
68
- | `itemId` | string | The id of the Luzmo item you wish to embed |
65
+ |----------------------------|--------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
66
+ | `dashboardId` | string | The id of the Luzmo dashboard you wish to embed |
67
+ | `dashboardSlug` | string | The slug of the Luzmo dashboard you wish to embed (if a dashboardId is supplied that one will be used) |
68
+ | `itemId` | string | The id of the Luzmo item you wish to embed. The `dashboardId` should be provided as well if you what to embed just a Luzmo item. |
69
69
  | `itemDimensions` | { width: number/string; height: number/string; } | width and height of item only applies when itemId is provided. Accepts a JSON string. |
70
- | `authKey` | string | Authorization key generated via Luzmo API |
71
- | `authToken` | string | Authorization token generated via Luzmo API |
70
+ | `authKey` | string | Authorization key generated via Luzmo API |
71
+ | `authToken` | string | Authorization token generated via Luzmo API |
72
72
  | `language` | string | The language of the dashboard: eg. 'en' (Default: 'auto') |
73
73
  | `screenMode` | string | The screen mode of your dashboard: 'mobile', 'tablet', 'desktop', 'largeScreen', 'fixed' or 'auto' (Default: 'auto') |
74
74
  | `switchScreenModeOnResize` | boolean | true: the embedded dashboard can switch screenModes on resize of the container , false: Dashboard will keep the same screenMode (Default: true) |
@@ -76,9 +76,9 @@ Below a list of available properties on the dashboard web component
76
76
  | `loaderFontColor` | string | Font color of the text of the loaders (Default: '#5a5a5a') |
77
77
  | `loaderSpinnerColor` | string | Spinner color of the loader (Default: 'rgba(255, 165, 0, 0.7)') |
78
78
  | `loaderSpinnerBackground` | string | Background color of the spinner (Default: 'rgba(169, 169, 169, 0.14)') |
79
- | `appServer` | string | Tenancy of luzmo.com to connect to (Default: 'https://app.luzmo.com/' for US set appServer to 'https://app.us.luzmo.com/') |
79
+ | `appServer` | string | Tenancy of luzmo.com to connect to (Default: 'https://app.luzmo.com/' for US set appServer to 'https://app.us.luzmo.com/') |
80
80
  | `timezoneId` | string | The timezone you you wish to use in your dashboard. This timezone id needs to be a valid id that is available in the [IANA timezone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List), for example: Europe/Brussels or America/New_York. |
81
- | `apiHost` | string | API server to connect to (Default: 'https://api.luzmo.com/' , for US set apiHost to 'https://api.us.luzmo.com/') |
81
+ | `apiHost` | string | API server to connect to (Default: 'https://api.luzmo.com/' , for US set apiHost to 'https://api.us.luzmo.com/') |
82
82
  | `editMode` | string | Specifies if the embedded dashboard should be editable or not. Accepted values: "view" , "editLimited" , "editFull" . Use "view" if you don't want the embedded dashboard to be editable. (Default: "view" ) |
83
83
  | `mainColor` | string | Optional override of the main color used in the whitelabeling of the embedded dashboard editor. If not provided, the main color of the whitelabeling colors set on the organization will be used. Should be specified as a string of rgb values (i.e. "rgb(50,50,50)"). |
84
84
  | `accentColor` | string | Optional override of the accent color used in the whitelabeling of the embedded dashboard editor. If not provided, the accent color of the whitelabeling colors set on the organization will be used. Should be specified as a string of rgb values (i.e. "rgb(50,50,50)"). |
package/index.cjs CHANGED
@@ -39,11 +39,14 @@ var __decorateClass = (decorators, target, key, kind) => {
39
39
  // libs/embed-libs/embed/src/index.ts
40
40
  var src_exports = {};
41
41
  __export(src_exports, {
42
- LuzmoDashboard: () => LuzmoDashboard
42
+ LuzmoDashboard: () => LuzmoDashboard2
43
43
  });
44
44
  module.exports = __toCommonJS(src_exports);
45
45
 
46
46
  // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-component.ts
47
+ var import_decorators2 = require("lit/decorators.js");
48
+
49
+ // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-base.ts
47
50
  var SharedLib2 = __toESM(require("@luzmo/shared-embed"), 1);
48
51
  var import_lit2 = require("lit");
49
52
  var import_decorators = require("lit/decorators.js");
@@ -51,7 +54,7 @@ var import_style_map = require("lit/directives/style-map.js");
51
54
  var import_shared_embed = require("@luzmo/shared-embed");
52
55
 
53
56
  // libs/embed-libs/embed/package.json
54
- var version = "5.0.9";
57
+ var version = "5.0.11";
55
58
 
56
59
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
57
60
  var LuzmoService = class {
@@ -220,6 +223,10 @@ var _setEventHandler = () => {
220
223
  // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-styles.ts
221
224
  var import_lit = require("lit");
222
225
  var dashboardStyles = import_lit.css`
226
+ :host {
227
+ display: block;
228
+ }
229
+
223
230
  @-webkit-keyframes spin {
224
231
  0% {
225
232
  -webkit-transform: rotate(0deg);
@@ -326,7 +333,7 @@ var dashboardStyles = import_lit.css`
326
333
  }
327
334
  `;
328
335
 
329
- // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-component.ts
336
+ // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-base.ts
330
337
  var LuzmoDashboard = class extends import_lit2.LitElement {
331
338
  constructor(inputParameters) {
332
339
  super();
@@ -413,7 +420,12 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
413
420
  if (import_shared_embed.remotesMap[appServer]) {
414
421
  return Promise.resolve(import_shared_embed.remotesMap[appServer].module);
415
422
  }
416
- import_shared_embed.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 };
423
+ import_shared_embed.remotesMap[appServer] = {
424
+ url: appServer?.startsWith("http://localhost") ? `${SharedLib2.removeTrailingSlash(appServer)}/remoteEntry.mjs` : `${SharedLib2.removeTrailingSlash(appServer)}/dashboard-app/remoteEntry.mjs`,
425
+ format: "esm",
426
+ from: "vite",
427
+ module: void 0
428
+ };
417
429
  return (0, import_shared_embed.__federationMethodGetRemote)(appServer, "./DashboardApp").then((module2) => {
418
430
  const wrappedModule = (0, import_shared_embed.__federationMethodWrapDefault)(module2, true);
419
431
  import_shared_embed.remotesMap[appServer].module = wrappedModule;
@@ -716,68 +728,70 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
716
728
  return [dashboardStyles];
717
729
  }
718
730
  render() {
719
- let toBeRenderedHTML = import_lit2.html``;
731
+ let toBeRenderedHTML;
720
732
  const loader = import_lit2.html`
721
733
  <div
722
- class="luzmo-container-loader"
723
- id="luzmo-container-loader-${this._containerId}"
724
- style=${(0, import_style_map.styleMap)(
734
+ class="luzmo-container-loader"
735
+ id="luzmo-container-loader-${this._containerId}"
736
+ style=${(0, import_style_map.styleMap)(
725
737
  this._containerLoaderStyle
726
738
  )}
727
- >
728
- <div
729
- class="luzmo-loader"
730
- id="luzmo-loader-${this._containerId}"
731
- style=${(0, import_style_map.styleMap)(this._loaderStyle)}
732
- >
733
- <div
734
- class="luzmo-lc"
735
- style=${(0, import_style_map.styleMap)(this._lcStyle)}
736
- >
737
- <div
738
- class="luzmo-loading-circle"
739
- style=${(0, import_style_map.styleMap)(
739
+ >
740
+ <div
741
+ class="luzmo-loader"
742
+ id="luzmo-loader-${this._containerId}"
743
+ style=${(0, import_style_map.styleMap)(this._loaderStyle)}
744
+ >
745
+ <div
746
+ class="luzmo-lc"
747
+ style=${(0, import_style_map.styleMap)(this._lcStyle)}
748
+ >
749
+ <div
750
+ class="luzmo-loading-circle"
751
+ style=${(0, import_style_map.styleMap)(
740
752
  this._loadingCircleStyle
741
753
  )}
742
- ></div>
743
- ${this._itemEmbedding ? "" : import_lit2.html`
744
- <div
745
- class="luzmo-loading-message"
746
- style=${(0, import_style_map.styleMap)({ color: this.loaderFontColor })}
747
- >
748
- ${this._loaderMsg}
749
- </div>
750
- `}
754
+ ></div>
755
+ ${this._itemEmbedding ? "" : import_lit2.html`
756
+ <div
757
+ class="luzmo-loading-message"
758
+ style=${(0, import_style_map.styleMap)({ color: this.loaderFontColor })}
759
+ >
760
+ ${this._loaderMsg}
751
761
  </div>
752
- </div>
753
- </div>
762
+ `}
763
+ </div>
764
+ </div>
765
+ </div>
754
766
  `;
755
767
  if (this.getIsViewMode()) {
756
768
  toBeRenderedHTML = this.isLibraryLoaded ? import_lit2.html`
757
- ${this.dashboardId || this.dashboardSlug ? import_lit2.html`<dashboard-component dashboard-id="${this.params.dashboardId}" app-server="${this.params.appServer}" api-host="${this.params.apiHost}"></dashboard-component>` : import_lit2.html`
769
+ ${this.dashboardId || this.dashboardSlug ? import_lit2.html`
770
+ <dashboard-component dashboard-id="${this.params.dashboardId}" app-server="${this.params.appServer}"
771
+ api-host="${this.params.apiHost}"></dashboard-component>` : import_lit2.html`
758
772
  <div id="luzmo-error-${this._containerId}">
759
- <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
760
- </div>
773
+ <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
774
+ </div>
761
775
  `}
762
776
  ` : import_lit2.html`${loader}`;
763
777
  } else {
764
778
  toBeRenderedHTML = import_lit2.html`
765
- ${this.dashboardId || this.dashboardSlug ? import_lit2.html`
766
- ${loader}
767
- <iframe
768
- class="luzmo-embed-dashboard"
769
- id="${this._iframeId}"
770
- name="${this._iframeId}"
771
- style=${(0, import_style_map.styleMap)(this.iframeStyle)}
772
- src="${this._iframeUrl}"
773
- frameborder="0"
774
- ></iframe>
775
- ` : import_lit2.html`<!-- the dashboard will inititialize when you provide a dashboardSlug or a dashboardId -->`}
779
+ ${this.dashboardId || this.dashboardSlug ? import_lit2.html`
780
+ ${loader}
781
+ <iframe
782
+ class="luzmo-embed-dashboard"
783
+ id="${this._iframeId}"
784
+ name="${this._iframeId}"
785
+ style=${(0, import_style_map.styleMap)(this.iframeStyle)}
786
+ src="${this._iframeUrl}"
787
+ frameborder="0"
788
+ ></iframe>
789
+ ` : import_lit2.html`<!-- the dashboard will inititialize when you provide a dashboardSlug or a dashboardId -->`}
776
790
  ${this.browserError ? import_lit2.html`
777
- <div id="luzmo-error-${this._containerId}">
778
- <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
779
- </div>
780
- ` : ""}
791
+ <div id="luzmo-error-${this._containerId}">
792
+ <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
793
+ </div>
794
+ ` : ""}
781
795
  `;
782
796
  }
783
797
  return import_lit2.html`
@@ -910,10 +924,7 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
910
924
  return SharedLib2.setPreview(this, this.iframe, preview);
911
925
  }
912
926
  getIsViewMode() {
913
- if (this.experimental && this.params.editMode === "view" || this.params.editMode === void 0) {
914
- return true;
915
- }
916
- return false;
927
+ return this.experimental && this.params.editMode === "view" || this.params.editMode === void 0;
917
928
  }
918
929
  };
919
930
  __decorateClass([
@@ -991,7 +1002,12 @@ __decorateClass([
991
1002
  (0, import_decorators.property)({ type: Object })
992
1003
  ], LuzmoDashboard.prototype, "itemDimensions", 2);
993
1004
  __decorateClass([
994
- (0, import_decorators.property)()
1005
+ (0, import_decorators.property)({
1006
+ converter: {
1007
+ fromAttribute: (value) => value === "true",
1008
+ toAttribute: String
1009
+ }
1010
+ })
995
1011
  ], LuzmoDashboard.prototype, "experimental", 2);
996
1012
  __decorateClass([
997
1013
  (0, import_decorators.property)({ attribute: false })
@@ -1057,7 +1073,7 @@ __decorateClass([
1057
1073
  (0, import_decorators.property)({ attribute: false })
1058
1074
  ], LuzmoDashboard.prototype, "browserNotSupported", 2);
1059
1075
  __decorateClass([
1060
- (0, import_decorators.property)({ attribute: false })
1076
+ (0, import_decorators.property)()
1061
1077
  ], LuzmoDashboard.prototype, "VERSION", 2);
1062
1078
  __decorateClass([
1063
1079
  (0, import_decorators.state)()
@@ -1065,9 +1081,13 @@ __decorateClass([
1065
1081
  __decorateClass([
1066
1082
  (0, import_decorators.state)()
1067
1083
  ], LuzmoDashboard.prototype, "dashboardReference", 2);
1068
- LuzmoDashboard = __decorateClass([
1069
- (0, import_decorators.customElement)("luzmo-dashboard")
1070
- ], LuzmoDashboard);
1084
+
1085
+ // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-component.ts
1086
+ var LuzmoDashboard2 = class extends LuzmoDashboard {
1087
+ };
1088
+ LuzmoDashboard2 = __decorateClass([
1089
+ (0, import_decorators2.customElement)("luzmo-dashboard")
1090
+ ], LuzmoDashboard2);
1071
1091
  // Annotate the CommonJS export names for ESM import in node:
1072
1092
  0 && (module.exports = {
1073
1093
  LuzmoDashboard
package/index.d.ts CHANGED
@@ -1 +1,2 @@
1
+ export type { LoadEvent, ChangedFiltersEvent, CustomEvent, ItemsRenderedEvent, ExportedEvent, DashboardActionEvent, Filter, FilterExpression, FilterOrigin, FilterInput, FilterGroup, ExportType, ItemData, ExportDashboard, AccessibleDashboard, SetEditMode } from '@luzmo/shared-embed';
1
2
  export * from './lib/dashboard-component/dashboard-component';
package/index.js CHANGED
@@ -11,13 +11,17 @@ var __decorateClass = (decorators, target, key, kind) => {
11
11
  };
12
12
 
13
13
  // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-component.ts
14
+ import {
15
+ customElement
16
+ } from "lit/decorators.js";
17
+
18
+ // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-base.ts
14
19
  import * as SharedLib2 from "@luzmo/shared-embed";
15
20
  import {
16
21
  html,
17
22
  LitElement
18
23
  } from "lit";
19
24
  import {
20
- customElement,
21
25
  property,
22
26
  query,
23
27
  state
@@ -33,7 +37,7 @@ import {
33
37
  } from "@luzmo/shared-embed";
34
38
 
35
39
  // libs/embed-libs/embed/package.json
36
- var version = "5.0.9";
40
+ var version = "5.0.11";
37
41
 
38
42
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
39
43
  var LuzmoService = class {
@@ -202,6 +206,10 @@ var _setEventHandler = () => {
202
206
  // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-styles.ts
203
207
  import { css } from "lit";
204
208
  var dashboardStyles = css`
209
+ :host {
210
+ display: block;
211
+ }
212
+
205
213
  @-webkit-keyframes spin {
206
214
  0% {
207
215
  -webkit-transform: rotate(0deg);
@@ -308,7 +316,7 @@ var dashboardStyles = css`
308
316
  }
309
317
  `;
310
318
 
311
- // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-component.ts
319
+ // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-base.ts
312
320
  var LuzmoDashboard = class extends LitElement {
313
321
  constructor(inputParameters) {
314
322
  super();
@@ -395,7 +403,12 @@ var LuzmoDashboard = class extends LitElement {
395
403
  if (remotesMap[appServer]) {
396
404
  return Promise.resolve(remotesMap[appServer].module);
397
405
  }
398
- 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 };
406
+ remotesMap[appServer] = {
407
+ url: appServer?.startsWith("http://localhost") ? `${SharedLib2.removeTrailingSlash(appServer)}/remoteEntry.mjs` : `${SharedLib2.removeTrailingSlash(appServer)}/dashboard-app/remoteEntry.mjs`,
408
+ format: "esm",
409
+ from: "vite",
410
+ module: void 0
411
+ };
399
412
  return __federationMethodGetRemote(appServer, "./DashboardApp").then((module) => {
400
413
  const wrappedModule = __federationMethodWrapDefault(module, true);
401
414
  remotesMap[appServer].module = wrappedModule;
@@ -698,68 +711,70 @@ var LuzmoDashboard = class extends LitElement {
698
711
  return [dashboardStyles];
699
712
  }
700
713
  render() {
701
- let toBeRenderedHTML = html``;
714
+ let toBeRenderedHTML;
702
715
  const loader = html`
703
716
  <div
704
- class="luzmo-container-loader"
705
- id="luzmo-container-loader-${this._containerId}"
706
- style=${styleMap(
717
+ class="luzmo-container-loader"
718
+ id="luzmo-container-loader-${this._containerId}"
719
+ style=${styleMap(
707
720
  this._containerLoaderStyle
708
721
  )}
709
- >
710
- <div
711
- class="luzmo-loader"
712
- id="luzmo-loader-${this._containerId}"
713
- style=${styleMap(this._loaderStyle)}
714
- >
715
- <div
716
- class="luzmo-lc"
717
- style=${styleMap(this._lcStyle)}
718
- >
719
- <div
720
- class="luzmo-loading-circle"
721
- style=${styleMap(
722
+ >
723
+ <div
724
+ class="luzmo-loader"
725
+ id="luzmo-loader-${this._containerId}"
726
+ style=${styleMap(this._loaderStyle)}
727
+ >
728
+ <div
729
+ class="luzmo-lc"
730
+ style=${styleMap(this._lcStyle)}
731
+ >
732
+ <div
733
+ class="luzmo-loading-circle"
734
+ style=${styleMap(
722
735
  this._loadingCircleStyle
723
736
  )}
724
- ></div>
725
- ${this._itemEmbedding ? "" : html`
726
- <div
727
- class="luzmo-loading-message"
728
- style=${styleMap({ color: this.loaderFontColor })}
729
- >
730
- ${this._loaderMsg}
731
- </div>
732
- `}
737
+ ></div>
738
+ ${this._itemEmbedding ? "" : html`
739
+ <div
740
+ class="luzmo-loading-message"
741
+ style=${styleMap({ color: this.loaderFontColor })}
742
+ >
743
+ ${this._loaderMsg}
733
744
  </div>
734
- </div>
735
- </div>
745
+ `}
746
+ </div>
747
+ </div>
748
+ </div>
736
749
  `;
737
750
  if (this.getIsViewMode()) {
738
751
  toBeRenderedHTML = this.isLibraryLoaded ? html`
739
- ${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`
752
+ ${this.dashboardId || this.dashboardSlug ? html`
753
+ <dashboard-component dashboard-id="${this.params.dashboardId}" app-server="${this.params.appServer}"
754
+ api-host="${this.params.apiHost}"></dashboard-component>` : html`
740
755
  <div id="luzmo-error-${this._containerId}">
741
- <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
742
- </div>
756
+ <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
757
+ </div>
743
758
  `}
744
759
  ` : html`${loader}`;
745
760
  } else {
746
761
  toBeRenderedHTML = html`
747
- ${this.dashboardId || this.dashboardSlug ? html`
748
- ${loader}
749
- <iframe
750
- class="luzmo-embed-dashboard"
751
- id="${this._iframeId}"
752
- name="${this._iframeId}"
753
- style=${styleMap(this.iframeStyle)}
754
- src="${this._iframeUrl}"
755
- frameborder="0"
756
- ></iframe>
757
- ` : html`<!-- the dashboard will inititialize when you provide a dashboardSlug or a dashboardId -->`}
762
+ ${this.dashboardId || this.dashboardSlug ? html`
763
+ ${loader}
764
+ <iframe
765
+ class="luzmo-embed-dashboard"
766
+ id="${this._iframeId}"
767
+ name="${this._iframeId}"
768
+ style=${styleMap(this.iframeStyle)}
769
+ src="${this._iframeUrl}"
770
+ frameborder="0"
771
+ ></iframe>
772
+ ` : html`<!-- the dashboard will inititialize when you provide a dashboardSlug or a dashboardId -->`}
758
773
  ${this.browserError ? html`
759
- <div id="luzmo-error-${this._containerId}">
760
- <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
761
- </div>
762
- ` : ""}
774
+ <div id="luzmo-error-${this._containerId}">
775
+ <h3 class="luzmo-error">${this.browserErrorMsg}</h3>
776
+ </div>
777
+ ` : ""}
763
778
  `;
764
779
  }
765
780
  return html`
@@ -892,10 +907,7 @@ var LuzmoDashboard = class extends LitElement {
892
907
  return SharedLib2.setPreview(this, this.iframe, preview);
893
908
  }
894
909
  getIsViewMode() {
895
- if (this.experimental && this.params.editMode === "view" || this.params.editMode === void 0) {
896
- return true;
897
- }
898
- return false;
910
+ return this.experimental && this.params.editMode === "view" || this.params.editMode === void 0;
899
911
  }
900
912
  };
901
913
  __decorateClass([
@@ -973,7 +985,12 @@ __decorateClass([
973
985
  property({ type: Object })
974
986
  ], LuzmoDashboard.prototype, "itemDimensions", 2);
975
987
  __decorateClass([
976
- property()
988
+ property({
989
+ converter: {
990
+ fromAttribute: (value) => value === "true",
991
+ toAttribute: String
992
+ }
993
+ })
977
994
  ], LuzmoDashboard.prototype, "experimental", 2);
978
995
  __decorateClass([
979
996
  property({ attribute: false })
@@ -1039,7 +1056,7 @@ __decorateClass([
1039
1056
  property({ attribute: false })
1040
1057
  ], LuzmoDashboard.prototype, "browserNotSupported", 2);
1041
1058
  __decorateClass([
1042
- property({ attribute: false })
1059
+ property()
1043
1060
  ], LuzmoDashboard.prototype, "VERSION", 2);
1044
1061
  __decorateClass([
1045
1062
  state()
@@ -1047,9 +1064,13 @@ __decorateClass([
1047
1064
  __decorateClass([
1048
1065
  state()
1049
1066
  ], LuzmoDashboard.prototype, "dashboardReference", 2);
1050
- LuzmoDashboard = __decorateClass([
1067
+
1068
+ // libs/embed-libs/embed/src/lib/dashboard-component/dashboard-component.ts
1069
+ var LuzmoDashboard2 = class extends LuzmoDashboard {
1070
+ };
1071
+ LuzmoDashboard2 = __decorateClass([
1051
1072
  customElement("luzmo-dashboard")
1052
- ], LuzmoDashboard);
1073
+ ], LuzmoDashboard2);
1053
1074
  export {
1054
- LuzmoDashboard
1075
+ LuzmoDashboard2 as LuzmoDashboard
1055
1076
  };
@@ -0,0 +1 @@
1
+ export * from './lib/dashboard-component/dashboard-web-component';
@@ -0,0 +1,96 @@
1
+ import * as SharedLib from '@luzmo/shared-embed';
2
+ import { LitElement, PropertyValues, TemplateResult } from 'lit';
3
+ import { CombinedFilterInput } from '@luzmo/shared-embed';
4
+ /**
5
+ * Luzmo Dashboard
6
+ * Base component isn't registered in customEvents registry so that it can be reused.
7
+ */
8
+ export declare class LuzmoDashboard extends LitElement implements SharedLib.ES6LuzmoDashboard {
9
+ container: HTMLElement;
10
+ luzmoEmbedContainer: HTMLElement;
11
+ iframe: HTMLIFrameElement;
12
+ dashboardId?: SharedLib.DashboardInputs['dashboardId'];
13
+ dashboardSlug?: SharedLib.DashboardInputs['dashboardSlug'];
14
+ itemId?: SharedLib.DashboardInputs['itemId'];
15
+ language: SharedLib.DashboardInputs['language'];
16
+ qeVersion: SharedLib.DashboardInputs['qeVersion'];
17
+ screenMode: SharedLib.DashboardInputs['screenMode'];
18
+ switchScreenModeOnResize: boolean;
19
+ editMode: SharedLib.DashboardInputs['editMode'];
20
+ mainColor?: SharedLib.DashboardInputs['mainColor'];
21
+ accentColor?: SharedLib.DashboardInputs['accentColor'];
22
+ authToken?: SharedLib.DashboardInputs['authToken'];
23
+ authKey?: SharedLib.DashboardInputs['authKey'];
24
+ loaderBackground?: SharedLib.DashboardInputs['loaderBackground'];
25
+ loaderFontColor?: SharedLib.DashboardInputs['loaderFontColor'];
26
+ loaderSpinnerColor?: SharedLib.DashboardInputs['loaderSpinnerColor'];
27
+ loaderSpinnerBackground?: SharedLib.DashboardInputs['loaderSpinnerBackground'];
28
+ appServer?: SharedLib.DashboardInputs['appServer'];
29
+ timezoneId?: SharedLib.DashboardInputs['timezoneId'];
30
+ apiHost?: SharedLib.DashboardInputs['apiHost'];
31
+ itemDimensions: SharedLib.DashboardInputs['itemDimensions'];
32
+ experimental: boolean;
33
+ _containerId: string;
34
+ _iframeId: string;
35
+ params: SharedLib.DashboardContentParams;
36
+ _iframeUrl?: string;
37
+ iframeLoaded: boolean;
38
+ promises: SharedLib.DashboardPromises;
39
+ iframeStyle: SharedLib.IframeStyles;
40
+ _containerStyle: SharedLib.ContainerStyles;
41
+ _loaderStyle: SharedLib.LoaderStyles;
42
+ _lcStyle: SharedLib.LcStyles;
43
+ _loadingCircleStyle: SharedLib.PlStyles;
44
+ _containerLoaderStyle: SharedLib.ContainerLoaderStyles;
45
+ _loaderMsg: string;
46
+ containerWidth?: number;
47
+ dimensions?: SharedLib.DashboardDimensions;
48
+ currentScreenMode?: SharedLib.ScreenMode;
49
+ _itemEmbedding: boolean;
50
+ browserError: boolean;
51
+ browserErrorMsg: string;
52
+ dashboardError: boolean;
53
+ browserNotSupported: any[];
54
+ VERSION: string;
55
+ protected isLibraryLoaded: boolean;
56
+ protected dashboardReference: SharedLib.LuzmoElement;
57
+ private attributesMap;
58
+ _loadTimeoutHandle?: number;
59
+ _onResize: () => void;
60
+ loaderSize: number;
61
+ borderWidth: number;
62
+ minHeight: number;
63
+ iframeHeight?: string;
64
+ iframeWidth?: string;
65
+ _resizeObserver: ResizeObserver;
66
+ constructor(inputParameters?: Record<keyof LuzmoDashboard, any>);
67
+ private loadLibrary;
68
+ private setInputParameters;
69
+ connectedCallback(): void;
70
+ disconnectedCallback(): void;
71
+ firstUpdated(): void;
72
+ initComponent(): void;
73
+ setAllAttributes(): void;
74
+ updated(changedProperties: PropertyValues): void;
75
+ _setOptions(): SharedLib.DashboardContentParams;
76
+ _updateIframeUrl(): void;
77
+ _setupLoader(): void;
78
+ _displayError(): void;
79
+ _calculateDimAfterDashboardLoaded(): void;
80
+ _loaderStyles(): void;
81
+ static get styles(): import("lit").CSSResult[];
82
+ render(): TemplateResult;
83
+ getDashboards(): Promise<LuzmoDashboard[]>;
84
+ getData(itemId: string): Promise<SharedLib.ItemData>;
85
+ getFilters(): Promise<SharedLib.FilterGroup[]>;
86
+ setFilters<K extends CombinedFilterInput>(itemId: string, filters: K): Promise<SharedLib.SetFilters>;
87
+ setAuthorization(key: string, token: string): Promise<void>;
88
+ refreshData(itemId?: string): Promise<void>;
89
+ reloadDashboard(): Promise<void>;
90
+ exportDashboard(format?: SharedLib.ExportType): Promise<SharedLib.ExportDashboard>;
91
+ getAccessibleDashboards(): Promise<SharedLib.AccessibleDashboard[]>;
92
+ addFilters(itemId: string, filters: SharedLib.FilterGroup[]): Promise<SharedLib.AddFilters>;
93
+ setEditMode(editMode?: SharedLib.DashboardEditMode): Promise<SharedLib.SetEditMode>;
94
+ setPreview(preview: boolean): Promise<SharedLib.SetPreview>;
95
+ getIsViewMode(): boolean;
96
+ }