@luzmo/embed 6.13.5 → 7.0.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/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@luzmo/embed",
3
- "version": "6.13.5",
3
+ "version": "7.0.0-es2021",
4
4
  "dependencies": {
5
5
  "lit": "^3.3.1",
6
- "@luzmo/shared-embed": "5.12.2"
6
+ "@luzmo/shared-embed": "6.0.0"
7
7
  },
8
8
  "keywords": [
9
+ "es2021",
10
+ "safari-compatible",
9
11
  "es6",
10
12
  "web-component",
11
13
  "lit",
@@ -21,5 +23,9 @@
21
23
  ],
22
24
  "module": "./index.js",
23
25
  "types": "./src/index.d.ts",
24
- "license": "SEE LICENSE IN LICENSE"
26
+ "license": "SEE LICENSE IN LICENSE",
27
+ "description": "ES2021 build for Safari < 16.3 compatibility",
28
+ "publishConfig": {
29
+ "tag": "es2021"
30
+ }
25
31
  }
@@ -11,13 +11,11 @@ export declare class LuzmoDashboard extends LitElement implements SharedLib.WebC
11
11
  itemId?: SharedLib.DashboardInputs['itemId'];
12
12
  language: SharedLib.DashboardInputs['language'];
13
13
  editorLanguage: SharedLib.DashboardInputs['editorLanguage'];
14
- qeVersion: SharedLib.DashboardInputs['qeVersion'];
15
14
  screenMode: SharedLib.DashboardInputs['screenMode'];
16
15
  switchScreenModeOnResize: boolean;
17
16
  editMode: SharedLib.DashboardInputs['editMode'];
18
17
  theme?: SharedLib.DashboardInputs['theme'];
19
18
  mainColor?: SharedLib.DashboardInputs['mainColor'];
20
- accentColor?: SharedLib.DashboardInputs['accentColor'];
21
19
  authToken?: SharedLib.DashboardInputs['authToken'];
22
20
  authKey?: SharedLib.DashboardInputs['authKey'];
23
21
  loaderBackground?: SharedLib.DashboardInputs['loaderBackground'];
@@ -89,6 +87,7 @@ export declare class LuzmoDashboard extends LitElement implements SharedLib.WebC
89
87
  getDashboards(): Promise<LuzmoDashboard[]>;
90
88
  getData(itemId: string): Promise<SharedLib.ItemData>;
91
89
  getFilters(): Promise<FilterGroup[]>;
90
+ getDashboardContext(): Promise<SharedLib.DashboardContext | undefined>;
92
91
  setSelectedData<K extends CombinedSelectedDataInput>(itemId: string, filters: K): Promise<SharedLib.SetSelectedData>;
93
92
  setAuthorization(key: string, token: string): Promise<void>;
94
93
  refreshData(itemId?: string): Promise<void>;
@@ -1,17 +1,14 @@
1
1
  import type { IQChatOptions } from '@luzmo/dashboard-contents-types';
2
+ import { type DashboardContext } from '@luzmo/shared-embed';
2
3
  import { LitElement, PropertyValues } from 'lit';
3
4
  import type { TemplateResult } from 'lit-html';
4
- export interface SerializedDashboardContext {
5
- type: 'dashboard-context';
6
- id: string;
7
- json: unknown;
8
- screen_mode?: string;
9
- meta?: {
10
- title?: string;
11
- description?: string;
12
- };
13
- runtime_filters?: unknown[];
14
- }
5
+ /**
6
+ * Dashboard context accepted by the embedded IQ chat. Alias of the shared embed
7
+ * {@link DashboardContext} so the published contract stays in lockstep with
8
+ * `getDashboardContext()` and the `contextChanged` event (including the typed
9
+ * `runtimeFilters`).
10
+ */
11
+ export type SerializedDashboardContext = DashboardContext;
15
12
  export declare class LuzmoIQEmbedChatComponent extends LitElement {
16
13
  appServer?: string;
17
14
  apiHost?: string;
@@ -26,6 +23,8 @@ export declare class LuzmoIQEmbedChatComponent extends LitElement {
26
23
  aydHost: string;
27
24
  availableDatasets?: string[];
28
25
  dashboardContext?: SerializedDashboardContext;
26
+ dashboardId?: string;
27
+ contextIds?: string[];
29
28
  chartElement: HTMLElement;
30
29
  static styles: import("lit").CSSResult;
31
30
  protected createRenderRoot(): HTMLElement | DocumentFragment;
@@ -26,6 +26,7 @@ interface LuzmoVizItemComponentInterface extends HTMLElement {
26
26
  itemId?: string;
27
27
  aiMessageAssetId?: string;
28
28
  getFilters: () => FilterGroup[];
29
+ getVizItemContext?: () => SharedLib.VizItemContext;
29
30
  export: (type?: VizItemExportType) => Promise<string | void>;
30
31
  refreshData: () => void;
31
32
  getData: () => SharedLib.ItemData;
@@ -59,6 +60,12 @@ export declare class LuzmoBaseVizItem extends LitElement implements LuzmoVizItem
59
60
  protected createRenderRoot(): HTMLElement | DocumentFragment;
60
61
  canInitializeVizItem(): boolean;
61
62
  getFilters(): FilterGroup[];
63
+ /**
64
+ * Snapshot of this flex chart's live context: its definition (type, slots,
65
+ * options), current filters and the datasets it reads. Used by context-aware
66
+ * embeds such as the Luzmo IQ chat component.
67
+ */
68
+ getVizItemContext(): SharedLib.VizItemContext;
62
69
  export(type?: VizItemExportType): Promise<string | void>;
63
70
  getData(): SharedLib.ItemData;
64
71
  refreshData(): void;