@luzmo/embed 6.6.0 → 6.7.0-es2021
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 +126 -165
- package/README.md +17 -0
- package/index.cjs +45 -43
- package/index.js +42 -40
- package/luzmo-embed.min.js +130 -219
- package/package.json +10 -4
- package/src/index.d.ts +0 -8
- package/src/lib/dashboard/dashboard-base.d.ts +0 -96
- package/src/lib/dashboard/dashboard-component.d.ts +0 -8
- package/src/lib/dashboard/dashboard-styles.d.ts +0 -1
- package/src/lib/helper/event-bus-handler.d.ts +0 -1
- package/src/lib/helper/json-schema-utils.d.ts +0 -64
- package/src/lib/iq-components/luzmo-iq-answer.d.ts +0 -24
- package/src/lib/iq-components/luzmo-iq-chat.d.ts +0 -27
- package/src/lib/luzmo-service.d.ts +0 -6
- package/src/lib/viz-item/viz-item-component.d.ts +0 -4
- package/src/lib/viz-item/viz-item.base.d.ts +0 -71
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luzmo/embed",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.0-es2021",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"lit": "3.3.0",
|
|
6
|
-
"@luzmo/shared-embed": "5.
|
|
7
|
-
"@luzmo/dashboard-contents-types": "1.0.
|
|
6
|
+
"@luzmo/shared-embed": "5.6.0",
|
|
7
|
+
"@luzmo/dashboard-contents-types": "1.0.18"
|
|
8
8
|
},
|
|
9
9
|
"keywords": [
|
|
10
|
+
"es2021",
|
|
11
|
+
"safari-compatible",
|
|
10
12
|
"es6",
|
|
11
13
|
"web-component",
|
|
12
14
|
"lit",
|
|
@@ -22,5 +24,9 @@
|
|
|
22
24
|
],
|
|
23
25
|
"module": "./index.js",
|
|
24
26
|
"types": "./src/index.d.ts",
|
|
25
|
-
"license": "SEE LICENSE IN LICENSE"
|
|
27
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
28
|
+
"description": "ES2021 build for Safari < 16.3 compatibility",
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"tag": "es2021"
|
|
31
|
+
}
|
|
26
32
|
}
|
package/src/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type * from '@luzmo/dashboard-contents-types';
|
|
2
|
-
export type { LoadEvent, ChangedFiltersEvent, CustomEvent, ItemsRenderedEvent, ExportedEvent, DashboardActionEvent, SelectedDataInput, ExportType, DashboardExportType, ItemData, ExportDashboard, AccessibleDashboard, SetEditMode, SetSelectedData, DashboardEditMode, VizItemPostMessageLoadEvent, VizItemPostMessageRenderedEvent, VizItemPostMessageExportedEvent, VizItemPostMessageChangedFiltersEvent, VizItemPostMessageCustomEventEvent } from '@luzmo/shared-embed';
|
|
3
|
-
export { selectedDataUtils } from '@luzmo/shared-embed';
|
|
4
|
-
export * from './lib/dashboard/dashboard-component';
|
|
5
|
-
export * from './lib/viz-item/viz-item-component';
|
|
6
|
-
export * from './lib/iq-components/luzmo-iq-chat';
|
|
7
|
-
export * from './lib/iq-components/luzmo-iq-answer';
|
|
8
|
-
export * from './lib/helper/json-schema-utils';
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import type { FilterGroup } from '@luzmo/dashboard-contents-types';
|
|
2
|
-
import * as SharedLib from '@luzmo/shared-embed';
|
|
3
|
-
import { CombinedSelectedDataInput, DashboardInputs, LuzmoElement } from '@luzmo/shared-embed';
|
|
4
|
-
import { LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
5
|
-
export declare class LuzmoDashboard extends LitElement implements SharedLib.WebComponentLuzmoDashboard {
|
|
6
|
-
container: HTMLElement;
|
|
7
|
-
luzmoEmbedContainer: HTMLElement;
|
|
8
|
-
iframe: HTMLIFrameElement;
|
|
9
|
-
dashboardId?: SharedLib.DashboardInputs['dashboardId'];
|
|
10
|
-
dashboardSlug?: SharedLib.DashboardInputs['dashboardSlug'];
|
|
11
|
-
itemId?: SharedLib.DashboardInputs['itemId'];
|
|
12
|
-
language: SharedLib.DashboardInputs['language'];
|
|
13
|
-
editorLanguage: SharedLib.DashboardInputs['editorLanguage'];
|
|
14
|
-
qeVersion: SharedLib.DashboardInputs['qeVersion'];
|
|
15
|
-
screenMode: SharedLib.DashboardInputs['screenMode'];
|
|
16
|
-
switchScreenModeOnResize: boolean;
|
|
17
|
-
editMode: SharedLib.DashboardInputs['editMode'];
|
|
18
|
-
theme?: SharedLib.DashboardInputs['theme'];
|
|
19
|
-
mainColor?: SharedLib.DashboardInputs['mainColor'];
|
|
20
|
-
accentColor?: SharedLib.DashboardInputs['accentColor'];
|
|
21
|
-
authToken?: SharedLib.DashboardInputs['authToken'];
|
|
22
|
-
authKey?: SharedLib.DashboardInputs['authKey'];
|
|
23
|
-
loaderBackground?: SharedLib.DashboardInputs['loaderBackground'];
|
|
24
|
-
loaderFontColor?: SharedLib.DashboardInputs['loaderFontColor'];
|
|
25
|
-
loaderSpinnerColor?: SharedLib.DashboardInputs['loaderSpinnerColor'];
|
|
26
|
-
loaderSpinnerBackground?: SharedLib.DashboardInputs['loaderSpinnerBackground'];
|
|
27
|
-
appServer?: SharedLib.DashboardInputs['appServer'];
|
|
28
|
-
timezoneId?: SharedLib.DashboardInputs['timezoneId'];
|
|
29
|
-
apiHost?: SharedLib.DashboardInputs['apiHost'];
|
|
30
|
-
itemDimensions: SharedLib.DashboardInputs['itemDimensions'];
|
|
31
|
-
embedMode: DashboardInputs['embedMode'];
|
|
32
|
-
_containerId: string;
|
|
33
|
-
_iframeId: string;
|
|
34
|
-
params: SharedLib.DashboardContentParams;
|
|
35
|
-
_iframeUrl?: string;
|
|
36
|
-
iframeLoaded: boolean;
|
|
37
|
-
promises: SharedLib.DashboardPromises;
|
|
38
|
-
iframeStyle: SharedLib.IframeStyles;
|
|
39
|
-
_containerStyle: SharedLib.ContainerStyles;
|
|
40
|
-
_loaderStyle: SharedLib.LoaderStyles;
|
|
41
|
-
_lcStyle: SharedLib.LcStyles;
|
|
42
|
-
_loadingCircleStyle: SharedLib.PlStyles;
|
|
43
|
-
_containerLoaderStyle: SharedLib.ContainerLoaderStyles;
|
|
44
|
-
_loaderMsg: string;
|
|
45
|
-
containerWidth?: number;
|
|
46
|
-
dimensions?: SharedLib.DashboardDimensions;
|
|
47
|
-
currentScreenMode?: SharedLib.ScreenMode;
|
|
48
|
-
_itemEmbedding: boolean;
|
|
49
|
-
browserError: boolean;
|
|
50
|
-
browserErrorMsg: string;
|
|
51
|
-
dashboardError: boolean;
|
|
52
|
-
browserNotSupported: any[];
|
|
53
|
-
libVersion: string;
|
|
54
|
-
protected isLibraryLoaded: boolean;
|
|
55
|
-
protected dashboardReference: LuzmoElement;
|
|
56
|
-
currentAuthKey: string;
|
|
57
|
-
currentAuthToken: string;
|
|
58
|
-
isInitCalled: boolean;
|
|
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();
|
|
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<FilterGroup[]>;
|
|
86
|
-
setSelectedData<K extends CombinedSelectedDataInput>(itemId: string, filters: K): Promise<SharedLib.SetSelectedData>;
|
|
87
|
-
setAuthorization(key: string, token: string): Promise<void>;
|
|
88
|
-
refreshData(itemId?: string): Promise<void>;
|
|
89
|
-
reloadDashboard(): Promise<void>;
|
|
90
|
-
exportDashboard(format?: SharedLib.DashboardExportType): Promise<SharedLib.ExportDashboard>;
|
|
91
|
-
getAccessibleDashboards(): Promise<SharedLib.AccessibleDashboard[]>;
|
|
92
|
-
addFilters(itemId: string, filters: FilterGroup[]): Promise<SharedLib.AddFilters>;
|
|
93
|
-
setEditMode(editMode?: SharedLib.DashboardEditMode): Promise<SharedLib.SetEditMode>;
|
|
94
|
-
setPreview(preview: boolean): Promise<SharedLib.SetPreview>;
|
|
95
|
-
isWebComponentViewMode(): boolean;
|
|
96
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const dashboardStyles: import("lit").CSSResult;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const _setEventHandler: () => void;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adds JSON schemas to cache.
|
|
3
|
-
*/
|
|
4
|
-
export declare function addJSONSchemas(schemas: any): void;
|
|
5
|
-
/**
|
|
6
|
-
* Returns a cached JSON schema by URL/schema $id.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getCachedJSONSchema(schemaUrl: string): any;
|
|
9
|
-
/**
|
|
10
|
-
* Returns all the cached JSON schemas.
|
|
11
|
-
*/
|
|
12
|
-
export declare function getCachedJSONSchemas(): Record<string, any>;
|
|
13
|
-
/**
|
|
14
|
-
* Returns a URL for a Luzmo JSON schema name.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getJSONSchemaUrl(schemaName: string): string;
|
|
17
|
-
/**
|
|
18
|
-
* Fetches a Luzmo JSON schema. If a schema is cached it's returned.
|
|
19
|
-
*
|
|
20
|
-
* Example usage:
|
|
21
|
-
* const schema = await fetchJSONSchema('viz-item-type');
|
|
22
|
-
*
|
|
23
|
-
* In the example above, a schema https://developer.luzmo.com/assets/json-schemas/{version}/viz-item-type.schema.json
|
|
24
|
-
* will be fetched and cached.
|
|
25
|
-
*/
|
|
26
|
-
export declare function fetchJSONSchema(schemaName: string): Promise<any>;
|
|
27
|
-
/**
|
|
28
|
-
* If you need to dereference Luzmo JSON schemas in your application, you can use @apidevtools/json-schema-ref-parser
|
|
29
|
-
* library and provide the following options for the refParser.dereference() method.
|
|
30
|
-
*
|
|
31
|
-
* Example usage:
|
|
32
|
-
*
|
|
33
|
-
* import * as refParser from '@apidevtools/json-schema-ref-parser';
|
|
34
|
-
* import { fetchJSONSchema, luzmoRefParserOptions } from '@luzmo/embed';
|
|
35
|
-
*
|
|
36
|
-
* async function showDereferencedSchema() {
|
|
37
|
-
* const schema = await fetchJSONSchema('text');
|
|
38
|
-
* const dereferencedSchema = await refParser.dereference(schema, luzmoRefParserOptions);
|
|
39
|
-
* console.log(dereferencedSchema);
|
|
40
|
-
* }
|
|
41
|
-
*
|
|
42
|
-
* Another example:
|
|
43
|
-
*
|
|
44
|
-
* import * as refParser from '@apidevtools/json-schema-ref-parser';
|
|
45
|
-
* import { addJSONSchemas, luzmoRefParserOptions } from '@luzmo/embed';
|
|
46
|
-
* import { TextJSONSchema, TextOptionsJSONSchema } from "@luzmo/dashboard-contents-types";
|
|
47
|
-
*
|
|
48
|
-
* async function showDereferencedSchema() {
|
|
49
|
-
* addJSONSchemas([TextJSONSchema, TextOptionsJSONSchema]);
|
|
50
|
-
* const dereferencedSchema = await refParser.dereference(TextJSONSchema, luzmoRefParserOptions);
|
|
51
|
-
* console.log(dereferencedSchema);
|
|
52
|
-
* }
|
|
53
|
-
*/
|
|
54
|
-
export declare const luzmoRefParserOptions: {
|
|
55
|
-
mutateInputSchema: boolean;
|
|
56
|
-
resolve: {
|
|
57
|
-
luzmo: {
|
|
58
|
-
order: number;
|
|
59
|
-
canRead: (file: any) => boolean;
|
|
60
|
-
read: (file: any, callback: any) => void;
|
|
61
|
-
};
|
|
62
|
-
external: boolean;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { IQAnswerOptions, IQMessage } from '@luzmo/dashboard-contents-types';
|
|
2
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
3
|
-
import type { TemplateResult } from 'lit-html';
|
|
4
|
-
export declare class LuzmoIQEmbedAnswerComponent extends LitElement {
|
|
5
|
-
appServer?: string;
|
|
6
|
-
apiHost?: string;
|
|
7
|
-
options?: IQAnswerOptions;
|
|
8
|
-
aiEndPoint?: string;
|
|
9
|
-
authKey?: string;
|
|
10
|
-
authToken?: string;
|
|
11
|
-
messages: IQMessage[];
|
|
12
|
-
version?: string;
|
|
13
|
-
libVersion?: string;
|
|
14
|
-
remoteEntryServer: string;
|
|
15
|
-
chartElement: HTMLElement;
|
|
16
|
-
static styles: import("lit").CSSResult;
|
|
17
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
18
|
-
protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
|
|
19
|
-
private get calculatedAppServer();
|
|
20
|
-
private createAndAppendElement;
|
|
21
|
-
private updateVizItemProperties;
|
|
22
|
-
updated(changedProperties: PropertyValues): Promise<void>;
|
|
23
|
-
protected render(): TemplateResult<1>;
|
|
24
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { IQChatOptions } from '@luzmo/dashboard-contents-types';
|
|
2
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
3
|
-
import type { TemplateResult } from 'lit-html';
|
|
4
|
-
export declare class LuzmoIQEmbedChatComponent extends LitElement {
|
|
5
|
-
appServer?: string;
|
|
6
|
-
apiHost?: string;
|
|
7
|
-
options?: IQChatOptions;
|
|
8
|
-
initialSuggestionsDatasetId?: string;
|
|
9
|
-
aiEndpoint?: string;
|
|
10
|
-
authKey?: string;
|
|
11
|
-
authToken?: string;
|
|
12
|
-
version?: string;
|
|
13
|
-
libVersion?: string;
|
|
14
|
-
remoteEntryServer: string;
|
|
15
|
-
aydHost: string;
|
|
16
|
-
availableDatasets?: string[];
|
|
17
|
-
chartElement: HTMLElement;
|
|
18
|
-
static styles: import("lit").CSSResult;
|
|
19
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
20
|
-
protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
|
|
21
|
-
private get calculatedAppServer();
|
|
22
|
-
private createAndAppendElement;
|
|
23
|
-
private updateVizItemProperties;
|
|
24
|
-
updated(changedProperties: PropertyValues): Promise<void>;
|
|
25
|
-
protected render(): TemplateResult<1>;
|
|
26
|
-
connectedCallback(): void;
|
|
27
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { VizItemExportType, FilterGroup, VizItemOptions, VizItemSlots, VizItemType } from '@luzmo/dashboard-contents-types';
|
|
2
|
-
import * as SharedLib from '@luzmo/shared-embed';
|
|
3
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
4
|
-
/**
|
|
5
|
-
* The version of the dashboard contents that is linked to the current library.
|
|
6
|
-
*
|
|
7
|
-
* If custom options/slots/etc. are passed to the component, the library assumes that
|
|
8
|
-
* they are using this dashboard contents version. Then custom options/slots/etc.
|
|
9
|
-
* together with this dashboard contents version are passed to the dashboard app (https://app.luzmo.com/dashboard-app/remoteEntry.mjs)
|
|
10
|
-
* and if needed the migration will be applied on the dashboard app level.
|
|
11
|
-
*/
|
|
12
|
-
export declare const dashboardContentsVersion = "0.1.96";
|
|
13
|
-
type FunctionCall = [(...args: any) => any, any[]];
|
|
14
|
-
interface LuzmoVizItemComponentInterface extends HTMLElement {
|
|
15
|
-
options?: VizItemOptions;
|
|
16
|
-
type?: VizItemType;
|
|
17
|
-
appServer?: string;
|
|
18
|
-
apiHost?: string;
|
|
19
|
-
slots?: VizItemSlots;
|
|
20
|
-
canFilter?: string[] | 'all';
|
|
21
|
-
filters?: FilterGroup[];
|
|
22
|
-
contextId?: string;
|
|
23
|
-
authKey?: string;
|
|
24
|
-
authToken?: string;
|
|
25
|
-
dashboardId?: string;
|
|
26
|
-
itemId?: string;
|
|
27
|
-
getFilters: () => FilterGroup[];
|
|
28
|
-
export: (type?: VizItemExportType) => void;
|
|
29
|
-
refreshData: () => void;
|
|
30
|
-
getData: () => SharedLib.ItemData;
|
|
31
|
-
setSelectedData: (selectedDataInput: SharedLib.SelectedDataInput) => SharedLib.SetSelectedData;
|
|
32
|
-
setAuthorization: (key: string, token: string) => void;
|
|
33
|
-
}
|
|
34
|
-
export type { LuzmoVizItemComponentInterface };
|
|
35
|
-
export declare class LuzmoBaseVizItem extends LitElement implements LuzmoVizItemComponentInterface {
|
|
36
|
-
appServer?: string;
|
|
37
|
-
apiHost?: string;
|
|
38
|
-
slots?: VizItemSlots;
|
|
39
|
-
options?: VizItemOptions;
|
|
40
|
-
type?: VizItemType;
|
|
41
|
-
authKey?: string;
|
|
42
|
-
authToken?: string;
|
|
43
|
-
version?: string;
|
|
44
|
-
contextId?: string;
|
|
45
|
-
canFilter?: SharedLib.CanFilter;
|
|
46
|
-
filters?: FilterGroup[];
|
|
47
|
-
dashboardId?: string;
|
|
48
|
-
itemId?: string;
|
|
49
|
-
selectedData: SharedLib.SelectedDataInput;
|
|
50
|
-
dashboardContentsVersion?: string;
|
|
51
|
-
libVersion?: string;
|
|
52
|
-
chartElement: HTMLElement & Partial<LuzmoVizItemComponentInterface> & {
|
|
53
|
-
setSelectedData?: (itemId?: string, filters?: SharedLib.SelectedDataInput) => SharedLib.SetSelectedData;
|
|
54
|
-
};
|
|
55
|
-
postInitCallQueue: FunctionCall[];
|
|
56
|
-
static styles: import("lit").CSSResult;
|
|
57
|
-
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
58
|
-
canInitializeVizItem(): boolean;
|
|
59
|
-
getFilters(): FilterGroup[];
|
|
60
|
-
export(type?: VizItemExportType): void;
|
|
61
|
-
getData(): SharedLib.ItemData;
|
|
62
|
-
refreshData(): void;
|
|
63
|
-
setSelectedData(selectedDataInput: SharedLib.SelectedDataInput): SharedLib.SetSelectedData;
|
|
64
|
-
setAuthorization(key: string, token: string): void;
|
|
65
|
-
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
66
|
-
protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
|
|
67
|
-
private createAndAppendElement;
|
|
68
|
-
private updateVizItemProperties;
|
|
69
|
-
updated(changedProperties: PropertyValues): Promise<void>;
|
|
70
|
-
protected render(): unknown;
|
|
71
|
-
}
|