@luzmo/embed 5.0.14 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +7 -7
- package/index.cjs +10 -3
- package/index.js +8 -2
- package/index.libs.cjs +1 -1
- package/index.libs.js +1 -1
- package/lib/dashboard-component/dashboard-component.d.ts +13 -0
- package/lib/luzmo-service.d.ts +1 -1
- package/luzmo-embed.libs.js +1 -1
- package/luzmo-embed.min.js +8 -2
- package/package.json +1 -1
- package/src/index.d.ts +2 -0
- package/src/lib/dashboard-component/dashboard-base.d.ts +98 -0
- package/src/lib/dashboard-component/dashboard-component.d.ts +16 -0
- package/src/lib/dashboard-component/dashboard-styles.d.ts +1 -0
- package/src/lib/helper/event-bus-handler.d.ts +1 -0
- package/src/lib/luzmo-service.d.ts +6 -0
- package/lib/models/filters.model.d.ts +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
## [5.1.0] - 2024-04-17
|
|
5
|
+
|
|
6
|
+
### Updates
|
|
7
|
+
|
|
8
|
+
- Deprecated `luzmo-dashboard`, `luzmo-embed-dashboard` is the new element, `luzmo-dashboard` will be removed in next major release (`6.0.0`).
|
|
9
|
+
|
|
4
10
|
## [5.0.14] - 2024-03-28
|
|
5
11
|
|
|
6
12
|
### Bugfixes
|
package/README.md
CHANGED
|
@@ -33,14 +33,14 @@ OR In an HTML page:
|
|
|
33
33
|
|
|
34
34
|
```html
|
|
35
35
|
<script type="module">
|
|
36
|
-
import './node_modules/@luzmo/embed/index.
|
|
36
|
+
import './node_modules/@luzmo/embed/index.js';
|
|
37
37
|
</script>
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
OR
|
|
41
41
|
|
|
42
42
|
```html
|
|
43
|
-
<script type="module" src="./node_modules/@luzmo/embed/index.
|
|
43
|
+
<script type="module" src="./node_modules/@luzmo/embed/index.js"></script>
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
## Usage
|
|
@@ -49,12 +49,12 @@ Use the dashboard components as if they were native HTML tags. Use the id of the
|
|
|
49
49
|
**In your HTML template.**
|
|
50
50
|
|
|
51
51
|
```html
|
|
52
|
-
<luzmo-dashboard dashboardId="55cfb99c-d602-492b-b192-6c15277fdb9a" language="en"> </luzmo-dashboard>
|
|
52
|
+
<luzmo-embed-dashboard dashboardId="55cfb99c-d602-492b-b192-6c15277fdb9a" language="en"> </luzmo-embed-dashboard>
|
|
53
53
|
|
|
54
54
|
OR
|
|
55
55
|
|
|
56
56
|
<!-- Embed a item by passing the item id as well -->
|
|
57
|
-
<luzmo-dashboard dashboardId="55cfb99c-d602-492b-b192-6c15277fdb9a" itemId="59fe5bd7-5070-42f5-98f4-da7f931e316c"> </luzmo-dashboard>
|
|
57
|
+
<luzmo-embed-dashboard dashboardId="55cfb99c-d602-492b-b192-6c15277fdb9a" itemId="59fe5bd7-5070-42f5-98f4-da7f931e316c"> </luzmo-embed-dashboard>
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
**Properties:**
|
|
@@ -135,19 +135,19 @@ setEditMode(editMode: DashboardEditMode): Promise<SetEditMode>
|
|
|
135
135
|
A dashboard with a gray loader background
|
|
136
136
|
|
|
137
137
|
```html
|
|
138
|
-
<luzmo-dashboard dashboardId="035c0304-0bfe-4b7c-8c10-a4acb8eb9d76" loaderBackground="rgb(238,243,246)"> </luzmo-dashboard>
|
|
138
|
+
<luzmo-embed-dashboard dashboardId="035c0304-0bfe-4b7c-8c10-a4acb8eb9d76" loaderBackground="rgb(238,243,246)"> </luzmo-embed-dashboard>
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
A secured dashboard using an [authorization key & token](https://developer.luzmo.com/#quickstart)
|
|
142
142
|
|
|
143
143
|
```html
|
|
144
|
-
<luzmo-dashboard dashboardId="035c0304-0bfe-4b7c-8c10-a4acb8eb9d76" authKey="<!-- your generated authKey-->" authToken="<!-- your generated authToken -->"> </luzmo-dashboard>
|
|
144
|
+
<luzmo-embed-dashboard dashboardId="035c0304-0bfe-4b7c-8c10-a4acb8eb9d76" authKey="<!-- your generated authKey-->" authToken="<!-- your generated authToken -->"> </luzmo-embed-dashboard>
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
A dashboard with a purple spinner color of the loader with screenMode="mobile" and switchScreenModeOnResize=false, so that the dashboard will stay in mobile mode
|
|
148
148
|
|
|
149
149
|
```html
|
|
150
|
-
<luzmo-dashboard id="dashboard" dashboardId="55cfb99c-d602-492b-b192-6c15277fdb9a" loaderSpinnerColor="purple" screenMode="mobile" switchScreenModeOnResize="false"> </luzmo-dashboard>
|
|
150
|
+
<luzmo-embed-dashboard id="dashboard" dashboardId="55cfb99c-d602-492b-b192-6c15277fdb9a" loaderSpinnerColor="purple" screenMode="mobile" switchScreenModeOnResize="false"> </luzmo-embed-dashboard>
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
Add an event listener when all items are rendered
|
package/index.cjs
CHANGED
|
@@ -39,7 +39,8 @@ 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: () => LuzmoDashboard2
|
|
42
|
+
LuzmoDashboard: () => LuzmoDashboard2,
|
|
43
|
+
LuzmoEmbedDashboard: () => LuzmoEmbedDashboard
|
|
43
44
|
});
|
|
44
45
|
module.exports = __toCommonJS(src_exports);
|
|
45
46
|
|
|
@@ -54,7 +55,7 @@ var import_style_map = require("lit/directives/style-map.js");
|
|
|
54
55
|
var import_shared_embed = require("@luzmo/shared-embed");
|
|
55
56
|
|
|
56
57
|
// libs/embed-libs/embed/package.json
|
|
57
|
-
var version = "5.0
|
|
58
|
+
var version = "5.1.0";
|
|
58
59
|
|
|
59
60
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
60
61
|
var LuzmoService = class {
|
|
@@ -1093,7 +1094,13 @@ var LuzmoDashboard2 = class extends LuzmoDashboard {
|
|
|
1093
1094
|
LuzmoDashboard2 = __decorateClass([
|
|
1094
1095
|
(0, import_decorators2.customElement)("luzmo-dashboard")
|
|
1095
1096
|
], LuzmoDashboard2);
|
|
1097
|
+
var LuzmoEmbedDashboard = class extends LuzmoDashboard {
|
|
1098
|
+
};
|
|
1099
|
+
LuzmoEmbedDashboard = __decorateClass([
|
|
1100
|
+
(0, import_decorators2.customElement)("luzmo-embed-dashboard")
|
|
1101
|
+
], LuzmoEmbedDashboard);
|
|
1096
1102
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1097
1103
|
0 && (module.exports = {
|
|
1098
|
-
LuzmoDashboard
|
|
1104
|
+
LuzmoDashboard,
|
|
1105
|
+
LuzmoEmbedDashboard
|
|
1099
1106
|
});
|
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
|
|
40
|
+
var version = "5.1.0";
|
|
41
41
|
|
|
42
42
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
43
43
|
var LuzmoService = class {
|
|
@@ -1076,6 +1076,12 @@ var LuzmoDashboard2 = class extends LuzmoDashboard {
|
|
|
1076
1076
|
LuzmoDashboard2 = __decorateClass([
|
|
1077
1077
|
customElement("luzmo-dashboard")
|
|
1078
1078
|
], LuzmoDashboard2);
|
|
1079
|
+
var LuzmoEmbedDashboard = class extends LuzmoDashboard {
|
|
1080
|
+
};
|
|
1081
|
+
LuzmoEmbedDashboard = __decorateClass([
|
|
1082
|
+
customElement("luzmo-embed-dashboard")
|
|
1083
|
+
], LuzmoEmbedDashboard);
|
|
1079
1084
|
export {
|
|
1080
|
-
LuzmoDashboard2 as LuzmoDashboard
|
|
1085
|
+
LuzmoDashboard2 as LuzmoDashboard,
|
|
1086
|
+
LuzmoEmbedDashboard
|
|
1081
1087
|
};
|
package/index.libs.cjs
CHANGED
|
@@ -54,7 +54,7 @@ var import_style_map = require("lit/directives/style-map.js");
|
|
|
54
54
|
var import_shared_embed = require("@luzmo/shared-embed");
|
|
55
55
|
|
|
56
56
|
// libs/embed-libs/embed/package.json
|
|
57
|
-
var version = "5.0
|
|
57
|
+
var version = "5.1.0";
|
|
58
58
|
|
|
59
59
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
60
60
|
var LuzmoService = class {
|
package/index.libs.js
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
import { LuzmoDashboard as LuzmoBaseDashboard } from './dashboard-base';
|
|
2
|
+
/**!
|
|
3
|
+
* @element luzmo-dashboard
|
|
4
|
+
* @description Exposed by @luzmo/embed lib to everyone.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated Will be removed in next major release. Switch to <luzmo-embed-dashboard> instead.
|
|
7
|
+
*/
|
|
2
8
|
export declare class LuzmoDashboard extends LuzmoBaseDashboard {
|
|
3
9
|
}
|
|
10
|
+
/**!
|
|
11
|
+
* @element luzmo-embed-dashboard
|
|
12
|
+
* @description Exposed by @luzmo/embed lib to everyone.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export declare class LuzmoEmbedDashboard extends LuzmoBaseDashboard {
|
|
16
|
+
}
|
package/lib/luzmo-service.d.ts
CHANGED
package/luzmo-embed.libs.js
CHANGED
package/luzmo-embed.min.js
CHANGED
|
@@ -42,7 +42,8 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
42
42
|
// libs/embed-libs/embed/src/index.ts
|
|
43
43
|
var src_exports2 = {};
|
|
44
44
|
__export(src_exports2, {
|
|
45
|
-
LuzmoDashboard: () => LuzmoDashboard2
|
|
45
|
+
LuzmoDashboard: () => LuzmoDashboard2,
|
|
46
|
+
LuzmoEmbedDashboard: () => LuzmoEmbedDashboard
|
|
46
47
|
});
|
|
47
48
|
module.exports = __toCommonJS(src_exports2);
|
|
48
49
|
|
|
@@ -1906,7 +1907,7 @@ var o5 = e6(class extends i4 {
|
|
|
1906
1907
|
});
|
|
1907
1908
|
|
|
1908
1909
|
// libs/embed-libs/embed/package.json
|
|
1909
|
-
var version = "5.0
|
|
1910
|
+
var version = "5.1.0";
|
|
1910
1911
|
|
|
1911
1912
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
1912
1913
|
var LuzmoService = class {
|
|
@@ -2943,6 +2944,11 @@ var LuzmoDashboard2 = class extends LuzmoDashboard {
|
|
|
2943
2944
|
LuzmoDashboard2 = __decorateClass([
|
|
2944
2945
|
t("luzmo-dashboard")
|
|
2945
2946
|
], LuzmoDashboard2);
|
|
2947
|
+
var LuzmoEmbedDashboard = class extends LuzmoDashboard {
|
|
2948
|
+
};
|
|
2949
|
+
LuzmoEmbedDashboard = __decorateClass([
|
|
2950
|
+
t("luzmo-embed-dashboard")
|
|
2951
|
+
], LuzmoEmbedDashboard);
|
|
2946
2952
|
/*! Bundled license information:
|
|
2947
2953
|
|
|
2948
2954
|
@lit/reactive-element/decorators/custom-element.js:
|
package/package.json
CHANGED
package/src/index.d.ts
ADDED
|
@@ -0,0 +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';
|
|
2
|
+
export * from './lib/dashboard-component/dashboard-component';
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LuzmoDashboard as LuzmoBaseDashboard } from './dashboard-base';
|
|
2
|
+
/**!
|
|
3
|
+
* @element luzmo-dashboard
|
|
4
|
+
* @description Exposed by @luzmo/embed lib to everyone.
|
|
5
|
+
*
|
|
6
|
+
* @deprecated Will be removed in next major release. Switch to <luzmo-embed-dashboard> instead.
|
|
7
|
+
*/
|
|
8
|
+
export declare class LuzmoDashboard extends LuzmoBaseDashboard {
|
|
9
|
+
}
|
|
10
|
+
/**!
|
|
11
|
+
* @element luzmo-embed-dashboard
|
|
12
|
+
* @description Exposed by @luzmo/embed lib to everyone.
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export declare class LuzmoEmbedDashboard extends LuzmoBaseDashboard {
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dashboardStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const _setEventHandler: () => void;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export type FilterExpressionType = '? = ?' | '? != ?' | '? in ?' | '? not in ?' | '? like ?' | '? not like ?' | '? < ?' | '? <= ?' | '? > ?' | '? >= ?' | '? starts with ?' | '? not starts with ?' | '? ends with ?' | '? not ends with ?' | 'last_now' | 'last_available' | 'last_completed' | 'to_date' | 'WTD' | 'MTD' | 'QTD' | 'YTD' | '? within ?' | '? is null' | '? is not null';
|
|
2
|
-
export interface FilterInterface {
|
|
3
|
-
expression: FilterExpressionType;
|
|
4
|
-
parameters?: any;
|
|
5
|
-
properties?: any;
|
|
6
|
-
}
|