@luzmo/embed 5.0.14-beta.0 → 5.0.14-beta.2

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.cjs CHANGED
@@ -55,7 +55,7 @@ var import_style_map = require("lit/directives/style-map.js");
55
55
  var import_shared_embed = require("@luzmo/shared-embed");
56
56
 
57
57
  // libs/embed-libs/embed/package.json
58
- var version = "5.0.14-beta.0";
58
+ var version = "5.0.14-beta.2";
59
59
 
60
60
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
61
61
  var LuzmoService = class {
@@ -1128,7 +1128,6 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1128
1128
  }
1129
1129
  async firstUpdated(_changedProperties) {
1130
1130
  super.firstUpdated(_changedProperties);
1131
- console.log(this.appServer);
1132
1131
  await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1133
1132
  this.chartElement = document.createElement("chart-component");
1134
1133
  this.chartElement.setAttribute("embedding-mode", "chart");
@@ -1149,6 +1148,15 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1149
1148
  }
1150
1149
  }
1151
1150
  }
1151
+ updated(changedProperties) {
1152
+ if (this.chartElement) {
1153
+ for (const [propertyName] of changedProperties.entries()) {
1154
+ const mappedAttributeName = SharedLib3.libraryTypeToWebComponentTypeMapping[propertyName] ?? propertyName;
1155
+ const attributeValue = typeof this[propertyName] === "object" ? JSON.stringify(this[propertyName]) : this[propertyName]?.toString() ?? this[propertyName];
1156
+ this.chartElement.setAttribute(mappedAttributeName, attributeValue);
1157
+ }
1158
+ }
1159
+ }
1152
1160
  render() {
1153
1161
  return import_lit3.html``;
1154
1162
  }
package/index.js CHANGED
@@ -37,7 +37,7 @@ import {
37
37
  } from "@luzmo/shared-embed";
38
38
 
39
39
  // libs/embed-libs/embed/package.json
40
- var version = "5.0.14-beta.0";
40
+ var version = "5.0.14-beta.2";
41
41
 
42
42
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
43
43
  var LuzmoService = class {
@@ -1110,7 +1110,6 @@ var LuzmoBaseVizItem = class extends LitElement2 {
1110
1110
  }
1111
1111
  async firstUpdated(_changedProperties) {
1112
1112
  super.firstUpdated(_changedProperties);
1113
- console.log(this.appServer);
1114
1113
  await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1115
1114
  this.chartElement = document.createElement("chart-component");
1116
1115
  this.chartElement.setAttribute("embedding-mode", "chart");
@@ -1131,6 +1130,15 @@ var LuzmoBaseVizItem = class extends LitElement2 {
1131
1130
  }
1132
1131
  }
1133
1132
  }
1133
+ updated(changedProperties) {
1134
+ if (this.chartElement) {
1135
+ for (const [propertyName] of changedProperties.entries()) {
1136
+ const mappedAttributeName = SharedLib3.libraryTypeToWebComponentTypeMapping[propertyName] ?? propertyName;
1137
+ const attributeValue = typeof this[propertyName] === "object" ? JSON.stringify(this[propertyName]) : this[propertyName]?.toString() ?? this[propertyName];
1138
+ this.chartElement.setAttribute(mappedAttributeName, attributeValue);
1139
+ }
1140
+ }
1141
+ }
1134
1142
  render() {
1135
1143
  return html2``;
1136
1144
  }
package/index.libs.cjs CHANGED
@@ -55,7 +55,7 @@ var import_style_map = require("lit/directives/style-map.js");
55
55
  var import_shared_embed = require("@luzmo/shared-embed");
56
56
 
57
57
  // libs/embed-libs/embed/package.json
58
- var version = "5.0.14-beta.0";
58
+ var version = "5.0.14-beta.2";
59
59
 
60
60
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
61
61
  var LuzmoService = class {
@@ -1128,7 +1128,6 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1128
1128
  }
1129
1129
  async firstUpdated(_changedProperties) {
1130
1130
  super.firstUpdated(_changedProperties);
1131
- console.log(this.appServer);
1132
1131
  await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1133
1132
  this.chartElement = document.createElement("chart-component");
1134
1133
  this.chartElement.setAttribute("embedding-mode", "chart");
@@ -1149,6 +1148,15 @@ var LuzmoBaseVizItem = class extends import_lit3.LitElement {
1149
1148
  }
1150
1149
  }
1151
1150
  }
1151
+ updated(changedProperties) {
1152
+ if (this.chartElement) {
1153
+ for (const [propertyName] of changedProperties.entries()) {
1154
+ const mappedAttributeName = SharedLib3.libraryTypeToWebComponentTypeMapping[propertyName] ?? propertyName;
1155
+ const attributeValue = typeof this[propertyName] === "object" ? JSON.stringify(this[propertyName]) : this[propertyName]?.toString() ?? this[propertyName];
1156
+ this.chartElement.setAttribute(mappedAttributeName, attributeValue);
1157
+ }
1158
+ }
1159
+ }
1152
1160
  render() {
1153
1161
  return import_lit3.html``;
1154
1162
  }
package/index.libs.js CHANGED
@@ -35,7 +35,7 @@ import {
35
35
  } from "@luzmo/shared-embed";
36
36
 
37
37
  // libs/embed-libs/embed/package.json
38
- var version = "5.0.14-beta.0";
38
+ var version = "5.0.14-beta.2";
39
39
 
40
40
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
41
41
  var LuzmoService = class {
@@ -1108,7 +1108,6 @@ var LuzmoBaseVizItem = class extends LitElement2 {
1108
1108
  }
1109
1109
  async firstUpdated(_changedProperties) {
1110
1110
  super.firstUpdated(_changedProperties);
1111
- console.log(this.appServer);
1112
1111
  await SharedLib3.loadLibrary(this.appServer, "DashboardApp");
1113
1112
  this.chartElement = document.createElement("chart-component");
1114
1113
  this.chartElement.setAttribute("embedding-mode", "chart");
@@ -1129,6 +1128,15 @@ var LuzmoBaseVizItem = class extends LitElement2 {
1129
1128
  }
1130
1129
  }
1131
1130
  }
1131
+ updated(changedProperties) {
1132
+ if (this.chartElement) {
1133
+ for (const [propertyName] of changedProperties.entries()) {
1134
+ const mappedAttributeName = SharedLib3.libraryTypeToWebComponentTypeMapping[propertyName] ?? propertyName;
1135
+ const attributeValue = typeof this[propertyName] === "object" ? JSON.stringify(this[propertyName]) : this[propertyName]?.toString() ?? this[propertyName];
1136
+ this.chartElement.setAttribute(mappedAttributeName, attributeValue);
1137
+ }
1138
+ }
1139
+ }
1132
1140
  render() {
1133
1141
  return html2``;
1134
1142
  }
@@ -14,5 +14,6 @@ export declare class LuzmoBaseVizItem extends LitElement {
14
14
  constructor();
15
15
  protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
16
16
  private updateVizItemProperties;
17
+ updated(changedProperties: PropertyValues): void;
17
18
  protected render(): unknown;
18
19
  }
@@ -1492,7 +1492,6 @@ var libraryTypeToWebComponentTypeMapping = {
1492
1492
  theme: "theme",
1493
1493
  slots: "slots",
1494
1494
  options: "options",
1495
- itemId: "chart-id",
1496
1495
  appServer: "app-server",
1497
1496
  apiHost: "api-host",
1498
1497
  authKey: "auth-key",
@@ -1931,7 +1930,7 @@ var o5 = e6(class extends i4 {
1931
1930
  });
1932
1931
 
1933
1932
  // libs/embed-libs/embed/package.json
1934
- var version = "5.0.14-beta.0";
1933
+ var version = "5.0.14-beta.2";
1935
1934
 
1936
1935
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
1937
1936
  var LuzmoService = class {
@@ -2996,7 +2995,6 @@ var LuzmoBaseVizItem = class extends s3 {
2996
2995
  }
2997
2996
  async firstUpdated(_changedProperties) {
2998
2997
  super.firstUpdated(_changedProperties);
2999
- console.log(this.appServer);
3000
2998
  await loadLibrary(this.appServer, "DashboardApp");
3001
2999
  this.chartElement = document.createElement("chart-component");
3002
3000
  this.chartElement.setAttribute("embedding-mode", "chart");
@@ -3017,6 +3015,15 @@ var LuzmoBaseVizItem = class extends s3 {
3017
3015
  }
3018
3016
  }
3019
3017
  }
3018
+ updated(changedProperties) {
3019
+ if (this.chartElement) {
3020
+ for (const [propertyName] of changedProperties.entries()) {
3021
+ const mappedAttributeName = libraryTypeToWebComponentTypeMapping[propertyName] ?? propertyName;
3022
+ const attributeValue = typeof this[propertyName] === "object" ? JSON.stringify(this[propertyName]) : this[propertyName]?.toString() ?? this[propertyName];
3023
+ this.chartElement.setAttribute(mappedAttributeName, attributeValue);
3024
+ }
3025
+ }
3026
+ }
3020
3027
  render() {
3021
3028
  return x``;
3022
3029
  }
@@ -1492,7 +1492,6 @@ var libraryTypeToWebComponentTypeMapping = {
1492
1492
  theme: "theme",
1493
1493
  slots: "slots",
1494
1494
  options: "options",
1495
- itemId: "chart-id",
1496
1495
  appServer: "app-server",
1497
1496
  apiHost: "api-host",
1498
1497
  authKey: "auth-key",
@@ -1931,7 +1930,7 @@ var o5 = e6(class extends i4 {
1931
1930
  });
1932
1931
 
1933
1932
  // libs/embed-libs/embed/package.json
1934
- var version = "5.0.14-beta.0";
1933
+ var version = "5.0.14-beta.2";
1935
1934
 
1936
1935
  // libs/embed-libs/embed/src/lib/luzmo-service.ts
1937
1936
  var LuzmoService = class {
@@ -2996,7 +2995,6 @@ var LuzmoBaseVizItem = class extends s3 {
2996
2995
  }
2997
2996
  async firstUpdated(_changedProperties) {
2998
2997
  super.firstUpdated(_changedProperties);
2999
- console.log(this.appServer);
3000
2998
  await loadLibrary(this.appServer, "DashboardApp");
3001
2999
  this.chartElement = document.createElement("chart-component");
3002
3000
  this.chartElement.setAttribute("embedding-mode", "chart");
@@ -3017,6 +3015,15 @@ var LuzmoBaseVizItem = class extends s3 {
3017
3015
  }
3018
3016
  }
3019
3017
  }
3018
+ updated(changedProperties) {
3019
+ if (this.chartElement) {
3020
+ for (const [propertyName] of changedProperties.entries()) {
3021
+ const mappedAttributeName = libraryTypeToWebComponentTypeMapping[propertyName] ?? propertyName;
3022
+ const attributeValue = typeof this[propertyName] === "object" ? JSON.stringify(this[propertyName]) : this[propertyName]?.toString() ?? this[propertyName];
3023
+ this.chartElement.setAttribute(mappedAttributeName, attributeValue);
3024
+ }
3025
+ }
3026
+ }
3020
3027
  render() {
3021
3028
  return x``;
3022
3029
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luzmo/embed",
3
- "version": "5.0.14-beta.0",
3
+ "version": "5.0.14-beta.2",
4
4
  "dependencies": {
5
5
  "lit": "3.1.2",
6
6
  "@luzmo/shared-embed": "5.0.7-beta.0"
package/src/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export type { LoadEvent, ChangedFiltersEvent, CustomEvent, ItemsRenderedEvent, ExportedEvent, DashboardActionEvent, Filter, FilterExpression, FilterOrigin, FilterInput, FilterGroup, ExportType, ItemData, ExportDashboard, AccessibleDashboard, SetEditMode } from '@luzmo/shared-embed';
2
- export * from './lib/dashboard-component/dashboard-component';
3
- export * from './lib/viz-item/viz-item-component';
@@ -1,98 +0,0 @@
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
- currentAuthKey: string;
58
- currentAuthToken: string;
59
- private attributesMap;
60
- _loadTimeoutHandle?: number;
61
- _onResize: () => void;
62
- loaderSize: number;
63
- borderWidth: number;
64
- minHeight: number;
65
- iframeHeight?: string;
66
- iframeWidth?: string;
67
- _resizeObserver: ResizeObserver;
68
- constructor(inputParameters?: Record<keyof LuzmoDashboard, any>);
69
- private loadLibrary;
70
- private setInputParameters;
71
- connectedCallback(): void;
72
- disconnectedCallback(): void;
73
- firstUpdated(): void;
74
- initComponent(): void;
75
- setAllAttributes(): void;
76
- updated(changedProperties: PropertyValues): void;
77
- _setOptions(): SharedLib.DashboardContentParams;
78
- _updateIframeUrl(): void;
79
- _setupLoader(): void;
80
- _displayError(): void;
81
- _calculateDimAfterDashboardLoaded(): void;
82
- _loaderStyles(): void;
83
- static get styles(): import("lit").CSSResult[];
84
- render(): TemplateResult;
85
- getDashboards(): Promise<LuzmoDashboard[]>;
86
- getData(itemId: string): Promise<SharedLib.ItemData>;
87
- getFilters(): Promise<SharedLib.FilterGroup[]>;
88
- setFilters<K extends CombinedFilterInput>(itemId: string, filters: K): Promise<SharedLib.SetFilters>;
89
- setAuthorization(key: string, token: string): Promise<void>;
90
- refreshData(itemId?: string): Promise<void>;
91
- reloadDashboard(): Promise<void>;
92
- exportDashboard(format?: SharedLib.ExportType): Promise<SharedLib.ExportDashboard>;
93
- getAccessibleDashboards(): Promise<SharedLib.AccessibleDashboard[]>;
94
- addFilters(itemId: string, filters: SharedLib.FilterGroup[]): Promise<SharedLib.AddFilters>;
95
- setEditMode(editMode?: SharedLib.DashboardEditMode): Promise<SharedLib.SetEditMode>;
96
- setPreview(preview: boolean): Promise<SharedLib.SetPreview>;
97
- getIsViewMode(): boolean;
98
- }
@@ -1,3 +0,0 @@
1
- import { LuzmoDashboard as LuzmoBaseDashboard } from './dashboard-base';
2
- export declare class LuzmoDashboard extends LuzmoBaseDashboard {
3
- }
@@ -1 +0,0 @@
1
- export declare const dashboardStyles: import("lit").CSSResult;
@@ -1 +0,0 @@
1
- export declare const _setEventHandler: () => void;
@@ -1,6 +0,0 @@
1
- import { LuzmoDashboard } from './dashboard-component/dashboard-component';
2
- declare class LuzmoService {
3
- _components: LuzmoDashboard[];
4
- }
5
- declare const _default: LuzmoService;
6
- export default _default;
@@ -1,3 +0,0 @@
1
- import { LuzmoBaseVizItem } from './viz-item.base';
2
- export declare class LuzmoVizItem extends LuzmoBaseVizItem {
3
- }
@@ -1,18 +0,0 @@
1
- import { LitElement, PropertyValues } from 'lit';
2
- import * as SharedLib from '@luzmo/shared-embed';
3
- export declare class LuzmoBaseVizItem extends LitElement {
4
- appServer: string;
5
- apiHost: string;
6
- slots: SharedLib.Slots;
7
- options: SharedLib.VizItemOptions;
8
- type?: SharedLib.ItemType;
9
- authKey?: string;
10
- authToken?: string;
11
- VERSION?: string;
12
- chartElement: HTMLElement;
13
- static styles: import("lit").CSSResult;
14
- constructor();
15
- protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
16
- private updateVizItemProperties;
17
- protected render(): unknown;
18
- }