@luzmo/embed 6.1.7 → 6.1.9-beta.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 +12 -0
- package/README.md +172 -3
- package/index.cjs +311 -55365
- package/index.d.ts +5 -2
- package/index.js +303 -55360
- package/lib/helper/json-schema-utils.d.ts +64 -0
- package/lib/luzmo-iq-components/luzmo-iq-answer.d.ts +22 -0
- package/lib/luzmo-iq-components/luzmo-iq-chat.d.ts +23 -0
- package/lib/viz-item/viz-item.base.d.ts +1 -1
- package/luzmo-embed.min.js +358 -55428
- package/package.json +3 -3
- package/src/index.d.ts +8 -0
- package/src/lib/dashboard-component/dashboard-base.d.ts +98 -0
- package/src/lib/dashboard-component/dashboard-component.d.ts +8 -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/helper/json-schema-utils.d.ts +64 -0
- package/src/lib/luzmo-iq-components/luzmo-iq-answer.d.ts +22 -0
- package/src/lib/luzmo-iq-components/luzmo-iq-chat.d.ts +23 -0
- package/src/lib/luzmo-service.d.ts +6 -0
- package/src/lib/viz-item/viz-item-component.d.ts +4 -0
- package/src/lib/viz-item/viz-item.base.d.ts +72 -0
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import * as SharedLib from '@luzmo/shared-embed';
|
|
3
|
+
export declare class LuzmoIQEmbedAnswerComponent extends LitElement {
|
|
4
|
+
appServer?: string;
|
|
5
|
+
apiHost?: string;
|
|
6
|
+
options?: SharedLib.IQAnswerOptions;
|
|
7
|
+
aiEndPoint?: string;
|
|
8
|
+
authKey?: string;
|
|
9
|
+
authToken?: string;
|
|
10
|
+
messages: SharedLib.IQMessage[];
|
|
11
|
+
version?: string;
|
|
12
|
+
libVersion?: string;
|
|
13
|
+
remoteEntryServer: string;
|
|
14
|
+
chartElement: HTMLElement;
|
|
15
|
+
static styles: import("lit").CSSResult;
|
|
16
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
17
|
+
protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
|
|
18
|
+
private createAndAppendElement;
|
|
19
|
+
private updateVizItemProperties;
|
|
20
|
+
updated(changedProperties: PropertyValues): Promise<void>;
|
|
21
|
+
protected render(): unknown;
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import * as SharedLib from '@luzmo/shared-embed';
|
|
3
|
+
export declare class LuzmoIQEmbedChatComponent extends LitElement {
|
|
4
|
+
appServer?: string;
|
|
5
|
+
apiHost?: string;
|
|
6
|
+
options?: SharedLib.IQChatOptions;
|
|
7
|
+
initialSuggestionsDatasetId?: string;
|
|
8
|
+
aiEndpoint?: string;
|
|
9
|
+
authKey?: string;
|
|
10
|
+
authToken?: string;
|
|
11
|
+
version?: string;
|
|
12
|
+
libVersion?: string;
|
|
13
|
+
remoteEntryServer: string;
|
|
14
|
+
aydHost: string;
|
|
15
|
+
chartElement: HTMLElement;
|
|
16
|
+
static styles: import("lit").CSSResult;
|
|
17
|
+
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
18
|
+
protected firstUpdated(_changedProperties: PropertyValues): Promise<void>;
|
|
19
|
+
private createAndAppendElement;
|
|
20
|
+
private updateVizItemProperties;
|
|
21
|
+
updated(changedProperties: PropertyValues): Promise<void>;
|
|
22
|
+
protected render(): unknown;
|
|
23
|
+
}
|
|
@@ -9,7 +9,7 @@ import type { VizItemType, VizItemSlots, FilterGroup, VizItemOptions } from '@lu
|
|
|
9
9
|
* together with this dashboard contents version are passed to the dashboard app (https://app.luzmo.com/dashboard-app/remoteEntry.mjs)
|
|
10
10
|
* and if needed the migration will be applied on the dashboard app level.
|
|
11
11
|
*/
|
|
12
|
-
export declare const dashboardContentsVersion = "0.1.
|
|
12
|
+
export declare const dashboardContentsVersion = "0.1.90";
|
|
13
13
|
type FunctionCall = [(...args: any) => any, any[]];
|
|
14
14
|
interface LuzmoVizItemComponentInterface extends HTMLElement {
|
|
15
15
|
options?: VizItemOptions;
|