@luzmo/embed 6.0.0-beta.6 → 6.0.0-beta.8
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 +9 -1
- package/MIGRATIONS.md +1 -1
- package/README.md +4 -2
- package/index.cjs +13 -13
- package/index.js +13 -13
- package/libs/embed-libs/embed/src/index.d.ts +4 -0
- package/libs/embed-libs/embed/src/lib/dashboard-component/dashboard-base.d.ts +97 -0
- package/libs/embed-libs/embed/src/lib/dashboard-component/dashboard-component.d.ts +8 -0
- package/libs/embed-libs/embed/src/lib/dashboard-component/dashboard-styles.d.ts +1 -0
- package/libs/embed-libs/embed/src/lib/helper/event-bus-handler.d.ts +1 -0
- package/libs/embed-libs/embed/src/lib/luzmo-service.d.ts +6 -0
- package/libs/embed-libs/embed/src/lib/viz-item/viz-item-component.d.ts +3 -0
- package/libs/embed-libs/embed/src/lib/viz-item/viz-item.base.d.ts +41 -0
- package/libs/embed-libs/shared-embed/src/index.common.d.ts +33 -0
- package/libs/embed-libs/shared-embed/src/index.d.ts +2 -0
- package/libs/embed-libs/shared-embed/src/lib/constants/class-constants.d.ts +1 -0
- package/libs/embed-libs/shared-embed/src/lib/helpers/browser-check.d.ts +2 -0
- package/libs/embed-libs/shared-embed/src/lib/helpers/default-parameters.d.ts +2 -0
- package/libs/embed-libs/shared-embed/src/lib/helpers/error.d.ts +5 -0
- package/libs/embed-libs/shared-embed/src/lib/helpers/extents.d.ts +7 -0
- package/libs/embed-libs/shared-embed/src/lib/helpers/get-loader.d.ts +5 -0
- package/libs/embed-libs/shared-embed/src/lib/helpers/iframe-url.d.ts +1 -0
- package/libs/embed-libs/shared-embed/src/lib/helpers/promise-dispatch.d.ts +3 -0
- package/libs/embed-libs/shared-embed/src/lib/helpers/remote-federation.d.ts +16 -0
- package/libs/embed-libs/shared-embed/src/lib/helpers/set-filter-utils.d.ts +7 -0
- package/libs/embed-libs/shared-embed/src/lib/helpers/styles.d.ts +8 -0
- package/libs/embed-libs/shared-embed/src/lib/helpers/translations.d.ts +18 -0
- package/libs/embed-libs/shared-embed/src/lib/helpers/update-iframe-url.d.ts +1 -0
- package/libs/embed-libs/shared-embed/src/lib/helpers/utils.d.ts +27 -0
- package/libs/embed-libs/shared-embed/src/lib/methods/export-dashboard.d.ts +4 -0
- package/libs/embed-libs/shared-embed/src/lib/methods/get-accessible-dashboards.d.ts +3 -0
- package/libs/embed-libs/shared-embed/src/lib/methods/get-data.d.ts +3 -0
- package/libs/embed-libs/shared-embed/src/lib/methods/get-filters.d.ts +3 -0
- package/libs/embed-libs/shared-embed/src/lib/methods/refresh-data.d.ts +2 -0
- package/libs/embed-libs/shared-embed/src/lib/methods/reload-dashboard.d.ts +2 -0
- package/libs/embed-libs/shared-embed/src/lib/methods/set-authorization.d.ts +2 -0
- package/libs/embed-libs/shared-embed/src/lib/methods/set-edit-mode.d.ts +3 -0
- package/libs/embed-libs/shared-embed/src/lib/methods/set-filters.d.ts +4 -0
- package/libs/embed-libs/shared-embed/src/lib/methods/set-preview.d.ts +3 -0
- package/libs/embed-libs/shared-embed/src/lib/models/common.model.d.ts +103 -0
- package/libs/embed-libs/shared-embed/src/lib/models/dashboard.model.d.ts +45 -0
- package/libs/embed-libs/shared-embed/src/lib/models/events.model.d.ts +73 -0
- package/libs/embed-libs/shared-embed/src/lib/models/filters.model.d.ts +55 -0
- package/libs/embed-libs/shared-embed/src/lib/models/styles.model.d.ts +32 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-item-post-message.model.d.ts +44 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-item.model.d.ts +470 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/areachart.model.d.ts +12 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/barchart.model.d.ts +23 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/choroplethmap.model.d.ts +12 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/circlepack.model.d.ts +2 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/columnchart.model.d.ts +23 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/datetime.model.d.ts +12 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/donutchart.model.d.ts +2 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/dropdownfilter.model.d.ts +12 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/index.d.ts +36 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/linechart.model.d.ts +35 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/parallelcoordinatesplot.model.d.ts +13 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/piechart.model.d.ts +23 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/scatterplot.model.d.ts +12 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/slicer.model.d.ts +23 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/slider.model.d.ts +12 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/stripplot.model.d.ts +14 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/sunburst.model.d.ts +13 -0
- package/libs/embed-libs/shared-embed/src/lib/models/viz-items/treemap.model.d.ts +23 -0
- package/libs/embed-libs/shared-embed/src/lib/service/calculate-dimensions.d.ts +1 -0
- package/libs/embed-libs/shared-embed/src/lib/service/extend-and-validate.d.ts +2 -0
- package/luzmo-embed.min.js +16 -16
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
-
## [6.0.
|
|
4
|
+
## [6.0.1] - 2024-07-11
|
|
5
|
+
|
|
6
|
+
- Fix for loader color when embedding dashboard as a web component, and other bug fixes
|
|
7
|
+
|
|
8
|
+
## [6.0.0] - 2024-07-11
|
|
5
9
|
|
|
6
10
|
### Breaking changes
|
|
7
11
|
|
|
8
12
|
- Removed `<luzmo-dashboard>` web component, It has been replaced with `<luzmo-embed-dashboard>`.
|
|
9
13
|
- `LuzmoDashboard` has been replaced with `LuzmoEmbedDashboard`
|
|
10
14
|
|
|
15
|
+
### Bugfixes
|
|
16
|
+
|
|
17
|
+
- Fix for loader color when embedding dashboard as a web component, and other bug fixes
|
|
18
|
+
|
|
11
19
|
## [5.1.5] - 2024-05-03
|
|
12
20
|
|
|
13
21
|
### Bugfixes
|
package/MIGRATIONS.md
CHANGED
package/README.md
CHANGED
|
@@ -43,6 +43,8 @@ OR
|
|
|
43
43
|
|
|
44
44
|
## Luzmo Embed Viz Item
|
|
45
45
|
|
|
46
|
+
### For a more comprehensive documentation visit [Flex SDK Docs - Luzmo Developer Docs](https://developer.luzmo.com/guide/flex-sdk--introduction)
|
|
47
|
+
|
|
46
48
|
### Usage luzmo-embed-viz-item
|
|
47
49
|
|
|
48
50
|
Use the viz-item components as if they were native HTML tags.
|
|
@@ -85,7 +87,7 @@ Below a list of available properties on the viz item web component
|
|
|
85
87
|
| customEvent | Emitted when a custom event is fired |
|
|
86
88
|
| exported | Emitted when export completes or fails |
|
|
87
89
|
| rendered | Emitted when the item is rendered |
|
|
88
|
-
| load | Emitted when
|
|
90
|
+
| load | Emitted when viz item is loaded |
|
|
89
91
|
|
|
90
92
|
<br/>
|
|
91
93
|
|
|
@@ -111,7 +113,7 @@ export(): void
|
|
|
111
113
|
|
|
112
114
|
### Examples luzmo-embed-viz-item
|
|
113
115
|
|
|
114
|
-
A Bar chart with display hidden.
|
|
116
|
+
A Bar chart with display title hidden.
|
|
115
117
|
|
|
116
118
|
```html
|
|
117
119
|
<luzmo-embed-viz-item id="vizItem" type="bar-chart" options='{ "display": { "title": false } }'></luzmo-embed-viz-item>
|
package/index.cjs
CHANGED
|
@@ -57,7 +57,7 @@ var import_style_map = require("lit/directives/style-map.js");
|
|
|
57
57
|
var import_shared_embed = require("@luzmo/shared-embed");
|
|
58
58
|
|
|
59
59
|
// libs/embed-libs/embed/package.json
|
|
60
|
-
var version = "6.0.0-beta.
|
|
60
|
+
var version = "6.0.0-beta.8";
|
|
61
61
|
|
|
62
62
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
63
63
|
var LuzmoService = class {
|
|
@@ -491,18 +491,18 @@ var LuzmoDashboard = class extends import_lit2.LitElement {
|
|
|
491
491
|
if (!["authKey", "authToken", "apiHost", "itemDimensions"].includes(key) && this.params[key]) {
|
|
492
492
|
this.dashboardReference.setAttribute(this.attributesMap[key], this.params[key]);
|
|
493
493
|
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
494
|
+
}
|
|
495
|
+
if (this.params.itemDimensions) {
|
|
496
|
+
this.dashboardReference.setAttribute("item-dimensions", JSON.stringify(this.params.itemDimensions));
|
|
497
|
+
}
|
|
498
|
+
if (this.params.apiHost) {
|
|
499
|
+
this.dashboardReference.setAttribute("api-host", SharedLib2.removeTrailingSlash(this.params.apiHost));
|
|
500
|
+
}
|
|
501
|
+
if (this.params.key) {
|
|
502
|
+
this.dashboardReference.setAttribute("auth-key", this.params.key);
|
|
503
|
+
}
|
|
504
|
+
if (this.params.token) {
|
|
505
|
+
this.dashboardReference.setAttribute("auth-token", this.params.token);
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
508
|
}
|
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 = "6.0.0-beta.
|
|
40
|
+
var version = "6.0.0-beta.8";
|
|
41
41
|
|
|
42
42
|
// libs/embed-libs/embed/src/lib/luzmo-service.ts
|
|
43
43
|
var LuzmoService = class {
|
|
@@ -471,18 +471,18 @@ var LuzmoDashboard = class extends LitElement {
|
|
|
471
471
|
if (!["authKey", "authToken", "apiHost", "itemDimensions"].includes(key) && this.params[key]) {
|
|
472
472
|
this.dashboardReference.setAttribute(this.attributesMap[key], this.params[key]);
|
|
473
473
|
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
474
|
+
}
|
|
475
|
+
if (this.params.itemDimensions) {
|
|
476
|
+
this.dashboardReference.setAttribute("item-dimensions", JSON.stringify(this.params.itemDimensions));
|
|
477
|
+
}
|
|
478
|
+
if (this.params.apiHost) {
|
|
479
|
+
this.dashboardReference.setAttribute("api-host", SharedLib2.removeTrailingSlash(this.params.apiHost));
|
|
480
|
+
}
|
|
481
|
+
if (this.params.key) {
|
|
482
|
+
this.dashboardReference.setAttribute("auth-key", this.params.key);
|
|
483
|
+
}
|
|
484
|
+
if (this.params.token) {
|
|
485
|
+
this.dashboardReference.setAttribute("auth-token", this.params.token);
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { LoadEvent, ChangedFiltersEvent, CustomEvent, ItemsRenderedEvent, ExportedEvent, DashboardActionEvent, Filter, FilterExpression, FilterOrigin, FilterInput, FilterGroup, ExportType, ItemData, ExportDashboard, AccessibleDashboard, SetEditMode, ItemType, Slots, VizItemOptions } from '@luzmo/shared-embed';
|
|
2
|
+
export { filterUtils } from '@luzmo/shared-embed';
|
|
3
|
+
export * from './lib/dashboard-component/dashboard-component';
|
|
4
|
+
export * from './lib/viz-item/viz-item-component';
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
libVersion: string;
|
|
55
|
+
protected isLibraryLoaded: boolean;
|
|
56
|
+
protected dashboardReference: SharedLib.LuzmoElement;
|
|
57
|
+
currentAuthKey: string;
|
|
58
|
+
currentAuthToken: string;
|
|
59
|
+
isInitCalled: boolean;
|
|
60
|
+
private attributesMap;
|
|
61
|
+
_loadTimeoutHandle?: number;
|
|
62
|
+
_onResize: () => void;
|
|
63
|
+
loaderSize: number;
|
|
64
|
+
borderWidth: number;
|
|
65
|
+
minHeight: number;
|
|
66
|
+
iframeHeight?: string;
|
|
67
|
+
iframeWidth?: string;
|
|
68
|
+
_resizeObserver: ResizeObserver;
|
|
69
|
+
constructor();
|
|
70
|
+
connectedCallback(): void;
|
|
71
|
+
disconnectedCallback(): void;
|
|
72
|
+
firstUpdated(): void;
|
|
73
|
+
initComponent(): void;
|
|
74
|
+
setAllAttributes(): void;
|
|
75
|
+
updated(changedProperties: PropertyValues): void;
|
|
76
|
+
_setOptions(): SharedLib.DashboardContentParams;
|
|
77
|
+
_updateIframeUrl(): void;
|
|
78
|
+
_setupLoader(): void;
|
|
79
|
+
_displayError(): void;
|
|
80
|
+
_calculateDimAfterDashboardLoaded(): void;
|
|
81
|
+
_loaderStyles(): void;
|
|
82
|
+
static get styles(): import("lit").CSSResult[];
|
|
83
|
+
render(): TemplateResult;
|
|
84
|
+
getDashboards(): Promise<LuzmoDashboard[]>;
|
|
85
|
+
getData(itemId: string): Promise<SharedLib.ItemData>;
|
|
86
|
+
getFilters(): Promise<SharedLib.FilterGroup[]>;
|
|
87
|
+
setFilters<K extends CombinedFilterInput>(itemId: string, filters: K): Promise<SharedLib.SetFilters>;
|
|
88
|
+
setAuthorization(key: string, token: string): Promise<void>;
|
|
89
|
+
refreshData(itemId?: string): Promise<void>;
|
|
90
|
+
reloadDashboard(): Promise<void>;
|
|
91
|
+
exportDashboard(format?: SharedLib.ExportType): Promise<SharedLib.ExportDashboard>;
|
|
92
|
+
getAccessibleDashboards(): Promise<SharedLib.AccessibleDashboard[]>;
|
|
93
|
+
addFilters(itemId: string, filters: SharedLib.FilterGroup[]): Promise<SharedLib.AddFilters>;
|
|
94
|
+
setEditMode(editMode?: SharedLib.DashboardEditMode): Promise<SharedLib.SetEditMode>;
|
|
95
|
+
setPreview(preview: boolean): Promise<SharedLib.SetPreview>;
|
|
96
|
+
getIsViewMode(): boolean;
|
|
97
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const dashboardStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const _setEventHandler: () => void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import * as SharedLib from '@luzmo/shared-embed';
|
|
3
|
+
type FunctionCall = [(...args: any) => any, any[]];
|
|
4
|
+
export declare class LuzmoBaseVizItem extends LitElement implements SharedLib.LuzmoVizItemComponentInterface {
|
|
5
|
+
appServer?: string;
|
|
6
|
+
apiHost?: string;
|
|
7
|
+
slots?: SharedLib.Slots;
|
|
8
|
+
options?: SharedLib.VizItemOptions;
|
|
9
|
+
type?: SharedLib.ItemType;
|
|
10
|
+
authKey?: string;
|
|
11
|
+
authToken?: string;
|
|
12
|
+
version?: string;
|
|
13
|
+
contextId?: string;
|
|
14
|
+
canFilter?: SharedLib.CanFilter;
|
|
15
|
+
filters?: SharedLib.FilterGroup[];
|
|
16
|
+
dashboardId?: string;
|
|
17
|
+
itemId?: string;
|
|
18
|
+
selectedData: SharedLib.FilterInput;
|
|
19
|
+
libVersion?: string;
|
|
20
|
+
chartElement: HTMLElement & Partial<SharedLib.LuzmoVizItemComponentInterface> & {
|
|
21
|
+
setFilters?: (itemId?: string, filters?: SharedLib.FilterInput) => SharedLib.SetFilters;
|
|
22
|
+
};
|
|
23
|
+
postInitCallQueue: FunctionCall[];
|
|
24
|
+
static styles: import("lit").CSSResult;
|
|
25
|
+
constructor();
|
|
26
|
+
canInitializeVizItem(): boolean;
|
|
27
|
+
getFilters(): SharedLib.FilterGroup[];
|
|
28
|
+
export(): void;
|
|
29
|
+
getData(): any;
|
|
30
|
+
refreshData(): void;
|
|
31
|
+
setFilters(filterInput: SharedLib.FilterInput): SharedLib.SetFilters;
|
|
32
|
+
setAuthorization(key: string, token: string): void;
|
|
33
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
34
|
+
protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
|
|
35
|
+
private createAndAppendElement;
|
|
36
|
+
private updateVizItemProperties;
|
|
37
|
+
updated(changedProperties: PropertyValues): Promise<void>;
|
|
38
|
+
private parseAndValidate;
|
|
39
|
+
protected render(): unknown;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export * from './lib/helpers/browser-check';
|
|
2
|
+
export * from './lib/helpers/default-parameters';
|
|
3
|
+
export * from './lib/helpers/error';
|
|
4
|
+
export * from './lib/helpers/extents';
|
|
5
|
+
export * from './lib/helpers/translations';
|
|
6
|
+
export * from './lib/helpers/utils';
|
|
7
|
+
export * from './lib/helpers/iframe-url';
|
|
8
|
+
export * from './lib/helpers/get-loader';
|
|
9
|
+
export * from './lib/helpers/promise-dispatch';
|
|
10
|
+
export * from './lib/helpers/styles';
|
|
11
|
+
export * from './lib/helpers/update-iframe-url';
|
|
12
|
+
export * from './lib/helpers/set-filter-utils';
|
|
13
|
+
export * from './lib/methods/export-dashboard';
|
|
14
|
+
export * from './lib/methods/get-accessible-dashboards';
|
|
15
|
+
export * from './lib/methods/get-data';
|
|
16
|
+
export * from './lib/methods/get-filters';
|
|
17
|
+
export * from './lib/methods/refresh-data';
|
|
18
|
+
export * from './lib/methods/reload-dashboard';
|
|
19
|
+
export * from './lib/methods/set-authorization';
|
|
20
|
+
export * from './lib/methods/set-edit-mode';
|
|
21
|
+
export * from './lib/methods/set-filters';
|
|
22
|
+
export * from './lib/methods/set-preview';
|
|
23
|
+
export * from './lib/service/calculate-dimensions';
|
|
24
|
+
export * from './lib/service/extend-and-validate';
|
|
25
|
+
export * from './lib/models/common.model';
|
|
26
|
+
export * from './lib/models/dashboard.model';
|
|
27
|
+
export * from './lib/models/events.model';
|
|
28
|
+
export * from './lib/models/styles.model';
|
|
29
|
+
export * from './lib/models/filters.model';
|
|
30
|
+
export * from './lib/models/viz-item.model';
|
|
31
|
+
export * from './lib/models/viz-item-post-message.model';
|
|
32
|
+
export * from './lib/models/viz-items';
|
|
33
|
+
export * from './lib/constants/class-constants';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const luzmoEmbedContainerClass = "luzmo-embed-container";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const createIframeUrl: (dashboardContent: any) => string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { LuzmoDashboard } from '../models/dashboard.model';
|
|
2
|
+
export declare function resolvePromise<T extends LuzmoDashboard>(dashboardComponent: T, requestId: string, data: unknown): void;
|
|
3
|
+
export declare function rejectPromise<T extends LuzmoDashboard>(dashboardComponent: T, requestId: string, data: unknown): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type RemoteMap = {
|
|
2
|
+
[remoteName: string]: {
|
|
3
|
+
url?: string;
|
|
4
|
+
format?: string;
|
|
5
|
+
from?: string;
|
|
6
|
+
module?: any;
|
|
7
|
+
inited?: boolean;
|
|
8
|
+
lib?: any;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
type ComponentNames = 'DashboardApp';
|
|
12
|
+
export declare const remotesMap: RemoteMap;
|
|
13
|
+
export declare function __federationMethodWrapDefault(module: any, need?: boolean): any;
|
|
14
|
+
export declare function __federationMethodGetRemote(remoteName: string, componentName: string): Promise<any>;
|
|
15
|
+
export declare function loadLibrary(appServer: string, componentName?: ComponentNames): Promise<any>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FilterInput, AvailableSlots } from '../models/filters.model';
|
|
2
|
+
export declare const filterUtils: {
|
|
3
|
+
merge(...filters: FilterInput[]): FilterInput;
|
|
4
|
+
isIn(slot: AvailableSlots, values: string[] | number[], otherOptions?: any): FilterInput;
|
|
5
|
+
between(slot: AvailableSlots, values: [string | number, string | number], otherOptions?: any): FilterInput;
|
|
6
|
+
range(slot: AvailableSlots, values: [string | number, string | number], otherOptions?: any): FilterInput;
|
|
7
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ContainerLoaderStyles, ContainerStyles, IframeStyles, LcStyles, LoaderStyles, PlStyles } from '../models/styles.model';
|
|
2
|
+
import { CommonLuzmoDashboard } from '../models/dashboard.model';
|
|
3
|
+
export declare function containerStyles(dashboardComponent: CommonLuzmoDashboard): ContainerStyles;
|
|
4
|
+
export declare function containerLoaderStyles(dashboardComponent: CommonLuzmoDashboard): ContainerLoaderStyles;
|
|
5
|
+
export declare function loaderStyles(dashboardComponent: CommonLuzmoDashboard): LoaderStyles;
|
|
6
|
+
export declare function plStyles(dashboardComponent: CommonLuzmoDashboard): PlStyles;
|
|
7
|
+
export declare function lcStyles(dashboardComponent: CommonLuzmoDashboard): LcStyles;
|
|
8
|
+
export declare function calculateIframeStyles(dashboardComponent: CommonLuzmoDashboard): IframeStyles;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const TRANSLATIONS: {
|
|
2
|
+
initializing: {
|
|
3
|
+
en: string;
|
|
4
|
+
nl: string;
|
|
5
|
+
fr: string;
|
|
6
|
+
};
|
|
7
|
+
errorDashboard: {
|
|
8
|
+
en: string;
|
|
9
|
+
nl: string;
|
|
10
|
+
fr: string;
|
|
11
|
+
};
|
|
12
|
+
errorItem: {
|
|
13
|
+
en: string;
|
|
14
|
+
nl: string;
|
|
15
|
+
fr: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default TRANSLATIONS;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const updateIframeUrl: (iframe: HTMLIFrameElement, iframeUrl?: string) => void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { LuzmoDashboard } from '../models/dashboard.model';
|
|
2
|
+
export declare const addTrailingSlash: (serverUrl?: string) => string;
|
|
3
|
+
export declare const removeTrailingSlash: (serverUrl?: string) => string;
|
|
4
|
+
export declare const formatDashboardList: (dashboards: any[], integrationId: string, user: any, dashboardComponent: LuzmoDashboard) => {
|
|
5
|
+
accessibleBy: {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
model: 'User' | 'Group' | 'Integration';
|
|
9
|
+
}[];
|
|
10
|
+
accessRights: {
|
|
11
|
+
flagRead?: boolean;
|
|
12
|
+
flagUse?: boolean;
|
|
13
|
+
flagModify?: boolean;
|
|
14
|
+
flagOwn?: boolean;
|
|
15
|
+
};
|
|
16
|
+
id: string;
|
|
17
|
+
modifiedAt: string;
|
|
18
|
+
name: string;
|
|
19
|
+
slug: string;
|
|
20
|
+
tags: string[];
|
|
21
|
+
}[];
|
|
22
|
+
export declare const VERSION = "0.0.0-unknown-luzmo";
|
|
23
|
+
export declare const sanitizeUrl: (url: string) => string;
|
|
24
|
+
export declare const cloneDeep: (obj: unknown) => any;
|
|
25
|
+
export declare const defaultsDeep: <T extends object>(target: T, defaults: T) => T;
|
|
26
|
+
export declare const s4: () => string;
|
|
27
|
+
export declare const uuidv4: () => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ExportDashboard } from '../models/common.model';
|
|
2
|
+
import { LuzmoDashboard } from '../models/dashboard.model';
|
|
3
|
+
export type ExportType = 'png' | 'pdf';
|
|
4
|
+
export declare const exportDashboard: <T extends LuzmoDashboard>(dashboardComponent: T, iframe: HTMLIFrameElement, format?: ExportType) => Promise<ExportDashboard>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DashboardEditMode, SetEditMode } from '../models/common.model';
|
|
2
|
+
import { LuzmoDashboard } from '../models/dashboard.model';
|
|
3
|
+
export declare const setEditMode: <T extends LuzmoDashboard>(dashboardComponent: T, iframe: HTMLIFrameElement, editMode?: DashboardEditMode) => Promise<SetEditMode>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SetFilters } from '../models/common.model';
|
|
2
|
+
import { LuzmoDashboard } from '../models/dashboard.model';
|
|
3
|
+
import { FilterInput } from '../models/filters.model';
|
|
4
|
+
export declare const setFilters: <T extends LuzmoDashboard>(dashboardComponent: T, iframe: HTMLIFrameElement, itemId: string, filters: FilterInput) => Promise<SetFilters>;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { FilterGroup } from './filters.model';
|
|
2
|
+
export type ScreenMode = 'mobile' | 'tablet' | 'desktop' | 'largeScreen' | 'fixed' | 'auto';
|
|
3
|
+
export type DashboardDimensions = Record<Exclude<ScreenMode, 'auto'>, [
|
|
4
|
+
number,
|
|
5
|
+
number,
|
|
6
|
+
string
|
|
7
|
+
]>;
|
|
8
|
+
export type CommonReturnType = {
|
|
9
|
+
dashboardId?: string;
|
|
10
|
+
dashboardSlug?: string;
|
|
11
|
+
integrationId?: string;
|
|
12
|
+
itemId?: string;
|
|
13
|
+
language?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
requestId?: string;
|
|
16
|
+
screenMode?: ScreenMode;
|
|
17
|
+
type?: string;
|
|
18
|
+
error?: boolean;
|
|
19
|
+
msg?: string;
|
|
20
|
+
};
|
|
21
|
+
export type ExportDashboard = {
|
|
22
|
+
type: 'export';
|
|
23
|
+
} & CommonReturnType;
|
|
24
|
+
export type AccessibleDashboard = {
|
|
25
|
+
accessibleBy?: {
|
|
26
|
+
model?: 'User' | 'Group' | 'Integration';
|
|
27
|
+
id?: string;
|
|
28
|
+
name?: string;
|
|
29
|
+
}[];
|
|
30
|
+
accessRights?: {
|
|
31
|
+
flagRead?: boolean;
|
|
32
|
+
flagUse?: boolean;
|
|
33
|
+
flagModify?: boolean;
|
|
34
|
+
flagOwn?: boolean;
|
|
35
|
+
};
|
|
36
|
+
id?: string;
|
|
37
|
+
modifiedAt?: string;
|
|
38
|
+
name?: string;
|
|
39
|
+
slug?: string | null;
|
|
40
|
+
tags: string[];
|
|
41
|
+
};
|
|
42
|
+
export type ItemData = any[];
|
|
43
|
+
export type DashboardEditMode = 'editFull' | 'editLimited' | 'view';
|
|
44
|
+
export type SetEditMode = {
|
|
45
|
+
type?: 'setEditMode';
|
|
46
|
+
editMode?: DashboardEditMode;
|
|
47
|
+
} & CommonReturnType;
|
|
48
|
+
export type SetFilters = {
|
|
49
|
+
filters?: FilterGroup[];
|
|
50
|
+
} & CommonReturnType;
|
|
51
|
+
export type SetPreview = {
|
|
52
|
+
type: 'setPreview';
|
|
53
|
+
preview?: boolean;
|
|
54
|
+
} & CommonReturnType;
|
|
55
|
+
export type AddFilters = {
|
|
56
|
+
type: 'AddFilters';
|
|
57
|
+
origin: 'itemFilter';
|
|
58
|
+
item: string;
|
|
59
|
+
filters: FilterGroup[];
|
|
60
|
+
};
|
|
61
|
+
export type DashboardPromises = Record<string, {
|
|
62
|
+
resolve: (value?: unknown | PromiseLike<unknown>) => void;
|
|
63
|
+
reject: (reason: any) => void;
|
|
64
|
+
}>;
|
|
65
|
+
export type BrowserCheckKey = 'svg' | 'flexbox' | 'postMessage';
|
|
66
|
+
export interface DashboardInputs {
|
|
67
|
+
appServer?: string;
|
|
68
|
+
apiHost?: string;
|
|
69
|
+
itemId?: string;
|
|
70
|
+
mainColor?: string;
|
|
71
|
+
accentColor?: string;
|
|
72
|
+
language?: string;
|
|
73
|
+
qeVersion?: number;
|
|
74
|
+
editMode?: DashboardEditMode;
|
|
75
|
+
screenMode?: ScreenMode;
|
|
76
|
+
switchScreenModeOnResize?: boolean;
|
|
77
|
+
dashboardId?: string;
|
|
78
|
+
dashboardSlug?: string;
|
|
79
|
+
itemDimensions?: {
|
|
80
|
+
width: number | 'auto';
|
|
81
|
+
height: number | 'auto';
|
|
82
|
+
};
|
|
83
|
+
timezoneId?: string;
|
|
84
|
+
loaderBackground?: string;
|
|
85
|
+
loaderFontColor?: string;
|
|
86
|
+
loaderSpinnerColor?: string;
|
|
87
|
+
loaderSpinnerBackground?: string;
|
|
88
|
+
authKey?: string;
|
|
89
|
+
authToken?: string;
|
|
90
|
+
experimental?: boolean;
|
|
91
|
+
}
|
|
92
|
+
export interface DashboardContentParams extends Exclude<DashboardInputs, 'authKey' | 'authToken' | 'loaderBackground' | 'loaderFontColor' | 'loaderSpinnerColor' | 'loaderSpinnerBackground'> {
|
|
93
|
+
key?: DashboardInputs['authKey'];
|
|
94
|
+
token?: DashboardInputs['authToken'];
|
|
95
|
+
itemEmbedding?: boolean;
|
|
96
|
+
loaderBackground?: DashboardInputs['loaderBackground'];
|
|
97
|
+
loaderFontColor?: DashboardInputs['loaderFontColor'];
|
|
98
|
+
loaderSpinnerColor?: DashboardInputs['loaderSpinnerColor'];
|
|
99
|
+
loaderSpinnerBackground?: DashboardInputs['loaderSpinnerBackground'];
|
|
100
|
+
error?: boolean;
|
|
101
|
+
container?: string;
|
|
102
|
+
contextId?: string;
|
|
103
|
+
}
|